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
f76dfbced32f6668db216bd7de85b6d00e6b07b2
283
py
Python
captain_comeback/restart/messages.py
zharben/captain-comeback
89205cf92299e559c2eb865c3b6befe5b94066ee
[ "MIT" ]
null
null
null
captain_comeback/restart/messages.py
zharben/captain-comeback
89205cf92299e559c2eb865c3b6befe5b94066ee
[ "MIT" ]
null
null
null
captain_comeback/restart/messages.py
zharben/captain-comeback
89205cf92299e559c2eb865c3b6befe5b94066ee
[ "MIT" ]
1
2016-10-11T14:52:05.000Z
2016-10-11T14:52:05.000Z
# coding:utf-8 # TODO: We should pass a read-only view of the cgroup instead to ensure # thread-safety. class RestartRequestedMessage(object): def __init__(self, cg): self.cg = cg class RestartCompleteMessage(object): def __init__(self, cg): self.cg = cg
20.214286
71
0.685512
class RestartRequestedMessage(object): def __init__(self, cg): self.cg = cg class RestartCompleteMessage(object): def __init__(self, cg): self.cg = cg
true
true
f76dfbcf4244b588171928925c6c8876b248ae09
4,048
py
Python
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/income_range_view_service/transports/base.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/income_range_view_service/transports/base.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/income_range_view_service/transports/base.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
36.142857
79
0.666749
import abc import typing import pkg_resources import google.auth from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials as ga_credentials from google.ads.googleads.v8.resources.types import income_range_view from google.ads.googleads.v8.services.typ...
true
true
f76dfc5ced388435d52c2ab0304c939ce765097c
409
py
Python
personal_gallery/wsgi.py
COdingaorg/personal_gallery
8fb88fa6a78c4536b88dab2d07615714b8f11071
[ "MIT" ]
null
null
null
personal_gallery/wsgi.py
COdingaorg/personal_gallery
8fb88fa6a78c4536b88dab2d07615714b8f11071
[ "MIT" ]
null
null
null
personal_gallery/wsgi.py
COdingaorg/personal_gallery
8fb88fa6a78c4536b88dab2d07615714b8f11071
[ "MIT" ]
null
null
null
""" WSGI config for personal_gallery 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('DJA...
24.058824
78
0.794621
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'personal_gallery.settings') application = get_wsgi_application()
true
true
f76dfcaa980ccdb98dbdaf4d40788ed60eb5dc1d
27,644
py
Python
astropy/modeling/tests/test_models.py
Olek-Donaldson/astropy
ed9ec69007bd540bcf476def57c5231e5e7c1240
[ "BSD-3-Clause" ]
4
2021-03-25T15:49:56.000Z
2021-12-15T09:10:04.000Z
astropy/modeling/tests/test_models.py
Olek-Donaldson/astropy
ed9ec69007bd540bcf476def57c5231e5e7c1240
[ "BSD-3-Clause" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
astropy/modeling/tests/test_models.py
Olek-Donaldson/astropy
ed9ec69007bd540bcf476def57c5231e5e7c1240
[ "BSD-3-Clause" ]
3
2021-03-28T16:13:00.000Z
2021-07-16T10:27:25.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for model evaluation. Compare the results of some models with other programs. """ # pylint: disable=invalid-name, no-member import pytest import numpy as np from numpy.testing import assert_allclose, assert_equal from astropy import units as u...
34.816121
84
0.605014
import pytest import numpy as np from numpy.testing import assert_allclose, assert_equal from astropy import units as u from astropy.modeling import fitting, models from astropy.modeling.models import Gaussian2D from astropy.modeling.core import FittableModel from astropy.modeling.parameters import Parameter from as...
true
true
f76dfce45f526d858a6dc3e72e254613e5468791
1,320
py
Python
cloud-sql/sql-server/sqlalchemy/main.py
jsj14/python-docs-samples
9cf5461b166eea824c40c704ed06c5ea53cf91d4
[ "Apache-2.0" ]
null
null
null
cloud-sql/sql-server/sqlalchemy/main.py
jsj14/python-docs-samples
9cf5461b166eea824c40c704ed06c5ea53cf91d4
[ "Apache-2.0" ]
null
null
null
cloud-sql/sql-server/sqlalchemy/main.py
jsj14/python-docs-samples
9cf5461b166eea824c40c704ed06c5ea53cf91d4
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
33
85
0.711364
from flask import render_template, Response from app import get_index_context, init_connection_pool, migrate_db, save_vote db = init_connection_pool() migrate_db(db) def votes(request): if request.method == "GET": context = get_index_context(db) return render_template("index.html", **context) ...
true
true
f76dff269e347767361bfb146fdfb5d75d1ec298
20,708
py
Python
networkx/algorithms/connectivity/edge_kcomponents.py
MaxBromberg/networkx
e4d1483f241e9a56fbda247592710b659d29bce5
[ "BSD-3-Clause" ]
10,024
2015-01-01T13:06:43.000Z
2022-03-31T12:45:25.000Z
networkx/algorithms/connectivity/edge_kcomponents.py
MaxBromberg/networkx
e4d1483f241e9a56fbda247592710b659d29bce5
[ "BSD-3-Clause" ]
3,191
2015-01-01T18:13:11.000Z
2022-03-31T22:06:00.000Z
networkx/algorithms/connectivity/edge_kcomponents.py
MaxBromberg/networkx
e4d1483f241e9a56fbda247592710b659d29bce5
[ "BSD-3-Clause" ]
3,272
2015-01-01T05:04:53.000Z
2022-03-31T17:46:35.000Z
""" Algorithms for finding k-edge-connected components and subgraphs. A k-edge-connected component (k-edge-cc) is a maximal set of nodes in G, such that all pairs of node have an edge-connectivity of at least k. A k-edge-connected subgraph (k-edge-subgraph) is a maximal set of nodes in G, such that the subgraph of G ...
35.580756
87
0.616622
import networkx as nx from networkx.utils import arbitrary_element from networkx.utils import not_implemented_for from networkx.algorithms import bridges from functools import partial import itertools as it __all__ = [ "k_edge_components", "k_edge_subgraphs", "bridge_components", "EdgeComponentAuxGraph...
true
true
f76e004d64c5421beadf69b948d6e5c6f4807d3a
2,628
py
Python
tests/test_parser.py
ravwojdyla/sphinx
a7e10c1d36007650b5e3948021d4aa90d78127d4
[ "BSD-2-Clause" ]
8
2021-01-29T23:28:16.000Z
2021-06-04T07:12:32.000Z
tests/test_parser.py
ravwojdyla/sphinx
a7e10c1d36007650b5e3948021d4aa90d78127d4
[ "BSD-2-Clause" ]
2
2022-02-14T04:37:40.000Z
2022-03-02T10:55:40.000Z
tests/test_parser.py
ravwojdyla/sphinx
a7e10c1d36007650b5e3948021d4aa90d78127d4
[ "BSD-2-Clause" ]
2
2019-11-03T19:02:59.000Z
2021-03-05T12:10:47.000Z
""" test_sphinx_parsers ~~~~~~~~~~~~~~~~~~~ Tests parsers module. :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from unittest.mock import Mock, patch import pytest from sphinx.parsers import RSTParser from sphinx.util.docutils impor...
39.818182
91
0.56583
from unittest.mock import Mock, patch import pytest from sphinx.parsers import RSTParser from sphinx.util.docutils import new_document @pytest.mark.sphinx(testroot='basic') @patch('docutils.parsers.rst.states.RSTStateMachine') def test_RSTParser_prolog_epilog(RSTStateMachine, app): document = new_document('dum...
true
true
f76e007275240cc438b6eb9ec453ff29378740df
6,342
py
Python
__init__.py
codingwithsomeguy/botbingo
592857679d9518b255680292772480e93304b1b9
[ "MIT" ]
null
null
null
__init__.py
codingwithsomeguy/botbingo
592857679d9518b255680292772480e93304b1b9
[ "MIT" ]
4
2020-07-24T20:52:12.000Z
2022-01-13T03:06:54.000Z
__init__.py
codingwithsomeguy/botbingo
592857679d9518b255680292772480e93304b1b9
[ "MIT" ]
null
null
null
"""simple image bingo card generator in python, originally for bots""" import os import io import math import random import textwrap import PIL.Image import PIL.ImageDraw import PIL.ImageFont CARD_SIZE = (720, 720) NUDGE = 8 MODE = "RGBA" IMAGE_FORMAT = "PNG" PALETTE = ["#37547d", "#1d3a62", "#8499b6", "#ffffff", ...
29.915094
80
0.664775
import os import io import math import random import textwrap import PIL.Image import PIL.ImageDraw import PIL.ImageFont CARD_SIZE = (720, 720) NUDGE = 8 MODE = "RGBA" IMAGE_FORMAT = "PNG" PALETTE = ["#37547d", "#1d3a62", "#8499b6", "#ffffff", "#ffffff"] LINE_COLOR = PALETTE[4] BG_COLOR = PALETTE[1] FG_COLOR = LIN...
true
true
f76e00d1e090bd609aa81f88c87d98c5740c69ef
459
py
Python
pythran/tests/cases/lapl3d.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,647
2015-01-13T01:45:38.000Z
2022-03-28T01:23:41.000Z
pythran/tests/cases/lapl3d.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,116
2015-01-01T09:52:05.000Z
2022-03-18T21:06:40.000Z
pythran/tests/cases/lapl3d.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
180
2015-02-12T02:47:28.000Z
2022-03-14T10:28:18.000Z
#runas: import numpy as np ; N = 500 ; X = np.random.randn(N,N,3); laplacien(X) #pythran export laplacien(float64[][][3]) import numpy as np def laplacien(image): out_image = np.abs(4*image[1:-1,1:-1] - image[0:-2,1:-1] - image[2:,1:-1] - image[...
35.307692
79
0.522876
import numpy as np def laplacien(image): out_image = np.abs(4*image[1:-1,1:-1] - image[0:-2,1:-1] - image[2:,1:-1] - image[1:-1,0:-2] - image[1:-1,2:]) valmax = np.max(out_image) valmax = max(1.,valmax)+1.E-9 out_image /= valmax ...
true
true
f76e00fbec6efae5a63d32dd1b4af02694067757
44,411
py
Python
nova/tests/unit/conductor/tasks/test_migrate.py
rolaya/nova
5434e4c401cc7968ddd516537971b687631b3147
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/conductor/tasks/test_migrate.py
rolaya/nova
5434e4c401cc7968ddd516537971b687631b3147
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/conductor/tasks/test_migrate.py
rolaya/nova
5434e4c401cc7968ddd516537971b687631b3147
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
45.179044
79
0.635608
import mock from oslo_serialization import jsonutils from oslo_utils.fixture import uuidsentinel as uuids from nova.compute import rpcapi as compute_rpcapi from nova.conductor.tasks import migrate from nova import context from nova import exception from nova import objects from nova.scheduler.client import query from...
true
true
f76e00ffd759546ce6ee3f5774bbd2a9c3054ca5
268
py
Python
pysurf/utils/colors.py
MFSJMenger/pysurf
99c6a94d4cb5046f16a0961b907061d989ffb6dc
[ "Apache-2.0" ]
7
2020-10-28T13:46:08.000Z
2021-05-27T06:41:56.000Z
pysurf/utils/colors.py
MFSJMenger/pysurf
99c6a94d4cb5046f16a0961b907061d989ffb6dc
[ "Apache-2.0" ]
2
2020-10-27T19:15:12.000Z
2020-10-27T19:15:25.000Z
pysurf/utils/colors.py
MFSJMenger/pysurf
99c6a94d4cb5046f16a0961b907061d989ffb6dc
[ "Apache-2.0" ]
2
2021-04-15T05:54:30.000Z
2022-02-08T00:10:10.000Z
COLORS = { 'lightblue': '#1c98fa', 'darkblue': '#040443', 'lightgrey': '#c2c8d0', 'darkgrey': '#525252', 'black': '#040404', 'orange': '#fa6e1c', 'red': '#fa361c', 'gold': '#fadc1c', 'purple': '#bb1cfa', 'lime': '#1cfa7c', 'green': '#5bfa1c', }
19.142857
26
0.518657
COLORS = { 'lightblue': '#1c98fa', 'darkblue': '#040443', 'lightgrey': '#c2c8d0', 'darkgrey': '#525252', 'black': '#040404', 'orange': '#fa6e1c', 'red': '#fa361c', 'gold': '#fadc1c', 'purple': '#bb1cfa', 'lime': '#1cfa7c', 'green': '#5bfa1c', }
true
true
f76e016d2043dd5a21e1806ad2a24d83cced5d9a
4,515
py
Python
rllib/agents/dqn/tests/test_dqn.py
richardrl/ray
cf53b351471716e7bfa71d36368ebea9b0e219c5
[ "Apache-2.0" ]
1
2020-08-20T16:22:38.000Z
2020-08-20T16:22:38.000Z
rllib/agents/dqn/tests/test_dqn.py
richardrl/ray
cf53b351471716e7bfa71d36368ebea9b0e219c5
[ "Apache-2.0" ]
null
null
null
rllib/agents/dqn/tests/test_dqn.py
richardrl/ray
cf53b351471716e7bfa71d36368ebea9b0e219c5
[ "Apache-2.0" ]
null
null
null
import numpy as np import unittest import ray import ray.rllib.agents.dqn as dqn from ray.rllib.utils.framework import try_import_tf from ray.rllib.utils.test_utils import check, framework_iterator, \ check_compute_action tf = try_import_tf() class TestDQN(unittest.TestCase): @classmethod def setUpClass...
37.008197
79
0.581838
import numpy as np import unittest import ray import ray.rllib.agents.dqn as dqn from ray.rllib.utils.framework import try_import_tf from ray.rllib.utils.test_utils import check, framework_iterator, \ check_compute_action tf = try_import_tf() class TestDQN(unittest.TestCase): @classmethod def setUpClass...
true
true
f76e024d4cdc333e43299f06503989d45ecb4ba3
8,810
py
Python
src/sage/modules/diamond_cutting.py
fchapoton/sage
765c5cb3e24dd134708eca97e4c52e0221cd94ba
[ "BSL-1.0" ]
2
2019-06-02T03:16:59.000Z
2019-06-15T10:17:18.000Z
src/sage/modules/diamond_cutting.py
fchapoton/sage
765c5cb3e24dd134708eca97e4c52e0221cd94ba
[ "BSL-1.0" ]
null
null
null
src/sage/modules/diamond_cutting.py
fchapoton/sage
765c5cb3e24dd134708eca97e4c52e0221cd94ba
[ "BSL-1.0" ]
3
2020-03-29T17:13:36.000Z
2021-05-03T18:11:28.000Z
""" Diamond cutting implementation AUTHORS: - Jan Poeschko (2012-07-02): initial version """ # **************************************************************************** # Copyright (C) 2012 Jan Poeschko <jan@poeschko.com> # # Distributed under the terms of the GNU General Public License (GPL) # as publishe...
29.464883
106
0.503178
from __future__ import print_function from sage.geometry.polyhedron.constructor import Polyhedron from sage.matrix.constructor import matrix, identity_matrix from sage.modules.free_module_element import vector from sage.rings.rational_field import QQ from math import sqrt, floor, ceil def plane_inequality(v): v...
true
true
f76e02dd14bcffe2c28f101d095334e18613f926
8,775
py
Python
visualDet3D/data/kitti/kittidata.py
oliver0922/yolo3dstereo
24c37c4574eedd85593a0060b7c317b3e08c0460
[ "Apache-2.0" ]
null
null
null
visualDet3D/data/kitti/kittidata.py
oliver0922/yolo3dstereo
24c37c4574eedd85593a0060b7c317b3e08c0460
[ "Apache-2.0" ]
null
null
null
visualDet3D/data/kitti/kittidata.py
oliver0922/yolo3dstereo
24c37c4574eedd85593a0060b7c317b3e08c0460
[ "Apache-2.0" ]
null
null
null
''' File Created: Sunday, 17th March 2019 3:58:52 pm Author: Peng YUN (pyun@ust.hk) Copyright 2018 - 2019 RAM-Lab, RAM-Lab ''' import os import math import numpy as np from numpy.linalg import inv from .utils import read_image, read_pc_from_bin, _lidar2leftcam, _leftcam2lidar, _leftcam2imgplane # KITTI class KittiCalib...
34.683794
132
0.53698
import os import math import numpy as np from numpy.linalg import inv from .utils import read_image, read_pc_from_bin, _lidar2leftcam, _leftcam2lidar, _leftcam2imgplane class KittiCalib: def __init__(self, calib_path): self.path = calib_path self.data = None def read_calib_file(self): c...
true
true
f76e0394dac8553d90e88d577c8abfe6749baf41
1,493
py
Python
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/_Another-One/sorts/random_normaldistribution_quicksort.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
13
2021-03-11T00:25:22.000Z
2022-03-19T00:19:23.000Z
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/_Another-One/sorts/random_normaldistribution_quicksort.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
160
2021-04-26T19:04:15.000Z
2022-03-26T20:18:37.000Z
notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/_Another-One/sorts/random_normaldistribution_quicksort.py
side-projects-42/INTERVIEW-PREP-COMPLETE
627a3315cee4bbc38a0e81c256f27f928eac2d63
[ "MIT" ]
12
2021-04-26T19:43:01.000Z
2022-01-31T08:36:29.000Z
from __future__ import print_function from random import randint from tempfile import TemporaryFile import numpy as np import math def _inPlaceQuickSort(A, start, end): count = 0 if start < end: pivot = randint(start, end) temp = A[end] A[end] = A[pivot] A[pivot] = temp ...
22.969231
90
0.618888
from __future__ import print_function from random import randint from tempfile import TemporaryFile import numpy as np import math def _inPlaceQuickSort(A, start, end): count = 0 if start < end: pivot = randint(start, end) temp = A[end] A[end] = A[pivot] A[pivot] = temp ...
true
true
f76e0411396cc320fdce65bc2c4a8e72f5ff5033
236
py
Python
schools/urls.py
API-Imperfect/GeoDjango-Schools-Map
1ff2c6fc2ee93c35aa6549960f3341415ae1e8e9
[ "MIT" ]
3
2021-03-22T09:12:28.000Z
2022-02-11T11:15:14.000Z
schools/urls.py
API-Imperfect/GeoDjango-Schools-Map
1ff2c6fc2ee93c35aa6549960f3341415ae1e8e9
[ "MIT" ]
null
null
null
schools/urls.py
API-Imperfect/GeoDjango-Schools-Map
1ff2c6fc2ee93c35aa6549960f3341415ae1e8e9
[ "MIT" ]
8
2021-03-10T10:18:20.000Z
2022-03-13T19:48:42.000Z
from rest_framework.routers import DefaultRouter from .views import SchoolViewSet router = DefaultRouter() router.register(prefix='api/v1/schools', viewset=SchoolViewSet, basename='school') urlpatterns = router.urls
21.454545
57
0.754237
from rest_framework.routers import DefaultRouter from .views import SchoolViewSet router = DefaultRouter() router.register(prefix='api/v1/schools', viewset=SchoolViewSet, basename='school') urlpatterns = router.urls
true
true
f76e04bb6c275bb27dce61d7031d7354fa0124b7
2,441
py
Python
saas/blueking/component/apis/bk_login.py
nannan00/bk-iam-saas
217600fa6e5fd466fff9c33c20c4dbd7c69f77d9
[ "MIT" ]
7
2021-08-13T03:48:16.000Z
2021-12-20T15:31:38.000Z
saas/blueking/component/apis/bk_login.py
nannan00/bk-iam-saas
217600fa6e5fd466fff9c33c20c4dbd7c69f77d9
[ "MIT" ]
456
2021-08-16T02:13:57.000Z
2022-03-30T10:02:49.000Z
saas/blueking/component/apis/bk_login.py
nannan00/bk-iam-saas
217600fa6e5fd466fff9c33c20c4dbd7c69f77d9
[ "MIT" ]
17
2021-08-10T04:08:46.000Z
2022-03-14T14:24:36.000Z
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with th...
43.589286
115
0.650143
from ..base import ComponentAPI class CollectionsBkLogin(object): def __init__(self, client): self.client = client self.get_all_users = ComponentAPI( client=self.client, method='GET', path='/api/c/compapi{bk_api_ver}/bk_login/get_all_users/', descri...
true
true
f76e05f6c04370cbe269ab8995dbcff3dd82b926
3,740
py
Python
content-validation/list-icons.py
digitalfabrik/helper-bash-scripts
94dc63de31b97e355d8bc83e34b78d3b39c90609
[ "MIT" ]
2
2021-10-30T12:58:36.000Z
2021-10-30T12:58:51.000Z
content-validation/list-icons.py
digitalfabrik/helper-bash-scripts
94dc63de31b97e355d8bc83e34b78d3b39c90609
[ "MIT" ]
1
2019-01-07T15:20:43.000Z
2019-01-07T15:20:43.000Z
content-validation/list-icons.py
digitalfabrik/helper-bash-scripts
94dc63de31b97e355d8bc83e34b78d3b39c90609
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import requests import json import sys import hashlib #from __future__ import print_function SERVER="https://cms.integreat-app.de" def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def get_sites(): r = requests.get("{}/wp-json/extensions/v3/sites".format(SERVER), hea...
35.619048
126
0.57246
import requests import json import sys import hashlib SERVER="https://cms.integreat-app.de" def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) def get_sites(): r = requests.get("{}/wp-json/extensions/v3/sites".format(SERVER), headers={"X-Integreat-Development":"1"}) for site in r.json()...
true
true
f76e0611116bb3b43838474db502fc1eb901da7c
1,276
py
Python
prune/pruning_method_utils.py
itayhubara/AcceleratedSparseNeuralTraining
425897dec9c7ef185841d7000c4418ebb1c95896
[ "Apache-2.0" ]
3
2021-11-24T12:46:11.000Z
2021-11-25T01:45:14.000Z
prune/pruning_method_utils.py
itayhubara/AcceleratedSparseNeuralTraining
425897dec9c7ef185841d7000c4418ebb1c95896
[ "Apache-2.0" ]
null
null
null
prune/pruning_method_utils.py
itayhubara/AcceleratedSparseNeuralTraining
425897dec9c7ef185841d7000c4418ebb1c95896
[ "Apache-2.0" ]
null
null
null
import torch def validate_tensor_shape_2d_4d(t): shape = t.shape if len(shape) not in (2, 4): raise ValueError( "Only 2D and 4D tensor shapes are supported. Found " "Found tensor of shape {} with {} dims".format(shape, len(shape)) ) def pad_inner_dims(t, pad_to): ...
29
77
0.628527
import torch def validate_tensor_shape_2d_4d(t): shape = t.shape if len(shape) not in (2, 4): raise ValueError( "Only 2D and 4D tensor shapes are supported. Found " "Found tensor of shape {} with {} dims".format(shape, len(shape)) ) def pad_inner_dims(t, pad_to): ...
true
true
f76e06ad1cc0e818e5425f5bd6bb4d0d33558ed6
51,966
py
Python
pyscf/pbc/dft/numint.py
crisely09/pyscf
cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6
[ "Apache-2.0" ]
null
null
null
pyscf/pbc/dft/numint.py
crisely09/pyscf
cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6
[ "Apache-2.0" ]
null
null
null
pyscf/pbc/dft/numint.py
crisely09/pyscf
cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
41.374204
95
0.54578
import sys import ctypes import numpy from pyscf import lib from pyscf.dft import numint from pyscf.dft.numint import eval_mat, _dot_ao_ao, _dot_ao_dm from pyscf.dft.numint import _scale_ao, _contract_rho from pyscf.dft.numint import _rks_gga_wv0, _rks_gga_wv1 from pyscf.dft.numint import _uks_gga_wv0, _uks_gga_wv1 fr...
true
true
f76e06fb195039d8019ffc70a3dfa2a927bc1c25
2,855
py
Python
app.py
MoseGai/epidemic
582f3b961ce3be0cf31a71ce114cf359ce03dada
[ "MIT" ]
null
null
null
app.py
MoseGai/epidemic
582f3b961ce3be0cf31a71ce114cf359ce03dada
[ "MIT" ]
null
null
null
app.py
MoseGai/epidemic
582f3b961ce3be0cf31a71ce114cf359ce03dada
[ "MIT" ]
null
null
null
from flask import Flask as _Flask,jsonify from flask import request from flask import render_template from flask.json import JSONEncoder as _JSONEncoder from jieba.analyse import extract_tags import decimal import utils import string class JSONEncoder(_JSONEncoder): def default(self, o): if isinsta...
24.826087
91
0.598599
from flask import Flask as _Flask,jsonify from flask import request from flask import render_template from flask.json import JSONEncoder as _JSONEncoder from jieba.analyse import extract_tags import decimal import utils import string class JSONEncoder(_JSONEncoder): def default(self, o): if isinsta...
true
true
f76e070583ecc3e27f783010991ae3d757194824
389
py
Python
Melbit/Melbit/wsgi.py
jubin3424/melbit
c71958c8ca633cfa292f19834b3b2bd0f046a054
[ "MIT" ]
null
null
null
Melbit/Melbit/wsgi.py
jubin3424/melbit
c71958c8ca633cfa292f19834b3b2bd0f046a054
[ "MIT" ]
null
null
null
Melbit/Melbit/wsgi.py
jubin3424/melbit
c71958c8ca633cfa292f19834b3b2bd0f046a054
[ "MIT" ]
null
null
null
""" WSGI config for Melbit project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTIN...
22.882353
78
0.784062
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Melbit.settings") application = get_wsgi_application()
true
true
f76e07abeccad27c102a6ab18b99d1fbb9c4bcdf
8,831
py
Python
nematus/settings.py
bariluz93/nematus
b9c03b50647f4e0a8f5991b5a265c9a6a84d04ca
[ "BSD-3-Clause" ]
null
null
null
nematus/settings.py
bariluz93/nematus
b9c03b50647f4e0a8f5991b5a265c9a6a84d04ca
[ "BSD-3-Clause" ]
null
null
null
nematus/settings.py
bariluz93/nematus
b9c03b50647f4e0a8f5991b5a265c9a6a84d04ca
[ "BSD-3-Clause" ]
1
2021-06-10T11:19:45.000Z
2021-06-10T11:19:45.000Z
#!/usr/bin/env python3 """ Parses console arguments. """ import sys import argparse import uuid import logging from abc import ABCMeta class BaseSettings(object, metaclass=ABCMeta): """ All modes (abstract base class) """ def __init__(self, from_console_arguments=False): self._from_console_arg...
38.563319
109
0.604915
import sys import argparse import uuid import logging from abc import ABCMeta class BaseSettings(object, metaclass=ABCMeta): def __init__(self, from_console_arguments=False): self._from_console_arguments = from_console_arguments self._parser = argparse.ArgumentParser() self._add_console_ar...
true
true
f76e08cde42642da6618abcd87c6dc93e5cb0269
3,903
py
Python
split_cluster_list.py
leejz/scripts
ab23af0bac5a5051df83fb9f59f23e7c413fd81a
[ "MIT" ]
1
2021-05-24T06:15:16.000Z
2021-05-24T06:15:16.000Z
split_cluster_list.py
leejz/misc-scripts
ab23af0bac5a5051df83fb9f59f23e7c413fd81a
[ "MIT" ]
1
2015-09-08T16:40:49.000Z
2015-09-08T16:40:49.000Z
split_cluster_list.py
leejz/misc-scripts
ab23af0bac5a5051df83fb9f59f23e7c413fd81a
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ -------------------------------------------------------------------------------- Created: Jackson Lee 7/8/14 This script reads in a tab delimited file of clusters, and a list of number ranges for reads in each cluster. The script will parse all reads based on the number ranges, and then o...
40.237113
137
0.546503
""" -------------------------------------------------------------------------------- Created: Jackson Lee 7/8/14 This script reads in a tab delimited file of clusters, and a list of number ranges for reads in each cluster. The script will parse all reads based on the number ranges, and then output a file for each ...
false
true
f76e090740abd240fe809054f2d12e3fcdf31566
269
py
Python
commander/setup.py
ugnelis/ros-cameras-controller
0a7811f3c33da13b89d0b4f1723afd50dabd7bc7
[ "BSD-3-Clause" ]
4
2018-09-06T11:01:17.000Z
2018-09-08T23:02:32.000Z
commander/setup.py
ugnelis/ros-cameras-controller
0a7811f3c33da13b89d0b4f1723afd50dabd7bc7
[ "BSD-3-Clause" ]
6
2018-10-03T13:20:01.000Z
2018-10-18T05:54:33.000Z
commander/setup.py
ugnelis/ros-cameras-controller
0a7811f3c33da13b89d0b4f1723afd50dabd7bc7
[ "BSD-3-Clause" ]
3
2018-10-08T18:14:59.000Z
2018-10-16T02:15:00.000Z
#!/usr/bin/env python from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup # Fetch values from package.xml. setup_args = generate_distutils_setup( packages=['commander'], package_dir={'': 'src'}, ) setup(**setup_args)
22.416667
60
0.758364
from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup setup_args = generate_distutils_setup( packages=['commander'], package_dir={'': 'src'}, ) setup(**setup_args)
true
true
f76e09c054ffe689762e54810364eb4528917dfe
176
py
Python
mtsb/__init__.py
federicodeservi/mtsb-analyzer
525fea09e142cb24a6dd78b0a87cd3b492f8b431
[ "MIT" ]
null
null
null
mtsb/__init__.py
federicodeservi/mtsb-analyzer
525fea09e142cb24a6dd78b0a87cd3b492f8b431
[ "MIT" ]
null
null
null
mtsb/__init__.py
federicodeservi/mtsb-analyzer
525fea09e142cb24a6dd78b0a87cd3b492f8b431
[ "MIT" ]
null
null
null
from .movie_library import spearman_corr from .movie_library import sentiment_boxoffice_all from .movie_library import sentiment from .movie_library import tweet_collector
35.2
51
0.863636
from .movie_library import spearman_corr from .movie_library import sentiment_boxoffice_all from .movie_library import sentiment from .movie_library import tweet_collector
true
true
f76e0a1ec88cf0a698a9b5e85b4c5836a66c2280
5,176
py
Python
ERC/ERC/spiders/ICOBench.py
SamIlic/Web-Scraping
fae1e0b000adda18abff44e4c60fbad77e872314
[ "MIT" ]
1
2022-02-22T12:15:28.000Z
2022-02-22T12:15:28.000Z
ERC/ERC/spiders/ICOBench.py
SamIlic/Web-Scraping
fae1e0b000adda18abff44e4c60fbad77e872314
[ "MIT" ]
null
null
null
ERC/ERC/spiders/ICOBench.py
SamIlic/Web-Scraping
fae1e0b000adda18abff44e4c60fbad77e872314
[ "MIT" ]
1
2022-02-22T12:15:30.000Z
2022-02-22T12:15:30.000Z
# -*- coding: utf-8 -*- import scrapy # needed to scrape import xlrd # used to easily import xlsx file import json import re import pandas as pd import numpy as np from openpyxl import load_workbook import datetime #from datetime import timedelta class ICObench(scrapy.Spider): name = 'ICOBench' # Name of Sc...
43.495798
238
0.479907
import scrapy import xlrd import json import re import pandas as pd import numpy as np from openpyxl import load_workbook import datetime class ICObench(scrapy.Spider): name = 'ICOBench' file_path = r"/Users/YoungFreeesh/Visual Studio Code/_Python/Web Scraping/ERC/Data/MASTER-1000.xlsx" MAST...
true
true
f76e0ad3984d12d53efa9430ad55b2a465e90cb9
1,410
py
Python
algos/models/ddqn_cnn.py
BeylierMPG/Reinforcement-Learning
17495386e36a27c5fc617e24221baf0fc5743c91
[ "MIT" ]
null
null
null
algos/models/ddqn_cnn.py
BeylierMPG/Reinforcement-Learning
17495386e36a27c5fc617e24221baf0fc5743c91
[ "MIT" ]
null
null
null
algos/models/ddqn_cnn.py
BeylierMPG/Reinforcement-Learning
17495386e36a27c5fc617e24221baf0fc5743c91
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.autograd as autograd import torch.nn.functional as F class DDQNCnn(nn.Module): def __init__(self, input_shape, num_actions): super(DDQNCnn, self).__init__() self.input_shape = input_shape self.num_actions = num_actions self....
27.647059
102
0.534752
import torch import torch.nn as nn import torch.autograd as autograd import torch.nn.functional as F class DDQNCnn(nn.Module): def __init__(self, input_shape, num_actions): super(DDQNCnn, self).__init__() self.input_shape = input_shape self.num_actions = num_actions self....
true
true
f76e0ba77bb1081dc00a10d5f1319431d318456f
20,869
py
Python
pymeteosalute.py
opensensorsdata/porcellinobot
828f673b158c55e3610eb10c24d9ffb543714511
[ "MIT" ]
null
null
null
pymeteosalute.py
opensensorsdata/porcellinobot
828f673b158c55e3610eb10c24d9ffb543714511
[ "MIT" ]
null
null
null
pymeteosalute.py
opensensorsdata/porcellinobot
828f673b158c55e3610eb10c24d9ffb543714511
[ "MIT" ]
null
null
null
import time,math from datetime import datetime pi =3.141592653589793238462643 tpi = 2 * 3.141592653589793238462643 degs = 180.0/3.141592653589793238462643 rads = 3.141592653589793238462643/180.0 def C2K(temp_c): return temp_c + 273.16 def C2F(temp_c): return ((temp_c * 9.0)/5.0) + 32.0 def F2C(temp_f): ...
39.902486
6,963
0.629594
import time,math from datetime import datetime pi =3.141592653589793238462643 tpi = 2 * 3.141592653589793238462643 degs = 180.0/3.141592653589793238462643 rads = 3.141592653589793238462643/180.0 def C2K(temp_c): return temp_c + 273.16 def C2F(temp_c): return ((temp_c * 9.0)/5.0) + 32.0 def F2C(temp_f): ...
true
true
f76e0c68116989c4f4b701e20fa3e87039471317
11,542
py
Python
torchvision/prototype/datasets/utils/_internal.py
lepoeme20/vision
eac3dc7bab436725b0ba65e556d3a6ffd43c24e1
[ "BSD-3-Clause" ]
null
null
null
torchvision/prototype/datasets/utils/_internal.py
lepoeme20/vision
eac3dc7bab436725b0ba65e556d3a6ffd43c24e1
[ "BSD-3-Clause" ]
null
null
null
torchvision/prototype/datasets/utils/_internal.py
lepoeme20/vision
eac3dc7bab436725b0ba65e556d3a6ffd43c24e1
[ "BSD-3-Clause" ]
null
null
null
import enum import functools import gzip import io import lzma import mmap import os import os.path import pathlib import pickle import platform from typing import BinaryIO from typing import ( Sequence, Callable, Union, Any, Tuple, TypeVar, Iterator, Dict, Optional, IO, Size...
34.147929
119
0.661237
import enum import functools import gzip import io import lzma import mmap import os import os.path import pathlib import pickle import platform from typing import BinaryIO from typing import ( Sequence, Callable, Union, Any, Tuple, TypeVar, Iterator, Dict, Optional, IO, Size...
true
true
f76e0d026a8a1e836e675167e7188e94190e566b
2,172
py
Python
Beginning_PyQt/listing_3_3.py
cthadeusantos/pyqt5_examples
4265d76afb67b0ac2b85cdc4b18a23c68f920997
[ "MIT" ]
null
null
null
Beginning_PyQt/listing_3_3.py
cthadeusantos/pyqt5_examples
4265d76afb67b0ac2b85cdc4b18a23c68f920997
[ "MIT" ]
null
null
null
Beginning_PyQt/listing_3_3.py
cthadeusantos/pyqt5_examples
4265d76afb67b0ac2b85cdc4b18a23c68f920997
[ "MIT" ]
null
null
null
# checkboxes.py # import necessary modules import sys from PyQt5.QtWidgets import (QApplication, QWidget, QCheckBox, QLabel) from PyQt5.QtCore import Qt class CheckBoxWindow(QWidget): def __init__(self): super().__init__() self.initializeUI() def initializeUI(self): """ Initia...
32.41791
88
0.626611
import sys from PyQt5.QtWidgets import (QApplication, QWidget, QCheckBox, QLabel) from PyQt5.QtCore import Qt class CheckBoxWindow(QWidget): def __init__(self): super().__init__() self.initializeUI() def initializeUI(self): self.setGeometry(100, 100, 250, 250) self.setWindowTi...
true
true
f76e0d7d0bb2134b3b5034538d4dc4be8f105e7f
1,792
py
Python
airflow/providers/cncf/kubernetes/backcompat/pod_runtime_info_env.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
airflow/providers/cncf/kubernetes/backcompat/pod_runtime_info_env.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
airflow/providers/cncf/kubernetes/backcompat/pod_runtime_info_env.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.12766
109
0.711496
import kubernetes.client.models as k8s class PodRuntimeInfoEnv: def __init__(self, name, field_path): self.name = name self.field_path = field_path def to_k8s_client_obj(self): return k8s.V1EnvVar( name=self.name, value_from=k8s.V1EnvVarSource(field_ref=k8s.V...
true
true
f76e0d874fdf3a5c7096139de58b6655dd8546a8
125,193
py
Python
pandas/io/parsers.py
zhezherun/pandas
36c1104b7ad9761e020f7e8198eb60da4045d169
[ "BSD-3-Clause" ]
null
null
null
pandas/io/parsers.py
zhezherun/pandas
36c1104b7ad9761e020f7e8198eb60da4045d169
[ "BSD-3-Clause" ]
null
null
null
pandas/io/parsers.py
zhezherun/pandas
36c1104b7ad9761e020f7e8198eb60da4045d169
[ "BSD-3-Clause" ]
null
null
null
""" Module contains tools for processing files into DataFrames or other objects """ from __future__ import print_function from collections import defaultdict import csv import datetime import re import sys from textwrap import fill import warnings import numpy as np import pandas._libs.lib as lib import pandas._libs...
35.882201
79
0.561637
from __future__ import print_function from collections import defaultdict import csv import datetime import re import sys from textwrap import fill import warnings import numpy as np import pandas._libs.lib as lib import pandas._libs.ops as libops import pandas._libs.parsers as parsers from pandas._libs.tslibs impor...
true
true
f76e0e1f00c701123a17dcb9e12e54d054244f0f
347
py
Python
user_profile/engine.py
lightsilver/asdae
c751e4124e97082aa2aee2abd8bdf6528b910da1
[ "MIT" ]
4
2017-06-26T03:54:39.000Z
2019-11-29T07:52:44.000Z
user_profile/engine.py
lightsilver/asdae
c751e4124e97082aa2aee2abd8bdf6528b910da1
[ "MIT" ]
1
2017-10-13T13:25:48.000Z
2017-10-13T13:25:48.000Z
user_profile/engine.py
lightsilver/asdae
c751e4124e97082aa2aee2abd8bdf6528b910da1
[ "MIT" ]
2
2018-07-10T07:01:49.000Z
2020-06-28T03:05:44.000Z
# coding: utf-8 import os import time basic_cmd = "python " # generate the indices indices = range(0, 200, 50) for i in xrange(len(indices)-1): time.sleep(5) from_idx = str(indices[i]) to_idx = str(indices[i + 1]) cmd = basic_cmd + "/home/mjoys/user_profile2/projects/user_label.py " + from_idx + " " + to_idx p...
19.277778
96
0.680115
import os import time basic_cmd = "python " indices = range(0, 200, 50) for i in xrange(len(indices)-1): time.sleep(5) from_idx = str(indices[i]) to_idx = str(indices[i + 1]) cmd = basic_cmd + "/home/mjoys/user_profile2/projects/user_label.py " + from_idx + " " + to_idx print(cmd) os.system(cmd)
true
true
f76e0ec302d7f5aa235278463bbe4e8c8fff969f
16,691
py
Python
lciafmt/recipe.py
USEPA/LCIAformatter
e803dccf81b1f7d7441e576909cdac3f823b40ce
[ "MIT" ]
8
2020-01-29T01:53:30.000Z
2021-07-26T16:18:33.000Z
lciafmt/recipe.py
USEPA/LCIAformatter
e803dccf81b1f7d7441e576909cdac3f823b40ce
[ "MIT" ]
41
2019-10-03T16:41:33.000Z
2022-01-12T18:24:24.000Z
lciafmt/recipe.py
USEPA/LCIAformatter
e803dccf81b1f7d7441e576909cdac3f823b40ce
[ "MIT" ]
8
2019-11-24T13:11:59.000Z
2021-10-05T14:41:34.000Z
# recipe.py (lciafmt) # !/usr/bin/env python3 # coding=utf-8 """ This module contains functions needed to compile LCIA methods from the ReCiPe model """ import pandas as pd import openpyxl import lciafmt.cache as cache import lciafmt.df as dfutil import lciafmt.xls as xls from .util import datapath, aggregate_factor...
39.180751
111
0.590738
import pandas as pd import openpyxl import lciafmt.cache as cache import lciafmt.df as dfutil import lciafmt.xls as xls from .util import datapath, aggregate_factors_for_primary_contexts, log,\ format_cas contexts = { 'urban air': 'air/urban', 'urban air': 'air/urban', 'Urban air':...
true
true
f76e0f147e250e4ba335ce14acee3a8b745d7178
419
py
Python
app/status/migrations/0004_auto_20190415_1103.py
LCOGT/serol
1b1a0c8343fc7233b9935b8da64c90b8696134cc
[ "MIT" ]
null
null
null
app/status/migrations/0004_auto_20190415_1103.py
LCOGT/serol
1b1a0c8343fc7233b9935b8da64c90b8696134cc
[ "MIT" ]
19
2017-12-13T14:33:46.000Z
2022-03-11T23:47:08.000Z
app/status/migrations/0004_auto_20190415_1103.py
LCOGT/serol
1b1a0c8343fc7233b9935b8da64c90b8696134cc
[ "MIT" ]
null
null
null
# Generated by Django 2.1.7 on 2019-04-15 11:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('status', '0003_auto_20180822_1244'), ] operations = [ migrations.AlterField( model_name='progress', name='image_file...
22.052632
78
0.610979
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('status', '0003_auto_20180822_1244'), ] operations = [ migrations.AlterField( model_name='progress', name='image_file', field=models.FileField(blank=True...
true
true
f76e0f5be7df6acc742f302580b6dd3b368659a4
1,047
py
Python
Python/BinaryTree.py
Rohit01-pro/All_Program_helper
86b75ecc4ecb095f11e46e6f80c660e27dd22f27
[ "MIT" ]
16
2021-10-03T11:15:49.000Z
2021-10-31T04:40:24.000Z
Python/BinaryTree.py
Rohit01-pro/All_Program_helper
86b75ecc4ecb095f11e46e6f80c660e27dd22f27
[ "MIT" ]
232
2021-10-02T14:51:43.000Z
2021-11-14T08:23:27.000Z
Python/BinaryTree.py
Rohit01-pro/All_Program_helper
86b75ecc4ecb095f11e46e6f80c660e27dd22f27
[ "MIT" ]
166
2021-10-02T13:56:34.000Z
2021-10-31T17:56:34.000Z
class Node: def __init__(self, key): self.left = None self.right = None self.val = key # Traverse preorder def traversePreOrder(self): print(self.val, end=' ') if self.left: self.left.traversePreOrder() if self.right: self.right.traver...
23.795455
42
0.595989
class Node: def __init__(self, key): self.left = None self.right = None self.val = key def traversePreOrder(self): print(self.val, end=' ') if self.left: self.left.traversePreOrder() if self.right: self.right.traversePreOrder() ...
true
true
f76e1030c18793bb1c391236f3b15f17dcf908e3
2,101
py
Python
networks/encoder.py
youngwoon/robot-learning
96af508abfca6aadb38d9c55f01602464fecf460
[ "MIT" ]
19
2020-07-14T02:56:49.000Z
2022-03-25T09:21:11.000Z
networks/encoder.py
haoyu-x/robot-learning
70da64466fd02dc4cfc97ad9e123c893fc17acd3
[ "MIT" ]
1
2020-10-23T09:02:51.000Z
2020-10-29T02:33:53.000Z
networks/encoder.py
haoyu-x/robot-learning
70da64466fd02dc4cfc97ad9e123c893fc17acd3
[ "MIT" ]
2
2020-07-22T08:06:34.000Z
2021-03-12T21:18:39.000Z
""" Code reference: https://github.com/MishaLaskin/rad/blob/master/encoder.py """ import gym.spaces import torch import torch.nn as nn from .utils import CNN, MLP, flatten_ac class Encoder(nn.Module): def __init__(self, config, ob_space): super().__init__() self._encoder_type = config.encoder...
33.349206
83
0.519752
import gym.spaces import torch import torch.nn as nn from .utils import CNN, MLP, flatten_ac class Encoder(nn.Module): def __init__(self, config, ob_space): super().__init__() self._encoder_type = config.encoder_type self._ob_space = ob_space self.base = nn.ModuleDict() ...
true
true
f76e107787811b99a52dd641d35ff0d70943c2b2
2,163
py
Python
loader/loader.py
isdimaggio/espweather
fe8ea3f1fb0508496726035c44986e8713393379
[ "Apache-2.0" ]
null
null
null
loader/loader.py
isdimaggio/espweather
fe8ea3f1fb0508496726035c44986e8713393379
[ "Apache-2.0" ]
null
null
null
loader/loader.py
isdimaggio/espweather
fe8ea3f1fb0508496726035c44986e8713393379
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 """ Copyright 2021 Vittorio Lo Mele 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...
34.333333
242
0.677762
import yaml import json import time import requests import mysql.connector from datetime import datetime with open('config.yaml', 'r') as ymlconfig: config = yaml.load(ymlconfig, Loader=yaml.FullLoader) print("[i] Letto file di configurazione") sqlink = mysql.connector.connect( host=config["db_address"], ...
true
true
f76e1142298ea37f0281db7e358afa8dd464393a
1,543
py
Python
shuup_graphql/front/types/price.py
chessbr/shuup-graphql-api
aff8dfd9269a25781a3ed3feeee0efccdc233783
[ "Apache-2.0" ]
5
2018-04-10T12:29:33.000Z
2021-07-23T15:34:13.000Z
shuup_graphql/front/types/price.py
maximlion/shuup-graphql
aff8dfd9269a25781a3ed3feeee0efccdc233783
[ "Apache-2.0" ]
2
2021-07-23T18:34:45.000Z
2021-07-27T19:21:27.000Z
shuup_graphql/front/types/price.py
maximlion/shuup-graphql
aff8dfd9269a25781a3ed3feeee0efccdc233783
[ "Apache-2.0" ]
5
2018-04-10T12:29:38.000Z
2021-07-23T16:10:28.000Z
# -*- coding: utf-8 -*- from decimal import Decimal import graphene class PricefulType(graphene.ObjectType): base_price = graphene.Float() price = graphene.Float() discount_amount = graphene.Float() discount_rate = graphene.Float() discount_percentage = graphene.Float() taxful_price = graphen...
30.254902
57
0.672067
from decimal import Decimal import graphene class PricefulType(graphene.ObjectType): base_price = graphene.Float() price = graphene.Float() discount_amount = graphene.Float() discount_rate = graphene.Float() discount_percentage = graphene.Float() taxful_price = graphene.Float() taxless_pr...
true
true
f76e121a82a440117570d514c5f993a6a052cde6
5,237
py
Python
ProductCheck/product_check/tests.py
nirajlavani/SmartShopper
f18e579400babdb2dbc978b4721ea8970bfec332
[ "MIT" ]
null
null
null
ProductCheck/product_check/tests.py
nirajlavani/SmartShopper
f18e579400babdb2dbc978b4721ea8970bfec332
[ "MIT" ]
null
null
null
ProductCheck/product_check/tests.py
nirajlavani/SmartShopper
f18e579400babdb2dbc978b4721ea8970bfec332
[ "MIT" ]
null
null
null
import csv from django.test import TestCase from .models import Product from .product_scraping import AmazonScrapper, WalmartScrapper, TargetScrapper, CostcoScrapper from .views import scraping_class from .utilities import mail_user from .Google_Scraping import GoogleScraping,GoogleSearch class ProductTestCase(TestCa...
49.40566
115
0.686462
import csv from django.test import TestCase from .models import Product from .product_scraping import AmazonScrapper, WalmartScrapper, TargetScrapper, CostcoScrapper from .views import scraping_class from .utilities import mail_user from .Google_Scraping import GoogleScraping,GoogleSearch class ProductTestCase(TestCa...
true
true
f76e125fe060da44cedde136095e7a10a4aadc3c
9,221
py
Python
monai/networks/blocks/dints_block.py
benduffy1/MONAI
046e625b09262261373d7b8039fb652547201368
[ "Apache-2.0" ]
3
2020-06-22T20:59:14.000Z
2021-04-09T21:24:45.000Z
monai/networks/blocks/dints_block.py
scf819/MONAI
2fef7ff5c064a9ff6b6d6b4f2323180afed99934
[ "Apache-2.0" ]
null
null
null
monai/networks/blocks/dints_block.py
scf819/MONAI
2fef7ff5c064a9ff6b6d6b4f2323180afed99934
[ "Apache-2.0" ]
1
2020-06-22T19:22:59.000Z
2020-06-22T19:22:59.000Z
# Copyright (c) MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
33.776557
111
0.560134
from typing import Tuple, Union import torch from monai.networks.layers.factories import Conv from monai.networks.layers.utils import get_act_layer, get_norm_layer __all__ = ["FactorizedIncreaseBlock", "FactorizedReduceBlock", "P3DActiConvNormBlock", "ActiConvNormBlock"] class FactorizedIncreaseBlock(torch.nn.Se...
true
true
f76e12cbdfde1989a5c01e1d304aea4d1696c41a
129,784
py
Python
one_pair.py
josephyhu/Simple-Poker
5131edf1c229afb9423c5e19189bec4517cf9a8f
[ "MIT" ]
null
null
null
one_pair.py
josephyhu/Simple-Poker
5131edf1c229afb9423c5e19189bec4517cf9a8f
[ "MIT" ]
1
2019-07-17T18:45:00.000Z
2019-07-17T18:45:00.000Z
one_pair.py
josephyhu/Simple-Poker
5131edf1c229afb9423c5e19189bec4517cf9a8f
[ "MIT" ]
null
null
null
import deck import copy S = copy.deepcopy(deck.SPADES) C = copy.deepcopy(deck.CLUBS) H = copy.deepcopy(deck.HEARTS) D = copy.deepcopy(deck.DIAMONDS) ONE_PAIR_SCSSS = [] for i in range(13): for j in range(13): for k in range(13): for l in range(13): if i != j and i != k and i !=...
33.61409
77
0.451666
import deck import copy S = copy.deepcopy(deck.SPADES) C = copy.deepcopy(deck.CLUBS) H = copy.deepcopy(deck.HEARTS) D = copy.deepcopy(deck.DIAMONDS) ONE_PAIR_SCSSS = [] for i in range(13): for j in range(13): for k in range(13): for l in range(13): if i != j and i != k and i !=...
true
true
f76e130532989e9604f7b03a4bbde5c13431b4f7
55,940
py
Python
test/unit/test_config.py
joelluijmes/dbt
fa8a4f2020655c60bdb66270616f5654e168a729
[ "Apache-2.0" ]
null
null
null
test/unit/test_config.py
joelluijmes/dbt
fa8a4f2020655c60bdb66270616f5654e168a729
[ "Apache-2.0" ]
1
2020-10-01T02:16:55.000Z
2020-10-01T02:16:55.000Z
test/unit/test_config.py
joelluijmes/dbt
fa8a4f2020655c60bdb66270616f5654e168a729
[ "Apache-2.0" ]
null
null
null
from copy import deepcopy from contextlib import contextmanager import json import os import shutil import tempfile import unittest from unittest import mock import yaml import dbt.config import dbt.exceptions from dbt.adapters.factory import load_plugin from dbt.adapters.postgres import PostgresCredentials from dbt....
40.951684
144
0.605774
from copy import deepcopy from contextlib import contextmanager import json import os import shutil import tempfile import unittest from unittest import mock import yaml import dbt.config import dbt.exceptions from dbt.adapters.factory import load_plugin from dbt.adapters.postgres import PostgresCredentials from dbt....
true
true
f76e131e062ed5e8d8f9ad23195154a76d296d39
1,437
py
Python
bow_rf/rf_main.py
awsm-research/LineVul
246baf18c1932094564a10c9b81efb21914b2978
[ "MIT" ]
2
2022-03-23T12:16:20.000Z
2022-03-31T06:19:40.000Z
bow_rf/rf_main.py
awsm-research/LineVul
246baf18c1932094564a10c9b81efb21914b2978
[ "MIT" ]
null
null
null
bow_rf/rf_main.py
awsm-research/LineVul
246baf18c1932094564a10c9b81efb21914b2978
[ "MIT" ]
null
null
null
import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import f1_score, precision_score, recall_score import pickle import numpy as np # load train, val data train = pd.read_csv('../data/big-vul_dataset/train.csv') val =...
32.659091
67
0.73556
import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import f1_score, precision_score, recall_score import pickle import numpy as np train = pd.read_csv('../data/big-vul_dataset/train.csv') val = pd.read_csv('../data/b...
true
true
f76e13bbb5fdb9a85882acd1d853daefae1f43c0
1,107
py
Python
pyETM/curves/hourly_hydrogen_curves.py
robcalon/PyETM
323418ad57b2df7d47f2495919c943db28ca55cc
[ "MIT" ]
null
null
null
pyETM/curves/hourly_hydrogen_curves.py
robcalon/PyETM
323418ad57b2df7d47f2495919c943db28ca55cc
[ "MIT" ]
null
null
null
pyETM/curves/hourly_hydrogen_curves.py
robcalon/PyETM
323418ad57b2df7d47f2495919c943db28ca55cc
[ "MIT" ]
null
null
null
import io import pandas class HourlyHydrogenCurves: @property def hourly_hydrogen_curves(self): # get hourly hydrogen curves if self._hourly_hydrogen_curves is None: self.get_hourly_hydrogen_curves() return self._hourly_hydrogen_curves ...
29.918919
63
0.590786
import io import pandas class HourlyHydrogenCurves: @property def hourly_hydrogen_curves(self): if self._hourly_hydrogen_curves is None: self.get_hourly_hydrogen_curves() return self._hourly_hydrogen_curves def get_hourly_hydrogen_curv...
true
true
f76e1435b66132a5d8ee1faeb1c0ed35533d244e
1,693
py
Python
app/db/users.py
bartfrenk/streamingbandit
4237a05b439c2c12912e813f0b76ccf8af382aef
[ "MIT" ]
64
2017-05-21T06:08:57.000Z
2022-01-25T14:44:54.000Z
app/db/users.py
bartfrenk/streamingbandit
4237a05b439c2c12912e813f0b76ccf8af382aef
[ "MIT" ]
76
2017-05-04T10:30:59.000Z
2020-05-07T06:43:03.000Z
app/db/users.py
bartfrenk/streamingbandit
4237a05b439c2c12912e813f0b76ccf8af382aef
[ "MIT" ]
12
2017-05-04T13:10:23.000Z
2020-02-22T17:12:49.000Z
from pymongo import MongoClient, DESCENDING from bcrypt import hashpw, checkpw, gensalt import builtins class Users: """ A class to store and retrieve user info and passwords to MongoDB. """ def __init__(self): self.mongo_client = builtins.tornado_config['mongo_client'] self.mongo_db = se...
36.021277
118
0.579445
from pymongo import MongoClient, DESCENDING from bcrypt import hashpw, checkpw, gensalt import builtins class Users: def __init__(self): self.mongo_client = builtins.tornado_config['mongo_client'] self.mongo_db = self.mongo_client['userinfo'] self.userinfo = self.mongo_db['userinfo'] ...
true
true
f76e14c197f9b22909d90a9cf444928684a574bb
2,837
py
Python
locations/spiders/lids.py
cmecklenborg/alltheplaces
e62b59fb0071b6e289c4622d368fdb203a28347e
[ "MIT" ]
null
null
null
locations/spiders/lids.py
cmecklenborg/alltheplaces
e62b59fb0071b6e289c4622d368fdb203a28347e
[ "MIT" ]
null
null
null
locations/spiders/lids.py
cmecklenborg/alltheplaces
e62b59fb0071b6e289c4622d368fdb203a28347e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import scrapy from locations.items import GeojsonPointItem from locations.hours import OpeningHours import datetime Days = ["Mo", "Tu", "We", "Th", "Fr"] class LidsSpider(scrapy.Spider): name = "lids" item_attributes = {"brand": "Lids"} allowed_domains = ["lids.com"] def star...
32.238636
113
0.497709
import scrapy from locations.items import GeojsonPointItem from locations.hours import OpeningHours import datetime Days = ["Mo", "Tu", "We", "Th", "Fr"] class LidsSpider(scrapy.Spider): name = "lids" item_attributes = {"brand": "Lids"} allowed_domains = ["lids.com"] def start_requests(self): ...
true
true
f76e14fe907037fcddf948aa8028704ff524ee76
921
py
Python
accounts/migrations/0019_auto_20200421_1607.py
andersshenholm/editor
052844de68101c5cdc6d9343e3e095ba816cd34c
[ "Apache-2.0" ]
51
2015-04-19T23:27:04.000Z
2022-03-25T01:43:43.000Z
accounts/migrations/0019_auto_20200421_1607.py
andersshenholm/editor
052844de68101c5cdc6d9343e3e095ba816cd34c
[ "Apache-2.0" ]
428
2015-01-05T10:56:32.000Z
2022-03-29T14:33:23.000Z
accounts/migrations/0019_auto_20200421_1607.py
andersshenholm/editor
052844de68101c5cdc6d9343e3e095ba816cd34c
[ "Apache-2.0" ]
71
2015-01-28T20:06:15.000Z
2022-03-25T02:35:40.000Z
# Generated by Django 2.1.15 on 2020-04-21 15:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0018_editoritemviewed'), ] operations = [ migrations.AddField( model_name='userprofile', name='email_ab...
31.758621
121
0.62975
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0018_editoritemviewed'), ] operations = [ migrations.AddField( model_name='userprofile', name='email_about_comments', field=models.BooleanFi...
true
true
f76e15d89a4283216640d119d357668837d52ab0
5,930
py
Python
torchvision/models/squeezenet.py
mengwanguc/torchvision-meng
395942756b0b29053d25b50cdef86f709601453e
[ "BSD-3-Clause" ]
null
null
null
torchvision/models/squeezenet.py
mengwanguc/torchvision-meng
395942756b0b29053d25b50cdef86f709601453e
[ "BSD-3-Clause" ]
2
2021-12-09T09:19:18.000Z
2021-12-13T09:19:47.000Z
torchvision/models/squeezenet.py
mengwanguc/torchvision-meng
395942756b0b29053d25b50cdef86f709601453e
[ "BSD-3-Clause" ]
null
null
null
import time import torch import torch.nn as nn import torch.nn.init as init from .utils import load_state_dict_from_url from typing import Any __all__ = ['SqueezeNet', 'squeezenet1_0', 'squeezenet1_1'] model_urls = { 'squeezenet1_0': 'https://download.pytorch.org/models/squeezenet1_0-a815701f.pth', 'squeezene...
39.013158
96
0.585835
import time import torch import torch.nn as nn import torch.nn.init as init from .utils import load_state_dict_from_url from typing import Any __all__ = ['SqueezeNet', 'squeezenet1_0', 'squeezenet1_1'] model_urls = { 'squeezenet1_0': 'https://download.pytorch.org/models/squeezenet1_0-a815701f.pth', 'squeezene...
true
true
f76e15e8f674c848d4c37416e15757579e7a65af
17,783
py
Python
selfdrive/car/hyundai/interface.py
sh5347/openpilot
dbb990c12566f69f281afc8f2b0be332c1310c5d
[ "MIT" ]
null
null
null
selfdrive/car/hyundai/interface.py
sh5347/openpilot
dbb990c12566f69f281afc8f2b0be332c1310c5d
[ "MIT" ]
null
null
null
selfdrive/car/hyundai/interface.py
sh5347/openpilot
dbb990c12566f69f281afc8f2b0be332c1310c5d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from cereal import car from panda import Panda from common.params import Params from selfdrive.config import Conversions as CV from selfdrive.car.hyundai.values import CAR, EV_CAR, HYBRID_CAR, LEGACY_SAFETY_MODE_CAR, Buttons, CarControllerParams from selfdrive.car.hyundai.radar_interface import R...
43.908642
137
0.679413
from cereal import car from panda import Panda from common.params import Params from selfdrive.config import Conversions as CV from selfdrive.car.hyundai.values import CAR, EV_CAR, HYBRID_CAR, LEGACY_SAFETY_MODE_CAR, Buttons, CarControllerParams from selfdrive.car.hyundai.radar_interface import RADAR_START_ADDR from se...
true
true
f76e17ed3bb1e3d5323ca4cb4d1268f0432854ee
114
py
Python
AtCoder/ABC/000-159/ABC142_B.py
sireline/PyCode
8578467710c3c1faa89499f5d732507f5d9a584c
[ "MIT" ]
null
null
null
AtCoder/ABC/000-159/ABC142_B.py
sireline/PyCode
8578467710c3c1faa89499f5d732507f5d9a584c
[ "MIT" ]
null
null
null
AtCoder/ABC/000-159/ABC142_B.py
sireline/PyCode
8578467710c3c1faa89499f5d732507f5d9a584c
[ "MIT" ]
null
null
null
N, K = [int(n) for n in input().split()] H = [int(h) for h in input().split()] print(len([x for x in H if x>=K]))
28.5
40
0.552632
N, K = [int(n) for n in input().split()] H = [int(h) for h in input().split()] print(len([x for x in H if x>=K]))
true
true
f76e18b94946c06b206329476e615378abb384e5
31,894
py
Python
tests/test_lints.py
ncilfone/mabwiser
329125d4110312d6001e9486e1cb3490a90565c4
[ "Apache-2.0" ]
31
2019-06-14T12:26:44.000Z
2020-05-17T19:04:35.000Z
tests/test_lints.py
ncilfone/mabwiser
329125d4110312d6001e9486e1cb3490a90565c4
[ "Apache-2.0" ]
4
2019-12-16T08:41:28.000Z
2020-05-27T21:32:11.000Z
tests/test_lints.py
ncilfone/mabwiser
329125d4110312d6001e9486e1cb3490a90565c4
[ "Apache-2.0" ]
6
2019-06-16T13:08:41.000Z
2020-04-17T01:57:14.000Z
# -*- coding: utf-8 -*- import datetime import math import numpy as np import pandas as pd from sklearn.preprocessing import StandardScaler from mabwiser.mab import LearningPolicy from tests.test_base import BaseTest class LinTSTest(BaseTest): def test_alpha0_0001(self): arm, mab = self.predict(arms=[...
55.084629
128
0.341099
import datetime import math import numpy as np import pandas as pd from sklearn.preprocessing import StandardScaler from mabwiser.mab import LearningPolicy from tests.test_base import BaseTest class LinTSTest(BaseTest): def test_alpha0_0001(self): arm, mab = self.predict(arms=[1, 2, 3], ...
true
true
f76e196ef3761865beec23210660b619deec823d
46,430
py
Python
addons/wakatime/wakatime-cli-10.2.1/tests/test_arguments.py
ondoheer/match3_godot
4e61d05337e3da8d66f2d92bedb36fdda1df9532
[ "MIT" ]
27
2018-03-18T22:58:25.000Z
2022-03-12T10:30:04.000Z
addons/wakatime/wakatime-cli-10.2.1/tests/test_arguments.py
ondoheer/match3_godot
4e61d05337e3da8d66f2d92bedb36fdda1df9532
[ "MIT" ]
3
2021-06-20T19:55:02.000Z
2022-02-12T18:26:17.000Z
addons/wakatime/wakatime-cli-10.2.1/tests/test_arguments.py
ondoheer/match3_godot
4e61d05337e3da8d66f2d92bedb36fdda1df9532
[ "MIT" ]
8
2018-03-18T23:21:12.000Z
2021-07-08T11:13:22.000Z
# -*- coding: utf-8 -*- from wakatime.main import execute from wakatime.packages import requests import logging import os import time import shutil import sys import uuid from testfixtures import log_capture from wakatime.arguments import parse_arguments from wakatime.compat import u, is_py3 from wakatime.constants ...
39.616041
185
0.578139
from wakatime.main import execute from wakatime.packages import requests import logging import os import time import shutil import sys import uuid from testfixtures import log_capture from wakatime.arguments import parse_arguments from wakatime.compat import u, is_py3 from wakatime.constants import ( API_ERROR, ...
true
true
f76e1a26dff7b1aca77dde1f1f73b4fe901d6e8d
8,807
py
Python
vision/predict/predict_spin.py
BrianOfrim/boja
6571fbbfb7f015e96e80e822d9dc96b4636b4119
[ "MIT" ]
7
2020-01-27T18:39:02.000Z
2022-02-14T13:23:40.000Z
vision/predict/predict_spin.py
a428tm/boja
6571fbbfb7f015e96e80e822d9dc96b4636b4119
[ "MIT" ]
1
2021-06-02T00:55:25.000Z
2021-06-02T00:55:25.000Z
vision/predict/predict_spin.py
a428tm/boja
6571fbbfb7f015e96e80e822d9dc96b4636b4119
[ "MIT" ]
6
2020-01-28T21:28:23.000Z
2020-12-28T14:35:06.000Z
import os import matplotlib import matplotlib.pyplot as plt import numpy as np import PySpin import torch import torchvision.transforms.functional as F from .._file_utils import get_highest_numbered_file from .._image_utils import RGB8Image, draw_bboxes from .. import _models from .._s3_utils import s3_bucket_exists,...
27.694969
88
0.660043
import os import matplotlib import matplotlib.pyplot as plt import numpy as np import PySpin import torch import torchvision.transforms.functional as F from .._file_utils import get_highest_numbered_file from .._image_utils import RGB8Image, draw_bboxes from .. import _models from .._s3_utils import s3_bucket_exists,...
true
true
f76e1b02aa8b57424cb823535bfad2235b906758
4,191
py
Python
server.py
tolleybot/tensorflow-face-detection
97ddd30107efa87184e1d26d61a747b7a58cf0f8
[ "Apache-2.0" ]
null
null
null
server.py
tolleybot/tensorflow-face-detection
97ddd30107efa87184e1d26d61a747b7a58cf0f8
[ "Apache-2.0" ]
null
null
null
server.py
tolleybot/tensorflow-face-detection
97ddd30107efa87184e1d26d61a747b7a58cf0f8
[ "Apache-2.0" ]
null
null
null
from imagezmq import imagezmq import argparse import numpy as np import tensorflow as tf import cv2 import time from utils import label_map_util from utils import visualization_utils_color as vis_util # Path to frozen detection graph. This is the actual model that is used for the object detection. PATH_TO_CKPT = './m...
35.820513
99
0.673348
from imagezmq import imagezmq import argparse import numpy as np import tensorflow as tf import cv2 import time from utils import label_map_util from utils import visualization_utils_color as vis_util PATH_TO_CKPT = './model/frozen_inference_graph_face.pb' PATH_TO_LABELS = './protos/face_label_map.pbtxt' NUM_CLASSE...
true
true
f76e1b91ad38e815b54e80a42296de36539a7e6f
794
py
Python
tests/test_gcn.py
cdcihub/literature-to-facts
9fcf7bd74790e4e067f799270edd958cc30ee143
[ "MIT" ]
null
null
null
tests/test_gcn.py
cdcihub/literature-to-facts
9fcf7bd74790e4e067f799270edd958cc30ee143
[ "MIT" ]
null
null
null
tests/test_gcn.py
cdcihub/literature-to-facts
9fcf7bd74790e4e067f799270edd958cc30ee143
[ "MIT" ]
null
null
null
import logging logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger() def parse_gcn(i): import facts.gcn as g import facts.core as c G = g.gcn_source(i) F = c.workflows_for_input(dict(arg=G, arg_type=g.GCNText), output='dict') logger.info(F) for p, o in F.items(): pri...
19.365854
77
0.618388
import logging logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger() def parse_gcn(i): import facts.gcn as g import facts.core as c G = g.gcn_source(i) F = c.workflows_for_input(dict(arg=G, arg_type=g.GCNText), output='dict') logger.info(F) for p, o in F.items(): pri...
true
true
f76e1b98d1ead75e759008d55360976a70ae54f8
1,247
py
Python
src/interface/Square.py
jniestroy/quoridor_bot
afe5acba84a60b3ed03c447b2426794cf1000531
[ "MIT" ]
null
null
null
src/interface/Square.py
jniestroy/quoridor_bot
afe5acba84a60b3ed03c447b2426794cf1000531
[ "MIT" ]
null
null
null
src/interface/Square.py
jniestroy/quoridor_bot
afe5acba84a60b3ed03c447b2426794cf1000531
[ "MIT" ]
null
null
null
# # GridCoordinates.py # # @author Alain Rinder # @date 2017.06.02 # @version 0.1 # from lib.graphics import * from src.interface.IDrawable import * from src.interface.Color import * class Square(IDrawable): def __init__(self, board, coord): self.board = board self.coo...
32.815789
69
0.621492
from lib.graphics import * from src.interface.IDrawable import * from src.interface.Color import * class Square(IDrawable): def __init__(self, board, coord): self.board = board self.coord = coord self.left = (board.squareSize + board.innerSize)*coord.col self.x...
true
true
f76e1c49547c8df130f64cd8037f5c962f1cda0d
1,961
py
Python
itunesdb/test/web/conftest.py
paul-ko/itunes-to-sqlite
727c61cd3b15161f2c2634ef58490e089c357dad
[ "MIT" ]
null
null
null
itunesdb/test/web/conftest.py
paul-ko/itunes-to-sqlite
727c61cd3b15161f2c2634ef58490e089c357dad
[ "MIT" ]
null
null
null
itunesdb/test/web/conftest.py
paul-ko/itunes-to-sqlite
727c61cd3b15161f2c2634ef58490e089c357dad
[ "MIT" ]
null
null
null
import pytest from sqlalchemy.orm import Session from itunesdb.web import crud from itunesdb.web import database from itunesdb.web import models from itunesdb.web import schemas @pytest.fixture def album_ambient_1(db: Session, genre_ambient: models.Genre) -> models.Album: return crud.create_album( schema...
25.141026
78
0.645589
import pytest from sqlalchemy.orm import Session from itunesdb.web import crud from itunesdb.web import database from itunesdb.web import models from itunesdb.web import schemas @pytest.fixture def album_ambient_1(db: Session, genre_ambient: models.Genre) -> models.Album: return crud.create_album( schema...
true
true
f76e1c638f9aeba0cf545b21a620faf52bb0b425
1,783
py
Python
ftrace/parsers/workqueue_execute_end.py
bagobor/ftrace
a41bfff97447ff6503b80ffc60111cd7e53fed86
[ "Apache-2.0" ]
62
2016-05-29T15:20:15.000Z
2022-03-11T11:40:48.000Z
ftrace/parsers/workqueue_execute_end.py
bagobor/ftrace
a41bfff97447ff6503b80ffc60111cd7e53fed86
[ "Apache-2.0" ]
2
2017-12-12T09:37:40.000Z
2018-05-09T10:29:05.000Z
ftrace/parsers/workqueue_execute_end.py
bagobor/ftrace
a41bfff97447ff6503b80ffc60111cd7e53fed86
[ "Apache-2.0" ]
32
2016-08-01T08:33:22.000Z
2021-11-03T02:18:38.000Z
#!/usr/bin/python # Copyright 2015 Huawei Devices USA Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
27.859375
74
0.707796
import re from ftrace.common import ParserError from .register import register_parser from collections import namedtuple TRACEPOINT = 'workqueue_execute_end' __all__ = [TRACEPOINT] WorkqueueQueueExecuteEndBase = namedtuple(TRACEPOINT, [ 'work_struct', ] ) class WorkqueueQueueExecuteEnd(WorkqueueQueu...
false
true
f76e1c714976c1b6290999ead04af95934f7abe4
3,894
py
Python
src/population.py
neopythagorean/vic2mapper
c62f2f08301a4bbb2e418d52405f8166cf6e1694
[ "MIT" ]
1
2021-11-15T16:41:39.000Z
2021-11-15T16:41:39.000Z
src/population.py
neopythagorean/vic2mapper
c62f2f08301a4bbb2e418d52405f8166cf6e1694
[ "MIT" ]
null
null
null
src/population.py
neopythagorean/vic2mapper
c62f2f08301a4bbb2e418d52405f8166cf6e1694
[ "MIT" ]
null
null
null
import province import re pop_types = { "aristocrats" : (11, 40, 93), "artisans" : (127, 3, 3), "bureaucrats" : (136, 136, 136), "capitalists" : (18, 129, 10), "clergymen" : (234, 227, 40), "clerks" : (240, 240, 240), "craftsmen" : (12, 157, 162),...
32.722689
147
0.472522
import province import re pop_types = { "aristocrats" : (11, 40, 93), "artisans" : (127, 3, 3), "bureaucrats" : (136, 136, 136), "capitalists" : (18, 129, 10), "clergymen" : (234, 227, 40), "clerks" : (240, 240, 240), "craftsmen" : (12, 157, 162),...
true
true
f76e1c734772166d9d6de52f209267d1dab6a982
2,134
py
Python
chia/cmds/init.py
DrakeFS/chia-blockchain
8d617f0df0a5176e0ea117ae7617d5b3a8d5c43a
[ "Apache-2.0" ]
25
2021-06-14T05:36:44.000Z
2021-09-28T16:30:42.000Z
chia/cmds/init.py
xorinox/chia-blockchain
e14aafb1d7c2a5cbf6d4155a79286d1add9db279
[ "Apache-2.0" ]
20
2021-12-16T03:08:57.000Z
2022-03-29T17:15:32.000Z
chia/cmds/init.py
rob-opsi/chia-blockchain
536d90f3b2d3be6ea78ce64528d04dcaba08fcb4
[ "Apache-2.0" ]
8
2021-06-16T13:34:40.000Z
2021-10-09T21:17:41.000Z
import click from chia.util.keychain import supports_keyring_passphrase @click.command("init", short_help="Create or migrate the configuration") @click.option( "--create-certs", "-c", default=None, help="Create new SSL certificates based on CA in [directory]", type=click.Path(), ) @click.option( ...
37.438596
118
0.739456
import click from chia.util.keychain import supports_keyring_passphrase @click.command("init", short_help="Create or migrate the configuration") @click.option( "--create-certs", "-c", default=None, help="Create new SSL certificates based on CA in [directory]", type=click.Path(), ) @click.option( ...
true
true
f76e1cbdfcf18783e161ab18d4ab1f9750594a2e
669
py
Python
data-processing/tests/test_match_symbols.py
jusheen/scholar-reader
d1d87c0e2ab1cb411b9a9b80e3e2e7e256b9c9c0
[ "Apache-2.0" ]
null
null
null
data-processing/tests/test_match_symbols.py
jusheen/scholar-reader
d1d87c0e2ab1cb411b9a9b80e3e2e7e256b9c9c0
[ "Apache-2.0" ]
null
null
null
data-processing/tests/test_match_symbols.py
jusheen/scholar-reader
d1d87c0e2ab1cb411b9a9b80e3e2e7e256b9c9c0
[ "Apache-2.0" ]
null
null
null
from common.match_symbols import Match, get_mathml_matches DEFAULT_TEX_PATH = "tex-path" DEFAULT_EQUATION_INDEX = 0 def test_matches_self(): mathml = "<mi>x</mi>" matches = get_mathml_matches([mathml]) assert len(matches) == 1 assert matches[mathml] == [Match(mathml, mathml, 1)] def test_matches_ch...
27.875
58
0.638266
from common.match_symbols import Match, get_mathml_matches DEFAULT_TEX_PATH = "tex-path" DEFAULT_EQUATION_INDEX = 0 def test_matches_self(): mathml = "<mi>x</mi>" matches = get_mathml_matches([mathml]) assert len(matches) == 1 assert matches[mathml] == [Match(mathml, mathml, 1)] def test_matches_ch...
true
true
f76e1e07e71d5ca80c2694ad35da03ca00c15327
11,068
py
Python
test/TestCreateEmptyEventsForOneSubject.py
indera/redi
c2a41ce6e5b613f75eaa8e6426ff948e0bfab349
[ "BSD-3-Clause" ]
null
null
null
test/TestCreateEmptyEventsForOneSubject.py
indera/redi
c2a41ce6e5b613f75eaa8e6426ff948e0bfab349
[ "BSD-3-Clause" ]
null
null
null
test/TestCreateEmptyEventsForOneSubject.py
indera/redi
c2a41ce6e5b613f75eaa8e6426ff948e0bfab349
[ "BSD-3-Clause" ]
null
null
null
import unittest import os from lxml import etree from redi import redi file_dir = os.path.dirname(os.path.realpath(__file__)) goal_dir = os.path.join(file_dir, "../") proj_root = os.path.abspath(goal_dir)+'/' DEFAULT_DATA_DIRECTORY = os.getcwd() class TestCreateEmptyEventsForOneSubject(unittest.TestCase): def s...
44.095618
477
0.633628
import unittest import os from lxml import etree from redi import redi file_dir = os.path.dirname(os.path.realpath(__file__)) goal_dir = os.path.join(file_dir, "../") proj_root = os.path.abspath(goal_dir)+'/' DEFAULT_DATA_DIRECTORY = os.getcwd() class TestCreateEmptyEventsForOneSubject(unittest.TestCase): def s...
true
true
f76e1e416fd082144275a7aae6e7e4ebcc2c27f5
349
py
Python
docker-flask-compose-mysql/counter/views.py
timle1/flask-docker-compose
202e420f930df2b4ac00e87b92b93619e21c60cb
[ "MIT" ]
null
null
null
docker-flask-compose-mysql/counter/views.py
timle1/flask-docker-compose
202e420f930df2b4ac00e87b92b93619e21c60cb
[ "MIT" ]
null
null
null
docker-flask-compose-mysql/counter/views.py
timle1/flask-docker-compose
202e420f930df2b4ac00e87b92b93619e21c60cb
[ "MIT" ]
null
null
null
from app import app, db from counter.models import * @app.route('/') def init(): counter = Counter.query.first() if not counter: counter = Counter(1) db.session.add(counter) db.session.commit() else: counter.count += 1 db.session.commit() return "<h1>Counter: " +...
24.928571
57
0.587393
from app import app, db from counter.models import * @app.route('/') def init(): counter = Counter.query.first() if not counter: counter = Counter(1) db.session.add(counter) db.session.commit() else: counter.count += 1 db.session.commit() return "<h1>Counter: " +...
true
true
f76e1e92969ec6923bef71498e7b7fe04b469a00
1,600
py
Python
tests/debcontrol/examples.py
KOLANICH/python-debparse
c79f7a860a660e71bd66b688433a597bf1b65b52
[ "BSD-3-Clause" ]
null
null
null
tests/debcontrol/examples.py
KOLANICH/python-debparse
c79f7a860a660e71bd66b688433a597bf1b65b52
[ "BSD-3-Clause" ]
null
null
null
tests/debcontrol/examples.py
KOLANICH/python-debparse
c79f7a860a660e71bd66b688433a597bf1b65b52
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals CONTROL_FILE_DATA = """ Source: nginx Section: httpd Priority: optional Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> XSBC-Original-Maintainer: Kartik Mistry <kartik@debian.org> Uploaders: Jose Parrella <bureado@debian.org>, Fab...
28.070175
78
0.680625
from __future__ import unicode_literals CONTROL_FILE_DATA = """ Source: nginx Section: httpd Priority: optional Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> XSBC-Original-Maintainer: Kartik Mistry <kartik@debian.org> Uploaders: Jose Parrella <bureado@debian.org>, Fabio Tranchitella ...
true
true
f76e1eba6c6f4045da90763d759515a6c85cf0ba
222
py
Python
Code/Proccessing.py
Fiskesuppen/Connect4T
f4d3ee2e28b13e68a1dd2ad999f64547cfa151c4
[ "MIT" ]
1
2020-01-09T10:46:50.000Z
2020-01-09T10:46:50.000Z
Code/Proccessing.py
Fiskesuppen/Connect4T
f4d3ee2e28b13e68a1dd2ad999f64547cfa151c4
[ "MIT" ]
null
null
null
Code/Proccessing.py
Fiskesuppen/Connect4T
f4d3ee2e28b13e68a1dd2ad999f64547cfa151c4
[ "MIT" ]
null
null
null
from multiprocessing import Pool def MakeWorkers(function,argumentList): pool = Pool(processes=3) result = pool.map(function,argumentList) return result if __name__ == "__main__": print("Settup complete")
24.666667
44
0.734234
from multiprocessing import Pool def MakeWorkers(function,argumentList): pool = Pool(processes=3) result = pool.map(function,argumentList) return result if __name__ == "__main__": print("Settup complete")
true
true
f76e1f6968fc7b4f34e7bec91044e3c00b43a722
2,225
py
Python
payoneer_escrow_sdk/authenticator.py
Payoneer-Escrow/payoneer-escrow-python
691bbbf211e675fdbb4ff8706d239a79bd94b8ed
[ "MIT" ]
2
2017-05-04T12:59:40.000Z
2020-12-26T05:39:26.000Z
payoneer_escrow_sdk/authenticator.py
Payoneer-Escrow/payoneer-escrow-python
691bbbf211e675fdbb4ff8706d239a79bd94b8ed
[ "MIT" ]
null
null
null
payoneer_escrow_sdk/authenticator.py
Payoneer-Escrow/payoneer-escrow-python
691bbbf211e675fdbb4ff8706d239a79bd94b8ed
[ "MIT" ]
3
2017-06-03T12:04:50.000Z
2019-11-16T16:50:57.000Z
from __future__ import absolute_import from datetime import datetime from hashlib import sha512 class Authenticator: """ Functionality used to authenticate all requests made to Payoneer Escrow. """ def __init__(self, api_key, api_secret): """ Initialize an Authenticator. Args...
31.785714
81
0.605393
from __future__ import absolute_import from datetime import datetime from hashlib import sha512 class Authenticator: def __init__(self, api_key, api_secret): self.api_key = api_key self.api_secret = api_secret def secure_headers(self, method, uri): timestamp = self._current_timesta...
true
true
f76e2068aef3d7be7205c623ba5ddf71b07d80b9
1,561
py
Python
2020/src/day19b.py
Sujatha-Nagarajan/AdventOfCode
afce23c74fd0a72caa29c1604a582b21806e794e
[ "CC0-1.0" ]
1
2020-12-05T06:14:37.000Z
2020-12-05T06:14:37.000Z
2020/src/day19b.py
Sujatha-Nagarajan/AdventOfCode
afce23c74fd0a72caa29c1604a582b21806e794e
[ "CC0-1.0" ]
null
null
null
2020/src/day19b.py
Sujatha-Nagarajan/AdventOfCode
afce23c74fd0a72caa29c1604a582b21806e794e
[ "CC0-1.0" ]
null
null
null
from util import * import re lines=get_file_contents("../input/day19-sample.txt", False) lines=get_file_contents("../input/day19.txt", False) d = {} rgx = {} def getrules(): global lines global d, rgx for i in range(len(lines)): if lines[i] == '8: 42': lines[i] = '8: 42 | 42 8'...
18.151163
79
0.465727
from util import * import re lines=get_file_contents("../input/day19-sample.txt", False) lines=get_file_contents("../input/day19.txt", False) d = {} rgx = {} def getrules(): global lines global d, rgx for i in range(len(lines)): if lines[i] == '8: 42': lines[i] = '8: 42 | 42 8'...
true
true
f76e20e8a205f1d7d9a5a1394337cd4a098e4a47
16,137
py
Python
source/utils/ClassifyTaxonomy.py
kant/nbis-meta
45c4f76d520a5a94ccf885c9c9a5a331190036aa
[ "MIT" ]
null
null
null
source/utils/ClassifyTaxonomy.py
kant/nbis-meta
45c4f76d520a5a94ccf885c9c9a5a331190036aa
[ "MIT" ]
null
null
null
source/utils/ClassifyTaxonomy.py
kant/nbis-meta
45c4f76d520a5a94ccf885c9c9a5a331190036aa
[ "MIT" ]
null
null
null
import argparse import logging import operator from collections import Counter from collections import defaultdict logging.basicConfig(format='%(asctime)s %(message)s', level=logging.INFO) def calculate_prot_length(start, end): return (abs(int(end) - int(start)) + 1)/3.0 def test_calculate_prot_length(): as...
40.75
166
0.611142
import argparse import logging import operator from collections import Counter from collections import defaultdict logging.basicConfig(format='%(asctime)s %(message)s', level=logging.INFO) def calculate_prot_length(start, end): return (abs(int(end) - int(start)) + 1)/3.0 def test_calculate_prot_length(): as...
true
true
f76e2189045193bdb9091586a0751ad6c283c019
16,013
py
Python
build/scripts/svn_version_gen.py
Lokutrus/catboost
66eb1f404897411b7b05e549e151a1736d93f203
[ "Apache-2.0" ]
null
null
null
build/scripts/svn_version_gen.py
Lokutrus/catboost
66eb1f404897411b7b05e549e151a1736d93f203
[ "Apache-2.0" ]
null
null
null
build/scripts/svn_version_gen.py
Lokutrus/catboost
66eb1f404897411b7b05e549e151a1736d93f203
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import locale import subprocess import time import os import sys import re import socket import json ARC_PREFIX_MATCHER = 'arcadia(?:.yandex.ru)?/arc/' ARC_DIRECTORIES = '(?:/arcadia|/arcadia_tests_data|/data|/quality-eval|$)' indent = " " def print_c_header(result): result.write("#pra...
33.711579
127
0.594892
import locale import subprocess import time import os import sys import re import socket import json ARC_PREFIX_MATCHER = 'arcadia(?:.yandex.ru)?/arc/' ARC_DIRECTORIES = '(?:/arcadia|/arcadia_tests_data|/data|/quality-eval|$)' indent = " " def print_c_header(result): result.write("#pragma once\n") def pri...
true
true
f76e2260d109212b899168e053afaf2f00ca2d94
8,067
py
Python
src/hist/basehist.py
chrisburr/hist
d10132ab8d03f41152f0b934a18291ce699453b2
[ "BSD-3-Clause" ]
null
null
null
src/hist/basehist.py
chrisburr/hist
d10132ab8d03f41152f0b934a18291ce699453b2
[ "BSD-3-Clause" ]
null
null
null
src/hist/basehist.py
chrisburr/hist
d10132ab8d03f41152f0b934a18291ce699453b2
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from .axestuple import NamedAxesTuple from .quick_construct import MetaConstructor from .utils import set_family, HIST_FAMILY from .storage import Storage import warnings import functools import operator import histoprint import numpy as np import boost_histogram as bh from typing import Call...
29.988848
99
0.558944
from .axestuple import NamedAxesTuple from .quick_construct import MetaConstructor from .utils import set_family, HIST_FAMILY from .storage import Storage import warnings import functools import operator import histoprint import numpy as np import boost_histogram as bh from typing import Callable, Optional, Tuple, U...
true
true
f76e228467db2a6f380256948c56f77a6aa03360
3,400
py
Python
etl.py
jrderek/Data-Engineering-projects
c4903b28fcf6ec2d78e8543ec490b9be6d0c35ad
[ "MIT" ]
null
null
null
etl.py
jrderek/Data-Engineering-projects
c4903b28fcf6ec2d78e8543ec490b9be6d0c35ad
[ "MIT" ]
null
null
null
etl.py
jrderek/Data-Engineering-projects
c4903b28fcf6ec2d78e8543ec490b9be6d0c35ad
[ "MIT" ]
null
null
null
import os import glob import psycopg2 import pandas as pd from sql_queries import * def process_song_file(cur, filepath): """ - Load data from a song file to the song and artist data tables """ # open song file df = pd.read_json(filepath, lines=True) # insert song record song_data = list...
30.909091
107
0.633529
import os import glob import psycopg2 import pandas as pd from sql_queries import * def process_song_file(cur, filepath): """ - Load data from a song file to the song and artist data tables """ df = pd.read_json(filepath, lines=True) song_data = list(df[['song_id', 'title', 'artist_id', ...
false
true
f76e23dc46803afaa722b43e6d2bfa6855ba920e
4,480
py
Python
AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ComponentPropertyCommands_test_containers.py
aaarsene/o3de
37e3b0226958974defd14dd6d808e8557dcd7345
[ "Apache-2.0", "MIT" ]
1
2021-09-13T00:01:12.000Z
2021-09-13T00:01:12.000Z
AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ComponentPropertyCommands_test_containers.py
aaarsene/o3de
37e3b0226958974defd14dd6d808e8557dcd7345
[ "Apache-2.0", "MIT" ]
null
null
null
AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ComponentPropertyCommands_test_containers.py
aaarsene/o3de
37e3b0226958974defd14dd6d808e8557dcd7345
[ "Apache-2.0", "MIT" ]
1
2021-07-20T11:07:25.000Z
2021-07-20T11:07:25.000Z
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ # Tests component properties that are containers import azlmbr.bus as bus import azlmbr.editor as editor impor...
35.555556
155
0.765848
import azlmbr.bus as bus import azlmbr.editor as editor import azlmbr.entity as entity import azlmbr.surface_data import azlmbr.globals editor.EditorToolsApplicationRequestBus(bus.Broadcast, 'OpenLevelNoPrompt', 'auto_test') def print_result(message, result): if result: print(message + ": SUCCESS") ...
true
true
f76e245e87c0926981b55ec16819e585981e737c
4,991
py
Python
sugarui/windows/forms.py
sugarsack/sugar-ui
0ba7b62f300adbd3290e0ef8d5cb45e26f44a446
[ "MIT" ]
null
null
null
sugarui/windows/forms.py
sugarsack/sugar-ui
0ba7b62f300adbd3290e0ef8d5cb45e26f44a446
[ "MIT" ]
null
null
null
sugarui/windows/forms.py
sugarsack/sugar-ui
0ba7b62f300adbd3290e0ef8d5cb45e26f44a446
[ "MIT" ]
null
null
null
# coding: utf-8 """ Basic forms. This overrides npyscreen's forms, allowing concurrent widget updates. """ import sys import curses import npyscreen from sugarui.windows.floating import HelpForm class SugarForm(npyscreen.FormBaseNewWithMenus): """ Main form with the menus. """ id = "MAIN" # npysc...
30.248485
145
0.599078
import sys import curses import npyscreen from sugarui.windows.floating import HelpForm class SugarForm(npyscreen.FormBaseNewWithMenus): id = "MAIN" def __init__(self, api, *args, **kwargs): npyscreen.FormBaseNewWithMenus.__init__(self, *args, **kwargs) self.api = api...
true
true
f76e2516f7ec20fd052eb55c22102dd4e4ca7d5b
1,098
py
Python
apps/base/models/base_config.py
youssriaboelseod/pyerp
9ef9873e2ff340010656f0c518bccf9d7a14dbaa
[ "MIT" ]
115
2019-08-18T16:12:54.000Z
2022-03-29T14:17:20.000Z
apps/base/models/base_config.py
youssriaboelseod/pyerp
9ef9873e2ff340010656f0c518bccf9d7a14dbaa
[ "MIT" ]
22
2019-09-09T01:34:54.000Z
2022-03-12T00:33:40.000Z
apps/base/models/base_config.py
youssriaboelseod/pyerp
9ef9873e2ff340010656f0c518bccf9d7a14dbaa
[ "MIT" ]
83
2019-08-17T17:09:20.000Z
2022-03-25T04:46:53.000Z
# Django Library from django.db import models from django.urls import reverse from django.utils.translation import ugettext_lazy as _ # Localfolder Library from .company import PyCompany SHARE_PRODUCT_CHOICE = ( ("no", "No Share"), ("yes_some", "Yes Some"), ('yes_all', 'Yes All') ) class BaseConfig(mode...
28.894737
109
0.693989
from django.db import models from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from .company import PyCompany SHARE_PRODUCT_CHOICE = ( ("no", "No Share"), ("yes_some", "Yes Some"), ('yes_all', 'Yes All') ) class BaseConfig(models.Model): online = models.BooleanF...
true
true
f76e2556590c5a7848edab86bec37de783225f00
2,240
py
Python
tests/test_binanceapi.py
allister633/binance-algotrade
fb9de7f770ce9867ed2ffc65c4bf831f09501afd
[ "MIT" ]
28
2020-02-02T15:15:39.000Z
2022-02-18T13:41:48.000Z
tests/test_binanceapi.py
allister633/binance-algotrade
fb9de7f770ce9867ed2ffc65c4bf831f09501afd
[ "MIT" ]
null
null
null
tests/test_binanceapi.py
allister633/binance-algotrade
fb9de7f770ce9867ed2ffc65c4bf831f09501afd
[ "MIT" ]
8
2021-01-19T19:12:13.000Z
2022-02-05T21:57:26.000Z
import unittest from api.binance import Binance, OrderSide, OrderType import utils class TestBinanceAPI(unittest.TestCase): def setUp(self): apiKey = 'vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A' secretKey = 'NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j' ...
32
91
0.642857
import unittest from api.binance import Binance, OrderSide, OrderType import utils class TestBinanceAPI(unittest.TestCase): def setUp(self): apiKey = 'vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A' secretKey = 'NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j' ...
true
true
f76e2573f0487792be9abb53fae0cde09c021438
442
py
Python
open_widget_framework/runtests.py
mitodl/open-widget-framework
0023798fc713f4c3987c17bd0c8617e13beb9b96
[ "BSD-3-Clause" ]
1
2018-11-12T09:44:14.000Z
2018-11-12T09:44:14.000Z
open_widget_framework/runtests.py
mitodl/open-widget-framework
0023798fc713f4c3987c17bd0c8617e13beb9b96
[ "BSD-3-Clause" ]
40
2018-10-30T19:05:42.000Z
2020-09-12T04:12:02.000Z
open_widget_framework/runtests.py
mitodl/open-widget-framework
0023798fc713f4c3987c17bd0c8617e13beb9b96
[ "BSD-3-Clause" ]
null
null
null
import os import sys import django from django.conf import settings from django.test.utils import get_runner def run_tests(): os.environ["DJANGO_SETTINGS_MODULE"] = "open_widget_framework.test_settings" django.setup() TestRunner = get_runner(settings) test_runner = TestRunner() failures = test_ru...
22.1
80
0.744344
import os import sys import django from django.conf import settings from django.test.utils import get_runner def run_tests(): os.environ["DJANGO_SETTINGS_MODULE"] = "open_widget_framework.test_settings" django.setup() TestRunner = get_runner(settings) test_runner = TestRunner() failures = test_ru...
true
true
f76e269e23b9769da1248c13b257f56ff6676264
4,839
py
Python
demo/main/video/sot_video.py
GZHermit/video_analyst
6233b19320e3d07b95fb1f782efd89b052a8cf4e
[ "MIT" ]
1
2020-04-08T02:57:59.000Z
2020-04-08T02:57:59.000Z
demo/main/video/sot_video.py
GZHermit/video_analyst
6233b19320e3d07b95fb1f782efd89b052a8cf4e
[ "MIT" ]
null
null
null
demo/main/video/sot_video.py
GZHermit/video_analyst
6233b19320e3d07b95fb1f782efd89b052a8cf4e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -* from paths import ROOT_PATH # isort:skip from videoanalyst.config.config import cfg from videoanalyst.config.config import specify_task from videoanalyst.model import builder as model_builder from videoanalyst.pipeline import builder as pipeline_builder from videoanalyst.utils import complete_p...
35.321168
92
0.547427
from paths import ROOT_PATH from videoanalyst.config.config import cfg from videoanalyst.config.config import specify_task from videoanalyst.model import builder as model_builder from videoanalyst.pipeline import builder as pipeline_builder from videoanalyst.utils import complete_path_wt_root_in_cfg from videoanalyst...
true
true
f76e2723008c99b84facaced8d688bfc3074004b
2,757
py
Python
python/plot_colors.py
jarekczek/codeforces
6214d75991979c12e6e315a3eff7de21a57fae56
[ "MIT" ]
null
null
null
python/plot_colors.py
jarekczek/codeforces
6214d75991979c12e6e315a3eff7de21a57fae56
[ "MIT" ]
null
null
null
python/plot_colors.py
jarekczek/codeforces
6214d75991979c12e6e315a3eff7de21a57fae56
[ "MIT" ]
null
null
null
from datetime import date import dateutil.parser import matplotlib.pyplot as plt import pandas as pd df = pd.read_csv('colors_2010_2022_6.txt', delimiter="\t") df = df[df['reportDate'] >= '2018'] print(df.head()) #df = df.set_index('reportDate') dates = sorted(df['reportDate'].unique()) print(dates) df2 = pd.DataFram...
39.385714
89
0.681901
from datetime import date import dateutil.parser import matplotlib.pyplot as plt import pandas as pd df = pd.read_csv('colors_2010_2022_6.txt', delimiter="\t") df = df[df['reportDate'] >= '2018'] print(df.head()) dates = sorted(df['reportDate'].unique()) print(dates) df2 = pd.DataFrame(index=dates) df2['total'] = df[...
true
true
f76e2792417bb0e2e37a243539e1016e17bca7e3
77
py
Python
nightowlcli/funky.py
shawnoster/nightowlcli
4d73e2c1aeec947a03aad056d90824ebdf729335
[ "MIT" ]
null
null
null
nightowlcli/funky.py
shawnoster/nightowlcli
4d73e2c1aeec947a03aad056d90824ebdf729335
[ "MIT" ]
null
null
null
nightowlcli/funky.py
shawnoster/nightowlcli
4d73e2c1aeec947a03aad056d90824ebdf729335
[ "MIT" ]
null
null
null
def get_funky(funk_level): print(f'Turning the funk up to {funk_level}')
25.666667
49
0.727273
def get_funky(funk_level): print(f'Turning the funk up to {funk_level}')
true
true
f76e28b6775746708ae2429e06bfc3fa9243167c
2,704
py
Python
app.py
msjahid/University-Students-Information
29e32affba8daef3a54b9029ec56995dd13a5671
[ "MIT" ]
1
2021-03-05T06:16:12.000Z
2021-03-05T06:16:12.000Z
app.py
msjahid/University-Students-Information
29e32affba8daef3a54b9029ec56995dd13a5671
[ "MIT" ]
null
null
null
app.py
msjahid/University-Students-Information
29e32affba8daef3a54b9029ec56995dd13a5671
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request, redirect, url_for, flash from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.secret_key = "Secret Key" #SqlAlchemy Database Configuration With Mysql app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:5271@localhost/seustudents_info' app.confi...
24.581818
86
0.637204
from flask import Flask, render_template, request, redirect, url_for, flash from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.secret_key = "Secret Key" app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:5271@localhost/seustudents_info' app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False ...
true
true
f76e29883a9366eb4cadf27a37cb91fff87e3b73
9,938
py
Python
rpy2_R6/r6b.py
rpy2/rpy2-R6
8b6bc7d8789ba7bbb4385fbc2587b6222557abc5
[ "MIT" ]
1
2020-11-12T15:26:04.000Z
2020-11-12T15:26:04.000Z
rpy2_R6/r6b.py
rpy2/rpy2-R6
8b6bc7d8789ba7bbb4385fbc2587b6222557abc5
[ "MIT" ]
4
2020-03-02T12:49:16.000Z
2020-04-19T16:25:21.000Z
rpy2_R6/r6b.py
rpy2/rpy2-R6
8b6bc7d8789ba7bbb4385fbc2587b6222557abc5
[ "MIT" ]
null
null
null
import abc import rpy2.rinterface from rpy2.rinterface_lib import _rinterface_capi import rpy2.robjects from rpy2.robjects.packages import (importr, WeakPackage) import rpy2_R6.utils import textwrap import typing import warnings with warnings.catch_warnings(): warnings.simplefilt...
33.348993
95
0.655263
import abc import rpy2.rinterface from rpy2.rinterface_lib import _rinterface_capi import rpy2.robjects from rpy2.robjects.packages import (importr, WeakPackage) import rpy2_R6.utils import textwrap import typing import warnings with warnings.catch_warnings(): warnings.simplefilt...
true
true
f76e2a6394f6b8d73ad613864e0ea9101a3707b7
53
py
Python
components/tools/esp_prov/utils/__init__.py
mahavirj/esp-bootstrap
3bf1b71d56a82b0fc41ade50575005018e9721aa
[ "Apache-2.0" ]
8
2018-10-15T14:33:51.000Z
2019-12-31T17:58:54.000Z
components/tools/esp_prov/utils/__init__.py
mahavirj/esp-idf-training
3bf1b71d56a82b0fc41ade50575005018e9721aa
[ "Apache-2.0" ]
1
2018-11-06T17:54:15.000Z
2018-11-21T06:00:45.000Z
components/tools/esp_prov/utils/__init__.py
mahavirj/esp-idf-training
3bf1b71d56a82b0fc41ade50575005018e9721aa
[ "Apache-2.0" ]
2
2018-11-28T06:29:51.000Z
2020-11-30T17:49:57.000Z
from .compat import * from . import wconn as wpa_cli
17.666667
30
0.754717
from .compat import * from . import wconn as wpa_cli
true
true
f76e2baef67e60d4a345b1b290e2e53f761b1cf5
2,179
py
Python
shazzam/Address.py
shazz/shazzam
bd9801f1be5a8b58d0b2f20a937d3a446a0c5f5a
[ "MIT" ]
null
null
null
shazzam/Address.py
shazz/shazzam
bd9801f1be5a8b58d0b2f20a937d3a446a0c5f5a
[ "MIT" ]
null
null
null
shazzam/Address.py
shazz/shazzam
bd9801f1be5a8b58d0b2f20a937d3a446a0c5f5a
[ "MIT" ]
null
null
null
import logging class Address(): def __init__(self, name: str = None, value: int = None, relative: int = None, indirect: bool = False): self.logger = logging.getLogger("shazzam") if name is None and value is None and indirect is None: raise ValueError("Address cannot be void") ...
28.671053
115
0.592933
import logging class Address(): def __init__(self, name: str = None, value: int = None, relative: int = None, indirect: bool = False): self.logger = logging.getLogger("shazzam") if name is None and value is None and indirect is None: raise ValueError("Address cannot be void") ...
true
true
f76e2c5d8ab0d2efbbf9c5a8de03be6a5ce518a6
129
py
Python
er.py
piyushparastiwari/python-project
5dba0ef4e77f1d2528f510327de4224b60b1d4ba
[ "Apache-2.0" ]
null
null
null
er.py
piyushparastiwari/python-project
5dba0ef4e77f1d2528f510327de4224b60b1d4ba
[ "Apache-2.0" ]
null
null
null
er.py
piyushparastiwari/python-project
5dba0ef4e77f1d2528f510327de4224b60b1d4ba
[ "Apache-2.0" ]
null
null
null
x=int(input("enter any number: ")) if x%2==0: print("the no is odd") else: print('the number is even')
18.428571
36
0.51938
x=int(input("enter any number: ")) if x%2==0: print("the no is odd") else: print('the number is even')
true
true
f76e2d626afeb414fd4d46d8172e82cb6bf1f6cf
6,356
py
Python
tests/unit/cli/log_printer_test.py
galeksandrp/compose
73f8cf9132018429783e65bde66f8f961637e418
[ "Apache-2.0" ]
2
2020-05-04T02:09:57.000Z
2022-02-28T22:15:51.000Z
tests/unit/cli/log_printer_test.py
galeksandrp/compose
73f8cf9132018429783e65bde66f8f961637e418
[ "Apache-2.0" ]
38
2021-07-19T21:08:06.000Z
2022-03-28T21:11:05.000Z
tests/unit/cli/log_printer_test.py
galeksandrp/compose
73f8cf9132018429783e65bde66f8f961637e418
[ "Apache-2.0" ]
1
2019-08-14T15:54:14.000Z
2019-08-14T15:54:14.000Z
import itertools from io import StringIO from queue import Queue import pytest import requests from docker.errors import APIError from compose.cli.log_printer import build_log_generator from compose.cli.log_printer import build_log_presenters from compose.cli.log_printer import consume_queue from compose.cli.log_prin...
31.621891
90
0.661737
import itertools from io import StringIO from queue import Queue import pytest import requests from docker.errors import APIError from compose.cli.log_printer import build_log_generator from compose.cli.log_printer import build_log_presenters from compose.cli.log_printer import consume_queue from compose.cli.log_prin...
true
true
f76e2e453b987e83f50c30cd8e599ea8dfbbbedd
284
py
Python
docker/oidc_op/scripts/make_test_site.py
kschu91/pyoidc
ae5702a8b2f13d5e7af173a58355cd738ec79a31
[ "Apache-2.0" ]
373
2017-03-08T21:37:03.000Z
2022-03-24T13:37:23.000Z
docker/oidc_op/scripts/make_test_site.py
peppelinux/pyoidc
2e751ed84039259a2b138148eae204c877518950
[ "Apache-2.0" ]
523
2017-03-02T17:03:12.000Z
2022-03-24T18:34:51.000Z
docker/oidc_op/scripts/make_test_site.py
peppelinux/pyoidc
2e751ed84039259a2b138148eae204c877518950
[ "Apache-2.0" ]
165
2017-03-02T16:54:42.000Z
2022-02-26T18:34:00.000Z
#!/usr/bin/env python3 import os from oidctest.site_setup import oidc_op_setup _distroot = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../..")) _root = 'test_site' if os.path.isdir(_root) is False: os.makedirs(_root) os.chdir(_root) oidc_op_setup(_distroot)
17.75
80
0.725352
import os from oidctest.site_setup import oidc_op_setup _distroot = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../..")) _root = 'test_site' if os.path.isdir(_root) is False: os.makedirs(_root) os.chdir(_root) oidc_op_setup(_distroot)
true
true
f76e2f55a1e86c200dadeef3d8dbfabfe6ed16c0
2,062
py
Python
tests/test_base.py
farid-ansari-golorry/django-batch-requests
08d4f687d2092ed7b5bf0ab1d8be38694eb6e179
[ "MIT" ]
null
null
null
tests/test_base.py
farid-ansari-golorry/django-batch-requests
08d4f687d2092ed7b5bf0ab1d8be38694eb6e179
[ "MIT" ]
null
null
null
tests/test_base.py
farid-ansari-golorry/django-batch-requests
08d4f687d2092ed7b5bf0ab1d8be38694eb6e179
[ "MIT" ]
1
2021-01-14T08:13:02.000Z
2021-01-14T08:13:02.000Z
''' @author: Rahul Tanwani @summary: Contains base test case for reusable test methods. ''' import json from django.test import TestCase from batch_requests.settings import br_settings as settings class TestBase(TestCase): ''' Base class for all reusable test methods. ''' def assert_reponse_co...
33.803279
119
0.620757
import json from django.test import TestCase from batch_requests.settings import br_settings as settings class TestBase(TestCase): def assert_reponse_compatible(self, ind_resp, batch_resp): if settings.ADD_DURATION_HEADER: del batch_resp['headers'][settings.DURATION_HEADER_NAME] ...
true
true
f76e31ba5282c7b52d5e926eb6e9d874c146f389
2,940
py
Python
envoy/datadog_checks/envoy/utils.py
tcpatterson/integrations-core
3692601de09f8db60f42612b0d623509415bbb53
[ "BSD-3-Clause" ]
1
2021-12-15T22:45:14.000Z
2021-12-15T22:45:14.000Z
envoy/datadog_checks/envoy/utils.py
tcpatterson/integrations-core
3692601de09f8db60f42612b0d623509415bbb53
[ "BSD-3-Clause" ]
null
null
null
envoy/datadog_checks/envoy/utils.py
tcpatterson/integrations-core
3692601de09f8db60f42612b0d623509415bbb53
[ "BSD-3-Clause" ]
null
null
null
import re import requests LEGACY_VERSION_RE = re.compile(r'/(\d\.\d\.\d)/') def make_metric_tree(metrics): metric_tree = {} for metric in metrics: # We make `tree` reference the root of the tree # at every iteration to create the new branches. tree = metric_tree # Separate ...
35
120
0.579592
import re import requests LEGACY_VERSION_RE = re.compile(r'/(\d\.\d\.\d)/') def make_metric_tree(metrics): metric_tree = {} for metric in metrics: tree = metric_tree parts = metric.split('.') for i, part in enumerate(parts): if part ...
true
true
f76e31de7cb2e7e5df8067f0592ad2f99d020c8c
8,155
py
Python
ViewStuff/default_calendar/default_calendar_controller.py
nortismo/ADC
48dfaaae71db174a48a0c308b77a3405d92cf729
[ "Beerware" ]
1
2018-11-26T10:59:51.000Z
2018-11-26T10:59:51.000Z
ViewStuff/default_calendar/default_calendar_controller.py
nortismo/ADC
48dfaaae71db174a48a0c308b77a3405d92cf729
[ "Beerware" ]
null
null
null
ViewStuff/default_calendar/default_calendar_controller.py
nortismo/ADC
48dfaaae71db174a48a0c308b77a3405d92cf729
[ "Beerware" ]
null
null
null
import datetime import sys from PyQt5.QtCore import QObject, QUrl, QByteArray from PyQt5.QtQml import QQmlApplicationEngine from PyQt5.QtWidgets import QMainWindow, QApplication from ViewStuff.text_input.text_input_controller import TextInputController from CalendarStuff import Calendar from ViewStuff.default_calendar...
45.814607
215
0.657633
import datetime import sys from PyQt5.QtCore import QObject, QUrl, QByteArray from PyQt5.QtQml import QQmlApplicationEngine from PyQt5.QtWidgets import QMainWindow, QApplication from ViewStuff.text_input.text_input_controller import TextInputController from CalendarStuff import Calendar from ViewStuff.default_calendar...
true
true
f76e3271524b3924356124c04ce80647cd7923ee
1,787
py
Python
celery/tests/test_security/test_serialization.py
amplify-education/celery
3ea8824d9bdb6c5928701cf8466287d4259aa0e0
[ "BSD-3-Clause" ]
null
null
null
celery/tests/test_security/test_serialization.py
amplify-education/celery
3ea8824d9bdb6c5928701cf8466287d4259aa0e0
[ "BSD-3-Clause" ]
null
null
null
celery/tests/test_security/test_serialization.py
amplify-education/celery
3ea8824d9bdb6c5928701cf8466287d4259aa0e0
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from celery.exceptions import SecurityError from celery.security.serialization import SecureSerializer from celery.security.certificate import Certificate, CertStore from celery.security.key import PrivateKey from . import CERT1, CERT2, KEY1, KEY2 from .case import SecurityCase...
35.039216
74
0.651371
from __future__ import absolute_import from celery.exceptions import SecurityError from celery.security.serialization import SecureSerializer from celery.security.certificate import Certificate, CertStore from celery.security.key import PrivateKey from . import CERT1, CERT2, KEY1, KEY2 from .case import SecurityCase...
true
true
f76e35161b8285ae39943d6522c5085c519cc9cf
22,791
py
Python
wwt_api_client/communities.py
WorldWideTelescope/wwt_api_client
cfc42728eb2428f17e711f7527fd97150e629296
[ "BSD-3-Clause" ]
null
null
null
wwt_api_client/communities.py
WorldWideTelescope/wwt_api_client
cfc42728eb2428f17e711f7527fd97150e629296
[ "BSD-3-Clause" ]
8
2019-04-28T17:27:44.000Z
2020-11-05T20:24:21.000Z
wwt_api_client/communities.py
WorldWideTelescope/wwt_api_client
cfc42728eb2428f17e711f7527fd97150e629296
[ "BSD-3-Clause" ]
1
2019-04-28T17:25:06.000Z
2019-04-28T17:25:06.000Z
# Copyright 2019-2020 the .NET Foundation # Distributed under the terms of the revised (3-clause) BSD license. """Interacting with the WWT Communities APIs.""" import json import os.path import requests import sys from urllib.parse import parse_qs, urlparse from . import APIRequest, Client, enums __all__ = ''' Comm...
30.966033
125
0.5833
import json import os.path import requests import sys from urllib.parse import parse_qs, urlparse from . import APIRequest, Client, enums __all__ = ''' CommunitiesAPIRequest CommunitiesClient CreateCommunityRequest DeleteCommunityRequest GetCommunityInfoRequest GetLatestCommunityRequest GetMyProfileRequest GetProfi...
true
true
f76e384dec37a0ec2fff635fcab84587f343372d
8,008
py
Python
engine/converter/sub_graph/transpose_batch_matmul.py
alexsu52/neural-compressor
7607ee46a015ee83a5e79dace8535a439d49cc8c
[ "Apache-2.0" ]
null
null
null
engine/converter/sub_graph/transpose_batch_matmul.py
alexsu52/neural-compressor
7607ee46a015ee83a5e79dace8535a439d49cc8c
[ "Apache-2.0" ]
null
null
null
engine/converter/sub_graph/transpose_batch_matmul.py
alexsu52/neural-compressor
7607ee46a015ee83a5e79dace8535a439d49cc8c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
38.68599
96
0.412837
from .pattern import Pattern, pattern_registry from collections import namedtuple, OrderedDict import copy from .. import graph_utils as util import copy @pattern_registry(pattern_type='TransposeBatchMatMul') class TransposeBatchMatMul(Pattern): def __call__(self, model): pattern_mapping_config = { ...
true
true
f76e397d006362785a311c77fe547cd70c386379
1,159
py
Python
nn/conv/shallownet.py
gioele8/AI-soccer-highlights
756b6b6f332cedbfbc5a3540d0c6d7aa50219e51
[ "MIT" ]
null
null
null
nn/conv/shallownet.py
gioele8/AI-soccer-highlights
756b6b6f332cedbfbc5a3540d0c6d7aa50219e51
[ "MIT" ]
null
null
null
nn/conv/shallownet.py
gioele8/AI-soccer-highlights
756b6b6f332cedbfbc5a3540d0c6d7aa50219e51
[ "MIT" ]
null
null
null
# import the necessary packages from keras.models import Sequential from keras.layers.convolutional import Conv2D from keras.layers.core import Activation from keras.layers.core import Flatten from keras.layers.core import Dense from keras import backend as K class ShallowNet: @staticmethod def build(width, h...
31.324324
66
0.646247
from keras.models import Sequential from keras.layers.convolutional import Conv2D from keras.layers.core import Activation from keras.layers.core import Flatten from keras.layers.core import Dense from keras import backend as K class ShallowNet: @staticmethod def build(width, height, depth, classes): ...
true
true
f76e39ac0b7ba310584907e0db0c0394ed77f231
3,189
py
Python
tests/utils/compare_rdf.py
rajshruti18/biolinkml
451e71c9d3fd11aa3b08c6a713d9ab8b127ece77
[ "CC0-1.0" ]
25
2019-07-05T01:16:18.000Z
2021-03-22T20:49:25.000Z
tests/utils/compare_rdf.py
rajshruti18/biolinkml
451e71c9d3fd11aa3b08c6a713d9ab8b127ece77
[ "CC0-1.0" ]
299
2019-03-05T15:15:30.000Z
2021-04-08T23:25:41.000Z
tests/utils/compare_rdf.py
rajshruti18/biolinkml
451e71c9d3fd11aa3b08c6a713d9ab8b127ece77
[ "CC0-1.0" ]
19
2019-05-23T17:46:47.000Z
2021-03-25T06:45:55.000Z
import re from contextlib import redirect_stdout from io import StringIO from typing import Union, Optional from rdflib import Graph, RDF, Namespace from rdflib.compare import to_isomorphic, IsomorphicGraph, graph_diff from biolinkml.meta import BIOLINKML, META # TODO: Find out why test_issue_namespace is emitting g...
34.663043
120
0.652242
import re from contextlib import redirect_stdout from io import StringIO from typing import Union, Optional from rdflib import Graph, RDF, Namespace from rdflib.compare import to_isomorphic, IsomorphicGraph, graph_diff from biolinkml.meta import BIOLINKML, META from tests import SKIP_RDF_COMPARE, SKIP_RDF_COMPARE_RE...
true
true
f76e39f97c7091de43eb35fb50bc87a6c28b0b27
495
py
Python
lib/torch/loss.py
nbren12/nn_atmos_param
cb138f0b211fd5743e56ad659aec38c082d2b3ac
[ "MIT" ]
4
2018-09-16T20:55:57.000Z
2020-12-06T11:27:50.000Z
lib/torch/loss.py
nbren12/nn_atmos_param
cb138f0b211fd5743e56ad659aec38c082d2b3ac
[ "MIT" ]
5
2018-04-07T07:40:39.000Z
2018-06-20T06:56:08.000Z
lib/torch/loss.py
nbren12/nn_atmos_param
cb138f0b211fd5743e56ad659aec38c082d2b3ac
[ "MIT" ]
null
null
null
import torch from toolz import curry @curry def weighted_loss(weight, x, y): # return torch.mean(torch.pow(x - y, 2).mul(weight.float())) return torch.mean(torch.abs(x - y).mul(weight.float())) @curry def dynamic_loss(truth, pred, weights=None): x = truth['prognostic'] y = pred['prognostic'] to...
21.521739
64
0.630303
import torch from toolz import curry @curry def weighted_loss(weight, x, y): return torch.mean(torch.abs(x - y).mul(weight.float())) @curry def dynamic_loss(truth, pred, weights=None): x = truth['prognostic'] y = pred['prognostic'] total_loss = 0 for key in y: w = weights.get(ke...
true
true
f76e3db0ef095ccf7e6bd3d145d06c5a2aea68e1
1,452
py
Python
controllers/resistance_controller.py
Vrekrer/magdynlab
f5149d3213a37c7c18f39876c3e2367fc7deb9e8
[ "MIT" ]
6
2015-08-02T03:02:55.000Z
2022-01-30T18:32:49.000Z
controllers/resistance_controller.py
Vrekrer/magdynlab
f5149d3213a37c7c18f39876c3e2367fc7deb9e8
[ "MIT" ]
null
null
null
controllers/resistance_controller.py
Vrekrer/magdynlab
f5149d3213a37c7c18f39876c3e2367fc7deb9e8
[ "MIT" ]
4
2017-07-06T16:29:53.000Z
2020-09-13T00:09:54.000Z
# coding=utf-8 # Author: Diego González Chávez # email : diegogch@cbpf.br / diego.gonzalez.chavez@gmail.com # # Resistance Controller # # TODO: # Make documentation import time import numpy __all__ = ['ResistanceController'] class ResistanceController(object): # Controllador de SourceMeter para medidas de resi...
25.928571
69
0.572314
import time import numpy __all__ = ['ResistanceController'] class ResistanceController(object): def __init__(self, source_meter): self.SM = source_meter self.SM.sense_mode = '4-Wire' self.Mode('Current') def Mode(self, mode): if mode == 'Voltage': self...
true
true
f76e3df6f5d2ec1d9a6a50e2712b5379a23f5579
493
py
Python
backend/app/resources/project.py
LiXuanqi/NuaaOversea-flask-react
4c61fb95a4a2f40c1ae3329acc7febd1c78324de
[ "MIT" ]
null
null
null
backend/app/resources/project.py
LiXuanqi/NuaaOversea-flask-react
4c61fb95a4a2f40c1ae3329acc7febd1c78324de
[ "MIT" ]
null
null
null
backend/app/resources/project.py
LiXuanqi/NuaaOversea-flask-react
4c61fb95a4a2f40c1ae3329acc7febd1c78324de
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ File name: project.py Function Des: ... ~~~~~~~~~~ author: 1_x7 <lixuanqi1995@gmail.com> <http://lixuanqi.github.io> """ from flask_restful import Resource, marshal_with from app.handler.project import get_all_projects from app.utils.fields.project import...
23.47619
69
0.691684
from flask_restful import Resource, marshal_with from app.handler.project import get_all_projects from app.utils.fields.project import projects_fields class Projects(Resource): @marshal_with(projects_fields) def get(self): projects = get_all_projects() return {'projects': projects}
true
true
f76e40f9808cc8e9724ddb5169a5c8a601a4ea98
1,061
py
Python
shack/management/commands/copy_cadastre.py
parksandwildlife/caddy
24412f82347e002488e899d07706edf31414160f
[ "Apache-2.0" ]
1
2019-07-10T13:30:02.000Z
2019-07-10T13:30:02.000Z
shack/management/commands/copy_cadastre.py
parksandwildlife/caddy
24412f82347e002488e899d07706edf31414160f
[ "Apache-2.0" ]
4
2020-06-08T02:46:17.000Z
2022-03-21T23:29:32.000Z
shack/management/commands/copy_cadastre.py
parksandwildlife/caddy
24412f82347e002488e899d07706edf31414160f
[ "Apache-2.0" ]
2
2019-11-08T08:53:56.000Z
2019-11-20T03:26:49.000Z
from django.core.management.base import BaseCommand, CommandError from cddp.models import CptCadastreScdb from shack.utils import copy_cddp_cadastre, prune_addresses class Command(BaseCommand): help = 'Undertakes copy of cadastre data from a database connection' def add_arguments(self, parser): pars...
34.225806
86
0.632422
from django.core.management.base import BaseCommand, CommandError from cddp.models import CptCadastreScdb from shack.utils import copy_cddp_cadastre, prune_addresses class Command(BaseCommand): help = 'Undertakes copy of cadastre data from a database connection' def add_arguments(self, parser): pars...
true
true