hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7217bf8d6fabaf470f63ef2822e2cba3024153c
7,292
py
Python
tensorflow_datasets/audio/fuss.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
2
2022-02-14T09:51:39.000Z
2022-02-14T13:27:49.000Z
tensorflow_datasets/audio/fuss.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/audio/fuss.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
1
2020-12-13T22:11:33.000Z
2020-12-13T22:11:33.000Z
# coding=utf-8 # Copyright 2022 The TensorFlow Datasets Authors. # # 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 appl...
37.782383
187
0.62932
import os from absl import logging import tensorflow as tf import tensorflow_datasets.public_api as tfds _CITATION = r"""\ @inproceedings{wisdom2020fuss, title = {What's All the {FUSS} About Free Universal Sound Separation Data?}, author = {Scott Wisdom and Hakan Erdogan and Daniel P. W. Ellis and ...
true
true
f7217c7974021f0ec405e5dff2a600a77498317d
538
py
Python
src/svm/get_vocab_dict.py
dimart10/machine-learning
0f33bef65a9335c0f7fed680f1112419bae8fabc
[ "MIT" ]
null
null
null
src/svm/get_vocab_dict.py
dimart10/machine-learning
0f33bef65a9335c0f7fed680f1112419bae8fabc
[ "MIT" ]
null
null
null
src/svm/get_vocab_dict.py
dimart10/machine-learning
0f33bef65a9335c0f7fed680f1112419bae8fabc
[ "MIT" ]
null
null
null
def getVocabDict(reverse=False): """ Function to read in the supplied vocab list text file into a dictionary. Dictionary key is the stemmed word, value is the index in the text file If "reverse", the keys and values are switched. """ vocab_dict = {} with open("../data/emails/vocab.txt") as f...
31.647059
76
0.581784
def getVocabDict(reverse=False): vocab_dict = {} with open("../data/emails/vocab.txt") as f: for line in f: (val, key) = line.split() if not reverse: vocab_dict[key] = int(val) else: vocab_dict[int(val)] = key return vocab_dict
true
true
f7217cb6c5888d602826730dbf6b55ce8ad59ff8
1,125
py
Python
clients/python/marquez_client/models.py
aridwiprayogo/marquez
b15e44fb7c2a0efcbe8ee8ce412144ac5ee68e0e
[ "Apache-2.0" ]
999
2018-07-07T01:36:21.000Z
2022-03-31T18:25:18.000Z
clients/python/marquez_client/models.py
aridwiprayogo/marquez
b15e44fb7c2a0efcbe8ee8ce412144ac5ee68e0e
[ "Apache-2.0" ]
1,681
2018-07-19T23:45:31.000Z
2022-03-31T22:21:07.000Z
clients/python/marquez_client/models.py
aridwiprayogo/marquez
b15e44fb7c2a0efcbe8ee8ce412144ac5ee68e0e
[ "Apache-2.0" ]
182
2018-08-02T11:35:45.000Z
2022-03-31T07:02:14.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
25
74
0.688889
from enum import Enum class DatasetId: def __init__(self, namespace: str, name: str): self.namespace = namespace self.name = name class JobId: def __init__(self, namespace: str, name: str): self.namespace = namespace self.name = name class DatasetType(Enum): ...
true
true
f7217ef251ef43a682f902818aa9a8aa8f1b0d93
2,145
py
Python
app/s3_client/s3_csv_client.py
alphagov/notify-admin-frontend
70f2a6a97aefe2432d7a3b54dc1555c030dd3693
[ "MIT" ]
33
2016-01-11T20:16:17.000Z
2021-11-23T12:50:29.000Z
app/s3_client/s3_csv_client.py
alphagov/notify-admin-frontend
70f2a6a97aefe2432d7a3b54dc1555c030dd3693
[ "MIT" ]
1,249
2015-11-30T16:43:21.000Z
2022-03-24T13:04:55.000Z
app/s3_client/s3_csv_client.py
alphagov/notify-admin-frontend
70f2a6a97aefe2432d7a3b54dc1555c030dd3693
[ "MIT" ]
36
2015-12-02T09:49:26.000Z
2021-04-10T18:05:41.000Z
import uuid import botocore from flask import current_app from notifications_utils.s3 import s3upload as utils_s3upload from app.s3_client.s3_logo_client import get_s3_object FILE_LOCATION_STRUCTURE = 'service-{}-notify/{}.csv' def get_csv_location(service_id, upload_id, bucket=None): return ( bucket o...
31.544118
91
0.699301
import uuid import botocore from flask import current_app from notifications_utils.s3 import s3upload as utils_s3upload from app.s3_client.s3_logo_client import get_s3_object FILE_LOCATION_STRUCTURE = 'service-{}-notify/{}.csv' def get_csv_location(service_id, upload_id, bucket=None): return ( bucket o...
true
true
f7217f0a995fcc98786c4617f284dd074799a176
3,622
py
Python
dfs_search.py
orionoiro/path_searcher
198888a4570b40812a53e8485387e8cd59fe20ee
[ "MIT" ]
null
null
null
dfs_search.py
orionoiro/path_searcher
198888a4570b40812a53e8485387e8cd59fe20ee
[ "MIT" ]
1
2021-06-08T19:43:09.000Z
2021-06-08T19:43:09.000Z
dfs_search.py
orionoiro/path_searcher
198888a4570b40812a53e8485387e8cd59fe20ee
[ "MIT" ]
null
null
null
from graph import Digraph, Node, WeightedEdge def load_map(map_filename): """ Parses the map file and constructs a directed graph Assumes: Each entry in the map file consists of the following four positive integers, separated by a blank space: 32 76 54 23 This entry wou...
32.927273
93
0.570403
from graph import Digraph, Node, WeightedEdge def load_map(map_filename): g = Digraph() with open(map_filename, 'r') as file: read_data = file.read().split('\n') for elem in read_data: read_data[read_data.index(elem)] = elem.split(' ') read_data.remove(['']) for elem in read_dat...
true
true
f72180e784ecfee3622da10e4ca8c64c9fb89d32
3,450
py
Python
tests/functional/test_cli.py
garnaat/aws-lambda-builders
0ce436cacb7e5e756c65cb4fa4d78877ada307e5
[ "Apache-2.0" ]
2
2020-11-12T22:58:17.000Z
2021-03-22T16:13:34.000Z
tests/functional/test_cli.py
awood45/aws-lambda-builders
3744cea731403fc5d5aad36c4f60d9512231fd78
[ "Apache-2.0" ]
null
null
null
tests/functional/test_cli.py
awood45/aws-lambda-builders
3744cea731403fc5d5aad36c4f60d9512231fd78
[ "Apache-2.0" ]
null
null
null
import json import os import shutil import tempfile import subprocess import copy from unittest import TestCase from parameterized import parameterized class TestCliWithHelloWorkflow(TestCase): HELLO_WORKFLOW_MODULE = "hello_workflow.write_hello" TEST_WORKFLOWS_FOLDER = os.path.join(os.path.dirname(__file_...
35.9375
123
0.630145
import json import os import shutil import tempfile import subprocess import copy from unittest import TestCase from parameterized import parameterized class TestCliWithHelloWorkflow(TestCase): HELLO_WORKFLOW_MODULE = "hello_workflow.write_hello" TEST_WORKFLOWS_FOLDER = os.path.join(os.path.dirname(__file_...
true
true
f721837c57c136970d438343cccd809cda08ff22
19,515
py
Python
pype/vendor/capture_gui/accordion.py
kalisp/pype
28bbffaf2d12ccee48313cd9985e8dfa05e81a5c
[ "MIT" ]
52
2017-03-28T02:44:25.000Z
2021-08-13T08:32:56.000Z
pype/vendor/capture_gui/accordion.py
kalisp/pype
28bbffaf2d12ccee48313cd9985e8dfa05e81a5c
[ "MIT" ]
51
2017-04-05T08:27:29.000Z
2020-05-08T14:40:31.000Z
pype/vendor/capture_gui/accordion.py
kalisp/pype
28bbffaf2d12ccee48313cd9985e8dfa05e81a5c
[ "MIT" ]
12
2016-09-19T11:55:03.000Z
2021-10-15T09:21:31.000Z
from .vendor.Qt import QtCore, QtWidgets, QtGui class AccordionItem(QtWidgets.QGroupBox): trigger = QtCore.Signal(bool) def __init__(self, accordion, title, widget): QtWidgets.QGroupBox.__init__(self, parent=accordion) # create the layout layout = QtWidgets.QVBoxLayout() layo...
31.224
92
0.564386
from .vendor.Qt import QtCore, QtWidgets, QtGui class AccordionItem(QtWidgets.QGroupBox): trigger = QtCore.Signal(bool) def __init__(self, accordion, title, widget): QtWidgets.QGroupBox.__init__(self, parent=accordion) layout = QtWidgets.QVBoxLayout() layout.setContentsMargi...
true
true
f721842d767265f7f548ee0d34b73c892bd60f1b
183
py
Python
pystrometry/example_subpkg/setup_package.py
Johannes-Sahlmann/pystrometry
79dc67369be2ce46ddb0ebc73e5fe3570d20c025
[ "BSD-3-Clause" ]
9
2019-12-06T13:12:33.000Z
2021-10-05T12:47:15.000Z
pystrometry/example_subpkg/setup_package.py
Johannes-Sahlmann/pystrometry
79dc67369be2ce46ddb0ebc73e5fe3570d20c025
[ "BSD-3-Clause" ]
2
2019-11-28T17:20:27.000Z
2019-12-09T18:44:35.000Z
pystrometry/example_subpkg/setup_package.py
Johannes-Sahlmann/pystrometry
79dc67369be2ce46ddb0ebc73e5fe3570d20c025
[ "BSD-3-Clause" ]
3
2019-11-28T17:04:22.000Z
2021-10-19T13:12:34.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import def get_package_data(): return {'pystrometry.example_subpkg': ['data/*']}
26.142857
63
0.754098
from __future__ import absolute_import def get_package_data(): return {'pystrometry.example_subpkg': ['data/*']}
true
true
f721854d6db9efb92a7df07e88cf428c0d746223
3,699
py
Python
muti/glmu.py
invertedv/utilities
42c331893b1beee73b2d21df6cb2bad73b872bb7
[ "MIT" ]
null
null
null
muti/glmu.py
invertedv/utilities
42c331893b1beee73b2d21df6cb2bad73b872bb7
[ "MIT" ]
null
null
null
muti/glmu.py
invertedv/utilities
42c331893b1beee73b2d21df6cb2bad73b872bb7
[ "MIT" ]
null
null
null
from muti import genu import clickhouse_driver import pandas as pd from modeling.glm import glm import numpy as np import math def build_model_formula(features_dict: dict, target: str): """ Builds the model formula for glm from modeling based on the features_dict specification. Does not included embedded ...
41.561798
112
0.651798
from muti import genu import clickhouse_driver import pandas as pd from modeling.glm import glm import numpy as np import math def build_model_formula(features_dict: dict, target: str): ms = target + '~' extra = '' for feature in features_dict: if features_dict[feature][0] == 'cts': ms...
true
true
f7218599cb5a20deb178638895ef1d333f863936
4,015
py
Python
scripts/fastRequests.py
Hitoshirenu/muchspace
e3db813b148941d6caf6e3b13e82c0fc48f454bf
[ "MIT" ]
null
null
null
scripts/fastRequests.py
Hitoshirenu/muchspace
e3db813b148941d6caf6e3b13e82c0fc48f454bf
[ "MIT" ]
null
null
null
scripts/fastRequests.py
Hitoshirenu/muchspace
e3db813b148941d6caf6e3b13e82c0fc48f454bf
[ "MIT" ]
null
null
null
# import threading from pathlib import Path from multiprocessing.dummy import Pool as ThreadPool from more_itertools import unique_everseen import requests, json, datetime from scripts.byteSize import human_byte_size # Initialization Total_Size = 0 Processed_URLs = 0 Progress = 0 Total_URLs = 0 Rate = 0 Re...
43.641304
187
0.646077
from pathlib import Path from multiprocessing.dummy import Pool as ThreadPool from more_itertools import unique_everseen import requests, json, datetime from scripts.byteSize import human_byte_size Total_Size = 0 Processed_URLs = 0 Progress = 0 Total_URLs = 0 Rate = 0 Report = False ReportJson = [] def ...
true
true
f72186852716593e8409116793bd82e2b2526084
2,714
py
Python
src/pipelines/epidemiology/nl_authority.py
nelhage/data
50a1ab91b786c9f89a8ff6ff10ea57ea5335490d
[ "Apache-2.0" ]
null
null
null
src/pipelines/epidemiology/nl_authority.py
nelhage/data
50a1ab91b786c9f89a8ff6ff10ea57ea5335490d
[ "Apache-2.0" ]
null
null
null
src/pipelines/epidemiology/nl_authority.py
nelhage/data
50a1ab91b786c9f89a8ff6ff10ea57ea5335490d
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.178082
91
0.637804
from datetime import datetime from typing import Any, Dict, List from pandas import DataFrame, concat, merge from lib.pipeline import DataSource from lib.time import datetime_isoformat from lib.utils import grouped_diff class NetherlandsDataSource(DataSource): def parse_dataframes( self, dat...
true
true
f72187bfd6178c0257c0f81666097723e96f4c4d
21,206
py
Python
tests/controller_test.py
elmopl/homekit_python
bb2b07e66fce3c3034b012ef679695a3da77f787
[ "Apache-2.0" ]
null
null
null
tests/controller_test.py
elmopl/homekit_python
bb2b07e66fce3c3034b012ef679695a3da77f787
[ "Apache-2.0" ]
null
null
null
tests/controller_test.py
elmopl/homekit_python
bb2b07e66fce3c3034b012ef679695a3da77f787
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018 Joachim Lusiardi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
42.927126
113
0.650712
import unittest import tempfile import threading import time from homekit import Controller from homekit import AccessoryServer from homekit.exceptions import AccessoryNotFoundError, AlreadyPairedError, UnavailableError, FormatError, \ ConfigLoadingError, ConfigSavingError, MalformedPinError from h...
true
true
f721880fe59e59ce9a574f51f4ac11921a0ea939
4,792
py
Python
zendesk/endpoints.py
optixx/zendesk
7a4439f1c5b46913acad6b3153266d52f011c11e
[ "MIT" ]
31
2015-01-02T01:44:18.000Z
2021-06-10T16:29:54.000Z
zendesk/endpoints.py
optixx/zendesk
7a4439f1c5b46913acad6b3153266d52f011c11e
[ "MIT" ]
1
2015-04-08T07:54:50.000Z
2015-04-09T14:29:38.000Z
zendesk/endpoints.py
optixx/zendesk
7a4439f1c5b46913acad6b3153266d52f011c11e
[ "MIT" ]
23
2015-01-12T23:42:34.000Z
2021-09-08T11:20:12.000Z
""" API MAPPING """ mapping_table = { # Rest API: Organizations 'list_organizations': { 'path': '/organizations.json', 'method': 'GET', 'status': 200, }, 'show_organization': { 'path': '/organizations/{{organization_id}}.json', 'method': 'GET', 'status':...
24.701031
82
0.459098
mapping_table = { 'list_organizations': { 'path': '/organizations.json', 'method': 'GET', 'status': 200, }, 'show_organization': { 'path': '/organizations/{{organization_id}}.json', 'method': 'GET', 'status': 200, }, 'create_organization': { ...
true
true
f721881eea115b79515a4c824cdd061fe585c80c
6,885
py
Python
logging/tests/unit/handlers/test__helpers.py
rodrigodias27/google-cloud-python
7d1161f70744c0dbbe67a3f472ea95667eaafe50
[ "Apache-2.0" ]
1
2021-01-04T11:40:17.000Z
2021-01-04T11:40:17.000Z
logging/tests/unit/handlers/test__helpers.py
rodrigodias27/google-cloud-python
7d1161f70744c0dbbe67a3f472ea95667eaafe50
[ "Apache-2.0" ]
null
null
null
logging/tests/unit/handlers/test__helpers.py
rodrigodias27/google-cloud-python
7d1161f70744c0dbbe67a3f472ea95667eaafe50
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
30.197368
78
0.679448
import json import unittest import mock import six try: from webapp2 import RequestHandler except SyntaxError: RequestHandler = object class Test_get_trace_id_from_flask(unittest.TestCase): @staticmethod def _call_fut(): from google.cloud.logging.handlers import _hel...
true
true
f7218951799b74c37930bbca42f5a8dabc271ee3
8,665
py
Python
pattoo/ingest/files.py
palisadoes/pattoo
57bd3e82e49d51e3426b13ad53ed8326a735ce29
[ "Apache-2.0" ]
null
null
null
pattoo/ingest/files.py
palisadoes/pattoo
57bd3e82e49d51e3426b13ad53ed8326a735ce29
[ "Apache-2.0" ]
null
null
null
pattoo/ingest/files.py
palisadoes/pattoo
57bd3e82e49d51e3426b13ad53ed8326a735ce29
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """Pattoo classes that manage various data.""" # Standard imports import os import time # Import project libraries from pattoo_shared import log, files, converter from pattoo.configuration import ConfigIngester as Config from pattoo.constants import PATTOO_API_AGENT_NAME, PATTOO_INGESTER_NAME ...
30.191638
79
0.599308
import os import time from pattoo_shared import log, files, converter from pattoo.configuration import ConfigIngester as Config from pattoo.constants import PATTOO_API_AGENT_NAME, PATTOO_INGESTER_NAME from .records import Records class Cache(): def __init__(self, batch_size=500, age=0): co...
true
true
f7218963b535569939ecb7f8ec24da1fd34de53b
8,127
py
Python
Pytorch/class_wrapper.py
BensonRen/idlm_Ben
0d83780232d6341575daf88792959542aef82132
[ "MIT" ]
3
2019-08-28T17:10:29.000Z
2020-11-22T14:06:45.000Z
Pytorch/class_wrapper.py
BensonRen/idlm_Ben
0d83780232d6341575daf88792959542aef82132
[ "MIT" ]
1
2019-11-03T12:02:43.000Z
2019-11-20T02:04:36.000Z
Pytorch/class_wrapper.py
BensonRen/idlm_Ben
0d83780232d6341575daf88792959542aef82132
[ "MIT" ]
2
2019-08-29T02:32:56.000Z
2019-12-22T17:44:26.000Z
""" The class wrapper for the networks """ # Built-in import os import time # Torch import torch from torch import nn from torch.utils.tensorboard import SummaryWriter from torchsummary import summary # Libs import numpy as np # Own module class Network(object): def __init__(self, model_fn, flags, train_loader...
47.526316
135
0.556909
import os import time import torch from torch import nn from torch.utils.tensorboard import SummaryWriter from torchsummary import summary import numpy as np class Network(object): def __init__(self, model_fn, flags, train_loader, test_loader, ckpt_dir=os.path.join(os.path.abspath(''), 'mo...
true
true
f7218967c57c18721cbadcda05e9f80ac9a6d65e
709
py
Python
forms.py
T3chn3/HFP
ac555de68db689c63e25119ac2ca03612f4c3340
[ "MIT" ]
null
null
null
forms.py
T3chn3/HFP
ac555de68db689c63e25119ac2ca03612f4c3340
[ "MIT" ]
null
null
null
forms.py
T3chn3/HFP
ac555de68db689c63e25119ac2ca03612f4c3340
[ "MIT" ]
null
null
null
#Forms #On the web server import cgi #used to invoke the request <form action="cgi-bin/process-time.py" method="POST"> Enter a timing value: #action to take and method to envoke for the response, text <input type="Text" name="TimeValue" size=40> #TimeValue will hold the users input <br /> <input type="Submit" value="S...
37.315789
135
0.754584
import cgi <form action="cgi-bin/process-time.py" method="POST"> Enter a timing value: <input type="Text" name="TimeValue" size=40> <br /> <input type="Submit" value="Send"> </form> form = cgi.FieldStorage() timing_value = form["TimeValue"].value
false
true
f72189c34849c418bee945e1e54df7340ce233c9
435
py
Python
virtual/lib/python3.8/site-packages/wtforms/fields/__init__.py
Esther-Anyona/mylearner
d49d1c4c8dbeb93cc384f2037c48236be5dc89e1
[ "MIT" ]
3
2022-01-04T18:26:21.000Z
2022-02-02T00:10:50.000Z
venv/lib/python3.10/site-packages/wtforms/fields/__init__.py
superiorkid/rbac
40f45849687075bc46a52985af22eab6cf83cbda
[ "MIT" ]
1
2021-12-30T10:36:57.000Z
2021-12-30T10:36:57.000Z
venv/lib/python3.10/site-packages/wtforms/fields/__init__.py
superiorkid/rbac
40f45849687075bc46a52985af22eab6cf83cbda
[ "MIT" ]
2
2022-02-12T15:33:59.000Z
2022-02-14T15:36:31.000Z
from wtforms.fields.choices import * from wtforms.fields.choices import SelectFieldBase from wtforms.fields.core import Field from wtforms.fields.core import Flags from wtforms.fields.core import Label from wtforms.fields.datetime import * from wtforms.fields.form import * from wtforms.fields.list import * from wtforms...
36.25
53
0.832184
from wtforms.fields.choices import * from wtforms.fields.choices import SelectFieldBase from wtforms.fields.core import Field from wtforms.fields.core import Flags from wtforms.fields.core import Label from wtforms.fields.datetime import * from wtforms.fields.form import * from wtforms.fields.list import * from wtforms...
true
true
f7218c5841c78da8df7b09b9049a325f9cfeaba6
8,968
py
Python
custom_admin/views.py
samuira/TutionMastor
5b6d89efc90a9ebb54766530554d7dc9d5ee8298
[ "MIT" ]
1
2019-11-09T17:18:10.000Z
2019-11-09T17:18:10.000Z
custom_admin/views.py
abhisek11/TutionMastor
5b6d89efc90a9ebb54766530554d7dc9d5ee8298
[ "MIT" ]
19
2019-12-05T00:13:31.000Z
2022-03-11T23:58:13.000Z
custom_admin/views.py
abhisek11/TutionMastor
5b6d89efc90a9ebb54766530554d7dc9d5ee8298
[ "MIT" ]
1
2020-02-29T07:35:25.000Z
2020-02-29T07:35:25.000Z
from django.contrib import messages from django.contrib.auth import authenticate, login, logout from django.core.exceptions import ValidationError from django.shortcuts import render from django.http import JsonResponse, HttpResponse, HttpResponseRedirect from django.urls import reverse_lazy, reverse from django.utils....
33.092251
126
0.748104
from django.contrib import messages from django.contrib.auth import authenticate, login, logout from django.core.exceptions import ValidationError from django.shortcuts import render from django.http import JsonResponse, HttpResponse, HttpResponseRedirect from django.urls import reverse_lazy, reverse from django.utils....
true
true
f7218c9e437eabf2dfc69680b59fad493a030b44
1,925
py
Python
src/braille/braille_translator.py
stuart-stanley/dotspicejar
bcf0c4656764011744581c5ea052b47ee70a34f1
[ "MIT" ]
null
null
null
src/braille/braille_translator.py
stuart-stanley/dotspicejar
bcf0c4656764011744581c5ea052b47ee70a34f1
[ "MIT" ]
null
null
null
src/braille/braille_translator.py
stuart-stanley/dotspicejar
bcf0c4656764011744581c5ea052b47ee70a34f1
[ "MIT" ]
null
null
null
from .braille_cell import BrailleCell from .braille_string import BrailleString class BrailleTranslator(object): _simple_cells = None def __init__(self, text): self.__raw_text = text if BrailleTranslator._simple_cells is None: self.__setup_class_simple_cells() @property d...
37.745098
54
0.424935
from .braille_cell import BrailleCell from .braille_string import BrailleString class BrailleTranslator(object): _simple_cells = None def __init__(self, text): self.__raw_text = text if BrailleTranslator._simple_cells is None: self.__setup_class_simple_cells() @property d...
true
true
f7218cb7844b332e36d07bd50f2d78b34959e42b
56,514
py
Python
src/doc/common/builder.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
null
null
null
src/doc/common/builder.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
null
null
null
src/doc/common/builder.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
null
null
null
#!/usr/bin/env python """ The documentation builder It is the starting point for building documentation, and is responsible to figure out what to build and with which options. The actual documentation build for each individual document is then done in a subprocess call to sphinx, see :func:`builder_helper`. * The bui...
38.894701
148
0.58313
""" The documentation builder It is the starting point for building documentation, and is responsible to figure out what to build and with which options. The actual documentation build for each individual document is then done in a subprocess call to sphinx, see :func:`builder_helper`. * The builder can be configure...
false
true
f7218cb7a745b7fd90503d36440f0281125e16d4
3,402
py
Python
cogs/error.py
Py-Verse/PyBot
dfbb029925f4d207eaabbb4d02884c27fb3c4164
[ "MIT" ]
8
2021-03-07T08:52:31.000Z
2021-04-24T21:44:36.000Z
cogs/error.py
Developing-Studio/ci-PyBot
4eb5aa44c0e469e2ec4f4fb51094229c3bee9441
[ "MIT" ]
1
2021-03-07T10:21:08.000Z
2021-03-07T10:32:08.000Z
cogs/error.py
Developing-Studio/ci-PyBot
4eb5aa44c0e469e2ec4f4fb51094229c3bee9441
[ "MIT" ]
4
2021-03-07T10:30:51.000Z
2021-03-11T14:30:14.000Z
import math import os import sys import traceback import discord from discord.ext import commands class Errors(commands.Cog): """ Error handler """ def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_ready(self): print("Error cog loaded successfully...
30.648649
109
0.531452
import math import os import sys import traceback import discord from discord.ext import commands class Errors(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_ready(self): print("Error cog loaded successfully") @commands.Cog.listener() ...
true
true
f7218d6bb7dd8dbb82f3a28fabfbe622d4a4680d
220
py
Python
userlogin_test.py
kilonzijnr/passstore
e1f73d2599bbbd209e0242416c706c4ce259d3a5
[ "MIT" ]
null
null
null
userlogin_test.py
kilonzijnr/passstore
e1f73d2599bbbd209e0242416c706c4ce259d3a5
[ "MIT" ]
null
null
null
userlogin_test.py
kilonzijnr/passstore
e1f73d2599bbbd209e0242416c706c4ce259d3a5
[ "MIT" ]
null
null
null
import unittest from userlogin import User class TestUser(unittest.TestCase): """ Test class to define test cases for the User class Args: unittest.TestCase: TestCase class creates test cases """
24.444444
60
0.709091
import unittest from userlogin import User class TestUser(unittest.TestCase):
true
true
f7218df71a44862b66afa5b5c925534e4b131f25
3,289
py
Python
computer_vision/learning-opencv-practical/image-process-100ask/Question_31_40/answers/answer_40.py
magic428/subjects_notes
6930adbb3f445c11ca9d024abb12a53d6aca19e7
[ "MIT" ]
2
2020-03-18T17:13:00.000Z
2020-03-25T02:34:03.000Z
computer_vision/learning-opencv-practical/image-process-100ask/Question_31_40/answers/answer_40.py
magic428/subjects_notes
6930adbb3f445c11ca9d024abb12a53d6aca19e7
[ "MIT" ]
null
null
null
computer_vision/learning-opencv-practical/image-process-100ask/Question_31_40/answers/answer_40.py
magic428/subjects_notes
6930adbb3f445c11ca9d024abb12a53d6aca19e7
[ "MIT" ]
null
null
null
import cv2 import numpy as np import matplotlib.pyplot as plt # Read image img = cv2.imread("imori.jpg").astype(np.float32) H, W, C = img.shape # RGB > YCbCr Y = 0.2990 * img[..., 2] + 0.5870 * img[..., 1] + 0.1140 * img[..., 0] Cb = -0.1687 * img[..., 2] - 0.3313 * img[..., 1] + 0.5 * img[..., 0] + 128. C...
32.245098
97
0.419884
import cv2 import numpy as np import matplotlib.pyplot as plt img = cv2.imread("imori.jpg").astype(np.float32) H, W, C = img.shape Y = 0.2990 * img[..., 2] + 0.5870 * img[..., 1] + 0.1140 * img[..., 0] Cb = -0.1687 * img[..., 2] - 0.3313 * img[..., 1] + 0.5 * img[..., 0] + 128. Cr = 0.5 * img[..., 2] - 0.4...
true
true
f72190bc142f0445507b2063ace8933a5d98baaf
2,238
py
Python
examples/visexp.py
BatsiBoy/PyFrac
a898f6111295fa9196c382613639fc84e73d6035
[ "MIT" ]
null
null
null
examples/visexp.py
BatsiBoy/PyFrac
a898f6111295fa9196c382613639fc84e73d6035
[ "MIT" ]
null
null
null
examples/visexp.py
BatsiBoy/PyFrac
a898f6111295fa9196c382613639fc84e73d6035
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #Name: Fractal Example - Exponential Curves #Author: Sean Pope #Example use of the fractal engine and coefficient block. #Creates random coefficient blocks and draws frames to create a simple animation. #This one is optimized for the exponential variation. import matplotlib.pyplot as plt impor...
34.430769
109
0.683199
import matplotlib.pyplot as plt import PyFrac as pf plt.style.use('dark_background') ax = plt.subplot(111,frameon=False) ax.axes.get_xaxis().set_visible(False) ax.axes.get_yaxis().set_visible(False) plt.xlim(-1,1) plt.ylim(-1,1) def quitloop(*args): global run run = 0 return fig = ...
true
true
f721923f0db0c229c58f961a74feaeb820d768fc
306
py
Python
src/basic/011_thirds/use_requests.py
hbulpf/pydemo
2989cc50781230718e46dcac5dc0ca70630ebffe
[ "Apache-2.0" ]
6
2020-03-24T15:58:42.000Z
2020-04-18T13:32:41.000Z
src/basic/011_thirds/use_requests.py
hbulpf/pydemo
2989cc50781230718e46dcac5dc0ca70630ebffe
[ "Apache-2.0" ]
1
2022-01-13T03:51:17.000Z
2022-01-13T03:51:17.000Z
src/basic/011_thirds/use_requests.py
hbulpf/pydemo
2989cc50781230718e46dcac5dc0ca70630ebffe
[ "Apache-2.0" ]
1
2020-02-01T09:36:05.000Z
2020-02-01T09:36:05.000Z
import requests r = requests.get('https://www.baidu.com/') print(f'status_code:{r.status_code}') print(f'text:{r.text}') r = requests.get('https://www.baidu.com/', params={'wd': 'python'}) print(f'url:{r.url}') print(f'status_code:{r.status_code}') print(f'text:{r.text}') print(f'encoding:{r.encoding}')
27.818182
67
0.679739
import requests r = requests.get('https://www.baidu.com/') print(f'status_code:{r.status_code}') print(f'text:{r.text}') r = requests.get('https://www.baidu.com/', params={'wd': 'python'}) print(f'url:{r.url}') print(f'status_code:{r.status_code}') print(f'text:{r.text}') print(f'encoding:{r.encoding}')
true
true
f721925123231063587335f88669b985aa41c584
489
py
Python
examples/loadsheet.py
Daviid1010/ethercalc-python
af79cb5c69e2caa0b7f1d88b14be5ca60e7d6a0b
[ "BSD-2-Clause" ]
3
2017-01-26T11:29:18.000Z
2018-02-02T14:54:03.000Z
examples/loadsheet.py
Daviid1010/ethercalc-python
af79cb5c69e2caa0b7f1d88b14be5ca60e7d6a0b
[ "BSD-2-Clause" ]
null
null
null
examples/loadsheet.py
Daviid1010/ethercalc-python
af79cb5c69e2caa0b7f1d88b14be5ca60e7d6a0b
[ "BSD-2-Clause" ]
6
2016-05-11T15:42:59.000Z
2022-02-25T19:50:34.000Z
#!/usr/bin/env python3 import ethercalc import argparse import pprint import sys parser = argparse.ArgumentParser(description="Dump ethercalc sheet") parser.add_argument("sheet", metavar='sheet', help="sheet name") parser.add_argument("-f", "--format", dest="format", help="format", default="socialca...
28.764706
68
0.715746
import ethercalc import argparse import pprint import sys parser = argparse.ArgumentParser(description="Dump ethercalc sheet") parser.add_argument("sheet", metavar='sheet', help="sheet name") parser.add_argument("-f", "--format", dest="format", help="format", default="socialcalc") args = parser.par...
true
true
f72194e07175df8c6208e51d9aafe054145aca68
200
py
Python
drone_squadron/api/thruster_api.py
OrderAndCh4oS/drone_squadron_api_prototype
4d7c22cebb03576986d443634b17910cb460a60f
[ "MIT" ]
1
2020-05-20T09:44:37.000Z
2020-05-20T09:44:37.000Z
drone_squadron/api/thruster_api.py
sarcoma/drone_squadron_api_prototype
4d7c22cebb03576986d443634b17910cb460a60f
[ "MIT" ]
1
2021-06-01T22:30:10.000Z
2021-06-01T22:30:10.000Z
drone_squadron/api/thruster_api.py
OrderAndCh4oS/drone_squadron_api_prototype
4d7c22cebb03576986d443634b17910cb460a60f
[ "MIT" ]
null
null
null
from drone_squadron.api.base_api import BaseApi from drone_squadron.crud.thruster_crud import ThrusterCrud class ThrusterApi(BaseApi): def __init__(self): super().__init__(ThrusterCrud)
25
58
0.79
from drone_squadron.api.base_api import BaseApi from drone_squadron.crud.thruster_crud import ThrusterCrud class ThrusterApi(BaseApi): def __init__(self): super().__init__(ThrusterCrud)
true
true
f7219557f313231bf047af09d8d81a13981c3f2b
368
py
Python
durgo_sdk/integrations/django/middleware.py
safwanrahman/durgo-python
79b740e0500e1ba2bce7edcb47996587a9449964
[ "BSD-3-Clause" ]
1
2020-08-12T21:56:45.000Z
2020-08-12T21:56:45.000Z
durgo_sdk/integrations/django/middleware.py
Alig1493/durgo-python
79b740e0500e1ba2bce7edcb47996587a9449964
[ "BSD-3-Clause" ]
null
null
null
durgo_sdk/integrations/django/middleware.py
Alig1493/durgo-python
79b740e0500e1ba2bce7edcb47996587a9449964
[ "BSD-3-Clause" ]
1
2020-03-21T18:30:28.000Z
2020-03-21T18:30:28.000Z
from django.utils import timezone class DurgoMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization. def __call__(self, request): start_time = timezone.now() response = self.get_response(request) end...
21.647059
52
0.673913
from django.utils import timezone class DurgoMiddleware: def __init__(self, get_response): self.get_response = get_response def __call__(self, request): start_time = timezone.now() response = self.get_response(request) end_time = timezone.now() return respo...
true
true
f72196382b201f0b3ce9c05e95a1507ab101ac39
367
py
Python
test/testDepthfilling.py
zer01ike/HoleFilling
b1591485f37975c0793839880dbb6185a132d3f9
[ "Apache-2.0" ]
4
2019-02-18T08:58:19.000Z
2021-11-05T01:20:32.000Z
test/testDepthfilling.py
zer01ike/HoleFilling
b1591485f37975c0793839880dbb6185a132d3f9
[ "Apache-2.0" ]
null
null
null
test/testDepthfilling.py
zer01ike/HoleFilling
b1591485f37975c0793839880dbb6185a132d3f9
[ "Apache-2.0" ]
6
2018-05-21T10:08:20.000Z
2021-11-05T01:20:35.000Z
from DepthFilling import DepthFilling import cv2 DepthedImg = cv2.imread('../DataSet/Sequence/Warped/depth_0_w.bmp', 0) DF = DepthFilling.DepthFilling(DepthedImg,63,63) #depth_filled = DF.testKmeans(DepthedImg) depth_filled = DF.depthfill() cv2.imshow('depth', depth_filled) cv2.imwrite('depthfill_book_0.bmp',depth_...
28.230769
70
0.792916
from DepthFilling import DepthFilling import cv2 DepthedImg = cv2.imread('../DataSet/Sequence/Warped/depth_0_w.bmp', 0) DF = DepthFilling.DepthFilling(DepthedImg,63,63) depth_filled = DF.depthfill() cv2.imshow('depth', depth_filled) cv2.imwrite('depthfill_book_0.bmp',depth_filled) cv2.waitKey(0) cv2.destroyAllWindo...
true
true
f7219684ce3f2077f43b7fa0f52973b32fe1628b
1,607
py
Python
tests/components/recorder/test_util.py
pcaston/Open-Peer-Power
81805d455c548e0f86b0f7fedc793b588b2afdfd
[ "Apache-2.0" ]
null
null
null
tests/components/recorder/test_util.py
pcaston/Open-Peer-Power
81805d455c548e0f86b0f7fedc793b588b2afdfd
[ "Apache-2.0" ]
null
null
null
tests/components/recorder/test_util.py
pcaston/Open-Peer-Power
81805d455c548e0f86b0f7fedc793b588b2afdfd
[ "Apache-2.0" ]
1
2019-04-24T14:10:08.000Z
2019-04-24T14:10:08.000Z
"""Test util methods.""" from unittest.mock import MagicMock, patch import pytest from openpeerpower.components.recorder import util from openpeerpower.components.recorder.const import DATA_INSTANCE from tests.common import get_test_open_peer_power, init_recorder_component @pytest.fixture def opp_recorder(): "...
25.109375
74
0.684505
from unittest.mock import MagicMock, patch import pytest from openpeerpower.components.recorder import util from openpeerpower.components.recorder.const import DATA_INSTANCE from tests.common import get_test_open_peer_power, init_recorder_component @pytest.fixture def opp_recorder(): opp = get_test_open_peer_p...
true
true
f72196e96928e506436940a1aaab2796da44a560
31,440
py
Python
02 Main/mainRUN.py
dengniewei/Face-Recognition-Class-Attendance-System
58aa85ff3b378991da3ccebd69e6ace5ec2af93f
[ "MIT" ]
null
null
null
02 Main/mainRUN.py
dengniewei/Face-Recognition-Class-Attendance-System
58aa85ff3b378991da3ccebd69e6ace5ec2af93f
[ "MIT" ]
null
null
null
02 Main/mainRUN.py
dengniewei/Face-Recognition-Class-Attendance-System
58aa85ff3b378991da3ccebd69e6ace5ec2af93f
[ "MIT" ]
null
null
null
# 导入必要的模块 from PyQt5 import QtCore, QtGui from PyQt5.QtWidgets import QApplication, QWidget, QMessageBox, QInputDialog from PyQt5.QtGui import QImage, QIcon, QPixmap from PyQt5.QtCore import QTimer, QDateTime, QCoreApplication, QThread import sys, os import cv2, imutils # 导入UI主界面 import main # 导入信息采集框界面 impor...
39.847909
132
0.535401
from PyQt5 import QtCore, QtGui from PyQt5.QtWidgets import QApplication, QWidget, QMessageBox, QInputDialog from PyQt5.QtGui import QImage, QIcon, QPixmap from PyQt5.QtCore import QTimer, QDateTime, QCoreApplication, QThread import sys, os import cv2, imutils import main import infoUI import ChinesePutText...
true
true
f721978ae0032f3792c8f2bb1e955820288a7de7
33,135
py
Python
src/urllib3/response.py
imkaka/urllib3
c96cf403fb4f24d414f40faf4691174e4c54ea0b
[ "MIT" ]
null
null
null
src/urllib3/response.py
imkaka/urllib3
c96cf403fb4f24d414f40faf4691174e4c54ea0b
[ "MIT" ]
1
2022-01-04T12:19:09.000Z
2022-01-04T12:19:09.000Z
src/urllib3/response.py
sethmlarson/urllib3
d4c25791cd5002a5234d882a28040db94ca38595
[ "MIT" ]
null
null
null
import io import json as _json import logging import zlib from contextlib import contextmanager from http.client import HTTPMessage as _HttplibHTTPMessage from http.client import HTTPResponse as _HttplibHTTPResponse from socket import timeout as SocketTimeout from typing import ( TYPE_CHECKING, Any, Generat...
34.952532
110
0.582979
import io import json as _json import logging import zlib from contextlib import contextmanager from http.client import HTTPMessage as _HttplibHTTPMessage from http.client import HTTPResponse as _HttplibHTTPResponse from socket import timeout as SocketTimeout from typing import ( TYPE_CHECKING, Any, Generat...
true
true
f7219c3cecb551332ea0053120d9d5497f55a298
4,400
py
Python
pongcontroller.py
afghanimah/Pong
ad799bae29ed5f5cff2f2f70a7e42a5f02df7336
[ "MIT" ]
null
null
null
pongcontroller.py
afghanimah/Pong
ad799bae29ed5f5cff2f2f70a7e42a5f02df7336
[ "MIT" ]
5
2020-02-29T01:15:24.000Z
2020-02-29T21:55:03.000Z
pongcontroller.py
afghanimah/Pong
ad799bae29ed5f5cff2f2f70a7e42a5f02df7336
[ "MIT" ]
null
null
null
from pyglet.window import key import random from pygletplus.controller import Controller class PongController(Controller): def __init__(self, scene): super().__init__(scene) self.keys = scene.keys self.player = scene.player self.cpu = scene.cpu self.ball = scene.ball ...
39.285714
113
0.588636
from pyglet.window import key import random from pygletplus.controller import Controller class PongController(Controller): def __init__(self, scene): super().__init__(scene) self.keys = scene.keys self.player = scene.player self.cpu = scene.cpu self.ball = scene.ball ...
true
true
f7219cec0e09ba36054e4f7cf2c47cdd0bc5592a
397
py
Python
greaterwms/wsgi.py
chinxianjun2016/GreaterWMS
aacd0e15e0114f103eb57002e93670c008cce63b
[ "Apache-2.0" ]
1
2021-02-17T14:04:29.000Z
2021-02-17T14:04:29.000Z
greaterwms/wsgi.py
AntInso/GreaterWMS
9eabb1b9b0f5376dcccd89ed86dd76995955a8ec
[ "Apache-2.0" ]
null
null
null
greaterwms/wsgi.py
AntInso/GreaterWMS
9eabb1b9b0f5376dcccd89ed86dd76995955a8ec
[ "Apache-2.0" ]
null
null
null
""" WSGI config for greaterwms project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SE...
23.352941
78
0.788413
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'greaterwms.settings') application = get_wsgi_application()
true
true
f7219e0b94e3c48818431af7be65a1ddd8fdbbac
2,454
py
Python
tests/settings.py
hugorodgerbrown/django-onfido
9e534f4725b61d982ffb2cd6a018ed1fffc353b6
[ "MIT" ]
6
2016-11-14T13:31:46.000Z
2022-02-17T20:39:42.000Z
tests/settings.py
hugorodgerbrown/django-onfido
9e534f4725b61d982ffb2cd6a018ed1fffc353b6
[ "MIT" ]
23
2016-10-21T11:18:34.000Z
2021-12-08T17:33:01.000Z
tests/settings.py
hugorodgerbrown/django-onfido
9e534f4725b61d982ffb2cd6a018ed1fffc353b6
[ "MIT" ]
7
2016-11-14T18:19:09.000Z
2021-10-01T11:34:48.000Z
from os import getenv, path from django.core.exceptions import ImproperlyConfigured DEBUG = True TEMPLATE_DEBUG = True USE_TZ = True USE_L10N = True DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": "onfido.db"}} INSTALLED_APPS = ( "django.contrib.admin", "django.contrib.auth", "...
26.106383
87
0.609617
from os import getenv, path from django.core.exceptions import ImproperlyConfigured DEBUG = True TEMPLATE_DEBUG = True USE_TZ = True USE_L10N = True DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": "onfido.db"}} INSTALLED_APPS = ( "django.contrib.admin", "django.contrib.auth", "...
true
true
f7219f3f9ed21cb04bfe7f510681ceaf677c32c5
4,351
py
Python
src/dataload/contrib/docm/__init__.py
IsmailM/myvariant.info
5af6ad68fc2c1eb539ab9e683a34bafd51ed5cb1
[ "Apache-2.0" ]
null
null
null
src/dataload/contrib/docm/__init__.py
IsmailM/myvariant.info
5af6ad68fc2c1eb539ab9e683a34bafd51ed5cb1
[ "Apache-2.0" ]
null
null
null
src/dataload/contrib/docm/__init__.py
IsmailM/myvariant.info
5af6ad68fc2c1eb539ab9e683a34bafd51ed5cb1
[ "Apache-2.0" ]
1
2018-11-17T09:16:59.000Z
2018-11-17T09:16:59.000Z
__METADATA__ = { "src_name": 'DOCM', "src_url": 'http://docm.genome.wustl.edu/', "version": None, "field": "docm" } def load_data(): '''docm data are pre-loaded in our db.''' raise NotImplementedError def get_mapping(): mapping = { "docm": { "properties": { ...
30.858156
79
0.290738
__METADATA__ = { "src_name": 'DOCM', "src_url": 'http://docm.genome.wustl.edu/', "version": None, "field": "docm" } def load_data(): raise NotImplementedError def get_mapping(): mapping = { "docm": { "properties": { "domain": { "type": ...
true
true
f721a0175b21509fd3c11cdf9bddad74e4242372
12,176
py
Python
yolov3_tf2/models.py
AVsolutionsai/YOLOv3_custom
d974e8305310cef31621b20128ba29c3b09ce2af
[ "MIT", "OLDAP-2.2.1", "Unlicense" ]
null
null
null
yolov3_tf2/models.py
AVsolutionsai/YOLOv3_custom
d974e8305310cef31621b20128ba29c3b09ce2af
[ "MIT", "OLDAP-2.2.1", "Unlicense" ]
null
null
null
yolov3_tf2/models.py
AVsolutionsai/YOLOv3_custom
d974e8305310cef31621b20128ba29c3b09ce2af
[ "MIT", "OLDAP-2.2.1", "Unlicense" ]
null
null
null
from absl import flags from absl.flags import FLAGS import numpy as np import tensorflow as tf from tensorflow.keras import Model from tensorflow.keras.layers import ( Add, Concatenate, Conv2D, Input, Lambda, LeakyReLU, MaxPool2D, UpSampling2D, ZeroPadding2D, ) from tensorflow.keras....
37.235474
87
0.604221
from absl import flags from absl.flags import FLAGS import numpy as np import tensorflow as tf from tensorflow.keras import Model from tensorflow.keras.layers import ( Add, Concatenate, Conv2D, Input, Lambda, LeakyReLU, MaxPool2D, UpSampling2D, ZeroPadding2D, ) from tensorflow.keras....
true
true
f721a01f25bf915b93bced32999e9d5635c07fda
5,196
py
Python
data_steward/cdr_cleaner/cleaning_rules/null_person_birthdate.py
lrwb-aou/curation
e80447e56d269dc2c9c8bc79e78218d4b0dc504c
[ "MIT" ]
16
2017-06-30T20:05:05.000Z
2022-03-08T21:03:19.000Z
data_steward/cdr_cleaner/cleaning_rules/null_person_birthdate.py
lrwb-aou/curation
e80447e56d269dc2c9c8bc79e78218d4b0dc504c
[ "MIT" ]
342
2017-06-23T21:37:40.000Z
2022-03-30T16:44:16.000Z
data_steward/cdr_cleaner/cleaning_rules/null_person_birthdate.py
lrwb-aou/curation
e80447e56d269dc2c9c8bc79e78218d4b0dc504c
[ "MIT" ]
33
2017-07-01T00:12:20.000Z
2022-01-26T18:06:53.000Z
""" Null Person Table Birth Date Fields In the person table, the fields month_of_birth, day_of_birth, and birth_datetime should be nulled. The year_of_birth field should remain unchanged. Original Issue: DC-1356 """ # Python imports import logging # Project imports import constants.bq_utils as bq_consts from cdr_cl...
37.381295
105
0.659738
import logging import constants.bq_utils as bq_consts from cdr_cleaner.cleaning_rules.base_cleaning_rule import BaseCleaningRule from constants.cdr_cleaner import clean_cdr as cdr_consts from common import JINJA_ENV, PERSON from utils import pipeline_logging LOGGER = logging.getLogger(__name__) NULL_DATE_QUERY = ...
true
true
f721a117918ff0bd279746d0e2b01e1cd2ecaeab
183
py
Python
benchmark/pysam_fasta_random_access.py
DishSri1/pyfastx
4bfa6662fb50b7244565ad00ef6e99962b4f3169
[ "MIT" ]
122
2019-10-21T16:22:27.000Z
2022-03-31T06:07:45.000Z
benchmark/pysam_fasta_random_access.py
DishSri1/pyfastx
4bfa6662fb50b7244565ad00ef6e99962b4f3169
[ "MIT" ]
40
2019-11-08T14:38:51.000Z
2022-03-15T13:07:38.000Z
benchmark/pysam_fasta_random_access.py
DishSri1/pyfastx
4bfa6662fb50b7244565ad00ef6e99962b4f3169
[ "MIT" ]
8
2020-01-20T01:31:51.000Z
2021-07-30T10:28:35.000Z
import sys import pysam idfile, fafile = sys.argv[1:] fa = pysam.FastaFile(fafile) with open(idfile) as fh: for line in fh: seqid = line.strip() s = str(fa[seqid]) print(s)
14.076923
29
0.666667
import sys import pysam idfile, fafile = sys.argv[1:] fa = pysam.FastaFile(fafile) with open(idfile) as fh: for line in fh: seqid = line.strip() s = str(fa[seqid]) print(s)
true
true
f721a16e8f02f666fcdc92caae18ad6f00ef9e1f
12,817
py
Python
tests/utils/log/elasticmock/fake_elasticsearch.py
wileeam/airflow
f46be8152a4d89c57db4ca46f5b3339e4876b723
[ "Apache-2.0" ]
1
2020-02-17T17:40:14.000Z
2020-02-17T17:40:14.000Z
tests/utils/log/elasticmock/fake_elasticsearch.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
2
2021-05-12T12:41:51.000Z
2021-09-29T17:47:43.000Z
tests/utils/log/elasticmock/fake_elasticsearch.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37.920118
105
0.581727
import json from elasticsearch import Elasticsearch from elasticsearch.client.utils import query_params from elasticsearch.exceptions import NotFoundError from .utilities import get_random_id class FakeElasticsearch(Elasticsearch): __documents_dict = None def __ini...
true
true
f721a1a1b37e686e4f48a58bde1c7698c1b3c997
6,863
py
Python
secret/gama/genetic_programming/compilers/scikitlearn.py
israel-cj/GAMA-GEISHA
210101df0e280d5c2eb5d325fc26d551bba74ed6
[ "Apache-2.0" ]
null
null
null
secret/gama/genetic_programming/compilers/scikitlearn.py
israel-cj/GAMA-GEISHA
210101df0e280d5c2eb5d325fc26d551bba74ed6
[ "Apache-2.0" ]
null
null
null
secret/gama/genetic_programming/compilers/scikitlearn.py
israel-cj/GAMA-GEISHA
210101df0e280d5c2eb5d325fc26d551bba74ed6
[ "Apache-2.0" ]
null
null
null
from datetime import datetime import logging import os import time from typing import Callable, Tuple, Optional, Sequence import stopit from sklearn.base import TransformerMixin, is_classifier from sklearn.model_selection import ShuffleSplit, cross_validate, check_cv from sklearn.pipeline import Pipeline from gama.ut...
37.298913
88
0.652047
from datetime import datetime import logging import os import time from typing import Callable, Tuple, Optional, Sequence import stopit from sklearn.base import TransformerMixin, is_classifier from sklearn.model_selection import ShuffleSplit, cross_validate, check_cv from sklearn.pipeline import Pipeline from gama.ut...
true
true
f721a1be56454def41dd34025c62ee217a56159a
70,696
py
Python
venv/Lib/site-packages/networkx/algorithms/shortest_paths/weighted.py
amelliaaas/tugastkc4
f442382c72379e911f3780543b95345a3b1c9407
[ "Apache-2.0" ]
5
2022-01-05T00:41:46.000Z
2022-03-21T07:22:58.000Z
venv/Lib/site-packages/networkx/algorithms/shortest_paths/weighted.py
amelliaaas/tugastkc4
f442382c72379e911f3780543b95345a3b1c9407
[ "Apache-2.0" ]
25
2021-04-17T09:26:47.000Z
2022-01-02T20:06:55.000Z
venv/Lib/site-packages/networkx/algorithms/shortest_paths/weighted.py
amelliaaas/tugastkc4
f442382c72379e911f3780543b95345a3b1c9407
[ "Apache-2.0" ]
20
2021-11-07T13:55:56.000Z
2021-12-02T10:54:01.000Z
""" Shortest path algorithms for weighed graphs. """ from collections import deque from heapq import heappush, heappop from itertools import count import networkx as nx from networkx.algorithms.shortest_paths.generic import _build_paths_from_predecessors __all__ = [ "dijkstra_path", "dijkstra_path_length", ...
32.018116
88
0.620445
from collections import deque from heapq import heappush, heappop from itertools import count import networkx as nx from networkx.algorithms.shortest_paths.generic import _build_paths_from_predecessors __all__ = [ "dijkstra_path", "dijkstra_path_length", "bidirectional_dijkstra", "single_source_dijks...
true
true
f721a2657cff9163e52336d5c42f2f8b73f6cf7e
383
py
Python
configs/faster_rcnn/faster_rcnn_x101_64x4d_fpn_1x_coco.py
yypurpose/mmdetection
ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c
[ "Apache-2.0" ]
null
null
null
configs/faster_rcnn/faster_rcnn_x101_64x4d_fpn_1x_coco.py
yypurpose/mmdetection
ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c
[ "Apache-2.0" ]
null
null
null
configs/faster_rcnn/faster_rcnn_x101_64x4d_fpn_1x_coco.py
yypurpose/mmdetection
ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c
[ "Apache-2.0" ]
null
null
null
_base_ = './faster_rcnn_r50_fpn_1x_coco.py' model = dict( pretrained='open-mmlab://resnext101_64x4d', backbone=dict( type='ResNeXt', depth=101, groups=64, base_width=4, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=di...
27.357143
54
0.563969
_base_ = './faster_rcnn_r50_fpn_1x_coco.py' model = dict( pretrained='open-mmlab://resnext101_64x4d', backbone=dict( type='ResNeXt', depth=101, groups=64, base_width=4, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=di...
true
true
f721a43045ff008abbe0323da19119831a8f5c4e
4,415
py
Python
howtolens/simulators/chapter_4/mass_sie__source_sersic__2.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
howtolens/simulators/chapter_4/mass_sie__source_sersic__2.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
howtolens/simulators/chapter_4/mass_sie__source_sersic__2.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
from os import path import autolens as al """ This script simulates `Imaging` of a strong lens where: - The lens `Galaxy`'s total mass distribution is a *SphericalIsothermal*. - The source `Galaxy`'s `LightProfile` is a *SphericalExponential*. This dataset is used in chapter 2, tutorials 1-3. """ """ ...
39.070796
120
0.727973
from os import path import autolens as al dataset_type = "chapter_4" dataset_name = "mass_sie__source_sersic__2" dataset_path = path.join("dataset", "howtolens", dataset_type, dataset_name) grid = al.GridIterate.uniform( shape_2d=(150, 150), pixel_scales=0.05, fractional_accuracy=0.9999, ...
true
true
f721a452377d10ba2fe32cd315a6bdce392c234d
594
py
Python
hc/accounts/tests/test_team_access_middleware.py
andela/-healthchecks_spartans
4dd6480fc178996c0e386548816ca8c74e4af50d
[ "BSD-3-Clause" ]
null
null
null
hc/accounts/tests/test_team_access_middleware.py
andela/-healthchecks_spartans
4dd6480fc178996c0e386548816ca8c74e4af50d
[ "BSD-3-Clause" ]
null
null
null
hc/accounts/tests/test_team_access_middleware.py
andela/-healthchecks_spartans
4dd6480fc178996c0e386548816ca8c74e4af50d
[ "BSD-3-Clause" ]
null
null
null
from django.contrib.auth.models import User from django.test import TestCase from hc.accounts.models import Profile class TeamAccessMiddlewareTestCase(TestCase): def test_it_handles_missing_profile(self): user = User(username="ned", email="ned@example.org") user.set_password("password") u...
31.263158
74
0.695286
from django.contrib.auth.models import User from django.test import TestCase from hc.accounts.models import Profile class TeamAccessMiddlewareTestCase(TestCase): def test_it_handles_missing_profile(self): user = User(username="ned", email="ned@example.org") user.set_password("password") u...
true
true
f721a4751de1cbbd852750a103606b9e45275fbe
2,081
py
Python
pysptools/skl/docstring.py
ctherien/pysptools
fbcd3ecaa7ab27f0158b28b4327537c3e75db160
[ "Apache-2.0" ]
35
2016-03-20T15:25:07.000Z
2022-03-29T04:05:56.000Z
pysptools/skl/docstring.py
ctherien/pysptools
fbcd3ecaa7ab27f0158b28b4327537c3e75db160
[ "Apache-2.0" ]
12
2016-03-24T13:38:52.000Z
2021-04-06T07:11:19.000Z
pysptools/skl/docstring.py
ctherien/pysptools
fbcd3ecaa7ab27f0158b28b4327537c3e75db160
[ "Apache-2.0" ]
14
2016-03-21T17:26:46.000Z
2022-01-18T08:39:27.000Z
# #------------------------------------------------------------------------------ # Copyright (c) 2013-2017, Christian Therien # # 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://ww...
32.515625
79
0.566555
plot_fi_docstring = """ Plot the feature importances. The output can be split in n graphs. Parameters: path: `string` The path where to save the plot. n_labels: `string or integer` The number of labels to output by graph....
true
true
f721a4c6a5e4336c0f4cb7515b1636b493ef02d6
6,182
py
Python
tools/pysa_integration_tests/utils.py
joehendrix/pyre-check
23693455b1e0b4a7287efba9337be6bbfe23ada4
[ "MIT" ]
1
2022-02-10T10:51:32.000Z
2022-02-10T10:51:32.000Z
tools/pysa_integration_tests/utils.py
joehendrix/pyre-check
23693455b1e0b4a7287efba9337be6bbfe23ada4
[ "MIT" ]
null
null
null
tools/pysa_integration_tests/utils.py
joehendrix/pyre-check
23693455b1e0b4a7287efba9337be6bbfe23ada4
[ "MIT" ]
null
null
null
# 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 __future__ import annotations import json import logging import subprocess import sys from pathlib import Path from typing import fina...
32.197917
88
0.651084
from __future__ import annotations import json import logging import subprocess import sys from pathlib import Path from typing import final, Sequence, Optional LOG: logging.Logger = logging.getLogger(__name__) @final class PyreErrorException(Exception): pass def normalized_json_dump( results: str, ...
true
true
f721a628ef8e42f4b26f07888d6e70148b933809
4,668
py
Python
homeassistant/components/velux/cover.py
orcema/core
ce144bf63145813c76fbbe4f9423341764695057
[ "Apache-2.0" ]
null
null
null
homeassistant/components/velux/cover.py
orcema/core
ce144bf63145813c76fbbe4f9423341764695057
[ "Apache-2.0" ]
null
null
null
homeassistant/components/velux/cover.py
orcema/core
ce144bf63145813c76fbbe4f9423341764695057
[ "Apache-2.0" ]
null
null
null
"""Support for Velux covers.""" from __future__ import annotations from typing import Any from pyvlx import OpeningDevice, Position from pyvlx.opening_device import Awning, Blind, GarageDoor, Gate, RollerShutter, Window from homeassistant.components.cover import ( ATTR_POSITION, ATTR_TILT_POSITION, Cover...
35.097744
89
0.673522
from __future__ import annotations from typing import Any from pyvlx import OpeningDevice, Position from pyvlx.opening_device import Awning, Blind, GarageDoor, Gate, RollerShutter, Window from homeassistant.components.cover import ( ATTR_POSITION, ATTR_TILT_POSITION, CoverDeviceClass, CoverEntity, ...
true
true
f721a6360f0511e109d096adce51015e18e66e23
5,135
py
Python
Scripts/Slicer.py
rhong3/GBM
088b1e99f4fe02395b62d324ec4f9e8402417651
[ "MIT" ]
null
null
null
Scripts/Slicer.py
rhong3/GBM
088b1e99f4fe02395b62d324ec4f9e8402417651
[ "MIT" ]
null
null
null
Scripts/Slicer.py
rhong3/GBM
088b1e99f4fe02395b62d324ec4f9e8402417651
[ "MIT" ]
null
null
null
""" Tile real scn/svs files; used by Cutter.py Created on 11/19/2018 *** Removed imlist storage to minimize memory usage 01/24/2019 *** @author: RH """ from openslide import OpenSlide import numpy as np import pandas as pd import multiprocessing as mp import staintools from PIL import Image # check if a tile is ba...
37.210145
120
0.63408
from openslide import OpenSlide import numpy as np import pandas as pd import multiprocessing as mp import staintools from PIL import Image def bgcheck(img, ts): the_imagea = np.array(img)[:, :, :3] the_imagea = np.nan_to_num(the_imagea) mask = (the_imagea[:, :, :3] > 200).astype(np.uint8) maskb = (t...
true
true
f721a64b1ed80dcb38fc20d3f17da57445b5b1a0
9,626
py
Python
python/ht/ui/menus/parmmenu.py
Hengle/Houdini-Toolbox
a1fd7d3dd73d3fc4cea78e29aeff1d190c41bae3
[ "MIT" ]
136
2015-01-03T04:03:23.000Z
2022-02-07T11:08:57.000Z
python/ht/ui/menus/parmmenu.py
Hengle/Houdini-Toolbox
a1fd7d3dd73d3fc4cea78e29aeff1d190c41bae3
[ "MIT" ]
11
2017-02-09T20:05:04.000Z
2021-01-24T22:25:59.000Z
python/ht/ui/menus/parmmenu.py
Hengle/Houdini-Toolbox
a1fd7d3dd73d3fc4cea78e29aeff1d190c41bae3
[ "MIT" ]
26
2015-08-18T12:11:02.000Z
2020-12-19T01:53:31.000Z
"""This module contains functions supporting custom PARMmenu.xml entries.""" # ============================================================================= # IMPORTS # ============================================================================= # Standard Library from typing import Dict, List # Houdini import hou ...
34.134752
88
0.601911
from typing import Dict, List import hou def _valid_to_convert_to_absolute_reference(parm: hou.Parm) -> bool: parm_template = parm.parmTemplate() if isinstance(parm_template, hou.StringParmTemplate): if parm_template.stringType() == hou.stringParmType.NodeReference: ...
true
true
f721a752d81135177ab54ecb6768ca98ba8ac9c6
6,793
py
Python
controller/modules/Logger.py
avinashnatesan/Controllers
85a005a87e61d50a3ada660e8d90739745e211af
[ "MIT" ]
null
null
null
controller/modules/Logger.py
avinashnatesan/Controllers
85a005a87e61d50a3ada660e8d90739745e211af
[ "MIT" ]
null
null
null
controller/modules/Logger.py
avinashnatesan/Controllers
85a005a87e61d50a3ada660e8d90739745e211af
[ "MIT" ]
null
null
null
# ipop-project # Copyright 2016, University of Florida # # 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, m...
45.590604
97
0.602532
import logging import logging.handlers as lh import os from controller.framework.ControllerModule import ControllerModule class Logger(ControllerModule): def __init__(self, cfx_handle, module_config, module_name): super(Logger, self).__init__(cfx_handle, module_config, module_name) ...
true
true
f721aa11249df76d852759230ba85c6a027c2c3e
3,271
py
Python
libs/parse_ansible.py
realglobe-Inc/atom-autocomplete-ansible
3752b7d893be35ca93a8e424c960e328c0d75bb9
[ "MIT" ]
32
2016-07-22T06:17:00.000Z
2021-09-24T16:19:11.000Z
libs/parse_ansible.py
realglobe-Inc/atom-autocomplete-ansible
3752b7d893be35ca93a8e424c960e328c0d75bb9
[ "MIT" ]
50
2016-06-28T09:36:00.000Z
2022-03-18T13:03:18.000Z
libs/parse_ansible.py
realglobe-Inc/atom-autocomplete-ansible
3752b7d893be35ca93a8e424c960e328c0d75bb9
[ "MIT" ]
22
2016-09-20T16:56:04.000Z
2022-03-25T23:24:35.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import __main__ import json import os from ansible.cli.doc import DocCLI from ansible.playbook import Play from ansible.playbook.block import Block from ansible.playbook.role import Role from ansible.playbook.task im...
32.068627
75
0.64812
from __future__ import print_function, unicode_literals import __main__ import json import os from ansible.cli.doc import DocCLI from ansible.playbook import Play from ansible.playbook.block import Block from ansible.playbook.role import Role from ansible.playbook.task import Task from ansible.utils.display import ...
true
true
f721aa8af2cd7cf530a4b76cbb10ce9276f81044
5,616
py
Python
espnet/asr/pytorch_backend/asr_recog.py
MarkWuNLP/StreamingTransformer
df9bfe348608b7e55ef1ff70464070c0055ea799
[ "Apache-2.0" ]
null
null
null
espnet/asr/pytorch_backend/asr_recog.py
MarkWuNLP/StreamingTransformer
df9bfe348608b7e55ef1ff70464070c0055ea799
[ "Apache-2.0" ]
null
null
null
espnet/asr/pytorch_backend/asr_recog.py
MarkWuNLP/StreamingTransformer
df9bfe348608b7e55ef1ff70464070c0055ea799
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # encoding: utf-8 # Copyright 2017 Johns Hopkins University (Shinji Watanabe) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Training/decoding definition for the speech recognition task.""" import json import logging import os import numpy as np import torch from espnet.asr.a...
34.036364
110
0.615028
import json import logging import os import numpy as np import torch from espnet.asr.asr_utils import add_results_to_json, add_single_results from espnet.asr.asr_utils import get_model_conf from espnet.asr.asr_utils import torch_load from espnet.asr.pytorch_backend.asr_init import load_trained_model import esp...
true
true
f721ab5c5621aefa332a1c1c49b2c98c1ff4fa57
2,408
py
Python
pythonup/operations/common.py
uranusjr/pythonup-windows
af25844af1c5fdc8a90ae95435c8ce322e5e41e5
[ "0BSD" ]
22
2018-01-18T21:03:26.000Z
2021-06-29T00:19:44.000Z
pythonup/operations/common.py
uranusjr/pythonup-windows
af25844af1c5fdc8a90ae95435c8ce322e5e41e5
[ "0BSD" ]
22
2018-02-22T17:08:50.000Z
2021-11-07T09:20:18.000Z
pythonup/operations/common.py
uranusjr/pythonup-windows
af25844af1c5fdc8a90ae95435c8ce322e5e41e5
[ "0BSD" ]
2
2018-01-18T21:03:30.000Z
2021-01-18T05:14:18.000Z
import functools import click from .. import configs, metadata, versions def check_installation(version, *, installed=True, on_exit=None): try: installation = version.get_installation() except FileNotFoundError: if not installed: # Expected to be absent. Return None. return Non...
28
79
0.618355
import functools import click from .. import configs, metadata, versions def check_installation(version, *, installed=True, on_exit=None): try: installation = version.get_installation() except FileNotFoundError: if not installed: return None message = '{} is not instal...
true
true
f721ab81cbd00ed051aca6942799ab865c6412c5
238
py
Python
frappe/website/doctype/website_route_redirect/website_route_redirect.py
ssuda777/frappe
d3f3df2ce15154aecc1d9d6d07d947e72c2e8c6e
[ "MIT" ]
1
2021-06-03T07:04:48.000Z
2021-06-03T07:04:48.000Z
frappe/website/doctype/website_route_redirect/website_route_redirect.py
JMBodz/frappe
eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d
[ "MIT" ]
3
2021-02-27T11:50:14.000Z
2021-05-03T06:48:49.000Z
frappe/website/doctype/website_route_redirect/website_route_redirect.py
JMBodz/frappe
eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d
[ "MIT" ]
2
2021-09-02T09:51:55.000Z
2021-09-07T04:55:42.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors # For license information, please see license.txt # import frappe from frappe.model.document import Document class WebsiteRouteRedirect(Document): pass
23.8
58
0.768908
from frappe.model.document import Document class WebsiteRouteRedirect(Document): pass
true
true
f721abc28aeee16569cf14634251ef073a83b8f1
2,289
py
Python
core/models.py
mackay/ble_detector
4d7c3e9edd7bbeeea0bd0bebce43c1bb9d02ee41
[ "MIT" ]
null
null
null
core/models.py
mackay/ble_detector
4d7c3e9edd7bbeeea0bd0bebce43c1bb9d02ee41
[ "MIT" ]
null
null
null
core/models.py
mackay/ble_detector
4d7c3e9edd7bbeeea0bd0bebce43c1bb9d02ee41
[ "MIT" ]
null
null
null
from peewee import * import json from datetime import datetime #set sane default log levels import logging logging.getLogger('peewee').setLevel(logging.INFO) logging.getLogger("peewee.pool").setLevel(logging.DEBUG) database = SqliteDatabase('detector.db') class JSONField(TextField): def db_value(self, value): ...
24.094737
74
0.70118
from peewee import * import json from datetime import datetime import logging logging.getLogger('peewee').setLevel(logging.INFO) logging.getLogger("peewee.pool").setLevel(logging.DEBUG) database = SqliteDatabase('detector.db') class JSONField(TextField): def db_value(self, value): if value is not None...
true
true
f721ae2772712944094b9c2e009ee6bae9dce86c
827
py
Python
app/main/models/EMI.py
pOrgz-dev/financial-api
edf849cfbcedf74a8b81f70683a1edfbea172fb7
[ "MIT" ]
null
null
null
app/main/models/EMI.py
pOrgz-dev/financial-api
edf849cfbcedf74a8b81f70683a1edfbea172fb7
[ "MIT" ]
null
null
null
app/main/models/EMI.py
pOrgz-dev/financial-api
edf849cfbcedf74a8b81f70683a1edfbea172fb7
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- from .. import db class EMI_Information(db.Model): __tablename__ = "EMI_Information" EMI_Identifier = db.Column(db.String(45),primary_key = True, nullable = False) ItemName = db.Column(db.String(45), nullable = False) ProductPrice = db.Column(db.Float, nullable = False) ...
41.35
128
0.666264
from .. import db class EMI_Information(db.Model): __tablename__ = "EMI_Information" EMI_Identifier = db.Column(db.String(45),primary_key = True, nullable = False) ItemName = db.Column(db.String(45), nullable = False) ProductPrice = db.Column(db.Float, nullable = False) InterestRate = db.Colu...
true
true
f721aeecd78fde51b1f23b627ac73ea974b16e4f
5,118
py
Python
draw_tracking_line.py
jiyauppal/face-mask-detector.github.io
210ce81fa37c441a076fbb8db28376268e634412
[ "Apache-2.0" ]
1
2021-05-13T07:54:08.000Z
2021-05-13T07:54:08.000Z
draw_tracking_line.py
jiyauppal/face-mask-detector.github.io
210ce81fa37c441a076fbb8db28376268e634412
[ "Apache-2.0" ]
null
null
null
draw_tracking_line.py
jiyauppal/face-mask-detector.github.io
210ce81fa37c441a076fbb8db28376268e634412
[ "Apache-2.0" ]
null
null
null
import cv2 import datetime import imutils import numpy as np from centroidtracker import CentroidTracker from collections import defaultdict protopath = "MobileNetSSD_deploy.prototxt" modelpath = "MobileNetSSD_deploy.caffemodel" detector = cv2.dnn.readNetFromCaffe(prototxt=protopath, caffeModel=modelpath) ...
33.45098
106
0.524424
import cv2 import datetime import imutils import numpy as np from centroidtracker import CentroidTracker from collections import defaultdict protopath = "MobileNetSSD_deploy.prototxt" modelpath = "MobileNetSSD_deploy.caffemodel" detector = cv2.dnn.readNetFromCaffe(prototxt=protopath, caffeModel=modelpath) ...
true
true
f721aef7525b920408840cd454d2a33a4df2714c
1,953
py
Python
setup.py
PyXRD/pyxrd
26bacdf64f3153fa74b8caa62e219b76d91a55c1
[ "BSD-2-Clause" ]
27
2018-06-15T15:28:18.000Z
2022-03-10T12:23:50.000Z
setup.py
PyXRD/pyxrd
26bacdf64f3153fa74b8caa62e219b76d91a55c1
[ "BSD-2-Clause" ]
22
2018-06-14T08:29:16.000Z
2021-07-05T13:33:44.000Z
setup.py
PyXRD/pyxrd
26bacdf64f3153fa74b8caa62e219b76d91a55c1
[ "BSD-2-Clause" ]
8
2019-04-13T13:03:51.000Z
2021-06-19T09:29:11.000Z
#!/usr/bin/env python3 import os from setuptools import setup, find_packages def get_version(): from pyxrd.__version import __version__ if __version__.startswith("v"): __version__ = __version__.replace("v", "") return "%s" % __version__ def get_install_requires(): return [ 'setuptools...
31.5
154
0.622632
import os from setuptools import setup, find_packages def get_version(): from pyxrd.__version import __version__ if __version__.startswith("v"): __version__ = __version__.replace("v", "") return "%s" % __version__ def get_install_requires(): return [ 'setuptools', 'numpy>=1.1...
true
true
f721afa5606a9e63a7128757986d8b2a4eb9a224
2,755
py
Python
scripts/py_scripts/calculate_cluster_average.py
Elenadisa/PhenCo
f320fc286b90ec566afb5edfe3d6d1e3dcc28497
[ "MIT" ]
3
2020-12-12T03:17:13.000Z
2021-02-21T01:43:29.000Z
scripts/py_scripts/calculate_cluster_average.py
Elenadisa/PhenCo
f320fc286b90ec566afb5edfe3d6d1e3dcc28497
[ "MIT" ]
5
2021-02-03T04:15:03.000Z
2021-03-17T07:29:14.000Z
scripts/py_scripts/calculate_cluster_average.py
Elenadisa/PhenCo
f320fc286b90ec566afb5edfe3d6d1e3dcc28497
[ "MIT" ]
null
null
null
#! /usr/bin/env python ############################################################################################################################################## # METHODS ##################################################################################################################################...
50.090909
154
0.450091
true
true
f721b00012139ce758efe463a3d3ca112283819e
1,375
py
Python
docs/development/custom-vectors/secp256k1/verify_secp256k1.py
dvaerum/cryptography
63dfc57fca688d0f8d0515001f249c317d5e54dc
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
8
2015-01-29T19:16:40.000Z
2021-01-08T05:55:03.000Z
docs/development/custom-vectors/secp256k1/verify_secp256k1.py
dvaerum/cryptography
63dfc57fca688d0f8d0515001f249c317d5e54dc
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
12
2021-01-05T06:46:37.000Z
2022-03-30T19:06:26.000Z
docs/development/custom-vectors/secp256k1/verify_secp256k1.py
dvaerum/cryptography
63dfc57fca688d0f8d0515001f249c317d5e54dc
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
5
2015-11-06T01:47:01.000Z
2021-12-01T00:22:52.000Z
from __future__ import absolute_import, print_function import os from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives.asymmetric.utils import ( encode_dss_signature, )...
25.943396
79
0.744
from __future__ import absolute_import, print_function import os from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives.asymmetric.utils import ( encode_dss_signature, )...
true
true
f721b000aa08bdf2f6fa4ebe1f323827ac57b123
217
py
Python
3rdParty/V8/v5.7.0.0/tools/foozzie/testdata/test_d8_1.py
jjzhang166/avocadodb
948d94592c10731857c8617b133bda840b8e833e
[ "BSL-1.0", "Zlib", "Apache-2.0" ]
null
null
null
3rdParty/V8/v5.7.0.0/tools/foozzie/testdata/test_d8_1.py
jjzhang166/avocadodb
948d94592c10731857c8617b133bda840b8e833e
[ "BSL-1.0", "Zlib", "Apache-2.0" ]
null
null
null
3rdParty/V8/v5.7.0.0/tools/foozzie/testdata/test_d8_1.py
jjzhang166/avocadodb
948d94592c10731857c8617b133bda840b8e833e
[ "BSL-1.0", "Zlib", "Apache-2.0" ]
null
null
null
# Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. print """ 1 2 weird error ^ 3 unknown """
16.692308
72
0.695853
print """ 1 2 weird error ^ 3 unknown """
false
true
f721b0aaa3a21ebd95d28ba898211ca8c479b10e
4,747
py
Python
mlprodict/onnx_tools/optim/onnx_optimisation_identity.py
henrywu2019/mlprodict
4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad
[ "MIT" ]
null
null
null
mlprodict/onnx_tools/optim/onnx_optimisation_identity.py
henrywu2019/mlprodict
4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad
[ "MIT" ]
null
null
null
mlprodict/onnx_tools/optim/onnx_optimisation_identity.py
henrywu2019/mlprodict
4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad
[ "MIT" ]
null
null
null
""" @file @brief Optimisation of :epkg:`ONNX` graphs. """ from onnx.helper import make_graph from ._onnx_optimisation_common import ( # pylint: disable=E0611 _rename_node_input, _rename_node_output, _apply_optimisation_on_graph, _apply_remove_node_fct_node ) def onnx_remove_node_identity...
39.231405
87
0.52391
from onnx.helper import make_graph from ._onnx_optimisation_common import ( _rename_node_input, _rename_node_output, _apply_optimisation_on_graph, _apply_remove_node_fct_node ) def onnx_remove_node_identity(onnx_model, recursive=True, debug_info=None, **options): if debug_info is None: ...
true
true
f721b154eb6f80cea86ed321cc3199bcce85024f
300
py
Python
01-code-scripts/example.py
calekochenour/python-formatter-env
9cc0b484e9b8b8d17a8abe5d2f9f49af953a7790
[ "BSD-3-Clause" ]
null
null
null
01-code-scripts/example.py
calekochenour/python-formatter-env
9cc0b484e9b8b8d17a8abe5d2f9f49af953a7790
[ "BSD-3-Clause" ]
null
null
null
01-code-scripts/example.py
calekochenour/python-formatter-env
9cc0b484e9b8b8d17a8abe5d2f9f49af953a7790
[ "BSD-3-Clause" ]
null
null
null
def example_function(first_parameter, second_parameter, third_parameter, fourth_parameter, fifth_parameter): """Example function to test the code formatter.""" parameter_sum = first_parameter + second_parameter + third_parameter + fourth_parameter + fifth_parameter return parameter_sum
50
109
0.806667
def example_function(first_parameter, second_parameter, third_parameter, fourth_parameter, fifth_parameter): parameter_sum = first_parameter + second_parameter + third_parameter + fourth_parameter + fifth_parameter return parameter_sum
true
true
f721b168bc3ebd2c6a8be74cae0fb14973d58fc0
4,618
py
Python
examples/orcid_app.py
jennur/invenio-oauthclient
9b8bd7bc8bcbbe178aad3f0f8a2e620749c9980b
[ "MIT" ]
3
2015-08-19T12:50:05.000Z
2017-10-25T00:58:05.000Z
examples/orcid_app.py
jennur/invenio-oauthclient
9b8bd7bc8bcbbe178aad3f0f8a2e620749c9980b
[ "MIT" ]
169
2015-08-03T11:25:49.000Z
2022-02-10T08:06:20.000Z
examples/orcid_app.py
jennur/invenio-oauthclient
9b8bd7bc8bcbbe178aad3f0f8a2e620749c9980b
[ "MIT" ]
73
2015-08-03T15:16:05.000Z
2022-03-07T15:34:36.000Z
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. r"""Minimal Flask application example for development with orcid handler. SPHINX-STA...
28.8625
80
0.750325
import os from flask import Flask, redirect, url_for from flask_babelex import Babel from flask_login import current_user from flask_menu import Menu as FlaskMenu from invenio_accounts import InvenioAccounts from invenio_accounts.views import blueprint as blueprint_user from invenio_db import InvenioDB from i...
true
true
f721b1ff207ea23d5cdd699f29d320911240c621
743
py
Python
notes/migrations/0001_initial.py
chalikavanyaa/stu-do-list
b6af2f1072936240a59f1b63cc7fc32999132da4
[ "Unlicense" ]
2
2021-12-02T07:15:24.000Z
2021-12-15T06:27:53.000Z
notes/migrations/0001_initial.py
chalikavanyaa/stu-do-list
b6af2f1072936240a59f1b63cc7fc32999132da4
[ "Unlicense" ]
1
2021-11-05T12:42:12.000Z
2021-11-05T12:42:12.000Z
notes/migrations/0001_initial.py
chalikavanyaa/stu-do-list
b6af2f1072936240a59f1b63cc7fc32999132da4
[ "Unlicense" ]
6
2021-10-30T13:44:16.000Z
2021-12-29T09:14:18.000Z
# Generated by Django 3.2.7 on 2021-11-04 20:13 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='NotesModel', fields=[ ('id'...
27.518519
118
0.537012
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='NotesModel', fields=[ ('id', models.BigAutoField(auto_created=True, primary...
true
true
f721b33e8da5aa1935c59645b23cb35201dfccdd
340
py
Python
Hackerrank/swap-case.py
sourav1122/Hacktoberfest
3e3a6e1a537632b1f2b7af3b3b69c8696355047c
[ "MIT" ]
1
2019-10-13T13:43:18.000Z
2019-10-13T13:43:18.000Z
Hackerrank/swap-case.py
sourav1122/Hacktoberfest
3e3a6e1a537632b1f2b7af3b3b69c8696355047c
[ "MIT" ]
null
null
null
Hackerrank/swap-case.py
sourav1122/Hacktoberfest
3e3a6e1a537632b1f2b7af3b3b69c8696355047c
[ "MIT" ]
null
null
null
#!/bin/python3 # Swaps case of all chars in provided string def swap_case(s): formattedStr = "".join(map(swapChar, s)) return formattedStr def swapChar(char): if char.islower(): return char.upper() else: return char.lower() n=input() if len(n)==1: print(swapChar(n)) else: ...
17.894737
44
0.623529
def swap_case(s): formattedStr = "".join(map(swapChar, s)) return formattedStr def swapChar(char): if char.islower(): return char.upper() else: return char.lower() n=input() if len(n)==1: print(swapChar(n)) else: print(swap_case(n))
true
true
f721b3f846fa3924e1f8ff5e8b545d82d1f3e494
205
py
Python
1072.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
3
2020-11-25T19:05:31.000Z
2021-03-29T07:29:36.000Z
1072.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
null
null
null
1072.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
null
null
null
qte = int(input()) sim = 0 nao = 0 for i in range(qte): valor = int(input()) if(valor >= 10 and valor <= 20): sim += 1 else: nao += 1 print("%d in" %sim) print("%d out" %nao)
14.642857
36
0.487805
qte = int(input()) sim = 0 nao = 0 for i in range(qte): valor = int(input()) if(valor >= 10 and valor <= 20): sim += 1 else: nao += 1 print("%d in" %sim) print("%d out" %nao)
true
true
f721b4abc95f52800b933cdfce1558f764e48a65
1,087
py
Python
utils/fonts_scanner.py
sunnywalden/oss_management
4d417801ba0c55493788b356921c4e3ea462a851
[ "Apache-2.0" ]
null
null
null
utils/fonts_scanner.py
sunnywalden/oss_management
4d417801ba0c55493788b356921c4e3ea462a851
[ "Apache-2.0" ]
null
null
null
utils/fonts_scanner.py
sunnywalden/oss_management
4d417801ba0c55493788b356921c4e3ea462a851
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- # author: sunnywalden@gmail.com import os from utils.get_logger import Log def get_fonts_from_local(): log = Log() logger = log.logger_generate('font_scanner') # fonts_lists = [] for root, dirs, files in os.walk('../fonts'): logger.info('File foun...
29.378378
90
0.601656
import os from utils.get_logger import Log def get_fonts_from_local(): log = Log() logger = log.logger_generate('font_scanner') for root, dirs, files in os.walk('../fonts'): logger.info('File found %s, dirs: %s' % (files, dirs)) for file in files: logger.info('File fo...
true
true
f721b4f5eb357708bf5747da4008cd53e3881f89
1,359
py
Python
pyblas/level1/scnrm2.py
timleslie/pyblas
9109f2cc24e674cf59a3b39f95c2d7b8116ae884
[ "BSD-3-Clause" ]
null
null
null
pyblas/level1/scnrm2.py
timleslie/pyblas
9109f2cc24e674cf59a3b39f95c2d7b8116ae884
[ "BSD-3-Clause" ]
1
2020-10-10T23:23:06.000Z
2020-10-10T23:23:06.000Z
pyblas/level1/scnrm2.py
timleslie/pyblas
9109f2cc24e674cf59a3b39f95c2d7b8116ae884
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from ..util import slice_ def scnrm2(N, X, INCX): """Computes the Euclidean norm of the vector x Parameters ---------- N : int Number of elements in input vector X : numpy.ndarray A single precision complex array, dimension (1 + (`N` - 1)*abs(`INCX`)) INCX :...
29.543478
113
0.636497
import numpy as np from ..util import slice_ def scnrm2(N, X, INCX): if N <= 0: return 0 return np.sqrt((X[slice_(N, INCX)].conj() * X[slice_(N, INCX)]).sum().real)
true
true
f721b541788468f6224ba9b4f3e9d2a8b01d2637
3,999
py
Python
tests/manage/monitoring/prometheus/test_deployment_status.py
shivamdurgbuns/ocs-ci
0fa3a19cab39dcc76843338e4af357c197c08843
[ "MIT" ]
null
null
null
tests/manage/monitoring/prometheus/test_deployment_status.py
shivamdurgbuns/ocs-ci
0fa3a19cab39dcc76843338e4af357c197c08843
[ "MIT" ]
null
null
null
tests/manage/monitoring/prometheus/test_deployment_status.py
shivamdurgbuns/ocs-ci
0fa3a19cab39dcc76843338e4af357c197c08843
[ "MIT" ]
null
null
null
import logging import pytest from ocs_ci.framework.testlib import tier4, tier4a from ocs_ci.ocs import constants from ocs_ci.utility import prometheus from ocs_ci.ocs.ocp import OCP log = logging.getLogger(__name__) @tier4 @tier4a @pytest.mark.polarion_id("OCS-1052") def test_ceph_manager_stopped(measure_stop_ceph...
29.189781
82
0.632908
import logging import pytest from ocs_ci.framework.testlib import tier4, tier4a from ocs_ci.ocs import constants from ocs_ci.utility import prometheus from ocs_ci.ocs.ocp import OCP log = logging.getLogger(__name__) @tier4 @tier4a @pytest.mark.polarion_id("OCS-1052") def test_ceph_manager_stopped(measure_stop_ceph...
true
true
f721b63438fa70ee2bdce28ac774d92f0929d8a6
5,826
py
Python
openapi_to_fastapi/tests/test_ihan_standards.py
tbikeev/openapi-to-fastapi
46cacb41fde2d178afd58466fb6080d79fef1b22
[ "BSD-3-Clause" ]
null
null
null
openapi_to_fastapi/tests/test_ihan_standards.py
tbikeev/openapi-to-fastapi
46cacb41fde2d178afd58466fb6080d79fef1b22
[ "BSD-3-Clause" ]
null
null
null
openapi_to_fastapi/tests/test_ihan_standards.py
tbikeev/openapi-to-fastapi
46cacb41fde2d178afd58466fb6080d79fef1b22
[ "BSD-3-Clause" ]
null
null
null
import json from copy import deepcopy from pathlib import Path import pytest from ..routes import SpecRouter from ..validator import InvalidJSON, UnsupportedVersion from ..validator import ihan_standards as ihan # Note: It's easier to get some 100% valid spec and corrupt it # instead of having multiple incorrect spe...
35.962963
87
0.730862
import json from copy import deepcopy from pathlib import Path import pytest from ..routes import SpecRouter from ..validator import InvalidJSON, UnsupportedVersion from ..validator import ihan_standards as ihan # instead of having multiple incorrect specs in the repo SPECS_ROOT_DIR = Path(__file__).absolute().par...
true
true
f721b681480bbcf350254eceb8ac0f83efa3bb75
147,382
py
Python
scipy/stats/_distn_infrastructure.py
sntgl/scipy
6660830eb7d7590d56f1377d27bf7ee97bb3adec
[ "BSD-3-Clause" ]
null
null
null
scipy/stats/_distn_infrastructure.py
sntgl/scipy
6660830eb7d7590d56f1377d27bf7ee97bb3adec
[ "BSD-3-Clause" ]
null
null
null
scipy/stats/_distn_infrastructure.py
sntgl/scipy
6660830eb7d7590d56f1377d27bf7ee97bb3adec
[ "BSD-3-Clause" ]
null
null
null
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from scipy._lib._util import getfullargspec_no_self as _getfullargspec import sys import keyword import re import types import warnings import inspect from itertools import zip_longest from collections import namedt...
36.516848
195
0.573347
from scipy._lib._util import getfullargspec_no_self as _getfullargspec import sys import keyword import re import types import warnings import inspect from itertools import zip_longest from collections import namedtuple from scipy._lib import doccer from scipy._lib._util import _lazywhere from ._distr_params impo...
true
true
f721b6c0725948384b13004e8039bea5c71d7ff9
14,338
py
Python
example/ui/example_pyqt5_ui.py
blurstudio/QDarkStyleSheet
68c9e3177742c47b158594260b57f591b5238e7a
[ "MIT" ]
8
2016-08-28T18:28:05.000Z
2020-09-09T15:41:52.000Z
example/ui/example_pyqt5_ui.py
blurstudio/QDarkStyleSheet
68c9e3177742c47b158594260b57f591b5238e7a
[ "MIT" ]
null
null
null
example/ui/example_pyqt5_ui.py
blurstudio/QDarkStyleSheet
68c9e3177742c47b158594260b57f591b5238e7a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'example.ui' # # Created: Sat May 17 20:31:42 2014 # by: PyQt5 UI code generator 5.2.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(sel...
54.725191
104
0.707491
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(880, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") ...
true
true
f721b6ccaaf918b21885f9b671dce1f756b4c4ca
2,337
py
Python
pipeline_utils.py
j-petit/mplus_model_pipeline
4b837ad3cdcd337a842f9eac1b75f58ef477da7a
[ "MIT" ]
null
null
null
pipeline_utils.py
j-petit/mplus_model_pipeline
4b837ad3cdcd337a842f9eac1b75f58ef477da7a
[ "MIT" ]
null
null
null
pipeline_utils.py
j-petit/mplus_model_pipeline
4b837ad3cdcd337a842f9eac1b75f58ef477da7a
[ "MIT" ]
null
null
null
""" File: pipeline_utils.py Author: Jens Petit Email: petit.jens@gmail.com Github: https://github.com/j-petit Description: Utility functions for filtering models """ import re def createDiffs(model1, model2, filename): """Takes two models and creates constraint variables out of their paths. Parameters -...
23.846939
76
0.551562
import re def createDiffs(model1, model2, filename): if len(model1.model) != len(model2.model): raise Exception("Models not the same") no_lines = len(model1.model) not_diffs = 0 for i in range(no_lines): if model1.labels[i] == model2.labels[i]: not_diffs = not_diffs + 1...
true
true
f721b7a28e5ba3d40876a0ab5769b27adb80ab95
19,049
py
Python
python/cudf/cudf/tests/test_duplicates.py
sperlingxx/cudf
c681211df6253e1ceee9203658108980e7e93e3c
[ "Apache-2.0" ]
1
2021-12-17T19:28:00.000Z
2021-12-17T19:28:00.000Z
python/cudf/cudf/tests/test_duplicates.py
sperlingxx/cudf
c681211df6253e1ceee9203658108980e7e93e3c
[ "Apache-2.0" ]
1
2021-03-10T20:28:23.000Z
2021-03-25T15:58:47.000Z
python/cudf/cudf/tests/test_duplicates.py
sperlingxx/cudf
c681211df6253e1ceee9203658108980e7e93e3c
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020-2021, NVIDIA CORPORATION. import itertools as it import random import numpy as np import pytest from pandas import DataFrame, MultiIndex, Series, date_range import cudf from cudf import concat from cudf.tests.utils import assert_eq, assert_exceptions_equal # TODO: PANDAS 1.0 support # Revisit d...
30.724194
79
0.596462
import itertools as it import random import numpy as np import pytest from pandas import DataFrame, MultiIndex, Series, date_range import cudf from cudf import concat from cudf.tests.utils import assert_eq, assert_exceptions_equal def assert_df(g, p): g = g.sort_index() p = p.sort_index() retu...
true
true
f721b7e1de7edb58c96d9d578d13892a84f8ff0c
803
py
Python
experiments/download.py
stasbel/Meme-Machinery-VKHack2018
5e15198d6bc8d350f2dc0158a34467f3415da0bc
[ "MIT" ]
1
2018-11-15T08:30:34.000Z
2018-11-15T08:30:34.000Z
experiments/download.py
stasbel/Meme-Machinery-VKHack2018
5e15198d6bc8d350f2dc0158a34467f3415da0bc
[ "MIT" ]
null
null
null
experiments/download.py
stasbel/Meme-Machinery-VKHack2018
5e15198d6bc8d350f2dc0158a34467f3415da0bc
[ "MIT" ]
null
null
null
"""Downloads prescribed data from the Internet, embed and store it.""" import logging import numpy as np import torch from experiments.scrap import META_PATH from mem.gen.stages import Extractor logger = logging.getLogger(__name__) MATRIX_PATH = 'matrix.npy' NEW_META_PATH = 'processed_reddit_data.pth' def main(_...
20.075
70
0.682441
import logging import numpy as np import torch from experiments.scrap import META_PATH from mem.gen.stages import Extractor logger = logging.getLogger(__name__) MATRIX_PATH = 'matrix.npy' NEW_META_PATH = 'processed_reddit_data.pth' def main(_): meta = torch.load(META_PATH) extractor = Extractor() me...
true
true
f721ba9b451bb59633ec0dcadf214c8d02e86015
1,447
py
Python
Data Structures/Queues/QueueList.py
ayushkr459/Data-Structures-And-Algorithms
050689a5e89a5afb0c907f16601d11706c04b614
[ "MIT" ]
4
2020-12-01T08:52:57.000Z
2021-11-08T11:44:42.000Z
Data Structures/Queues/QueueList.py
ayushkr459/Data-Structures-And-Algorithms
050689a5e89a5afb0c907f16601d11706c04b614
[ "MIT" ]
4
2020-09-30T19:54:10.000Z
2020-10-17T05:04:04.000Z
Data Structures/Queues/QueueList.py
ayushkr459/Data-Structures-And-Algorithms
050689a5e89a5afb0c907f16601d11706c04b614
[ "MIT" ]
12
2020-09-30T18:30:59.000Z
2020-10-31T15:38:54.000Z
# class node to create a node for the queue linked list class Node : def __init__(self, val) : self.val = val self.next = None class Queue : # contructor of the queue class def __init__(self) : self.front = None self.rear = None # method to insert an elem...
22.609375
73
0.520387
class Node : def __init__(self, val) : self.val = val self.next = None class Queue : def __init__(self) : self.front = None self.rear = None def insert(self, val) : new_node = Node(val) if self.rear is None and self.front is No...
true
true
f721bb48b8c008b5b87c1df753579d37ad8ec606
9,887
py
Python
models.py
jiangyangby/DRDSC
4b53e18626b9839578bea6c84bba47d15bc8d3d6
[ "MIT" ]
3
2020-10-12T02:30:11.000Z
2021-07-09T07:04:12.000Z
models.py
jiangyangby/DRDSC
4b53e18626b9839578bea6c84bba47d15bc8d3d6
[ "MIT" ]
1
2020-10-06T15:19:09.000Z
2020-10-06T15:19:09.000Z
models.py
jiangyangby/DRDSC
4b53e18626b9839578bea6c84bba47d15bc8d3d6
[ "MIT" ]
2
2020-04-09T15:46:59.000Z
2021-08-13T16:39:31.000Z
from __future__ import print_function, absolute_import, division import tensorflow as tf from tensorflow.contrib import layers mu = 1.0e-6 @tf.custom_gradient def f_norm(x): f2 = tf.square(tf.norm(x, ord='fro', axis=[-2, -1])) f = tf.sqrt(f2 + mu ** 2) - mu def grad(dy): return dy * (x / tf.sqrt...
42.986957
168
0.583392
from __future__ import print_function, absolute_import, division import tensorflow as tf from tensorflow.contrib import layers mu = 1.0e-6 @tf.custom_gradient def f_norm(x): f2 = tf.square(tf.norm(x, ord='fro', axis=[-2, -1])) f = tf.sqrt(f2 + mu ** 2) - mu def grad(dy): return dy * (x / tf.sqrt...
true
true
f721bbe3a503666d938fe4233b4619c044301e09
83,584
py
Python
research/object_detection/metrics/coco_evaluation.py
raijin0704/models
6906bfbdbf2ad628bb6aeca9989dc04f605b6a60
[ "Apache-2.0" ]
549
2020-01-02T05:14:57.000Z
2022-03-29T18:34:12.000Z
research/object_detection/metrics/coco_evaluation.py
raijin0704/models
6906bfbdbf2ad628bb6aeca9989dc04f605b6a60
[ "Apache-2.0" ]
98
2020-01-21T09:41:30.000Z
2022-03-12T00:53:06.000Z
research/object_detection/metrics/coco_evaluation.py
raijin0704/models
6906bfbdbf2ad628bb6aeca9989dc04f605b6a60
[ "Apache-2.0" ]
233
2020-01-18T03:46:27.000Z
2022-03-19T03:17:47.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...
46.6689
102
0.696964
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from six.moves import zip import tensorflow.compat.v1 as tf from object_detection.core import standard_fields from object_detection.metrics import coco_tools from object_detect...
true
true
f721bc197ab237261a546eeac5adc901979a3a4e
487
py
Python
libs/external_libs/Genshi-0.5.1/examples/turbogears/genshitest/tests/test_controllers.py
google-code-export/django-hotclub
d783a5bbcc06816289565f3eae6d99461188ca4a
[ "MIT" ]
3
2015-12-25T14:45:36.000Z
2016-11-28T09:58:03.000Z
libs/external_libs/Genshi-0.5.1/examples/turbogears/genshitest/tests/test_controllers.py
indro/t2c
56482ad4aed150f29353e054db2c97b567243bf8
[ "MIT" ]
null
null
null
libs/external_libs/Genshi-0.5.1/examples/turbogears/genshitest/tests/test_controllers.py
indro/t2c
56482ad4aed150f29353e054db2c97b567243bf8
[ "MIT" ]
null
null
null
from turbogears import testutil from genshitest.controllers import Root import cherrypy cherrypy.root = Root() def test_method(): "the index method should return a string called now" import types result = testutil.call(cherrypy.root.index) assert type(result["now"]) == types.StringType def test_index...
28.647059
78
0.73922
from turbogears import testutil from genshitest.controllers import Root import cherrypy cherrypy.root = Root() def test_method(): import types result = testutil.call(cherrypy.root.index) assert type(result["now"]) == types.StringType def test_indextitle(): testutil.createRequest("/") assert "<TIT...
true
true
f721bd50781f7bcc154d691ea0d6153c17a983a4
6,230
py
Python
tools/parse_llvm_coverage.py
AsdMonio/rr-external_skia
3839e72932bcef2f26a4f8826bb92b195f6cc396
[ "Apache-2.0" ]
5,964
2016-09-27T03:46:29.000Z
2022-03-31T16:25:27.000Z
third_party/skia/tools/parse_llvm_coverage.py
w4454962/miniblink49
b294b6eacb3333659bf7b94d670d96edeeba14c0
[ "Apache-2.0" ]
459
2016-09-29T00:51:38.000Z
2022-03-07T14:37:46.000Z
third_party/skia/tools/parse_llvm_coverage.py
w4454962/miniblink49
b294b6eacb3333659bf7b94d670d96edeeba14c0
[ "Apache-2.0" ]
1,006
2016-09-27T05:17:27.000Z
2022-03-30T02:46:51.000Z
#!/usr/bin/env python # Copyright (c) 2015 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. """Parse an LLVM coverage report to generate useable results.""" import argparse import json import os import re import subproce...
30.390244
80
0.648957
import argparse import json import os import re import subprocess import sys def _fix_filename(filename): return filename.split('..')[-1].lstrip('./') def _file_in_repo(filename, all_files): new_file = _fix_filename(filename) matched = [] for f in all_files: if f.endswith(new_file): matche...
true
true
f721bd62e54683913fbde95759866ef0c91bb0fc
45,876
py
Python
tests/test_url.py
Laerte/w3lib
d9763db408c474dd4872d788398db41e5c7773ae
[ "BSD-3-Clause" ]
1
2020-07-15T19:41:36.000Z
2020-07-15T19:41:36.000Z
tests/test_url.py
Laerte/w3lib
d9763db408c474dd4872d788398db41e5c7773ae
[ "BSD-3-Clause" ]
4
2021-03-11T12:09:35.000Z
2021-11-15T08:39:21.000Z
tests/test_url.py
zanachka/w3lib
d9763db408c474dd4872d788398db41e5c7773ae
[ "BSD-3-Clause" ]
null
null
null
import os import unittest from urllib.parse import urlparse import pytest from w3lib.url import ( add_or_replace_parameter, add_or_replace_parameters, any_to_uri, canonicalize_url, file_uri_to_path, is_url, parse_data_uri, parse_url, path_to_file_uri, safe_download_url, saf...
41.629764
497
0.593884
import os import unittest from urllib.parse import urlparse import pytest from w3lib.url import ( add_or_replace_parameter, add_or_replace_parameters, any_to_uri, canonicalize_url, file_uri_to_path, is_url, parse_data_uri, parse_url, path_to_file_uri, safe_download_url, saf...
true
true
f721bde404ba19ca373a5664a9ea44c898ea8a20
5,264
py
Python
python/readsPerGeneScript.sup4.edited.py
Asplund-Samuelsson/ribopipe
a27c09f990757116871345b0748015507dd3e8e8
[ "MIT" ]
2
2019-11-11T18:32:56.000Z
2020-10-26T10:39:22.000Z
python/readsPerGeneScript.sup4.edited.py
Asplund-Samuelsson/ribopipe
a27c09f990757116871345b0748015507dd3e8e8
[ "MIT" ]
null
null
null
python/readsPerGeneScript.sup4.edited.py
Asplund-Samuelsson/ribopipe
a27c09f990757116871345b0748015507dd3e8e8
[ "MIT" ]
1
2020-05-21T19:28:48.000Z
2020-05-21T19:28:48.000Z
#!/usr/bin/python2.7 from Bio import SeqIO """ Supplementary Note 4: Read density per gene Authors: Eugene Oh Modified by: Johannes Asplund-Samuelsson (KTH) inputFileP: read density file for plus strand (Supplementary Note 2) col0: position along genome col1: read density at that position inputFileM: read...
28.923077
100
0.612842
from Bio import SeqIO def expression(inputFileP, inputFileM, inputListP, inputListM, outputFileP, \ outputFileM, inputFileG): DictP = {} DictM = {} ref_lengths = {} FastaFile = open(inputFileG, 'rU') for rec in SeqIO.parse(FastaFile, 'fasta'): ref_lengths[rec.id] ...
true
true
f721beb5e7c054fc46f9b84585695379792bee59
426
py
Python
tests/2017/test_22_sporifica_virus.py
wimglenn/advent-of-code-wim
6308c3fa5d29b318680419f877fd5b8ac1359b5d
[ "WTFPL" ]
20
2019-10-15T07:33:13.000Z
2022-01-19T13:40:36.000Z
tests/2017/test_22_sporifica_virus.py
wimglenn/advent-of-code-wim
6308c3fa5d29b318680419f877fd5b8ac1359b5d
[ "WTFPL" ]
5
2019-02-01T23:31:27.000Z
2021-12-03T06:55:58.000Z
tests/2017/test_22_sporifica_virus.py
wimglenn/advent-of-code-wim
6308c3fa5d29b318680419f877fd5b8ac1359b5d
[ "WTFPL" ]
8
2019-12-03T15:41:23.000Z
2021-12-06T17:13:57.000Z
import pytest from aoc_wim.aoc2017.q22 import mutate test_data = """\ ..# #.. ... """ @pytest.mark.parametrize("n,expected,part", [ (7, 5, "a"), (70, 41, "a"), (10000, 5587, "a"), (100, 26, "b"), (10000000, 2511944, "b") ], ids=["a_short", "a_medium", "a_long", "b_medium", "b_long_slow"]) def te...
20.285714
68
0.600939
import pytest from aoc_wim.aoc2017.q22 import mutate test_data = """\ ..# #.. ... """ @pytest.mark.parametrize("n,expected,part", [ (7, 5, "a"), (70, 41, "a"), (10000, 5587, "a"), (100, 26, "b"), (10000000, 2511944, "b") ], ids=["a_short", "a_medium", "a_long", "b_medium", "b_long_slow"]) def te...
true
true
f721c009fbb629ad735fa8472ac120fec2b6de3e
7,073
py
Python
menpo/math/linalg.py
yutiansut/menpo
62af28606bc55985ab764f8ad38d239d1572bf1e
[ "BSD-3-Clause" ]
null
null
null
menpo/math/linalg.py
yutiansut/menpo
62af28606bc55985ab764f8ad38d239d1572bf1e
[ "BSD-3-Clause" ]
1
2019-03-09T16:01:46.000Z
2019-03-09T16:01:46.000Z
menpo/math/linalg.py
yutiansut/menpo
62af28606bc55985ab764f8ad38d239d1572bf1e
[ "BSD-3-Clause" ]
1
2020-05-01T09:55:57.000Z
2020-05-01T09:55:57.000Z
from itertools import islice import numpy as np from menpo.visualize import print_progress, bytes_str, print_dynamic def dot_inplace_left(a, b, block_size=1000): r""" Inplace dot product for memory efficiency. It computes ``a * b = c``, where ``a`` will be replaced inplace with ``c``. Parameters ...
37.42328
80
0.61247
from itertools import islice import numpy as np from menpo.visualize import print_progress, bytes_str, print_dynamic def dot_inplace_left(a, b, block_size=1000): (n_big, k_a), (k_b, n_small) = a.shape, b.shape if k_a != k_b: raise ValueError('Cannot dot {} * {}'.format(a.shape, b.shape)) if n_smal...
true
true
f721c0352c2ce9e62a832ade6a760d74538547cf
247
py
Python
answers/Siddhant Saxena/Day 5/Question1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
22
2021-03-16T14:07:47.000Z
2021-08-13T08:52:50.000Z
answers/Siddhant Saxena/Day 5/Question1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
174
2021-03-16T21:16:40.000Z
2021-06-12T05:19:51.000Z
answers/Siddhant Saxena/Day 5/Question1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
135
2021-03-16T16:47:12.000Z
2021-06-27T14:22:38.000Z
c=1 for i in range(5): if i==1: print("*",end="") for j in range(i): if c > 1: for i in range(2,c): if (c % i) == 0: print("*",end="") break else: print("#",end="") c+=1 print()
13.722222
27
0.37247
c=1 for i in range(5): if i==1: print("*",end="") for j in range(i): if c > 1: for i in range(2,c): if (c % i) == 0: print("*",end="") break else: print("#",end="") c+=1 print()
true
true
f721c0db5e07bedca61cf25c2a2f37316d73a074
77
py
Python
mainDraw.py
smdth/mimLab
78a49c17a4e103841f49cd4b880561a490682864
[ "0BSD" ]
null
null
null
mainDraw.py
smdth/mimLab
78a49c17a4e103841f49cd4b880561a490682864
[ "0BSD" ]
null
null
null
mainDraw.py
smdth/mimLab
78a49c17a4e103841f49cd4b880561a490682864
[ "0BSD" ]
null
null
null
#!/bin/env python from mimDrawer import * print drawLine([0,0], [1,1], 10)
12.833333
32
0.649351
from mimDrawer import * print drawLine([0,0], [1,1], 10)
false
true
f721c245101ff24635224c6a90a3a8df3d443626
5,281
py
Python
src/olympia/amo/monitors.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
843
2016-02-09T13:00:37.000Z
2022-03-20T19:17:06.000Z
src/olympia/amo/monitors.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
10,187
2016-02-05T23:51:05.000Z
2022-03-31T15:24:44.000Z
src/olympia/amo/monitors.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
551
2016-02-08T20:32:16.000Z
2022-03-15T16:49:24.000Z
import os import io import socket import traceback from django.conf import settings import requests from kombu import Connection from PIL import Image import olympia.core.logger from olympia.amo import search from olympia.amo.templatetags.jinja_helpers import user_media_path monitor_log = olympia.core.logger.get...
29.338889
84
0.599508
import os import io import socket import traceback from django.conf import settings import requests from kombu import Connection from PIL import Image import olympia.core.logger from olympia.amo import search from olympia.amo.templatetags.jinja_helpers import user_media_path monitor_log = olympia.core.logger.get...
true
true
f721c3109896f56431a1bd85112d79800d195b90
4,113
py
Python
ironic/drivers/irmc.py
NaohiroTamura/ironic
1fcb6c52a22c9c025dbf27931720ce2eda08704f
[ "Apache-2.0" ]
null
null
null
ironic/drivers/irmc.py
NaohiroTamura/ironic
1fcb6c52a22c9c025dbf27931720ce2eda08704f
[ "Apache-2.0" ]
null
null
null
ironic/drivers/irmc.py
NaohiroTamura/ironic
1fcb6c52a22c9c025dbf27931720ce2eda08704f
[ "Apache-2.0" ]
1
2022-03-25T14:26:10.000Z
2022-03-25T14:26:10.000Z
# Copyright 2015 FUJITSU LIMITED # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
35.153846
77
0.722587
from oslo_utils import importutils from ironic.common import exception from ironic.common.i18n import _ from ironic.drivers import base from ironic.drivers import generic from ironic.drivers.modules import agent from ironic.drivers.modules import inspector from ironic.drivers.modules import ipmitool from...
true
true
f721c578750ba0a7105c0bada589a4631a8b372e
1,845
py
Python
pili/email.py
pilosus/pili
8eb51e79420b7a2e4148f3b819e787cf6711e8cd
[ "MIT" ]
2
2019-12-22T13:05:08.000Z
2020-02-02T13:05:31.000Z
pili/email.py
pilosus/pili
8eb51e79420b7a2e4148f3b819e787cf6711e8cd
[ "MIT" ]
71
2016-10-31T15:41:10.000Z
2022-03-21T14:26:22.000Z
pili/email.py
pilosus/pili
8eb51e79420b7a2e4148f3b819e787cf6711e8cd
[ "MIT" ]
null
null
null
from threading import Thread from flask import current_app, render_template from flask_mail import Message from pili.app import celery, mail def send_email(to, subject, template, **kwargs): """Send email using either Celery, or Thread. Selection depends on CELERY_INSTEAD_THREADING config variable. """ ...
30.75
74
0.688347
from threading import Thread from flask import current_app, render_template from flask_mail import Message from pili.app import celery, mail def send_email(to, subject, template, **kwargs): app = current_app._get_current_object() if app.config['CELERY_INSTEAD_THREADING']: send_email_celery(to, subje...
true
true
f721c5dd97e769836ffa40231cf86c6f09797352
3,757
py
Python
day1/kapua-python-client/swagger_client/models/kapua_data_payload.py
liang-faan/SmartIOT-Diec
8336a4b558295295f10a82cf350d8b7ff3fb9f5c
[ "MIT" ]
5
2019-05-30T02:55:16.000Z
2020-03-03T14:18:23.000Z
day1/kapua-python-client/swagger_client/models/kapua_data_payload.py
liang-faan/SmartIOT-Diec
8336a4b558295295f10a82cf350d8b7ff3fb9f5c
[ "MIT" ]
3
2019-12-27T00:53:23.000Z
2020-02-17T05:29:19.000Z
day1/kapua-python-client/swagger_client/models/kapua_data_payload.py
liang-faan/SmartIOT-Diec
8336a4b558295295f10a82cf350d8b7ff3fb9f5c
[ "MIT" ]
4
2019-06-04T06:26:14.000Z
2021-01-07T04:25:32.000Z
# coding: utf-8 """ Eclipse Kapua REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 i...
26.457746
119
0.556029
import pprint import re import six class KapuaDataPayload(object): swagger_types = { 'metrics': 'dict(str, object)', 'body': 'str' } attribute_map = { 'metrics': 'metrics', 'body': 'body' } def __init__(self, metrics=None, body=None): self._metr...
true
true
f721c6532584cb15c212bf15c6507558686dc532
125
py
Python
starlette_inertia/__init__.py
roganartu/fastapi-inertia
2e0e902b9e0369d00dab628d23ba74bb3fccd3d5
[ "MIT" ]
2
2022-02-25T21:28:36.000Z
2022-03-05T14:42:56.000Z
starlette_inertia/__init__.py
roganartu/starlette-inertia
2e0e902b9e0369d00dab628d23ba74bb3fccd3d5
[ "MIT" ]
null
null
null
starlette_inertia/__init__.py
roganartu/starlette-inertia
2e0e902b9e0369d00dab628d23ba74bb3fccd3d5
[ "MIT" ]
null
null
null
from starlette_inertia.inertia import InertiaMiddleware, InertiaResponse __all__ = ["InertiaMiddleware", "InertiaResponse"]
31.25
72
0.84
from starlette_inertia.inertia import InertiaMiddleware, InertiaResponse __all__ = ["InertiaMiddleware", "InertiaResponse"]
true
true
f721c699cb9f49dec818c048ce6c2572c20ac6d0
4,179
py
Python
src/python/pants/backend/jvm/subsystems/java.py
AllClearID/pants
c4fdf00a3bdf9f26f876e85c46909d0729f7132c
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/jvm/subsystems/java.py
AllClearID/pants
c4fdf00a3bdf9f26f876e85c46909d0729f7132c
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/jvm/subsystems/java.py
AllClearID/pants
c4fdf00a3bdf9f26f876e85c46909d0729f7132c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.j...
47.488636
99
0.718832
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.jvm.subsystems.jvm_tool_mixin import JvmToolMixin from pants.backend.jvm.subsystems.zinc_language_mixin import ZincLanguageMixin from pants.back...
true
true
f721c756563d3d333e7e005fc2811ca05bf35a8b
1,131
py
Python
taxdata/puf/preppuf.py
jdebacker/taxdata
c32d401a10a6c8f6e889d87c6cc72fd4338017b2
[ "CC0-1.0" ]
12
2019-02-07T14:06:28.000Z
2021-12-04T19:19:50.000Z
taxdata/puf/preppuf.py
jdebacker/taxdata
c32d401a10a6c8f6e889d87c6cc72fd4338017b2
[ "CC0-1.0" ]
230
2015-10-20T18:38:10.000Z
2018-12-05T16:04:04.000Z
taxdata/puf/preppuf.py
jdebacker/taxdata
c32d401a10a6c8f6e889d87c6cc72fd4338017b2
[ "CC0-1.0" ]
19
2015-12-21T18:25:11.000Z
2018-11-10T16:53:38.000Z
""" Scripts to clean up the raw PUF before matching """ import numpy as np # RECIDs for aggregate variables by PUF year AGG_VARS = { 2009: [999999], 2010: [999998, 999999], 2011: [999996, 999997, 999998, 999999], } def preppuf(puf, year): """Prepares the PUF for mathcing Args: puf (DataF...
22.62
74
0.531388
import numpy as np AGG_VARS = { 2009: [999999], 2010: [999998, 999999], 2011: [999996, 999997, 999998, 999999], } def preppuf(puf, year): puf.columns = map(str.lower, puf.columns) puf = puf[~puf["recid"].isin(AGG_VARS[year])].copy() puf["filer"] = 1 puf["depne"] = puf[["xocah", "xoc...
true
true
f721c76e15725be651a3bdc5d01f71ceb6748e0f
3,046
py
Python
nova/scheduler/filters/io_ops_filter.py
bopopescu/nested_quota_final
7c3454883de9f5368fa943924540eebe157a319d
[ "Apache-2.0" ]
5
2017-06-23T07:37:39.000Z
2020-10-21T07:07:50.000Z
nova/scheduler/filters/io_ops_filter.py
bopopescu/nested_quota_final
7c3454883de9f5368fa943924540eebe157a319d
[ "Apache-2.0" ]
null
null
null
nova/scheduler/filters/io_ops_filter.py
bopopescu/nested_quota_final
7c3454883de9f5368fa943924540eebe157a319d
[ "Apache-2.0" ]
4
2017-06-23T07:37:43.000Z
2020-12-28T09:57:22.000Z
# Copyright (c) 2012 OpenStack Foundation # 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 ...
38.075
78
0.68155
from oslo_config import cfg from nova.i18n import _LW from nova.openstack.common import log as logging from nova.scheduler import filters from nova.scheduler.filters import utils LOG = logging.getLogger(__name__) max_io_ops_per_host_opt = cfg.IntOpt("max_io_ops_per_host", default=8, he...
true
true
f721c81f71df81d9b3a0633b6dd15524b15378d2
511
py
Python
src/web/toga_web/widgets/box.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
1,261
2019-03-31T16:28:47.000Z
2022-03-31T09:01:23.000Z
src/web/toga_web/widgets/box.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
597
2019-04-02T20:02:42.000Z
2022-03-30T10:28:47.000Z
src/web/toga_web/widgets/box.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
318
2019-03-31T18:32:00.000Z
2022-03-30T18:07:13.000Z
from .base import Widget class Box(Widget): def __html__(self): return """ <div id="toga_{id}" class="toga box container" style="{style}"> {content} </div> """.format( id=self.interface.id, content="\n".join( child._impl._...
21.291667
75
0.46771
from .base import Widget class Box(Widget): def __html__(self): return """ <div id="toga_{id}" class="toga box container" style="{style}"> {content} </div> """.format( id=self.interface.id, content="\n".join( child._impl._...
true
true
f721c883b5846e17b7af1b266eb11d6fa07f59b0
1,769
py
Python
tests/test_chop_chains_with_plotting.py
jorgellop/orbitize
82826ac3ddf345198f58cfaaf0662d4e6f5bd135
[ "BSD-3-Clause-Clear" ]
60
2018-01-12T17:16:53.000Z
2022-02-14T01:39:39.000Z
tests/test_chop_chains_with_plotting.py
jorgellop/orbitize
82826ac3ddf345198f58cfaaf0662d4e6f5bd135
[ "BSD-3-Clause-Clear" ]
278
2018-01-12T17:25:47.000Z
2022-03-31T21:28:27.000Z
tests/test_chop_chains_with_plotting.py
jorgellop/orbitize
82826ac3ddf345198f58cfaaf0662d4e6f5bd135
[ "BSD-3-Clause-Clear" ]
49
2018-10-30T19:34:05.000Z
2021-10-31T13:28:45.000Z
''' Make sure orbit plotting can still occur after chopping chains. ''' import orbitize from orbitize import driver, DATADIR import multiprocessing as mp def verify_results_data(res, sys): # Make data attribute from System is carried forward to Result class assert res.data is not None # Make sure the da...
27.215385
96
0.726964
import orbitize from orbitize import driver, DATADIR import multiprocessing as mp def verify_results_data(res, sys): assert res.data is not None res_data = res.data.to_pandas() sys_data = sys.data_table.to_pandas() assert res_data.equals(sys_data) == True try: epochs = sys.data_table['epoch'...
true
true
f721caa6d4640590b6074dd36aeb070aab2ffcff
627
py
Python
minoristaAPI/minorista/models.py
OttoOctavius/Mayorium
3389b0950047a8b0ae9441f6c0c4c283c319f998
[ "MIT" ]
null
null
null
minoristaAPI/minorista/models.py
OttoOctavius/Mayorium
3389b0950047a8b0ae9441f6c0c4c283c319f998
[ "MIT" ]
4
2020-09-26T12:57:31.000Z
2020-10-10T14:29:38.000Z
minoristaAPI/minorista/models.py
OttoOctavius/Mayorium
3389b0950047a8b0ae9441f6c0c4c283c319f998
[ "MIT" ]
null
null
null
from djongo import models from django.contrib.auth.models import User class Minorista(models.Model): readonly_fields = ('id',) user = models.OneToOneField(User) #first_name = models.CharField(max_length=100, default="", editable=False) #last_name = models.CharField(max_length=100, default="", editable=...
52.25
78
0.735247
from djongo import models from django.contrib.auth.models import User class Minorista(models.Model): readonly_fields = ('id',) user = models.OneToOneField(User) contacto = models.CharField(max_length=30, default="", editable=False)
true
true