hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
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
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
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
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
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
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
157f0119cc32c7479dcaa1bf73091cbff4ad0c19
149
py
Python
main_server/__init__.py
yehan-xiao/SUCS
4110a9d858c9e484d35c08198d951c6ba734460f
[ "MIT" ]
null
null
null
main_server/__init__.py
yehan-xiao/SUCS
4110a9d858c9e484d35c08198d951c6ba734460f
[ "MIT" ]
null
null
null
main_server/__init__.py
yehan-xiao/SUCS
4110a9d858c9e484d35c08198d951c6ba734460f
[ "MIT" ]
null
null
null
#Written by Shitao Tang # -------------------------------------------------------- import logging.config logging.config.fileConfig("logging.config")
29.8
58
0.496644
0
0
0
0
0
0
0
0
97
0.651007
157f7bac2f471946f836b8c5ee08c6cfd3a2fe43
2,324
py
Python
server/TenantManagementService/tenant-provisioning.py
snetty/aws-saas-factory-ref-solution-serverless-saas
34403ac7ad74847106cc7318d54afb51932d3711
[ "Apache-2.0", "MIT-0" ]
1
2021-07-10T22:07:16.000Z
2021-07-10T22:07:16.000Z
server/TenantManagementService/tenant-provisioning.py
snetty/aws-saas-factory-ref-solution-serverless-saas
34403ac7ad74847106cc7318d54afb51932d3711
[ "Apache-2.0", "MIT-0" ]
null
null
null
server/TenantManagementService/tenant-provisioning.py
snetty/aws-saas-factory-ref-solution-serverless-saas
34403ac7ad74847106cc7318d54afb51932d3711
[ "Apache-2.0", "MIT-0" ]
null
null
null
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 import json import boto3 import utils from botocore.exceptions import ClientError import logger import os from aws_lambda_powertools import Tracer tracer = Tracer() tenant_stack_mapping_table_name = os.environ['TENAN...
29.794872
108
0.660069
0
0
0
0
1,735
0.746558
0
0
523
0.225043
157fa5c40b8382a262791d36d2b4de815c319516
643
py
Python
P25034-zhaojie/week-07/homework1.py
xiaohh2016/python-25
8981ba89bfb32754c3f9c881ee8fcaf13332ce51
[ "Apache-2.0" ]
1
2019-09-11T23:24:58.000Z
2019-09-11T23:24:58.000Z
P25034-zhaojie/week-07/homework1.py
xiaohh2016/python-25
8981ba89bfb32754c3f9c881ee8fcaf13332ce51
[ "Apache-2.0" ]
null
null
null
P25034-zhaojie/week-07/homework1.py
xiaohh2016/python-25
8981ba89bfb32754c3f9c881ee8fcaf13332ce51
[ "Apache-2.0" ]
5
2019-09-11T06:33:34.000Z
2020-02-17T12:52:31.000Z
#!/usr/bin/env python # encoding:utf-8 # file: homework1.py # 1、请将 "1,2,3",变成 ["1","2","3"] # 方法1 a = '1,2,3' print(a.split(',')) # 方法2 遍历一下 a = '1,2,3' sep = ',' result = [] for i in range(len(a)): if a[i] == sep: continue result.append(a[i]) print(result) """ 第一种方法比较简单,略过。 第二种方法,遍历的思路是对的,但是只针对本题给出...
15.309524
47
0.541213
0
0
0
0
0
0
0
0
513
0.5986
158093f827c44fb31f9d2b1f817125c9d5ad8bef
575
py
Python
code/selection_sort.py
Rustam-Z/data-structures-and-algorithms
0ed253c433198fb6fa6d609a806f4ae7e820af06
[ "MIT" ]
6
2021-09-19T11:01:27.000Z
2021-11-11T08:53:31.000Z
code/selection_sort.py
Rustam-Z/data-structures-and-algorithms
0ed253c433198fb6fa6d609a806f4ae7e820af06
[ "MIT" ]
null
null
null
code/selection_sort.py
Rustam-Z/data-structures-and-algorithms
0ed253c433198fb6fa6d609a806f4ae7e820af06
[ "MIT" ]
1
2021-12-20T13:25:12.000Z
2021-12-20T13:25:12.000Z
""" Selection sort algorithm implementation. Time Complexity: Best O(n^2) Worst O(n^2) Average O(n^2) Space Complexity: O(1) """ def selection_sort(array): for i in range(len(array)): min_index = i for j in range(i + 1, len(array)): if array[j] < array[min_index]: ...
23
63
0.606957
0
0
0
0
0
0
0
0
150
0.26087
15846f7192fcdc591856fb8955166b95b74770b7
154
py
Python
order.py
alexsandrox/designpattern-strategy-python
69b4cdb1cf88a340f2bde38e387a3c9c6560806a
[ "MIT" ]
null
null
null
order.py
alexsandrox/designpattern-strategy-python
69b4cdb1cf88a340f2bde38e387a3c9c6560806a
[ "MIT" ]
null
null
null
order.py
alexsandrox/designpattern-strategy-python
69b4cdb1cf88a340f2bde38e387a3c9c6560806a
[ "MIT" ]
null
null
null
class Order(object): def __init__(self, value): self.__value = value @property def value(self): return self.__value
17.111111
30
0.577922
145
0.941558
0
0
58
0.376623
0
0
0
0
158547efcb33f290119505b7dad81583331db6a6
885
py
Python
pycritty/cli/install.py
binRick/pycritty
ae27e61fe597c22e6830d62533e11d64bf06a3ae
[ "MIT" ]
159
2020-12-13T19:38:32.000Z
2022-03-30T23:12:49.000Z
pycritty/cli/install.py
binRick/pycritty
ae27e61fe597c22e6830d62533e11d64bf06a3ae
[ "MIT" ]
4
2021-01-10T16:31:10.000Z
2022-02-15T17:38:51.000Z
pycritty/cli/install.py
binRick/pycritty
ae27e61fe597c22e6830d62533e11d64bf06a3ae
[ "MIT" ]
50
2020-12-13T22:35:34.000Z
2022-03-30T01:29:28.000Z
import argparse from .pycritty import subparsers, formatter install_parser = subparsers.add_parser( 'install', formatter_class=formatter(), help="Install a config file or theme from a url", argument_default=argparse.SUPPRESS, ) install_parser.add_argument( 'url', help='URL where the config is...
20.581395
70
0.680226
0
0
0
0
0
0
0
0
334
0.377401
15855175c606cca38de789368d87a49ec8fe0b51
1,209
py
Python
setup.py
twdb/sonde3
5d6c9672870f9186c22db1a88fc5a143e8fd887c
[ "BSD-3-Clause" ]
1
2017-08-11T18:50:08.000Z
2017-08-11T18:50:08.000Z
setup.py
twdb/sonde3
5d6c9672870f9186c22db1a88fc5a143e8fd887c
[ "BSD-3-Clause" ]
11
2018-03-06T14:31:13.000Z
2018-07-27T14:14:19.000Z
setup.py
twdb/sonde3
5d6c9672870f9186c22db1a88fc5a143e8fd887c
[ "BSD-3-Clause" ]
1
2017-08-21T22:45:16.000Z
2017-08-21T22:45:16.000Z
""" sonde3 ------- PySonde is a module for reading water quality data from various sensor formats. """ from setuptools import Command, setup, find_packages # note: the minimum version numbers are just what I know will work, # but they could probably be a few versions lower setup( name='sonde3', version='0.2', ...
31
82
0.652605
0
0
0
0
0
0
0
0
757
0.626137
158778c93cc9dac58b6a4fb948f20e547d063f46
442
py
Python
manejo-de-excepciones.py
OscarPalominoC/PensamientoComputacionalPython
b2797475d25452c69467c7e24720671777ad3ed9
[ "MIT" ]
null
null
null
manejo-de-excepciones.py
OscarPalominoC/PensamientoComputacionalPython
b2797475d25452c69467c7e24720671777ad3ed9
[ "MIT" ]
null
null
null
manejo-de-excepciones.py
OscarPalominoC/PensamientoComputacionalPython
b2797475d25452c69467c7e24720671777ad3ed9
[ "MIT" ]
null
null
null
def divide_elementos_en_lista(lista, divisor): # Utilizando la programación defensiva para evitar que el usuario ingrese un 0 como divisor. try: return [i / divisor for i in lista] except ZeroDivisionError as e: print(e) return 'No se puede dividir entre 0' lista = range(10) if __n...
34
96
0.69457
0
0
0
0
0
0
0
0
154
0.34763
1588ca5cc544c21212b83dbab38deb4721020810
5,259
py
Python
openomics_web/layouts/datatable_view.py
JonnyTran/open-omics
ef5db2dc2fdf486ee5e9fa4e0cf5be61b4531232
[ "MIT" ]
12
2021-01-14T19:33:48.000Z
2022-01-06T16:13:03.000Z
openomics_web/layouts/datatable_view.py
JonnyTran/open-omics
ef5db2dc2fdf486ee5e9fa4e0cf5be61b4531232
[ "MIT" ]
13
2020-12-31T20:38:11.000Z
2021-11-24T06:21:12.000Z
openomics_web/layouts/datatable_view.py
JonnyTran/open-omics
ef5db2dc2fdf486ee5e9fa4e0cf5be61b4531232
[ "MIT" ]
7
2021-02-08T13:42:01.000Z
2021-10-21T21:37:14.000Z
import dash_core_components as dcc import dash_html_components as html import dash_table as dt from openomics_web.utils.str_utils import longest_common_prefix def DataTableColumnSelect(columns): """ Args: columns: """ longest_common_prefixes = longest_common_prefix(columns) return html.D...
30.398844
86
0.424415
0
0
0
0
0
0
0
0
1,443
0.274387
158af3b9c1b0eba24baf15a53f726d6ea44ae733
1,982
py
Python
pipeline/visual_main.py
ElfatihZiad/realtime-market-data-pipeline
bc92f89c310d6b654141fe79c14f962d35899320
[ "Apache-2.0" ]
4
2021-12-14T23:54:14.000Z
2022-01-01T21:09:24.000Z
pipeline/visual_main.py
ElfatihZiad/realtime-market-data-pipeline
bc92f89c310d6b654141fe79c14f962d35899320
[ "Apache-2.0" ]
1
2022-01-07T20:26:49.000Z
2022-01-07T20:26:49.000Z
pipeline/visual_main.py
ElfatihZiad/realtime-market-data-pipeline
bc92f89c310d6b654141fe79c14f962d35899320
[ "Apache-2.0" ]
1
2022-01-20T20:00:58.000Z
2022-01-20T20:00:58.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import datetime import pandas as pd from bokeh.models.widgets import Tabs from warehouse import CassandraStorage import util.util as util from util.util import pandas_factory,symbol_list from bokeh.models import ColumnDataSource, Panel from bokeh.layouts impor...
34.172414
97
0.754793
0
0
0
0
0
0
0
0
228
0.115035
158ca93802eb9dccc421c636270c924dd054fd75
1,650
py
Python
src/graph_transpiler/webdnn/util/flags/optimize.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
1
2018-07-26T13:52:21.000Z
2018-07-26T13:52:21.000Z
src/graph_transpiler/webdnn/util/flags/optimize.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
null
null
null
src/graph_transpiler/webdnn/util/flags/optimize.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
null
null
null
import os OPTIMIZE = os.environ.get("OPTIMIZE", "1") == "1" # basic (non-accuracy loss) optimization REMOVE_REDUNDANT_OPERATOR = os.environ.get("REMOVE_REDUNDANT_OPERATOR", "1") == "1" SIMPLIFY_ELEMENTWISE = os.environ.get("SIMPLIFY_ELEMENTWISE", "1") == "1" REPLACE_SCALAR_OPERATOR = os.environ.get("REPLACE_SCALAR_OP...
55
95
0.753333
0
0
0
0
0
0
0
0
688
0.41697
158cad16a3a956c3d72457100289dace28f8f3ee
994
py
Python
start.py
reddelexc/cryptoping-trader
c2b0fe1626fa985e8a1bfb84e26019a94af27c42
[ "MIT" ]
12
2019-04-12T07:13:56.000Z
2022-03-07T06:21:18.000Z
start.py
reddelexc/cryptoping-trader
c2b0fe1626fa985e8a1bfb84e26019a94af27c42
[ "MIT" ]
null
null
null
start.py
reddelexc/cryptoping-trader
c2b0fe1626fa985e8a1bfb84e26019a94af27c42
[ "MIT" ]
4
2021-01-29T19:28:04.000Z
2021-12-09T01:52:12.000Z
import sys from src import Bot, Client, Collector, \ Predictor, PredictorLearnThread, Scribe, \ Trader, TraderThreadCleaner, GarbageCleanerThread if __name__ == '__main__': use_proxy = len(sys.argv) > 1 and sys.argv[1] == '-p' pool = { 'client': Client(use_proxy), 'bot': Bot(use_proxy)...
31.0625
97
0.678068
0
0
0
0
0
0
0
0
107
0.107646
158cb011887f3c76cab1428a5f9f814fdc90be6c
11,800
py
Python
google/ads/google_ads/v6/proto/resources/campaign_draft_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/proto/resources/campaign_draft_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/proto/resources/campaign_draft_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v6/resources/campaign_draft.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import refl...
64.480874
1,689
0.79678
0
0
0
0
0
0
0
0
4,602
0.39
158cb87ad35efa016b99c8fb5b1cdbee7b0b7b73
81
py
Python
coca/coco_caption/pycocoevalcap/tokenizer/__init__.py
CISiPLab/cisip-GreenCap
74c3f8461772016eec49840822f1407db4abe2b2
[ "BSD-3-Clause" ]
12
2021-03-06T13:33:51.000Z
2022-03-09T06:38:14.000Z
caption_vae/coco_caption/pycocoevalcap/tokenizer/__init__.py
jiahuei/test-caption-actions
cbf68dc29a0fdafe92730bf4881319bcbd41eb7f
[ "BSD-3-Clause" ]
null
null
null
caption_vae/coco_caption/pycocoevalcap/tokenizer/__init__.py
jiahuei/test-caption-actions
cbf68dc29a0fdafe92730bf4881319bcbd41eb7f
[ "BSD-3-Clause" ]
4
2021-12-05T07:26:22.000Z
2022-03-31T08:36:31.000Z
# -*- coding: utf-8 -*- """ Created on 09 Jul 2020 23:36:50 @author: jiahuei """
13.5
31
0.580247
0
0
0
0
0
0
0
0
79
0.975309
158d3ba98e41c3cfa0005f23668ccbdb8759e04a
5,733
py
Python
bot/users/basedGuild.py
Trimatix-indie/SuperDeckBreaker
6c5f0a6593df5e7f6807b1e2b09aff65dcf8a6fc
[ "MIT" ]
null
null
null
bot/users/basedGuild.py
Trimatix-indie/SuperDeckBreaker
6c5f0a6593df5e7f6807b1e2b09aff65dcf8a6fc
[ "MIT" ]
34
2021-03-20T22:42:16.000Z
2021-09-29T15:50:31.000Z
bot/users/basedGuild.py
Trimatix-indie/SuperDeckBreaker
6c5f0a6593df5e7f6807b1e2b09aff65dcf8a6fc
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import Dict, Union from discord import Guild, TextChannel import traceback from .. import botState, lib from ..baseClasses import serializable from ..cfg import cfg from ..game import sdbGame, sdbDeck from ..reactionMenus import SDBSignupMenu class BasedGuild(serializa...
50.289474
217
0.664922
5,440
0.948561
0
0
1,558
0.271665
1,796
0.313165
1,956
0.341064
158daa9a2fa7c45f9dc4c8cd8863b5ada982780f
8,720
py
Python
dataspot/config/builders/network_configurator_builder.py
patrickdehoon/dataspot
f06a4606837fa3e0a8f9f679026d01a0b2bd3e37
[ "MIT" ]
3
2019-09-19T15:46:49.000Z
2019-09-30T18:09:57.000Z
dataspot/config/builders/network_configurator_builder.py
patrickdehoon/dataspot
f06a4606837fa3e0a8f9f679026d01a0b2bd3e37
[ "MIT" ]
null
null
null
dataspot/config/builders/network_configurator_builder.py
patrickdehoon/dataspot
f06a4606837fa3e0a8f9f679026d01a0b2bd3e37
[ "MIT" ]
3
2019-09-19T15:52:07.000Z
2019-10-08T08:15:32.000Z
from dataspot.config.configurators.network_configurators.plot_height_configurator import PlotHeightConfigurator from dataspot.config.configurators.network_configurators.plot_width_configurator import PlotWidthConfigurator from dataspot.config.configurators.network_configurators.xrange_configurator import XRangeConfigur...
43.819095
125
0.686927
8,068
0.925229
0
0
0
0
0
0
4,593
0.52672
1590abe2fcf4885ac2f64c9cfcad25ae46f3b4fb
3,842
py
Python
subdomain_takeover_tools/confirm_takeover.py
martinvw/subdomain-takeover-tools
a3899a259c88e4324e3e44a345575072dfbd4966
[ "MIT" ]
2
2022-01-19T22:24:29.000Z
2022-01-28T07:50:49.000Z
subdomain_takeover_tools/confirm_takeover.py
martinvw/subdomain-takeover-tools
a3899a259c88e4324e3e44a345575072dfbd4966
[ "MIT" ]
null
null
null
subdomain_takeover_tools/confirm_takeover.py
martinvw/subdomain-takeover-tools
a3899a259c88e4324e3e44a345575072dfbd4966
[ "MIT" ]
null
null
null
import sys from subdomain_takeover_tools.confirm_agile_crm import is_valid as agile_crm_is_valid from subdomain_takeover_tools.confirm_azure_app_service import is_valid as azure_app_service_is_valid from subdomain_takeover_tools.confirm_azure_edge_cdn import is_valid as azure_edge_cdn_is_valid from subdomain_takeover_...
37.300971
109
0.726184
0
0
0
0
0
0
0
0
366
0.095263
1591d3f76921a6a6ee9967b46e2b782a59eb50ee
449
py
Python
marathon/models/__init__.py
missingcharacter/marathon-python
e1a42642c42716ef074e5b2523408bc1aa6025e2
[ "MIT" ]
202
2015-01-07T06:55:14.000Z
2021-11-30T12:05:50.000Z
marathon/models/__init__.py
missingcharacter/marathon-python
e1a42642c42716ef074e5b2523408bc1aa6025e2
[ "MIT" ]
213
2015-03-04T12:54:09.000Z
2022-02-28T11:36:28.000Z
marathon/models/__init__.py
missingcharacter/marathon-python
e1a42642c42716ef074e5b2523408bc1aa6025e2
[ "MIT" ]
169
2015-02-06T16:48:05.000Z
2022-01-18T16:20:56.000Z
from .app import MarathonApp, MarathonHealthCheck from .base import MarathonResource, MarathonObject from .constraint import MarathonConstraint from .deployment import MarathonDeployment, MarathonDeploymentAction, MarathonDeploymentStep from .endpoint import MarathonEndpoint from .group import MarathonGroup from .info ...
44.9
92
0.873051
0
0
0
0
0
0
0
0
0
0
1591fa0cac2c7d80e07b73ac86f219bf9123ba87
1,953
py
Python
client/jsonrpc/_tests/test_proxy.py
bmwiedemann/bitcoin
d956a409451ae38b0135f74774929e25ded16936
[ "MIT" ]
45
2015-03-16T00:51:40.000Z
2022-01-16T23:03:35.000Z
client/jsonrpc/_tests/test_proxy.py
bmwiedemann/bitcoin
d956a409451ae38b0135f74774929e25ded16936
[ "MIT" ]
87
2018-01-06T10:18:31.000Z
2022-03-11T23:32:30.000Z
client/jsonrpc/_tests/test_proxy.py
bmwiedemann/bitcoin
d956a409451ae38b0135f74774929e25ded16936
[ "MIT" ]
14
2017-02-18T02:55:13.000Z
2021-03-29T09:58:16.000Z
""" Copyright (c) 2007 Jan-Klaas Kollhof This file is part of jsonrpc. jsonrpc is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later...
32.016393
111
0.673323
1,061
0.543267
0
0
0
0
0
0
1,013
0.518689
15932452db9b9061ffd7215580037a3f59475126
650
py
Python
deployments/migrations/0029_auto_20200625_1019.py
IFRCGo/ifrcgo-api
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
[ "MIT" ]
11
2018-06-11T06:05:12.000Z
2022-03-25T09:31:44.000Z
deployments/migrations/0029_auto_20200625_1019.py
IFRCGo/ifrcgo-api
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
[ "MIT" ]
498
2017-11-07T21:20:13.000Z
2022-03-31T14:37:18.000Z
deployments/migrations/0029_auto_20200625_1019.py
IFRCGo/ifrcgo-api
c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a
[ "MIT" ]
6
2018-04-11T13:29:50.000Z
2020-07-16T16:52:11.000Z
# Generated by Django 2.2.13 on 2020-06-25 10:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('deployments', '0028_auto_20200618_0904'), ] operations = [ migrations.AddField( model_name='project', name='actual_...
27.083333
96
0.618462
556
0.855385
0
0
0
0
0
0
174
0.267692
1594a5de479d5d5f7a36a36430ba31ef5bbf7529
1,047
py
Python
CoinbaseConnector/coinbaseconnector/utils.py
ospragg/CoinbaseConnector
febd6401ba2b56d4e1f1f7193b3f85bd76f7e6c5
[ "MIT" ]
null
null
null
CoinbaseConnector/coinbaseconnector/utils.py
ospragg/CoinbaseConnector
febd6401ba2b56d4e1f1f7193b3f85bd76f7e6c5
[ "MIT" ]
null
null
null
CoinbaseConnector/coinbaseconnector/utils.py
ospragg/CoinbaseConnector
febd6401ba2b56d4e1f1f7193b3f85bd76f7e6c5
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import base64 import hmac import hashlib from requests.auth import AuthBase def generate_auth_headers(message, api_key, secret_key, passphrase): timestamp = str(time.time()) message = timestamp + message hmac_key = base64.b64decode(secret_key) signature = ...
27.552632
68
0.698185
439
0.419293
0
0
0
0
0
0
150
0.143266
15975c5c1d59b3336b3cbfe96936dc3ab25cc893
5,606
py
Python
custom_nn.py
penpy/neural-network
5bc71577c6c13d937c036f3c7babb31f24e1cd6d
[ "MIT" ]
null
null
null
custom_nn.py
penpy/neural-network
5bc71577c6c13d937c036f3c7babb31f24e1cd6d
[ "MIT" ]
null
null
null
custom_nn.py
penpy/neural-network
5bc71577c6c13d937c036f3c7babb31f24e1cd6d
[ "MIT" ]
null
null
null
import numpy as np def softmax(x): exp_x = np.exp(x) return exp_x / np.sum(exp_x, axis=0) def sigmoid(x): return 1 / (1+np.exp(-x)) def deriv_sigmoid(s): """Derivative of the sigmoid given the output s of the sigmoid""" return s * (1 - s) def relu(x): return x * (x > 0) def heaviside_step(...
33.171598
77
0.587585
1,569
0.279879
0
0
0
0
0
0
689
0.122904
15976fcea0f40cbc07e06c9cc6783d32da92191e
5,123
py
Python
src/tuplenet/lcp/middle_table.py
qwjhq/TupleNet
c0f2c2e876c8425c503385bfebc3d6c1b5d4e50f
[ "Apache-2.0" ]
2
2020-02-10T16:06:34.000Z
2020-02-12T14:55:19.000Z
src/tuplenet/lcp/middle_table.py
rockmenjack/TupleNet
b740f4c25b15e72616495bfcb12f2e6d9b7091ad
[ "Apache-2.0" ]
null
null
null
src/tuplenet/lcp/middle_table.py
rockmenjack/TupleNet
b740f4c25b15e72616495bfcb12f2e6d9b7091ad
[ "Apache-2.0" ]
null
null
null
from pyDatalog import pyDatalog import action import match from reg import * from logicalview import * from flow_common import TABLE_LSP_EGRESS_FIRST, TABLE_LRP_INGRESS_IP_ROUTE, \ TABLE_EMBED2_METADATA, TABLE_DROP_PACKET, TABLE_OUTPUT_PKT pyDatalog.create_terms('Table, Priority, Match, Action')...
39.10687
82
0.663869
0
0
0
0
0
0
0
0
812
0.158501
1598b7dee19781329e09f02bed28f00c924a7fb7
850
py
Python
Max/Max_0075_20200318.py
Morek999/OMSCS_Taiwan_Leetcode
8ec18e08e9313bc3326846ca6ef6e569380a133f
[ "MIT" ]
1
2020-01-08T14:10:24.000Z
2020-01-08T14:10:24.000Z
Max/Max_0075_20200318.py
Morek999/OMSCS_Taiwan_Leetcode
8ec18e08e9313bc3326846ca6ef6e569380a133f
[ "MIT" ]
null
null
null
Max/Max_0075_20200318.py
Morek999/OMSCS_Taiwan_Leetcode
8ec18e08e9313bc3326846ca6ef6e569380a133f
[ "MIT" ]
null
null
null
""" 75. Sort Colors https://leetcode.com/problems/sort-colors/ Time complexity: O() Space complexity: O() """ from typing import List class Solution: def sortColors(self, nums: List[int]) -> None: """ Do not return anything, modify nums in-place instead. """ p0 = curr...
24.285714
62
0.445882
581
0.683529
0
0
0
0
0
0
225
0.264706
15998ca5e704d0ce300f88ec9f63d2edf52a1311
469
py
Python
tbx/people/migrations/0011_auto_20190216_1748.py
elviva404/wagtail-torchbox
718d9e2c4337073f010296932d369c726a01dbd3
[ "MIT" ]
103
2015-02-24T17:58:21.000Z
2022-03-23T08:08:58.000Z
tbx/people/migrations/0011_auto_20190216_1748.py
elviva404/wagtail-torchbox
718d9e2c4337073f010296932d369c726a01dbd3
[ "MIT" ]
145
2015-01-13T17:13:43.000Z
2022-03-29T12:56:20.000Z
tbx/people/migrations/0011_auto_20190216_1748.py
elviva404/wagtail-torchbox
718d9e2c4337073f010296932d369c726a01dbd3
[ "MIT" ]
57
2015-01-03T12:00:37.000Z
2022-02-09T13:11:30.000Z
# Generated by Django 2.1.5 on 2019-02-16 17:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("people", "0010_contact_default_contact"), ] operations = [ migrations.AlterField( model_name="contact", name="defaul...
22.333333
65
0.586354
376
0.801706
0
0
0
0
0
0
111
0.236674
159b88e9ded1306f1bbc757eafe9af1af8292c32
5,590
py
Python
dane/document.py
CLARIAH/DANE-util
8a3edec69be18ac3bdee476b65059409af05c1bb
[ "Apache-2.0" ]
null
null
null
dane/document.py
CLARIAH/DANE-util
8a3edec69be18ac3bdee476b65059409af05c1bb
[ "Apache-2.0" ]
1
2019-12-11T19:46:20.000Z
2019-12-11T21:30:38.000Z
dane/document.py
CLARIAH/DANE-util
8a3edec69be18ac3bdee476b65059409af05c1bb
[ "Apache-2.0" ]
null
null
null
# Copyright 2020-present, Netherlands Institute for Sound and Vision (Nanne van Noord) # # 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 # #...
34.9375
86
0.615742
4,708
0.842218
0
0
429
0.076744
0
0
3,138
0.56136
159bcd51706f2fb03b79fd055eadc60487e05f9b
189
py
Python
steps/step01.py
teijeong/deeplearning-from-scratch
d2d237cc592c4454e4a3cc08987b64fb5823fe9e
[ "MIT" ]
null
null
null
steps/step01.py
teijeong/deeplearning-from-scratch
d2d237cc592c4454e4a3cc08987b64fb5823fe9e
[ "MIT" ]
null
null
null
steps/step01.py
teijeong/deeplearning-from-scratch
d2d237cc592c4454e4a3cc08987b64fb5823fe9e
[ "MIT" ]
null
null
null
import numpy as np class Variable: def __init__(self, data: np.ndarray) -> None: self.data = data if __name__ == '__main__': x = Variable(np.array(1.0)) print(x.data)
18.9
49
0.624339
90
0.47619
0
0
0
0
0
0
10
0.05291
159d44799a9c56a805e0bf7bdc7f5ca0be5ac255
3,551
py
Python
pterygium_inference.py
SERI-EPI-DS/pterygium_detection
5d56896cec4f154bd5e10ddf4db079b1e8d8564d
[ "MIT" ]
null
null
null
pterygium_inference.py
SERI-EPI-DS/pterygium_detection
5d56896cec4f154bd5e10ddf4db079b1e8d8564d
[ "MIT" ]
null
null
null
pterygium_inference.py
SERI-EPI-DS/pterygium_detection
5d56896cec4f154bd5e10ddf4db079b1e8d8564d
[ "MIT" ]
null
null
null
import argparse import numpy as np import pandas as pd from tqdm import tqdm from PIL import Image import torch, torchvision from torchvision import transforms from torch.nn import functional as F from torchvision.models.utils import load_state_dict_from_url SEED = 123 torch.manual_seed(SEED) torch.backends.cudnn.det...
30.350427
130
0.62405
0
0
0
0
0
0
0
0
580
0.163334
159e0993e20c2d1a01b6aa2da9021b6c99e89aa2
4,417
py
Python
xndtools/kernel_generator/tests/test_test_array.py
xnd-project/xndtools
9478f31954091d861ce538ba278f7f888e23d19b
[ "BSD-3-Clause" ]
3
2019-11-12T16:01:26.000Z
2020-06-27T19:27:27.000Z
xndtools/kernel_generator/tests/test_test_array.py
xnd-project/xndtools
9478f31954091d861ce538ba278f7f888e23d19b
[ "BSD-3-Clause" ]
4
2018-04-25T17:12:43.000Z
2018-08-23T18:17:24.000Z
xndtools/kernel_generator/tests/test_test_array.py
xnd-project/xndtools
9478f31954091d861ce538ba278f7f888e23d19b
[ "BSD-3-Clause" ]
6
2018-05-04T08:10:40.000Z
2019-03-19T10:00:21.000Z
import pytest from xndtools.kernel_generator.utils import NormalizedTypeMap from xnd import xnd import test_array as m long_t = NormalizedTypeMap()('long') def assert_equal(x, y): assert x == y and x.dtype == y.dtype def test_array_range_input(): # C kernel a = xnd([1, 2, 3], dtype=long_t) r = m.t...
26.769697
77
0.600634
0
0
0
0
0
0
0
0
565
0.127915
159eb6f3bd3db35874296877ff6439ebc3a807ba
137
py
Python
pycwr/io/BaseDataProtocol/__init__.py
aliny2003/pycwr
3186125bdd2f551b9c59639dca567a1c06b50e96
[ "MIT" ]
144
2019-11-27T14:36:41.000Z
2022-02-23T08:21:17.000Z
pycwr/io/BaseDataProtocol/__init__.py
zhaopingsun/pycwr
7459371588e6d0d6d0737e249afa3921fe073151
[ "MIT" ]
32
2019-11-29T10:11:53.000Z
2022-03-14T07:46:44.000Z
pycwr/io/BaseDataProtocol/__init__.py
zhaopingsun/pycwr
7459371588e6d0d6d0737e249afa3921fe073151
[ "MIT" ]
57
2019-11-27T12:51:44.000Z
2022-01-29T14:50:05.000Z
from . import CCProtocol, SABProtocol, SCProtocol, WSR98DProtocol __all__ = ["CCProtocol", "SABProtocol", "SCProtocol", "WSR98DProtocol"]
68.5
71
0.781022
0
0
0
0
0
0
0
0
53
0.386861
159ed2ae1919b29a27330c6655a49f89f57d7ede
158
py
Python
zplconvert/__init__.py
Karimerto/zplconvert
5b953acc098261f711a65c50480ee1b00bded40d
[ "MIT" ]
4
2020-03-21T05:50:55.000Z
2022-01-22T20:06:58.000Z
zplconvert/__init__.py
Karimerto/zplconvert
5b953acc098261f711a65c50480ee1b00bded40d
[ "MIT" ]
null
null
null
zplconvert/__init__.py
Karimerto/zplconvert
5b953acc098261f711a65c50480ee1b00bded40d
[ "MIT" ]
1
2022-03-03T11:04:41.000Z
2022-03-03T11:04:41.000Z
#!/usr/bin/env python from .zplconvert import ZPLConvert from .zplparser import zpl_parse from .zpltools import Printer, PrinterError __version__ = '0.0.4'
19.75
43
0.78481
0
0
0
0
0
0
0
0
28
0.177215
15a23a52ff14d809f1cafc15020c2e60fa07129d
6,578
py
Python
db/executions_tab.py
Jaleyhd/Krama
5f29096828fe659eccf8525ff31bc4d7a273c049
[ "MIT" ]
null
null
null
db/executions_tab.py
Jaleyhd/Krama
5f29096828fe659eccf8525ff31bc4d7a273c049
[ "MIT" ]
null
null
null
db/executions_tab.py
Jaleyhd/Krama
5f29096828fe659eccf8525ff31bc4d7a273c049
[ "MIT" ]
null
null
null
from __future__ import absolute_import from . import db_util from ..proto import krama_pb2 from ..conf import common import MySQLdb import os from google.protobuf import text_format import simplejson from ..protobufjson.protobuf_json import * # CREATE TABLE executions_tab # ( # exec_id INT NOT NULL AUTO_INCREMENT, # j...
37.375
113
0.633475
5,885
0.894649
0
0
0
0
0
0
1,685
0.256157
15a28217185f3fc51e4f3d7f262c875ed36e6017
764
py
Python
bot_components/bot_classes.py
sghill/hubcommander
3f39735506d07d1167e42e9346cffe39d6b8c3db
[ "Apache-2.0" ]
1,286
2017-02-07T17:20:36.000Z
2022-03-29T16:20:19.000Z
bot_components/bot_classes.py
sghill/hubcommander
3f39735506d07d1167e42e9346cffe39d6b8c3db
[ "Apache-2.0" ]
62
2017-02-07T04:08:23.000Z
2022-01-13T21:53:56.000Z
bot_components/bot_classes.py
sghill/hubcommander
3f39735506d07d1167e42e9346cffe39d6b8c3db
[ "Apache-2.0" ]
190
2017-02-07T18:51:11.000Z
2022-03-27T10:16:30.000Z
""" .. module: hubcommander.bot_components.bot_classes :platform: Unix :copyright: (c) 2017 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: Mike Grima <mgrima@netflix.com> """ class BotPlugin: def __init__(self): pass def setup(self...
20.648649
62
0.636126
510
0.667539
0
0
0
0
0
0
244
0.319372
15a285c25f5f655b57f5a6de7f026ed992a0785f
23,320
py
Python
api_test/models.py
RockyLiys/api_auto_test_platform
7e6aec23b6f54d20c534b77a2679daf37b65c960
[ "MIT" ]
null
null
null
api_test/models.py
RockyLiys/api_auto_test_platform
7e6aec23b6f54d20c534b77a2679daf37b65c960
[ "MIT" ]
10
2019-12-04T23:30:37.000Z
2022-02-10T12:05:45.000Z
api_test/models.py
RockyLiys/api_auto_test_platform
7e6aec23b6f54d20c534b77a2679daf37b65c960
[ "MIT" ]
3
2019-07-01T10:18:40.000Z
2019-07-06T00:59:19.000Z
from django.contrib.auth.models import User from django.db import models # Create your models here. from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from rest_framework.authtoken.models import Token HTTP_CHOICE = ( ('HTTP', 'HTTP'), ('HTTPS',...
36.551724
133
0.683962
23,616
0.937217
0
0
184
0.007302
0
0
4,725
0.187515
15a40abfd2080856f8b0424f55c6b76f48786a86
511
py
Python
src/server.py
themis-project/themis-finals-devenv-master
b004a12af8c98fb0286642ca0becd69e146bc6f3
[ "MIT" ]
null
null
null
src/server.py
themis-project/themis-finals-devenv-master
b004a12af8c98fb0286642ca0becd69e146bc6f3
[ "MIT" ]
null
null
null
src/server.py
themis-project/themis-finals-devenv-master
b004a12af8c98fb0286642ca0becd69e146bc6f3
[ "MIT" ]
null
null
null
from gevent import monkey monkey.patch_all() from gevent.pywsgi import WSGIServer from werkzeug.serving import run_with_reloader import os from app import app SERVER_HOST = os.getenv('SERVER_HOST', '0.0.0.0') SERVER_PORT = int(os.getenv('SERVER_PORT', '80')) SERVER_RELOAD = os.getenv('SERVER_RELOAD', 'no') == 'yes' ...
23.227273
61
0.747554
0
0
0
0
0
0
0
0
63
0.123288
15a5974f19858186082ef01ae0c5530964542d3d
3,533
py
Python
Downloader.py
PriyanshuG13/AnimeDownloader
cb5893339c8789fbedcebc73e8c1d91e8632846d
[ "MIT" ]
null
null
null
Downloader.py
PriyanshuG13/AnimeDownloader
cb5893339c8789fbedcebc73e8c1d91e8632846d
[ "MIT" ]
null
null
null
Downloader.py
PriyanshuG13/AnimeDownloader
cb5893339c8789fbedcebc73e8c1d91e8632846d
[ "MIT" ]
null
null
null
import os import subprocess import webbrowser import clipboard import requests from bs4 import BeautifulSoup from pyfiglet import Figlet from Database.DatabaseManager import DatabaseManager as Animedb class Downloader(Animedb): def __init__(self, delay=60): self._COLS = os.get_terminal_size().columns ...
31.544643
108
0.546844
3,327
0.941693
0
0
0
0
0
0
704
0.199264
15a7b6d2d29c51ea6c81fd90e9bae8cfd595d7fd
924
py
Python
figures/scripts/studentst.py
mattpitkin/GraWIToNStatisticsLectures
09175a3a8cb3c9f0f15535d64deaef1275eac870
[ "MIT" ]
1
2018-02-09T21:01:54.000Z
2018-02-09T21:01:54.000Z
figures/scripts/studentst.py
mattpitkin/GraWIToNStatisticsLectures
09175a3a8cb3c9f0f15535d64deaef1275eac870
[ "MIT" ]
null
null
null
figures/scripts/studentst.py
mattpitkin/GraWIToNStatisticsLectures
09175a3a8cb3c9f0f15535d64deaef1275eac870
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Make plots of the Student's t-distribution for different degrees of freedom """ import matplotlib.pyplot as pl from scipy.stats import norm from scipy.stats import t import numpy as np mu = 0. # the mean, mu nus = [1., 2., 5, 10, 100] # standard deviations, sigma markers = ['b-', 'r-', 'm-'...
22
75
0.645022
0
0
0
0
0
0
0
0
339
0.366883
15a91f68e5ff17be773436d601a24af7798d38aa
9,248
py
Python
usr/local/lib/python3.6/dist-packages/html2text/cli.py
threefoldtech/threebot_prebuilt
1f0e1c65c14cef079cd80f73927d7c8318755c48
[ "Apache-2.0" ]
null
null
null
usr/local/lib/python3.6/dist-packages/html2text/cli.py
threefoldtech/threebot_prebuilt
1f0e1c65c14cef079cd80f73927d7c8318755c48
[ "Apache-2.0" ]
null
null
null
usr/local/lib/python3.6/dist-packages/html2text/cli.py
threefoldtech/threebot_prebuilt
1f0e1c65c14cef079cd80f73927d7c8318755c48
[ "Apache-2.0" ]
null
null
null
import argparse import sys from html2text import HTML2Text, __version__, config def main(): baseurl = "" class bcolors: HEADER = "\033[95m" OKBLUE = "\033[94m" OKGREEN = "\033[92m" WARNING = "\033[93m" FAIL = "\033[91m" ENDC = "\033[0m" BOLD = "\033[1m...
30.123779
87
0.596453
234
0.025303
0
0
0
0
0
0
3,209
0.346994
15aa3d879d1c430956af982477b50e91fe1a8bdc
2,848
py
Python
handybeam/solver.py
ultraleap/HandyBeam
9f80b97742cde4b75d3478d554dc9bc2cd9dfd96
[ "ECL-2.0", "Apache-2.0" ]
2
2019-10-20T09:15:46.000Z
2020-12-03T00:31:23.000Z
handybeam/solver.py
ultraleap/HandyBeam
9f80b97742cde4b75d3478d554dc9bc2cd9dfd96
[ "ECL-2.0", "Apache-2.0" ]
3
2020-04-04T18:36:54.000Z
2021-10-12T22:57:34.000Z
handybeam/solver.py
ultraleap/HandyBeam
9f80b97742cde4b75d3478d554dc9bc2cd9dfd96
[ "ECL-2.0", "Apache-2.0" ]
5
2019-11-29T16:05:26.000Z
2021-07-01T22:56:39.000Z
""" .. the following is a link to enable linking to this file: .. solver_: Contains excitation solvers. A basic single-point-focus excitation solver is :meth:`handybeam.solver.Solver.single_focus_solver` """ # Imports import warnings warnings.warn('solver.py is obsolete - use beamformer.py instead') import handybea...
33.505882
122
0.589537
2,461
0.864115
0
0
0
0
0
0
1,768
0.620787
15aaa43978d8eaa0042bd4ae9f02f92ad679604f
36,550
py
Python
rest-service/manager_rest/deployment_update/manager.py
cloudify-cosmo/cloudify-manager
4a3f44ceb49d449bc5ebc8766b1c7b9c174ff972
[ "Apache-2.0" ]
124
2015-01-22T22:28:37.000Z
2022-02-26T23:12:06.000Z
rest-service/manager_rest/deployment_update/manager.py
cloudify-cosmo/cloudify-manager
4a3f44ceb49d449bc5ebc8766b1c7b9c174ff972
[ "Apache-2.0" ]
345
2015-01-08T15:49:40.000Z
2022-03-29T08:33:00.000Z
rest-service/manager_rest/deployment_update/manager.py
cloudify-cosmo/cloudify-manager
4a3f44ceb49d449bc5ebc8766b1c7b9c174ff972
[ "Apache-2.0" ]
77
2015-01-07T14:04:35.000Z
2022-03-07T22:46:00.000Z
######## # Copyright (c) 2017-2019 Cloudify Platform Ltd. 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 ...
46.090794
79
0.601532
33,465
0.915595
0
0
964
0.026375
0
0
7,503
0.20528
15ab520350fbf5d2df3da6de772dd557ce6bea6a
595
py
Python
kmeans.py
Tilmanator/Stock-Predictor
c67efa24d8c9ab65aba33280e7fc56a12ded7261
[ "MIT" ]
null
null
null
kmeans.py
Tilmanator/Stock-Predictor
c67efa24d8c9ab65aba33280e7fc56a12ded7261
[ "MIT" ]
null
null
null
kmeans.py
Tilmanator/Stock-Predictor
c67efa24d8c9ab65aba33280e7fc56a12ded7261
[ "MIT" ]
null
null
null
from sklearn.cluster import KMeans import numpy as np import matplotlib.pyplot as plt x = np.array([1,2,3,7,8,9]) y = np.array([7,6,7,3,2,2]) plt.scatter(x, y) plt.show() X = np.array(zip(x,y)) kmeans = KMeans(n_clusters=2) kmeans.fit(X) centroids = kmeans.cluster_centers_ labels = kmeans.labels_ colours = ['g.'...
22.037037
78
0.635294
0
0
0
0
0
0
0
0
66
0.110924
15b0920b82c1636984d52cd2a1a47d2d9c032561
14,288
py
Python
dataproxy/implementations.py
peerplays-network/bos-dataproxy
ff19ce97981a10d8ff8d6ad3ed6afe7b4cdd42fc
[ "MIT" ]
6
2019-12-05T18:37:33.000Z
2019-12-20T17:58:32.000Z
dataproxy/implementations.py
peerplays-network/bos-dataproxy
ff19ce97981a10d8ff8d6ad3ed6afe7b4cdd42fc
[ "MIT" ]
2
2019-08-06T10:40:45.000Z
2020-02-21T14:14:12.000Z
dataproxy/implementations.py
peerplays-network/bos-dataproxy
ff19ce97981a10d8ff8d6ad3ed6afe7b4cdd42fc
[ "MIT" ]
1
2019-07-01T13:25:15.000Z
2019-07-01T13:25:15.000Z
import logging from .processors import JsonProcessor from . import Config from .stores import IncidentFileStore, RawStore, ProcessedFileStore from .routes.push import PushReceiver import json from bos_incidents.exceptions import DuplicateIncidentException import threading import time from strict_rfc3339 import Inval...
42.778443
206
0.569219
0
0
0
0
0
0
0
0
2,746
0.192189
15b3103b6182bc5b254439b61e878924238c7af3
212
py
Python
contrib/examples/actions/print_config.py
padamel/files4coding
3a0479cc9244efd632d14a48c8dc6fd1367edf3e
[ "Apache-2.0" ]
null
null
null
contrib/examples/actions/print_config.py
padamel/files4coding
3a0479cc9244efd632d14a48c8dc6fd1367edf3e
[ "Apache-2.0" ]
2
2021-09-19T19:48:15.000Z
2021-09-19T19:48:16.000Z
contrib/examples/actions/print_config.py
padamel/files4coding
3a0479cc9244efd632d14a48c8dc6fd1367edf3e
[ "Apache-2.0" ]
null
null
null
from pprint import pprint from st2common.runners.base_action import Action class PrintConfigAction(Action): def run(self): print("=========") pprint(self.config) print("=========")
19.272727
48
0.608491
133
0.627358
0
0
0
0
0
0
22
0.103774
15b528691ced37fef4bc2f524d86160eed2c75df
7,525
py
Python
visualization/panda/rpc/rviz_pb2.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
23
2021-04-02T09:02:04.000Z
2022-03-22T05:31:03.000Z
visualization/panda/rpc/rviz_pb2.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
35
2021-04-12T09:41:05.000Z
2022-03-26T13:32:46.000Z
visualization/panda/rpc/rviz_pb2.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
16
2021-03-30T11:55:45.000Z
2022-03-30T07:10:59.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: rviz.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf i...
29.509804
557
0.749635
0
0
0
0
0
0
0
0
1,615
0.214618
15b670262fd9d1d5bb5bbf2c9ec8c0581b614760
4,418
py
Python
main.py
kantegory/accreditation_system
d5595b265788cf9b63431650d2911695ad737038
[ "MIT" ]
null
null
null
main.py
kantegory/accreditation_system
d5595b265788cf9b63431650d2911695ad737038
[ "MIT" ]
4
2020-04-16T17:52:37.000Z
2021-12-13T20:35:51.000Z
main.py
kantegory/accreditation_system
d5595b265788cf9b63431650d2911695ad737038
[ "MIT" ]
1
2020-04-07T06:18:40.000Z
2020-04-07T06:18:40.000Z
import bottle from bottle import request, route, template, auth_basic, redirect from utils.db_helper import create_blank from utils.db_manage import get_all_blanks, get_all_questions_by_token, \ get_blank_id_by_token, add_new_users_answers, \ get_blank_info_by_token, get_report_by_token, get_all_standards_by_to...
29.851351
154
0.717972
0
0
0
0
3,400
0.769579
0
0
535
0.121096
15b6b79e99c48019821e5f8d99db6cad406b8146
362
py
Python
ajax_forms/tests/forms.py
chrisspen/django-ajax-forms
da5031192a46aaa2fe3de5d6984b376755c9e429
[ "BSD-3-Clause" ]
null
null
null
ajax_forms/tests/forms.py
chrisspen/django-ajax-forms
da5031192a46aaa2fe3de5d6984b376755c9e429
[ "BSD-3-Clause" ]
29
2017-09-30T09:45:56.000Z
2021-03-01T14:40:23.000Z
ajax_forms/tests/forms.py
chrisspen/django-ajax-forms
da5031192a46aaa2fe3de5d6984b376755c9e429
[ "BSD-3-Clause" ]
9
2017-05-12T11:48:47.000Z
2018-07-13T12:07:58.000Z
from django import forms from .models import Contact #class ContactForm(forms.Form): #name = forms.CharField(max_length=50) class ContactForm(forms.Form): name = forms.CharField() email = forms.EmailField() age = forms.IntegerField() class ContactModelForm(forms.ModelForm): class Meta: m...
21.294118
42
0.69337
228
0.629834
0
0
0
0
0
0
78
0.21547
15b7a264d607ff095bc9d427c0c9c5d6ae9bc122
1,063
py
Python
ImageProcessing-Python/blog12-warpAffine/blog12-image03.py
Songner/image_classfication
c1f15b2b96544e859e14a92373eb57c6a2644a93
[ "MIT" ]
null
null
null
ImageProcessing-Python/blog12-warpAffine/blog12-image03.py
Songner/image_classfication
c1f15b2b96544e859e14a92373eb57c6a2644a93
[ "MIT" ]
null
null
null
ImageProcessing-Python/blog12-warpAffine/blog12-image03.py
Songner/image_classfication
c1f15b2b96544e859e14a92373eb57c6a2644a93
[ "MIT" ]
null
null
null
#encoding:utf-8 import cv2 import numpy as np import matplotlib.pyplot as plt #读取图片 src = cv2.imread('test01.jpg') #获取图像大小 rows, cols = src.shape[:2] #将源图像高斯模糊 img = cv2.GaussianBlur(src, (3,3), 0) #进行灰度化处理 gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) #边缘检测(检测出图像的边缘信息) edges = cv2.Canny(gray,50,250,...
21.693878
77
0.650988
0
0
0
0
0
0
0
0
386
0.305138
15b7b434f546b16436f33e7ab0369ff24dbf0a48
846
py
Python
v2e/run_v2e.py
ibugueno/UOH-EventCameras
1941e90499955e199be33c706547b25ba6856eb4
[ "MIT" ]
1
2021-07-06T08:53:26.000Z
2021-07-06T08:53:26.000Z
v2e/run_v2e.py
ibugueno/UOH-EventCameras
1941e90499955e199be33c706547b25ba6856eb4
[ "MIT" ]
null
null
null
v2e/run_v2e.py
ibugueno/UOH-EventCameras
1941e90499955e199be33c706547b25ba6856eb4
[ "MIT" ]
1
2021-07-06T08:53:26.000Z
2021-07-06T08:53:26.000Z
from os import listdir from os.path import isfile, join from videoprops import get_video_properties import math import subprocess import time input_path = 'input/Test_Set/' output_path = 'output/Test_Set/' files = [f for f in listdir(input_path) if isfile(join(input_path, f))] for file in files: input_full_path ...
24.171429
126
0.689125
0
0
0
0
0
0
0
0
191
0.225236
15b9e21e51e269288bc47d66331e512cd62e6c38
610
py
Python
simulated_experiments/create_config.py
elerson/NetworkedRobotsProject
d2b9d0a121c5421a40e806a93e6a8f1315f24441
[ "MIT" ]
null
null
null
simulated_experiments/create_config.py
elerson/NetworkedRobotsProject
d2b9d0a121c5421a40e806a93e6a8f1315f24441
[ "MIT" ]
null
null
null
simulated_experiments/create_config.py
elerson/NetworkedRobotsProject
d2b9d0a121c5421a40e806a93e6a8f1315f24441
[ "MIT" ]
null
null
null
#!/usr/bin/python config_exp = ''' robots: 1: id: 1 ip: 192.168.0.1 macaddress: ec:08:6b:0d:68:ef cable_ip: 150.164.212.43 configs: map: DIR_/map/ambiente.png treefile: DIR_/steinerData1.dat resolution: 0.05 exit: 1 simulation: 1 broadcast_address: 127.255.255.255 algorithm_port: 3998...
16.052632
47
0.659016
133
0.218033
0
0
0
0
0
0
373
0.611475
15ba07a2ed799dc5d1afcacd9adc7e0a124b0fc0
2,309
py
Python
tests/relay/test_node_permissions.py
Dagurmart/graphene-django-plus
c8bc3c1179a02f51ff97bb8ba9dd187737a28b68
[ "MIT" ]
null
null
null
tests/relay/test_node_permissions.py
Dagurmart/graphene-django-plus
c8bc3c1179a02f51ff97bb8ba9dd187737a28b68
[ "MIT" ]
null
null
null
tests/relay/test_node_permissions.py
Dagurmart/graphene-django-plus
c8bc3c1179a02f51ff97bb8ba9dd187737a28b68
[ "MIT" ]
1
2020-06-11T19:15:51.000Z
2020-06-11T19:15:51.000Z
import pytest from graphql_relay import to_global_id from rest_framework.utils import json @pytest.mark.django_db() def test_node_permission_classes_without_authentication(book_factory, graphql_client): book = book_factory() response = graphql_client.execute( """ query BookAsAdmin($id: ID!) {...
26.54023
86
0.563014
0
0
0
0
2,209
0.956691
0
0
699
0.302728
15bb3cbfcfa07f95701ecd2783316238c64ed5b5
3,960
py
Python
firebirdsql/tests/test_proc.py
dand-oss/pyfirebirdsql
1b8148f8937929cdd74774fef2611dd55ea6a757
[ "BSD-2-Clause" ]
31
2015-03-28T09:43:53.000Z
2022-02-27T18:20:06.000Z
firebirdsql/tests/test_proc.py
dand-oss/pyfirebirdsql
1b8148f8937929cdd74774fef2611dd55ea6a757
[ "BSD-2-Clause" ]
24
2015-01-16T03:00:33.000Z
2022-02-08T00:06:05.000Z
firebirdsql/tests/test_proc.py
dand-oss/pyfirebirdsql
1b8148f8937929cdd74774fef2611dd55ea6a757
[ "BSD-2-Clause" ]
21
2015-01-15T23:00:26.000Z
2020-11-04T08:30:13.000Z
from __future__ import with_statement import datetime import firebirdsql from firebirdsql.tests.base import * # noqa from firebirdsql.consts import * # noqa class TestProc(TestBase): def setUp(self): TestBase.setUp(self) cur = self.connection.cursor() cur.execute(''' ...
33.277311
82
0.49798
3,790
0.957071
0
0
0
0
0
0
2,103
0.531061
15bc79247061ea3640331e03d1630dd3daa07ec0
3,149
py
Python
log_in.py
ultirian/SQLAlchemyMySQLTest
1e605dafa3af638d9b8034d11dc8eafd78feef1a
[ "Unlicense" ]
null
null
null
log_in.py
ultirian/SQLAlchemyMySQLTest
1e605dafa3af638d9b8034d11dc8eafd78feef1a
[ "Unlicense" ]
null
null
null
log_in.py
ultirian/SQLAlchemyMySQLTest
1e605dafa3af638d9b8034d11dc8eafd78feef1a
[ "Unlicense" ]
null
null
null
""" Name: Christopher Weaver Date: 11/07/2021 Project: USW Coursework 2 Remake with Python and MySQL Additional lib Used: black, pylint, sqlacodegen. Description: Log in methods associated with log in class. """ # coding=utf-8 # Libraries import pyinputplus as pyin from log_in_class import LogInObject from user import...
25.601626
85
0.638298
0
0
0
0
0
0
0
0
753
0.239124
15bcb236ed8a4476a796d56e5b8eb69e73ae26a3
2,630
py
Python
backend/assignment/views/student.py
skku-npc/SKKU_Coding_Platform
1d972e8922484cf94f6735fd08b2565e5d3517d0
[ "MIT" ]
1
2022-03-30T14:03:23.000Z
2022-03-30T14:03:23.000Z
backend/assignment/views/student.py
skku-npc/SKKU_Coding_Platform
1d972e8922484cf94f6735fd08b2565e5d3517d0
[ "MIT" ]
56
2022-02-19T08:13:48.000Z
2022-03-25T10:17:07.000Z
backend/assignment/views/student.py
skku-npc/SKKU_Coding_Platform
1d972e8922484cf94f6735fd08b2565e5d3517d0
[ "MIT" ]
1
2022-03-25T15:02:46.000Z
2022-03-25T15:02:46.000Z
from utils.api import APIView from utils.decorators import login_required from course.models import Course, Registration from ..models import Assignment from ..serializers import AssignmentSerializer from drf_yasg.utils import swagger_auto_schema from drf_yasg import openapi class AssignmentAPI(APIView): @swagg...
36.027397
104
0.605323
2,349
0.893156
0
0
2,315
0.880228
0
0
358
0.136122
15bcf087df1b9bd27e662d12fa08d7dfa12a8608
14,380
py
Python
scielo_migration/isisdb/base_h_record.py
scieloorg/scielo_migration
320de42e48e873990a561058e8731ae3c477421a
[ "BSD-2-Clause" ]
null
null
null
scielo_migration/isisdb/base_h_record.py
scieloorg/scielo_migration
320de42e48e873990a561058e8731ae3c477421a
[ "BSD-2-Clause" ]
null
null
null
scielo_migration/isisdb/base_h_record.py
scieloorg/scielo_migration
320de42e48e873990a561058e8731ae3c477421a
[ "BSD-2-Clause" ]
1
2021-11-03T18:24:08.000Z
2021-11-03T18:24:08.000Z
# generated by ModelBuilder from scielo_migration.iid2json.meta_record import MetaRecord # generated by ModelBuilder class BaseArticleRecord(MetaRecord): def __init__( self, record, multi_val_tags=None, data_dictionary=None): super().__init__( record, multi_val_tags, d...
26.385321
208
0.571419
14,259
0.991586
0
0
11,801
0.820654
0
0
5,804
0.403616
15beb740c74dbae31445d5c0271c8943a849e3b1
913
py
Python
task_1_su.py
cicadina1/python_edu
7d5ce26050b16b8dca09ec54f3544abf02f46eac
[ "MIT" ]
null
null
null
task_1_su.py
cicadina1/python_edu
7d5ce26050b16b8dca09ec54f3544abf02f46eac
[ "MIT" ]
null
null
null
task_1_su.py
cicadina1/python_edu
7d5ce26050b16b8dca09ec54f3544abf02f46eac
[ "MIT" ]
null
null
null
seq = "AACTGAGAC" def split(sequence): return [char for char in seq] word = 'sequence' seqlist=(split(word)) print("Task 1: разделена секвенция\n",seqlist) def revetring (sequence): reversed_seq = seqlist[::-1] #reversed_seq = ''.join(reversed_seq) return reversed_seq print("Task 2: обратна секвенция...
30.433333
65
0.696605
0
0
0
0
0
0
0
0
344
0.344
15bf4e05af114e135643b6c92d1d2ce23c9e64a4
521
py
Python
hassio/custom_components/funiki/FunikiEntitiesView.py
funiki-io/addons
1b8253e40648f270a014b1277ff81fe5e9cb56a9
[ "Apache-2.0" ]
null
null
null
hassio/custom_components/funiki/FunikiEntitiesView.py
funiki-io/addons
1b8253e40648f270a014b1277ff81fe5e9cb56a9
[ "Apache-2.0" ]
null
null
null
hassio/custom_components/funiki/FunikiEntitiesView.py
funiki-io/addons
1b8253e40648f270a014b1277ff81fe5e9cb56a9
[ "Apache-2.0" ]
null
null
null
from .cutom_serializers import HassIoSerializers from homeassistant.components.http import HomeAssistantView import homeassistant.core as ha class FunikiEntitiesView(HomeAssistantView): url = "/api/funikientites" name = "api:funiki-entites-list" requires_auth = False @ha.callback def get(self, req...
32.5625
101
0.756238
376
0.721689
0
0
233
0.447217
0
0
68
0.130518
15c0b4a7aa18f44f069e90d242770b8b30f3462c
751
py
Python
isee/pip_utils.py
i2mint/isee
cb38a734420af1ab4489b9938cea48f443e66b13
[ "MIT" ]
null
null
null
isee/pip_utils.py
i2mint/isee
cb38a734420af1ab4489b9938cea48f443e66b13
[ "MIT" ]
15
2021-02-01T20:13:28.000Z
2021-12-15T20:38:18.000Z
isee/pip_utils.py
i2mint/isee
cb38a734420af1ab4489b9938cea48f443e66b13
[ "MIT" ]
null
null
null
import configparser import pip from isee.common import get_env_var, get_file_path def install_requires(project_dir=None): if not project_dir: project_dir = get_env_var('GITHUB_WORKSPACE') path = get_file_path('setup.cfg', project_dir) config = configparser.ConfigParser() config.read(path) ...
32.652174
84
0.712383
0
0
0
0
0
0
0
0
130
0.173103
ec59e713b0d0d17ceb783b3e53bc5213783303f5
208
py
Python
homeassistant/components/wemo/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/wemo/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/wemo/const.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Constants for the Belkin Wemo component.""" DOMAIN = "wemo" SERVICE_SET_HUMIDITY = "set_humidity" SERVICE_RESET_FILTER_LIFE = "reset_filter_life" WEMO_SUBSCRIPTION_EVENT = f"{DOMAIN}_subscription_event"
26
56
0.802885
0
0
0
0
0
0
0
0
115
0.552885
ec5b49ba0abac25c31f44e3e9a02624c74d597d4
244
py
Python
episode_7/Jack.py
ChucklesJM/Three-Hundred-Lines
9c0d59eeeffcb5565175fe24d95952fb1b34ffa1
[ "MIT" ]
1
2020-08-16T05:04:41.000Z
2020-08-16T05:04:41.000Z
episode_7/Jack.py
jackmitcheltree/Three-Hundred-Lines
9c0d59eeeffcb5565175fe24d95952fb1b34ffa1
[ "MIT" ]
null
null
null
episode_7/Jack.py
jackmitcheltree/Three-Hundred-Lines
9c0d59eeeffcb5565175fe24d95952fb1b34ffa1
[ "MIT" ]
1
2020-08-16T05:05:28.000Z
2020-08-16T05:05:28.000Z
import time as t s = t.time() set = [a**b for a in range(2,101) for b in range(2,101)] ; set.sort() for i in set: if set.count(i)>1: for j in range(set.count(i)-1): set.remove(i) print(len(set)) e = t.time() print(e-s)
20.333333
70
0.561475
0
0
0
0
0
0
0
0
0
0
ec5c5a3367b8409735b414d000ae6d691a2e9b7a
829
py
Python
debug.py
FrancoisData/BigGAN-pytorch
5fee762b83ff1de24876547d1cb1b2d9e99834e3
[ "Apache-2.0" ]
458
2018-11-15T00:20:38.000Z
2020-04-11T11:05:17.000Z
debug.py
FrancoisData/BigGAN-pytorch
5fee762b83ff1de24876547d1cb1b2d9e99834e3
[ "Apache-2.0" ]
18
2018-11-27T06:34:05.000Z
2020-03-26T05:33:28.000Z
debug.py
FrancoisData/BigGAN-pytorch
5fee762b83ff1de24876547d1cb1b2d9e99834e3
[ "Apache-2.0" ]
84
2018-11-17T07:36:50.000Z
2020-04-20T02:57:51.000Z
from model_resnet import * from demo import * from utils import * dim_z = 120 vocab_size = 1000 num_samples = 12 #@param {type:"slider", min:1, max:20, step:1} truncation = 0.32 #@param {type:"slider", min:0.02, max:1, step:0.02} noise_seed = 0 #@param {type:"slider", min:0, max:100, step:1} category = "951" z = t...
21.815789
69
0.694813
0
0
0
0
0
0
0
0
443
0.534379
ec5db73a5e8c1e84b7771da0358c010b16de6f7f
3,350
py
Python
venv/lib/python3.8/site-packages/vsts/member_entitlement_management/v4_1/models/extension_summary_data.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/member_entitlement_management/v4_1/models/extension_summary_data.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/member_entitlement_management/v4_1/models/extension_summary_data.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
54.032258
272
0.645373
2,742
0.818507
0
0
0
0
0
0
2,180
0.650746
ec5fb3f3115f92782ad4a5cdee350a82801348f1
3,816
py
Python
src/CreeDictionary/CreeDictionary/urls.py
aarppe/cree-intelligent-dictionary
79717a08f95827a024061a5a27000bbd3d684363
[ "Apache-2.0" ]
null
null
null
src/CreeDictionary/CreeDictionary/urls.py
aarppe/cree-intelligent-dictionary
79717a08f95827a024061a5a27000bbd3d684363
[ "Apache-2.0" ]
null
null
null
src/CreeDictionary/CreeDictionary/urls.py
aarppe/cree-intelligent-dictionary
79717a08f95827a024061a5a27000bbd3d684363
[ "Apache-2.0" ]
null
null
null
""" Definition of urls for CreeDictionary. """ from django.conf import settings from django.contrib import admin from django.contrib.sitemaps.views import sitemap from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.urls import include, path from django_js_reverse.views import urls_js impor...
37.048544
84
0.628407
0
0
0
0
0
0
0
0
1,999
0.523847
ec60e845881e6051f208432552c3af2afd7ffeee
679
py
Python
lib/models/sii_token.py
Daia-Systems-SPA/sii-dte-py
a1030f4abf3d4004fdede88072cc8621214158bf
[ "MIT" ]
null
null
null
lib/models/sii_token.py
Daia-Systems-SPA/sii-dte-py
a1030f4abf3d4004fdede88072cc8621214158bf
[ "MIT" ]
null
null
null
lib/models/sii_token.py
Daia-Systems-SPA/sii-dte-py
a1030f4abf3d4004fdede88072cc8621214158bf
[ "MIT" ]
1
2020-10-04T00:37:48.000Z
2020-10-04T00:37:48.000Z
import datetime class Token(): _token_string = '' _expiry_date = None def __init__(self, token_string): self._token_string = token_string """ Expire after 10 min """ self._expiry_date = datetime.datetime.now() + datetime.timedelta(0,60*10) def __str__(self): return _token_string def get_token(self): ...
23.413793
92
0.706922
659
0.970545
0
0
0
0
0
0
94
0.138439
ec61d6c1fe6b3a50c2ba90b0d04d3cc374029153
5,406
py
Python
setup.py
reecechimento/python-project-template
fc4e34343cc6cbee9b887dda1961c2d5d1fa3c3a
[ "MIT" ]
null
null
null
setup.py
reecechimento/python-project-template
fc4e34343cc6cbee9b887dda1961c2d5d1fa3c3a
[ "MIT" ]
null
null
null
setup.py
reecechimento/python-project-template
fc4e34343cc6cbee9b887dda1961c2d5d1fa3c3a
[ "MIT" ]
null
null
null
"""A setuptools based setup module. See: https://github.com/reecechimento/python-acelerate """ # 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 = (h...
53
155
0.544395
0
0
0
0
0
0
0
0
3,358
0.621162
ec622574ab25ad2863f97094f86d89e745408253
3,812
py
Python
models/conv_to_fc_net.py
Silent-Zebra/sequential_social_dilemma_games
8cf8faebf7de727bac55bd8020be7cd9cc243ccc
[ "MIT" ]
null
null
null
models/conv_to_fc_net.py
Silent-Zebra/sequential_social_dilemma_games
8cf8faebf7de727bac55bd8020be7cd9cc243ccc
[ "MIT" ]
null
null
null
models/conv_to_fc_net.py
Silent-Zebra/sequential_social_dilemma_games
8cf8faebf7de727bac55bd8020be7cd9cc243ccc
[ "MIT" ]
null
null
null
# Model taken from https://arxiv.org/pdf/1810.08647.pdf, # INTRINSIC SOCIAL MOTIVATION VIA CAUSAL # INFLUENCE IN MULTI-AGENT RL # model is a single convolutional layer with a kernel of size 3, stride of size 1, and 6 output # channels. This is connected to two fully connected layers of size 32 each import tensorflow...
28.447761
95
0.509444
3,338
0.875656
0
0
0
0
0
0
816
0.214061
ec62eab66396e7e93ed3e02a393356b10591dc52
2,348
py
Python
pmtg-synthetic-control/utils/loader.py
codyly/pmtg
2b37200b3d6e38c8d70f25ec6fef19ed18b81496
[ "MIT" ]
1
2022-02-15T13:40:09.000Z
2022-02-15T13:40:09.000Z
pmtg-synthetic-control/utils/loader.py
codyly/pmtg
2b37200b3d6e38c8d70f25ec6fef19ed18b81496
[ "MIT" ]
null
null
null
pmtg-synthetic-control/utils/loader.py
codyly/pmtg
2b37200b3d6e38c8d70f25ec6fef19ed18b81496
[ "MIT" ]
null
null
null
import numpy as np from utils.visualize import view_trajectory DEFAULT_SCALE = 1.0 def load_trajectory(file_name: str, num_steps: int, save_results: bool = True) -> np.ndarray: """Load paited trajectory and pre-processing Args: file_name (string): [description] num_steps (int): [description...
33.542857
101
0.633731
0
0
0
0
0
0
0
0
528
0.224872
ec63fe14fa9e569e0e9db8ad89909f7212dee7c0
193
py
Python
backend/app/api/api_v1/endpoints/job_classes.py
yangyuchi/ml-job-scheduler
bdafbf7fd266751a974d716e8d3ba64d3187fdcd
[ "MIT" ]
null
null
null
backend/app/api/api_v1/endpoints/job_classes.py
yangyuchi/ml-job-scheduler
bdafbf7fd266751a974d716e8d3ba64d3187fdcd
[ "MIT" ]
null
null
null
backend/app/api/api_v1/endpoints/job_classes.py
yangyuchi/ml-job-scheduler
bdafbf7fd266751a974d716e8d3ba64d3187fdcd
[ "MIT" ]
null
null
null
from fastapi import APIRouter from ....core.jobs import JobBase router = APIRouter() @router.get("") async def get_job_classes(): return [j.meta_info() for j in JobBase.__subclasses__()]
21.444444
60
0.73057
0
0
0
0
105
0.544041
89
0.46114
2
0.010363
ec644d6a76b9ebec8b12e7c2b679fb791dbf5fcc
1,110
py
Python
problems/115.py
mengshun/Leetcode
8bb676f2fff093e1417a4bed13d9ad708149be78
[ "MIT" ]
null
null
null
problems/115.py
mengshun/Leetcode
8bb676f2fff093e1417a4bed13d9ad708149be78
[ "MIT" ]
null
null
null
problems/115.py
mengshun/Leetcode
8bb676f2fff093e1417a4bed13d9ad708149be78
[ "MIT" ]
null
null
null
""" 115. 不同的子序列 https://leetcode-cn.com/problems/distinct-subsequences/ """ def numDistinct(s: str, t: str): m, n = len(s), len(t) if n > m: return 0 dp = [[0] * (n+1) for _ in range(m+1)] for i in range(m+1): dp[i][n] = 1 for i in range(m-1, -1, -1): for j in range(n-1, -1...
21.346154
65
0.454955
0
0
0
0
0
0
0
0
204
0.181818
ec650fc6ff3b5afb81c5df1579003ac556987f4e
360
py
Python
hub/backends.py
ekaputra07/lokerhub
c6974cc67c3be440ea5dd26fa32f95a5e67d77e8
[ "MIT" ]
null
null
null
hub/backends.py
ekaputra07/lokerhub
c6974cc67c3be440ea5dd26fa32f95a5e67d77e8
[ "MIT" ]
null
null
null
hub/backends.py
ekaputra07/lokerhub
c6974cc67c3be440ea5dd26fa32f95a5e67d77e8
[ "MIT" ]
null
null
null
from django.contrib.auth.backends import ModelBackend from hub.models import OneallToken class OneallBackend(ModelBackend): def authenticate(self, oneall_token=None): try: token = OneallToken.objects.get(token=oneall_token) except OneallToken.DoesNotExist: return None ...
25.714286
63
0.683333
268
0.744444
0
0
0
0
0
0
0
0
ec6513c05b81af621f85dc42a34ad6180c6b7cdd
3,902
py
Python
scripts/update_dreqs/update_dreqs_0183.py
jonseddon/primavera-dmt
1239044e37f070b925a3d06db68351f285df780c
[ "BSD-3-Clause" ]
null
null
null
scripts/update_dreqs/update_dreqs_0183.py
jonseddon/primavera-dmt
1239044e37f070b925a3d06db68351f285df780c
[ "BSD-3-Clause" ]
49
2018-11-14T17:00:03.000Z
2021-12-20T11:04:22.000Z
scripts/update_dreqs/update_dreqs_0183.py
jonseddon/primavera-dmt
1239044e37f070b925a3d06db68351f285df780c
[ "BSD-3-Clause" ]
2
2018-07-04T10:58:43.000Z
2018-09-29T14:55:08.000Z
#!/usr/bin/env python """ update_dreqs_0183.py ESGF AttributeUpdate Called from a Rose suite to update the checksums in MPI AMIP files that have already been updated with the first version that didn't preserve checksums. """ from __future__ import (unicode_literals, division, absolute_import, p...
28.481752
80
0.604049
0
0
0
0
0
0
0
0
1,118
0.28652
ec651b25d70a03441a32b1472067abddb009977d
2,709
py
Python
GearBot/Util/Permissioncheckers.py
TheMelvin/Gearbot
2fd0d6a1fb6750a1cb6c49828c4b9d35acaa544a
[ "MIT" ]
null
null
null
GearBot/Util/Permissioncheckers.py
TheMelvin/Gearbot
2fd0d6a1fb6750a1cb6c49828c4b9d35acaa544a
[ "MIT" ]
null
null
null
GearBot/Util/Permissioncheckers.py
TheMelvin/Gearbot
2fd0d6a1fb6750a1cb6c49828c4b9d35acaa544a
[ "MIT" ]
null
null
null
from discord.ext import commands from Util import Configuration def is_owner(): async def predicate(ctx): return ctx.bot.is_owner(ctx.author) return commands.check(predicate) def is_trusted(ctx): return is_user("TRUSTED", ctx) or is_mod(ctx) def is_mod(ctx:commands.Context): return is_user...
26.821782
137
0.689553
0
0
0
0
0
0
327
0.120709
109
0.040236
ec66e4ff2212655f50190f485778b9d0bb5f89f4
2,149
py
Python
main.py
0x437968/overexposure-correction-dise
08bedbc1b418a23b1ab6e849c3c7d4fdef04e472
[ "MIT" ]
4
2020-09-30T03:00:57.000Z
2021-06-28T04:51:47.000Z
main.py
0x437968/overexposure-correction-dise
08bedbc1b418a23b1ab6e849c3c7d4fdef04e472
[ "MIT" ]
1
2021-11-05T00:50:56.000Z
2022-03-03T13:17:17.000Z
main.py
0x437968/overexposure-correction-dise
08bedbc1b418a23b1ab6e849c3c7d4fdef04e472
[ "MIT" ]
1
2022-03-03T13:15:07.000Z
2022-03-03T13:15:07.000Z
from data_cfg import project_dataset from tensorboardX import SummaryWriter from utils import init_folder from options import ProjectOptions from model import create_model import time import os import torch if __name__ == '__main__': opt=ProjectOptions().get_opt() ProjectOptions.print_options(opt)...
35.229508
97
0.579339
0
0
0
0
0
0
0
0
193
0.089809
ec680a486a8b041372298819a8d2017978d1f0dd
752
py
Python
mult.py
jonathanbell/using-python-with-excel
2a3355d060216e9911159bed9b3c4f9f11b944ae
[ "WTFPL" ]
null
null
null
mult.py
jonathanbell/using-python-with-excel
2a3355d060216e9911159bed9b3c4f9f11b944ae
[ "WTFPL" ]
null
null
null
mult.py
jonathanbell/using-python-with-excel
2a3355d060216e9911159bed9b3c4f9f11b944ae
[ "WTFPL" ]
null
null
null
import pandas from openpyxl import load_workbook from openpyxl.styles import Font df1 = pandas.read_excel('data/shifts.xlsx', sheet_name='Sheet') df2 = pandas.read_excel('data/shifts.xlsx', sheet_name='Sheet1') df3 = pandas.read_excel('data/shift_3.xlsx') df_all = pandas.concat([df1, df2, df3], sort=False) to_excel ...
26.857143
64
0.718085
0
0
0
0
0
0
0
0
160
0.212766
ec684c29cec63e05fe5c271d79cdf0cf8195b34d
530
py
Python
ibis/clickhouse/tests/test_types.py
tswast/ibis
2f6d47e4c33cefd7ea1d679bb1d9253c2245993b
[ "Apache-2.0" ]
null
null
null
ibis/clickhouse/tests/test_types.py
tswast/ibis
2f6d47e4c33cefd7ea1d679bb1d9253c2245993b
[ "Apache-2.0" ]
null
null
null
ibis/clickhouse/tests/test_types.py
tswast/ibis
2f6d47e4c33cefd7ea1d679bb1d9253c2245993b
[ "Apache-2.0" ]
null
null
null
import pytest import pandas as pd pytest.importorskip('clickhouse_driver') pytestmark = pytest.mark.clickhouse def test_column_types(alltypes): df = alltypes.execute() assert df.tinyint_col.dtype.name == 'int8' assert df.smallint_col.dtype.name == 'int16' assert df.int_col.dtype.name == 'int32' ...
29.444444
69
0.733962
0
0
0
0
0
0
0
0
64
0.120755
ec69ff59cf02e6fc2fd5b3c7379eb1801389f065
6,141
py
Python
functions.py
traian-d/fractals
a8666c9b6eb446beef0fe71d6d1e6ccfa9f2108e
[ "MIT" ]
null
null
null
functions.py
traian-d/fractals
a8666c9b6eb446beef0fe71d6d1e6ccfa9f2108e
[ "MIT" ]
null
null
null
functions.py
traian-d/fractals
a8666c9b6eb446beef0fe71d6d1e6ccfa9f2108e
[ "MIT" ]
null
null
null
import fractal class Mandelbrot(fractal.Fractal): __slots__ = ('__w', '__h', '__max_iter', '__grid') def __init__(self, re_start, re_end, im_start, im_end, max_iter=100, w=600, h=400): self.__max_iter = max_iter self.__w = w self.__h = h self.__grid = self.make_grid(re_start, ...
34.5
123
0.579873
5,001
0.814362
0
0
218
0.035499
0
0
1,335
0.217391
ec6a0fc301cf85afc5c914d15d835f6315fb62d6
2,204
py
Python
101-150/142_linked_list_cycle_ii.py
ChenhaoJiang/LeetCode-Solution
b2119ad938c18f75948d0f5cf4ae3773820dcc93
[ "MIT" ]
16
2019-03-30T07:25:27.000Z
2020-07-28T15:34:53.000Z
101-150/142_linked_list_cycle_ii.py
ChenhaoJiang/LeetCode-Solution
b2119ad938c18f75948d0f5cf4ae3773820dcc93
[ "MIT" ]
null
null
null
101-150/142_linked_list_cycle_ii.py
ChenhaoJiang/LeetCode-Solution
b2119ad938c18f75948d0f5cf4ae3773820dcc93
[ "MIT" ]
2
2020-06-26T13:02:14.000Z
2020-07-28T04:59:15.000Z
""" Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, we use an integer pos which represents the position (0-indexed) in the linked list where tail connects to. If pos is -1, then there is no cycle in the linked list. Note: Do...
35.548387
154
0.651543
1,191
0.395681
0
0
0
0
0
0
2,472
0.821262
ec6c02a550bff95ca8a0b04da83c54cb712ce0cf
1,161
py
Python
tests/test_settings.py
martimarkov/django-ajax-datatable
d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4
[ "MIT" ]
1
2021-11-19T13:36:30.000Z
2021-11-19T13:36:30.000Z
tests/test_settings.py
martimarkov/django-ajax-datatable
d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4
[ "MIT" ]
null
null
null
tests/test_settings.py
martimarkov/django-ajax-datatable
d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 from __future__ import unicode_literals, absolute_import DEBUG = True USE_TZ = True # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = "77777777777777777777777777777777777777777777777777" DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql'...
25.23913
89
0.643411
0
0
0
0
0
0
0
0
760
0.654608
ec6cd0510d28ae1936e2680c37f9c33430331487
117
py
Python
abc/abc201/abc201a.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
1
2019-08-21T00:49:34.000Z
2019-08-21T00:49:34.000Z
abc/abc201/abc201a.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
abc/abc201/abc201a.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
A = list(map(int, input().split())) A.sort() if A[2] - A[1] == A[1] - A[0]: print('Yes') else: print('No')
13
35
0.470085
0
0
0
0
0
0
0
0
9
0.076923
ec6de7bbb85c5d6dd0a3ddc51579d47f873de627
2,213
py
Python
generate_areacode_lookup_data.py
EricSchles/investigator
88b4215667b24483efbd9aba690e7c3a231539f6
[ "MIT" ]
17
2016-06-17T23:42:42.000Z
2020-06-29T19:17:09.000Z
generate_areacode_lookup_data.py
EricSchles/investigator
88b4215667b24483efbd9aba690e7c3a231539f6
[ "MIT" ]
6
2016-06-16T18:46:45.000Z
2017-07-02T16:41:45.000Z
generate_areacode_lookup_data.py
EricSchles/investigator
88b4215667b24483efbd9aba690e7c3a231539f6
[ "MIT" ]
11
2016-06-21T21:17:46.000Z
2020-06-30T05:25:36.000Z
from selenium import webdriver from selenium.webdriver.common.by import By from app.models import AreaCodeLookup from pyzipcode import ZipCodeDatabase from app import db import us from geopy.geocoders import Nominatim from easydict import EasyDict as edict print("starting webdriver") driver = webdriver.Firefox() print...
32.072464
92
0.553999
0
0
0
0
0
0
0
0
279
0.126073
ec6dfd9168cb83b20497e11b47d3f3850c1eba7d
1,493
py
Python
backend/chuckwagon/models.py
kwkelly/chuckwagon
f6d3ee564b9d895195df223025ac05ef56f78e52
[ "MIT" ]
null
null
null
backend/chuckwagon/models.py
kwkelly/chuckwagon
f6d3ee564b9d895195df223025ac05ef56f78e52
[ "MIT" ]
null
null
null
backend/chuckwagon/models.py
kwkelly/chuckwagon
f6d3ee564b9d895195df223025ac05ef56f78e52
[ "MIT" ]
null
null
null
from django.contrib.gis.db import models from django.utils.timezone import now # timezone depends on value of USE_TZ env variable from django.utils import timezone class Brand(models.Model): name = models.CharField(max_length=128, blank=False) twitter_handle = models.CharField(max_length=100, blank=True) ...
30.469388
88
0.705961
1,317
0.882117
0
0
0
0
0
0
172
0.115204
ec71f4c0538be0f19f562102f9375c395809b744
3,471
py
Python
pybargain_protocol/bargaining_cancellation.py
LaurentMT/pybargain_protocol
3b4c6040ec3562ce6921f917c97a9931d5c6e5de
[ "MIT" ]
1
2015-06-30T15:34:41.000Z
2015-06-30T15:34:41.000Z
pybargain_protocol/bargaining_cancellation.py
LaurentMT/pybargain_protocol
3b4c6040ec3562ce6921f917c97a9931d5c6e5de
[ "MIT" ]
null
null
null
pybargain_protocol/bargaining_cancellation.py
LaurentMT/pybargain_protocol
3b4c6040ec3562ce6921f917c97a9931d5c6e5de
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Version: 0.0.1 Python library for the bargaining protocol ''' from pybargain_protocol import bargaining_pb2 from pybargain_protocol.constants import MAINNET from pybargain_protocol.exceptions import SerializationError, DeserializationError from pybargain_protocol.protocol_rules import check_ti...
32.745283
164
0.60098
3,106
0.894843
0
0
0
0
0
0
1,669
0.480841
ec7214eeeb62991a6453d69509efc08658687c8c
37,375
py
Python
geodesic.py
aconz2/blender-addon-geodesic
8b5d48fcaaa42524cba43d2b0d9c328974e9ccd7
[ "Unlicense" ]
null
null
null
geodesic.py
aconz2/blender-addon-geodesic
8b5d48fcaaa42524cba43d2b0d9c328974e9ccd7
[ "Unlicense" ]
null
null
null
geodesic.py
aconz2/blender-addon-geodesic
8b5d48fcaaa42524cba43d2b0d9c328974e9ccd7
[ "Unlicense" ]
null
null
null
bl_info = { 'name': 'Geodesic', 'description': 'Geodesic like things; weighted shortest path and walking along a mesh', 'blender': (2, 92, 0), 'category': 'Object', } import itertools import random from functools import partial from itertools import starmap import math import logging import networkx ...
34.415285
169
0.632241
15,990
0.427826
297
0.007946
539
0.014421
0
0
8,154
0.218167
ec722b1aeed5106b395d1dfc9f31482926f0f34e
352
py
Python
ex3.py
Oliviaha/python-the-hardway
680ed0594878507b368ece0e58f87a6126746dcf
[ "MIT" ]
null
null
null
ex3.py
Oliviaha/python-the-hardway
680ed0594878507b368ece0e58f87a6126746dcf
[ "MIT" ]
1
2019-11-10T17:37:00.000Z
2019-11-10T17:37:26.000Z
ex3.py
Oliviaha/python-the-hardway
680ed0594878507b368ece0e58f87a6126746dcf
[ "MIT" ]
null
null
null
# -*-coding: utf-8 -*- print "닭을 세어 봅시다." print "암탉", 25+30 / 6 print "수탉", 100-25 * 3 % 4 print "이제 달걀도 세어 봅시다." print 3+2+1-5+4%2-1 / 4+6 print "3+2 < 5-7 는 참인가요?" print 3+2 <5-7 print "3+2 는 얼마죠?", 3+2 print "5-7은 얼마죠?", 5-7 print "아하 이게 False인 이유네요" print "더 해볼까요." print "더 큰가요??", 5 > -2 print "더 크거나 같나요?", 5...
17.6
26
0.551136
0
0
0
0
0
0
0
0
293
0.605372
ec725505572b3e19d982ccd45eb293ff94defa41
1,603
py
Python
code/src/system/controller/python/messaging/messages/hello.py
mcelhennyi/NXP-HoverGames-2
7826d153b870ff46952e7b2d3b6822960fed9c23
[ "BSD-3-Clause" ]
1
2020-08-30T16:25:53.000Z
2020-08-30T16:25:53.000Z
code/src/system/controller/python/messaging/messages/hello.py
mcelhennyi/NXP-HoverGames-2
7826d153b870ff46952e7b2d3b6822960fed9c23
[ "BSD-3-Clause" ]
1
2021-02-02T00:36:07.000Z
2021-02-02T00:36:07.000Z
code/src/system/controller/python/messaging/messages/hello.py
mcelhennyi/NXP-HoverGames-2
7826d153b870ff46952e7b2d3b6822960fed9c23
[ "BSD-3-Clause" ]
null
null
null
import struct from src.system.controller.python.messaging.messages import Message, hello, header, NODE_TYPE_CONTROLLER, MESSAGE_HELLO, ip_address class HelloMessage(Message): def __init__(self, raw_bytes=None, # OR source_id=None, target_id=None, listening_port=...
38.166667
174
0.539613
1,453
0.906425
0
0
0
0
0
0
379
0.236432
ec74193abc892521102cb21f200e6fc43face9bf
937
py
Python
birch/paths.py
shaypal5/birch
f3d1b7b9701f8a13fb62c9d606aa0a99697ae5b4
[ "MIT" ]
14
2018-02-11T13:56:02.000Z
2022-02-17T14:29:45.000Z
birch/paths.py
shaypal5/birch
f3d1b7b9701f8a13fb62c9d606aa0a99697ae5b4
[ "MIT" ]
2
2018-04-19T14:35:48.000Z
2020-07-22T14:58:11.000Z
birch/paths.py
shaypal5/birch
f3d1b7b9701f8a13fb62c9d606aa0a99697ae5b4
[ "MIT" ]
11
2018-04-10T19:41:22.000Z
2022-02-17T13:18:32.000Z
"""Path-related functions for birch.""" import os def _legacy_cfg_dpath(namespace): return os.path.join( os.path.expanduser('~'), '.{}'.format(namespace), ) XDG_CONFIG_HOME_VARNAME = 'XDG_CONFIG_HOME' def _xdg_cfg_dpath(namespace): if XDG_CONFIG_HOME_VARNAME in os.environ: # pragma: ...
21.790698
65
0.607257
0
0
0
0
0
0
0
0
175
0.186766
ec74a4fd26f6d6f3e84eb0b32f9f306a3310afb5
228
py
Python
src/test/unit_tests/test_right_shift.py
ambertide/SASVM
ee699ec9b585ad0fccb0b70e11dde1b225ac56c1
[ "MIT" ]
null
null
null
src/test/unit_tests/test_right_shift.py
ambertide/SASVM
ee699ec9b585ad0fccb0b70e11dde1b225ac56c1
[ "MIT" ]
7
2019-12-27T20:59:12.000Z
2020-01-08T22:53:42.000Z
src/test/unit_tests/test_right_shift.py
ambertide/SASVM
ee699ec9b585ad0fccb0b70e11dde1b225ac56c1
[ "MIT" ]
null
null
null
from unittest import TestCase from spacecat.common_utils import right_shift class TestRight_shift(TestCase): def test_right_shift(self): to_shift = "1111" self.assertEqual("0011", right_shift(to_shift, 2))
25.333333
58
0.741228
149
0.653509
0
0
0
0
0
0
12
0.052632
ec75d8f9432b77a66901b060a53c5ffc3d0850ee
1,085
py
Python
2015/day18.py
kyz/adventofcode
b3dd544624a8fc313ca1fad0d2f02f53bd79ce3d
[ "MIT" ]
null
null
null
2015/day18.py
kyz/adventofcode
b3dd544624a8fc313ca1fad0d2f02f53bd79ce3d
[ "MIT" ]
null
null
null
2015/day18.py
kyz/adventofcode
b3dd544624a8fc313ca1fad0d2f02f53bd79ce3d
[ "MIT" ]
null
null
null
def read_state(lines): out = dict() for y, row in enumerate(lines): for x, char in enumerate(row): out[x,y] = 1 if char == '#' else 0 return out, len(lines[0]), len(lines) def simulate(state, w, h, corners): neighbours = {(x,y): [(i,j) for i in range(x-1,x+2) for j in range(y-1,y+2...
38.75
79
0.527189
0
0
0
0
0
0
0
0
62
0.057143
ec76a5ad52a10a7333ca973d639bf92204a67540
1,149
py
Python
schedule/ScheduleData.py
unkSonert/Vk-Bot-Uni-Dubna
e229a0200d2033693442fa22d02dcedd171e5510
[ "MIT" ]
null
null
null
schedule/ScheduleData.py
unkSonert/Vk-Bot-Uni-Dubna
e229a0200d2033693442fa22d02dcedd171e5510
[ "MIT" ]
null
null
null
schedule/ScheduleData.py
unkSonert/Vk-Bot-Uni-Dubna
e229a0200d2033693442fa22d02dcedd171e5510
[ "MIT" ]
2
2019-03-20T19:04:20.000Z
2019-03-20T21:32:19.000Z
import pickle from os.path import isfile from schedule.Week import Week from schedule.default import list_of_week_days_names, list_of_lesson_names class ScheduleData(object): homework = None week = None @staticmethod def get_day_number(name): return next(i for i, x in enumerate(list_of_week_...
28.02439
90
0.671889
976
0.849434
0
0
883
0.768494
0
0
52
0.045257
ec77c8bf9c27a03f5c191007f8bb35cba9a7948b
1,373
py
Python
examples/quick_start/nested.py
timdavis3991/do-py
921d3b3bdeb108f3e6379dcacab6ed6ffaaa0776
[ "MIT" ]
7
2020-07-07T02:53:44.000Z
2022-03-28T00:56:36.000Z
examples/quick_start/nested.py
timdavis3991/do-py
921d3b3bdeb108f3e6379dcacab6ed6ffaaa0776
[ "MIT" ]
31
2020-03-24T17:55:05.000Z
2022-03-31T04:27:14.000Z
examples/quick_start/nested.py
timdavis3991/do-py
921d3b3bdeb108f3e6379dcacab6ed6ffaaa0776
[ "MIT" ]
null
null
null
""" Nest a DataObject in another DataObject. """ from do_py import DataObject, R class Contact(DataObject): _restrictions = { 'phone_number': R.STR } class Author(DataObject): """ This DataObject is nested under `VideoGame` and nests `Contact`. :restriction id: :restriction name:...
24.963636
137
0.593591
787
0.573197
0
0
0
0
0
0
854
0.621996
ec7a60e0223bfa6c234ce32e60a39aef58669955
6,297
py
Python
tests/k8s_worker_mock_api_responses.py
hpe-container-platform-community/hpecp-client
947589ae30647fa40822b25b44027904355b6294
[ "MIT" ]
19
2020-05-03T23:50:38.000Z
2021-10-04T15:08:39.000Z
tests/k8s_worker_mock_api_responses.py
prakashmirji/hpecp-python-library
72eba918f2619f37783d25cd5a35dc73cff4dca9
[ "MIT" ]
100
2020-04-28T21:09:52.000Z
2022-03-14T17:15:27.000Z
tests/k8s_worker_mock_api_responses.py
prakashmirji/hpecp-python-library
72eba918f2619f37783d25cd5a35dc73cff4dca9
[ "MIT" ]
9
2020-05-22T16:47:08.000Z
2022-03-05T12:55:03.000Z
# (C) Copyright [2020] Hewlett Packard Enterprise Development LP # # 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,...
39.111801
76
0.419724
0
0
0
0
0
0
0
0
2,626
0.417024
ec7e1bffe71b9322d7ff66eba5d5fa007dda8dd4
498
py
Python
molecule/centos-6/tests/test_default.py
MatrixCrawler/ansible-consul
408c4c5fb59213ec49fbb10e680ba3540305c504
[ "BSD-2-Clause" ]
null
null
null
molecule/centos-6/tests/test_default.py
MatrixCrawler/ansible-consul
408c4c5fb59213ec49fbb10e680ba3540305c504
[ "BSD-2-Clause" ]
null
null
null
molecule/centos-6/tests/test_default.py
MatrixCrawler/ansible-consul
408c4c5fb59213ec49fbb10e680ba3540305c504
[ "BSD-2-Clause" ]
null
null
null
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_init_script_reload(host): cmd = host.run("/etc/init.d/consul reload") assert cmd.succeeded def test_init_script_stop(host): ...
22.636364
63
0.742972
0
0
0
0
0
0
0
0
108
0.216867
ec7e716c12e1ea7abf3037994eb6b405105174c5
3,168
py
Python
templates/scrape_mars.py
eilishlboyd/web-scraping-challenge
9159d1fb3a8b1f2c9cbf6b82827e0eb5c6394992
[ "ADSL" ]
null
null
null
templates/scrape_mars.py
eilishlboyd/web-scraping-challenge
9159d1fb3a8b1f2c9cbf6b82827e0eb5c6394992
[ "ADSL" ]
null
null
null
templates/scrape_mars.py
eilishlboyd/web-scraping-challenge
9159d1fb3a8b1f2c9cbf6b82827e0eb5c6394992
[ "ADSL" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[97]: #Imports & Dependencies get_ipython().system('pip install selenium') get_ipython().system('pip install splinter') from splinter import Browser from bs4 import BeautifulSoup executable_path = {"executable_path": "/usr/local/bin/chromedriver"} browser = Browser("chrome",...
20.307692
93
0.708018
0
0
0
0
0
0
0
0
1,111
0.350694
ec833209ab8559535355c5b3e5bd05cbca63d6cd
3,281
py
Python
grama.py
xyzdev/grama
f9ef5ccea28a5ca10aedfde21fbce613ce78092e
[ "MIT" ]
3
2017-08-23T02:01:58.000Z
2019-06-05T11:55:24.000Z
grama.py
xyzdev/grama
f9ef5ccea28a5ca10aedfde21fbce613ce78092e
[ "MIT" ]
null
null
null
grama.py
xyzdev/grama
f9ef5ccea28a5ca10aedfde21fbce613ce78092e
[ "MIT" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2017 xyzdev # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, pub...
40.506173
120
0.681804
0
0
0
0
0
0
0
0
1,516
0.462054
ec83603dc2f5de5383a2e5ca4b3ee0943e8df88f
1,270
py
Python
hall-of-fame/round-03/05_ArfiTech/team.py
sihumji00/cau-osp2020-game
bf832c576e3ec6b7b6fd86f4a6945943de0b0a3c
[ "Apache-2.0" ]
17
2020-12-08T14:33:01.000Z
2020-12-17T15:50:59.000Z
hall-of-fame/round-03/05_ArfiTech/team.py
sihumji00/cau-osp2020-game
bf832c576e3ec6b7b6fd86f4a6945943de0b0a3c
[ "Apache-2.0" ]
2
2020-11-26T12:21:53.000Z
2020-12-02T07:07:24.000Z
hall-of-fame/round-03/05_ArfiTech/team.py
sihumji00/cau-osp2020-game
bf832c576e3ec6b7b6fd86f4a6945943de0b0a3c
[ "Apache-2.0" ]
79
2020-11-26T00:43:18.000Z
2020-12-18T14:18:37.000Z
from loa.team import Team def get_team(): return LittleLyrical("LittleLyrical") class LittleLyrical(Team): def arrange(self, enemy: Team): first_unit = self.units[0] for i in range(self.num_positions - 1): j = i + 1 self.units[i] = self.units[j] ...
28.863636
55
0.462205
1,172
0.922835
0
0
0
0
0
0
27
0.02126
ec863bf797d4f68a78c20b0aaf1e7087f38bcc26
13,679
py
Python
scripts/download-data.py
tamslo/koala
9f8bb0e201bd9a773752f1fd70ecbfc2fe98eb5c
[ "MIT" ]
null
null
null
scripts/download-data.py
tamslo/koala
9f8bb0e201bd9a773752f1fd70ecbfc2fe98eb5c
[ "MIT" ]
null
null
null
scripts/download-data.py
tamslo/koala
9f8bb0e201bd9a773752f1fd70ecbfc2fe98eb5c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys, os, shutil, json, yaml from time import localtime ONLY_SIMULATED = False ONLY_GIAB = True # Make import from parent directory possible sys.path.append( os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) import modules.file_utils as file_utils with open(...
32.882212
86
0.605892
0
0
0
0
0
0
0
0
4,782
0.349587
ec8773e1ce2f98e8ecbc0c5250f556cebd0b01d5
500
py
Python
test/TestPasswordHash.py
yangguichun/SimpleBlogWithFlask
1b6bb04605a580f6c7b47dddd1ba734eb464fabd
[ "Apache-2.0" ]
null
null
null
test/TestPasswordHash.py
yangguichun/SimpleBlogWithFlask
1b6bb04605a580f6c7b47dddd1ba734eb464fabd
[ "Apache-2.0" ]
null
null
null
test/TestPasswordHash.py
yangguichun/SimpleBlogWithFlask
1b6bb04605a580f6c7b47dddd1ba734eb464fabd
[ "Apache-2.0" ]
null
null
null
import unittest from werkzeug.security import generate_password_hash, check_password_hash class TestPasswordHash(unittest.TestCase): def test_generate_password_hash(self): hash = generate_password_hash('mima') print('mima的hash是:', hash) def test_check_password_hash(self): password = 'm...
35.714286
73
0.74
414
0.818182
0
0
0
0
0
0
34
0.067194
ec87b2a8d66b90a05ef4708e84704798ddc9d79f
3,512
py
Python
src/loadgen/locustfile.py
vlesierse/awsdemo-abshop
a0390e88c0bbb5a9f2da950c9bfed88986826911
[ "MIT-0" ]
null
null
null
src/loadgen/locustfile.py
vlesierse/awsdemo-abshop
a0390e88c0bbb5a9f2da950c9bfed88986826911
[ "MIT-0" ]
null
null
null
src/loadgen/locustfile.py
vlesierse/awsdemo-abshop
a0390e88c0bbb5a9f2da950c9bfed88986826911
[ "MIT-0" ]
null
null
null
# # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software # without restriction, including without limitation the rights to u...
32.220183
180
0.628986
2,018
0.574601
0
0
1,227
0.349374
0
0
1,637
0.466116
ec88372c8535e15168d52d6a53fd1a5e9d041265
7,918
py
Python
tests/test_templatetags.py
mixxorz/slippers
af8b8b168653b379efe78654f6801b3af317c44e
[ "MIT" ]
175
2021-07-11T12:12:43.000Z
2022-03-21T16:18:54.000Z
tests/test_templatetags.py
mixxorz/slippers
af8b8b168653b379efe78654f6801b3af317c44e
[ "MIT" ]
6
2021-08-17T19:54:13.000Z
2022-01-25T13:02:29.000Z
tests/test_templatetags.py
mixxorz/slippers
af8b8b168653b379efe78654f6801b3af317c44e
[ "MIT" ]
6
2021-09-14T15:25:57.000Z
2022-01-07T06:35:13.000Z
from django.template import Context, Template, TemplateSyntaxError from django.test import TestCase, override_settings class ComponentTest(TestCase): def test_render_inline_component(self): template = """ {% avatar user="mixxorz" %} """ expected = """ <div>I am ava...
27.397924
113
0.50581
7,784
0.983077
0
0
605
0.076408
0
0
4,288
0.541551
ec8a2f8960c6c38997c2788b7d41e2a8915b8efa
5,599
py
Python
Application/index.py
mohammadn/Monte_Carlo
d490e5ae82eb134bec59953c697d3fe36ff28d8f
[ "MIT" ]
null
null
null
Application/index.py
mohammadn/Monte_Carlo
d490e5ae82eb134bec59953c697d3fe36ff28d8f
[ "MIT" ]
null
null
null
Application/index.py
mohammadn/Monte_Carlo
d490e5ae82eb134bec59953c697d3fe36ff28d8f
[ "MIT" ]
null
null
null
import os import logging from flask import Flask, request, render_template app = Flask(__name__) def doRender(tname, values={}): if not os.path.isfile( os.path.join(os.getcwd(), 'templates/'+tname) ): return render_template('index.htm') return render_template(tname, **values) @app.route('/', defaults={'path': ...
28.277778
380
0.663333
936
0.167173
0
0
5,229
0.933917
0
0
1,120
0.200036
ec8a928b68d92d2f7dcc179f2b1ab2b3f9085dbb
170
py
Python
tests/parameterize_test.py
PhamTDuc/HelloPackage
78b8fa00f932ba97f8afdf639ac4a66234e196dd
[ "MIT" ]
null
null
null
tests/parameterize_test.py
PhamTDuc/HelloPackage
78b8fa00f932ba97f8afdf639ac4a66234e196dd
[ "MIT" ]
null
null
null
tests/parameterize_test.py
PhamTDuc/HelloPackage
78b8fa00f932ba97f8afdf639ac4a66234e196dd
[ "MIT" ]
null
null
null
import pytest @pytest.mark.parametrize("val1, val2, result", ((5, 5, 10), (3, 5, 9))) def test_addition(val1, val2, result): assert val1 + val2 == result, "Failed"
24.285714
71
0.647059
0
0
0
0
153
0.9
0
0
28
0.164706