hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
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
209
max_issues_repo_name
stringlengths
5
121
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
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
2ac16f5ce747685d532348fcebefd49a3a7cc2da
4,961
py
Python
test/layouts/test_matrix.py
body20002/qtile
e0f1968a96e9acf2b6c9562fae44802ffc9951ec
[ "MIT" ]
1
2021-10-01T18:33:18.000Z
2021-10-01T18:33:18.000Z
test/layouts/test_matrix.py
body20002/qtile
e0f1968a96e9acf2b6c9562fae44802ffc9951ec
[ "MIT" ]
null
null
null
test/layouts/test_matrix.py
body20002/qtile
e0f1968a96e9acf2b6c9562fae44802ffc9951ec
[ "MIT" ]
1
2022-03-01T21:23:12.000Z
2022-03-01T21:23:12.000Z
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2012, 2014-2015 Tycho Andersen # Copyright (c) 2013 Mattias Svala # Copyright (c) 2013 Craig Barnes # Copyright (c) 2014 ramnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Adi Sieker # Copyright (c) 2014 Chris Wesseling # # Permission is hereby granted, free o...
34.93662
91
0.701673
4ae1f19ef2e083a28cbf223732cad07cddf36ee6
8,310
py
Python
touha/cli.py
dem4ply/touha
0a4815487dbdde12c8ff7ec22f76a8a8177ad964
[ "WTFPL" ]
null
null
null
touha/cli.py
dem4ply/touha
0a4815487dbdde12c8ff7ec22f76a8a8177ad964
[ "WTFPL" ]
null
null
null
touha/cli.py
dem4ply/touha
0a4815487dbdde12c8ff7ec22f76a8a8177ad964
[ "WTFPL" ]
null
null
null
import os import argparse import sys import datetime from touha import Touhas import logging import random from argparse import ArgumentParser from chibi.file import Chibi_path from chibi.file.temp import Chibi_temp_path from chibi_requests import Chibi_url from chibi_command.disk.dd import DD from chibi_command.dis...
31.596958
81
0.641155
83bef3f329e34b747b550cb3cf19898fd255acb4
138
py
Python
Lesson12/Tuple&Hash.py
nittharatk/hello_python
2beb257752ac968eb665ce17c5f003eb6b44333b
[ "MIT" ]
null
null
null
Lesson12/Tuple&Hash.py
nittharatk/hello_python
2beb257752ac968eb665ce17c5f003eb6b44333b
[ "MIT" ]
null
null
null
Lesson12/Tuple&Hash.py
nittharatk/hello_python
2beb257752ac968eb665ce17c5f003eb6b44333b
[ "MIT" ]
null
null
null
if name == 'main': n = int(input()) integer_list = map(int, input().split()) t = tuple(integer_list) print (hash(t))
23
45
0.543478
6005c89fb0bf02d136c0b611dc02f812c3b021c5
2,604
py
Python
dace/registry.py
am-ivanov/dace
c35f0b3cecc04a2c9fb668bd42a72045891e7a42
[ "BSD-3-Clause" ]
1
2021-09-13T06:36:18.000Z
2021-09-13T06:36:18.000Z
dace/registry.py
1C4nfaN/dace
4d65e0951c112160fe783766404a806b6043b521
[ "BSD-3-Clause" ]
null
null
null
dace/registry.py
1C4nfaN/dace
4d65e0951c112160fe783766404a806b6043b521
[ "BSD-3-Clause" ]
null
null
null
""" Contains class decorators to ease creating classes and enumerations whose subclasses and values can be registered externally. """ from aenum import Enum, extend_enum from copy import deepcopy from typing import Dict, Type def make_registry(cls: Type): """ Decorator that turns a class into a user-exte...
34.72
79
0.702765
38efb66bd664b8df8be1885ce0ad1908b5e5925a
3,011
py
Python
from_cpython/Lib/test/test_macostools.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:28:45.000Z
2020-02-06T14:28:45.000Z
from_cpython/Lib/test/test_macostools.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
from_cpython/Lib/test/test_macostools.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:29:00.000Z
2020-02-06T14:29:00.000Z
# expected: fail # Copyright (C) 2003 Python Software Foundation import unittest import os import sys from test import test_support MacOS = test_support.import_module('MacOS') #The following modules should exist if MacOS exists. import Carbon.File import macostools TESTFN2 = test_support.TESTFN + '2' requires_32bit...
32.031915
82
0.645633
310a6a50058ef42fc9df9d6390b1ae0514fb4a1f
11,965
py
Python
pysuite/drive.py
staftermath/pysuite
01bc63460b1e3d5d7507151230cc2af4731c362a
[ "BSD-3-Clause" ]
2
2020-10-15T04:05:56.000Z
2022-01-20T01:25:24.000Z
pysuite/drive.py
staftermath/pysuite
01bc63460b1e3d5d7507151230cc2af4731c362a
[ "BSD-3-Clause" ]
17
2020-08-29T03:10:15.000Z
2021-11-06T17:59:15.000Z
pysuite/drive.py
staftermath/pysuite
01bc63460b1e3d5d7507151230cc2af4731c362a
[ "BSD-3-Clause" ]
null
null
null
"""implement api to access google drive """ import logging from pathlib import PosixPath, Path from typing import Union, Optional, List import re from googleapiclient.discovery import Resource from googleapiclient.http import MediaIoBaseDownload, MediaFileUpload from pysuite.utilities import retry_on_out_of_quota, MA...
42.429078
121
0.6056
3087469891a220ce518dcc36f8f588086051f9ed
1,414
py
Python
aliyun-python-sdk-push/aliyunsdkpush/request/v20160801/CheckCertificateRequest.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-push/aliyunsdkpush/request/v20160801/CheckCertificateRequest.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-push/aliyunsdkpush/request/v20160801/CheckCertificateRequest.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...
37.210526
74
0.765912
27d859d6d6fd05744007b20bc7ba0c3d1ceeb302
688
py
Python
crescent/resources/s3/bucket/metrics_configuration.py
mpolatcan/zepyhrus
2fd0b1b9b21613b5876a51fe8b5f9e3afbec1b67
[ "Apache-2.0" ]
1
2020-03-26T19:20:03.000Z
2020-03-26T19:20:03.000Z
crescent/resources/s3/bucket/metrics_configuration.py
mpolatcan/zepyhrus
2fd0b1b9b21613b5876a51fe8b5f9e3afbec1b67
[ "Apache-2.0" ]
null
null
null
crescent/resources/s3/bucket/metrics_configuration.py
mpolatcan/zepyhrus
2fd0b1b9b21613b5876a51fe8b5f9e3afbec1b67
[ "Apache-2.0" ]
null
null
null
from crescent.core import Model from crescent.functions import AnyFn from .tag_filter import TagFilter from .constants import ModelRequiredProperties from typing import Union class MetricsConfiguration(Model): def __init__(self): super(MetricsConfiguration, self).__init__(required_properties=ModelRequired...
34.4
117
0.764535
7b430b7bcaada0d4029e72b581a4aec6e9dfe206
9,425
py
Python
create_figures/kombiplot_systems_i,v,vi.py
hippke/TTV-TDV-exomoons
af1fbcbd257d0c8f873cd1d388100d669f3e2f78
[ "MIT" ]
1
2019-08-01T09:46:13.000Z
2019-08-01T09:46:13.000Z
create_figures/kombiplot_systems_i,v,vi.py
hippke/TTV-TDV-exomoons
af1fbcbd257d0c8f873cd1d388100d669f3e2f78
[ "MIT" ]
null
null
null
create_figures/kombiplot_systems_i,v,vi.py
hippke/TTV-TDV-exomoons
af1fbcbd257d0c8f873cd1d388100d669f3e2f78
[ "MIT" ]
null
null
null
"""n-body simulator to derive TDV+TTV diagrams of planet-moon configurations. Credit for part of the source is given to https://github.com/akuchling/50-examples/blob/master/gravity.rst Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License """ import numpy import math import matplotlib.pylab as plt...
33.781362
185
0.669814
d8fd51a36c5482f9c76fec1ab25ca9d3843e21d6
3,155
py
Python
kamrecsys/datasets/tests/test_flixster.py
tkamishima/kamrecsys
62305312f7aaaa8c2985785983c1d2bf68b243c0
[ "MIT" ]
7
2016-11-01T13:19:16.000Z
2022-02-23T17:48:49.000Z
kamrecsys/datasets/tests/test_flixster.py
tkamishima/kamrecsys
62305312f7aaaa8c2985785983c1d2bf68b243c0
[ "MIT" ]
1
2017-09-03T13:08:48.000Z
2017-09-20T04:32:55.000Z
kamrecsys/datasets/tests/test_flixster.py
tkamishima/kamrecsys
62305312f7aaaa8c2985785983c1d2bf68b243c0
[ "MIT" ]
6
2016-04-21T16:13:23.000Z
2022-02-25T00:58:16.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import ( print_function, division, absolute_import) from six.moves import xrange # ============================================================================= # Imports # =======================================================================...
33.56383
79
0.422504
61c59e514e4a4857d77be8edc7252999bae6334e
6,032
py
Python
spleeter/utils/tensor.py
ogut77/spleeter3
fb900a8eea57a5a286acf2bf257e66a70db50f2f
[ "MIT" ]
null
null
null
spleeter/utils/tensor.py
ogut77/spleeter3
fb900a8eea57a5a286acf2bf257e66a70db50f2f
[ "MIT" ]
null
null
null
spleeter/utils/tensor.py
ogut77/spleeter3
fb900a8eea57a5a286acf2bf257e66a70db50f2f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf8 """ Utility function for tensorflow. """ # pylint: disable=import-error import tensorflow as tf import pandas as pd # pylint: enable=import-error __email__ = 'spleeter@deezer.com' __author__ = 'Deezer Research' __license__ = 'MIT License' def sync_apply(tensor_dict, func, conca...
31.416667
83
0.649867
bb9dbb2431c5d730ca2ef5edf8e94dcef7d63fd8
2,242
py
Python
katcp/compat.py
cnb0/katcp-python
35c860bc17ee6404cc59a14f7d1b8ac1fae4b73c
[ "BSD-3-Clause" ]
8
2015-02-25T20:13:54.000Z
2019-09-12T06:12:07.000Z
katcp/compat.py
cnb0/katcp-python
35c860bc17ee6404cc59a14f7d1b8ac1fae4b73c
[ "BSD-3-Clause" ]
67
2015-01-12T09:58:36.000Z
2021-05-12T14:23:26.000Z
katcp/compat.py
cnb0/katcp-python
35c860bc17ee6404cc59a14f7d1b8ac1fae4b73c
[ "BSD-3-Clause" ]
15
2015-04-28T13:18:28.000Z
2021-01-19T16:16:33.000Z
# katcp.py # -*- coding: utf8 -*- # vim:fileencoding=utf8 ai ts=4 sts=4 et sw=4 # Copyright 2019 National Research Foundation (South African Radio Astronomy Observatory) # BSD license - see LICENSE for details """Utilities for dealing with Python 2 and 3 compatibility.""" from __future__ import absolute_import, divis...
29.893333
89
0.664585
7200d3e3a5f15df58f1a78fd401d2cf75df6735b
6,386
py
Python
test/test_sersic_lens.py
LBJ-Wade/astrofunc_lensing_profile
d2223705bc44d07575a5e93291375ab8e69ebfa8
[ "MIT" ]
null
null
null
test/test_sersic_lens.py
LBJ-Wade/astrofunc_lensing_profile
d2223705bc44d07575a5e93291375ab8e69ebfa8
[ "MIT" ]
null
null
null
test/test_sersic_lens.py
LBJ-Wade/astrofunc_lensing_profile
d2223705bc44d07575a5e93291375ab8e69ebfa8
[ "MIT" ]
null
null
null
__author__ = 'sibirrer' import astrofunc.LensingProfiles.calc_util as calc_util from astrofunc.LensingProfiles.sersic import Sersic from astrofunc.LightProfiles.sersic import Sersic as Sersic_light import numpy as np import pytest import numpy.testing as npt class TestSersic(object): """ tests the Gaussian ...
36.913295
101
0.588945
b836958132ca61b68ee2f067a8779fcfed67ab77
18,180
py
Python
tests/test_compute_service.py
njn007/cloudbridge
422a449a52ca5c92cfe4210fe441eabea58dc506
[ "MIT" ]
null
null
null
tests/test_compute_service.py
njn007/cloudbridge
422a449a52ca5c92cfe4210fe441eabea58dc506
[ "MIT" ]
null
null
null
tests/test_compute_service.py
njn007/cloudbridge
422a449a52ca5c92cfe4210fe441eabea58dc506
[ "MIT" ]
null
null
null
import ipaddress import six from cloudbridge.base import helpers as cb_helpers from cloudbridge.base.resources import BaseNetwork from cloudbridge.factory import ProviderList from cloudbridge.interfaces import InstanceState from cloudbridge.interfaces import InvalidConfigurationException from cloudbridge.interfaces.e...
45.678392
79
0.565677
54a0e0d4a11c9bb77125b339c3c7d85474c2f401
348
py
Python
Python/kraken/core/objects/constraints/position_constraint.py
goshow-jp/Kraken
7088b474b6cc2840cea7ab642c5938e4a3290b6c
[ "BSD-3-Clause" ]
null
null
null
Python/kraken/core/objects/constraints/position_constraint.py
goshow-jp/Kraken
7088b474b6cc2840cea7ab642c5938e4a3290b6c
[ "BSD-3-Clause" ]
null
null
null
Python/kraken/core/objects/constraints/position_constraint.py
goshow-jp/Kraken
7088b474b6cc2840cea7ab642c5938e4a3290b6c
[ "BSD-3-Clause" ]
1
2021-12-08T08:31:48.000Z
2021-12-08T08:31:48.000Z
"""Kraken - objects.Constraints.PositionConstraint module. Classes: PositionConstraint - Position Constraint. """ from constraint import Constraint from kraken.core.maths.vec3 import Vec3 class PositionConstraint(Constraint): """Position Constraint.""" def __init__(self, name): super(PositionConst...
20.470588
58
0.755747
495fe3f6d5abcc19b1011f99edabc92995a7d2ba
7,655
py
Python
artifacts/old_dataset_versions/minimal_commits_v02/amazon-braket-sdk-python/amazon-braket-sdk-python#44/before/moments.py
MattePalte/Bugs-Quantum-Computing-Platforms
0c1c805fd5dfce465a8955ee3faf81037023a23e
[ "MIT" ]
3
2021-11-08T11:46:42.000Z
2021-12-27T10:13:38.000Z
artifacts/old_dataset_versions/minimal_commits/amazon-braket-sdk-python/amazon-braket-sdk-python#44/before/moments.py
MattePalte/Bugs-Quantum-Computing-Platforms
0c1c805fd5dfce465a8955ee3faf81037023a23e
[ "MIT" ]
2
2021-11-09T14:57:09.000Z
2022-01-12T12:35:58.000Z
artifacts/old_dataset_versions/original_commits_v02/amazon-braket-sdk-python/amazon-braket-sdk-python#44/before/moments.py
MattePalte/Bugs-Quantum-Computing-Platforms
0c1c805fd5dfce465a8955ee3faf81037023a23e
[ "MIT" ]
null
null
null
# Copyright 2019-2019 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" fil...
35.771028
99
0.634095
2f50310294dc9be22116849ffbe7121f81e7d8a2
2,318
py
Python
bingads/v12/internal/bulk/row_values.py
channable/BingAds-Python-SDK
205ebf9bdd9701d5d05c5f9ac59702083754f553
[ "MIT" ]
null
null
null
bingads/v12/internal/bulk/row_values.py
channable/BingAds-Python-SDK
205ebf9bdd9701d5d05c5f9ac59702083754f553
[ "MIT" ]
null
null
null
bingads/v12/internal/bulk/row_values.py
channable/BingAds-Python-SDK
205ebf9bdd9701d5d05c5f9ac59702083754f553
[ "MIT" ]
1
2019-03-15T10:43:21.000Z
2019-03-15T10:43:21.000Z
from .csv_headers import _CsvHeaders from .mappings import _SimpleBulkMapping from bingads.v12.bulk import EntityReadException import six class _RowValues: def __init__(self, mappings=None, columns=None): self._mappings = mappings self._columns = columns if self.mappings is None: ...
32.647887
116
0.622088
9ba2767efe636dd4c9e8fb48dfe16d3f8f84c22c
864
py
Python
discordSuperUtils/kick.py
Heapy1337/discord-super-utils
be9d65fbc957d017df534ac502457f387594a9c8
[ "MIT" ]
91
2021-07-14T13:01:31.000Z
2022-03-25T10:28:49.000Z
discordSuperUtils/kick.py
KortaPo/discord-super-utils
b8c1cd1a986bc5c78eaf472bb5caf44dd7b605e4
[ "MIT" ]
14
2021-08-13T14:23:54.000Z
2022-03-25T09:57:12.000Z
discordSuperUtils/kick.py
KortaPo/discord-super-utils
b8c1cd1a986bc5c78eaf472bb5caf44dd7b605e4
[ "MIT" ]
42
2021-08-02T00:27:24.000Z
2022-03-31T15:47:37.000Z
from __future__ import annotations from typing import TYPE_CHECKING import discord from .base import EventManager from .punishments import Punisher if TYPE_CHECKING: from discord.ext import commands from .punishments import Punishment __all__ = ("KickManager",) class KickManager(EventManager, Punisher):...
22.736842
83
0.670139
1161be2d229bcb8e3575277c1fe91c1cd915ed15
1,837
py
Python
waterbutler/providers/box/metadata.py
alexschiller/waterbutler
24014d7705aca3e99a6565fc3b9b4075ec6ec563
[ "Apache-2.0" ]
null
null
null
waterbutler/providers/box/metadata.py
alexschiller/waterbutler
24014d7705aca3e99a6565fc3b9b4075ec6ec563
[ "Apache-2.0" ]
null
null
null
waterbutler/providers/box/metadata.py
alexschiller/waterbutler
24014d7705aca3e99a6565fc3b9b4075ec6ec563
[ "Apache-2.0" ]
null
null
null
from waterbutler.core import metadata class BaseBoxMetadata(metadata.BaseMetadata): def __init__(self, raw, path_obj): super().__init__(raw) self._path_obj = path_obj @property def provider(self): return 'box' @property def materialized_path(self): return str(sel...
20.640449
72
0.583016
ed5df34c50965c70ba92a129e7d017d52fa4ecfb
1,555
py
Python
problem.py
nhatminh-96/datacamp-project
a9d42ae0ac5a8ecdfe3d084cc8c5ce71c60db4df
[ "MIT" ]
null
null
null
problem.py
nhatminh-96/datacamp-project
a9d42ae0ac5a8ecdfe3d084cc8c5ce71c60db4df
[ "MIT" ]
null
null
null
problem.py
nhatminh-96/datacamp-project
a9d42ae0ac5a8ecdfe3d084cc8c5ce71c60db4df
[ "MIT" ]
null
null
null
import os import string from glob import glob import pandas as pd import numpy as np from sklearn.metrics import r2_score from sklearn.model_selection import ShuffleSplit import rampwf as rw from rampwf.score_types.base import BaseScoreType problem_title = "Salary prediction of NBA Basketball players" _target_name...
25.080645
76
0.689389
5ce574d95bd86b8ed06ced67440bd9cee5ef8310
2,041
py
Python
aliyun-python-sdk-waf-openapi/aliyunsdkwaf_openapi/request/v20180117/DescribeAsyncTaskStatusRequest.py
silent-beaters/aliyun-openapi-python-sdk
7a025eabdad622af07affc3a7beeae1c5def469d
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-waf-openapi/aliyunsdkwaf_openapi/request/v20180117/DescribeAsyncTaskStatusRequest.py
silent-beaters/aliyun-openapi-python-sdk
7a025eabdad622af07affc3a7beeae1c5def469d
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-waf-openapi/aliyunsdkwaf_openapi/request/v20180117/DescribeAsyncTaskStatusRequest.py
silent-beaters/aliyun-openapi-python-sdk
7a025eabdad622af07affc3a7beeae1c5def469d
[ "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...
35.807018
90
0.769721
081a49a65a65bfa876e41f0cb99c314e3e0c2642
4,239
py
Python
abinitio/03_logistic_regression.py
Moreficent/xvi
fb9d4cf15638104480a4f1666d77644fe7ecc760
[ "Apache-2.0" ]
null
null
null
abinitio/03_logistic_regression.py
Moreficent/xvi
fb9d4cf15638104480a4f1666d77644fe7ecc760
[ "Apache-2.0" ]
null
null
null
abinitio/03_logistic_regression.py
Moreficent/xvi
fb9d4cf15638104480a4f1666d77644fe7ecc760
[ "Apache-2.0" ]
null
null
null
""" Calibrates a logistic regression model to the data. The slope and intercept are assumed to be normally distributed. For simplicity, eager mode evaluation is used. """ from abinitio.utils import fix_seed fix_seed(42) import numpy as np import tensorflow as tf import tensorflow_probability as tfp np.set_printopt...
36.543103
106
0.664544
1d017fc0c5787ae11112d0f722270347cb5c8b7d
278
py
Python
DMCNN/constant.py
Hspix/Adv-ED
60bf9546c91558ca956a3957003a14166590a8f0
[ "MIT" ]
69
2019-04-03T13:55:05.000Z
2022-03-31T08:04:46.000Z
DMCNN/constant.py
Hspix/Adv-ED
60bf9546c91558ca956a3957003a14166590a8f0
[ "MIT" ]
13
2019-05-10T13:38:34.000Z
2021-10-21T03:00:35.000Z
DMCNN/constant.py
Hspix/Adv-ED
60bf9546c91558ca956a3957003a14166590a8f0
[ "MIT" ]
21
2019-04-05T06:04:53.000Z
2021-12-26T08:53:36.000Z
dataPath="./" MaxPos=2*SenLen SenLen=60 LocalLen=1 dimWE=300 dimPE=5 dimC=200 dimE=22 filter_size=3 keepProb=0.5 Epoch=7 BatchSize=170 vec_file="wiki.multi.en.vec" AugTimes=1 NegCnt=20 Threshold=6 ItemTimes=10 alpha=4.0 sLr=0.005 dLr=0.02 EncodedDim=2*dimC+(2*LocalLen+1)*dimWE
12.636364
38
0.773381
5700439c7408fec1f3a4dd470bbb9f340e96eb75
9,444
py
Python
features/steps/pipeline_steps.py
guludo/kedro
274b5011204082697835f272a7f44ae1549e608d
[ "Apache-2.0" ]
null
null
null
features/steps/pipeline_steps.py
guludo/kedro
274b5011204082697835f272a7f44ae1549e608d
[ "Apache-2.0" ]
null
null
null
features/steps/pipeline_steps.py
guludo/kedro
274b5011204082697835f272a7f44ae1549e608d
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 QuantumBlack Visual Analytics 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 # # THE SOFTWARE IS PROVIDED "AS IS",...
34.593407
86
0.700868
10d17970df085b6489e73c01f804dd7ebad03df2
1,657
py
Python
language/generated-samples/v1/language_sentiment_text.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
2
2020-09-19T04:22:52.000Z
2020-09-23T14:04:17.000Z
language/generated-samples/v1/language_sentiment_text.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
1
2020-07-24T19:18:29.000Z
2020-07-24T19:45:23.000Z
language/generated-samples/v1/language_sentiment_text.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
2
2020-09-13T03:47:22.000Z
2020-09-23T14:04:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2018 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...
28.084746
76
0.731442
df93f8f0960187b4e241d5b7a4cd74625f8164da
281
py
Python
examples/pyplot/donut.py
danielhrisca/vedo
487568b7956a67b87752e3d518ba3f7e87b327a6
[ "CC0-1.0" ]
1
2021-04-25T06:28:01.000Z
2021-04-25T06:28:01.000Z
examples/pyplot/donut.py
danielhrisca/vedo
487568b7956a67b87752e3d518ba3f7e87b327a6
[ "CC0-1.0" ]
null
null
null
examples/pyplot/donut.py
danielhrisca/vedo
487568b7956a67b87752e3d518ba3f7e87b327a6
[ "CC0-1.0" ]
null
null
null
from vedo.pyplot import donut title = "A donut plot" fractions = [0.1, 0.2, 0.3, 0.1, 0.3] colors = [ 1, 2, 3, 4, 'white'] labels = ["stuff_1 ", "stuff_2 ", "comp^A ", "comp^B ", ""] dn = donut(fractions, c=colors, labels=labels, title=title) dn.show(axes=None)
25.545455
62
0.580071
2fc66d1554962edb49b16b8283859e5335830dfc
483
py
Python
curso-em-video/aula_13/estrutura-de-repeticao-for.py
talysonxx/python
520b108731e28c7dc1fca3523b925be506fd8340
[ "MIT" ]
null
null
null
curso-em-video/aula_13/estrutura-de-repeticao-for.py
talysonxx/python
520b108731e28c7dc1fca3523b925be506fd8340
[ "MIT" ]
null
null
null
curso-em-video/aula_13/estrutura-de-repeticao-for.py
talysonxx/python
520b108731e28c7dc1fca3523b925be506fd8340
[ "MIT" ]
null
null
null
'''for c in range(6, 0, -2): 5 vezes, no 6 ele para, não faz ele print(c)''' '''n = int(input('Digite um número: ')) passo = int(input('Digite o passo: ')) if passo > 0: for c in range(0, n + 1, passo): print(c, end=' > ') else: for c in range(n, -1, passo): print(c, end=' > ')''' nome = s...
26.833333
73
0.559006
5e5a8272c55e5b91ed103aa9b33c929e535e2b30
6,636
py
Python
einsteinish/settings.py
Einsteinish/Einstein
f65d705bbc118f4c4f7f85b4e3b121cc62ee6350
[ "MIT" ]
28
2016-01-27T04:27:40.000Z
2021-09-13T18:42:15.000Z
einsteinish/settings.py
Einsteinish/Einstein
f65d705bbc118f4c4f7f85b4e3b121cc62ee6350
[ "MIT" ]
4
2021-06-08T18:55:52.000Z
2022-01-13T00:36:36.000Z
einsteinish/settings.py
Einsteinish/Einstein
f65d705bbc118f4c4f7f85b4e3b121cc62ee6350
[ "MIT" ]
21
2016-01-17T18:29:59.000Z
2021-11-18T10:51:25.000Z
import os # secrets are defined in local_settings.py PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) DEBUG = True ADMINS = ( #('K Hong', 'contact.einsteinish@gmail.com'), ('K Hong', 'einsteinish@aol.com'), ) MANAGERS = ADMINS DJANGO_APPS = ( 'django.contrib.auth', '...
27.308642
108
0.633213
9de86cdb3884ad2d86fb4bfac38827c44785fa5c
2,792
py
Python
xain/benchmark/exec/__main__.py
danieljanes/ox-msc-diss-code-freeze
20c6881cabdf1e3ed7a9ddb40bbdcc7a7fd22f78
[ "Apache-2.0" ]
1
2020-05-30T20:34:19.000Z
2020-05-30T20:34:19.000Z
xain/benchmark/exec/__main__.py
danieljanes/ox-msc-diss-code-freeze
20c6881cabdf1e3ed7a9ddb40bbdcc7a7fd22f78
[ "Apache-2.0" ]
null
null
null
xain/benchmark/exec/__main__.py
danieljanes/ox-msc-diss-code-freeze
20c6881cabdf1e3ed7a9ddb40bbdcc7a7fd22f78
[ "Apache-2.0" ]
null
null
null
import atexit import time from absl import app, flags from xain.datasets import load_splits from xain.helpers import storage from xain.ops import results from . import run FLAGS = flags.FLAGS def after_main(group_name: str, task_name: str): """Will run after main exists (successfully or otherwise)""" # Pu...
28.489796
85
0.629656
f928ca718b06a18a95ba5d4aa3339f2b3a4f851e
2,903
py
Python
util/fetch_currency_codelist.py
Inova-MPRJ/standard
e979b5b8193da70b21cc08034f14bc4950fd389b
[ "Apache-2.0" ]
1
2021-04-01T12:03:24.000Z
2021-04-01T12:03:24.000Z
util/fetch_currency_codelist.py
Inova-MPRJ/standard
e979b5b8193da70b21cc08034f14bc4950fd389b
[ "Apache-2.0" ]
null
null
null
util/fetch_currency_codelist.py
Inova-MPRJ/standard
e979b5b8193da70b21cc08034f14bc4950fd389b
[ "Apache-2.0" ]
null
null
null
""" Updates the currency codelist from ISO4217 files. """ import csv import os.path import re import requests from lxml import etree from helper import json_dump, json_load, schema_dir def get_and_parse_xml(url): response = requests.get(url) response.raise_for_status() return etree.fromstring(response....
42.691176
103
0.643128
71f45bb99b87f56c61c26438172a76aba1880001
486
py
Python
data/scripts/templates/object/tangible/ship/components/shield_generator/shared_shd_prototype_shield.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/ship/components/shield_generator/shared_shd_prototype_shield.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/ship/components/shield_generator/shared_shd_prototype_shield.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/components/shield_generator/shared_shd_prototype_shield.iff" r...
28.588235
101
0.744856
cb165872af7918769292ad036714b4a58207d426
3,414
py
Python
state-change-localization-classification/slowFast-perceiver/models/head_helper.py
EGO4D/hands-and-objects
76d6ce6af1a9db4007ea24eb315f3f0eaea26bc2
[ "MIT" ]
24
2021-10-15T20:17:38.000Z
2022-03-30T18:54:55.000Z
state-change-localization-classification/slowFast-perceiver/models/head_helper.py
EGO4D/hands-and-objects
76d6ce6af1a9db4007ea24eb315f3f0eaea26bc2
[ "MIT" ]
1
2022-03-09T03:35:42.000Z
2022-03-10T20:50:24.000Z
state-change-localization-classification/slowFast-perceiver/models/head_helper.py
EGO4D/hands-and-objects
76d6ce6af1a9db4007ea24eb315f3f0eaea26bc2
[ "MIT" ]
4
2021-11-18T19:22:16.000Z
2022-03-21T02:51:35.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """ResNe(X)t Head helper.""" import torch import torch.nn as nn class ResNetBasicHead(nn.Module): """ ResNe(X)t 3D head. This layer performs a fully-connected projection during training, when the input siz...
38.359551
86
0.597247
3cfc676c08414645598b7ddf6c37fd266ffee369
9,246
py
Python
zerver/views/video_calls.py
mehant-kr/zulip
acd34e27627b227c66c4a3dce64d38563600852f
[ "Apache-2.0" ]
3
2019-02-03T20:46:55.000Z
2019-03-04T15:44:28.000Z
zerver/views/video_calls.py
mehant-kr/zulip
acd34e27627b227c66c4a3dce64d38563600852f
[ "Apache-2.0" ]
1
2022-01-24T09:38:09.000Z
2022-01-24T09:38:09.000Z
zerver/views/video_calls.py
mehant-kr/zulip
acd34e27627b227c66c4a3dce64d38563600852f
[ "Apache-2.0" ]
2
2021-07-02T14:15:24.000Z
2021-08-16T12:31:49.000Z
import hashlib import json import random import secrets from base64 import b32encode from functools import partial from typing import Dict from urllib.parse import quote, urlencode, urljoin import requests from defusedxml import ElementTree from django.conf import settings from django.http import HttpRequest, HttpResp...
35.837209
107
0.670452
085a4496e8598abff2b4734288d57e98290543ad
158,563
py
Python
pyvttbl/stats/_stats.py
yk/pyvttbl
af66c1aba410ba5386249cd5b95f2ae0ed01d870
[ "BSD-3-Clause" ]
null
null
null
pyvttbl/stats/_stats.py
yk/pyvttbl
af66c1aba410ba5386249cd5b95f2ae0ed01d870
[ "BSD-3-Clause" ]
null
null
null
pyvttbl/stats/_stats.py
yk/pyvttbl
af66c1aba410ba5386249cd5b95f2ae0ed01d870
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 1999-2007 Gary Strangman; All Rights Reserved. # # 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, m...
34.59808
177
0.594641
be698a3cad3588bbfb4332971533e1b6be7968a3
61,804
py
Python
src/azure-cli-core/azure/cli/core/_profile.py
francescanarea/azure-cli
b01fbe373a059aa6c746e6e067aac4ac77323211
[ "MIT" ]
null
null
null
src/azure-cli-core/azure/cli/core/_profile.py
francescanarea/azure-cli
b01fbe373a059aa6c746e6e067aac4ac77323211
[ "MIT" ]
1
2021-06-02T02:50:00.000Z
2021-06-02T02:50:00.000Z
src/azure-cli-core/azure/cli/core/_profile.py
francescanarea/azure-cli
b01fbe373a059aa6c746e6e067aac4ac77323211
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
47.395706
124
0.638567
652b694c582acd1ebbc5f46d9464eec4ae7a9837
1,808
py
Python
wads/__init__.py
i2mint/wads
fd46a4dcf456b714f8fbd34e8648042d84e9313d
[ "Apache-2.0" ]
null
null
null
wads/__init__.py
i2mint/wads
fd46a4dcf456b714f8fbd34e8648042d84e9313d
[ "Apache-2.0" ]
4
2020-11-10T19:26:25.000Z
2021-04-05T21:56:41.000Z
wads/__init__.py
i2mint/wads
fd46a4dcf456b714f8fbd34e8648042d84e9313d
[ "Apache-2.0" ]
null
null
null
""" Console Scripts --------------- To see available commands :: wads --help """ import setuptools # to avoid a warning due to distutils_patch.py import os import json root_dir = os.path.dirname(__file__) root_dir_name = os.path.basename(root_dir) rjoin = lambda *paths: os.path.join(root_dir, *paths) data_d...
25.464789
88
0.659845
81b1605e43786d608edf6185371cf91018e35cb3
881
py
Python
tests/test_primes.py
jonspock/vdf-competition
e77dc86f438d4e734c68f6b6aa12b30a3dc65475
[ "Apache-2.0" ]
97
2018-10-04T18:10:42.000Z
2021-08-23T10:37:06.000Z
tests/test_primes.py
jonspock/vdf-competition
e77dc86f438d4e734c68f6b6aa12b30a3dc65475
[ "Apache-2.0" ]
4
2018-10-04T18:20:49.000Z
2021-05-03T07:13:14.000Z
tests/test_primes.py
jonspock/vdf-competition
e77dc86f438d4e734c68f6b6aa12b30a3dc65475
[ "Apache-2.0" ]
17
2018-10-08T18:08:21.000Z
2022-01-12T00:54:32.000Z
import heapq import unittest from inkfish import primes def prime_iter(max_value=None): yield 2 heap = [(4, 2)] c = 2 while max_value is None or c < max_value: c += 1 n, p = heap[0] if n > c: yield c heapq.heappush(heap, (c+c, c)) while n <= c: ...
24.472222
57
0.568672
a9781d5c830416b5dab34277ca54d5725a19ca6a
60,932
py
Python
userbot/utils/google_images_download.py
Ncode2014/RBot
9b7592bbb680f35a4d80111715bf3ac1be5869f8
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/utils/google_images_download.py
Ncode2014/RBot
9b7592bbb680f35a4d80111715bf3ac1be5869f8
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/utils/google_images_download.py
Ncode2014/RBot
9b7592bbb680f35a4d80111715bf3ac1be5869f8
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
#!/usr/bin/env python # In[ ]: # coding: utf-8 ###### Searching and Downloading Google Images to the local disk ###### import argparse # Import Libraries import codecs import datetime import http.client import json import os import re import ssl import sys import time # Importing the time library to check the time...
35.948083
147
0.454326
f89e8cc4483d2b78cea7b7e4b095c7c0ae6b31de
617
py
Python
day_16/solution.py
juntuu/advent_of_code_2016
c2849396b4bd7b0f0e9128624fcec20130bc243f
[ "MIT" ]
null
null
null
day_16/solution.py
juntuu/advent_of_code_2016
c2849396b4bd7b0f0e9128624fcec20130bc243f
[ "MIT" ]
null
null
null
day_16/solution.py
juntuu/advent_of_code_2016
c2849396b4bd7b0f0e9128624fcec20130bc243f
[ "MIT" ]
null
null
null
def double(a): b = a[::-1] return a + "0" + b.translate({ord("1"): "0", ord("0"): "1"}) def check_sum(s): while len(s) % 2 == 0: s = "".join("01"[a == b] for a, b in zip(*[iter(s)]*2)) return s def part1(state): n = 272 while len(state) < n: state = double(state) return c...
18.69697
64
0.515397
f1ae123250321e4f09b4181a4e585e6913d877c7
10,198
py
Python
python/pyspark/ml/base.py
rahij/spark
82721ce00b6cf535abd3d9cd66445e452554d15d
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2019-09-16T09:42:07.000Z
2019-10-29T20:38:27.000Z
python/pyspark/ml/base.py
rahij/spark
82721ce00b6cf535abd3d9cd66445e452554d15d
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
118
2019-06-28T12:58:34.000Z
2021-08-03T04:43:57.000Z
python/pyspark/ml/base.py
rahij/spark
82721ce00b6cf535abd3d9cd66445e452554d15d
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2021-10-30T17:13:49.000Z
2022-03-13T22:26:29.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 us...
31.86875
99
0.632281
8f99ed94c040dfb0b3464a043dd89679d47d3902
1,408
py
Python
examples/restarts.py
jmmshn/jobflow
996f77378915271ef8393659992249990b1ac234
[ "BSD-3-Clause-LBNL" ]
null
null
null
examples/restarts.py
jmmshn/jobflow
996f77378915271ef8393659992249990b1ac234
[ "BSD-3-Clause-LBNL" ]
null
null
null
examples/restarts.py
jmmshn/jobflow
996f77378915271ef8393659992249990b1ac234
[ "BSD-3-Clause-LBNL" ]
null
null
null
from typing import List from jobflow import Flow, job, run_locally @job def read_websites(): from pathlib import Path file_contents = Path("websites.txt").read_text() return file_contents.split() @job def time_website(website: str): import urllib.request from time import perf_counter stre...
23.081967
70
0.71946
bc4755cb302f50e60af92b4372a0f59ae971a7c0
711
py
Python
Clustering_Snippets/T8_getClusters_spectral.py
mahnooranjum/Python_Programming
ba251e0e855842112efeb968d06458c60eaf1bd3
[ "MIT" ]
null
null
null
Clustering_Snippets/T8_getClusters_spectral.py
mahnooranjum/Python_Programming
ba251e0e855842112efeb968d06458c60eaf1bd3
[ "MIT" ]
null
null
null
Clustering_Snippets/T8_getClusters_spectral.py
mahnooranjum/Python_Programming
ba251e0e855842112efeb968d06458c60eaf1bd3
[ "MIT" ]
null
null
null
''' Mahnoor Anjum Python: Clusters ''' import seaborn as sns import matplotlib.pyplot as plt import pandas as pd import numpy as np import math import random filename = 'private' path = 'data/' + filename + '.txt' data = pd.read_csv(path, delimiter='\t') columns = ['X','Y','Z'] X = data[columns] da...
20.314286
62
0.714487
ef20e75711ae99e5183457f377ac6fac80f5cb29
4,046
py
Python
examples/SpinBox.py
Tillsten/pyqtgraph
0045863165fe526988c58cf4f8232ae2d261a5ee
[ "MIT" ]
null
null
null
examples/SpinBox.py
Tillsten/pyqtgraph
0045863165fe526988c58cf4f8232ae2d261a5ee
[ "MIT" ]
null
null
null
examples/SpinBox.py
Tillsten/pyqtgraph
0045863165fe526988c58cf4f8232ae2d261a5ee
[ "MIT" ]
1
2021-04-10T06:04:47.000Z
2021-04-10T06:04:47.000Z
# -*- coding: utf-8 -*- """ This example demonstrates the SpinBox widget, which is an extension of QDoubleSpinBox providing some advanced features: * SI-prefixed units * Non-linear stepping modes * Bounded/unbounded values """ import initExample ## Add path to library (just for examples; you do not need this) ...
34.581197
154
0.668562
4619af7bea18b05a13fecfe9f25482691e79a65f
6,464
py
Python
cloudshell/devices/standards/load_balancing/configuration_attributes_structure.py
QualiSystems/cloudshell-networking-devices
f316cefca174975424ec21854b672335feaf8f87
[ "Apache-2.0" ]
null
null
null
cloudshell/devices/standards/load_balancing/configuration_attributes_structure.py
QualiSystems/cloudshell-networking-devices
f316cefca174975424ec21854b672335feaf8f87
[ "Apache-2.0" ]
34
2016-11-28T10:52:44.000Z
2019-10-01T08:52:59.000Z
cloudshell/devices/standards/load_balancing/configuration_attributes_structure.py
QualiSystems/cloudshell-networking-devices
f316cefca174975424ec21854b672335feaf8f87
[ "Apache-2.0" ]
1
2017-05-23T08:46:45.000Z
2017-05-23T08:46:45.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- class GenericNetworkingResource(object): def __init__(self, shell_name=None, name=None, supported_os=None): """Init method :param shell_name: Shell Name :type shell_name: str :param name: Resource Name :type name: str :para...
25.151751
116
0.604115
f27c1c8afb5471184ffa42708d2326ae53d0aae1
3,528
py
Python
flexget/plugins/urlrewrite_newzleech.py
RSully/flexget-flexget
ab36590e569511a43c1e35b1dfae9b7fb8db1535
[ "MIT" ]
null
null
null
flexget/plugins/urlrewrite_newzleech.py
RSully/flexget-flexget
ab36590e569511a43c1e35b1dfae9b7fb8db1535
[ "MIT" ]
null
null
null
flexget/plugins/urlrewrite_newzleech.py
RSully/flexget-flexget
ab36590e569511a43c1e35b1dfae9b7fb8db1535
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import import urllib import urllib2 import logging import re from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils.soup import get_soup from flexget.utils.tools import urlopener log = logging.getLogger(...
40.090909
121
0.508787
99c614f63fead0fcd08f28725b11055a21aef97e
4,265
py
Python
flax/wallet/util/backup_utils.py
ReadyNeutron/shitcoin-blockchain
80add4e545ad22a317244f7fd958d118a5a75c5d
[ "Apache-2.0" ]
174
2021-06-16T17:49:22.000Z
2022-03-17T03:03:17.000Z
flax/wallet/util/backup_utils.py
ReadyNeutron/shitcoin-blockchain
80add4e545ad22a317244f7fd958d118a5a75c5d
[ "Apache-2.0" ]
49
2021-06-17T14:10:53.000Z
2022-01-31T11:04:21.000Z
flax/wallet/util/backup_utils.py
ReadyNeutron/shitcoin-blockchain
80add4e545ad22a317244f7fd958d118a5a75c5d
[ "Apache-2.0" ]
80
2021-06-17T14:23:31.000Z
2022-02-24T05:52:47.000Z
import base64 import json from typing import Any import aiohttp from blspy import AugSchemeMPL, PrivateKey, PublicKeyMPL, SignatureMPL from cryptography.fernet import Fernet from flax.server.server import ssl_context_for_root from flax.ssl.create_ssl import get_mozilla_ca_crt from flax.util.byte_types import hexstr_t...
34.12
100
0.710903
abf52f0280264a197e9d6fbd3a74b776c341496e
1,619
py
Python
OpenShiftLibrary/keywords/services.py
red-hat-data-services/robotframework-openshift
154b9176edf637fdccaa84d4318638c058a11106
[ "MIT" ]
null
null
null
OpenShiftLibrary/keywords/services.py
red-hat-data-services/robotframework-openshift
154b9176edf637fdccaa84d4318638c058a11106
[ "MIT" ]
null
null
null
OpenShiftLibrary/keywords/services.py
red-hat-data-services/robotframework-openshift
154b9176edf637fdccaa84d4318638c058a11106
[ "MIT" ]
2
2022-03-17T16:21:14.000Z
2022-03-31T08:12:47.000Z
from typing import Optional from robotlibcore import keyword from OpenShiftLibrary.client import GenericClient from OpenShiftLibrary.outputformatter import OutputFormatter from OpenShiftLibrary.outputstreamer import OutputStreamer from OpenShiftLibrary.errors import ResourceNotFound class ServiceKeywords(object): ...
43.756757
110
0.696726
40ac6bee475d58bf4f9d5ca1be989fbc56df7310
1,533
py
Python
codegen/vhdre/__main__.py
honorpeter/fletcher
9622293443b1ea70b1f3aa592098a64690600dd4
[ "Apache-2.0" ]
1
2021-03-05T08:24:57.000Z
2021-03-05T08:24:57.000Z
codegen/vhdre/__main__.py
honorpeter/fletcher
9622293443b1ea70b1f3aa592098a64690600dd4
[ "Apache-2.0" ]
null
null
null
codegen/vhdre/__main__.py
honorpeter/fletcher
9622293443b1ea70b1f3aa592098a64690600dd4
[ "Apache-2.0" ]
null
null
null
from . import RegexMatcher # ------------------------------------------------------------------------------ # Main # ------------------------------------------------------------------------------ if __name__ == "__main__": import sys def usage(): print(r"Usage: python -m vhdre <entity-name> <regex> ....
34.840909
90
0.528376
114df1feff381a9968ca4967bfb503ee3a7b9f16
9,400
py
Python
src/fidesops/api/v1/endpoints/connection_endpoints.py
autosuggested/fidesops
a399abbc39e8fc528bc31d1bd3f0419c3379e6f3
[ "Apache-2.0" ]
null
null
null
src/fidesops/api/v1/endpoints/connection_endpoints.py
autosuggested/fidesops
a399abbc39e8fc528bc31d1bd3f0419c3379e6f3
[ "Apache-2.0" ]
null
null
null
src/fidesops/api/v1/endpoints/connection_endpoints.py
autosuggested/fidesops
a399abbc39e8fc528bc31d1bd3f0419c3379e6f3
[ "Apache-2.0" ]
null
null
null
import logging from typing import List, Optional from fastapi import APIRouter, HTTPException, Depends from fastapi.params import Security from fastapi_pagination.ext.sqlalchemy import paginate from fastapi_pagination import Page, Params from fastapi_pagination.bases import AbstractPage from fidesops.schemas.shared_sc...
34.432234
117
0.724043
dcd61d4355c8f47517a2fffad5f97fe4e1ffe037
15,006
py
Python
idfy_sdk/services/signature/signature_service.py
idfy-io/idfy-sdk-python
0f7ced0cf0df080b1c73e2451bf02a23710b5bf1
[ "Apache-2.0" ]
null
null
null
idfy_sdk/services/signature/signature_service.py
idfy-io/idfy-sdk-python
0f7ced0cf0df080b1c73e2451bf02a23710b5bf1
[ "Apache-2.0" ]
null
null
null
idfy_sdk/services/signature/signature_service.py
idfy-io/idfy-sdk-python
0f7ced0cf0df080b1c73e2451bf02a23710b5bf1
[ "Apache-2.0" ]
null
null
null
import asyncio import functools import sys from typing import List, Dict from idfy_sdk.idfy_configuration import IdfyConfiguration as config from idfy_sdk import urls as urls from idfy_sdk.services.IdfyBaseService import IdfyBaseService from idfy_sdk.services.signature import models as models class SignatureService(I...
40.447439
144
0.618219
eb82c83e7da6339f6860a8a16d4e36069af6aff3
7,309
py
Python
tools/telemetry/telemetry/web_perf/timeline_interaction_record_unittest.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-01-25T09:58:49.000Z
2020-01-25T09:58:49.000Z
tools/telemetry/telemetry/web_perf/timeline_interaction_record_unittest.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/telemetry/telemetry/web_perf/timeline_interaction_record_unittest.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2015-03-27T11:15:39.000Z
2016-08-17T14:19:56.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from telemetry.timeline import model as model_module from telemetry.timeline import slice as slice_module from telemetry.timeline import asy...
44.29697
80
0.744835
4df6aa046b94798a146b2475a7a6c875cacf2f07
1,278
py
Python
8kyu/test_who_is_going_to_pay_for_the_wall.py
adun/codewars.py
89e7d81e9ca05a432007d634892c1cba28f5b715
[ "MIT" ]
null
null
null
8kyu/test_who_is_going_to_pay_for_the_wall.py
adun/codewars.py
89e7d81e9ca05a432007d634892c1cba28f5b715
[ "MIT" ]
null
null
null
8kyu/test_who_is_going_to_pay_for_the_wall.py
adun/codewars.py
89e7d81e9ca05a432007d634892c1cba28f5b715
[ "MIT" ]
null
null
null
# Don Drumphet lives in a nice neighborhood, but one of his neighbors has started to # let his house go. Don Drumphet wants to build a wall between his house and his # neighbor’s, and is trying to get the neighborhood association to pay for it. He # begins to solicit his neighbors to petition to get the association to ...
49.153846
88
0.72144
c6d12fabf46b2e398a5a65f0165bb2e2867a9a7e
201
py
Python
plutoserverextension.py
dralletje/pluto-on-binder
13bae7e95d44514d4b4bbb38319adb5bbd8b082f
[ "Unlicense" ]
null
null
null
plutoserverextension.py
dralletje/pluto-on-binder
13bae7e95d44514d4b4bbb38319adb5bbd8b082f
[ "Unlicense" ]
null
null
null
plutoserverextension.py
dralletje/pluto-on-binder
13bae7e95d44514d4b4bbb38319adb5bbd8b082f
[ "Unlicense" ]
null
null
null
from subprocess import Popen def load_jupyter_server_extension(nbapp): Popen(["julia", "-Jprecompile.so", "-e", "import Pluto; Pluto.run(\"0.0.0.0\", 1234; security=Pluto.ServerSecurity(false))"])
50.25
129
0.721393
7e14bde21328e7e4df4cc41fe828eb04026a47ec
792
py
Python
synapse/tests/test_lib_auth.py
larrycameron80/synapse
24bf21c40b4a467e5dc28c8204aecaf502d5cddf
[ "Apache-2.0" ]
null
null
null
synapse/tests/test_lib_auth.py
larrycameron80/synapse
24bf21c40b4a467e5dc28c8204aecaf502d5cddf
[ "Apache-2.0" ]
null
null
null
synapse/tests/test_lib_auth.py
larrycameron80/synapse
24bf21c40b4a467e5dc28c8204aecaf502d5cddf
[ "Apache-2.0" ]
null
null
null
from synapse.tests.common import * import synapse.lib.auth as s_auth class AuthTest(SynTest): def test_auth_rules(self): rules = ( (True, ('foo:bar', {'baz': 'faz'})), (False, ('foo:bar', {'baz': 'woot*'})), (True, ('hehe:*', {})), ) rulz = s_auth.Ru...
27.310345
64
0.534091
5724a675ee913402b94584849f746e8562914041
12,697
py
Python
ironic_python_agent/config.py
yrobla/ironic-python-agent
c8af93e0df6557e47f4045b53d11b2daaefb8ec3
[ "Apache-2.0" ]
null
null
null
ironic_python_agent/config.py
yrobla/ironic-python-agent
c8af93e0df6557e47f4045b53d11b2daaefb8ec3
[ "Apache-2.0" ]
null
null
null
ironic_python_agent/config.py
yrobla/ironic-python-agent
c8af93e0df6557e47f4045b53d11b2daaefb8ec3
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
46.170909
79
0.554383
f6210292dcf77c56b357b2b5332eaae75de687d0
2,034
py
Python
videoanalyst/data/adaptor_dataset.py
lizhenbang56/Manipulating-Template-Pixels-for-Model-Adaptation-of-Siamese-Visual-Tracking
76b88d8e68ac3d575a2ce81fc07ee2fce5f050d6
[ "MIT" ]
1
2020-04-08T02:57:59.000Z
2020-04-08T02:57:59.000Z
videoanalyst/data/adaptor_dataset.py
lizhenbang56/Manipulating-Template-Pixels-for-Model-Adaptation-of-Siamese-Visual-Tracking
76b88d8e68ac3d575a2ce81fc07ee2fce5f050d6
[ "MIT" ]
null
null
null
videoanalyst/data/adaptor_dataset.py
lizhenbang56/Manipulating-Template-Pixels-for-Model-Adaptation-of-Siamese-Visual-Tracking
76b88d8e68ac3d575a2ce81fc07ee2fce5f050d6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -* from itertools import chain from typing import Dict from loguru import logger import torch import torch.multiprocessing from torch.utils.data import DataLoader, Dataset from videoanalyst.utils.misc import Timer from .datapipeline import builder as datapipeline_builder # pytorch wrapper for mu...
34.474576
91
0.638643
e91b0098c98a626bd0a982afa3899ead03452cab
214
py
Python
defense/Scripts/adventuremap.py
kyongkyong289/pythongame
a695193d2a7b8ee9a6b1235c2794543d865a878f
[ "MIT" ]
null
null
null
defense/Scripts/adventuremap.py
kyongkyong289/pythongame
a695193d2a7b8ee9a6b1235c2794543d865a878f
[ "MIT" ]
null
null
null
defense/Scripts/adventuremap.py
kyongkyong289/pythongame
a695193d2a7b8ee9a6b1235c2794543d865a878f
[ "MIT" ]
null
null
null
import pygame import visual as vs import variables as var import uidata as ui import inputfunctions as iff def display(): var.screen.blit(vs.font_title.render('Map', True, vs.Colors.black), ui.Main.title_text)
26.75
91
0.775701
ab5f699e53032e831c262248e628cd668fdd8bf9
3,407
py
Python
src/m6_loops_within_loops_printing.py
wilfonba/24-FinalExamPractice-201930
4c339355e8b84a7dd99f70bda7cef08afb876f32
[ "MIT" ]
null
null
null
src/m6_loops_within_loops_printing.py
wilfonba/24-FinalExamPractice-201930
4c339355e8b84a7dd99f70bda7cef08afb876f32
[ "MIT" ]
null
null
null
src/m6_loops_within_loops_printing.py
wilfonba/24-FinalExamPractice-201930
4c339355e8b84a7dd99f70bda7cef08afb876f32
[ "MIT" ]
null
null
null
""" PRACTICE Exam 3. This problem provides practice at: *** LOOPS WITHIN LOOPS in PRINTING-TO-CONSOLE problems. *** Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher, Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues, and Ben Wilfong. """ # Done: 1. PUT YOUR NAME IN THE ...
31.546296
79
0.434693
aa5ae4ebf613bae2b6fb1abe366149e99d79d1b5
1,171
py
Python
tensorflow_datasets/text/goemotions_test.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
2
2022-02-14T09:51:39.000Z
2022-02-14T13:27:49.000Z
tensorflow_datasets/text/goemotions_test.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/text/goemotions_test.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
1
2020-12-13T22:11:33.000Z
2020-12-13T22:11:33.000Z
# coding=utf-8 # Copyright 2022 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
30.815789
74
0.721605
a1f8dfa239baa33d5b7fb8a82ab8e95fa6b75853
611
bzl
Python
source/bazel/deps/glog/get.bzl
luxe/unilang
6c8a431bf61755f4f0534c6299bd13aaeba4b69e
[ "MIT" ]
33
2019-05-30T07:43:32.000Z
2021-12-30T13:12:32.000Z
source/bazel/deps/glog/get.bzl
luxe/unilang
6c8a431bf61755f4f0534c6299bd13aaeba4b69e
[ "MIT" ]
371
2019-05-16T15:23:50.000Z
2021-09-04T15:45:27.000Z
source/bazel/deps/glog/get.bzl
luxe/unilang
6c8a431bf61755f4f0534c6299bd13aaeba4b69e
[ "MIT" ]
6
2019-08-22T17:37:36.000Z
2020-11-07T07:15:32.000Z
# Do not edit this file directly. # It was auto-generated by: code/programs/reflexivity/reflexive_refresh load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def glog(): http_archive( name="glog" , sha256="bae42ec37b50e156071f5b92d2ff09aa5ece56fd8c58d2175fc1ffea85137664" , ...
32.157895
102
0.677578
fba1ce0254050682784d9a667d8d59a7932e305b
204
py
Python
python/6kyu/Which are in?/solution.py
abfarah/codewars
5aa41a36a6255cb559d23c62f75679e4f3818692
[ "MIT" ]
null
null
null
python/6kyu/Which are in?/solution.py
abfarah/codewars
5aa41a36a6255cb559d23c62f75679e4f3818692
[ "MIT" ]
null
null
null
python/6kyu/Which are in?/solution.py
abfarah/codewars
5aa41a36a6255cb559d23c62f75679e4f3818692
[ "MIT" ]
null
null
null
def in_array(array1, array2): array1.sort() result = [] for i in array1: for j in array2: if i in j and i not in result: result.append(i) return result
22.666667
42
0.534314
341e645f422d2f00ff39b0a2ebb6cf228a853a5f
10,632
py
Python
seq2ftr/feature_calculators.py
smoothnlp/Squeeze
7b968cbc42871634360f2daa9b2c60499bda3bf6
[ "Apache-2.0" ]
5
2019-07-17T09:02:57.000Z
2021-05-17T02:50:13.000Z
seq2ftr/feature_calculators.py
smoothnlp/Squeeze
7b968cbc42871634360f2daa9b2c60499bda3bf6
[ "Apache-2.0" ]
null
null
null
seq2ftr/feature_calculators.py
smoothnlp/Squeeze
7b968cbc42871634360f2daa9b2c60499bda3bf6
[ "Apache-2.0" ]
2
2019-06-04T14:40:56.000Z
2020-03-20T13:41:50.000Z
import hashlib from functools import wraps def set_property(*args): """ The decorators for set properties for individual feature calculators :param args: name: the function's name for display stype: the supporting types for the feature calculating function 0 for boolean, 1 for n...
26.058824
108
0.6345
6e5d27660a10559829ba18ce8300267a29167e44
1,423
py
Python
HW1_Random/codes/run_mlp.py
liuyuezhangadam/artificial-neural-network
36fcd9625633eeb8eb0a924274dd5a8564ffe6e0
[ "MIT" ]
1
2021-04-26T05:42:22.000Z
2021-04-26T05:42:22.000Z
HW1_Random/codes/run_mlp.py
liuyuezhangadam/artificial-neural-network
36fcd9625633eeb8eb0a924274dd5a8564ffe6e0
[ "MIT" ]
null
null
null
HW1_Random/codes/run_mlp.py
liuyuezhangadam/artificial-neural-network
36fcd9625633eeb8eb0a924274dd5a8564ffe6e0
[ "MIT" ]
null
null
null
from network import Network from utils import LOG_INFO from layers import Relu, Sigmoid, Linear from loss import EuclideanLoss from solve_net import train_net, test_net from load_data import load_mnist_2d train_data, test_data, train_label, test_label = load_mnist_2d('data') # Your model defintion here # You should ...
30.276596
102
0.706254
3716295cfd6e10c0d83ad524ef9e1fcb8b4affee
4,225
py
Python
appdaemon/archived_apps/lighting/alarm_clock.py
ConnorGriffin/Home-AssistantConfig
73eac5fc7f0283f5953d31a10fea6e1a4f7c99d6
[ "MIT" ]
null
null
null
appdaemon/archived_apps/lighting/alarm_clock.py
ConnorGriffin/Home-AssistantConfig
73eac5fc7f0283f5953d31a10fea6e1a4f7c99d6
[ "MIT" ]
null
null
null
appdaemon/archived_apps/lighting/alarm_clock.py
ConnorGriffin/Home-AssistantConfig
73eac5fc7f0283f5953d31a10fea6e1a4f7c99d6
[ "MIT" ]
null
null
null
import appdaemon.plugins.hass.hassapi as hass import datetime class AlarmClock(hass.Hass): def initialize(self): # Get the alarm clock groups in the alarm clock view, setup listeners for each alarm_groups = self.get_state( 'group.alarmclock_view', attribute='entity_id') for al...
40.238095
138
0.60071
4e87dc8f04b1f3f5e5ee4d16ca0b553fe4f69117
3,875
py
Python
arthur.carvalho/snake/snake.py
LUDUSLab/stem-games
347afa8b1511d76f8070fa69f27a49b57e551376
[ "MIT" ]
2
2021-01-24T01:04:34.000Z
2021-05-06T16:25:53.000Z
arthur.carvalho/snake/snake.py
LUDUSLab/stem-games
347afa8b1511d76f8070fa69f27a49b57e551376
[ "MIT" ]
null
null
null
arthur.carvalho/snake/snake.py
LUDUSLab/stem-games
347afa8b1511d76f8070fa69f27a49b57e551376
[ "MIT" ]
3
2021-01-26T21:35:43.000Z
2021-05-06T16:06:47.000Z
import pygame from random import randint def body_snake_move(): global score, apple_position, score_text if UP: snake_position[0] = (snake_position[0][0], snake_position[0][1] - 10) for c in range(len(snake_position) - 1, 0, -1): snake_position[c] = (snake_position[c - 1][0], sna...
29.356061
100
0.577032
2780627c3964a271009a1ef08b6e6fa323ec5745
2,075
py
Python
flox_aws/command.py
getflox/flox-aws
9642e291afa3ddedd9eed566b43a640e9bb0c537
[ "MIT" ]
null
null
null
flox_aws/command.py
getflox/flox-aws
9642e291afa3ddedd9eed566b43a640e9bb0c537
[ "MIT" ]
null
null
null
flox_aws/command.py
getflox/flox-aws
9642e291afa3ddedd9eed566b43a640e9bb0c537
[ "MIT" ]
null
null
null
import json from urllib.parse import quote_plus import click import requests from flox_aws.provider.session import with_aws from floxcore.context import Flox, EmptyContext from floxcore.shell import execute_command @click.group(name="aws", invoke_without_command=True, context_settings=dict( ignore_unknown_optio...
34.016393
117
0.727229
e66e26d6d6ba237ae12c619c84760e660a6ecea3
3,399
py
Python
python/cuML/test/test_linear_model.py
akshaysubr/cuml
7fceac26242f0155a5fa5cf1951af29230302e31
[ "Apache-2.0" ]
1
2019-10-01T15:20:32.000Z
2019-10-01T15:20:32.000Z
python/cuML/test/test_linear_model.py
akshaysubr/cuml
7fceac26242f0155a5fa5cf1951af29230302e31
[ "Apache-2.0" ]
null
null
null
python/cuML/test/test_linear_model.py
akshaysubr/cuml
7fceac26242f0155a5fa5cf1951af29230302e31
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
33.99
74
0.640482
742c513ae4ab8d4f273cb7e5ea3bb70dd3e55e1b
8,217
py
Python
lingua/builder.py
pemistahl/lingua-py
d8e99d24a235ae80c40d57788d6f4d7ba806cb92
[ "Apache-2.0" ]
119
2022-01-10T20:49:05.000Z
2022-03-26T12:42:26.000Z
lingua/builder.py
pemistahl/lingua-py
d8e99d24a235ae80c40d57788d6f4d7ba806cb92
[ "Apache-2.0" ]
7
2022-01-22T18:35:49.000Z
2022-03-24T20:36:32.000Z
lingua/builder.py
pemistahl/lingua-py
d8e99d24a235ae80c40d57788d6f4d7ba806cb92
[ "Apache-2.0" ]
3
2022-01-10T23:35:30.000Z
2022-01-11T11:00:33.000Z
# # Copyright © 2022 Peter M. Stahl pemistahl@gmail.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
40.279412
92
0.690885
e6e8e6f7ae1b8e3713b7a5787388ccd40fbb5b6b
11,670
py
Python
Testing/tests/test_car_manager_04.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
null
null
null
Testing/tests/test_car_manager_04.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
null
null
null
Testing/tests/test_car_manager_04.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
null
null
null
import unittest # from Testing.code_files.car_manager_04 import Car class TestCar(unittest.TestCase): def test_carInit_shouldCreateProperObject(self): make = 'test make' model = 'test model' fuel_consumption = 10 fuel_capacity = 100 expected = [make, model, fuel_consumpti...
35.363636
105
0.651671
90f586accc47773baade36e445f9924643f78d99
4,142
py
Python
samples/interactive-tutorials/product/import_products_gcs.py
tetiana-karasova/python-retail
b834c1fb16212e59241267e18d38b490e962af7f
[ "Apache-2.0" ]
1
2022-02-11T14:00:31.000Z
2022-02-11T14:00:31.000Z
samples/interactive-tutorials/product/import_products_gcs.py
tetiana-karasova/python-retail
b834c1fb16212e59241267e18d38b490e962af7f
[ "Apache-2.0" ]
null
null
null
samples/interactive-tutorials/product/import_products_gcs.py
tetiana-karasova/python-retail
b834c1fb16212e59241267e18d38b490e962af7f
[ "Apache-2.0" ]
2
2022-01-28T09:53:16.000Z
2022-02-07T14:27:38.000Z
# Copyright 2022 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
35.401709
120
0.688073
df5ded4541fd116b029ee98075516725aca021ac
2,635
py
Python
data/fivethirtyeight/election-forecasts-2020/presidential-ev-probabilities-2020/harvester.py
mtna/data-public
aeeee98d60e545440bab18356120fb4493d0a35b
[ "Apache-2.0", "CC-BY-4.0" ]
2
2020-08-28T21:36:11.000Z
2021-05-05T16:34:52.000Z
data/fivethirtyeight/election-forecasts-2020/presidential-ev-probabilities-2020/harvester.py
mtna/data-public
aeeee98d60e545440bab18356120fb4493d0a35b
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
data/fivethirtyeight/election-forecasts-2020/presidential-ev-probabilities-2020/harvester.py
mtna/data-public
aeeee98d60e545440bab18356120fb4493d0a35b
[ "Apache-2.0", "CC-BY-4.0" ]
2
2020-10-20T00:45:11.000Z
2020-10-20T00:47:16.000Z
import os import pandas as pd variables = { 'cycle': 'election_cycle', 'branch': 'race_type', 'modeldate': 'date_modeled', 'candidate_inc': 'name_incumbent', 'candidate_chal': 'name_challenger', 'candidate_3rd': 'name_third', 'evprob_inc': 'votes_ec_prob_incumbent', 'evprob_chal': 'vot...
43.916667
159
0.679696
3cffc92f3a50e761b3aad209579d21f6fa17d53d
6,296
py
Python
mflat_master.py
ambarqadeer/ALOPqadeer
8bcef157d6fc11c4ee19a58b3fe77915a82c947c
[ "MIT" ]
null
null
null
mflat_master.py
ambarqadeer/ALOPqadeer
8bcef157d6fc11c4ee19a58b3fe77915a82c947c
[ "MIT" ]
null
null
null
mflat_master.py
ambarqadeer/ALOPqadeer
8bcef157d6fc11c4ee19a58b3fe77915a82c947c
[ "MIT" ]
null
null
null
import glob from astropy.io import fits import numpy as np import matplotlib.pyplot as plt from astropy.nddata import CCDData import astropy.units as u import ccdproc as ccdp import os import pathlib from ccdproc import ImageFileCollection from astropy.visualization import hist import itertools from astropy.stats impor...
41.150327
103
0.640089
ff189cfa3dc4b8f42f5322578b28e1fa9d6abcf8
1,136
py
Python
src/setup.py
spaceone-dev/plugin-googleoauth2-identity-auth
e30e2032aa68a7f3f70fb8afbd1e39aa30d259f9
[ "Apache-2.0" ]
null
null
null
src/setup.py
spaceone-dev/plugin-googleoauth2-identity-auth
e30e2032aa68a7f3f70fb8afbd1e39aa30d259f9
[ "Apache-2.0" ]
null
null
null
src/setup.py
spaceone-dev/plugin-googleoauth2-identity-auth
e30e2032aa68a7f3f70fb8afbd1e39aa30d259f9
[ "Apache-2.0" ]
1
2021-08-19T02:13:02.000Z
2021-08-19T02:13:02.000Z
# # Copyright 2020 The SpaceONE Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
29.128205
76
0.690141
a51c5fde566de3aa2e39e5861de8b7d66975e3e9
14,091
py
Python
core/gossip/messages/connect_message.py
NunoEdgarGFlowHub/sawtooth-core
0288e5fae62b7b730201cb57b06f996a8b02ec33
[ "Apache-2.0" ]
null
null
null
core/gossip/messages/connect_message.py
NunoEdgarGFlowHub/sawtooth-core
0288e5fae62b7b730201cb57b06f996a8b02ec33
[ "Apache-2.0" ]
null
null
null
core/gossip/messages/connect_message.py
NunoEdgarGFlowHub/sawtooth-core
0288e5fae62b7b730201cb57b06f996a8b02ec33
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
35.2275
80
0.662338
f4d1b65f1f117ac820fb2f0835226b6d1dbaf3ee
2,116
py
Python
theano/tests/unittest_tools.py
josharian/Theano
724a25692090fee26eebf72f5d046ca8662089c1
[ "BSD-3-Clause" ]
1
2016-05-07T14:52:38.000Z
2016-05-07T14:52:38.000Z
theano/tests/unittest_tools.py
josharian/Theano
724a25692090fee26eebf72f5d046ca8662089c1
[ "BSD-3-Clause" ]
null
null
null
theano/tests/unittest_tools.py
josharian/Theano
724a25692090fee26eebf72f5d046ca8662089c1
[ "BSD-3-Clause" ]
null
null
null
import sys import numpy import theano.tensor as T from theano.configparser import config, AddConfigVar, StrParam AddConfigVar('unittests.rseed', "Seed to use for randomized unit tests. Special value 'random' means using a seed of None.", StrParam(666), in_c_key=False) def fetch_seed(pseed=No...
28.213333
100
0.650756
6630e3b6856f80f0a2d291ddd85e625d42148607
1,505
py
Python
src/numdifftools/testing.py
peendebak/numdifftools
10ed8f36f7d1995dd229b3e8fec77c12cf09817d
[ "BSD-3-Clause" ]
181
2015-01-21T07:16:45.000Z
2022-03-14T20:35:10.000Z
src/numdifftools/testing.py
peendebak/numdifftools
10ed8f36f7d1995dd229b3e8fec77c12cf09817d
[ "BSD-3-Clause" ]
58
2015-01-21T11:46:55.000Z
2022-02-21T21:22:31.000Z
src/numdifftools/testing.py
peendebak/numdifftools
10ed8f36f7d1995dd229b3e8fec77c12cf09817d
[ "BSD-3-Clause" ]
43
2015-02-22T18:03:23.000Z
2022-02-21T15:48:42.000Z
""" Created on Apr 4, 2016 @author: pab """ from __future__ import print_function import sys import contextlib import inspect import numpy as np try: from cStringIO import StringIO except ImportError: from io import StringIO def rosen(x): """Rosenbrock function This is a non-convex function used as ...
23.153846
74
0.634551
b1c5f001468ae5899a287d19087e6ff0b7bd87b6
603
py
Python
examples/utilities_general.py
Sandbergo/ecole
2bab4d6a66e5d1932870f4cecbdc989b8fd17546
[ "BSD-3-Clause" ]
null
null
null
examples/utilities_general.py
Sandbergo/ecole
2bab4d6a66e5d1932870f4cecbdc989b8fd17546
[ "BSD-3-Clause" ]
null
null
null
examples/utilities_general.py
Sandbergo/ecole
2bab4d6a66e5d1932870f4cecbdc989b8fd17546
[ "BSD-3-Clause" ]
null
null
null
import datetime class Logger: def __init__(self, filename=None): self.logfile = f'{filename}_{self.format_time(file=True)}.txt' def format_time(self, file=False): t = datetime.datetime.now() if file: s = t.strftime('%m%d_%H%M%S') else: s = t.strftime('%...
26.217391
70
0.515755
ffb99c534bd52163e5b8408b452617d5ccb94c84
1,477
py
Python
utils/validations.py
jesseinit/feather-insure
69222d9302662cbcd85b402c27b7f6951d2f18a0
[ "MIT" ]
null
null
null
utils/validations.py
jesseinit/feather-insure
69222d9302662cbcd85b402c27b7f6951d2f18a0
[ "MIT" ]
null
null
null
utils/validations.py
jesseinit/feather-insure
69222d9302662cbcd85b402c27b7f6951d2f18a0
[ "MIT" ]
null
null
null
from functools import wraps class ValidationError(Exception): """Base Validation class for handling validation errors""" def __init__(self, error, status_code=None): super().__init__(self) self.status_code = 400 self.error = error self.error["status"] = "error" self.er...
27.351852
77
0.605958
6a8e267da4ee03eac564d6d766a7430eed1de724
12,349
py
Python
util_pipe.py
shingte/CarND-Advanced-Lane-Lines
96b73ac0b1bc3496618f0e89184a7e6d5a1e18ee
[ "MIT" ]
4
2020-03-24T02:16:08.000Z
2021-11-25T17:47:49.000Z
util_pipe.py
shingte/CarND-Advanced-Lane-Lines
96b73ac0b1bc3496618f0e89184a7e6d5a1e18ee
[ "MIT" ]
null
null
null
util_pipe.py
shingte/CarND-Advanced-Lane-Lines
96b73ac0b1bc3496618f0e89184a7e6d5a1e18ee
[ "MIT" ]
4
2020-09-18T01:08:25.000Z
2021-11-25T17:48:47.000Z
import numpy as np import cv2 def abs_sobel_thresh(img, sobel_kernel=3, orient='x', thresh=(0,255)): # Apply the following steps to img # 1) Convert to grayscale # 2) Take the derivative in x or y given orient = 'x' or 'y' # 3) Take the absolute value of the derivative or gradient # 4) Scal...
39.328025
111
0.635922
3909bf8e7d62ac0dc870331f059905ab1865a537
7,938
py
Python
Measures/letor_metrics.py
alfonsoeromero/S2F
fccb741b15acfdeb02ca0de411eb4b00ae73be85
[ "MIT" ]
9
2019-10-24T18:46:46.000Z
2022-03-23T13:21:45.000Z
Measures/letor_metrics.py
alfonsoeromero/S2F
fccb741b15acfdeb02ca0de411eb4b00ae73be85
[ "MIT" ]
5
2022-01-26T18:00:01.000Z
2022-02-08T14:09:42.000Z
Measures/letor_metrics.py
alfonsoeromero/S2F
fccb741b15acfdeb02ca0de411eb4b00ae73be85
[ "MIT" ]
2
2022-01-27T12:52:32.000Z
2022-01-29T12:08:26.000Z
# (C) Mathieu Blondel, November 2013 # License: BSD 3 clause import numpy as np def ranking_precision_score(y_true, y_score, k=10): """Precision at rank k Parameters ---------- y_true : array-like, shape = [n_samples] Ground truth (true relevance labels). y_score : array-like, shape = [...
29.842105
78
0.508188
d7226515f2ffabf9ae7d279e44e0341a818d6ec5
2,275
py
Python
_1327/urls.py
Pottiman/1327
1d67cf905c801d998ff1f10e5312c51d76dd44ef
[ "MIT" ]
null
null
null
_1327/urls.py
Pottiman/1327
1d67cf905c801d998ff1f10e5312c51d76dd44ef
[ "MIT" ]
null
null
null
_1327/urls.py
Pottiman/1327
1d67cf905c801d998ff1f10e5312c51d76dd44ef
[ "MIT" ]
null
null
null
from django.conf import settings from django.contrib import admin from django.contrib.auth import views as auth_views from django.urls import include, path, register_converter from _1327.documents import urls as document_urls from _1327.main import views as main_views from _1327.main.utils import SlugWithSlashConverte...
48.404255
126
0.795604
480b33315fdc318fd9c05932d2f30a697ac17d58
3,344
py
Python
paddlespeech/t2s/exps/tacotron2/preprocess.py
JiehangXie/PaddleSpeech
60090b49ec27437127ab62358026dd5bb95fccc7
[ "Apache-2.0" ]
1,540
2017-11-14T13:26:33.000Z
2021-11-09T14:05:08.000Z
paddlespeech/t2s/exps/tacotron2/preprocess.py
JiehangXie/PaddleSpeech
60090b49ec27437127ab62358026dd5bb95fccc7
[ "Apache-2.0" ]
599
2017-11-14T13:19:12.000Z
2021-11-09T01:58:26.000Z
paddlespeech/t2s/exps/tacotron2/preprocess.py
JiehangXie/PaddleSpeech
60090b49ec27437127ab62358026dd5bb95fccc7
[ "Apache-2.0" ]
449
2017-11-14T12:48:46.000Z
2021-11-06T09:34:33.000Z
# Copyright (c) 2020 PaddlePaddle 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 appli...
33.777778
100
0.691687
46e3ff53fb1b941d4c468448c6fb18d3fa28aa71
1,249
py
Python
valid8/tests/validation_lib/test_validators_comparables.py
smarie/python-validate
c8a10ccede1c0782355439b0966f532bf00dfcab
[ "BSD-3-Clause" ]
26
2018-01-10T03:44:19.000Z
2021-11-28T07:56:31.000Z
valid8/tests/validation_lib/test_validators_comparables.py
smarie/python-validate
c8a10ccede1c0782355439b0966f532bf00dfcab
[ "BSD-3-Clause" ]
55
2017-11-06T14:45:47.000Z
2021-05-12T08:28:11.000Z
valid8/tests/validation_lib/test_validators_comparables.py
smarie/python-valid8
c8a10ccede1c0782355439b0966f532bf00dfcab
[ "BSD-3-Clause" ]
null
null
null
import pytest from valid8.validation_lib import gt, gts, lt, lts, between, NotInRange, TooSmall, TooBig def test_gt(): """ tests that the gt() function works """ assert gt(1)(1) with pytest.raises(TooSmall): gt(-1)(-1.1) def test_gts(): """ tests that the gts() function works """ with p...
21.534483
89
0.598078
5cddb2bbba54b1a8a20b582535a7da437cded1b3
31,442
py
Python
zarc/old/models_2017-05-20-17:06:44.py
nyimbi/caseke
ce4a0fa44cd383bc23900e42f81656f089c8fdd9
[ "MIT" ]
1
2019-06-03T16:20:35.000Z
2019-06-03T16:20:35.000Z
zarc/old/models_2017-05-20-17:06:44.py
nyimbi/caseke
ce4a0fa44cd383bc23900e42f81656f089c8fdd9
[ "MIT" ]
20
2020-01-28T22:02:29.000Z
2022-03-29T22:28:34.000Z
zarc/old/models_2017-05-20-17:06:44.py
nyimbi/caseke
ce4a0fa44cd383bc23900e42f81656f089c8fdd9
[ "MIT" ]
1
2019-06-10T17:20:48.000Z
2019-06-10T17:20:48.000Z
# coding: utf-8 # AUTOGENERATED BY gen_script.sh from kpony3.py # Copyright (C) Nyimbi Odero, Sat May 20 16:40:17 EAT 2017 from sqlalchemy import func from flask_appbuilder import Model from flask_appbuilder.models.mixins import AuditMixin, FileColumn, ImageColumn, UserExtensionMixin from flask_appbuilder.models.dec...
42.662144
148
0.652376
e14e64c8fc77f5245f8aa94960f6c346518173ec
1,401
py
Python
tests/__init__.py
NickKaramoff/double-stream-handler
27d658b17b15529d5dcdeba51bbc1df7e73a2e9c
[ "BSD-3-Clause" ]
null
null
null
tests/__init__.py
NickKaramoff/double-stream-handler
27d658b17b15529d5dcdeba51bbc1df7e73a2e9c
[ "BSD-3-Clause" ]
null
null
null
tests/__init__.py
NickKaramoff/double-stream-handler
27d658b17b15529d5dcdeba51bbc1df7e73a2e9c
[ "BSD-3-Clause" ]
null
null
null
import logging from io import StringIO from unittest import TestCase, main from unittest.mock import patch class DoubleStreamHandlerTestCase(TestCase): @patch("sys.stderr", new_callable=StringIO) @patch("sys.stdout", new_callable=StringIO) def test(self, mock_stdout, mock_stderr): logger = loggin...
31.133333
80
0.685225
a08c33f20b56414b0833e00a340f48eeeea7d4b2
5,675
py
Python
pypureclient/flashblade/FB_2_3/models/session.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flashblade/FB_2_3/models/session.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flashblade/FB_2_3/models/session.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashBlade REST API A lightweight client for FlashBlade REST API 2.3, developed by Pure Storage, Inc. (http://www.purestorage.com/). OpenAPI spec version: 2.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typ...
34.186747
189
0.557885
e6415c45202afd1d7a9cf8594723a319133e80f4
51,300
py
Python
openaerostruct/geometry/geometry_mesh_transformations.py
RemyCharayron/OpenAeroStruct
df62a0ef78b444f5bed5505664136f4b3ce51c89
[ "Apache-2.0" ]
null
null
null
openaerostruct/geometry/geometry_mesh_transformations.py
RemyCharayron/OpenAeroStruct
df62a0ef78b444f5bed5505664136f4b3ce51c89
[ "Apache-2.0" ]
null
null
null
openaerostruct/geometry/geometry_mesh_transformations.py
RemyCharayron/OpenAeroStruct
df62a0ef78b444f5bed5505664136f4b3ce51c89
[ "Apache-2.0" ]
null
null
null
""" A set of components that manipulate geometry mesh based on high-level design parameters. """ import numpy as np import openmdao.api as om class Taper(om.ExplicitComponent): """ OpenMDAO component that manipulates the mesh by altering the spanwise chord linearly to produce a tapered wing. Note th...
38.028169
190
0.556706
e3b53ba682d8ca586ab871c7b7bffc32cb4b336a
853
py
Python
venv35/bin/rst2latex.py
green10-syntra-ab-python-adv/mastering-ch08
a6b97ac37d24ff65764cae2f68bbb50a08249c84
[ "BSD-2-Clause" ]
null
null
null
venv35/bin/rst2latex.py
green10-syntra-ab-python-adv/mastering-ch08
a6b97ac37d24ff65764cae2f68bbb50a08249c84
[ "BSD-2-Clause" ]
null
null
null
venv35/bin/rst2latex.py
green10-syntra-ab-python-adv/mastering-ch08
a6b97ac37d24ff65764cae2f68bbb50a08249c84
[ "BSD-2-Clause" ]
null
null
null
#!/data/Syntra-Sync/Syntra-AB/python-adv/4-code/mastering-ch08/venv35/bin/python # $Id: rst2latex.py 5905 2009-04-16 12:04:49Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing LaTeX. """ tr...
31.592593
80
0.679953
a17b0df890d1a399ee0b419d190f3243d1f845fd
262
py
Python
data/studio21_generated/interview/1892/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/interview/1892/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/interview/1892/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
# Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def pathSum(self, root: TreeNode, sum: int) -> List[List[int]]:
29.111111
67
0.645038
28820ff2ce263348044aeecf5288b222763686b5
4,201
py
Python
adage/analyze/management/commands/add_ml_model.py
greenelab/old-adage-server
c2178144f2cfa75b88656c84eb62f81c65eba46d
[ "BSD-3-Clause" ]
9
2016-09-19T12:34:11.000Z
2019-02-19T00:17:37.000Z
adage/analyze/management/commands/add_ml_model.py
greenelab/old-adage-server
c2178144f2cfa75b88656c84eb62f81c65eba46d
[ "BSD-3-Clause" ]
347
2016-09-01T19:58:29.000Z
2020-06-06T14:01:47.000Z
adage/analyze/management/commands/add_ml_model.py
greenelab/old-adage-server
c2178144f2cfa75b88656c84eb62f81c65eba46d
[ "BSD-3-Clause" ]
11
2016-09-01T19:29:16.000Z
2020-04-13T19:53:45.000Z
#!/usr/bin/env python """ This management command adds a new machine learning model record whose name is ml_model_name into the database's ml_model table. It should be invoked like this: python manage.py add_ml_model <ml_model_name> <organism_tax_id> \ [--directed_edge] [--g2g_edge_cutoff <cutoff_value>] \ [--de...
41.594059
78
0.625803
ba911cb67016c401dcff1a66e81f8642319dbc86
1,979
py
Python
examples/example.py
ykri021/CarND-Advanced-Lane-Lines
45b517f137b8a9b9b725a14e69f3b2f92557bc7a
[ "MIT" ]
null
null
null
examples/example.py
ykri021/CarND-Advanced-Lane-Lines
45b517f137b8a9b9b725a14e69f3b2f92557bc7a
[ "MIT" ]
null
null
null
examples/example.py
ykri021/CarND-Advanced-Lane-Lines
45b517f137b8a9b9b725a14e69f3b2f92557bc7a
[ "MIT" ]
null
null
null
# coding: utf-8 # ## Advanced Lane Finding Project # # The goals / steps of this project are the following: # # * Compute the camera calibration matrix and distortion coefficients given a set of chessboard images. # * Apply a distortion correction to raw images. # * Use color transforms, gradients, etc., to create ...
31.919355
113
0.704901
d9b980ea49090296a625458201b726662e25dc17
907
py
Python
setup.py
jvivian/rnaseq-lib
688ab84b73b44c2a3b6256ed390f1a54d13bfa8a
[ "MIT" ]
null
null
null
setup.py
jvivian/rnaseq-lib
688ab84b73b44c2a3b6256ed390f1a54d13bfa8a
[ "MIT" ]
null
null
null
setup.py
jvivian/rnaseq-lib
688ab84b73b44c2a3b6256ed390f1a54d13bfa8a
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup(name='rnaseq-lib', version='1.0a27', description='Library of convenience functions related to current research', url='http://github.com/jvivian/rnaseq-lib', author='John Vivian', author_email='jtvivian@gmail.com', license='MIT', ...
30.233333
81
0.46086
19bd4a70e52e55769d33adfc9456a833c797eeb5
1,785
py
Python
TP_ALGO_2/ALGOS.py
PierreLeGuen/ALGO_S5
9067e887d14fe997c6944292a0cff23ceda47b6e
[ "MIT" ]
null
null
null
TP_ALGO_2/ALGOS.py
PierreLeGuen/ALGO_S5
9067e887d14fe997c6944292a0cff23ceda47b6e
[ "MIT" ]
null
null
null
TP_ALGO_2/ALGOS.py
PierreLeGuen/ALGO_S5
9067e887d14fe997c6944292a0cff23ceda47b6e
[ "MIT" ]
null
null
null
#coding=UTF-8 import math #EXO 1 def res_sec_deg(a,b,c): delta=b**2-4*a*c if delta>0: x=(-b-math.sqrt(delta))/2*a y=(-b+math.sqrt(delta))/2*a print("Deux solutions :") print(x,y) elif delta==0: x=-b/(2*a) print("Une solution") print(x) else: ...
21.506024
68
0.545658
7eeb7ce114b1338af1266862eddbfe42b4f31f30
1,929
py
Python
config.py
ZhiShiMao/pity
c9bcb9c3884b006a29af86867acbcec652f722bd
[ "Apache-2.0" ]
null
null
null
config.py
ZhiShiMao/pity
c9bcb9c3884b006a29af86867acbcec652f722bd
[ "Apache-2.0" ]
null
null
null
config.py
ZhiShiMao/pity
c9bcb9c3884b006a29af86867acbcec652f722bd
[ "Apache-2.0" ]
null
null
null
# 基础配置类 import os class Config(object): ROOT = os.path.dirname(os.path.abspath(__file__)) LOG_NAME = os.path.join(ROOT, 'logs', 'pity.log') # JSON_AS_ASCII = False # Flask jsonify编码问题 # MySQL连接信息 MYSQL_HOST = "121.5.2.74" MYSQL_PORT = 3306 MYSQL_USER = "root" MYSQL_PWD = "wuranxu@33"...
23.240964
106
0.617937
ff2af6fcea283879bce5b864c22ac229f3239b18
1,050
py
Python
var/spack/repos/builtin/packages/nlohmann-json-schema-validator/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/nlohmann-json-schema-validator/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/nlohmann-json-schema-validator/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class NlohmannJsonSchemaValidator(CMakePackage): """JSON schema validator for JSON for Modern C+...
38.888889
95
0.735238
1ff940ed383e2b6d005f64ff379d151469133126
1,683
py
Python
TikTokAPI/utils.py
xclnky/TikTokAPI-Python
4cf03a3594da363ccc8c4925b4799258f626546e
[ "MIT" ]
null
null
null
TikTokAPI/utils.py
xclnky/TikTokAPI-Python
4cf03a3594da363ccc8c4925b4799258f626546e
[ "MIT" ]
null
null
null
TikTokAPI/utils.py
xclnky/TikTokAPI-Python
4cf03a3594da363ccc8c4925b4799258f626546e
[ "MIT" ]
null
null
null
import random import string import requests import json def random_key(length): key = '' for i in range(length): key += random.choice(string.ascii_lowercase + string.ascii_uppercase + string.digits) return key def build_get_url(base_url, params, append=False): final_url = base_url if app...
32.365385
132
0.658942
c9e361c6d3982de0b5717ca1c6eff831a0e2d653
11,833
py
Python
document.py
yvesscherrer/stanzatagger
89ce8de48f4775323bab810411442f00729ba73b
[ "Apache-2.0" ]
null
null
null
document.py
yvesscherrer/stanzatagger
89ce8de48f4775323bab810411442f00729ba73b
[ "Apache-2.0" ]
null
null
null
document.py
yvesscherrer/stanzatagger
89ce8de48f4775323bab810411442f00729ba73b
[ "Apache-2.0" ]
1
2022-03-25T10:08:20.000Z
2022-03-25T10:08:20.000Z
# Reimplementation of stanza.models.common.doc and stanza.utils.conll that allows for more flexibility with not-quite-CoNLL-conform datasets import logging import io import random from evaluator import Evaluator, POS_KEY logger = logging.getLogger('stanza') class Document(object): def __init__(self, read_positio...
43.825926
255
0.598749
08b3b19eabd231b6e9a6bda8cf5c2d75fd2f750a
18,258
py
Python
pytorch_tabular/models/mixture_density/config.py
Vickyilango/pytorch_tabular
10dbb1203516a83cb0d8e804806cc70ed8453128
[ "MIT" ]
560
2020-12-31T15:31:56.000Z
2022-03-30T20:29:06.000Z
pytorch_tabular/models/mixture_density/config.py
yu45020/pytorch_tabular
cb29e735efa83c83b0cf98388f63b13a5f8f77f7
[ "MIT" ]
60
2021-02-04T05:54:33.000Z
2022-03-31T07:40:34.000Z
pytorch_tabular/models/mixture_density/config.py
yu45020/pytorch_tabular
cb29e735efa83c83b0cf98388f63b13a5f8f77f7
[ "MIT" ]
63
2021-01-28T16:12:22.000Z
2022-03-31T07:31:41.000Z
# Pytorch Tabular # Author: Manu Joseph <manujoseph@gmail.com> # For license information, see LICENSE.TXT """Mixture Density Head Config""" from dataclasses import MISSING, dataclass, field from typing import List, Optional from pytorch_tabular.models.autoint import AutoIntConfig from pytorch_tabular.models.category_e...
61.063545
273
0.701555
5a37c825c112e266ed404e6348f3b89202fb7ad2
8,445
py
Python
spyder/plugins/shortcuts/plugin.py
sphh/spyder
bbd9b1fb90470f85e599285449d1f18cc2d0e6e6
[ "MIT" ]
null
null
null
spyder/plugins/shortcuts/plugin.py
sphh/spyder
bbd9b1fb90470f85e599285449d1f18cc2d0e6e6
[ "MIT" ]
null
null
null
spyder/plugins/shortcuts/plugin.py
sphh/spyder
bbd9b1fb90470f85e599285449d1f18cc2d0e6e6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2009- Spyder Project Contributors # # Distributed under the terms of the MIT License # (see spyder/__init__.py for details) # --------------------------------------------------------------------...
35.783898
80
0.572528
c6465bea580545c79f7696f1742c8ba4c9abb1b7
8,640
py
Python
daal4py/sklearn/linear_model/_linear.py
owerbat/scikit-learn-intelex
986637668853a00f0047b7a8854ddb9fb3620549
[ "Apache-2.0" ]
null
null
null
daal4py/sklearn/linear_model/_linear.py
owerbat/scikit-learn-intelex
986637668853a00f0047b7a8854ddb9fb3620549
[ "Apache-2.0" ]
null
null
null
daal4py/sklearn/linear_model/_linear.py
owerbat/scikit-learn-intelex
986637668853a00f0047b7a8854ddb9fb3620549
[ "Apache-2.0" ]
null
null
null
#=============================================================================== # Copyright 2014-2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
30.967742
80
0.606944