hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f7220e84c9b8d8afe3e8a2e6bda57cd5127f2c56
8,471
py
Python
tests/notifier/notifiers/gcs_violations_test.py
mcunha/forseti-security
cbf25f6173c1a25d4e43a9738eca73f927361cb8
[ "Apache-2.0" ]
1
2018-10-06T23:16:59.000Z
2018-10-06T23:16:59.000Z
tests/notifier/notifiers/gcs_violations_test.py
mcunha/forseti-security
cbf25f6173c1a25d4e43a9738eca73f927361cb8
[ "Apache-2.0" ]
null
null
null
tests/notifier/notifiers/gcs_violations_test.py
mcunha/forseti-security
cbf25f6173c1a25d4e43a9738eca73f927361cb8
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Forseti Security 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 ap...
38.330317
94
0.673356
import mock import unittest from datetime import datetime from google.cloud.forseti.common.util import string_formats from google.cloud.forseti.notifier.notifiers import base_notification from google.cloud.forseti.notifier.notifiers import gcs_violations from tests.notifier.notifiers.test_data import f...
true
true
f7220ea8c6b758df8275d973e8e49958e05eaf25
8,061
py
Python
srcgen/tests/test_c.py
maedoc/inducer-f2py
fce51e6603f7474632d452437dbb8b194d6c879d
[ "BSD-3-Clause" ]
57
2015-10-20T15:58:29.000Z
2022-03-19T08:52:04.000Z
srcgen/tests/test_c.py
maedoc/inducer-f2py
fce51e6603f7474632d452437dbb8b194d6c879d
[ "BSD-3-Clause" ]
12
2016-03-14T16:02:42.000Z
2022-03-23T11:15:50.000Z
srcgen/tests/test_c.py
maedoc/inducer-f2py
fce51e6603f7474632d452437dbb8b194d6c879d
[ "BSD-3-Clause" ]
12
2015-12-30T15:41:23.000Z
2022-03-01T17:14:42.000Z
from __future__ import absolute_import import sys import difflib from six.moves import range def equal_strings(text1, text2, _cache=set()): if text1==text2: return True d = difflib.Differ() l = list(d.compare(text1.splitlines(1), text2.splitlines(1))) d = {} for i in range(len(l)): i...
22.835694
86
0.602283
from __future__ import absolute_import import sys import difflib from six.moves import range def equal_strings(text1, text2, _cache=set()): if text1==text2: return True d = difflib.Differ() l = list(d.compare(text1.splitlines(1), text2.splitlines(1))) d = {} for i in range(len(l)): i...
true
true
f7220f35f4559a6f1844d9fe02d22a0e119ad531
11,625
py
Python
tests/charmhelpers/contrib/openstack/amulet/deployment.py
ChrisMacNaughton/layer-ceph-mon
b21bc310d76f093c8496a2bf0340133c07a72270
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/charmhelpers/contrib/openstack/amulet/deployment.py
ChrisMacNaughton/layer-ceph-mon
b21bc310d76f093c8496a2bf0340133c07a72270
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/charmhelpers/contrib/openstack/amulet/deployment.py
ChrisMacNaughton/layer-ceph-mon
b21bc310d76f093c8496a2bf0340133c07a72270
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2014-2015 Canonical 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 ...
39.273649
79
0.578409
import logging import re import sys import six from collections import OrderedDict from charmhelpers.contrib.amulet.deployment import ( AmuletDeployment ) DEBUG = logging.DEBUG ERROR = logging.ERROR class OpenStackAmuletDeployment(AmuletDeployment): def __init__(self, series=None, openstack=No...
true
true
f722121f430d09ff4c11053e6f33d6dc7fe709f8
2,694
py
Python
keras/integration_test/preprocessing_applied_in_dataset_test.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
keras/integration_test/preprocessing_applied_in_dataset_test.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
keras/integration_test/preprocessing_applied_in_dataset_test.py
itsraina/keras
5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 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...
40.818182
80
0.749814
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v2 as tf from keras.integration_test import preprocessing_test_utils as utils ds_combinations = tf.__internal__.distribute.combinations multi_process_runner = tf.__inter...
true
true
f72212bba8f6ba0a4c14cf6dd8b08907a1f2e61c
3,187
py
Python
pentest-tool/pentest/wordlist.py
Micr067/pentestdb
6aa06e1406589567d51ab63a88bfe47416e906e9
[ "Apache-2.0" ]
686
2016-02-06T15:11:12.000Z
2022-03-30T10:55:29.000Z
pentest-tool/pentest/wordlist.py
WinDyXuu/pentestdb
6aa06e1406589567d51ab63a88bfe47416e906e9
[ "Apache-2.0" ]
6
2016-08-14T15:13:31.000Z
2020-03-03T14:01:28.000Z
pentest-tool/pentest/wordlist.py
WinDyXuu/pentestdb
6aa06e1406589567d51ab63a88bfe47416e906e9
[ "Apache-2.0" ]
284
2015-12-19T07:42:05.000Z
2022-03-13T11:58:38.000Z
#!/usr/bin/env python #-*- coding:utf-8 -*- ''' Pentestdb, a database for penetration test. Copyright (c) 2015 alpha1e0 ===================================================================== 字典管理。将字典加入到数据库中去重、对重复项加权打分;从数据库导出字典文件 ''' import os import argparse from libs.commons import Output from libs.commons import W...
28.20354
90
0.595858
import os import argparse from libs.commons import Output from libs.commons import WordList from libs.commons import PenError from libs.orm import Model, DBManage from libs.orm import StringField from libs.orm import IntegerField class WordListModel(Model): _table = "wordlist" _database = "" word ...
true
true
f7221587402cacb28eaffcdbd2393c5f8fe1d6ff
714
py
Python
sesame/train_model.py
moha31x/SESAME
0956cbf081d1a033855173e989da6e21f0a13215
[ "MIT" ]
null
null
null
sesame/train_model.py
moha31x/SESAME
0956cbf081d1a033855173e989da6e21f0a13215
[ "MIT" ]
null
null
null
sesame/train_model.py
moha31x/SESAME
0956cbf081d1a033855173e989da6e21f0a13215
[ "MIT" ]
null
null
null
''' This is a script to train a model with a variety of estimators ''' import pickle import pandas as pd from sklearn.neural_network import MLPRegressor from config import Config # Creating a path to save our model Config.models_path.mkdir(parents=True, exist_ok=True) # Loading the training and testing features into ...
32.454545
71
0.777311
import pickle import pandas as pd from sklearn.neural_network import MLPRegressor from config import Config Config.models_path.mkdir(parents=True, exist_ok=True) x_train = pd.read_csv(str(Config.features_path / 'train_features.csv')) y_train = pd.read_csv(str(Config.features_path / 'train_target.csv')) model = ML...
true
true
f72215a4786136431026f7459d3643ac23aae05c
898
py
Python
src/match_pattern/pattern_matcher/test/interface.py
elsid/master
b3624a6fb3a007fff005c0811f05c5802344b46b
[ "MIT" ]
null
null
null
src/match_pattern/pattern_matcher/test/interface.py
elsid/master
b3624a6fb3a007fff005c0811f05c5802344b46b
[ "MIT" ]
null
null
null
src/match_pattern/pattern_matcher/test/interface.py
elsid/master
b3624a6fb3a007fff005c0811f05c5802344b46b
[ "MIT" ]
null
null
null
# coding: utf-8 import yaml from unittest import TestCase, main from hamcrest import assert_that, equal_to, starts_with from pattern_matcher.interface import Interface class MakeInterface(TestCase): def test_str_should_succeed(self): assert_that(str(Interface()), starts_with('interface anonymous_')) ...
32.071429
74
0.665924
import yaml from unittest import TestCase, main from hamcrest import assert_that, equal_to, starts_with from pattern_matcher.interface import Interface class MakeInterface(TestCase): def test_str_should_succeed(self): assert_that(str(Interface()), starts_with('interface anonymous_')) assert_that...
true
true
f72216636d7f71629b089edbadf65ae6c85a69fd
2,180
py
Python
ComputerVision_HW/3B-L3/match_two_strips.py
darynarr/CV_UKMA
2d0e5fe42c539b441e45c4281f7dc5d42939dd89
[ "MIT" ]
null
null
null
ComputerVision_HW/3B-L3/match_two_strips.py
darynarr/CV_UKMA
2d0e5fe42c539b441e45c4281f7dc5d42939dd89
[ "MIT" ]
null
null
null
ComputerVision_HW/3B-L3/match_two_strips.py
darynarr/CV_UKMA
2d0e5fe42c539b441e45c4281f7dc5d42939dd89
[ "MIT" ]
null
null
null
import cv2 import numpy as np import matplotlib.pyplot as plt # We will use the function implemented in the last quiz # Find best match def find_best_match(patch, strip): # TODO: Find patch in strip and return column index (x value) of topleft corner best_id = None min_diff = np.inf strip_n, patch_n =...
31.594203
83
0.703211
import cv2 import numpy as np import matplotlib.pyplot as plt def find_best_match(patch, strip): best_id = None min_diff = np.inf strip_n, patch_n = strip.shape[1], patch.shape[1] for i in range(strip_n-patch_n): temp = strip[:, i: i + patch_n] ssd = np.sum(np.power(temp - patch...
true
true
f722173bc0475354d47f306795749e2b99e3551a
6,214
py
Python
exmail/apis/user.py
fatelei/exmail-py
42c358fca0b0802387f691b47d2655f64c2d3f01
[ "Apache-2.0" ]
2
2017-07-24T04:40:25.000Z
2018-10-23T10:02:06.000Z
exmail/apis/user.py
fatelei/exmail-py
42c358fca0b0802387f691b47d2655f64c2d3f01
[ "Apache-2.0" ]
null
null
null
exmail/apis/user.py
fatelei/exmail-py
42c358fca0b0802387f691b47d2655f64c2d3f01
[ "Apache-2.0" ]
1
2019-05-19T08:02:29.000Z
2019-05-19T08:02:29.000Z
# -*- coding: utf8 -*- """ exmail.apis.contact. ~~~~~~~~~~~~~~~~~~~~~~~ Contact apis. """ from exmail import exceptions from exmail.apis.base import ExmailClient from exmail.helpers import required_params class UserApi(ExmailClient): """Contact apis.""" @required_params('userid', 'name', 'department', 'pa...
29.590476
75
0.52607
from exmail import exceptions from exmail.apis.base import ExmailClient from exmail.helpers import required_params class UserApi(ExmailClient): @required_params('userid', 'name', 'department', 'password') def create_user(self, userid=None, name=None, ...
true
true
f722193cd5e32f4fa56c0d5adf757148f05a634e
1,578
py
Python
sdk/python/pulumi_azure_native/machinelearningexperimentation/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_native/machinelearningexperimentation/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_native/machinelearningexperimentation/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables __al...
30.941176
89
0.665399
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables __all__ = [ 'StorageAccountPropertiesResponse', ] @pulumi.output_type class StorageAccountPropertiesResponse(dict): def __init__(__self__, *, a...
true
true
f7221975b001f6b137480353ce2f10a7afacc290
5,481
py
Python
mmdet/core/evaluation/class_names.py
Alphafrey946/Colocalization-of-fluorescent_signals-using-deep-learning-with-Manders-overlapping-coefficient
cc8386b6cc6cbe823983647119511aa87e121f23
[ "Apache-2.0" ]
2
2021-02-23T04:42:07.000Z
2021-02-23T07:22:42.000Z
mmdet/core/evaluation/class_names.py
Alphafrey946/Colocalization-of-fluorescent_signals-using-deep-learning-with-Manders-overlapping-coefficient
cc8386b6cc6cbe823983647119511aa87e121f23
[ "Apache-2.0" ]
null
null
null
mmdet/core/evaluation/class_names.py
Alphafrey946/Colocalization-of-fluorescent_signals-using-deep-learning-with-Manders-overlapping-coefficient
cc8386b6cc6cbe823983647119511aa87e121f23
[ "Apache-2.0" ]
1
2021-02-23T04:42:08.000Z
2021-02-23T04:42:08.000Z
import mmcv def wider_face_classes(): return ['face'] def voc_classes(): return [ 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor' ] ...
46.058824
79
0.580551
import mmcv def wider_face_classes(): return ['face'] def voc_classes(): return [ 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor' ] ...
true
true
f7221b06cd36fb3a6c04d9d0d0365009fef93286
5,629
py
Python
python/dask_cudf/dask_cudf/io/parquet.py
CZZLEGEND/cudf
5d2465d6738d00628673fffdc1fac51fad7ef9a7
[ "Apache-2.0" ]
1
2020-01-14T01:44:35.000Z
2020-01-14T01:44:35.000Z
python/dask_cudf/dask_cudf/io/parquet.py
CZZLEGEND/cudf
5d2465d6738d00628673fffdc1fac51fad7ef9a7
[ "Apache-2.0" ]
null
null
null
python/dask_cudf/dask_cudf/io/parquet.py
CZZLEGEND/cudf
5d2465d6738d00628673fffdc1fac51fad7ef9a7
[ "Apache-2.0" ]
null
null
null
from functools import partial import pyarrow.parquet as pq import dask.dataframe as dd from dask.dataframe.io.parquet.arrow import ArrowEngine import cudf from cudf.core.column import build_categorical_column class CudfEngine(ArrowEngine): @staticmethod def read_metadata(*args, **kwargs): meta, sta...
31.623596
79
0.554983
from functools import partial import pyarrow.parquet as pq import dask.dataframe as dd from dask.dataframe.io.parquet.arrow import ArrowEngine import cudf from cudf.core.column import build_categorical_column class CudfEngine(ArrowEngine): @staticmethod def read_metadata(*args, **kwargs): meta, sta...
true
true
f7221b1daebb09fb2c2136eca3ac9bf27cb12285
1,992
py
Python
scaffold/infer-distribution.py
ryought/3d-dna
caa187a272c2c3d5720727d846489d628092b680
[ "MIT" ]
null
null
null
scaffold/infer-distribution.py
ryought/3d-dna
caa187a272c2c3d5720727d846489d628092b680
[ "MIT" ]
null
null
null
scaffold/infer-distribution.py
ryought/3d-dna
caa187a272c2c3d5720727d846489d628092b680
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import dask.dataframe as ddf import pandas as pd import time from sklearn.neighbors.kde import KernelDensity from scipy.optimize import curve_fit import numpy as np def infer_distribution_from_contig(contacts, K, K0): """ """ longest_contig_name = contacts.loc[...
27.666667
83
0.568775
import dask.dataframe as ddf import pandas as pd import time from sklearn.neighbors.kde import KernelDensity from scipy.optimize import curve_fit import numpy as np def infer_distribution_from_contig(contacts, K, K0): longest_contig_name = contacts.loc[contacts.P1.idxmax()].N1 inter_contacts = contacts[ ...
true
true
f7221c2250d07f76c7ad1cd264fe694e723e2d5b
99
py
Python
29/03/1.py
pylangstudy/201705
c69de524faa67fa2d96267d5a51ed9794208f0e4
[ "CC0-1.0" ]
null
null
null
29/03/1.py
pylangstudy/201705
c69de524faa67fa2d96267d5a51ed9794208f0e4
[ "CC0-1.0" ]
38
2017-05-25T07:08:48.000Z
2017-05-31T01:42:41.000Z
29/03/1.py
pylangstudy/201705
c69de524faa67fa2d96267d5a51ed9794208f0e4
[ "CC0-1.0" ]
null
null
null
index = 0 for item in ['ab', 'cd', 'ef']: print("{0}: {1}".format(index, item)) index += 1
19.8
41
0.494949
index = 0 for item in ['ab', 'cd', 'ef']: print("{0}: {1}".format(index, item)) index += 1
true
true
f7221ce57bed2a1a2f972e888f4e54ba6db6ce0c
687
py
Python
Peak_calling_length_python_code.py
abhikbhattacharjee/Motifizer
ee816690f71325e3e17a554d43a7711f08a8c3a9
[ "MIT" ]
null
null
null
Peak_calling_length_python_code.py
abhikbhattacharjee/Motifizer
ee816690f71325e3e17a554d43a7711f08a8c3a9
[ "MIT" ]
null
null
null
Peak_calling_length_python_code.py
abhikbhattacharjee/Motifizer
ee816690f71325e3e17a554d43a7711f08a8c3a9
[ "MIT" ]
null
null
null
import pandas as pd import sys peak_calling=pd.read_excel(str(sys.argv[1]), str(sys.argv[4])) peak_calling['Length'] = peak_calling['End'] - peak_calling['Start'] peak_calling1=pd.read_excel(str(sys.argv[1]), str(sys.argv[3])) peak_calling1['Length'] = peak_calling1['End'] - peak_calling1['Start'] peak_calling2=pd...
38.166667
72
0.74818
import pandas as pd import sys peak_calling=pd.read_excel(str(sys.argv[1]), str(sys.argv[4])) peak_calling['Length'] = peak_calling['End'] - peak_calling['Start'] peak_calling1=pd.read_excel(str(sys.argv[1]), str(sys.argv[3])) peak_calling1['Length'] = peak_calling1['End'] - peak_calling1['Start'] peak_calling2=pd...
true
true
f7221d0551cd6f0b8fa57b66e6a2611f8ad92156
2,762
py
Python
main.py
danredtmf/RepoLoader
32edf66a2efb63d0123fa9ef0641d81eb062ee64
[ "MIT" ]
null
null
null
main.py
danredtmf/RepoLoader
32edf66a2efb63d0123fa9ef0641d81eb062ee64
[ "MIT" ]
null
null
null
main.py
danredtmf/RepoLoader
32edf66a2efb63d0123fa9ef0641d81eb062ee64
[ "MIT" ]
null
null
null
import requests from requests.structures import CaseInsensitiveDict from urllib.parse import urlparse import json import wget import os # Переменные программы repo_link = str() repo_segment = str() branch = int() branches_link = str() branches_list = [] branch_link = str() # Заголовки для запроса headers = CaseInsens...
29.382979
112
0.658219
import requests from requests.structures import CaseInsensitiveDict from urllib.parse import urlparse import json import wget import os repo_link = str() repo_segment = str() branch = int() branches_link = str() branches_list = [] branch_link = str() headers = CaseInsensitiveDict() headers['Authorization'] = 'Accep...
true
true
f7221dc3803de8020ab91c68973c173f7c0adb6f
34,578
py
Python
tests/test_migrate.py
1frag/aerich
2b9702efc86b78187656bc5f97e4ac56a54860b5
[ "Apache-2.0" ]
null
null
null
tests/test_migrate.py
1frag/aerich
2b9702efc86b78187656bc5f97e4ac56a54860b5
[ "Apache-2.0" ]
null
null
null
tests/test_migrate.py
1frag/aerich
2b9702efc86b78187656bc5f97e4ac56a54860b5
[ "Apache-2.0" ]
1
2021-05-28T14:47:58.000Z
2021-05-28T14:47:58.000Z
import pytest from pytest_mock import MockerFixture from aerich.ddl.mysql import MysqlDDL from aerich.ddl.postgres import PostgresDDL from aerich.ddl.sqlite import SqliteDDL from aerich.exceptions import NotSupportError from aerich.migrate import Migrate from aerich.utils import get_models_describe old_models_describ...
37.300971
208
0.440916
import pytest from pytest_mock import MockerFixture from aerich.ddl.mysql import MysqlDDL from aerich.ddl.postgres import PostgresDDL from aerich.ddl.sqlite import SqliteDDL from aerich.exceptions import NotSupportError from aerich.migrate import Migrate from aerich.utils import get_models_describe old_models_describ...
true
true
f7221df4f8a05e5f1d4020f35d37fa12dab3c87e
1,365
py
Python
test/unit/test_utils_weighted_clusters.py
bochuxt/envoy-control-plane-python3
6d63ad6e1ecff5365bb571f0021951b066f8e270
[ "Apache-2.0" ]
1
2020-07-08T19:37:09.000Z
2020-07-08T19:37:09.000Z
test/unit/test_utils_weighted_clusters.py
bochuxt/envoy-control-plane-python3
6d63ad6e1ecff5365bb571f0021951b066f8e270
[ "Apache-2.0" ]
null
null
null
test/unit/test_utils_weighted_clusters.py
bochuxt/envoy-control-plane-python3
6d63ad6e1ecff5365bb571f0021951b066f8e270
[ "Apache-2.0" ]
null
null
null
import pytest from sovereign.utils.weighted_clusters import fit_weights @pytest.mark.parametrize( "weights,normalized", [ pytest.param([1, 2, 3], [16, 33, 51] , id='1, 2, 3'), pytest.param([20, 25, 1], [43, 54, 3] , id='20, 25, 1'), pytest.param([20, 10, ...
44.032258
93
0.487179
import pytest from sovereign.utils.weighted_clusters import fit_weights @pytest.mark.parametrize( "weights,normalized", [ pytest.param([1, 2, 3], [16, 33, 51] , id='1, 2, 3'), pytest.param([20, 25, 1], [43, 54, 3] , id='20, 25, 1'), pytest.param([20, 10, ...
true
true
f7221e29383b3704423e51c4f3340c269de72359
2,121
py
Python
brightcove/EPG.py
asha-bc/BrightcovePY
52e220e8e95221745b4de52ba94689509d27c072
[ "MIT" ]
3
2020-12-14T23:08:09.000Z
2021-08-05T05:44:19.000Z
brightcove/EPG.py
asha-bc/BrightcovePY
52e220e8e95221745b4de52ba94689509d27c072
[ "MIT" ]
null
null
null
brightcove/EPG.py
asha-bc/BrightcovePY
52e220e8e95221745b4de52ba94689509d27c072
[ "MIT" ]
2
2021-10-19T15:24:28.000Z
2022-03-08T08:17:30.000Z
""" Implements wrapper class and methods to work with Brightcove's EPG API. See: https://apis.support.brightcove.com/epg/getting-started/overview-epg-api.html """ from requests.models import Response from .Base import Base from .OAuth import OAuth class EPG(Base): """ Class to wrap the Brightcove EPG API calls. In...
30.73913
106
0.708628
from requests.models import Response from .Base import Base from .OAuth import OAuth class EPG(Base): base_url ='https://cm.cloudplayout.brightcove.com/accounts/{account_id}' def __init__(self, oauth: OAuth, query: str='') -> None: super().__init__(oauth=oauth, query=query) def GetAllCPChannels(self, accoun...
true
true
f7221f00933b36ae67355884950172132b8d731e
1,488
py
Python
mirage/libs/bt_utils/hciconfig.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
123
2019-11-20T19:53:23.000Z
2022-03-07T19:51:03.000Z
mirage/libs/bt_utils/hciconfig.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
23
2019-10-22T13:53:34.000Z
2022-03-22T22:22:55.000Z
mirage/libs/bt_utils/hciconfig.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
25
2019-11-15T12:13:48.000Z
2021-12-22T00:21:15.000Z
from fcntl import ioctl import socket class HCIConfig(object): ''' This class allows to easily configure an HCI Interface. ''' @staticmethod def down(index): ''' This class method stops an HCI interface. Its role is equivalent to the following command : ``hciconfig hci<index> down`` :param index: index ...
19.84
82
0.677419
from fcntl import ioctl import socket class HCIConfig(object): @staticmethod def down(index): try: sock = socket.socket(31, socket.SOCK_RAW, 1) ioctl(sock.fileno(), 0x400448ca, index) sock.close() except IOError: return False return True @staticmethod def reset(index): try: sock = socke...
true
true
f7221f016309edf12b6b55dbb2027c830de5a1e1
1,581
py
Python
vue_backend/webapi/migrations/0002_auto_20201117_0251.py
hanson190505/coteam
8bd01f4edc2a0b2a65dc18d68e36efb11cbdf576
[ "MIT" ]
1
2021-03-18T17:04:52.000Z
2021-03-18T17:04:52.000Z
vue_backend/webapi/migrations/0002_auto_20201117_0251.py
hanson190505/coteam
8bd01f4edc2a0b2a65dc18d68e36efb11cbdf576
[ "MIT" ]
11
2020-04-03T04:16:24.000Z
2022-03-26T10:36:49.000Z
vue_backend/webapi/migrations/0002_auto_20201117_0251.py
hanson190505/coteam
8bd01f4edc2a0b2a65dc18d68e36efb11cbdf576
[ "MIT" ]
null
null
null
# Generated by Django 3.0.5 on 2020-11-17 02:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('webapi', '0001_initial'), ] operations = [ migrations.AddField( model_name='products', name='capacities', ...
32.265306
92
0.577483
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('webapi', '0001_initial'), ] operations = [ migrations.AddField( model_name='products', name='capacities', field=models.CharField(default='custom', max_...
true
true
f7221f4199a21ad48a1e78d734c001ee35792cf4
9,286
py
Python
TrafficMan/admin.py
mizunashi-sh/TrafficMan-DB
d02098dc86f7d126a79a67fc5bbf2140544fb187
[ "BSD-3-Clause" ]
5
2021-06-22T08:56:19.000Z
2022-01-14T13:18:58.000Z
TrafficMan/admin.py
mizunashi-sh/TrafficMan-DB
d02098dc86f7d126a79a67fc5bbf2140544fb187
[ "BSD-3-Clause" ]
null
null
null
TrafficMan/admin.py
mizunashi-sh/TrafficMan-DB
d02098dc86f7d126a79a67fc5bbf2140544fb187
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User, Group from .models import Vehicle from .models import VehicleLicense from .models import Violation from .models import UserProfile from .models import DriverLicense from .models...
32.355401
119
0.682317
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User, Group from .models import Vehicle from .models import VehicleLicense from .models import Violation from .models import UserProfile from .models import DriverLicense from .models...
true
true
f722228558d4f889610e571fcd4e2f7ff014bf26
2,803
py
Python
test/functional/keypool-topup.py
GoStartupsLtd/hydra-core
293c20204be9eb04e491420aa4c94b6c2adf6757
[ "MIT" ]
18
2021-02-11T16:36:38.000Z
2021-12-15T11:33:14.000Z
test/functional/keypool-topup.py
GoStartupsLtd/hydra-core
293c20204be9eb04e491420aa4c94b6c2adf6757
[ "MIT" ]
10
2021-01-17T05:57:32.000Z
2022-03-03T12:49:32.000Z
test/functional/keypool-topup.py
GoStartupsLtd/hydra-core
293c20204be9eb04e491420aa4c94b6c2adf6757
[ "MIT" ]
3
2021-08-23T05:29:30.000Z
2022-03-25T20:18:00.000Z
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test HD Wallet keypool restore function. Two nodes. Node1 is under test. Node0 is providing transactions an...
36.881579
164
0.686051
import shutil from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, connect_nodes_bi, sync_blocks, ) from test_framework.qtumconfig import COINBASE_MATURITY class KeypoolRestoreTest(BitcoinTestFramework): def set_test_params(self): s...
true
true
f722240a67244d196847090cdf5dd01aa951f23d
61,618
py
Python
cumulusci/robotframework/Salesforce.py
leboff/CumulusCI
81edbb1d64f2cc215a951c570052a1e423821cc1
[ "BSD-3-Clause" ]
null
null
null
cumulusci/robotframework/Salesforce.py
leboff/CumulusCI
81edbb1d64f2cc215a951c570052a1e423821cc1
[ "BSD-3-Clause" ]
null
null
null
cumulusci/robotframework/Salesforce.py
leboff/CumulusCI
81edbb1d64f2cc215a951c570052a1e423821cc1
[ "BSD-3-Clause" ]
null
null
null
import importlib import logging import re import time from datetime import datetime from dateutil.parser import parse as parse_date, ParserError from pprint import pformat from robot.libraries.BuiltIn import BuiltIn, RobotNotRunningError from robot.utils import timestr_to_secs from cumulusci.robotframework.utils impor...
40.115885
134
0.628242
import importlib import logging import re import time from datetime import datetime from dateutil.parser import parse as parse_date, ParserError from pprint import pformat from robot.libraries.BuiltIn import BuiltIn, RobotNotRunningError from robot.utils import timestr_to_secs from cumulusci.robotframework.utils impor...
true
true
f72224100c9bc8d6e1fa39209af147abe4365ee7
2,044
py
Python
learning/alembic/env.py
koichiro8/learning
ffc0785dfeeeee4240aed0a1742a64b86ff28369
[ "MIT" ]
null
null
null
learning/alembic/env.py
koichiro8/learning
ffc0785dfeeeee4240aed0a1742a64b86ff28369
[ "MIT" ]
null
null
null
learning/alembic/env.py
koichiro8/learning
ffc0785dfeeeee4240aed0a1742a64b86ff28369
[ "MIT" ]
null
null
null
# type: ignore import os from logging.config import fileConfig from alembic import context from sqlalchemy import engine_from_config, pool from learning.entities import Base # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret th...
26.205128
81
0.716732
import os from logging.config import fileConfig from alembic import context from sqlalchemy import engine_from_config, pool from learning.entities import Base config = context.config fileConfig(config.config_file_name) # for 'autogenerate' support # from myapp import mymodel target_metadata = Base.metadata ...
true
true
f72225b6395da1cc12e591bea2de48caa9c295f3
19,777
py
Python
example/VCU118/fpga/tb/test_fpga_core.py
bmindur/xfcp
dd2eef2cb23a17209180b278b1e2640fd09fda28
[ "MIT" ]
35
2018-07-06T04:59:29.000Z
2022-03-08T22:45:11.000Z
example/VCU118/fpga/tb/test_fpga_core.py
bmindur/xfcp
dd2eef2cb23a17209180b278b1e2640fd09fda28
[ "MIT" ]
4
2021-04-23T15:24:32.000Z
2022-03-04T10:31:12.000Z
example/VCU118/fpga/tb/test_fpga_core.py
bmindur/xfcp
dd2eef2cb23a17209180b278b1e2640fd09fda28
[ "MIT" ]
15
2017-03-19T08:04:58.000Z
2022-02-11T18:38:59.000Z
#!/usr/bin/env python """ Copyright (c) 2017 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
29.874622
107
0.630682
from myhdl import * import os import struct import xfcp import uart_ep import i2c import eth_ep import arp_ep import udp_ep import gmii_ep module = 'fpga_core' testbench = 'test_%s' % module srcs = [] srcs.append("../rtl/%s.v" % module) srcs.append("../lib/xfcp/rtl/xfcp_interface_uart.v") srcs.append("../lib/xfcp...
true
true
f7222660525d88a831eb01f371001c0033a38be7
29,003
py
Python
neutron/plugins/openvswitch/ovs_neutron_plugin.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
null
null
null
neutron/plugins/openvswitch/ovs_neutron_plugin.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
null
null
null
neutron/plugins/openvswitch/ovs_neutron_plugin.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, 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.apach...
46.703704
79
0.607937
import sys from oslo.config import cfg from neutron.agent import securitygroups_rpc as sg_rpc from neutron.api.rpc.agentnotifiers import dhcp_rpc_agent_api from neutron.api.rpc.agentnotifiers import l3_rpc_agent_api from neutron.api.v2 import attributes from neutron.common import constants as q...
true
true
f722268be4ed5165edfde83085c14b1b8daef1d5
10,704
py
Python
args/ft_args.py
humanlab/HaRT
ab5da16cb1bfdadc3fb77a99f0fda8123ea1fe02
[ "Apache-2.0" ]
null
null
null
args/ft_args.py
humanlab/HaRT
ab5da16cb1bfdadc3fb77a99f0fda8123ea1fe02
[ "Apache-2.0" ]
null
null
null
args/ft_args.py
humanlab/HaRT
ab5da16cb1bfdadc3fb77a99f0fda8123ea1fe02
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass, field from typing import Optional @dataclass class DataTrainingArguments: """ Arguments pertaining to what data we are going to input our model for training and eval. Using `HfArgumentParser` we can turn this class into argparse arguments to be able to specify them o...
42.816
185
0.634529
from dataclasses import dataclass, field from typing import Optional @dataclass class DataTrainingArguments: task_type: Optional[str] = field( default=None, metadata={"help": "The type of task to train on: 'document' or 'user' -level"}, ) task_name: Optional[str] = field( default=N...
true
true
f7222707f0f7481e358da6ecdef7b27d9ff7da98
12,969
py
Python
office365/sharepoint/folders/folder.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
null
null
null
office365/sharepoint/folders/folder.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
null
null
null
office365/sharepoint/folders/folder.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
null
null
null
from office365.runtime.client_result import ClientResult from office365.runtime.queries.create_entity_query import CreateEntityQuery from office365.runtime.queries.service_operation_query import ServiceOperationQuery from office365.runtime.queries.update_entity_query import UpdateEntityQuery from office365.runtime.reso...
40.783019
118
0.671524
from office365.runtime.client_result import ClientResult from office365.runtime.queries.create_entity_query import CreateEntityQuery from office365.runtime.queries.service_operation_query import ServiceOperationQuery from office365.runtime.queries.update_entity_query import UpdateEntityQuery from office365.runtime.reso...
true
true
f722280ec9e8ec0e2c0c2b5813f5b46b814656b3
5,621
py
Python
navigation/arena_local_planner/model_based/crowdnav_ros/scripts/crowd_nav/utils/explorer.py
kilinmao/sarl_star
dde9bb2b690c705a615195f4b570af3ea9dfe05e
[ "MIT" ]
7
2021-11-11T13:25:25.000Z
2021-12-25T21:34:41.000Z
navigation/arena_local_planner/model_based/crowdnav_ros/scripts/crowd_nav/utils/explorer.py
kilinmao/sarl_star
dde9bb2b690c705a615195f4b570af3ea9dfe05e
[ "MIT" ]
1
2021-11-20T20:34:14.000Z
2021-11-20T20:34:14.000Z
arena_navigation/arena_local_planner/model_based/crowdnav_ros/scripts/crowd_nav/utils/explorer.py
ignc-research/arena-marl
3b9b2521436ef7f364a250da71a01e915d840296
[ "MIT" ]
null
null
null
import logging import copy import torch from crowd_sim.envs.utils.info import * class Explorer(object): def __init__(self, env, robot, device, memory=None, gamma=None, target_policy=None): self.env = env self.robot = robot self.device = device self.memory = memory self.gamm...
42.263158
120
0.560754
import logging import copy import torch from crowd_sim.envs.utils.info import * class Explorer(object): def __init__(self, env, robot, device, memory=None, gamma=None, target_policy=None): self.env = env self.robot = robot self.device = device self.memory = memory self.gamm...
true
true
f722281aed4b588b7fe6bc868576317fb976354c
548
py
Python
books/migrations/0002_auto_20180205_0033.py
RandyRomero/library
2a150d76c1f656a885e56dbffd46dd1a33f562e9
[ "MIT" ]
null
null
null
books/migrations/0002_auto_20180205_0033.py
RandyRomero/library
2a150d76c1f656a885e56dbffd46dd1a33f562e9
[ "MIT" ]
null
null
null
books/migrations/0002_auto_20180205_0033.py
RandyRomero/library
2a150d76c1f656a885e56dbffd46dd1a33f562e9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-02-04 21:33 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('books', '0001_initial'), ] operations = [ migrations.RenameField( model_n...
21.076923
46
0.560219
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('books', '0001_initial'), ] operations = [ migrations.RenameField( model_name='book', old_name='pud_date', new_name='pu...
true
true
f7222871cfafe696b6c9c3fcdcc8754d53c48f2c
5,922
py
Python
kubernetes_asyncio/client/models/v1_component_condition.py
olitheolix/kubernetes_asyncio
344426793e4e4b653bcd8e4a29c6fa4766e1fff7
[ "Apache-2.0" ]
1
2020-03-25T01:24:27.000Z
2020-03-25T01:24:27.000Z
kubernetes_asyncio/client/models/v1_component_condition.py
olitheolix/kubernetes_asyncio
344426793e4e4b653bcd8e4a29c6fa4766e1fff7
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_component_condition.py
olitheolix/kubernetes_asyncio
344426793e4e4b653bcd8e4a29c6fa4766e1fff7
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.10.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
29.462687
129
0.578352
import pprint import re import six class V1ComponentCondition(object): swagger_types = { 'error': 'str', 'message': 'str', 'status': 'str', 'type': 'str' } attribute_map = { 'error': 'error', 'message': 'message', 'status': 'status', ...
true
true
f722292fc89496c0e00f66e2a1ae564ccf20b115
452
py
Python
tests/components/switch_as_x/conftest.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/switch_as_x/conftest.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/switch_as_x/conftest.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Fixtures for the Switch as X integration tests.""" from __future__ import annotations from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest @pytest.fixture def mock_setup_entry() -> Generator[AsyncMock, None, None]: """Mock setting up a config entry.""" with patch...
26.588235
83
0.745575
from __future__ import annotations from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest @pytest.fixture def mock_setup_entry() -> Generator[AsyncMock, None, None]: with patch( "homeassistant.components.switch_as_x.async_setup_entry", return_value=True ) as m...
true
true
f7222a9c5d62333400242377e8d452dae0e37caa
22,040
py
Python
rampage/daq/gpib.py
shreyaspotnis/rampage
e2565aef7ee16ee06523de975e8aa41aca14e3b2
[ "MIT" ]
null
null
null
rampage/daq/gpib.py
shreyaspotnis/rampage
e2565aef7ee16ee06523de975e8aa41aca14e3b2
[ "MIT" ]
null
null
null
rampage/daq/gpib.py
shreyaspotnis/rampage
e2565aef7ee16ee06523de975e8aa41aca14e3b2
[ "MIT" ]
null
null
null
import visa import numpy as np import logging from datetime import datetime resource_manager = visa.ResourceManager() class Aglient33250A(object): def __init__(self): self.instr = self.open_instrument() def open_instrument(self): resource_list = resource_manager.list_resources() gpi...
38.802817
132
0.562069
import visa import numpy as np import logging from datetime import datetime resource_manager = visa.ResourceManager() class Aglient33250A(object): def __init__(self): self.instr = self.open_instrument() def open_instrument(self): resource_list = resource_manager.list_resources() gpi...
true
true
f7222b09075fb515a1d8e1859b51f4740b705561
2,726
py
Python
diverse/cache.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
diverse/cache.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
diverse/cache.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
import json from django.db.models import FieldDoesNotExist class BaseCache(object): def get(self, version): raise NotImplementedError def set(self, version, data): raise NotImplementedError def delete(self, version): raise NotImplementedError class ModelCache(object): updat...
30.629213
77
0.592443
import json from django.db.models import FieldDoesNotExist class BaseCache(object): def get(self, version): raise NotImplementedError def set(self, version, data): raise NotImplementedError def delete(self, version): raise NotImplementedError class ModelCache(object): updat...
true
true
f7222b1be63bc03e221db6dbd871a5a3495af7f2
2,543
py
Python
pyshield/io.py
heydude1337/pyshield
8f103ccc160e6208c8a6754264168416f62373cb
[ "MIT" ]
1
2021-02-08T14:58:31.000Z
2021-02-08T14:58:31.000Z
pyshield/io.py
heydude1337/pyshield
8f103ccc160e6208c8a6754264168416f62373cb
[ "MIT" ]
null
null
null
pyshield/io.py
heydude1337/pyshield
8f103ccc160e6208c8a6754264168416f62373cb
[ "MIT" ]
1
2020-06-25T22:23:19.000Z
2020-06-25T22:23:19.000Z
""" Functions to read resource files (.yml, .xls/.xlsx and images) """ # -*- coding: utf-8 -*- from os import path import pandas as pd import matplotlib.image as mpimg import numpy as np import yaml import pyshield as ps def load_item(item): """ Load yaml, image or excel or return value as is. """ if is...
25.178218
79
0.616201
from os import path import pandas as pd import matplotlib.image as mpimg import numpy as np import yaml import pyshield as ps def load_item(item): if isinstance(item, str): if is_yaml(item): try: item = read_yaml(item) except FileNotFoundError: ...
true
true
f7222b3625e9519e955bd6e39ca0f3136506ae0d
18,448
py
Python
plipify/_version.py
volkamerlab/plipify
c7b68bbf325aac904969867c7fbed5179f9670b7
[ "MIT" ]
6
2022-01-19T13:31:57.000Z
2022-02-09T05:48:08.000Z
plipify/_version.py
volkamerlab/plipify
c7b68bbf325aac904969867c7fbed5179f9670b7
[ "MIT" ]
4
2021-10-13T08:45:33.000Z
2022-02-11T15:56:09.000Z
plipify/_version.py
volkamerlab/plipify
c7b68bbf325aac904969867c7fbed5179f9670b7
[ "MIT" ]
2
2022-01-25T03:01:56.000Z
2022-03-21T09:26:31.000Z
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
35.408829
79
0.584508
import errno import os import re import subprocess import sys def get_keywords(): git_refnames = "$Format:%d$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords class Version...
true
true
f7222d14897ee68ad7e800ceebf5fae81a30b3c1
555
py
Python
profit/wallet/derivation_record.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
7
2022-03-15T01:33:35.000Z
2022-03-26T21:29:45.000Z
profit/wallet/derivation_record.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
3
2022-03-19T23:02:18.000Z
2022-03-19T23:02:19.000Z
profit/wallet/derivation_record.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from blspy import G1Element from profit.types.blockchain_format.sized_bytes import bytes32 from profit.util.ints import uint32 from profit.wallet.util.wallet_types import WalletType @dataclass(frozen=True) class DerivationRecord: """ These are records representing a puzzle ...
25.227273
78
0.769369
from dataclasses import dataclass from blspy import G1Element from profit.types.blockchain_format.sized_bytes import bytes32 from profit.util.ints import uint32 from profit.wallet.util.wallet_types import WalletType @dataclass(frozen=True) class DerivationRecord: index: uint32 puzzle_hash: bytes32 pubk...
true
true
f7222e97526e2e34c659fdecffa4f7af1b6f47c0
8,349
py
Python
parsl/providers/ad_hoc/ad_hoc.py
cylondata/parsl
00ff9372bd841dafef8a0b3566c79ffe68f0e367
[ "Apache-2.0" ]
323
2017-07-28T21:31:27.000Z
2022-03-05T13:06:05.000Z
parsl/providers/ad_hoc/ad_hoc.py
cylondata/parsl
00ff9372bd841dafef8a0b3566c79ffe68f0e367
[ "Apache-2.0" ]
1,286
2017-06-01T16:50:00.000Z
2022-03-31T16:45:14.000Z
parsl/providers/ad_hoc/ad_hoc.py
cylondata/parsl
00ff9372bd841dafef8a0b3566c79ffe68f0e367
[ "Apache-2.0" ]
113
2017-06-03T11:38:40.000Z
2022-03-26T16:43:05.000Z
import logging import os import time from parsl.channels import LocalChannel from parsl.launchers import SimpleLauncher from parsl.providers.provider_base import ExecutionProvider, JobStatus, JobState from parsl.providers.error import ScriptPathError from parsl.utils import RepresentationMixin logger = logging.getLog...
33.130952
109
0.592526
import logging import os import time from parsl.channels import LocalChannel from parsl.launchers import SimpleLauncher from parsl.providers.provider_base import ExecutionProvider, JobStatus, JobState from parsl.providers.error import ScriptPathError from parsl.utils import RepresentationMixin logger = logging.getLog...
true
true
f7222f402986219a0e09068b7d7e002f2a798ee8
6,931
py
Python
streamer/node_base.py
shaka-bot/shaka-streamer
60588ea0be83074d29538fa851338fc0183f1909
[ "Apache-2.0" ]
154
2019-08-29T16:53:24.000Z
2022-02-25T00:29:56.000Z
streamer/node_base.py
shaka-bot/shaka-streamer
60588ea0be83074d29538fa851338fc0183f1909
[ "Apache-2.0" ]
101
2019-08-30T17:34:51.000Z
2022-03-02T18:46:22.000Z
streamer/node_base.py
shaka-bot/shaka-streamer
60588ea0be83074d29538fa851338fc0183f1909
[ "Apache-2.0" ]
56
2019-09-08T17:47:22.000Z
2022-02-23T17:35:11.000Z
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.848341
87
0.664118
import abc import enum import os import shlex import subprocess import sys import threading import time import traceback from . import node_base from typing import Any, Dict, IO, List, Optional, Union class ProcessStatus(enum.Enum): Finished = 0 Running = 1 Errored = 2 class NodeBase(obje...
true
true
f722306e60c10161ddfe9d5743fd65dcb873c5bb
3,778
py
Python
scrubber/models.py
adamyi/CrowdAnnotator
5b5e4703899d2f1f4640b9cf76894ccb3943f07f
[ "Apache-2.0" ]
3
2020-10-04T12:09:46.000Z
2021-09-20T19:25:11.000Z
scrubber/models.py
adamyi/CrowdAnnotator
5b5e4703899d2f1f4640b9cf76894ccb3943f07f
[ "Apache-2.0" ]
2
2020-06-05T21:18:09.000Z
2021-06-10T21:33:18.000Z
scrubber/models.py
adamyi/CrowdAnnotator
5b5e4703899d2f1f4640b9cf76894ccb3943f07f
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals from django.db import models import re import json # import nlp try: import Queue as Q #python version < 3.0 except ImportError: import queue as Q #python3.* class wordBlock(): def __init__(self, start, end, kind): self.start = start; self.end = en...
35.641509
143
0.622287
from __future__ import unicode_literals from django.db import models import re import json try: import Queue as Q except ImportError: import queue as Q class wordBlock(): def __init__(self, start, end, kind): self.start = start; self.end = end; self.kind = kind; def __lt__...
true
true
f722319c05ef4cef2543858c3137359ca5bc94e9
8,509
py
Python
mgtune/optinterface.py
ghbrown/mg_tune
674957e4eb24e94d9f033bffdf5e42a54b00f155
[ "MIT" ]
null
null
null
mgtune/optinterface.py
ghbrown/mg_tune
674957e4eb24e94d9f033bffdf5e42a54b00f155
[ "MIT" ]
null
null
null
mgtune/optinterface.py
ghbrown/mg_tune
674957e4eb24e94d9f033bffdf5e42a54b00f155
[ "MIT" ]
null
null
null
import pickle def write_params_file(params_file,type_file,lower_file,upper_file,obj_file,max_f_eval): """ assembles known problem info and settings for NOMAD into a plain text file ---Inputs--- ---Outputs--- """ #get data from pickles type_list = pickle.load(open(type_file,'rb')) ...
39.393519
104
0.670702
import pickle def write_params_file(params_file,type_file,lower_file,upper_file,obj_file,max_f_eval): type_list = pickle.load(open(type_file,'rb')) lower_bound_list = pickle.load(open(lower_file,'rb')) upper_bound_list = pickle.load(open(upper_file,'rb')) type_string = ' '.join(type_list)...
true
true
f7223385a23edc82057a8732fb5856bc89217e52
1,694
py
Python
setup.py
homeworkprod/boto3
753de6d98d2beec1f60ab304f83e92db82a8686a
[ "Apache-2.0" ]
null
null
null
setup.py
homeworkprod/boto3
753de6d98d2beec1f60ab304f83e92db82a8686a
[ "Apache-2.0" ]
null
null
null
setup.py
homeworkprod/boto3
753de6d98d2beec1f60ab304f83e92db82a8686a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ distutils/setuptools install script. """ import os import re from setuptools import find_packages, setup ROOT = os.path.dirname(__file__) VERSION_RE = re.compile(r'''__version__ = ['"]([0-9.]+)['"]''') requires = [ 'botocore>=1.24.29,<1.25.0', 'jmespath>=0.7.1,<2.0.0', 's3tran...
28.711864
94
0.618064
import os import re from setuptools import find_packages, setup ROOT = os.path.dirname(__file__) VERSION_RE = re.compile(r'''__version__ = ['"]([0-9.]+)['"]''') requires = [ 'botocore>=1.24.29,<1.25.0', 'jmespath>=0.7.1,<2.0.0', 's3transfer>=0.5.0,<0.6.0', ] def get_version(): init = open(os.pat...
true
true
f72234cf15ad00ab2c9069cac16b7589616c73e1
2,888
py
Python
postgresqleu/accounting/backendviews.py
bradfordboyle/pgeu-system
bbe70e7a94092c10f11a0f74fda23079532bb018
[ "MIT" ]
11
2020-08-20T11:16:02.000Z
2022-03-12T23:25:04.000Z
postgresqleu/accounting/backendviews.py
bradfordboyle/pgeu-system
bbe70e7a94092c10f11a0f74fda23079532bb018
[ "MIT" ]
71
2019-11-18T10:11:22.000Z
2022-03-27T16:12:57.000Z
postgresqleu/accounting/backendviews.py
bradfordboyle/pgeu-system
bbe70e7a94092c10f11a0f74fda23079532bb018
[ "MIT" ]
18
2019-11-18T09:56:31.000Z
2022-01-08T03:16:43.000Z
from django.shortcuts import render from postgresqleu.util.backendviews import backend_list_editor from postgresqleu.util.auth import authenticate_backend_group from postgresqleu.util.db import exec_to_dict from postgresqleu.accounting.backendforms import BackendAccountClassForm from postgresqleu.accounting.backendfo...
35.654321
91
0.588296
from django.shortcuts import render from postgresqleu.util.backendviews import backend_list_editor from postgresqleu.util.auth import authenticate_backend_group from postgresqleu.util.db import exec_to_dict from postgresqleu.accounting.backendforms import BackendAccountClassForm from postgresqleu.accounting.backendfo...
true
true
f72235c0ef5c4f321a37023769e91aa94995bf56
7,756
py
Python
stl10/utee/misc.py
EricElmoznino/OrthogonalLowrankEmbedding
cce12ca5cb34f7cb888b04739724bdbbd18b1e2d
[ "MIT" ]
64
2017-12-16T18:37:36.000Z
2022-01-18T00:24:31.000Z
stl10/utee/misc.py
EricElmoznino/OrthogonalLowrankEmbedding
cce12ca5cb34f7cb888b04739724bdbbd18b1e2d
[ "MIT" ]
4
2018-05-17T12:09:13.000Z
2022-01-31T01:25:08.000Z
stl10/utee/misc.py
EricElmoznino/OrthogonalLowrankEmbedding
cce12ca5cb34f7cb888b04739724bdbbd18b1e2d
[ "MIT" ]
14
2017-12-06T12:31:54.000Z
2021-12-08T09:33:22.000Z
from __future__ import print_function import cv2 import os import shutil import pickle as pkl import time import numpy as np import hashlib from IPython import embed class Logger(object): def __init__(self): self._logger = None def init(self, logdir, name='log'): if self._logger is None: ...
33.868996
114
0.603533
from __future__ import print_function import cv2 import os import shutil import pickle as pkl import time import numpy as np import hashlib from IPython import embed class Logger(object): def __init__(self): self._logger = None def init(self, logdir, name='log'): if self._logger is None: ...
true
true
f722364d6824f270c535f653164145ae812490d3
2,405
py
Python
hardest/binary.py
proggga/hardest
234cb41115c30a756ee11ed7c5fa41c9979d3303
[ "MIT" ]
2
2018-02-03T13:43:25.000Z
2021-12-03T16:13:49.000Z
hardest/binary.py
proggga/hardest
234cb41115c30a756ee11ed7c5fa41c9979d3303
[ "MIT" ]
8
2017-08-16T08:34:59.000Z
2018-02-05T18:30:44.000Z
hardest/binary.py
proggga/hardest
234cb41115c30a756ee11ed7c5fa41c9979d3303
[ "MIT" ]
1
2018-02-05T18:26:20.000Z
2018-02-05T18:26:20.000Z
"""Binary class.""" import os from subprocess import CalledProcessError from subprocess import check_output from subprocess import STDOUT class Binary(object): # pylint: disable=too-few-public-methods """Represent Binary structure.""" def __init__(self, path): # type: (str) -> None """Binary...
32.945205
79
0.565489
import os from subprocess import CalledProcessError from subprocess import check_output from subprocess import STDOUT class Binary(object): def __init__(self, path): self.executable = os.path.basename(path) self.path = path self._version = '' ...
true
true
f7223666efc6621192cb49805d6a9c9dc5472b81
3,589
py
Python
open_spiel/python/examples/command_line_risk.py
JohnIsak/open_spiel-master
0590539991f04b68b4a20a1c3b553d1445e6696f
[ "Apache-2.0" ]
1
2021-09-16T11:19:12.000Z
2021-09-16T11:19:12.000Z
open_spiel/python/examples/command_line_risk.py
JohnIsak/open_spiel-master
0590539991f04b68b4a20a1c3b553d1445e6696f
[ "Apache-2.0" ]
null
null
null
open_spiel/python/examples/command_line_risk.py
JohnIsak/open_spiel-master
0590539991f04b68b4a20a1c3b553d1445e6696f
[ "Apache-2.0" ]
1
2021-03-25T00:41:02.000Z
2021-03-25T00:41:02.000Z
"""NFSP agents trained on simplified risk.""" from absl import app from absl import flags from absl import logging import tensorflow.compat.v1 as tf import numpy as np import igraph as ig import cairocffi import random import pyspiel from open_spiel.python import policy from open_spiel.python import rl_environment fr...
37
656
0.631931
from absl import app from absl import flags from absl import logging import tensorflow.compat.v1 as tf import numpy as np import igraph as ig import cairocffi import random import pyspiel from open_spiel.python import policy from open_spiel.python import rl_environment from open_spiel.python.algorithms import exploit...
true
true
f722368f08b8a4e011882311849f6584dcfca88a
3,800
py
Python
tests/test_core.py
Borealin/fastclasses-json
3318f02338624145bd488c1f38fd4d7bd6210410
[ "MIT" ]
null
null
null
tests/test_core.py
Borealin/fastclasses-json
3318f02338624145bd488c1f38fd4d7bd6210410
[ "MIT" ]
null
null
null
tests/test_core.py
Borealin/fastclasses-json
3318f02338624145bd488c1f38fd4d7bd6210410
[ "MIT" ]
null
null
null
from dataclasses import dataclass from enum import Enum from typing import List, Optional, Dict import textwrap from fastclasses_json.api import dataclass_json from fastclasses_json import core def test_to_dict_source(): @dataclass class A: x: int assert core._to_dict_source(A) == textwrap.dede...
18.811881
77
0.525
from dataclasses import dataclass from enum import Enum from typing import List, Optional, Dict import textwrap from fastclasses_json.api import dataclass_json from fastclasses_json import core def test_to_dict_source(): @dataclass class A: x: int assert core._to_dict_source(A) == textwrap.dede...
true
true
f72237fc84457838936f32dd89967d14328bc26d
5,984
py
Python
train-text2mel.py
TraceOnBrainOff/pytorch-dc-tts
993a0fbace561729b04df2179b41a0a7ea502e93
[ "MIT" ]
null
null
null
train-text2mel.py
TraceOnBrainOff/pytorch-dc-tts
993a0fbace561729b04df2179b41a0a7ea502e93
[ "MIT" ]
null
null
null
train-text2mel.py
TraceOnBrainOff/pytorch-dc-tts
993a0fbace561729b04df2179b41a0a7ea502e93
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Train the Text2Mel network. See: https://arxiv.org/abs/1710.08969""" __author__ = 'Erdene-Ochir Tuguldur' import sys import time import argparse from tqdm import * import numpy as np import torch import torch.nn.functional as F # project imports from models import Text2Mel from hyperparams ...
34.589595
117
0.639873
__author__ = 'Erdene-Ochir Tuguldur' import sys import time import argparse from tqdm import * import numpy as np import torch import torch.nn.functional as F from models import Text2Mel from hyperparams import HParams as hp from logger import Logger from utils import get_last_checkpoint_file_name, load_checkpoin...
true
true
f722384996b08f28631f548d4a200af6eb57a480
1,467
py
Python
config.py
emphasize/solaredge-pv-monitoring-skill
88b01e221fee42417b1d88c869b0f3525337812e
[ "Apache-2.0" ]
null
null
null
config.py
emphasize/solaredge-pv-monitoring-skill
88b01e221fee42417b1d88c869b0f3525337812e
[ "Apache-2.0" ]
null
null
null
config.py
emphasize/solaredge-pv-monitoring-skill
88b01e221fee42417b1d88c869b0f3525337812e
[ "Apache-2.0" ]
null
null
null
from sqlalchemy import Column, Integer, Float, DateTime SE_CREDENTIALS = {"apiKey": "XXXXXXXXX", "siteID": "12345"} SQL_CREDENTIALS = {"user": "user", "password": "password", "host": "ip:port" } SQL_SSL = {"CA": "/path/to/ca.pem", "C...
39.648649
69
0.576005
from sqlalchemy import Column, Integer, Float, DateTime SE_CREDENTIALS = {"apiKey": "XXXXXXXXX", "siteID": "12345"} SQL_CREDENTIALS = {"user": "user", "password": "password", "host": "ip:port" } SQL_SSL = {"CA": "/path/to/ca.pem", "C...
true
true
f7223a217ef47f10efc81de17fba6dfba178144f
732
py
Python
agavepy/response_handlers.py
jchuahtacc/agavepy
5d4917739bb249051bf746cd21f5dcd363ffb287
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
agavepy/response_handlers.py
jchuahtacc/agavepy
5d4917739bb249051bf746cd21f5dcd363ffb287
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
agavepy/response_handlers.py
jchuahtacc/agavepy
5d4917739bb249051bf746cd21f5dcd363ffb287
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
""" response_hanlders.py """ from __future__ import print_function import sys def handle_bad_response_status_code(r): """ Handle a response with a bad status code """ ...
38.526316
80
0.344262
from __future__ import print_function import sys def handle_bad_response_status_code(r): if not r.ok: print("Bad {0} request to {1}, status code {2}".format( r.request.me...
true
true
f7223a8bdb7f3006647c4ab186561a8c97ffae82
15,374
py
Python
venv/lib/python3.5/site-packages/yapf/yapflib/subtype_assigner.py
prashant0598/CoffeeApp
4fa006aebf06e12ed34766450ddcfa548ee63307
[ "MIT" ]
null
null
null
venv/lib/python3.5/site-packages/yapf/yapflib/subtype_assigner.py
prashant0598/CoffeeApp
4fa006aebf06e12ed34766450ddcfa548ee63307
[ "MIT" ]
null
null
null
venv/lib/python3.5/site-packages/yapf/yapflib/subtype_assigner.py
prashant0598/CoffeeApp
4fa006aebf06e12ed34766450ddcfa548ee63307
[ "MIT" ]
null
null
null
# Copyright 2015-2016 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...
38.435
79
0.664368
from lib2to3 import pytree from lib2to3.pgen2 import token from lib2to3.pygram import python_symbols as syms from yapf.yapflib import format_token from yapf.yapflib import pytree_utils from yapf.yapflib import pytree_visitor from yapf.yapflib import style def AssignSubtypes(tree): subtype_assigner = ...
true
true
f7223aed59c6c723e79013fc4c45714b63baace8
362
py
Python
examples/keyword_search.py
smilelight/lightTEXT
b015d0e3524722fb5a8ee5ea83b7fbbd7408f797
[ "Apache-2.0" ]
12
2020-01-26T09:16:21.000Z
2021-12-06T06:44:37.000Z
examples/keyword_search.py
smilelight/lightTEXT
b015d0e3524722fb5a8ee5ea83b7fbbd7408f797
[ "Apache-2.0" ]
null
null
null
examples/keyword_search.py
smilelight/lightTEXT
b015d0e3524722fb5a8ee5ea83b7fbbd7408f797
[ "Apache-2.0" ]
7
2020-04-30T00:37:32.000Z
2021-07-07T06:32:40.000Z
# -*- coding: utf-8 -*- # @Time : 2020/7/2 15:16 # @Author : lightsmile # @Software: PyCharm from lighttext import KeywordProcessor if __name__ == '__main__': kp = KeywordProcessor() kp.add_keyword("曹操") kp.add_keyword("曹丕") kp.add_keyword("司马懿") kp.add_keyword("司马") stn = "曹操、曹丕和司马懿一起去吃大...
20.111111
38
0.638122
from lighttext import KeywordProcessor if __name__ == '__main__': kp = KeywordProcessor() kp.add_keyword("曹操") kp.add_keyword("曹丕") kp.add_keyword("司马懿") kp.add_keyword("司马") stn = "曹操、曹丕和司马懿一起去吃大盘鸡。" print(kp.extract_keywords(stn))
true
true
f7223b5daa0d856c37c6a3df3dcc20d36542e51d
2,203
py
Python
feed/migrations/0001_initial.py
pabulumm/neighbors
59f3f3ae727fe52c7897beaf73d157b02cdcb7a3
[ "BSD-3-Clause" ]
null
null
null
feed/migrations/0001_initial.py
pabulumm/neighbors
59f3f3ae727fe52c7897beaf73d157b02cdcb7a3
[ "BSD-3-Clause" ]
null
null
null
feed/migrations/0001_initial.py
pabulumm/neighbors
59f3f3ae727fe52c7897beaf73d157b02cdcb7a3
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('markers', '__first__'), ('polls', '__first__'), ('neighborhood'...
36.716667
89
0.546074
from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('markers', '__first__'), ('polls', '__first__'), ('neighborhood', '__first__'), ...
true
true
f7223b8b41c3b79f80ac1b63c777994d997a08d9
544
py
Python
__init__.py
edbizarro/airflow_facebook_ads_plugin
53187111bdd00f2bf756bd21e2c853d58784f0a6
[ "Apache-2.0" ]
2
2019-06-19T13:46:11.000Z
2020-10-29T09:51:10.000Z
__init__.py
edbizarro/airflow_facebook_ads_plugin
53187111bdd00f2bf756bd21e2c853d58784f0a6
[ "Apache-2.0" ]
null
null
null
__init__.py
edbizarro/airflow_facebook_ads_plugin
53187111bdd00f2bf756bd21e2c853d58784f0a6
[ "Apache-2.0" ]
2
2019-07-24T21:12:44.000Z
2020-04-30T13:17:42.000Z
from airflow.plugins_manager import AirflowPlugin from facebook_ads_plugin.hooks.facebook_ads_hook import FacebookAdsHook from facebook_ads_plugin.operators.facebook_ads_to_s3_operator import ( FacebookAdsInsightsToS3Operator, FacebookAdsToS3Operator, ) class FacebookAdsPlugin(AirflowPlugin): name = "face...
30.222222
74
0.777574
from airflow.plugins_manager import AirflowPlugin from facebook_ads_plugin.hooks.facebook_ads_hook import FacebookAdsHook from facebook_ads_plugin.operators.facebook_ads_to_s3_operator import ( FacebookAdsInsightsToS3Operator, FacebookAdsToS3Operator, ) class FacebookAdsPlugin(AirflowPlugin): name = "face...
true
true
f7223d3f95314305c7c2ad1f785d545492de0057
6,233
py
Python
nemo_convert_png.py
threadreaper/nemo_convert_png
2961ad4b0ff7e57b59ba98104100707d54915a3d
[ "Apache-2.0" ]
null
null
null
nemo_convert_png.py
threadreaper/nemo_convert_png
2961ad4b0ff7e57b59ba98104100707d54915a3d
[ "Apache-2.0" ]
null
null
null
nemo_convert_png.py
threadreaper/nemo_convert_png
2961ad4b0ff7e57b59ba98104100707d54915a3d
[ "Apache-2.0" ]
null
null
null
'''Extension for Nemo's context menu to easily convert images to PNG and optimize their filesize with pngcrush.''' from __future__ import annotations import os import subprocess from urllib.parse import unquote_plus, urlparse from PIL import Image, UnidentifiedImageError import PySimpleGUI as sg import gi gi.require...
32.633508
109
0.590887
from __future__ import annotations import os import subprocess from urllib.parse import unquote_plus, urlparse from PIL import Image, UnidentifiedImageError import PySimpleGUI as sg import gi gi.require_version('Nemo', '3.0') from gi.repository import GObject, Nemo EXTENSIONS = ('jpg', 'jpeg', 'gif', 'tiff', 'bm...
true
true
f7223df604d66bf40e373b34878bc06930adef9d
25,280
py
Python
tensorflow/python/kernel_tests/signal/fft_ops_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/python/kernel_tests/signal/fft_ops_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/python/kernel_tests/signal/fft_ops_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 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...
41.374795
81
0.587935
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from six.moves import xrange from tensorflow.core.protobuf import config_pb2 from tensorflow.python.framework import dtypes from tensorflow.python.framework import ...
true
true
f7223e2bd6b862b236c58f7382bcb4dc65b65b5b
6,781
py
Python
swagger_client/models/docker_hub_subset.py
swat5421/swagger_portainer
e18b287dc906e171077912677515469ee3f4e5c2
[ "RSA-MD" ]
null
null
null
swagger_client/models/docker_hub_subset.py
swat5421/swagger_portainer
e18b287dc906e171077912677515469ee3f4e5c2
[ "RSA-MD" ]
null
null
null
swagger_client/models/docker_hub_subset.py
swat5421/swagger_portainer
e18b287dc906e171077912677515469ee3f4e5c2
[ "RSA-MD" ]
null
null
null
# coding: utf-8 """ Portainer API Portainer API is an HTTP API served by Portainer. It is used by the Portainer UI and everything you can do with the UI can be done using the HTTP API. Examples are available at https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8 You can find out more about Por...
46.445205
2,674
0.668043
import pprint import re import six class DockerHubSubset(object): swagger_types = { 'authentication': 'bool', 'username': 'str' } attribute_map = { 'authentication': 'Authentication', 'username': 'Username' } def __init__(self, authentication=None, usernam...
true
true
f7223e8d03aa3063eacccb5aff0438e30ec28eaf
813
py
Python
World 3/Exercise 115/Main.py
NikiReis/Python--Exercises
2f50a3cd6900cec024edcf1a812d1cd86afcdea1
[ "MIT" ]
null
null
null
World 3/Exercise 115/Main.py
NikiReis/Python--Exercises
2f50a3cd6900cec024edcf1a812d1cd86afcdea1
[ "MIT" ]
null
null
null
World 3/Exercise 115/Main.py
NikiReis/Python--Exercises
2f50a3cd6900cec024edcf1a812d1cd86afcdea1
[ "MIT" ]
null
null
null
from Exercise_115.Interface import * from Exercise_115.Functions import * data_base = 'registers.txt' while True: screen() options = menu('Type a value: ') print(line()) if options == 1: if validation_file(data_base) == True: name = str(input('Type the name: ')) age =...
26.225806
67
0.570726
from Exercise_115.Interface import * from Exercise_115.Functions import * data_base = 'registers.txt' while True: screen() options = menu('Type a value: ') print(line()) if options == 1: if validation_file(data_base) == True: name = str(input('Type the name: ')) age =...
true
true
f7223f884ccd6891aaf8a29566086baf481a946d
2,219
py
Python
ospurge/resources/swift.py
puppetlabs-operations/ospurge
3ea94225fc4ff55b740867c0590f07fde2d56fe5
[ "Apache-2.0" ]
null
null
null
ospurge/resources/swift.py
puppetlabs-operations/ospurge
3ea94225fc4ff55b740867c0590f07fde2d56fe5
[ "Apache-2.0" ]
5
2022-03-22T07:28:35.000Z
2022-03-22T07:29:16.000Z
ospurge/resources/swift.py
puppetlabs-operations/ospurge
3ea94225fc4ff55b740867c0590f07fde2d56fe5
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
34.671875
78
0.688598
from typing import Any from typing import Dict from typing import Iterable from typing import Iterator from ospurge.resources import base from ospurge.resources.base import BaseServiceResource from ospurge.resources import glance class ListObjectsMixin(BaseServiceResource): def list_objects(self) -> I...
true
true
f7223fe30b9707fcca42785b0ca63b67d1192be3
5,830
py
Python
rl/replay/planner.py
Koen-AI/world-model-as-a-graph
cafde59ef7159d1b62ca508568c85c6498c1342c
[ "MIT" ]
null
null
null
rl/replay/planner.py
Koen-AI/world-model-as-a-graph
cafde59ef7159d1b62ca508568c85c6498c1342c
[ "MIT" ]
null
null
null
rl/replay/planner.py
Koen-AI/world-model-as-a-graph
cafde59ef7159d1b62ca508568c85c6498c1342c
[ "MIT" ]
null
null
null
import threading import numpy as np import torch import os.path as osp from rl.utils import mpi_utils #Replay buffer!!! def sample_her_transitions(buffer, reward_func, batch_size, future_step, future_p=1.0): assert all(k in buffer for k in ['ob', 'ag', 'bg', 'a']) buffer['o2'] = buffer['ob'][:, 1:, :] bu...
41.642857
115
0.61012
import threading import numpy as np import torch import os.path as osp from rl.utils import mpi_utils def sample_her_transitions(buffer, reward_func, batch_size, future_step, future_p=1.0): assert all(k in buffer for k in ['ob', 'ag', 'bg', 'a']) buffer['o2'] = buffer['ob'][:, 1:, :] buffer['ag2'] = buf...
true
true
f72240325176353661f8ec018555cfa01ce1bd7a
5,501
py
Python
derbot/names/admin.py
bdunnette/derbot-docker
b28fd0bf7f078dac1f72024dbd13c233d657c043
[ "MIT" ]
null
null
null
derbot/names/admin.py
bdunnette/derbot-docker
b28fd0bf7f078dac1f72024dbd13c233d657c043
[ "MIT" ]
11
2022-02-21T05:29:51.000Z
2022-03-31T05:33:10.000Z
derbot/names/admin.py
bdunnette/derbot-docker
b28fd0bf7f078dac1f72024dbd13c233d657c043
[ "MIT" ]
null
null
null
from django.conf import settings from django.contrib import admin from django.db import IntegrityError from django.db.models import Exists, OuterRef, Q from django.utils.translation import gettext as _ from import_export import resources from import_export.admin import ImportExportMixin, ImportExportModelAdmin from de...
31.797688
88
0.642065
from django.conf import settings from django.contrib import admin from django.db import IntegrityError from django.db.models import Exists, OuterRef, Q from django.utils.translation import gettext as _ from import_export import resources from import_export.admin import ImportExportMixin, ImportExportModelAdmin from de...
true
true
f722404009a7e9ec7dea247f4a90acdaa2b64d1d
4,678
py
Python
accelbyte_py_sdk/api/basic/models/country_group_object.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/basic/models/country_group_object.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/basic/models/country_group_object.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
# Auto-generated at 2021-09-27T17:12:38.701190+08:00 # from: Justice Basic Service (1.17.0) # Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # pylint: disable=duplicate-code # pylin...
35.709924
127
0.648782
from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union from ....core import Model from ..models.country_object import CountryObject class CountryGroupObject(Model): country_group_code: str ...
true
true
f722419c27153ef2e7230dd43ebd82a7ac439f73
3,127
py
Python
vertx/response.py
hugollm/vertx
d67dbfc08e275e2d0bca5e572fcda1fe58db8e03
[ "MIT" ]
null
null
null
vertx/response.py
hugollm/vertx
d67dbfc08e275e2d0bca5e572fcda1fe58db8e03
[ "MIT" ]
null
null
null
vertx/response.py
hugollm/vertx
d67dbfc08e275e2d0bca5e572fcda1fe58db8e03
[ "MIT" ]
null
null
null
from datetime import datetime from http.client import responses as STATUS_MESSAGES from http.cookies import SimpleCookie import mimetypes import os from .case_insensitive_dict import CaseInsensitiveDict class Response(BaseException): def __init__(self): self.status = 404 self.headers = CaseInsen...
31.27
121
0.574672
from datetime import datetime from http.client import responses as STATUS_MESSAGES from http.cookies import SimpleCookie import mimetypes import os from .case_insensitive_dict import CaseInsensitiveDict class Response(BaseException): def __init__(self): self.status = 404 self.headers = CaseInsen...
true
true
f72241b49458dd8302528f576568424dc16360f7
17,204
py
Python
Python/OneLang/Utils/TSOverviewGenerator.py
onelang/OneLang-CrossCompiled
ed67f2b57e7181712c7d8c2ba85f23b3812d8e3a
[ "MIT" ]
2
2020-11-15T23:38:23.000Z
2020-11-16T00:54:25.000Z
Python/OneLang/Utils/TSOverviewGenerator.py
onelang/OneLang-CrossCompiled
ed67f2b57e7181712c7d8c2ba85f23b3812d8e3a
[ "MIT" ]
null
null
null
Python/OneLang/Utils/TSOverviewGenerator.py
onelang/OneLang-CrossCompiled
ed67f2b57e7181712c7d8c2ba85f23b3812d8e3a
[ "MIT" ]
null
null
null
from onelang_core import * import OneLang.One.Ast.Expressions as exprs import OneLang.One.Ast.Statements as stats import OneLang.One.Ast.Types as types import OneLang.One.Ast.AstTypes as astTypes import OneLang.One.Ast.References as refs import OneLang.One.Ast.Interfaces as ints import onelang_core as one import json i...
66.42471
363
0.602592
from onelang_core import * import OneLang.One.Ast.Expressions as exprs import OneLang.One.Ast.Statements as stats import OneLang.One.Ast.Types as types import OneLang.One.Ast.AstTypes as astTypes import OneLang.One.Ast.References as refs import OneLang.One.Ast.Interfaces as ints import onelang_core as one import json i...
true
true
f72241d12600a83665a811559204ad355ea924e5
56,226
py
Python
pyx12/map_if.py
azoner/pyx12
f60ad528d54c0b0ae25044d2629a29faeefa2f5f
[ "BSD-3-Clause" ]
120
2015-01-30T07:17:26.000Z
2022-03-25T16:42:15.000Z
pyx12/map_if.py
azoner/pyx12
f60ad528d54c0b0ae25044d2629a29faeefa2f5f
[ "BSD-3-Clause" ]
43
2015-02-12T18:42:26.000Z
2021-12-12T22:22:20.000Z
pyx12/map_if.py
azoner/pyx12
f60ad528d54c0b0ae25044d2629a29faeefa2f5f
[ "BSD-3-Clause" ]
85
2015-02-12T16:44:28.000Z
2022-03-24T20:20:46.000Z
###################################################################### # Copyright (c) # All rights reserved. # # This software is licensed as described in the file LICENSE.txt, which # you should have received as part of this distribution. # ###################################################################### """ In...
36.204765
156
0.533543
possible = child.get_unique_key_id_element(id_val) if possible is not None: return child raise EngineError('getnodebypath failed. Path "%s" not found' % spath) def getnodebypath2(self, path_str): x12path = path.X12Path(path_str) i...
true
true
f7224303011a387772607dd8dc079207898f3c44
3,544
py
Python
guillotina/fields/dynamic.py
vinissimus/guillotina
4240adfa5607c022ff6dc5f7335e2c59c1f2217d
[ "BSD-2-Clause" ]
null
null
null
guillotina/fields/dynamic.py
vinissimus/guillotina
4240adfa5607c022ff6dc5f7335e2c59c1f2217d
[ "BSD-2-Clause" ]
null
null
null
guillotina/fields/dynamic.py
vinissimus/guillotina
4240adfa5607c022ff6dc5f7335e2c59c1f2217d
[ "BSD-2-Clause" ]
null
null
null
from collections import namedtuple from guillotina import configure from guillotina import schema from guillotina.component import get_adapter from guillotina.exceptions import ComponentLookupError from guillotina.exceptions import ValueDeserializationError from guillotina.fields.interfaces import IDynamicField from gu...
36.916667
86
0.738431
from collections import namedtuple from guillotina import configure from guillotina import schema from guillotina.component import get_adapter from guillotina.exceptions import ComponentLookupError from guillotina.exceptions import ValueDeserializationError from guillotina.fields.interfaces import IDynamicField from gu...
true
true
f722454298c1db6252d7edf5af2ce44da826cc10
86
py
Python
AtCoder/ABC114/A.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
1
2018-11-25T04:15:45.000Z
2018-11-25T04:15:45.000Z
AtCoder/ABC114/A.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
null
null
null
AtCoder/ABC114/A.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
2
2018-08-08T13:01:14.000Z
2018-11-25T12:38:36.000Z
n = int(input()) if n == 7 or n == 5 or n== 3: print("YES") else: print("NO")
14.333333
29
0.465116
n = int(input()) if n == 7 or n == 5 or n== 3: print("YES") else: print("NO")
true
true
f72245eef78fd33aa667b1d0ea796a7bf15d8024
8,219
py
Python
easyimap/easyimap.py
kujiy/easyimap
4da69d7b7fc051a3384b6e5208930c20dc2aad21
[ "BSD-3-Clause" ]
null
null
null
easyimap/easyimap.py
kujiy/easyimap
4da69d7b7fc051a3384b6e5208930c20dc2aad21
[ "BSD-3-Clause" ]
null
null
null
easyimap/easyimap.py
kujiy/easyimap
4da69d7b7fc051a3384b6e5208930c20dc2aad21
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import imaplib import email from email.header import decode_header import time import re import mimetypes import chardet try: unicode('') except NameError: # for python3 compatibility. unicode = str class MailObj(object): def __init__(self, message, uid=-1, raw=''): ...
31.490421
93
0.602993
import imaplib import email from email.header import decode_header import time import re import mimetypes import chardet try: unicode('') except NameError: unicode = str class MailObj(object): def __init__(self, message, uid=-1, raw=''): self._message = message self._uid = uid if ...
true
true
f722463f411f8a127a6d80dda1849d6cfca25b76
981
py
Python
estoque/migrations/0002_auto_20191003_1822.py
lucasgsouza03/NGKS_Shop
002efbb141a74c1df97479e6bd6f112e4617ff3d
[ "Unlicense" ]
1
2018-03-23T23:08:21.000Z
2018-03-23T23:08:21.000Z
estoque/migrations/0002_auto_20191003_1822.py
lucasgsouza03/NGKS_Shop
002efbb141a74c1df97479e6bd6f112e4617ff3d
[ "Unlicense" ]
7
2018-09-25T02:59:08.000Z
2022-03-11T23:35:05.000Z
estoque/migrations/0002_auto_20191003_1822.py
lucasgsouza03/NGKS_Shop
002efbb141a74c1df97479e6bd6f112e4617ff3d
[ "Unlicense" ]
2
2018-07-10T19:00:34.000Z
2018-08-14T21:05:47.000Z
# Generated by Django 2.0.6 on 2019-10-03 21:22 from django.db import migrations, models import django.db.models.expressions class Migration(migrations.Migration): dependencies = [ ('estoque', '0001_initial'), ] operations = [ migrations.CreateModel( name='Telefone_Fornecedo...
30.65625
142
0.602446
from django.db import migrations, models import django.db.models.expressions class Migration(migrations.Migration): dependencies = [ ('estoque', '0001_initial'), ] operations = [ migrations.CreateModel( name='Telefone_Fornecedor', fields=[ ('id',...
true
true
f72246c907433f3935cdad81e72759bec38c89c6
414
py
Python
server/db/models/book.py
thinkjones/AFSP-Seed
5a7766960c01394902c4898b764580b0320b6941
[ "MIT", "Unlicense" ]
1
2020-02-23T07:48:46.000Z
2020-02-23T07:48:46.000Z
server/db/models/book.py
thinkjones/AFSP-Seed
5a7766960c01394902c4898b764580b0320b6941
[ "MIT", "Unlicense" ]
null
null
null
server/db/models/book.py
thinkjones/AFSP-Seed
5a7766960c01394902c4898b764580b0320b6941
[ "MIT", "Unlicense" ]
null
null
null
from sqlalchemy import Column, Integer, String from server.db.database import Base class Book(Base): """ Books in a library """ __tablename__ = 'books' id = Column(Integer, primary_key=True) name = Column(String(50), unique=True) def __init__(self, name=None, email=None): self.name = name...
24.352941
46
0.640097
from sqlalchemy import Column, Integer, String from server.db.database import Base class Book(Base): __tablename__ = 'books' id = Column(Integer, primary_key=True) name = Column(String(50), unique=True) def __init__(self, name=None, email=None): self.name = name self.email = email ...
true
true
f72246ca5c7d73abd9b2276530d5bd66524ba63b
75,573
py
Python
sockeye/arguments.py
hanayashiki/sockeye
391996eec407d5c1c928e0b9cadd8881b846ac61
[ "Apache-2.0" ]
null
null
null
sockeye/arguments.py
hanayashiki/sockeye
391996eec407d5c1c928e0b9cadd8881b846ac61
[ "Apache-2.0" ]
null
null
null
sockeye/arguments.py
hanayashiki/sockeye
391996eec407d5c1c928e0b9cadd8881b846ac61
[ "Apache-2.0" ]
null
null
null
# Copyright 2017, 2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fi...
55.243421
121
0.526193
import argparse import os import sys import types import yaml from typing import Any, Callable, Dict, List, Tuple, Optional from . import constants as C from . import data_io from .lr_scheduler import LearningRateSchedulerFixedStep class ConfigArgumentParser(argparse.ArgumentParser): def __init__(se...
true
true
f7224822f3ec084a854bf90a661c91aafcf101c5
12,571
py
Python
recipes/VoxCeleb/SpeakerRec/speaker_verification_plda.py
pnsafari/speechbrain
3a6956a838f3796ff6d041ee6a20bcdea55794cb
[ "Apache-2.0" ]
null
null
null
recipes/VoxCeleb/SpeakerRec/speaker_verification_plda.py
pnsafari/speechbrain
3a6956a838f3796ff6d041ee6a20bcdea55794cb
[ "Apache-2.0" ]
null
null
null
recipes/VoxCeleb/SpeakerRec/speaker_verification_plda.py
pnsafari/speechbrain
3a6956a838f3796ff6d041ee6a20bcdea55794cb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 """Recipe for training a speaker verification system based on PLDA using the voxceleb dataset. The system employs a pre-trained model followed by a PLDA transformation. The pre-trained model is automatically downloaded from the web if not specified. To run this recipe, run the following command: ...
33.522667
94
0.649988
import os import sys import torch import torchaudio import logging import speechbrain as sb import numpy import pickle from tqdm.contrib import tqdm from hyperpyyaml import load_hyperpyyaml from speechbrain.utils.metric_stats import EER, minDCF from speechbrain.processing.PLDA_LDA import StatObject_SB from speechbrai...
true
true
f722484da1558b8fe0419c64530f9b4438f8aa08
1,757
py
Python
ratcave/utils/vertices.py
aforren1/ratcave
e3862cdaba100ac2c6c78c08c4b09638e0c88fd4
[ "MIT" ]
null
null
null
ratcave/utils/vertices.py
aforren1/ratcave
e3862cdaba100ac2c6c78c08c4b09638e0c88fd4
[ "MIT" ]
1
2018-06-09T14:53:19.000Z
2018-06-09T14:53:19.000Z
ratcave/utils/vertices.py
aforren1/ratcave
e3862cdaba100ac2c6c78c08c4b09638e0c88fd4
[ "MIT" ]
null
null
null
import itertools import numpy as np def pairwise(iterable): "s -> (s0,s1), (s1,s2), (s2, s3), ..." a, b = itertools.tee(iterable) next(b, None) return zip(a, b) def struct_to_ndarray(array): """Turns returns a view of a structured array as a regular ndarray.""" return array.view(array.dtype[0...
40.860465
146
0.692658
import itertools import numpy as np def pairwise(iterable): a, b = itertools.tee(iterable) next(b, None) return zip(a, b) def struct_to_ndarray(array): return array.view(array.dtype[0]).reshape((array.shape[0], -1)) def reindex_vertices(arrays=None): all_arrays = np.hstack(arrays) array_nc...
true
true
f722489cba16865871736137308362868fb163d9
2,886
py
Python
crawler/utils/urltool.py
DallasLJ/spider
53807439d4e8c3b63b8ff7f4b7d99109daf19a02
[ "Apache-2.0" ]
null
null
null
crawler/utils/urltool.py
DallasLJ/spider
53807439d4e8c3b63b8ff7f4b7d99109daf19a02
[ "Apache-2.0" ]
null
null
null
crawler/utils/urltool.py
DallasLJ/spider
53807439d4e8c3b63b8ff7f4b7d99109daf19a02
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 from urllib.parse import urlparse from crawler.error.urlerror import DomainUrlError from crawler.utils.strtool import find_last_index def start_with(str, prefix): if str[0: len(prefix)] == prefix: return True else: return False def get_domain_url(url): url_parse = urlpa...
32.426966
95
0.617117
from urllib.parse import urlparse from crawler.error.urlerror import DomainUrlError from crawler.utils.strtool import find_last_index def start_with(str, prefix): if str[0: len(prefix)] == prefix: return True else: return False def get_domain_url(url): url_parse = urlparse(url) if no...
true
true
f72248a7e8ac3765348e1d07ab9f7ec7004a9c8f
4,283
py
Python
tests/test_config_file.py
jberends/duplicity_backup
99e27060b20dabc0ff8ed416b6a4aeac98143cae
[ "Apache-2.0" ]
2
2019-12-16T10:42:16.000Z
2021-02-24T11:43:17.000Z
tests/test_config_file.py
jberends/duplicity_backup
99e27060b20dabc0ff8ed416b6a4aeac98143cae
[ "Apache-2.0" ]
null
null
null
tests/test_config_file.py
jberends/duplicity_backup
99e27060b20dabc0ff8ed416b6a4aeac98143cae
[ "Apache-2.0" ]
1
2020-06-30T22:57:06.000Z
2020-06-30T22:57:06.000Z
from pathlib import Path from tempfile import NamedTemporaryFile, SpooledTemporaryFile from unittest import TestCase from click.testing import CliRunner from duplicity_backup_s3.config import check_config_file class TestConfig(TestCase): def test_default_config_provided_by_package(self): from duplicity_...
30.375887
88
0.578333
from pathlib import Path from tempfile import NamedTemporaryFile, SpooledTemporaryFile from unittest import TestCase from click.testing import CliRunner from duplicity_backup_s3.config import check_config_file class TestConfig(TestCase): def test_default_config_provided_by_package(self): from duplicity_...
true
true
f722493a284aff97c889421d4a9f473fb5eff05a
39
py
Python
ind2/flights/__init__.py
LokiTheGodOfBitchez/Lab_2.13
57dce79bac021983e7ce7bf5ffeb3d6fb5df0c44
[ "MIT" ]
null
null
null
ind2/flights/__init__.py
LokiTheGodOfBitchez/Lab_2.13
57dce79bac021983e7ce7bf5ffeb3d6fb5df0c44
[ "MIT" ]
null
null
null
ind2/flights/__init__.py
LokiTheGodOfBitchez/Lab_2.13
57dce79bac021983e7ce7bf5ffeb3d6fb5df0c44
[ "MIT" ]
null
null
null
__all__ = ["get_fl", "disp", "select"]
19.5
38
0.589744
__all__ = ["get_fl", "disp", "select"]
true
true
f722496af521cef904cb46d4978debcf2cdb7ef7
967
py
Python
projects/PaLM/configs/palm_pretrain.py
Oneflow-Inc/libai
e473bd3962f07b1e37232d2be39c8257df0ec0f3
[ "Apache-2.0" ]
55
2021-12-10T08:47:06.000Z
2022-03-28T09:02:15.000Z
projects/PaLM/configs/palm_pretrain.py
Oneflow-Inc/libai
e473bd3962f07b1e37232d2be39c8257df0ec0f3
[ "Apache-2.0" ]
106
2021-11-03T05:16:45.000Z
2022-03-31T06:16:23.000Z
projects/PaLM/configs/palm_pretrain.py
Oneflow-Inc/libai
e473bd3962f07b1e37232d2be39c8257df0ec0f3
[ "Apache-2.0" ]
13
2021-12-29T08:12:08.000Z
2022-03-28T06:59:45.000Z
from libai.config import LazyCall, get_config from .models.palm_small import model from libai.evaluation import PPLEvaluator graph = get_config("common/models/graph.py").graph train = get_config("common/train.py").train optim = get_config("common/optim.py").optim data = get_config("common/data/gpt_dataset.py") datalo...
33.344828
73
0.813857
from libai.config import LazyCall, get_config from .models.palm_small import model from libai.evaluation import PPLEvaluator graph = get_config("common/models/graph.py").graph train = get_config("common/train.py").train optim = get_config("common/optim.py").optim data = get_config("common/data/gpt_dataset.py") datalo...
true
true
f7224b5ea5613d417453b2c977cbbf01d3da0e91
14,542
py
Python
py_kbible/kbible.py
sungcheolkim78/py_kbible
3a576c20e5e49f5e85be6ddede20accb6df14663
[ "Apache-2.0" ]
null
null
null
py_kbible/kbible.py
sungcheolkim78/py_kbible
3a576c20e5e49f5e85be6ddede20accb6df14663
[ "Apache-2.0" ]
null
null
null
py_kbible/kbible.py
sungcheolkim78/py_kbible
3a576c20e5e49f5e85be6ddede20accb6df14663
[ "Apache-2.0" ]
1
2021-12-27T00:32:48.000Z
2021-12-27T00:32:48.000Z
""" kbible.py - base bible object and commands """ import pandas as pd import yaml import os import subprocess __author__ = "Sungcheol Kim <sungcheol.kim78@gmail.com>" __docformat__ = "restructuredtext en" class KBible(object): """ Bible text object """ def __init__(self, version="개역한글판성경", debug=False, **k...
30.744186
153
0.536652
import pandas as pd import yaml import os import subprocess __author__ = "Sungcheol Kim <sungcheol.kim78@gmail.com>" __docformat__ = "restructuredtext en" class KBible(object): def __init__(self, version="개역한글판성경", debug=False, **kwargs): self._biblelist = [] self._versionlist = {} thi...
true
true
f7224ba8e912b27faf46182144d00f98d96be6c9
3,203
py
Python
test/packaging/place-files-in-subdirectory.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
1
2015-11-04T22:22:10.000Z
2015-11-04T22:22:10.000Z
test/packaging/place-files-in-subdirectory.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
1
2020-05-19T02:59:19.000Z
2020-05-21T09:05:19.000Z
test/packaging/place-files-in-subdirectory.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
2
2018-01-16T11:29:16.000Z
2020-05-13T16:48:26.000Z
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
27.852174
77
0.667187
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os import TestSCons python = TestSCons.python test = TestSCons.TestSCons() tar = test.detect('TAR', 'tar') if not tar: test.skip_test('tar not found, skipping test\n') test.subdir('src') test.write('src/main.c', ...
true
true
f7224cdc48875b4ef34c0499563e922d8a4ccc4b
509
py
Python
snake/food_obj.py
sradley/snake-py
90531c6a867e2eaaffab48218aeab5e2df6f5101
[ "MIT" ]
null
null
null
snake/food_obj.py
sradley/snake-py
90531c6a867e2eaaffab48218aeab5e2df6f5101
[ "MIT" ]
1
2018-07-18T16:18:14.000Z
2018-07-18T16:18:14.000Z
snake/food_obj.py
sradley/snake-py
90531c6a867e2eaaffab48218aeab5e2df6f5101
[ "MIT" ]
1
2019-12-11T16:48:25.000Z
2019-12-11T16:48:25.000Z
""" snake/food_obj.py author: Stephen Radley date: 2018/07/05 package: snake version: 0.0.1 """ from random import randint from snake.location_obj import Location from snake.functions import find_valid_locs """ Food ... """ class Food: """ __init__ ... """ def __ini...
18.851852
57
0.616896
from random import randint from snake.location_obj import Location from snake.functions import find_valid_locs class Food: def __init__(self, dim_x, dim_y, snake): valid_locs = find_valid_locs(dim_x, dim_y, snake) loc = valid_locs[randint(0, len(valid_locs)-1)] self.loc = Location(loc[0...
true
true
f7224cf70c4a227f3f15c140799654f94546b6af
2,709
py
Python
src/sot_talos_balance/test/test_zmpEstimator.py
imaroger/sot-talos-balance
5e56700b4e105273ecf6feb3474789beac469a77
[ "BSD-2-Clause" ]
null
null
null
src/sot_talos_balance/test/test_zmpEstimator.py
imaroger/sot-talos-balance
5e56700b4e105273ecf6feb3474789beac469a77
[ "BSD-2-Clause" ]
null
null
null
src/sot_talos_balance/test/test_zmpEstimator.py
imaroger/sot-talos-balance
5e56700b4e105273ecf6feb3474789beac469a77
[ "BSD-2-Clause" ]
null
null
null
from time import sleep import matplotlib.pyplot as plt import numpy as np from sot_talos_balance.utils.run_test_utils import evalCommandClient, run_ft_calibration, run_test, runCommandClient try: # Python 2 input = raw_input # noqa except NameError: pass run_test('appli_zmpEstimator.py') run_ft_calibr...
30.1
116
0.665559
from time import sleep import matplotlib.pyplot as plt import numpy as np from sot_talos_balance.utils.run_test_utils import evalCommandClient, run_ft_calibration, run_test, runCommandClient try: input = raw_input except NameError: pass run_test('appli_zmpEstimator.py') run_ft_calibration('robot.ftc...
true
true
f7224e7cd4f3a5fd5563d15fb1ff78a94c670d63
98,578
py
Python
hexapodengine2.py
jonathan-sung/Hexapod-GA-Gait
5e82c2f141f6bd88d8b6c0a7b658c8ce0c5be8f4
[ "MIT" ]
null
null
null
hexapodengine2.py
jonathan-sung/Hexapod-GA-Gait
5e82c2f141f6bd88d8b6c0a7b658c8ce0c5be8f4
[ "MIT" ]
null
null
null
hexapodengine2.py
jonathan-sung/Hexapod-GA-Gait
5e82c2f141f6bd88d8b6c0a7b658c8ce0c5be8f4
[ "MIT" ]
1
2022-03-10T12:57:56.000Z
2022-03-10T12:57:56.000Z
import pybullet as p import math import pybullet_data import time import random import numpy as np import serial def radToPwm(angle): return ((2000 * angle) / math.pi) + 1500 # t in ms; the closer t is to 0, more accuracy but less smooth motion def updateRealServos(ser, t): # right legs ser.write( ...
259.415789
5,640
0.809653
import pybullet as p import math import pybullet_data import time import random import numpy as np import serial def radToPwm(angle): return ((2000 * angle) / math.pi) + 1500 def updateRealServos(ser, t): ser.write( f'#0P{radToPwm(-p.getJointState(hexapod_ID, 8)[0])}T{t}#1P{radToPwm(p.getJoint...
true
true
f7224ef99c59f74d5cbe11ac856e1a968e88db76
190
py
Python
image_turk.py
kostyaev/image-turk
aa2a3519e74d23612f699e4b9cbe5ed5f1fdcba6
[ "BSD-2-Clause" ]
7
2016-06-18T11:22:43.000Z
2019-08-28T23:28:41.000Z
image_turk.py
kostyaev/image-turk
aa2a3519e74d23612f699e4b9cbe5ed5f1fdcba6
[ "BSD-2-Clause" ]
null
null
null
image_turk.py
kostyaev/image-turk
aa2a3519e74d23612f699e4b9cbe5ed5f1fdcba6
[ "BSD-2-Clause" ]
2
2016-12-12T07:40:42.000Z
2018-02-19T13:26:07.000Z
from web import app from gevent.pywsgi import WSGIServer if __name__ == '__main__': http_server = WSGIServer(('', 5000), app) http_server.start() http_server.serve_forever()
17.272727
45
0.705263
from web import app from gevent.pywsgi import WSGIServer if __name__ == '__main__': http_server = WSGIServer(('', 5000), app) http_server.start() http_server.serve_forever()
true
true
f7224f396301cfc76ade2e118f525a3fe4ace8c6
827
py
Python
pixelflow/distributions/normal.py
didriknielsen/pixelcnn_flow
9030f6a66d5ff83d7d299541ed55b20b20bb9a15
[ "MIT" ]
25
2020-02-12T00:35:48.000Z
2021-09-18T14:30:43.000Z
pixelflow/distributions/normal.py
didriknielsen/pixelcnn_flow
9030f6a66d5ff83d7d299541ed55b20b20bb9a15
[ "MIT" ]
1
2021-08-05T10:00:04.000Z
2021-08-10T11:11:16.000Z
pixelflow/distributions/normal.py
didriknielsen/pixelcnn_flow
9030f6a66d5ff83d7d299541ed55b20b20bb9a15
[ "MIT" ]
null
null
null
import math import torch from pixelflow.distributions import Distribution from pixelflow.utils import sum_except_batch from torch.distributions import Normal class StandardNormal(Distribution): """A multivariate Normal with zero mean and unit covariance.""" def __init__(self, shape): super(StandardNo...
34.458333
119
0.71705
import math import torch from pixelflow.distributions import Distribution from pixelflow.utils import sum_except_batch from torch.distributions import Normal class StandardNormal(Distribution): def __init__(self, shape): super(StandardNormal, self).__init__() self.shape = torch.Size(shape) ...
true
true
f7224fab731b69e54808a625abdf671ae47b423f
1,776
py
Python
aliyun-python-sdk-workbench-ide/aliyunsdkworkbench_ide/request/v20210121/SetAppEnvConfigRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-workbench-ide/aliyunsdkworkbench_ide/request/v20210121/SetAppEnvConfigRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-workbench-ide/aliyunsdkworkbench_ide/request/v20210121/SetAppEnvConfigRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "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
78
0.756757
from aliyunsdkcore.request import RpcRequest class SetAppEnvConfigRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Workbench-ide', '2021-01-21', 'SetAppEnvConfig') self.set_method('POST') def get_DeployStage(self): return self.get_query_params().get('DeployStage') ...
true
true
f7224fb7697b3ac73408439748e830cf29800f8a
3,097
py
Python
AWS_Deployment/serve/predict.py
srimanthtenneti/Deep-Learning-NanoDegree
d99b09530a96f4aeca7adf3b9188e1d5fc4104d4
[ "Apache-2.0" ]
1
2021-04-25T08:29:39.000Z
2021-04-25T08:29:39.000Z
AWS_Deployment/serve/predict.py
srimanthtenneti/Deep-Learning-NanoDegree
d99b09530a96f4aeca7adf3b9188e1d5fc4104d4
[ "Apache-2.0" ]
null
null
null
AWS_Deployment/serve/predict.py
srimanthtenneti/Deep-Learning-NanoDegree
d99b09530a96f4aeca7adf3b9188e1d5fc4104d4
[ "Apache-2.0" ]
null
null
null
import argparse import json import os import pickle import sys import sagemaker_containers import pandas as pd import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.utils.data from model import LSTMClassifier from utils import review_to_words, convert_and_pad def model_fn(mod...
32.946809
107
0.698418
import argparse import json import os import pickle import sys import sagemaker_containers import pandas as pd import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.utils.data from model import LSTMClassifier from utils import review_to_words, convert_and_pad def model_fn(mod...
true
true
f72250448cf99a09119d7986eaa24621dace8924
100
py
Python
src/scraping/__init__.py
tuokri/ArgumentWinnerBot
3a8befc4fba5e50cb64e05df4527499a1a7625fc
[ "MIT" ]
null
null
null
src/scraping/__init__.py
tuokri/ArgumentWinnerBot
3a8befc4fba5e50cb64e05df4527499a1a7625fc
[ "MIT" ]
null
null
null
src/scraping/__init__.py
tuokri/ArgumentWinnerBot
3a8befc4fba5e50cb64e05df4527499a1a7625fc
[ "MIT" ]
null
null
null
from .scraping import evaluate_comment_reply_pair __all__ = [ "evaluate_comment_reply_pair", ]
16.666667
49
0.79
from .scraping import evaluate_comment_reply_pair __all__ = [ "evaluate_comment_reply_pair", ]
true
true
f72250b5bb01fc66955a6a49d7aaeab3b753695e
48,823
py
Python
epochServiceApi2/api_service_workspace.py
exastro-suite/epoch
c8ad14e9b1812310811320c9c099364917538021
[ "Apache-2.0" ]
5
2021-04-15T07:12:28.000Z
2022-02-03T12:36:20.000Z
epochServiceApi2/api_service_workspace.py
exastro-suite/epoch
c8ad14e9b1812310811320c9c099364917538021
[ "Apache-2.0" ]
29
2021-07-20T06:54:46.000Z
2022-03-25T01:49:34.000Z
epochServiceApi2/api_service_workspace.py
exastro-suite/epoch
c8ad14e9b1812310811320c9c099364917538021
[ "Apache-2.0" ]
10
2021-04-15T07:50:19.000Z
2021-12-08T05:40:37.000Z
# Copyright 2021 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
46.365622
184
0.543473
from flask import Flask, request, abort, jsonify, render_template from datetime import datetime from datetime import timedelta, timezone import inspect import os import json import tempfile import subprocess import time import re from urllib.parse import urlparse import base64 import requests from request...
true
true
f72251726696c1e896ff03b3100c48683916efdc
92
py
Python
Software_University/python_basics/for_loop/lecture/numbers_n_to_1.py
Ivanazzz/SoftUni-W3resource-Python
892321a290e22a91ff2ac2fef5316179a93f2f17
[ "MIT" ]
1
2022-01-26T07:38:11.000Z
2022-01-26T07:38:11.000Z
Software_University/python_basics/for_loop/lecture/numbers_n_to_1.py
Ivanazzz/SoftUni-W3resource-Python
892321a290e22a91ff2ac2fef5316179a93f2f17
[ "MIT" ]
null
null
null
Software_University/python_basics/for_loop/lecture/numbers_n_to_1.py
Ivanazzz/SoftUni-W3resource-Python
892321a290e22a91ff2ac2fef5316179a93f2f17
[ "MIT" ]
null
null
null
number = int(input("Enter an integer number: ")) for i in range(number, 0, -1): print(i)
30.666667
48
0.641304
number = int(input("Enter an integer number: ")) for i in range(number, 0, -1): print(i)
true
true
f722528cdceebb50fb10ce727ffbd969111d6c3e
3,113
py
Python
youtube_dl/extractor/sbs.py
ajaivasudeve/youtube-dl
6f8cb72f689c0aac630e06e91785f8428f1ba3f3
[ "Unlicense" ]
55
2015-01-18T08:44:39.000Z
2021-09-15T19:49:52.000Z
youtube_dl/extractor/sbs.py
ajaivasudeve/youtube-dl
6f8cb72f689c0aac630e06e91785f8428f1ba3f3
[ "Unlicense" ]
14
2019-11-30T00:01:34.000Z
2019-12-17T16:04:53.000Z
youtube_dl/extractor/sbs.py
ajaivasudeve/youtube-dl
6f8cb72f689c0aac630e06e91785f8428f1ba3f3
[ "Unlicense" ]
36
2015-10-07T18:32:33.000Z
2021-01-28T10:06:15.000Z
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( smuggle_url, ExtractorError, ) class SBSIE(InfoExtractor): IE_DESC = 'sbs.com.au' _VALID_URL = r'https?://(?:www\.)?sbs\.com\.au/(?:ondemand(?:/video/(?:single/)?|.*?\bplay=)|news/(?:embeds...
40.960526
136
0.585609
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( smuggle_url, ExtractorError, ) class SBSIE(InfoExtractor): IE_DESC = 'sbs.com.au' _VALID_URL = r'https?://(?:www\.)?sbs\.com\.au/(?:ondemand(?:/video/(?:single/)?|.*?\bplay=)|news/(?:embeds/)?video/)(?P<i...
true
true
f72252ba555ae2cebc8bddb12841fa7a995f772f
1,498
py
Python
code/fastai_ext/fastai_ext/hyperparameter.py
jandremarais/TabularLearner
7905b06a31fc6e0b0adf6a13a0fb445bdfe00c96
[ "MIT" ]
14
2019-07-15T07:38:36.000Z
2021-12-08T23:54:15.000Z
code/fastai_ext/fastai_ext/hyperparameter.py
jandremarais/TabularLearner
7905b06a31fc6e0b0adf6a13a0fb445bdfe00c96
[ "MIT" ]
2
2019-05-07T13:56:51.000Z
2019-08-08T01:27:58.000Z
code/fastai_ext/fastai_ext/hyperparameter.py
jandremarais/TabularLearner
7905b06a31fc6e0b0adf6a13a0fb445bdfe00c96
[ "MIT" ]
2
2021-03-23T11:06:45.000Z
2021-03-23T11:34:48.000Z
import pandas as pd import itertools from functools import partial from fastai.callbacks import CSVLogger def get_config_df(config): df = pd.DataFrame(list(itertools.product(*config.values())), columns=config.keys()) df.index = [f'model_{i+1}' for i in range(len(df))] return df def create_experiment(nm, ...
38.410256
112
0.688251
import pandas as pd import itertools from functools import partial from fastai.callbacks import CSVLogger def get_config_df(config): df = pd.DataFrame(list(itertools.product(*config.values())), columns=config.keys()) df.index = [f'model_{i+1}' for i in range(len(df))] return df def create_experiment(nm, ...
true
true
f72252fb17ff4e53251c9c88acde167184bfaac9
410
py
Python
supriya/assets/synthdefs/simple_sine.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
191
2015-11-13T02:28:42.000Z
2022-03-29T10:26:44.000Z
supriya/assets/synthdefs/simple_sine.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
130
2016-01-04T16:59:02.000Z
2022-02-26T15:37:20.000Z
supriya/assets/synthdefs/simple_sine.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
22
2016-05-04T10:32:16.000Z
2022-02-26T19:22:45.000Z
import supriya def _build_synthdef(): with supriya.SynthDefBuilder(amplitude=0, bus=0, frequency=440) as builder: supriya.ugens.Out.ar( bus=builder["bus"], source=supriya.ugens.SinOsc.ar(frequency=builder["frequency"]) * builder["amplitude"], ) return builde...
22.777778
79
0.64878
import supriya def _build_synthdef(): with supriya.SynthDefBuilder(amplitude=0, bus=0, frequency=440) as builder: supriya.ugens.Out.ar( bus=builder["bus"], source=supriya.ugens.SinOsc.ar(frequency=builder["frequency"]) * builder["amplitude"], ) return builde...
true
true
f7225437013ea810afe0c5483e568e663d0f6c87
1,027
py
Python
my-third-web-app.py
thunderboltsid/snake-taming-101
2f3fef8303d20fd026adc5b995510f375bcaba22
[ "MIT" ]
1
2020-07-25T19:21:47.000Z
2020-07-25T19:21:47.000Z
talks/snake-taming-101/my-third-web-app.py
thunderboltsid/sshukla.de
a39d05cc3d3c74277b0e64d49847c1d7e3053a80
[ "CC-BY-3.0" ]
null
null
null
talks/snake-taming-101/my-third-web-app.py
thunderboltsid/sshukla.de
a39d05cc3d3c74277b0e64d49847c1d7e3053a80
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python from flask import Flask, request app = Flask(__name__) # Shared storage for our list of tasks tasks = ["GenCS 1"] form = ("<form action='/' method='POST'>" "<input autofocus type='text' name='task' />" "<input type='submit' />" "</form>") def delete_form(idx): retur...
24.452381
94
0.552093
from flask import Flask, request app = Flask(__name__) tasks = ["GenCS 1"] form = ("<form action='/' method='POST'>" "<input autofocus type='text' name='task' />" "<input type='submit' />" "</form>") def delete_form(idx): return ("<form action='/delete' method='POST'>" ...
true
true
f7225447221fae0751d91a0b3b5cbbb1de9be1d8
3,535
py
Python
alipay/aop/api/domain/AlipayOpenPublicPartnerMenuOperateModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayOpenPublicPartnerMenuOperateModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayOpenPublicPartnerMenuOperateModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenPublicPartnerMenuOperateModel(object): def __init__(self): self._action_param = None self._action_type = None self._agreement_id = None self._public_id =...
30.474138
83
0.603395
import json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenPublicPartnerMenuOperateModel(object): def __init__(self): self._action_param = None self._action_type = None self._agreement_id = None self._public_id = None self._third_account_id = None ...
true
true
f72254bb72393c444db26b25e01795cdaaecd70c
1,377
py
Python
annif/backend/dummy.py
ooduor/Annif
2fd7db9c709ef018e15671d8fafe3aa9cbd4f2cf
[ "Apache-2.0" ]
null
null
null
annif/backend/dummy.py
ooduor/Annif
2fd7db9c709ef018e15671d8fafe3aa9cbd4f2cf
[ "Apache-2.0" ]
null
null
null
annif/backend/dummy.py
ooduor/Annif
2fd7db9c709ef018e15671d8fafe3aa9cbd4f2cf
[ "Apache-2.0" ]
null
null
null
"""Dummy backend for testing basic interaction of projects and backends""" from annif.suggestion import SubjectSuggestion, ListSuggestionResult from . import backend class DummyBackend(backend.AnnifLearningBackend): name = "dummy" initialized = False uri = 'http://example.org/dummy' label = 'dummy' ...
36.236842
74
0.571532
from annif.suggestion import SubjectSuggestion, ListSuggestionResult from . import backend class DummyBackend(backend.AnnifLearningBackend): name = "dummy" initialized = False uri = 'http://example.org/dummy' label = 'dummy' def default_params(self): return backend.AnnifBackend.DEFAULT_...
true
true
f72255d3f9ce93464b0a41607b812236a3af47db
931
py
Python
tests/test_classical_names.py
hramezani/inflect
c16192f0197890f6e439a1186f3296c2ce4d7303
[ "MIT" ]
null
null
null
tests/test_classical_names.py
hramezani/inflect
c16192f0197890f6e439a1186f3296c2ce4d7303
[ "MIT" ]
null
null
null
tests/test_classical_names.py
hramezani/inflect
c16192f0197890f6e439a1186f3296c2ce4d7303
[ "MIT" ]
null
null
null
from nose.tools import eq_ import inflect def test_ancient_1(): p = inflect.engine() # DEFAULT... eq_(p.plural_noun("Sally"), "Sallys", msg="classical 'names' active") eq_(p.plural_noun("Jones", 0), "Joneses", msg="classical 'names' active") # "person" PLURALS ACTIVATED... p.classical(nam...
34.481481
86
0.663802
from nose.tools import eq_ import inflect def test_ancient_1(): p = inflect.engine() eq_(p.plural_noun("Sally"), "Sallys", msg="classical 'names' active") eq_(p.plural_noun("Jones", 0), "Joneses", msg="classical 'names' active") p.classical(names=True) eq_(p.plural_noun("Sally"), "S...
true
true
f722572e191342082a2d695c14606225fcf5fbef
2,485
py
Python
pages/base_page.py
bloodmilk44/stepik_final_task
897b32b5dba3a07e5cf720c1c3eb57887a0c24cb
[ "Apache-2.0" ]
null
null
null
pages/base_page.py
bloodmilk44/stepik_final_task
897b32b5dba3a07e5cf720c1c3eb57887a0c24cb
[ "Apache-2.0" ]
null
null
null
pages/base_page.py
bloodmilk44/stepik_final_task
897b32b5dba3a07e5cf720c1c3eb57887a0c24cb
[ "Apache-2.0" ]
null
null
null
import math import time from .locators import BasePageLocators from selenium.common.exceptions import NoSuchElementException, NoAlertPresentException, TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC class BasePage(): def __i...
35
104
0.654326
import math import time from .locators import BasePageLocators from selenium.common.exceptions import NoSuchElementException, NoAlertPresentException, TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC class BasePage(): def __i...
true
true
f722574172b83587f0c7ea3c96cb8a8b1454e86c
1,935
py
Python
aliyun-python-sdk-codeup/aliyunsdkcodeup/request/v20200414/UpdateRepositoryMemberRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-codeup/aliyunsdkcodeup/request/v20200414/UpdateRepositoryMemberRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-codeup/aliyunsdkcodeup/request/v20200414/UpdateRepositoryMemberRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.947368
78
0.762274
from aliyunsdkcore.request import RoaRequest class UpdateRepositoryMemberRequest(RoaRequest): def __init__(self): RoaRequest.__init__(self, 'codeup', '2020-04-14', 'UpdateRepositoryMember') self.set_uri_pattern('/api/v3/projects/[ProjectId]/members/[UserId]') self.set_method('PUT') def...
true
true
f72257798e083e50f24091ddc6e6f591079e6a2a
829
py
Python
home/urls.py
Adyyousf/ToDo-List
a5d200b0eab14702c927dc451b47535b80be3093
[ "MIT" ]
1
2021-07-08T05:37:05.000Z
2021-07-08T05:37:05.000Z
home/urls.py
Adyyousf/ToDo-List
a5d200b0eab14702c927dc451b47535b80be3093
[ "MIT" ]
null
null
null
home/urls.py
Adyyousf/ToDo-List
a5d200b0eab14702c927dc451b47535b80be3093
[ "MIT" ]
null
null
null
"""todoList URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-base...
34.541667
77
0.705669
from django.contrib import admin from django.urls import path, include from home import views urlpatterns = [ path('', views.home, name='home'), path('tasks', views.tasks, name='tasks') ]
true
true