hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08f2e587366982f39e938f03e3679578c07c4119
1,150
py
Python
test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py
msyyc/autorest.python
91aa86f51d5c43c10ead5d51ac102618d23e3a21
[ "MIT" ]
null
null
null
test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py
msyyc/autorest.python
91aa86f51d5c43c10ead5d51ac102618d23e3a21
[ "MIT" ]
null
null
null
test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py
msyyc/autorest.python
91aa86f51d5c43c10ead5d51ac102618d23e3a21
[ "MIT" ]
1
2022-03-28T08:58:03.000Z
2022-03-28T08:58:03.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
30.263158
94
0.630435
from setuptools import setup, find_packages NAME = "autorestswaggerbatxmlservice" VERSION = "0.1.0" REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.1"] setup( name=NAME, version=VERSION, description="AutoRestSwaggerBATXMLService", author_email="", url="", keywords=["Swagger", "AutoRe...
true
true
08f2e598b450307068d61992dc6ba597ce37174c
768
gyp
Python
o3d/build/o3d_in_chrome.gyp
rwatson/chromium-capsicum
b03da8e897f897c6ad2cda03ceda217b760fd528
[ "BSD-3-Clause" ]
11
2015-03-20T04:08:08.000Z
2021-11-15T15:51:36.000Z
o3d/build/o3d_in_chrome.gyp
rwatson/chromium-capsicum
b03da8e897f897c6ad2cda03ceda217b760fd528
[ "BSD-3-Clause" ]
null
null
null
o3d/build/o3d_in_chrome.gyp
rwatson/chromium-capsicum
b03da8e897f897c6ad2cda03ceda217b760fd528
[ "BSD-3-Clause" ]
1
2020-04-13T05:45:10.000Z
2020-04-13T05:45:10.000Z
# Copyright (c) 2009 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. { 'includes': [ 'common.gypi', ], 'targets': [ # Depend on this target to set the O3D_IN_CHROME macro. This also works for # indirectly...
25.6
79
0.544271
{ 'includes': [ 'common.gypi', ], 'targets': [ { 'target_name': 'o3d_in_chrome', 'type': 'none', 'conditions': [ ['o3d_in_chrome == "True"', { 'all_dependent_settings': { 'defines': [ 'O3D_IN_CHROME', ...
true
true
08f2e63d232986ecf27002665dfd5ab5a135d231
2,815
py
Python
python/nluflows/mapping/bp/service_catalog_mapper.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
python/nluflows/mapping/bp/service_catalog_mapper.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
python/nluflows/mapping/bp/service_catalog_mapper.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- from base import BaseObject class ServiceCatalogMapper(BaseObject): """ Perform Service Catalog Mapping """ def __init__(self, some_tags: list, is_debug: bool = False): """ Updated: 21-Jun-20...
31.277778
85
0.550266
from base import BaseObject class ServiceCatalogMapper(BaseObject): def __init__(self, some_tags: list, is_debug: bool = False): BaseObject.__init__(self, __name__) self.is_debug = is_debug self.tags = [x.lower().strip() for x in some_tags ...
true
true
08f2e65efcc57c4027ce3d949ab781aa1ee15637
9,423
py
Python
dcnn.py
mwilliammyers/dcnn
ab5e30fc2fdb80781459608a6c452334414756d0
[ "MIT" ]
2
2019-06-27T04:39:30.000Z
2019-09-10T06:19:28.000Z
dcnn.py
mwilliammyers/dcnn
ab5e30fc2fdb80781459608a6c452334414756d0
[ "MIT" ]
null
null
null
dcnn.py
mwilliammyers/dcnn
ab5e30fc2fdb80781459608a6c452334414756d0
[ "MIT" ]
3
2018-06-05T08:56:29.000Z
2019-10-30T21:48:10.000Z
import time import timeit import numpy as np import dataloader import models import torch import tqdm from tensorboardX import SummaryWriter def get_arguments(): import argparse model_choices = ['dcnn', 'mlp'] non_linearity_choices = ['tanh', 'relu', 'leaky-relu'] optim_choices = ['adagrad', 'adadelt...
34.265455
118
0.601613
import time import timeit import numpy as np import dataloader import models import torch import tqdm from tensorboardX import SummaryWriter def get_arguments(): import argparse model_choices = ['dcnn', 'mlp'] non_linearity_choices = ['tanh', 'relu', 'leaky-relu'] optim_choices = ['adagrad', 'adadelt...
true
true
08f2e6b6d472d61fd52853278e57e068e01da474
265
py
Python
vmraid/chat/doctype/chat_token/chat_token.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
vmraid/chat/doctype/chat_token/chat_token.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
vmraid/chat/doctype/chat_token/chat_token.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2018, VMRaid Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import vmraid from vmraid.model.document import Document class ChatToken(Document): pass
24.090909
58
0.784906
from __future__ import unicode_literals import vmraid from vmraid.model.document import Document class ChatToken(Document): pass
true
true
08f2e7264a32cd15f39aa82b1d74edd0b5188324
41,919
py
Python
client/verta/verta/_dataset.py
siriuslee/modeldb
25e8354e126f2ddeb99ff76bb8136544b65dd581
[ "Apache-2.0" ]
null
null
null
client/verta/verta/_dataset.py
siriuslee/modeldb
25e8354e126f2ddeb99ff76bb8136544b65dd581
[ "Apache-2.0" ]
null
null
null
client/verta/verta/_dataset.py
siriuslee/modeldb
25e8354e126f2ddeb99ff76bb8136544b65dd581
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function import hashlib import os import time import warnings import requests try: from google.cloud import bigquery except ImportError: # BigQuery not installed bigquery = None try: import boto3 except ImportError: # Boto 3 not installed boto3...
43.126543
174
0.607314
from __future__ import print_function import hashlib import os import time import warnings import requests try: from google.cloud import bigquery except ImportError: bigquery = None try: import boto3 except ImportError: boto3 = None from ._protos.public.common import CommonService_pb2 as _Common...
true
true
08f2e7cc4cdd6f486fc1c7a2813956307bcd8592
9,048
py
Python
api/tests/opentrons/protocol_runner/test_pre_analysis.py
y3rsh/opentrons
b446567910db218030fef40396ab2255cc074bba
[ "Apache-2.0" ]
235
2017-10-27T20:37:27.000Z
2022-03-30T14:09:49.000Z
api/tests/opentrons/protocol_runner/test_pre_analysis.py
y3rsh/opentrons
b446567910db218030fef40396ab2255cc074bba
[ "Apache-2.0" ]
8,425
2017-10-26T15:25:43.000Z
2022-03-31T23:54:26.000Z
api/tests/opentrons/protocol_runner/test_pre_analysis.py
y3rsh/opentrons
b446567910db218030fef40396ab2255cc074bba
[ "Apache-2.0" ]
130
2017-11-09T21:02:37.000Z
2022-03-15T18:01:24.000Z
"""Tests for the opentrons.protocol_runner.pre_analysis module.""" import pytest from contextlib import contextmanager from dataclasses import dataclass from json import dumps as json_dumps from pathlib import Path from textwrap import dedent from typing import IO, Iterator from typing_extensions import Literal from o...
33.142857
88
0.64832
import pytest from contextlib import contextmanager from dataclasses import dataclass from json import dumps as json_dumps from pathlib import Path from textwrap import dedent from typing import IO, Iterator from typing_extensions import Literal from opentrons.protocols.api_support.types import APIVersion from opentro...
true
true
08f2e8366d90e5892ec2b788f9130d3231ff7919
15,465
py
Python
ansible/venv/lib/python2.7/site-packages/ansible/modules/network/icx/icx_copy.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/network/icx/icx_copy.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/network/icx/icx_copy.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
41.350267
158
0.555189
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = """ --- module: icx_copy version_added: "2.9" author: "Ruckus Wireless (@Co...
true
true
08f2e968bbce8002f61666363b3fe16112aeadea
669
py
Python
var/spack/repos/builtin/packages/r-rstantools/package.py
RemoteConnectionManager/spack
f2967b6c16effd26ce007cf86cadbb645c574f50
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2020-10-15T01:08:42.000Z
2021-10-18T01:28:18.000Z
var/spack/repos/builtin/packages/r-rstantools/package.py
RemoteConnectionManager/spack
f2967b6c16effd26ce007cf86cadbb645c574f50
[ "ECL-2.0", "Apache-2.0", "MIT" ]
17
2018-09-20T18:32:50.000Z
2019-12-04T16:58:12.000Z
var/spack/repos/builtin/packages/r-rstantools/package.py
RemoteConnectionManager/spack
f2967b6c16effd26ce007cf86cadbb645c574f50
[ "ECL-2.0", "Apache-2.0", "MIT" ]
5
2019-07-30T09:42:14.000Z
2021-01-25T05:39:20.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RRstantools(RPackage): """rstantools: Tools for Developing R Packages Interfacing with 'St...
35.210526
95
0.736921
from spack import * class RRstantools(RPackage): homepage = "http://discourse.mc-stan.org/" url = "https://cloud.r-project.org/src/contrib/rstantools_1.5.1.tar.gz" list_url = "https://cloud.r-project.org/src/contrib/Archive/rstantools" version('1.5.1', sha256='5cab16c132c12e84bd08e18cd6ef25ba3...
true
true
08f2eae50cd30389486080a9b493e93ddbc3de9e
7,334
py
Python
dgp/dgp/hgp/PoE.py
nick-terry/Splitting-GP
efd886f6442f096833460cf8cd28ff3e18da732a
[ "MIT" ]
1
2021-12-24T09:10:03.000Z
2021-12-24T09:10:03.000Z
dgp/dgp/hgp/PoE.py
nick-terry/Splitting-GP
efd886f6442f096833460cf8cd28ff3e18da732a
[ "MIT" ]
null
null
null
dgp/dgp/hgp/PoE.py
nick-terry/Splitting-GP
efd886f6442f096833460cf8cd28ff3e18da732a
[ "MIT" ]
null
null
null
import pdb from random import shuffle from multiprocessing import Pool, cpu_count import numpy as np from scipy import linalg, optimize import cov from GP import GP, GP_NLML_wrapper, GP_predict_wrapper from DataSet import DataSet from hgp import gPoE class PoE(GP): def __init__(self,X,y,cov_type='covSEard', ...
32.887892
83
0.53027
import pdb from random import shuffle from multiprocessing import Pool, cpu_count import numpy as np from scipy import linalg, optimize import cov from GP import GP, GP_NLML_wrapper, GP_predict_wrapper from DataSet import DataSet from hgp import gPoE class PoE(GP): def __init__(self,X,y,cov_type='covSEard', ...
true
true
08f2eba7b0e2fb6569b095299c8a82e39bce1aa0
337
py
Python
learning/urls.py
CiganOliviu/MyWorkflow
85951c2e8ebdb3e970fcc0b3e24bd319360b852a
[ "Apache-2.0" ]
null
null
null
learning/urls.py
CiganOliviu/MyWorkflow
85951c2e8ebdb3e970fcc0b3e24bd319360b852a
[ "Apache-2.0" ]
null
null
null
learning/urls.py
CiganOliviu/MyWorkflow
85951c2e8ebdb3e970fcc0b3e24bd319360b852a
[ "Apache-2.0" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('restapi/current-reading-books/', views.CurrentReadingBooksLister.as_view(), name='CurrentReadingBooksLister'), path('restapi/current-reading-books/<int:pk>', views.CurrentReadingBooksDetails.as_view(), name='CurrentReading...
37.444444
94
0.738872
from django.urls import path from . import views urlpatterns = [ path('restapi/current-reading-books/', views.CurrentReadingBooksLister.as_view(), name='CurrentReadingBooksLister'), path('restapi/current-reading-books/<int:pk>', views.CurrentReadingBooksDetails.as_view(), name='CurrentReading...
true
true
08f2ec5322d1fbcb812a2f68308907de55b154e2
1,928
py
Python
tests/createsuperuser/tests.py
bpeschier/django
f54c0ec06e390dc5bce95fdccbcb51d6423da4f9
[ "BSD-3-Clause" ]
3
2015-09-26T13:33:07.000Z
2020-03-08T07:34:38.000Z
tests/createsuperuser/tests.py
bpeschier/django
f54c0ec06e390dc5bce95fdccbcb51d6423da4f9
[ "BSD-3-Clause" ]
1
2021-03-24T12:21:05.000Z
2021-03-24T12:31:52.000Z
tests/createsuperuser/tests.py
bpeschier/django
f54c0ec06e390dc5bce95fdccbcb51d6423da4f9
[ "BSD-3-Clause" ]
15
2016-01-08T14:28:41.000Z
2019-04-19T08:33:31.000Z
from django.contrib.auth import models from django.contrib.auth.management.commands import changepassword from django.core.management import call_command from django.test import TestCase from django.utils.six import StringIO class MultiDBChangepasswordManagementCommandTestCase(TestCase): multi_db = True def ...
35.703704
122
0.69139
from django.contrib.auth import models from django.contrib.auth.management.commands import changepassword from django.core.management import call_command from django.test import TestCase from django.utils.six import StringIO class MultiDBChangepasswordManagementCommandTestCase(TestCase): multi_db = True def ...
true
true
08f2ecd2cf4881f8d121432df0fb35ecbe949950
1,673
py
Python
nuplan/planning/utils/multithreading/test/test_splitter.py
MCZhi/nuplan-devkit
3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c
[ "Apache-2.0" ]
null
null
null
nuplan/planning/utils/multithreading/test/test_splitter.py
MCZhi/nuplan-devkit
3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c
[ "Apache-2.0" ]
null
null
null
nuplan/planning/utils/multithreading/test/test_splitter.py
MCZhi/nuplan-devkit
3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c
[ "Apache-2.0" ]
null
null
null
import unittest from typing import Any, List import numpy as np from nuplan.planning.utils.multithreading.spliter import chunk_list class TestChunkSplitter(unittest.TestCase): """ Unittest class for splitters to chunks """ def validate_chunks(self, chunks: List[List[Any]]) -> None: self.assertTrue(a...
37.177778
103
0.663479
import unittest from typing import Any, List import numpy as np from nuplan.planning.utils.multithreading.spliter import chunk_list class TestChunkSplitter(unittest.TestCase): def validate_chunks(self, chunks: List[List[Any]]) -> None: self.assertTrue(all([len(chunk) > 0 for chunk in chunks])) def ...
true
true
08f2ecebcb1d5ea21ab6f9b8af9f2aa33c3d9e93
1,137
py
Python
data/__init__.py
s183983/MeshCNN_sparse
6515296cab274b5b7b1ad651783c73647ed8a7f4
[ "MIT" ]
null
null
null
data/__init__.py
s183983/MeshCNN_sparse
6515296cab274b5b7b1ad651783c73647ed8a7f4
[ "MIT" ]
null
null
null
data/__init__.py
s183983/MeshCNN_sparse
6515296cab274b5b7b1ad651783c73647ed8a7f4
[ "MIT" ]
null
null
null
import torch.utils.data from data.base_dataset import collate_fn def CreateDataset(opt): """loads dataset class""" if opt.dataset_mode == 'segmentation': from data.segmentation_data import SegmentationData dataset = SegmentationData(opt) elif opt.dataset_mode == 'classification': f...
29.921053
63
0.665787
import torch.utils.data from data.base_dataset import collate_fn def CreateDataset(opt): if opt.dataset_mode == 'segmentation': from data.segmentation_data import SegmentationData dataset = SegmentationData(opt) elif opt.dataset_mode == 'classification': from data.classification_data i...
true
true
08f2edbe6d12dabfefc9a15f2e62e92d8559535d
948
py
Python
reciprocalspaceship/dtypes/intensity.py
Hekstra-Lab/reciprocalspaceship
48b72ad70608fdbdfef31f6b38aac5873abc0dba
[ "MIT" ]
22
2020-07-10T18:13:10.000Z
2022-03-04T16:51:00.000Z
reciprocalspaceship/dtypes/intensity.py
Hekstra-Lab/reciprocalspaceship
48b72ad70608fdbdfef31f6b38aac5873abc0dba
[ "MIT" ]
109
2020-07-03T10:07:18.000Z
2022-03-28T20:49:48.000Z
reciprocalspaceship/dtypes/intensity.py
Hekstra-Lab/reciprocalspaceship
48b72ad70608fdbdfef31f6b38aac5873abc0dba
[ "MIT" ]
10
2020-07-03T10:51:21.000Z
2021-08-23T19:05:24.000Z
from pandas.core.dtypes.dtypes import register_extension_dtype from reciprocalspaceship.dtypes.base import MTZFloat32Dtype, MTZFloatArray @register_extension_dtype class IntensityDtype(MTZFloat32Dtype): """Dtype for Intensity data in reflection tables""" name = "Intensity" mtztype = "J" @classmetho...
22.571429
74
0.742616
from pandas.core.dtypes.dtypes import register_extension_dtype from reciprocalspaceship.dtypes.base import MTZFloat32Dtype, MTZFloatArray @register_extension_dtype class IntensityDtype(MTZFloat32Dtype): name = "Intensity" mtztype = "J" @classmethod def construct_array_type(cls): return Inte...
true
true
08f2edc47460ae248ec0cc923722cd4682934be3
1,319
py
Python
ml/php_response.py
saharshy29/altML
3c107af1c3b0416e7d78d612ac8254ccfdb1cc7a
[ "MIT" ]
5
2020-07-31T15:01:03.000Z
2020-08-16T12:38:02.000Z
ml/php_response.py
saharshxyz/altML
3c107af1c3b0416e7d78d612ac8254ccfdb1cc7a
[ "MIT" ]
11
2020-07-30T22:49:46.000Z
2020-08-06T22:53:54.000Z
ml/php_response.py
saharshxyz/altML
3c107af1c3b0416e7d78d612ac8254ccfdb1cc7a
[ "MIT" ]
2
2020-11-19T05:56:53.000Z
2020-11-19T05:57:49.000Z
#!/usr/bin/python3.7 import sys import json import time import urllib.parse print("Content type: text/plain") def readJSON(): try: with open('data.json', 'rb') as f: return json.load(f) except: return readJSON() def http_response(): if len(sys.argv)>1: img=urllib.par...
27.479167
69
0.53677
import sys import json import time import urllib.parse print("Content type: text/plain") def readJSON(): try: with open('data.json', 'rb') as f: return json.load(f) except: return readJSON() def http_response(): if len(sys.argv)>1: img=urllib.parse.unquote(sys.argv[1...
true
true
08f2ef331827ca81c61aa88d0c5dc5ff619be901
3,234
py
Python
Notes.py
UjjwalKr-git/Simple_Calculator
be4c18da51e91b9198fb51bbad3764ba29c13a4e
[ "Apache-2.0" ]
1
2020-01-24T18:21:16.000Z
2020-01-24T18:21:16.000Z
Notes.py
UjjwalKr-git/Simple_Calculator
be4c18da51e91b9198fb51bbad3764ba29c13a4e
[ "Apache-2.0" ]
null
null
null
Notes.py
UjjwalKr-git/Simple_Calculator
be4c18da51e91b9198fb51bbad3764ba29c13a4e
[ "Apache-2.0" ]
null
null
null
import os def clrscr(): return os.system("cls") def Notes(): clrscr() print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *") print("* Hello World...! This Python Program is a Simple Calculator. *") ...
78.878049
119
0.223253
import os def clrscr(): return os.system("cls") def Notes(): clrscr() print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *") print("* Hello World...! This Python Program is a Simple Calculator. *") ...
true
true
08f2efe5bbdd628879fca34c59ffc44bd04b24a1
1,159
py
Python
opendrivepy/opendrive.py
changhexingchen/xodr-OSM-Converter
6b2499eafe95c5d12c2299a0f06c3dd703c1ba80
[ "Unlicense" ]
1
2020-03-06T06:05:49.000Z
2020-03-06T06:05:49.000Z
opendrivepy/opendrive.py
changhexingchen/xodr-OSM-Converter
6b2499eafe95c5d12c2299a0f06c3dd703c1ba80
[ "Unlicense" ]
null
null
null
opendrivepy/opendrive.py
changhexingchen/xodr-OSM-Converter
6b2499eafe95c5d12c2299a0f06c3dd703c1ba80
[ "Unlicense" ]
null
null
null
from __future__ import division, print_function, absolute_import from opendrivepy.roadmap import RoadMap import opendrivepy.xmlparser import xml.etree.ElementTree as ET from datetime import datetime class OpenDrive(object): def __init__(self, file): parser = opendrivepy.xmlparser.XMLParser(file) ...
31.324324
75
0.638481
from __future__ import division, print_function, absolute_import from opendrivepy.roadmap import RoadMap import opendrivepy.xmlparser import xml.etree.ElementTree as ET from datetime import datetime class OpenDrive(object): def __init__(self, file): parser = opendrivepy.xmlparser.XMLParser(file) ...
true
true
08f2f001974e4a471b89d63ddf9513f1be8b2450
1,386
py
Python
coding_interviews/cracking_the_coding_interview/string/001.04.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
205
2018-12-01T17:49:49.000Z
2021-12-22T07:02:27.000Z
coding_interviews/cracking_the_coding_interview/string/001.04.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
2
2020-01-01T16:34:29.000Z
2020-04-26T19:11:13.000Z
coding_interviews/cracking_the_coding_interview/string/001.04.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
50
2018-11-28T20:51:36.000Z
2021-11-29T04:08:25.000Z
''' Palindrome Permutation: Given a string, write a function to check if it is a permutation of a palindrome. A palindrome is a word or phrase that is the same forwards and backwards. A permutation is a rearrangement of letters. The palindrome does not need to be limited to just dictionary words. Example Input: Tact C...
23.491525
105
0.66811
def is_even(number): return number % 2 == 0 def is_even_length(string): return is_even(len(string)) def is_palindrome_permutation(string): string = string.lower() string = "".join(string.split()) even = is_even_length(string) char_counter = {} odd = 0 for char in string: ...
true
true
08f2f036579b0767eabc8ce4101dabd7f93044a3
824
py
Python
models/__init__.py
ilyde-platform/ilyde-projects
ca8b9bcb1c093f452d66dcbe958b2cdd1b6e63e9
[ "Apache-2.0" ]
null
null
null
models/__init__.py
ilyde-platform/ilyde-projects
ca8b9bcb1c093f452d66dcbe958b2cdd1b6e63e9
[ "Apache-2.0" ]
null
null
null
models/__init__.py
ilyde-platform/ilyde-projects
ca8b9bcb1c093f452d66dcbe958b2cdd1b6e63e9
[ "Apache-2.0" ]
1
2021-03-30T03:29:47.000Z
2021-03-30T03:29:47.000Z
# encoding: utf-8 # # Copyright (c) 2020-2021 Hopenly srl. # # This file is part of Ilyde. # # 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 #...
34.333333
90
0.769417
from mongoengine import * from config import MONGO_DATABASE_URL, MONGO_PASSWORD, MONGO_USER connect(host=MONGO_DATABASE_URL, port=27017, username=MONGO_USER, password=MONGO_PASSWORD)
true
true
08f2f0d103cda04de1cc824d581cbf874c1bec46
2,482
py
Python
Lab1/Lab1.py
FerdinandSukhoi/HIT-Numerical-Analysis-Lab
7e5cdb36915552eb406ed311fdd54881ca867ec8
[ "MIT" ]
null
null
null
Lab1/Lab1.py
FerdinandSukhoi/HIT-Numerical-Analysis-Lab
7e5cdb36915552eb406ed311fdd54881ca867ec8
[ "MIT" ]
null
null
null
Lab1/Lab1.py
FerdinandSukhoi/HIT-Numerical-Analysis-Lab
7e5cdb36915552eb406ed311fdd54881ca867ec8
[ "MIT" ]
1
2020-05-19T06:57:23.000Z
2020-05-19T06:57:23.000Z
#!/usr/bin/env python import math def lagrange(data, n, x): if len(data) != n+1: return y = 0.0 for k in range(0, n+1): xk, fxk = data[k] l = 1.0 for j in range(0, n+1): if j != k: xj, __ = data[j] l = (l*(x-xj))/(xk-xj) ...
26.126316
81
0.554392
import math def lagrange(data, n, x): if len(data) != n+1: return y = 0.0 for k in range(0, n+1): xk, fxk = data[k] l = 1.0 for j in range(0, n+1): if j != k: xj, __ = data[j] l = (l*(x-xj))/(xk-xj) y += l*fxk return...
true
true
08f2f1240103e28e001404d2e5bbd174cfceffb6
862
py
Python
Python/Telegram_Bot/jokes.py
tanishq-arya/Rotten-Scripts
93f62eb1213f739c13103610d3f502e1dc2d3790
[ "MIT" ]
4
2021-04-27T19:54:06.000Z
2021-09-28T15:34:12.000Z
Python/Telegram_Bot/jokes.py
tanishq-arya/Rotten-Scripts
93f62eb1213f739c13103610d3f502e1dc2d3790
[ "MIT" ]
null
null
null
Python/Telegram_Bot/jokes.py
tanishq-arya/Rotten-Scripts
93f62eb1213f739c13103610d3f502e1dc2d3790
[ "MIT" ]
null
null
null
# /usr/bin/env python3 # Imports import requests from bs4 import BeautifulSoup import random # The concept of webscraping is used here. # From the URL mentioned below, jokes are scraped and stored. # A random joke is retrieved def get_jokes(): jokes = [] url = "https://www.boredpanda.com/fun...
31.925926
228
0.672854
import requests from bs4 import BeautifulSoup import random def get_jokes(): jokes = [] url = "https://www.boredpanda.com/funny-pun-jokes/?utm_source=google&utm_medium=organic&utm_campaign=organic" response = requests.get(url) soup = BeautifulSoup(response.text, "html.parser") fo...
true
true
08f2f14233d5479e060f457df93ee48d82799176
1,208
py
Python
acapy_client/models/keylist_query_filter.py
dbluhm/acapy-client
d92ef607ba2ff1152ec15429f2edb20976991424
[ "Apache-2.0" ]
4
2021-08-05T09:20:34.000Z
2021-08-08T19:37:29.000Z
acapy_client/models/keylist_query_filter.py
dbluhm/acapy-client
d92ef607ba2ff1152ec15429f2edb20976991424
[ "Apache-2.0" ]
null
null
null
acapy_client/models/keylist_query_filter.py
dbluhm/acapy-client
d92ef607ba2ff1152ec15429f2edb20976991424
[ "Apache-2.0" ]
2
2021-08-12T18:18:45.000Z
2021-08-14T13:22:28.000Z
from typing import Any, Dict, List, Type, TypeVar import attr T = TypeVar("T", bound="KeylistQueryFilter") @attr.s(auto_attribs=True) class KeylistQueryFilter: """Query dictionary object""" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: ...
26.844444
77
0.664735
from typing import Any, Dict, List, Type, TypeVar import attr T = TypeVar("T", bound="KeylistQueryFilter") @attr.s(auto_attribs=True) class KeylistQueryFilter: additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any]...
true
true
08f2f1ef007c3d7ddfb65befed972a41d9afa5ae
2,551
py
Python
MagniPy/Solver/GravlensWrap/kwargs_translate.py
dangilman/MagniPy
820b82ea0f6559c895f11c92d93de475a92d38b0
[ "MIT" ]
2
2020-02-20T02:27:16.000Z
2020-02-20T08:38:23.000Z
MagniPy/Solver/GravlensWrap/kwargs_translate.py
dangilman/MagniPy
820b82ea0f6559c895f11c92d93de475a92d38b0
[ "MIT" ]
1
2021-11-15T17:50:20.000Z
2021-11-15T17:50:20.000Z
MagniPy/Solver/GravlensWrap/kwargs_translate.py
dangilman/MagniPy
820b82ea0f6559c895f11c92d93de475a92d38b0
[ "MIT" ]
null
null
null
import numpy as np from MagniPy.util import cart_to_polar from lenstronomy.Util.param_util import ellipticity2phi_q def model_translate_togravlens(args, name): newargs = {} if name == 'SPEMD': newargs['phi_G'],newargs['q'] = ellipticity2phi_q(args['e1'],args['e2']) newargs['phi_G'] = newarg...
23.841121
102
0.557036
import numpy as np from MagniPy.util import cart_to_polar from lenstronomy.Util.param_util import ellipticity2phi_q def model_translate_togravlens(args, name): newargs = {} if name == 'SPEMD': newargs['phi_G'],newargs['q'] = ellipticity2phi_q(args['e1'],args['e2']) newargs['phi_G'] = newarg...
true
true
08f2f207ad71b2ff7470d8ebbdf32738977c9acd
9,651
py
Python
research/object_detection/utils/label_map_util_test.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
14
2019-12-25T08:22:53.000Z
2021-05-05T09:08:21.000Z
research/object_detection/utils/label_map_util_test.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
10
2019-12-28T21:31:19.000Z
2020-04-12T20:01:58.000Z
research/object_detection/utils/label_map_util_test.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
9
2020-03-30T02:11:52.000Z
2020-04-05T02:15:08.000Z
# Copyright 2017 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...
27.033613
80
0.612268
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from six.moves import range import tensorflow as tf from google.protobuf import text_format from object_detection.protos import string_int_label_map_pb2 from object_detection.utils import label_map_...
true
true
08f2f375b4116180a9657ebeec18bf09b8b542b9
3,758
py
Python
homeassistant/auth/models.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
homeassistant/auth/models.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
7
2016-04-09T20:56:30.000Z
2016-04-19T21:28:46.000Z
homeassistant/auth/models.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
"""Auth models.""" from datetime import datetime, timedelta import secrets from typing import Dict, List, NamedTuple, Optional import uuid import attr from homeassistant.util import dt as dt_util from . import permissions as perm_mdl from .const import GROUP_ID_ADMIN TOKEN_TYPE_NORMAL = "normal" TOKEN_TYPE_SYSTEM =...
31.057851
86
0.684939
from datetime import datetime, timedelta import secrets from typing import Dict, List, NamedTuple, Optional import uuid import attr from homeassistant.util import dt as dt_util from . import permissions as perm_mdl from .const import GROUP_ID_ADMIN TOKEN_TYPE_NORMAL = "normal" TOKEN_TYPE_SYSTEM = "system" TOKEN_TYP...
true
true
08f2f5e8497bf4393af63644bf5d6108630a6c33
4,496
py
Python
control/garage.py
jimfenton/garage-door-tools
ca6699496710197f1153b97aaefebc6ef0488a89
[ "MIT" ]
null
null
null
control/garage.py
jimfenton/garage-door-tools
ca6699496710197f1153b97aaefebc6ef0488a89
[ "MIT" ]
null
null
null
control/garage.py
jimfenton/garage-door-tools
ca6699496710197f1153b97aaefebc6ef0488a89
[ "MIT" ]
null
null
null
#!/usr/bin/python # garage.py - Prompt page for garage door opener application # # Copyright (c) 2014,2015 Jim Fenton # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, i...
27.248485
85
0.648132
import json import socket import syslog import time def gpio(cmd): s.send(cmd+'\n') return s.recv(64)[0:-1] s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sockfile = "/var/run/gpiod.sock" s.connect(sockfile) doorclosed = gpio("input 24") dooropen = gpio("input 26") s.close() if doorclosed == "true...
false
true
08f2f614418be8e958499695c0bc954c65ed4c1e
46
py
Python
dataapi_client/__init__.py
jmnel/dataapi-client
808a1e20b5d9e21fb7348729442ff73d1fd7345d
[ "MIT" ]
null
null
null
dataapi_client/__init__.py
jmnel/dataapi-client
808a1e20b5d9e21fb7348729442ff73d1fd7345d
[ "MIT" ]
null
null
null
dataapi_client/__init__.py
jmnel/dataapi-client
808a1e20b5d9e21fb7348729442ff73d1fd7345d
[ "MIT" ]
null
null
null
from .api import ApiConfig from . import topk
15.333333
26
0.782609
from .api import ApiConfig from . import topk
true
true
08f2f64c38457e62b11bc1fad152ea82dc73a5e3
2,557
py
Python
merchant_game/migrations/0014_auto_20200513_0956.py
dyj216/merchant_game
9892f43ffe5f792cad268f25f4d96eba4bab3dee
[ "MIT" ]
null
null
null
merchant_game/migrations/0014_auto_20200513_0956.py
dyj216/merchant_game
9892f43ffe5f792cad268f25f4d96eba4bab3dee
[ "MIT" ]
5
2020-02-28T17:03:08.000Z
2021-09-22T18:01:34.000Z
merchant_game/migrations/0014_auto_20200513_0956.py
dyj216/merchant_game
9892f43ffe5f792cad268f25f4d96eba4bab3dee
[ "MIT" ]
1
2019-10-24T16:18:13.000Z
2019-10-24T16:18:13.000Z
# Generated by Django 3.0.6 on 2020-05-13 09:56 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('merchant_game', '0013_auto_20200510_1444'), ] operations = [ migrations.RemoveField( model_name...
38.164179
118
0.584278
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('merchant_game', '0013_auto_20200510_1444'), ] operations = [ migrations.RemoveField( model_name='player', name='item_1_amount', ...
true
true
08f2f783c56b7c11fb75aa6702f2f19ccec7fdde
25,261
py
Python
tools/c7n_azure/tests_azure/tests_resources/test_cosmos_db.py
al3pht/cloud-custodian
ce6613d1b716f336384c5e308eee300389e6bf50
[ "Apache-2.0" ]
2,415
2018-12-04T00:37:58.000Z
2022-03-31T12:28:56.000Z
tools/c7n_azure/tests_azure/tests_resources/test_cosmos_db.py
al3pht/cloud-custodian
ce6613d1b716f336384c5e308eee300389e6bf50
[ "Apache-2.0" ]
3,272
2018-12-03T23:58:17.000Z
2022-03-31T21:15:32.000Z
tools/c7n_azure/tests_azure/tests_resources/test_cosmos_db.py
al3pht/cloud-custodian
ce6613d1b716f336384c5e308eee300389e6bf50
[ "Apache-2.0" ]
773
2018-12-06T09:43:23.000Z
2022-03-30T20:44:43.000Z
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 from azure.cosmos.cosmos_client import CosmosClient from ..azure_common import BaseTest, arm_template, cassette_name from c7n_azure.resources.cosmos_db import (CosmosDBChildResource, CosmosDBFirewallRulesFilter, ...
37.423704
157
0.533669
from azure.cosmos.cosmos_client import CosmosClient from ..azure_common import BaseTest, arm_template, cassette_name from c7n_azure.resources.cosmos_db import (CosmosDBChildResource, CosmosDBFirewallRulesFilter, CosmosFirewallBypassFilter, ...
true
true
08f2f7ef0a1d2f4cafddfb807e4bbb7c0cb9ec31
14,363
py
Python
test_2.py
CharlesW95/senior_project
d7bfe89c640b892f4c2f156a881c19cb5405b8ae
[ "MIT" ]
1
2018-07-12T10:00:11.000Z
2018-07-12T10:00:11.000Z
test_2.py
CharlesW95/senior_project
d7bfe89c640b892f4c2f156a881c19cb5405b8ae
[ "MIT" ]
null
null
null
test_2.py
CharlesW95/senior_project
d7bfe89c640b892f4c2f156a881c19cb5405b8ae
[ "MIT" ]
null
null
null
#!/usr/bin/env python import matplotlib matplotlib.use('Agg') from itertools import product import argparse import os import numpy as np import tensorflow as tf import matplotlib.pyplot as plt import pylab import scipy.stats as stats from adain.image import load_image, prepare_image, load_mask, save_image from adai...
44.884375
142
0.614635
import matplotlib matplotlib.use('Agg') from itertools import product import argparse import os import numpy as np import tensorflow as tf import matplotlib.pyplot as plt import pylab import scipy.stats as stats from adain.image import load_image, prepare_image, load_mask, save_image from adain.coral import coral f...
true
true
08f2fb3514dcbd1b75b286bdab778df041ea85c8
3,264
py
Python
qa/rpc-tests/p2p-mempool.py
RegulusBit/coinium
13472e0f83c469ca83c2d1023e7308032de5f514
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-mempool.py
RegulusBit/coinium
13472e0f83c469ca83c2d1023e7308032de5f514
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-mempool.py
RegulusBit/coinium
13472e0f83c469ca83c2d1023e7308032de5f514
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Coinium Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import CoiniumTestFramework from...
32.64
96
0.668811
from test_framework.mininode import * from test_framework.test_framework import CoiniumTestFramework from test_framework.util import * import time class TestNode(NodeConnCB): def __init__(self): NodeConnCB.__init__(self) self.connection = None self.ping_counter = 1 self.last_pong =...
true
true
08f2fbedee1d58cad95257bd4a79493a47e5d98f
2,040
py
Python
src/i6/cli/__init__.py
kruserr/i6
90a198ae543844faa1073d8bd317f11e1bb80298
[ "MIT" ]
1
2020-07-05T22:08:22.000Z
2020-07-05T22:08:22.000Z
src/i6/cli/__init__.py
kruserr/i6
90a198ae543844faa1073d8bd317f11e1bb80298
[ "MIT" ]
null
null
null
src/i6/cli/__init__.py
kruserr/i6
90a198ae543844faa1073d8bd317f11e1bb80298
[ "MIT" ]
null
null
null
from i6.cli.main import main import os import argparse class cli(): """ Class to interact with the program using the CLI. Example: ``` i6.cli().run() ``` This class allows for a interactive CLI experiance, and also a no menu option where it is more suited...
27.2
84
0.481373
from i6.cli.main import main import os import argparse class cli(): def __init__(self, func_args = '', menu = True): parser = argparse.ArgumentParser(description='i6') parser.add_argument( 'tool', metavar='tool', type=str, default='', nargs='*', help='Select a tool to us...
true
true
08f2fc73fbe59e80c9236be1ceceeaecc51f84ba
109,614
py
Python
python/ccxt/bitfinex2.py
cryptos81/ccxt
1d210fdc77e04a96cfc59e7fb268c1ad6cc0e39e
[ "MIT" ]
null
null
null
python/ccxt/bitfinex2.py
cryptos81/ccxt
1d210fdc77e04a96cfc59e7fb268c1ad6cc0e39e
[ "MIT" ]
null
null
null
python/ccxt/bitfinex2.py
cryptos81/ccxt
1d210fdc77e04a96cfc59e7fb268c1ad6cc0e39e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import ...
44.942189
254
0.487511
from ccxt.base.exchange import Exchange import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadRequest from ccxt.base.errors impo...
true
true
08f2fd49571504454f016c80c77f9a3dcc7942a6
5,844
py
Python
scripts/run_spectroscopy.py
paulsbrookes/bistability_tools
6d7f20a20d9371a56e83a7ee48237fb70b831a85
[ "Apache-2.0" ]
null
null
null
scripts/run_spectroscopy.py
paulsbrookes/bistability_tools
6d7f20a20d9371a56e83a7ee48237fb70b831a85
[ "Apache-2.0" ]
null
null
null
scripts/run_spectroscopy.py
paulsbrookes/bistability_tools
6d7f20a20d9371a56e83a7ee48237fb70b831a85
[ "Apache-2.0" ]
null
null
null
import os, sys from cqed_tools.calibration import * import matplotlib.pyplot as plt display = False def t_gen(eps_array): n_spectra = eps_array.shape[0] t_array = np.zeros(n_spectra, dtype=np.int) t_array += 3 * (eps_array <= 1e-5) t_array += 4 * (1e-5 < eps_array) * (eps_array <= 1e-4) t_array ...
41.446809
105
0.609343
import os, sys from cqed_tools.calibration import * import matplotlib.pyplot as plt display = False def t_gen(eps_array): n_spectra = eps_array.shape[0] t_array = np.zeros(n_spectra, dtype=np.int) t_array += 3 * (eps_array <= 1e-5) t_array += 4 * (1e-5 < eps_array) * (eps_array <= 1e-4) t_array ...
true
true
08f2fd5848bcd7cb47db8ffbec97a076a77f15c6
199
py
Python
src/cli.py
Mikerah/py-circom
5ea4c788342301a24b9245feb6421746876df630
[ "MIT" ]
2
2020-04-18T12:58:44.000Z
2020-04-18T13:05:32.000Z
src/cli.py
Mikerah/py-circom
5ea4c788342301a24b9245feb6421746876df630
[ "MIT" ]
null
null
null
src/cli.py
Mikerah/py-circom
5ea4c788342301a24b9245feb6421746876df630
[ "MIT" ]
null
null
null
import click @click.command() @click.option('-o', '--output', help="Specify output circuit file") @click.argument('INPUT_SOURCE_INPUT_FILE', help="Specify input circom file") def circom(): pass
24.875
76
0.723618
import click @click.command() @click.option('-o', '--output', help="Specify output circuit file") @click.argument('INPUT_SOURCE_INPUT_FILE', help="Specify input circom file") def circom(): pass
true
true
08f2fd60e0fb02c8f38b49e585e959d2cf4b4af2
1,726
py
Python
wann_tool/env.py
andrewhu/wann-nlp
13e5388dc3f2ea61510759ec1cf29d91f51c330b
[ "Apache-2.0" ]
1
2021-06-17T06:37:07.000Z
2021-06-17T06:37:07.000Z
wann_tool/env.py
andrewhu/wann-nlp
13e5388dc3f2ea61510759ec1cf29d91f51c330b
[ "Apache-2.0" ]
null
null
null
wann_tool/env.py
andrewhu/wann-nlp
13e5388dc3f2ea61510759ec1cf29d91f51c330b
[ "Apache-2.0" ]
2
2020-05-14T12:20:29.000Z
2020-05-16T03:59:32.000Z
import numpy as np import gym def make_env(env_name, encoder, max_features, seed=-1, render_mode=False): if (env_name.startswith("Spam")): print("Spam_started") from custom_envs.classify_gym import ClassifyEnv if env_name.startswith("SpamTEST"): from custom_envs.classify_gym import spam_test ...
38.355556
90
0.747972
import numpy as np import gym def make_env(env_name, encoder, max_features, seed=-1, render_mode=False): if (env_name.startswith("Spam")): print("Spam_started") from custom_envs.classify_gym import ClassifyEnv if env_name.startswith("SpamTEST"): from custom_envs.classify_gym import spam_test ...
true
true
08f2fd6c00ac98f97fd4c2d9b1a3bc491b1a7790
1,790
py
Python
BluetoothServer.py
KonstantinFed12344/MDR-Bluetooth-Software
695f920a417b4e11732b56928902904639ed7bc8
[ "MIT" ]
1
2019-06-24T17:28:05.000Z
2019-06-24T17:28:05.000Z
BluetoothServer.py
KonstantinFed12344/MDR-Bluetooth-Software
695f920a417b4e11732b56928902904639ed7bc8
[ "MIT" ]
null
null
null
BluetoothServer.py
KonstantinFed12344/MDR-Bluetooth-Software
695f920a417b4e11732b56928902904639ed7bc8
[ "MIT" ]
null
null
null
import bluetooth #From PyBluez library import datetime from time import sleep serverAddress = 'B8:27:EB:C5:67:60'#Address of server port = 1#port client connects too backlog = 1 while True: imageReceived = 1 while imageReceived: try: BserverSocket = bluetooth.BluetoothSocket(blueto...
39.777778
117
0.545251
import bluetooth import datetime from time import sleep serverAddress = 'B8:27:EB:C5:67:60'port = 1backlog = 1 while True: imageReceived = 1 while imageReceived: try: BserverSocket = bluetooth.BluetoothSocket(bluetooth.RFCOMM) BserverSocket.bind((serverAddress,port)) ...
true
true
08f2fd99fdf39d16adf6a386a04a039a7c6e612d
2,980
py
Python
tests/test_verilog/test_bind.py
leonardt/magma
d3e8c9500ec3b167df8ed067e0c0305781c94ab6
[ "MIT" ]
167
2017-10-08T00:59:22.000Z
2022-02-08T00:14:39.000Z
tests/test_verilog/test_bind.py
leonardt/magma
d3e8c9500ec3b167df8ed067e0c0305781c94ab6
[ "MIT" ]
719
2017-08-29T17:58:28.000Z
2022-03-31T23:39:18.000Z
tests/test_verilog/test_bind.py
leonardt/magma
d3e8c9500ec3b167df8ed067e0c0305781c94ab6
[ "MIT" ]
14
2017-09-01T03:25:16.000Z
2021-11-05T13:30:24.000Z
import os import magma as m import magma.testing from rtl import RTL import rtl_monitor from subprocess import run def test_bind(): RTL4 = RTL(4) m.compile("build/bind_test", RTL4, inline=True, user_namespace="foo", verilog_prefix="bar_") assert m.testing.check_files_equal(__file__, ...
39.733333
79
0.569799
import os import magma as m import magma.testing from rtl import RTL import rtl_monitor from subprocess import run def test_bind(): RTL4 = RTL(4) m.compile("build/bind_test", RTL4, inline=True, user_namespace="foo", verilog_prefix="bar_") assert m.testing.check_files_equal(__file__, ...
true
true
08f2fe366bb993134668029b0f5928dff5562692
20,983
py
Python
lglaf.py
kenkit/lglaf
30b625f24d71190b82f78e02f29749b290cd8d46
[ "MIT" ]
22
2017-09-19T23:49:36.000Z
2021-11-08T22:03:23.000Z
lglaf.py
kenkit/lglaf
30b625f24d71190b82f78e02f29749b290cd8d46
[ "MIT" ]
7
2018-04-04T20:38:51.000Z
2021-11-08T01:40:19.000Z
lglaf.py
kenkit/lglaf
30b625f24d71190b82f78e02f29749b290cd8d46
[ "MIT" ]
12
2017-11-10T23:01:20.000Z
2020-12-20T05:06:45.000Z
#!/usr/bin/env python # # Interactive shell for communication with LG devices in download mode (LAF). # # Copyright (C) 2015 Peter Wu <peter@lekensteyn.nl> # Licensed under the MIT license <http://opensource.org/licenses/MIT>. from __future__ import print_function from contextlib import closing import argparse, loggin...
36.812281
110
0.620979
from __future__ import print_function from contextlib import closing import argparse, logging, re, struct, sys, binascii try: import readline except ImportError: pass try: import usb.core, usb.util except ImportError: pass try: import winreg except ImportError: try: import _winreg as winreg except ImportError...
true
true
08f2fe86e3f0dd2d8dcdc3970f7003b2ca31fbbe
586
py
Python
backend/real_scheduler.py
VigneshSP94/cloud-connect
cfb91a1671a2e99b0635b4506d9587ace15832cd
[ "Apache-2.0" ]
2
2018-10-01T17:34:04.000Z
2018-10-08T18:48:24.000Z
backend/real_scheduler.py
VigneshSP94/cloud-connect
cfb91a1671a2e99b0635b4506d9587ace15832cd
[ "Apache-2.0" ]
null
null
null
backend/real_scheduler.py
VigneshSP94/cloud-connect
cfb91a1671a2e99b0635b4506d9587ace15832cd
[ "Apache-2.0" ]
null
null
null
import controls import views import time #conn = views.db_conn() accounts = [] # This will run periodically to probe the AWS accounts to see if there are changes to the instances running in the accounts. while True: conn = views.db_conn() data = conn.execute('SELECT * FROM AWS_ACCOUNT') for accs in data:...
25.478261
124
0.62628
import controls import views import time accounts = [] while True: conn = views.db_conn() data = conn.execute('SELECT * FROM AWS_ACCOUNT') for accs in data: accounts.append(accs) conn.close() for i in accounts: try: print("scanning account "+str(i[0])) contro...
true
true
08f2fec8bcf8e950a8c38f07a1569e4d08fc0d3b
2,888
py
Python
src/main/resources/xlr/HttpClient.py
vdoulcier/xlr-xlrelease-plugin
220bb34dbbfa3ffcf7b7e35ed601d4069557c06e
[ "MIT" ]
null
null
null
src/main/resources/xlr/HttpClient.py
vdoulcier/xlr-xlrelease-plugin
220bb34dbbfa3ffcf7b7e35ed601d4069557c06e
[ "MIT" ]
null
null
null
src/main/resources/xlr/HttpClient.py
vdoulcier/xlr-xlrelease-plugin
220bb34dbbfa3ffcf7b7e35ed601d4069557c06e
[ "MIT" ]
null
null
null
# # Copyright 2019 XEBIALABS # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, subli...
64.177778
462
0.727839
import requests class HttpClient(object): def __init__(self, http_connection, username=None, password=None): self.http_connection = http_connection self.url = http_connection['url'] self.username = username if username else http_connection['username'] self.password = password if pa...
true
true
08f2ff2ef01a869caa38e7b79ae526961b5c92c3
2,923
py
Python
test/functional/invalidateblock.py
patrick-yingxi-pan/bitcoin-abc
d86376f95b198ba7e53e450a49493d12079eb786
[ "MIT" ]
1
2019-01-06T09:49:41.000Z
2019-01-06T09:49:41.000Z
test/functional/invalidateblock.py
blockparty-sh/bitcoin-abc
d1d091ba73f574ae5eb189fe7655c67bf5d338cf
[ "MIT" ]
1
2018-11-29T03:41:12.000Z
2018-11-29T03:41:12.000Z
test/functional/invalidateblock.py
blockparty-sh/bitcoin-abc
d1d091ba73f574ae5eb189fe7655c67bf5d338cf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test InvalidateBlock code # from test_framework.test_framework import BitcoinTestFramework from test...
38.973333
90
0.640438
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class InvalidateTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 3 self.extra_args = [["-noparkdeepreorg"], [], []] def setup_network...
true
true
08f2ff4a8afbc1efb47260b201a255d21446b5fb
3,653
py
Python
SRcode/InceptionModules.py
robotic-vision-lab/Attention-With-Varying-Receptive-Fields-Network
e151216ca029dc72ab93e03d6bcacd69161d1c25
[ "MIT" ]
1
2021-12-10T12:50:39.000Z
2021-12-10T12:50:39.000Z
SRcode/InceptionModules.py
robotic-vision-lab/Attention-With-Varying-Receptive-Fields-Network
e151216ca029dc72ab93e03d6bcacd69161d1c25
[ "MIT" ]
null
null
null
SRcode/InceptionModules.py
robotic-vision-lab/Attention-With-Varying-Receptive-Fields-Network
e151216ca029dc72ab93e03d6bcacd69161d1c25
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np import tensorflow.keras as keras from tensorflow.keras import datasets, layers, models, regularizers import pdb class inception_module(layers.Layer): """ Inception Module This module is made for image super-resolution where max pooling layers ar...
45.6625
110
0.470846
import tensorflow as tf import numpy as np import tensorflow.keras as keras from tensorflow.keras import datasets, layers, models, regularizers import pdb class inception_module(layers.Layer): def __init__(self, filters,reduction = 1, name = None): super(inception_module, self).__init__() ...
true
true
08f2ffc0d54b6249c7cd7fb3e46831916c85c73e
4,859
py
Python
relational/api/api-maria.py
eduardolfalcao/bigdata-unifacisa
a725fafd88c9508a717d7b0979dac9770dee6905
[ "Apache-2.0" ]
1
2020-11-02T18:44:46.000Z
2020-11-02T18:44:46.000Z
relational/api/api-maria.py
eduardolfalcao/bigdata-unifacisa
a725fafd88c9508a717d7b0979dac9770dee6905
[ "Apache-2.0" ]
null
null
null
relational/api/api-maria.py
eduardolfalcao/bigdata-unifacisa
a725fafd88c9508a717d7b0979dac9770dee6905
[ "Apache-2.0" ]
1
2021-09-15T01:42:35.000Z
2021-09-15T01:42:35.000Z
#!/usr/bin/python3 from flask import Flask, request, json import mysql.connector from mysql.connector import Error from mysql.connector import errorcode from os import environ DB_HOST = environ.get('DB_HOST') DB_NAME = environ.get('DB_NAME') DB_USER = environ.get('DB_USER') DB_PASSWORD = environ.get('DB_PASSWORD') if ...
37.091603
211
0.660218
from flask import Flask, request, json import mysql.connector from mysql.connector import Error from mysql.connector import errorcode from os import environ DB_HOST = environ.get('DB_HOST') DB_NAME = environ.get('DB_NAME') DB_USER = environ.get('DB_USER') DB_PASSWORD = environ.get('DB_PASSWORD') if DB_PASSWORD is not ...
true
true
08f301fb1b3adbabf44568daaf87f7159acdcac2
713
py
Python
migrations/0016_auto_20210414_2325.py
andywar65/buildings
b772c052bd779ff9a33a31f345e9860203d55bf0
[ "BSD-2-Clause" ]
2
2021-02-04T14:13:44.000Z
2021-12-08T18:30:05.000Z
migrations/0016_auto_20210414_2325.py
andywar65/buildings
b772c052bd779ff9a33a31f345e9860203d55bf0
[ "BSD-2-Clause" ]
null
null
null
migrations/0016_auto_20210414_2325.py
andywar65/buildings
b772c052bd779ff9a33a31f345e9860203d55bf0
[ "BSD-2-Clause" ]
null
null
null
# Generated by Django 3.1.2 on 2021-04-14 21:25 import django.contrib.gis.db.models.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('buildings', '0015_auto_20210401_2211'), ] operations = [ migrations.AddField( model_n...
28.52
123
0.629734
import django.contrib.gis.db.models.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('buildings', '0015_auto_20210401_2211'), ] operations = [ migrations.AddField( model_name='plangeometry', name='geometryz'...
true
true
08f3028171447fe89c7b0fc3af81f9df8ed3080e
1,129
py
Python
tests/run.py
vascobraga41/plugin.video.netflix
d0be74cc8c0d51c19c606751bd212ff09254e5d1
[ "MIT" ]
1
2020-05-21T07:25:40.000Z
2020-05-21T07:25:40.000Z
tests/run.py
roliverosc/plugin.video.netflix
f3ebc62610d566480b927ebba6289f9593955af8
[ "MIT" ]
null
null
null
tests/run.py
roliverosc/plugin.video.netflix
f3ebc62610d566480b927ebba6289f9593955af8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright (C) 2019 Dag Wieers (@dagwieers) <dag@wieers.com> SPDX-License-Identifier: GPL-3.0-only See LICENSES/GPL-3.0-only.md for more information. """ # pylint: disable=missing-docstring import sys xbmc = __import__('xbmc') xbmcaddon = __import__('xbmcaddon') xbmcgui = __imp...
30.513514
112
0.713906
import sys xbmc = __import__('xbmc') xbmcaddon = __import__('xbmcaddon') xbmcgui = __import__('xbmcgui') xbmcplugin = __import__('xbmcplugin') xbmcvfs = __import__('xbmcvfs') default = 'directory/root' if len(sys.argv) > 1: path = sys.argv[1].lstrip('/') or default else: path = default uri = f'plugin://plug...
true
true
08f302a84e36a1c48be5d6e4846733b1f7896c2e
389
py
Python
alfred_code/todo_new_archive.py
ecmadao/Alfred-TodoList
f515d9742287acbcba805d10c989514fc8a6e317
[ "MIT" ]
9
2016-07-03T06:04:55.000Z
2021-11-02T04:53:09.000Z
alfred_code/todo_new_archive.py
dishantpandya777/Alfred-TodoList
f515d9742287acbcba805d10c989514fc8a6e317
[ "MIT" ]
null
null
null
alfred_code/todo_new_archive.py
dishantpandya777/Alfred-TodoList
f515d9742287acbcba805d10c989514fc8a6e317
[ "MIT" ]
3
2020-01-31T10:45:49.000Z
2022-03-26T19:19:32.000Z
# -*- coding: UTF-8 -*- import sys import re from todos_files.files_helper import create_new_archive from const_value import ARCHIVE_TITLE reload(sys) sys.setdefaultencoding('utf-8') def new_archive(args): if len(args): arg = ''.join(args) else: arg = '' filename = re.findall(r'^{}(.+)$'.format(ARCHIVE_TITLE...
18.52381
65
0.709512
import sys import re from todos_files.files_helper import create_new_archive from const_value import ARCHIVE_TITLE reload(sys) sys.setdefaultencoding('utf-8') def new_archive(args): if len(args): arg = ''.join(args) else: arg = '' filename = re.findall(r'^{}(.+)$'.format(ARCHIVE_TITLE), arg)[0] if filename:...
true
true
08f303dcbb0058e91ce5ec274df179666f110ed4
66
py
Python
npc/__version__.py
Arent128/npc
c8a1e227a1d4d7c540c4f4427b611ffc290535ee
[ "MIT" ]
null
null
null
npc/__version__.py
Arent128/npc
c8a1e227a1d4d7c540c4f4427b611ffc290535ee
[ "MIT" ]
null
null
null
npc/__version__.py
Arent128/npc
c8a1e227a1d4d7c540c4f4427b611ffc290535ee
[ "MIT" ]
null
null
null
"""Current version string for NPC""" __version__ = "1.4.0 devel"
16.5
36
0.681818
__version__ = "1.4.0 devel"
true
true
08f3042a116657deb828d5836d0adaf5e44a467a
2,576
py
Python
ucsmsdk/mometa/equipment/EquipmentPOSTCodeTemplate.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/equipment/EquipmentPOSTCodeTemplate.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/equipment/EquipmentPOSTCodeTemplate.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for EquipmentPOSTCodeTemplate ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class EquipmentPOSTCodeTemplateConsts: pass class EquipmentPOSTCodeTemplate(ManagedObject): ...
52.571429
248
0.651786
from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class EquipmentPOSTCodeTemplateConsts: pass class EquipmentPOSTCodeTemplate(ManagedObject): consts = EquipmentPOSTCodeTemplateConsts() naming_props = set([u'name']) mo_meta = Mo...
true
true
08f304e8434af395af7ded65888827b1376c8a00
1,361
py
Python
ssseg/cfgs/fcn/cfgs_ade20k_resnet50os16.py
nianjiuhuiyi/sssegmentation
4fc12ea7b80fe83170b6d3da0826e53a99ef5325
[ "MIT" ]
411
2020-10-22T02:24:57.000Z
2022-03-31T11:19:17.000Z
ssseg/cfgs/fcn/cfgs_ade20k_resnet50os16.py
nianjiuhuiyi/sssegmentation
4fc12ea7b80fe83170b6d3da0826e53a99ef5325
[ "MIT" ]
24
2020-12-21T03:53:54.000Z
2022-03-17T06:50:00.000Z
ssseg/cfgs/fcn/cfgs_ade20k_resnet50os16.py
nianjiuhuiyi/sssegmentation
4fc12ea7b80fe83170b6d3da0826e53a99ef5325
[ "MIT" ]
59
2020-12-04T03:40:12.000Z
2022-03-30T09:12:47.000Z
'''define the config file for ade20k and resnet50os16''' import os from .base_cfg import * # modify dataset config DATASET_CFG = DATASET_CFG.copy() DATASET_CFG.update({ 'type': 'ade20k', 'rootdir': os.path.join(os.getcwd(), 'ADE20k'), }) # modify dataloader config DATALOADER_CFG = DATALOADER_CFG.copy() # modi...
25.203704
92
0.650257
import os from .base_cfg import * DATASET_CFG = DATASET_CFG.copy() DATASET_CFG.update({ 'type': 'ade20k', 'rootdir': os.path.join(os.getcwd(), 'ADE20k'), }) DATALOADER_CFG = DATALOADER_CFG.copy() OPTIMIZER_CFG = OPTIMIZER_CFG.copy() OPTIMIZER_CFG.update( { 'max_epochs': 130 } ) LOSSES_CFG = LO...
true
true
08f3066b9d37541b1b1eccd815c446c72c398ff0
1,091
py
Python
python3/vimspector/settings.py
lilwayne1556/vimspector
5a041ec2de82cbc7b39b9e8c4280863fdcd03eac
[ "Apache-2.0" ]
2
2020-12-04T15:31:02.000Z
2020-12-04T15:31:07.000Z
python3/vimspector/settings.py
lilwayne1556/vimspector
5a041ec2de82cbc7b39b9e8c4280863fdcd03eac
[ "Apache-2.0" ]
null
null
null
python3/vimspector/settings.py
lilwayne1556/vimspector
5a041ec2de82cbc7b39b9e8c4280863fdcd03eac
[ "Apache-2.0" ]
null
null
null
# vimspector - A multi-language debugging system for Vim # Copyright 2020 Ben Jackson # # 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 # # Unle...
32.088235
74
0.699358
import vim import builtins from vimspector import utils def Get( option: str, default=None, cls=str ): return cls( utils.GetVimValue( vim.vars, f'vimspector_{ option }', default ) ) def Int( option: str, default=0 ): return Get( option, default...
true
true
08f3068018aa52d7964f2e61ae012c37bd4fb8e8
111,477
py
Python
pandatools/AthenaUtils.py
junggjo9/panda-client
7c263e76ce065ef122ef2df12cf6e9d6fe13de71
[ "Apache-2.0" ]
null
null
null
pandatools/AthenaUtils.py
junggjo9/panda-client
7c263e76ce065ef122ef2df12cf6e9d6fe13de71
[ "Apache-2.0" ]
null
null
null
pandatools/AthenaUtils.py
junggjo9/panda-client
7c263e76ce065ef122ef2df12cf6e9d6fe13de71
[ "Apache-2.0" ]
null
null
null
import os import re import sys import commands import subprocess import MiscUtils import PLogger import Client # error code EC_Config = 10 # replace parameter with compact LFNs def replaceParam(patt,inList,tmpJobO,useNewTRF=False): # remove attempt numbers compactLFNs = [] for tmpLFN in inList: ...
41.150609
138
0.527266
import os import re import sys import commands import subprocess import MiscUtils import PLogger import Client EC_Config = 10 def replaceParam(patt,inList,tmpJobO,useNewTRF=False): compactLFNs = [] for tmpLFN in inList: compactLFNs.append(re.sub('\.\d+$','',tmpLFN)) compactLFNs.sort()...
false
true
08f306d44456123911b2d3336adc07e506462cce
17,820
py
Python
jill/install.py
proteanblank/jill.py
8c751223051dc39213510ec5fe94fb30b0ae5c16
[ "MIT" ]
null
null
null
jill/install.py
proteanblank/jill.py
8c751223051dc39213510ec5fe94fb30b0ae5c16
[ "MIT" ]
null
null
null
jill/install.py
proteanblank/jill.py
8c751223051dc39213510ec5fe94fb30b0ae5c16
[ "MIT" ]
null
null
null
from .utils.defaults import default_depot_path, default_install_dir, default_symlink_dir from .utils.filters import f_major_version, f_minor_version from .utils import query_yes_no from .utils import current_architecture, current_system, current_libc from .utils import latest_version from .utils import DmgMounter, TarM...
40.408163
105
0.606061
from .utils.defaults import default_depot_path, default_install_dir, default_symlink_dir from .utils.filters import f_major_version, f_minor_version from .utils import query_yes_no from .utils import current_architecture, current_system, current_libc from .utils import latest_version from .utils import DmgMounter, TarM...
true
true
08f306d5f2bd7d01f8ae927947ef3da856f2ad2a
1,193
py
Python
tests/files/test_filetype.py
HappyEinara/wingline
08d67ad9f58c869c385f954def6af5fa92e968ff
[ "MIT" ]
null
null
null
tests/files/test_filetype.py
HappyEinara/wingline
08d67ad9f58c869c385f954def6af5fa92e968ff
[ "MIT" ]
null
null
null
tests/files/test_filetype.py
HappyEinara/wingline
08d67ad9f58c869c385f954def6af5fa92e968ff
[ "MIT" ]
null
null
null
"""Test filetype detection.""" from pytest_cases import parametrize_with_cases from wingline.files import filetype @parametrize_with_cases( "path,content_hash,container,format,line_count", cases="tests.cases.files" ) def test_detect_container(path, content_hash, container, format, line_count): """File conta...
31.394737
78
0.775356
from pytest_cases import parametrize_with_cases from wingline.files import filetype @parametrize_with_cases( "path,content_hash,container,format,line_count", cases="tests.cases.files" ) def test_detect_container(path, content_hash, container, format, line_count): test_filetype = filetype.detect_container(p...
true
true
08f307aace98ba1d408788636ca32dccc3d6c7df
2,919
py
Python
generated/nimodinst/nimodinst/errors.py
kurtp-ni/nimi-python
4f0bccce67a69ca9f46a8ab9b07dc26ca0049729
[ "MIT" ]
88
2017-08-03T18:07:27.000Z
2022-01-28T13:55:06.000Z
generated/nimodinst/nimodinst/errors.py
kurtp-ni/nimi-python
4f0bccce67a69ca9f46a8ab9b07dc26ca0049729
[ "MIT" ]
1,310
2017-07-11T18:42:44.000Z
2022-03-28T21:03:57.000Z
generated/nimodinst/nimodinst/errors.py
kurtp-ni/nimi-python
4f0bccce67a69ca9f46a8ab9b07dc26ca0049729
[ "MIT" ]
70
2017-07-25T14:52:53.000Z
2022-03-31T14:14:23.000Z
# -*- coding: utf-8 -*- # This file was generated import platform import warnings def _is_success(code): return (code == 0) def _is_error(code): return (code < 0) def _is_warning(code): return (code > 0) class Error(Exception): '''Base error class for NI-ModInst''' def __init__(self, mess...
31.728261
261
0.705379
import platform import warnings def _is_success(code): return (code == 0) def _is_error(code): return (code < 0) def _is_warning(code): return (code > 0) class Error(Exception): def __init__(self, message): super(Error, self).__init__(message) class DriverError(Error): def __in...
true
true
08f309e72ebcee866e5112120886d4e0227ab0e6
5,896
py
Python
attention/main.py
Victorwz/awesome_NLP_projects
d16ca80b1b5bcc0536380599a01af173507961ad
[ "MIT" ]
1
2020-06-11T19:57:34.000Z
2020-06-11T19:57:34.000Z
attention/main.py
Victorwz/awesome_NLP_models
d16ca80b1b5bcc0536380599a01af173507961ad
[ "MIT" ]
null
null
null
attention/main.py
Victorwz/awesome_NLP_models
d16ca80b1b5bcc0536380599a01af173507961ad
[ "MIT" ]
null
null
null
import argparse import control import data import datetime import mylogger import math import model import os import random import sys import time import torch import torch.nn as nn def make_model_path(args): if not os.path.exists('scratch'): os.makedirs('scratch') model_path = 'scratch/' model_pa...
41.230769
79
0.572422
import argparse import control import data import datetime import mylogger import math import model import os import random import sys import time import torch import torch.nn as nn def make_model_path(args): if not os.path.exists('scratch'): os.makedirs('scratch') model_path = 'scratch/' model_pa...
true
true
08f30ed0455e7a6aee8cfc3e2a7e6fb270bad1dc
330
py
Python
Chapter 02/Chap02_Example2.35.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
Chapter 02/Chap02_Example2.35.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
Chapter 02/Chap02_Example2.35.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
s1 = 'I am space' print(s1.isprintable()) # -- IP1 s2 = '\tTab is printable' print(s2.isprintable()) # -- IP2 s3 = ' ' print(s3.isprintable()) # -- IP3 s4 = 'c' print(s4.isprintable()) # -- IP4 s5 = '3*2=6' print(s5.isprintable()) # -- IP5 s6 = chr(8) print(s6.isprintable()) # -- IP6 s7 = chr(65) print(s7.isprintable()...
23.571429
32
0.59697
s1 = 'I am space' print(s1.isprintable()) s2 = '\tTab is printable' print(s2.isprintable()) s3 = ' ' print(s3.isprintable()) s4 = 'c' print(s4.isprintable()) s5 = '3*2=6' print(s5.isprintable()) s6 = chr(8) print(s6.isprintable()) s7 = chr(65) print(s7.isprintable())
true
true
08f30fbe9450897a6d6e3b1f5f85f497085da148
2,865
py
Python
dot_vim/plugged/ultisnips/test/test_Choices.py
gabefgonc/san-francisco-rice-dotfiles
60ff3539f34ecfff6d7bce895497e2a3805910d4
[ "MIT" ]
10
2020-07-21T21:59:54.000Z
2021-07-19T11:01:47.000Z
dot_vim/plugged/ultisnips/test/test_Choices.py
gabefgonc/san-francisco-rice-dotfiles
60ff3539f34ecfff6d7bce895497e2a3805910d4
[ "MIT" ]
null
null
null
dot_vim/plugged/ultisnips/test/test_Choices.py
gabefgonc/san-francisco-rice-dotfiles
60ff3539f34ecfff6d7bce895497e2a3805910d4
[ "MIT" ]
1
2021-01-30T18:17:01.000Z
2021-01-30T18:17:01.000Z
from test.vim_test_case import VimTestCase as _VimTest from test.constant import * class Choices_WillBeExpandedToInlineSelection(_VimTest): snippets = ("test", "${1|red,gray|}") keys = "test" + EX wanted = "1.red|2.gray" class Choices_ExpectCorrectResult(_VimTest): snippets = ("test", "${1|red,gray|}...
29.536082
84
0.642583
from test.vim_test_case import VimTestCase as _VimTest from test.constant import * class Choices_WillBeExpandedToInlineSelection(_VimTest): snippets = ("test", "${1|red,gray|}") keys = "test" + EX wanted = "1.red|2.gray" class Choices_ExpectCorrectResult(_VimTest): snippets = ("test", "${1|red,gray|}...
true
true
08f3116432712f82534ca5bf38eb271a4e644c41
4,408
py
Python
find_days_above_percentile.py
duartecosta1/first_repository
6e31c8499c9d723ac876c9796c990de4a962174b
[ "MIT" ]
null
null
null
find_days_above_percentile.py
duartecosta1/first_repository
6e31c8499c9d723ac876c9796c990de4a962174b
[ "MIT" ]
null
null
null
find_days_above_percentile.py
duartecosta1/first_repository
6e31c8499c9d723ac876c9796c990de4a962174b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri May 6 14:54:23 2016 @author: annaukkola """ def find_days_above_percentile(mod_vec, no_days, percentile=100, other_vars={}, lags=float('nan'), miss_val=float('nan')): # source packages import sys import os import numpy as np...
31.262411
106
0.467559
def find_days_above_percentile(mod_vec, no_days, percentile=100, other_vars={}, lags=float('nan'), miss_val=float('nan')): import sys import os import numpy as np mod_vec = np.asarray(mod_vec) if percentile == 100...
true
true
08f311a8165a8beb5f2113770e7c08af7033cc69
19,805
py
Python
ghida_plugin/lib.py
wumb0/GhIDA
85949eae1086a857b29457664f9ad823b49cc42e
[ "Apache-2.0" ]
1
2019-09-17T15:10:09.000Z
2019-09-17T15:10:09.000Z
ghida_plugin/lib.py
wumb0/GhIDA
85949eae1086a857b29457664f9ad823b49cc42e
[ "Apache-2.0" ]
null
null
null
ghida_plugin/lib.py
wumb0/GhIDA
85949eae1086a857b29457664f9ad823b49cc42e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################## # # # GhIDA: Ghidra decompiler for IDA Pro # # ...
31.23817
79
0.506084
import json import os import signal import sys import tempfile import time import Queue import random import requests import string import subprocess import threading import ida_auto import ida_kernwin import idaapi import idautils import idc from idaxml import Cancelled from idaxml import XmlExporter COUNTER_MAX...
true
true
08f3123a2b978e1d773184108568f0b76ecf2638
218
py
Python
src/apps/pinax_theme_bootstrap/conf.py
GotlingSystem/apnea
6b2c0bdaa3733b5ec19456aae6177da4a13ab7d1
[ "MIT" ]
null
null
null
src/apps/pinax_theme_bootstrap/conf.py
GotlingSystem/apnea
6b2c0bdaa3733b5ec19456aae6177da4a13ab7d1
[ "MIT" ]
3
2015-02-14T18:51:19.000Z
2015-02-24T07:44:05.000Z
src/apps/pinax_theme_bootstrap/conf.py
GotlingSystem/apnea
6b2c0bdaa3733b5ec19456aae6177da4a13ab7d1
[ "MIT" ]
null
null
null
from django.conf import settings # noqa from appconf import AppConf class ThemeAppConf(AppConf): ADMIN_URL = "admin:index" CONTACT_EMAIL = "support@apnea.gosy.se" class Meta: prefix = "theme"
16.769231
43
0.688073
from django.conf import settings from appconf import AppConf class ThemeAppConf(AppConf): ADMIN_URL = "admin:index" CONTACT_EMAIL = "support@apnea.gosy.se" class Meta: prefix = "theme"
true
true
08f3134064ffa3897bdcb224626b32077df950a0
1,522
py
Python
pycoin_grs/services/bitcoind.py
joenilan/pycoin-grs
3bf1107c33f699144f1f931098517d0d2fbd31ad
[ "MIT" ]
null
null
null
pycoin_grs/services/bitcoind.py
joenilan/pycoin-grs
3bf1107c33f699144f1f931098517d0d2fbd31ad
[ "MIT" ]
null
null
null
pycoin_grs/services/bitcoind.py
joenilan/pycoin-grs
3bf1107c33f699144f1f931098517d0d2fbd31ad
[ "MIT" ]
null
null
null
from pycoin_grs.serialize import b2h, b2h_rev from pycoin_grs.tx import Tx class BitcoindProvider(object): def __init__(self, bitcoind_url): try: from bitcoinrpc.authproxy import AuthServiceProxy except ImportError: print("This script depends upon python-bitcoinrpc.") ...
36.238095
85
0.683311
from pycoin_grs.serialize import b2h, b2h_rev from pycoin_grs.tx import Tx class BitcoindProvider(object): def __init__(self, bitcoind_url): try: from bitcoinrpc.authproxy import AuthServiceProxy except ImportError: print("This script depends upon python-bitcoinrpc.") ...
true
true
08f31365ff287cb6407a13fe5dbd15a4dfa2744c
980
py
Python
utils/update_checker.py
thisnameisalreadyused2/NotifyMeBot
ccea868d7573b582e65421b9ea75badb3ce6de3a
[ "MIT" ]
null
null
null
utils/update_checker.py
thisnameisalreadyused2/NotifyMeBot
ccea868d7573b582e65421b9ea75badb3ce6de3a
[ "MIT" ]
null
null
null
utils/update_checker.py
thisnameisalreadyused2/NotifyMeBot
ccea868d7573b582e65421b9ea75badb3ce6de3a
[ "MIT" ]
null
null
null
import time, datetime from threading import Thread from DB import Database db = Database("db") def format_str(type, timestamp): format_str = "%d.%m.%Y" if type == "birthday" else "%d.%m.%Y %H:%M" return datetime.datetime.utcfromtimestamp(timestamp).strftime(format_str) class MyThread(Thread): def __ini...
32.666667
89
0.593878
import time, datetime from threading import Thread from DB import Database db = Database("db") def format_str(type, timestamp): format_str = "%d.%m.%Y" if type == "birthday" else "%d.%m.%Y %H:%M" return datetime.datetime.utcfromtimestamp(timestamp).strftime(format_str) class MyThread(Thread): def __ini...
true
true
08f3141207412b2917e48053da5baf35263cd08c
9,246
py
Python
tests/test_utils.py
festinuz/async-firebase
095687d803fb315a1a96c3de0a9e33b9a45510c3
[ "MIT" ]
20
2021-02-11T18:54:39.000Z
2022-02-14T14:31:25.000Z
tests/test_utils.py
festinuz/async-firebase
095687d803fb315a1a96c3de0a9e33b9a45510c3
[ "MIT" ]
3
2021-09-01T10:30:51.000Z
2022-02-07T17:53:49.000Z
tests/test_utils.py
festinuz/async-firebase
095687d803fb315a1a96c3de0a9e33b9a45510c3
[ "MIT" ]
3
2021-07-15T09:53:35.000Z
2022-01-05T05:30:13.000Z
import asyncio import inspect import time import sys import threading from concurrent.futures.thread import ThreadPoolExecutor import pytest from async_firebase.messages import ( AndroidConfig, AndroidNotification, APNSConfig, APNSPayload, Aps, ApsAlert, Message, Notification, Push...
31.773196
108
0.448843
import asyncio import inspect import time import sys import threading from concurrent.futures.thread import ThreadPoolExecutor import pytest from async_firebase.messages import ( AndroidConfig, AndroidNotification, APNSConfig, APNSPayload, Aps, ApsAlert, Message, Notification, Push...
true
true
08f314568f739a55d0e94c186047af66b36eab91
2,567
py
Python
gestures_Tello_v1.1.py
ilkatsanis/Tello-control-with-arduino-nano-33-ble-sense
7a57be7370f626d951852895ec7e849a6e256235
[ "MIT" ]
null
null
null
gestures_Tello_v1.1.py
ilkatsanis/Tello-control-with-arduino-nano-33-ble-sense
7a57be7370f626d951852895ec7e849a6e256235
[ "MIT" ]
null
null
null
gestures_Tello_v1.1.py
ilkatsanis/Tello-control-with-arduino-nano-33-ble-sense
7a57be7370f626d951852895ec7e849a6e256235
[ "MIT" ]
null
null
null
# CLOSE ARDUINO'S SERIAL MONITOR TO CONTROL THE DRONE # import the necessary packages from djitellopy import Tello import time import serial """ The detected gestures need to be read from microcontroller's serial output to the laptop and then pass them to drone """ # declare the serial port - may be different each time...
30.2
83
0.617063
# import the necessary packages from djitellopy import Tello import time import serial # declare the serial port - may be different each time ser = serial.Serial('/dev/cu.usbmodem1401') ser_bytes = ser.readline() # read from port # activate the drone with any gesture ser.flushInput() # initialize tello object tello =...
true
true
08f314ff01b96f2030918fecea665d926201d695
3,716
py
Python
python/gameoflife.py
lfkeitel/gameoflife
2f82fba0ac3b544121b790a068fc1ea5c5aabb1b
[ "MIT" ]
null
null
null
python/gameoflife.py
lfkeitel/gameoflife
2f82fba0ac3b544121b790a068fc1ea5c5aabb1b
[ "MIT" ]
null
null
null
python/gameoflife.py
lfkeitel/gameoflife
2f82fba0ac3b544121b790a068fc1ea5c5aabb1b
[ "MIT" ]
null
null
null
#! /usr/bin/env python3.6 import random import copy class Grid: grid = [] width = 0 height = 0 def __init__(self, width, height): grid = [] for i in range(0, height): grid.append([]) for _ in range(0, width): grid[i].append(0) self.grid =...
27.124088
83
0.515877
import random import copy class Grid: grid = [] width = 0 height = 0 def __init__(self, width, height): grid = [] for i in range(0, height): grid.append([]) for _ in range(0, width): grid[i].append(0) self.grid = grid self.width =...
true
true
08f315a30a900279dc4f057cba4a176537dadc6f
2,304
py
Python
tests/unit/lf3py/aws/test_decode.py
rog-works/lf3py
e89937f7aa133ed54d85764f06101ab9abf6b960
[ "CNRI-Python" ]
null
null
null
tests/unit/lf3py/aws/test_decode.py
rog-works/lf3py
e89937f7aa133ed54d85764f06101ab9abf6b960
[ "CNRI-Python" ]
48
2020-12-19T13:47:26.000Z
2021-01-07T22:27:56.000Z
tests/unit/lf3py/aws/test_decode.py
rog-works/lf3py
e89937f7aa133ed54d85764f06101ab9abf6b960
[ "CNRI-Python" ]
null
null
null
import base64 import json from unittest import TestCase import urllib.parse from lf3py.aws.api.decode import decode_request from lf3py.aws.types import LambdaEvent from lf3py.test.helper import data_provider class TestDecode(TestCase): @data_provider([ ( { 'requestContext': {}...
35.446154
143
0.443142
import base64 import json from unittest import TestCase import urllib.parse from lf3py.aws.api.decode import decode_request from lf3py.aws.types import LambdaEvent from lf3py.test.helper import data_provider class TestDecode(TestCase): @data_provider([ ( { 'requestContext': {}...
true
true
08f317f42e2a343ab3b04727582a2c8aba7846b5
1,705
py
Python
tests/utils/test_session.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
tests/utils/test_session.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
tests/utils/test_session.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
32.169811
91
0.723754
import pytest from airflow.utils.session import provide_session class TestSession: def dummy_session(self, session=None): return session def test_raised_provide_session(self): with pytest.raises(ValueError, match="Function .*dummy has no `session` argument"): @provide_session ...
true
true
08f318bdee35952f0473781afe501c87db0fc91a
6,023
py
Python
Packs/PerceptionPoint/Integrations/PerceptionPoint/PerceptionPoint.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/PerceptionPoint/Integrations/PerceptionPoint/PerceptionPoint.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/PerceptionPoint/Integrations/PerceptionPoint/PerceptionPoint.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * ''' IMPORTS''' import requests import json from collections import defaultdict ''' INTEGRATION PARAMS ''' URL = 'http://api.perception-point.io/api/v1/{endpoint}' # disable-secrets-detection INCIDENTS_ENDPOINT = 'scans/incidents/' RELEASE_ENDPOINT = 'qua...
33.093407
93
0.643865
import demistomock as demisto from CommonServerPython import * import requests import json from collections import defaultdict URL = 'http://api.perception-point.io/api/v1/{endpoint}' INCIDENTS_ENDPOINT = 'scans/incidents/' RELEASE_ENDPOINT = 'quarantine/release/{id_}' USER_PARAMS = demisto.params() SECURED = not U...
true
true
08f319cc3d8100f30879e0a3b95eaf66dd3f6810
12,829
py
Python
tests/v1/test_image_manager.py
limvus/limbook-api
26c1c2493c4115532b3c8cdc8f6c79c16108ca20
[ "MIT" ]
null
null
null
tests/v1/test_image_manager.py
limvus/limbook-api
26c1c2493c4115532b3c8cdc8f6c79c16108ca20
[ "MIT" ]
32
2020-05-10T03:42:43.000Z
2022-01-13T02:40:25.000Z
tests/v1/test_image_manager.py
limvus/limbook-api
26c1c2493c4115532b3c8cdc8f6c79c16108ca20
[ "MIT" ]
null
null
null
import io import os from unittest import main from flask import json from limbook_api.v1.image_manager import generate_img_in_bytes, generate_image from limbook_api.v1.posts import generate_post from tests.base import BaseTestCase, test_user_id, api_base, pagination_limit class ImageManagerTestCase(BaseTestCase): ...
31.75495
78
0.563021
import io import os from unittest import main from flask import json from limbook_api.v1.image_manager import generate_img_in_bytes, generate_image from limbook_api.v1.posts import generate_post from tests.base import BaseTestCase, test_user_id, api_base, pagination_limit class ImageManagerTestCase(BaseTestCase): ...
true
true
08f31a109c879892a9b8be29235e40cee368bfee
3,067
py
Python
src/globus_cli/parsing/shell_completion.py
sirosen/temp-cli-test
416fd3fea17b4c7c2cf35d6ccde63cb5719a1af6
[ "Apache-2.0" ]
47
2016-04-21T19:51:17.000Z
2022-02-25T14:13:30.000Z
src/globus_cli/parsing/shell_completion.py
sirosen/temp-cli-test
416fd3fea17b4c7c2cf35d6ccde63cb5719a1af6
[ "Apache-2.0" ]
421
2016-04-20T18:45:24.000Z
2022-03-14T14:50:41.000Z
src/globus_cli/parsing/shell_completion.py
sirosen/temp-cli-test
416fd3fea17b4c7c2cf35d6ccde63cb5719a1af6
[ "Apache-2.0" ]
20
2016-09-10T20:25:27.000Z
2021-10-06T16:02:47.000Z
import os import click # pulled by running `_GLOBUS_COMPLETE=source globus` in a bash shell BASH_SHELL_COMPLETER = r""" _globus_completion() { local IFS=$'\n' local response response=$(env COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD _GLOBUS_COMPLETE=bash_complete $1) for completion in $resp...
26.903509
118
0.561787
import os import click BASH_SHELL_COMPLETER = r""" _globus_completion() { local IFS=$'\n' local response response=$(env COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD _GLOBUS_COMPLETE=bash_complete $1) for completion in $response; do IFS=',' read type value <<< "$completion" i...
true
true
08f31a28bb9f437b1ac56092bdd85c86474a4d28
2,606
py
Python
.history/my_classes/FirstClassFunctions/reducing_functions_20210707155241.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/reducing_functions_20210707155241.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/reducing_functions_20210707155241.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
"""Reducing Functions in Python These are functions that recombine an iterable recursively, ending up with a single return value Also called accumulators, aggregators, or folding functions Example: Finding the maximum value in an iterable a0, a1, a2, ...,, aN-1 max(a, b) _> maximum of a and b result =a0 r...
27.145833
96
0.465081
"""Reducing Functions in Python These are functions that recombine an iterable recursively, ending up with a single return value Also called accumulators, aggregators, or folding functions Example: Finding the maximum value in an iterable a0, a1, a2, ...,, aN-1 max(a, b) _> maximum of a and b result =a0 r...
false
true
08f31a312398cd89d16f181bd3ea35840c30a834
98
py
Python
backend/pai_messages/apps.py
projectpai/paipass
8b8e70b6808bf026cf957e240c7eed7bfcf4c55d
[ "MIT" ]
3
2021-04-17T10:20:26.000Z
2022-03-08T07:36:13.000Z
backend/pai_messages/apps.py
projectpai/paipass
8b8e70b6808bf026cf957e240c7eed7bfcf4c55d
[ "MIT" ]
null
null
null
backend/pai_messages/apps.py
projectpai/paipass
8b8e70b6808bf026cf957e240c7eed7bfcf4c55d
[ "MIT" ]
null
null
null
from django.apps import AppConfig class PaiMessagesConfig(AppConfig): name = 'pai_messages'
16.333333
35
0.77551
from django.apps import AppConfig class PaiMessagesConfig(AppConfig): name = 'pai_messages'
true
true
08f31a33f59e1766352aaca9105f21bde74cdec6
1,198
py
Python
prism/cmds/fun/ascii.py
ii-Python/Prism-v3
15a43161b41117529c915726e6270259f05d187d
[ "MIT" ]
3
2021-11-26T22:08:11.000Z
2021-12-23T21:42:22.000Z
prism/cmds/fun/ascii.py
wannurhadi/Prism-v3
514f8d17072bf208c42e68391bce471c7d608269
[ "MIT" ]
1
2021-07-07T22:37:10.000Z
2021-07-07T22:40:11.000Z
prism/cmds/fun/ascii.py
wannurhadi/Prism-v3
514f8d17072bf208c42e68391bce471c7d608269
[ "MIT" ]
1
2021-12-23T21:42:24.000Z
2021-12-23T21:42:24.000Z
# Copyright 2021-xx iiPython # Modules import discord from discord.ext import commands from discord.commands import Option from pyfiglet import Figlet, FigletError # Command class class Ascii(commands.Cog): def __init__(self, bot) -> None: self.bot = bot self.core = bot.core @commands.slash_c...
28.52381
99
0.579299
import discord from discord.ext import commands from discord.commands import Option from pyfiglet import Figlet, FigletError class Ascii(commands.Cog): def __init__(self, bot) -> None: self.bot = bot self.core = bot.core @commands.slash_command(description = "Turns text into ASCII art.") ...
true
true
08f31a38ce8101cb7cf051d8c32634b0012d7bc7
714
py
Python
PythonDataProcessing/main.py
PokeLegoCuber/BigRedHackVProject
14e68152cc4e1441ddacb3a909d81b9c688e47ab
[ "CC-BY-3.0" ]
null
null
null
PythonDataProcessing/main.py
PokeLegoCuber/BigRedHackVProject
14e68152cc4e1441ddacb3a909d81b9c688e47ab
[ "CC-BY-3.0" ]
null
null
null
PythonDataProcessing/main.py
PokeLegoCuber/BigRedHackVProject
14e68152cc4e1441ddacb3a909d81b9c688e47ab
[ "CC-BY-3.0" ]
null
null
null
""" Reading inputs from a file and outputs corresponding result in a file Takes in state abbreviation and county name and outputs house fire risk (int) Based on data from Red Cross Smoke Alarm Map Author: Haoxuan Chen Date: 2019/9/22 """ import pandas as pd df = pd.read_csv('d.csv') with open ("input.tx...
27.461538
106
0.612045
import pandas as pd df = pd.read_csv('d.csv') with open ("input.txt", "r") as myfile: i = myfile.readlines() s = i[0] statein = s[:s.index(" ")] county = s[s.index(" ")+1:].replace(" ","") try: out = open("result.txt", "w") out.write(str(int(df.loc[(df['stateAbbrev'] == statein) & (df['county...
true
true
08f31a58e8083eaf3c98117c6bbf632ddf58b0b3
4,254
py
Python
validator/sawtooth_validator/consensus/notifier.py
shresthichauhan/sawtooth-core
2fd4c81ea6f2be182590cb66af7719c457830764
[ "Apache-2.0" ]
null
null
null
validator/sawtooth_validator/consensus/notifier.py
shresthichauhan/sawtooth-core
2fd4c81ea6f2be182590cb66af7719c457830764
[ "Apache-2.0" ]
null
null
null
validator/sawtooth_validator/consensus/notifier.py
shresthichauhan/sawtooth-core
2fd4c81ea6f2be182590cb66af7719c457830764
[ "Apache-2.0" ]
1
2018-12-18T08:38:39.000Z
2018-12-18T08:38:39.000Z
# Copyright 2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
40.514286
80
0.665961
import hashlib import logging from sawtooth_validator.concurrent.atomic import ConcurrentSet from sawtooth_validator.protobuf import consensus_pb2 from sawtooth_validator.protobuf import validator_pb2 LOGGER = logging.getLogger(__name__) class ConsensusNotifier: def __init__(self, consensus_service): ...
true
true
08f31a91bdebe0f4e9da9398c37d4429d2a5494c
8,041
py
Python
2021-11-08/ng2.py
efurlanm/tama21
5849f2b730a99ca7cca2d1cb27442d321f12419b
[ "CC-BY-4.0", "MIT" ]
null
null
null
2021-11-08/ng2.py
efurlanm/tama21
5849f2b730a99ca7cca2d1cb27442d321f12419b
[ "CC-BY-4.0", "MIT" ]
null
null
null
2021-11-08/ng2.py
efurlanm/tama21
5849f2b730a99ca7cca2d1cb27442d321f12419b
[ "CC-BY-4.0", "MIT" ]
null
null
null
import numpy as np, math from time import time from mpi4py import MPI from numba import cuda, njit, prange, config # parameters n = 4800 # n x n grid energy = 1.0 # energy to be injected per iteration niters = 500 # number of iterations # initialize three heat sources nsources = 3...
32.423387
73
0.585375
import numpy as np, math from time import time from mpi4py import MPI from numba import cuda, njit, prange, config n = 4800 energy = 1.0 niters = 500 nsources = 3 sources = np.zeros((nsources, 2), np.int16) sources[:,:] = [ [n//2, n//2], [n//3, n//3], [n*4//5, n*8//9] ]...
true
true
08f31b15b55115327b88592955c1a0da5e2198be
1,290
py
Python
programmer_algorithm_interview/prj/production_codes/lcr_implementation.py
youngsheep7/datastructure_algorithm_for_python
6a0601274a6cf0954f5203beea493abe105cf7fb
[ "Apache-2.0" ]
null
null
null
programmer_algorithm_interview/prj/production_codes/lcr_implementation.py
youngsheep7/datastructure_algorithm_for_python
6a0601274a6cf0954f5203beea493abe105cf7fb
[ "Apache-2.0" ]
null
null
null
programmer_algorithm_interview/prj/production_codes/lcr_implementation.py
youngsheep7/datastructure_algorithm_for_python
6a0601274a6cf0954f5203beea493abe105cf7fb
[ "Apache-2.0" ]
null
null
null
""" LCR(Least Recently Used)代码实现,基于deque实现 1、内容不存在,则插入deque最左侧 2、内容存在,则将其移至最左侧 """ from collections import deque class LCR: def __init__(self, size): self.size = size self.queue = deque() self.queue_hashset = set() def _en_lcr(self, item): if le...
20.806452
49
0.551163
from collections import deque class LCR: def __init__(self, size): self.size = size self.queue = deque() self.queue_hashset = set() def _en_lcr(self, item): if len(self.queue) == self.size: self._de_lcr() self.queue.appendlef...
true
true
08f31b8a73f6db8daa0434798a7a4f276b2078f0
14,948
py
Python
tests/unit/states/test_pip_state.py
johnj/salt
b23656fa5ee24047c43ac702d6796a700570f749
[ "Apache-2.0" ]
5
2017-02-07T05:39:29.000Z
2020-06-13T02:07:33.000Z
tests/unit/states/test_pip_state.py
johnj/salt
b23656fa5ee24047c43ac702d6796a700570f749
[ "Apache-2.0" ]
86
2017-01-27T11:54:46.000Z
2020-05-20T06:25:26.000Z
tests/unit/states/test_pip_state.py
johnj/salt
b23656fa5ee24047c43ac702d6796a700570f749
[ "Apache-2.0" ]
11
2017-01-26T19:36:29.000Z
2021-12-11T07:54:16.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: Pedro Algarvio (pedro@algarvio.me) tests.unit.states.pip_test ~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' # Import python libs from __future__ import absolute_import, print_function, unicode_literals import logging import sys # Import Salt Testing libs from tests.support.mixi...
47.757188
98
0.494046
from __future__ import absolute_import, print_function, unicode_literals import logging import sys from tests.support.mixins import LoaderModuleMockMixin, SaltReturnAssertsMixin from tests.support.unit import skipIf, TestCase from tests.support.mock import NO_MOCK, NO_MOCK_REASON, MagicMock, patch import salt.states...
true
true
08f31c09f19d4936d6440b5431cb0b36c0f76587
9,456
py
Python
benchmarks/coin_store.py
geoffwalmsley/chia-blockchain
1b2d119cc340b34d9dc5864389e37e0ad49e1050
[ "Apache-2.0" ]
1
2022-03-15T06:41:49.000Z
2022-03-15T06:41:49.000Z
benchmarks/coin_store.py
Hydrangea-Network/hydrangea-blockchain
d15662329958dbdaa9cbd99733ba729f0e74ce54
[ "Apache-2.0" ]
1
2022-03-29T03:05:10.000Z
2022-03-29T03:05:10.000Z
benchmarks/coin_store.py
chiameh/chia-blockchain
915513d87407e746a4b990b4c7055163598e8319
[ "Apache-2.0" ]
null
null
null
import asyncio import random from time import monotonic from pathlib import Path from chia.full_node.coin_store import CoinStore from typing import List, Tuple import os import sys from chia.util.db_wrapper import DBWrapper2 from chia.types.blockchain_format.sized_bytes import bytes32 from chia.types.blockchain_format...
30.019048
102
0.546426
import asyncio import random from time import monotonic from pathlib import Path from chia.full_node.coin_store import CoinStore from typing import List, Tuple import os import sys from chia.util.db_wrapper import DBWrapper2 from chia.types.blockchain_format.sized_bytes import bytes32 from chia.types.blockchain_format...
true
true
08f31cdc3d33a6903bb2129e93cdef8536f6e513
1,782
py
Python
parsing/bson/languages.py
sniperkit/snk.fork.devmine-features
f842507d1ee8a14c2d2c2647087d5b54b26e6740
[ "BSD-3-Clause" ]
null
null
null
parsing/bson/languages.py
sniperkit/snk.fork.devmine-features
f842507d1ee8a14c2d2c2647087d5b54b26e6740
[ "BSD-3-Clause" ]
null
null
null
parsing/bson/languages.py
sniperkit/snk.fork.devmine-features
f842507d1ee8a14c2d2c2647087d5b54b26e6740
[ "BSD-3-Clause" ]
2
2017-05-20T13:55:37.000Z
2018-08-12T15:52:56.000Z
from __future__ import print_function import sys import os import tarfile from bsonstream import KeyValueBSONInput def read_languages(sourcedir, outdir): # Read user_langs = {} languages = set() for fname in os.listdir(sourcedir): print("Opening " + fname) f = tarfile.open(sourcedir +...
30.724138
87
0.528058
from __future__ import print_function import sys import os import tarfile from bsonstream import KeyValueBSONInput def read_languages(sourcedir, outdir): user_langs = {} languages = set() for fname in os.listdir(sourcedir): print("Opening " + fname) f = tarfile.open(sourcedir + "/" + ...
true
true
08f31d0d761b337a949b3d1002f87408b7851f35
3,693
py
Python
benchmark/imagenet/gpipemodels/resnet/resnet.py
animeshtrivedi/surf-ml
73102c69f303d5b289841e6116a607561e36595c
[ "Apache-2.0" ]
9
2020-10-21T11:40:51.000Z
2021-09-25T07:50:22.000Z
benchmark/imagenet/gpipemodels/resnet/resnet.py
animeshtrivedi/surf-ml
73102c69f303d5b289841e6116a607561e36595c
[ "Apache-2.0" ]
null
null
null
benchmark/imagenet/gpipemodels/resnet/resnet.py
animeshtrivedi/surf-ml
73102c69f303d5b289841e6116a607561e36595c
[ "Apache-2.0" ]
null
null
null
"""A ResNet implementation but using :class:`nn.Sequential`. :func:`resnet101` returns a :class:`nn.Sequential` instead of ``ResNet``. This code is transformed :mod:`torchvision.models.resnet`. """ from collections import OrderedDict from typing import Any, List from torch import nn from .block import bottleneck, b...
34.194444
97
0.635527
from collections import OrderedDict from typing import Any, List from torch import nn from .block import bottleneck, basicblock from .flatten_sequential import flatten_sequential __all__ = ['inet_resnet18', 'inet_resnet34', 'inet_resnet50', 'inet_resnet101', 'inet_resnet152'] def build_resnet(layers, block, num_cla...
true
true
08f31e61b51e60aa7318df466f0b11a9a2a8215e
8,161
py
Python
docs/conf.py
vogt31337/pip
0007825733aa862e76a66e5d1cfee121c29192ff
[ "MIT" ]
1
2021-01-03T00:58:11.000Z
2021-01-03T00:58:11.000Z
docs/conf.py
vogt31337/pip
0007825733aa862e76a66e5d1cfee121c29192ff
[ "MIT" ]
null
null
null
docs/conf.py
vogt31337/pip
0007825733aa862e76a66e5d1cfee121c29192ff
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # pip documentation build configuration file, created by # sphinx-quickstart on Tue Apr 22 22:08:49 2008 # # This file is execfile()d with the current directory set to its containing dir # # Note that not all possible configuration values are present in this # autogenerated file. # # All confi...
31.509653
79
0.696728
import os import sys import glob on_rtd = os.environ.get('READTHEDOCS', None) == 'True' sys.path.insert(0, os.path.abspath(os.pardir)) extensions = ['sphinx.ext.extlinks', 'docs.pipext', 'sphinx.ext.intersphinx'] intersphinx_cache_limit = 0 intersphinx_mapping = { 'pypug': ('https://packaging.python.org/', No...
true
true
08f31e9394410a9e83c59e32e21b98f877e39a29
49,676
py
Python
Source/Generated/GenerateShaderCommon.py
pac85/RayTracedGL1
add5a73b5d359606d3bd350e696e64d97a9c6347
[ "MIT" ]
null
null
null
Source/Generated/GenerateShaderCommon.py
pac85/RayTracedGL1
add5a73b5d359606d3bd350e696e64d97a9c6347
[ "MIT" ]
null
null
null
Source/Generated/GenerateShaderCommon.py
pac85/RayTracedGL1
add5a73b5d359606d3bd350e696e64d97a9c6347
[ "MIT" ]
null
null
null
# Copyright (c) 2020-2021 Sultim Tsyrendashiev # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, p...
42.676976
159
0.57869
import sys import os import re from math import log2 TYPE_FLOAT32 = 0 TYPE_INT32 = 1 TYPE_UINT32 = 2 C_TYPE_NAMES = { TYPE_FLOAT32: "float", TYPE_INT32: "int32_t", TYPE_UINT32: "uint32_t", } GLSL_TYPE_NAMES = { TYPE_FLOAT32: "float", TYPE_INT32: ...
true
true
08f31f8d9aea0e510a58b5febe768e28414bdcd7
22,167
py
Python
dataprep/eda/missing/render.py
yuzhenmao/dataprep
1dbcddbf084ed49f719fe01f61d3e5e1ec418715
[ "MIT" ]
null
null
null
dataprep/eda/missing/render.py
yuzhenmao/dataprep
1dbcddbf084ed49f719fe01f61d3e5e1ec418715
[ "MIT" ]
null
null
null
dataprep/eda/missing/render.py
yuzhenmao/dataprep
1dbcddbf084ed49f719fe01f61d3e5e1ec418715
[ "MIT" ]
null
null
null
""" This module implements the plot_missing(df, x, y) function's visualization part. """ from typing import Any, Dict, List, Optional, Sequence, Tuple import numpy as np import pandas as pd from bokeh.layouts import row from bokeh.models import ( BasicTicker, CategoricalColorMapper, ColorBar, C...
31.046218
98
0.578879
from typing import Any, Dict, List, Optional, Sequence, Tuple import numpy as np import pandas as pd from bokeh.layouts import row from bokeh.models import ( BasicTicker, CategoricalColorMapper, ColorBar, ColumnDataSource, CustomJSHover, FactorRange, FuncTickFormatter, HoverTool, Li...
true
true
08f31f95746a1da5f6e6c5fb614bbf0183617b8c
15,228
py
Python
ax/models/torch/botorch_moo.py
0xgpapad/Ax
32a828d579ac707d59741d4cc9080f26323d6c38
[ "MIT" ]
1
2022-02-10T10:51:40.000Z
2022-02-10T10:51:40.000Z
ax/models/torch/botorch_moo.py
0xgpapad/Ax
32a828d579ac707d59741d4cc9080f26323d6c38
[ "MIT" ]
null
null
null
ax/models/torch/botorch_moo.py
0xgpapad/Ax
32a828d579ac707d59741d4cc9080f26323d6c38
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Any, Callable, Dict, List, Optional, Tuple import torch from ax.core.types import TCandidateMetad...
39.553247
88
0.650775
from typing import Any, Callable, Dict, List, Optional, Tuple import torch from ax.core.types import TCandidateMetadata, TConfig, TGenMetadata from ax.exceptions.core import AxError from ax.models.torch.botorch import ( BotorchModel, TAcqfConstructor, TBestPointRecommender, TModelConstructor, TMod...
true
true
08f31fe68d4ab80e60dc7256637e36c1bfcdbb63
5,508
py
Python
src/ezcode/tree/algorithm.py
zheng-gao/ez_code
fbf48990291aa57d6436d4548b0a6c25dfb8f82d
[ "MIT" ]
null
null
null
src/ezcode/tree/algorithm.py
zheng-gao/ez_code
fbf48990291aa57d6436d4548b0a6c25dfb8f82d
[ "MIT" ]
null
null
null
src/ezcode/tree/algorithm.py
zheng-gao/ez_code
fbf48990291aa57d6436d4548b0a6c25dfb8f82d
[ "MIT" ]
null
null
null
import sys from collections import deque from ezcode.tree.const import DATA_NAME, LEFT_NAME, RIGHT_NAME class BinaryTreeAlgorithm: """ Recursion Helpers """ def __init__(self, data_name: str = DATA_NAME, left_name: str = LEFT_NAME, right_name: str = RIGHT_NAME): self.data_name = data_name sel...
49.178571
182
0.661038
import sys from collections import deque from ezcode.tree.const import DATA_NAME, LEFT_NAME, RIGHT_NAME class BinaryTreeAlgorithm: def __init__(self, data_name: str = DATA_NAME, left_name: str = LEFT_NAME, right_name: str = RIGHT_NAME): self.data_name = data_name self.left_name = left_name ...
true
true
08f31fff7774cd6d880a621565533690d93c0b64
244
py
Python
article/urls.py
sirkor/Blog
bb6c4cd15abb7e30cf632a867e12c07a035f0c7a
[ "Unlicense" ]
null
null
null
article/urls.py
sirkor/Blog
bb6c4cd15abb7e30cf632a867e12c07a035f0c7a
[ "Unlicense" ]
null
null
null
article/urls.py
sirkor/Blog
bb6c4cd15abb7e30cf632a867e12c07a035f0c7a
[ "Unlicense" ]
null
null
null
from django.conf.urls import url, patterns, include urlpatterns = [ url(r'^articles/all/$', 'article.views.articles'), url(r'^articles/get/(?P<article_id>\d+)/$', 'article.views.article'), url(r'^$', 'article.views.articles'), ]
24.4
73
0.647541
from django.conf.urls import url, patterns, include urlpatterns = [ url(r'^articles/all/$', 'article.views.articles'), url(r'^articles/get/(?P<article_id>\d+)/$', 'article.views.article'), url(r'^$', 'article.views.articles'), ]
true
true
08f320676ca954d800983776f8ec915a21de2e74
5,195
py
Python
services/TypePrediction/solver.py
muhammad-abbady/JenTab
df7b1450cb14e64edade30ea7de49d05a7d7dbf2
[ "Apache-2.0" ]
null
null
null
services/TypePrediction/solver.py
muhammad-abbady/JenTab
df7b1450cb14e64edade30ea7de49d05a7d7dbf2
[ "Apache-2.0" ]
null
null
null
services/TypePrediction/solver.py
muhammad-abbady/JenTab
df7b1450cb14e64edade30ea7de49d05a7d7dbf2
[ "Apache-2.0" ]
null
null
null
from concreteTypes.boolean_type import Boolean from concreteTypes.email_type import Email from concreteTypes.url_type import URL from concreteTypes.phone_type import Phone from concreteTypes.numeral_type import Numeral from concreteTypes.ordinal_type import Ordinal from concreteTypes.date_type import Date from concrete...
30.203488
117
0.615399
from concreteTypes.boolean_type import Boolean from concreteTypes.email_type import Email from concreteTypes.url_type import URL from concreteTypes.phone_type import Phone from concreteTypes.numeral_type import Numeral from concreteTypes.ordinal_type import Ordinal from concreteTypes.date_type import Date from concrete...
true
true
08f3210c703edb21ca0518c42e6be265e18c6a5e
4,241
py
Python
violin_midcurve.py
nxbrnt/spotify_data_project
37b1c98e3c032f1751ee91b873ecc7b2890595a2
[ "MIT" ]
null
null
null
violin_midcurve.py
nxbrnt/spotify_data_project
37b1c98e3c032f1751ee91b873ecc7b2890595a2
[ "MIT" ]
null
null
null
violin_midcurve.py
nxbrnt/spotify_data_project
37b1c98e3c032f1751ee91b873ecc7b2890595a2
[ "MIT" ]
null
null
null
#Imports here for writefile magic only. Not Pythonic. import seaborn as sns import numpy as np from scipy.interpolate import interp1d red = (1,0,0) blue = (0,.475,1) #Same relative luminance as primary red (approx) #can remove a lot of these params for ordering. just wanna be able to flip #which goes to left vs right...
37.530973
79
0.636878
import seaborn as sns import numpy as np from scipy.interpolate import interp1d red = (1,0,0) blue = (0,.475,1) def extract_violin_curves(p): left_points = p.collections[0].get_paths()[0].vertices right_points = p.collections[1].get_paths()[0].vertices left_points = [ (a,b) for a,b in left_points...
true
true
08f321ef7eca9dcc57b3f416ba1597019b108dfd
243
py
Python
banners/__init__.py
titu3e/gacha-bot
23613ef3fe9531697fb227c0f59502559c9d3be8
[ "MIT" ]
null
null
null
banners/__init__.py
titu3e/gacha-bot
23613ef3fe9531697fb227c0f59502559c9d3be8
[ "MIT" ]
null
null
null
banners/__init__.py
titu3e/gacha-bot
23613ef3fe9531697fb227c0f59502559c9d3be8
[ "MIT" ]
1
2022-01-19T11:31:45.000Z
2022-01-19T11:31:45.000Z
from .banners import * from .event_banners import * available_banners = { "venti": Venti, "childe": Tartaglia, "hutao": HuTao, "xiao": Xiao, "ganyu": Ganyu, "albedo": Albedo, "zhongli": Zhongli, "klee": Klee }
17.357143
28
0.592593
from .banners import * from .event_banners import * available_banners = { "venti": Venti, "childe": Tartaglia, "hutao": HuTao, "xiao": Xiao, "ganyu": Ganyu, "albedo": Albedo, "zhongli": Zhongli, "klee": Klee }
true
true
08f3220bf4c466907342bf22ae575fd68a36061c
6,516
py
Python
src/unity/python/turicreate/toolkits/_image_feature_extractor.py
TimothyRHuertas/turicreate
afa00bee56d168190c6f122e14c9fbc6656b4e97
[ "BSD-3-Clause" ]
null
null
null
src/unity/python/turicreate/toolkits/_image_feature_extractor.py
TimothyRHuertas/turicreate
afa00bee56d168190c6f122e14c9fbc6656b4e97
[ "BSD-3-Clause" ]
null
null
null
src/unity/python/turicreate/toolkits/_image_feature_extractor.py
TimothyRHuertas/turicreate
afa00bee56d168190c6f122e14c9fbc6656b4e97
[ "BSD-3-Clause" ]
1
2019-01-12T01:07:34.000Z
2019-01-12T01:07:34.000Z
# -*- coding: utf-8 -*- # Copyright © 2017 Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from __future__ import print_function as _ from __future__ import division as _ from...
39.017964
113
0.621547
from __future__ import print_function as _ from __future__ import division as _ from __future__ import absolute_import as _ from . import _mxnet_utils class ImageFeatureExtractor(object): def __init__(self, ptModel): pass def extract_features(self, dataset): pass def get_coreml_model(se...
true
true
08f32283ea4b94cae5e4820a55ed669c06b08df8
186
py
Python
{{cookiecutter.repo_name}}/{{cookiecutter.app_name}}/wsgi.py
MisLink/rest-django-cookiecutter
af01c0600ed3303cd948720373b5bf30c6179e17
[ "MIT" ]
null
null
null
{{cookiecutter.repo_name}}/{{cookiecutter.app_name}}/wsgi.py
MisLink/rest-django-cookiecutter
af01c0600ed3303cd948720373b5bf30c6179e17
[ "MIT" ]
null
null
null
{{cookiecutter.repo_name}}/{{cookiecutter.app_name}}/wsgi.py
MisLink/rest-django-cookiecutter
af01c0600ed3303cd948720373b5bf30c6179e17
[ "MIT" ]
null
null
null
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{cookiecutter.app_name}}.settings") application = get_wsgi_application()
23.25
85
0.817204
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{cookiecutter.app_name}}.settings") application = get_wsgi_application()
true
true
08f324ae5315f9af28ed852c0af0cc53b5c458fb
518
py
Python
gym_PBN/__init__.py
evangelos-ch/gym-pbn
b3c1f8560962c6969fba0eb2c054d73e4a81bfcc
[ "MIT" ]
null
null
null
gym_PBN/__init__.py
evangelos-ch/gym-pbn
b3c1f8560962c6969fba0eb2c054d73e4a81bfcc
[ "MIT" ]
null
null
null
gym_PBN/__init__.py
evangelos-ch/gym-pbn
b3c1f8560962c6969fba0eb2c054d73e4a81bfcc
[ "MIT" ]
null
null
null
from gym.envs.registration import register register(id="PBN-v0", entry_point="gym_PBN.envs:PBNEnv") register(id="PBN-sampled-data-v0", entry_point="gym_PBN.envs:PBNSampledDataEnv") register(id="PBN-self-triggering-v0", entry_point="gym_PBN.envs:PBNSelfTriggeringEnv") register(id="PBCN-v0", entry_point="gym_...
37
89
0.774131
from gym.envs.registration import register register(id="PBN-v0", entry_point="gym_PBN.envs:PBNEnv") register(id="PBN-sampled-data-v0", entry_point="gym_PBN.envs:PBNSampledDataEnv") register(id="PBN-self-triggering-v0", entry_point="gym_PBN.envs:PBNSelfTriggeringEnv") register(id="PBCN-v0", entry_point="gym_...
true
true
08f3254066db7cd2096253d99ca244f9e676c05c
671
py
Python
PythonExercicios/Mundo 1/ex023.py
gabryelvicthor/Aprendendo-Python
895c5ef2d93c946d1e61c1820b3d7e09669e59ca
[ "MIT" ]
null
null
null
PythonExercicios/Mundo 1/ex023.py
gabryelvicthor/Aprendendo-Python
895c5ef2d93c946d1e61c1820b3d7e09669e59ca
[ "MIT" ]
null
null
null
PythonExercicios/Mundo 1/ex023.py
gabryelvicthor/Aprendendo-Python
895c5ef2d93c946d1e61c1820b3d7e09669e59ca
[ "MIT" ]
null
null
null
from distutils import core num = int(input('Informe um número: ')) print('Analisando o número {}'.format(num)) u = num // 1 % 10 d = num // 10 % 10 c = num // 100 % 10 m = num // 1000 % 10 cores = {'limpa':'\033[m', 'verde':'\033[32m', 'vermelho':'\033[31m'} print('Unidade: {}{}'.format(u,cores['v...
26.84
48
0.576751
from distutils import core num = int(input('Informe um número: ')) print('Analisando o número {}'.format(num)) u = num // 1 % 10 d = num // 10 % 10 c = num // 100 % 10 m = num // 1000 % 10 cores = {'limpa':'\033[m', 'verde':'\033[32m', 'vermelho':'\033[31m'} print('Unidade: {}{}'.format(u,cores['v...
true
true
08f326633ddbc163011e2a4a9c306dc5fca5389a
13,499
py
Python
sklearn_porter/estimator/classifier/DecisionTreeClassifier/__init__.py
mathewdgardner/sklearn-porter
d8927a6af06e96dd416be759321e93691c39cf73
[ "MIT" ]
1
2022-02-15T12:44:37.000Z
2022-02-15T12:44:37.000Z
sklearn_porter/estimator/classifier/DecisionTreeClassifier/__init__.py
Stardustsky/sklearn-porter
d8927a6af06e96dd416be759321e93691c39cf73
[ "MIT" ]
null
null
null
sklearn_porter/estimator/classifier/DecisionTreeClassifier/__init__.py
Stardustsky/sklearn-porter
d8927a6af06e96dd416be759321e93691c39cf73
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import json from json import encoder from sklearn_porter.estimator.classifier.Classifier import Classifier class DecisionTreeClassifier(Classifier): """ See also -------- sklearn.tree.DecisionTreeClassifier http://scikit-learn.org/stable/modules/generated/ s...
38.458689
80
0.485295
import os import json from json import encoder from sklearn_porter.estimator.classifier.Classifier import Classifier class DecisionTreeClassifier(Classifier): SUPPORTED_METHODS = ['predict'] TEMPLATES = { 'c': { 'if': 'if (features[{0}] {1} {2}) {{', 'else': '}...
true
true
08f32aa69874058894c0ba411e500f0667784cb2
274
py
Python
datascience/video.py
cjwcommuny/datascience
c8438f3e3ba7cdf229ee23213cd17d187de73775
[ "MIT" ]
null
null
null
datascience/video.py
cjwcommuny/datascience
c8438f3e3ba7cdf229ee23213cd17d187de73775
[ "MIT" ]
null
null
null
datascience/video.py
cjwcommuny/datascience
c8438f3e3ba7cdf229ee23213cd17d187de73775
[ "MIT" ]
null
null
null
from typing import Set import pathlib LEGAL_VIDEO_FILE_EXTENSIONS: Set[str] = {".mp4", ".3gp", ".ogg", ".wmv", ".webm", ".flv", ".avi", ".mkv"} def is_legal_video_file_name(file_name: str): return pathlib.Path(file_name).suffix.lower() in LEGAL_VIDEO_FILE_EXTENSIONS
30.444444
105
0.711679
from typing import Set import pathlib LEGAL_VIDEO_FILE_EXTENSIONS: Set[str] = {".mp4", ".3gp", ".ogg", ".wmv", ".webm", ".flv", ".avi", ".mkv"} def is_legal_video_file_name(file_name: str): return pathlib.Path(file_name).suffix.lower() in LEGAL_VIDEO_FILE_EXTENSIONS
true
true
08f32c0a86aac08fcf829b2689184bccbb32ff54
708
py
Python
test_name_function.py
csy1993/PythonPractice
67efe09f6c01a90d4d39ccce45b00fb5980535d7
[ "Apache-2.0" ]
null
null
null
test_name_function.py
csy1993/PythonPractice
67efe09f6c01a90d4d39ccce45b00fb5980535d7
[ "Apache-2.0" ]
null
null
null
test_name_function.py
csy1993/PythonPractice
67efe09f6c01a90d4d39ccce45b00fb5980535d7
[ "Apache-2.0" ]
null
null
null
''' * @Author: csy * @Date: 2019-04-29 08:38:12 * @Last Modified by: csy * @Last Modified time: 2019-04-29 08:38:12 ''' import unittest from name_function import get_formatted_name class NamesTestCase(unittest.TestCase): '''测试name_function.py''' def test_first_last_name(self): '''能够正确处理janis jo...
29.5
72
0.701977
import unittest from name_function import get_formatted_name class NamesTestCase(unittest.TestCase): def test_first_last_name(self): formatted_name = get_formatted_name('janis', 'joplin') self.assertEqual(formatted_name, 'Janis Joplin') def test_first_last_middle_name(self): formatted...
true
true
08f32c6a211f55d93629dbc7f652b32f38511828
6,326
py
Python
sgl_labeling/model/single.py
manuel-rdz/SGL-Retinal-Vessel-Segmentation
7897d977e77aa0b5d3acb86e0aa74c6829d67415
[ "MIT" ]
45
2021-03-07T04:07:45.000Z
2022-03-28T01:52:00.000Z
sgl_labeling/model/single.py
manuel-rdz/SGL-Retinal-Vessel-Segmentation
7897d977e77aa0b5d3acb86e0aa74c6829d67415
[ "MIT" ]
6
2021-09-27T08:49:14.000Z
2022-03-10T20:23:31.000Z
sgl_labeling/model/single.py
manuel-rdz/SGL-Retinal-Vessel-Segmentation
7897d977e77aa0b5d3acb86e0aa74c6829d67415
[ "MIT" ]
9
2021-03-07T04:08:26.000Z
2022-03-28T06:06:53.000Z
import torch.nn as nn import torch import torch.nn.functional as F import numpy as np from model import common def make_model(args, parent=False): return MainNet() class EnhanceNet(nn.Module): def __init__(self): super(EnhanceNet, self).__init__() self.conv1 = self.conv_block(3,32) #se...
35.539326
95
0.529561
import torch.nn as nn import torch import torch.nn.functional as F import numpy as np from model import common def make_model(args, parent=False): return MainNet() class EnhanceNet(nn.Module): def __init__(self): super(EnhanceNet, self).__init__() self.conv1 = self.conv_block(3,32) ...
true
true