hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f72fd038fc632f6e1fa32dff24a488528fb8fed5
230
py
Python
xga/relations/clusters/Mλ.py
DavidT3/XGA
cde51c3f29f98b5f1e981fb6d327c04072b0ba38
[ "BSD-3-Clause" ]
12
2020-05-16T09:45:45.000Z
2022-02-14T14:41:46.000Z
xga/relations/clusters/Mλ.py
DavidT3/XGA
cde51c3f29f98b5f1e981fb6d327c04072b0ba38
[ "BSD-3-Clause" ]
684
2020-05-28T08:52:09.000Z
2022-03-31T10:56:24.000Z
xga/relations/clusters/Mλ.py
DavidT3/XGA
cde51c3f29f98b5f1e981fb6d327c04072b0ba38
[ "BSD-3-Clause" ]
2
2022-02-04T10:55:55.000Z
2022-02-04T11:30:56.000Z
# This code is a part of XMM: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS). # Last modified by David J Turner (david.turner@sussex.ac.uk) 11/12/2020, 16:41. Copyright (c) David J Turner
20.909091
110
0.704348
true
true
f72fd0a975c56ec2d4a2ead5794352e000898434
699
py
Python
test_app.py
john-lock/chatter
46c0c61f7e5798478a3630aadbfc47d281189edd
[ "MIT" ]
null
null
null
test_app.py
john-lock/chatter
46c0c61f7e5798478a3630aadbfc47d281189edd
[ "MIT" ]
2
2019-09-17T18:47:31.000Z
2019-09-17T18:47:34.000Z
test_app.py
john-lock/chatter
46c0c61f7e5798478a3630aadbfc47d281189edd
[ "MIT" ]
null
null
null
import pytest import app @pytest.fixture def client(): app.app.config['TESTING'] = True client = app.app.test_client() yield client def test_client_page(client): rv = client.get('/') # Main page (instructions) assert b'<p class="lead">A Pusher-powered chat application built using Flask</p>' ...
25.888889
115
0.69671
import pytest import app @pytest.fixture def client(): app.app.config['TESTING'] = True client = app.app.test_client() yield client def test_client_page(client): rv = client.get('/') assert b'<p class="lead">A Pusher-powered chat application built using Flask</p>' in rv.data assert b...
true
true
f72fd0f50afdb4c7cb225054bd39d9412b196c9c
1,314
py
Python
aries_cloudagent/protocols/discovery/v1_0/handlers/tests/test_query_handler.py
msembinelli/aries-cloudagent-python
a5a29dab30238f52dcfb6645aab115d01720a5c7
[ "Apache-2.0" ]
1
2020-11-30T05:47:54.000Z
2020-11-30T05:47:54.000Z
aries_cloudagent/protocols/discovery/v1_0/handlers/tests/test_query_handler.py
msembinelli/aries-cloudagent-python
a5a29dab30238f52dcfb6645aab115d01720a5c7
[ "Apache-2.0" ]
1
2020-06-16T20:20:55.000Z
2020-06-16T20:20:55.000Z
aries_cloudagent/protocols/discovery/v1_0/handlers/tests/test_query_handler.py
msembinelli/aries-cloudagent-python
a5a29dab30238f52dcfb6645aab115d01720a5c7
[ "Apache-2.0" ]
2
2020-02-18T20:34:01.000Z
2021-03-12T16:18:30.000Z
import pytest from aries_cloudagent.core.protocol_registry import ProtocolRegistry from aries_cloudagent.messaging.base_handler import HandlerException from aries_cloudagent.messaging.request_context import RequestContext from aries_cloudagent.messaging.responder import MockResponder from ...handlers.query_handler im...
34.578947
69
0.758752
import pytest from aries_cloudagent.core.protocol_registry import ProtocolRegistry from aries_cloudagent.messaging.base_handler import HandlerException from aries_cloudagent.messaging.request_context import RequestContext from aries_cloudagent.messaging.responder import MockResponder from ...handlers.query_handler im...
true
true
f72fd1f63d52cbb7ac69ac0d3b60be8df77af67c
4,536
py
Python
benchmark/startQiskit_Class3343.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class3343.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class3343.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=49 import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_...
35.4375
140
0.650573
import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_xor(s: str, t: str) -> str: len...
true
true
f72fd32beb09f4059eb8836278eae50e6d7228a6
2,650
py
Python
purly/py/setup.py
rmorshea/purly
0d07d6d7636fd81d9c1c14e2df6a32fc28b325f7
[ "MIT" ]
2
2018-08-18T05:39:24.000Z
2018-08-21T19:02:16.000Z
purly/py/setup.py
rmorshea/purly
0d07d6d7636fd81d9c1c14e2df6a32fc28b325f7
[ "MIT" ]
2
2018-07-27T07:14:19.000Z
2018-07-27T07:17:06.000Z
purly/py/setup.py
rmorshea/purly
0d07d6d7636fd81d9c1c14e2df6a32fc28b325f7
[ "MIT" ]
null
null
null
from __future__ import print_function import os import sys import shutil from glob import glob from setuptools import find_packages from distutils.core import setup # the name of the project name = "purly" # basic paths used to gather files here = os.path.abspath(os.path.dirname(__file__)) root = os.path.join(here, ...
31.547619
79
0.442642
from __future__ import print_function import os import sys import shutil from glob import glob from setuptools import find_packages from distutils.core import setup name = "purly" here = os.path.abspath(os.path.dirname(__file__)) root = os.path.join(here, name) if sys.version_info < (3,6) or sys.version_info >= (3...
true
true
f72fd342ba9c1c26e0b221251203aed9effad1f6
18,549
py
Python
plugin.video.SportsDevil/lib/utils/drench.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
2
2018-11-02T19:55:30.000Z
2020-08-14T02:22:20.000Z
plugin.video.SportsDevil/lib/utils/drench.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
null
null
null
plugin.video.SportsDevil/lib/utils/drench.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
3
2019-12-17T20:47:00.000Z
2021-02-11T19:03:59.000Z
""" JavaScript encryption module ver. 2.0 by Daniel Rench Based on existing code: Copyright (c) 2003 by Andre Mueller. Init of blowfish constants with a function (init/backup errors) Copyright (c) 2003 by Rainer Wollmann This Object is open source. You can redistribute it and/or modify it under the terms of th...
60.224026
3,083
0.721441
import math as Math class blowfish: def __init__(self,k): if len(k) is 0: raise '0 length key' self.bf_P = self.Fbf_P() self.bf_S0 = self.Fbf_S0() self.bf_S1 = self.Fbf_S1() self.bf_S2 = self.Fbf_S2() self.bf_S3 = self.Fbf_S3() self.key = k j = 0 i = 0 while i < 18: ...
true
true
f72fd3f3fdf870d59380133842ea37b254c8a18a
24,808
py
Python
Scripts/simulation/restaurants/restaurant_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/restaurants/restaurant_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/restaurants/restaurant_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\restaurants\restaurant_commands.py # Compiled at: 2018-08-28 03:56:41 # Size of source mod 2**32: 29...
51.791232
192
0.747743
from protocolbuffers import Restaurant_pb2 from event_testing import test_events from google.protobuf import text_format from restaurants import restaurant_utils from restaurants.chefs_choice import ChefsChoice from restaurants.restaurant_diner_situation import DinerSubSituationState, RestaurantDinerSubSituation, Resta...
true
true
f72fd45c61980e5c188d7f2e1db08ef2a024468b
685
py
Python
examples/custom_plugin/plugins/MyFirstPlugin/pwba_plugin.py
pxlc/PyWebBrowserApp
0165b29cbe5f88068f62d8298b1f5e3ee611a985
[ "MIT" ]
1
2021-11-09T07:53:25.000Z
2021-11-09T07:53:25.000Z
examples/custom_plugin/plugins/MyFirstPlugin/pwba_plugin.py
pxlc/PyWebBrowserApp
0165b29cbe5f88068f62d8298b1f5e3ee611a985
[ "MIT" ]
null
null
null
examples/custom_plugin/plugins/MyFirstPlugin/pwba_plugin.py
pxlc/PyWebBrowserApp
0165b29cbe5f88068f62d8298b1f5e3ee611a985
[ "MIT" ]
null
null
null
from PyWebBrowserApp import PluginBase from PyWebBrowserApp import register_plugin_op class Plugin(PluginBase): def __init__(self): super(Plugin, self).__init__() self.name = '${P}' @register_plugin_op def test_plugin_callback(self, op_data): # self.info(op_data.get('message',...
25.37037
109
0.665693
from PyWebBrowserApp import PluginBase from PyWebBrowserApp import register_plugin_op class Plugin(PluginBase): def __init__(self): super(Plugin, self).__init__() self.name = '${P}' @register_plugin_op def test_plugin_callback(self, op_data): print('Hello from ${P} cal...
true
true
f72fd4a32451e1afa48eb80e2147811dcd4f5f9f
54,405
py
Python
.kodi/addons/script.ftvguide/gui.py
C6SUMMER/allinclusive-kodi-pi
8baf247c79526849c640c6e56ca57a708a65bd11
[ "Apache-2.0" ]
null
null
null
.kodi/addons/script.ftvguide/gui.py
C6SUMMER/allinclusive-kodi-pi
8baf247c79526849c640c6e56ca57a708a65bd11
[ "Apache-2.0" ]
null
null
null
.kodi/addons/script.ftvguide/gui.py
C6SUMMER/allinclusive-kodi-pi
8baf247c79526849c640c6e56ca57a708a65bd11
[ "Apache-2.0" ]
2
2018-04-17T17:34:39.000Z
2020-07-26T03:43:33.000Z
# # Copyright (C) 2014 Tommy Winther # http://tommy.winther.nu # # Modified for FTV Guide (09/2014 onwards) # by Thomas Geppert [bluezed] - bluezed.apps@gmail.com # # This Program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
38.944166
161
0.614282
import datetime import threading import time import xbmc import xbmcgui import source as src from notification import Notification from strings import * import streaming DEBUG = False MODE_EPG = 'EPG' MODE_TV = 'TV' MODE_OSD = 'OSD' ACTION_LEFT = 1 ACTION_RIGHT = 2 ACTION_UP = 3 ACTION_DOWN ...
true
true
f72fd4f07817e53144026d6614cb8968d8cb124e
2,873
py
Python
setup.py
rupanshi-chawda/nm-theme
d909d7f89d6b0bca49d6d90ed50d087bab41b912
[ "BSD-3-Clause" ]
null
null
null
setup.py
rupanshi-chawda/nm-theme
d909d7f89d6b0bca49d6d90ed50d087bab41b912
[ "BSD-3-Clause" ]
null
null
null
setup.py
rupanshi-chawda/nm-theme
d909d7f89d6b0bca49d6d90ed50d087bab41b912
[ "BSD-3-Clause" ]
null
null
null
""" nm-theme setup """ import json import sys from pathlib import Path import setuptools HERE = Path(__file__).parent.resolve() # Get the package info from package.json pkg_json = json.loads((HERE / "package.json").read_bytes()) # The name of the project name = "nm-theme" lab_path = (HERE / pkg_json["jupyterlab"][...
29.927083
104
0.655761
import json import sys from pathlib import Path import setuptools HERE = Path(__file__).parent.resolve() pkg_json = json.loads((HERE / "package.json").read_bytes()) name = "nm-theme" lab_path = (HERE / pkg_json["jupyterlab"]["outputDir"]) ensured_targets = [ str(lab_path / "package.json"), str(lab_path / ...
true
true
f72fd53943b50711edaa6f2f5b0e426773997a03
8,917
py
Python
service_clients/aws/s3_client.py
radzhome/python-service-clients
dd17e74217a9412b1b78c90433bfced08733fd88
[ "BSD-2-Clause" ]
2
2019-04-18T05:29:32.000Z
2019-11-01T22:58:56.000Z
service_clients/aws/s3_client.py
radzhome/python-service-clients
dd17e74217a9412b1b78c90433bfced08733fd88
[ "BSD-2-Clause" ]
null
null
null
service_clients/aws/s3_client.py
radzhome/python-service-clients
dd17e74217a9412b1b78c90433bfced08733fd88
[ "BSD-2-Clause" ]
null
null
null
from __future__ import unicode_literals """ S3 bucket CRUD operations core module """ import logging import time import boto3 import botocore from botocore.client import Config class S3Client: # pragma: no cover """ S3 class encapsulates uploading, downloading & other s3 file ops and handling errors ...
37.309623
120
0.596165
from __future__ import unicode_literals import logging import time import boto3 import botocore from botocore.client import Config class S3Client: S3_DATE_FORMAT = '%Y-%m-%dT%H:%M:%S.000Z' RECONNECT_SLEEP_SECS = 0.5 CONN_RETRIES = 10 CONN_CONFIG = Config(connect_timeout=5, retries={'max_attempts':...
true
true
f72fd5b91881f72c58b41d9a2321dc53142923f3
1,234
py
Python
acmicpc/9093/9093-1.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
3
2019-03-09T05:19:23.000Z
2019-04-06T09:26:36.000Z
acmicpc/9093/9093-1.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2020-02-23T10:38:04.000Z
2020-02-23T10:38:04.000Z
acmicpc/9093/9093-1.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2019-05-22T13:47:53.000Z
2019-05-22T13:47:53.000Z
# Stack 활용해서 풀기 N = int(input()) class Node(object): def __init__(self, value=None, next=None): self.value = value self.next = next class Stack(object): def __init__(self): self.head = None self.count = 0 def is_empty(self): return not bool(self.head) def pus...
21.649123
51
0.502431
N = int(input()) class Node(object): def __init__(self, value=None, next=None): self.value = value self.next = next class Stack(object): def __init__(self): self.head = None self.count = 0 def is_empty(self): return not bool(self.head) def push(self, item): ...
true
true
f72fd5e243d2a0ee9ab66cb14a1e4f2f75b8f2b5
15,989
py
Python
lib/surface/container/node_pools/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/container/node_pools/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/container/node_pools/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2014 Google LLC. 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 requir...
41.52987
83
0.766965
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from apitools.base.py import exceptions as apitools_exceptions from googlecloudsdk.api_lib.compute import metadata_utils from googlecloudsdk.api_lib.compute import utils from googlecloudsdk.api_lib.containe...
true
true
f72fd770b3c890aabd12bd755ed60cdc88efa9e5
8,995
py
Python
custom/m4change/reports/ld_hmis_report.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
custom/m4change/reports/ld_hmis_report.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
custom/m4change/reports/ld_hmis_report.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
from django.utils.translation import ugettext as _ from corehq.apps.locations.permissions import location_safe from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn, NumericColumn from corehq.apps.reports.filters.select import MonthFilter, YearFilter from corehq.apps.reports.standard import Mon...
42.429245
107
0.545859
from django.utils.translation import ugettext as _ from corehq.apps.locations.permissions import location_safe from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn, NumericColumn from corehq.apps.reports.filters.select import MonthFilter, YearFilter from corehq.apps.reports.standard import Mon...
true
true
f72fd7ec1ff8566fe5149edae2c9a1ef77dfb47b
66
py
Python
server.py
sigu1011/gameinn
6c314fa5deefdc2780356900a4d6fa55317a18cd
[ "MIT" ]
null
null
null
server.py
sigu1011/gameinn
6c314fa5deefdc2780356900a4d6fa55317a18cd
[ "MIT" ]
1
2019-11-27T23:46:36.000Z
2019-11-27T23:46:36.000Z
server.py
sigu1011/gameinn
6c314fa5deefdc2780356900a4d6fa55317a18cd
[ "MIT" ]
null
null
null
from gameinn import app if __name__ == '__main__': app.run()
13.2
26
0.666667
from gameinn import app if __name__ == '__main__': app.run()
true
true
f72fd8714765a1fe1b575242873790f455b95c4d
3,480
py
Python
text_features_extraction.py
maxgreat/dsve-loc
dd6807d02c0d5fd3e215be8e5c7a88e73102e561
[ "BSD-3-Clause-Clear" ]
null
null
null
text_features_extraction.py
maxgreat/dsve-loc
dd6807d02c0d5fd3e215be8e5c7a88e73102e561
[ "BSD-3-Clause-Clear" ]
null
null
null
text_features_extraction.py
maxgreat/dsve-loc
dd6807d02c0d5fd3e215be8e5c7a88e73102e561
[ "BSD-3-Clause-Clear" ]
null
null
null
""" ****************** COPYRIGHT AND CONFIDENTIALITY INFORMATION ****************** Copyright (c) 2018 [Thomson Licensing] All Rights Reserved This program contains proprietary information which is a trade secret/business \ secret of [Thomson Licensing] and is protected, even if unpublished, under \ applicable Co...
39.101124
150
0.675287
import argparse import time import numpy as np import torch from misc.dataset import TextDataset from misc.model import joint_embedding from misc.utils import save_obj, collate_fn_cap_padded from torch.utils.data import DataLoader device = torch.device("cuda") if __name__ == '__main__': pa...
true
true
f72fd9650f220263368abc650314f11467ad9ad0
117
py
Python
FRCScouting/Contact/urls.py
xNovax/FRCScouting.ca
caf2774e5854a7386eceb21e57b68c1f9c1f7d2d
[ "MIT" ]
1
2019-06-13T03:07:15.000Z
2019-06-13T03:07:15.000Z
FRCScouting/Contact/urls.py
xNovax/FRCScouting.ca
caf2774e5854a7386eceb21e57b68c1f9c1f7d2d
[ "MIT" ]
8
2019-07-04T16:19:06.000Z
2019-07-12T17:37:51.000Z
FRCScouting/Contact/urls.py
xNovax/FRCScouting.ca
caf2774e5854a7386eceb21e57b68c1f9c1f7d2d
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.contactus, name= 'contactus') ]
16.714286
48
0.692308
from django.urls import path from . import views urlpatterns = [ path('', views.contactus, name= 'contactus') ]
true
true
f72fda32958488cb17ecc7633d36804837bdf534
7,499
py
Python
flsim/utils/config_utils.py
karthikprasad/FLSim
3c62fe83de2f06feffb9ed65ce9f71803bbd6027
[ "Apache-2.0" ]
null
null
null
flsim/utils/config_utils.py
karthikprasad/FLSim
3c62fe83de2f06feffb9ed65ce9f71803bbd6027
[ "Apache-2.0" ]
null
null
null
flsim/utils/config_utils.py
karthikprasad/FLSim
3c62fe83de2f06feffb9ed65ce9f71803bbd6027
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import argparse import collections import json from typing import Any, Dict, List, Tuple, Type from hydra.expe...
34.557604
87
0.648887
import argparse import collections import json from typing import Any, Dict, List, Tuple, Type from hydra.experimental import initialize, compose from omegaconf import OmegaConf, DictConfig def fullclassname(cls: Type[Any]) -> str: module = cls.__module__ name = cls.__qualname__ if module is not None an...
true
true
f72fda7d11cd1da25e984d8313329f9d5e6cc36b
12,611
py
Python
py3.1/multiprocess/queues.py
geofft/multiprocess
d998ffea9e82d17662b12b94a236182e7fde46d5
[ "BSD-3-Clause" ]
356
2015-06-21T21:05:10.000Z
2022-03-30T11:57:08.000Z
py3.1/multiprocess/queues.py
geofft/multiprocess
d998ffea9e82d17662b12b94a236182e7fde46d5
[ "BSD-3-Clause" ]
103
2015-06-22T01:44:14.000Z
2022-03-01T03:44:25.000Z
py3.1/multiprocess/queues.py
geofft/multiprocess
d998ffea9e82d17662b12b94a236182e7fde46d5
[ "BSD-3-Clause" ]
72
2015-09-02T14:10:24.000Z
2022-03-25T06:49:43.000Z
# # Module implementing queues # # multiprocessing/queues.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must ret...
31.606516
81
0.581714
__all__ = ['Queue', 'SimpleQueue', 'JoinableQueue'] import sys import os import threading import collections import time import atexit import weakref from queue import Empty, Full try: import _multiprocess as _multiprocessing except ImportError: import _multiprocessing from multiprocess import Pipe from mult...
true
true
f72fdb09c91a65da5dcb94cfe00e07d00f7cf5cf
3,669
py
Python
python/oneflow/test/modules/test_chunk.py
triple-Mu/oneflow
395da40885016d0b899f8a1eb87e5311a556a9b8
[ "Apache-2.0" ]
1
2022-03-14T11:17:56.000Z
2022-03-14T11:17:56.000Z
python/oneflow/test/modules/test_chunk.py
triple-Mu/oneflow
395da40885016d0b899f8a1eb87e5311a556a9b8
[ "Apache-2.0" ]
null
null
null
python/oneflow/test/modules/test_chunk.py
triple-Mu/oneflow
395da40885016d0b899f8a1eb87e5311a556a9b8
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
33.354545
73
0.613791
import unittest from collections import OrderedDict from random import shuffle import numpy as np from random import shuffle import oneflow as flow import oneflow.unittest from oneflow.test_utils.automated_test_util import * @flow.unittest.skip_unless_1n1d() class TestChunk(flow.unittest.TestCase): @autotest(...
true
true
f72fdba810e4acacfce8c3f39354b4ef1f6e88b2
2,774
py
Python
src/application/analysis/english_analysis.py
jagoPG/-restaurant-ml-inspector
4efc7855401cc8cfa9d5e470c14685158a607448
[ "Apache-2.0" ]
1
2018-07-10T12:53:35.000Z
2018-07-10T12:53:35.000Z
src/application/analysis/english_analysis.py
jagoPG/-restaurant-ml-inspector
4efc7855401cc8cfa9d5e470c14685158a607448
[ "Apache-2.0" ]
null
null
null
src/application/analysis/english_analysis.py
jagoPG/-restaurant-ml-inspector
4efc7855401cc8cfa9d5e470c14685158a607448
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env # -*- coding: utf-8 -*- """ Copyright 2017-2018 Jagoba Pérez-Gómez 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 ...
32.255814
96
0.655732
import logging from textblob import TextBlob from src.application.analysis.evaluated_word import EvaluatedWord class EnglishAnalysis(object): def __init__(self, keyword_repository, reviews): self._keyword_repository = keyword_repository self._reviews = reviews self._words = {} ...
true
true
f72fdc1d6884bbc99ff86fadd0864d05af6b34ab
2,186
py
Python
method_of_moments/continuous/_loc_scale.py
AlbertFarkhutdinov/method_of_moments
0a69c63197d7f88a3b57356620b4d84e76543177
[ "MIT" ]
null
null
null
method_of_moments/continuous/_loc_scale.py
AlbertFarkhutdinov/method_of_moments
0a69c63197d7f88a3b57356620b4d84e76543177
[ "MIT" ]
null
null
null
method_of_moments/continuous/_loc_scale.py
AlbertFarkhutdinov/method_of_moments
0a69c63197d7f88a3b57356620b4d84e76543177
[ "MIT" ]
null
null
null
""" This module contains description of class for probability distributions from location-scale family. """ from method_of_moments.continuous._base_continuous import BaseContinuous class LocScale(BaseContinuous): """ Class for probability distributions from location-scale family. Parameters ------...
28.025641
79
0.63312
from method_of_moments.continuous._base_continuous import BaseContinuous class LocScale(BaseContinuous): def __init__(self, loc: float = 0.0, scale: float = 1.0, **kwargs) -> None: super().__init__(**kwargs) self.loc = loc self.scale = scale @property def loc(self) -> float: ...
true
true
f72fdcd3421f334ce1bfe3c860ab1e55aab23f82
1,226
py
Python
test/test_jcampdx.py
MIRCen/brukerapi-python
5455800895924c69bf839fa621fa7a06d343b4ff
[ "MIT" ]
7
2020-06-30T16:09:20.000Z
2022-03-09T13:27:55.000Z
test/test_jcampdx.py
MIRCen/brukerapi-python
5455800895924c69bf839fa621fa7a06d343b4ff
[ "MIT" ]
2
2020-09-06T19:29:36.000Z
2021-03-15T08:03:46.000Z
test/test_jcampdx.py
MIRCen/brukerapi-python
5455800895924c69bf839fa621fa7a06d343b4ff
[ "MIT" ]
1
2022-01-20T09:43:45.000Z
2022-01-20T09:43:45.000Z
from brukerapi.jcampdx import JCAMPDX import numpy as np from pathlib import Path import pytest @pytest.mark.skip(reason="in progress") def test_jcampdx(test_jcampdx_data): j = JCAMPDX(Path(test_jcampdx_data[1]) / test_jcampdx_data[0]['path']) for key, ref in test_jcampdx_data[0]['parameters'].items(): ...
29.902439
74
0.626427
from brukerapi.jcampdx import JCAMPDX import numpy as np from pathlib import Path import pytest @pytest.mark.skip(reason="in progress") def test_jcampdx(test_jcampdx_data): j = JCAMPDX(Path(test_jcampdx_data[1]) / test_jcampdx_data[0]['path']) for key, ref in test_jcampdx_data[0]['parameters'].items(): ...
true
true
f72fdd762dd6a686c705479e1165f5735db40a61
1,055
py
Python
src/lib/telegram/parsemode.py
thonkify/thonkify
2cb4493d796746cb46c8519a100ef3ef128a761a
[ "MIT" ]
17
2017-08-04T15:41:05.000Z
2020-10-16T18:02:41.000Z
src/lib/telegram/parsemode.py
thonkify/thonkify
2cb4493d796746cb46c8519a100ef3ef128a761a
[ "MIT" ]
3
2017-08-04T23:37:37.000Z
2017-08-04T23:38:34.000Z
src/lib/telegram/parsemode.py
thonkify/thonkify
2cb4493d796746cb46c8519a100ef3ef128a761a
[ "MIT" ]
3
2017-12-07T16:30:59.000Z
2019-06-16T02:48:28.000Z
#!/usr/bin/env python # pylint: disable=R0903 # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public L...
36.37931
71
0.747867
class ParseMode(object): MARKDOWN = 'Markdown' HTML = 'HTML'
true
true
f72fdd985d4e4c0bdc2d66e73fde136c53658738
3,108
py
Python
openaerostruct/structures/section_properties_tube.py
lkelvinm/OpenAeroStruct
395075d28783c1b99b4ab25ddf034000caf9cd0d
[ "Apache-2.0" ]
null
null
null
openaerostruct/structures/section_properties_tube.py
lkelvinm/OpenAeroStruct
395075d28783c1b99b4ab25ddf034000caf9cd0d
[ "Apache-2.0" ]
null
null
null
openaerostruct/structures/section_properties_tube.py
lkelvinm/OpenAeroStruct
395075d28783c1b99b4ab25ddf034000caf9cd0d
[ "Apache-2.0" ]
null
null
null
from __future__ import division, print_function import numpy as np from openmdao.api import ExplicitComponent class SectionPropertiesTube(ExplicitComponent): """ Compute geometric properties for a tube element. The thicknesses are added to the interior of the element, so the 'radius' value is the oute...
35.724138
80
0.568855
from __future__ import division, print_function import numpy as np from openmdao.api import ExplicitComponent class SectionPropertiesTube(ExplicitComponent): def initialize(self): self.options.declare('surface', types=dict) def setup(self): self.surface = surface = self.options['surface'] ...
true
true
f72fdda2808488fef61058f47c4ebf00428e8bf0
9,861
py
Python
devel/lib/python2.7/dist-packages/mav_manager/srv/_GoalTimed.py
MultiRobotUPenn/groundstation_ws_vio_swarm
60e01af6bf32bafb5bc31626b055436278dc8311
[ "MIT" ]
1
2020-03-10T06:32:51.000Z
2020-03-10T06:32:51.000Z
install/lib/python2.7/dist-packages/mav_manager/srv/_GoalTimed.py
MultiRobotUPenn/groundstation_ws_vio_swarm
60e01af6bf32bafb5bc31626b055436278dc8311
[ "MIT" ]
null
null
null
install/lib/python2.7/dist-packages/mav_manager/srv/_GoalTimed.py
MultiRobotUPenn/groundstation_ws_vio_swarm
60e01af6bf32bafb5bc31626b055436278dc8311
[ "MIT" ]
1
2018-11-07T03:37:23.000Z
2018-11-07T03:37:23.000Z
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from mav_manager/GoalTimedRequest.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import genpy class GoalTimedRequest(genpy.Message): _md5sum = "3c9a1ea281c62219122f22a...
33.540816
145
0.653179
import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import genpy class GoalTimedRequest(genpy.Message): _md5sum = "3c9a1ea281c62219122f22aa2b508b97" _type = "mav_manager/GoalTimedRequest" _has_header = False _full_text = """float32[4] goal duration duration time t_st...
true
true
f72fde34553d0101da278cb9f85832174a12acbb
1,294
py
Python
src/image-gallery/azext_image_gallery/_client_factory.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/image-gallery/azext_image_gallery/_client_factory.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/image-gallery/azext_image_gallery/_client_factory.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
36.971429
100
0.710974
def _compute_client_factory(cli_ctx): from azure.cli.core.commands.client_factory import get_mgmt_service_client from .vendored_sdks.azure_mgmt_compute._compute_management_client import ComputeManagementClient return get_mgmt_service_client(cli_ctx, ComputeManagementClient) def cf_galleries(cli_ctx, _):...
true
true
f72fde9be8445c641564cc9689aca34ffff96645
5,280
py
Python
mmdet/core/hook/ema.py
mrzhuzhe/mmdetection
c04ca2c2a65500bc248a5d2ab6ace5b15f00064d
[ "Apache-2.0" ]
null
null
null
mmdet/core/hook/ema.py
mrzhuzhe/mmdetection
c04ca2c2a65500bc248a5d2ab6ace5b15f00064d
[ "Apache-2.0" ]
null
null
null
mmdet/core/hook/ema.py
mrzhuzhe/mmdetection
c04ca2c2a65500bc248a5d2ab6ace5b15f00064d
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import math from mmcv.parallel import is_module_wrapper from mmcv.runner.hooks import HOOKS, Hook class BaseEMAHook(Hook): """Exponential Moving Average Hook. Use Exponential Moving Average on all parameters of model in training process. All par...
40.305344
79
0.621212
import math from mmcv.parallel import is_module_wrapper from mmcv.runner.hooks import HOOKS, Hook class BaseEMAHook(Hook): def __init__(self, momentum=0.0002, interval=1, skip_buffers=False, resume_from=None, momen...
true
true
f72fdecee874f57c54aafbb15866dc4f007451be
1,697
py
Python
**PyBank**/main.py
cathchristabel/Python-Challenge
f8a56210c15785626c693101f12173c9b55f3c9d
[ "ADSL" ]
null
null
null
**PyBank**/main.py
cathchristabel/Python-Challenge
f8a56210c15785626c693101f12173c9b55f3c9d
[ "ADSL" ]
null
null
null
**PyBank**/main.py
cathchristabel/Python-Challenge
f8a56210c15785626c693101f12173c9b55f3c9d
[ "ADSL" ]
null
null
null
import os import csv filepath = os.path.join('..','**PyBank**','Resources','budget_data.csv') output_path = os.path.join('..','**PyBank**','financial_analysis.txt') total_months = 0 total_net = 0 net_change_list = [] month_of_change = [] greatest_increase = ["", 0] greatest_decrease = ["", 9999999999999] with open (...
31.425926
93
0.6264
import os import csv filepath = os.path.join('..','**PyBank**','Resources','budget_data.csv') output_path = os.path.join('..','**PyBank**','financial_analysis.txt') total_months = 0 total_net = 0 net_change_list = [] month_of_change = [] greatest_increase = ["", 0] greatest_decrease = ["", 9999999999999] with open (...
true
true
f72fe00487d7fd4d4a1b45f52317911518a2dda8
923
py
Python
integration_tests/src/main/python/marks.py
wbo4958/spark-rapids
2b18d10313b57aaf6541f40da571c98abcdbc908
[ "Apache-2.0" ]
null
null
null
integration_tests/src/main/python/marks.py
wbo4958/spark-rapids
2b18d10313b57aaf6541f40da571c98abcdbc908
[ "Apache-2.0" ]
null
null
null
integration_tests/src/main/python/marks.py
wbo4958/spark-rapids
2b18d10313b57aaf6541f40da571c98abcdbc908
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020-2021, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
36.92
74
0.789816
import pytest allow_non_gpu = pytest.mark.allow_non_gpu approximate_float = pytest.mark.approximate_float ignore_order = pytest.mark.ignore_order incompat = pytest.mark.incompat limit = pytest.mark.limit qarun = pytest.mark.qarun cudf_udf = pytest.mark.cudf_udf rapids_udf_example_native = pytest.mark.rapids_udf_examp...
true
true
f72fe031967fabab6e73cfb6ef6a29f19e93d585
473
py
Python
src/maestral_cocoa/constants.py
SamSchott/maestral-cocoa
bb031b2df010ae84e058fadd3a1b10b19d23b762
[ "MIT" ]
8
2020-11-13T08:48:01.000Z
2021-12-16T06:30:27.000Z
macOS/Xcode/Maestral/Maestral/app/maestral_cocoa/constants.py
SamSchott/maestral-cocoa
bb031b2df010ae84e058fadd3a1b10b19d23b762
[ "MIT" ]
4
2021-08-23T20:41:39.000Z
2021-11-16T08:43:58.000Z
src/maestral_cocoa/constants.py
SamSchott/maestral-cocoa
bb031b2df010ae84e058fadd3a1b10b19d23b762
[ "MIT" ]
1
2021-11-09T07:14:44.000Z
2021-11-09T07:14:44.000Z
# -*- coding: utf-8 -*- # system imports import sys try: from importlib.metadata import metadata except ImportError: # Backwards compatibility Python 3.7 and lower from importlib_metadata import metadata # type: ignore _app_module = sys.modules["__main__"].__package__ _md = metadata(_app_module) # typ...
26.277778
72
0.744186
import sys try: from importlib.metadata import metadata except ImportError: from importlib_metadata import metadata _app_module = sys.modules["__main__"].__package__ _md = metadata(_app_module) FROZEN = "Briefcase-Version" in _md or getattr(sys, "frozen", False)
true
true
f72fe13e3737561fcf3652de947a89127a226c44
619
py
Python
scraper_app/pipelines.py
brian-yang/pollen-scraper
77e47d68bb1c6ca31e7b91550728fa59e9cb2d8a
[ "MIT" ]
null
null
null
scraper_app/pipelines.py
brian-yang/pollen-scraper
77e47d68bb1c6ca31e7b91550728fa59e9cb2d8a
[ "MIT" ]
null
null
null
scraper_app/pipelines.py
brian-yang/pollen-scraper
77e47d68bb1c6ca31e7b91550728fa59e9cb2d8a
[ "MIT" ]
null
null
null
from sqlalchemy.orm import sessionmaker from models import Forecasts, db_connect, create_forecast_table import logging class PollenScraperPipeline(object): def __init__(self): engine = db_connect() create_forecast_table(engine) self.Session = sessionmaker(bind=engine) def process_item...
24.76
63
0.620355
from sqlalchemy.orm import sessionmaker from models import Forecasts, db_connect, create_forecast_table import logging class PollenScraperPipeline(object): def __init__(self): engine = db_connect() create_forecast_table(engine) self.Session = sessionmaker(bind=engine) def process_item...
true
true
f72fe1c22165e6e851d2bbb6a57c5a9a578e49f4
845
py
Python
keras/engine/saving.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
keras/engine/saving.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
keras/engine/saving.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.409091
80
0.685207
from keras.saving import *
true
true
f72fe23bdf252ab6cbb78597079dd21aae3c8959
719
py
Python
ext_pylib/__init__.py
hbradleyiii/ext_pylib
15a9b5a80db87b5f20e03ef6bfa015acf4bf8543
[ "MIT" ]
2
2015-12-18T14:33:23.000Z
2015-12-22T11:48:53.000Z
ext_pylib/__init__.py
hbradleyiii/ext_pylib
15a9b5a80db87b5f20e03ef6bfa015acf4bf8543
[ "MIT" ]
null
null
null
ext_pylib/__init__.py
hbradleyiii/ext_pylib
15a9b5a80db87b5f20e03ef6bfa015acf4bf8543
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # /'' |''\ | | # \. | |../ | * |.. # / \/ T | \ / | | | \ # \.../\.| __ | \/ | | |../ # ###################/############### # / """ ext_pylib ~~~~~~~~~ Extra python libraries for scaffolding server...
20.542857
56
0.520167
from __future__ import absolute_import from . import domain from . import files from . import input from . import password from . import terminal from . import user __title__ = 'ext_pylib' __version__ = '0.2' __author__ = 'Harold Bradley III' __license__ = 'MIT' __copyright__ = 'Copyright 2015-2016 Harold Bradle...
true
true
f72fe24bceb08d360b3e71ca50fe69638691a3cf
4,782
py
Python
src/train_set.py
caoyunhao/keras-speed-prediction
b1c87a012f8049050f124062e3cc24322e7d95b9
[ "BSD-2-Clause" ]
null
null
null
src/train_set.py
caoyunhao/keras-speed-prediction
b1c87a012f8049050f124062e3cc24322e7d95b9
[ "BSD-2-Clause" ]
null
null
null
src/train_set.py
caoyunhao/keras-speed-prediction
b1c87a012f8049050f124062e3cc24322e7d95b9
[ "BSD-2-Clause" ]
null
null
null
# !/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/4/6 10:55 # @Author : Yunhao Cao # @File : train_set.py import os import re import shutil import tool import config __author__ = 'Yunhao Cao' __all__ = [ '', ] level_list = config.LV_LIST classes = config.NUM_OF_LEVEL validation_rate = config....
31.460526
117
0.641363
import os import re import shutil import tool import config __author__ = 'Yunhao Cao' __all__ = [ '', ] level_list = config.LV_LIST classes = config.NUM_OF_LEVEL validation_rate = config.VALIDATION_RATE origin_data_dir = config.ORIGIN_DATA_DIR processed_set_dir = config.PROCESSED_SET_DIR trainset_dir = config....
true
true
f72fe2b962d8ae02afda6b1e6bd5174272456fd7
1,176
py
Python
src/okchain1/theme/rtd/conf/clients_ruby.py
sakya666/crate-docs-theme
5767fe05c342581d1387baa7222ec09f61ce9cc5
[ "Apache-2.0" ]
null
null
null
src/okchain1/theme/rtd/conf/clients_ruby.py
sakya666/crate-docs-theme
5767fe05c342581d1387baa7222ec09f61ce9cc5
[ "Apache-2.0" ]
null
null
null
src/okchain1/theme/rtd/conf/clients_ruby.py
sakya666/crate-docs-theme
5767fe05c342581d1387baa7222ec09f61ce9cc5
[ "Apache-2.0" ]
1
2022-03-14T04:06:36.000Z
2022-03-14T04:06:36.000Z
# -*- coding: utf-8; -*- # # Licensed to Crate (https://crate.io) under one or more contributor # license agreements. See the NOTICE file distributed with this work for # additional information regarding copyright ownership. Crate licenses # this file to you under the Apache License, Version 2.0 (the "License"); # yo...
40.551724
77
0.764456
from okchain1.theme.rtd.conf import * project = u'Crate Ruby Driver' html_theme_options.update({ 'canonical_url_path': 'docs/clients/ruby/en/latest/', })
true
true
f72fe2bfca70709b096167614b03f46712fae7e4
5,248
py
Python
hwtLib/tests/types/union_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
24
2017-02-23T10:00:50.000Z
2022-01-28T12:20:21.000Z
hwtLib/tests/types/union_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
32
2017-04-28T10:29:34.000Z
2021-04-27T09:16:43.000Z
hwtLib/tests/types/union_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
8
2019-09-19T03:34:36.000Z
2022-01-21T06:56:58.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest from hwt.hdl.types.bits import Bits from hwt.hdl.types.struct import HStruct from hwt.hdl.types.union import HUnion from hwtLib.types.ctypes import uint8_t, uint16_t, int8_t, uint32_t from pyMathBitPrecise.bit_utils import mask class UnionTC(unittest.Te...
26.639594
67
0.416921
import unittest from hwt.hdl.types.bits import Bits from hwt.hdl.types.struct import HStruct from hwt.hdl.types.union import HUnion from hwtLib.types.ctypes import uint8_t, uint16_t, int8_t, uint32_t from pyMathBitPrecise.bit_utils import mask class UnionTC(unittest.TestCase): def test_assertMembersSameSize(sel...
true
true
f72fe2eb838ca241bfbb6311a02f5d6800326a7d
3,217
py
Python
editor/photo_effects.py
gitgik/photo-editing-app
730f88a1946d425cbe790cd4ed0689a1938a8cd0
[ "MIT" ]
5
2017-02-23T14:24:22.000Z
2021-02-23T03:43:18.000Z
editor/photo_effects.py
gitgik/photo-editing-app
730f88a1946d425cbe790cd4ed0689a1938a8cd0
[ "MIT" ]
1
2021-06-08T19:14:01.000Z
2021-06-08T19:14:01.000Z
editor/photo_effects.py
gitgik/photo-editing-app
730f88a1946d425cbe790cd4ed0689a1938a8cd0
[ "MIT" ]
2
2019-01-21T20:16:05.000Z
2019-06-23T14:30:50.000Z
"""Define imports.""" from PIL import ImageFilter, ImageOps, ImageEnhance def grayscale(image, name, temp_url): """Return an image with a contrast of grey.""" image.seek(0) photo = ImageOps.grayscale(image) photo.save(temp_url + "GRAYSCALE" + name) return temp_url + "GRAYSCALE" + name def smooth...
28.723214
74
0.658688
from PIL import ImageFilter, ImageOps, ImageEnhance def grayscale(image, name, temp_url): image.seek(0) photo = ImageOps.grayscale(image) photo.save(temp_url + "GRAYSCALE" + name) return temp_url + "GRAYSCALE" + name def smooth(image, name, temp_url): image.seek(0) photo = image.filter(Image...
true
true
f72fe3a6e22942dfdabf42624c7f630b6ceb120b
610
py
Python
eveonline-assistant/plans/urls.py
wengole/eveonline-assistant
35041952509bd347c5c9458630404726d7ddd5d8
[ "BSD-3-Clause" ]
1
2016-07-01T03:15:16.000Z
2016-07-01T03:15:16.000Z
eveonline-assistant/plans/urls.py
wengole/eveonline-assistant
35041952509bd347c5c9458630404726d7ddd5d8
[ "BSD-3-Clause" ]
null
null
null
eveonline-assistant/plans/urls.py
wengole/eveonline-assistant
35041952509bd347c5c9458630404726d7ddd5d8
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import patterns, url from . import views urlpatterns = patterns( '', # URL pattern for the UserListView url( regex=r'^add/$', view=views.AddPlan.as_view(), name='add' ), url( regex=r'^manage/$', view=views.ManagePlans.as_view(), ...
20.333333
62
0.545902
from django.conf.urls import patterns, url from . import views urlpatterns = patterns( '', url( regex=r'^add/$', view=views.AddPlan.as_view(), name='add' ), url( regex=r'^manage/$', view=views.ManagePlans.as_view(), name='manage' ), url( ...
true
true
f72fe3eae0d57d1739f0d017bc8c4f227f8e08ed
11,579
py
Python
asdf/util.py
eteq/asdf
6d9e0e48bbffea166a19b71e29f5f9c211983bfe
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
asdf/util.py
eteq/asdf
6d9e0e48bbffea166a19b71e29f5f9c211983bfe
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
asdf/util.py
eteq/asdf
6d9e0e48bbffea166a19b71e29f5f9c211983bfe
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import inspect import math import struct import types from urllib.parse import urljoin from urllib.request import pathname2url from urllib import parse as urlparse import numpy as np from .extern.decorators import add_common_doc...
28.9475
78
0.59297
import inspect import math import struct import types from urllib.parse import urljoin from urllib.request import pathname2url from urllib import parse as urlparse import numpy as np from .extern.decorators import add_common_docstring __all__ = ['human_list', 'get_array_base', 'get_base_uri', 'filepath_to_url', ...
true
true
f72fe510b547f529b3a5626defad1371dfcbc75e
16,658
py
Python
wbgapi/data.py
mo-cmyk/wbgapi
a0f8658b7a74ec79256d7b66ff58cb95726e89aa
[ "MIT" ]
41
2020-01-29T17:39:50.000Z
2022-03-31T00:21:52.000Z
wbgapi/data.py
mo-cmyk/wbgapi
a0f8658b7a74ec79256d7b66ff58cb95726e89aa
[ "MIT" ]
18
2020-01-03T06:43:43.000Z
2022-02-19T13:09:21.000Z
wbgapi/data.py
mo-cmyk/wbgapi
a0f8658b7a74ec79256d7b66ff58cb95726e89aa
[ "MIT" ]
7
2021-03-24T15:41:09.000Z
2022-03-21T21:26:25.000Z
'''Access World Bank API data ''' import wbgapi as w try: import numpy as np import pandas as pd except ImportError: np = None pd = None def fetch(series, economy='all', time='all', mrv=None, mrnev=None, skipBlanks=False, labels=False, skipAggs=False, numericTimeKeys=False, params={}, db=None, **dime...
39.380615
221
0.593228
import wbgapi as w try: import numpy as np import pandas as pd except ImportError: np = None pd = None def fetch(series, economy='all', time='all', mrv=None, mrnev=None, skipBlanks=False, labels=False, skipAggs=False, numericTimeKeys=False, params={}, db=None, **dimensions): if db is None: ...
true
true
f72fe57794917edbcfc8d26818116b24e336b4d8
787
py
Python
examples/tf/trpo_gym_tf_cartpole.py
shadiakiki1986/garage
095bb5d25b32df1d44b47e99a78a9b01796941d9
[ "MIT" ]
null
null
null
examples/tf/trpo_gym_tf_cartpole.py
shadiakiki1986/garage
095bb5d25b32df1d44b47e99a78a9b01796941d9
[ "MIT" ]
null
null
null
examples/tf/trpo_gym_tf_cartpole.py
shadiakiki1986/garage
095bb5d25b32df1d44b47e99a78a9b01796941d9
[ "MIT" ]
null
null
null
import gym from garage.baselines import LinearFeatureBaseline from garage.experiment import run_experiment from garage.tf.algos import TRPO from garage.tf.envs import TfEnv from garage.tf.policies import CategoricalMLPPolicy # Need to wrap in a tf environment and force_reset to true # see https://github.com/openai/rl...
26.233333
72
0.758577
import gym from garage.baselines import LinearFeatureBaseline from garage.experiment import run_experiment from garage.tf.algos import TRPO from garage.tf.envs import TfEnv from garage.tf.policies import CategoricalMLPPolicy env = TfEnv(gym.make("CartPole-v0")) policy = CategoricalMLPPolicy( name="policy", env_s...
true
true
f72fe5795879771746bcc6ee4b44c101ac8e4453
267
py
Python
CCF/CSP/2018/18121.py
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
1
2019-05-04T10:28:32.000Z
2019-05-04T10:28:32.000Z
CCF/CSP/2018/18121.py
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
null
null
null
CCF/CSP/2018/18121.py
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
3
2020-12-31T04:36:38.000Z
2021-07-25T07:39:31.000Z
r, y, g = map(int, input().split()) n = int(input()) ans = 0 for _ in range(n): k, t = map(int, input().split()) if k == 0: ans += t elif k == 1: ans += t elif k == 2: ans = ans + t + r elif k == 3: pass print(ans)
17.8
36
0.419476
r, y, g = map(int, input().split()) n = int(input()) ans = 0 for _ in range(n): k, t = map(int, input().split()) if k == 0: ans += t elif k == 1: ans += t elif k == 2: ans = ans + t + r elif k == 3: pass print(ans)
true
true
f72fe6c802fc9b6df210c17f9eaf4d123167398f
1,996
py
Python
examples/Model_HM_RWS.py
kpoeppel/pytorch_probgraph
b78595ab03bbe92595ad2f6b35f5dd8bf84d6da0
[ "BSD-3-Clause" ]
47
2020-08-10T02:04:26.000Z
2022-03-23T22:20:56.000Z
examples/Model_HM_RWS.py
kpoeppel/pytorch_probgraph
b78595ab03bbe92595ad2f6b35f5dd8bf84d6da0
[ "BSD-3-Clause" ]
null
null
null
examples/Model_HM_RWS.py
kpoeppel/pytorch_probgraph
b78595ab03bbe92595ad2f6b35f5dd8bf84d6da0
[ "BSD-3-Clause" ]
4
2020-08-10T15:32:06.000Z
2021-12-29T15:04:20.000Z
import site site.addsitedir('..') import torch from pytorch_probgraph import BernoulliLayer from pytorch_probgraph import InteractionLinear from pytorch_probgraph import HelmholtzMachine from itertools import chain from tqdm import tqdm class Model_HM_RWS(torch.nn.Module): def __init__(self): super().__i...
43.391304
147
0.655311
import site site.addsitedir('..') import torch from pytorch_probgraph import BernoulliLayer from pytorch_probgraph import InteractionLinear from pytorch_probgraph import HelmholtzMachine from itertools import chain from tqdm import tqdm class Model_HM_RWS(torch.nn.Module): def __init__(self): super().__i...
true
true
f72fe7511018a20cd842050a050f2a2e4c49353b
6,242
py
Python
jesse/models/utils.py
farukuzun/jesse
c4c0c3dbab034db853fc1b09ac0f2697592bed79
[ "MIT" ]
1
2021-07-04T10:18:28.000Z
2021-07-04T10:18:28.000Z
jesse/models/utils.py
farukuzun/jesse
c4c0c3dbab034db853fc1b09ac0f2697592bed79
[ "MIT" ]
null
null
null
jesse/models/utils.py
farukuzun/jesse
c4c0c3dbab034db853fc1b09ac0f2697592bed79
[ "MIT" ]
null
null
null
import threading import numpy as np import jesse.helpers as jh from jesse.models.Candle import Candle from jesse.models.CompletedTrade import CompletedTrade from jesse.models.DailyBalance import DailyBalance from jesse.models.Order import Order from jesse.models.Orderbook import Orderbook from jesse.models.Ticker imp...
31.21
181
0.60942
import threading import numpy as np import jesse.helpers as jh from jesse.models.Candle import Candle from jesse.models.CompletedTrade import CompletedTrade from jesse.models.DailyBalance import DailyBalance from jesse.models.Order import Order from jesse.models.Orderbook import Orderbook from jesse.models.Ticker imp...
true
true
f72fe7bf8580c7c8f15d68a00c11795a0b14058e
23,210
py
Python
vyper/semantics/validation/local.py
Doc-Pixel/vyper
4da1090d5ed9c339fdd402e987db760d7d63c088
[ "Apache-2.0" ]
null
null
null
vyper/semantics/validation/local.py
Doc-Pixel/vyper
4da1090d5ed9c339fdd402e987db760d7d63c088
[ "Apache-2.0" ]
null
null
null
vyper/semantics/validation/local.py
Doc-Pixel/vyper
4da1090d5ed9c339fdd402e987db760d7d63c088
[ "Apache-2.0" ]
null
null
null
import copy from typing import Optional from vyper import ast as vy_ast from vyper.ast.validation import validate_call_args from vyper.exceptions import ( ExceptionList, FunctionDeclarationException, ImmutableViolation, InvalidLiteral, InvalidOperation, InvalidType, IteratorException, N...
40.43554
100
0.609823
import copy from typing import Optional from vyper import ast as vy_ast from vyper.ast.validation import validate_call_args from vyper.exceptions import ( ExceptionList, FunctionDeclarationException, ImmutableViolation, InvalidLiteral, InvalidOperation, InvalidType, IteratorException, N...
true
true
f72fe8bd0b61ca670674b153c7c49dccbd99c3d8
3,581
py
Python
google/bigtable/v2/bigtable-v2-py/noxfile.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/bigtable/v2/bigtable-v2-py/noxfile.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/bigtable/v2/bigtable-v2-py/noxfile.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...
26.924812
96
0.62692
import os import pathlib import shutil import subprocess import sys import nox CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt" PACKAGE_NAME = subprocess.check_output([sys.executable, "setup.py", "--name"], encoding="utf-8") nox.ses...
true
true
f72fea862619713252e7fba20316ffcd135413b8
21,695
py
Python
external/mmdetection/tests/ote_params_validation/test_ote_data_utils_params_validation.py
opencv/openvino_training_extensions
f5d809741e192a2345558efc75899a475019cf98
[ "Apache-2.0" ]
775
2019-03-01T02:13:33.000Z
2020-09-07T22:49:15.000Z
external/mmdetection/tests/ote_params_validation/test_ote_data_utils_params_validation.py
opencv/openvino_training_extensions
f5d809741e192a2345558efc75899a475019cf98
[ "Apache-2.0" ]
229
2019-02-28T21:37:08.000Z
2020-09-07T15:11:49.000Z
external/mmdetection/tests/ote_params_validation/test_ote_data_utils_params_validation.py
opencv/openvino_training_extensions
f5d809741e192a2345558efc75899a475019cf98
[ "Apache-2.0" ]
290
2019-02-28T20:32:11.000Z
2020-09-07T05:51:41.000Z
# Copyright (C) 2021-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # import os.path as osp import tempfile import mmcv import pytest from detection_tasks.extension.datasets.data_utils import ( CocoDataset, LoadAnnotations, find_label_by_name, format_list_to_str, get_anchor_boxes, ...
39.445455
117
0.638442
import os.path as osp import tempfile import mmcv import pytest from detection_tasks.extension.datasets.data_utils import ( CocoDataset, LoadAnnotations, find_label_by_name, format_list_to_str, get_anchor_boxes, get_classes_from_annotation, get_sizes_from_dataset_entity, load_dataset_it...
true
true
f72fea9931e22e9f239b53d7134f8989231f7dc2
2,129
py
Python
aiida/backends/djsite/db/migrations/0014_add_node_uuid_unique_constraint.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
180
2019-07-12T07:45:26.000Z
2022-03-22T13:16:57.000Z
aiida/backends/djsite/db/migrations/0014_add_node_uuid_unique_constraint.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
2,325
2019-07-04T13:41:44.000Z
2022-03-31T12:17:10.000Z
aiida/backends/djsite/db/migrations/0014_add_node_uuid_unique_constraint.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
88
2019-07-06T01:42:39.000Z
2022-03-18T14:20:09.000Z
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
38.709091
114
0.627055
from django.db import migrations, models from aiida.backends.djsite.db.migrations import upgrade_schema_version from aiida.common.utils import get_new_uuid REVISION = '1.0.14' DOWN_REVISION = '1.0.13' def verify_node_uuid_uniqueness(_, __): from aiida.backends.general.migrations.duplicate_uuids import verify_u...
true
true
f72feae6ab211e77121bc7730e459830daa3eb1d
826
py
Python
pyadlml/dataset/obj.py
tcsvn/pyadlml
9b87d223ba0ef9814ba830263dd35fc6432fae87
[ "MIT" ]
4
2020-11-11T17:29:10.000Z
2021-01-08T20:55:47.000Z
pyadlml/dataset/obj.py
tcsvn/pyadlml
9b87d223ba0ef9814ba830263dd35fc6432fae87
[ "MIT" ]
null
null
null
pyadlml/dataset/obj.py
tcsvn/pyadlml
9b87d223ba0ef9814ba830263dd35fc6432fae87
[ "MIT" ]
5
2020-10-05T03:23:31.000Z
2022-01-25T19:15:34.000Z
from pyadlml.dataset._representations.raw import create_raw from pyadlml.dataset._representations.changepoint import create_changepoint from pyadlml.dataset.activities import check_activities class Data(): def __init__(self, activities, devices, activity_list, device_list): #assert check_activities(activit...
34.416667
76
0.737288
from pyadlml.dataset._representations.raw import create_raw from pyadlml.dataset._representations.changepoint import create_changepoint from pyadlml.dataset.activities import check_activities class Data(): def __init__(self, activities, devices, activity_list, device_list): self.df_activit...
true
true
f72fec11a0ec5517350c9336346de65477e1cb36
87,391
py
Python
python3/pyinotify.py
koto/pyinotify
b828a124bcf2310df7e2e7683b0902fcd78a08bf
[ "MIT" ]
1
2020-03-31T21:41:57.000Z
2020-03-31T21:41:57.000Z
python3/pyinotify.py
koto/pyinotify
b828a124bcf2310df7e2e7683b0902fcd78a08bf
[ "MIT" ]
null
null
null
python3/pyinotify.py
koto/pyinotify
b828a124bcf2310df7e2e7683b0902fcd78a08bf
[ "MIT" ]
null
null
null
#!/usr/bin/env python # pyinotify.py - python interface to inotify # Copyright (c) 2005-2011 Sebastien Martini <seb@dbzteam.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without res...
37.603701
83
0.58276
class PyinotifyError(Exception): pass class UnsupportedPythonVersionError(PyinotifyError): def __init__(self, version): PyinotifyError.__init__(self, ('Python %s is unsupported, requires ' 'at least Python 3.0') % version) import sys...
true
true
f72fec409082a747247e54f3160b84531dff3bf0
49
py
Python
pydotted/__init__.py
aredden/pydotted
62ad1d3eaccc65edc94b3cf4a0673ad089a29c6a
[ "MIT" ]
null
null
null
pydotted/__init__.py
aredden/pydotted
62ad1d3eaccc65edc94b3cf4a0673ad089a29c6a
[ "MIT" ]
null
null
null
pydotted/__init__.py
aredden/pydotted
62ad1d3eaccc65edc94b3cf4a0673ad089a29c6a
[ "MIT" ]
null
null
null
from .pydotted import pydot __ALL__ = ["pydot"]
12.25
27
0.714286
from .pydotted import pydot __ALL__ = ["pydot"]
true
true
f72fed24b1aa083de6ed1211270c3ee51f07a93e
5,502
py
Python
custom_components/panasonic_smart_app/sensor.py
sugoi-wada/panasonic_smart_app
78c3e377165b93c415108fa21137067585cfc72d
[ "MIT" ]
null
null
null
custom_components/panasonic_smart_app/sensor.py
sugoi-wada/panasonic_smart_app
78c3e377165b93c415108fa21137067585cfc72d
[ "MIT" ]
null
null
null
custom_components/panasonic_smart_app/sensor.py
sugoi-wada/panasonic_smart_app
78c3e377165b93c415108fa21137067585cfc72d
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta import logging from homeassistant.components.sensor import SensorEntity from homeassistant.const import ( STATE_UNAVAILABLE, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_ENERGY, DEVICE_CLASS_PM25, TEMP_CELSIUS, ENERGY_KILO_WATT_HOUR, ...
25.71028
87
0.62341
from datetime import datetime, timedelta import logging from homeassistant.components.sensor import SensorEntity from homeassistant.const import ( STATE_UNAVAILABLE, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_ENERGY, DEVICE_CLASS_PM25, TEMP_CELSIUS, ENERGY_KILO_WATT_HOUR, ...
true
true
f72fed563a8c29934c97216b6cbba861286ec271
3,487
py
Python
IPython/core/tests/test_prompts.py
flexlee/ipython
7528fbd76073c90262b9ac127de57c4c59b23a5c
[ "BSD-3-Clause-Clear" ]
1
2022-03-13T23:06:43.000Z
2022-03-13T23:06:43.000Z
IPython/core/tests/test_prompts.py
andreasjansson/ipython
09b4311726f46945b936c699f7a6489d74d7397f
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/core/tests/test_prompts.py
andreasjansson/ipython
09b4311726f46945b936c699f7a6489d74d7397f
[ "BSD-3-Clause-Clear" ]
1
2020-05-03T10:25:12.000Z
2020-05-03T10:25:12.000Z
# -*- coding: utf-8 """Tests for prompt generation.""" import unittest import os import nose.tools as nt from IPython.testing import tools as tt, decorators as dec from IPython.core.prompts import PromptManager, LazyEvaluate from IPython.testing.globalipapp import get_ipython from IPython.utils import py3compat from...
31.133929
86
0.578721
import unittest import os import nose.tools as nt from IPython.testing import tools as tt, decorators as dec from IPython.core.prompts import PromptManager, LazyEvaluate from IPython.testing.globalipapp import get_ipython from IPython.utils import py3compat from IPython.utils.tempdir import TemporaryDirectory ip = ...
true
true
f72fed7319c1d66dcc65177c208b1a6671806efd
4,361
py
Python
var/spack/repos/builtin/packages/ginkgo/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2020-09-02T11:55:57.000Z
2020-09-02T11:55:57.000Z
var/spack/repos/builtin/packages/ginkgo/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/ginkgo/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2020-01-10T18:54:54.000Z
2021-07-03T22:57:16.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import sys class Ginkgo(CMakePackage, CudaPackage): """High-performance linear algebra library f...
45.427083
94
0.61706
from spack import * import sys class Ginkgo(CMakePackage, CudaPackage): homepage = "https://ginkgo-project.github.io/" git = "https://github.com/ginkgo-project/ginkgo.git" maintainers = ['tcojean', 'hartwiganzt'] version('develop', branch='develop') version('master', branch='master') ...
true
true
f72fedd3534283eb11dfd4a84eada7c236ead59a
10,438
py
Python
src/quart/wrappers/request.py
MarkoShiva/quart
f6709c6082a3cab9dffdcd937122f4d65a5990f7
[ "MIT" ]
null
null
null
src/quart/wrappers/request.py
MarkoShiva/quart
f6709c6082a3cab9dffdcd937122f4d65a5990f7
[ "MIT" ]
null
null
null
src/quart/wrappers/request.py
MarkoShiva/quart
f6709c6082a3cab9dffdcd937122f4d65a5990f7
[ "MIT" ]
null
null
null
from __future__ import annotations import asyncio import io from cgi import FieldStorage, parse_header from typing import Any, AnyStr, Awaitable, Callable, Generator, Optional from urllib.parse import parse_qs from werkzeug.datastructures import CombinedMultiDict, Headers, MultiDict from .base import BaseRequestWebs...
34.111111
95
0.610653
from __future__ import annotations import asyncio import io from cgi import FieldStorage, parse_header from typing import Any, AnyStr, Awaitable, Callable, Generator, Optional from urllib.parse import parse_qs from werkzeug.datastructures import CombinedMultiDict, Headers, MultiDict from .base import BaseRequestWebs...
true
true
f72fee28d1d7a6de068ec92b5dd4448e2007bd1e
7,158
py
Python
sdk/python/pulumi_azure_native/avs/v20210101preview/get_workload_network_dns_service.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/avs/v20210101preview/get_workload_network_dns_service.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/avs/v20210101preview/get_workload_network_dns_service.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
35.969849
207
0.644035
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetWorkloadNetworkDnsServiceResult', 'AwaitableGetWorkloadNetworkDnsServiceResult', 'get_workload_network_dns_service', ] @pulumi.output_type cla...
true
true
f72fee595b4703f699cfe5d567dfaf697a1d6207
828
py
Python
pysm/preprocessing/museum_crm/x01_make_karma_sources.py
binh-vu/semantic-modeling
b387584502ba1daa6abd6b7573828416f6426b49
[ "MIT" ]
3
2019-10-31T15:26:20.000Z
2022-03-03T06:04:03.000Z
pysm/preprocessing/museum_crm/x01_make_karma_sources.py
binh-vu/semantic-modeling
b387584502ba1daa6abd6b7573828416f6426b49
[ "MIT" ]
1
2021-10-05T14:57:29.000Z
2022-03-27T01:58:41.000Z
pysm/preprocessing/museum_crm/x01_make_karma_sources.py
binh-vu/semantic-modeling
b387584502ba1daa6abd6b7573828416f6426b49
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import ujson from pathlib import Path from typing import Dict, Tuple, List, Set, Union, Optional, Any from semantic_modeling.config import config from semantic_modeling.data_io import get_data_tables, get_raw_data_tables, get_semantic_models, get_ontology, \ get_sampled_da...
41.4
112
0.805556
import ujson from pathlib import Path from typing import Dict, Tuple, List, Set, Union, Optional, Any from semantic_modeling.config import config from semantic_modeling.data_io import get_data_tables, get_raw_data_tables, get_semantic_models, get_ontology, \ get_sampled_data_tables from semantic_modeling.utilities...
true
true
f72fef007e9ec6112672dfd0e87b7ec609049c6a
2,115
py
Python
scrape_artists/artists.py
flannerykj/python_scrape
c5166431810432c24e04150eb305b3ec2a899a91
[ "MIT" ]
null
null
null
scrape_artists/artists.py
flannerykj/python_scrape
c5166431810432c24e04150eb305b3ec2a899a91
[ "MIT" ]
null
null
null
scrape_artists/artists.py
flannerykj/python_scrape
c5166431810432c24e04150eb305b3ec2a899a91
[ "MIT" ]
null
null
null
import csv import requests import socket from bs4 import BeautifulSoup import re import json def parse_artists(): artist_profiles = [] try: url = 'http://wx.toronto.ca/inter/pmmd/streetart.nsf/artists?OpenView' response = requests.get(url) html = response.content soup = Beautif...
33.571429
144
0.605674
import csv import requests import socket from bs4 import BeautifulSoup import re import json def parse_artists(): artist_profiles = [] try: url = 'http://wx.toronto.ca/inter/pmmd/streetart.nsf/artists?OpenView' response = requests.get(url) html = response.content soup = Beautif...
true
true
f72fef0e4ab230a89d2f0b6d56c75cd135c69cf4
497
py
Python
puzzles/day21/puzzle1.py
sbr075/advent2021
e431b56d9ee9ef9ef02fb9f9cde276feefb78095
[ "MIT" ]
1
2021-12-03T23:13:36.000Z
2021-12-03T23:13:36.000Z
puzzles/day21/puzzle1.py
sbr075/advent2021
e431b56d9ee9ef9ef02fb9f9cde276feefb78095
[ "MIT" ]
null
null
null
puzzles/day21/puzzle1.py
sbr075/advent2021
e431b56d9ee9ef9ef02fb9f9cde276feefb78095
[ "MIT" ]
null
null
null
def read_input(): with open("input.txt", "r") as file: return [int(p[28:]) for p in file.read().splitlines()] mod = lambda i,j: ((i-1) % j) + 1 def main(): pos = read_input() s = [0,0] for i in range(1,1000,3): pos[(i-1)%2] += sum([mod(j,100) for j in range(i,i+3)]) pos[(i-1)%2...
26.157895
63
0.478873
def read_input(): with open("input.txt", "r") as file: return [int(p[28:]) for p in file.read().splitlines()] mod = lambda i,j: ((i-1) % j) + 1 def main(): pos = read_input() s = [0,0] for i in range(1,1000,3): pos[(i-1)%2] += sum([mod(j,100) for j in range(i,i+3)]) pos[(i-1)%2...
true
true
f72fefc517a309b1ebb05a09c441a25eb97845f7
654
py
Python
sort/insertion_sort.py
vasili-byl/algorithms
4e37609ab9b724e140cfec4b01495a0952d28724
[ "MIT" ]
1
2020-05-02T13:40:10.000Z
2020-05-02T13:40:10.000Z
sort/insertion_sort.py
vasili-byl/algorithms
4e37609ab9b724e140cfec4b01495a0952d28724
[ "MIT" ]
null
null
null
sort/insertion_sort.py
vasili-byl/algorithms
4e37609ab9b724e140cfec4b01495a0952d28724
[ "MIT" ]
null
null
null
from sort.abstract_sort import Sort class InsertionSort(Sort): def __call__(self, array, left_bound=None, right_bound=None): if left_bound is None: left_bound = 0 if right_bound is None: right_bound = len(array) - 1 for i in range(left_bound + 1, right_bound + 1): ...
32.7
65
0.496942
from sort.abstract_sort import Sort class InsertionSort(Sort): def __call__(self, array, left_bound=None, right_bound=None): if left_bound is None: left_bound = 0 if right_bound is None: right_bound = len(array) - 1 for i in range(left_bound + 1, right_bound + 1): ...
true
true
f72ff070a885f440110d03df8a65db80bf61a2f3
4,299
py
Python
rllib/utils/torch_ops.py
acmore/ray
9f0f54266064e203b0bdcc9d3fa947cb4518ebc0
[ "Apache-2.0" ]
null
null
null
rllib/utils/torch_ops.py
acmore/ray
9f0f54266064e203b0bdcc9d3fa947cb4518ebc0
[ "Apache-2.0" ]
1
2020-06-23T07:54:44.000Z
2020-06-23T08:04:47.000Z
rllib/utils/torch_ops.py
acmore/ray
9f0f54266064e203b0bdcc9d3fa947cb4518ebc0
[ "Apache-2.0" ]
null
null
null
import numpy as np from ray.rllib.utils import try_import_tree from ray.rllib.utils.framework import try_import_torch torch, _ = try_import_torch() tree = try_import_tree() def explained_variance(y, pred): y_var = torch.var(y, dim=[0]) diff_var = torch.var(y - pred, dim=[0]) min_ = torch.Tensor([-1.0]) ...
30.928058
78
0.640381
import numpy as np from ray.rllib.utils import try_import_tree from ray.rllib.utils.framework import try_import_torch torch, _ = try_import_torch() tree = try_import_tree() def explained_variance(y, pred): y_var = torch.var(y, dim=[0]) diff_var = torch.var(y - pred, dim=[0]) min_ = torch.Tensor([-1.0]) ...
true
true
f72ff1c4d7592842535f6a31fa135b7e0705f968
1,651
py
Python
spotify_tracker/watcher_client.py
eriktaubeneck/spotifytracker
c0f7f1a418aae9184cb1d2d27835495f261027ce
[ "MIT" ]
null
null
null
spotify_tracker/watcher_client.py
eriktaubeneck/spotifytracker
c0f7f1a418aae9184cb1d2d27835495f261027ce
[ "MIT" ]
null
null
null
spotify_tracker/watcher_client.py
eriktaubeneck/spotifytracker
c0f7f1a418aae9184cb1d2d27835495f261027ce
[ "MIT" ]
null
null
null
import time import logging from .spotify_client import SpotifyPlaylistClient from . import config logger = logging.getLogger(name='spotify_tracker') class SpotifyWatcherClient(SpotifyPlaylistClient): def __init__(self): self.playlist_id = config.get_config_value('watcher_playlist_id') self.last...
34.395833
75
0.634161
import time import logging from .spotify_client import SpotifyPlaylistClient from . import config logger = logging.getLogger(name='spotify_tracker') class SpotifyWatcherClient(SpotifyPlaylistClient): def __init__(self): self.playlist_id = config.get_config_value('watcher_playlist_id') self.last...
true
true
f72ff241d91ef455622d3abfa9df1af912c8d07d
6,207
py
Python
pyqtgraph/console/template_pyqt5.py
StSav012/pyqtgraph
65e17c4e3707eb3bd4d91cdc13504d9b150f4360
[ "MIT" ]
1
2022-01-30T20:04:51.000Z
2022-01-30T20:04:51.000Z
pyqtgraph/console/template_pyqt5.py
StSav012/pyqtgraph
65e17c4e3707eb3bd4d91cdc13504d9b150f4360
[ "MIT" ]
null
null
null
pyqtgraph/console/template_pyqt5.py
StSav012/pyqtgraph
65e17c4e3707eb3bd4d91cdc13504d9b150f4360
[ "MIT" ]
null
null
null
# Form implementation generated from reading ui file 'pyqtgraph/console/template.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form"...
53.973913
114
0.72241
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(739, 497) self.gridLayout = QtWidgets.QGridLayout(Form) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setSpacing(0) s...
true
true
f72ff2fe325c5f00daf0160abd5517c0408afd68
9,889
py
Python
helper/phillips_hue_wrapper.py
andrewtatham/enviroplus-python
213eee4ab7c72cafd4d5fc5a33eb24397b665822
[ "MIT" ]
null
null
null
helper/phillips_hue_wrapper.py
andrewtatham/enviroplus-python
213eee4ab7c72cafd4d5fc5a33eb24397b665822
[ "MIT" ]
null
null
null
helper/phillips_hue_wrapper.py
andrewtatham/enviroplus-python
213eee4ab7c72cafd4d5fc5a33eb24397b665822
[ "MIT" ]
null
null
null
import datetime import pprint import random import time from itertools import cycle from phue import Bridge from helper import colour_helper class HueWrapper(object): def __init__(self, bridge_ip='192.168.1.73', light_configs=None, profiles=None): if not light_configs: light_configs = [ ...
35.317857
116
0.522095
import datetime import pprint import random import time from itertools import cycle from phue import Bridge from helper import colour_helper class HueWrapper(object): def __init__(self, bridge_ip='192.168.1.73', light_configs=None, profiles=None): if not light_configs: light_configs = [ ...
true
true
f72ff313165970077760e6b80119c882d0e4e3b3
57,975
py
Python
openconcept/analysis/performance/solver_phases.py
kanekosh/openconcept
f4646d583ba1840540e648601c963adab13cdccf
[ "MIT" ]
null
null
null
openconcept/analysis/performance/solver_phases.py
kanekosh/openconcept
f4646d583ba1840540e648601c963adab13cdccf
[ "MIT" ]
1
2022-01-18T17:02:23.000Z
2022-01-19T19:33:34.000Z
openconcept/analysis/performance/solver_phases.py
eytanadler/openconcept
7878e5725eed78a023136b58250361531c7c7654
[ "MIT" ]
1
2021-11-13T22:40:31.000Z
2021-11-13T22:40:31.000Z
from __future__ import division from openmdao.api import Group, ExplicitComponent, IndepVarComp, BalanceComp, ImplicitComponent import openconcept.api as oc from openconcept.analysis.atmospherics.compute_atmos_props import ComputeAtmosphericProperties from openconcept.analysis.aerodynamics import Lift, StallSpeed from ...
47.952854
228
0.65185
from __future__ import division from openmdao.api import Group, ExplicitComponent, IndepVarComp, BalanceComp, ImplicitComponent import openconcept.api as oc from openconcept.analysis.atmospherics.compute_atmos_props import ComputeAtmosphericProperties from openconcept.analysis.aerodynamics import Lift, StallSpeed from ...
true
true
f72ff337bdeb94f68574412ce3e985fde8a68cf6
1,360
py
Python
edumate/settings/production.py
alfarhanzahedi/edumate
76ced0063d25431098babb1d163c95c9ddaf3307
[ "MIT" ]
1
2021-11-28T14:18:16.000Z
2021-11-28T14:18:16.000Z
edumate/settings/production.py
alfarhanzahedi/edumate
76ced0063d25431098babb1d163c95c9ddaf3307
[ "MIT" ]
1
2022-02-10T10:53:12.000Z
2022-02-10T10:53:12.000Z
edumate/settings/production.py
alfarhanzahedi/edumate
76ced0063d25431098babb1d163c95c9ddaf3307
[ "MIT" ]
null
null
null
from kombu.utils.url import safequote from .base import * # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.2/howto/static-files/ STATIC_ROOT = '/var/www/edumate/static/' STATIC_URL = '/static/' MEDIA_ROOT = '/var/www/edumate/media/' MEDIA_URL = '/media/' # Email # https://docs.django...
27.2
68
0.775735
from kombu.utils.url import safequote from .base import * STATIC_ROOT = '/var/www/edumate/static/' STATIC_URL = '/static/' MEDIA_ROOT = '/var/www/edumate/media/' MEDIA_URL = '/media/' EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = config('EMAIL_HOST') EMAIL_HOST_USER = config('EMAIL_HO...
true
true
f72ff53d421b318c306241599d6708aa4cc0e2a0
6,404
py
Python
test/functional/mempool_persist.py
minblock/Blackcoin
40cbf6c00d79b2d2d50b0645baa332fc8adc4ba3
[ "MIT" ]
null
null
null
test/functional/mempool_persist.py
minblock/Blackcoin
40cbf6c00d79b2d2d50b0645baa332fc8adc4ba3
[ "MIT" ]
null
null
null
test/functional/mempool_persist.py
minblock/Blackcoin
40cbf6c00d79b2d2d50b0645baa332fc8adc4ba3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test mempool persistence. By default, bitcoind will dump mempool on shutdown and then reload it on sta...
47.088235
207
0.698626
from decimal import Decimal import os import time from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error, wait_until class MempoolPersistTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 3 self.ext...
true
true
f72ff59bda1aa02358d87a57bd001b6bab504743
5,288
py
Python
sentence_transformers/models/Asym.py
arcada-uas/sentence-transformers
83ec2145dae858049ce38210860f0d75b4979927
[ "Apache-2.0" ]
null
null
null
sentence_transformers/models/Asym.py
arcada-uas/sentence-transformers
83ec2145dae858049ce38210860f0d75b4979927
[ "Apache-2.0" ]
null
null
null
sentence_transformers/models/Asym.py
arcada-uas/sentence-transformers
83ec2145dae858049ce38210860f0d75b4979927
[ "Apache-2.0" ]
null
null
null
from torch import Tensor from torch import nn from typing import List, Dict import os import json from ..util import import_from_string from collections import OrderedDict from typing import List, Dict, Optional, Union, Tuple class Asym(nn.Sequential): def __init__(self, sub_modules: Dict[str, List[nn.Module]], al...
42.99187
202
0.637103
from torch import Tensor from torch import nn from typing import List, Dict import os import json from ..util import import_from_string from collections import OrderedDict from typing import List, Dict, Optional, Union, Tuple class Asym(nn.Sequential): def __init__(self, sub_modules: Dict[str, List[nn.Module]], al...
true
true
f72ff810f29418ba62e98a1ce7f5672ac06ff9c2
1,005
py
Python
CI/create_release_notes.py
tdhooks/sarus
64d3152e810b1081e6dbe7b3587e8e5948c3268e
[ "BSD-3-Clause" ]
84
2019-04-30T17:35:14.000Z
2022-03-20T21:15:41.000Z
CI/create_release_notes.py
tdhooks/sarus
64d3152e810b1081e6dbe7b3587e8e5948c3268e
[ "BSD-3-Clause" ]
26
2019-11-07T19:24:36.000Z
2022-02-10T14:18:58.000Z
CI/create_release_notes.py
tdhooks/sarus
64d3152e810b1081e6dbe7b3587e8e5948c3268e
[ "BSD-3-Clause" ]
10
2019-05-24T02:20:02.000Z
2022-03-20T14:17:29.000Z
def create_release_notes(): import os path = os.path.dirname(os.path.abspath(__file__)) changelog_filename = os.path.join(path, "../CHANGELOG.md") release_notes_filename = os.path.join(path, "../RELEASE_NOTES.md") with open(changelog_filename, "r") as changelog: with open(release_notes_file...
31.40625
70
0.528358
def create_release_notes(): import os path = os.path.dirname(os.path.abspath(__file__)) changelog_filename = os.path.join(path, "../CHANGELOG.md") release_notes_filename = os.path.join(path, "../RELEASE_NOTES.md") with open(changelog_filename, "r") as changelog: with open(release_notes_file...
true
true
f72ff87bdabef8d7929fc9db97e276b84505f580
1,196
py
Python
zoomapi/components/chat_messages.py
zihuaweng/zoomapi
0bd9e57f1b2469b1071e8060feb772748882c175
[ "Apache-2.0" ]
null
null
null
zoomapi/components/chat_messages.py
zihuaweng/zoomapi
0bd9e57f1b2469b1071e8060feb772748882c175
[ "Apache-2.0" ]
null
null
null
zoomapi/components/chat_messages.py
zihuaweng/zoomapi
0bd9e57f1b2469b1071e8060feb772748882c175
[ "Apache-2.0" ]
null
null
null
"""Zoom.us REST API Python Client -- Chat Messages component""" from zoomapi.util import require_keys, Throttled from zoomapi.components import base class ChatMessagesComponentV2(base.BaseComponent): """Component dealing with all chat messages related matters""" @Throttled def list(self, **kwargs): ...
34.171429
111
0.669732
from zoomapi.util import require_keys, Throttled from zoomapi.components import base class ChatMessagesComponentV2(base.BaseComponent): @Throttled def list(self, **kwargs): require_keys(kwargs, "user_id") return self.get_request( "/chat/users/{}/messages".format(kwargs.get("user_i...
true
true
f72ff90f4cf8c111f5cfabc254f6f2eba07babf7
23,978
py
Python
pcdet/utils/loss_utils.py
jialeli1/From-Voxel-to-Point
b4dba9c4e9cd83e04199d9224f6ec7bf06b71f93
[ "Apache-2.0" ]
26
2021-07-14T10:55:14.000Z
2022-02-25T05:46:42.000Z
pcdet/utils/loss_utils.py
jialeli1/From-Voxel-to-Point
b4dba9c4e9cd83e04199d9224f6ec7bf06b71f93
[ "Apache-2.0" ]
2
2021-07-12T09:58:00.000Z
2021-12-14T13:04:47.000Z
pcdet/utils/loss_utils.py
jialeli1/From-Voxel-to-Point
b4dba9c4e9cd83e04199d9224f6ec7bf06b71f93
[ "Apache-2.0" ]
4
2021-08-22T16:41:35.000Z
2022-03-18T06:54:52.000Z
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from . import box_utils from . import center_utils try: from itertools import ifilterfalse except ImportError: # py3k from itertools import filterfalse as ifilterfalse class SigmoidFo...
35.418021
118
0.594378
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from . import box_utils from . import center_utils try: from itertools import ifilterfalse except ImportError: from itertools import filterfalse as ifilterfalse class SigmoidFocalClas...
true
true
f72ff95e1b300049408b355850be32b4312a414b
10,905
py
Python
wsd/graph_wsd_test_v1.py
Bharat-Runwal/path2vec
f99188b882752ff9aa2c87334979b75483940ae0
[ "Apache-2.0" ]
31
2018-08-19T22:34:53.000Z
2022-03-23T13:39:48.000Z
wsd/graph_wsd_test_v1.py
Bharat-Runwal/path2vec
f99188b882752ff9aa2c87334979b75483940ae0
[ "Apache-2.0" ]
21
2018-08-24T11:52:59.000Z
2021-01-30T18:39:47.000Z
wsd/graph_wsd_test_v1.py
Bharat-Runwal/path2vec
f99188b882752ff9aa2c87334979b75483940ae0
[ "Apache-2.0" ]
11
2018-08-20T05:34:06.000Z
2021-12-07T06:53:23.000Z
# -*- coding: utf-8 -*- """ Created on Mon May 7 17:13:25 2018 @author: dorgham """ import networkx as nx from nltk.corpus import wordnet as wn from nltk.corpus import wordnet_ic from nltk.stem import WordNetLemmatizer import matplotlib.pyplot as plt import xml.etree.ElementTree as ET from collections import Ordered...
40.239852
123
0.584411
import networkx as nx from nltk.corpus import wordnet as wn from nltk.corpus import wordnet_ic from nltk.stem import WordNetLemmatizer import matplotlib.pyplot as plt import xml.etree.ElementTree as ET from collections import OrderedDict import codecs import string from nltk.corpus import stopwords from sklearn.metric...
true
true
f72ffbe57a59f3600333518d118a3d3eda4b5c23
5,497
py
Python
python_src/mysetup.py
softmatterlab/DeepTrack-2.0-app
3bc661987cba53519ebefcc0b7221994a6e2d317
[ "MIT" ]
null
null
null
python_src/mysetup.py
softmatterlab/DeepTrack-2.0-app
3bc661987cba53519ebefcc0b7221994a6e2d317
[ "MIT" ]
6
2020-10-27T15:50:49.000Z
2021-10-19T14:37:47.000Z
python_src/mysetup.py
softmatterlab/DeepTrack-2.0-app
3bc661987cba53519ebefcc0b7221994a6e2d317
[ "MIT" ]
3
2020-10-16T11:04:42.000Z
2021-10-19T14:26:52.000Z
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Created by: python.exe -m py2exe myscript.py -W mysetup.py from distutils.core import setup import py2exe class Target(object): '''Target is the baseclass for all executables that are created. It defines properties that are shared by all of them. ''' def __...
32.720238
118
0.65272
from distutils.core import setup import py2exe class Target(object): def __init__(self, **kw): self.__dict__.update(kw) def copy(self): return Target(**self.__dict__) def _...
true
true
f72ffc1214ecd15928542a7ea9a9182e72d89e05
798
py
Python
create_tables.py
RammySekham/Creating-Cloud-Datawarehouse
62a92a225c3b59d0fed118453651159ccdf8ff38
[ "MIT" ]
null
null
null
create_tables.py
RammySekham/Creating-Cloud-Datawarehouse
62a92a225c3b59d0fed118453651159ccdf8ff38
[ "MIT" ]
null
null
null
create_tables.py
RammySekham/Creating-Cloud-Datawarehouse
62a92a225c3b59d0fed118453651159ccdf8ff38
[ "MIT" ]
null
null
null
import configparser import psycopg2 from sql_queries import create_table_queries, drop_table_queries def drop_tables(cur, conn): ''' Drop the existing tables ''' for query in drop_table_queries: cur.execute(query) conn.commit() def create_tables(cur, conn): ''' Crea...
19
112
0.631579
import configparser import psycopg2 from sql_queries import create_table_queries, drop_table_queries def drop_tables(cur, conn): for query in drop_table_queries: cur.execute(query) conn.commit() def create_tables(cur, conn): for query in create_table_queries: cur.execute(qu...
true
true
f72ffc4b88ea7b559670f1d9a1678141ddbe338d
4,559
py
Python
selfdrive/controls/lib/latcontrol_torque.py
salah608/OPENPILOT
be214b44947d2a52571b1031c25dde5d54a5fe10
[ "MIT" ]
1
2022-03-31T05:07:44.000Z
2022-03-31T05:07:44.000Z
selfdrive/controls/lib/latcontrol_torque.py
salah608/OPENPILOT
be214b44947d2a52571b1031c25dde5d54a5fe10
[ "MIT" ]
null
null
null
selfdrive/controls/lib/latcontrol_torque.py
salah608/OPENPILOT
be214b44947d2a52571b1031c25dde5d54a5fe10
[ "MIT" ]
1
2019-07-04T05:35:42.000Z
2019-07-04T05:35:42.000Z
import math from cereal import log from common.numpy_fast import interp from selfdrive.controls.lib.latcontrol import LatControl, MIN_STEER_SPEED from selfdrive.controls.lib.pid import PIDController from selfdrive.controls.lib.drive_helpers import apply_deadzone from selfdrive.controls.lib.vehicle_model import ACCELER...
47
129
0.733055
import math from cereal import log from common.numpy_fast import interp from selfdrive.controls.lib.latcontrol import LatControl, MIN_STEER_SPEED from selfdrive.controls.lib.pid import PIDController from selfdrive.controls.lib.drive_helpers import apply_deadzone from selfdrive.controls.lib.vehicle_model import ACCELER...
true
true
f72ffc7299c2bfe078237263c5c34c71dccfc1d9
250
py
Python
manage.py
muhiza/bestb
3c25db0b31c736a59e6a6623615da50a1ab5f196
[ "MIT" ]
110
2016-11-25T14:25:10.000Z
2022-02-16T08:25:57.000Z
manage.py
muhiza/bestb
3c25db0b31c736a59e6a6623615da50a1ab5f196
[ "MIT" ]
86
2016-11-13T10:04:07.000Z
2022-03-11T23:14:01.000Z
manage.py
muhiza/bestb
3c25db0b31c736a59e6a6623615da50a1ab5f196
[ "MIT" ]
21
2016-12-06T15:03:44.000Z
2021-12-30T11:38:19.000Z
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sciblog.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
22.727273
71
0.772
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sciblog.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
f72ffcc2bb7815a6350f846fc32861403f679efd
7
py
Python
tests/unit/conftest.py
bernease/whylogs-python
cfd2a2f71280537aae584cbd40a752fbe7da647b
[ "Apache-2.0" ]
null
null
null
tests/unit/conftest.py
bernease/whylogs-python
cfd2a2f71280537aae584cbd40a752fbe7da647b
[ "Apache-2.0" ]
null
null
null
tests/unit/conftest.py
bernease/whylogs-python
cfd2a2f71280537aae584cbd40a752fbe7da647b
[ "Apache-2.0" ]
null
null
null
#
7
7
0
true
true
f72ffd82aa9586a214a2d9cf5db0f17af8e80cc5
1,026
py
Python
tests/helpers.py
der-gabe/pynonymizer
3e53bb1f27c2446672f7c2794009354dc8d95ace
[ "MIT" ]
null
null
null
tests/helpers.py
der-gabe/pynonymizer
3e53bb1f27c2446672f7c2794009354dc8d95ace
[ "MIT" ]
null
null
null
tests/helpers.py
der-gabe/pynonymizer
3e53bb1f27c2446672f7c2794009354dc8d95ace
[ "MIT" ]
null
null
null
import re import pytest from contextlib import contextmanager class AnyObject: def __eq__(self, actual): return True def __ne__(self, other): return False class SuperdictOf: def __init__(self, required_dict): self.required_dict = required_dict def __eq__(self, actual): ...
21.375
64
0.665692
import re import pytest from contextlib import contextmanager class AnyObject: def __eq__(self, actual): return True def __ne__(self, other): return False class SuperdictOf: def __init__(self, required_dict): self.required_dict = required_dict def __eq__(self, actual): ...
true
true
f72ffe71d2e1e836e254e19dc8302d96f10fbef4
12,747
py
Python
Examples/Tests/PythonWrappers/PICMI_inputs_2d.py
oshapoval/WarpX
84d687da21ee93db67fdc43efec8a9cc80d0e6f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
Examples/Tests/PythonWrappers/PICMI_inputs_2d.py
oshapoval/WarpX
84d687da21ee93db67fdc43efec8a9cc80d0e6f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
Examples/Tests/PythonWrappers/PICMI_inputs_2d.py
oshapoval/WarpX
84d687da21ee93db67fdc43efec8a9cc80d0e6f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1.axes_divider import make_axes_locatable from pywarpx import picmi # Number of time steps max_steps = 100 # Grid nx = 128 nz = 128 # Domain xmin = 0.e-6 zmin = 0.e-6 xmax = 50.e-6 zmax = 50.e-6 # Cell size dx = (xmax - xmin) / nx dz = (z...
43.65411
117
0.607045
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1.axes_divider import make_axes_locatable from pywarpx import picmi max_steps = 100 nx = 128 nz = 128 xmin = 0.e-6 zmin = 0.e-6 xmax = 50.e-6 zmax = 50.e-6 dx = (xmax - xmin) / nx dz = (zmax - zmin) / nz max_grid_size_x = 64 max_grid_siz...
true
true
f72ffeac425776525d48f18b9e6845cf44684f3c
35,719
py
Python
Script/test.py
hlebars/YoutubeDataAnalysis
0845effcdfdf6ab3281adc25840ed090e47498c8
[ "MIT" ]
null
null
null
Script/test.py
hlebars/YoutubeDataAnalysis
0845effcdfdf6ab3281adc25840ed090e47498c8
[ "MIT" ]
null
null
null
Script/test.py
hlebars/YoutubeDataAnalysis
0845effcdfdf6ab3281adc25840ed090e47498c8
[ "MIT" ]
null
null
null
import pandas as pd import datetime import numpy as np import os import re import matplotlib.pyplot as plot import pytz # @timeit (repeat=3,number=10) def EclatedSubPlot(SerieAfterGrpBy,ActivatePlotting,ListOfDateAndTime,Abbreviation): DicoDayOfWeek={ "00":('Mon','Monday'), "01":('Tue','Tuesday'), "02":...
42.777246
213
0.625605
import pandas as pd import datetime import numpy as np import os import re import matplotlib.pyplot as plot import pytz def EclatedSubPlot(SerieAfterGrpBy,ActivatePlotting,ListOfDateAndTime,Abbreviation): DicoDayOfWeek={ "00":('Mon','Monday'), "01":('Tue','Tuesday'), "02":('Wed','Wednesday'), "03":('Thu...
true
true
f73000570bed55023fdcd7e0333417e05cb7f21a
297
py
Python
einops/__init__.py
ductm104/einops
a9e3f6b0d18e01e326f74bd9861288aff94e3b2c
[ "MIT" ]
2
2021-07-17T09:30:42.000Z
2021-12-10T07:42:21.000Z
einops/__init__.py
ductm104/einops
a9e3f6b0d18e01e326f74bd9861288aff94e3b2c
[ "MIT" ]
null
null
null
einops/__init__.py
ductm104/einops
a9e3f6b0d18e01e326f74bd9861288aff94e3b2c
[ "MIT" ]
null
null
null
__author__ = 'Alex Rogozhnikov' __version__ = '0.3.0' class EinopsError(RuntimeError): """ Runtime error thrown by einops """ pass __all__ = ['rearrange', 'reduce', 'repeat', 'parse_shape', 'asnumpy', 'EinopsError'] from .einops import rearrange, reduce, repeat, parse_shape, asnumpy
22.846154
84
0.703704
__author__ = 'Alex Rogozhnikov' __version__ = '0.3.0' class EinopsError(RuntimeError): pass __all__ = ['rearrange', 'reduce', 'repeat', 'parse_shape', 'asnumpy', 'EinopsError'] from .einops import rearrange, reduce, repeat, parse_shape, asnumpy
true
true
f730008035e6d577e29225eff7316628cc5ad753
68
py
Python
inference_converter/__init__.py
mzeynali/dl-model-converter
3adff16661254f29a4e9b2d76402ba9b064d3d97
[ "Apache-2.0" ]
null
null
null
inference_converter/__init__.py
mzeynali/dl-model-converter
3adff16661254f29a4e9b2d76402ba9b064d3d97
[ "Apache-2.0" ]
null
null
null
inference_converter/__init__.py
mzeynali/dl-model-converter
3adff16661254f29a4e9b2d76402ba9b064d3d97
[ "Apache-2.0" ]
null
null
null
import os import sys sys.path.append(os.path.dirname(__file__))
8.5
42
0.75
import os import sys sys.path.append(os.path.dirname(__file__))
true
true
f7300106c5722946f16c6d7a68325a64b58c05ce
787
py
Python
tests/test_convention.py
henhans/TBmodels
7424acaea8d91850d80bb48898af875430f25fa0
[ "Apache-2.0" ]
1
2021-01-18T13:55:40.000Z
2021-01-18T13:55:40.000Z
tests/test_convention.py
henhans/TBmodels
7424acaea8d91850d80bb48898af875430f25fa0
[ "Apache-2.0" ]
null
null
null
tests/test_convention.py
henhans/TBmodels
7424acaea8d91850d80bb48898af875430f25fa0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> import numpy as np import pythtb as pt import tbmodels as tb def test_compare_pythtb(): pt_model = pt.tb_model(1, 1, lat=[[1]], orb=[[0], [0.2]]) tb_model = ...
32.791667
91
0.655654
import numpy as np import pythtb as pt import tbmodels as tb def test_compare_pythtb(): pt_model = pt.tb_model(1, 1, lat=[[1]], orb=[[0], [0.2]]) tb_model = tb.Model(dim=1, pos=[[0], [0.2]], uc=[[1]]) pt_model.set_hop(3j, 0, 1, [1]) tb_model.add_hop(3j, 0, 1, [1]) assert np.isclose(pt_model._g...
true
true
f73001805276877dee1c73c528d58c9860590720
10,586
py
Python
google/cloud/aiplatform_v1/types/featurestore_online_service.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform_v1/types/featurestore_online_service.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform_v1/types/featurestore_online_service.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
40.250951
136
0.657472
import proto from google.cloud.aiplatform_v1.types import feature_selector as gca_feature_selector from google.cloud.aiplatform_v1.types import types from google.protobuf import timestamp_pb2 __protobuf__ = proto.module( package="google.cloud.aiplatform.v1", manifest={ "ReadFeatureValuesRequest", ...
true
true
f7300271abe53d1c530313d92118bc1bdad057e3
2,612
py
Python
ooni/report/cli.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
ooni/report/cli.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
ooni/report/cli.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
from __future__ import print_function import os import sys from ooni import canonical_bouncer from ooni.report import __version__ from ooni.report import tool from ooni.settings import config from twisted.python import usage class Options(usage.Options): synopsis = """%s [options] upload | status """ % (os.pa...
28.703297
74
0.561256
from __future__ import print_function import os import sys from ooni import canonical_bouncer from ooni.report import __version__ from ooni.report import tool from ooni.settings import config from twisted.python import usage class Options(usage.Options): synopsis = """%s [options] upload | status """ % (os.pa...
true
true
f7300289bf48754135726dad8a8c684a9ab7d495
14,855
py
Python
queryable_properties/managers.py
W1ldPo1nter/django-queryable-properties
9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1
[ "BSD-3-Clause" ]
36
2019-10-22T11:44:37.000Z
2022-03-15T21:27:03.000Z
queryable_properties/managers.py
W1ldPo1nter/django-queryable-properties
9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1
[ "BSD-3-Clause" ]
6
2020-10-03T15:13:26.000Z
2021-09-25T14:05:50.000Z
queryable_properties/managers.py
W1ldPo1nter/django-queryable-properties
9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1
[ "BSD-3-Clause" ]
3
2021-04-26T08:30:46.000Z
2021-08-18T09:04:49.000Z
# encoding: utf-8 from __future__ import unicode_literals import six from django.db.models import Manager from django.db.models.query import QuerySet from .compat import (ANNOTATION_SELECT_CACHE_NAME, ANNOTATION_TO_AGGREGATE_ATTRIBUTES_MAP, chain_query, chain_queryset, ModelIterable, ValuesQuery...
51.401384
120
0.671289
from __future__ import unicode_literals import six from django.db.models import Manager from django.db.models.query import QuerySet from .compat import (ANNOTATION_SELECT_CACHE_NAME, ANNOTATION_TO_AGGREGATE_ATTRIBUTES_MAP, chain_query, chain_queryset, ModelIterable, ValuesQuerySet) from .excepti...
true
true
f73002d98b59c3477dc664163095a60c163f8748
1,765
py
Python
scripts/postprocess_score.py
sumanthd17/indicTrans
e78ab48d33ffaa51af818e28226b281aae495994
[ "MIT" ]
null
null
null
scripts/postprocess_score.py
sumanthd17/indicTrans
e78ab48d33ffaa51af818e28226b281aae495994
[ "MIT" ]
null
null
null
scripts/postprocess_score.py
sumanthd17/indicTrans
e78ab48d33ffaa51af818e28226b281aae495994
[ "MIT" ]
null
null
null
import sys def postprocess( infname, outfname, input_size ): """ parse fairseq interactive output, convert script back to native Indic script (in case of Indic languages) and detokenize. infname: fairseq log file outfname: output file of translation (sentences not translated contain the dummy stri...
36.020408
125
0.626629
import sys def postprocess( infname, outfname, input_size ): consolidated_testoutput = [] consolidated_testoutput = [(x, 0.0, "") for x in range(input_size)] temp_testoutput = [] with open(infname, "r", encoding="utf-8") as infile: temp_testoutput = list( map( ...
true
true
f730037de960ab141d2243d99c48b409e7c12847
424
py
Python
services/datalad/tests/test_validator.py
build3/openneuro
ae8f6edbab243703b38cefd729629c1741eb3839
[ "MIT" ]
null
null
null
services/datalad/tests/test_validator.py
build3/openneuro
ae8f6edbab243703b38cefd729629c1741eb3839
[ "MIT" ]
1
2020-09-25T11:06:37.000Z
2020-09-25T11:06:37.000Z
services/datalad/tests/test_validator.py
adswa/openneuro
64e7fdbeb8b3c567c340b80f22a6134e4ee8070a
[ "MIT" ]
null
null
null
import json from .dataset_fixtures import * from datalad_service.tasks.validator import validate_dataset_sync def test_validator(new_dataset): results = validate_dataset_sync(new_dataset.path, 'HEAD') # new_dataset doesn't pass validation, should return an error assert 'issues' in results assert 'err...
32.615385
77
0.757075
import json from .dataset_fixtures import * from datalad_service.tasks.validator import validate_dataset_sync def test_validator(new_dataset): results = validate_dataset_sync(new_dataset.path, 'HEAD') assert 'issues' in results assert 'errors' in results['issues'] assert results['issues']['errors...
true
true
f73003dbae406346ceffaad933d70e33d38fff14
190
py
Python
cride/circles/apps.py
jpcano1/cride-platzi
6548b5a4c42c2acc9c888f93d5479be9c8b7e6d7
[ "MIT" ]
null
null
null
cride/circles/apps.py
jpcano1/cride-platzi
6548b5a4c42c2acc9c888f93d5479be9c8b7e6d7
[ "MIT" ]
null
null
null
cride/circles/apps.py
jpcano1/cride-platzi
6548b5a4c42c2acc9c888f93d5479be9c8b7e6d7
[ "MIT" ]
null
null
null
""" Circles app """ # Django from django.apps import AppConfig class CirclesAppConfig(AppConfig): """ Circles app config. """ name = 'cride.circles' verbose_name = 'Circles'
15.833333
34
0.663158
from django.apps import AppConfig class CirclesAppConfig(AppConfig): name = 'cride.circles' verbose_name = 'Circles'
true
true
f730044e72d0f566ba1c776e68f1ecc503b9cd45
7,888
py
Python
modules/mdebugger/attachment_marker/motionsense.py
MD2Korg/CerebralCortex-DataAnalysis
73f5ea2430bc7c23de422dccb7b65ef9f8917595
[ "BSD-2-Clause" ]
1
2018-04-24T18:11:24.000Z
2018-04-24T18:11:24.000Z
modules/mdebugger/attachment_marker/motionsense.py
Boris69bg/CerebralCortex-DataAnalysis
49565bdff348d69153bd5d3a37e73f1645f82b32
[ "BSD-2-Clause" ]
10
2018-03-13T19:04:09.000Z
2018-05-12T01:40:03.000Z
modules/mdebugger/attachment_marker/motionsense.py
Boris69bg/CerebralCortex-DataAnalysis
49565bdff348d69153bd5d3a37e73f1645f82b32
[ "BSD-2-Clause" ]
42
2017-12-07T17:08:14.000Z
2019-06-02T08:25:12.000Z
# Copyright (c) 2017, MD2K Center of Excellence # - Nasir Ali <nasir.ali08@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above cop...
54.4
132
0.676344
import uuid from collections import OrderedDict from cerebralcortex.cerebralcortex import CerebralCortex from modules.mdebugger.post_processing import get_execution_context, get_annotations from modules.mdebugger.post_processing import store from modules.mdebugger.util import get_stream_days from modules.mdebugger.ut...
true
true
f73004f4a82f8a65d0815fa2c8179029a64348c3
17,171
py
Python
aiida/backends/tests/backup_script.py
joepvd/aiida_core
6e9711046753332933f982971db1d7ac7e7ade58
[ "BSD-2-Clause" ]
null
null
null
aiida/backends/tests/backup_script.py
joepvd/aiida_core
6e9711046753332933f982971db1d7ac7e7ade58
[ "BSD-2-Clause" ]
null
null
null
aiida/backends/tests/backup_script.py
joepvd/aiida_core
6e9711046753332933f982971db1d7ac7e7ade58
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
42.502475
108
0.632695
from __future__ import division from __future__ import print_function from __future__ import absolute_import import datetime import importlib import shutil import sys import tempfile from dateutil.parser import parse from aiida.backends.utils import is_dbenv_loaded, load_dbenv, BACKEND_SQLA, BACKEND_DJANGO from aiida...
true
true
f73005b31846f4a78636353fe91ff4e0db98bd66
221
pyde
Python
sketch_17/sketch_17.pyde
Minindosyan/2019-fall-polytech-cs
f022362e4bf6d69d623d3212df9b038f7abf5790
[ "MIT" ]
null
null
null
sketch_17/sketch_17.pyde
Minindosyan/2019-fall-polytech-cs
f022362e4bf6d69d623d3212df9b038f7abf5790
[ "MIT" ]
null
null
null
sketch_17/sketch_17.pyde
Minindosyan/2019-fall-polytech-cs
f022362e4bf6d69d623d3212df9b038f7abf5790
[ "MIT" ]
null
null
null
def setup(): size(500,500) smooth() background(235) strokeWeight(30) noLoop() def draw(): for i in range(1,8): stroke(20) line(i*50,200,150+(i-1)*50,300)
17
40
0.475113
def setup(): size(500,500) smooth() background(235) strokeWeight(30) noLoop() def draw(): for i in range(1,8): stroke(20) line(i*50,200,150+(i-1)*50,300)
true
true
f73005c3d0ecb0b6aa0d1b17a014e3ce2b1283cd
2,751
py
Python
task_manager/tasks/migrations/0001_initial.py
Ritesh-Aggarwal/Task-Manager-Django
b8f8df10b0b0a9cc9cd27346a0b5d4d5892d2f24
[ "MIT" ]
null
null
null
task_manager/tasks/migrations/0001_initial.py
Ritesh-Aggarwal/Task-Manager-Django
b8f8df10b0b0a9cc9cd27346a0b5d4d5892d2f24
[ "MIT" ]
null
null
null
task_manager/tasks/migrations/0001_initial.py
Ritesh-Aggarwal/Task-Manager-Django
b8f8df10b0b0a9cc9cd27346a0b5d4d5892d2f24
[ "MIT" ]
null
null
null
# Generated by Django 3.2.12 on 2022-03-04 13:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import tasks.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_M...
51.90566
206
0.616503
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import tasks.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migratio...
true
true
f73006eb526b889195551e800d11eb06f680327c
5,986
py
Python
adb/windows/platform-tools/systrace/catapult/telemetry/telemetry/internal/platform/linux_based_platform_backend.py
llaske/sugarizer-deployment-tool-desktop
34df1a56b68b15b6771671f87ab66586d60c514a
[ "Apache-2.0" ]
1
2019-01-17T19:03:17.000Z
2019-01-17T19:03:17.000Z
adb/MACOS/platform-tools/systrace/catapult/telemetry/telemetry/internal/platform/linux_based_platform_backend.py
llaske/sugarizer-deployment-tool-desktop
34df1a56b68b15b6771671f87ab66586d60c514a
[ "Apache-2.0" ]
2
2017-09-08T20:26:05.000Z
2017-09-08T20:29:07.000Z
adb/windows/platform-tools/systrace/catapult/telemetry/telemetry/internal/platform/linux_based_platform_backend.py
llaske/sugarizer-deployment-tool-desktop
34df1a56b68b15b6771671f87ab66586d60c514a
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. try: import resource # pylint: disable=import-error except ImportError: resource = None # Not available on all platforms import re from telemetry.cor...
34.011364
86
0.683762
try: import resource except ImportError: resource = None import re from telemetry.core import exceptions from telemetry import decorators from telemetry.internal.platform import platform_backend class LinuxBasedPlatformBackend(platform_backend.PlatformBackend): def GetSystemCommitCharge(self): memi...
true
true
f73008d4776542c97030787b5e4f290a43754608
267
py
Python
devel/test_wv.py
binnietom/py21cmmc_wv-1
2d5405700c1d99bd5f22c762999aea89d1ca1c23
[ "MIT" ]
null
null
null
devel/test_wv.py
binnietom/py21cmmc_wv-1
2d5405700c1d99bd5f22c762999aea89d1ca1c23
[ "MIT" ]
null
null
null
devel/test_wv.py
binnietom/py21cmmc_wv-1
2d5405700c1d99bd5f22c762999aea89d1ca1c23
[ "MIT" ]
1
2022-03-04T16:21:16.000Z
2022-03-04T16:21:16.000Z
from py21cmmc_wv import morlet import numpy as np bw = 50.0 numin = 130.0 N = 736 nu = np.arange(N) * bw/N + numin mid = (nu[0] + nu[-1])/2 spectrum = np.exp(-(nu-mid)**2/ (2*4.0**2)) trnsc, fc, _ = morlet.morlet_transform_c(spectrum, nu) trnsc = np.abs(trnsc)**2
19.071429
54
0.636704
from py21cmmc_wv import morlet import numpy as np bw = 50.0 numin = 130.0 N = 736 nu = np.arange(N) * bw/N + numin mid = (nu[0] + nu[-1])/2 spectrum = np.exp(-(nu-mid)**2/ (2*4.0**2)) trnsc, fc, _ = morlet.morlet_transform_c(spectrum, nu) trnsc = np.abs(trnsc)**2
true
true
f7300951a7ef4c3c8387293955d5b336a64a4701
151,815
py
Python
zerver/tests/test_events.py
Spian91/zulip
2893b98ef8ba44f91966a2455a49ed8bd86e0b7b
[ "Apache-2.0" ]
null
null
null
zerver/tests/test_events.py
Spian91/zulip
2893b98ef8ba44f91966a2455a49ed8bd86e0b7b
[ "Apache-2.0" ]
null
null
null
zerver/tests/test_events.py
Spian91/zulip
2893b98ef8ba44f91966a2455a49ed8bd86e0b7b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # See https://zulip.readthedocs.io/en/latest/subsystems/events-system.html for # high-level documentation on how this system works. from typing import Any, Callable, Dict, List, Optional, Set, Tuple import copy import os import shutil import sys from django.conf import settings from django.http...
41.856907
200
0.58101
from typing import Any, Callable, Dict, List, Optional, Set, Tuple import copy import os import shutil import sys from django.conf import settings from django.http import HttpRequest, HttpResponse from django.utils.timezone import now as timezone_now from io import StringIO from zerver.models import ( get_client,...
true
true
f730098e8822814319a07f20bdedf1174871a9d9
674
py
Python
setup.py
akuhnregnier/jupyter-notebook-tools
c0afc5769d5f53b36fdd0fee976126a2587dfb35
[ "Apache-2.0" ]
null
null
null
setup.py
akuhnregnier/jupyter-notebook-tools
c0afc5769d5f53b36fdd0fee976126a2587dfb35
[ "Apache-2.0" ]
null
null
null
setup.py
akuhnregnier/jupyter-notebook-tools
c0afc5769d5f53b36fdd0fee976126a2587dfb35
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import find_packages, setup NAME = "jupyter-notebook-tools" with open("README.md", "r") as f: readme = f.read() setup( name=NAME, url=f"https://github.com/akuhnregnier/{NAME}", author="Alexander Kuhn-Regnier", author_email="ahf.kuhnregnier@gmail.com", ...
25.923077
78
0.667656
from setuptools import find_packages, setup NAME = "jupyter-notebook-tools" with open("README.md", "r") as f: readme = f.read() setup( name=NAME, url=f"https://github.com/akuhnregnier/{NAME}", author="Alexander Kuhn-Regnier", author_email="ahf.kuhnregnier@gmail.com", long_description=readme,...
true
true
f7300a2ffabcd3bc05da38c7d5de492b1f25e72f
901
py
Python
project/product/views.py
steetstyle/Django-Ecommerce-API
89c2c973e560346a5be74019709dc9a9f8ab7b2a
[ "MIT" ]
null
null
null
project/product/views.py
steetstyle/Django-Ecommerce-API
89c2c973e560346a5be74019709dc9a9f8ab7b2a
[ "MIT" ]
null
null
null
project/product/views.py
steetstyle/Django-Ecommerce-API
89c2c973e560346a5be74019709dc9a9f8ab7b2a
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework import viewsets from .models import Product from .serializers import ProductSerializer from core.permissions import MarketOwnerPermission from rest_framework.permissions import IsAuthenticated, AllowAny from rest_framework import filters class ProductViewSet(vi...
34.653846
78
0.746948
from django.shortcuts import render from rest_framework import viewsets from .models import Product from .serializers import ProductSerializer from core.permissions import MarketOwnerPermission from rest_framework.permissions import IsAuthenticated, AllowAny from rest_framework import filters class ProductViewSet(vi...
true
true
f7300b19d159e1cd832307bc71cecb184c4499e1
48,458
py
Python
tests/unit/gapic/videointelligence_v1p2beta1/test_video_intelligence_service.py
renovate-bot/python-videointelligence
8a7920066cffa98c5a98d451a6a924fa82281544
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/videointelligence_v1p2beta1/test_video_intelligence_service.py
renovate-bot/python-videointelligence
8a7920066cffa98c5a98d451a6a924fa82281544
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/videointelligence_v1p2beta1/test_video_intelligence_service.py
renovate-bot/python-videointelligence
8a7920066cffa98c5a98d451a6a924fa82281544
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
37.769291
154
0.694725
import os import mock import grpc from grpc.experimental import aio import math import pytest from proto.marshal.rules.dates import DurationRule, TimestampRule from google.api_core import client_options from google.api_core import exceptions as core_exceptions from google.api_core import future from google.api_core ...
true
true