hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 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 4 247 | max_forks_repo_name stringlengths 4 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 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
133afe34151f5232a9e2d51d19c83f6dc9a56c53 | 464 | py | Python | setup.py | davidmnoriega/fast2phy | b86e2d3665f9a64ff9707c2fb3adacedf9a3a6f4 | [
"MIT"
] | 1 | 2017-11-07T20:05:05.000Z | 2017-11-07T20:05:05.000Z | setup.py | davidmnoriega/fast2phy | b86e2d3665f9a64ff9707c2fb3adacedf9a3a6f4 | [
"MIT"
] | null | null | null | setup.py | davidmnoriega/fast2phy | b86e2d3665f9a64ff9707c2fb3adacedf9a3a6f4 | [
"MIT"
] | null | null | null | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='fast2phy',
description="Convert aligned FASTA format to interleaved PHYLIP format",
license='MIT',
author='David M Noriega',
author_email='davidmnoriega@gmail.com',
version='1.0',
in... | 24.421053 | 76 | 0.674569 | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='fast2phy',
description="Convert aligned FASTA format to interleaved PHYLIP format",
license='MIT',
author='David M Noriega',
author_email='davidmnoriega@gmail.com',
version='1.0',
in... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1ae6ecabfb9c4df38957f271c527ea3eb353b8ec | 1,427 | py | Python | setup.py | floralist/botaxon | 979bb525eac87eee07593332aaac1bfd96fe44e5 | [
"MIT"
] | null | null | null | setup.py | floralist/botaxon | 979bb525eac87eee07593332aaac1bfd96fe44e5 | [
"MIT"
] | 1 | 2019-04-11T22:46:34.000Z | 2019-04-28T22:23:57.000Z | setup.py | ggueret/botaxon | 979bb525eac87eee07593332aaac1bfd96fe44e5 | [
"MIT"
] | 1 | 2020-05-11T17:21:47.000Z | 2020-05-11T17:21:47.000Z | import os
from setuptools import setup
BASEDIR_PATH = os.path.abspath(os.path.dirname(__file__))
setup(
name="botaxon",
version=get_version(),
author="Geoffrey GUERET",
author_email="geoffrey@gueret.tech",
description="Taxonomic parser for (sub)species botanical names.",
long_description=ope... | 33.186047 | 79 | 0.62719 | import os
from setuptools import setup
def get_version():
from botaxon import __VERSION__
return __VERSION__
BASEDIR_PATH = os.path.abspath(os.path.dirname(__file__))
setup(
name="botaxon",
version=get_version(),
author="Geoffrey GUERET",
author_email="geoffrey@gueret.tech",
description... | 0 | 0 | 0 | 0 | 0 | 56 | 0 | 0 | 23 |
5cd00a8b23b6b97dbe37221986cd0283648cc251 | 3,999 | py | Python | analyze_player.py | rwbogl/voul | 4300b8d14f6e31c2d32e44eac203e9a30e9b8cd1 | [
"MIT"
] | null | null | null | analyze_player.py | rwbogl/voul | 4300b8d14f6e31c2d32e44eac203e9a30e9b8cd1 | [
"MIT"
] | null | null | null | analyze_player.py | rwbogl/voul | 4300b8d14f6e31c2d32e44eac203e9a30e9b8cd1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from glob import glob
import os.path as path
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
"""
analyze_player.py
This program implements functions to analyze (and assist in analyzing) player
stats.
"""
def join_years(player_dir):
"""Join th... | 28.769784 | 79 | 0.671918 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from glob import glob
import os.path as path
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
"""
analyze_player.py
This program implements functions to analyze (and assist in analyzing) player
stats.
"""
def join_years(player_dir):
"""Join th... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4d339d92b9dadaa3174faa95a4d7f84f75429d9c | 1,757 | py | Python | tools/text.py | cdcai/NRC | ae7ec47cc4d6240ded55a3dc6dcc79a40d0f00d0 | [
"Apache-2.0"
] | 11 | 2019-12-27T00:25:59.000Z | 2021-07-05T08:12:12.000Z | tools/text.py | scotthlee/nrc | 6005dd36db05a94677ca2b2a4f05404f400066a4 | [
"Apache-2.0"
] | 1 | 2020-03-05T23:24:29.000Z | 2020-03-16T14:16:11.000Z | tools/text.py | scotthlee/nrc | 6005dd36db05a94677ca2b2a4f05404f400066a4 | [
"Apache-2.0"
] | 3 | 2019-10-08T13:52:42.000Z | 2021-01-26T02:54:11.000Z | '''Objects and methods to support text corpus storage and manipulation'''
# Looks up a dict key up by its values
# Uses get_key to lookup a sequence of words or characters
# Converts a text-type column of a categorical variable to integers
# Converts a list of tokens to an array of integers
# Pads a 1D sequence of... | 33.788462 | 76 | 0.686397 | '''Objects and methods to support text corpus storage and manipulation'''
import numpy as np
import pandas as pd
import re
import string
from nltk.tokenize import TreebankWordTokenizer
from sklearn.feature_extraction.text import CountVectorizer
# Looks up a dict key up by its values
def get_key(value, dic, add_1=Fals... | 0 | 0 | 0 | 0 | 0 | 1,124 | 0 | 39 | 243 |
7adbef290bccd109587b8e35a92abf28a018c2b5 | 1,387 | py | Python | cell_tools/_general_tools/_funcs/_Harmony/_supporting_funcs/_plot_umap.py | mvinyard/cell-tools | 2482ccbe13c7a5cc06d575adefe0158026c8e03b | [
"MIT"
] | 1 | 2022-01-11T20:00:44.000Z | 2022-01-11T20:00:44.000Z | cell_tools/_general_tools/_funcs/_Harmony/_supporting_funcs/_plot_umap.py | mvinyard/cell-tools | 2482ccbe13c7a5cc06d575adefe0158026c8e03b | [
"MIT"
] | null | null | null | cell_tools/_general_tools/_funcs/_Harmony/_supporting_funcs/_plot_umap.py | mvinyard/cell-tools | 2482ccbe13c7a5cc06d575adefe0158026c8e03b | [
"MIT"
] | null | null | null |
# _plot_umap.py
__module_name__ = "_plot_umap.py"
__author__ = ", ".join(["Michael E. Vinyard"])
__email__ = ", ".join(["vinyard@g.harvard.edu",])
# package imports #
# --------------- #
import matplotlib.pyplot as plt
import vinplots
def _setup_plot():
""""""
plot = vinplots.Plot()
plot.constru... | 22.737705 | 83 | 0.586157 |
# _plot_umap.py
__module_name__ = "_plot_umap.py"
__author__ = ", ".join(["Michael E. Vinyard"])
__email__ = ", ".join(["vinyard@g.harvard.edu",])
# package imports #
# --------------- #
import matplotlib.pyplot as plt
import numpy as np
import vinplots
def _setup_plot():
""""""
plot = vinplots.Plot... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 22 |
1e0166b4bc53ca786baa08f4f688ff8c9eeaf090 | 1,703 | py | Python | ginit/__init__.py | Drakkar-Software/init-generator | ffa4d9f53f6626f9f5788c791808d84f83cac6e2 | [
"MIT"
] | 2 | 2020-09-28T22:12:51.000Z | 2021-02-07T03:17:47.000Z | ginit/__init__.py | Drakkar-Software/ginit | ffa4d9f53f6626f9f5788c791808d84f83cac6e2 | [
"MIT"
] | null | null | null | ginit/__init__.py | Drakkar-Software/ginit | ffa4d9f53f6626f9f5788c791808d84f83cac6e2 | [
"MIT"
] | null | null | null | # Drakkar-Software ginit
# Copyright (c) Drakkar-Software, All rights reserved.
# MIT License
#
# 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 li... | 34.755102 | 97 | 0.732824 | # Drakkar-Software ginit
# Copyright (c) Drakkar-Software, All rights reserved.
# MIT License
#
# 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 li... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 69 |
7b443300b95b485adf09ba28415ae6d947e8bbc7 | 184 | py | Python | vindauga/constants/colors.py | gabbpuy/vindauga | d4a51a618d60e83d82fd5fee585d08ff288484f3 | [
"BSD-2-Clause"
] | 5 | 2019-07-03T16:01:46.000Z | 2021-12-22T10:01:04.000Z | vindauga/constants/colors.py | gabbpuy/vindauga | d4a51a618d60e83d82fd5fee585d08ff288484f3 | [
"BSD-2-Clause"
] | null | null | null | vindauga/constants/colors.py | gabbpuy/vindauga | d4a51a618d60e83d82fd5fee585d08ff288484f3 | [
"BSD-2-Clause"
] | 1 | 2020-09-22T14:25:13.000Z | 2020-09-22T14:25:13.000Z | # -*- coding: utf-8 -*-
cmColorForegroundChanged = 71
cmColorBackgroundChanged = 72
cmColorSet = 73
cmNewColorItem = 74
cmNewColorIndex = 75
cmSaveColorIndex = 76
cmSetColorIndex = 77
| 20.444444 | 29 | 0.771739 | # -*- coding: utf-8 -*-
cmColorForegroundChanged = 71
cmColorBackgroundChanged = 72
cmColorSet = 73
cmNewColorItem = 74
cmNewColorIndex = 75
cmSaveColorIndex = 76
cmSetColorIndex = 77
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7636f6c2c55f51c35640db72168f28063cdff74c | 915 | py | Python | src/jose/jwa/sigs.py | hdknr/jose | d872407e9f3b3a0262e6bb1cdb599b5c4c1d9ee4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/jose/jwa/sigs.py | hdknr/jose | d872407e9f3b3a0262e6bb1cdb599b5c4c1d9ee4 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2015-01-23T09:37:17.000Z | 2015-01-23T09:37:17.000Z | src/jose/jwa/sigs.py | hdknr/jose | d872407e9f3b3a0262e6bb1cdb599b5c4c1d9ee4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null |
__all__ = ['SigEnum', 'SigDict', ]
SigDict = dict((i.name, i.name) for i in SigEnum)
| 19.891304 | 53 | 0.538798 | from jose.jwa import keys
from enum import Enum
__all__ = ['SigEnum', 'SigDict', ]
class SigEnum(Enum):
HS256 = 'HS256'
HS384 = 'HS384'
HS512 = 'HS512'
RS256 = 'RS256'
RS384 = 'RS384'
RS512 = 'RS512'
PS256 = 'PS256'
PS384 = 'PS384'
PS512 = 'PS512'
ES256 = 'ES256'
ES384 ... | 0 | 441 | 0 | 315 | 0 | 0 | 0 | 4 | 67 |
165c3fc8a9da33802c35462637389a3a888c8258 | 8,625 | py | Python | diagnostics/ngtf_graph_viewer.py | sreeni-k/ngraph-tf | 4280a49ecffb92bb1ffa8ea212b22e0db8729f6e | [
"Apache-2.0"
] | null | null | null | diagnostics/ngtf_graph_viewer.py | sreeni-k/ngraph-tf | 4280a49ecffb92bb1ffa8ea212b22e0db8729f6e | [
"Apache-2.0"
] | null | null | null | diagnostics/ngtf_graph_viewer.py | sreeni-k/ngraph-tf | 4280a49ecffb92bb1ffa8ea212b22e0db8729f6e | [
"Apache-2.0"
] | null | null | null | # ==============================================================================
# Copyright 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | 39.383562 | 125 | 0.616696 | # ==============================================================================
# Copyright 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | 0 | 0 | 0 | 0 | 0 | 2,836 | 0 | -37 | 248 |
c02a52b4b0ef55ecee2c813d47117274a7aa3a60 | 928 | py | Python | jp.atcoder/abc146/abc146_d/8717392.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc146/abc146_d/8717392.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc146/abc146_d/8717392.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main()
| 21.581395 | 75 | 0.43319 | import sys
from collections import deque
import numpy as np
def main():
n = int(sys.stdin.readline().rstrip())
ab = np.array(sys.stdin.read().split(), dtype=np.int64).reshape(-1, 2)
G = [[] for _ in range(n + 1)]
for a, b in ab:
G[a].append(b)
G[b].append(a)
paren... | 0 | 0 | 0 | 0 | 0 | 795 | 0 | -6 | 96 |
c6cf6b79e59cc7249507fefb539ab9804b04cced | 2,590 | py | Python | netlists/oceanv3/test/test_KPIs.py | AlgoveraAI/tokenspice | e64531ac09e51bcb2d34908fd74f809834767408 | [
"MIT"
] | 81 | 2021-08-01T10:00:15.000Z | 2022-03-30T15:05:52.000Z | netlists/oceanv3/test/test_KPIs.py | AlgoveraAI/tokenspice | e64531ac09e51bcb2d34908fd74f809834767408 | [
"MIT"
] | 93 | 2021-08-03T16:21:54.000Z | 2022-03-22T05:36:51.000Z | netlists/oceanv3/test/test_KPIs.py | AlgoveraAI/tokenspice | e64531ac09e51bcb2d34908fd74f809834767408 | [
"MIT"
] | 15 | 2021-08-10T04:02:32.000Z | 2022-03-30T05:51:56.000Z | from .. import KPIs
| 27.849462 | 87 | 0.698842 | from pytest import approx
from enforce_typing import enforce_types
from agents.PoolAgent import PoolAgent
from util import globaltokens
from util.base18 import fromBase18
from .. import KPIs
@enforce_types
class MockAgentDict(dict): # subset of engine.AgentDict
def __init__(self, *arg, **kw): # pylint: disabl... | 0 | 2,277 | 0 | 0 | 0 | 0 | 0 | 61 | 227 |
fe29a64b9df91b693cfa6dc68513305a950217e0 | 6,091 | py | Python | info/views.py | ShaverJT/ThetaTauMiami | 975e4a2a29493166880be412200ed3107c0efc60 | [
"Apache-2.0"
] | 1 | 2015-04-13T18:55:12.000Z | 2015-04-13T18:55:12.000Z | info/views.py | ShaverJT/ThetaTauMiami | 975e4a2a29493166880be412200ed3107c0efc60 | [
"Apache-2.0"
] | null | null | null | info/views.py | ShaverJT/ThetaTauMiami | 975e4a2a29493166880be412200ed3107c0efc60 | [
"Apache-2.0"
] | null | null | null | import math
from django.http import HttpResponse
from django.template import Context, loader
from info.models import Brother, BrotherEntity
from info import utility
max_brothers_per_page = 24
standard_brothers_per_page = 9
brothers_per_row = 3
max_pages_listed_on_screen = 5
officers_per_row = 2
exec_board_members_pe... | 42.894366 | 161 | 0.728944 | import math
from django.http import HttpResponse
from django.template import Context, loader
from django.shortcuts import render, get_object_or_404
from info.models import Brother, Officer, BrotherEntity
from info import utility
from marketing.models import Picture as MarketingPic
from articles.models import Article
... | 0 | 0 | 0 | 0 | 0 | 989 | 0 | 87 | 204 |
765dc73d1e00d6074bedf595a2b6b30c969785f0 | 875 | py | Python | wawhfd/urls.py | calebrash/wawhfd | 1b060eda6f6e7dbde6dd222d47ca5f04768ed403 | [
"MIT"
] | 1 | 2018-01-26T06:16:34.000Z | 2018-01-26T06:16:34.000Z | wawhfd/urls.py | calebrash/wawhfd | 1b060eda6f6e7dbde6dd222d47ca5f04768ed403 | [
"MIT"
] | null | null | null | wawhfd/urls.py | calebrash/wawhfd | 1b060eda6f6e7dbde6dd222d47ca5f04768ed403 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from django.contrib import admin
from wawhfd.views import (IndexView, DatesListView, DatesEditView, DatesDeleteView, RecipesListView, RecipesAddView, RecipesEditView, RecipesDeleteView)
urlpatterns = [
url(r'^$', IndexView.as_view()),
url(r'^api/dates/$', DatesListView.as_vi... | 29.166667 | 97 | 0.637714 | from django.conf.urls import url
from django.contrib import admin
from wawhfd.views import (
IndexView,
DatesListView,
DatesEditView,
DatesDeleteView,
RecipesListView,
RecipesAddView,
RecipesEditView,
RecipesDeleteView,
)
urlpatterns = [
url(r'^$', IndexView.as_view()),
url(r... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0 |
22668c307ec65269c60dd26d9f5a9adf952a0166 | 3,501 | py | Python | listgames.py | Emetophobe/steamutils | 201e6f94c66b1b2432d47102b68fa23b0cabef8c | [
"MIT"
] | 2 | 2020-05-20T00:32:47.000Z | 2020-05-20T00:52:43.000Z | listgames.py | Emetophobe/steamutils | 201e6f94c66b1b2432d47102b68fa23b0cabef8c | [
"MIT"
] | null | null | null | listgames.py | Emetophobe/steamutils | 201e6f94c66b1b2432d47102b68fa23b0cabef8c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (C) 2019-2020 Emetophobe (snapnaw@gmail.com)
# https://github.com/Emetophobe/steamutils/
import os
import re
import glob
def list_games(steamdir):
""" Get the list of installed Steam games. """
# Make sure the directory is valid
steam_apps = os.path.join(os.path.abspa... | 33.342857 | 112 | 0.604113 | #!/usr/bin/env python
# Copyright (C) 2019-2020 Emetophobe (snapnaw@gmail.com)
# https://github.com/Emetophobe/steamutils/
import os
import re
import glob
import argparse
def list_games(steamdir):
""" Get the list of installed Steam games. """
# Make sure the directory is valid
steam_apps = os.path.jo... | 0 | 0 | 0 | 0 | 0 | 942 | 0 | -6 | 45 |
313e9e6deabe030c8b33cec7fe570dc60615c783 | 790 | py | Python | scripts/convert_spm_vocab.py | ZurichNLP/segtest | 38fa641d5cb7c06060ce04baa6d9ed53dfe957b7 | [
"MIT"
] | 7 | 2021-09-02T11:23:40.000Z | 2022-02-01T21:14:07.000Z | scripts/convert_spm_vocab.py | ZurichNLP/segtest | 38fa641d5cb7c06060ce04baa6d9ed53dfe957b7 | [
"MIT"
] | null | null | null | scripts/convert_spm_vocab.py | ZurichNLP/segtest | 38fa641d5cb7c06060ce04baa6d9ed53dfe957b7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
if __name__ == '__main__':
main()
| 24.6875 | 66 | 0.541772 | #!/usr/bin/env python3
import sys
from collections import OrderedDict
import json
def main():
for filename in sys.argv[1:]:
print('Processing', filename)
sorted_words = []
with open(filename, 'r', encoding='utf-8') as f:
for line in f:
words_in = line.strip().... | 0 | 0 | 0 | 0 | 0 | 643 | 0 | -7 | 91 |
4c2ac61937efc476395a80e207360408a861ca0c | 3,879 | py | Python | tensorflow/modules/datasets/dataset.py | nicolasrosa/Sparse-to-Continuous | 8664de17d6b6c6cc39bf8fcebfcb829249367f2f | [
"BSD-2-Clause"
] | 19 | 2018-09-25T01:58:13.000Z | 2021-07-27T09:54:36.000Z | tensorflow/modules/datasets/dataset.py | nicolasrosa/Sparse-to-Continuous | 8664de17d6b6c6cc39bf8fcebfcb829249367f2f | [
"BSD-2-Clause"
] | 18 | 2020-03-24T18:18:56.000Z | 2022-02-10T00:35:13.000Z | tensorflow/modules/datasets/dataset.py | nicolasrosa/Sparse-to-Continuous | 8664de17d6b6c6cc39bf8fcebfcb829249367f2f | [
"BSD-2-Clause"
] | 4 | 2019-11-14T02:35:34.000Z | 2020-08-27T11:36:02.000Z | # ===========
# Libraries
# ===========
# ===================
# Class Declaration
# ===================
| 43.1 | 152 | 0.565352 | # ===========
# Libraries
# ===========
from ..size import Size
from ..filenames import FilenamesHandler
from ..args import args
# ===================
# Class Declaration
# ===================
class Dataset(FilenamesHandler):
def __init__(self, **kwargs):
super(Dataset, self).__init__()
self.da... | 6 | 514 | 0 | 3,143 | 0 | 0 | 0 | 23 | 88 |
d4e51eb8d2da662f350df6fd566a070f7504549d | 4,842 | py | Python | pptx/opc/oxml.py | just4jc/python-pptx | ec433085d84d48b5539c379e52eb3c279ab2cbc0 | [
"MIT"
] | 169 | 2016-12-18T16:37:48.000Z | 2022-03-08T11:37:49.000Z | lib-linux_x64/pptx/opc/oxml.py | Element84/lambda-text-extractor | 6da52d077a2fc571e38bfe29c33ae68f6443cd5a | [
"Apache-2.0"
] | 26 | 2017-06-08T01:45:36.000Z | 2021-09-23T19:13:40.000Z | lib-linux_x64/pptx/opc/oxml.py | Element84/lambda-text-extractor | 6da52d077a2fc571e38bfe29c33ae68f6443cd5a | [
"Apache-2.0"
] | 42 | 2016-12-23T03:27:12.000Z | 2021-10-01T13:46:21.000Z | # encoding: utf-8
"""
Temporary stand-in for main oxml module that came across with the
PackageReader transplant. Probably much will get replaced with objects from
the pptx.oxml.core and then this module will either get deleted or only hold
the package related custom element classes.
"""
from __future__ import absolu... | 30.2625 | 77 | 0.673689 | # encoding: utf-8
"""
Temporary stand-in for main oxml module that came across with the
PackageReader transplant. Probably much will get replaced with objects from
the pptx.oxml.core and then this module will either get deleted or only hold
the package related custom element classes.
"""
from __future__ import absolu... | 0 | 1,047 | 0 | 2,300 | 0 | 273 | 0 | 204 | 228 |
71b11a4cceda2ece9f74987229878f74763c8bdf | 10,797 | py | Python | fc_treeobs/training_2ts.py | giulic3/flatland-challenge-marl | 391197188c9ddf56cfac7a03f48bb3bbf8e53dd5 | [
"MIT"
] | 9 | 2020-05-02T15:55:17.000Z | 2021-12-30T07:33:50.000Z | fc_treeobs/training_2ts.py | giulic3/flatland-challenge-marl | 391197188c9ddf56cfac7a03f48bb3bbf8e53dd5 | [
"MIT"
] | 2 | 2020-02-20T12:41:40.000Z | 2021-04-01T10:40:23.000Z | fc_treeobs/training_2ts.py | giulic3/flatland-challenge-marl | 391197188c9ddf56cfac7a03f48bb3bbf8e53dd5 | [
"MIT"
] | 1 | 2020-06-03T09:41:59.000Z | 2020-06-03T09:41:59.000Z | # Import packages for plotting and system
import sys
# make sure the root path is in system path
from pathlib import Path
base_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(base_dir))
#from flatland.utils.rendertools import RenderTool
if __name__ == '__main__':
main(sys.argv[1:])
| 42.341176 | 155 | 0.576456 | # Import packages for plotting and system
import getopt
import random
import sys
from collections import deque
# make sure the root path is in system path
from pathlib import Path
base_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(base_dir))
from importlib_resources import path
import matplotlib.p... | 0 | 0 | 0 | 0 | 0 | 9,851 | 0 | 281 | 357 |
779a475a82160f2b8759dd2421f5612dcbacf302 | 1,245 | py | Python | portfolio_model.py | mr-pablinho/sobol_codes | b25a5f2f387ba48162b8b6597c80b79f5066de3b | [
"MIT"
] | null | null | null | portfolio_model.py | mr-pablinho/sobol_codes | b25a5f2f387ba48162b8b6597c80b79f5066de3b | [
"MIT"
] | null | null | null | portfolio_model.py | mr-pablinho/sobol_codes | b25a5f2f387ba48162b8b6597c80b79f5066de3b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Nov 18 10:38:40 2021
PORTFOLIO MODEL - WHY GLOBAL SENSITIVITY?
@author: PMR
"""
# %% Import libraries
import chaospy as cp
import numpy as np
import matplotlib.pyplot as plt
# %% Portfolio model
# %% Setup problem
Q1_mean = 0
Q1_std = 1
Q2_mean = ... | 18.043478 | 63 | 0.605622 | # -*- coding: utf-8 -*-
"""
Created on Thu Nov 18 10:38:40 2021
PORTFOLIO MODEL - WHY GLOBAL SENSITIVITY?
@author: PMR
"""
# %% Import libraries
import chaospy as cp
import numpy as np
import matplotlib.pyplot as plt
# %% Portfolio model
def portfolio_model(c1, c2, Q1, Q2):
Y = (c1 * Q1) + (... | 0 | 0 | 0 | 0 | 0 | 130 | 0 | 0 | 25 |
69c8866c559c56ac98d72cb0de641a39413b10cc | 910 | py | Python | openjij/utils/graph_utils.py | 29rou/OpenJij | c2579fba8710cf82b9e6761304f0042b365b595c | [
"Apache-2.0"
] | 61 | 2019-01-05T13:37:10.000Z | 2022-03-11T02:11:08.000Z | openjij/utils/graph_utils.py | OpenJij/OpenJij | 9ed58500ef47583bc472410d470bb2dd4bfec74a | [
"Apache-2.0"
] | 79 | 2019-01-29T09:55:20.000Z | 2022-02-19T04:06:20.000Z | openjij/utils/graph_utils.py | 29rou/OpenJij | c2579fba8710cf82b9e6761304f0042b365b595c | [
"Apache-2.0"
] | 21 | 2019-01-07T07:55:10.000Z | 2022-03-08T14:27:23.000Z | import numpy as np
def qubo_to_ising(mat: np.ndarray):
"""inplace-convert numpy matrix from qubo to ising.
Args:
mat (np.ndarray): numpy matrix
"""
mat /= 4
for i in range(mat.shape[0]):
mat[i, i] += np.sum(mat[i, :])
def chimera_to_ind(r: int, c: int, z: int, L: int):
"... | 26 | 108 | 0.510989 | import numpy as np
def qubo_to_ising(mat: np.ndarray):
"""inplace-convert numpy matrix from qubo to ising.
Args:
mat (np.ndarray): numpy matrix
"""
mat /= 4
for i in range(mat.shape[0]):
mat[i, i] += np.sum(mat[i, :])
def chimera_to_ind(r: int, c: int, z: int, L: int):
"... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1cbd4e735a4e592852b86fb40a4872bdcb02c9c0 | 263 | py | Python | demos/demo_morse/demo_morse_fourier.py | WaveBlocks/WaveBlocks | 2af3730dcf27e54006ec602e696b4d4df25459d8 | [
"BSD-3-Clause"
] | null | null | null | demos/demo_morse/demo_morse_fourier.py | WaveBlocks/WaveBlocks | 2af3730dcf27e54006ec602e696b4d4df25459d8 | [
"BSD-3-Clause"
] | null | null | null | demos/demo_morse/demo_morse_fourier.py | WaveBlocks/WaveBlocks | 2af3730dcf27e54006ec602e696b4d4df25459d8 | [
"BSD-3-Clause"
] | null | null | null | algorithm = "fourier"
potential = "morse"
D = 3
a = 0.3
T = 10
dt = 0.005
eps = 0.2
f = 4.0
ngn = 4096
basis_size = 4
leading_component = 0
P = 1.0j
Q = 1
S = 0.0
p = 0.0
q = 1.5
parameters = [ (P, Q, S, p, q) ]
coefficients = [[(0, 1.0)]]
write_nth = 20
| 9.392857 | 32 | 0.547529 | algorithm = "fourier"
potential = "morse"
D = 3
a = 0.3
T = 10
dt = 0.005
eps = 0.2
f = 4.0
ngn = 4096
basis_size = 4
leading_component = 0
P = 1.0j
Q = 1
S = 0.0
p = 0.0
q = 1.5
parameters = [ (P, Q, S, p, q) ]
coefficients = [[(0, 1.0)]]
write_nth = 20
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4caae3c9d8a9c19c3fba5639c8067e15e2c9eac7 | 8,055 | py | Python | src/cauliflowervest/client/mac/corestorage.py | j-lowry/cauliflowervest | 444d7065293112edfc7ea2deb1d27f9b4047828b | [
"Apache-2.0"
] | null | null | null | src/cauliflowervest/client/mac/corestorage.py | j-lowry/cauliflowervest | 444d7065293112edfc7ea2deb1d27f9b4047828b | [
"Apache-2.0"
] | null | null | null | src/cauliflowervest/client/mac/corestorage.py | j-lowry/cauliflowervest | 444d7065293112edfc7ea2deb1d27f9b4047828b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2011 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 require... | 31.464844 | 80 | 0.701924 | #!/usr/bin/env python
#
# Copyright 2011 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 require... | 0 | 0 | 0 | 447 | 0 | 0 | 0 | 0 | 115 |
dce35319a54555e1ca61086bdbfbd5b054b2e50e | 976 | py | Python | starmato/admin/templatetags/_fieldset_related.py | Depado/starmato-admin | 58452e0085ff06d6adee27c578a95ea5aca390d9 | [
"MIT"
] | 1 | 2015-11-08T10:13:32.000Z | 2015-11-08T10:13:32.000Z | starmato/admin/templatetags/_fieldset_related.py | Depado/starmato-admin | 58452e0085ff06d6adee27c578a95ea5aca390d9 | [
"MIT"
] | null | null | null | starmato/admin/templatetags/_fieldset_related.py | Depado/starmato-admin | 58452e0085ff06d6adee27c578a95ea5aca390d9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 42.434783 | 122 | 0.697746 | # -*- coding: utf-8 -*-
def before_related(adminform):
adminform.fieldsets_before = adminform.fieldsets
adminform.fieldsets_after = []
try:
adminform.fieldsets_before = adminform.fieldsets[:adminform.fieldsets.index(('related_go_here', {'fields': []}))]
adminform.fieldsets_after = adminform.... | 0 | 0 | 0 | 0 | 0 | 906 | 0 | 0 | 45 |
be67b511064c47e06d1e759d9a1b90650fb4bff6 | 9,171 | py | Python | app/service/time_series_detector/detect_service.py | angry-tony/Metis | 79140ca056c6ae280e71efc40612087fa1df751b | [
"Apache-2.0"
] | null | null | null | app/service/time_series_detector/detect_service.py | angry-tony/Metis | 79140ca056c6ae280e71efc40612087fa1df751b | [
"Apache-2.0"
] | null | null | null | app/service/time_series_detector/detect_service.py | angry-tony/Metis | 79140ca056c6ae280e71efc40612087fa1df751b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Tencent is pleased to support the open source community by making Metis available.
Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in compliance with th... | 42.068807 | 305 | 0.586087 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Tencent is pleased to support the open source community by making Metis available.
Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in compliance with th... | 0 | 0 | 0 | 7,946 | 0 | 0 | 0 | 198 | 200 |
f99282b9e36d980fa7054adc8c003058f5cae385 | 438 | py | Python | open_data/dataset/migrations/0020_answer_source.py | balfroim/OpenData | f0334dae16c2806e81f7d2d53adeabc72403ecce | [
"MIT"
] | null | null | null | open_data/dataset/migrations/0020_answer_source.py | balfroim/OpenData | f0334dae16c2806e81f7d2d53adeabc72403ecce | [
"MIT"
] | null | null | null | open_data/dataset/migrations/0020_answer_source.py | balfroim/OpenData | f0334dae16c2806e81f7d2d53adeabc72403ecce | [
"MIT"
] | null | null | null | # Generated by Django 3.2.2 on 2021-05-10 09:17
| 23.052632 | 72 | 0.591324 | # Generated by Django 3.2.2 on 2021-05-10 09:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dataset', '0019_alter_datasetship_unique_together'),
]
operations = [
migrations.AddField(
model_name='answer',
... | 0 | 0 | 0 | 318 | 0 | 0 | 0 | 19 | 50 |
32a1b8a06f3d67d2bf12c8fa0306b5ff232b7ab7 | 845 | py | Python | steps/step47.py | daisuke19891023/dl-from-scratch-3 | 4fb9441cfcceca96ac07c602053e608d92c80838 | [
"MIT"
] | null | null | null | steps/step47.py | daisuke19891023/dl-from-scratch-3 | 4fb9441cfcceca96ac07c602053e608d92c80838 | [
"MIT"
] | 2 | 2020-05-30T15:04:54.000Z | 2020-05-30T15:05:20.000Z | steps/step47.py | daisuke19891023/dl-from-scratch-3 | 4fb9441cfcceca96ac07c602053e608d92c80838 | [
"MIT"
] | null | null | null | if '__file__' in globals():
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import numpy as np
from dezero import Variable
from dezero import setup_variable
import dezero.functions as F
from dezero.models import MLP
setup_variable()
if __name__ ==... | 22.837838 | 68 | 0.602367 | if '__file__' in globals():
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import numpy as np
from dezero import Variable, Model, as_variable
from dezero import setup_variable
from dezero.utils import plot_dot_graph
import dezero.functions as F
fr... | 0 | 0 | 0 | 0 | 0 | 78 | 0 | 46 | 75 |
cf20735e73c62d19893752ac999e845017d3884d | 794 | py | Python | scripts/llvm_sandbox.py | jevinskie/pypcode-emu | 49d62090df9b25a7c4e35eee3532c3763f4e4286 | [
"MIT"
] | 13 | 2022-02-27T03:35:24.000Z | 2022-03-21T10:39:16.000Z | scripts/llvm_sandbox.py | jevinskie/pypcode-emu | 49d62090df9b25a7c4e35eee3532c3763f4e4286 | [
"MIT"
] | null | null | null | scripts/llvm_sandbox.py | jevinskie/pypcode-emu | 49d62090df9b25a7c4e35eee3532c3763f4e4286 | [
"MIT"
] | 1 | 2022-03-21T01:24:00.000Z | 2022-03-21T01:24:00.000Z | #!/usr/bin/env python3
from llvmlite import ir
i1 = ir.IntType(1)
i8 = ir.IntType(8)
i16 = ir.IntType(16)
i32 = ir.IntType(32)
i64 = ir.IntType(64)
void = ir.VoidType()
m = ir.Module()
fty = ir.FunctionType(void, [i32, i32, i32])
f = ir.Function(m, fty, "cmov_test")
entry = f.append_basic_block("entry")
bld = ir.IR... | 22.055556 | 74 | 0.671285 | #!/usr/bin/env python3
from llvmlite import ir
i1 = ir.IntType(1)
i8 = ir.IntType(8)
i16 = ir.IntType(16)
i32 = ir.IntType(32)
i64 = ir.IntType(64)
void = ir.VoidType()
m = ir.Module()
fty = ir.FunctionType(void, [i32, i32, i32])
f = ir.Function(m, fty, "cmov_test")
entry = f.append_basic_block("entry")
bld = ir.IR... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8612c165092041ec838f04a30477eca922b7a884 | 6,008 | py | Python | api/blueprints/auth/views/tokens.py | Shubhaankar-sharma/API | 418339481ae70c6a661c972355c33172e4920df8 | [
"MIT"
] | 1 | 2021-05-01T02:25:27.000Z | 2021-05-01T02:25:27.000Z | api/blueprints/auth/views/tokens.py | mohamed040406/API | 40ceb2b35271938d90e4309a6cdcf63ba0c17f0b | [
"MIT"
] | null | null | null | api/blueprints/auth/views/tokens.py | mohamed040406/API | 40ceb2b35271938d90e4309a6cdcf63ba0c17f0b | [
"MIT"
] | null | null | null | from urllib.parse import quote_plus, urlparse
from typing import List
import os
from api.app import API
from .. import bp
import utils
DISCORD_ENDPOINT = "https://discord.com/api"
request: utils.Request
SCOPES = ["identify"]
current_app: API
def format_scopes(scopes: List[str]) -> str:
"""Format a list of sco... | 30.190955 | 97 | 0.593708 | from quart import current_app, request, redirect, jsonify
from urllib.parse import quote_plus, parse_qs, urlparse
from quart.exceptions import MethodNotAllowed
from datetime import datetime, timedelta
from typing import List, Tuple
import jwt
import os
from api.models import Token, User
from api.app import API
from ..... | 0 | 3,638 | 1,010 | 0 | 0 | 0 | 0 | 98 | 203 |
0029caae435390d28118eff205e8ff9e2e2e2303 | 3,071 | py | Python | Metodos Computacionales Uniandes/Code/ejercicio_21.py | aess14/Cursos-Uniandes | be016b25f2f49788235fbe91ec577fd16b9ad613 | [
"MIT"
] | null | null | null | Metodos Computacionales Uniandes/Code/ejercicio_21.py | aess14/Cursos-Uniandes | be016b25f2f49788235fbe91ec577fd16b9ad613 | [
"MIT"
] | null | null | null | Metodos Computacionales Uniandes/Code/ejercicio_21.py | aess14/Cursos-Uniandes | be016b25f2f49788235fbe91ec577fd16b9ad613 | [
"MIT"
] | null | null | null |
# Soluciones a los ejercicios de la seccion 6.2.5
# del libro A Survey of Computational Physics Introductory Computational Science
# de Landau, Paez, Bordeianu (Python Multimodal eTextBook Beta4.0)
#1. Write a double-precision program to integrate an arbitrary function numerically
# using the trapezoid rule, the S... | 34.505618 | 99 | 0.595246 | import numpy as np
import matplotlib.pyplot as plt
# Soluciones a los ejercicios de la seccion 6.2.5
# del libro A Survey of Computational Physics Introductory Computational Science
# de Landau, Paez, Bordeianu (Python Multimodal eTextBook Beta4.0)
#1. Write a double-precision program to integrate an arbitrary func... | 0 | 0 | 0 | 0 | 0 | 2,426 | 0 | 7 | 135 |
baa701c74e94bb4d67456b7a8468dc39986dc759 | 3,437 | py | Python | RDS/code/rdsim/graphgen.py | chrisjcameron/chrisjcameron.github.io | 98bae30c1227465aba09ee50083688857b573cd5 | [
"MIT"
] | null | null | null | RDS/code/rdsim/graphgen.py | chrisjcameron/chrisjcameron.github.io | 98bae30c1227465aba09ee50083688857b573cd5 | [
"MIT"
] | null | null | null | RDS/code/rdsim/graphgen.py | chrisjcameron/chrisjcameron.github.io | 98bae30c1227465aba09ee50083688857b573cd5 | [
"MIT"
] | null | null | null | import random, math, numpy as np
import networkx
import networkx.utils
#from networkx.generators.classic import empty_graph
def random_stub_triangle_graph(s, t, seed=None):
"""Return a random graph G(s,t) with expected degrees given by s+2*t.
:Parameters:
- `s`: list - count of stubs emanating from... | 26.643411 | 77 | 0.550189 | import random, math, numpy as np
import networkx
import networkx.utils
#from networkx.generators.classic import empty_graph
def random_stub_triangle_graph(s, t, seed=None):
"""Return a random graph G(s,t) with expected degrees given by s+2*t.
:Parameters:
- `s`: list - count of stubs emanating from... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5848876749341a241b2e0fb3fed579e69f7b80ce | 159 | py | Python | __init__.py | GPaolo/Kuka_gym | 9f88022b26ac013da111a9caaf841fa2b1cfc9bd | [
"MIT"
] | null | null | null | __init__.py | GPaolo/Kuka_gym | 9f88022b26ac013da111a9caaf841fa2b1cfc9bd | [
"MIT"
] | null | null | null | __init__.py | GPaolo/Kuka_gym | 9f88022b26ac013da111a9caaf841fa2b1cfc9bd | [
"MIT"
] | null | null | null | # Created by giuseppe
# Date: 22/11/19
from gym.envs.registration import register
register(
id='KukaPush-v0',
entry_point='gym_kuka.envs:KukaPush',
) | 17.666667 | 42 | 0.72327 | # Created by giuseppe
# Date: 22/11/19
from gym.envs.registration import register
register(
id='KukaPush-v0',
entry_point='gym_kuka.envs:KukaPush',
) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fd66240376fc34f8c1e678cfe86225d1902a282b | 108 | py | Python | PDF Reader/txt-reader.py | Rothamsted-Ecoinformatics/YieldBookDataTools | 156cec017846037a95feed9c3e2490df49485eac | [
"Apache-2.0"
] | null | null | null | PDF Reader/txt-reader.py | Rothamsted-Ecoinformatics/YieldBookDataTools | 156cec017846037a95feed9c3e2490df49485eac | [
"Apache-2.0"
] | null | null | null | PDF Reader/txt-reader.py | Rothamsted-Ecoinformatics/YieldBookDataTools | 156cec017846037a95feed9c3e2490df49485eac | [
"Apache-2.0"
] | null | null | null | f = open('Conventions.txt','r')
message = f.read()
print(message)
f.close()
print (message.splitlines())
| 13.5 | 31 | 0.666667 | f = open('Conventions.txt','r')
message = f.read()
print(message)
f.close()
print (message.splitlines())
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f7c1c10f8bb7163eee813091865d9d31e524515e | 38,978 | py | Python | awsheet/helpers/securitygrouphelper.py | cryptographrix/awsheet | 345eb75ffc4bfb8a7cf9cd6df31d6a16067f769a | [
"Apache-2.0"
] | null | null | null | awsheet/helpers/securitygrouphelper.py | cryptographrix/awsheet | 345eb75ffc4bfb8a7cf9cd6df31d6a16067f769a | [
"Apache-2.0"
] | null | null | null | awsheet/helpers/securitygrouphelper.py | cryptographrix/awsheet | 345eb75ffc4bfb8a7cf9cd6df31d6a16067f769a | [
"Apache-2.0"
] | null | null | null | """This module implements the security group helper module for AWSHeet that is aimed at providing idempotent AWS EC2 security groups.
Currently, it only supports Security Groups that are in a VPC.
Rules are created using the SecurityGroupRule type and then they are collected together inside an iterable (usually a set ... | 49.90781 | 187 | 0.627841 | """This module implements the security group helper module for AWSHeet that is aimed at providing idempotent AWS EC2 security groups.
Currently, it only supports Security Groups that are in a VPC.
Rules are created using the SecurityGroupRule type and then they are collected together inside an iterable (usually a set ... | 0 | 0 | 0 | 34,716 | 0 | 0 | 0 | -90 | 331 |
bfe16f1db07ccbc826f95d2ab993112ac10101ca | 766 | py | Python | hacker_rank/special_multiple/special_multiple.py | chidioguejiofor/algorithms | a44fe57b697bf6c2faeb63cce51ba193a886b960 | [
"MIT"
] | null | null | null | hacker_rank/special_multiple/special_multiple.py | chidioguejiofor/algorithms | a44fe57b697bf6c2faeb63cce51ba193a886b960 | [
"MIT"
] | null | null | null | hacker_rank/special_multiple/special_multiple.py | chidioguejiofor/algorithms | a44fe57b697bf6c2faeb63cce51ba193a886b960 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
output_list = read('output')
for index,n in enumerate(read('input')):
special_number = solve(int(n))
if output_list[index] != special_number:
print('Failed for value n = {}'.format(n) )
| 23.9375 | 85 | 0.557441 | from urllib.request import urlopen
def read(file_name = 'input'):
numbers_list =[]
with open('hacker_rank/special_multiple/{0}.txt'.format(file_name), 'r') as file:
for line in file:
numbers_list.append(line.split('\n')[0])
return numbers_list
def solve(n):
count = 1
... | 0 | 0 | 0 | 0 | 0 | 430 | 0 | 13 | 68 |
04eb8cc9f37ad2aae4dc6486fa6965adebe8bc15 | 22,383 | py | Python | softalignments/functions.py | M4t1ss/sAliViz | b955443275ad47fbb172bb006aa2da43fdd7ebd9 | [
"MIT"
] | 72 | 2017-10-20T05:13:35.000Z | 2022-01-26T15:19:12.000Z | softalignments/functions.py | M4t1ss/sAliViz | b955443275ad47fbb172bb006aa2da43fdd7ebd9 | [
"MIT"
] | 25 | 2017-07-06T18:25:17.000Z | 2019-08-27T09:06:38.000Z | softalignments/functions.py | M4t1ss/sAliViz | b955443275ad47fbb172bb006aa2da43fdd7ebd9 | [
"MIT"
] | 18 | 2017-07-04T11:10:56.000Z | 2021-07-21T12:38:53.000Z | # coding: utf-8
from __future__ import division
import re
try:
from itertools import izip
except ImportError:
izip = zip
WORD = re.compile(r'\w+') | 48.764706 | 176 | 0.406022 | # coding: utf-8
from __future__ import division
import unicodedata, math, re, sys, string, os, ntpath, numpy as np
from time import gmtime, strftime
from io import open, StringIO
from imp import reload
from difflib import SequenceMatcher
try:
from itertools import izip
except ImportError:
izip = zip
WORD = re.... | 72 | 0 | 0 | 0 | 0 | 21,608 | 0 | 92 | 504 |
fd0c73d36a9eef136cedf435bbbaf020ebd6db4f | 1,455 | py | Python | packages/monomanage/src/monomanage/draw/api.py | 0mars/graphx | 8f58df3979b5fd96e4183811c9d8339c92367d00 | [
"Apache-2.0"
] | null | null | null | packages/monomanage/src/monomanage/draw/api.py | 0mars/graphx | 8f58df3979b5fd96e4183811c9d8339c92367d00 | [
"Apache-2.0"
] | null | null | null | packages/monomanage/src/monomanage/draw/api.py | 0mars/graphx | 8f58df3979b5fd96e4183811c9d8339c92367d00 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2019 Simon Biggs
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version (the "AGPL-3.0+").
# This progr... | 40.416667 | 74 | 0.768385 | # Copyright (C) 2019 Simon Biggs
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version (the "AGPL-3.0+").
# This progr... | 0 | 0 | 0 | 0 | 0 | 123 | 0 | 55 | 90 |
2a890cc6ac3eba416edc773bb131c3af8c69287d | 5,589 | py | Python | src/ingest_validation_tools/error_report.py | pecan88/ingest-validation-tools | f26b08ca4e0ef7bcdc504032850e2b26470199a7 | [
"MIT"
] | 6 | 2020-04-02T19:35:52.000Z | 2021-03-17T20:48:41.000Z | src/ingest_validation_tools/error_report.py | pecan88/ingest-validation-tools | f26b08ca4e0ef7bcdc504032850e2b26470199a7 | [
"MIT"
] | 601 | 2020-03-13T19:34:22.000Z | 2022-03-31T17:35:09.000Z | src/ingest_validation_tools/error_report.py | pecan88/ingest-validation-tools | f26b08ca4e0ef7bcdc504032850e2b26470199a7 | [
"MIT"
] | 12 | 2020-09-23T18:48:54.000Z | 2022-01-06T00:28:13.000Z | from yaml import Dumper
# Force dump not to use alias syntax.
# https://stackoverflow.com/questions/13518819/avoid-references-in-pyyaml
Dumper.ignore_aliases = lambda *args: True
def _build_list(anything, path=None):
'''
>>> flat = _build_list({
... 'nested dict': {
... 'like': 'this'
... | 29.571429 | 86 | 0.509572 | from datetime import datetime
from yaml import Dumper, dump
from webbrowser import open_new_tab
from pathlib import Path
from yattag import Doc, indent
from ingest_validation_tools.message_munger import munge
# Force dump not to use alias syntax.
# https://stackoverflow.com/questions/13518819/avoid-references-in-pyy... | 0 | 0 | 0 | 2,595 | 0 | 0 | 0 | 75 | 134 |
ad02b9fe84b16f1f139083b8fd2109fe31a4c960 | 9,705 | py | Python | src/guesswhat/eval/interactive_dialogue.py | devineproject/guesswhat | 512e136c868ceccf047cdba243cf46037d4037fe | [
"Apache-2.0"
] | 72 | 2017-07-07T04:40:32.000Z | 2021-10-05T13:00:02.000Z | src/guesswhat/eval/interactive_dialogue.py | devineproject/guesswhat | 512e136c868ceccf047cdba243cf46037d4037fe | [
"Apache-2.0"
] | 25 | 2017-06-30T18:35:24.000Z | 2021-11-21T12:01:09.000Z | src/guesswhat/eval/interactive_dialogue.py | devineproject/guesswhat | 512e136c868ceccf047cdba243cf46037d4037fe | [
"Apache-2.0"
] | 40 | 2017-06-30T12:13:17.000Z | 2021-09-25T07:34:54.000Z |
import argparse
import os
import logging
import random
import copy
import tensorflow as tf
from generic.data_provider.iterator import BasicIterator
from generic.data_provider.image_loader import get_img_builder
from guesswhat.models.oracle.oracle_network import OracleNetwork
from guesswhat.models.qgen.qgen_lstm_netw... | 41.474359 | 207 | 0.636064 |
import argparse
import os
from multiprocessing import Pool
import logging
import random
import copy
import tensorflow as tf
from generic.data_provider.iterator import BasicIterator
from generic.tf_utils.evaluator import Evaluator
from generic.data_provider.image_loader import get_img_builder
from guesswhat.models.or... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 44 |
50ef71ed0fe508f68ab133a1aa5e9959294d900c | 953 | py | Python | setup.py | rlipperts/osm-rasterize | d022d52875f38662ee2f9c2fad2a809ab013befc | [
"MIT"
] | null | null | null | setup.py | rlipperts/osm-rasterize | d022d52875f38662ee2f9c2fad2a809ab013befc | [
"MIT"
] | null | null | null | setup.py | rlipperts/osm-rasterize | d022d52875f38662ee2f9c2fad2a809ab013befc | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
test_deps = [
'pytest',
'flake8',
'pylint',
'mypy',
]
extras = {
'test': test_deps
}
setuptools.setup(
name="osm_rasterize",
version="0.0.0",
author="Ruben Lipperts",
author_ema... | 23.825 | 53 | 0.623295 | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
test_deps = [
'pytest',
'flake8',
'pylint',
'mypy',
]
extras = {
'test': test_deps
}
setuptools.setup(
name="osm_rasterize",
version="0.0.0",
author="Ruben Lipperts",
author_ema... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
240690a6d09f6ca766d8aaf6d39f2c8a0eca4604 | 1,539 | py | Python | aleph/index/records.py | gazeti/aleph | f6714c4be038471cfdc6408bfe88dc9e2ed28452 | [
"MIT"
] | 1 | 2017-07-28T12:54:09.000Z | 2017-07-28T12:54:09.000Z | aleph/index/records.py | gazeti/aleph | f6714c4be038471cfdc6408bfe88dc9e2ed28452 | [
"MIT"
] | 7 | 2017-08-16T12:49:23.000Z | 2018-02-16T10:22:11.000Z | aleph/index/records.py | gazeti/aleph | f6714c4be038471cfdc6408bfe88dc9e2ed28452 | [
"MIT"
] | 6 | 2017-07-26T12:29:53.000Z | 2017-08-18T09:35:50.000Z | import logging
from aleph.index.mapping import TYPE_RECORD
from aleph.index.util import query_delete
log = logging.getLogger(__name__)
def clear_records(document_id):
"""Delete all records associated with the given document."""
q = {'term': {'document_id': document_id}}
query_delete(q, doc_type=TYPE_RECO... | 29.037736 | 66 | 0.630929 | import six
import time
import logging
from elasticsearch.helpers import BulkIndexError
from aleph.core import es_index, db
from aleph.index.mapping import TYPE_RECORD
from aleph.model import DocumentRecord
from aleph.index.util import bulk_op, query_delete
from aleph.text import index_form
log = logging.getLogger(__n... | 0 | 0 | 0 | 0 | 726 | 250 | 0 | 58 | 179 |
36b609325bdfe89b7a470ae135cd6540b944d807 | 3,397 | py | Python | adb/linux/platform-tools/systrace/catapult/telemetry/telemetry/web_perf/metrics/startup_unittest.py | llaske/sugarizer-deployment-tool-desktop | 34df1a56b68b15b6771671f87ab66586d60c514a | [
"Apache-2.0"
] | 1 | 2019-01-17T19:03:17.000Z | 2019-01-17T19:03:17.000Z | adb/MACOS/platform-tools/systrace/catapult/telemetry/telemetry/web_perf/metrics/startup_unittest.py | llaske/sugarizer-deployment-tool-desktop | 34df1a56b68b15b6771671f87ab66586d60c514a | [
"Apache-2.0"
] | 2 | 2017-09-08T20:26:05.000Z | 2017-09-08T20:29:07.000Z | adb/windows/platform-tools/systrace/catapult/telemetry/telemetry/web_perf/metrics/startup_unittest.py | llaske/sugarizer-deployment-tool-desktop | 34df1a56b68b15b6771671f87ab66586d60c514a | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
| 33.633663 | 80 | 0.71622 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
import telemetry.timeline.event as timeline_event
from telemetry.testing import test_page_test_results
from telemetry.web_perf.metrics impor... | 0 | 0 | 0 | 3,043 | 0 | 0 | 0 | 78 | 113 |
980fb7650b8d4bbe41c230f09be0aa88510e3537 | 169 | py | Python | launch_app.py | LuxembourgTechSchool/lts-fitbitmonitor-service | 1ad6d401f0593569987e8b5f394366f72d3de5ea | [
"MIT"
] | null | null | null | launch_app.py | LuxembourgTechSchool/lts-fitbitmonitor-service | 1ad6d401f0593569987e8b5f394366f72d3de5ea | [
"MIT"
] | null | null | null | launch_app.py | LuxembourgTechSchool/lts-fitbitmonitor-service | 1ad6d401f0593569987e8b5f394366f72d3de5ea | [
"MIT"
] | null | null | null | from gevent.pywsgi import WSGIServer
import app
app_instance = app.create_app()
http_server = WSGIServer(('127.0.0.1', 8080), app_instance)
http_server.serve_forever() | 24.142857 | 59 | 0.786982 | from gevent.pywsgi import WSGIServer
import app
app_instance = app.create_app()
http_server = WSGIServer(('127.0.0.1', 8080), app_instance)
http_server.serve_forever() | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbd7018fd7f54e3c658bdc186fb2c31dab663594 | 27,454 | py | Python | Main.py | RoboticMind/Gridcoin-Slack-Tipbot | 19ca409b23d3d6463ed916698cf2955c48cbcf47 | [
"MIT"
] | 1 | 2022-03-07T07:49:42.000Z | 2022-03-07T07:49:42.000Z | Main.py | RoboticMind/Gridcoin-Slack-Tipbot | 19ca409b23d3d6463ed916698cf2955c48cbcf47 | [
"MIT"
] | null | null | null | Main.py | RoboticMind/Gridcoin-Slack-Tipbot | 19ca409b23d3d6463ed916698cf2955c48cbcf47 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
if __name__ == "__main__":
global main_json
app.run(debug=False,threaded=True)
| 40.915052 | 451 | 0.665477 | from RPC import *
from Slack_Connection import *
from flask import Flask, request, Response
from decimal import *
from fractions import *
from Python_Hash import *
import os
import time
app = Flask(__name__)
def get_minimum_transaction_size():
with open("Config/min-transaction-size.txt") as file:
retu... | 0 | 1,455 | 0 | 0 | 0 | 25,301 | 0 | 8 | 555 |
05e8b623f889d82018e9585037b0879e1e151079 | 46 | py | Python | tests/tasks/sodasql/__init__.py | concreted/prefect | dd732f5990ee2b0f3d816adb285168fd63b239e4 | [
"Apache-2.0"
] | 8,633 | 2019-03-23T17:51:03.000Z | 2022-03-31T22:17:42.000Z | tests/tasks/sodasql/__init__.py | concreted/prefect | dd732f5990ee2b0f3d816adb285168fd63b239e4 | [
"Apache-2.0"
] | 3,903 | 2019-03-23T19:11:21.000Z | 2022-03-31T23:21:23.000Z | tests/tasks/sodasql/__init__.py | ngriffiths13/prefect | 7f5613abcb182494b7dc12159277c3bc5f3c9898 | [
"Apache-2.0"
] | 937 | 2019-03-23T18:49:44.000Z | 2022-03-31T21:45:13.000Z | import pytest
pytest.importorskip("sodasql")
| 11.5 | 30 | 0.804348 | import pytest
pytest.importorskip("sodasql")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2aa9bb37b9056e8c27c42f3ffddbdeab93cee3f4 | 1,615 | py | Python | examples/world_example.py | ABostrom/py_adventure | 4e2765be1d05aba45c3a45280aeea0b709814d63 | [
"MIT"
] | 2 | 2020-10-12T13:33:31.000Z | 2020-10-14T12:00:40.000Z | examples/world_example.py | ABostrom/py_adventure | 4e2765be1d05aba45c3a45280aeea0b709814d63 | [
"MIT"
] | null | null | null | examples/world_example.py | ABostrom/py_adventure | 4e2765be1d05aba45c3a45280aeea0b709814d63 | [
"MIT"
] | 1 | 2021-04-30T08:10:34.000Z | 2021-04-30T08:10:34.000Z | from py_adventure import PointOfInterest
from py_adventure import ZoneConnection
from py_adventure import City, Zone, Location, Building
from py_adventure import Region
from typing import Dict, List
barrel : PointOfInterest = PointOfInterest("Barrel")
gate : Location = Location("City Gate")
inn : Location = Buildi... | 25.234375 | 61 | 0.723839 | from py_adventure import PointOfInterest
from py_adventure import ZoneConnection
from py_adventure import City, Zone, Location, Building
from py_adventure import Region
from typing import Dict, List
barrel : PointOfInterest = PointOfInterest("Barrel")
gate : Location = Location("City Gate")
inn : Location = Buildi... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e6742061c0ba67cbd67700b553a644503d8034c7 | 2,105 | py | Python | 2016/python/day8.py | jO-Osko/adventofcode2015 | 274fe880b91dffff5fba15220c9045a933e319ec | [
"MIT"
] | null | null | null | 2016/python/day8.py | jO-Osko/adventofcode2015 | 274fe880b91dffff5fba15220c9045a933e319ec | [
"MIT"
] | null | null | null | 2016/python/day8.py | jO-Osko/adventofcode2015 | 274fe880b91dffff5fba15220c9045a933e319ec | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = "Filip Koprivec"
from helper import get_file
DAY = 8
HEIGHT = 6
WIDTH = 50
data = [line.strip() for line in get_file(DAY)]
print(part1(data))
print(part2(data))
| 24.195402 | 65 | 0.430879 | # -*- coding: utf-8 -*-
__author__ = "Filip Koprivec"
from helper import get_file
DAY = 8
HEIGHT = 6
WIDTH = 50
data = [line.strip() for line in get_file(DAY)]
def part1(data):
screen = [["." for k in range(WIDTH)] for j in range(HEIGHT)]
for line in data:
cmd, *rest = line.split(" ", 1)
... | 0 | 0 | 0 | 0 | 0 | 1,850 | 0 | 0 | 46 |
d5cbf354618f1283683aac70b1bdc1d8054c347a | 598 | py | Python | HW2/code_review/q2/reducer.py | CrossD/Stuff | 1556f046c73488b9e52e06a67324b959fd1af534 | [
"MIT"
] | null | null | null | HW2/code_review/q2/reducer.py | CrossD/Stuff | 1556f046c73488b9e52e06a67324b959fd1af534 | [
"MIT"
] | null | null | null | HW2/code_review/q2/reducer.py | CrossD/Stuff | 1556f046c73488b9e52e06a67324b959fd1af534 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# from operator import itemgetter
import sys
last_group = None
current_count = 1
# input comes from STDIN
for line in sys.stdin:
# Remove trailing '\n'
line = line.strip()
# Extract (key,value)
vs = line.split('\t')
# print vs[0]
current_group = vs[0].strip()
if last... | 22.148148 | 43 | 0.635452 | #!/usr/bin/env python
# from operator import itemgetter
import sys
last_group = None
current_count = 1
# input comes from STDIN
for line in sys.stdin:
# Remove trailing '\n'
line = line.strip()
# Extract (key,value)
vs = line.split('\t')
# print vs[0]
current_group = vs[0].strip()
if last... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c273d771d285b1dfd2707b7f1a4e798420a388cb | 901 | py | Python | tui/widgets/label.py | sweettuse/texttui | 773a6bd1cafda5cded2333c6782fdb379b77c8ed | [
"BSD-2-Clause"
] | 3 | 2022-02-09T03:25:49.000Z | 2022-02-10T04:54:34.000Z | tui/widgets/label.py | sweettuse/texttui | 773a6bd1cafda5cded2333c6782fdb379b77c8ed | [
"BSD-2-Clause"
] | null | null | null | tui/widgets/label.py | sweettuse/texttui | 773a6bd1cafda5cded2333c6782fdb379b77c8ed | [
"BSD-2-Clause"
] | 2 | 2022-02-10T04:54:57.000Z | 2022-02-10T05:50:00.000Z | from __future__ import annotations
| 25.027778 | 61 | 0.601554 | from __future__ import annotations
import rich
from rich.align import Align
from rich.style import Style, StyleType
from textual.widget import Reactive, Widget
class Label(Widget):
def __init__(
self,
label: str,
style: StyleType = "bold",
name: str | None = None,
align: s... | 0 | 0 | 0 | 715 | 0 | 0 | 0 | 37 | 113 |
75fce0614ba5dae29fdccb541feb0832d2f980cf | 12,828 | py | Python | package/code/gtfs_process/data_engineering/enrich_travel.py | highered-esricanada/Parallel-GTFS-Workflow | 5386ca58708cfcf3e9aa901b02e273b98dfe2fcb | [
"MIT"
] | null | null | null | package/code/gtfs_process/data_engineering/enrich_travel.py | highered-esricanada/Parallel-GTFS-Workflow | 5386ca58708cfcf3e9aa901b02e273b98dfe2fcb | [
"MIT"
] | null | null | null | package/code/gtfs_process/data_engineering/enrich_travel.py | highered-esricanada/Parallel-GTFS-Workflow | 5386ca58708cfcf3e9aa901b02e273b98dfe2fcb | [
"MIT"
] | null | null | null | """
Author: Anastassios Dardas, PhD - Higher Education Specialist at the Education & Research at Esri Canada.
Date: Re-modified Q1 - 2022
About:
"""
| 50.703557 | 237 | 0.664718 | """
Author: Anastassios Dardas, PhD - Higher Education Specialist at the Education & Research at Esri Canada.
Date: Re-modified Q1 - 2022
About:
"""
from pandas import DataFrame
from ..util import TimeDelta, SpatialDelta
class RteEnricher:
def __init__(self, clean_df: DataFrame, undiss_df, stp_df: Da... | 0 | 0 | 0 | 12,571 | 0 | 0 | 0 | 28 | 72 |
9f3f5d7cb3da60a58ddf422c60347e212e92b80d | 2,982 | py | Python | kwiklib/dataio/probe.py | fiath/test | b50898dafa90e93da48f573e0b3feb1bb6acd8de | [
"MIT",
"BSD-3-Clause"
] | 7 | 2015-01-20T13:55:51.000Z | 2018-02-06T09:31:21.000Z | kwiklib/dataio/probe.py | fiath/test | b50898dafa90e93da48f573e0b3feb1bb6acd8de | [
"MIT",
"BSD-3-Clause"
] | 6 | 2015-01-08T18:13:53.000Z | 2016-06-22T09:53:53.000Z | kwiklib/dataio/probe.py | fiath/test | b50898dafa90e93da48f573e0b3feb1bb6acd8de | [
"MIT",
"BSD-3-Clause"
] | 8 | 2015-01-22T22:57:19.000Z | 2020-03-19T11:43:56.000Z | """This module provides functions used to generate and load probe files."""
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
import itertools
# ----------------------------------------------------... | 32.413043 | 79 | 0.514085 | """This module provides functions used to generate and load probe files."""
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
import os
import pprint
import itertools
from tools import MemMappedText... | 0 | 0 | 0 | 0 | 0 | 236 | 0 | 7 | 143 |
4032e29b743868d23c95303949c7f8be39e46b7a | 6,653 | py | Python | tests/components/mfi/test_sensor.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 7 | 2019-08-15T13:36:58.000Z | 2020-03-18T10:46:29.000Z | tests/components/mfi/test_sensor.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 100 | 2020-06-17T22:22:41.000Z | 2022-03-31T06:24:19.000Z | tests/components/mfi/test_sensor.py | winning1120xx/home-assistant | 53d4c0ce2d374b5e97bbdc37742656c27adf8eea | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """The tests for the mFi sensor platform."""
import unittest.mock as mock
import homeassistant.components.mfi.sensor as mfi
import homeassistant.components.sensor as sensor_component
PLATFORM = mfi
COMPONENT = sensor_component
THING = "sensor"
GOOD_CONFIG = {
"sensor": {
"platform": "mfi",
"host":... | 33.099502 | 84 | 0.681647 | """The tests for the mFi sensor platform."""
import unittest.mock as mock
from mficlient.client import FailedToLogin
import pytest
import requests
import homeassistant.components.mfi.sensor as mfi
import homeassistant.components.sensor as sensor_component
from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP... | 0 | 226 | 5,309 | 0 | 0 | 0 | 0 | 88 | 548 |
6af98a51ccaa0e397fde107282bf1f5ba5d8d7b8 | 6,884 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/module_utils/network/eos/config/lacp_interfaces/lacp_interfaces.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/venv/lib/python2.7/site-packages/ansible/module_utils/network/eos/config/lacp_interfaces/lacp_interfaces.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/venv/lib/python2.7/site-packages/ansible/module_utils/network/eos/config/lacp_interfaces/lacp_interfaces.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | # -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The eos_lacp_interfaces class
It is in this file where the current configuration (as dict)
is compared to the provided configuration (as dict) and the command set
necessary... | 32.018605 | 107 | 0.622894 | # -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The eos_lacp_interfaces class
It is in this file where the current configuration (as dict)
is compared to the provided configuration (as dict) and the command set
necessary... | 0 | 2,541 | 0 | 3,091 | 0 | 416 | 0 | 213 | 135 |
e6b45d0d9e51c9dc6728577cd71a8df214401175 | 1,267 | py | Python | main.py | Dany013/meet-attender | 1e29048df95aa773953490ecc68ad41d0ae9142b | [
"MIT"
] | null | null | null | main.py | Dany013/meet-attender | 1e29048df95aa773953490ecc68ad41d0ae9142b | [
"MIT"
] | null | null | null | main.py | Dany013/meet-attender | 1e29048df95aa773953490ecc68ad41d0ae9142b | [
"MIT"
] | null | null | null | import os
import tkinter as tk
os.chdir(os.getcwd())
self = tk.Tk()
self.title("meet")
self.resizable(0, 0)
self.grid()
ch_time = tk.Button(self, text="CHANGE SCHEDULE", command=exc)
ch_time.grid(row=0, column=0, sticky="nswe")
ch_link = tk.Button(self, text="CHANGE LINKS", command=lnk)
ch_l... | 23.90566 | 75 | 0.659826 | import os
import sys
import threading
import tkinter as tk
os.chdir(os.getcwd())
self = tk.Tk()
self.title("meet")
self.resizable(0, 0)
self.grid()
def strt():
os.system("python main.py")
def exc():
os.startfile("schedule.xlsx")
def lnk():
os.startfile("meet-link.json")
de... | 0 | 0 | 0 | 0 | 0 | 128 | 0 | -16 | 171 |
edff084c7f8d8cf7747e5d8b6ac0a224fad1ac17 | 57 | py | Python | apps/markets3/__init__.py | uktrade/enav-alpha | 8d38f05763367ca6b6747203241f267612fd6e44 | [
"MIT"
] | null | null | null | apps/markets3/__init__.py | uktrade/enav-alpha | 8d38f05763367ca6b6747203241f267612fd6e44 | [
"MIT"
] | 67 | 2016-07-11T12:57:58.000Z | 2016-08-08T12:59:19.000Z | apps/markets3/__init__.py | UKTradeInvestment/enav-alpha | 8d38f05763367ca6b6747203241f267612fd6e44 | [
"MIT"
] | null | null | null | default_app_config = 'apps.markets3.apps.Markets3Config'
| 28.5 | 56 | 0.842105 | default_app_config = 'apps.markets3.apps.Markets3Config'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e13fb19614fc68c7f13ee01ff2579502976fc093 | 1,781 | py | Python | tools/sanitize_junitxml.py | osrf/cloudsim-legacy | 01ea7dd2708ed9797a860ac839028ec62fd96a23 | [
"Apache-2.0"
] | null | null | null | tools/sanitize_junitxml.py | osrf/cloudsim-legacy | 01ea7dd2708ed9797a860ac839028ec62fd96a23 | [
"Apache-2.0"
] | null | null | null | tools/sanitize_junitxml.py | osrf/cloudsim-legacy | 01ea7dd2708ed9797a860ac839028ec62fd96a23 | [
"Apache-2.0"
] | 1 | 2021-03-16T15:00:51.000Z | 2021-03-16T15:00:51.000Z | #!/usr/bin/env python
import os
import codecs
import re
import sys
# Borrowed from rosunit
## unit test suites are not good about screening out illegal
## unicode characters. This little recipe I from http://boodebr.org/main/python/all-about-python-and-unicode#UNI_XML
## screens these out
RE_XML_ILLEGAL = u'([\u0000... | 32.981481 | 116 | 0.568782 | #!/usr/bin/env python
import os
import codecs
import re
import sys
# Borrowed from rosunit
## unit test suites are not good about screening out illegal
## unicode characters. This little recipe I from http://boodebr.org/main/python/all-about-python-and-unicode#UNI_XML
## screens these out
RE_XML_ILLEGAL = u'([\u0000... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
021f1d33629a142f5ca040ae826f680a01d1eab3 | 3,300 | py | Python | tests/test_format.py | erkia/rivescript-python | a28deb389d88c2a3f988dd93e15a04c0e536704e | [
"MIT"
] | 154 | 2015-02-04T08:41:23.000Z | 2022-03-18T19:39:53.000Z | tests/test_format.py | erkia/rivescript-python | a28deb389d88c2a3f988dd93e15a04c0e536704e | [
"MIT"
] | 115 | 2015-06-14T13:31:07.000Z | 2022-02-14T23:02:19.000Z | tests/test_format.py | erkia/rivescript-python | a28deb389d88c2a3f988dd93e15a04c0e536704e | [
"MIT"
] | 87 | 2015-04-18T23:15:18.000Z | 2022-03-18T09:52:06.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
| 35.106383 | 115 | 0.477576 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from .config import RiveScriptTestCase
class MessageFormatTests(RiveScriptTestCase):
"""Test format message."""
def test_format_message(self):
self.new("""
+ hello bot
- hell... | 0 | 0 | 0 | 3,133 | 0 | 0 | 0 | 17 | 46 |
6feca837f59280a582dbcf726c80b99b3bd4518e | 313 | py | Python | DeathSwitch/Config.py | henfredemars/python-personal-projects | b5939e8d5d1a528c0ce74ac85524c31674c96244 | [
"MIT"
] | null | null | null | DeathSwitch/Config.py | henfredemars/python-personal-projects | b5939e8d5d1a528c0ce74ac85524c31674c96244 | [
"MIT"
] | null | null | null | DeathSwitch/Config.py | henfredemars/python-personal-projects | b5939e8d5d1a528c0ce74ac85524c31674c96244 | [
"MIT"
] | null | null | null | #Some configuration parameters
from datetime import timedelta
host = "mail.messagingengine.com"
port = 465
email = "*********@fastmail.com"
password = "password"
touchfile = "/home/henfredemars/.bashrc"
time_to_wait = timedelta(14)
check_period = timedelta(0,0,0,0,30)
min_sane_year = 2016
max_sane_year = 3016
| 22.357143 | 40 | 0.747604 | #Some configuration parameters
from datetime import timedelta
host = "mail.messagingengine.com"
port = 465
email = "*********@fastmail.com"
password = "password"
touchfile = "/home/henfredemars/.bashrc"
time_to_wait = timedelta(14)
check_period = timedelta(0,0,0,0,30)
min_sane_year = 2016
max_sane_year = 3016
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1a29a4d673889cd9227ff3291f1c12f022c1e5bd | 7,329 | py | Python | E2E/networks/FCnet_pytorch.py | FrancescoMarra/E2E-ForgeryDetection | 352a788cdbe00184a6a29158c5c315a9832b326e | [
"BSD-4-Clause-UC"
] | 26 | 2020-04-10T13:25:12.000Z | 2022-03-20T12:27:02.000Z | E2E/networks/FCnet_pytorch.py | FrancescoMarra/E2E-ForgeryDetection | 352a788cdbe00184a6a29158c5c315a9832b326e | [
"BSD-4-Clause-UC"
] | 10 | 2020-04-05T10:42:47.000Z | 2022-03-12T00:12:23.000Z | E2E/networks/FCnet_pytorch.py | FrancescoMarra/E2E-ForgeryDetection | 352a788cdbe00184a6a29158c5c315a9832b326e | [
"BSD-4-Clause-UC"
] | 5 | 2020-04-05T10:44:36.000Z | 2022-03-29T06:41:03.000Z | # -*- coding: utf-8 -*-
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
# Copyright (c) 2019 Image Processing Research Group of University Federico II of Naples ('GRIP-UNINA').
# All rights reserved.
# This work should only be used for nonprofit purposes.
#
# By downloading and/or using an... | 43.111765 | 159 | 0.585073 | # -*- coding: utf-8 -*-
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
# Copyright (c) 2019 Image Processing Research Group of University Federico II of Naples ('GRIP-UNINA').
# All rights reserved.
# This work should only be used for nonprofit purposes.
#
# By downloading and/or using an... | 0 | 0 | 0 | 2,774 | 0 | 3,745 | 0 | 35 | 205 |
26a45aa2a62f42248727ef8a913017d53af4b073 | 2,124 | py | Python | opencv_tutorial/opencv_python_tutorials/Image_Processing/image_pyramids.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv_python_tutorials/Image_Processing/image_pyramids.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | opencv_tutorial/opencv_python_tutorials/Image_Processing/image_pyramids.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 1 14:39:33 2019
@author: jone
"""
#%% Gaussian Pyramids
import cv2
img = cv2.imread('img/monkey.tiff')
lower_reso = cv2.pyrDown(img) # 1/4
higher_reso = cv2.pyrUp(img) # 4
cv2.imshow('img', img)
cv2.imshow('lower', lower_reso)
cv2.imshow('higher', higher_r... | 19.135135 | 69 | 0.620527 | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 1 14:39:33 2019
@author: jone
"""
#%% Gaussian Pyramids
import cv2
img = cv2.imread('img/monkey.tiff')
lower_reso = cv2.pyrDown(img) # 원본 이미지의 1/4 사이즈
higher_reso = cv2.pyrUp(img) # 원본 이미지의 4배 사이즈
cv2.imshow('img', img)
cv2.imshow('lower', lower_reso)
cv2.imshow... | 450 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b3771d1bce1aa0d85dd8aaee017490daad6aa1a5 | 1,522 | py | Python | product/migrations/0001_initial.py | michwh/onehome-server | 4ee6599e1d320a249f55fb8682693b649416bb0f | [
"MIT"
] | 26 | 2019-03-08T01:11:23.000Z | 2021-09-13T08:45:30.000Z | product/migrations/0001_initial.py | gaozongji/onehome-server | 4ee6599e1d320a249f55fb8682693b649416bb0f | [
"MIT"
] | 7 | 2020-02-11T23:44:42.000Z | 2022-03-11T23:39:57.000Z | product/migrations/0001_initial.py | gaozongji/onehome-server | 4ee6599e1d320a249f55fb8682693b649416bb0f | [
"MIT"
] | 11 | 2019-04-05T04:51:29.000Z | 2021-01-10T08:26:38.000Z | # Generated by Django 2.1.2 on 2019-01-17 02:37
| 33.822222 | 87 | 0.521682 | # Generated by Django 2.1.2 on 2019-01-17 02:37
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Collection',
fields=[
('id', models.AutoFie... | 36 | 0 | 0 | 1,396 | 0 | 0 | 0 | 19 | 46 |
603404fd91f24cee3048f98688861113496dce4d | 117 | py | Python | Python/CeV/Exercicios/ex5.py | WerickL/Learning | 5a9a488f0422454e612439b89093d5bc11242e65 | [
"MIT"
] | null | null | null | Python/CeV/Exercicios/ex5.py | WerickL/Learning | 5a9a488f0422454e612439b89093d5bc11242e65 | [
"MIT"
] | null | null | null | Python/CeV/Exercicios/ex5.py | WerickL/Learning | 5a9a488f0422454e612439b89093d5bc11242e65 | [
"MIT"
] | null | null | null | n = int(input('digite um nmero:'))
print('O antecessor do nmero {} {}, e o sucessor {}!'.format(n, n-1, n+1))
| 39 | 80 | 0.598291 | n = int(input('digite um número:'))
print('O antecessor do número {} é {}, e o sucessor é {}!'.format(n, n-1, n+1))
| 8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fa1587a6e0adbb5d1a169c239bdedad30265d37a | 5,878 | py | Python | src/m2_Extra.py | Kent1227/99-CapstoneProject-201920 | 53399ebb2131f5e1d547413ae782ba065f99cef8 | [
"MIT"
] | null | null | null | src/m2_Extra.py | Kent1227/99-CapstoneProject-201920 | 53399ebb2131f5e1d547413ae782ba065f99cef8 | [
"MIT"
] | null | null | null | src/m2_Extra.py | Kent1227/99-CapstoneProject-201920 | 53399ebb2131f5e1d547413ae782ba065f99cef8 | [
"MIT"
] | null | null | null | #
# This is the beginning of Eddie's Extra file for the Final Capstone Project
# The idea behind this design is to make an accurate representation of a Rose-Hulman Student
#
# The rosebot import was added in order for me to use the dot trick
# def beep_proxy(robot, initial, delta, speed):
# ps = robot.sensor_sy... | 35.409639 | 116 | 0.690031 | #
# This is the beginning of Eddie's Extra file for the Final Capstone Project
# The idea behind this design is to make an accurate representation of a Rose-Hulman Student
#
# The rosebot import was added in order for me to use the dot trick
import rosebot
import time
# def beep_proxy(robot, initial, delta, speed)... | 0 | 0 | 0 | 0 | 0 | 3,271 | 0 | -17 | 182 |
886985500f902e41f6cbac744d21f7967ca5f7e7 | 10,241 | py | Python | src/bpp/models/wydawnictwo_zwarte.py | iplweb/bpp | f027415cc3faf1ca79082bf7bacd4be35b1a6fdf | [
"BSD-3-Clause"
] | null | null | null | src/bpp/models/wydawnictwo_zwarte.py | iplweb/bpp | f027415cc3faf1ca79082bf7bacd4be35b1a6fdf | [
"BSD-3-Clause"
] | 41 | 2019-11-07T00:07:02.000Z | 2022-02-27T22:09:39.000Z | src/bpp/models/wydawnictwo_zwarte.py | iplweb/bpp | f027415cc3faf1ca79082bf7bacd4be35b1a6fdf | [
"BSD-3-Clause"
] | null | null | null | # -*- encoding: utf-8 -*-
import re
MIEJSCE_I_ROK_MAX_LENGTH = 256
rok_regex = re.compile(r"\s[12]\d\d\d")
| 30.570149 | 112 | 0.683332 | # -*- encoding: utf-8 -*-
import re
import warnings
from denorm import denormalized, depend_on_related
from dirtyfields.dirtyfields import DirtyFieldsMixin
from django.db import models
from django.db.models import CASCADE, PROTECT
from django.db.models.expressions import RawSQL
from django.contrib.contenttypes.fields... | 150 | 2,337 | 0 | 6,211 | 0 | 0 | 0 | 1,030 | 471 |
dfc56194264825b9409ec25826c21ead408cdf2b | 199 | py | Python | {{cookiecutter.project_slug}}/config/settings/test.py | dakzh/cookiecutter-django-api | 253d6a96b6092c1218dba2ff3f24169a6363e4ff | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/config/settings/test.py | dakzh/cookiecutter-django-api | 253d6a96b6092c1218dba2ff3f24169a6363e4ff | [
"BSD-3-Clause"
] | 4 | 2021-03-19T03:24:13.000Z | 2021-09-22T19:00:54.000Z | {{cookiecutter.project_slug}}/config/settings/test.py | dakzh/cookiecutter-django-api | 253d6a96b6092c1218dba2ff3f24169a6363e4ff | [
"BSD-3-Clause"
] | null | null | null | from .base import env
# GENERAL
SECRET_KEY = env(
"DJANGO_SECRET_KEY",
default="!!!SET DJANGO_SECRET_KEY!!!",
)
TEST_RUNNER = "django.test.runner.DiscoverRunner"
| 19.9 | 49 | 0.703518 | from .base import * # noqa
from .base import env
# GENERAL
SECRET_KEY = env(
"DJANGO_SECRET_KEY",
default="!!!SET DJANGO_SECRET_KEY!!!",
)
TEST_RUNNER = "django.test.runner.DiscoverRunner"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -2 | 30 |
6b12ac8ce00e432226e276bb544b94efce354dfe | 4,472 | py | Python | common_nyu.py | itineraries/scheduler-and-mapper | 18c79167596b05739ad003f73c6c015d1cee8e72 | [
"MIT"
] | null | null | null | common_nyu.py | itineraries/scheduler-and-mapper | 18c79167596b05739ad003f73c6c015d1cee8e72 | [
"MIT"
] | 1 | 2018-04-29T08:24:41.000Z | 2018-04-29T08:24:41.000Z | ctip/scheduler-and-mapper/common_nyu.py | itineraries/flask-app | d94ffa484358e843f12466c79b9387418b5175b2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from common import file_in_this_dir
NYU_PICKLE = file_in_this_dir("NYU.pickle")
DAYS_OF_WEEK = (
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
)
| 42.590476 | 79 | 0.630367 | #!/usr/bin/env python3
import attr, collections, datetime
from common import file_in_this_dir
NYU_PICKLE = file_in_this_dir("NYU.pickle")
DAYS_OF_WEEK = (
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
)
def _deques_increasing_first(list_of_deques, greater_than... | 0 | 2,591 | 0 | 0 | 1,551 | 0 | 0 | 13 | 90 |
16c4b4235cced384a6bb0b400b8b6044cefc2a83 | 895 | py | Python | parse.py | jt28828/-fontawesome-enum-generator | 30b27885f3c3dadb5b17af5033b4c57169dda8f4 | [
"Unlicense"
] | null | null | null | parse.py | jt28828/-fontawesome-enum-generator | 30b27885f3c3dadb5b17af5033b4c57169dda8f4 | [
"Unlicense"
] | null | null | null | parse.py | jt28828/-fontawesome-enum-generator | 30b27885f3c3dadb5b17af5033b4c57169dda8f4 | [
"Unlicense"
] | null | null | null | import json
from http.client import HTTPResponse
from typing import Dict
from urllib import request
def read_icons_json() -> Dict:
"""Opens the icons.json and converts into a json object"""
json_file: HTTPResponse = request.urlopen(
"https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/me... | 27.121212 | 96 | 0.774302 | import json
from http.client import HTTPResponse
from typing import TextIO, Dict
from urllib import request
from platforms.cpp import as_cpp_enum
from platforms.csharp import as_csharp_enum
from platforms.java import as_java_enum
from platforms.python import as_python_enum
from platforms.typescript import as_typescrip... | 0 | 0 | 0 | 0 | 0 | 209 | 0 | 116 | 134 |
9ba05970e994b87ae3a885e7676a8b4773c7f636 | 10,488 | py | Python | EEGNAS/utilities/data_utils.py | puzis/OverflowPrediction | 01341df701e513025cb427d4cdf1db0868a5963b | [
"MIT"
] | 5 | 2019-11-19T11:53:23.000Z | 2022-03-11T05:54:46.000Z | EEGNAS/utilities/data_utils.py | puzis/OverflowPrediction | 01341df701e513025cb427d4cdf1db0868a5963b | [
"MIT"
] | 5 | 2020-05-29T23:53:14.000Z | 2022-03-12T00:05:11.000Z | EEGNAS/utilities/data_utils.py | erap129/EEGNAS | 1d9c94b106d40317146f7f09d79fad489f1059dc | [
"MIT"
] | 1 | 2021-12-17T14:25:04.000Z | 2021-12-17T14:25:04.000Z | import numpy as np
# def EEG_to_TF_mike(dataset):
# for segment in dataset.keys():
# TF_list = []
# for example in range(len(dataset[segment].X)):
# for channel_idx in lenexample:
# tf = get_tf_data_efficient(example[None, :, :], eeg_chan,
# ... | 40.338462 | 131 | 0.600973 | import os
from copy import deepcopy
import mne
import torch
from braindecode.torch_ext.util import np_to_var
from mne.time_frequency import tfr_morlet
from EEGNAS import global_vars
import numpy as np
from scipy.io import savemat
from PIL import Image
from EEGNAS.utilities.misc import create_folder, label_by_idx, uni... | 0 | 0 | 0 | 0 | 0 | 9,106 | 0 | 179 | 702 |
5c2a77eb4d2f7a165f41b1eba1961ca14e7b9aff | 1,726 | py | Python | tick/linear_model/tests/model_hinge_test.py | sumau/tick | 1b56924a35463e12f7775bc0aec182364f26f2c6 | [
"BSD-3-Clause"
] | 411 | 2017-03-30T15:22:05.000Z | 2022-03-27T01:58:34.000Z | tick/linear_model/tests/model_hinge_test.py | saurabhdash/tick | bbc561804eb1fdcb4c71b9e3e2d83a66e7b13a48 | [
"BSD-3-Clause"
] | 345 | 2017-04-13T14:53:20.000Z | 2022-03-26T00:46:22.000Z | tick/linear_model/tests/model_hinge_test.py | saurabhdash/tick | bbc561804eb1fdcb4c71b9e3e2d83a66e7b13a48 | [
"BSD-3-Clause"
] | 102 | 2017-04-25T11:47:53.000Z | 2022-02-15T11:45:49.000Z | # License: BSD 3 clause
import unittest
if __name__ == '__main__':
unittest.main()
| 33.192308 | 78 | 0.672654 | # License: BSD 3 clause
import unittest
import numpy as np
from scipy.sparse import csr_matrix
from tick.linear_model import SimuLogReg, ModelHinge
from tick.base_model.tests.generalized_linear_model import TestGLM
class ModelHingeTest(object):
def test_ModelHinge(self):
"""...Numerical consistency che... | 0 | 0 | 0 | 1,387 | 0 | 0 | 0 | 87 | 159 |
cabb93dc958813657f0ef4295e937bba72d8c4bf | 2,473 | py | Python | ui/ChannelVersionItem.py | game-platform-awaresome/XSdkTools | 2d5454f998014c130a28695dfcd9da155d20c9e9 | [
"MIT"
] | 2 | 2020-09-24T10:47:27.000Z | 2020-09-24T10:49:57.000Z | ui/ChannelVersionItem.py | game-platform-awaresome/XSdkTools | 2d5454f998014c130a28695dfcd9da155d20c9e9 | [
"MIT"
] | null | null | null | ui/ChannelVersionItem.py | game-platform-awaresome/XSdkTools | 2d5454f998014c130a28695dfcd9da155d20c9e9 | [
"MIT"
] | 4 | 2019-03-25T04:22:30.000Z | 2021-05-16T12:52:41.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ChannelVersionItem.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
try:
_e... | 32.116883 | 86 | 0.672463 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ChannelVersionItem.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fro... | 18 | 0 | 0 | 1,767 | 0 | 200 | 0 | 0 | 101 |
38532ff4490c410439672db3e62f93714c2f46ba | 4,077 | py | Python | tools/collect_data.py | arora-anmol/producer-consumer | 92c15c1e6ef47e970becfb6a1f14ab0b7c4b83a4 | [
"MIT"
] | null | null | null | tools/collect_data.py | arora-anmol/producer-consumer | 92c15c1e6ef47e970becfb6a1f14ab0b7c4b83a4 | [
"MIT"
] | null | null | null | tools/collect_data.py | arora-anmol/producer-consumer | 92c15c1e6ef47e970becfb6a1f14ab0b7c4b83a4 | [
"MIT"
] | null | null | null | import subprocess
import re
import os
from math import sqrt
import sys
# SETTINGS
PROG = "./produce.out"
# FOR TESTING: reduce this number when debugging
X = 500 # number of times to repeat the test
# This data structure holds the raw data for each test run
times = []
DEBUG = True
def call_produce(program, cmd_str... | 30.654135 | 125 | 0.498896 | import subprocess
import re
import os
from math import sqrt
import sys
# SETTINGS
PROG = "./produce.out"
# FOR TESTING: reduce this number when debugging
X = 500 # number of times to repeat the test
# This data structure holds the raw data for each test run
times = []
DEBUG = True
def call_produce(program, cmd_str... | 0 | 0 | 0 | 0 | 0 | 80 | 0 | 0 | 23 |
f63cabc66794453590aa81d01864709fb76f69b4 | 946 | py | Python | example/client.py | aaronluoq/python-flask | 74bfe8bcd00eee9ce75a15c1634fda4c5d5f26ca | [
"BSD-3-Clause"
] | 136 | 2016-08-24T17:57:45.000Z | 2022-03-17T03:43:19.000Z | example/client.py | aaronluoq/python-flask | 74bfe8bcd00eee9ce75a15c1634fda4c5d5f26ca | [
"BSD-3-Clause"
] | 43 | 2016-12-21T19:11:33.000Z | 2021-06-16T09:10:16.000Z | example/client.py | aaronluoq/python-flask | 74bfe8bcd00eee9ce75a15c1634fda4c5d5f26ca | [
"BSD-3-Clause"
] | 45 | 2016-09-04T03:23:25.000Z | 2022-03-12T20:38:18.000Z | import requests
import time
from opentracing_instrumentation.client_hooks import install_all_patches
from jaeger_client import Config
from os import getenv
JAEGER_HOST = getenv('JAEGER_HOST', 'localhost')
WEBSERVER_HOST = getenv('WEBSERVER_HOST', 'localhost')
# Create configuration object with enabled logging and sa... | 33.785714 | 99 | 0.729387 | import requests
import time
from opentracing_instrumentation.client_hooks import install_all_patches
from jaeger_client import Config
from os import getenv
JAEGER_HOST = getenv('JAEGER_HOST', 'localhost')
WEBSERVER_HOST = getenv('WEBSERVER_HOST', 'localhost')
# Create configuration object with enabled logging and sa... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dbc6bc86b5512dd0aa5c362462417049896f7956 | 695 | py | Python | keybr worldrecord.py | MarcPartensky/Python-2020 | 1a4ef2edfea6efb353249d5e32c06b230b293c62 | [
"MIT"
] | 1 | 2020-09-02T10:41:49.000Z | 2020-09-02T10:41:49.000Z | keybr worldrecord.py | MarcPartensky/Python-2020 | 1a4ef2edfea6efb353249d5e32c06b230b293c62 | [
"MIT"
] | null | null | null | keybr worldrecord.py | MarcPartensky/Python-2020 | 1a4ef2edfea6efb353249d5e32c06b230b293c62 | [
"MIT"
] | null | null | null | from selenium import webdriver
import pyautogui
import time
driver = webdriver.Chrome()
driver.get('https://www.keybr.com/multiplayer')
while True:
ticker = driver.find_element_by_class_name('Ticker')
if ticker.text == "GO!":
break
inp = driver.find_element_by_class_name('TextInput-fragment')
tex... | 23.166667 | 62 | 0.682014 | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import pyautogui
import time
driver = webdriver.Chrome()
driver.get('https://www.keybr.com/multiplayer')
while True:
ticker = driver.find_element_by_class_name('Ticker')
if ticker.text == "GO!":
break
inp = driver.find_... | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 22 |
c2e4b3ca08f10bf7b9d3d1495957a84fd669d006 | 122 | py | Python | Lab3/gauss/__init__.py | neseleznev/urfu-CompExp | 33101e34c6df893b0b19517d694dc55dc7e98f6f | [
"MIT"
] | null | null | null | Lab3/gauss/__init__.py | neseleznev/urfu-CompExp | 33101e34c6df893b0b19517d694dc55dc7e98f6f | [
"MIT"
] | null | null | null | Lab3/gauss/__init__.py | neseleznev/urfu-CompExp | 33101e34c6df893b0b19517d694dc55dc7e98f6f | [
"MIT"
] | null | null | null | __author__ = 'Nikita'
| 30.5 | 51 | 0.868852 | from .compact_gauss import compact_gauss_scheme
from .main_item_gauss import main_item_gauss_scheme
__author__ = 'Nikita'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 44 |
31d4a2f35b27a409db89cd230b0056bb208ad526 | 260 | py | Python | setup.py | jhunhwang/goldenretriever | 08df451c2d726678d91bab372936e95b6cf88732 | [
"Apache-2.0"
] | 8 | 2020-03-06T02:22:24.000Z | 2022-03-08T04:18:42.000Z | setup.py | jhunhwang/goldenretriever | 08df451c2d726678d91bab372936e95b6cf88732 | [
"Apache-2.0"
] | 7 | 2020-11-13T18:54:23.000Z | 2022-02-10T02:29:15.000Z | setup.py | jhunhwang/goldenretriever | 08df451c2d726678d91bab372936e95b6cf88732 | [
"Apache-2.0"
] | 3 | 2020-11-12T13:18:13.000Z | 2021-10-15T05:50:44.000Z | from setuptools import setup, find_packages
setup(name='Golden Retriever',
version='0.1',
description='Information retrieval using fine-tuned semantic similarity',
author='AI Singapore',
packages=find_packages(),
zip_safe=False)
| 28.888889 | 79 | 0.711538 | from setuptools import setup, find_packages
setup(name='Golden Retriever',
version='0.1',
description='Information retrieval using fine-tuned semantic similarity',
author='AI Singapore',
packages=find_packages(),
zip_safe=False)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ed22fd349b855954eb1be52c233a04e3c1c71bff | 793 | py | Python | projects/website.py | kbrohkahn/kevinbrohkahn.com | 092457bea6207dcccd0f1c947c81097d9e5080a3 | [
"Apache-2.0"
] | null | null | null | projects/website.py | kbrohkahn/kevinbrohkahn.com | 092457bea6207dcccd0f1c947c81097d9e5080a3 | [
"Apache-2.0"
] | null | null | null | projects/website.py | kbrohkahn/kevinbrohkahn.com | 092457bea6207dcccd0f1c947c81097d9e5080a3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
with open("../templates/header.html", "r") as header:
print header.read()
with open("../templates/navbar.html", "r") as navbar:
print navbar.read()
print("""
<div class="row">
<div class="col-xxs-6 col-xxs-offset-3 col-xs-4 col-sm-3 col-md-2 col-lg-1">
<img class="img-responsive" alt="kevin.... | 37.761905 | 130 | 0.679697 | #!/usr/bin/env python
with open("../templates/header.html", "r") as header:
print header.read()
with open("../templates/navbar.html", "r") as navbar:
print navbar.read()
print("""
<div class="row">
<div class="col-xxs-6 col-xxs-offset-3 col-xs-4 col-sm-3 col-md-2 col-lg-1">
<img class="img-responsive" alt="kevin.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
44dc27dfca78bb459b1f14bfdb1f264bfabad973 | 5,803 | py | Python | experiments/tomita_resample.py | ozturkosu/umps_code | 81130ac2207531776aee6ab0c71a535bf2218c92 | [
"MIT"
] | 11 | 2020-07-07T01:18:51.000Z | 2021-07-03T11:40:56.000Z | experiments/tomita_resample.py | jemisjoky/umps_code | 81130ac2207531776aee6ab0c71a535bf2218c92 | [
"MIT"
] | null | null | null | experiments/tomita_resample.py | jemisjoky/umps_code | 81130ac2207531776aee6ab0c71a535bf2218c92 | [
"MIT"
] | 2 | 2021-11-03T01:50:13.000Z | 2022-01-13T08:39:23.000Z | #!/usr/bin/env python3
import sys
import pickle
from functools import partial
import jax
sys.path.append('..')
samp_lens = [16, 30] # What lengths we want to sample at
samp_size = 1000 # Number of samples to draw
dataset = 'tomita' # Dataset models were ... | 38.946309 | 81 | 0.611408 | #!/usr/bin/env python3
import os
import sys
import pickle
from functools import partial
from string import ascii_lowercase
import jax
import torch
sys.path.append('..')
from ti_mps import TI_MPS
samp_lens = [16, 30] # What lengths we want to sample at
samp_size = 1000 # Numb... | 0 | 0 | 0 | 0 | 0 | 100 | 0 | -4 | 111 |
d4172c18e680f02e7225ce6bdf18a4de6e46a0c0 | 963 | py | Python | examples/housing/tracing.py | rlnsanz/inspectional-rara-parakeet | 2c7919ed432616ec016a5afcd6718d16fa65e8af | [
"Apache-2.0"
] | null | null | null | examples/housing/tracing.py | rlnsanz/inspectional-rara-parakeet | 2c7919ed432616ec016a5afcd6718d16fa65e8af | [
"Apache-2.0"
] | null | null | null | examples/housing/tracing.py | rlnsanz/inspectional-rara-parakeet | 2c7919ed432616ec016a5afcd6718d16fa65e8af | [
"Apache-2.0"
] | 1 | 2021-06-25T16:06:59.000Z | 2021-06-25T16:06:59.000Z | """
import numpy as np # line_no: 1
import gadget
gadget.record('docs_training_py')
x = np.arange(5) # line_no: 2
s = x[0] # line_no: 3
for i in x: # line_no: 4
if i % 2 == 0: # line_no: 5
s += i # line_no: 6
print('done')
"""
import gadget as ln
wit... | 27.514286 | 84 | 0.529595 | """
import numpy as np # line_no: 1
import gadget
gadget.record('docs_training_py')
x = np.arange(5) # line_no: 2
s = x[0] # line_no: 3
for i in x: # line_no: 4
if i % 2 == 0: # line_no: 5
s += i # line_no: 6
print('done')
"""
import gadget as ln
wit... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1990e5a8034f4590ccc82b1a639f39cfac674ea5 | 539 | py | Python | assets/handle-start-stop-status.py | ryantuck/gibson-presentation | 1d61701d15533c5fc69606848fd8779d50e2ac49 | [
"MIT"
] | null | null | null | assets/handle-start-stop-status.py | ryantuck/gibson-presentation | 1d61701d15533c5fc69606848fd8779d50e2ac49 | [
"MIT"
] | null | null | null | assets/handle-start-stop-status.py | ryantuck/gibson-presentation | 1d61701d15533c5fc69606848fd8779d50e2ac49 | [
"MIT"
] | null | null | null | # ... continued ...
if action == 'start':
gibson.start(user_instance['instance_id'])
return _return_payload(
message=start_message.format(user=who),
color='green',
)
elif action == 'stop':
gibson.stop(user_instance['instance_id'])
return _return_payload(
message='stopping i... | 24.5 | 77 | 0.608534 | # ... continued ...
if action == 'start':
gibson.start(user_instance['instance_id'])
return _return_payload(
message=start_message.format(user=who),
color='green',
)
elif action == 'stop':
gibson.stop(user_instance['instance_id'])
return _return_payload(
message='stopping i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6d20b20d69f8282a99430826508eb0cf3cb957fb | 280 | py | Python | nb.py | itdaniher/MPU9250 | 2524dda72c032238e026e0fa5e382e3b0c603d37 | [
"Apache-2.0"
] | null | null | null | nb.py | itdaniher/MPU9250 | 2524dda72c032238e026e0fa5e382e3b0c603d37 | [
"Apache-2.0"
] | null | null | null | nb.py | itdaniher/MPU9250 | 2524dda72c032238e026e0fa5e382e3b0c603d37 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from MPU9250 import MPU9250
from BMP280 import BMP280
m = MPU9250()
b = BMP280()
print(b.pressure(), 'Pa')
avg_x_accel = lambda x: np.array([list(m.readAccel().values()) for _ in range(x)]).mean(axis=0)
x = np.sum(avg_x_accel(10) - avg_x_accel(10))
print(x)
| 21.538462 | 95 | 0.7 | import numpy as np
from MPU9250 import MPU9250
from BMP280 import BMP280
m = MPU9250()
b = BMP280()
print(b.pressure(), 'Pa')
avg_x_accel = lambda x: np.array([list(m.readAccel().values()) for _ in range(x)]).mean(axis=0)
x = np.sum(avg_x_accel(10) - avg_x_accel(10))
print(x)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
145a351f59c3a02b8714430d96061401b91abd88 | 2,659 | py | Python | source/camera/basic/capture_hdr_complete_settings.py | zivid/zivid-python-samples | 83cdfa39f93221ef1c523640495a9ccb356d3aed | [
"BSD-3-Clause"
] | 10 | 2020-12-03T22:59:39.000Z | 2022-03-27T07:31:42.000Z | source/camera/basic/capture_hdr_complete_settings.py | zivid/zivid-python-samples | 83cdfa39f93221ef1c523640495a9ccb356d3aed | [
"BSD-3-Clause"
] | 20 | 2021-01-04T08:30:56.000Z | 2022-03-08T11:25:55.000Z | source/camera/basic/capture_hdr_complete_settings.py | zivid/zivid-python-samples | 83cdfa39f93221ef1c523640495a9ccb356d3aed | [
"BSD-3-Clause"
] | 3 | 2021-04-21T01:42:58.000Z | 2021-06-17T08:13:25.000Z | """
This example shows how to capture point clouds, with color, from the Zivid camera.
For scenes with high dynamic range we combine multiple acquisitions to get an HDR point cloud. This example shows how
to fully configure settings for each acquisition. In general, capturing an HDR point cloud is a lot simpler than t... | 34.532468 | 118 | 0.662655 | """
This example shows how to capture point clouds, with color, from the Zivid camera.
For scenes with high dynamic range we combine multiple acquisitions to get an HDR point cloud. This example shows how
to fully configure settings for each acquisition. In general, capturing an HDR point cloud is a lot simpler than t... | 0 | 0 | 0 | 0 | 0 | 2,154 | 0 | -15 | 68 |
56dee3dcf7fa372c941594bc5b1813517e02b773 | 399 | py | Python | src/bpmn_python/graph/classes/activities/task_type.py | ToJestKrzysio/ProcessVisualization | 9a359a31816bf1be65e3684a571509e3a2c2c0ac | [
"MIT"
] | null | null | null | src/bpmn_python/graph/classes/activities/task_type.py | ToJestKrzysio/ProcessVisualization | 9a359a31816bf1be65e3684a571509e3a2c2c0ac | [
"MIT"
] | null | null | null | src/bpmn_python/graph/classes/activities/task_type.py | ToJestKrzysio/ProcessVisualization | 9a359a31816bf1be65e3684a571509e3a2c2c0ac | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Class used for representing tTask of BPMN 2.0 graph
"""
| 22.166667 | 74 | 0.659148 | # coding=utf-8
"""
Class used for representing tTask of BPMN 2.0 graph
"""
import graph.classes.activities.activity_type as activity
class Task(activity.Activity):
"""
Class used for representing tTask of BPMN 2.0 graph
"""
def __init__(self):
"""
Default constructor, initializes obje... | 0 | 0 | 0 | 242 | 0 | 0 | 0 | 36 | 45 |
72b3e3844a7f8ef1fd0375ef6727f587c90a6e6e | 3,392 | py | Python | Midterm Exam/Midterm P4.py | Karoline0097/MITx---6.00.1x-EdX22 | 6ff61f86429e1b72d9cfcd1a9082c66bb528034f | [
"MIT"
] | 1 | 2022-03-25T22:26:24.000Z | 2022-03-25T22:26:24.000Z | Midterm Exam/Midterm P4.py | Karoline0097/MITx---6.00.1x-EdX22 | 6ff61f86429e1b72d9cfcd1a9082c66bb528034f | [
"MIT"
] | null | null | null | Midterm Exam/Midterm P4.py | Karoline0097/MITx---6.00.1x-EdX22 | 6ff61f86429e1b72d9cfcd1a9082c66bb528034f | [
"MIT"
] | null | null | null | # Problem 4 MIT Midterm #
# Write a function called gcd
# that calculates the greatest common divisor of two positive integers.
# The gcd of two or more integers, when at least one of them is not zero,
# is the largest positive integer that divides the numbers without a remainder.
# 20 min until finished
# One way is ... | 30.285714 | 100 | 0.569575 | # Problem 4 MIT Midterm #
# Write a function called gcd
# that calculates the greatest common divisor of two positive integers.
# The gcd of two or more integers, when at least one of them is not zero,
# is the largest positive integer that divides the numbers without a remainder.
# 20 min until finished
# One way is ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cb6e51561b1b69a0be9fba956b115f616d09886f | 334 | py | Python | config.py | val09072010/libraryms | 5f5cd62e6eebafb1e942746a02822a7bd810c405 | [
"MIT"
] | null | null | null | config.py | val09072010/libraryms | 5f5cd62e6eebafb1e942746a02822a7bd810c405 | [
"MIT"
] | null | null | null | config.py | val09072010/libraryms | 5f5cd62e6eebafb1e942746a02822a7bd810c405 | [
"MIT"
] | 1 | 2018-07-19T05:12:45.000Z | 2018-07-19T05:12:45.000Z | # -*- coding: utf-8 -*-
import os
basedir = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db')
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
SQLALCHEMY_TRACK_MODIFICATIONS = False
CSRF_ENABLED = True
SECRET_KEY = 'ochen-secre... | 30.363636 | 73 | 0.730539 | # -*- coding: utf-8 -*-
import os
basedir = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db')
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
SQLALCHEMY_TRACK_MODIFICATIONS = False
CSRF_ENABLED = True
SECRET_KEY = 'ochen-secre... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b6ce6a3353807b4b3cf8e40fb30166edd4b3e0dd | 1,219 | py | Python | Capitulo_08/exercise8_7.py | thiagosouzalink/my_codes-exercices-book-curso_intensivo_de_python | 841aa855a7450ad3d0ba65393ba0b6debcd6a770 | [
"MIT"
] | null | null | null | Capitulo_08/exercise8_7.py | thiagosouzalink/my_codes-exercices-book-curso_intensivo_de_python | 841aa855a7450ad3d0ba65393ba0b6debcd6a770 | [
"MIT"
] | null | null | null | Capitulo_08/exercise8_7.py | thiagosouzalink/my_codes-exercices-book-curso_intensivo_de_python | 841aa855a7450ad3d0ba65393ba0b6debcd6a770 | [
"MIT"
] | null | null | null | """
8.7 lbum: Escreva uma funo chamada make_album() que construa um
dicionrio descrevendo um lbum musical. A funo deve aceitar o nome de um
artista e o ttulo de um lbum e deve devolver um dicionrio contendo essas
duas informaes. Use a funo para criar trs dicionrios que representem
lbuns diferentes. Apresente cada valo... | 38.09375 | 76 | 0.76128 | """
8.7 – Álbum: Escreva uma função chamada make_album() que construa um
dicionário descrevendo um álbum musical. A função deve aceitar o nome de um
artista e o título de um álbum e deve devolver um dicionário contendo essas
duas informações. Use a função para criar três dicionários que representem
álbuns diferentes. A... | 71 | 0 | 0 | 0 | 0 | 182 | 0 | 0 | 23 |
24fe7815d16c16a1a1eed0509d520d003faddbac | 752 | py | Python | scripts/clean_issues.py | ruben-iteng/faebryk | 58810da4cb24581f421c39784ccf61e1a4ea8ae5 | [
"MIT"
] | 7 | 2021-11-22T20:02:14.000Z | 2022-03-04T19:35:04.000Z | scripts/clean_issues.py | ruben-iteng/faebryk | 58810da4cb24581f421c39784ccf61e1a4ea8ae5 | [
"MIT"
] | 45 | 2021-11-22T20:24:40.000Z | 2022-03-25T11:01:28.000Z | scripts/clean_issues.py | ruben-iteng/faebryk | 58810da4cb24581f421c39784ccf61e1a4ea8ae5 | [
"MIT"
] | 3 | 2021-11-22T19:58:08.000Z | 2021-12-17T16:14:08.000Z | # This file is part of the faebryk project
# SPDX-License-Identifier: MIT
import csv
import subprocess
import re
import logging
logger = logging.getLogger("script")
# Expects a csv file in the format: issue_number,title
# Can be generated with gh issue list and some manual editing
with open("issues.txt", 'r') as f... | 21.485714 | 68 | 0.658245 | # This file is part of the faebryk project
# SPDX-License-Identifier: MIT
import csv
import subprocess
import re
import logging
logger = logging.getLogger("script")
# Expects a csv file in the format: issue_number,title
# Can be generated with gh issue list and some manual editing
with open("issues.txt", 'r') as f... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
aa4e84cbdc5bc1fb51ac4d4bbf0927467505eddb | 7,568 | py | Python | setup.py | intactio/line-bot-sdk-python | c9876c587c3a819c28ab412f7c971ca40f5a8895 | [
"Apache-2.0"
] | 1 | 2022-03-16T07:58:21.000Z | 2022-03-16T07:58:21.000Z | setup.py | intactio/line-bot-sdk-python | c9876c587c3a819c28ab412f7c971ca40f5a8895 | [
"Apache-2.0"
] | 1 | 2022-03-28T20:35:10.000Z | 2022-03-28T20:35:10.000Z | setup.py | intactio/line-bot-sdk-python | c9876c587c3a819c28ab412f7c971ca40f5a8895 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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... | 36.560386 | 99 | 0.552061 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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... | 0 | 0 | 0 | 5,109 | 0 | 214 | 0 | 16 | 181 |
4ec4a66c1b9b047e0cf13082152155ca0580f248 | 163 | py | Python | python_bindings/pytest.py | zmcgrath96/nf_prefix_tree | ca49ca33e5ce99c7775d60aeb7c2952628e95886 | [
"MIT"
] | null | null | null | python_bindings/pytest.py | zmcgrath96/nf_prefix_tree | ca49ca33e5ce99c7775d60aeb7c2952628e95886 | [
"MIT"
] | null | null | null | python_bindings/pytest.py | zmcgrath96/nf_prefix_tree | ca49ca33e5ce99c7775d60aeb7c2952628e95886 | [
"MIT"
] | null | null | null | from nf_prefix_tree import PyPrefixTree
t = PyPrefixTree()
t.addSequence('ABCDE', 'key1')
t.addSequence('ABCXY', 'key2')
t.addSequence('ZYAPW', 'key3')
t.show() | 18.111111 | 39 | 0.717791 | from nf_prefix_tree import PyPrefixTree
t = PyPrefixTree()
t.addSequence('ABCDE', 'key1')
t.addSequence('ABCXY', 'key2')
t.addSequence('ZYAPW', 'key3')
t.show() | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a61542e53fb771207126b26591e7c32500b86e28 | 2,545 | py | Python | app.py | dimas-avila/youtube_downloader | e96bfce75b9e365e2100433f42ae28f4b197c69d | [
"MIT"
] | 1 | 2022-03-14T19:56:54.000Z | 2022-03-14T19:56:54.000Z | app.py | dimas-avila/youtube_downloader | e96bfce75b9e365e2100433f42ae28f4b197c69d | [
"MIT"
] | null | null | null | app.py | dimas-avila/youtube_downloader | e96bfce75b9e365e2100433f42ae28f4b197c69d | [
"MIT"
] | null | null | null | import tkinter as tk
root = tk.Tk()
app = Application(master=root)
app.mainloop()
| 33.051948 | 95 | 0.603536 | import downloader
import tkinter as tk
from tkinter import filedialog
import pathlib
import os
class Application(tk.Frame):
def __init__(self, master=None):
super().__init__(master)
self.master = master
self.master.geometry("500x250")
self.grid()
self.row = 0
self.q... | 14 | 0 | 0 | 2,356 | 0 | 0 | 0 | -14 | 111 |
6cf0b5dd6bffac99344a730cb61bbf631ce0c317 | 247 | py | Python | src/sample_pck/entry_points.py | dataPuzzler/python_package_starter | dc3d5aaab59b0d4e66175b57284826f0e4582b5a | [
"BSD-3-Clause"
] | null | null | null | src/sample_pck/entry_points.py | dataPuzzler/python_package_starter | dc3d5aaab59b0d4e66175b57284826f0e4582b5a | [
"BSD-3-Clause"
] | null | null | null | src/sample_pck/entry_points.py | dataPuzzler/python_package_starter | dc3d5aaab59b0d4e66175b57284826f0e4582b5a | [
"BSD-3-Clause"
] | null | null | null | """
entry-point functions for the sample_pck module, as referenced in setup.cfg
""" | 24.7 | 76 | 0.712551 | """
entry-point functions for the sample_pck module, as referenced in setup.cfg
"""
from .animals import Animal, create_jerry, create_tom
def main() -> tuple:
tom = create_tom(Animal)
jerry = create_jerry(Animal)
return (tom, jerry) | 0 | 0 | 0 | 0 | 0 | 85 | 0 | 32 | 46 |
b893c8dd01e71515a8cddbd9f049bee2611e6e32 | 772 | py | Python | community/polls/forms.py | evinjaff/speedrunsunchained | 335a127e6deffc280009ca86f2c4dd148c1629f0 | [
"BSD-3-Clause-Clear"
] | 1 | 2022-03-21T03:01:14.000Z | 2022-03-21T03:01:14.000Z | community/polls/forms.py | evinjaff/speedrunsunchained | 335a127e6deffc280009ca86f2c4dd148c1629f0 | [
"BSD-3-Clause-Clear"
] | 13 | 2022-03-21T18:07:43.000Z | 2022-03-28T15:58:56.000Z | community/polls/forms.py | evinjaff/speedrunsunchained | 335a127e6deffc280009ca86f2c4dd148c1629f0 | [
"BSD-3-Clause-Clear"
] | null | null | null | from time import timezone
| 35.090909 | 68 | 0.762953 | from email.policy import default
from time import timezone
from django import forms
from django.utils import timezone
class AddGame(forms.Form):
game_title = forms.CharField(max_length=100)
pub_date = forms.DateTimeField()
year_published = forms.CharField(max_length=5)
console = forms.CharField(max_le... | 0 | 0 | 0 | 607 | 0 | 0 | 0 | 26 | 113 |
3c1ee97b46f138e474be8a6010eadb0598166fa0 | 3,652 | py | Python | run_PyTorch_cpu.py | swenkel/python-math-benchmark | adf95263f85dca78f1b13e5283fc7f16edb6bb8d | [
"Apache-2.0"
] | 2 | 2022-01-21T02:18:28.000Z | 2022-03-08T12:30:14.000Z | run_PyTorch_cpu.py | berhane/python-math-benchmark | adf95263f85dca78f1b13e5283fc7f16edb6bb8d | [
"Apache-2.0"
] | null | null | null | run_PyTorch_cpu.py | berhane/python-math-benchmark | adf95263f85dca78f1b13e5283fc7f16edb6bb8d | [
"Apache-2.0"
] | 1 | 2022-01-21T02:19:19.000Z | 2022-01-21T02:19:19.000Z | ################################################################################
# #
# Script to run PyTorch CPU benchmarks #
# ... | 37.265306 | 80 | 0.334885 | ################################################################################
# #
# Script to run PyTorch CPU benchmarks #
# ... | 0 | 0 | 0 | 0 | 0 | 1,165 | 0 | -18 | 134 |
db3c4207c50f48cdc28270d617ee480805604ad5 | 438 | py | Python | addons/hr_payroll_community/models/res_config_settings.py | gleis44/stellwerk | 1fc4145eac6bbb76134ef9ebb22f2441a69d093f | [
"MIT"
] | null | null | null | addons/hr_payroll_community/models/res_config_settings.py | gleis44/stellwerk | 1fc4145eac6bbb76134ef9ebb22f2441a69d093f | [
"MIT"
] | null | null | null | addons/hr_payroll_community/models/res_config_settings.py | gleis44/stellwerk | 1fc4145eac6bbb76134ef9ebb22f2441a69d093f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 33.692308 | 75 | 0.767123 | # -*- coding: utf-8 -*-
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
module_account_accountant = fields.Boolean(string='Account Accountant')
module_l10n_fr_hr_payroll = fields.Boolean(string='French Payroll')
module_l10n_be_hr_payro... | 0 | 0 | 0 | 357 | 0 | 0 | 0 | 10 | 46 |
5f8303a364a058074c7edce225ce29a40b336c35 | 1,019 | py | Python | newprojtestserver.py | AistoBasBistoC/adeept_picarpro | 0a863a21bacbff20eab30e1921d04c82c99a7e36 | [
"MIT"
] | null | null | null | newprojtestserver.py | AistoBasBistoC/adeept_picarpro | 0a863a21bacbff20eab30e1921d04c82c99a7e36 | [
"MIT"
] | null | null | null | newprojtestserver.py | AistoBasBistoC/adeept_picarpro | 0a863a21bacbff20eab30e1921d04c82c99a7e36 | [
"MIT"
] | null | null | null | ################################
##Generated with a lot of love##
## with EasyPython ##
##Web site: easycoding.tn ##
################################
import RPi.GPIO as GPIO
from http.server import HTTPServer
GPIO.setmode(GPIO.BCM)
GPIO.setup(26, GPIO.OUT)
request = None
server_address_httpd = ('192.1... | 28.305556 | 62 | 0.653582 | ################################
##Generated with a lot of love##
## with EasyPython ##
##Web site: easycoding.tn ##
################################
import RPi.GPIO as GPIO
from http.server import BaseHTTPRequestHandler, HTTPServer
GPIO.setmode(GPIO.BCM)
GPIO.setup(26, GPIO.OUT)
request = None
class R... | 0 | 0 | 0 | 520 | 0 | 0 | 0 | 24 | 23 |
ef447ff1be3b358314419c8ad22e7d4ea1ad4fe3 | 7,762 | py | Python | helper/apptypes.py | wernerpaulin/PyProfGen | 443a2989e07789694b7a0797a3768921227bfeae | [
"MIT"
] | 7 | 2021-04-08T13:43:14.000Z | 2021-05-04T14:57:30.000Z | helper/apptypes.py | wernerpaulin/PyProfGen | 443a2989e07789694b7a0797a3768921227bfeae | [
"MIT"
] | null | null | null | helper/apptypes.py | wernerpaulin/PyProfGen | 443a2989e07789694b7a0797a3768921227bfeae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#sudo pip3 install paho-mqtt
#sudo apt-get install -y mosquitto mosquitto-clients
#sudo systemctl enable mosquitto.service
MQTT_ERR_SUCCESS = 0
| 44.867052 | 185 | 0.618784 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import asyncio
import json
from collections import namedtuple
import paho.mqtt.client as mqtt
import time
#sudo pip3 install paho-mqtt
#sudo apt-get install -y mosquitto mosquitto-clients
#sudo systemctl enable mosquitto.service
MQTT_ERR_SUCCESS = 0
def PubSub_onConnect... | 0 | 0 | 0 | 6,890 | 0 | 500 | 0 | -4 | 181 |
4c3ad1d44bd93c66096d64a3e25a7f96248c9a10 | 1,744 | py | Python | ckan/lib/io.py | gg2/ckan | d61a533cc330b6050f4957573f58ec912695ed0a | [
"BSD-3-Clause"
] | 2,805 | 2015-01-02T18:13:15.000Z | 2022-03-31T03:35:01.000Z | ckan/lib/io.py | gg2/ckan | d61a533cc330b6050f4957573f58ec912695ed0a | [
"BSD-3-Clause"
] | 3,801 | 2015-01-02T11:05:36.000Z | 2022-03-31T19:24:37.000Z | ckan/lib/io.py | gg2/ckan | d61a533cc330b6050f4957573f58ec912695ed0a | [
"BSD-3-Clause"
] | 1,689 | 2015-01-02T19:46:43.000Z | 2022-03-28T14:59:43.000Z | # encoding: utf-8
u'''
Utility functions for I/O.
'''
import sys
import six
_FILESYSTEM_ENCODING = str(
sys.getfilesystemencoding() or sys.getdefaultencoding()
)
def encode_path(p):
u'''
Convert a Unicode path string to a byte string.
Intended to be used for encoding paths that are known to be
... | 31.142857 | 75 | 0.713876 | # encoding: utf-8
u'''
Utility functions for I/O.
'''
import sys
import six
_FILESYSTEM_ENCODING = str(
sys.getfilesystemencoding() or sys.getdefaultencoding()
)
def encode_path(p):
u'''
Convert a Unicode path string to a byte string.
Intended to be used for encoding paths that are known to be
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1382f4c57e548338346af9acb45b72cc33a0979d | 667 | py | Python | dags/exercise4.py | tisako/airflow-training-skeleton | 5bebe784d69f115df352ad5185320653eaa78eee | [
"Apache-2.0"
] | null | null | null | dags/exercise4.py | tisako/airflow-training-skeleton | 5bebe784d69f115df352ad5185320653eaa78eee | [
"Apache-2.0"
] | null | null | null | dags/exercise4.py | tisako/airflow-training-skeleton | 5bebe784d69f115df352ad5185320653eaa78eee | [
"Apache-2.0"
] | null | null | null | from datetime import timedelta
import airflow
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
args = {
'owner': 'Airflow',
'start_date': airflow.utils.dates.days_ago(9),
}
with DAG(
dag_id='exercise4',
default_args=args,
schedule_interval=timedelta(hours... | 20.212121 | 58 | 0.623688 | from datetime import timedelta
import airflow
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
args = {
'owner': 'Airflow',
'start_date': airflow.utils.dates.days_ago(9),
}
with DAG(
dag_id='exercise4',
default_args=args,
schedule_interval=timedelta(hours... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9e5c7d9f8f958c4ec71e450dbcba738f978fbbf8 | 980 | py | Python | web_app/create_btc_wallet.py | pcsubirachs/pybit_wallet | 0fb6c12841c66546d0466602cbd46d28376eb16f | [
"MIT"
] | null | null | null | web_app/create_btc_wallet.py | pcsubirachs/pybit_wallet | 0fb6c12841c66546d0466602cbd46d28376eb16f | [
"MIT"
] | null | null | null | web_app/create_btc_wallet.py | pcsubirachs/pybit_wallet | 0fb6c12841c66546d0466602cbd46d28376eb16f | [
"MIT"
] | null | null | null | # create_btc_wallet.py
# pywallet implementation
# Testing
#print(w)
#print("Seed Phrase: ", seed)
#print("Private Key: ", priv_key)
#print("Public Key: ", pub_key)
#print("Address: ", address)
cw = create_wallet()
print(cw) | 23.902439 | 66 | 0.656122 | # create_btc_wallet.py
# pywallet implementation
from pywallet import wallet
def create_wallet():
# generate 12 word mnemonic seed
seed = wallet.generate_mnemonic()
# create bitcoin wallet in JSON format
w = wallet.create_wallet(network="BTC", seed=seed, children=1)
coin = w['coin']
seed = ... | 0 | 0 | 0 | 0 | 0 | 700 | 0 | 6 | 46 |
4c3a955838bc1a131cd7eef019138c3f66abd94e | 14,639 | py | Python | fab_support/heroku.py | drummonds/fab_support | de2c9595e8cf499848f0cc5661e7f1d6465609a2 | [
"MIT"
] | 3 | 2018-10-31T19:04:08.000Z | 2019-06-05T09:17:36.000Z | fab_support/heroku.py | drummonds/fab_support | de2c9595e8cf499848f0cc5661e7f1d6465609a2 | [
"MIT"
] | 205 | 2018-03-04T10:12:14.000Z | 2022-03-28T15:24:10.000Z | fab_support/heroku.py | drummonds/fab_support | de2c9595e8cf499848f0cc5661e7f1d6465609a2 | [
"MIT"
] | null | null | null | from fabric.api import env, local, lcd, settings
import json
from .heroku_utils import first_colour_database
from .utils import repeat_run_local, FabricSupportException, wait_for_dyno_to_run
# Global environment variables See documentation
HEROKU_APP_NAME = "fab-support-app-test" # name of this stages Heroku app
HER... | 39.352151 | 133 | 0.662545 | import datetime as dt
from fabric.api import env, local, task, lcd, settings
import json
import time
from time import sleep
from .heroku_utils import first_colour_database
from .utils import repeat_run_local, FabricSupportException, wait_for_dyno_to_run
# Global environment variables See documentation
HEROKU_APP_NAME... | 0 | 0 | 0 | 0 | 0 | 2,499 | 0 | -3 | 273 |
7f4374b8e4ae801466cdd4e437daeacabc7f2b75 | 3,066 | py | Python | tools/medline-cli.py | pminervini/distant-supervision | 408f8ac493d1d369dd818148216120c87b4aa038 | [
"MIT"
] | null | null | null | tools/medline-cli.py | pminervini/distant-supervision | 408f8ac493d1d369dd818148216120c87b4aa038 | [
"MIT"
] | null | null | null | tools/medline-cli.py | pminervini/distant-supervision | 408f8ac493d1d369dd818148216120c87b4aa038 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import logging
logger = logging.getLogger(os.path.basename(sys.argv[0]))
if __name__ == '__main__':
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
main(sys.argv[1:])
| 33.326087 | 113 | 0.607958 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import argparse
import gzip
from xml.dom import minidom
from concurrent.futures import ProcessPoolExecutor
import multiprocessing
from tqdm import tqdm
import jsonlines
from typing import List, Dict, Any
import logging
logger = logging.getLogger(os... | 0 | 0 | 0 | 0 | 0 | 2,554 | 0 | 28 | 223 |
e28f288d8baf761d62a58045450c5d688f0b7d68 | 1,601 | py | Python | 892.surface-area-of-3-d-shapes.py | Lonitch/hackerRank | 84991b8340e725422bc47eec664532cc84a3447e | [
"MIT"
] | null | null | null | 892.surface-area-of-3-d-shapes.py | Lonitch/hackerRank | 84991b8340e725422bc47eec664532cc84a3447e | [
"MIT"
] | null | null | null | 892.surface-area-of-3-d-shapes.py | Lonitch/hackerRank | 84991b8340e725422bc47eec664532cc84a3447e | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=892 lang=python3
#
# [892] Surface Area of 3D Shapes
#
# https://leetcode.com/problems/surface-area-of-3d-shapes/description/
#
# algorithms
# Easy (57.01%)
# Likes: 209
# Dislikes: 270
# Total Accepted: 15.9K
# Total Submissions: 27.5K
# Testcase Example: '[[2]]'
#
# On aN*Ngrid, we plac... | 14.294643 | 79 | 0.445971 | #
# @lc app=leetcode id=892 lang=python3
#
# [892] Surface Area of 3D Shapes
#
# https://leetcode.com/problems/surface-area-of-3d-shapes/description/
#
# algorithms
# Easy (57.01%)
# Likes: 209
# Dislikes: 270
# Total Accepted: 15.9K
# Total Submissions: 27.5K
# Testcase Example: '[[2]]'
#
# On a N * N grid, we ... | 22 | 0 | 0 | 584 | 0 | 0 | 0 | 0 | 22 |