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
37c6769a47c8627a965c14d167c164e068428adc
495
py
Python
tests/test_window.py
aspfohl/notepad
30c5373d1745b388230a5fa1ccb1eb346b0e3798
[ "Apache-2.0" ]
null
null
null
tests/test_window.py
aspfohl/notepad
30c5373d1745b388230a5fa1ccb1eb346b0e3798
[ "Apache-2.0" ]
null
null
null
tests/test_window.py
aspfohl/notepad
30c5373d1745b388230a5fa1ccb1eb346b0e3798
[ "Apache-2.0" ]
null
null
null
from notepad import window, constants def test_get_title(): assert window.get_title("foo") == f"foo - {constants.APP_NAME}" assert window.get_title() == f"{constants.DEFAULT_UNNAMED_TITLE} - {constants.APP_NAME}" def test_window_dimension(): w = window.WindowDimension(height=50, width=100) assert w.le...
45
92
0.737374
d328e9ab5866c1725380fab56c204b45aa2621b4
900
py
Python
problema34.py
bptfreitas/Project-Euler
02b3ef8f8e3754b886b266fcd5eee7fd00d97dde
[ "MIT" ]
null
null
null
problema34.py
bptfreitas/Project-Euler
02b3ef8f8e3754b886b266fcd5eee7fd00d97dde
[ "MIT" ]
null
null
null
problema34.py
bptfreitas/Project-Euler
02b3ef8f8e3754b886b266fcd5eee7fd00d97dde
[ "MIT" ]
null
null
null
#!/usr/bin/python #145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. #Find the sum of all numbers which are equal to the sum of the factorial of their digits. #Note: as 1! = 1 and 2! = 2 are not sums they are not included. from euler import fact from itertools import permutations from itertools import c...
18
89
0.678889
2be69b30e39c778dc5bd643df1397ee5a5ddb331
2,765
py
Python
perfkitbenchmarker/scripts/spark_sql_runner.py
justinuang/PerfKitBenchmarker
0730a7a6ebcd9447c7667ff6a3902c203d85fadb
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/scripts/spark_sql_runner.py
justinuang/PerfKitBenchmarker
0730a7a6ebcd9447c7667ff6a3902c203d85fadb
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/scripts/spark_sql_runner.py
justinuang/PerfKitBenchmarker
0730a7a6ebcd9447c7667ff6a3902c203d85fadb
[ "Apache-2.0" ]
null
null
null
"""Runs a Spark SQL query with preloaded temp views. Views can be BigQuery tables or HCFS directories containing Parquet. This is useful for Storage formats not expressible as External Hive Tables. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function impor...
31.781609
80
0.717179
f26ef0e25b7790d0a89227aeef7241ea30e47783
2,515
py
Python
detectron2/utils/memory.py
sourcery-ai-bot/detectron2
fd0c5c59afbdc43f7005fb1a8c0c39ac5dc44039
[ "Apache-2.0" ]
null
null
null
detectron2/utils/memory.py
sourcery-ai-bot/detectron2
fd0c5c59afbdc43f7005fb1a8c0c39ac5dc44039
[ "Apache-2.0" ]
null
null
null
detectron2/utils/memory.py
sourcery-ai-bot/detectron2
fd0c5c59afbdc43f7005fb1a8c0c39ac5dc44039
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. import logging from contextlib import contextmanager from functools import wraps import torch __all__ = ["retry_if_cuda_oom"] @contextmanager def _ignore_torch_cuda_oom(): """ A context which ignores CUDA OOM exception from pytorch. """ try: ...
31.4375
95
0.65328
47a1ed53df52d600999b395aa7b4971ea9433275
1,544
py
Python
yunibot/plugins/pcr/model.py
algobot76/yunibot
e3bc5b4ddc6f38d185e0e67b7f846ed4c1a56ef4
[ "BSD-3-Clause" ]
null
null
null
yunibot/plugins/pcr/model.py
algobot76/yunibot
e3bc5b4ddc6f38d185e0e67b7f846ed4c1a56ef4
[ "BSD-3-Clause" ]
8
2021-01-06T19:38:47.000Z
2021-01-09T19:58:57.000Z
yunibot/plugins/pcr/model.py
algobot76/yunibot
e3bc5b4ddc6f38d185e0e67b7f846ed4c1a56ef4
[ "BSD-3-Clause" ]
null
null
null
import sqlalchemy metadata = sqlalchemy.MetaData() clan = sqlalchemy.Table( "clan", metadata, sqlalchemy.Column("group_id", sqlalchemy.Integer, primary_key=True), sqlalchemy.Column("clan_name", sqlalchemy.String, nullable=False), sqlalchemy.Column("server", sqlalchemy.String, nullable=False), ) mem...
35.090909
78
0.704016
7d8a213d174ff7485e92aae0c9e6dab935d27aed
114
py
Python
locations/models/__init__.py
Rafiatu/mozio
7521587266bd93a3a2b759a2968a6d51c9837745
[ "MIT" ]
null
null
null
locations/models/__init__.py
Rafiatu/mozio
7521587266bd93a3a2b759a2968a6d51c9837745
[ "MIT" ]
null
null
null
locations/models/__init__.py
Rafiatu/mozio
7521587266bd93a3a2b759a2968a6d51c9837745
[ "MIT" ]
null
null
null
from .polygon_model import Polygon from .provider_model import Provider from .coordinates_model import Coordinate
28.5
41
0.868421
515cf1c2c24b719f6db7b53cb0220d857391821f
5,803
py
Python
tests/test_lowcost.py
lparth/reference_implementation
fa2aafc192ff1f42153301633c72fe6a9c63ed30
[ "Apache-2.0" ]
135
2020-04-10T17:41:39.000Z
2022-03-07T19:43:00.000Z
tests/test_lowcost.py
lparth/reference_implementation
fa2aafc192ff1f42153301633c72fe6a9c63ed30
[ "Apache-2.0" ]
50
2020-06-27T08:34:13.000Z
2021-04-20T10:18:25.000Z
tests/test_lowcost.py
lparth/reference_implementation
fa2aafc192ff1f42153301633c72fe6a9c63ed30
[ "Apache-2.0" ]
39
2020-04-10T18:47:21.000Z
2020-07-30T03:29:57.000Z
__copyright__ = """ Copyright 2020 EPFL 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 ...
30.223958
88
0.702223
06b662886489c97eec43ca27a4675b8e4fdeacb2
9,285
py
Python
pkgs/pickleshare-0.5-py27_0/lib/python2.7/site-packages/pickleshare.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
pkgs/pickleshare-0.5-py27_0/lib/python2.7/site-packages/pickleshare.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
pkgs/pickleshare-0.5-py27_0/lib/python2.7/site-packages/pickleshare.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
1
2020-11-01T20:40:01.000Z
2020-11-01T20:40:01.000Z
#!/usr/bin/env python """ PickleShare - a small 'shelve' like datastore with concurrency support Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve, many processes can access the database simultaneously. Changing a value in database is immediately visible to other processes accessing the...
27.966867
79
0.562089
f380ec6d4ec28c12552bb7c4cc31a51a27dcbed1
789
py
Python
udacity course code/01-06-plottwohistograms.py
bluemurder/mlfl
b895b2f1d01b0f6418a5bcee2f204dd7916062f0
[ "MIT" ]
1
2021-03-22T22:25:54.000Z
2021-03-22T22:25:54.000Z
udacity course code/01-06-plottwohistograms.py
bluemurder/mlfl
b895b2f1d01b0f6418a5bcee2f204dd7916062f0
[ "MIT" ]
6
2017-01-16T09:53:21.000Z
2017-01-18T12:20:09.000Z
udacity course code/01-06-plottwohistograms.py
bluemurder/mlfl
b895b2f1d01b0f6418a5bcee2f204dd7916062f0
[ "MIT" ]
null
null
null
"""Plot a couple of histogram.""" import pandas as pd import matplotlib.pyplot as plt from util import get_data, plot_data, compute_daily_returns def test_run(): # Read data dates = pd.date_range('2009-01-01', '2012-12-31') # date range as index symbols = ['SPY','XOM'] df = get_data(symbols, dates) ...
30.346154
80
0.671736
4bad0f105714002f3d49d1ee0045a31f93d6b87c
287
py
Python
xcffibaer_lib/__init__.py
whitelynx/xcffibaer
9c504d0908820ea3e4163847490281cd779a2c9d
[ "MIT" ]
1
2020-05-07T04:26:15.000Z
2020-05-07T04:26:15.000Z
xcffibaer_lib/__init__.py
whitelynx/xcffibaer
9c504d0908820ea3e4163847490281cd779a2c9d
[ "MIT" ]
null
null
null
xcffibaer_lib/__init__.py
whitelynx/xcffibaer
9c504d0908820ea3e4163847490281cd779a2c9d
[ "MIT" ]
null
null
null
'''A themeable status bar written in Python, using xcffib. ''' from . import chunks from .Bar import Bar from .FSReader import FSReader from .Store import Store from .Window import Window from .XSetup import XSetup __all__ = ['chunks', 'Bar', 'FSReader', 'Store', 'Window', 'XSetup']
22.076923
68
0.724739
da32111c2830bf0aea92365bd37b4826981abda3
34,640
py
Python
application/models.py
City-of-Helsinki/events-helsinki-cms
64e4c1ce6cc058fb3783e417560dc244bd753d05
[ "MIT" ]
2
2020-04-20T05:37:28.000Z
2021-02-19T10:33:45.000Z
application/models.py
City-of-Helsinki/events-helsinki-cms
64e4c1ce6cc058fb3783e417560dc244bd753d05
[ "MIT" ]
6
2020-02-12T12:55:37.000Z
2021-03-30T12:56:28.000Z
application/models.py
City-of-Helsinki/events-helsinki-cms
64e4c1ce6cc058fb3783e417560dc244bd753d05
[ "MIT" ]
1
2021-02-18T12:11:18.000Z
2021-02-18T12:11:18.000Z
from uuid import uuid4 from django.conf import settings from django.db import models from wagtail.core import blocks from wagtail.core.models import Page from wagtail.core.fields import StreamField, RichTextField from wagtail.images.models import AbstractImage, AbstractRendition from wagtail.admin.edit_handlers import...
31.348416
340
0.605167
bd32d5bfc11b53f31422abb852a2ca2b8b628b22
24,178
py
Python
src/hip_prof_gen.py
ex-rzr/hipamd
d2d2cacfe210307ec10c77400e1dafdeafefbc0f
[ "MIT" ]
12
2021-08-07T13:27:51.000Z
2022-03-28T04:10:57.000Z
src/hip_prof_gen.py
ex-rzr/hipamd
d2d2cacfe210307ec10c77400e1dafdeafefbc0f
[ "MIT" ]
11
2021-08-06T08:29:59.000Z
2022-03-20T11:47:46.000Z
src/hip_prof_gen.py
ex-rzr/hipamd
d2d2cacfe210307ec10c77400e1dafdeafefbc0f
[ "MIT" ]
13
2021-08-06T07:02:24.000Z
2022-03-27T09:27:48.000Z
#!/usr/bin/python # Copyright (c) 2019 - 2021 Advanced Micro Devices, Inc. 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 limit...
33.211538
126
0.596741
c0c4296d64a097beff2f928105b872c76bc01c72
20,072
py
Python
discord/ui/view.py
Ryomen-Sukuna/discord.py
0bcb0d0e3ce395d42a5b1dae61b0090791ee018d
[ "MIT" ]
1
2021-09-11T09:24:38.000Z
2021-09-11T09:24:38.000Z
discord/ui/view.py
Ryomen-Sukuna/discord.py
0bcb0d0e3ce395d42a5b1dae61b0090791ee018d
[ "MIT" ]
null
null
null
discord/ui/view.py
Ryomen-Sukuna/discord.py
0bcb0d0e3ce395d42a5b1dae61b0090791ee018d
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
34.078098
118
0.6251
63f92e16793d137549c31e3a1cd9362a2d4c035d
1,109
py
Python
sauer/6.1.py
odderikf/matfys_math
c0600faa59ac5becf0614ac83065216f1a1520f2
[ "MIT" ]
null
null
null
sauer/6.1.py
odderikf/matfys_math
c0600faa59ac5becf0614ac83065216f1a1520f2
[ "MIT" ]
null
null
null
sauer/6.1.py
odderikf/matfys_math
c0600faa59ac5becf0614ac83065216f1a1520f2
[ "MIT" ]
null
null
null
#%% setup import numpy as np from matplotlib import pyplot as plt def euler(f, y_0, start, stop, step): w_i = y_0 w = [w_i] t = np.arange(start, stop+step, step) # include endpoint, therefore add step for t_i in t[:-1]: w_i += step*f(t_i, w_i) w.append(w_i) return t, w ...
18.79661
81
0.499549
cb798fe66483f9ecc8abd12ce66737f0d6c3eb33
24,478
py
Python
mlp/views.py
cocoemily/paleocore2
34b9ba30358963a0a1c8ae7252ed7c5ef178a758
[ "MIT" ]
null
null
null
mlp/views.py
cocoemily/paleocore2
34b9ba30358963a0a1c8ae7252ed7c5ef178a758
[ "MIT" ]
null
null
null
mlp/views.py
cocoemily/paleocore2
34b9ba30358963a0a1c8ae7252ed7c5ef178a758
[ "MIT" ]
null
null
null
# External Libraries import os from fastkml import kml, Placemark, Folder, Document from lxml import etree from datetime import datetime from django.contrib.gis.geos import GEOSGeometry, Point from pygeoif import geometry from zipfile import ZipFile # Django Libraries from django.conf import settings from django.views...
50.889813
114
0.601234
90ea92d791287aa76140d8110c343e54466acee9
9,591
py
Python
tests/__init__.py
leucosticte/speedypywikibot
f03d2070aa5d30a1f82540b0eda6fa603eb341f9
[ "MIT" ]
null
null
null
tests/__init__.py
leucosticte/speedypywikibot
f03d2070aa5d30a1f82540b0eda6fa603eb341f9
[ "MIT" ]
null
null
null
tests/__init__.py
leucosticte/speedypywikibot
f03d2070aa5d30a1f82540b0eda6fa603eb341f9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Package tests.""" # # (C) Pywikibot team, 2007-2018 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, print_function, unicode_literals __all__ = ('requests', 'unittest', 'TestRequest', 'patch_request', 'unpatch_request', 'mock', 'Mock', ...
27.880814
79
0.650193
b337311a3787ee379906a86083bb86439d147419
28,754
py
Python
synapse/rest/admin/users.py
kleph/synapse
c97da1e45dd0b1f7f31a7e204a304ec2fba17687
[ "Apache-2.0" ]
null
null
null
synapse/rest/admin/users.py
kleph/synapse
c97da1e45dd0b1f7f31a7e204a304ec2fba17687
[ "Apache-2.0" ]
null
null
null
synapse/rest/admin/users.py
kleph/synapse
c97da1e45dd0b1f7f31a7e204a304ec2fba17687
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2019 The Matrix.org Foundation C.I.C. # # 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 require...
34.685163
90
0.611741
f08be6fa9b035dd0b44f72e86e08a3ad3688bdcd
4,331
py
Python
pynodegl-utils/pynodegl_utils/ui/seekbar.py
jerry-belaston/gopro-lib-node.gl
623031489ddc82ed980c15bad349391c5b6bab5c
[ "Apache-2.0" ]
45
2017-02-07T13:13:52.000Z
2022-03-18T07:12:39.000Z
pynodegl-utils/pynodegl_utils/ui/seekbar.py
mrobertseidowsky-gpsw/gopro-lib-node.gl
fbe427e4ea108468a63cde5920cf6f6ce03478bc
[ "Apache-2.0" ]
148
2017-02-02T18:35:32.000Z
2022-03-28T13:53:22.000Z
pynodegl-utils/pynodegl_utils/ui/seekbar.py
mrobertseidowsky-gpsw/gopro-lib-node.gl
fbe427e4ea108468a63cde5920cf6f6ce03478bc
[ "Apache-2.0" ]
28
2017-02-01T10:06:47.000Z
2022-03-18T07:12:26.000Z
#!/usr/bin/env python # # Copyright 2018 GoPro Inc. # # 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...
33.835938
93
0.684138
287fa01be037648aa80ebc8b6afbf29035919428
4,001
py
Python
clients_1.2/test/test_verify_installation.py
MetaAnalyticsAdmin/meta-analytics
9a8408d3e414e837d84939ad711d0ae9f83c46ed
[ "Apache-2.0" ]
5
2020-05-04T17:02:35.000Z
2022-01-13T17:41:09.000Z
clients_1.2/test/test_verify_installation.py
MetaAnalytics/meta-analytics
9a8408d3e414e837d84939ad711d0ae9f83c46ed
[ "Apache-2.0" ]
null
null
null
clients_1.2/test/test_verify_installation.py
MetaAnalytics/meta-analytics
9a8408d3e414e837d84939ad711d0ae9f83c46ed
[ "Apache-2.0" ]
null
null
null
import sys import alphaqubo_client as aq from alphaqubo_client.rest import ApiException import dimod from dimod.core.sampler import Sampler from dimod.sampleset import SampleSet from six import iteritems import pathlib import os.path def read_alphaqubo_bqm(filename:str): lines = [] with open(filename, "rt") as...
32.528455
103
0.543864
236866f23333e6e8092bfd5f34ce65e4c7e57ee1
5,413
py
Python
src/api/dataflow/shared/api/modules/test/test_call_stream.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
84
2021-06-30T06:20:23.000Z
2022-03-22T03:05:49.000Z
src/api/dataflow/shared/api/modules/test/test_call_stream.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
7
2021-06-30T06:21:16.000Z
2022-03-29T07:36:13.000Z
src/api/dataflow/shared/api/modules/test/test_call_stream.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
40
2021-06-30T06:21:26.000Z
2022-03-29T12:42:26.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ------------------------------------------...
38.119718
111
0.477185
41612c58b2d0788a239aae6a1703c4040a566d85
11,858
py
Python
mainwindow.py
nsw42/pijuui
fee9b96ceaab6b4f5db7ea41cb86da9a1a3b9eac
[ "BSD-2-Clause" ]
1
2021-12-20T15:02:54.000Z
2021-12-20T15:02:54.000Z
mainwindow.py
nsw42/pijuui
fee9b96ceaab6b4f5db7ea41cb86da9a1a3b9eac
[ "BSD-2-Clause" ]
null
null
null
mainwindow.py
nsw42/pijuui
fee9b96ceaab6b4f5db7ea41cb86da9a1a3b9eac
[ "BSD-2-Clause" ]
null
null
null
import logging import os.path import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk # noqa: E402 # need to call require_version before we can call this from gi.repository import Gdk # noqa: E402 # need to call require_version before we can call this from gi.repository import GdkPixbuf # noqa: E40...
44.246269
113
0.629195
6a0b832897810bcf59c5e5969c37d2fe8171560f
554
py
Python
mysite/polls/urls.py
liuhy-xly/test_dev05
a987eab25763e1fdd641fed5494d6b5b7c0f13fa
[ "Apache-2.0" ]
null
null
null
mysite/polls/urls.py
liuhy-xly/test_dev05
a987eab25763e1fdd641fed5494d6b5b7c0f13fa
[ "Apache-2.0" ]
null
null
null
mysite/polls/urls.py
liuhy-xly/test_dev05
a987eab25763e1fdd641fed5494d6b5b7c0f13fa
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2021/7/12 10:04 # @Author : alvin # @File : urls.py # @Software: PyCharm from django.urls import path from . import views #真正的Django项目中,可能有多个应用程序,Django如何区分它们之间的URL名称,向您 # 的URLconf添加名称空间,app_name要设置应用程序命名空间,模板文件需要同步加上名称空间 app_name = 'polls' urlpatterns = [ path('', views.In...
34.625
75
0.6787
87aca9c8dc7084a2f8f848b6d939f29d7c1ba0df
673
py
Python
Exercicios em Python/ex070.py
Raphael-Azevedo/Exercicios_Python
dece138f38edd02b0731aed78e44acccb021b3cb
[ "MIT" ]
null
null
null
Exercicios em Python/ex070.py
Raphael-Azevedo/Exercicios_Python
dece138f38edd02b0731aed78e44acccb021b3cb
[ "MIT" ]
null
null
null
Exercicios em Python/ex070.py
Raphael-Azevedo/Exercicios_Python
dece138f38edd02b0731aed78e44acccb021b3cb
[ "MIT" ]
null
null
null
soma = count = p = 0 while True: print('-' * 30) print(' CAIXA ') print('-' * 30) produto = str(input('Produto: ')) preco = float(input('Preço: RS$ ')) soma += preco if preco >= 1000: count += 1 if p == 0 or preco < p: p = preco prod = produto s = str(...
30.590909
69
0.523031
8b97f171deb58d4364d6822032e3124e1940edd9
279
py
Python
conftest.py
ljnath/PySnakeAndLadder
d817b7520bc7e4ce0fc65b66a4a412f2951afb49
[ "MIT" ]
null
null
null
conftest.py
ljnath/PySnakeAndLadder
d817b7520bc7e4ce0fc65b66a4a412f2951afb49
[ "MIT" ]
null
null
null
conftest.py
ljnath/PySnakeAndLadder
d817b7520bc7e4ce0fc65b66a4a412f2951afb49
[ "MIT" ]
null
null
null
""" Empty python file to fix pytest relative module import issue ref: https://stackoverflow.com/questions/10253826/path-issue-with-pytest- importerror-no-module-named-yadayadayada https://stackoverflow.com/questions/34466027/in-pytest-what-is-the-use-of- conftest-py-files """
27.9
74
0.795699
048640e59974850b15625849cce8bb9c8a8e3e2b
2,816
py
Python
Rock Paper Scissors Python Game/rock_paper_scissors_python_game.py
umangtank/ML-CaPsule
e0a72c7f9f0e5733ec05f28ba1444d30276a731a
[ "MIT" ]
null
null
null
Rock Paper Scissors Python Game/rock_paper_scissors_python_game.py
umangtank/ML-CaPsule
e0a72c7f9f0e5733ec05f28ba1444d30276a731a
[ "MIT" ]
null
null
null
Rock Paper Scissors Python Game/rock_paper_scissors_python_game.py
umangtank/ML-CaPsule
e0a72c7f9f0e5733ec05f28ba1444d30276a731a
[ "MIT" ]
null
null
null
#import randint from random module from random import randint #moves of the game moves = ["r", "p", "s"] player_score = 0 computer_score = 0 #start the game x = int(input("(1)Start. (2)End the game. \n")) if x != 1 and x != 2: x = int(input("Invalid input! Please enter '1' or '2': \n")) if x == 1:...
41.411765
127
0.480114
9c6ef71dc3cf0f2eed548fccf4bed75923334249
4,398
py
Python
electrumsv/gui/qt/qrcodewidget.py
electrumsv/electrumsv
a2d9027ccec338cadfca778888e6ef7f077b1651
[ "MIT" ]
136
2019-01-10T15:49:09.000Z
2022-02-20T04:46:39.000Z
electrumsv/gui/qt/qrcodewidget.py
electrumsv/electrumsv
a2d9027ccec338cadfca778888e6ef7f077b1651
[ "MIT" ]
790
2019-01-07T01:53:35.000Z
2022-03-30T23:04:28.000Z
electrumsv/gui/qt/qrcodewidget.py
electrumsv/electrumsv
a2d9027ccec338cadfca778888e6ef7f077b1651
[ "MIT" ]
65
2019-01-10T23:55:30.000Z
2021-12-19T06:47:13.000Z
import os from typing import Optional from PyQt5.QtCore import pyqtSignal, QEvent, Qt from PyQt5.QtGui import QColor, QCursor, QMouseEvent, QPainter, QPaintEvent from PyQt5.QtWidgets import ( QApplication, QVBoxLayout, QTextEdit, QHBoxLayout, QPushButton, QWidget) import qrcode from electrumsv.i18n import _ from ...
30.331034
95
0.588677
47f44b99f8945d52df1c7e2be713ff30a435860b
358
py
Python
Python Files/utilities.py
ThermoNuclearPanda/Project_Automail
ebefb36879f01659c09e9d11aaf772e343dea283
[ "MIT" ]
8
2016-03-25T05:56:49.000Z
2021-01-14T19:52:58.000Z
Python Files/utilities.py
ThermoNuclearPanda/Project_Automail
ebefb36879f01659c09e9d11aaf772e343dea283
[ "MIT" ]
3
2016-07-10T23:22:45.000Z
2018-02-02T14:43:58.000Z
Python Files/utilities.py
ThermoNuclearPanda/Project_Automail
ebefb36879f01659c09e9d11aaf772e343dea283
[ "MIT" ]
4
2016-07-10T23:23:00.000Z
2022-03-19T06:01:45.000Z
""" @Author: Kiran Gurajala & Alex Lee @Project: Project Automail @Version: 1.0 """ # Required imports import struct # Utils def pack(fmt, *args): return struct.pack('<' + fmt, *args) def unpack(fmt, *args): return struct.unpack('<' + fmt, *args) def multichr(values): return ''.join(map(chr, values)) def multi...
15.565217
39
0.673184
3377c80e4554b94a92f673074913e6c634a7782b
48,645
py
Python
Scripted/CIP_PAARatio/CIP_PAARatio.py
pieper/SlicerCIP
115959155cdb5f6bfbeffc6c1f794fcb6bdeb509
[ "BSD-3-Clause" ]
null
null
null
Scripted/CIP_PAARatio/CIP_PAARatio.py
pieper/SlicerCIP
115959155cdb5f6bfbeffc6c1f794fcb6bdeb509
[ "BSD-3-Clause" ]
null
null
null
Scripted/CIP_PAARatio/CIP_PAARatio.py
pieper/SlicerCIP
115959155cdb5f6bfbeffc6c1f794fcb6bdeb509
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import logging from collections import OrderedDict import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * from CIP.logic.SlicerUtil import SlicerUtil from CIP.logic import Util from CIP.ui import CaseReportsWidget # # CIP_PAARatio # class CIP_PAARatio(ScriptedLoadableModule):...
43.510733
163
0.648371
fb445aa12c51005c073977f238f86b8702564849
31,367
py
Python
tests/test_loader.py
p0larstern/opsdroid
81fe2d650a7fa6b40f054514f16d77521f49b884
[ "Apache-2.0" ]
null
null
null
tests/test_loader.py
p0larstern/opsdroid
81fe2d650a7fa6b40f054514f16d77521f49b884
[ "Apache-2.0" ]
10
2019-06-22T11:18:55.000Z
2019-09-03T13:26:47.000Z
tests/test_loader.py
p0larstern/opsdroid
81fe2d650a7fa6b40f054514f16d77521f49b884
[ "Apache-2.0" ]
null
null
null
import os import shutil import subprocess import tempfile import contextlib import unittest import unittest.mock as mock from types import ModuleType import pkg_resources from yaml import YAMLError from opsdroid.cli.start import configure_lang from opsdroid import loader as ld from opsdroid.loader import Loader from o...
39.257822
88
0.611439
6951b0f009763906bab3ee42b8566ea0081be9cd
23,151
py
Python
tornado/netutil.py
louis-she/tornado
f7d94d0e8a57f51ffc0aac5d55ed7bf9f9936b4d
[ "Apache-2.0" ]
6
2015-05-11T18:41:50.000Z
2018-08-26T14:30:24.000Z
tornado/netutil.py
louis-she/tornado
f7d94d0e8a57f51ffc0aac5d55ed7bf9f9936b4d
[ "Apache-2.0" ]
null
null
null
tornado/netutil.py
louis-she/tornado
f7d94d0e8a57f51ffc0aac5d55ed7bf9f9936b4d
[ "Apache-2.0" ]
2
2016-07-29T19:27:54.000Z
2020-10-09T01:09:08.000Z
# # Copyright 2011 Facebook # # 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, s...
37.100962
85
0.650253
b4b586e14d2c61dd3a6f68b3ca5dc1f752860028
11,940
py
Python
homeassistant/components/mqtt/device_trigger.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
4
2018-03-06T20:21:56.000Z
2022-03-02T11:47:33.000Z
homeassistant/components/mqtt/device_trigger.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
69
2020-08-04T09:03:43.000Z
2022-03-31T06:13:01.000Z
homeassistant/components/mqtt/device_trigger.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
1
2020-12-13T08:27:33.000Z
2020-12-13T08:27:33.000Z
"""Provides device automations for MQTT.""" from __future__ import annotations import logging from typing import Any, Callable import attr import voluptuous as vol from homeassistant.components.automation import AutomationActionType from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA fr...
34.810496
88
0.674707
de5004bf203f3396abf84a4a4bf4f35d94faff27
4,931
py
Python
eventdriven/rltools/tfutil.py
sisl/rllab
932d6cc0911071443d1d43277ee011f4d832631e
[ "MIT" ]
9
2018-04-04T10:46:31.000Z
2020-05-19T09:47:36.000Z
eventdriven/rltools/tfutil.py
sisl/rllab
932d6cc0911071443d1d43277ee011f4d832631e
[ "MIT" ]
null
null
null
eventdriven/rltools/tfutil.py
sisl/rllab
932d6cc0911071443d1d43277ee011f4d832631e
[ "MIT" ]
2
2021-12-11T22:53:05.000Z
2021-12-14T08:18:16.000Z
import numpy as np import tensorflow as tf from rltools import util def logsumexp(a, axis, name=None): """ Like scipy.misc.logsumexp with keepdims=True (does NOT eliminate the singleton axis) """ with tf.op_scope([a, axis], name, 'logsumexp') as scope: a = tf.convert_to_tensor(a, name='a'...
37.930769
102
0.635976
c0fda86d8e5bfabe7337a5c81a3157b98644593b
349
py
Python
foursight_core/checks/helpers/confchecks.py
4dn-dcic/foursight-core
2e5ea594d38d04ad58f63ee42e5fb4b920bfb63c
[ "MIT" ]
null
null
null
foursight_core/checks/helpers/confchecks.py
4dn-dcic/foursight-core
2e5ea594d38d04ad58f63ee42e5fb4b920bfb63c
[ "MIT" ]
3
2021-08-11T07:09:24.000Z
2022-02-16T18:58:45.000Z
foursight_core/checks/helpers/confchecks.py
4dn-dcic/foursight-core
2e5ea594d38d04ad58f63ee42e5fb4b920bfb63c
[ "MIT" ]
null
null
null
# Create a new confchecks.py for a new project (e.g. foursight-cgap) from ...decorators import Decorators # replace placeholder_prefix with an actual foursight_prefix deco = Decorators('placeholder_prefix') CheckResult = deco.CheckResult ActionResult = deco.ActionResult check_function = deco.check_function action_fun...
34.9
68
0.819484
395a26f225e90ab6d0182b745330b1f40d7a0d95
3,050
py
Python
uol_redacoes_xml/crawler/commons.py
gpassero/UOLRedacoesXML
94b74fc91c4e7a6b582ebc3708aa0dca2ba12ca6
[ "Apache-2.0" ]
24
2017-01-05T11:19:37.000Z
2021-11-26T16:49:00.000Z
uol_redacoes_xml/crawler/commons.py
gpassero/UOLRedacoesXML
94b74fc91c4e7a6b582ebc3708aa0dca2ba12ca6
[ "Apache-2.0" ]
null
null
null
uol_redacoes_xml/crawler/commons.py
gpassero/UOLRedacoesXML
94b74fc91c4e7a6b582ebc3708aa0dca2ba12ca6
[ "Apache-2.0" ]
8
2017-03-28T13:54:51.000Z
2021-06-27T11:51:55.000Z
# -*- coding: utf-8 -*- """ Created on Sun Aug 28 23:35:21 2016 @author: Guilherme Passero <guilherme.passero0@gmail.com> """ from http.client import HTTPSConnection as httpc from xml.etree.ElementTree import tostring from xml.dom import minidom from pyquery import PyQuery as pq import html2text import re import bz2 ...
27.232143
99
0.564262
de5265ab6bdf90b564421b43d429b5507de7b1d4
6,637
py
Python
cat/apps/competition/views.py
oyusec/oyusec.github.io
9f9e81a953d7d624509bf055296b18da6ae769a9
[ "MIT" ]
6
2021-01-19T16:01:05.000Z
2021-04-21T09:41:51.000Z
cat/apps/competition/views.py
ByamB4/oyusec.github.io
13094c310b926e0922fae0eb95e73d0c2774f574
[ "MIT" ]
12
2021-05-03T01:44:16.000Z
2021-07-04T09:36:44.000Z
cat/apps/competition/views.py
oyusec/oyusec.github.io
9f9e81a953d7d624509bf055296b18da6ae769a9
[ "MIT" ]
2
2021-12-09T01:25:30.000Z
2022-01-10T23:37:59.000Z
from django.db import models from django.shortcuts import get_object_or_404 from django.utils.timezone import localdate from rest_framework import status from rest_framework.views import APIView from rest_framework.renderers import JSONRenderer from rest_framework.response import Response from rest_framework.permission...
31.908654
138
0.588368
8fd9f08113c9e73466bce6832cacfb3c1f41ec0e
1,534
py
Python
s3_sqs_consumer.py
lucksjb/localstack-demo
9e4537ca4557154accfe56134d4cc8510dc1211d
[ "MIT" ]
null
null
null
s3_sqs_consumer.py
lucksjb/localstack-demo
9e4537ca4557154accfe56134d4cc8510dc1211d
[ "MIT" ]
2
2021-11-08T01:45:33.000Z
2021-11-08T01:46:37.000Z
s3_sqs_consumer.py
lucksjb/localstack-demo
9e4537ca4557154accfe56134d4cc8510dc1211d
[ "MIT" ]
1
2021-12-07T17:51:07.000Z
2021-12-07T17:51:07.000Z
import json import os import io import logging import boto3 from dotenv import load_dotenv # carrega as variaveis de ambiente load_dotenv() # configura um logger logging.basicConfig(level=logging.INFO) # obtem um cliente para integrar com servico SQS, e a URL da fila sqs = boto3.client('sqs', endpoint_url=os.getenv(...
34.863636
81
0.672099
54d3d0a218dec3588844333cd47e1f92489d8df9
1,411
py
Python
tensorflow/contrib/gan/python/features/python/spectral_normalization.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
36
2016-12-17T15:25:25.000Z
2022-01-29T21:50:53.000Z
tensorflow/contrib/gan/python/features/python/spectral_normalization.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
59
2019-06-17T09:37:49.000Z
2022-01-19T01:21:34.000Z
tensorflow/contrib/gan/python/features/python/spectral_normalization.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
36
2017-07-27T21:12:40.000Z
2022-02-03T16:45:56.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.757576
87
0.76258
4dcac23de49fbe69f2ce3facaa0f9530cf699a0d
3,148
py
Python
app/auth/routes.py
hi-guy/StudyFlask
c0f8e0df3ec76bfdd9ccaabfe86c54529f977d32
[ "MIT" ]
1
2018-07-18T14:00:37.000Z
2018-07-18T14:00:37.000Z
app/auth/routes.py
kevinmel2000/flask-demo
bd27185c85823d5e88e1ce51edc237706f2145f3
[ "MIT" ]
null
null
null
app/auth/routes.py
kevinmel2000/flask-demo
bd27185c85823d5e88e1ce51edc237706f2145f3
[ "MIT" ]
1
2020-07-07T04:14:04.000Z
2020-07-07T04:14:04.000Z
from flask import render_template, redirect, url_for, flash, request from werkzeug.urls import url_parse from flask_login import login_user, logout_user, current_user from flask_babel import _ from app import db from app.auth import bp from app.auth.forms import LoginForm, RegistrationForm, \ ResetPasswordRequestFo...
38.390244
78
0.68075
ac187e1df01d0bd2a4be348adfa83646d1949ba4
6,490
py
Python
setup.py
asford/dvc
4ed55d00511ea3d9115b76c463e1a466408b11ef
[ "Apache-2.0" ]
null
null
null
setup.py
asford/dvc
4ed55d00511ea3d9115b76c463e1a466408b11ef
[ "Apache-2.0" ]
null
null
null
setup.py
asford/dvc
4ed55d00511ea3d9115b76c463e1a466408b11ef
[ "Apache-2.0" ]
null
null
null
import importlib.util import os from setuptools import find_packages, setup from setuptools.command.build_py import build_py as _build_py # Prevents pkg_resources import in entry point script, # see https://github.com/ninjaaron/fast-entry_points. # This saves about 200 ms on startup time for non-wheel installs. try: ...
32.288557
79
0.632974
8edddd39f476967870a3fefe406abb65f77102c5
1,355
py
Python
Gathered CTF writeups/2016-09-09-asis-final/races/RACES.py
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
1
2022-03-27T06:00:41.000Z
2022-03-27T06:00:41.000Z
Gathered CTF writeups/2016-09-09-asis-final/races/RACES.py
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
null
null
null
Gathered CTF writeups/2016-09-09-asis-final/races/RACES.py
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
1
2022-03-27T06:01:42.000Z
2022-03-27T06:01:42.000Z
from Crypto.Util.number import * from gmpy import * def gen_prime(nbit): while True: prime = getPrime(nbit) if prime % 3 == 2: return prime def add(a, b, n): if a == 0: return b if b == 0: return a l = ((b[1] - a[1]) * invert(b[0] - a[0], n)) % n x = (l*l - a[0] - b[0]) % n ...
21.854839
52
0.436162
024704be56e8f589217059dcd2d95383513ccbcf
209
py
Python
problems/remove-duplicates-from-string/remove-duplicates-from-string.py
Yanpas/the-coding-interview
72ba881aabc05f7d2a7cb32a4bbb2b1d7d4c5436
[ "MIT" ]
1
2017-07-27T09:01:13.000Z
2017-07-27T09:01:13.000Z
problems/remove-duplicates-from-string/remove-duplicates-from-string.py
Yanpas/the-coding-interview
72ba881aabc05f7d2a7cb32a4bbb2b1d7d4c5436
[ "MIT" ]
null
null
null
problems/remove-duplicates-from-string/remove-duplicates-from-string.py
Yanpas/the-coding-interview
72ba881aabc05f7d2a7cb32a4bbb2b1d7d4c5436
[ "MIT" ]
2
2018-07-03T18:12:18.000Z
2021-03-19T20:27:54.000Z
from string import lower def remove_duplicates(string): seen = [] for ch in lower(string): if not ch in seen: seen.append(ch) return "".join(seen) print remove_duplicates("tree traversal")
19
41
0.684211
313a2d5477918ec60c08ea9b39420562a2cf43c2
32,718
py
Python
workspace/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py
attaoveisi/AttBot2_Localization
6ce84e26cc55fc391fdbcee168aa04102d59d375
[ "MIT" ]
1
2021-01-10T10:51:50.000Z
2021-01-10T10:51:50.000Z
workspace/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py
attaoveisi/AttBot2_Localization
6ce84e26cc55fc391fdbcee168aa04102d59d375
[ "MIT" ]
null
null
null
workspace/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py
attaoveisi/AttBot2_Localization
6ce84e26cc55fc391fdbcee168aa04102d59d375
[ "MIT" ]
null
null
null
##################################################################### # Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
40.194103
181
0.593863
f0e62cbddb63bcb326582a4761ad183bcdeb3224
9,018
py
Python
tests/test_phl_cpu.py
RobinCamarasa/MONAI
8207e1e2a3555ddc3fe938e058552651900dc951
[ "Apache-2.0" ]
null
null
null
tests/test_phl_cpu.py
RobinCamarasa/MONAI
8207e1e2a3555ddc3fe938e058552651900dc951
[ "Apache-2.0" ]
null
null
null
tests/test_phl_cpu.py
RobinCamarasa/MONAI
8207e1e2a3555ddc3fe938e058552651900dc951
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 MONAI Consortium # 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, s...
34.818533
111
0.378909
ac6f8626966b34fe600eeaaf372728c99d2e1e71
6,247
py
Python
exploreAgent.py
roboTurt/ROB537-FinalProject
32a15cb1454f16a8bfd13977670eacaf13bf3fbb
[ "MIT" ]
null
null
null
exploreAgent.py
roboTurt/ROB537-FinalProject
32a15cb1454f16a8bfd13977670eacaf13bf3fbb
[ "MIT" ]
null
null
null
exploreAgent.py
roboTurt/ROB537-FinalProject
32a15cb1454f16a8bfd13977670eacaf13bf3fbb
[ "MIT" ]
null
null
null
import gym import gym_Explore2D import numpy as np from collections import deque from collections import namedtuple import random import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torchvision.transforms as T #device = torch.device("cuda" if torch.cuda.is_available...
32.367876
129
0.653434
eee9902fce12cb28e805db262311152d58fec576
2,779
py
Python
data/data_split/data_split_potsdam.py
z1021190674/GMAUResNeXt_RS
a8a7444bf30e509cefc01b3be4b0587d367cda2e
[ "MIT" ]
1
2022-03-23T11:54:33.000Z
2022-03-23T11:54:33.000Z
data/data_split/data_split_potsdam.py
z1021190674/GMAUResNeXt_RS
a8a7444bf30e509cefc01b3be4b0587d367cda2e
[ "MIT" ]
null
null
null
data/data_split/data_split_potsdam.py
z1021190674/GMAUResNeXt_RS
a8a7444bf30e509cefc01b3be4b0587d367cda2e
[ "MIT" ]
null
null
null
""" Split the dataset according to the id of the tran/val/test split """ import sys print(sys.path) from osgeo import gdal_array from data_split_utils import get_path_list, get_data_split if __name__ == '__main__': ### Potsdam ### # the id of the split datasets train_id = '2_10, 3_10, 3_11, 3_12, 4_11, 4_...
40.275362
155
0.630802
40edc9a849a7d5d3af2a748ce33637e3597c2916
3,915
py
Python
auth0/v2/test/management/test_connections.py
maronnax/auth0-python
855e275da1f9fddc851f34df4a6b304eed8abb96
[ "MIT" ]
null
null
null
auth0/v2/test/management/test_connections.py
maronnax/auth0-python
855e275da1f9fddc851f34df4a6b304eed8abb96
[ "MIT" ]
null
null
null
auth0/v2/test/management/test_connections.py
maronnax/auth0-python
855e275da1f9fddc851f34df4a6b304eed8abb96
[ "MIT" ]
null
null
null
import unittest import mock from ...management.connections import Connections class TestConnection(unittest.TestCase): @mock.patch('auth0.v2.management.connections.RestClient') def test_all(self, mock_rc): mock_instance = mock_rc.return_value mock_instance.get.return_value = {} c = C...
37.285714
76
0.565006
930361dd5c40b41e73d01dd22ff326af57517ecc
513
py
Python
2014/03/django-rest-framework/src/demo3/serializers.py
stephanpoetschner/django-vienna
6045832e2ebf095896c62db2f1341b65f2acfa73
[ "MIT" ]
2
2017-12-11T03:56:46.000Z
2018-03-23T20:39:11.000Z
2014/03/django-rest-framework/src/demo3/serializers.py
stephanpoetschner/django-vienna
6045832e2ebf095896c62db2f1341b65f2acfa73
[ "MIT" ]
null
null
null
2014/03/django-rest-framework/src/demo3/serializers.py
stephanpoetschner/django-vienna
6045832e2ebf095896c62db2f1341b65f2acfa73
[ "MIT" ]
null
null
null
from .models import Book from rest_framework import serializers class BookSerializer(serializers.HyperlinkedModelSerializer): title = serializers.CharField(source='title') authors = serializers.Field(source='get_author_names') created_by = serializers.Field(source='created_by.username') class Meta: ...
30.176471
64
0.60039
3f99a5c3f145e85f0bbbf4e883b6b1f8a3251dc5
119,539
py
Python
pyemf.py
6tudent/pyemf
830e61008af8acf1830e5c91dc876313a771afdb
[ "BSD-3-Clause-No-Nuclear-Warranty" ]
16
2016-01-22T01:40:10.000Z
2021-07-22T02:19:24.000Z
pyemf.py
6tudent/pyemf
830e61008af8acf1830e5c91dc876313a771afdb
[ "BSD-3-Clause-No-Nuclear-Warranty" ]
1
2017-11-07T11:53:14.000Z
2017-11-07T11:53:14.000Z
pyemf.py
jeremysanders/pyemf
830e61008af8acf1830e5c91dc876313a771afdb
[ "BSD-3-Clause-No-Nuclear-Warranty" ]
11
2017-02-28T21:02:26.000Z
2020-10-21T19:23:29.000Z
#!/usr/bin/env python """ pyemf is a pure python module that provides a cross-platform ability to generate enhanced metafiles (.emf files), a vector graphics format defined by the ECMA-234 standard. Enhanced metafiles are a natively supported image and scalable clip-art format in the OpenOffice suite of tools and in...
30.816963
293
0.631334
3aae620eb618e6867f9f27ee50d0029674e076a4
564
py
Python
configs/_base_/models/lsgan/lsgan_128x128.py
plutoyuxie/mmgeneration
0a7f5d16c970de1766ebf049d7a0264fe506504b
[ "Apache-2.0" ]
718
2021-04-15T11:26:20.000Z
2022-03-31T03:11:56.000Z
configs/_base_/models/lsgan/lsgan_128x128.py
plutoyuxie/mmgeneration
0a7f5d16c970de1766ebf049d7a0264fe506504b
[ "Apache-2.0" ]
191
2021-04-15T12:13:34.000Z
2022-03-31T16:04:36.000Z
configs/_base_/models/lsgan/lsgan_128x128.py
plutoyuxie/mmgeneration
0a7f5d16c970de1766ebf049d7a0264fe506504b
[ "Apache-2.0" ]
107
2021-04-15T12:38:41.000Z
2022-03-27T02:47:16.000Z
# define GAN model model = dict( type='StaticUnconditionalGAN', generator=dict( type='LSGANGenerator', output_scale=128, base_channels=256, noise_size=1024), discriminator=dict( type='LSGANDiscriminator', input_scale=128, base_channels=64), gan_loss=dict(type='GAN...
28.2
70
0.664894
3bea37906b16ba8d27ce8c651239eb7db3c5afaf
13,106
py
Python
lib/xos-migrate/xosmigrate/main.py
iecedge/xos
566617f676fedcb2602266191c755d191b37018a
[ "Apache-2.0" ]
null
null
null
lib/xos-migrate/xosmigrate/main.py
iecedge/xos
566617f676fedcb2602266191c755d191b37018a
[ "Apache-2.0" ]
null
null
null
lib/xos-migrate/xosmigrate/main.py
iecedge/xos
566617f676fedcb2602266191c755d191b37018a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright 2017-present Open Networking 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 ap...
33.348601
119
0.654815
ca9cc5293211043fd6fd80e0c29c22f6b295a48f
91
py
Python
gwkenProject/gwkenApp/apps.py
cs-fullstack-2019-spring/django-formclassv2-cw-rsalcido
13877b7dd1a76bd7c81744ad525d2ef1abe0a328
[ "Apache-2.0" ]
null
null
null
gwkenProject/gwkenApp/apps.py
cs-fullstack-2019-spring/django-formclassv2-cw-rsalcido
13877b7dd1a76bd7c81744ad525d2ef1abe0a328
[ "Apache-2.0" ]
null
null
null
gwkenProject/gwkenApp/apps.py
cs-fullstack-2019-spring/django-formclassv2-cw-rsalcido
13877b7dd1a76bd7c81744ad525d2ef1abe0a328
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class GwkenappConfig(AppConfig): name = 'gwkenApp'
15.166667
33
0.758242
04c0fb21659a8a103feb46aacf68524153911d0e
727
py
Python
spinup/pddm_envs/__init__.py
RamiSketcher/spinningupMPAC
543a3587ef88cd098ec2f060f183d0f9969e92e3
[ "MIT" ]
null
null
null
spinup/pddm_envs/__init__.py
RamiSketcher/spinningupMPAC
543a3587ef88cd098ec2f060f183d0f9969e92e3
[ "MIT" ]
null
null
null
spinup/pddm_envs/__init__.py
RamiSketcher/spinningupMPAC
543a3587ef88cd098ec2f060f183d0f9969e92e3
[ "MIT" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.35
74
0.782669
f487772bd46dc8b11c990781ca97fe4b9b4104ae
652
py
Python
airbyte-integrations/connectors/source-helium-account-hotspots/setup.py
afredojala/airbyte
b5e713e0443180d1e4a6a81b0b4baa08e1cec67f
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-helium-account-hotspots/setup.py
afredojala/airbyte
b5e713e0443180d1e4a6a81b0b4baa08e1cec67f
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-helium-account-hotspots/setup.py
afredojala/airbyte
b5e713e0443180d1e4a6a81b0b4baa08e1cec67f
[ "MIT" ]
null
null
null
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # from setuptools import find_packages, setup MAIN_REQUIREMENTS = [ "airbyte-cdk~=0.1", ] TEST_REQUIREMENTS = [ "pytest~=6.1", "pytest-mock~=3.6.1", "source-acceptance-test", ] setup( name="source_helium_account_hotspots", descripti...
21.733333
77
0.667178
d222adb0526d85207f77db9545cf70792d5cee9e
5,435
py
Python
meeting/gate/migrations/0001_initial.py
mauler/meeting-gate
75e66834e4090da09a71d93e166d030daf438f21
[ "MIT" ]
1
2018-01-17T13:03:08.000Z
2018-01-17T13:03:08.000Z
meeting/gate/migrations/0001_initial.py
mauler/meeting-gate
75e66834e4090da09a71d93e166d030daf438f21
[ "MIT" ]
null
null
null
meeting/gate/migrations/0001_initial.py
mauler/meeting-gate
75e66834e4090da09a71d93e166d030daf438f21
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2017-12-24 17:04 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
50.794393
194
0.588224
85760511a16164d9673734ae07fe6697794a9930
2,403
py
Python
Advanced workshops/reInvent2019-400/src/markov/rewards/reward_function.py
espittle/aws-deepracer-workshops
aa3679f98d83fac7239e939ad593ca2876559519
[ "MIT-0" ]
1,116
2018-11-28T19:50:34.000Z
2022-03-31T08:24:16.000Z
Advanced workshops/reInvent2019-400/src/markov/rewards/reward_function.py
espittle/aws-deepracer-workshops
aa3679f98d83fac7239e939ad593ca2876559519
[ "MIT-0" ]
31
2018-11-29T20:34:11.000Z
2021-09-23T16:48:44.000Z
Advanced workshops/reInvent2019-400/src/markov/rewards/reward_function.py
espittle/aws-deepracer-workshops
aa3679f98d83fac7239e939ad593ca2876559519
[ "MIT-0" ]
619
2018-11-28T19:04:02.000Z
2022-03-21T13:42:21.000Z
""" Instead of the bubble penalty, we consider both the distance between the learner car and the closest bot car, as well as if the learner car is within the wedge area apexed at the bot car. The assumption is within the wedge is more possible to crash. """ def reward_function(params): reward = 1e-3 ...
32.917808
89
0.632127
d77e44a77ea33c16a428165aaccfea7a86e20259
1,696
py
Python
examples/synthetic/tension/eval_speed.py
Argonne-National-Laboratory/pyoptmat
a6e5e8d0b93c77374d4ccbc65a86262eec5df77b
[ "MIT" ]
null
null
null
examples/synthetic/tension/eval_speed.py
Argonne-National-Laboratory/pyoptmat
a6e5e8d0b93c77374d4ccbc65a86262eec5df77b
[ "MIT" ]
1
2022-03-30T22:20:38.000Z
2022-03-31T15:02:22.000Z
examples/synthetic/tension/eval_speed.py
Argonne-National-Laboratory/pyoptmat
a6e5e8d0b93c77374d4ccbc65a86262eec5df77b
[ "MIT" ]
2
2021-11-16T15:13:54.000Z
2022-01-06T21:35:42.000Z
#!/usr/bin/env python3 import sys sys.path.append('../../..') sys.path.append('.') import numpy as np import numpy.random as ra import xarray as xr import torch from maker import make_model, load_data, sf from pyoptmat import optimize from tqdm import tqdm import matplotlib.pyplot as plt import time import warni...
24.228571
84
0.680425
4b20554a9a60a2e58f01260faddea52b742415e1
20,422
py
Python
test/functional/test_framework/test_framework.py
leviathan-help/LVT-MasternodeCoin
201329113c9e7ab79c193abe262bdfba6b540885
[ "MIT" ]
1
2019-11-13T09:17:16.000Z
2019-11-13T09:17:16.000Z
test/functional/test_framework/test_framework.py
leviathan-help/LVT-MasternodeCoin
201329113c9e7ab79c193abe262bdfba6b540885
[ "MIT" ]
null
null
null
test/functional/test_framework/test_framework.py
leviathan-help/LVT-MasternodeCoin
201329113c9e7ab79c193abe262bdfba6b540885
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Base class for RPC testing.""" from enum import Enum import logging import optparse import os import p...
41.934292
310
0.621438
e1bda1d6cae40bc99636884978a3ffbe3a868d22
970
py
Python
grr/server/data_server/constants.py
mikecb/grr
52fdd977729af2a09a147301c55b8b7f1eccfa67
[ "Apache-2.0" ]
5
2017-03-17T08:25:09.000Z
2022-02-22T05:28:14.000Z
grr/server/data_server/constants.py
mikecb/grr
52fdd977729af2a09a147301c55b8b7f1eccfa67
[ "Apache-2.0" ]
null
null
null
grr/server/data_server/constants.py
mikecb/grr
52fdd977729af2a09a147301c55b8b7f1eccfa67
[ "Apache-2.0" ]
3
2018-12-07T07:04:37.000Z
2022-02-22T05:28:16.000Z
#!/usr/bin/env python """Constants for the data servers.""" # Range for consistent hashing. MAX_RANGE = 2**64 # Important file names for rebalancing. REBALANCE_DIRECTORY = ".GRR_REBALANCE" TRANSACTION_FILENAME = ".TRANSACTION" REMOVE_FILENAME = ".TRANSACTION_REMOVE" # HTTP status codes. RESPONSE_OK = 200 RESPONSE_...
26.944444
39
0.839175
598f57250a3c9b5c9bd8d27442c94a07e0e0e09e
8,979
py
Python
dist/ba_data/python/ba/macmusicapp.py
Bartixxx32/Bombsquad-Ballistica-Modded-Server
26d36f07a5b96702e4fbdf172c0d66671f1ee0bd
[ "MIT" ]
317
2020-04-04T00:33:10.000Z
2022-03-28T01:07:09.000Z
assets/src/ba_data/python/ba/macmusicapp.py
Alshahriah/ballistica
326f6677a0118667e93ce9034849622ebef706fa
[ "MIT" ]
315
2020-04-04T22:33:10.000Z
2022-03-31T22:50:02.000Z
assets/src/ba_data/python/ba/macmusicapp.py
Alshahriah/ballistica
326f6677a0118667e93ce9034849622ebef706fa
[ "MIT" ]
97
2020-04-04T01:32:17.000Z
2022-03-16T19:02:59.000Z
# Released under the MIT License. See LICENSE for details. # """Music playback functionality using the Mac Music (formerly iTunes) app.""" from __future__ import annotations import threading from typing import TYPE_CHECKING import _ba from ba._music import MusicPlayer if TYPE_CHECKING: from typing import Optiona...
38.536481
79
0.588484
ac3e0a83dc394f64c0099b7427feb164a99daf26
4,645
py
Python
librivox.py
dendisuhubdy/parallel_wavenet_vocoder
8f2bd7c0bd30cb90cc7ff8438ce78545c409227b
[ "MIT" ]
155
2018-08-02T09:08:08.000Z
2022-01-03T22:14:52.000Z
librivox.py
popo0293/DTT_wavenet_pytorch
151c3f13ed62b133cc42bdfa25cf62c7bcf9e5a3
[ "MIT" ]
1
2018-10-09T01:38:23.000Z
2018-10-09T03:46:05.000Z
librivox.py
popo0293/DTT_wavenet_pytorch
151c3f13ed62b133cc42bdfa25cf62c7bcf9e5a3
[ "MIT" ]
34
2018-08-06T02:46:34.000Z
2021-03-15T02:18:20.000Z
from concurrent.futures import ProcessPoolExecutor from functools import partial import numpy as np import os import audio from nnmnkwii import preprocessing as P from hparams import hparams from os.path import exists import librosa from wavenet_vocoder.util import is_mulaw_quantize, is_mulaw, is_raw def build_from...
38.708333
107
0.640043
5bd5312f5de244f019439c181b150d5a8566bc78
104
py
Python
src/__init__.py
UrbanCCD-UChicago/sustainableSystems
d18b48cb161eb2bad9a4f200a4954444e4ec9ef1
[ "MIT" ]
null
null
null
src/__init__.py
UrbanCCD-UChicago/sustainableSystems
d18b48cb161eb2bad9a4f200a4954444e4ec9ef1
[ "MIT" ]
null
null
null
src/__init__.py
UrbanCCD-UChicago/sustainableSystems
d18b48cb161eb2bad9a4f200a4954444e4ec9ef1
[ "MIT" ]
null
null
null
#each sub directory of the package must be declared in this list __name__ = 'src' __all__ = ['utils']
20.8
64
0.721154
2939bf292702f0c2e295ff7de2581e547391a742
419
py
Python
bigpipe_response/javascript_dom_bind/react_dom_bind.py
shay-t/bigpipe-response
2a68dde1d7cfb3f837e1c108d45df1465607cd25
[ "MIT" ]
13
2020-01-23T18:30:37.000Z
2020-02-14T19:05:28.000Z
bigpipe_response/javascript_dom_bind/react_dom_bind.py
shay-t/bigpipe-response
2a68dde1d7cfb3f837e1c108d45df1465607cd25
[ "MIT" ]
3
2022-02-14T19:39:36.000Z
2022-02-27T20:26:05.000Z
bigpipe_response/javascript_dom_bind/react_dom_bind.py
shay-t/bigpipe-response
2a68dde1d7cfb3f837e1c108d45df1465607cd25
[ "MIT" ]
1
2021-12-20T14:47:18.000Z
2021-12-20T14:47:18.000Z
import json from bigpipe_response.javascript_dom_bind.javascript_dom_bind import JavascriptDOMBind class ReactDomBind(JavascriptDOMBind): def generate_bind_command(self, render_source: str, render_context: dict, target_element: str): return '\nReactDOM.render(React.createElement({},\n {}),\n doc...
41.9
168
0.770883
1e983ca455f3c5fe0e702f7ca9a4779a09626b40
67
py
Python
tests/__init__.py
praveenbommalibits/JSONManipulator
51c6d9ad916d07d96643599ec05faa1abd6da82b
[ "MIT" ]
2
2020-07-21T08:03:41.000Z
2020-09-27T18:19:06.000Z
tests/__init__.py
praveenbommalibits/JSONManipulator
51c6d9ad916d07d96643599ec05faa1abd6da82b
[ "MIT" ]
8
2020-09-05T11:47:26.000Z
2020-10-19T21:25:12.000Z
tests/__init__.py
praveenbommalibits/JSONManipulator
51c6d9ad916d07d96643599ec05faa1abd6da82b
[ "MIT" ]
3
2020-07-24T05:24:14.000Z
2020-10-31T20:07:58.000Z
# -*- coding: utf-8 -*- """Pytest package for JSONManipulator."""
16.75
41
0.61194
fea2f2b0da51abdec5c76ea821f782d5173a7c4e
20,759
py
Python
apriori/apriorieficiente.py
cipiasentini/final
cecb39c1693839b5ea9f4b8a74df7cde9875d8c8
[ "MIT" ]
null
null
null
apriori/apriorieficiente.py
cipiasentini/final
cecb39c1693839b5ea9f4b8a74df7cde9875d8c8
[ "MIT" ]
2
2021-01-28T19:27:39.000Z
2022-03-25T18:18:50.000Z
apriori/apriorieficiente.py
cipiasentini/final
cecb39c1693839b5ea9f4b8a74df7cde9875d8c8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys import os from itertools import chain, combinations ''' ____________________________________________________________________ | CONVENCIONES DE NOMENCLATURA | |▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔| ...
46.233853
143
0.593622
46f3555b1b5ebe587a5eb6d109f1db97ab41629b
116
py
Python
apps/utils/tests/models/socials/__init__.py
jorgesaw/oclock
2a78bd4d1ab40eaa65ea346cf8c37556fcbbeca5
[ "MIT" ]
null
null
null
apps/utils/tests/models/socials/__init__.py
jorgesaw/oclock
2a78bd4d1ab40eaa65ea346cf8c37556fcbbeca5
[ "MIT" ]
null
null
null
apps/utils/tests/models/socials/__init__.py
jorgesaw/oclock
2a78bd4d1ab40eaa65ea346cf8c37556fcbbeca5
[ "MIT" ]
null
null
null
from .socials import ( create_link, create_social, LINK_USERNAME, SOCIAL_KEY_NAME, SOCIAL_NAME )
16.571429
22
0.689655
fb3eb52a532c16ef4c6b112ba1e0757a11a055b2
2,270
py
Python
hoomd/hpmc/validation/disk_eos.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
2
2020-03-30T14:38:50.000Z
2020-06-02T05:53:41.000Z
hoomd/hpmc/validation/disk_eos.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
null
null
null
hoomd/hpmc/validation/disk_eos.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
1
2020-05-20T07:00:08.000Z
2020-05-20T07:00:08.000Z
from hoomd import * from hoomd import hpmc import math import numpy as np import unittest import BlockAverage context.initialize() phi_p_ref = 0.698; rel_err_cs = 0.0001; # guesstimate P_ref = 9.1709; P_ref_err = 0.0002; # actual n = 256; N = n**2 a = math.sqrt(math.pi / (4*phi_p_ref)); class diskEOS_test(unittest....
32.898551
153
0.629075
808c1e685ce1e0674f1029b9611b1800cfd1d50b
410
py
Python
src/url_downloader.py
IBMPredictiveAnalytics/Python_URLDownloader
f001d09d6fbfd6bfe28ab268edfb80749c25ba0e
[ "Apache-2.0" ]
null
null
null
src/url_downloader.py
IBMPredictiveAnalytics/Python_URLDownloader
f001d09d6fbfd6bfe28ab268edfb80749c25ba0e
[ "Apache-2.0" ]
null
null
null
src/url_downloader.py
IBMPredictiveAnalytics/Python_URLDownloader
f001d09d6fbfd6bfe28ab268edfb80749c25ba0e
[ "Apache-2.0" ]
null
null
null
# encoding=utf-8 import sys import urllib2 if len(sys.argv) > 1 and sys.argv[1] == "-test": url = sys.argv[2] filePath = sys.argv[3] else: url = '%%url%%' filePath = '%%path%%' if not url or not filePath: raise "must specify values for both URL and file path" req = urllib2.Request(url) content =...
19.52381
58
0.64878
f695848340563e3b2fd84cd3b690191d236fecca
12,004
py
Python
classifier/naive_bayes.py
RLIProject/tornado
bac94cdaeadc4b02e9ef6b29877decb4b14a3d1c
[ "MIT" ]
null
null
null
classifier/naive_bayes.py
RLIProject/tornado
bac94cdaeadc4b02e9ef6b29877decb4b14a3d1c
[ "MIT" ]
null
null
null
classifier/naive_bayes.py
RLIProject/tornado
bac94cdaeadc4b02e9ef6b29877decb4b14a3d1c
[ "MIT" ]
null
null
null
""" The Tornado Framework By Ali Pesaranghader University of Ottawa, Ontario, Canada E-mail: apesaran -at- uottawa -dot- ca / alipsgh -at- gmail -dot- com --- ** The Hoeffding Tree Implementation ** Paper: Domingos, Pedro, and Geoff Hulten. "Mining high-speed data streams." Published in: Proceedings of the sixt...
39.880399
126
0.626208
96a9c423173277e94f2f7be42972113c3c211a10
8,515
py
Python
kedro_kubeflow/cli.py
michalbrys/kedro-kubeflow
be5f0b1f35462baf0d3f9041bc87f2a3cc6a7c9a
[ "Apache-2.0" ]
null
null
null
kedro_kubeflow/cli.py
michalbrys/kedro-kubeflow
be5f0b1f35462baf0d3f9041bc87f2a3cc6a7c9a
[ "Apache-2.0" ]
null
null
null
kedro_kubeflow/cli.py
michalbrys/kedro-kubeflow
be5f0b1f35462baf0d3f9041bc87f2a3cc6a7c9a
[ "Apache-2.0" ]
null
null
null
import logging import os import webbrowser from pathlib import Path import click from .auth import AuthHandler from .config import PluginConfig from .context_helper import ContextHelper LOG = logging.getLogger(__name__) def format_params(params: list): return dict((p[: p.find(":")], p[p.find(":") + 1 :]) for p...
26.119632
85
0.677393
6ca3e15e30f2b5c08cf6960512548aceba059723
9,555
py
Python
masakari/context.py
iorchard/masakari
4f1705d9940652719d156407b743866ce78e9a53
[ "Apache-2.0" ]
null
null
null
masakari/context.py
iorchard/masakari
4f1705d9940652719d156407b743866ce78e9a53
[ "Apache-2.0" ]
null
null
null
masakari/context.py
iorchard/masakari
4f1705d9940652719d156407b743866ce78e9a53
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 NTT DATA # 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 appl...
38.528226
81
0.630246
a4961d759548c1103b085f3b1334474386e86f43
356
py
Python
module_use.py
vigneshbharathi68/Chadura-Assessment
db3789d945506316c420497fe13a3068ff61d974
[ "OML", "Linux-OpenIB" ]
1
2020-08-25T01:57:17.000Z
2020-08-25T01:57:17.000Z
module_use.py
vigneshbharathi68/Chadura-Assessment
db3789d945506316c420497fe13a3068ff61d974
[ "OML", "Linux-OpenIB" ]
1
2020-08-29T18:37:08.000Z
2020-08-29T18:37:08.000Z
module_use.py
vigneshbharathi68/Chadura-Assessment
db3789d945506316c420497fe13a3068ff61d974
[ "OML", "Linux-OpenIB" ]
null
null
null
import Calc import Dict import Greet #Import the module Calc where I definied funtions, and accessed here a = 1 b = 2 c = Calc.add(a, b) print(c) #Import the Module named Dict, and access the person1 Dictionary d = Dict.person1["country"] print(d) #import greeting function and call the greeting fun...
17.8
69
0.710674
bf592bf264ed6268df86f7ad0123bd6f12dd98b5
12,712
py
Python
server/src/utils.py
mikepfrank/COSMICi
e91ec9ed30ecff7e80501b3743766c31e1a99285
[ "MIT" ]
null
null
null
server/src/utils.py
mikepfrank/COSMICi
e91ec9ed30ecff7e80501b3743766c31e1a99285
[ "MIT" ]
null
null
null
server/src/utils.py
mikepfrank/COSMICi
e91ec9ed30ecff7e80501b3743766c31e1a99285
[ "MIT" ]
null
null
null
#|***************************************************************************** #| TOP OF FILE #|***************************************************************************** #| #| FILE NAME: utils.py [python module source code] #| #| Miscellaneous util...
38.638298
113
0.52006
125602e2106c630ceae7420313338b531750a62c
193
py
Python
profilelambda/__init__.py
hvnsweeting/profilelambda
ee34a75eb5e7fe4c38269317939901c87f9afcfb
[ "MIT" ]
null
null
null
profilelambda/__init__.py
hvnsweeting/profilelambda
ee34a75eb5e7fe4c38269317939901c87f9afcfb
[ "MIT" ]
null
null
null
profilelambda/__init__.py
hvnsweeting/profilelambda
ee34a75eb5e7fe4c38269317939901c87f9afcfb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Top-level package for profilelambda.""" __author__ = """Viet Hung Nguyen""" __email__ = 'hvn@familug.org' __version__ = '0.4.0' from .profilelambda import profile
19.3
42
0.678756
409e3eb1f448ee73bc9f39be26b36aa23a7d8a39
7,842
py
Python
tests/unit/cache/origin/test_fastly.py
ewdurbin/warehouse
6a23d2732c3a6a948cb10281afb42650af0b2394
[ "Apache-2.0" ]
4
2018-03-29T10:42:56.000Z
2021-11-17T10:21:43.000Z
tests/unit/cache/origin/test_fastly.py
ewdurbin/warehouse
6a23d2732c3a6a948cb10281afb42650af0b2394
[ "Apache-2.0" ]
258
2021-11-29T18:29:38.000Z
2022-03-31T18:34:18.000Z
tests/unit/cache/origin/test_fastly.py
alanbato/warehouse
4774aee21f41fe1ffe0e2bf22440666494acbcad
[ "Apache-2.0" ]
1
2020-12-01T21:12:24.000Z
2020-12-01T21:12:24.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
35.484163
87
0.60533
2ae3eb05103bddceaf967150efec5bcb54ffa38a
1,530
py
Python
ansiblelater/rules/CheckNativeYaml.py
robertdebock/ansible-later
427356cf617f097fce66dd32b2a227a6d6bbf59c
[ "MIT" ]
null
null
null
ansiblelater/rules/CheckNativeYaml.py
robertdebock/ansible-later
427356cf617f097fce66dd32b2a227a6d6bbf59c
[ "MIT" ]
null
null
null
ansiblelater/rules/CheckNativeYaml.py
robertdebock/ansible-later
427356cf617f097fce66dd32b2a227a6d6bbf59c
[ "MIT" ]
null
null
null
from ansiblelater.standard import StandardBase class CheckNativeYaml(StandardBase): sid = "LINT0008" description = "Use YAML format for tasks and handlers rather than key=value" helptext = "task arguments appear to be in key value rather than YAML format" version = "0.1" types = ["playbook", "tas...
41.351351
91
0.563399
09a195c343e9805bed9660f6cc8ae53a2e9308f8
3,833
py
Python
tests/test_importers.py
nopria/cadquery
f38f9cb2523dd8a10adf04c767570298134440eb
[ "Apache-2.0" ]
null
null
null
tests/test_importers.py
nopria/cadquery
f38f9cb2523dd8a10adf04c767570298134440eb
[ "Apache-2.0" ]
null
null
null
tests/test_importers.py
nopria/cadquery
f38f9cb2523dd8a10adf04c767570298134440eb
[ "Apache-2.0" ]
null
null
null
""" Tests file importers such as STEP """ # core modules import tempfile import os from cadquery import importers, Workplane from tests import BaseTest # where unit test output will be saved OUTDIR = tempfile.gettempdir() # test data directory testdataDir = os.path.join(os.path.dirname(__file__), "testdata") c...
32.760684
94
0.60527
20b9933fa4e26fdfb43cc4a7c921a30e70b9b553
4,836
py
Python
linear_regression_on_Boston_housing_dataset.py
installbtien/linear_regression_on_Boston_housing_dataset
f20edbaa4bdaccb5023d83803712d844f45baaf5
[ "MIT" ]
null
null
null
linear_regression_on_Boston_housing_dataset.py
installbtien/linear_regression_on_Boston_housing_dataset
f20edbaa4bdaccb5023d83803712d844f45baaf5
[ "MIT" ]
null
null
null
linear_regression_on_Boston_housing_dataset.py
installbtien/linear_regression_on_Boston_housing_dataset
f20edbaa4bdaccb5023d83803712d844f45baaf5
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from sklearn.datasets import load_boston from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_squared_error from sklearn.metrics import ...
45.622642
127
0.644127
35a84aaadb7267ca4cab3d15dd7b7881c246e487
3,305
py
Python
nbs/ReactiveX/rxtrio/trioscheduler.py
pramasoul/aix
98333b875f6c6cda6dee86e6eab02c5ddc622543
[ "MIT" ]
null
null
null
nbs/ReactiveX/rxtrio/trioscheduler.py
pramasoul/aix
98333b875f6c6cda6dee86e6eab02c5ddc622543
[ "MIT" ]
1
2021-11-29T03:44:00.000Z
2021-12-19T05:34:04.000Z
nbs/ReactiveX/rxtrio/trioscheduler.py
pramasoul/aix
98333b875f6c6cda6dee86e6eab02c5ddc622543
[ "MIT" ]
null
null
null
### WIP ### from typing import Any, Optional from rx.core import typing from rx.disposable import CompositeDisposable, Disposable, SingleAssignmentDisposable #from ..periodicscheduler import PeriodicScheduler from rx.scheduler.periodicscheduler import PeriodicScheduler class TrioScheduler(PeriodicScheduler): ""...
31.47619
85
0.587897
07df900a1d29c2580b912555cfefe680a8341509
814
py
Python
my_classes/.history/ModulesPackages_PackageNamespaces/example3b/importer_20210726184631.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/.history/ModulesPackages_PackageNamespaces/example3b/importer_20210726184631.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/.history/ModulesPackages_PackageNamespaces/example3b/importer_20210726184631.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
import os.path import types import sys def import_(module_name, module_file. module_path): if module_name in sys.modules: return sys.modules[module_name] module_rel_file_path = os.path.join(module_path, module_file) module_abs_file_path = os.path.abspath(module_rel_file_path) # read source...
24.666667
77
0.72113
3ca765fb4ada973c543f6347cdc4a0fbf4478a9f
3,991
py
Python
Lib/test/test_importlib/import_/test_caching.py
oleksandr-pavlyk/cpython
eb002dbe0da9622245a355db5f0cd5aa2fc70b40
[ "0BSD" ]
5
2021-12-03T23:11:53.000Z
2022-01-08T21:02:50.000Z
Lib/test/test_importlib/import_/test_caching.py
dalakatt/cpython
2f49b97cc5426087b46515254b9a97a22ee8c807
[ "0BSD" ]
8
2022-01-07T11:31:11.000Z
2022-03-04T00:07:16.000Z
Lib/test/test_importlib/import_/test_caching.py
dalakatt/cpython
2f49b97cc5426087b46515254b9a97a22ee8c807
[ "0BSD" ]
3
2017-10-18T09:35:14.000Z
2018-09-09T16:40:13.000Z
"""Test that sys.modules is used properly by import.""" from test.test_importlib import util import sys from types import MethodType import unittest import warnings class UseCache: """When it comes to sys.modules, import prefers it over anything else. Once a name has been resolved, sys.modules is checked to...
39.514851
79
0.643197
ecf77043729dac9519b2414027a5573d9226a958
24,582
py
Python
python/sandbox/explainer.py
geometer/sandbox
373ec96e69df76744a19b51f7caa865cbc6b58cd
[ "Apache-2.0" ]
6
2020-04-19T11:26:18.000Z
2021-06-21T18:42:51.000Z
python/sandbox/explainer.py
geometer/sandbox
373ec96e69df76744a19b51f7caa865cbc6b58cd
[ "Apache-2.0" ]
31
2020-04-21T17:24:39.000Z
2020-08-27T15:59:12.000Z
python/sandbox/explainer.py
geometer/sandbox
373ec96e69df76744a19b51f7caa865cbc6b58cd
[ "Apache-2.0" ]
null
null
null
import itertools import time import sympy as sp from .core import Constraint from .predefined import enumerate_predefined_properties from .property import * from .propertyset import PropertySet from .reason import Reason from .rules.abstract import PredefinedPropertyRule from .rules.advanced import * from .rules.basic...
49.761134
173
0.551176
de349e2e0e45a054e97ed49798844286fda2f70b
3,225
py
Python
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/token_py3.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
null
null
null
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/token_py3.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
null
null
null
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/token_py3.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
41.346154
120
0.635969
ab8a997943eb95aaab636ad73f1db579d5a228fc
138,073
py
Python
joby_m_anthony_iii/numerical_methods.py
jmanthony3/joby_m_anthony_iii
87ec9cbb29040ddff40541c7d86f58221751dcfe
[ "MIT" ]
null
null
null
joby_m_anthony_iii/numerical_methods.py
jmanthony3/joby_m_anthony_iii
87ec9cbb29040ddff40541c7d86f58221751dcfe
[ "MIT" ]
null
null
null
joby_m_anthony_iii/numerical_methods.py
jmanthony3/joby_m_anthony_iii
87ec9cbb29040ddff40541c7d86f58221751dcfe
[ "MIT" ]
null
null
null
################################# ## Preamble # import necessary modules/tools import math import numba as nb import numpy as np import os import pandas as pd import scipy as sc import sympy as sp import sys from types import FunctionType # # # # # # # # # ################################# ## Universal...
30.365736
390
0.633831
857c24f0249e3afd05bda2523a9b87bd9e7b77c7
1,476
py
Python
wblib/data_models.py
AartGoossens/wattbikelib
3b0500ff47abb331e9d425cd1a9ef205236156f4
[ "MIT" ]
null
null
null
wblib/data_models.py
AartGoossens/wattbikelib
3b0500ff47abb331e9d425cd1a9ef205236156f4
[ "MIT" ]
3
2017-11-25T19:07:25.000Z
2020-11-18T21:14:47.000Z
wblib/data_models.py
AartGoossens/wblib
3b0500ff47abb331e9d425cd1a9ef205236156f4
[ "MIT" ]
null
null
null
from .exceptions import RideSessionException from .tools import build_hub_files_url class RideSessionResponseModel: def __init__(self, data): self._validate(data) self.sessions = [RideSessionModel(s) for s in data['results']] def _validate(self, response): sessions = response['results...
25.016949
70
0.649051
a9dba2fc1a42526f8359f553575dbabd2c79f11c
6,846
py
Python
bindings/python/ensmallen_graph/datasets/string/desulfotomaculumhydrothermale.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/desulfotomaculumhydrothermale.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/desulfotomaculumhydrothermale.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Desulfotomaculum hydrothermale. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Dateti...
35.842932
223
0.710488
fcfdd6b333d94c3c2623d1b7ad825f342134d6eb
452
py
Python
app/marks/urls.py
CFelipe/marks
cc7e42eca9599f7e9df96f93c764faadf15f9bea
[ "MIT" ]
21
2019-05-13T12:54:47.000Z
2022-01-10T19:51:26.000Z
app/marks/urls.py
CFelipe/marks
cc7e42eca9599f7e9df96f93c764faadf15f9bea
[ "MIT" ]
19
2018-11-18T20:10:09.000Z
2019-11-16T02:47:38.000Z
app/marks/urls.py
CFelipe/marks
cc7e42eca9599f7e9df96f93c764faadf15f9bea
[ "MIT" ]
1
2018-06-12T21:33:19.000Z
2018-06-12T21:33:19.000Z
from django.conf.urls import include, url from django.contrib import admin from django.shortcuts import get_object_or_404, get_list_or_404 from django.db.models import Count from django.conf import settings from marksapp.models import Bookmark, Tag urlpatterns = [url(r"^", include("marksapp.urls")), url(r"^admin/", ad...
32.285714
85
0.772124
e607d7ba3ec7fa67fe5d10e9821ad0f46b919731
4,377
py
Python
examples/enclave_manager/tcf_enclave_manager/tcf_enclave_helper.py
manojsalunke85/avalon
99fc49ac215ac3dfcfb0547f8abebc0b131dfad1
[ "Apache-2.0" ]
null
null
null
examples/enclave_manager/tcf_enclave_manager/tcf_enclave_helper.py
manojsalunke85/avalon
99fc49ac215ac3dfcfb0547f8abebc0b131dfad1
[ "Apache-2.0" ]
null
null
null
examples/enclave_manager/tcf_enclave_manager/tcf_enclave_helper.py
manojsalunke85/avalon
99fc49ac215ac3dfcfb0547f8abebc0b131dfad1
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
37.410256
76
0.620059
7c4602834646f2539046fad341f08bb592084b23
1,503
py
Python
src/obstools/image/orient.py
astromancer/obstools
c83f562a4f602cbe4420bec07308159761818a79
[ "MIT" ]
null
null
null
src/obstools/image/orient.py
astromancer/obstools
c83f562a4f602cbe4420bec07308159761818a79
[ "MIT" ]
null
null
null
src/obstools/image/orient.py
astromancer/obstools
c83f562a4f602cbe4420bec07308159761818a79
[ "MIT" ]
null
null
null
# from astropy.io.fits import PrimaryHDU class ImageOrienter(object): """ Simple base class that stores the orientation state. Images are re-oriented upon item access. """ def __init__(self, hdu, flip=(), x=False, y=False): """ [summary] Parameters ---------- ...
27.833333
67
0.547572
086ab65dbccf964a7bab6fc25ef4c29abc6e3ffa
1,327
py
Python
apps/blog/urls.py
HengCodes/izone
1423f40c49914217690a1be18909de36702acf0e
[ "MIT" ]
null
null
null
apps/blog/urls.py
HengCodes/izone
1423f40c49914217690a1be18909de36702acf0e
[ "MIT" ]
null
null
null
apps/blog/urls.py
HengCodes/izone
1423f40c49914217690a1be18909de36702acf0e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.urls import path # from .views import goview from .views import (IndexView, DetailView, CategoryView, TagView, AboutView, SilianView, MySearchView, ArchiveView, TimelineView, CourseView, CourseListView) urlpatterns = [ # path('go/', goview, name='go'), # 测试...
51.038462
100
0.639035
e9eb8afa599164175f9fd1f3db996207a5f67409
23
py
Python
src/psd_tools/version.py
tannerhelland/psd-tools
f4d3fbdcb2164ab745046f9663ae2275a5b2b1ba
[ "MIT" ]
1
2021-07-30T03:41:21.000Z
2021-07-30T03:41:21.000Z
src/psd_tools/version.py
tannerhelland/psd-tools
f4d3fbdcb2164ab745046f9663ae2275a5b2b1ba
[ "MIT" ]
null
null
null
src/psd_tools/version.py
tannerhelland/psd-tools
f4d3fbdcb2164ab745046f9663ae2275a5b2b1ba
[ "MIT" ]
2
2021-03-31T07:58:12.000Z
2021-07-30T03:41:22.000Z
__version__ = '1.9.13'
11.5
22
0.652174
ef48d2c14bf9709b9886e97c673d64bd21f40839
20,761
py
Python
ucscsdk/mometa/nfs/NfsExportDef.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
9
2016-12-22T08:39:25.000Z
2019-09-10T15:36:19.000Z
ucscsdk/mometa/nfs/NfsExportDef.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
10
2017-01-31T06:59:56.000Z
2021-11-09T09:14:37.000Z
ucscsdk/mometa/nfs/NfsExportDef.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
13
2016-11-14T07:42:58.000Z
2022-02-10T17:32:05.000Z
"""This module contains the general information for NfsExportDef ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class NfsExportDefConsts(): CONFIG_STATE_ADDED = "added" CONFIG_STATE_NONE = "none" CO...
85.789256
2,742
0.737151
76af2b5ed0d440dbcd1c23ef410775e16705b97b
50,340
py
Python
tests/functional_tests.py
sonatagreen/lbry
f6473e3383956b7823a76516622bba6c172619e1
[ "BSD-2-Clause" ]
null
null
null
tests/functional_tests.py
sonatagreen/lbry
f6473e3383956b7823a76516622bba6c172619e1
[ "BSD-2-Clause" ]
null
null
null
tests/functional_tests.py
sonatagreen/lbry
f6473e3383956b7823a76516622bba6c172619e1
[ "BSD-2-Clause" ]
null
null
null
import shutil from multiprocessing import Process, Event, Queue import logging import sys import random import io from Crypto.PublicKey import RSA from Crypto import Random from Crypto.Hash import MD5 from lbrynet.conf import MIN_BLOB_DATA_PAYMENT_RATE from lbrynet.conf import MIN_BLOB_INFO_PAYMENT_RATE from lbrynet.lb...
36.690962
123
0.640862
58d232426f07807a62e7fe5640e5f811478bd18d
1,014
py
Python
adapters/repository.py
alenasf/Architecture_Patterns
ca5ca53639368e447d9d049c772ef737386a3d1e
[ "Apache-2.0" ]
null
null
null
adapters/repository.py
alenasf/Architecture_Patterns
ca5ca53639368e447d9d049c772ef737386a3d1e
[ "Apache-2.0" ]
null
null
null
adapters/repository.py
alenasf/Architecture_Patterns
ca5ca53639368e447d9d049c772ef737386a3d1e
[ "Apache-2.0" ]
null
null
null
import abc from domain import model class AbstractRepository(abc.ABC): @abc.abstractmethod def add(self, batch: model.Batch): raise NotImplementedError @abc.abstractmethod def get(self, reference) -> model.Batch: raise NotImplementedError class SqlAlchemyRepository(AbstractReposito...
22.043478
83
0.677515
2aebe9bdc6292497cf6d896c32f6d47a623b92ab
4,835
py
Python
agglomerate/items.py
martinber/agglomerate
f326e72a9dac328fac3cd46519a048ed861b71e3
[ "MIT" ]
null
null
null
agglomerate/items.py
martinber/agglomerate
f326e72a9dac328fac3cd46519a048ed861b71e3
[ "MIT" ]
null
null
null
agglomerate/items.py
martinber/agglomerate
f326e72a9dac328fac3cd46519a048ed861b71e3
[ "MIT" ]
null
null
null
import PIL.Image import os import agglomerate.math class Item: """ Represents a sprite or a group of sprites, with a rectangular shape. Something that will be placed by an algorithm. Sprites can be cropped but groups not. An algorithm works with items, placing them and rotating if necessary, ...
25.855615
80
0.591727
c764d9c0742aa0cc9406ba2c174804dd9d0484e8
3,385
py
Python
day2/feeder/base_microservices.py
liang-faan/SmartIOT-Diec
8336a4b558295295f10a82cf350d8b7ff3fb9f5c
[ "MIT" ]
5
2019-05-30T02:55:16.000Z
2020-03-03T14:18:23.000Z
day2/feeder/base_microservices.py
liang-faan/SmartIOT-Diec
8336a4b558295295f10a82cf350d8b7ff3fb9f5c
[ "MIT" ]
3
2019-12-27T00:53:23.000Z
2020-02-17T05:29:19.000Z
day2/feeder/base_microservices.py
liang-faan/SmartIOT-Diec
8336a4b558295295f10a82cf350d8b7ff3fb9f5c
[ "MIT" ]
4
2019-06-04T06:26:14.000Z
2021-01-07T04:25:32.000Z
# # Base Microservice # # Base microservice classes # Abstract the communication protocol from derived classes # # Author: Lisa Ong, NUS/ISS # import argparse import json # References: https://www.eclipse.org/paho/clients/python/docs/ import paho.mqtt.client as mqtt import paho.mqtt.publish as publish def _on_connec...
30.495495
104
0.626883
b8d0b4cf63d8d66bf068eedf00a474b9d6c6d771
5,063
py
Python
src/radical/cm/utils/calculator/api/resource.py
iparask/campaign_manager
7d7f3934fdde6acadc7581825697c89009fcf6fd
[ "MIT" ]
1
2019-12-18T16:46:35.000Z
2019-12-18T16:46:35.000Z
src/radical/cm/utils/calculator/api/resource.py
radical-project/campaign_manager
7d7f3934fdde6acadc7581825697c89009fcf6fd
[ "MIT" ]
22
2019-12-12T16:31:36.000Z
2020-12-14T22:45:40.000Z
src/radical/cm/utils/calculator/api/resource.py
iparask/campaign_manager
7d7f3934fdde6acadc7581825697c89009fcf6fd
[ "MIT" ]
null
null
null
import radical.utils as ru import numpy as np from ..entities.core import Core from ..exceptions import CalcTypeError class Resource(object): def __init__(self, num_cores=1, perf_dist='uniform', dist_mean=10, temporal_var=0, spatial_var=0, no_uid=False): # Initialize ...
36.956204
82
0.551649
7923ea3139e767982e4925638b43a8fb12721259
2,625
py
Python
ligh/posts/routes.py
madhavan-raja/ligh
d97cf32975a0709cda1de1e1c8cd7478c62932a2
[ "MIT" ]
null
null
null
ligh/posts/routes.py
madhavan-raja/ligh
d97cf32975a0709cda1de1e1c8cd7478c62932a2
[ "MIT" ]
null
null
null
ligh/posts/routes.py
madhavan-raja/ligh
d97cf32975a0709cda1de1e1c8cd7478c62932a2
[ "MIT" ]
null
null
null
from flask import render_template, url_for, flash, redirect, request, abort, Blueprint from flask_login import current_user, login_required from ligh import db from ligh.models import Post from ligh.posts.forms import PostForm from ligh.posts.utils import save_post_picture posts = Blueprint('posts', __name__) @posts...
36.458333
155
0.688762
46246294620371b6f04ad1e1e7b4dea8883a7420
564
py
Python
Section 13 - Leitura e Escrita em Arquivos/exercicios/ex10.py
thiagofreitascarneiro/Python-avancado-Geek-University
861b742ad6b30955fcbe63274b8cf8afc6ca028f
[ "MIT" ]
null
null
null
Section 13 - Leitura e Escrita em Arquivos/exercicios/ex10.py
thiagofreitascarneiro/Python-avancado-Geek-University
861b742ad6b30955fcbe63274b8cf8afc6ca028f
[ "MIT" ]
null
null
null
Section 13 - Leitura e Escrita em Arquivos/exercicios/ex10.py
thiagofreitascarneiro/Python-avancado-Geek-University
861b742ad6b30955fcbe63274b8cf8afc6ca028f
[ "MIT" ]
null
null
null
''' Faça um programa que receba o nome de um arquivo de entrada e outro de saída. O arquivo de entrada contém cada linha o nome de uma cidades (ocupando 40 caracteres) e o seu número de habitantes. O programa deverá ler o arquivo de entrada e gerar um arquivo de saída onde aparece o nome da cidade mais populos...
43.384615
118
0.693262
c66cdccf67aa521551a6ae284c1bd99e35a80a63
207
py
Python
problemsets/Codeforces/Python/A1042.py
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
problemsets/Codeforces/Python/A1042.py
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
problemsets/Codeforces/Python/A1042.py
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
""" * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * """ i=input n=int(i()) m=int(i()) a=[int(i())for _ in[0]*n] v=max(a) u=sum(v-x for x in a) print(max(0,0--(m-u)//n)+v,m+v)
15.923077
38
0.570048
3bc59157055ce4bc4ad6f7850425e20734278eeb
172,739
py
Python
pandas/core/groupby/groupby.py
deflatSOCO/pandas
415012f4f38ca0cf41717c51e49bd2349cba09a8
[ "BSD-3-Clause" ]
1
2021-05-12T21:50:27.000Z
2021-05-12T21:50:27.000Z
pandas/core/groupby/groupby.py
fillipe-gsm/pandas
72252e1b87a0a06fd1bec9c7c7548bae33d7b738
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/core/groupby/groupby.py
fillipe-gsm/pandas
72252e1b87a0a06fd1bec9c7c7548bae33d7b738
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2018-07-21T08:09:14.000Z
2021-08-07T09:10:54.000Z
import types from functools import wraps, partial import numpy as np import datetime import collections import warnings import copy from textwrap import dedent from contextlib import contextmanager from pandas.compat import ( zip, range, lzip, callable, map ) from pandas import compat from pandas.compat.numpy...
33.665757
87
0.550032