hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
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
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
972
max_forks_repo_name
stringlengths
6
130
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
611a48e8877904f720ec695f79c97f5f0e9fd035
2,342
py
Python
app/lib/pushkin/pushkin/database/migrations/env.py
krzyhook/pushkin-on-docker
05d192d0b4c753bcd41aba0a66394ae39dd78fc6
[ "MIT" ]
null
null
null
app/lib/pushkin/pushkin/database/migrations/env.py
krzyhook/pushkin-on-docker
05d192d0b4c753bcd41aba0a66394ae39dd78fc6
[ "MIT" ]
null
null
null
app/lib/pushkin/pushkin/database/migrations/env.py
krzyhook/pushkin-on-docker
05d192d0b4c753bcd41aba0a66394ae39dd78fc6
[ "MIT" ]
null
null
null
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # this will overwrite the ini...
30.415584
72
0.713493
54fe8710c63aa1e310bd3a9f4285cadc8080cad2
9,917
py
Python
catboost/benchmarks/training_speed/plot.py
jochenater/catboost
de2786fbc633b0d6ea6a23b3862496c6151b95c2
[ "Apache-2.0" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
catboost/benchmarks/training_speed/plot.py
jochenater/catboost
de2786fbc633b0d6ea6a23b3862496c6151b95c2
[ "Apache-2.0" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
catboost/benchmarks/training_speed/plot.py
jochenater/catboost
de2786fbc633b0d6ea6a23b3862496c6151b95c2
[ "Apache-2.0" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
import argparse import json import os import numpy as np from matplotlib import pyplot as plt from log_parser import read_results FONT_DICT = {'fontsize': 20} FIGURE_SIZE = (10, 5) def plot_time_per_iter(tracks, figsize=FIGURE_SIZE, title=None, save_path='time_per_iter.png'): fig = plt.figure(figsize=figsize) ...
32.729373
118
0.629223
7fcf227cf47da39e0ac00f9de2dc74f384627ed1
12,575
py
Python
src/tests/file_download_feature_test.py
andrewheberle/script-server
5d744179a2ab65f6d375b9b697c60732d9e5957f
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/tests/file_download_feature_test.py
andrewheberle/script-server
5d744179a2ab65f6d375b9b697c60732d9e5957f
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/tests/file_download_feature_test.py
andrewheberle/script-server
5d744179a2ab65f6d375b9b697c60732d9e5957f
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
import os import unittest from features import file_download_feature from model.script_configs import Parameter from tests import test_utils from utils import file_utils class TestFileMatching(unittest.TestCase): def test_simple_match(self): files = file_download_feature.find_matching_files('/home/user/t...
44.122807
128
0.523101
d5064dc29e70472b7ba954f03a2137da70c3dd8a
7,604
py
Python
lib/utils/voxelizer.py
Wei2624/domain-adaptation
8b1c241bb64451a8a5adc34132c75f41bed9bb7f
[ "MIT" ]
null
null
null
lib/utils/voxelizer.py
Wei2624/domain-adaptation
8b1c241bb64451a8a5adc34132c75f41bed9bb7f
[ "MIT" ]
null
null
null
lib/utils/voxelizer.py
Wei2624/domain-adaptation
8b1c241bb64451a8a5adc34132c75f41bed9bb7f
[ "MIT" ]
null
null
null
from fcn.config import cfg import numpy as np class Voxelizer(object): def __init__(self, grid_size, num_classes): self.grid_size = grid_size self.num_classes = num_classes self.margin = 0.3 self.min_x = 0 self.min_y = 0 self.min_z = 0 self.max_x = 0 ...
33.06087
145
0.557207
f41ebeeda05d6501f0162739876b727e0f2cda1b
739
py
Python
gen_charmap.py
matikij/rotelhex
d505c7d6d0e1827b63bd4d8875ecbc39044be5ef
[ "MIT" ]
null
null
null
gen_charmap.py
matikij/rotelhex
d505c7d6d0e1827b63bd4d8875ecbc39044be5ef
[ "MIT" ]
null
null
null
gen_charmap.py
matikij/rotelhex
d505c7d6d0e1827b63bd4d8875ecbc39044be5ef
[ "MIT" ]
null
null
null
import pprint import rotelhex import time r=rotelhex.Rotel(port="/dev/serial0") time.sleep(1) r._display.label_change=True r.label_change() time.sleep(2) # just in case last_char = r._display._current_char.decode('cp850') charmap = [last_char] while True: print("outer: {}".format(last_char)) r.char_next() ...
26.392857
64
0.679296
a27b41ddaf38753c8e5476feef8a77a5aee14370
12,066
py
Python
scripts/predict_uq.py
gmackall/deep-quant
1c0081795c8be9b7513697b367e9a1381f7f742a
[ "MIT" ]
122
2017-10-04T04:34:24.000Z
2022-03-10T23:59:22.000Z
scripts/predict_uq.py
emrekesici/deep-quant
19ae66d25924c4bc4b09879d82794013140d2a8b
[ "MIT" ]
20
2018-02-07T16:34:10.000Z
2020-07-21T08:45:59.000Z
scripts/predict_uq.py
Henrywcj/MLII
bf639e82f64b11b4af973570bccdfe5e2ed25533
[ "MIT" ]
51
2017-11-16T15:42:13.000Z
2022-03-19T00:46:57.000Z
# Copyright 2016 Euclidean Technologies Management LLC All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
35.488235
114
0.605254
8d600939b0c880477bd78a83c3d30205361e9b03
309
py
Python
demo_cli/cli.py
rstms/demo_cli
7539f74e8cf378e4068d60e8f53e094e6400cb70
[ "MIT" ]
null
null
null
demo_cli/cli.py
rstms/demo_cli
7539f74e8cf378e4068d60e8f53e094e6400cb70
[ "MIT" ]
null
null
null
demo_cli/cli.py
rstms/demo_cli
7539f74e8cf378e4068d60e8f53e094e6400cb70
[ "MIT" ]
null
null
null
"""Console script for demo_cli.""" import sys import click @click.command() @click.option('-t', '--test', type=str, default=None) def main(test): """Console script for demo_cli.""" click.echo(f"Test mode {test}.") return 0 if __name__ == "__main__": sys.exit(main()) # pragma: no cover
17.166667
53
0.634304
ed095c6032f08644f66c087b819912cb562a2747
636
py
Python
runlmc/approx/ski.py
vlad17/run-lmc
bddb7df2aa3dcec17380d858325bf50502fffb4e
[ "BSD-3-Clause" ]
29
2017-06-13T21:45:54.000Z
2021-12-15T02:03:10.000Z
runlmc/approx/ski.py
vlad17/run-lmc
bddb7df2aa3dcec17380d858325bf50502fffb4e
[ "BSD-3-Clause" ]
3
2020-06-11T02:34:23.000Z
2022-02-26T18:03:45.000Z
runlmc/approx/ski.py
vlad17/run-lmc
bddb7df2aa3dcec17380d858325bf50502fffb4e
[ "BSD-3-Clause" ]
9
2017-03-12T16:36:56.000Z
2021-03-02T05:10:36.000Z
# Copyright (c) 2016, Vladimir Feinberg # Licensed under the BSD 3-clause license (see LICENSE) from ..linalg.composition import Composition from ..linalg.matrix import Matrix # TODO(test) class SKI(Composition): def __init__(self, K, W, WT): self.W = W self.K = K self.WT = WT supe...
26.5
64
0.600629
991a1d6a8ac2bf46b81fd4aacf4df10a97c62b1b
352
py
Python
web-frameworks/django/corey_schafer_youtube_tutorial/users/signals.py
suroegin-learning/learn-python
be5bda86add0dcd6f2fd3db737bb7d0d3ec5f853
[ "MIT" ]
null
null
null
web-frameworks/django/corey_schafer_youtube_tutorial/users/signals.py
suroegin-learning/learn-python
be5bda86add0dcd6f2fd3db737bb7d0d3ec5f853
[ "MIT" ]
null
null
null
web-frameworks/django/corey_schafer_youtube_tutorial/users/signals.py
suroegin-learning/learn-python
be5bda86add0dcd6f2fd3db737bb7d0d3ec5f853
[ "MIT" ]
null
null
null
from django.db.models.signals import post_save from django.dispatch import receiver from django.contrib.auth.models import User from .models import Profile @receiver(post_save, sender=User) def create_profile(sender, instance, created, **kwargs): if created: new_profile = Profile.objects.create(user=insta...
29.333333
59
0.767045
c369139bd85b919581de9ddd9ab6a0d857f10626
6,466
py
Python
tests/hogwarts/fatlady.py
alixryu/getpost1.0
c3bb7f15261a5a50fe79103c1fa1008817250ae1
[ "MIT" ]
1
2019-08-29T00:03:08.000Z
2019-08-29T00:03:08.000Z
tests/hogwarts/fatlady.py
alixryu/getpost1.0
c3bb7f15261a5a50fe79103c1fa1008817250ae1
[ "MIT" ]
null
null
null
tests/hogwarts/fatlady.py
alixryu/getpost1.0
c3bb7f15261a5a50fe79103c1fa1008817250ae1
[ "MIT" ]
null
null
null
""":mod:`tests.hogwarts.fatlady` --- Test module of getpost.hogwarts.fatlady ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from nose.tools import eq_, ok_ from flask import session as user_session from getpost.hogwarts.fatlady import authenticate_user, deauthenticate_user from getp...
34.21164
77
0.717754
9bf720efff5ed169791dc4e37d95963dfc772dac
4,043
py
Python
Model.py
Mohsen-code/music-player-python
ba797ef3d79e7e427ff73b699ebf00e6274548fd
[ "MIT" ]
null
null
null
Model.py
Mohsen-code/music-player-python
ba797ef3d79e7e427ff73b699ebf00e6274548fd
[ "MIT" ]
null
null
null
Model.py
Mohsen-code/music-player-python
ba797ef3d79e7e427ff73b699ebf00e6274548fd
[ "MIT" ]
null
null
null
import json FILE_NAME = "play_lists.json" MUSIC_FILE_NAME = "music_of_play_lists.json" def get_play_lists(): play_lists_json_content = [] try: play_lists_content = open(FILE_NAME, "r") play_lists_json_content = json.loads(play_lists_content.read()) except Exception: file = open(F...
28.076389
104
0.653228
99866689a62b6c932c902e473d99ee05aad33f7a
6,324
py
Python
pyglet/libs/win32/winkey.py
swipswaps/pyglet
2bfd7ee52482b805ae076cf5036c5628e8a72224
[ "BSD-3-Clause" ]
1
2020-04-12T15:20:34.000Z
2020-04-12T15:20:34.000Z
pyglet/libs/win32/winkey.py
swipswaps/pyglet
2bfd7ee52482b805ae076cf5036c5628e8a72224
[ "BSD-3-Clause" ]
null
null
null
pyglet/libs/win32/winkey.py
swipswaps/pyglet
2bfd7ee52482b805ae076cf5036c5628e8a72224
[ "BSD-3-Clause" ]
null
null
null
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # Copyright (c) 2008-2019 pyglet contributors # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
27.258621
78
0.579064
9e2365cfc8f49f3ad21270dfa99c546acdd8b50b
9,475
py
Python
test/mitmproxy/addons/test_proxyauth.py
luzpaz/mitmproxy
6b5b71aefaffebeea9eb0003a25f039686c5b785
[ "MIT" ]
null
null
null
test/mitmproxy/addons/test_proxyauth.py
luzpaz/mitmproxy
6b5b71aefaffebeea9eb0003a25f039686c5b785
[ "MIT" ]
null
null
null
test/mitmproxy/addons/test_proxyauth.py
luzpaz/mitmproxy
6b5b71aefaffebeea9eb0003a25f039686c5b785
[ "MIT" ]
null
null
null
import binascii import pytest from unittest import mock from mitmproxy import exceptions from mitmproxy.addons import proxyauth from mitmproxy.test import taddons from mitmproxy.test import tflow from mitmproxy.test import tutils class TestMkauth: def test_mkauth_scheme(self): assert proxyauth.mkauth('u...
37.599206
133
0.564433
dbc908d24b4fafa7266400c9cdda5d0858cc4a9c
2,382
py
Python
libs/numpy/core/tests/test_abc.py
rocketbot-cl/recognition
cca8a87070ccaca3a26e37345c36ab1bf836e258
[ "MIT" ]
353
2020-12-10T10:47:17.000Z
2022-03-31T23:08:29.000Z
libs/numpy/core/tests/test_abc.py
rocketbot-cl/recognition
cca8a87070ccaca3a26e37345c36ab1bf836e258
[ "MIT" ]
80
2020-12-10T09:54:22.000Z
2022-03-30T22:08:45.000Z
libs/numpy/core/tests/test_abc.py
rocketbot-cl/recognition
cca8a87070ccaca3a26e37345c36ab1bf836e258
[ "MIT" ]
63
2020-12-10T17:10:34.000Z
2022-03-28T16:27:07.000Z
from numpy.testing import assert_ import numbers import numpy as np from numpy.core.numerictypes import sctypes class TestABC: def test_abstract(self): assert_(issubclass(np.number, numbers.Number)) assert_(issubclass(np.inexact, numbers.Complex)) assert_(issubclass(np.comple...
43.309091
74
0.585642
f440b3dfb878daa427c71f6b56879c882bee2420
412
py
Python
test/hummingbot/logger/test_logger_util_functions.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
542
2021-12-17T22:34:31.000Z
2022-03-31T14:36:23.000Z
test/hummingbot/logger/test_logger_util_functions.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
291
2021-12-17T20:07:53.000Z
2022-03-31T11:07:23.000Z
test/hummingbot/logger/test_logger_util_functions.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
220
2021-12-17T12:41:23.000Z
2022-03-31T23:03:22.000Z
import unittest from dataclasses import dataclass from hummingbot.logger import log_encoder class LoggerUtilFunctionsTest(unittest.TestCase): def test_log_encoder_encodes_dataclasses(self): @dataclass class DummyDataClass: one: int two: float encoded = log_encoder...
24.235294
61
0.684466
14c23434c700772b53d94d7c4d9915772529715a
9,665
py
Python
contrib/bitrpc/bitrpc.py
xdevrepo/XREPCoin
dacc88443b7f6285595f69feadaea99b9c7f1a86
[ "MIT" ]
1
2018-11-04T21:39:53.000Z
2018-11-04T21:39:53.000Z
contrib/bitrpc/bitrpc.py
xdevrepo/XREPCoin
dacc88443b7f6285595f69feadaea99b9c7f1a86
[ "MIT" ]
null
null
null
contrib/bitrpc/bitrpc.py
xdevrepo/XREPCoin
dacc88443b7f6285595f69feadaea99b9c7f1a86
[ "MIT" ]
null
null
null
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:15505") ...
28.594675
101
0.573513
aa7e3f576a126e92732fd46580b18cee6c6cf4d4
28,974
py
Python
txdav/caldav/datastore/scheduling/imip/test/test_outbound.py
backwardn/ccs-calendarserver
13c706b985fb728b9aab42dc0fef85aae21921c3
[ "Apache-2.0" ]
462
2016-08-14T17:43:24.000Z
2022-03-17T07:38:16.000Z
txdav/caldav/datastore/scheduling/imip/test/test_outbound.py
backwardn/ccs-calendarserver
13c706b985fb728b9aab42dc0fef85aae21921c3
[ "Apache-2.0" ]
72
2016-09-01T23:19:35.000Z
2020-02-05T02:09:26.000Z
txdav/caldav/datastore/scheduling/imip/test/test_outbound.py
backwardn/ccs-calendarserver
13c706b985fb728b9aab42dc0fef85aae21921c3
[ "Apache-2.0" ]
171
2016-08-16T03:50:30.000Z
2022-03-26T11:49:55.000Z
## # Copyright (c) 2008-2017 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
35.12
111
0.655312
e348301d55217d9c0911a9f9d197fcc801a557b8
5,526
py
Python
versions/live_ready_versions/version_axle/core/query.py
di2ag/bkb-pathway-provider
42824f22868c5c5d777da3facb4209744bcc6f96
[ "MIT" ]
null
null
null
versions/live_ready_versions/version_axle/core/query.py
di2ag/bkb-pathway-provider
42824f22868c5c5d777da3facb4209744bcc6f96
[ "MIT" ]
7
2021-01-13T22:25:46.000Z
2021-07-29T15:26:06.000Z
versions/live_ready_versions/version_axle/core/query.py
NCATSTranslator/chp
00668fd3d50a48fdd75abbeacaf173a3ad41942d
[ "Apache-2.0" ]
2
2021-01-14T19:06:24.000Z
2021-01-26T15:02:12.000Z
import os import sys import pickle import json class Query: def __init__(self, evidence=dict(), targets=list(), marginal_evidence=None, type='updating', name='query0', meta_evidence=None, meta_targets=None): self.evidence = evidence self.targets = targets self.marginal_evidence = marginal_e...
43.511811
151
0.552479
f52a667be222b3211b704a9908c51d3c74c37f50
3,610
py
Python
python_modules/libraries/dagster-gcp/dagster_gcp/gcs/file_manager.py
souterjk/dagster
8b744a4959bb04ff9587cfee82a796404fcbc89e
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-gcp/dagster_gcp/gcs/file_manager.py
souterjk/dagster
8b744a4959bb04ff9587cfee82a796404fcbc89e
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-gcp/dagster_gcp/gcs/file_manager.py
souterjk/dagster
8b744a4959bb04ff9587cfee82a796404fcbc89e
[ "Apache-2.0" ]
1
2019-09-11T03:02:27.000Z
2019-09-11T03:02:27.000Z
import io import uuid from contextlib import contextmanager from dagster import check, usable_as_dagster_type from dagster.core.storage.file_manager import ( FileHandle, FileManager, TempfileManager, check_file_like_obj, ) from google.cloud import storage # type: ignore @usable_as_dagster_type class...
34.711538
97
0.681717
c518e36bfcee36d7f7bf258c2dd6a4493cf25629
10,812
py
Python
docs/source/conf.py
itbabu/cmsplugin-googleplus
084782bf8f9c01081563895fcc90f5390d8b127b
[ "MIT" ]
1
2015-03-14T14:34:33.000Z
2015-03-14T14:34:33.000Z
docs/source/conf.py
itbabu/cmsplugin-googleplus
084782bf8f9c01081563895fcc90f5390d8b127b
[ "MIT" ]
4
2015-02-08T13:13:45.000Z
2021-06-08T20:09:49.000Z
docs/source/conf.py
itbabu/cmsplugin-googleplus
084782bf8f9c01081563895fcc90f5390d8b127b
[ "MIT" ]
1
2015-03-24T15:06:02.000Z
2015-03-24T15:06:02.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # cmsplugin-googleplus documentation build configuration file, created by # sphinx-quickstart on Sun Feb 8 17:28:23 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present...
31.158501
80
0.720681
38fa0ff5c3e18f0f0d790ca35f5055d7fc548098
530
py
Python
3]. Competitive Programming/03]. LeetCode/1]. Problems/Python/0043)_Multiply_Strings.py
MLinesCode/The-Complete-FAANG-Preparation
2d0c7e8940eb2a58caaf4e978e548c08dd1f9a52
[ "MIT" ]
6,969
2021-05-29T11:38:30.000Z
2022-03-31T19:31:49.000Z
3]. Competitive Programming/03]. LeetCode/1]. Problems/Python/0043)_Multiply_Strings.py
MLinesCode/The-Complete-FAANG-Preparation
2d0c7e8940eb2a58caaf4e978e548c08dd1f9a52
[ "MIT" ]
75
2021-06-15T07:59:43.000Z
2022-02-22T14:21:52.000Z
3]. Competitive Programming/03]. LeetCode/1]. Problems/Python/0043)_Multiply_Strings.py
MLinesCode/The-Complete-FAANG-Preparation
2d0c7e8940eb2a58caaf4e978e548c08dd1f9a52
[ "MIT" ]
1,524
2021-05-29T16:03:36.000Z
2022-03-31T17:46:13.000Z
class Solution: def multiply(self, num1: str, num2: str) -> str: res = [0] * (len(num1)+len(num2)) for i in range(len(num1)-1, -1, -1): carry = 0 for j in range(len(num2)-1, -1, -1): tmp = (ord(num1[i])-ord('0'))*(ord(num2[j])-ord('0')) + carry ...
44.166667
77
0.44717
20b15fd11283f07e48df3be4ec7ee21ec58143d2
607
py
Python
1019-next-greater-node-in-linked-list/1019-next-greater-node-in-linked-list.py
Dawit-Getachew/A2SV_Practice
2fe06d725e0acfe668c6dae98fe3ef6e6e26ef61
[ "MIT" ]
null
null
null
1019-next-greater-node-in-linked-list/1019-next-greater-node-in-linked-list.py
Dawit-Getachew/A2SV_Practice
2fe06d725e0acfe668c6dae98fe3ef6e6e26ef61
[ "MIT" ]
null
null
null
1019-next-greater-node-in-linked-list/1019-next-greater-node-in-linked-list.py
Dawit-Getachew/A2SV_Practice
2fe06d725e0acfe668c6dae98fe3ef6e6e26ef61
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def nextLargerNodes(self, head: Optional[ListNode]) -> List[int]: nums, curr = [], head while curr: nums.append(curr.val)...
33.722222
69
0.538715
8b473ac992a8deb0345735ce6b22c26ec32bdd88
793
py
Python
experiences/serializers.py
jordifierro/abidria-api
d7689783bf23fbe43c395b07572a1380654652cd
[ "MIT" ]
93
2017-08-12T09:41:21.000Z
2022-03-19T20:04:41.000Z
experiences/serializers.py
jordifierro/abidria-api
d7689783bf23fbe43c395b07572a1380654652cd
[ "MIT" ]
1
2017-10-09T16:49:10.000Z
2017-10-13T18:07:29.000Z
experiences/serializers.py
jordifierro/abidria-api
d7689783bf23fbe43c395b07572a1380654652cd
[ "MIT" ]
25
2017-08-18T04:31:23.000Z
2022-02-20T20:31:47.000Z
from abidria.serializers import PictureSerializer class MultipleExperiencesSerializer: @staticmethod def serialize(experiences): return [ExperienceSerializer.serialize(experience) for experience in experiences] class ExperienceSerializer: @staticmethod def serialize(experience): re...
31.72
89
0.614124
b7ce47f12e7582ce6d2e1e2169963a7b443b9328
16,508
py
Python
composer/algorithms/hparams.py
anisehsani/composer
42599682d50409b4a4eb7c91fad85d67418cee13
[ "Apache-2.0" ]
null
null
null
composer/algorithms/hparams.py
anisehsani/composer
42599682d50409b4a4eb7c91fad85d67418cee13
[ "Apache-2.0" ]
null
null
null
composer/algorithms/hparams.py
anisehsani/composer
42599682d50409b4a4eb7c91fad85d67418cee13
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved. import textwrap from dataclasses import asdict, dataclass from typing import Optional import yahp as hp from composer.algorithms.algorithm_hparams import AlgorithmHparams from composer.algorithms.alibi import Alibi from composer.algorithms.augmix import AugMix from com...
42.437018
139
0.675733
216c673e2166f5b04d87910e5861565daa8ad925
6,759
py
Python
roles/bf_arch_desktop/files/config/ranger/devicons.py
Blackfell/ansible-hax
4c421c20a6c3462134ab0b24a09eddc0f84b27fd
[ "BSD-2-Clause" ]
22
2020-05-17T04:48:19.000Z
2021-06-05T02:05:56.000Z
roles/bf_arch_desktop/files/config/ranger/devicons.py
Blackfell/ansible-hax
4c421c20a6c3462134ab0b24a09eddc0f84b27fd
[ "BSD-2-Clause" ]
84
2020-01-03T07:28:16.000Z
2022-03-09T08:02:47.000Z
roles/bf_arch_desktop/files/config/ranger/devicons.py
Blackfell/ansible-hax
4c421c20a6c3462134ab0b24a09eddc0f84b27fd
[ "BSD-2-Clause" ]
3
2020-12-28T06:35:27.000Z
2021-04-02T22:02:06.000Z
#!/usr/bin/python # coding=UTF-8 # These glyphs, and the mapping of file extensions to glyphs # has been copied from the vimscript code that is present in # https://github.com/ryanoasis/vim-devicons import re; import os; # all those glyphs will show as weird squares if you don't have the correct patched font # My advi...
30.863014
103
0.239976
6abd273ce7ba90ef72a4ed5718593c5c1f8b4388
7,554
py
Python
fluent_contents/tests/test_admin.py
francofuji/django-fluent-contents
03da447ef0854b0e6a6f8ff39d9281d11efc8587
[ "Apache-2.0" ]
null
null
null
fluent_contents/tests/test_admin.py
francofuji/django-fluent-contents
03da447ef0854b0e6a6f8ff39d9281d11efc8587
[ "Apache-2.0" ]
null
null
null
fluent_contents/tests/test_admin.py
francofuji/django-fluent-contents
03da447ef0854b0e6a6f8ff39d9281d11efc8587
[ "Apache-2.0" ]
null
null
null
from pprint import pformat from django.contrib.admin import AdminSite from django.contrib.admin.templatetags.admin_urls import admin_urlname from django.contrib.auth.models import User from django.contrib.messages.middleware import MessageMiddleware from django.core.urlresolvers import reverse from django.test import R...
43.413793
135
0.674609
ad4a6d64d10adb4deb58f8e0c67c56b4f96afadf
10,077
py
Python
python/paddle/__init__.py
CaiZixin/Paddle
63da846de0d9a717dae36939608aacb28baba2e7
[ "Apache-2.0" ]
null
null
null
python/paddle/__init__.py
CaiZixin/Paddle
63da846de0d9a717dae36939608aacb28baba2e7
[ "Apache-2.0" ]
null
null
null
python/paddle/__init__.py
CaiZixin/Paddle
63da846de0d9a717dae36939608aacb28baba2e7
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
47.758294
90
0.803811
d465495ba3ef02f9a5050408c04398c95a46e2e0
6,366
py
Python
utils/update_readme.py
ahti123/osxphotos
53c701cc0ebd38db255c1ce694391b38dbb5fe01
[ "MIT" ]
656
2019-08-14T14:10:44.000Z
2022-03-28T15:25:42.000Z
utils/update_readme.py
ahti123/osxphotos
53c701cc0ebd38db255c1ce694391b38dbb5fe01
[ "MIT" ]
557
2019-10-14T19:00:02.000Z
2022-03-28T00:48:30.000Z
utils/update_readme.py
ahti123/osxphotos
53c701cc0ebd38db255c1ce694391b38dbb5fe01
[ "MIT" ]
58
2019-12-27T01:39:33.000Z
2022-02-26T22:18:49.000Z
""" Automatically update certain sections of README.md for osxphotos Also updates osxphotos/phototemplate.md """ # This is a pretty "dumb" script that searches the README.md for # certain tags, expressed as HTML comments, and replaces text between # those tags. The following replacements are made: # 1. the outp...
31.514851
87
0.672793
634d576934cb27482e2a0175e523996f353783da
2,176
py
Python
coaching_sessions/anagrams/group_anagrams.py
Mrsteveson/Review
0dc401e9ba45efcc4cccfddfd425f72ced96e562
[ "MIT" ]
null
null
null
coaching_sessions/anagrams/group_anagrams.py
Mrsteveson/Review
0dc401e9ba45efcc4cccfddfd425f72ced96e562
[ "MIT" ]
null
null
null
coaching_sessions/anagrams/group_anagrams.py
Mrsteveson/Review
0dc401e9ba45efcc4cccfddfd425f72ced96e562
[ "MIT" ]
null
null
null
def groupAnagrams(self, strs: List[str]) -> List[List[str]]: # go with what we already know off the bat from the problem statement # we're working with anagrams: a word formed from another by rearranging its letters # the output needs to be in the form of an array of arrays # we need to be able to tell if two wo...
51.809524
97
0.711397
1a0096c14acd135368bc0b0b34e6c22197557d93
2,469
py
Python
ppmessage/scripts/install_brews.py
x-debug/ppmessage_fork
a2cb51333b2bfed92fb81ae130c825d0eada7c69
[ "MIT" ]
3
2018-07-22T10:56:42.000Z
2020-01-14T10:33:26.000Z
ppmessage/scripts/install_brews.py
x-debug/ppmessage_fork
a2cb51333b2bfed92fb81ae130c825d0eada7c69
[ "MIT" ]
null
null
null
ppmessage/scripts/install_brews.py
x-debug/ppmessage_fork
a2cb51333b2bfed92fb81ae130c825d0eada7c69
[ "MIT" ]
7
2018-03-22T05:27:47.000Z
2021-01-19T13:03:17.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2010-2016 PPMessage. # Guijin Ding, dingguijin@gmail.com # All rights reserved # """ install_pips.py use pip to install all python modules which ppmessage depends on. """ import os import sys import platform import traceback import subprocess def _color_print(str, color="red...
27.433333
268
0.600243
a799a8ba5591cd65e29980048ad090fb3211ad33
1,599
py
Python
xlsxwriter/test/comparison/test_chart_axis17.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_axis17.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_axis17.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
25.790323
79
0.565353
550680415f289eca66dc41d7092fae395cf62803
897
py
Python
test/test_ip.py
liaohongdong/novel-scrapy
f73afef5b5abcc961279f1cd30136a0257281cb7
[ "MIT" ]
null
null
null
test/test_ip.py
liaohongdong/novel-scrapy
f73afef5b5abcc961279f1cd30136a0257281cb7
[ "MIT" ]
null
null
null
test/test_ip.py
liaohongdong/novel-scrapy
f73afef5b5abcc961279f1cd30136a0257281cb7
[ "MIT" ]
null
null
null
import requests import pprint def get_proxy(): return requests.get("http://39.108.115.177:5010/get/").content def delete_proxy(proxy): requests.get("http://39.108.115.177:5010/delete/?proxy={}".format(bytes.decode(proxy))) def getHtml(): # .... retry_count = 3 proxy = get_proxy() print(pro...
23.605263
118
0.634337
6e4ff29b2b220f375e0459ad6c1424b3a78906c2
3,169
py
Python
sensu_handler_rocketchat/__init__.py
pdreker-pa/sensu-handler-rocketchat
50a11f25c085425a71d6b34adb5342506106b424
[ "Apache-2.0" ]
1
2019-06-17T08:22:05.000Z
2019-06-17T08:22:05.000Z
sensu_handler_rocketchat/__init__.py
pdreker-pa/sensu-handler-rocketchat
50a11f25c085425a71d6b34adb5342506106b424
[ "Apache-2.0" ]
null
null
null
sensu_handler_rocketchat/__init__.py
pdreker-pa/sensu-handler-rocketchat
50a11f25c085425a71d6b34adb5342506106b424
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Patrick Dreker <patrick@dreker.de> # # 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...
38.180723
93
0.625749
e2408ebef6330333fa367ba1b8aeeb1290293498
34,528
py
Python
tests/test_checkout.py
PanthraxDigital/PD_Anzee_BE
070998427db470044fdccb1cf75a5b0015677d73
[ "BSD-3-Clause" ]
null
null
null
tests/test_checkout.py
PanthraxDigital/PD_Anzee_BE
070998427db470044fdccb1cf75a5b0015677d73
[ "BSD-3-Clause" ]
null
null
null
tests/test_checkout.py
PanthraxDigital/PD_Anzee_BE
070998427db470044fdccb1cf75a5b0015677d73
[ "BSD-3-Clause" ]
null
null
null
import datetime from unittest.mock import Mock, patch import pytest from django.urls import reverse from django_countries.fields import Country from freezegun import freeze_time from prices import Money, TaxedMoney from saleor.account.models import Address from saleor.checkout import views from saleor.checkout.forms ...
35.891892
92
0.730306
dfef6d5443efebb622048e70bf6851c70ce72f65
1,468
py
Python
ASTTool.py
lxchx/SimpleShellParser
873cdd394b5c9faf02d442532e72c7b863f8aad7
[ "MIT" ]
null
null
null
ASTTool.py
lxchx/SimpleShellParser
873cdd394b5c9faf02d442532e72c7b863f8aad7
[ "MIT" ]
null
null
null
ASTTool.py
lxchx/SimpleShellParser
873cdd394b5c9faf02d442532e72c7b863f8aad7
[ "MIT" ]
null
null
null
import copy # 生成统一的node格式,方便传输 def make_node(name: str, attrs_dict: dict): result = dict() result['name'] = name result['attrs'] = attrs_dict return result # 删除包围string的单引号, 如果有 def del_single_quo(string: str): if len(string) >= 3 and string[0] == "\'" and string[-1] == "\'": return string...
25.754386
69
0.524523
4c40e6e3dddc9c73fda0b17ee27d7f0333aff01b
2,706
py
Python
Evolution/ES.py
Yangjiaxi/toys
e806cc14b1da9fb75b927b84c787801dc7e8a6bf
[ "MIT" ]
null
null
null
Evolution/ES.py
Yangjiaxi/toys
e806cc14b1da9fb75b927b84c787801dc7e8a6bf
[ "MIT" ]
null
null
null
Evolution/ES.py
Yangjiaxi/toys
e806cc14b1da9fb75b927b84c787801dc7e8a6bf
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import seaborn as sb from tqdm import tqdm sb.set() sb.set_style("whitegrid") plt.rcParams['figure.figsize'] = [4, 4] plt.rcParams['figure.dpi'] = 144 plt.rcParams['font.family'] = "Arial Unicode MS" plt.rcParams['axes.unicode_minus'] = False DNA_SIZE = 1 # DNA (real...
30.404494
77
0.611604
cbc93fe3c60304d1d59f5c93dbaed170b4781e8a
774
py
Python
tests/conftest.py
iburinoc/aiogoogle
6f702c0d19599fce1bd36b7a32922e76aaa74008
[ "MIT" ]
null
null
null
tests/conftest.py
iburinoc/aiogoogle
6f702c0d19599fce1bd36b7a32922e76aaa74008
[ "MIT" ]
null
null
null
tests/conftest.py
iburinoc/aiogoogle
6f702c0d19599fce1bd36b7a32922e76aaa74008
[ "MIT" ]
null
null
null
import os import json import pytest from aiogoogle.models import Request from aiogoogle import Aiogoogle from aiogoogle.resource import GoogleAPI @pytest.fixture('function') def open_discovery_document(): def wrapped(name, version): current_dir = os.getcwd() file_name = current_dir + '/tests/dat...
29.769231
95
0.723514
334310299ca3888b1ccd256a824dd89d719134e1
534
py
Python
build/lib/swaggerjmx/settings.py
cdlaimin/swaggerjmx
40001d5454d5bfef1cc6c8c2b5df9323c4da6143
[ "MIT" ]
71
2020-07-01T02:09:20.000Z
2022-03-30T01:51:35.000Z
build/lib/swaggerjmx/settings.py
cdlaimin/swaggerjmx
40001d5454d5bfef1cc6c8c2b5df9323c4da6143
[ "MIT" ]
6
2020-07-03T07:38:08.000Z
2021-06-23T03:05:21.000Z
build/lib/swaggerjmx/settings.py
cdlaimin/swaggerjmx
40001d5454d5bfef1cc6c8c2b5df9323c4da6143
[ "MIT" ]
29
2020-07-03T07:19:28.000Z
2022-01-27T18:01:42.000Z
# -*- coding: utf-8 -*- """ Parameter initialization is a global variable by default. When calling the relevant API, you need to inherit the setting class and set the corresponding parameters. """ class Settings(object): """ # swagger_url ST.swagger_url = 'https://www.baidu.com/' # 报告生成路径 ST.rep...
23.217391
88
0.681648
c7e02eee39432072a5ff131be1108b7d29f1f393
3,714
py
Python
yolo-create-dataset.py
IASATTS/MLP-Face-Dataset
6a98b2342cb34003b4423d2424693decf55a0853
[ "MIT" ]
null
null
null
yolo-create-dataset.py
IASATTS/MLP-Face-Dataset
6a98b2342cb34003b4423d2424693decf55a0853
[ "MIT" ]
null
null
null
yolo-create-dataset.py
IASATTS/MLP-Face-Dataset
6a98b2342cb34003b4423d2424693decf55a0853
[ "MIT" ]
null
null
null
import pandas as pd import os.path import shutil import random import pathlib import glob create_dataset_folder = False # Specify the required size of the dataset, equals to number of files in image folder if = None datasetSize = None pathImages = "./images/crop_ts_and_others/" pathLabelsRoot = "./labels/ts_and_ot...
31.74359
195
0.669898
95d9db27a7dcb55fcb23ce20d7b11bca4417181d
2,449
py
Python
tests/integration/test_zookeeper_config/test.py
pdv-ru/ClickHouse
0ff975bcf3008fa6c6373cbdfed16328e3863ec5
[ "Apache-2.0" ]
15,577
2019-09-23T11:57:53.000Z
2022-03-31T18:21:48.000Z
tests/integration/test_zookeeper_config/test.py
pdv-ru/ClickHouse
0ff975bcf3008fa6c6373cbdfed16328e3863ec5
[ "Apache-2.0" ]
16,476
2019-09-23T11:47:00.000Z
2022-03-31T23:06:01.000Z
tests/integration/test_zookeeper_config/test.py
pdv-ru/ClickHouse
0ff975bcf3008fa6c6373cbdfed16328e3863ec5
[ "Apache-2.0" ]
3,633
2019-09-23T12:18:28.000Z
2022-03-31T15:55:48.000Z
import time import pytest import logging from helpers.cluster import ClickHouseCluster cluster = ClickHouseCluster(__file__, zookeeper_config_path='configs/zookeeper_config_root_a.xml') node1 = cluster.add_instance('node1', with_zookeeper=True, main_configs=["configs/remote_servers.xml...
42.224138
115
0.670069
cd1125ad7d55af2b550652f2132a1aee00f78b07
1,308
py
Python
libcloud/test/common/test_ovh.py
mgorny/libcloud
ea364c58cd954d6b076c4e30bb283f33381a1246
[ "Apache-2.0" ]
1,435
2015-01-07T05:32:51.000Z
2022-03-25T19:39:34.000Z
libcloud/test/common/test_ovh.py
mgorny/libcloud
ea364c58cd954d6b076c4e30bb283f33381a1246
[ "Apache-2.0" ]
1,158
2015-01-04T18:08:42.000Z
2022-03-24T14:34:57.000Z
libcloud/test/common/test_ovh.py
mgorny/libcloud
ea364c58cd954d6b076c4e30bb283f33381a1246
[ "Apache-2.0" ]
832
2015-01-05T09:20:21.000Z
2022-03-24T19:22:19.000Z
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
39.636364
82
0.714067
538a81899a4ec8edab20b45901129caedca22290
3,841
py
Python
docs/conf.py
epics-containers/pvi
c4f1f59cb7aff851d2147f5a156a8d5cf65b63a9
[ "Apache-2.0" ]
1
2022-01-31T15:29:59.000Z
2022-01-31T15:29:59.000Z
docs/conf.py
dls-controls/pvi
e4a2654edc78b5a4cbe4a976f0b28c1a3bf32964
[ "Apache-2.0" ]
6
2021-12-17T16:48:15.000Z
2022-01-21T11:03:55.000Z
docs/conf.py
dls-controls/pvi
e4a2654edc78b5a4cbe4a976f0b28c1a3bf32964
[ "Apache-2.0" ]
1
2022-01-31T15:30:03.000Z
2022-01-31T15:30:03.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html import pvi # -- General configuration ------------------------------------------------...
32.550847
80
0.727935
b7743d9d3fbfa389572fbb3532d503fb934e45a3
1,129
py
Python
tests/packagedcode/test_windows.py
sthagen/nexB-scancode-toolkit
12cc1286df78af898fae76fa339da2bb50ad51b9
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
tests/packagedcode/test_windows.py
sthagen/nexB-scancode-toolkit
12cc1286df78af898fae76fa339da2bb50ad51b9
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
tests/packagedcode/test_windows.py
sthagen/nexB-scancode-toolkit
12cc1286df78af898fae76fa339da2bb50ad51b9
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
# # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. # See https://github.com/nexB/scancode-toolkit for support or download. # See https://aboutcode.org for more in...
38.931034
87
0.769708
e608fc1878a29a316e382bd2014b285bfed3e204
6,875
py
Python
list/regnet200M.py
PHL22/Backbone
b3f103fdab657f2fca494c4cdf2f8195dc837105
[ "MIT" ]
null
null
null
list/regnet200M.py
PHL22/Backbone
b3f103fdab657f2fca494c4cdf2f8195dc837105
[ "MIT" ]
null
null
null
list/regnet200M.py
PHL22/Backbone
b3f103fdab657f2fca494c4cdf2f8195dc837105
[ "MIT" ]
null
null
null
import numpy as np from .reglayers200M import AnyNet, WrappedModel import torch from .build import BACKBONE_REGISTRY from .backbone import Backbone from detectron2.modeling import ShapeSpec regnet_200M_config = {'WA': 36.44, 'W0': 24, 'WM': 2.49, 'DEPTH': 13, 'GROUP_W': 8, 'BOT_MUL': 1} regnet_400M_config = {'...
37.36413
101
0.6048
d532ee864144b2498fccb002ea7d8d1e76ec1b68
211
py
Python
oil_management/oil_management/doctype/branch/test_branch.py
ahishamali10/oil_management
74b9e8a29355cde7d2a309e088c9b8c376dbfa61
[ "MIT" ]
null
null
null
oil_management/oil_management/doctype/branch/test_branch.py
ahishamali10/oil_management
74b9e8a29355cde7d2a309e088c9b8c376dbfa61
[ "MIT" ]
null
null
null
oil_management/oil_management/doctype/branch/test_branch.py
ahishamali10/oil_management
74b9e8a29355cde7d2a309e088c9b8c376dbfa61
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2021, ayman nasser and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestBranch(unittest.TestCase): pass
19.181818
51
0.758294
6f544bfaabaa08da570750a414c8bfa863ef4c3b
3,928
py
Python
workflow/scripts/plot_kmers_stats.py
akcorut/kGWASflow
5f82eb0a348354b2b80f8351a16ba2ff238e07c5
[ "MIT" ]
2
2022-01-10T11:14:44.000Z
2022-01-22T15:30:51.000Z
workflow/scripts/plot_kmers_stats.py
akcorut/kGWASflow
5f82eb0a348354b2b80f8351a16ba2ff238e07c5
[ "MIT" ]
null
null
null
workflow/scripts/plot_kmers_stats.py
akcorut/kGWASflow
5f82eb0a348354b2b80f8351a16ba2ff238e07c5
[ "MIT" ]
1
2022-01-11T14:20:01.000Z
2022-01-11T14:20:01.000Z
import csv import os, argparse, glob, shutil import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import scipy as sp from scipy import stats ## Add argument parsers parser = argparse.ArgumentParser(description='') parser.add_argument('-i', '--in_dir', help='Input path for kmc lo...
44.134831
120
0.704939
31428d20ef4259856b861814df281ed25ae02e8b
2,055
py
Python
bann/b_test_train_prepare/pytorch/p_test/functions/crosstab.py
arturOnRails/BANN
027af04349304941fb73c2ede502aca4b76f1ad1
[ "MIT" ]
null
null
null
bann/b_test_train_prepare/pytorch/p_test/functions/crosstab.py
arturOnRails/BANN
027af04349304941fb73c2ede502aca4b76f1ad1
[ "MIT" ]
null
null
null
bann/b_test_train_prepare/pytorch/p_test/functions/crosstab.py
arturOnRails/BANN
027af04349304941fb73c2ede502aca4b76f1ad1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """.. moduleauthor:: Artur Lissin""" from typing import List, Tuple, Dict from bann.b_test_train_prepare.container.test.rttff_c import merge_ttff_fun, RtTfF, \ check_ttff_merged from bann.b_test_train_prepare.pytorch.p_test.functions.steps import C_STEP_SIZE, calc_step_f def _one_class_cr...
41.938776
94
0.567397
cbaa87c05e462bf61288d24c75be27e3e1d63f9f
1,119
py
Python
setup.py
PeterJCLaw/libproton
ed1e4b2e26c2ee39c343c2b46c981bb3b570f6a5
[ "MIT" ]
null
null
null
setup.py
PeterJCLaw/libproton
ed1e4b2e26c2ee39c343c2b46c981bb3b570f6a5
[ "MIT" ]
null
null
null
setup.py
PeterJCLaw/libproton
ed1e4b2e26c2ee39c343c2b46c981bb3b570f6a5
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open('README.md') as f: long_description = f.read() setup( name='libproton', version='3.1', url='https://github.com/PeterJCLaw/libproton', project_urls={ 'Issue tracker': 'https://github.com/PeterJCLaw/libproton/issues', }, packages...
26.023256
74
0.621984
824bc2b837887eeafa3f4e9b89aa006fc42bbffc
23,190
py
Python
sdk/python/pulumi_gcp/cloudscheduler/outputs.py
sisisin/pulumi-gcp
af6681d70ea457843409110c1324817fe55f68ad
[ "ECL-2.0", "Apache-2.0" ]
121
2018-06-18T19:16:42.000Z
2022-03-31T06:06:48.000Z
sdk/python/pulumi_gcp/cloudscheduler/outputs.py
sisisin/pulumi-gcp
af6681d70ea457843409110c1324817fe55f68ad
[ "ECL-2.0", "Apache-2.0" ]
492
2018-06-22T19:41:03.000Z
2022-03-31T15:33:53.000Z
sdk/python/pulumi_gcp/cloudscheduler/outputs.py
sisisin/pulumi-gcp
af6681d70ea457843409110c1324817fe55f68ad
[ "ECL-2.0", "Apache-2.0" ]
43
2018-06-19T01:43:13.000Z
2022-03-23T22:43:37.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
40.400697
143
0.634282
4bf6c53b980724e707b9e2795f00b294d692069d
2,468
py
Python
tchannel/messages/call_response.py
westover/tchannel-python
d9c16291f49b3b9dd1353c01179d4f4c3168c53a
[ "MIT" ]
null
null
null
tchannel/messages/call_response.py
westover/tchannel-python
d9c16291f49b3b9dd1353c01179d4f4c3168c53a
[ "MIT" ]
null
null
null
tchannel/messages/call_response.py
westover/tchannel-python
d9c16291f49b3b9dd1353c01179d4f4c3168c53a
[ "MIT" ]
null
null
null
# Copyright (c) 2016 Uber Technologies, Inc. # # 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, publ...
35.257143
79
0.664506
4d6985634a45489a4da25484a4330b1a7b189a55
15,100
py
Python
pyasn1/type/namedtype.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
32
2015-11-06T02:59:41.000Z
2021-02-12T02:44:42.000Z
pyasn1/type/namedtype.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
6
2017-04-26T02:30:16.000Z
2017-10-13T16:53:08.000Z
pyasn1/type/namedtype.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
4
2016-02-01T09:15:05.000Z
2020-04-30T03:41:04.000Z
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # import sys from pyasn1.type import tag, tagmap from pyasn1 import error __all__ = ['NamedType', 'OptionalNamedType', 'DefaultedNamedType', 'NamedTypes'] class NamedTy...
29.492188
116
0.605232
6c5636a859756dc88d73234155f3e5cb260e0c8c
47
py
Python
Applications/price_GEF_14/top_level.py
nagadakos/online-learning
3be9a59b56d4b7147b7efa4175448e74731cd005
[ "Apache-2.0" ]
null
null
null
Applications/price_GEF_14/top_level.py
nagadakos/online-learning
3be9a59b56d4b7147b7efa4175448e74731cd005
[ "Apache-2.0" ]
4
2018-10-25T20:53:07.000Z
2018-10-30T16:20:50.000Z
Applications/price_GEF_14/top_level.py
nagadakos/online-learning
3be9a59b56d4b7147b7efa4175448e74731cd005
[ "Apache-2.0" ]
1
2018-10-26T13:48:31.000Z
2018-10-26T13:48:31.000Z
import sys print("Hello from price_GEF_14!")
9.4
33
0.744681
5dc444c29a3e98c4a4e65ae66afccc0225b3f5f3
2,737
py
Python
nuaal/discovery/Topology.py
mihudec/nuaal
c5c50c59e8a1f2b3f0f6a5266f4dd392befc13cd
[ "Apache-2.0" ]
null
null
null
nuaal/discovery/Topology.py
mihudec/nuaal
c5c50c59e8a1f2b3f0f6a5266f4dd392befc13cd
[ "Apache-2.0" ]
null
null
null
nuaal/discovery/Topology.py
mihudec/nuaal
c5c50c59e8a1f2b3f0f6a5266f4dd392befc13cd
[ "Apache-2.0" ]
null
null
null
from nuaal.utils import get_logger from nuaal.definitions import DATA_PATH import json class Topology(object): def __init__(self, DEBUG=False): self.DEBUG = DEBUG self.logger = get_logger(name="Topology", DEBUG=DEBUG) self.topology = {"nodes": [], "links": []} def next_ui(self): ...
38.549296
115
0.579832
9943b2746a61f64bd977c9cd37052a7974c4121c
4,145
py
Python
tests/gamegrids_tests.py
xenomorff/code-dot-org-python
7b35999dc35fa9ca13c683f43eca631dc92e5da4
[ "Unlicense" ]
null
null
null
tests/gamegrids_tests.py
xenomorff/code-dot-org-python
7b35999dc35fa9ca13c683f43eca631dc92e5da4
[ "Unlicense" ]
null
null
null
tests/gamegrids_tests.py
xenomorff/code-dot-org-python
7b35999dc35fa9ca13c683f43eca631dc92e5da4
[ "Unlicense" ]
null
null
null
import sys import math sys.path.append('..') import codestudio.gamegrids as gg from nose.tools import eq_,ok_ class TestXYGrid(): def setup(self): self.grid = gg.XYGrid() def defaults_test(self): eq_(self.grid,[[]]) def init_test(self): eq_(self.grid.init(3,2,'~'), self.grid) ...
29.397163
75
0.337033
489f7850b809c249ee6eb923b633230e18fd1505
22,325
py
Python
core/controllers/story_editor_test.py
CodeGrammer02/oppia
3a861163aa15838b931ecc9ae39eab44e7e9073c
[ "Apache-2.0" ]
5
2022-01-22T17:22:23.000Z
2022-02-04T09:21:24.000Z
core/controllers/story_editor_test.py
omprakash1999mina/oppia
00282e533b5832cb763100de1a5cc727644d64ef
[ "Apache-2.0" ]
null
null
null
core/controllers/story_editor_test.py
omprakash1999mina/oppia
00282e533b5832cb763100de1a5cc727644d64ef
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Oppia 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 applicable ...
36.900826
80
0.621725
d9cf7c77a54ff31160afdb9743789284f66f5292
11,258
py
Python
snappy_pipeline/find_file.py
PotatoThrone/snappy-pipeline
31200eba84bff8e459e9e210d6d95e2984627f5c
[ "MIT" ]
5
2021-02-26T10:39:56.000Z
2021-12-23T07:53:26.000Z
snappy_pipeline/find_file.py
PotatoThrone/snappy-pipeline
31200eba84bff8e459e9e210d6d95e2984627f5c
[ "MIT" ]
93
2021-02-22T11:23:59.000Z
2022-03-31T09:58:39.000Z
snappy_pipeline/find_file.py
PotatoThrone/snappy-pipeline
31200eba84bff8e459e9e210d6d95e2984627f5c
[ "MIT" ]
3
2021-02-22T11:44:59.000Z
2021-06-21T19:33:53.000Z
# -*- coding: utf-8 -*- """Code for crawling the file system and caching the results """ from collections import OrderedDict from fnmatch import fnmatch import json import logging import os import sys from fasteners import InterProcessLock __author__ = "Manuel Holtgrewe <manuel.holtgrewe@bihealth.de>" class FileNa...
43.3
100
0.568751
47902c3d4b2249b1046b378958eb93ba588dde1f
2,846
py
Python
dojo/tools/php_symfony_security_check/parser.py
brunoduruzup/django-DefectDojo
cd598b44f1c44ca2a05fdf95f99c0d526509f656
[ "BSD-3-Clause" ]
2
2021-09-19T23:19:12.000Z
2022-03-26T10:20:49.000Z
dojo/tools/php_symfony_security_check/parser.py
brunoduruzup/django-DefectDojo
cd598b44f1c44ca2a05fdf95f99c0d526509f656
[ "BSD-3-Clause" ]
167
2021-03-15T13:49:54.000Z
2022-03-31T09:10:30.000Z
dojo/tools/php_symfony_security_check/parser.py
Hijerboa/django-DefectDojo
3aea3bc3406f860c0842b0bf8800efe2c86bf81b
[ "BSD-3-Clause" ]
4
2016-09-19T17:33:39.000Z
2018-12-10T07:55:45.000Z
import json from dojo.models import Finding class PhpSymfonySecurityCheckParser(object): def get_scan_types(self): return ["PHP Symfony Security Check"] def get_label_for_scan_types(self, scan_type): return scan_type # no custom label for now def get_description_for_scan_types(self, s...
36.487179
147
0.562544
6ebd207bf321ac3833ba45fa5f32faa1144392ec
518
py
Python
tests/resize/downscale.py
True-North-Intelligent-Algorithms/tnia-python
ab580716082e0ec655a27eb856dae629ebb1a3bf
[ "BSD-3-Clause" ]
3
2022-02-08T16:30:05.000Z
2022-02-18T22:28:50.000Z
tests/resize/downscale.py
True-North-Intelligent-Algorithms/tnia-python
ab580716082e0ec655a27eb856dae629ebb1a3bf
[ "BSD-3-Clause" ]
null
null
null
tests/resize/downscale.py
True-North-Intelligent-Algorithms/tnia-python
ab580716082e0ec655a27eb856dae629ebb1a3bf
[ "BSD-3-Clause" ]
null
null
null
from skimage.transform import rescale, resize, downscale_local_mean from skimage import data import matplotlib.pyplot as plt image = data.coins() image_downscaled = downscale_local_mean(image, (4,4)) image_resized = resize(image_downscaled, image.shape) fig, ax = plt.subplots(nrows=1, ncols=3) ax[0].imshow(image, ...
21.583333
67
0.752896
aa84bbdb57890083170db5ee8307b9f22f452103
42,259
py
Python
ice.py
Manojtuguru/Yamz
36ba15cd34e35f9b02266a375b4b135f0b15e97c
[ "BSD-3-Clause" ]
null
null
null
ice.py
Manojtuguru/Yamz
36ba15cd34e35f9b02266a375b4b135f0b15e97c
[ "BSD-3-Clause" ]
null
null
null
ice.py
Manojtuguru/Yamz
36ba15cd34e35f9b02266a375b4b135f0b15e97c
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # # ice - web frontend for SeaIce, based on the Python-Flask framework. # # Copyright (c) 2013, Christopher Patton, all rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistrib...
40.017992
275
0.602286
4d4dd1ec9588fc39913403835beb5beeb902c309
2,258
py
Python
frigg/settings/base.py
gitter-badger/frigg
e49292ccae9eb24b255ed31eb1bdf7f56204b04b
[ "MIT" ]
null
null
null
frigg/settings/base.py
gitter-badger/frigg
e49292ccae9eb24b255ed31eb1bdf7f56204b04b
[ "MIT" ]
null
null
null
frigg/settings/base.py
gitter-badger/frigg
e49292ccae9eb24b255ed31eb1bdf7f56204b04b
[ "MIT" ]
null
null
null
""" Django settings for frigg project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impo...
23.768421
71
0.728964
426afa62a6f3608936d63154ab2cdad97cbdde44
3,808
py
Python
blazar-3.0.0/blazar/tests/utils/test_plugins.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
24
2015-10-18T02:53:07.000Z
2022-01-04T12:01:07.000Z
blazar-3.0.0/blazar/tests/utils/test_plugins.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
19
2017-05-23T21:34:09.000Z
2022-02-21T19:15:29.000Z
blazar-3.0.0/blazar/tests/utils/test_plugins.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
22
2015-10-30T07:42:40.000Z
2021-05-31T14:33:38.000Z
# Copyright (c) 2017 NTT. # # 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, soft...
37.333333
78
0.667017
72d7940da7899e68ed74be36486a63decca83d97
399
py
Python
code-example/ch10/quick_session.py
grahovsky/python-edu
15dad408d8f226b69362b073c30af5cf4079094a
[ "Unlicense" ]
null
null
null
code-example/ch10/quick_session.py
grahovsky/python-edu
15dad408d8f226b69362b073c30af5cf4079094a
[ "Unlicense" ]
null
null
null
code-example/ch10/quick_session.py
grahovsky/python-edu
15dad408d8f226b69362b073c30af5cf4079094a
[ "Unlicense" ]
null
null
null
from flask import Flask, session app = Flask(__name__) app.secret_key = 'YouWillNeverGuess' @app.route('/setuser/<user>') def setuser(user: str) -> str: session['user'] = user return 'User value set to: ' + session['user'] @app.route('/getuser') def getuser() -> str: return 'User value is currently se...
19
63
0.654135
42ed32f33d406efc08bcdfa7968e213eec2913b6
8,431
py
Python
UnetTrainTest.py
isha31415/unet-eyetracking
d548da18fa46cd878a2084daa70192b55288aeef
[ "MIT" ]
null
null
null
UnetTrainTest.py
isha31415/unet-eyetracking
d548da18fa46cd878a2084daa70192b55288aeef
[ "MIT" ]
null
null
null
UnetTrainTest.py
isha31415/unet-eyetracking
d548da18fa46cd878a2084daa70192b55288aeef
[ "MIT" ]
null
null
null
import os import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) import cv2 import sys import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from keras.models import Model from keras.layers import * from keras.optimizers import Adam fr...
36.656522
100
0.625311
2721e343717fe09e3b9084936bc8af0175b2429b
2,383
py
Python
archai/algos/darts/darts_model_desc_builder.py
cclauss/archai
a5fb8f937f7f1319e3204120803b2a045e9f768b
[ "MIT" ]
344
2020-06-12T22:12:56.000Z
2022-03-29T06:48:20.000Z
archai/algos/darts/darts_model_desc_builder.py
cclauss/archai
a5fb8f937f7f1319e3204120803b2a045e9f768b
[ "MIT" ]
29
2020-06-13T19:56:49.000Z
2022-03-30T20:26:48.000Z
archai/algos/darts/darts_model_desc_builder.py
cclauss/archai
a5fb8f937f7f1319e3204120803b2a045e9f768b
[ "MIT" ]
68
2020-06-12T19:32:43.000Z
2022-03-05T06:58:40.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import Collection, Optional, Tuple, List import copy from overrides import overrides from archai.nas.model_desc_builder import ModelDescBuilder from archai.nas.operations import Op from archai.nas.model_desc import ConvMac...
39.716667
82
0.600504
447c82a046fe4a10194d8aa9ce31d540f6eb91fd
1,795
py
Python
config/urls.py
vinyasmusic/price-alert
8781bb567898ee9a60164994ceedbcf4372d6357
[ "MIT" ]
5
2018-08-02T15:00:53.000Z
2022-01-15T07:56:27.000Z
config/urls.py
vinyasmusic/price-alert
8781bb567898ee9a60164994ceedbcf4372d6357
[ "MIT" ]
8
2018-08-06T18:45:30.000Z
2018-08-15T17:28:44.000Z
config/urls.py
vinyasmusic/price-alert
8781bb567898ee9a60164994ceedbcf4372d6357
[ "MIT" ]
null
null
null
from django.conf import settings from django.urls import include, path from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home...
33.240741
85
0.636212
e48af641238353bfcde5e5fa904e733c97b8a6d0
21,449
py
Python
intersight/models/iam_account.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/iam_account.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/iam_account.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Intersight REST API This is Intersight REST API OpenAPI spec version: 1.0.9-262 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class IamAccount(object): """ NOTE: This class is a...
30.125
387
0.612429
c6e940cd355e6fedbb871a61c9dd430a664dc9e8
1,937
py
Python
tareas/2/MataLuis/rond.py
Ricardo191998/sistop-2020-1
a37d2a880995a870ebfeebe7e098e4aefb3cd179
[ "CC-BY-4.0" ]
13
2019-08-07T13:48:14.000Z
2021-08-31T23:23:35.000Z
tareas/2/MataLuis/rond.py
Ricardo191998/sistop-2020-1
a37d2a880995a870ebfeebe7e098e4aefb3cd179
[ "CC-BY-4.0" ]
48
2019-08-07T03:15:54.000Z
2019-11-21T16:53:45.000Z
tareas/2/MataLuis/rond.py
Ricardo191998/sistop-2020-1
a37d2a880995a870ebfeebe7e098e4aefb3cd179
[ "CC-BY-4.0" ]
47
2019-08-07T01:44:34.000Z
2021-11-05T02:31:25.000Z
import threading import time import random resultados = [] procesos = [] ronda = [] mutexActivo = threading.Semaphore(1) mutexActivo2 = threading.Semaphore(1) def ejecucion(idProceso,quantum): tiempo = 0 while(len(ronda)>0): tiempo += 1 mutexActivo.acquire() aux = ronda[0] rond...
28.910448
139
0.568405
2582d59db0f49fc22215e4902b0cf2fac50ba6f5
291
py
Python
mongo_test/setting.py
Vuong02011996/data_base_test
a57940970ce52a25e10f2262fb94530b1ae2681c
[ "MIT" ]
null
null
null
mongo_test/setting.py
Vuong02011996/data_base_test
a57940970ce52a25e10f2262fb94530b1ae2681c
[ "MIT" ]
null
null
null
mongo_test/setting.py
Vuong02011996/data_base_test
a57940970ce52a25e10f2262fb94530b1ae2681c
[ "MIT" ]
null
null
null
# settings.py from dotenv import load_dotenv import os load_dotenv() # OR, the same with increased verbosity load_dotenv(verbose=True) # OR, explicitly providing path to '.env' from pathlib import Path # Python 3.6+ only env_path = Path("..") / ".env" load_dotenv(dotenv_path=env_path)
19.4
44
0.745704
bf312702c02dc3fe8efc4729b48290ed13dd30b8
3,525
py
Python
sdk/python/pulumi_aws_native/greengrass/get_core_definition.py
pulumi/pulumi-aws-native
1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3
[ "Apache-2.0" ]
29
2021-09-30T19:32:07.000Z
2022-03-22T21:06:08.000Z
sdk/python/pulumi_aws_native/greengrass/get_core_definition.py
pulumi/pulumi-aws-native
1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3
[ "Apache-2.0" ]
232
2021-09-30T19:26:26.000Z
2022-03-31T23:22:06.000Z
sdk/python/pulumi_aws_native/greengrass/get_core_definition.py
pulumi/pulumi-aws-native
1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3
[ "Apache-2.0" ]
4
2021-11-10T19:42:01.000Z
2022-02-05T10:15:49.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities __a...
33.894231
134
0.660993
59054904727bc257bf1691d8b5fc19aafde79212
655
py
Python
ROS2_Examples/1-to-1/Object_Oriented/master.py
roboscienceorg/robolib
32a8d5e3ae4dd693cdf6c094050c9d19861a1331
[ "ECL-2.0" ]
1
2019-02-27T01:12:44.000Z
2019-02-27T01:12:44.000Z
ROS2_Examples/1-to-1/Object_Oriented/master.py
roboscienceorg/robolib
32a8d5e3ae4dd693cdf6c094050c9d19861a1331
[ "ECL-2.0" ]
31
2018-09-28T19:29:48.000Z
2019-02-24T15:03:52.000Z
ROS2_Examples/1-to-1/Object_Oriented/master.py
roboscienceorg/robolib
32a8d5e3ae4dd693cdf6c094050c9d19861a1331
[ "ECL-2.0" ]
null
null
null
import rclpy from subscriber import SubscriberExample from publisher import PublisherExample from rclpy.executors import SingleThreadedExecutor, MultiThreadedExecutor # Initialize rclpy rclpy.init(args=None) # This establishes an executor which will run all the nodes # In this case they will all be run on one thread ...
22.586207
73
0.796947
623ab1c8c6206a8c4696b47d2702071afc89692f
1,021
py
Python
tests/module/input_module/test_ultrasonic.py
yjm07/pymodi
207589d083d3a05061a2934cbc1c5c945bd0e108
[ "MIT" ]
13
2020-05-19T02:34:05.000Z
2022-02-18T06:44:34.000Z
tests/module/input_module/test_ultrasonic.py
yjm07/pymodi
207589d083d3a05061a2934cbc1c5c945bd0e108
[ "MIT" ]
43
2020-06-21T12:39:40.000Z
2022-03-14T03:29:37.000Z
tests/module/input_module/test_ultrasonic.py
yjm07/pymodi
207589d083d3a05061a2934cbc1c5c945bd0e108
[ "MIT" ]
23
2020-05-18T06:34:54.000Z
2021-02-25T11:50:17.000Z
import unittest from modi.module.input_module.ultrasonic import Ultrasonic from modi.util.message_util import parse_message from modi.util.miscellaneous import MockConn class TestUltrasonic(unittest.TestCase): """Tests for 'Ultrasonic' class.""" def setUp(self): """Set up test fixtures, if any.""" ...
25.525
58
0.558276
d3b770f53a84962d7fc7652acce75864486ad377
331
py
Python
monero_glue/messages/MoneroKeyImageSyncFinalRequest.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
20
2018-04-05T22:06:10.000Z
2021-09-18T10:43:44.000Z
monero_glue/messages/MoneroKeyImageSyncFinalRequest.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
null
null
null
monero_glue/messages/MoneroKeyImageSyncFinalRequest.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
5
2018-08-06T15:06:04.000Z
2021-07-16T01:58:43.000Z
# Automatically generated by pb2py # fmt: off from .. import protobuf as p if __debug__: try: from typing import Dict, List # noqa: F401 from typing_extensions import Literal # noqa: F401 except ImportError: pass class MoneroKeyImageSyncFinalRequest(p.MessageType): MESSAGE_WIRE_...
22.066667
59
0.700906
f817d2de543bae6fa05573655513a12633e5bd22
1,065
py
Python
python-package/lets_plot/_kbridge.py
OLarionova-HORIS/lets-plot
89e30a574fe2de3da17186acdbe1cf427d66d87f
[ "MIT" ]
null
null
null
python-package/lets_plot/_kbridge.py
OLarionova-HORIS/lets-plot
89e30a574fe2de3da17186acdbe1cf427d66d87f
[ "MIT" ]
null
null
null
python-package/lets_plot/_kbridge.py
OLarionova-HORIS/lets-plot
89e30a574fe2de3da17186acdbe1cf427d66d87f
[ "MIT" ]
null
null
null
# Copyright (c) 2020. JetBrains s.r.o. # Use of this source code is governed by the MIT license that can be found in the LICENSE file. # noinspection PyUnresolvedReferences from typing import Dict import lets_plot_kotlin_bridge from ._type_utils import standardize_dict def _generate_dynamic_display_html(plot_spe...
30.428571
96
0.768075
c5be0b5a92a06737f6f5c790992547ae1c43ee99
918
py
Python
mi/dataset/driver/adcpt_acfgm/dcl/pd0/test/test_adcpt_acfgm_dcl_pd0_telemetered_driver.py
cdobs/mi-instrument
99f9322a4afabc5dff9b0fad12166075efce838c
[ "BSD-2-Clause" ]
1
2018-09-14T23:28:29.000Z
2018-09-14T23:28:29.000Z
mi/dataset/driver/adcpt_acfgm/dcl/pd0/test/test_adcpt_acfgm_dcl_pd0_telemetered_driver.py
cdobs/mi-instrument
99f9322a4afabc5dff9b0fad12166075efce838c
[ "BSD-2-Clause" ]
33
2017-04-25T19:53:45.000Z
2022-03-18T17:42:18.000Z
mi/dataset/driver/adcpt_acfgm/dcl/pd0/test/test_adcpt_acfgm_dcl_pd0_telemetered_driver.py
cdobs/mi-instrument
99f9322a4afabc5dff9b0fad12166075efce838c
[ "BSD-2-Clause" ]
31
2015-03-04T01:01:09.000Z
2020-10-28T14:42:12.000Z
#!/usr/bin/env python import os import unittest from mi.core.log import get_logger from mi.dataset.dataset_driver import ParticleDataHandler from mi.dataset.driver.adcpt_acfgm.dcl.pd0.adcpt_acfgm_dcl_pd0_telemetered_driver import parse from mi.dataset.driver.adcpt_acfgm.dcl.pd0.resource import RESOURCE_PATH __autho...
27
94
0.75817
227c9d6cd693cf9184e599158c9a623766080129
3,837
py
Python
pyccel/parser/syntax/himi.py
toddrme2178/pyccel
deec37503ab0c5d0bcca1a035f7909f7ce8ef653
[ "MIT" ]
null
null
null
pyccel/parser/syntax/himi.py
toddrme2178/pyccel
deec37503ab0c5d0bcca1a035f7909f7ce8ef653
[ "MIT" ]
null
null
null
pyccel/parser/syntax/himi.py
toddrme2178/pyccel
deec37503ab0c5d0bcca1a035f7909f7ce8ef653
[ "MIT" ]
null
null
null
# coding: utf-8 """ This module contains the syntax associated to the types.tx grammar """ from os.path import join, dirname from sympy.utilities.iterables import iterable from pyccel.parser.syntax.basic import BasicStmt from pyccel.ast import DataType, datatype from pyccel.ast import Variable from pyccel.ast import...
24.132075
89
0.589002
ae38d107b508e31383a907513fa74563ac3aa1e0
3,704
py
Python
venv/Lib/site-packages/networkx/algorithms/components/weakly_connected.py
richung99/digitizePlots
6b408c820660a415a289726e3223e8f558d3e18b
[ "MIT" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
venv/Lib/site-packages/networkx/algorithms/components/weakly_connected.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
25
2020-11-16T15:36:41.000Z
2021-06-01T05:15:31.000Z
venv/Lib/site-packages/networkx/algorithms/components/weakly_connected.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
"""Weakly connected components.""" import networkx as nx from networkx.utils.decorators import not_implemented_for __all__ = [ "number_weakly_connected_components", "weakly_connected_components", "is_weakly_connected", ] @not_implemented_for("undirected") def weakly_connected_components(G): """Genera...
21.91716
85
0.616631
fa0e1edcab64e49d443e456cd7a5b868636cea57
8,549
py
Python
django/db/backends/mysql/operations.py
jacinda/django
307acc745a4e655c35db96f96ceb4b87597dee49
[ "BSD-3-Clause" ]
null
null
null
django/db/backends/mysql/operations.py
jacinda/django
307acc745a4e655c35db96f96ceb4b87597dee49
[ "BSD-3-Clause" ]
null
null
null
django/db/backends/mysql/operations.py
jacinda/django
307acc745a4e655c35db96f96ceb4b87597dee49
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import uuid from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations from django.utils import six, timezone from django.utils.encoding import force_text class DatabaseOperations(BaseDatabaseOperations): compiler_module = "djan...
39.762791
113
0.611066
e17a2eb5f61184dcf12ca8dde78566c532e34122
1,332
py
Python
Smartphone/smartphone/scripts/rotationMatrix.py
marcodemutti/SofAr-project
6e807072f8567490cf5b4ebcf81d37ab5e8a4109
[ "Apache-2.0" ]
1
2021-10-04T18:24:21.000Z
2021-10-04T18:24:21.000Z
Smartphone/smartphone/scripts/rotationMatrix.py
marcodemutti/SofAr-project
6e807072f8567490cf5b4ebcf81d37ab5e8a4109
[ "Apache-2.0" ]
1
2020-09-16T19:57:43.000Z
2020-09-16T19:57:43.000Z
Smartphone/smartphone/scripts/rotationMatrix.py
andreabradpitto/SofAr-project
6e807072f8567490cf5b4ebcf81d37ab5e8a4109
[ "Apache-2.0" ]
3
2020-10-29T14:07:58.000Z
2020-11-26T11:22:25.000Z
#!/usr/bin/env python """ Documentation for rotationMatrix.py This file is consisting in one function only, and its only aim is to provide rotation matrix transformations """ import numpy as np import math #Compute rotation matrix R, starting from the angles given in euler rapresentation def eulerAnglesToRotationMat...
36
108
0.499249
a3aed40e5c1a79ed2b07f56c87bc3d9f57c4696b
6,831
py
Python
tests/test_xls2xml/test_XMLHandler.py
ProlificsICP/ICP
36a72c72b349cc7bdc62dd49236569619e952548
[ "Apache-2.0" ]
null
null
null
tests/test_xls2xml/test_XMLHandler.py
ProlificsICP/ICP
36a72c72b349cc7bdc62dd49236569619e952548
[ "Apache-2.0" ]
null
null
null
tests/test_xls2xml/test_XMLHandler.py
ProlificsICP/ICP
36a72c72b349cc7bdc62dd49236569619e952548
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import unittest from scripts.XMLHandler import XMLHandler import scripts.DialogData as Dialog ''' Created on Jan 16, 2018 @author: alukes ''' DOMAIN = u'G_TEST' class XMLHandlerTest(unittest.TestCase): def setUp(self): self._handler = XMLHandler() def tearDown(self): self....
47.4375
183
0.660957
97326c6db01c5acb62163475eb62b59d8f80bca4
250
py
Python
utils/__init__.py
woo1/CIHP_PGN
7867ca4224e4743ea9384bf24761fda3caddbce8
[ "MIT" ]
null
null
null
utils/__init__.py
woo1/CIHP_PGN
7867ca4224e4743ea9384bf24761fda3caddbce8
[ "MIT" ]
null
null
null
utils/__init__.py
woo1/CIHP_PGN
7867ca4224e4743ea9384bf24761fda3caddbce8
[ "MIT" ]
null
null
null
from .model_pgn import PGNModel from .utils import decode_labels, inv_preprocess, prepare_label, save, load from .ops import conv2d, max_pool, linear from .image_reader import ImageReader, ImageReaderInfer from .image_reader_pgn import ImageReaderPGN
50
75
0.848
b7e7c62963b78889c5d9ad71c7e2be2c188c9d30
2,006
py
Python
profiles_api/models.py
homabakhtiarian/profiles-rest-api
0f05aae98cecd9f7ae8c78e794233133c6db1767
[ "MIT" ]
null
null
null
profiles_api/models.py
homabakhtiarian/profiles-rest-api
0f05aae98cecd9f7ae8c78e794233133c6db1767
[ "MIT" ]
null
null
null
profiles_api/models.py
homabakhtiarian/profiles-rest-api
0f05aae98cecd9f7ae8c78e794233133c6db1767
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, BaseUserManager from django.conf import settings # Create your models here. class UserProfileManager(BaseUserManager): """Manager for user profiles""" def create_user(self, email, name, password=None): ...
29.072464
90
0.672981
33a0889d3743e2dc314b2b6bb173a50362e1079c
10,082
py
Python
sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2
2021-09-07T18:30:33.000Z
2021-11-23T02:50:57.000Z
sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
4
2021-10-06T16:39:52.000Z
2021-11-18T18:33:37.000Z
sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "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 may ...
52.238342
321
0.683991
0565b98d8e4505a8011cb36876cbbd6b55139f9b
42,239
py
Python
test/integration/component/test_multiple_subnets_in_isolated_network_rvr.py
lujiefsi/cloudstack
74a7cbf753537928265c1f36afe086d69ad44e90
[ "Apache-2.0" ]
1
2019-04-09T20:58:27.000Z
2019-04-09T20:58:27.000Z
test/integration/component/test_multiple_subnets_in_isolated_network_rvr.py
lujiefsi/cloudstack
74a7cbf753537928265c1f36afe086d69ad44e90
[ "Apache-2.0" ]
1
2020-12-16T12:07:40.000Z
2020-12-17T13:41:37.000Z
test/integration/component/test_multiple_subnets_in_isolated_network_rvr.py
lujiefsi/cloudstack
74a7cbf753537928265c1f36afe086d69ad44e90
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
52.340768
141
0.633703
82b3456578c1d03b0fec4ecc90c18c4bb05e681d
1,654
py
Python
component/scripts/predict_tree.py
luforestal/Street
222c5d829506c37ddc4e8d3a0f9a41c79daf819b
[ "MIT" ]
null
null
null
component/scripts/predict_tree.py
luforestal/Street
222c5d829506c37ddc4e8d3a0f9a41c79daf819b
[ "MIT" ]
null
null
null
component/scripts/predict_tree.py
luforestal/Street
222c5d829506c37ddc4e8d3a0f9a41c79daf819b
[ "MIT" ]
null
null
null
import torch from pathlib import Path from PIL import Image import pandas as pd from deepforest import main from component.scripts.processing import * import torch from pathlib import Path from PIL import Image import pandas as pd from deepforest import main model_gsv = torch.hub.load( "/home/lvelasquez/YoloV5/yo...
28.033898
87
0.599758
97776fa8ec6057937457ffcf0fe51b76db134665
2,965
py
Python
examples/detect_landmarks_in_image.py
spacejake/face-alignment
5c3acb5ff649de0ee9820bb595856cf2229c5db4
[ "BSD-3-Clause" ]
null
null
null
examples/detect_landmarks_in_image.py
spacejake/face-alignment
5c3acb5ff649de0ee9820bb595856cf2229c5db4
[ "BSD-3-Clause" ]
null
null
null
examples/detect_landmarks_in_image.py
spacejake/face-alignment
5c3acb5ff649de0ee9820bb595856cf2229c5db4
[ "BSD-3-Clause" ]
null
null
null
import sys import os sys.path.append(os.path.abspath('..')) import matplotlib matplotlib.use("TkAgg") import face_alignment import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from matplotlib.figur...
39.533333
116
0.681956
0585b92e4ddae4e82ab19a06993b5420a19f68da
905
py
Python
setup.py
jcrafts/dragon-radar
247ac5035b85f3a5c6ff60885841616b1c9f58ed
[ "MIT" ]
12
2017-03-04T01:28:18.000Z
2021-02-23T16:07:29.000Z
setup.py
jcrafts/dragon-radar
247ac5035b85f3a5c6ff60885841616b1c9f58ed
[ "MIT" ]
18
2016-06-19T19:31:32.000Z
2021-02-17T14:40:01.000Z
setup.py
gravitypriest/dragon-radar
247ac5035b85f3a5c6ff60885841616b1c9f58ed
[ "MIT" ]
null
null
null
import py2exe from distutils.core import setup from constants import VERSION setup(zipfile=None, version=VERSION, console=[ {'script': '__main__.py', 'dest_base': 'dragon-radar', 'icon_resources': [(0, 'icon.ico')] }], data_files=[('params', ['params/demux.j...
39.347826
63
0.446409
03a724e17a5c74cb421f9b9ce133c884be7b9124
10,084
py
Python
scripts/lonelypages.py
PArangSae/pywikibot
caf1401e71a81d11e681a6d6adfdea907aa33b94
[ "MIT" ]
null
null
null
scripts/lonelypages.py
PArangSae/pywikibot
caf1401e71a81d11e681a6d6adfdea907aa33b94
[ "MIT" ]
null
null
null
scripts/lonelypages.py
PArangSae/pywikibot
caf1401e71a81d11e681a6d6adfdea907aa33b94
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ This is a script written to add the template "orphan" to pages. These command line parameters can be used to specify which pages to work on: &params; Furthermore, the following command line parameters are supported: -enable: Enable or disable the bot via a Wiki...
37.073529
79
0.549583
b68cfca431622049f6479b101306e0f81c1425a2
2,230
py
Python
src/sage/server/introspect.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
2
2021-08-20T00:30:35.000Z
2021-11-17T10:54:00.000Z
src/sage/server/introspect.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
null
null
null
src/sage/server/introspect.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
null
null
null
""" Sage Notebook Introspection TODO: - add support for grabbing source code from Pyrex functions (even if not perfect is better than nothing). - PNG or MathML output format for docstring """ ########################################################################### # Copyright (C) 2006 William Stein <wstein@g...
30.972222
78
0.537668
8f1662b538705f3c409356746484a8eab16fd5a3
11,476
py
Python
Audio_CrisNet.py
BioSIP/countcrowd_TFG
0ba2c7d4e4db4710f3e345565081d499a2d62cc0
[ "MIT" ]
null
null
null
Audio_CrisNet.py
BioSIP/countcrowd_TFG
0ba2c7d4e4db4710f3e345565081d499a2d62cc0
[ "MIT" ]
null
null
null
Audio_CrisNet.py
BioSIP/countcrowd_TFG
0ba2c7d4e4db4710f3e345565081d499a2d62cc0
[ "MIT" ]
null
null
null
from losses import LogCoshLoss import os from scipy.io import loadmat from torch.utils.data import DataLoader from torch.utils.data import Dataset import torch import torchaudio import torch.nn as nn from torch import optim import torch.nn.functional as F import numpy as np import pickle # https://pytorch.org/tutorial...
27.389021
119
0.700331
fd84008950777f158281496887c40f28eb3dc45c
831
py
Python
graphz/embedding.py
morriswmz/graphz
1b436ec80d2f8bf8b7fcda99abcfba127f7afea3
[ "MIT" ]
null
null
null
graphz/embedding.py
morriswmz/graphz
1b436ec80d2f8bf8b7fcda99abcfba127f7afea3
[ "MIT" ]
null
null
null
graphz/embedding.py
morriswmz/graphz
1b436ec80d2f8bf8b7fcda99abcfba127f7afea3
[ "MIT" ]
null
null
null
import numpy as np import warnings def laplacian_eigenmaps(graph, n_components=2): """ Computes the Lapacian eigenmap. Ref: M. Belkin, P. Niyogi, Laplacian eigenmaps and spectral techniques for embedding and clustering, in: NIPS, Vol. 14, 2001, pp. 585-591. """ if graph.n_nodes > 10000: ...
37.772727
130
0.694344
f3c4f3c95e48cf4caf5cac5176b35c0d7eb3760d
3,484
py
Python
projects/pointnav_baselines/experiments/ithor/pointnav_ithor_rgbd_simpleconvgru_ddppo.py
prithv1/allenact
ee736e6a3aeed29b3661ee18fa0dc0a68a40201e
[ "MIT" ]
1
2020-09-10T13:09:14.000Z
2020-09-10T13:09:14.000Z
projects/pointnav_baselines/experiments/ithor/pointnav_ithor_rgbd_simpleconvgru_ddppo.py
andrlima/allenact
f29dd6f0ec62425b02ca07fee815b1a82627a28e
[ "MIT" ]
null
null
null
projects/pointnav_baselines/experiments/ithor/pointnav_ithor_rgbd_simpleconvgru_ddppo.py
andrlima/allenact
f29dd6f0ec62425b02ca07fee815b1a82627a28e
[ "MIT" ]
null
null
null
import gym import torch.nn as nn import torch.optim as optim from torch.optim.lr_scheduler import LambdaLR from core.algorithms.onpolicy_sync.losses import PPO from core.algorithms.onpolicy_sync.losses.ppo import PPOConfig from projects.pointnav_baselines.experiments.ithor.pointnav_ithor_base import ( PointNaviTho...
32.867925
88
0.641504
0bba7b6fac6ee93fd7b120a04df87b3dea7f8cde
5,112
py
Python
tensorflow/python/saved_model/utils_impl.py
knightvishal/tensorflow
5d3dd19b7146d954fc1b4e9e44e9881e75d363c1
[ "Apache-2.0" ]
4
2021-06-15T17:26:07.000Z
2021-11-17T10:58:08.000Z
tensorflow/python/saved_model/utils_impl.py
knightvishal/tensorflow
5d3dd19b7146d954fc1b4e9e44e9881e75d363c1
[ "Apache-2.0" ]
4
2020-09-26T00:55:50.000Z
2022-02-10T01:53:06.000Z
tensorflow/python/saved_model/utils_impl.py
knightvishal/tensorflow
5d3dd19b7146d954fc1b4e9e44e9881e75d363c1
[ "Apache-2.0" ]
1
2019-12-20T01:12:47.000Z
2019-12-20T01:12:47.000Z
# Copyright 2016 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...
36.514286
80
0.761933
81f51b5d155f5349e76b0e5850ec0e416b16c908
4,948
py
Python
ui.py
psyphernix/CLI-Inventory-Management-System
8ae03ac7a8f6cad329089cd9e775b60ee7f5d7fd
[ "MIT" ]
null
null
null
ui.py
psyphernix/CLI-Inventory-Management-System
8ae03ac7a8f6cad329089cd9e775b60ee7f5d7fd
[ "MIT" ]
null
null
null
ui.py
psyphernix/CLI-Inventory-Management-System
8ae03ac7a8f6cad329089cd9e775b60ee7f5d7fd
[ "MIT" ]
null
null
null
#------------------------------to take user input-----------------------------# def user_input(fr_list): ''' function to take user input''' list_out = [] # creating a empty list wish = input("Does customer want to buy anything?(yes/no): ") enter = "yes" # assigning "yes" to enter for future use ...
78.539683
163
0.589935
03b91203efb8f7ba0ef9fd8dfd511a3223b52f74
316
py
Python
problemsets/Codeforces/Python/A987.py
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
problemsets/Codeforces/Python/A987.py
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
problemsets/Codeforces/Python/A987.py
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
""" * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * """ a=['purple', 'green', 'blue', 'orange', 'red', 'yellow'] b=['Power', 'Time', 'Space', 'Soul', 'Reality', 'Mind'] n=int(input()) c=[input() for _ in [0]*n] d=[b[x] for x,y in enumerate(a) if y not in c] print(len(d),*d,sep='\n')
26.333333
56
0.575949
b2ea50e72a90d57c0ce1639b9aa32bf39f8fb676
3,817
py
Python
coverage/src/distance.py
zhang-informatics/UMLS_iDISK
c3cbea8c87f23be35be678a863c932cb422794fb
[ "MIT" ]
null
null
null
coverage/src/distance.py
zhang-informatics/UMLS_iDISK
c3cbea8c87f23be35be678a863c932cb422794fb
[ "MIT" ]
null
null
null
coverage/src/distance.py
zhang-informatics/UMLS_iDISK
c3cbea8c87f23be35be678a863c932cb422794fb
[ "MIT" ]
null
null
null
import argparse import json import editdistance import pickle import numpy as np from tqdm import tqdm """ This script computes the Levenshtein and Jaccard distances between the raw matched and unmatched terms. For each term it finds the minimum distance in the other set. """ def parse_args(): parser = argparse...
37.792079
92
0.657061
a7458f89ead9a3e5459284f8f9ed358203d433a4
4,872
py
Python
pypowerbi/client.py
lucasfcnunes/pypowerbi
4ab4c0f075bf1db43bb3bd8e691157fa459bd9e1
[ "MIT" ]
1
2021-03-16T17:34:03.000Z
2021-03-16T17:34:03.000Z
pypowerbi/client.py
lucasfcnunes/pypowerbi
4ab4c0f075bf1db43bb3bd8e691157fa459bd9e1
[ "MIT" ]
null
null
null
pypowerbi/client.py
lucasfcnunes/pypowerbi
4ab4c0f075bf1db43bb3bd8e691157fa459bd9e1
[ "MIT" ]
null
null
null
import json import datetime import adal from .features import Features from .reports import Reports from .datasets import Datasets from .imports import Imports from .groups import Groups from .gateways import Gateways from .activity_logs import ActivityLogs class PowerBIClient: default_resource_url = "https://an...
29.527273
101
0.663383
453eeb17d4c4a5f7480679b63cd133b35461a43f
526
py
Python
inthemoment/utils.py
MeighenBergerS/inthemoment
6c2f27d952a80bd377cfa00fc4db8f3d1cdf0dad
[ "MIT" ]
null
null
null
inthemoment/utils.py
MeighenBergerS/inthemoment
6c2f27d952a80bd377cfa00fc4db8f3d1cdf0dad
[ "MIT" ]
null
null
null
inthemoment/utils.py
MeighenBergerS/inthemoment
6c2f27d952a80bd377cfa00fc4db8f3d1cdf0dad
[ "MIT" ]
null
null
null
# utils.py # Authors Stephan Meighen-Berger # Utility functions for the inthemoment package import numpy as np def find_nearest(array, value): """ Function to find the closest value in the array Parameters ---------- array: iterable Iterable object value: float/int The value to f...
20.230769
55
0.627376
da30f52517b76b9a80811ed7645f72810f835d6d
29,145
py
Python
core/storage/question/gae_models_test.py
AbhinavGopal/oppiabackup
e5ae39b20623d4389885802d670b0142d82034ea
[ "Apache-2.0" ]
1
2022-02-22T09:27:22.000Z
2022-02-22T09:27:22.000Z
core/storage/question/gae_models_test.py
IMADILKHAN/oppia
454bf732dfd0087bcc0b8b7cd65d80ba386f4929
[ "Apache-2.0" ]
null
null
null
core/storage/question/gae_models_test.py
IMADILKHAN/oppia
454bf732dfd0087bcc0b8b7cd65d80ba386f4929
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Oppia 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 applicable ...
43.24184
121
0.662275
ca463018ed81e1ecb04bd3044b01c99b910c1699
1,227
py
Python
Tests/notion_block_test.py
GatherStar/notion-dump-kernel
8ae9a53dfd8ad7beddbe53433ae1c44b58fdc606
[ "MIT" ]
1
2022-02-10T15:35:22.000Z
2022-02-10T15:35:22.000Z
Tests/notion_block_test.py
GatherStar/notion-dump-kernel
8ae9a53dfd8ad7beddbe53433ae1c44b58fdc606
[ "MIT" ]
null
null
null
Tests/notion_block_test.py
GatherStar/notion-dump-kernel
8ae9a53dfd8ad7beddbe53433ae1c44b58fdc606
[ "MIT" ]
null
null
null
import logging import NotionDump from NotionDump.Dump.dump import Dump from NotionDump.Notion.Notion import NotionQuery TOKEN_TEST = "secret_WRLJ9xyEawNxzRhVHVWfciTl9FAyNCd29GMUvr2hQD4" TABLE_ID = "13b914160ef740dcb64e55c5393762fa" RER_LIST_ID = "d32db4693409464b9981caec9ef11974" # 页面表格测试 def test_get_table_block(q...
23.596154
65
0.724531
1091aca97f6bd8e497daf05179e65d0bec72043f
2,328
py
Python
legacy/extract_chief.py
Archaeoraptor/tools
36d09a66b552454a9bdfdb8aea32cd2b3822a899
[ "BSD-3-Clause" ]
1
2021-06-09T08:03:55.000Z
2021-06-09T08:03:55.000Z
legacy/extract_chief.py
Archaeoraptor/tools
36d09a66b552454a9bdfdb8aea32cd2b3822a899
[ "BSD-3-Clause" ]
null
null
null
legacy/extract_chief.py
Archaeoraptor/tools
36d09a66b552454a9bdfdb8aea32cd2b3822a899
[ "BSD-3-Clause" ]
1
2021-07-01T07:51:30.000Z
2021-07-01T07:51:30.000Z
#coding=utf-8 # from bs4 import BeautifulSoup # import xml.etree.ElementTree as ET import regex import os import sys regex.purge() # path = 'C:/Users/zjk/Desktop/xml/422.html' path = 'C:/Users/zjk/Desktop/xml/Data1/00090036.xml' # htmlfile = open(path, 'r', encoding='utf-8') xmlread = open(path, 'r', encoding='utf-...
35.272727
123
0.658076