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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f04ba688518b293c3f58f28b313a6e8e7fd63f49 | 214 | py | Python | URI 1017.py | Azefalo/Cluble-de-Programacao-UTFPR | f4a457bae36ac61378766035abc0633f5b3492db | [
"MIT"
] | 1 | 2021-04-19T22:42:00.000Z | 2021-04-19T22:42:00.000Z | URI 1017.py | Azefalo/Cluble-de-Programacao-UTFPR | f4a457bae36ac61378766035abc0633f5b3492db | [
"MIT"
] | null | null | null | URI 1017.py | Azefalo/Cluble-de-Programacao-UTFPR | f4a457bae36ac61378766035abc0633f5b3492db | [
"MIT"
] | null | null | null | # https://www.beecrowd.com.br/judge/en/problems/view/1017
car_efficiency = 12 # Km/L
time = int(input())
average_speed = int(input())
liters = (time * average_speed) / car_efficiency
print(f"{liters:.3f}") | 26.75 | 58 | 0.686916 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.373832 |
f04ce64c795e8f616352eaaa159edec4673a3240 | 1,432 | py | Python | src/cpp/convert.py | shindavid/splendor | b51b0408967627dbd61f60f57031d1fe21aa9d8f | [
"MIT"
] | 1 | 2017-11-02T18:32:51.000Z | 2017-11-02T18:32:51.000Z | src/cpp/convert.py | shindavid/splendor | b51b0408967627dbd61f60f57031d1fe21aa9d8f | [
"MIT"
] | 1 | 2018-07-05T09:07:40.000Z | 2018-07-05T09:07:40.000Z | src/cpp/convert.py | shindavid/splendor | b51b0408967627dbd61f60f57031d1fe21aa9d8f | [
"MIT"
] | null | null | null | filename = '../py/cards.py'
f = open(filename)
color_map = {
'W' : 'eWhite',
'U' : 'eBlue',
'G' : 'eGreen',
'R' : 'eRed',
'B' : 'eBlack',
'J' : 'eGold',
}
color_index_map = {
'W' : 0,
'U' : 1,
'G' : 2,
'R' : 3,
'B' : 4
}
def convert(cost_str):
cost_array = [0,0,0... | 21.058824 | 88 | 0.513966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 203 | 0.14176 |
f04d3917118eeab7daa5965475644fcb12277751 | 230 | py | Python | code_examples/projections/cyl.py | ezcitron/BasemapTutorial | 0db9248b430d39518bdfdb25d713145be4eb966a | [
"CC0-1.0"
] | 99 | 2015-01-14T21:20:48.000Z | 2022-01-25T10:38:37.000Z | code_examples/projections/cyl.py | ezcitron/BasemapTutorial | 0db9248b430d39518bdfdb25d713145be4eb966a | [
"CC0-1.0"
] | 1 | 2017-08-31T07:02:20.000Z | 2017-08-31T07:02:20.000Z | code_examples/projections/cyl.py | ezcitron/BasemapTutorial | 0db9248b430d39518bdfdb25d713145be4eb966a | [
"CC0-1.0"
] | 68 | 2015-01-14T21:21:01.000Z | 2022-01-29T14:53:38.000Z | from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
map = Basemap(projection='cyl')
map.drawmapboundary(fill_color='aqua')
map.fillcontinents(color='coral',lake_color='aqua')
map.drawcoastlines()
plt.show() | 23 | 51 | 0.795652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.104348 |
f04d3f1d74f6c269738f89d87766211a982c25ba | 3,926 | py | Python | applications/ShapeOptimizationApplication/python_scripts/analyzer_internal.py | AndreaVoltan/MyKratos7.0 | e977752722e8ef1b606f25618c4bf8fd04c434cc | [
"BSD-4-Clause"
] | 2 | 2020-04-30T19:13:08.000Z | 2021-04-14T19:40:47.000Z | applications/ShapeOptimizationApplication/python_scripts/analyzer_internal.py | AndreaVoltan/MyKratos7.0 | e977752722e8ef1b606f25618c4bf8fd04c434cc | [
"BSD-4-Clause"
] | 1 | 2020-04-30T19:19:09.000Z | 2020-05-02T14:22:36.000Z | applications/ShapeOptimizationApplication/python_scripts/analyzer_internal.py | AndreaVoltan/MyKratos7.0 | e977752722e8ef1b606f25618c4bf8fd04c434cc | [
"BSD-4-Clause"
] | 1 | 2020-06-12T08:51:24.000Z | 2020-06-12T08:51:24.000Z | # ==============================================================================
# KratosShapeOptimizationApplication
#
# License: BSD License
# license: ShapeOptimizationApplication/license.txt
#
# Main authors: Baumgaertner Daniel, https://github.com/dbaumgaertner
# ... | 50.333333 | 156 | 0.609272 | 2,953 | 0.752165 | 0 | 0 | 0 | 0 | 0 | 0 | 1,278 | 0.325522 |
f04e299a6b487778e8fe610c813dd85847139172 | 529 | py | Python | tests/frontend/detector/test_fast.py | swershrimpy/gtsfm | 8d301eb3ef9172345a1ac1369fd4e19764d28946 | [
"Apache-2.0"
] | 122 | 2021-02-07T23:01:58.000Z | 2022-03-30T13:10:35.000Z | tests/frontend/detector/test_fast.py | swershrimpy/gtsfm | 8d301eb3ef9172345a1ac1369fd4e19764d28946 | [
"Apache-2.0"
] | 273 | 2021-01-30T16:45:26.000Z | 2022-03-16T15:02:33.000Z | tests/frontend/detector/test_fast.py | swershrimpy/gtsfm | 8d301eb3ef9172345a1ac1369fd4e19764d28946 | [
"Apache-2.0"
] | 13 | 2021-03-12T03:01:27.000Z | 2022-03-11T03:16:54.000Z | """Tests for frontend's FAST detector class.
Authors: Ayush Baid
"""
import unittest
import tests.frontend.detector.test_detector_base as test_detector_base
from gtsfm.frontend.detector.fast import Fast
class TestFast(test_detector_base.TestDetectorBase):
"""Test class for FAST detector class in frontend.
... | 22.041667 | 78 | 0.729679 | 272 | 0.514178 | 0 | 0 | 0 | 0 | 0 | 0 | 217 | 0.410208 |
f04f803f10f18e34c63851533b89db8888254793 | 2,135 | py | Python | problem/13_Roman_to_Integer.py | YoungYoung619/leetcode | 973fd4a971ddc80a8ceb7b8aff08a2104477e768 | [
"Apache-2.0"
] | null | null | null | problem/13_Roman_to_Integer.py | YoungYoung619/leetcode | 973fd4a971ddc80a8ceb7b8aff08a2104477e768 | [
"Apache-2.0"
] | null | null | null | problem/13_Roman_to_Integer.py | YoungYoung619/leetcode | 973fd4a971ddc80a8ceb7b8aff08a2104477e768 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) College of Mechatronics and Control Engineering, Shenzhen University.
All rights reserved.
Description :
Author:Team Li
"""
"""
13. Roman to Integer
Easy
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X ... | 27.371795 | 345 | 0.625761 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,608 | 0.752457 |
f04fe6a0ae66518e152066d2f7472e765f8bd343 | 2,173 | py | Python | tests/test_cli.py | KoichiYasuoka/pynlpir | 8d5e994796a2b5d513f7db8d76d7d24a85d531b1 | [
"MIT"
] | 537 | 2015-01-12T09:59:57.000Z | 2022-03-29T09:22:30.000Z | tests/test_cli.py | KoichiYasuoka/pynlpir | 8d5e994796a2b5d513f7db8d76d7d24a85d531b1 | [
"MIT"
] | 110 | 2015-01-02T13:17:56.000Z | 2022-03-24T07:43:02.000Z | tests/test_cli.py | KoichiYasuoka/pynlpir | 8d5e994796a2b5d513f7db8d76d7d24a85d531b1 | [
"MIT"
] | 150 | 2015-01-21T01:58:56.000Z | 2022-02-23T16:16:40.000Z | """Unit tests for pynlpir's cli.py file."""
import os
import shutil
import stat
import unittest
try:
from urllib.error import URLError
from urllib.request import urlopen
except ImportError:
from urllib2 import URLError, urlopen
from click.testing import CliRunner
from pynlpir import cli
TEST_DIR = os.pat... | 32.432836 | 73 | 0.645651 | 1,497 | 0.688909 | 0 | 0 | 1,569 | 0.722043 | 0 | 0 | 478 | 0.219972 |
f05121798a0e9a1fc1209e3a2d1e90910d1020e8 | 13,746 | py | Python | src/old/parsemod/cft_expr.py | TeaCondemns/cofty | 0228c8f0e85c8b977586cc88123e198c64953dcb | [
"Apache-2.0",
"MIT"
] | 1 | 2022-02-17T18:14:58.000Z | 2022-02-17T18:14:58.000Z | src/old/parsemod/cft_expr.py | TeaCondemns/cofty | 0228c8f0e85c8b977586cc88123e198c64953dcb | [
"Apache-2.0",
"MIT"
] | 2 | 2022-03-12T19:33:44.000Z | 2022-03-13T11:14:12.000Z | src/old/parsemod/cft_expr.py | TeaCondemns/cofty | 0228c8f0e85c8b977586cc88123e198c64953dcb | [
"Apache-2.0",
"MIT"
] | null | null | null | from cft_namehandler import NameHandler, get_value_returned_type, get_local_name, get_abs_composed_name
from parsemod.cft_name import is_name, is_kw, compose_name
from parsemod.cft_syntaxtree_values import str_type
from parsemod.cft_others import extract_tokens
from cft_errors_handler import ErrorsHandler
from compile.... | 32.343529 | 119 | 0.576531 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,081 | 0.151389 |
f05136d88821cb5ba7ae7358c44d2b30837eb2b2 | 938 | py | Python | src/ychaos/cli/exceptions/__init__.py | vanderh0ff/ychaos | 5148c889912b744ee73907e4dd30c9ddb851aeb3 | [
"Apache-2.0"
] | 8 | 2021-07-21T15:37:48.000Z | 2022-03-03T14:43:09.000Z | src/ychaos/cli/exceptions/__init__.py | vanderh0ff/ychaos | 5148c889912b744ee73907e4dd30c9ddb851aeb3 | [
"Apache-2.0"
] | 102 | 2021-07-20T16:08:29.000Z | 2022-03-25T07:28:37.000Z | src/ychaos/cli/exceptions/__init__.py | vanderh0ff/ychaos | 5148c889912b744ee73907e4dd30c9ddb851aeb3 | [
"Apache-2.0"
] | 8 | 2021-07-20T13:37:46.000Z | 2022-02-18T01:44:52.000Z | # Copyright 2021, Yahoo
# Licensed under the terms of the Apache 2.0 license. See the LICENSE file in the project root for terms
from abc import abstractmethod
from typing import Any, Dict
class YChaosCLIError(Exception):
exitcode = 1
def __init__(self, app, message, **kwargs):
self.app = app
... | 33.5 | 105 | 0.687633 | 743 | 0.792111 | 0 | 0 | 535 | 0.570362 | 0 | 0 | 513 | 0.546908 |
f051fa84986a7c9f1470f505282adadb784afefe | 5,289 | py | Python | ibmsecurity/isam/base/fips.py | zone-zero/ibmsecurity | 7d3e38104b67e1b267e18a44845cb756a5302c3d | [
"Apache-2.0"
] | 46 | 2017-03-21T21:08:59.000Z | 2022-02-20T22:03:46.000Z | ibmsecurity/isam/base/fips.py | zone-zero/ibmsecurity | 7d3e38104b67e1b267e18a44845cb756a5302c3d | [
"Apache-2.0"
] | 201 | 2017-03-21T21:25:52.000Z | 2022-03-30T21:38:20.000Z | ibmsecurity/isam/base/fips.py | zone-zero/ibmsecurity | 7d3e38104b67e1b267e18a44845cb756a5302c3d | [
"Apache-2.0"
] | 91 | 2017-03-22T16:25:36.000Z | 2022-02-04T04:36:29.000Z | import logging
import ibmsecurity.utilities.tools
import time
logger = logging.getLogger(__name__)
requires_model = "Appliance"
def get(isamAppliance, check_mode=False, force=False):
"""
Retrieving the current FIPS Mode configuration
"""
return isamAppliance.invoke_get("Retrieving the current FIPS M... | 36.729167 | 120 | 0.592362 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,415 | 0.267536 |
f052b9fc28af42e699049bdfe2b0ac01d467c316 | 187 | py | Python | user_details/give_default.py | Shreyanshsachan/College-Predictor | 87068aa1d1a889ced586ff155bc2b5d9a78340f7 | [
"MIT"
] | null | null | null | user_details/give_default.py | Shreyanshsachan/College-Predictor | 87068aa1d1a889ced586ff155bc2b5d9a78340f7 | [
"MIT"
] | null | null | null | user_details/give_default.py | Shreyanshsachan/College-Predictor | 87068aa1d1a889ced586ff155bc2b5d9a78340f7 | [
"MIT"
] | null | null | null | preference_list_of_user=[]
def give(def_list):
Def=def_list
global preference_list_of_user
preference_list_of_user=Def
return Def
def give_to_model():
return preference_list_of_user | 20.777778 | 31 | 0.84492 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f0543d6f05ce0f050bd473fdf2e6349ee2b5262a | 953 | py | Python | face_recognition/project/type_hints.py | dgr113/face-recognition | edda6ca8fef567d24ae740afd2399b66166f3431 | [
"MIT"
] | null | null | null | face_recognition/project/type_hints.py | dgr113/face-recognition | edda6ca8fef567d24ae740afd2399b66166f3431 | [
"MIT"
] | null | null | null | face_recognition/project/type_hints.py | dgr113/face-recognition | edda6ca8fef567d24ae740afd2399b66166f3431 | [
"MIT"
] | null | null | null | # coding: utf-8
import numpy as np
import keras.utils
from pathlib import Path
from typing import Tuple, Sequence, Union, Hashable, Iterable, Mapping, Any
### COMMON TYPES
UNIVERSAL_PATH_TYPE = Union[Path, str]
UNIVERSAL_SOURCE_TYPE = Union[UNIVERSAL_PATH_TYPE, Mapping]
CHUNKED_DATA_TYPE = Tuple[Sequence[np.ndarray]... | 31.766667 | 92 | 0.781742 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.080797 |
f056587ea945052209153f421a5cb7898e82cd98 | 4,021 | py | Python | modules/augmentation.py | AdamMiltonBarker/hias-all-oneapi-classifier | 7afdbcde0941b287df2e153d64e14d06f2341aa2 | [
"MIT"
] | 1 | 2021-04-30T21:13:11.000Z | 2021-04-30T21:13:11.000Z | modules/augmentation.py | AdamMiltonBarker/hias-all-oneapi-classifier | 7afdbcde0941b287df2e153d64e14d06f2341aa2 | [
"MIT"
] | 3 | 2021-09-18T20:02:05.000Z | 2021-09-21T19:18:16.000Z | modules/augmentation.py | AIIAL/oneAPI-Acute-Lymphoblastic-Leukemia-Classifier | 05fb9cdfa5069b16cfe439be6d94d21b9eb21723 | [
"MIT"
] | 1 | 2021-09-19T01:19:40.000Z | 2021-09-19T01:19:40.000Z | #!/usr/bin/env python
""" HIAS AI Model Data Augmentation Class.
Provides data augmentation methods.
MIT License
Copyright (c) 2021 Asociación de Investigacion en Inteligencia Artificial
Para la Leucemia Peter Moss
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and ass... | 32.691057 | 99 | 0.665257 | 2,569 | 0.638737 | 0 | 0 | 0 | 0 | 0 | 0 | 1,810 | 0.450025 |
f05664f755b3f673d926831f9475fb250a901f2c | 792 | py | Python | pytglib/api/types/rich_text_phone_number.py | iTeam-co/pytglib | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 6 | 2019-10-30T08:57:27.000Z | 2021-02-08T14:17:43.000Z | pytglib/api/types/rich_text_phone_number.py | iTeam-co/python-telegram | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 1 | 2021-08-19T05:44:10.000Z | 2021-08-19T07:14:56.000Z | pytglib/api/types/rich_text_phone_number.py | iTeam-co/python-telegram | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 5 | 2019-12-04T05:30:39.000Z | 2021-05-21T18:23:32.000Z |
from ..utils import Object
class RichTextPhoneNumber(Object):
"""
A rich text phone number
Attributes:
ID (:obj:`str`): ``RichTextPhoneNumber``
Args:
text (:class:`telegram.api.types.RichText`):
Text
phone_number (:obj:`str`):
Phone number
Ret... | 21.405405 | 54 | 0.585859 | 760 | 0.959596 | 0 | 0 | 210 | 0.265152 | 0 | 0 | 402 | 0.507576 |
f0571f9fa4afbc250ffbbd1dd3bed40b228bfe8d | 46 | py | Python | cne/__init__.py | BartWojtowicz/cne | 16612292c1c938fc9ec53a14642fb7d40bcc9e25 | [
"Apache-2.0"
] | null | null | null | cne/__init__.py | BartWojtowicz/cne | 16612292c1c938fc9ec53a14642fb7d40bcc9e25 | [
"Apache-2.0"
] | null | null | null | cne/__init__.py | BartWojtowicz/cne | 16612292c1c938fc9ec53a14642fb7d40bcc9e25 | [
"Apache-2.0"
] | null | null | null | from .cne import CNE
__version__ = "0.0.dev"
| 11.5 | 23 | 0.695652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.195652 |
f0574e6e18439c3b0140a8ed7ddefec8cd1bf416 | 299 | py | Python | tests/core/scenario_finder/file_filters/test_file_filter.py | nikitanovosibirsk/vedro | e975a1c1eb065bc6caa32c41c0d7576ee6d284db | [
"Apache-2.0"
] | 2 | 2021-08-24T12:49:30.000Z | 2022-01-23T07:21:25.000Z | tests/core/scenario_finder/file_filters/test_file_filter.py | nikitanovosibirsk/vedro | e975a1c1eb065bc6caa32c41c0d7576ee6d284db | [
"Apache-2.0"
] | 20 | 2015-12-09T11:04:23.000Z | 2022-03-20T09:18:17.000Z | tests/core/scenario_finder/file_filters/test_file_filter.py | nikitanovosibirsk/vedro | e975a1c1eb065bc6caa32c41c0d7576ee6d284db | [
"Apache-2.0"
] | 3 | 2015-12-09T07:31:23.000Z | 2022-01-28T11:03:24.000Z | from pytest import raises
from vedro._core._scenario_finder._file_filters import FileFilter
def test_file_filter():
with raises(Exception) as exc_info:
FileFilter()
assert exc_info.type is TypeError
assert "Can't instantiate abstract class FileFilter" in str(exc_info.value)
| 24.916667 | 79 | 0.769231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.150502 |
f058c8ff047b3d9464b8a867f927fcd03d622d8f | 31,894 | py | Python | concept_disc/pubmed_dump.py | nmonath/concept_discovery | 766905684e598159cc6fb58967ed411888b93ce5 | [
"MIT"
] | 3 | 2020-09-10T13:48:23.000Z | 2021-08-19T21:42:50.000Z | concept_disc/pubmed_dump.py | nmonath/concept_discovery | 766905684e598159cc6fb58967ed411888b93ce5 | [
"MIT"
] | null | null | null | concept_disc/pubmed_dump.py | nmonath/concept_discovery | 766905684e598159cc6fb58967ed411888b93ce5 | [
"MIT"
] | 3 | 2020-10-16T21:57:04.000Z | 2020-12-26T00:59:32.000Z | """
Parse PubMed Dump
Ref:
https://www.nlm.nih.gov/databases/download/pubmed_medline.html
https://www.nlm.nih.gov/bsd/licensee/elements_alphabetical.html
https://www.nlm.nih.gov/bsd/licensee/elements_descriptions.html#medlinecitation
"""
from collections import defaultdict
from concurrent import futures
import glob
... | 34.331539 | 120 | 0.58199 | 18,628 | 0.584005 | 1,457 | 0.045678 | 7,113 | 0.222999 | 0 | 0 | 8,974 | 0.281343 |
f05afdbd5aec954079117e24e6a1f75f80dba71c | 1,523 | py | Python | Consumer_test.py | image-store-org/image-store-py-web-api-consumer-test | 59d805e8a7b459a97ede7285f6e4a67e87cfba02 | [
"MIT"
] | null | null | null | Consumer_test.py | image-store-org/image-store-py-web-api-consumer-test | 59d805e8a7b459a97ede7285f6e4a67e87cfba02 | [
"MIT"
] | null | null | null | Consumer_test.py | image-store-org/image-store-py-web-api-consumer-test | 59d805e8a7b459a97ede7285f6e4a67e87cfba02 | [
"MIT"
] | null | null | null | import sys
sys.path.append('dependencies/image-store-py-web-api-consumer')
from Consumer import Consumer
class Consumer_test:
def __init__(self):
self.c = Consumer()
def get(self):
print('\x1b[6;30;42m' + 'GET' + '\x1b[0m')
print(self.c.get())
print('{}\n'.format(self.c... | 30.46 | 69 | 0.570584 | 1,249 | 0.820092 | 0 | 0 | 0 | 0 | 0 | 0 | 505 | 0.331582 |
f05b7050495370891bf951394304c4e6b993404b | 864 | py | Python | Algorithms/MostCommonWord/mostCommonWord.py | riddhi-27/HacktoberFest2020-Contributions | 0a5c39169723b3ea3b6447d4005896900dd789bc | [
"MIT"
] | null | null | null | Algorithms/MostCommonWord/mostCommonWord.py | riddhi-27/HacktoberFest2020-Contributions | 0a5c39169723b3ea3b6447d4005896900dd789bc | [
"MIT"
] | null | null | null | Algorithms/MostCommonWord/mostCommonWord.py | riddhi-27/HacktoberFest2020-Contributions | 0a5c39169723b3ea3b6447d4005896900dd789bc | [
"MIT"
] | null | null | null | """Returns words from the given paragraph which has been repeated most,
incase of more than one words, latest most common word is returned. """
import string
def mostCommonWord(paragraph: str) -> str:
# translate function maps every punctuation in given string to white space
words = paragraph.translate(st... | 34.56 | 125 | 0.66088 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 323 | 0.373843 |
f05bdaed59cf5073cab62db01710a16ba5ff7771 | 7,597 | py | Python | app/views.py | PaulMurrayCbr/GameNight | 838c19dda765027abbe8e12e331268b01cb859c2 | [
"Unlicense"
] | null | null | null | app/views.py | PaulMurrayCbr/GameNight | 838c19dda765027abbe8e12e331268b01cb859c2 | [
"Unlicense"
] | null | null | null | app/views.py | PaulMurrayCbr/GameNight | 838c19dda765027abbe8e12e331268b01cb859c2 | [
"Unlicense"
] | null | null | null | from app import app, db
from flask import render_template, flash, redirect, get_flashed_messages
import forms
import models
import Character
from flask.globals import request
from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
def menugear() :
return {
'pcs': models.Character.query.all()
}
@a... | 26.939716 | 94 | 0.612874 | 0 | 0 | 0 | 0 | 7,247 | 0.953929 | 0 | 0 | 1,909 | 0.251283 |
f05d0c3401f69142c582ade92cb02f323289bd68 | 183 | py | Python | dingomata/config/__init__.py | tigershadowclaw/discord-dingomata | 0b20d7b75a0af3387b19b17c336e5e14356d2f14 | [
"MIT"
] | null | null | null | dingomata/config/__init__.py | tigershadowclaw/discord-dingomata | 0b20d7b75a0af3387b19b17c336e5e14356d2f14 | [
"MIT"
] | null | null | null | dingomata/config/__init__.py | tigershadowclaw/discord-dingomata | 0b20d7b75a0af3387b19b17c336e5e14356d2f14 | [
"MIT"
] | null | null | null | from .bot import GuildConfig, ServiceConfig, get_logging_config, service_config
__all__ = [
"ServiceConfig",
"GuildConfig",
"get_logging_config",
"service_config",
]
| 20.333333 | 79 | 0.721311 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.349727 |
f05da004efb57fa8123a5d8084bba03a6cd27ce9 | 623 | py | Python | create_tacacs.py | cromulon-actual/ise_automation | de3fbb762c3e1f4f41d81dda3bd2d33a11db1d58 | [
"MIT"
] | null | null | null | create_tacacs.py | cromulon-actual/ise_automation | de3fbb762c3e1f4f41d81dda3bd2d33a11db1d58 | [
"MIT"
] | null | null | null | create_tacacs.py | cromulon-actual/ise_automation | de3fbb762c3e1f4f41d81dda3bd2d33a11db1d58 | [
"MIT"
] | null | null | null | from ciscoisesdk import IdentityServicesEngineAPI
from ciscoisesdk.exceptions import ApiError
from dotenv import load_dotenv
import os
from pprint import pprint as ppr
load_dotenv()
admin = os.getenv("ISE_ADMIN")
pw = os.getenv("ISE_PW")
base_url = os.getenv("ISE_URL")
api = IdentityServicesEngineAPI(
username=ad... | 23.074074 | 82 | 0.764045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.133226 |
f05e57abf8788d483966f72cb158032481ce2596 | 4,121 | py | Python | 8_plot_data_perstation.py | sdat2/Yellowstone2 | 4008145b7372f5f5901de584656ceea44e73934a | [
"MIT"
] | null | null | null | 8_plot_data_perstation.py | sdat2/Yellowstone2 | 4008145b7372f5f5901de584656ceea44e73934a | [
"MIT"
] | null | null | null | 8_plot_data_perstation.py | sdat2/Yellowstone2 | 4008145b7372f5f5901de584656ceea44e73934a | [
"MIT"
] | null | null | null | # Program 8_plot_data_perstation.py written by Sanne Cottaar ([email protected])
file_name= '8_plot_data_perstation.py'
# Uses receiver functions computed to produce a nice graph for every directory in DATARF
import obspy
from obspy import read
from obspy.core import Stream
from obspy.core import trace
import matplotlib... | 40.009709 | 162 | 0.542344 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 744 | 0.180539 |
f061361346e5c53e6f9bfc725e3bc9a264fe2453 | 9,053 | py | Python | archon/__init__.py | HyechurnJang/archon | 2cda56436ed6dea65d38774f7c9ed6c3315dbc03 | [
"Apache-2.0"
] | 1 | 2018-03-07T08:33:23.000Z | 2018-03-07T08:33:23.000Z | archon/__init__.py | HyechurnJang/archon | 2cda56436ed6dea65d38774f7c9ed6c3315dbc03 | [
"Apache-2.0"
] | 2 | 2017-03-14T01:02:55.000Z | 2017-03-14T01:07:29.000Z | archon/__init__.py | HyechurnJang/archon | 2cda56436ed6dea65d38774f7c9ed6c3315dbc03 | [
"Apache-2.0"
] | 4 | 2017-02-03T04:53:07.000Z | 2020-04-20T07:52:47.000Z | # -*- coding: utf-8 -*-
################################################################################
# _____ _ _____ _ #
# / ____(_) / ____| | | #
# | | _ ___ ___ ___ | (___ _ _ ___... | 43.946602 | 117 | 0.435436 | 1,951 | 0.215509 | 0 | 0 | 2,441 | 0.269634 | 0 | 0 | 3,186 | 0.351928 |
f0618ae5c1b87db23e1c15aeed2890efe625454b | 283 | py | Python | src_Python/EtabsAPIaface0/a01comtypes/Excel03c.py | fjmucho/APIdeEtabsYPython | a5c7f7fe1861c4ac3c9370ef06e291f94c6fd523 | [
"MIT"
] | null | null | null | src_Python/EtabsAPIaface0/a01comtypes/Excel03c.py | fjmucho/APIdeEtabsYPython | a5c7f7fe1861c4ac3c9370ef06e291f94c6fd523 | [
"MIT"
] | null | null | null | src_Python/EtabsAPIaface0/a01comtypes/Excel03c.py | fjmucho/APIdeEtabsYPython | a5c7f7fe1861c4ac3c9370ef06e291f94c6fd523 | [
"MIT"
] | null | null | null | import sys
import comtypes
from comtypes.client import CreateObject
try:
# Connecting | coneccion
xl = CreateObject("Excel.Application")
except (OSError, comtypes.COMError):
print("No tiene instalada el programa(Excel).")
sys.exit(-1)
xl.Visible = True
print (xl) | 20.214286 | 49 | 0.720848 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.29682 |
f0625e6b2d07feed6a373b43052746c1a7b2640c | 984 | py | Python | home/tests/add-remove sector.py | caggri/FOFviz | 776ab387d832a86eea1a1b9064040d9b012494a7 | [
"MIT"
] | 2 | 2020-05-24T22:28:53.000Z | 2020-05-25T21:58:24.000Z | home/tests/add-remove sector.py | caggri/FOFviz | 776ab387d832a86eea1a1b9064040d9b012494a7 | [
"MIT"
] | null | null | null | home/tests/add-remove sector.py | caggri/FOFviz | 776ab387d832a86eea1a1b9064040d9b012494a7 | [
"MIT"
] | 1 | 2021-10-16T12:26:29.000Z | 2021-10-16T12:26:29.000Z | from selenium import webdriver
import time
chromedriver = "C:/Users/deniz/chromedriver/chromedriver"
driver = webdriver.Chrome(chromedriver)
driver.get('http://127.0.0.1:8000/')
dashboard = '//*[@id="accordionSidebar"]/li[1]/a'
sectors_1 = '//*[@id="sectors"]'
sectors_1_element = '//*[@id="sectors"]/option[4]'
add_s... | 29.818182 | 63 | 0.747967 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 299 | 0.303862 |
f065f569bc87da0b1005e3822cbd92500b510024 | 1,713 | py | Python | netensorflow/api_samples/ann_creation_and_usage.py | psigelo/NeTensorflow | ec8bc09cc98346484d1b682a3dfd25c68c4ded61 | [
"MIT"
] | null | null | null | netensorflow/api_samples/ann_creation_and_usage.py | psigelo/NeTensorflow | ec8bc09cc98346484d1b682a3dfd25c68c4ded61 | [
"MIT"
] | null | null | null | netensorflow/api_samples/ann_creation_and_usage.py | psigelo/NeTensorflow | ec8bc09cc98346484d1b682a3dfd25c68c4ded61 | [
"MIT"
] | null | null | null | import tensorflow as tf
from netensorflow.ann.ANN import ANN
from netensorflow.ann.macro_layer.MacroLayer import MacroLayer
from netensorflow.ann.macro_layer.layer_structure.InputLayerStructure import InputLayerStructure
from netensorflow.ann.macro_layer.layer_structure.LayerStructure import LayerStructure, LayerType
... | 37.23913 | 123 | 0.782837 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 236 | 0.13777 |
f0693b36a74b3acf0a861ff3c1c73f7355633501 | 3,449 | py | Python | auth-backend.py | alexanderbittner/spotify-tracks | 9095d0224f7e313d164a5da24add2b806afc1b31 | [
"MIT"
] | null | null | null | auth-backend.py | alexanderbittner/spotify-tracks | 9095d0224f7e313d164a5da24add2b806afc1b31 | [
"MIT"
] | null | null | null | auth-backend.py | alexanderbittner/spotify-tracks | 9095d0224f7e313d164a5da24add2b806afc1b31 | [
"MIT"
] | null | null | null | import json
from flask import Flask, request, redirect, g, render_template
import requests
from urllib.parse import quote
# Adapted from https://github.com/drshrey/spotify-flask-auth-example
# Authentication Steps, paramaters, and responses are defined at https://developer.spotify.com/web-api/authorization-guide/
app... | 31.354545 | 123 | 0.701653 | 0 | 0 | 0 | 0 | 2,021 | 0.585967 | 0 | 0 | 1,268 | 0.367643 |
f069eb952ff8678a357b70b75757dce90f676973 | 3,342 | py | Python | Regression/utils_testing.py | saucec0de/sifu | 7924844e1737c7634016c677237bccd7e7651818 | [
"MIT"
] | 5 | 2021-03-26T08:19:43.000Z | 2021-12-18T18:04:04.000Z | Regression/utils_testing.py | saucec0de/sifu | 7924844e1737c7634016c677237bccd7e7651818 | [
"MIT"
] | null | null | null | Regression/utils_testing.py | saucec0de/sifu | 7924844e1737c7634016c677237bccd7e7651818 | [
"MIT"
] | null | null | null | import yaml
import os
### Sample Contents of config.yaml:
# 0002_info_leakage:
# category: Sifu C/C++
# points: 100
# description: Leave no trace
# vulnerability: CWE-14 * Information Leakage
# directory: Challenges/C_CPP/0002_info_leakage
# send_dir: true
# file: func_000... | 28.810345 | 142 | 0.595751 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,790 | 0.535607 |
f06a56919cbaa9b5814f0dd5b244fec4364f26b3 | 423 | py | Python | python/arachne/runtime/rpc/logger.py | fixstars/arachne | 03c00fc5105991d0d706b935d77e6f9255bae9e7 | [
"MIT"
] | 3 | 2022-03-29T03:02:20.000Z | 2022-03-29T03:48:38.000Z | python/arachne/runtime/rpc/logger.py | fixstars/arachne | 03c00fc5105991d0d706b935d77e6f9255bae9e7 | [
"MIT"
] | null | null | null | python/arachne/runtime/rpc/logger.py | fixstars/arachne | 03c00fc5105991d0d706b935d77e6f9255bae9e7 | [
"MIT"
] | 1 | 2022-03-29T05:44:12.000Z | 2022-03-29T05:44:12.000Z | import logging
class Logger(object):
stream_handler = logging.StreamHandler()
formatter = logging.Formatter("[%(levelname)s %(pathname)s:%(lineno)d] %(message)s")
stream_handler.setFormatter(formatter)
stream_handler.setLevel(logging.INFO)
my_logger = logging.Logger("arachne.runtime.rpc")
my_... | 26.4375 | 88 | 0.72104 | 405 | 0.957447 | 0 | 0 | 63 | 0.148936 | 0 | 0 | 74 | 0.174941 |
f06ae02416b8f8f9bb909dbd1c4d484476e5b8f7 | 4,498 | py | Python | examples/pykey60/code-1.py | lesley-byte/pykey | ce21b5b6c0da938bf24891e5acb196d6779c433a | [
"MIT"
] | null | null | null | examples/pykey60/code-1.py | lesley-byte/pykey | ce21b5b6c0da938bf24891e5acb196d6779c433a | [
"MIT"
] | null | null | null | examples/pykey60/code-1.py | lesley-byte/pykey | ce21b5b6c0da938bf24891e5acb196d6779c433a | [
"MIT"
] | null | null | null | #pylint: disable = line-too-long
import os
import time
import board
import neopixel
import keypad
import usb_hid
import pwmio
import rainbowio
from adafruit_hid.keyboard import Keyboard
from pykey.keycode import KB_Keycode as KC
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
# Hardware definition: GPIO... | 28.289308 | 106 | 0.631392 | 229 | 0.050912 | 0 | 0 | 0 | 0 | 0 | 0 | 768 | 0.170743 |
f06b5ca0b13a5293cc2597359395e328535fbb92 | 433 | py | Python | tags.py | Manugs51/TFM_Metaforas | 3fb459cf80c71e6fbb1c2a58d20bc03a05a760bd | [
"MIT"
] | null | null | null | tags.py | Manugs51/TFM_Metaforas | 3fb459cf80c71e6fbb1c2a58d20bc03a05a760bd | [
"MIT"
] | null | null | null | tags.py | Manugs51/TFM_Metaforas | 3fb459cf80c71e6fbb1c2a58d20bc03a05a760bd | [
"MIT"
] | null | null | null |
UNIVERSAL_POS_TAGS = {
'VERB': 'verbo',
'NOUN': 'nombre',
'PRON': 'pronombre',
'ADJ' : 'adjetivo',
'ADV' : 'adverbio',
'ADP' : 'aposición',
'CONJ': 'conjunción',
'DET' : 'determinante',
'NUM' : 'numeral',
'PRT' : 'partícula gramatical',
'X' : 'desconocido',
'.' : 'si... | 19.681818 | 35 | 0.484988 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 259 | 0.592677 |
f06b803afcbf533b08fafb38257aef61240b8c46 | 942 | py | Python | pyramid_oereb/contrib/data_sources/standard/sources/availability.py | pyramidoereb/pyramid_oereb | 764c03e98e01ebc709cd17bd0ffd817bfe318892 | [
"BSD-2-Clause"
] | 2 | 2018-01-23T13:16:12.000Z | 2018-01-26T06:27:29.000Z | pyramid_oereb/contrib/data_sources/standard/sources/availability.py | camptocamp/pyramid_oereb | 2d33aceb796f0afada6728820fa9d4691f7e273a | [
"BSD-2-Clause"
] | 298 | 2017-08-30T07:12:10.000Z | 2019-01-31T10:52:07.000Z | pyramid_oereb/contrib/data_sources/standard/sources/availability.py | pyramidoereb/pyramid_oereb | 764c03e98e01ebc709cd17bd0ffd817bfe318892 | [
"BSD-2-Clause"
] | 4 | 2017-12-01T09:51:42.000Z | 2018-11-21T11:02:47.000Z |
from pyramid_oereb.core.sources import BaseDatabaseSource
from pyramid_oereb.core.sources.availability import AvailabilityBaseSource
class DatabaseSource(BaseDatabaseSource, AvailabilityBaseSource):
def read(self):
"""
The read method to access the standard database structure. It uses SQL-Alchem... | 34.888889 | 108 | 0.632696 | 805 | 0.854565 | 0 | 0 | 0 | 0 | 0 | 0 | 270 | 0.286624 |
f06c0a436a6bd375e7b53e8c96203ec37cc92572 | 1,624 | py | Python | tests/fixtures/specification.py | FlyingBird95/openapi_generator | df4649b9723eb89fa370b02220356b7596794069 | [
"MIT"
] | 3 | 2022-01-10T12:43:36.000Z | 2022-01-13T18:08:15.000Z | tests/fixtures/specification.py | FlyingBird95/openapi_generator | df4649b9723eb89fa370b02220356b7596794069 | [
"MIT"
] | 6 | 2021-12-09T20:08:19.000Z | 2021-12-21T13:31:54.000Z | tests/fixtures/specification.py | FlyingBird95/openapi-builder | df4649b9723eb89fa370b02220356b7596794069 | [
"MIT"
] | 2 | 2021-12-17T17:26:06.000Z | 2021-12-17T17:39:00.000Z | from pytest_factoryboy import register
from tests.factories.specification import (
CallbackFactory,
ComponentsFactory,
ContactFactory,
DiscriminatorFactory,
EncodingFactory,
ExampleFactory,
ExternalDocumentationFactory,
HeaderFactory,
InfoFactory,
LicenseFactory,
LinkFactory... | 24.606061 | 47 | 0.816502 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.03633 |
f06e460c939f7ca739d389122382d4b13d1f8d29 | 3,856 | py | Python | app.py | samstruthers35/sqlalchemy-challenge | 0022e7459fc59a7bee85489f8d264a8aee9c01c8 | [
"ADSL"
] | null | null | null | app.py | samstruthers35/sqlalchemy-challenge | 0022e7459fc59a7bee85489f8d264a8aee9c01c8 | [
"ADSL"
] | null | null | null | app.py | samstruthers35/sqlalchemy-challenge | 0022e7459fc59a7bee85489f8d264a8aee9c01c8 | [
"ADSL"
] | null | null | null | import datetime as dt
import numpy as np
import pandas as pd
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
from flask import Flask, jsonify, render_template
engine = create_engine('sqlite:///hawaii.sqlite')
Base = automa... | 33.824561 | 117 | 0.625778 | 0 | 0 | 0 | 0 | 3,296 | 0.854772 | 0 | 0 | 604 | 0.156639 |
f06e635c1ec15823a66500dd05606d30ee6110ce | 4,096 | py | Python | WebSocket_Chat_Room/chat_room_v001/handlers/login.py | MMingLeung/Python_Study | 4ff1d02d2b6dd54e96f7179fa000548936b691e7 | [
"MIT"
] | 3 | 2017-12-27T14:08:17.000Z | 2018-02-10T13:01:08.000Z | WebSocket_Chat_Room/chat_room_v001/handlers/login.py | MMingLeung/Python_Study | 4ff1d02d2b6dd54e96f7179fa000548936b691e7 | [
"MIT"
] | 4 | 2017-05-24T10:37:05.000Z | 2021-06-10T18:35:32.000Z | WebSocket_Chat_Room/chat_room_v001/handlers/login.py | MMingLeung/Python_Study | 4ff1d02d2b6dd54e96f7179fa000548936b691e7 | [
"MIT"
] | 1 | 2018-02-14T19:05:30.000Z | 2018-02-14T19:05:30.000Z | #!/usr/bin/env python
#! -*- coding: utf-8 -*-
'''
Handler for login
'''
import tornado.web
from lib.db_controller import DBController
from lib.CUSTOMIZED_SESSION.my_session import SessionFactory
class LoginHandler(tornado.web.RequestHandler):
def initialize(self):
# 钩子函数 首先执行
class_ = SessionFact... | 41.795918 | 138 | 0.541992 | 4,049 | 0.953154 | 0 | 0 | 0 | 0 | 0 | 0 | 1,863 | 0.438559 |
f06ebdf27eb473116d5a5a69d7c99a59502c6586 | 409 | py | Python | hackerrank/python/introduction/function.py | wingkwong/competitive-programming | e8bf7aa32e87b3a020b63acac20e740728764649 | [
"MIT"
] | 18 | 2020-08-27T05:27:50.000Z | 2022-03-08T02:56:48.000Z | hackerrank/python/introduction/function.py | wingkwong/competitive-programming | e8bf7aa32e87b3a020b63acac20e740728764649 | [
"MIT"
] | null | null | null | hackerrank/python/introduction/function.py | wingkwong/competitive-programming | e8bf7aa32e87b3a020b63acac20e740728764649 | [
"MIT"
] | 1 | 2020-10-13T05:23:58.000Z | 2020-10-13T05:23:58.000Z | def is_leap(year):
leap = False
# Write your logic here
# The year can be evenly divided by 4, is a leap year, unless:
# The year can be evenly divided by 100, it is NOT a leap year, unless:
# The year is also evenly divisible by 400. Then it is a leap year.
leap = (year % 4 == 0 and (year ... | 34.083333 | 75 | 0.628362 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.545232 |
f06f16ee399ccb9faac16cda8b08d3cc4df552cb | 1,480 | py | Python | projectenv/main/forms.py | rzsaglam/project-env | f4c02b15cf924ba5d69d8a4a89efcc686b73aa9c | [
"MIT"
] | null | null | null | projectenv/main/forms.py | rzsaglam/project-env | f4c02b15cf924ba5d69d8a4a89efcc686b73aa9c | [
"MIT"
] | null | null | null | projectenv/main/forms.py | rzsaglam/project-env | f4c02b15cf924ba5d69d8a4a89efcc686b73aa9c | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth import models
from django.db.models.base import Model
from django.forms import ModelForm, fields
from .models import Paint
from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
c... | 27.924528 | 85 | 0.667568 | 1,151 | 0.777703 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.097973 |
f06f2cf97d8da48c7ae640dd4974c12d832537f5 | 3,398 | py | Python | njdate/hebdfind.py | schorrm/njdate | 5a31d944973904b75f1dbac811fc7393aaa4ed7c | [
"MIT"
] | 4 | 2019-07-16T19:58:42.000Z | 2021-11-17T14:50:17.000Z | njdate/hebdfind.py | schorrm/njdate | 5a31d944973904b75f1dbac811fc7393aaa4ed7c | [
"MIT"
] | null | null | null | njdate/hebdfind.py | schorrm/njdate | 5a31d944973904b75f1dbac811fc7393aaa4ed7c | [
"MIT"
] | null | null | null | # Takes two years, and runs an aggressive search for dates in between those two years (inclusive).
import njdate.gematria as gematria
import njdate.ej_generic as ej_generic
import string
specpunc = string.punctuation.replace('"','').replace("'","")
tr_table = str.maketrans("","",specpunc)
def date_aggressor (... | 57.59322 | 110 | 0.700706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 327 | 0.096176 |
f0706f06dae68a2eb12befe8740b73ce25344c53 | 10,323 | py | Python | tests/test_cli.py | redglue/brickops | 77fbe0da295f69b2b8bfebd0ec2c8b3bfdb1046b | [
"BSD-3-Clause"
] | null | null | null | tests/test_cli.py | redglue/brickops | 77fbe0da295f69b2b8bfebd0ec2c8b3bfdb1046b | [
"BSD-3-Clause"
] | 3 | 2019-07-23T16:38:14.000Z | 2021-06-02T03:55:23.000Z | tests/test_cli.py | aquicore/apparate | bc0d9a5db2ffb863ddde4ff61ac2ac0dbc8f1bad | [
"BSD-3-Clause"
] | null | null | null | import logging
from os.path import expanduser, join
from unittest import mock
import pytest
from click.testing import CliRunner
from configparser import ConfigParser
from apparate.configure import configure
from apparate.cli_commands import upload, upload_and_update
logging.basicConfig(level=logging.INFO)
logger = ... | 28.675 | 79 | 0.625303 | 0 | 0 | 0 | 0 | 4,932 | 0.477768 | 0 | 0 | 3,233 | 0.313184 |
f0726f920f21d92a489cfdea0b278639f7b0a413 | 4,632 | py | Python | pg_dicreate.py | zhuyeaini9/pytorch_test | 9654f7da144c71a65ec2665bc7128aaca5325302 | [
"Apache-2.0"
] | null | null | null | pg_dicreate.py | zhuyeaini9/pytorch_test | 9654f7da144c71a65ec2665bc7128aaca5325302 | [
"Apache-2.0"
] | null | null | null | pg_dicreate.py | zhuyeaini9/pytorch_test | 9654f7da144c71a65ec2665bc7128aaca5325302 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn.functional as F
import torch.nn as nn
import gym
from gym import spaces
import torch.optim as optim
from torch.distributions import Categorical
import random
import numpy as np
class Net(nn.Module):
def __init__(self, input_space, output_space):
super(Net, self).__init__()
... | 31.087248 | 98 | 0.617012 | 4,365 | 0.942358 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.018998 |
f072cdc953dde5ba78b66b40195edc1332c89bcf | 346 | py | Python | functions/dissectData/lambda_handler.py | zinedine-zeitnot/anomaly-detection | 2287f6488d47884d97ff618c24c379d869eb51f5 | [
"MIT"
] | 3 | 2021-04-30T12:51:01.000Z | 2021-06-04T12:51:32.000Z | functions/dissectData/lambda_handler.py | zinedine-zeitnot/anomaly-detection | 2287f6488d47884d97ff618c24c379d869eb51f5 | [
"MIT"
] | null | null | null | functions/dissectData/lambda_handler.py | zinedine-zeitnot/anomaly-detection | 2287f6488d47884d97ff618c24c379d869eb51f5 | [
"MIT"
] | null | null | null | from data_dissector import DataDissector
def handler(event, _):
switchpoint_trio = DataDissector.dissect_data(data=event['data'])
return {
"switchpoint": switchpoint_trio.switchpoint,
"preSwitchAverage": switchpoint_trio.pre_switch_average,
"postSwitchAverage": switchpoint_trio.po... | 28.833333 | 69 | 0.731214 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.16185 |
f0730fe6794bb60447a6e7f8e2d6de7cd6fc45d8 | 1,220 | py | Python | Chapter 3-Regression/2.py | FatiniNadhirah5/Datacamp-Machine-Learning-with-Apache-Spark-2019 | a0ef5f34c5a0aea222359a5085386f6a21611e7e | [
"FSFAP"
] | 8 | 2020-05-02T20:24:38.000Z | 2021-04-30T21:44:22.000Z | Chapter 3-Regression/2.py | FatiniNadhirah5/Machine-Learning-with-Apache-Spark | a0ef5f34c5a0aea222359a5085386f6a21611e7e | [
"FSFAP"
] | null | null | null | Chapter 3-Regression/2.py | FatiniNadhirah5/Machine-Learning-with-Apache-Spark | a0ef5f34c5a0aea222359a5085386f6a21611e7e | [
"FSFAP"
] | 9 | 2020-05-17T17:44:37.000Z | 2022-03-20T12:58:42.000Z | # Flight duration model: Just distance
# In this exercise you'll build a regression model to predict flight duration (the duration column).
# For the moment you'll keep the model simple, including only the distance of the flight (the km column) as a predictor.
# The data are in flights. The first few records are disp... | 48.8 | 195 | 0.80082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 897 | 0.735246 |
f07320187da09dd13226ebf15b281c23c4b206d4 | 486 | py | Python | gipsy/admin.py | marwahaha/gipsy-1 | 5d31c37cff26b9b26cd6d24e1b6de13c81ebbe6e | [
"MIT"
] | 10 | 2015-02-11T02:11:33.000Z | 2018-03-22T13:08:33.000Z | gipsy/admin.py | marwahaha/gipsy-1 | 5d31c37cff26b9b26cd6d24e1b6de13c81ebbe6e | [
"MIT"
] | 9 | 2015-01-22T15:45:44.000Z | 2015-10-19T14:18:09.000Z | gipsy/admin.py | marwahaha/gipsy-1 | 5d31c37cff26b9b26cd6d24e1b6de13c81ebbe6e | [
"MIT"
] | 7 | 2015-04-28T15:20:57.000Z | 2019-07-16T03:45:12.000Z | from django.contrib import admin
class ChildrenInline(admin.TabularInline):
sortable_field_name = "order"
class GipsyMenu(admin.ModelAdmin):
inlines = [ChildrenInline]
exclude = ('parent',)
list_display = ['name', 'order']
ordering = ['order']
def get_queryset(self, request):
"""Ove... | 27 | 69 | 0.693416 | 447 | 0.919753 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.197531 |
f073a799e8b36554db301e779cfd3eed55011853 | 4,727 | py | Python | QDeblend/process/host_profiles.py | brandherd/QDeblend3D | 4e195ca027cf9fb65962ce66bf5d1f3e119b4f18 | [
"MIT"
] | null | null | null | QDeblend/process/host_profiles.py | brandherd/QDeblend3D | 4e195ca027cf9fb65962ce66bf5d1f3e119b4f18 | [
"MIT"
] | null | null | null | QDeblend/process/host_profiles.py | brandherd/QDeblend3D | 4e195ca027cf9fb65962ce66bf5d1f3e119b4f18 | [
"MIT"
] | null | null | null | import numpy, math
from scipy import special
"""
The Sersic Profile
Formulae for Sersic profile taken from Graham & Driver (2005)
bibcode: 2005PASA...22..118G
"""
class Sersic:
def __init__(self, size, x_c, y_c, mag, n, r_e, e=0., theta=0., osfactor=10,
osradius=2):
self.size = size
... | 34.757353 | 80 | 0.557436 | 2,646 | 0.559763 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.042733 |
f07411bf6835efa66845aedc9d0915e9f4597ba2 | 1,138 | py | Python | UnitTests/FullAtomModel/CoordsTransform/test_forward.py | johahi/TorchProteinLibrary | b1fc9faa9b51c4550e5f754d075766ba38e0f8a0 | [
"MIT"
] | null | null | null | UnitTests/FullAtomModel/CoordsTransform/test_forward.py | johahi/TorchProteinLibrary | b1fc9faa9b51c4550e5f754d075766ba38e0f8a0 | [
"MIT"
] | null | null | null | UnitTests/FullAtomModel/CoordsTransform/test_forward.py | johahi/TorchProteinLibrary | b1fc9faa9b51c4550e5f754d075766ba38e0f8a0 | [
"MIT"
] | null | null | null | import sys
import os
import torch
import numpy as np
from TorchProteinLibrary.FullAtomModel.CoordsTransform import CoordsTranslate, getRandomTranslation, getBBox, CoordsRotate, getRandomRotation
from TorchProteinLibrary.FullAtomModel import Angles2Coords, Coords2TypedCoords
def test_translation(coords, num_atoms):
tr... | 25.863636 | 141 | 0.748682 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.028998 |
f076212c69c217204a0f335bc5923354550eed68 | 671 | py | Python | tutorials/W0D1_PythonWorkshop1/solutions/W0D1_Tutorial1_Solution_93456241.py | eduardojdiniz/CompNeuro | 20269e66540dc4e802273735c97323020ee37406 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 2,294 | 2020-05-11T12:05:35.000Z | 2022-03-28T21:23:34.000Z | tutorials/W0D1_PythonWorkshop1/solutions/W0D1_Tutorial1_Solution_93456241.py | pellet/course-content | bb383857992469e0e7a9c36639ac0d05e842d9bd | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 629 | 2020-05-11T15:42:26.000Z | 2022-03-29T12:23:35.000Z | tutorials/W0D1_PythonWorkshop1/solutions/W0D1_Tutorial1_Solution_93456241.py | pellet/course-content | bb383857992469e0e7a9c36639ac0d05e842d9bd | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 917 | 2020-05-11T12:47:53.000Z | 2022-03-31T12:14:41.000Z |
# Set random number generator
np.random.seed(2020)
# Initialize step_end, n, t_range, v and i
step_end = int(t_max / dt)
n = 50
t_range = np.linspace(0, t_max, num=step_end)
v_n = el * np.ones([n, step_end])
i = i_mean * (1 + 0.1 * (t_max / dt)**(0.5) * (2 * np.random.random([n, step_end]) - 1))
# Loop for step_end ... | 25.807692 | 90 | 0.600596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.271237 |
f076aaf49a3d8fba6fb5ba17c6020bb113d2de01 | 5,417 | py | Python | src/jsonengine/main.py | youhengzhou/json-crud-engine | 8ee614af6dddbe1236a78a7debf71048f476a3ff | [
"MIT"
] | 2 | 2021-07-02T04:33:36.000Z | 2022-01-09T23:40:30.000Z | src/jsonengine/main.py | youhengzhou/json-crud-engine | 8ee614af6dddbe1236a78a7debf71048f476a3ff | [
"MIT"
] | null | null | null | src/jsonengine/main.py | youhengzhou/json-crud-engine | 8ee614af6dddbe1236a78a7debf71048f476a3ff | [
"MIT"
] | null | null | null | # JSON engine 21 9 16
# database
# eng.json
# engine
# eng.py
import os
import json
path = os.getcwd() + '\\json_engine_database\\'
path_string = ''
def set_path(string):
global path
path = os.getcwd() + string
def dictionary_kv(dictionary, key, value):
dictionary[key] = value
return ... | 31.132184 | 75 | 0.568027 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 637 | 0.117593 |
f076d7596035ea99f16b2ee688410ac4e2c0be9a | 2,292 | py | Python | tests/coro.py | dshean/sliderule-python | 3cf9a6c65987705354cb536d71f85a32fbb24d15 | [
"BSD-3-Clause"
] | 1 | 2021-04-09T22:01:33.000Z | 2021-04-09T22:01:33.000Z | tests/coro.py | dshean/sliderule-python | 3cf9a6c65987705354cb536d71f85a32fbb24d15 | [
"BSD-3-Clause"
] | null | null | null | tests/coro.py | dshean/sliderule-python | 3cf9a6c65987705354cb536d71f85a32fbb24d15 | [
"BSD-3-Clause"
] | null | null | null | # python
import sys
import h5coro
###############################################################################
# DATA
###############################################################################
# set resource
resource = "file:///data/ATLAS/ATL06_20200714160647_02950802_003_01.h5"
# expected single read
h_li_e... | 38.2 | 149 | 0.505236 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,025 | 0.447208 |
f077b57af7bb1555b754ae7c06fad787a7e42f43 | 30,165 | py | Python | lib/interpreter.py | xraypy/_xraylarch_attic | a78a2d257bccb081ad15c43c831dee51d0b4845a | [
"BSD-3-Clause"
] | 1 | 2019-04-23T02:30:00.000Z | 2019-04-23T02:30:00.000Z | lib/interpreter.py | xraypy/_xraylarch_attic | a78a2d257bccb081ad15c43c831dee51d0b4845a | [
"BSD-3-Clause"
] | null | null | null | lib/interpreter.py | xraypy/_xraylarch_attic | a78a2d257bccb081ad15c43c831dee51d0b4845a | [
"BSD-3-Clause"
] | null | null | null | """
Main Larch interpreter
Safe(ish) evaluator of python expressions, using ast module.
The emphasis here is on mathematical expressions, and so
numpy functions are imported if available and used.
"""
from __future__ import division, print_function
import os
import sys
import ast
import math
import numpy
from . ... | 37.286774 | 87 | 0.521498 | 28,384 | 0.940958 | 0 | 0 | 0 | 0 | 0 | 0 | 6,652 | 0.22052 |
f077d6be5215d3bb3ca0fa34f9524a7653266e11 | 4,422 | py | Python | deepinsight/util/tetrode.py | ealmenzar/DeepInsight | 99aebb90b8183aa9f028c35e0381e73f8cd840f3 | [
"MIT"
] | null | null | null | deepinsight/util/tetrode.py | ealmenzar/DeepInsight | 99aebb90b8183aa9f028c35e0381e73f8cd840f3 | [
"MIT"
] | null | null | null | deepinsight/util/tetrode.py | ealmenzar/DeepInsight | 99aebb90b8183aa9f028c35e0381e73f8cd840f3 | [
"MIT"
] | null | null | null | """
DeepInsight Toolbox
© Markus Frey
https://github.com/CYHSM/DeepInsight
Licensed under MIT License
"""
import numpy as np
import pandas as pd
import h5py
from . import hdf5
from . import stats
def read_open_ephys(fp_raw_file):
"""
Reads ST open ephys files
Parameters
----------
fp_raw_file : ... | 35.95122 | 161 | 0.685889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,597 | 0.587158 |
f0791e37af8f0e6bb45c78c7fc37667ac15c9e8a | 627 | py | Python | test/scripts/functions.py | JetBrains-Research/jpt-nb-corpus | d93ac84ff885b30ef736cd82f5ce8b09c28ef3d1 | [
"MIT"
] | 3 | 2022-03-25T10:17:22.000Z | 2022-03-27T14:13:03.000Z | test/scripts/functions.py | JetBrains-Research/Matroskin | 053ed3d7e9dffb0aee4012bc49a194e0c60217c7 | [
"MIT"
] | null | null | null | test/scripts/functions.py | JetBrains-Research/Matroskin | 053ed3d7e9dffb0aee4012bc49a194e0c60217c7 | [
"MIT"
] | 1 | 2021-07-06T16:22:11.000Z | 2021-07-06T16:22:11.000Z | # Explicit API functions
from api_functions import api_function1, api_function2
from package3 import api_function3
# API Packages
import package1, package2
import package3
from package4 import api_class1
# Defined functions
def defined_function_1(d_f_arg1, d_f_arg2):
a = api_function1(d_f_arg1)
b = (api_fun... | 24.115385 | 60 | 0.77193 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.095694 |
f07a7df9283116337443c3a5f4f80b400ad900a1 | 4,848 | py | Python | tests/data/test_make_dataset.py | dnsosa/drug-lit-contradictory-claims | c03faa7269050344b631b12302214a3175384e98 | [
"MIT"
] | null | null | null | tests/data/test_make_dataset.py | dnsosa/drug-lit-contradictory-claims | c03faa7269050344b631b12302214a3175384e98 | [
"MIT"
] | null | null | null | tests/data/test_make_dataset.py | dnsosa/drug-lit-contradictory-claims | c03faa7269050344b631b12302214a3175384e98 | [
"MIT"
] | null | null | null | """Tests for making datasets for contradictory-claims."""
# -*- coding: utf-8 -*-
import os
import unittest
from contradictory_claims.data.make_dataset import load_drug_virus_lexicons, load_mancon_corpus_from_sent_pairs, \
load_med_nli, load_multi_nli
from .constants import drug_lex_path, mancon_sent_pairs, med... | 49.469388 | 114 | 0.697401 | 4,280 | 0.882838 | 0 | 0 | 2,811 | 0.579827 | 0 | 0 | 1,220 | 0.25165 |
f07b043e271471be2b35cb22503d63d12af2440e | 3,111 | py | Python | detection.py | aar0npham/FuryColorDetection | 5a8ae6a5f9dc8ccf42c78d4f29038e4e6889a858 | [
"Apache-2.0"
] | null | null | null | detection.py | aar0npham/FuryColorDetection | 5a8ae6a5f9dc8ccf42c78d4f29038e4e6889a858 | [
"Apache-2.0"
] | null | null | null | detection.py | aar0npham/FuryColorDetection | 5a8ae6a5f9dc8ccf42c78d4f29038e4e6889a858 | [
"Apache-2.0"
] | null | null | null | # import modules
import numpy as np
import argparse
import cv2
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-b", "--buffer", type=int, default=64,
help="max buffer size")
args = vars(ap.parse_args())
# define the lower and upper boundaries of ... | 40.402597 | 175 | 0.603664 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,237 | 0.397621 |
f07bcc1be66ad63b427b651f681533f05db82f52 | 430 | py | Python | topics/migrations/0003_topic_word.py | acdh-oeaw/mmp | 7ef8f33eafd3a7985328d374130f1cbe31f77df0 | [
"MIT"
] | 2 | 2021-06-02T11:27:54.000Z | 2021-08-25T10:29:04.000Z | topics/migrations/0003_topic_word.py | acdh-oeaw/mmp | 7ef8f33eafd3a7985328d374130f1cbe31f77df0 | [
"MIT"
] | 86 | 2021-01-29T12:31:34.000Z | 2022-03-28T11:41:04.000Z | topics/migrations/0003_topic_word.py | acdh-oeaw/mmp | 7ef8f33eafd3a7985328d374130f1cbe31f77df0 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-10-21 19:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('topics', '0002_alter_modelingprocess_modeling_type'),
]
operations = [
migrations.AddField(
model_name='topic',
name='... | 21.5 | 63 | 0.597674 | 339 | 0.788372 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.260465 |
f07d5c996cff48d3e4ce4edaac97743f3de1a7ce | 171 | py | Python | src/ihtt/__init__.py | dekoza/i-hate-time-tracking | adb6018b56c836317535f2e2346dfb8d9cce3aac | [
"Apache-2.0"
] | null | null | null | src/ihtt/__init__.py | dekoza/i-hate-time-tracking | adb6018b56c836317535f2e2346dfb8d9cce3aac | [
"Apache-2.0"
] | null | null | null | src/ihtt/__init__.py | dekoza/i-hate-time-tracking | adb6018b56c836317535f2e2346dfb8d9cce3aac | [
"Apache-2.0"
] | null | null | null | """
I Hate Time Tracking package.
Get time tracking out of your way.
"""
from typing import List
__all__: List[str] = [] # noqa: WPS410 (the only __variable__ we use)
| 17.1 | 70 | 0.695906 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 118 | 0.690058 |
f07e0ced31d9f3b5a75c59dd3ef793ba14212ab0 | 2,831 | py | Python | tests/base.py | octue/octue-sdk-python | 31c6e9358d3401ca708f5b3da702bfe3be3e52ce | [
"MIT"
] | 5 | 2020-10-01T12:43:10.000Z | 2022-03-14T17:26:25.000Z | tests/base.py | octue/octue-sdk-python | 31c6e9358d3401ca708f5b3da702bfe3be3e52ce | [
"MIT"
] | 322 | 2020-06-24T15:55:22.000Z | 2022-03-30T11:49:28.000Z | tests/base.py | octue/octue-sdk-python | 31c6e9358d3401ca708f5b3da702bfe3be3e52ce | [
"MIT"
] | null | null | null | import os
import subprocess
import unittest
import uuid
import warnings
from tempfile import TemporaryDirectory, gettempdir
from octue.cloud.emulators import GoogleCloudStorageEmulatorTestResultModifier
from octue.mixins import MixinBase, Pathable
from octue.resources import Datafile, Dataset, Manifest
from tests impo... | 42.253731 | 118 | 0.716001 | 2,485 | 0.877782 | 0 | 0 | 0 | 0 | 0 | 0 | 1,018 | 0.35959 |
f07eec804d533d3b03eb1442655922fd39f8fdb2 | 6,457 | py | Python | sstcam_sandbox/d190717_alpha/plot_wobble_animation_goldfish.py | watsonjj/CHECLabPySB | 91330d3a6f510a392f635bd7f4abd2f77871322c | [
"BSD-3-Clause"
] | null | null | null | sstcam_sandbox/d190717_alpha/plot_wobble_animation_goldfish.py | watsonjj/CHECLabPySB | 91330d3a6f510a392f635bd7f4abd2f77871322c | [
"BSD-3-Clause"
] | null | null | null | sstcam_sandbox/d190717_alpha/plot_wobble_animation_goldfish.py | watsonjj/CHECLabPySB | 91330d3a6f510a392f635bd7f4abd2f77871322c | [
"BSD-3-Clause"
] | 1 | 2021-03-30T09:46:56.000Z | 2021-03-30T09:46:56.000Z | from CHECLabPy.plotting.setup import Plotter
from CHECLabPy.plotting.camera import CameraImage
from CHECLabPy.utils.files import create_directory
from CHECLabPy.utils.mapping import get_ctapipe_camera_geometry
from sstcam_sandbox import get_plot, get_data
from os.path import join
from matplotlib import pyplot as plt
fr... | 34.715054 | 81 | 0.61654 | 3,482 | 0.53926 | 0 | 0 | 0 | 0 | 0 | 0 | 427 | 0.06613 |
f07f197c27b7ad864308c5332ee3a30042155d95 | 15,797 | py | Python | tempest/cmd/run.py | Juniper/tempest | f8316c9c28e029063c036e1cf83947af068e7703 | [
"Apache-2.0"
] | null | null | null | tempest/cmd/run.py | Juniper/tempest | f8316c9c28e029063c036e1cf83947af068e7703 | [
"Apache-2.0"
] | null | null | null | tempest/cmd/run.py | Juniper/tempest | f8316c9c28e029063c036e1cf83947af068e7703 | [
"Apache-2.0"
] | 5 | 2016-06-24T20:03:52.000Z | 2020-02-05T10:14:54.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distrib... | 43.043597 | 79 | 0.599734 | 11,102 | 0.702792 | 0 | 0 | 0 | 0 | 0 | 0 | 7,023 | 0.444578 |
f07f1c21b8f06d89cde1866e0e0a9e2404549ae4 | 10,586 | py | Python | src/python/vrprim/photosphere/conv.py | cmbruns/vr_samples | 8dee056766bccca1a602c6dd58fd0a641c5033a5 | [
"MIT"
] | 1 | 2017-01-29T21:15:23.000Z | 2017-01-29T21:15:23.000Z | src/python/vrprim/photosphere/conv.py | cmbruns/vr_samples | 8dee056766bccca1a602c6dd58fd0a641c5033a5 | [
"MIT"
] | 2 | 2017-01-29T20:34:39.000Z | 2017-01-29T23:26:05.000Z | src/python/vrprim/photosphere/conv.py | cmbruns/vr_samples | 8dee056766bccca1a602c6dd58fd0a641c5033a5 | [
"MIT"
] | null | null | null | """
Convert spherical panorama in equirectangular format into cubemap format
"""
from math import pi, log2
import numpy
from libtiff import TIFF
import png
import glfw
from OpenGL import GL
from OpenGL.GL import shaders
from OpenGL.GL.EXT.texture_filter_anisotropic import GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, GL_TEXTURE... | 38.919118 | 129 | 0.53344 | 8,733 | 0.824957 | 0 | 0 | 0 | 0 | 0 | 0 | 5,080 | 0.479879 |
f08133a0ab8681553c9936415f848d5882f36db1 | 1,150 | py | Python | src/controllers/storage.py | koddas/python-oop-consistency-lab | 8ee3124aa230359d296fdfbe0c23773602769c8c | [
"MIT"
] | null | null | null | src/controllers/storage.py | koddas/python-oop-consistency-lab | 8ee3124aa230359d296fdfbe0c23773602769c8c | [
"MIT"
] | null | null | null | src/controllers/storage.py | koddas/python-oop-consistency-lab | 8ee3124aa230359d296fdfbe0c23773602769c8c | [
"MIT"
] | null | null | null | from entities.serializable import Serializable
class Storage:
'''
Storage represents a file storage that stores and retrieves objects
'''
def __init__(self):
pass
def save(self, filename: str, data: Serializable) -> bool:
'''
Stores a serializable object. If the ob... | 28.75 | 78 | 0.578261 | 1,102 | 0.958261 | 0 | 0 | 0 | 0 | 0 | 0 | 425 | 0.369565 |
f081d74683e4da50d27ee2a254cfa3157f59305b | 924 | py | Python | tests/functional/modules/test_zos_tso_command.py | IBM/zos-core-collection-ftp | 017d2e031d64984571bd9bb330f49adaced387a6 | [
"Apache-2.0"
] | 4 | 2021-03-17T02:24:02.000Z | 2022-01-28T22:08:17.000Z | tests/functional/modules/test_zos_tso_command.py | IBM/zos-core-collection-ftp | 017d2e031d64984571bd9bb330f49adaced387a6 | [
"Apache-2.0"
] | null | null | null | tests/functional/modules/test_zos_tso_command.py | IBM/zos-core-collection-ftp | 017d2e031d64984571bd9bb330f49adaced387a6 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, print_function
__metaclass__ = type
import os
import sys
import warnings
import ansible.constants
import ansible.errors
import ansible.utils
import pytest
from pprint import pprint
# The positive path test
def test_zos_tso_command_listuser(ansible_adhoc):
hosts ... | 30.8 | 68 | 0.737013 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.183983 |
f0827a9bc1fab116569d8485fa3cf7975cc20e07 | 1,859 | py | Python | Medium/78.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | 6 | 2017-09-25T18:05:50.000Z | 2019-03-27T00:23:15.000Z | Medium/78.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | 1 | 2017-10-29T12:04:41.000Z | 2018-08-16T18:00:37.000Z | Medium/78.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | null | null | null | # ------------------------------
# 78. Subsets
#
# Description:
# Given a set of distinct integers, nums, return all possible subsets (the power set).
# Note: The solution set must not contain duplicate subsets.
#
# For example,
# If nums = [1,2,3], a solution is:
# [
# [3],
# [1],
# [2],
# [1,2,3],
# [1,3]... | 24.142857 | 96 | 0.483593 | 1,046 | 0.562668 | 0 | 0 | 0 | 0 | 0 | 0 | 866 | 0.465842 |
f0827ff350329e8456da34903e3aafb85e4c8ff7 | 10,707 | py | Python | blueprints/finance/views.py | shuxiang/MT-WMS | 38ef18baed6d9eddb88d43da2eeed55988410daf | [
"Apache-2.0"
] | 1 | 2022-03-11T05:42:25.000Z | 2022-03-11T05:42:25.000Z | blueprints/finance/views.py | shuxiang/MT-WMS | 38ef18baed6d9eddb88d43da2eeed55988410daf | [
"Apache-2.0"
] | null | null | null | blueprints/finance/views.py | shuxiang/MT-WMS | 38ef18baed6d9eddb88d43da2eeed55988410daf | [
"Apache-2.0"
] | null | null | null | #coding=utf8
import json
from sqlalchemy import func, or_
from pprint import pprint
from datetime import datetime, timedelta
from random import randint
from flask import Blueprint, g, request, jsonify
from flask_login import LoginManager, login_user, logout_user, login_required, current_user
from extensions.database ... | 39.21978 | 161 | 0.631082 | 0 | 0 | 0 | 0 | 9,513 | 0.873153 | 0 | 0 | 1,664 | 0.152731 |
f082e2a2d09bf1830b2b1fcb472bd7a239f75622 | 716 | py | Python | layers/modules/fast_mask_iou.py | sebastian-ruiz/yolact | 0fdce34ddd38d8895445444f04c5a9d4e0384a3e | [
"MIT"
] | 1 | 2021-11-08T14:06:49.000Z | 2021-11-08T14:06:49.000Z | layers/modules/fast_mask_iou.py | sebastian-ruiz/yolact | 0fdce34ddd38d8895445444f04c5a9d4e0384a3e | [
"MIT"
] | null | null | null | layers/modules/fast_mask_iou.py | sebastian-ruiz/yolact | 0fdce34ddd38d8895445444f04c5a9d4e0384a3e | [
"MIT"
] | null | null | null | import torch
from torch import nn
import torch.nn.functional as F
#locals
from data.config import Config
from utils.functions import make_net
from utils.script_module_wrapper import ScriptModuleWrapper, script_method_wrapper
class FastMaskIoUNet(ScriptModuleWrapper):
def __init__(self, config:Config):
su... | 28.64 | 108 | 0.706704 | 487 | 0.680168 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.009777 |
b2b1db3b982c41901d0ae5c563cb502c2d0bce3e | 3,366 | py | Python | audio_pouring/utils/network.py | lianghongzhuo/MultimodalPouring | 6495c7de9afad396f39bd7ac25e1a150e74479d2 | [
"MIT"
] | 5 | 2020-03-12T16:36:32.000Z | 2021-01-28T18:23:19.000Z | audio_pouring/utils/network.py | lianghongzhuo/MultimodalPouring | 6495c7de9afad396f39bd7ac25e1a150e74479d2 | [
"MIT"
] | null | null | null | audio_pouring/utils/network.py | lianghongzhuo/MultimodalPouring | 6495c7de9afad396f39bd7ac25e1a150e74479d2 | [
"MIT"
] | 1 | 2020-03-11T17:09:28.000Z | 2020-03-11T17:09:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author : Hongzhuo Liang
# E-mail : [email protected]
# Description:
# Date : 15/10/2019: 22:13
# File Name : network
import argparse
import numpy as np
import torch
def worker_init_fn(pid):
np.random.seed(torch.initial_seed() % (2 ** 3... | 49.5 | 120 | 0.659834 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,051 | 0.31224 |
b2b1ff5ef4ba336018262956f57a372c5c93879b | 4,312 | py | Python | FederatedSDNSecurity/main.py | Beaconproj/CrossCloudVNFSimulation | 97023e05b57e54503259ae866608de6189b8c9a9 | [
"MIT"
] | 1 | 2021-09-25T04:17:55.000Z | 2021-09-25T04:17:55.000Z | FederatedSDNSecurity/main.py | Beaconproj/CrossCloudVNFSimulation | 97023e05b57e54503259ae866608de6189b8c9a9 | [
"MIT"
] | null | null | null | FederatedSDNSecurity/main.py | Beaconproj/CrossCloudVNFSimulation | 97023e05b57e54503259ae866608de6189b8c9a9 | [
"MIT"
] | null | null | null |
'''
Created on 12 janv. 2016
@author: phm
'''
import FederatedSDN
import FederatedSDNSecurity
import FederatedSecurityAgent
import VNFManager
import CloudManager
import ssl, socket
inputMessage="Press enter to continue"
federationCloudManagers=[]
cloudFederationMembers=[
["cloud_man_1","vnf_manager_1"... | 30.8 | 120 | 0.73539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,421 | 0.561456 |
b2b2407d4c36f7d2b4d5556ee9ab15297445f03f | 5,121 | py | Python | WCET_stats.py | FTOD/ZExp | f7e2e1ab3ce1964022cb1c5d8c9d0b1ce1ee7b56 | [
"MIT"
] | null | null | null | WCET_stats.py | FTOD/ZExp | f7e2e1ab3ce1964022cb1c5d8c9d0b1ce1ee7b56 | [
"MIT"
] | null | null | null | WCET_stats.py | FTOD/ZExp | f7e2e1ab3ce1964022cb1c5d8c9d0b1ce1ee7b56 | [
"MIT"
] | null | null | null | import parsetools
from benchDesc import benchsDesc
import matplotlib.pyplot as plt
import matplotlib
import getopt, sys
try:
opts, args = getopt.getopt(sys.argv[1:], "h", ["arch="])
except getopt.GetoptError as err:
print(err)
sys.exit(2)
file_postfix = ""
for o,a in opts:
if o == "--arch":
if... | 31.036364 | 104 | 0.670767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,643 | 0.320836 |
b2b2c142b45b87b8147bfd47d58eb146d6e75472 | 610 | py | Python | schoolport/app_core/migrations/0024_auto_20210513_1020.py | yotink522/schoolport | c6cfd0230ca05fb44f77c2f27c7e200828547bd5 | [
"MIT"
] | null | null | null | schoolport/app_core/migrations/0024_auto_20210513_1020.py | yotink522/schoolport | c6cfd0230ca05fb44f77c2f27c7e200828547bd5 | [
"MIT"
] | null | null | null | schoolport/app_core/migrations/0024_auto_20210513_1020.py | yotink522/schoolport | c6cfd0230ca05fb44f77c2f27c7e200828547bd5 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-05-13 02:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_core', '0023_auto_20210513_1004'),
]
operations = [
migrations.AlterField(
model_name='tb_course',
name='pricing... | 25.416667 | 75 | 0.603279 | 517 | 0.847541 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.221311 |
b2b4b4908763c3a4a83c42ca39a61f42cc6d7104 | 800 | py | Python | galaxy_kickstart/binary_datatypes_to_be_added_in_galaxy.py | pajanne/galaxy-kickstart | a2e8a9d5f4e610f00548deab691d71290aa3a3b7 | [
"MIT"
] | 2 | 2016-08-04T19:16:17.000Z | 2016-08-04T19:45:58.000Z | galaxy_kickstart/binary_datatypes_to_be_added_in_galaxy.py | pajanne/galaxy-kickstart | a2e8a9d5f4e610f00548deab691d71290aa3a3b7 | [
"MIT"
] | null | null | null | galaxy_kickstart/binary_datatypes_to_be_added_in_galaxy.py | pajanne/galaxy-kickstart | a2e8a9d5f4e610f00548deab691d71290aa3a3b7 | [
"MIT"
] | null | null | null | class CompressedFastq( CompressedArchive ):
"""
Class describing an compressed fastq file
This class can be sublass'ed to implement archive filetypes that will not be unpacked by upload.py.
"""
file_ext = "fq.gz"
def set_peek( self, dataset, is_multi_byte=False ):
if not dataset... | 33.333333 | 107 | 0.62625 | 749 | 0.93625 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.3475 |
b2b541552dee04f9e9bcd11e4c109a74ce0c81b7 | 1,697 | py | Python | timesketch/lib/cypher/insertable_string.py | Marwolf/timesketch | 8fbbb3d0a5a50dc0214fc56a9bbec82050908103 | [
"Apache-2.0"
] | null | null | null | timesketch/lib/cypher/insertable_string.py | Marwolf/timesketch | 8fbbb3d0a5a50dc0214fc56a9bbec82050908103 | [
"Apache-2.0"
] | null | null | null | timesketch/lib/cypher/insertable_string.py | Marwolf/timesketch | 8fbbb3d0a5a50dc0214fc56a9bbec82050908103 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 39.465116 | 80 | 0.696523 | 1,046 | 0.616382 | 0 | 0 | 0 | 0 | 0 | 0 | 1,101 | 0.648792 |
b2b6aed7dde137dbec9d46784b9eb3493640ecc8 | 1,322 | py | Python | networks/rnn.py | uchikun2493/nn_modules | ad3486b842fc543561d39227de5daaa475d3513a | [
"MIT"
] | null | null | null | networks/rnn.py | uchikun2493/nn_modules | ad3486b842fc543561d39227de5daaa475d3513a | [
"MIT"
] | null | null | null | networks/rnn.py | uchikun2493/nn_modules | ad3486b842fc543561d39227de5daaa475d3513a | [
"MIT"
] | null | null | null | # pytorch
import torch
import torch.nn as nn
import torch.nn.functional as F
# **********************************************
# rnn class
# **********************************************
class BasicRNNCell(nn.Module):
def __init__(self, inputs, hidden, outputs):
super(BasicRNNCell, self).__init__()
... | 24.481481 | 61 | 0.533283 | 1,164 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.164212 |
b2b6b4e0d84391cba2fed8691df94512a2cc5b7a | 1,141 | py | Python | config/settings/production.py | rimphyd/Django-OPAC | d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb | [
"MIT"
] | 1 | 2020-11-26T05:25:46.000Z | 2020-11-26T05:25:46.000Z | config/settings/production.py | rimphyd/Django-OPAC | d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb | [
"MIT"
] | null | null | null | config/settings/production.py | rimphyd/Django-OPAC | d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb | [
"MIT"
] | null | null | null | import django_heroku
from config.settings.base import *
DEBUG = False
SECRET_KEY = os.environ['SECRET_KEY']
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(asc... | 20.017544 | 72 | 0.576687 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 371 | 0.325153 |
b2b7e4ac8602126a7252025c382dc07c1f558b19 | 1,181 | py | Python | fabrikApi/views/assembly/list.py | demokratiefabrik/fabrikApi | a56bb57d59a5e7cbbeeb77889c02d82f2a04c682 | [
"MIT"
] | null | null | null | fabrikApi/views/assembly/list.py | demokratiefabrik/fabrikApi | a56bb57d59a5e7cbbeeb77889c02d82f2a04c682 | [
"MIT"
] | null | null | null | fabrikApi/views/assembly/list.py | demokratiefabrik/fabrikApi | a56bb57d59a5e7cbbeeb77889c02d82f2a04c682 | [
"MIT"
] | null | null | null | """ Assemblies List View. """
import logging
from datetime import datetime
from cornice.service import Service
from fabrikApi.models.assembly import DBAssembly
from fabrikApi.models.mixins import arrow
# from fabrikApi.util.cors import CORS_LOCATION, CORS_MAX_AGE
logger = logging.getLogger(__name__)
# SERVICES
as... | 25.673913 | 88 | 0.702794 | 0 | 0 | 0 | 0 | 734 | 0.621507 | 0 | 0 | 407 | 0.344623 |
b2b8a861bf96a35529dc0c381016dc12ddf8518f | 7,217 | py | Python | layers/layers.py | yangzonglin1994/yangzl-deep-text-matching | 2beadd1c2ebf2b169558b9978e0cbc66d1d25fc6 | [
"MIT"
] | 2 | 2018-08-10T20:02:44.000Z | 2018-08-10T20:02:50.000Z | layers/layers.py | yangzonglin1994/yangzl-text-matching | 2beadd1c2ebf2b169558b9978e0cbc66d1d25fc6 | [
"MIT"
] | 1 | 2018-07-30T08:54:35.000Z | 2018-07-30T08:54:35.000Z | layers/layers.py | yangzonglin1994/yangzl-text-matching | 2beadd1c2ebf2b169558b9978e0cbc66d1d25fc6 | [
"MIT"
] | null | null | null | import tensorflow as tf
from keras import backend as K
from keras.engine.topology import Layer
from keras.initializers import Ones, Zeros
from layers import transformer
class LayerNormalization(Layer):
def __init__(self, eps=1e-6, **kwargs):
super(LayerNormalization, self).__init__(**kwargs)
self... | 35.033981 | 100 | 0.620479 | 7,290 | 0.973688 | 0 | 0 | 0 | 0 | 0 | 0 | 1,248 | 0.166689 |
b2b9128938a7476610fbf31df937ff94978048ae | 1,514 | py | Python | tests/TestMetrics.py | gr33ndata/irlib | 4a518fec994b1a89cdc7d09a8170efec3d7e6615 | [
"MIT"
] | 80 | 2015-02-16T18:33:57.000Z | 2021-05-06T02:03:22.000Z | tests/TestMetrics.py | gr33ndata/irlib | 4a518fec994b1a89cdc7d09a8170efec3d7e6615 | [
"MIT"
] | 2 | 2016-02-05T06:30:21.000Z | 2017-09-24T17:42:58.000Z | tests/TestMetrics.py | gr33ndata/irlib | 4a518fec994b1a89cdc7d09a8170efec3d7e6615 | [
"MIT"
] | 25 | 2015-05-13T17:35:41.000Z | 2020-06-04T01:52:11.000Z | from unittest import TestCase
from irlib.metrics import Metrics
class TestMetrics(TestCase):
def setUp(self):
self.m = Metrics()
def test_jaccard_same_len(self):
with self.assertRaises(ValueError):
self.m.jaccard_vectors(
[0, 1],
[0, 1, 2, 3]
... | 24.819672 | 47 | 0.515192 | 1,445 | 0.954425 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b2bb1c7a2af64e0803771a48f87683d4a4a1c0d2 | 50,483 | py | Python | cottonformation/res/lookoutmetrics.py | gitter-badger/cottonformation-project | 354f1dce7ea106e209af2d5d818b6033a27c193c | [
"BSD-2-Clause"
] | null | null | null | cottonformation/res/lookoutmetrics.py | gitter-badger/cottonformation-project | 354f1dce7ea106e209af2d5d818b6033a27c193c | [
"BSD-2-Clause"
] | null | null | null | cottonformation/res/lookoutmetrics.py | gitter-badger/cottonformation-project | 354f1dce7ea106e209af2d5d818b6033a27c193c | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This module
"""
import attr
import typing
from ..core.model import (
Property, Resource, Tag, GetAtt, TypeHint, TypeCheck,
)
from ..core.constant import AttrMeta
#--- Property declaration ---
@attr.s
class AnomalyDetectorCsvFormatDescriptor(Property):
"""
AWS Object Type = "... | 72.952312 | 244 | 0.792247 | 50,063 | 0.99168 | 0 | 0 | 50,183 | 0.994057 | 0 | 0 | 33,008 | 0.653844 |
b2bb4d62eb2627e400fa61b892f36a5ac1c442b5 | 654 | py | Python | mlcomp/db/core/options.py | sUeharaE4/mlcomp | 1e0c23f84622ea4f72eb4e2354cef5ee16b767f4 | [
"Apache-2.0"
] | 166 | 2019-08-21T20:00:04.000Z | 2020-05-14T16:13:57.000Z | mlcomp/db/core/options.py | sUeharaE4/mlcomp | 1e0c23f84622ea4f72eb4e2354cef5ee16b767f4 | [
"Apache-2.0"
] | 14 | 2019-08-22T07:58:39.000Z | 2020-04-13T13:59:07.000Z | mlcomp/db/core/options.py | sUeharaE4/mlcomp | 1e0c23f84622ea4f72eb4e2354cef5ee16b767f4 | [
"Apache-2.0"
] | 22 | 2019-08-23T12:37:20.000Z | 2020-04-20T10:06:29.000Z | class PaginatorOptions:
def __init__(
self,
page_number: int,
page_size: int,
sort_column: str = None,
sort_descending: bool = None
):
self.sort_column = sort_column
self.sort_descending = sort_descending
self.page_number = page_number
self... | 27.25 | 61 | 0.610092 | 620 | 0.948012 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.094801 |
b2bd1fc6f7777c13168c679b65bd978ef82ec6d2 | 164 | py | Python | pbxproj/pbxsections/PBXResourcesBuildPhase.py | JoliChen/mod-pbxproj | 24994416eec9cec838dce696c3cc9262c01ba883 | [
"MIT"
] | 1 | 2020-01-16T08:33:38.000Z | 2020-01-16T08:33:38.000Z | pbxproj/pbxsections/PBXResourcesBuildPhase.py | JoliChen/mod-pbxproj | 24994416eec9cec838dce696c3cc9262c01ba883 | [
"MIT"
] | null | null | null | pbxproj/pbxsections/PBXResourcesBuildPhase.py | JoliChen/mod-pbxproj | 24994416eec9cec838dce696c3cc9262c01ba883 | [
"MIT"
] | null | null | null | from pbxproj.pbxsections.PBXGenericBuildPhase import *
class PBXResourcesBuildPhase(PBXGenericBuildPhase):
def _get_comment(self):
return 'Resources'
| 23.428571 | 54 | 0.786585 | 106 | 0.646341 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.067073 |
b2bd5b9242c3d57e4f9ef3633085d5a608db500a | 1,014 | py | Python | Week-4/points_and_segments.py | AbhiSaphire/Algorithmic-Toolbox | abc2b9f25b3c473b93b7d8905e7da0b38cd24062 | [
"MIT"
] | 3 | 2020-06-04T09:37:57.000Z | 2020-06-15T22:55:55.000Z | Week-4/points_and_segments.py | AbhiSaphire/Algorithmic-Toolbox | abc2b9f25b3c473b93b7d8905e7da0b38cd24062 | [
"MIT"
] | 1 | 2020-06-23T13:04:43.000Z | 2020-06-23T13:06:25.000Z | Week-4/points_and_segments.py | AbhiSaphire/Algorithmic-Toolbox | abc2b9f25b3c473b93b7d8905e7da0b38cd24062 | [
"MIT"
] | 1 | 2020-10-08T13:06:05.000Z | 2020-10-08T13:06:05.000Z | import sys
from itertools import chain
def fast_count_segments(starts, ends, points):
cnt = [0] * len(points)
start_points = zip(starts, ['l'] * len(starts), range(len(starts)))
end_points = zip(ends, ['r'] * len(ends), range(len(ends)))
point_points = zip(points, ['p'] * len(points), range(len(points)... | 31.6875 | 71 | 0.580868 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.027613 |
b2bda88384a662721955747a1c788333f427aa38 | 6,822 | py | Python | main.py | anurendra/Web_IE | 4ba95320fd46d3c6fc090f3f095c7c7de78453bb | [
"Apache-2.0"
] | null | null | null | main.py | anurendra/Web_IE | 4ba95320fd46d3c6fc090f3f095c7c7de78453bb | [
"Apache-2.0"
] | null | null | null | main.py | anurendra/Web_IE | 4ba95320fd46d3c6fc090f3f095c7c7de78453bb | [
"Apache-2.0"
] | null | null | null | import argparse
import numpy as np
import os
import random
import torch
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import DataLoader
from datasets import custom_collate_fn, load_data, WebDataset
from models import WebObjExtractionNet
from train import train_model, evaluate_model
from utils... | 48.728571 | 156 | 0.726327 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,987 | 0.291264 |
b2be278f644c23228acf1f8fcc520ef3e2a07fe5 | 2,846 | py | Python | rclpy/actions/minimal_action_client/examples_rclpy_minimal_action_client/client_cancel.py | emersonknapp/examples | 36522787da5de2a2ff322d8953e3ae4b8e8ee9e7 | [
"Apache-2.0"
] | 1 | 2020-03-17T18:19:55.000Z | 2020-03-17T18:19:55.000Z | rclpy/actions/minimal_action_client/examples_rclpy_minimal_action_client/client_cancel.py | emersonknapp/examples | 36522787da5de2a2ff322d8953e3ae4b8e8ee9e7 | [
"Apache-2.0"
] | null | null | null | rclpy/actions/minimal_action_client/examples_rclpy_minimal_action_client/client_cancel.py | emersonknapp/examples | 36522787da5de2a2ff322d8953e3ae4b8e8ee9e7 | [
"Apache-2.0"
] | 1 | 2020-07-11T08:59:03.000Z | 2020-07-11T08:59:03.000Z | # Copyright 2019 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 29.957895 | 91 | 0.697119 | 1,755 | 0.616655 | 0 | 0 | 0 | 0 | 0 | 0 | 873 | 0.306746 |
b2bf04c3b73ed2e5d7a5d3616651ad7a3f22eac7 | 1,170 | py | Python | buffers/introspective_buffer.py | GittiHab/mbrl-thesis-code | 10ecd6ef7cbb2df4bd03ce9928e344eab4238a2e | [
"MIT"
] | null | null | null | buffers/introspective_buffer.py | GittiHab/mbrl-thesis-code | 10ecd6ef7cbb2df4bd03ce9928e344eab4238a2e | [
"MIT"
] | null | null | null | buffers/introspective_buffer.py | GittiHab/mbrl-thesis-code | 10ecd6ef7cbb2df4bd03ce9928e344eab4238a2e | [
"MIT"
] | null | null | null | import numpy as np
from typing import Union, Optional, List, Dict, Any
from buffers.chunk_buffer import ChunkReplayBuffer
class IntrospectiveChunkReplayBuffer(ChunkReplayBuffer):
def __init__(self, buffer_size: int, *args, **kwargs):
super().__init__(buffer_size, *args, **kwargs)
self.sam... | 35.454545 | 70 | 0.638462 | 1,045 | 0.893162 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b2bff192f3852a8121825cff9ab0d2dc48bcad15 | 999 | py | Python | esp8266/boot.py | AlexGolovko/UltrasonicDeeper | 598020854a1bff433bce1582bf05625a6cb646c8 | [
"MIT"
] | 3 | 2020-04-21T10:51:38.000Z | 2022-03-10T18:23:56.000Z | esp8266/boot.py | AlexGolovko/UltrasonicDeeper | 598020854a1bff433bce1582bf05625a6cb646c8 | [
"MIT"
] | 5 | 2020-09-05T22:53:54.000Z | 2021-05-05T14:31:35.000Z | esp8266/boot.py | AlexGolovko/UltrasonicDeeper | 598020854a1bff433bce1582bf05625a6cb646c8 | [
"MIT"
] | 2 | 2021-01-24T19:18:42.000Z | 2021-02-26T09:41:54.000Z | # This file is executed on every boot (including wake-boot from deepsleep)
import esp
import gc
import machine
import network
esp.osdebug(None)
# machine.freq(160000000)
def do_connect(wifi_name, wifi_pass):
ssid = 'microsonar'
password = 'microsonar'
ap_if = network.WLAN(network.AP_IF)
ap_if.activ... | 23.785714 | 74 | 0.672673 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 270 | 0.27027 |
b2c0e6ac73650986189a517a410915048cd910a4 | 3,326 | py | Python | bin/check_ysim.py | ACTCollaboration/tilec | 11ed8d027ad6ffac09b3e291a047f33e97673f14 | [
"BSD-3-Clause"
] | 1 | 2021-01-04T14:51:44.000Z | 2021-01-04T14:51:44.000Z | bin/check_ysim.py | ACTCollaboration/tilec | 11ed8d027ad6ffac09b3e291a047f33e97673f14 | [
"BSD-3-Clause"
] | 4 | 2019-09-03T22:19:16.000Z | 2020-07-13T12:38:08.000Z | bin/check_ysim.py | ACTCollaboration/tilec | 11ed8d027ad6ffac09b3e291a047f33e97673f14 | [
"BSD-3-Clause"
] | 1 | 2020-08-10T14:51:11.000Z | 2020-08-10T14:51:11.000Z | from __future__ import print_function
from orphics import maps,io,cosmology,stats
from pixell import enmap
import numpy as np
import os,sys
from tilec import utils as tutils
region = 'deep56'
#region = 'boss'
solution = 'comptony'
tdir = "/scratch/r/rbond/msyriac/data/depot/tilec/v1.2.0_20200324"
dcomb = 'joint'
dfil... | 35.382979 | 123 | 0.746242 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 783 | 0.235418 |
b2c0fe0d284c1df72e6a811ac09a5b401ed7fb9b | 509 | py | Python | tests/schema_mapping/expected/generated_example3.py | loyada/typed-py | 8f946ed0cddb38bf7fd463a4c8111a592ccae31a | [
"MIT"
] | 14 | 2018-02-14T13:28:47.000Z | 2022-02-12T08:03:21.000Z | tests/schema_mapping/expected/generated_example3.py | loyada/typed-py | 8f946ed0cddb38bf7fd463a4c8111a592ccae31a | [
"MIT"
] | 142 | 2017-11-22T14:02:33.000Z | 2022-03-23T21:26:29.000Z | tests/schema_mapping/expected/generated_example3.py | loyada/typed-py | 8f946ed0cddb38bf7fd463a4c8111a592ccae31a | [
"MIT"
] | 4 | 2017-12-14T16:46:45.000Z | 2021-12-15T16:33:31.000Z | from typedpy import *
class Person(Structure):
first_name = String()
last_name = String()
age = Integer(minimum=1)
_required = ['first_name', 'last_name']
class Groups(Structure):
groups = Array(items=Person)
_required = ['groups']
# ********************
class Example1(Structure):
p... | 17.551724 | 47 | 0.581532 | 454 | 0.891945 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.149312 |
b2c10ffac29f7bdf64553c51d96d725e726e49a1 | 3,114 | py | Python | rpesk/morse_code.py | LukeJVinton/pi-projects | 9dfa110bb027b0fb281e3dca831f1547bc15faa5 | [
"MIT"
] | null | null | null | rpesk/morse_code.py | LukeJVinton/pi-projects | 9dfa110bb027b0fb281e3dca831f1547bc15faa5 | [
"MIT"
] | null | null | null | rpesk/morse_code.py | LukeJVinton/pi-projects | 9dfa110bb027b0fb281e3dca831f1547bc15faa5 | [
"MIT"
] | null | null | null |
# 02_blink_twice.py
# From the code for the Electronics Starter Kit for the Raspberry Pi by MonkMakes.com
import RPi.GPIO as GPIO
import time
def word_separation(pin):
sleep_time = 7
GPIO.output(pin, False) # True means that LED turns on
time.sleep(sleep_time)
def pulse(pin, length = "dot"):
... | 33.483871 | 85 | 0.495825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,373 | 0.440912 |
b2c14d3bb32a9d0a97a9d773d034e8784a7e69a4 | 5,641 | py | Python | lljs.py | Peter9192/wind_analytics | 604136be1c2ef1155bdb7579c7d123525dbe10d8 | [
"Apache-2.0"
] | null | null | null | lljs.py | Peter9192/wind_analytics | 604136be1c2ef1155bdb7579c7d123525dbe10d8 | [
"Apache-2.0"
] | null | null | null | lljs.py | Peter9192/wind_analytics | 604136be1c2ef1155bdb7579c7d123525dbe10d8 | [
"Apache-2.0"
] | null | null | null | """ Identify low-level jets in wind profile data.
Peter Kalverla
December 2020
"""
import numpy as np
import xarray as xr
def detect_llj(x, axis=None, falloff=0, output='strength', inverse=False):
""" Identify maxima in wind profiles.
args:
- x : ndarray with wind profile data
-... | 34.820988 | 80 | 0.591916 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,740 | 0.485729 |
b2c4382563bdc135f87a0336d22aa149de5f9c44 | 9,203 | py | Python | rollon_erpnext/hooks_property_setter.py | santoshbb/rhplrepo | 8ce4792ea47b66ab2b7aed9da468104a2d37ae2b | [
"MIT"
] | null | null | null | rollon_erpnext/hooks_property_setter.py | santoshbb/rhplrepo | 8ce4792ea47b66ab2b7aed9da468104a2d37ae2b | [
"MIT"
] | null | null | null | rollon_erpnext/hooks_property_setter.py | santoshbb/rhplrepo | 8ce4792ea47b66ab2b7aed9da468104a2d37ae2b | [
"MIT"
] | null | null | null | property_setter = {
"dt": "Property Setter",
"filters": [
["name", "in", [
'Purchase Order-read_only_onload',
'Purchase Order-default_print_format',
'Purchase Invoice-naming_series-options',
'Purchase Invoice-naming_series-default',
'Delivery Note-naming_series-options',
'Delivery Note-naming_seri... | 40.013043 | 61 | 0.757688 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,042 | 0.873845 |
b2c5e558b71549ec4885e41eca936b455678ffaf | 1,555 | py | Python | api/client/src/pcluster_client/sigv4_auth.py | maclema/aws-parallelcluster | ade6e5e76201ee43c6e222fcd1c2891aba938838 | [
"Apache-2.0"
] | 415 | 2018-11-13T15:02:15.000Z | 2022-03-31T15:26:06.000Z | api/client/src/pcluster_client/sigv4_auth.py | maclema/aws-parallelcluster | ade6e5e76201ee43c6e222fcd1c2891aba938838 | [
"Apache-2.0"
] | 2,522 | 2018-11-13T16:16:27.000Z | 2022-03-31T13:57:10.000Z | api/client/src/pcluster_client/sigv4_auth.py | yuleiwan/aws-parallelcluster | aad2a3019ef4ad08d702f5acf41b152b3f7a0b46 | [
"Apache-2.0"
] | 164 | 2018-11-14T22:47:46.000Z | 2022-03-22T11:33:22.000Z | """Sigv4 Signing Support"""
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy
# of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or i... | 39.871795 | 85 | 0.659807 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 730 | 0.469453 |
b2c664ce7bd387984bca2a25d6741d8d39b481e1 | 2,624 | py | Python | django/contrib/sessions/tests.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | 1 | 2016-05-08T12:24:22.000Z | 2016-05-08T12:24:22.000Z | django/contrib/sessions/tests.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | null | null | null | django/contrib/sessions/tests.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | 1 | 2015-11-19T14:45:16.000Z | 2015-11-19T14:45:16.000Z | r"""
>>> from django.conf import settings
>>> from django.contrib.sessions.backends.db import SessionStore as DatabaseSession
>>> from django.contrib.sessions.backends.cache import SessionStore as CacheSession
>>> from django.contrib.sessions.backends.file import SessionStore as FileSession
>>> from django.contrib.ses... | 27.333333 | 222 | 0.722942 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,564 | 0.977134 |
b2c83a9626d327c18df6c74ffc572fe2774106fd | 1,504 | py | Python | gopage/web_helper.py | wavegu/gopage | ff83cea34a82570627c74c5bad45ebc02ecaaff6 | [
"MIT"
] | 1 | 2017-02-03T10:24:00.000Z | 2017-02-03T10:24:00.000Z | gopage/web_helper.py | wavegu/gopage | ff83cea34a82570627c74c5bad45ebc02ecaaff6 | [
"MIT"
] | null | null | null | gopage/web_helper.py | wavegu/gopage | ff83cea34a82570627c74c5bad45ebc02ecaaff6 | [
"MIT"
] | null | null | null | # encoding: utf-8
import urllib2
from proxy_helper import ProxyHelper
proxyHelper = ProxyHelper()
class WebHelper:
def __init__(self):
pass
@classmethod
def get_page_content_from_url(cls, page_url):
"""
get html content from web page with given url
:param page_url: url ... | 36.682927 | 122 | 0.621011 | 1,168 | 0.776596 | 0 | 0 | 1,108 | 0.736702 | 0 | 0 | 541 | 0.359707 |
b2cabd96c3fc001d2729753488a402fc76f755f0 | 8,187 | py | Python | tests/test_skipping.py | pytask-dev/pytask | b6769b48abda44c6261b9a7b58865f8844423c13 | [
"MIT"
] | 41 | 2020-07-24T15:19:19.000Z | 2022-03-17T17:40:57.000Z | tests/test_skipping.py | pytask-dev/pytask | b6769b48abda44c6261b9a7b58865f8844423c13 | [
"MIT"
] | 240 | 2020-06-26T21:37:49.000Z | 2022-03-31T08:56:56.000Z | tests/test_skipping.py | pytask-dev/pytask | b6769b48abda44c6261b9a7b58865f8844423c13 | [
"MIT"
] | null | null | null | import textwrap
from contextlib import ExitStack as does_not_raise # noqa: N813
import pytest
from _pytask.mark import Mark
from _pytask.outcomes import Skipped
from _pytask.outcomes import SkippedAncestorFailed
from _pytask.outcomes import SkippedUnchanged
from _pytask.skipping import pytask_execute_task_setup
from ... | 30.662921 | 88 | 0.696836 | 50 | 0.006107 | 0 | 0 | 7,766 | 0.948577 | 0 | 0 | 2,665 | 0.325516 |
b2cacdeef0561546d139a9bec5f6cfde666b19a3 | 156 | py | Python | basic/server.py | spinico/django-projects-boilerplates | 22d47f60d282d0edb9c0f1b84bb3e9e84949bd25 | [
"MIT"
] | null | null | null | basic/server.py | spinico/django-projects-boilerplates | 22d47f60d282d0edb9c0f1b84bb3e9e84949bd25 | [
"MIT"
] | null | null | null | basic/server.py | spinico/django-projects-boilerplates | 22d47f60d282d0edb9c0f1b84bb3e9e84949bd25 | [
"MIT"
] | null | null | null | from waitress import serve
from conf.wsgi import application
if __name__ == '__main__':
serve(application, listen='0.0.0.0:8000', url_scheme='https')
| 22.285714 | 65 | 0.737179 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.198718 |
b2cacff06725bd2d9718bd414438fed14a74ef43 | 589 | py | Python | src/django_version_checks/apps.py | adamchainz/django-version-checks | 94f6d696f5279a7bb579c7d2a177a231d6b61e45 | [
"MIT"
] | 33 | 2020-12-13T23:02:39.000Z | 2022-03-28T06:19:09.000Z | src/django_version_checks/apps.py | adamchainz/django-version-checks | 94f6d696f5279a7bb579c7d2a177a231d6b61e45 | [
"MIT"
] | 47 | 2020-12-14T01:33:56.000Z | 2021-11-06T09:17:38.000Z | src/django_version_checks/apps.py | adamchainz/django-version-checks | 94f6d696f5279a7bb579c7d2a177a231d6b61e45 | [
"MIT"
] | 2 | 2021-11-13T22:56:21.000Z | 2022-02-15T14:24:53.000Z | from django.apps import AppConfig
from django.core.checks import Tags, register
from django_version_checks import checks
class DjangoVersionChecksAppConfig(AppConfig):
name = "django_version_checks"
verbose_name = "django-version-checks"
def ready(self) -> None:
register(Tags.compatibility)(chec... | 34.647059 | 65 | 0.7691 | 464 | 0.787776 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.078098 |
b2ccd20ece8fce408fc21dd559ba9fc865804c11 | 3,471 | py | Python | app/ocr.py | noahnisbet/human-rights-first-asylum-ds-noahnisbet | c329045e5967253d8b5ac729e315ed03325744b2 | [
"MIT"
] | 1 | 2021-02-25T21:26:08.000Z | 2021-02-25T21:26:08.000Z | app/ocr.py | noahnisbet/human-rights-first-asylum-ds-noahnisbet | c329045e5967253d8b5ac729e315ed03325744b2 | [
"MIT"
] | null | null | null | app/ocr.py | noahnisbet/human-rights-first-asylum-ds-noahnisbet | c329045e5967253d8b5ac729e315ed03325744b2 | [
"MIT"
] | null | null | null | import os
os.environ["OMP_NUM_THREADS"]= '1'
os.environ["OMP_THREAD_LIMIT"] = '1'
os.environ["MKL_NUM_THREADS"] = '1'
os.environ["NUMEXPR_NUM_THREADS"] = '1'
os.environ["OMP_NUM_THREADS"] = '1'
os.environ["PAPERLESS_AVX2_AVAILABLE"]="false"
os.environ["OCR_THREADS"] = '1'
import poppler
import pytesseract
from pdf2im... | 28.219512 | 75 | 0.669548 | 0 | 0 | 0 | 0 | 2,728 | 0.785941 | 2,674 | 0.770383 | 1,178 | 0.339383 |
b2cd1412230dab0559fa3bfa9b195e544581cd4a | 3,889 | py | Python | lp_local_search.py | cddoyle/div-k-median | fa2e3dc01f257602aa83e151c3bc268a76f8075e | [
"MIT"
] | null | null | null | lp_local_search.py | cddoyle/div-k-median | fa2e3dc01f257602aa83e151c3bc268a76f8075e | [
"MIT"
] | null | null | null | lp_local_search.py | cddoyle/div-k-median | fa2e3dc01f257602aa83e151c3bc268a76f8075e | [
"MIT"
] | null | null | null | import time
import sys
import numpy as np
from local_search import kmedian_local_search
import feasibility
from kmedkpm import k_median_k_partitions_LS
import psutil
from sklearn.datasets import make_blobs
import generator
import random
test = False
def lp_ls_complete(data, color_mat, rvec, k, logfile):
#########... | 32.408333 | 104 | 0.54487 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 829 | 0.213165 |
b2cdb0c942905c9f4fb6dbf73dca96d1a9a5f768 | 415 | py | Python | dms/v2/meal/__init__.py | moreal/DMS-api | 9624e28764ec4535002677671e10a09d762d19a8 | [
"MIT"
] | null | null | null | dms/v2/meal/__init__.py | moreal/DMS-api | 9624e28764ec4535002677671e10a09d762d19a8 | [
"MIT"
] | null | null | null | dms/v2/meal/__init__.py | moreal/DMS-api | 9624e28764ec4535002677671e10a09d762d19a8 | [
"MIT"
] | 1 | 2018-09-29T14:35:20.000Z | 2018-09-29T14:35:20.000Z | import datetime
import requests
import json
from dms.v2.config import DMS_URL
class Meal():
@staticmethod
def get(date: datetime.date or str=datetime.date.today()):
if not isinstance(date, str):
date = str(date)
resp = requests.get(f"http://{DMS_URL}/v2/meal/{date}")
mea... | 21.842105 | 66 | 0.636145 | 333 | 0.80241 | 0 | 0 | 315 | 0.759036 | 0 | 0 | 60 | 0.144578 |
b2cf11ab3d7e9318bb55599575d25a729b83ace2 | 319 | py | Python | mayan/apps/dependencies/permissions.py | CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons | 0e4e919fd2e1ded6711354a0330135283e87f8c7 | [
"Apache-2.0"
] | 2 | 2021-09-12T19:41:19.000Z | 2021-09-12T19:41:20.000Z | mayan/apps/dependencies/permissions.py | CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons | 0e4e919fd2e1ded6711354a0330135283e87f8c7 | [
"Apache-2.0"
] | 37 | 2021-09-13T01:00:12.000Z | 2021-10-02T03:54:30.000Z | mayan/apps/dependencies/permissions.py | CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons | 0e4e919fd2e1ded6711354a0330135283e87f8c7 | [
"Apache-2.0"
] | 1 | 2021-09-22T13:17:30.000Z | 2021-09-22T13:17:30.000Z | from django.utils.translation import ugettext_lazy as _
from mayan.apps.permissions import PermissionNamespace
namespace = PermissionNamespace(label=_('Dependencies'), name='dependencies')
permission_dependencies_view = namespace.add_permission(
label=_('View dependencies'), name='dependencies_view'
)
| 31.9 | 78 | 0.793103 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.206897 |
b2d171ee084b4ded299d8d9b2d8e8e0fa604218a | 213 | py | Python | src/about.py | jukeboxroundtable/JukeboxRoundtable | 06670d2e8511848829b68fddac5bc77806606f98 | [
"MIT"
] | 1 | 2019-02-15T17:33:51.000Z | 2019-02-15T17:33:51.000Z | src/about.py | jukeboxroundtable/JukeboxRoundtable | 06670d2e8511848829b68fddac5bc77806606f98 | [
"MIT"
] | 37 | 2019-01-30T18:32:43.000Z | 2019-06-11T18:00:11.000Z | src/about.py | jukeboxroundtable/JukeboxRoundtable | 06670d2e8511848829b68fddac5bc77806606f98 | [
"MIT"
] | null | null | null | from flask import Blueprint, render_template
about_blueprint = Blueprint('about', __name__)
@about_blueprint.route('/about')
def about():
"""Show the about page."""
return render_template('about.html')
| 21.3 | 46 | 0.7277 | 0 | 0 | 0 | 0 | 117 | 0.549296 | 0 | 0 | 53 | 0.248826 |