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
335de3284fcf8e50cf4a4831ddf796b1c4b5499a
5,515
py
Python
nova/console/manager.py
bopopescu/extra-specs-1
6a14d8d7807727023b4d589af47e8a9605f12db1
[ "Apache-2.0" ]
null
null
null
nova/console/manager.py
bopopescu/extra-specs-1
6a14d8d7807727023b4d589af47e8a9605f12db1
[ "Apache-2.0" ]
1
2020-07-24T14:14:13.000Z
2020-07-24T14:14:13.000Z
nova/console/manager.py
bopopescu/extra-specs-1
6a14d8d7807727023b4d589af47e8a9605f12db1
[ "Apache-2.0" ]
1
2020-07-24T10:40:59.000Z
2020-07-24T10:40:59.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 OpenStack, LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
40.551471
78
0.571714
f156cbcb1d789b7fd12417a44f89e3b3c7495b7a
3,155
py
Python
sdk/test/test_api_list_response_of_category.py
DarrahK/yapily-sdk-python
2dcf9a403feafab7dcaf140dabe61794bd4debd3
[ "MIT" ]
null
null
null
sdk/test/test_api_list_response_of_category.py
DarrahK/yapily-sdk-python
2dcf9a403feafab7dcaf140dabe61794bd4debd3
[ "MIT" ]
null
null
null
sdk/test/test_api_list_response_of_category.py
DarrahK/yapily-sdk-python
2dcf9a403feafab7dcaf140dabe61794bd4debd3
[ "MIT" ]
null
null
null
# coding: utf-8 """ Yapily API To access endpoints that require authentication, use your application key and secret created in the Dashboard (https://dashboard.yapily.com) # noqa: E501 The version of the OpenAPI document: 1.157.0 Generated by: https://openapi-generator.tech """ from __future__ imp...
38.012048
158
0.515689
78f919d07c59c040e8f9f15ef775eb9862ec3c88
8,091
py
Python
docs/conf.py
roverdotcom/python-wordpress-xmlrpc
1eeeed95ecc0045afe719bad6a9c1c70c3912e0d
[ "MIT" ]
null
null
null
docs/conf.py
roverdotcom/python-wordpress-xmlrpc
1eeeed95ecc0045afe719bad6a9c1c70c3912e0d
[ "MIT" ]
null
null
null
docs/conf.py
roverdotcom/python-wordpress-xmlrpc
1eeeed95ecc0045afe719bad6a9c1c70c3912e0d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # python-wordpress-xmlrpc documentation build configuration file, created by # sphinx-quickstart on Sun Apr 15 15:18:10 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerat...
32.493976
84
0.717587
f4b5e4e5178d1e78ae41dd3c0acf03f74705a606
742
py
Python
starthinker/task/dynamic_costs/__init__.py
viohman/starthinker
20bd2d7fd1e541eb8a2c9b7159941f667e22e38e
[ "Apache-2.0" ]
1
2019-07-02T18:25:25.000Z
2019-07-02T18:25:25.000Z
starthinker/task/dynamic_costs/__init__.py
viohman/starthinker
20bd2d7fd1e541eb8a2c9b7159941f667e22e38e
[ "Apache-2.0" ]
204
2019-08-29T04:58:17.000Z
2021-07-30T04:27:07.000Z
starthinker/task/dynamic_costs/__init__.py
viohman/starthinker
20bd2d7fd1e541eb8a2c9b7159941f667e22e38e
[ "Apache-2.0" ]
null
null
null
########################################################################### # # Copyright 2018 Google 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 # # https://www.apache.org/...
41.222222
75
0.591644
c26f033abdb5d550ee366f730a76f0db85a55f8b
4,329
py
Python
tests/mocker/device_access.py
lihaiyong827/python-openimu
f1c536ba4182aaeabd87b63c08ebd92f97e8dbb4
[ "Apache-2.0" ]
41
2018-07-20T17:30:33.000Z
2022-02-24T08:17:39.000Z
tests/mocker/device_access.py
lihaiyong827/python-openimu
f1c536ba4182aaeabd87b63c08ebd92f97e8dbb4
[ "Apache-2.0" ]
52
2018-06-25T22:15:14.000Z
2022-03-10T07:30:56.000Z
tests/mocker/device_access.py
lihaiyong827/python-openimu
f1c536ba4182aaeabd87b63c08ebd92f97e8dbb4
[ "Apache-2.0" ]
31
2018-12-19T00:10:08.000Z
2022-03-19T02:14:03.000Z
import os import fcntl import threading import struct import termios import time MOTION_DATA = [] if hasattr(termios, 'TIOCINQ'): TIOCINQ = termios.TIOCINQ else: TIOCINQ = getattr(termios, 'FIONREAD', 0x541B) TIOCM_zero_str = struct.pack('I', 0) class DeviceAccess(object): @property def port(self): ...
30.485915
78
0.59344
9120e1dd76ad4765a51422687fb093cdff2e8fad
11,226
py
Python
Lib/site-packages/django/views/generic/edit.py
ashutoshsuman99/Web-Blog-D19
a01a0ccc40e8823110c01ebe4f43d9351df57295
[ "bzip2-1.0.6" ]
123
2015-01-15T06:56:45.000Z
2022-03-19T22:18:55.000Z
Lib/site-packages/django/views/generic/edit.py
ashutoshsuman99/Web-Blog-D19
a01a0ccc40e8823110c01ebe4f43d9351df57295
[ "bzip2-1.0.6" ]
21
2015-03-25T18:00:33.000Z
2019-08-12T17:11:10.000Z
Lib/site-packages/django/views/generic/edit.py
ashutoshsuman99/Web-Blog-D19
a01a0ccc40e8823110c01ebe4f43d9351df57295
[ "bzip2-1.0.6" ]
72
2015-01-14T16:29:47.000Z
2021-10-09T16:31:47.000Z
import inspect import re import warnings from django.core.exceptions import ImproperlyConfigured from django.forms import models as model_forms from django.http import HttpResponseRedirect from django.utils import six from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import forc...
32.920821
85
0.609923
5974767f4248b37a82e8fabfed862333917f431e
7,140
py
Python
statsmodels/regression/feasible_gls.py
toobaz/statsmodels
5286dd713a809b0630232508bf9ad5104aae1980
[ "BSD-3-Clause" ]
10
2016-05-18T11:46:33.000Z
2018-12-23T04:52:27.000Z
statsmodels/regression/feasible_gls.py
AnaMP/statsmodels
2d4aad9a14619ce0c84d4c7bca9dacd66b2be566
[ "BSD-3-Clause" ]
1
2021-09-11T14:30:32.000Z
2021-09-11T14:30:32.000Z
statsmodels/regression/feasible_gls.py
AnaMP/statsmodels
2d4aad9a14619ce0c84d4c7bca9dacd66b2be566
[ "BSD-3-Clause" ]
3
2015-04-01T08:26:54.000Z
2020-02-14T14:34:10.000Z
# -*- coding: utf-8 -*- """ Created on Tue Dec 20 20:24:20 2011 Author: Josef Perktold License: BSD-3 """ import numpy as np import statsmodels.base.model as base from statsmodels.regression.linear_model import OLS, GLS, WLS, RegressionResults def atleast_2dcols(x): x = np.asarray(x) if x.ndim == 1: ...
33.364486
85
0.661204
96badaaccf09667134973b8e1abdf4648ded39f4
422
py
Python
Scripts/futurize-script.py
SatYu26/Cube-Solver-API
ce6eb5d073bf1b05dbc4fae67e9fea43bc05f05a
[ "MIT" ]
null
null
null
Scripts/futurize-script.py
SatYu26/Cube-Solver-API
ce6eb5d073bf1b05dbc4fae67e9fea43bc05f05a
[ "MIT" ]
null
null
null
Scripts/futurize-script.py
SatYu26/Cube-Solver-API
ce6eb5d073bf1b05dbc4fae67e9fea43bc05f05a
[ "MIT" ]
null
null
null
#!"e:\projects\flutter practice\cube\scripts\python.exe" # EASY-INSTALL-ENTRY-SCRIPT: 'future==0.16.0','console_scripts','futurize' __requires__ = 'future==0.16.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.arg...
32.461538
75
0.675355
021a5ffd08849ef4cf778158f463b7beeba1752b
12,006
py
Python
examples/Ni__eam__born_exp_fs/pareto_optimization_3.5NN/data/Ni__eam__born_exp_fs.py
eragasa/pypospack
21cdecaf3b05c87acc532d992be2c04d85bfbc22
[ "MIT" ]
4
2018-01-18T19:59:56.000Z
2020-08-25T11:56:52.000Z
examples/Ni__eam__born_exp_fs/pareto_optimization_3.5NN/data/Ni__eam__born_exp_fs.py
eragasa/pypospack
21cdecaf3b05c87acc532d992be2c04d85bfbc22
[ "MIT" ]
1
2018-04-22T23:02:13.000Z
2018-04-22T23:02:13.000Z
examples/Ni__eam__born_exp_fs/pareto_optimization_3.5NN/data/Ni__eam__born_exp_fs.py
eragasa/pypospack
21cdecaf3b05c87acc532d992be2c04d85bfbc22
[ "MIT" ]
1
2019-09-14T07:04:42.000Z
2019-09-14T07:04:42.000Z
import os from collections import OrderedDict import pypospack.utils from pypospack.qoi import QoiDatabase #------------------------------------------------------------------------------ # CONFIGURATION SECTION FOR PYPOSMAT PARETO FITTING #------------------------------------------------------------------------------...
38.854369
111
0.589372
2e03d85084324415f604143381edce9e7d85a4d1
454
py
Python
app/workers/search/schemas/indices.py
d3vzer0/reternal-backend
aeeb613c820759212e7aef9150738a66b2882d50
[ "MIT" ]
6
2019-01-01T23:38:12.000Z
2021-07-27T03:43:11.000Z
app/workers/search/schemas/indices.py
d3vzer0/reternal-backend
aeeb613c820759212e7aef9150738a66b2882d50
[ "MIT" ]
1
2020-08-02T00:21:41.000Z
2020-08-02T00:21:41.000Z
app/workers/search/schemas/indices.py
d3vzer0/reternal-backend
aeeb613c820759212e7aef9150738a66b2882d50
[ "MIT" ]
1
2021-07-27T03:43:24.000Z
2021-07-27T03:43:24.000Z
from pydantic import BaseModel, validator, Field from typing import List, Dict from datetime import datetime class IndicesIn(BaseModel): index: str source: str sourcetype: str class IndiceList(BaseModel): indices: List[IndicesIn] integration: str execution_date: datetime @validator('exec...
22.7
59
0.707048
244dc71fe585ee9202764e56d0d991caffb1305b
197
py
Python
Captain-Rank/DAY-10/257A.py
rohansaini886/Peer-Programming-Hub-CP-Winter_Camp
d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c
[ "MIT" ]
2
2021-12-09T18:07:46.000Z
2022-01-26T16:51:18.000Z
Captain-Rank/DAY-10/257A.py
rohansaini886/Peer-Programming-Hub-CP-Winter_Camp
d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c
[ "MIT" ]
null
null
null
Captain-Rank/DAY-10/257A.py
rohansaini886/Peer-Programming-Hub-CP-Winter_Camp
d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c
[ "MIT" ]
null
null
null
n, m, k = map(int, input().split()) for i, a in enumerate(sorted(map(int, input().split()), reverse=True)): if k >= m: print(i) exit() k += a - 1 print(n if k >= m else -1)
24.625
71
0.507614
5437ef693a583a30b13bf7f9f17f9e7614081759
2,039
py
Python
jacket/db/sqlalchemy/migrate_repo/versions/179_extend_002_image_sync.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/db/sqlalchemy/migrate_repo/versions/179_extend_002_image_sync.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/db/sqlalchemy/migrate_repo/versions/179_extend_002_image_sync.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
2
2016-08-10T02:21:49.000Z
2020-07-24T01:57:21.000Z
# Copyright 2012 OpenStack Foundation # # 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 ...
35.155172
78
0.690044
0943f14d637534bb9dae5b7b71f9df3ac4ce010d
1,015
py
Python
py4e_12.5.py
Dadsh/PY4E
70fd5d1b950455d7123b3bfca41fdb7bda386dec
[ "MIT" ]
null
null
null
py4e_12.5.py
Dadsh/PY4E
70fd5d1b950455d7123b3bfca41fdb7bda386dec
[ "MIT" ]
null
null
null
py4e_12.5.py
Dadsh/PY4E
70fd5d1b950455d7123b3bfca41fdb7bda386dec
[ "MIT" ]
null
null
null
# To run this, you can install BeautifulSoup # https://pypi.python.org/pypi/beautifulsoup4 # Or download the file # http://www.py4e.com/code3/bs4.zip # and unzip it in the same directory as this file from urllib.request import urlopen from bs4 import BeautifulSoup import ssl # Ignore SSL certificate errors ctx = ss...
27.432432
75
0.723153
dd3acd758ab43d2624994e92b8c1e8d53edacfb4
1,048
py
Python
invenio_records/alembic/07fb52561c5c_alter_column_from_json_to_jsonb.py
max-moser/invenio-records
bb4448a2c2abf448c3ba647590729cd6bc8478df
[ "MIT" ]
9
2015-07-03T08:06:30.000Z
2022-03-01T14:46:18.000Z
invenio_records/alembic/07fb52561c5c_alter_column_from_json_to_jsonb.py
max-moser/invenio-records
bb4448a2c2abf448c3ba647590729cd6bc8478df
[ "MIT" ]
162
2015-06-25T20:58:57.000Z
2022-03-23T16:20:49.000Z
invenio_records/alembic/07fb52561c5c_alter_column_from_json_to_jsonb.py
max-moser/invenio-records
bb4448a2c2abf448c3ba647590729cd6bc8478df
[ "MIT" ]
60
2015-06-24T12:04:58.000Z
2021-11-25T09:32:15.000Z
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2017-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Alter column from json to jsonb.""" import sqlalchemy as sa from alembic import o...
25.560976
72
0.637405
98116404fc12f400bb973bff030e7b0825434b53
1,997
py
Python
python/query_prep.py
AaronWChen/suggest_recipe
3d86693c0680804b9af475a428e7db6152ab2628
[ "MIT" ]
1
2020-12-08T19:42:45.000Z
2020-12-08T19:42:45.000Z
python/query_prep.py
AaronWChen/suggest_recipe
3d86693c0680804b9af475a428e7db6152ab2628
[ "MIT" ]
7
2020-03-26T22:10:27.000Z
2022-03-12T00:22:11.000Z
python/query_prep.py
AaronWChen/suggest_recipe
3d86693c0680804b9af475a428e7db6152ab2628
[ "MIT" ]
null
null
null
""" This python script takes the JSON and text file generated by input from an Edamam API search for a dish and the cuisine type, opens the JSON and text files, and creates a Pandas dataframe that can be transformed via TFIDF for cosine similarity analysis.""" # Import necessary libraries import json import...
32.209677
80
0.721082
2462854f287c4609ae1b73532bf539be07b0571b
94
py
Python
todoman/__main__.py
tyrylu/todoman
6ea0ccb5b8687bd96a2d0fe02ab33c362c4c4506
[ "ISC" ]
318
2016-03-16T12:03:11.000Z
2022-03-27T22:53:34.000Z
todoman/__main__.py
tyrylu/todoman
6ea0ccb5b8687bd96a2d0fe02ab33c362c4c4506
[ "ISC" ]
325
2016-04-13T00:39:02.000Z
2022-03-14T11:46:24.000Z
todoman/__main__.py
tyrylu/todoman
6ea0ccb5b8687bd96a2d0fe02ab33c362c4c4506
[ "ISC" ]
73
2016-04-09T20:58:19.000Z
2022-03-11T10:11:37.000Z
from todoman.cli import cli if __name__ == "__main__": cli(auto_envvar_prefix="TODOMAN")
18.8
37
0.734043
7e9100822eb97fedd4b682b4fb1a0fc674e8db67
277
py
Python
examples/scripts/nca_parameters.py
gyouhoc/PyBaMM
6852e0e518157e6802ce83a2549562e7d0ed4b9f
[ "BSD-3-Clause" ]
null
null
null
examples/scripts/nca_parameters.py
gyouhoc/PyBaMM
6852e0e518157e6802ce83a2549562e7d0ed4b9f
[ "BSD-3-Clause" ]
null
null
null
examples/scripts/nca_parameters.py
gyouhoc/PyBaMM
6852e0e518157e6802ce83a2549562e7d0ed4b9f
[ "BSD-3-Clause" ]
null
null
null
import pybamm as pb pb.set_logging_level("INFO") model = pb.lithium_ion.DFN() chemistry = pb.parameter_sets.NCA_Kim2011 parameter_values = pb.ParameterValues(chemistry=chemistry) sim = pb.Simulation(model, parameter_values=parameter_values, C_rate=1) sim.solve() sim.plot()
23.083333
71
0.797834
1df03bf66429d53a43bc5359caabae9c6e2a26d1
14,532
py
Python
tensorflow_probability/python/internal/vectorization_util.py
hendriksanta/probability
6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f
[ "Apache-2.0" ]
1
2020-01-16T02:19:34.000Z
2020-01-16T02:19:34.000Z
tensorflow_probability/python/internal/vectorization_util.py
hendriksanta/probability
6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/vectorization_util.py
hendriksanta/probability
6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f
[ "Apache-2.0" ]
1
2020-10-19T11:24:40.000Z
2020-10-19T11:24:40.000Z
# Copyright 2019 The TensorFlow Probability 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...
42.994083
92
0.677058
c27b31137ffcaef53dc7b4998382adee26c42cb8
1,854
py
Python
tools/third_party/pytest/testing/logging/test_fixture.py
shs96c/web-platform-tests
61acad6dd9bb99d32340eb41f5146de64f542359
[ "BSD-3-Clause" ]
1
2021-01-07T18:46:45.000Z
2021-01-07T18:46:45.000Z
tools/third_party/pytest/testing/logging/test_fixture.py
shs96c/web-platform-tests
61acad6dd9bb99d32340eb41f5146de64f542359
[ "BSD-3-Clause" ]
null
null
null
tools/third_party/pytest/testing/logging/test_fixture.py
shs96c/web-platform-tests
61acad6dd9bb99d32340eb41f5146de64f542359
[ "BSD-3-Clause" ]
1
2021-04-06T20:06:58.000Z
2021-04-06T20:06:58.000Z
# -*- coding: utf-8 -*- import logging logger = logging.getLogger(__name__) sublogger = logging.getLogger(__name__ + '.baz') def test_fixture_help(testdir): result = testdir.runpytest('--fixtures') result.stdout.fnmatch_lines(['*caplog*']) def test_change_level(caplog): caplog.set_level(logging.INFO) ...
26.112676
70
0.68069
91eb4598acab6ab448367ed2723cad92b3c437fb
523
py
Python
BitTorrent-5.2.2/windows_installer/win-append-url.py
jpabb7/p2pScrapper
0fd57049606864223eb45f956a58adda1231af88
[ "MIT" ]
4
2016-04-26T03:43:54.000Z
2016-11-17T08:09:04.000Z
BitTorrent-5.2.2/windows_installer/win-append-url.py
jpabb7/p2pScrapper
0fd57049606864223eb45f956a58adda1231af88
[ "MIT" ]
17
2015-01-05T21:06:22.000Z
2015-12-07T20:45:44.000Z
BitTorrent-5.2.2/windows_installer/win-append-url.py
jpabb7/p2pScrapper
0fd57049606864223eb45f956a58adda1231af88
[ "MIT" ]
7
2015-07-28T09:17:17.000Z
2021-11-07T02:29:41.000Z
import sys import os app_name = "BitTorrent" from BitTorrent import version from BitTorrent.NewVersion import Version currentversion = Version.from_str(version) version_str = version if currentversion.is_beta(): version_str = version_str + '-Beta' max_url_len = 2048 default_url = "" filename = "%s-%s.exe" % (app_...
20.92
51
0.709369
5397abf5e6102a2a85cf1da9f01c60037a7550d0
79
py
Python
bot/__main__.py
gurkult/bot
9193e878af7169ec3c6583abff4716ac9ebbb113
[ "MIT" ]
null
null
null
bot/__main__.py
gurkult/bot
9193e878af7169ec3c6583abff4716ac9ebbb113
[ "MIT" ]
14
2021-07-15T19:24:23.000Z
2022-03-29T10:20:35.000Z
bot/__main__.py
gurkult/bot
9193e878af7169ec3c6583abff4716ac9ebbb113
[ "MIT" ]
1
2021-07-13T20:52:50.000Z
2021-07-13T20:52:50.000Z
from .bot import Bot if __name__ == "__main__": bot = Bot() bot.run()
13.166667
26
0.582278
f208a0eed2ed0a4baf21e2d5abe349c40e1eca95
10,149
py
Python
mypython/Lib/site-packages/pandas/tests/series/test_ufunc.py
lilianatang/data-modelling-with-postgresql
4b5d057d23c346cc36695dc0548f11908aeb5431
[ "Apache-2.0" ]
null
null
null
mypython/Lib/site-packages/pandas/tests/series/test_ufunc.py
lilianatang/data-modelling-with-postgresql
4b5d057d23c346cc36695dc0548f11908aeb5431
[ "Apache-2.0" ]
null
null
null
mypython/Lib/site-packages/pandas/tests/series/test_ufunc.py
lilianatang/data-modelling-with-postgresql
4b5d057d23c346cc36695dc0548f11908aeb5431
[ "Apache-2.0" ]
1
2021-04-26T22:41:56.000Z
2021-04-26T22:41:56.000Z
from collections import deque import string import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.arrays import SparseArray UNARY_UFUNCS = [np.positive, np.floor, np.exp] BINARY_UFUNCS = [np.add, np.logaddexp] # dunder op SPARSE = [True, False] SPARSE_IDS = ["spa...
33.27541
89
0.639472
e62b2b290f2041e8afe3198b4ccfbf3143a83054
1,057
py
Python
tests/journal.pkg/firewall_instance.py
pyre/pyre
0f903836f52450bf81216c5dfdfdfebb16090177
[ "BSD-3-Clause" ]
25
2018-04-23T01:45:39.000Z
2021-12-10T06:01:23.000Z
tests/journal.pkg/firewall_instance.py
pyre/pyre
0f903836f52450bf81216c5dfdfdfebb16090177
[ "BSD-3-Clause" ]
53
2018-05-31T04:55:00.000Z
2021-10-07T21:41:32.000Z
tests/journal.pkg/firewall_instance.py
pyre/pyre
0f903836f52450bf81216c5dfdfdfebb16090177
[ "BSD-3-Clause" ]
12
2018-04-23T22:50:40.000Z
2022-02-20T17:27:23.000Z
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis <michael.aivazis@para-sim.com> # (c) 1998-2021 all rights reserved def test(): """ Verify the channel initial state """ # get the channel from journal.Firewall import Firewall as firewall # make a channel channel = f...
22.978261
56
0.652791
b919834ceebe9e390801e50e0092ee90cd37559d
30,304
py
Python
treecat/serving.py
posterior/treecat
665a6ba688c25cd2b536800f2d0f8ce5c45032fa
[ "Apache-2.0" ]
26
2017-07-04T04:26:03.000Z
2022-01-20T03:18:52.000Z
treecat/serving.py
posterior/treecat
665a6ba688c25cd2b536800f2d0f8ce5c45032fa
[ "Apache-2.0" ]
24
2017-07-10T06:51:51.000Z
2017-09-14T05:16:28.000Z
treecat/serving.py
posterior/treecat
665a6ba688c25cd2b536800f2d0f8ce5c45032fa
[ "Apache-2.0" ]
5
2017-07-04T04:26:10.000Z
2020-03-04T08:49:52.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from abc import ABCMeta from abc import abstractmethod import numpy as np from scipy.misc import logsumexp from scipy.stats import entropy from six import add_metaclass from six.moves import ra...
37.691542
79
0.599558
9362dbc426cfe3c6ab288c8519723dc33c90cad2
13,821
py
Python
mindspore/nn/layer/lstm.py
noaeilat14/mindspore
837bd032ef37ba24be61259acd9474bb4e148d76
[ "Apache-2.0" ]
2
2021-04-22T07:00:59.000Z
2021-11-08T02:49:09.000Z
mindspore/nn/layer/lstm.py
noaeilat14/mindspore
837bd032ef37ba24be61259acd9474bb4e148d76
[ "Apache-2.0" ]
1
2020-12-29T06:46:38.000Z
2020-12-29T06:46:38.000Z
mindspore/nn/layer/lstm.py
kungfu-ml/mindspore
3fa5dd4495f4071b701e7ff490b7085b8824aaaa
[ "Apache-2.0" ]
1
2021-05-12T06:30:29.000Z
2021-05-12T06:30:29.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
51.570896
117
0.597858
17e010869d6e5e2ce39220f5bf800a6d35932443
161
py
Python
virtual/bin/django-admin.py
Eccie-K/my-instagram
beec44852af43f6573f6f034d08942964154150b
[ "MIT" ]
null
null
null
virtual/bin/django-admin.py
Eccie-K/my-instagram
beec44852af43f6573f6f034d08942964154150b
[ "MIT" ]
4
2020-06-05T22:41:05.000Z
2021-09-08T01:14:51.000Z
virtual/bin/django-admin.py
Eccie-K/my-instagram
beec44852af43f6573f6f034d08942964154150b
[ "MIT" ]
null
null
null
#!/home/esther/Documents/instagram/virtual/bin/python3 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
26.833333
54
0.795031
36a827d431773f13527eedee869277069e852554
1,636
py
Python
invenio_rdm_records/services/schemas/access.py
kprzerwa/invenio-rdm-records
d5919b5f1b5f453074fcb2b63929a60bfcb240ed
[ "MIT" ]
null
null
null
invenio_rdm_records/services/schemas/access.py
kprzerwa/invenio-rdm-records
d5919b5f1b5f453074fcb2b63929a60bfcb240ed
[ "MIT" ]
null
null
null
invenio_rdm_records/services/schemas/access.py
kprzerwa/invenio-rdm-records
d5919b5f1b5f453074fcb2b63929a60bfcb240ed
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # Copyright (C) 2020 Northwestern University. # # Invenio-RDM-Records is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """RDM record schemas.""" import arrow from marshmallow import ...
30.867925
79
0.692543
4b87a2bed1584da4ec43b7be4ea79ef84cf79dbd
284
py
Python
Practice_QandA/Set_Question.py
amkolhar/PythonBytes
510da8f589aad52d4ee81da0ef612a2b7f515260
[ "Apache-2.0" ]
null
null
null
Practice_QandA/Set_Question.py
amkolhar/PythonBytes
510da8f589aad52d4ee81da0ef612a2b7f515260
[ "Apache-2.0" ]
null
null
null
Practice_QandA/Set_Question.py
amkolhar/PythonBytes
510da8f589aad52d4ee81da0ef612a2b7f515260
[ "Apache-2.0" ]
null
null
null
# Atharv Kolhar # Python Bytes """ Questions: 1. Create a Set of even numbers up to 20. 2. Create another list of number multiple of 3 up to 30 3. Find Intersection, Union, and Difference between the above two sets 4. Declare an Empty set and add the first 4 prime numbers to it. """
28.4
70
0.742958
70b5cc43932e72c51fd546c931a93d62fbdfbc98
1,114
py
Python
samples/properties_user_links_batch_update_test.py
LaudateCorpus1/python-analytics-admin
2ec0a0b648edcfb3b76bf847a4463cbb551e1997
[ "Apache-2.0" ]
10
2020-09-19T18:31:20.000Z
2022-03-07T22:45:53.000Z
samples/properties_user_links_batch_update_test.py
LaudateCorpus1/python-analytics-admin
2ec0a0b648edcfb3b76bf847a4463cbb551e1997
[ "Apache-2.0" ]
63
2020-07-21T12:17:34.000Z
2022-03-07T17:30:51.000Z
samples/properties_user_links_batch_update_test.py
LaudateCorpus1/python-analytics-admin
2ec0a0b648edcfb3b76bf847a4463cbb551e1997
[ "Apache-2.0" ]
6
2020-07-20T18:10:41.000Z
2022-03-24T20:23:44.000Z
# Copyright 2021 Google LLC All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
35.935484
83
0.765709
5c80c33705a2c427e64fde918658dcbec6a90620
8,526
py
Python
djng/forms/widgets.py
shriDeveloper/django-angular
b32a910b0e154e5707a10fe3e58de1542fd4183b
[ "MIT" ]
1
2020-01-09T12:18:59.000Z
2020-01-09T12:18:59.000Z
djng/forms/widgets.py
shriDeveloper/django-angular
b32a910b0e154e5707a10fe3e58de1542fd4183b
[ "MIT" ]
null
null
null
djng/forms/widgets.py
shriDeveloper/django-angular
b32a910b0e154e5707a10fe3e58de1542fd4183b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import mimetypes from django import VERSION as DJANGO_VERSION from django.contrib.staticfiles.storage import staticfiles_storage from django.core import signing from django.forms import widgets from django.forms.utils import flatatt from django.utils.saf...
40.216981
121
0.628313
a7c83f73f0ef3dbbf2e72056e86f2959b953ac8f
306
py
Python
runtests.py
fairfly/django-mysql
5493cb2fb5168ee482214321a310a0ea69aef2bd
[ "BSD-3-Clause" ]
null
null
null
runtests.py
fairfly/django-mysql
5493cb2fb5168ee482214321a310a0ea69aef2bd
[ "BSD-3-Clause" ]
1
2018-06-06T10:10:48.000Z
2018-06-06T10:10:48.000Z
runtests.py
fairfly/django-mysql
5493cb2fb5168ee482214321a310a0ea69aef2bd
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import sys import pytest def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") sys.path.insert(0, "tests") return pytest.main() if __name__ == '__main__': sys.exit(main())
16.105263
63
0.679739
ec0d9ca61efaa68a14dd94e7ce16a9ee1b4d84fa
8,742
py
Python
plaso/dependencies.py
log2timeline/plaso
406e77c4d8cf2edfc2aad82c61d4f910a038b759
[ "Apache-2.0" ]
1,253
2015-01-02T13:58:02.000Z
2022-03-31T08:43:39.000Z
plaso/dependencies.py
log2timeline/plaso
406e77c4d8cf2edfc2aad82c61d4f910a038b759
[ "Apache-2.0" ]
3,388
2015-01-02T11:17:58.000Z
2022-03-30T10:21:45.000Z
plaso/dependencies.py
log2timeline/plaso
406e77c4d8cf2edfc2aad82c61d4f910a038b759
[ "Apache-2.0" ]
376
2015-01-20T07:04:54.000Z
2022-03-04T23:53:00.000Z
# -*- coding: utf-8 -*- """Functionality to check for the availability and version of dependencies. This file is generated by l2tdevtools update-dependencies.py, any dependency related changes should be made in dependencies.ini. """ import re # Dictionary that contains version tuples per module name. # # A version ...
37.844156
79
0.655914
2b3d6bc24283af64f06bad4b3cc40baa2f0a6c51
1,989
py
Python
pdks/Bulk65nm_Mock_PDK/Align_primitives.py
thesourcerer8/ALIGN-public
2e061c719e15f5e4ffafde6b3bfdc1f5dbb45654
[ "BSD-3-Clause" ]
2
2020-12-15T11:16:23.000Z
2021-05-10T08:08:34.000Z
pdks/OSU180_PDK/Align_primitives.py
thesourcerer8/ALIGN-public
2e061c719e15f5e4ffafde6b3bfdc1f5dbb45654
[ "BSD-3-Clause" ]
1
2020-08-26T08:01:53.000Z
2020-08-29T04:24:00.000Z
pdks/Bulk65nm_Mock_PDK/Align_primitives.py
thesourcerer8/ALIGN-public
2e061c719e15f5e4ffafde6b3bfdc1f5dbb45654
[ "BSD-3-Clause" ]
2
2020-08-15T07:09:52.000Z
2020-08-16T10:19:58.000Z
import argparse import pathlib import logging import json from align.primitive import generate_primitive def main( args): logging.basicConfig(level=logging.getLevelName(args.logLevel)) return generate_primitive( args.block_name, args.primitive, args.height, args.Xcells, ...
43.23913
181
0.667169
3a723121f738e243c3cd642f9eb7da09d3150728
2,201
py
Python
tools/run_tests/xds_k8s_test_driver/tests/baseline_test.py
jackywu0101/grpc
d19802d42c0f5bef6c375756bba9a941be9c2a7a
[ "Apache-2.0" ]
2
2021-07-04T05:12:39.000Z
2022-02-09T18:03:33.000Z
tools/run_tests/xds_k8s_test_driver/tests/baseline_test.py
jackywu0101/grpc
d19802d42c0f5bef6c375756bba9a941be9c2a7a
[ "Apache-2.0" ]
11
2019-10-15T23:03:57.000Z
2020-06-14T16:10:12.000Z
tools/run_tests/xds_k8s_test_driver/tests/baseline_test.py
jackywu0101/grpc
d19802d42c0f5bef6c375756bba9a941be9c2a7a
[ "Apache-2.0" ]
7
2019-07-04T14:23:54.000Z
2020-04-27T08:52:51.000Z
# Copyright 2020 gRPC 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 or agreed to in writing...
33.861538
78
0.741935
a563ee1da5d5a0276ca4c5f00908d4d6f31c451d
2,249
py
Python
dl_exporter/config.py
wri/dl_exporter
28a446bc379d05faf16964919fbbd30c8f77a6e7
[ "MIT" ]
null
null
null
dl_exporter/config.py
wri/dl_exporter
28a446bc379d05faf16964919fbbd30c8f77a6e7
[ "MIT" ]
null
null
null
dl_exporter/config.py
wri/dl_exporter
28a446bc379d05faf16964919fbbd30c8f77a6e7
[ "MIT" ]
null
null
null
from __future__ import print_function import os.path import warnings import yaml import dl_exporter.constants as c from copy import deepcopy warnings.filterwarnings("ignore", category=DeprecationWarning) # # DEFALUTS # _DEFAULTS={ 'is_dev': c.IS_DEV, 'noisy': c.NOISY, 'limit': c.LIMIT, 'check_ext': c...
23.427083
74
0.64651
a24fe316007f45a515de0fee1712dce36cd8e57f
1,396
py
Python
obviforum/config_example.py
dcloutman/obviforum
31af0cf6f2e243bff9d920276831415bd5210cf9
[ "MIT" ]
null
null
null
obviforum/config_example.py
dcloutman/obviforum
31af0cf6f2e243bff9d920276831415bd5210cf9
[ "MIT" ]
null
null
null
obviforum/config_example.py
dcloutman/obviforum
31af0cf6f2e243bff9d920276831415bd5210cf9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ ObviForums CONFIGURATION FILE -- Copy this file to obvi_config.py, remove this line, and below, change the values to match your environment. --- Author: David Cloutman License: MIT """ # The I.P. address upon which the Flask application runs. 0.0.0.0 will listen on all public IP addresses. ...
25.851852
119
0.747135
54221b1906c370ccb5957a8c12c9c89c0c46e48e
7,090
py
Python
usaspending_api/references/tests/test_tas_loader.py
g4brielvs/usaspending-api
bae7da2c204937ec1cdf75c052405b13145728d5
[ "CC0-1.0" ]
217
2016-11-03T17:09:53.000Z
2022-03-10T04:17:54.000Z
usaspending_api/references/tests/test_tas_loader.py
g4brielvs/usaspending-api
bae7da2c204937ec1cdf75c052405b13145728d5
[ "CC0-1.0" ]
622
2016-09-02T19:18:23.000Z
2022-03-29T17:11:01.000Z
usaspending_api/references/tests/test_tas_loader.py
g4brielvs/usaspending-api
bae7da2c204937ec1cdf75c052405b13145728d5
[ "CC0-1.0" ]
93
2016-09-07T20:28:57.000Z
2022-02-25T00:25:27.000Z
import pytest from django.conf import settings from django.core.management import call_command from model_mommy import mommy from usaspending_api.accounts.models import FederalAccount, TreasuryAppropriationAccount from usaspending_api.references.account_helpers import ( insert_federal_accounts, link_treasury_a...
40.982659
120
0.741608
25fa6521fd2ad0f824c55e46dc65b17a6dbf6f4b
130
py
Python
utilities/autoware_launcher/src/autoware_launcher/gui/simulation/__init__.py
alanjclark/autoware.ai
ba97edbbffb6f22e78912bf96400a59ef6a13daf
[ "Apache-2.0" ]
20
2019-05-21T06:14:17.000Z
2021-11-03T04:36:09.000Z
ros/src/util/packages/autoware_launcher/src/autoware_launcher/gui/simulation/__init__.py
anhnv3991/autoware
d5b2ed9dc309193c8a2a7c77a2b6c88104c28328
[ "Apache-2.0" ]
40
2019-06-24T16:56:15.000Z
2022-02-28T13:41:58.000Z
ros/src/util/packages/autoware_launcher/src/autoware_launcher/gui/simulation/__init__.py
anhnv3991/autoware
d5b2ed9dc309193c8a2a7c77a2b6c88104c28328
[ "Apache-2.0" ]
31
2020-05-29T07:51:58.000Z
2022-03-26T05:46:33.000Z
from .rosbag import AwRosbagSimulatorWidget from .lgsvl import AwLgsvlSimulatorWidget from .gazebo import AwGazeboSimulatorWidget
43.333333
43
0.884615
4eba40797ce0ec471533336d09dbbdb2e997f235
720
py
Python
day12.py
jlucangelio/adventofcode-2017
339cd4488dd6b398a664845199e19ba38f173afa
[ "MIT" ]
null
null
null
day12.py
jlucangelio/adventofcode-2017
339cd4488dd6b398a664845199e19ba38f173afa
[ "MIT" ]
null
null
null
day12.py
jlucangelio/adventofcode-2017
339cd4488dd6b398a664845199e19ba38f173afa
[ "MIT" ]
null
null
null
with open("day12.input") as f: pipes = f.readlines() programs = {} for pipe in pipes: # 1999 <-> 964, 1568 program, pipes_to = pipe.split(" <-> ") pipes_to = [int(tok) for tok in pipes_to.split(", ")] programs[int(program)] = pipes_to print len(programs) reached = [0] visited = set() groups = [] ...
20.571429
57
0.529167
ca68ac123c683400af4482ce59a6ddce11da96f6
320
py
Python
wiki/urls.py
MariomcgeeArt/makewiki
69226910b6c136ecd3277faa4095384336fef406
[ "MIT" ]
null
null
null
wiki/urls.py
MariomcgeeArt/makewiki
69226910b6c136ecd3277faa4095384336fef406
[ "MIT" ]
6
2020-06-06T01:51:57.000Z
2022-02-10T11:26:02.000Z
wiki/urls.py
MariomcgeeArt/makewiki
69226910b6c136ecd3277faa4095384336fef406
[ "MIT" ]
null
null
null
from django.urls import path from wiki.views import PageListView, PageDetailView, PageCreateView urlpatterns = [ path('', PageListView.as_view(), name='wiki-list-page'), path('create/', PageCreateView.as_view(), name='create'), path('<str:slug>/', PageDetailView.as_view(), name='wiki-details-page'), ]
29.090909
76
0.703125
023dac208e0147957617093b93e5c19191dd459f
7,891
py
Python
docs/conf.py
jmwai/django-gae-flex
0ec96c786263de8266e598420f4b028def1e56d2
[ "MIT" ]
null
null
null
docs/conf.py
jmwai/django-gae-flex
0ec96c786263de8266e598420f4b028def1e56d2
[ "MIT" ]
null
null
null
docs/conf.py
jmwai/django-gae-flex
0ec96c786263de8266e598420f4b028def1e56d2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # django-gae documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values hav...
31.818548
92
0.705614
3b8badaede81de8f0db1dae7bf0cf9889f50f158
665
py
Python
cacheobj/backend/memcache.py
youknowone/cacheobj
566fa71e5194a29879d880c37bf21b6fa83b1466
[ "BSD-2-Clause-FreeBSD" ]
1
2016-08-01T17:50:11.000Z
2016-08-01T17:50:11.000Z
cacheobj/backend/memcache.py
youknowone/cacheobj
566fa71e5194a29879d880c37bf21b6fa83b1466
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
cacheobj/backend/memcache.py
youknowone/cacheobj
566fa71e5194a29879d880c37bf21b6fa83b1466
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
from __future__ import absolute_import import memcache from . import BaseBackend local_pool = ["127.0.0.1:11211"] class MemcacheBackend(BaseBackend): def __init__(self, pool=local_pool): self.client = memcache.Client(pool) def set(self, key, value, expiration=0, commit=True): if expiration ...
24.62963
57
0.645113
780168cea8a90aeacf3b14569d74b7c24fa750e5
6,778
py
Python
LCNapp/admin/admin.py
kdmundale/LancasterCityNutrition
1aa4df382f84ed7d1359c0ce757abfab8908ec7e
[ "MIT" ]
1
2020-11-25T01:07:32.000Z
2020-11-25T01:07:32.000Z
LCNapp/admin/admin.py
kdmundale/LancasterCityNutrition
1aa4df382f84ed7d1359c0ce757abfab8908ec7e
[ "MIT" ]
null
null
null
LCNapp/admin/admin.py
kdmundale/LancasterCityNutrition
1aa4df382f84ed7d1359c0ce757abfab8908ec7e
[ "MIT" ]
null
null
null
from flask import Flask, render_template, g, redirect, url_for, Blueprint, request, session, abort import datetime from flask import flash from LCNapp import db from LCNapp.auth import login_required, admin_required from LCNapp.forms import AddItem, MakeUnavail, MakeAvail bp = Blueprint("admin", __name__) def getDa...
30.949772
142
0.575391
88537b0b942094dfc63fc686cc0efba75bb566fc
52,683
py
Python
pytorch-frontend/torch/nn/utils/prune.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
40
2021-06-01T07:37:59.000Z
2022-03-25T01:42:09.000Z
pytorch-frontend/torch/nn/utils/prune.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
14
2021-06-01T11:52:46.000Z
2022-03-25T02:13:08.000Z
pytorch-frontend/torch/nn/utils/prune.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
7
2021-07-20T19:34:26.000Z
2022-03-13T21:07:36.000Z
r""" Pruning methods """ from abc import abstractmethod import numbers import torch # For Python 2 and 3 support try: from abc import ABC from collections.abc import Iterable except ImportError: from abc import ABCMeta ABC = ABCMeta('ABC', (), {}) from collections import Iterable class BasePruningM...
40.587827
112
0.617865
be5f815e235ccf2730b55007161568d79814feb4
1,076
py
Python
Two-phases/Clustering/matrix_json.py
IngenieriaUP/food-supply-nanostores
b48b8b5c925575e4b4062e53c83968f1c9f21537
[ "Apache-2.0" ]
3
2019-10-24T04:17:51.000Z
2021-11-08T17:46:04.000Z
Two-phases/Clustering/matrix_json.py
IngenieriaUP/food-supply-nanostores
b48b8b5c925575e4b4062e53c83968f1c9f21537
[ "Apache-2.0" ]
null
null
null
Two-phases/Clustering/matrix_json.py
IngenieriaUP/food-supply-nanostores
b48b8b5c925575e4b4062e53c83968f1c9f21537
[ "Apache-2.0" ]
2
2019-10-30T20:14:08.000Z
2020-02-05T13:30:34.000Z
import json import numpy as np import pandas as pd points = pd.read_csv( "Optimization/cluster_4.csv")[["longitude", "latitude"]].values.tolist() blocks = [] for i in range(0, 9): with open("Optimization/clust_4/osr_matrix_{}.json".format(i), 'r') as f: data = json.load(f) try: duratione ...
25.619048
90
0.695167
d91d876036ba793031967dbfdaa074d9249068b5
1,167
py
Python
tests/unit/test_unit_firewall_policy.py
joshuaguite/cloudpassage-halo-python-sdk
ab8775377c9e99ed89d335ee44a92553fce49eb7
[ "BSD-3-Clause" ]
8
2016-10-24T12:37:32.000Z
2019-06-01T10:00:18.000Z
tests/unit/test_unit_firewall_policy.py
joshuaguite/cloudpassage-halo-python-sdk
ab8775377c9e99ed89d335ee44a92553fce49eb7
[ "BSD-3-Clause" ]
109
2016-08-09T04:51:48.000Z
2020-02-11T02:33:35.000Z
tests/unit/test_unit_firewall_policy.py
joshuaguite/cloudpassage-halo-python-sdk
ab8775377c9e99ed89d335ee44a92553fce49eb7
[ "BSD-3-Clause" ]
14
2016-01-23T00:10:30.000Z
2021-07-07T21:13:56.000Z
import cloudpassage import os policy_file_name = "firewall.json" config_file_name = "portal.yaml.local" tests_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../")) config_file = os.path.join(tests_dir, "configs/", config_file_name) policy_file = os.path.join(tests_dir, 'policies/', policy_file_name) s...
27.785714
75
0.772922
2184be046c9e1dc7bb23ad7053306150f08d6933
1,572
py
Python
Main.py
aarbel17/Python-Arduino
fbcd1032d0172e196f6a4cdcd5215f29d932a8a7
[ "MIT" ]
null
null
null
Main.py
aarbel17/Python-Arduino
fbcd1032d0172e196f6a4cdcd5215f29d932a8a7
[ "MIT" ]
null
null
null
Main.py
aarbel17/Python-Arduino
fbcd1032d0172e196f6a4cdcd5215f29d932a8a7
[ "MIT" ]
null
null
null
#Alejandro Arbelaez Ramirez def guardar_datos(datos): archivo = open("Datos.csv", "a") archivo.write(str(datos)) archivo.write("\n") archivo.close() def obtener_fecha(): import datetime fec=datetime.datetime.now() d=fec.day m=fec.month y=fec.year h=fec.hour mi=...
21.833333
53
0.498728
2751208c5aed08569b4db2959936fcf8f150ccd4
1,984
py
Python
databricks_sync/sdk/service/scim.py
databrickslabs/databricks-sync
24bece3390df5f07ca3c5556da384c4b4087e57a
[ "Apache-2.0" ]
20
2020-11-13T22:19:02.000Z
2022-01-21T22:17:31.000Z
databricks_sync/sdk/service/scim.py
databrickslabs/databricks-sync
24bece3390df5f07ca3c5556da384c4b4087e57a
[ "Apache-2.0" ]
54
2020-11-17T19:50:59.000Z
2022-03-29T21:31:34.000Z
databricks_sync/sdk/service/scim.py
databrickslabs/databricks-sync
24bece3390df5f07ca3c5556da384c4b4087e57a
[ "Apache-2.0" ]
6
2020-12-03T18:03:22.000Z
2022-02-19T20:21:26.000Z
import functools from databricks_sync import log class ScimService(object): def __init__(self, client): self.client = client def me(self, headers=None): _data = {} return self.client.perform_query('GET', f"/preview/scim/v2/Me", data=_data, hea...
39.68
104
0.578629
522369f37fc0c40a3df1b402d03fb7713da95968
408
py
Python
2189.py
DavidsonGuedes/URI-Solved-Problems
d87e1498be1d63a1751b200382b36c6bd099b5b1
[ "Apache-2.0" ]
null
null
null
2189.py
DavidsonGuedes/URI-Solved-Problems
d87e1498be1d63a1751b200382b36c6bd099b5b1
[ "Apache-2.0" ]
1
2019-10-10T17:12:09.000Z
2019-10-10T17:12:09.000Z
2189.py
DavidsonGuedes/URI-Solved-Problems
d87e1498be1d63a1751b200382b36c6bd099b5b1
[ "Apache-2.0" ]
2
2018-06-07T13:50:50.000Z
2019-10-10T16:58:02.000Z
#coding:utf-8 cont = 0 while True: N = int(input()) if N != 0: seq = input().split() for i in range(len(seq)): if int(seq[i]) == int(i+1): cont += 1 print("Teste {}\n{}\n".f...
25.5
77
0.296569
cb27a5f6561c312dde0cdeae34c4c40b4ed06b7a
1,416
py
Python
calandarUpdater/actions.py
MathisBurger/timetable-updater
aa6c3180f4ae858cb2c63ccad7855f5f670c4114
[ "MIT" ]
null
null
null
calandarUpdater/actions.py
MathisBurger/timetable-updater
aa6c3180f4ae858cb2c63ccad7855f5f670c4114
[ "MIT" ]
null
null
null
calandarUpdater/actions.py
MathisBurger/timetable-updater
aa6c3180f4ae858cb2c63ccad7855f5f670c4114
[ "MIT" ]
null
null
null
from datetime import datetime from datetime import date from datetime import timedelta import os from calandarUpdater.initialize import InitializeCalendar class CalendarActions: def __init__(self): self.service = InitializeCalendar().start() # This method fetches all events that happen at the #...
30.782609
62
0.603814
584a07fb95743f84a520274f8cf8dd8f8c4ac90c
1,129
py
Python
lib/surface/container/aws/node_pools/__init__.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/container/aws/node_pools/__init__.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/container/aws/node_pools/__init__.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
34.212121
74
0.771479
ea27134154b8da503a5aa94591f7d15df0097577
3,314
py
Python
tragec/tasks/task_valueprediction.py
jgoodson/TraGeC
3370e29ba0639745055cbee726a40181a4dd61df
[ "BSD-3-Clause" ]
1
2022-02-28T17:58:37.000Z
2022-02-28T17:58:37.000Z
tragec/tasks/task_valueprediction.py
jgoodson/TraGeC
3370e29ba0639745055cbee726a40181a4dd61df
[ "BSD-3-Clause" ]
1
2022-01-04T23:21:43.000Z
2022-01-04T23:21:43.000Z
tragec/tasks/task_valueprediction.py
jgoodson/TraGeC
3370e29ba0639745055cbee726a40181a4dd61df
[ "BSD-3-Clause" ]
null
null
null
import torch from tragec.registry import registry from tragec.models.modeling import BioModel from tragec.tasks.tasks import SimpleMLP, BioDataModule from tragec.datasets import ProteinFluorescenceDataset, ProteinStabilityDataset class ValuePredictionHead(torch.nn.Module): # From songlab-cal TAPE: https://github...
33.14
91
0.662342
462450e7058cca305fe6d1eb4a9ed4da21d75e07
82,724
py
Python
statsmodels/tsa/stattools.py
madhushree14/statsmodels
04f00006a7aeb1c93d6894caa420698400da6c33
[ "BSD-3-Clause" ]
null
null
null
statsmodels/tsa/stattools.py
madhushree14/statsmodels
04f00006a7aeb1c93d6894caa420698400da6c33
[ "BSD-3-Clause" ]
null
null
null
statsmodels/tsa/stattools.py
madhushree14/statsmodels
04f00006a7aeb1c93d6894caa420698400da6c33
[ "BSD-3-Clause" ]
null
null
null
""" Statistical tools for time series analysis """ from statsmodels.compat.numpy import lstsq from statsmodels.compat.pandas import deprecate_kwarg from statsmodels.compat.python import lrange, lzip from statsmodels.compat.scipy import _next_regular import warnings import numpy as np from numpy.linalg import LinAlgEr...
34.670578
84
0.582576
72b0006a6cd16e8b21d5629194d054718f912255
564
py
Python
test/integration/test_pch.py
thomasrockhu/bfg9000
1cd1226eab9bed2fc2ec6acccf7864fdcf2ed31a
[ "BSD-3-Clause" ]
72
2015-06-23T02:35:13.000Z
2021-12-08T01:47:40.000Z
test/integration/test_pch.py
thomasrockhu/bfg9000
1cd1226eab9bed2fc2ec6acccf7864fdcf2ed31a
[ "BSD-3-Clause" ]
139
2015-03-01T18:48:17.000Z
2021-06-18T15:45:14.000Z
test/integration/test_pch.py
thomasrockhu/bfg9000
1cd1226eab9bed2fc2ec6acccf7864fdcf2ed31a
[ "BSD-3-Clause" ]
19
2015-12-23T21:24:33.000Z
2022-01-06T04:04:41.000Z
from . import * class TestPch(IntegrationTest): def __init__(self, *args, **kwargs): super().__init__('pch', *args, **kwargs) def test_build(self): self.build(executable('program')) self.assertOutput([executable('program')], 'hello from pch!\n') class TestPchNoSource(IntegrationTest...
28.2
71
0.641844
694dcaa11f68747d7a0a90b740ff6d0f7db538ad
6,947
py
Python
pybaseball/playerid_lookup.py
reddigari/pybaseball
2d878cf3505ce0a5e657694ae967d6275dc3c211
[ "MIT" ]
650
2017-06-29T20:05:19.000Z
2022-03-31T03:27:25.000Z
pybaseball/playerid_lookup.py
reddigari/pybaseball
2d878cf3505ce0a5e657694ae967d6275dc3c211
[ "MIT" ]
216
2017-10-21T05:05:08.000Z
2022-03-31T04:04:53.000Z
pybaseball/playerid_lookup.py
reddigari/pybaseball
2d878cf3505ce0a5e657694ae967d6275dc3c211
[ "MIT" ]
214
2017-07-18T21:40:01.000Z
2022-03-29T03:19:55.000Z
from difflib import get_close_matches import io import os from typing import List, Tuple import pandas as pd import requests from . import cache url = "https://raw.githubusercontent.com/chadwickbureau/register/master/data/people.csv" _client = None def get_register_file(): return os.path.join(cache.config.ca...
34.221675
115
0.656542
781ed9ec96a2d011f98a99a22b4d084841643c47
1,904
py
Python
oemof_examples/oemof.solph/v0.4.x/installation_test/oemof_test_installation.py
ekatef/oemof-examples
f16511d20008c30889a6e75a788a3a1a0bc632c2
[ "MIT" ]
null
null
null
oemof_examples/oemof.solph/v0.4.x/installation_test/oemof_test_installation.py
ekatef/oemof-examples
f16511d20008c30889a6e75a788a3a1a0bc632c2
[ "MIT" ]
null
null
null
oemof_examples/oemof.solph/v0.4.x/installation_test/oemof_test_installation.py
ekatef/oemof-examples
f16511d20008c30889a6e75a788a3a1a0bc632c2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ General description ------------------- This module can be used to check the installation. This is not an illustrated example. Installation requirements ------------------------- This example requires the version v0.3.x of oemof. Install by: pip install 'oemof.solph>=0.4,<0.5' """ _...
26.816901
76
0.573529
f40d667b4fc1dc105951f9e2cc586e96aa76518e
922
py
Python
wd_extractor/Tokenizer.py
DuaneNielsen/wd_extractor
128a189bacd0cd2d7f1fa598202b9c4e55f48e2f
[ "CC-BY-3.0" ]
null
null
null
wd_extractor/Tokenizer.py
DuaneNielsen/wd_extractor
128a189bacd0cd2d7f1fa598202b9c4e55f48e2f
[ "CC-BY-3.0" ]
null
null
null
wd_extractor/Tokenizer.py
DuaneNielsen/wd_extractor
128a189bacd0cd2d7f1fa598202b9c4e55f48e2f
[ "CC-BY-3.0" ]
null
null
null
from pycorenlp import StanfordCoreNLP from .Token import Token class Tokenizer(): def __init__(self): self.nlp = StanfordCoreNLP('http://localhost:9000') # if the token is $100.0 or some number # then replace it with NUMBER def tokenGetWord(self, token): if token['ner'] in set(['MON...
28.8125
62
0.574837
55f702f4105c63f8e5ca7bfbed4c037379a0024c
1,533
py
Python
src/python/pants/core/register.py
jriddy/pants
bd81ccaa96b343983d9bd62c7a514390a37e0cb4
[ "Apache-2.0" ]
null
null
null
src/python/pants/core/register.py
jriddy/pants
bd81ccaa96b343983d9bd62c7a514390a37e0cb4
[ "Apache-2.0" ]
null
null
null
src/python/pants/core/register.py
jriddy/pants
bd81ccaa96b343983d9bd62c7a514390a37e0cb4
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). """Core rules for Pants to operate correctly. These are always activated and cannot be disabled. """ from pants.core.goals import fmt, lint, package, repl, run, tailor, test, typecheck f...
27.375
98
0.664057
c3ad3c87ee483b57bf6b1d076906fc0326be5358
3,057
py
Python
barcode/upc.py
timgates42/python-barcode
5fc5608ad78d72f12bb8310124211030ba1af368
[ "MIT" ]
null
null
null
barcode/upc.py
timgates42/python-barcode
5fc5608ad78d72f12bb8310124211030ba1af368
[ "MIT" ]
null
null
null
barcode/upc.py
timgates42/python-barcode
5fc5608ad78d72f12bb8310124211030ba1af368
[ "MIT" ]
null
null
null
"""Module: barcode.upc :Provided barcodes: UPC-A """ __docformat__ = "restructuredtext en" from functools import reduce from barcode.base import Barcode from barcode.charsets import upc as _upc from barcode.errors import IllegalCharacterError, NumberOfDigitsError class UniversalProductCodeA(Barcode): """Univer...
26.582609
80
0.570494
2de68a15093a84e6afcd56f2a42920cad2ccf9b2
15,128
py
Python
tests/fixtures/models.py
jeremyfix/torchinfo
71e89b65215065a3edae8c008994c831ceddbe4c
[ "MIT" ]
null
null
null
tests/fixtures/models.py
jeremyfix/torchinfo
71e89b65215065a3edae8c008994c831ceddbe4c
[ "MIT" ]
null
null
null
tests/fixtures/models.py
jeremyfix/torchinfo
71e89b65215065a3edae8c008994c831ceddbe4c
[ "MIT" ]
null
null
null
""" fixtures/models.py """ # pylint: disable=too-few-public-methods from __future__ import annotations import math from collections import namedtuple from typing import Any, cast import torch from torch import nn from torch.nn import functional as F from torch.nn.utils.rnn import pack_padded_sequence class Identity...
31.063655
117
0.591684
31be11d653836732f193e0611cc4315b9a5fdbbf
10,193
py
Python
davarocr/tools/test.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
387
2021-01-02T07:50:15.000Z
2022-03-31T04:30:03.000Z
davarocr/tools/test.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
70
2021-05-04T18:28:18.000Z
2022-03-31T14:14:52.000Z
davarocr/tools/test.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
83
2021-01-05T08:28:26.000Z
2022-03-31T07:14:03.000Z
""" ################################################################################################## # Copyright Info : Copyright (c) Davar Lab @ Hikvision Research Institute. All rights reserved. # Filename : test.py # Abstract : # Current Version: 1.0.0 # Date : 2020-05-31 #######...
38.90458
98
0.619347
410c3397ada7cc9a7386dfcfd264c9e49663e834
1,206
py
Python
basemaps/routes/api/v1/landsat_router.py
Skydipper/Basemaps
8d1489919ff363beb3bcd290c7f709c80b548c91
[ "MIT" ]
null
null
null
basemaps/routes/api/v1/landsat_router.py
Skydipper/Basemaps
8d1489919ff363beb3bcd290c7f709c80b548c91
[ "MIT" ]
1
2019-12-20T12:36:08.000Z
2019-12-20T14:33:43.000Z
basemaps/routes/api/v1/landsat_router.py
Skydipper/Basemaps
8d1489919ff363beb3bcd290c7f709c80b548c91
[ "MIT" ]
null
null
null
"""API ROUTER""" import logging from flask import Blueprint, redirect from basemaps.errors import LandsatTilesError from basemaps.middleware import exist_mapid, exist_tile from basemaps.routes.api import error from basemaps.services.landsat_tiles_v1 import LandsatTiles from basemaps.validators import validate_landsat_y...
35.470588
95
0.725539
2619d590237df58a2f06a2a937242b13c555ecb0
10,555
py
Python
mykonos/keywords/touch.py
monicadanesa/mykonos
06370a4349ecaba3c2e05561da622b7174435495
[ "MIT" ]
17
2019-06-10T07:52:17.000Z
2019-07-20T15:57:44.000Z
mykonos/keywords/touch.py
monicadanesa/robotframework-mykonos
06370a4349ecaba3c2e05561da622b7174435495
[ "MIT" ]
11
2019-07-23T10:05:46.000Z
2020-09-13T17:48:26.000Z
mykonos/keywords/touch.py
monicadanesa/robotframework-mykonos
06370a4349ecaba3c2e05561da622b7174435495
[ "MIT" ]
4
2019-11-14T00:09:29.000Z
2021-05-18T10:37:21.000Z
from mykonos.core.core import Core from mykonos.keywords.management_device import ManagementDevice from mykonos.keywords.decorators import Parallel class Touch(Core): def __init__(self): self.device_mobile = self.device() self.management_device = ManagementDevice() def __get_device_global(self...
42.051793
105
0.577641
4cba86fa2c8bbfe5ef93d0f8b4385aa1d6067f2a
2,492
py
Python
utils/aa_client.py
peppelinux/Django-Identity
099255f21ec8adaabaa37b3cc5f73cff858e7fbd
[ "Apache-2.0" ]
11
2018-10-23T14:18:01.000Z
2021-05-12T20:15:49.000Z
utils/aa_client.py
peppelinux/Django-Identity
099255f21ec8adaabaa37b3cc5f73cff858e7fbd
[ "Apache-2.0" ]
null
null
null
utils/aa_client.py
peppelinux/Django-Identity
099255f21ec8adaabaa37b3cc5f73cff858e7fbd
[ "Apache-2.0" ]
4
2019-01-17T14:53:50.000Z
2021-02-11T15:08:56.000Z
import base64 import requests import saml2 from saml2 import saml, BINDING_HTTP_POST from django.test.client import RequestFactory from djangosaml2.conf import get_config from djangosaml2.overrides import Saml2Client from djangosaml2.utils import available_idps # SP init ######### conf = get_config(None) client = S...
31.544304
99
0.667335
d6b541bdf5441985789f95a27335578d49748d7d
26,505
py
Python
tools/js_optimizer.py
plasma-umass/emscripten
0fad42e37cec33e7cb991c48e5f556f7112317d2
[ "MIT" ]
6
2019-06-29T07:45:50.000Z
2021-07-10T20:19:18.000Z
tools/js_optimizer.py
plasma-umass/emscripten
0fad42e37cec33e7cb991c48e5f556f7112317d2
[ "MIT" ]
null
null
null
tools/js_optimizer.py
plasma-umass/emscripten
0fad42e37cec33e7cb991c48e5f556f7112317d2
[ "MIT" ]
4
2019-08-12T16:08:47.000Z
2022-01-17T00:08:59.000Z
from toolchain_profiler import ToolchainProfiler if __name__ == '__main__': ToolchainProfiler.record_process_start() import os, sys, subprocess, multiprocessing, re, string, json, shutil, logging import shared configuration = shared.configuration temp_files = configuration.get_temp_files() __rootpath__ = os.path....
45.698276
344
0.661045
722943ecc577b2b084af678c406bcbe0e806c0b0
4,045
py
Python
src/script.py
aug2uag/BlueImage
92ffa7e266bc422317c1a36c0c24c4e32f2dd007
[ "MIT" ]
1
2015-08-26T11:15:00.000Z
2015-08-26T11:15:00.000Z
src/script.py
aug2uag/BlueImage
92ffa7e266bc422317c1a36c0c24c4e32f2dd007
[ "MIT" ]
null
null
null
src/script.py
aug2uag/BlueImage
92ffa7e266bc422317c1a36c0c24c4e32f2dd007
[ "MIT" ]
null
null
null
#! /usr/bin/python # coding: utf-8 import os import io import sys import json import time import pprint import argparse pp = pprint.PrettyPrinter(indent=4) if not os.path.isfile('./config.json'): parser = argparse.ArgumentParser(description='IBM Bluemix Container \ Management Instrument for Prototyping and Deploym...
27.896552
87
0.686032
b58ccb15b131cb80cdbf47df6488fd9dcb621625
1,803
py
Python
hwtLib/peripheral/uart/tx_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
null
null
null
hwtLib/peripheral/uart/tx_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
null
null
null
hwtLib/peripheral/uart/tx_test.py
optical-o/hwtLib
edad621f5ad4cdbea20a5751ff4468979afe2f77
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from hwt.simulator.simTestCase import SingleUnitSimTestCase from hwt.simulator.utils import valToInt from hwtLib.peripheral.uart.tx import UartTx from hwtSimApi.constants import CLK_PERIOD class UartTxTC(SingleUnitSimTestCase): @classmethod def getUnit(cls): ...
26.130435
59
0.550194
d074ba45189bdf9f7ab83fd5d66ee21d064c6bc9
1,588
py
Python
tasks.py
korcsmarosgroup/SalmoNet2
9022a6f8b7cd9d518d67f49461c45b324ee07a4e
[ "MIT" ]
1
2019-05-08T08:10:34.000Z
2019-05-08T08:10:34.000Z
tasks.py
korcsmarosgroup/SalmoNet2
9022a6f8b7cd9d518d67f49461c45b324ee07a4e
[ "MIT" ]
1
2021-09-29T17:17:07.000Z
2021-09-29T17:17:07.000Z
tasks.py
korcsmarosgroup/SalmoNet2
9022a6f8b7cd9d518d67f49461c45b324ee07a4e
[ "MIT" ]
4
2019-04-30T12:33:16.000Z
2021-03-07T19:29:41.000Z
#!/usr/bin/env python3 from invoke import task from invoke import Collection import template.tasks import scripts.tasks import SalmoNet.tasks import os ROOT_PATH = os.path.dirname(os.path.realpath(__file__)) dist_path = "dist" git_url = "git@github.com:TGAC/SalmoNet.git" main_branch = "master" deploy_branch = "gh-page...
26.032787
59
0.693955
d163f2edfb4dc2a000877e05606a428de8bd4f84
1,279
py
Python
openeo_driver/filter_properties.py
Bart92/openeo-python-driver
3aa7c1629b609841a695b9fb66775d6b24bbd9f6
[ "Apache-2.0" ]
null
null
null
openeo_driver/filter_properties.py
Bart92/openeo-python-driver
3aa7c1629b609841a695b9fb66775d6b24bbd9f6
[ "Apache-2.0" ]
null
null
null
openeo_driver/filter_properties.py
Bart92/openeo-python-driver
3aa7c1629b609841a695b9fb66775d6b24bbd9f6
[ "Apache-2.0" ]
null
null
null
from typing import Union from openeo.internal.process_graph_visitor import ProcessGraphVisitor def extract_literal_match(condition) -> (str, object): """ Turns a condition as defined by the load_collection process into a (key, value) pair; therefore, conditions are currently limited to exact matches ("eq...
37.617647
115
0.670055
25b1e05e28aa476205c3eb5c37b9444d0f29081b
1,008
py
Python
ttsx/shopping/models.py
deqth/fiveGo
b8af1aa83371383ee523c3c3a27773d700df3b0b
[ "Apache-2.0" ]
null
null
null
ttsx/shopping/models.py
deqth/fiveGo
b8af1aa83371383ee523c3c3a27773d700df3b0b
[ "Apache-2.0" ]
null
null
null
ttsx/shopping/models.py
deqth/fiveGo
b8af1aa83371383ee523c3c3a27773d700df3b0b
[ "Apache-2.0" ]
null
null
null
#coding=utf-8 from django.db import models class GoodsInfo(models.Model): title = models.CharField(max_length=20,verbose_name='商品信息') #商品名字 type = models.CharField(max_length=20,verbose_name='商品类型') #商品类型 price = models.DecimalField(max_digits=5,decimal_places=2,verbose_name='商品价格') #商品价格...
43.826087
99
0.702381
1bba28894d7426a1fc21db53d15c46508d2fc045
529
py
Python
config/config.py
desireyao/TestFlask
7f6e9ea1753070c276e45822ac75fb8a883827b2
[ "MIT" ]
null
null
null
config/config.py
desireyao/TestFlask
7f6e9ea1753070c276e45822ac75fb8a883827b2
[ "MIT" ]
null
null
null
config/config.py
desireyao/TestFlask
7f6e9ea1753070c276e45822ac75fb8a883827b2
[ "MIT" ]
null
null
null
class Config(object): SQLALCHEMY_DATABASE_URI = 'mysql://root:asdf1234@127.0.0.1:3306/test' SQLALCHEMY_POOL_TIMEOUT = 60 SQLALCHEMY_TRACK_MODIFICATIONS = False class ProductConfig(Config): SQLALCHEMY_DATABASE_URI = 'mysql://root:asdf1234@127.0.0.1:3306/tnews' class TestingConfig(Config): SQLALCH...
23
74
0.722117
379d7388632282000289d85e829d9f6bcec45b85
12,326
py
Python
ceilometer/pipeline.py
citrix-openstack-build/ceilometer
29f2ffc7e511a152d6e8742cd233c3dc399b8fff
[ "Apache-2.0" ]
null
null
null
ceilometer/pipeline.py
citrix-openstack-build/ceilometer
29f2ffc7e511a152d6e8742cd233c3dc399b8fff
[ "Apache-2.0" ]
null
null
null
ceilometer/pipeline.py
citrix-openstack-build/ceilometer
29f2ffc7e511a152d6e8742cd233c3dc399b8fff
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- # # Copyright © 2013 Intel Corp. # # Author: Yunhong Jiang <yunhong.jiang@intel.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/l...
33.862637
78
0.590621
6630cf70dbf8aaf10fc9d83ad8c9ae99cc71e777
2,505
py
Python
hash_check.py
rqnaveen/hash-checker
873dc3b16c8718c4bfce79c69a53e11e20fe7f67
[ "Unlicense" ]
null
null
null
hash_check.py
rqnaveen/hash-checker
873dc3b16c8718c4bfce79c69a53e11e20fe7f67
[ "Unlicense" ]
null
null
null
hash_check.py
rqnaveen/hash-checker
873dc3b16c8718c4bfce79c69a53e11e20fe7f67
[ "Unlicense" ]
null
null
null
#!/usr/bin/python import requests, json, time, base64 import threading import datetime global_lock = threading.Lock() file_contents = [] def printHash(i,hash): #Print the analysed details in the golobal locked file. while global_lock.locked(): continue global_lock.acquire() line="%s\t%s\t%s"...
28.465909
89
0.634331
7f22b8d9cd3251c586b046138a7df0e452a8c8c8
1,690
py
Python
featureProcessing.py
Squillyprice01/KingCreativtiy2019
eb2de455f0955d4d5ee461536a0a51c5934750da
[ "MIT" ]
2
2018-12-04T23:43:54.000Z
2019-03-12T21:55:16.000Z
featureProcessing.py
Squillyprice01/KingCreativtiy2019
eb2de455f0955d4d5ee461536a0a51c5934750da
[ "MIT" ]
11
2018-12-04T20:01:50.000Z
2019-02-26T15:44:52.000Z
featureProcessing.py
Squillyprice01/KingCreativtiy2019
eb2de455f0955d4d5ee461536a0a51c5934750da
[ "MIT" ]
null
null
null
import csv from collections import defaultdict columns = defaultdict(list) # each value in each column is appended to a list with open('student-mat2.csv') as f: reader = csv.DictReader(f) # read rows into a dictionary format for row in reader: # read a row as {column1: value1, column2: value2,...} for...
27.704918
77
0.720118
c163df4e294bd833a4c3e9e83bdb14559bac4880
12,765
py
Python
src/django-mysql/tests/testapp/test_settextfield.py
TheJacksonLaboratory/jaxid_generator
be5222d9c5ce57a169b94b0afd1ae9f7f10a66c1
[ "Apache-2.0" ]
2
2020-10-19T17:21:09.000Z
2020-10-20T14:27:25.000Z
src/django-mysql/tests/testapp/test_settextfield.py
cometsong/jaxid_generator
be5222d9c5ce57a169b94b0afd1ae9f7f10a66c1
[ "Apache-2.0" ]
null
null
null
src/django-mysql/tests/testapp/test_settextfield.py
cometsong/jaxid_generator
be5222d9c5ce57a169b94b0afd1ae9f7f10a66c1
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import json import pytest from django import forms from django.core import exceptions, serializers from django.db import models from django.db.migrations.writer import MigrationWriter from django.db.mode...
34.407008
78
0.639953
76f9ee4b8ed555de94e2a69770f095776522cc11
4,684
py
Python
odoo/base-addons/portal/wizard/portal_share.py
LucasBorges-Santos/docker-odoo
53987bbd61f6119669b5f801ee2ad54695084a21
[ "MIT" ]
null
null
null
odoo/base-addons/portal/wizard/portal_share.py
LucasBorges-Santos/docker-odoo
53987bbd61f6119669b5f801ee2ad54695084a21
[ "MIT" ]
null
null
null
odoo/base-addons/portal/wizard/portal_share.py
LucasBorges-Santos/docker-odoo
53987bbd61f6119669b5f801ee2ad54695084a21
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ class PortalShare(models.TransientModel): _name = 'portal.share' _description = 'Portal Sharing' @api.model def default_get(self, fields): result = super(...
53.83908
130
0.648164
58719af63c5424cb6f1c455ebca9a79d4a86c40c
2,445
py
Python
server/gspeedometer/measurement/dns.py
gurupras/mobiperf
38769fa4bde7790b0cb791c2b99012ba1f82cd23
[ "Apache-2.0" ]
57
2015-01-17T16:37:35.000Z
2022-03-31T15:40:40.000Z
server/gspeedometer/measurement/dns.py
gurupras/mobiperf
38769fa4bde7790b0cb791c2b99012ba1f82cd23
[ "Apache-2.0" ]
9
2019-06-19T11:37:16.000Z
2019-08-05T13:06:16.000Z
server/gspeedometer/measurement/dns.py
gurupras/mobiperf
38769fa4bde7790b0cb791c2b99012ba1f82cd23
[ "Apache-2.0" ]
31
2015-01-17T17:02:28.000Z
2021-05-02T09:23:37.000Z
# Copyright (c) 2012, University of Washington # 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 ...
32.171053
80
0.668712
d8e331d586900e78c597d1db695c9fb5df8180ce
1,663
py
Python
Test29_tf/Logistic_Regression/logistic_regression_val.py
hooloong/My_TensorFlow
ef115989035b9ae14938dca47c0814b0d16dd6ba
[ "MIT" ]
3
2018-07-29T17:31:58.000Z
2019-06-27T10:36:34.000Z
Test29_tf/Logistic_Regression/logistic_regression_val.py
hooloong/My_TensorFlow
ef115989035b9ae14938dca47c0814b0d16dd6ba
[ "MIT" ]
null
null
null
Test29_tf/Logistic_Regression/logistic_regression_val.py
hooloong/My_TensorFlow
ef115989035b9ae14938dca47c0814b0d16dd6ba
[ "MIT" ]
1
2019-02-18T02:27:39.000Z
2019-02-18T02:27:39.000Z
#-*- coding:utf-8 -*- import time import numpy as np import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data MNIST = input_data.read_data_sets("../../../data", one_hot=True) learning_rate = 0.01 batch_size = 128 n_epochs = 25 X = tf.placeholder(tf.float32, [batch_size, 784]) Y = tf.placeho...
34.645833
89
0.696933
cbcec7afeec7cf6218a5b58ce3286193de68d05a
56
py
Python
bot/__init__.py
Sheerley/pYnsta
af6afc0b6d2a904fac966f308fe853847665e3b8
[ "MIT" ]
1
2022-01-13T09:49:43.000Z
2022-01-13T09:49:43.000Z
bot/__init__.py
Shanduur/pYnsta
af6afc0b6d2a904fac966f308fe853847665e3b8
[ "MIT" ]
3
2021-05-12T11:50:07.000Z
2022-01-30T19:34:37.000Z
bot/__init__.py
Shanduur/pYnsta
af6afc0b6d2a904fac966f308fe853847665e3b8
[ "MIT" ]
null
null
null
from bot.bot import Bot from bot.session import Session
18.666667
31
0.821429
ba56c9d5091cae9ea5c6f5fdd7a0c0554d7acb46
2,488
py
Python
rnn/variable_lengths_padding.py
vec2k4/ml-examples
11638a497eb7bf124f5c9c19929a64b46a3d77ed
[ "MIT" ]
null
null
null
rnn/variable_lengths_padding.py
vec2k4/ml-examples
11638a497eb7bf124f5c9c19929a64b46a3d77ed
[ "MIT" ]
null
null
null
rnn/variable_lengths_padding.py
vec2k4/ml-examples
11638a497eb7bf124f5c9c19929a64b46a3d77ed
[ "MIT" ]
null
null
null
# Based on: https://machinelearningmastery.com/understanding-stateful-lstm-recurrent-neural-networks-python-keras/ import numpy as np import random import datetime from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, LSTM, GRU, Masking from tensorflow.keras import utils from tensorf...
34.082192
114
0.674437
751ecd8ef11082b2afe3e1cc92515be00b4f507d
8,482
py
Python
cms/plugin_rendering.py
isotoma/django-cms
90203d9c5fb8acbb2f11f6a23193e75c7705b43d
[ "BSD-3-Clause" ]
null
null
null
cms/plugin_rendering.py
isotoma/django-cms
90203d9c5fb8acbb2f11f6a23193e75c7705b43d
[ "BSD-3-Clause" ]
null
null
null
cms/plugin_rendering.py
isotoma/django-cms
90203d9c5fb8acbb2f11f6a23193e75c7705b43d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.template import Template, Context from django.template.loader import render_to_string from django.utils import six from django.utils.safestring import mark_safe from cms.models.placeholdermodel import Placeholder from cms.plugin_processors import (plugin_meta_context_processor, mark...
40.009434
121
0.713275
c43e67d8c008a208f193d0abf565f5f815e0bd41
23,732
py
Python
GPy/plotting/gpy_plot/gp_plots.py
ekalosak/GPy
ff82f12c3d321bfc3ce6615447fad25aea9de6bd
[ "BSD-3-Clause" ]
1,685
2015-01-03T14:46:25.000Z
2022-03-30T02:41:35.000Z
GPy/plotting/gpy_plot/gp_plots.py
ekalosak/GPy
ff82f12c3d321bfc3ce6615447fad25aea9de6bd
[ "BSD-3-Clause" ]
778
2015-01-15T18:21:25.000Z
2022-03-30T14:52:32.000Z
GPy/plotting/gpy_plot/gp_plots.py
ekalosak/GPy
ff82f12c3d321bfc3ce6615447fad25aea9de6bd
[ "BSD-3-Clause" ]
584
2015-01-06T06:30:43.000Z
2022-03-29T13:05:33.000Z
#=============================================================================== # Copyright (c) 2012-2015, GPy authors (see AUTHORS.txt). # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Red...
55.84
209
0.664504
7a3cb4999b6bd8a3c4521bd8b47869bba41dd73c
1,323
py
Python
yt_dlp/postprocessor/exec.py
andykit/yt-dlp
bf5f605e7674c96d752aabb102cf627f5d7258ae
[ "Unlicense" ]
18
2020-12-21T22:33:46.000Z
2021-01-11T20:14:35.000Z
yt_dlp/postprocessor/exec.py
mikebaz/yt-dlp
9dc69339076087fbe43174c291482208c7664e33
[ "Unlicense" ]
8
2021-01-06T21:01:20.000Z
2021-01-12T21:34:46.000Z
yt_dlp/postprocessor/exec.py
mikebaz/yt-dlp
9dc69339076087fbe43174c291482208c7664e33
[ "Unlicense" ]
6
2021-12-20T05:04:50.000Z
2022-01-31T18:35:28.000Z
from __future__ import unicode_literals import subprocess from .common import PostProcessor from ..compat import compat_shlex_quote from ..utils import ( encodeArgument, PostProcessingError, variadic, ) class ExecPP(PostProcessor): def __init__(self, downloader, exec_cmd): PostProcessor.__i...
30.767442
85
0.650038
fea5c30299eb47a066f294d0ff7bb352c20a84b1
1,465
py
Python
term/atom.py
spiderweb62/Term
19753ee6719f0afe37520d4be8bcbe6091d8313a
[ "Apache-2.0" ]
14
2018-09-24T09:56:54.000Z
2022-01-06T22:35:43.000Z
term/atom.py
spiderweb62/Term
19753ee6719f0afe37520d4be8bcbe6091d8313a
[ "Apache-2.0" ]
20
2019-02-06T10:25:45.000Z
2022-02-22T10:25:15.000Z
term/atom.py
spiderweb62/Term
19753ee6719f0afe37520d4be8bcbe6091d8313a
[ "Apache-2.0" ]
11
2018-11-06T20:30:05.000Z
2021-10-15T23:13:46.000Z
# Copyright 2018, Erlang Solutions Ltd, and S2HC Sweden AB # # 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...
31.847826
79
0.676451
77e354649f662cf0fb09c62ab892166d84fabb00
4,352
py
Python
benchmark/startQiskit_Class2692.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class2692.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class2692.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=43 import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_...
35.096774
140
0.650046
a90ae2f627b0fe5bac29a17f5d287dd31a76000a
332
py
Python
OOPS_CONCEPT/OOP Principles/class_program_11.py
abhigyan709/dsalgo
868448834b22e06e572b4a0b4ba85cb1b0c6d7ee
[ "MIT" ]
1
2021-06-03T10:20:50.000Z
2021-06-03T10:20:50.000Z
OOPS_CONCEPT/OOP Principles/class_program_11.py
abhigyan709/dsalgo
868448834b22e06e572b4a0b4ba85cb1b0c6d7ee
[ "MIT" ]
null
null
null
OOPS_CONCEPT/OOP Principles/class_program_11.py
abhigyan709/dsalgo
868448834b22e06e572b4a0b4ba85cb1b0c6d7ee
[ "MIT" ]
null
null
null
# parameterless and parameterized constructor class Mobile: def __init__(self, one, two): print("Inside Constructor") # uncomment the beclow code and see the error # mob1 = Mobile() # throws error because required arguments # mob2 = Mobile(100, 20, 30) # this will also throw an error by giving required 2...
36.888889
93
0.728916
3f321fcc945079730b37ba4cee7817363ef5b6c8
6,890
py
Python
sentry/utils/stacks.py
optimal-outsource/django-sentry
1b55011f1474cde8707a9febaf0c64c8142496d2
[ "BSD-3-Clause" ]
null
null
null
sentry/utils/stacks.py
optimal-outsource/django-sentry
1b55011f1474cde8707a9febaf0c64c8142496d2
[ "BSD-3-Clause" ]
null
null
null
sentry/utils/stacks.py
optimal-outsource/django-sentry
1b55011f1474cde8707a9febaf0c64c8142496d2
[ "BSD-3-Clause" ]
null
null
null
""" sentry.utils.stacks ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import inspect import re from django.utils.html import escape from sentry.conf import settings from sentry.utils import get_installed_apps, transform d...
37.445652
141
0.617852
ea9b8b42eb3ee39c0d476e1512a9c9efc93b1d33
6,104
py
Python
sdks/python/http_client/v1/polyaxon_sdk/models/v1_list_component_hubs_response.py
polyaxon/polyaxon
a835f2872a63f6cf5c27d2dd1125ad7c18eb849a
[ "Apache-2.0" ]
3,200
2017-05-09T11:35:31.000Z
2022-03-28T05:43:22.000Z
sdks/python/http_client/v1/polyaxon_sdk/models/v1_list_component_hubs_response.py
polyaxon/polyaxon
a835f2872a63f6cf5c27d2dd1125ad7c18eb849a
[ "Apache-2.0" ]
1,324
2017-06-29T07:21:27.000Z
2022-03-27T12:41:10.000Z
sdks/python/http_client/v1/polyaxon_sdk/models/v1_list_component_hubs_response.py
polyaxon/polyaxon
a835f2872a63f6cf5c27d2dd1125ad7c18eb849a
[ "Apache-2.0" ]
341
2017-01-10T23:06:53.000Z
2022-03-10T08:15:18.000Z
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
28.259259
120
0.605177
178ba13fba04c64d94947274a31ce02187c64216
477
py
Python
web_app/wsgi.py
kamyarkalhor/chopen
505e1b927245e601aec140d0e61a9c6785700304
[ "MIT" ]
null
null
null
web_app/wsgi.py
kamyarkalhor/chopen
505e1b927245e601aec140d0e61a9c6785700304
[ "MIT" ]
null
null
null
web_app/wsgi.py
kamyarkalhor/chopen
505e1b927245e601aec140d0e61a9c6785700304
[ "MIT" ]
null
null
null
""" WSGI config for mysite project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "web_app.settings") from django.core.wsgi...
31.8
78
0.809224
d352e8d473fb5ff8929aa7bbc2782bb8c5b121f2
1,380
py
Python
src/sims4communitylib/dialogs/option_dialogs/options/objects/common_dialog_option_category.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
118
2019-08-31T04:33:18.000Z
2022-03-28T21:12:14.000Z
src/sims4communitylib/dialogs/option_dialogs/options/objects/common_dialog_option_category.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
15
2019-12-05T01:29:46.000Z
2022-02-18T17:13:46.000Z
src/sims4communitylib/dialogs/option_dialogs/options/objects/common_dialog_option_category.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
28
2019-09-07T04:11:05.000Z
2022-02-07T18:31:40.000Z
""" The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0). https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/legalcode Copyright (c) COLONOLNUTTY """ from typing import Union from protocolbuffers.Localization...
41.818182
126
0.777536
aa477e5b5785ce697a9bda8f50d7d26217b6ee78
7,962
py
Python
tests/tests_main.py
KOLANICH-libs/tqdm
b9507b31beb67c9903073f8ae6f89c9735c5f1d0
[ "MIT" ]
null
null
null
tests/tests_main.py
KOLANICH-libs/tqdm
b9507b31beb67c9903073f8ae6f89c9735c5f1d0
[ "MIT" ]
null
null
null
tests/tests_main.py
KOLANICH-libs/tqdm
b9507b31beb67c9903073f8ae6f89c9735c5f1d0
[ "MIT" ]
null
null
null
"""Test CLI usage.""" import logging import subprocess # nosec import sys from functools import wraps from os import linesep from tqdm.cli import TqdmKeyError, TqdmTypeError, main from tqdm.utils import IS_WIN from .tests_tqdm import BytesIO, _range, closing, mark, raises def restore_sys(func): """Decorates `f...
32.497959
86
0.590304
b4cce525d5967c7efed6dfcad76cbbea74f15a9a
5,275
py
Python
electrum/gui/kivy/uix/dialogs/request_dialog.py
tidecoin/electrum
16222583249a015eaef174d81b8bab48a22e1a5a
[ "MIT" ]
4
2021-12-27T15:38:49.000Z
2022-02-16T12:19:40.000Z
electrum/gui/kivy/uix/dialogs/request_dialog.py
likloadm/electrum
16222583249a015eaef174d81b8bab48a22e1a5a
[ "MIT" ]
null
null
null
electrum/gui/kivy/uix/dialogs/request_dialog.py
likloadm/electrum
16222583249a015eaef174d81b8bab48a22e1a5a
[ "MIT" ]
2
2022-02-04T11:56:50.000Z
2022-03-26T06:19:17.000Z
from typing import TYPE_CHECKING from kivy.factory import Factory from kivy.lang import Builder from kivy.core.clipboard import Clipboard from kivy.app import App from kivy.clock import Clock from electrum.gui.kivy.i18n import _ from electrum.invoices import pr_tooltips, pr_color from electrum.invoices import PR_UNKN...
36.130137
134
0.563981
42cdbc5dfc0fdccf91dfaafa4d7432b23636bdcd
3,142
py
Python
WMIAdventure/backend/WMIAdventure_backend/utils/test_data/create_example_data.py
emkarcinos/WMIAdventure
7ca057bb4e4d462b8626d53b66bed86e0125059a
[ "Apache-2.0" ]
2
2021-05-26T15:12:33.000Z
2021-12-09T17:17:19.000Z
WMIAdventure/backend/WMIAdventure_backend/utils/test_data/create_example_data.py
emkarcinos/WMIAdventure
7ca057bb4e4d462b8626d53b66bed86e0125059a
[ "Apache-2.0" ]
558
2021-05-27T05:41:23.000Z
2022-02-27T21:50:54.000Z
WMIAdventure/backend/WMIAdventure_backend/utils/test_data/create_example_data.py
emkarcinos/WMIAdventure
7ca057bb4e4d462b8626d53b66bed86e0125059a
[ "Apache-2.0" ]
4
2021-05-26T15:09:29.000Z
2022-03-13T15:28:07.000Z
from IngameUsers.models import UserProfile, UserCard, Deck, UserDeck from cards.models import CardInfo, Card, CardLevel, CardLevelEffects, CardEffect def get_or_create_example_card(name, tooltip, subject) -> Card: info, _ = CardInfo.objects.get_or_create( name=name, defaults={ 'name': ...
35.704545
80
0.516232
cf26f3f83af78bd51c314280455846f2ac759658
5,290
py
Python
model.py
anishakadri/barabasialbert
833fee3a9464951d97cc19f1a9a67403965d8dc0
[ "MIT" ]
null
null
null
model.py
anishakadri/barabasialbert
833fee3a9464951d97cc19f1a9a67403965d8dc0
[ "MIT" ]
null
null
null
model.py
anishakadri/barabasialbert
833fee3a9464951d97cc19f1a9a67403965d8dc0
[ "MIT" ]
null
null
null
""" Anisha Kadri 2017 ak4114@ic.ac.uk A Module containing methods to create networks from different models. 1) For pure preferential attachement:- pref_att(N, m) 2) For random attachment:- rand_att(N,m) 3) For a mixture of the two, attachment via random walk:- walk_att(N,m,L) References ---------- [1]...
33.910256
106
0.630057
6ba77cf36c52ab6e9904fd31a2f559e75e0e7aa6
6,330
py
Python
zwdb/zwredis.py
njzhaowei/zwdb
5d96625127822f5da3ac9bc683aa16239b139de0
[ "MIT" ]
null
null
null
zwdb/zwredis.py
njzhaowei/zwdb
5d96625127822f5da3ac9bc683aa16239b139de0
[ "MIT" ]
null
null
null
zwdb/zwredis.py
njzhaowei/zwdb
5d96625127822f5da3ac9bc683aa16239b139de0
[ "MIT" ]
null
null
null
import os import warnings import traceback from redis import Redis from redis.connection import BlockingConnectionPool from . import utils class ZWRedis(): """Class defining a Redis driver""" def __init__(self, db_url, **kwargs): self.db_url = db_url or os.environ.get('DATABASE_URL') if not se...
31.809045
85
0.514218
da0f8f0ce248d54de1da32b4c1a0fdfd32fb6bbd
6,271
py
Python
src-server/app/handlers/apis/mixins.py
mjmcconnell/sra
ff1c2563dead2fe4d81cda3d431482defd0f6a62
[ "Apache-2.0" ]
null
null
null
src-server/app/handlers/apis/mixins.py
mjmcconnell/sra
ff1c2563dead2fe4d81cda3d431482defd0f6a62
[ "Apache-2.0" ]
null
null
null
src-server/app/handlers/apis/mixins.py
mjmcconnell/sra
ff1c2563dead2fe4d81cda3d431482defd0f6a62
[ "Apache-2.0" ]
null
null
null
"""Template handlers, for injecting python into html templates. """ # stdlib imports import json import logging import os import re # local imports from app.utils import storage # third-party imports from google.appengine.ext import ndb logger = logging.getLogger(__name__) class BaseMixin(object): """Class fo...
28.504545
78
0.563706
7a866e22b7e54ca0de335f29e721b8b3ec1e7c61
2,598
py
Python
setup.py
PerMedCoE/permedcoe
528415135d16963212cd81b0ea64fa655364e64a
[ "Apache-2.0" ]
null
null
null
setup.py
PerMedCoE/permedcoe
528415135d16963212cd81b0ea64fa655364e64a
[ "Apache-2.0" ]
null
null
null
setup.py
PerMedCoE/permedcoe
528415135d16963212cd81b0ea64fa655364e64a
[ "Apache-2.0" ]
null
null
null
# Always prefer setuptools over distutils from setuptools import setup, find_packages import pathlib here = pathlib.Path(__file__).parent.resolve() # Get the long description from the README file long_description = (here / "README.md").read_text(encoding="utf-8") setup( name="permedcoe", version="0.0.3", ...
37.114286
86
0.603156
c001354f14668f7f6caa94abd69c87581146c175
1,937
py
Python
second/pytorch/play_onnx.py
ldtho/ConeDetectionPointpillars
feb730f69c2aed56160e90bbddfbce4713c70baf
[ "MIT" ]
24
2019-05-16T02:36:36.000Z
2022-03-15T02:31:11.000Z
second/pytorch/play_onnx.py
ldtho/ConeDetectionPointpillars
feb730f69c2aed56160e90bbddfbce4713c70baf
[ "MIT" ]
2
2019-06-04T03:27:50.000Z
2021-07-12T02:40:43.000Z
second/pytorch/play_onnx.py
ldtho/ConeDetectionPointpillars
feb730f69c2aed56160e90bbddfbce4713c70baf
[ "MIT" ]
9
2019-08-31T08:39:25.000Z
2021-08-23T02:37:57.000Z
# Super Resolution model definition in PyTorch import torch.nn as nn import torch.nn.init as init import torch from torch.nn import functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(in_channels=9, out_channels=64, ...
32.830508
120
0.546205
250bf0a56fbeed6ccf44eae97c7f5b97ad4b6152
1,227
py
Python
removeEmptyFolder.py
xuechong87/scripts
537c07cadb2fc126fc09b9d9334f6b4bd8ba2324
[ "MIT" ]
null
null
null
removeEmptyFolder.py
xuechong87/scripts
537c07cadb2fc126fc09b9d9334f6b4bd8ba2324
[ "MIT" ]
null
null
null
removeEmptyFolder.py
xuechong87/scripts
537c07cadb2fc126fc09b9d9334f6b4bd8ba2324
[ "MIT" ]
null
null
null
''' Created on 2013-2-28 check the empty folder & remove @author: xuechong87 ''' import os def pathNotNull(pathStr): return len(os.listdir(pathStr))>0 def remove(pathStr): os.removedirs(pathStr) return def execute(pathStr): if pathNotNull(pathStr)==False : remove(pathStr) return def iter...
21.526316
67
0.498778
7381e149a8e104acab6fb392f7ea12fef18715a6
3,451
py
Python
ppgan/models/generators/rrdb_net.py
wangna11BD/PaddleGAN
fa1e1f261e31eebd3eab37a8ff8999018f96abc8
[ "Apache-2.0" ]
6,852
2020-06-18T10:56:27.000Z
2022-03-31T10:17:47.000Z
ppgan/models/generators/rrdb_net.py
wangna11BD/PaddleGAN
fa1e1f261e31eebd3eab37a8ff8999018f96abc8
[ "Apache-2.0" ]
283
2020-07-09T13:29:58.000Z
2022-03-23T02:50:25.000Z
ppgan/models/generators/rrdb_net.py
wangna11BD/PaddleGAN
fa1e1f261e31eebd3eab37a8ff8999018f96abc8
[ "Apache-2.0" ]
973
2020-06-18T11:15:35.000Z
2022-03-30T10:50:16.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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...
36.712766
77
0.634888