hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | 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 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | 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 3 251 | 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a6e5bdb34d091a567adddc14e86bdafd20d04947 | 53,246 | py | Python | karlovaboardzatorMain.py | vincseize/MG | bceae7d11f6e93426f14b6f6596078a3f6104472 | [
"MIT"
] | null | null | null | karlovaboardzatorMain.py | vincseize/MG | bceae7d11f6e93426f14b6f6596078a3f6104472 | [
"MIT"
] | null | null | null | karlovaboardzatorMain.py | vincseize/MG | bceae7d11f6e93426f14b6f6596078a3f6104472 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# ##################################################################################
# MG ILLUMINATION #
# Author : cPOTTIER #
# Date : 07-07-2016 ... | 33.7 | 232 | 0.602036 |
a6e7bb7bfc30d3b8e909b178aa21379802d6f3d7 | 26,013 | py | Python | pyro/infer/autoguide/gaussian.py | Jayanth-kumar5566/pyro | a98bb57e1704997a3e01c76a7820c0b1db909ee3 | [
"Apache-2.0"
] | 4,959 | 2017-11-03T14:39:17.000Z | 2019-02-04T16:14:30.000Z | pyro/infer/autoguide/gaussian.py | Jayanth-kumar5566/pyro | a98bb57e1704997a3e01c76a7820c0b1db909ee3 | [
"Apache-2.0"
] | 985 | 2017-11-03T14:27:56.000Z | 2019-02-02T18:52:54.000Z | pyro/infer/autoguide/gaussian.py | Jayanth-kumar5566/pyro | a98bb57e1704997a3e01c76a7820c0b1db909ee3 | [
"Apache-2.0"
] | 564 | 2017-11-03T15:05:55.000Z | 2019-01-31T14:02:29.000Z | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
import itertools
from abc import ABCMeta, abstractmethod
from collections import OrderedDict, defaultdict
from contextlib import ExitStack
from types import SimpleNamespace
from typing import Callable, Dict, Optional, Set, Tuple, Union... | 41.290476 | 110 | 0.615462 |
a6e8956955412477820a530c687884fd65e48d03 | 2,367 | py | Python | excursions/models.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | 1 | 2017-04-06T09:12:45.000Z | 2017-04-06T09:12:45.000Z | excursions/models.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | 2 | 2017-09-07T22:09:50.000Z | 2020-06-09T14:46:30.000Z | excursions/models.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.core.exceptions import ValidationError
from django.db import models
| 36.984375 | 113 | 0.697507 |
a6e9b64ebf89f7747641cac9670f46bce97b86d5 | 15,989 | py | Python | scripts/old/join_compound_prt.py | thorunna/UDConverter | c37bb84fd43c8a19896835909789981c6417cb59 | [
"Apache-2.0"
] | 2 | 2021-04-28T15:19:53.000Z | 2022-01-10T13:59:22.000Z | scripts/old/join_compound_prt.py | thorunna/UDConverter | c37bb84fd43c8a19896835909789981c6417cb59 | [
"Apache-2.0"
] | null | null | null | scripts/old/join_compound_prt.py | thorunna/UDConverter | c37bb84fd43c8a19896835909789981c6417cb59 | [
"Apache-2.0"
] | null | null | null | import re
import sys
import os
'''
# TODO: tripartite verbs (verb is third node) in files:
1659.pislarsaga.bio-aut.conllu (3)
1745.klim.nar-fic.conllu (2)
1790.fimmbraedra.nar-sag.conllu (1)
1791.jonsteingrims.bio-aut.conllu (1)
1985.sagan.nar-fic.conllu (1)
Hinrik Hafsteinsson 2019
Part of UniTre... | 43.685792 | 135 | 0.568829 |
a6eab1523ee5589b73c20527590238599c8dfd16 | 320 | py | Python | ABC/063/c.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/063/c.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/063/c.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main()
| 15.238095 | 41 | 0.453125 |
a6ec353dafda7b60fa104be1fc709b7c53bfca3e | 802 | py | Python | compiled/construct/nav_parent_switch_cast.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 4 | 2017-04-08T12:55:11.000Z | 2020-12-05T21:09:31.000Z | compiled/construct/nav_parent_switch_cast.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 7 | 2018-04-23T01:30:33.000Z | 2020-10-30T23:56:14.000Z | compiled/construct/nav_parent_switch_cast.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 6 | 2017-04-08T11:41:14.000Z | 2020-10-30T22:47:31.000Z | from construct import *
from construct.lib import *
nav_parent_switch_cast__foo__zero = Struct(
'branch' / LazyBound(lambda: nav_parent_switch_cast__foo__common),
)
nav_parent_switch_cast__foo__one = Struct(
'branch' / LazyBound(lambda: nav_parent_switch_cast__foo__common),
)
nav_parent_switch_cast__foo__common = ... | 29.703704 | 214 | 0.78803 |
a6ecd6ac96ad20775915e71b1e12991c1fd7b239 | 4,711 | py | Python | ja_timex/timex.py | otokunaga2/ja-timex | 4534ecbb3d4e780d4777ed239bb832ce849fa0c1 | [
"MIT"
] | null | null | null | ja_timex/timex.py | otokunaga2/ja-timex | 4534ecbb3d4e780d4777ed239bb832ce849fa0c1 | [
"MIT"
] | null | null | null | ja_timex/timex.py | otokunaga2/ja-timex | 4534ecbb3d4e780d4777ed239bb832ce849fa0c1 | [
"MIT"
] | null | null | null | import re
from collections import defaultdict
from typing import DefaultDict, Dict, List
from ja_timex.number_normalizer import NumberNormalizer
from ja_timex.tag import TIMEX
from ja_timex.tagger import AbstimeTagger, DurationTagger, ReltimeTagger, SetTagger
from ja_timex.util import is_parial_pattern_of_number_expre... | 42.441441 | 116 | 0.659733 |
a6ee6c5c06774806a22bfd966c8beb3678968a98 | 1,481 | py | Python | pydynamo_brain/pydynamo_brain/ui/tilefigs.py | ubcbraincircuits/pyDynamo | 006eb6edb5e54670574dbfdf7d249e9037f01ffc | [
"MIT"
] | 4 | 2021-12-16T22:32:47.000Z | 2022-01-03T05:42:12.000Z | pydynamo_brain/pydynamo_brain/ui/tilefigs.py | padster/pyDynamo | 006eb6edb5e54670574dbfdf7d249e9037f01ffc | [
"MIT"
] | 1 | 2021-11-15T18:14:20.000Z | 2021-11-15T18:14:36.000Z | pydynamo_brain/pydynamo_brain/ui/tilefigs.py | padster/pyDynamo | 006eb6edb5e54670574dbfdf7d249e9037f01ffc | [
"MIT"
] | 1 | 2022-01-21T23:03:24.000Z | 2022-01-21T23:03:24.000Z | import math
from PyQt5.QtCore import QRect
from PyQt5.QtWidgets import QDesktopWidget
# pyqt5 version of matlab tilefigs function
| 35.261905 | 81 | 0.609048 |
a6ee8822b04b21b7f73e7ccfc8bbb8838769706d | 2,313 | py | Python | api_yamdb/api/serializers.py | Xewus/YamDB-Final | 70e531d397c2e708416734156b104e4bb32f4895 | [
"BSD-2-Clause"
] | null | null | null | api_yamdb/api/serializers.py | Xewus/YamDB-Final | 70e531d397c2e708416734156b104e4bb32f4895 | [
"BSD-2-Clause"
] | null | null | null | api_yamdb/api/serializers.py | Xewus/YamDB-Final | 70e531d397c2e708416734156b104e4bb32f4895 | [
"BSD-2-Clause"
] | null | null | null | from datetime import datetime
from django.db.models import Avg
from rest_framework.relations import SlugRelatedField
from rest_framework.serializers import (CurrentUserDefault, ModelSerializer,
SerializerMethodField, ValidationError)
from reviews.models import Comment, Rev... | 32.125 | 80 | 0.61738 |
a6f06952cd7645789cd9e5361ca955bdb8ae1570 | 2,126 | py | Python | gmmmml/policies/prediction.py | andycasey/gmmmml | 1acfeea14514fb7ed44ccdfadefc87f996fee86f | [
"MIT"
] | 3 | 2021-02-15T05:37:01.000Z | 2021-09-22T22:06:12.000Z | gmmmml/policies/prediction.py | andycasey/gmmmml | 1acfeea14514fb7ed44ccdfadefc87f996fee86f | [
"MIT"
] | null | null | null | gmmmml/policies/prediction.py | andycasey/gmmmml | 1acfeea14514fb7ed44ccdfadefc87f996fee86f | [
"MIT"
] | 1 | 2021-02-15T05:37:06.000Z | 2021-02-15T05:37:06.000Z |
import logging
import numpy as np
from .base import Policy
logger_name, *_ = __name__.split(".")
logger = logging.getLogger(logger_name)
| 26.911392 | 95 | 0.623236 |
a6f0c204d86ffc44292e3d7658bed03896f0bc41 | 818 | py | Python | binarytree/q16.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | 79 | 2018-03-27T12:37:49.000Z | 2022-01-21T10:18:17.000Z | binarytree/q16.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | null | null | null | binarytree/q16.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | 27 | 2018-04-08T03:07:06.000Z | 2021-10-30T00:01:50.000Z | """
sortArr,
sortArr
"""
from binarytree.toolcls import Node
from binarytree.q3 import PrintTree
if __name__ == '__main__':
arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]
PrintTree.print_tree(ReconstructBalancedBST.reconstruct(arr)) | 23.371429 | 65 | 0.643032 |
a6f1580c564937d6e53353810c7dfb2323b8dd6c | 1,988 | py | Python | tests/settings.py | acv-auctions/manifold | b798b0dd6c2f96395d47f700fd2ed0451b80331b | [
"Apache-2.0"
] | 2 | 2018-06-08T10:14:40.000Z | 2018-06-09T10:49:17.000Z | tests/settings.py | acv-auctions/manifold | b798b0dd6c2f96395d47f700fd2ed0451b80331b | [
"Apache-2.0"
] | 1 | 2019-01-15T18:38:51.000Z | 2019-01-15T18:38:51.000Z | tests/settings.py | acv-auctions/manifold | b798b0dd6c2f96395d47f700fd2ed0451b80331b | [
"Apache-2.0"
] | null | null | null | """
Copyright 2018 ACV Auctions
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | 24.243902 | 72 | 0.598089 |
a6f16c8c9f6389943041ded44b395967b6721d7b | 21,562 | py | Python | Source/osdr_ml_modeler/optimizer.py | ArqiSoft/ml-services | 0c9beacc4a98c3f55ed56969a8b7eb84c4209c21 | [
"MIT"
] | null | null | null | Source/osdr_ml_modeler/optimizer.py | ArqiSoft/ml-services | 0c9beacc4a98c3f55ed56969a8b7eb84c4209c21 | [
"MIT"
] | null | null | null | Source/osdr_ml_modeler/optimizer.py | ArqiSoft/ml-services | 0c9beacc4a98c3f55ed56969a8b7eb84c4209c21 | [
"MIT"
] | 2 | 2018-12-22T13:46:31.000Z | 2019-06-18T16:46:08.000Z | import csv
import json
import os
import shutil
from collections import OrderedDict
from time import time
import numpy
import redis
from sklearn import model_selection
from MLLogger import BaseMLLogger
from exception_handler import MLExceptionHandler
from general_helper import (
get_oauth, make_stream_from_sdf, ma... | 37.240069 | 85 | 0.621927 |
a6f1f913f6a078effa24dda0c369361db5605649 | 1,415 | py | Python | tutorials/preprocessing/plot_extract_gfp_peaks.py | mscheltienne/pycrostates | be87adf69c94b2b179064f337acd8a49d01c305d | [
"BSD-3-Clause"
] | 1 | 2021-12-14T09:58:57.000Z | 2021-12-14T09:58:57.000Z | tutorials/preprocessing/plot_extract_gfp_peaks.py | mscheltienne/pycrostates | be87adf69c94b2b179064f337acd8a49d01c305d | [
"BSD-3-Clause"
] | null | null | null | tutorials/preprocessing/plot_extract_gfp_peaks.py | mscheltienne/pycrostates | be87adf69c94b2b179064f337acd8a49d01c305d | [
"BSD-3-Clause"
] | null | null | null | """
Global field power peaks extraction
===================================
This example demonstrates how to extract global field power (gfp) peaks for an eeg recording.
"""
#%%
# We start by loading some example data:
import mne
from mne.io import read_raw_eeglab
from pycrostates.datasets import lemon
raw_fname =... | 28.3 | 93 | 0.744876 |
a6f4cd68d6d364156f5fdb3da318997921fa8760 | 314 | py | Python | randomsubgroups/__init__.py | rebelosa/random-subgroups | 5fa795d0251e2d5dfac678729d091ddf5c34f82e | [
"MIT"
] | 4 | 2020-10-15T20:30:15.000Z | 2021-02-23T16:38:13.000Z | randomsubgroups/__init__.py | rebelosa/random-subgroups | 5fa795d0251e2d5dfac678729d091ddf5c34f82e | [
"MIT"
] | 2 | 2021-02-14T07:03:58.000Z | 2021-02-21T17:16:57.000Z | randomsubgroups/__init__.py | rebelosa/random-subgroups | 5fa795d0251e2d5dfac678729d091ddf5c34f82e | [
"MIT"
] | null | null | null | from ._randomsubgroups import SubgroupPredictorBase
from ._randomsubgroups import RandomSubgroupClassifier
from ._randomsubgroups import RandomSubgroupRegressor
from ._version import __version__
__all__ = ['SubgroupPredictorBase', 'RandomSubgroupClassifier', 'RandomSubgroupRegressor',
'__version__']
| 34.888889 | 90 | 0.83121 |
a6f60346a907a00957cfe6749394bef422ba2990 | 2,643 | py | Python | clock/views.py | thiagobrez/Tracker | 42dabef578cdf7b15214d0f2868e8ab237807ad6 | [
"MIT"
] | null | null | null | clock/views.py | thiagobrez/Tracker | 42dabef578cdf7b15214d0f2868e8ab237807ad6 | [
"MIT"
] | null | null | null | clock/views.py | thiagobrez/Tracker | 42dabef578cdf7b15214d0f2868e8ab237807ad6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth import authenticate, login
from django.contrib.auth.models import User
from django.shortcuts import render, redirect
from django.utils import timezone
from clock.forms import SignUpForm, ProjectForm
from clock.models import Project... | 29.366667 | 85 | 0.669315 |
a6f7fa95396751bf03ddf7fadbef9071a84e83d9 | 41,794 | py | Python | pulsar/core/lens.py | HawkCorrigan/pulsar | 1658d4d6428209d4a72811f4d12719586988ea75 | [
"BSD-3-Clause"
] | null | null | null | pulsar/core/lens.py | HawkCorrigan/pulsar | 1658d4d6428209d4a72811f4d12719586988ea75 | [
"BSD-3-Clause"
] | null | null | null | pulsar/core/lens.py | HawkCorrigan/pulsar | 1658d4d6428209d4a72811f4d12719586988ea75 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
import re
import random
import urllib
import operator
from util import scanTokens, scanNgrams
from Levenshtein import distance
from random import choice
LEXER_TOKENS = "TOKENS"
LEXER_NGRAMS = "NGRAMS"
OFS_TRANSITION = 3
STATUS_OK = "OK"
STATUS_NO_TRANSITION = "NO TRANSITION"
STATUS_END = ... | 38.950606 | 111 | 0.53979 |
a6f88450dba4c369ad270f9f92a3a03ba4dfb661 | 610 | py | Python | python/count_distinct_digits.py | shub0/leetcode | 8221d10f201d001abcb15b27c9cf4b8cd5060f1f | [
"BSD-3-Clause"
] | null | null | null | python/count_distinct_digits.py | shub0/leetcode | 8221d10f201d001abcb15b27c9cf4b8cd5060f1f | [
"BSD-3-Clause"
] | null | null | null | python/count_distinct_digits.py | shub0/leetcode | 8221d10f201d001abcb15b27c9cf4b8cd5060f1f | [
"BSD-3-Clause"
] | null | null | null | '''
Given a non-negative integer n, count all numbers with unique digits, x, where 0 < x < 10^n.
Example:
Given n = 2, return 91. (The answer should be the total numbers in the range of 0 < x < 100, excluding [11,22,33,44,55,66,77,88,99])
'''
solution =
| 26.521739 | 132 | 0.552459 |
a6fa1d12f414932e8c4b3f796cf576788abf842d | 2,284 | py | Python | setup.py | bluedynamics/souper.plone | 64afe8dc1f87f45c2e96e305f5fff2104ac21007 | [
"BSD-3-Clause"
] | 2 | 2015-05-05T15:16:44.000Z | 2019-07-09T12:53:52.000Z | setup.py | bluedynamics/souper.plone | 64afe8dc1f87f45c2e96e305f5fff2104ac21007 | [
"BSD-3-Clause"
] | 5 | 2015-06-02T06:42:00.000Z | 2021-02-13T15:31:29.000Z | setup.py | bluedynamics/souper.plone | 64afe8dc1f87f45c2e96e305f5fff2104ac21007 | [
"BSD-3-Clause"
] | 3 | 2015-05-05T15:17:25.000Z | 2018-10-12T11:10:55.000Z | from setuptools import setup, find_packages
import sys
import os
version = '1.3.2.dev0'
shortdesc = \
"Plone Souper Integration: Container for many lightweight queryable Records"
longdesc = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
longdesc += open(os.path.join(os.path.dirname(__file__), '... | 35.138462 | 83 | 0.572242 |
a6fd44e35db6be0b5eb9450f40d3c49baabc7d7d | 949 | py | Python | snapshot_queries/testing/pytest_plugin.py | cedar-team/snapshot-queries | e033d7f8cc221617e1922e913cae2f32b409faf6 | [
"MIT"
] | null | null | null | snapshot_queries/testing/pytest_plugin.py | cedar-team/snapshot-queries | e033d7f8cc221617e1922e913cae2f32b409faf6 | [
"MIT"
] | 6 | 2022-03-30T16:19:01.000Z | 2022-03-30T16:32:08.000Z | snapshot_queries/testing/pytest_plugin.py | cedar-team/snapshot-queries | e033d7f8cc221617e1922e913cae2f32b409faf6 | [
"MIT"
] | 1 | 2022-03-31T19:22:22.000Z | 2022-03-31T19:22:22.000Z | import snapshot_queries.optional_dependencies
if snapshot_queries.optional_dependencies.SNAPSHOTTEST_INSTALLED:
from contextlib import contextmanager
import pytest
from snapshottest.pytest import PyTestSnapshotTest
from .assert_queries_match_mixin import AssertQueriesMatchMixin
| 35.148148 | 81 | 0.735511 |
a6fe4c3b9aca1308b06f7d6c9535dc836935bf55 | 174 | py | Python | app/clean.py | yuderobot/markov-note | 32e2184e16191b8186c57df5eba850435b76d2b2 | [
"MIT"
] | 1 | 2021-02-19T14:03:52.000Z | 2021-02-19T14:03:52.000Z | app/clean.py | yuderobot/markov-note | 32e2184e16191b8186c57df5eba850435b76d2b2 | [
"MIT"
] | null | null | null | app/clean.py | yuderobot/markov-note | 32e2184e16191b8186c57df5eba850435b76d2b2 | [
"MIT"
] | 2 | 2021-10-12T05:13:50.000Z | 2021-10-15T08:28:57.000Z | import pandas as pd
df = pd.read_csv('data/tweets.csv')
df = df[~df['full_text'].str.contains('RT|\@||https')]
df.to_csv('data/tweets_processed.csv', encoding='utf_8_sig')
| 29 | 60 | 0.701149 |
a6fe7af1e35bd60a25b5666383fcdd62222ce624 | 1,074 | py | Python | boilerplate/urls.py | Promobyte/n | b3cb235c6c245b3b48e8880994cffef8f2971948 | [
"MIT"
] | null | null | null | boilerplate/urls.py | Promobyte/n | b3cb235c6c245b3b48e8880994cffef8f2971948 | [
"MIT"
] | 10 | 2020-02-11T23:35:56.000Z | 2022-02-17T19:11:43.000Z | boilerplate/urls.py | Promobyte/ng | b3cb235c6c245b3b48e8880994cffef8f2971948 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls import include, url # noqa
from django.contrib import admin
from django.views.generic import TemplateView
from django.urls import include, path
from service.views import ServiceList
from service.views import ServiceDetail
from django.utils import translation
from ... | 31.588235 | 84 | 0.747672 |
a6ffa89ddaaff36c4e4467a85ca26b7f3d836ded | 3,118 | py | Python | tests/entities/test_member.py | rennerocha/asociate-old | 75e946a1db909299b1442a4bce3b78a2ddf2aafb | [
"MIT"
] | null | null | null | tests/entities/test_member.py | rennerocha/asociate-old | 75e946a1db909299b1442a4bce3b78a2ddf2aafb | [
"MIT"
] | null | null | null | tests/entities/test_member.py | rennerocha/asociate-old | 75e946a1db909299b1442a4bce3b78a2ddf2aafb | [
"MIT"
] | null | null | null | import uuid
import pytest
from asociate.entities.association import Association
from asociate.entities.member import Member
pytestmark = [
pytest.mark.entities,
]
| 25.349593 | 78 | 0.653945 |
470174818a48bf6ce0247816ece5e1ea9f5c8144 | 4,194 | py | Python | Code/resnet.py | arp95/rcnn_object_detection | e0821cdde5753862d6ff738e8b09f5b95ba9ad1f | [
"MIT"
] | 2 | 2020-08-08T07:34:52.000Z | 2021-07-29T23:42:05.000Z | Code/resnet.py | arp95/rcnn_object_detection | e0821cdde5753862d6ff738e8b09f5b95ba9ad1f | [
"MIT"
] | null | null | null | Code/resnet.py | arp95/rcnn_object_detection | e0821cdde5753862d6ff738e8b09f5b95ba9ad1f | [
"MIT"
] | 1 | 2020-05-16T18:35:10.000Z | 2020-05-16T18:35:10.000Z | import numpy as np
import torch
import torchvision
import torch.nn.functional as F
from torch.utils.data import DataLoader
from torchvision import transforms, models, datasets
import matplotlib.pyplot as plt
%matplotlib inline
# Implementation of the ResNet-50 Architecture
def ResNet50(img_channels = 3, nu... | 34.95 | 126 | 0.664521 |
4701cb86fa4a2a5e7e7875805246fbc42f864585 | 2,256 | py | Python | manage_data.py | lastone9182/console-keep | 250b49653be9d370a1bb0f1c39c5f853c2eaa47e | [
"MIT"
] | null | null | null | manage_data.py | lastone9182/console-keep | 250b49653be9d370a1bb0f1c39c5f853c2eaa47e | [
"MIT"
] | null | null | null | manage_data.py | lastone9182/console-keep | 250b49653be9d370a1bb0f1c39c5f853c2eaa47e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import datetime | 31.333333 | 112 | 0.520833 |
47024e2477ee4ebf0940cce361da35002ab9f51a | 11,447 | py | Python | models/deoldify.py | wangruohui/DeOldify-OpenMMLab | 798b1b6675bfbc76d976a3cd6c87915c9b32dcdb | [
"MIT"
] | 6 | 2021-11-02T06:20:22.000Z | 2022-02-14T04:08:50.000Z | models/deoldify.py | wangruohui/DeOldify-OpenMMLab | 798b1b6675bfbc76d976a3cd6c87915c9b32dcdb | [
"MIT"
] | null | null | null | models/deoldify.py | wangruohui/DeOldify-OpenMMLab | 798b1b6675bfbc76d976a3cd6c87915c9b32dcdb | [
"MIT"
] | 1 | 2021-11-03T09:44:00.000Z | 2021-11-03T09:44:00.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import numbers
import os.path as osp
import mmcv
import numpy as np
import torch
from mmcv.runner import auto_fp16
from mmedit.core import tensor2img
from mmedit.models.base import BaseModel
from mmedit.models.builder import build_backbone, build_component, build_loss
f... | 35.006116 | 106 | 0.599983 |
47029060be442baf1023a0a0e23b74ce3ae356e8 | 8,240 | py | Python | aoi_envs/__init__.py | landonbutler/Learning-Connectivity | 2ce4c148878e2dab98c53a7cc2bd8d1362c2bf87 | [
"MIT"
] | 2 | 2021-04-13T19:50:40.000Z | 2021-05-04T09:27:37.000Z | aoi_envs/__init__.py | landonbutler/Learning-Connectivity | 2ce4c148878e2dab98c53a7cc2bd8d1362c2bf87 | [
"MIT"
] | null | null | null | aoi_envs/__init__.py | landonbutler/Learning-Connectivity | 2ce4c148878e2dab98c53a7cc2bd8d1362c2bf87 | [
"MIT"
] | 2 | 2021-04-13T19:51:05.000Z | 2021-05-12T16:07:41.000Z | from aoi_envs.MultiAgent import MultiAgentEnv
from aoi_envs.Mobile import MobileEnv
from gym.envs.registration import register
MAX_EPISODE_STEPS = 10000
register(
id='StationaryEnv-v0',
entry_point='aoi_envs:MultiAgentEnv',
max_episode_steps=MAX_EPISODE_STEPS,
)
##########################################... | 24.744745 | 76 | 0.672209 |
4702b4bd55352e823ec087a35e72ae44e05776e2 | 9,631 | py | Python | btceapi/trade.py | Queeq/btce-api | b9f1045e604e46d89574a960915c51d8076a5c6d | [
"MIT"
] | 1 | 2018-04-16T09:04:37.000Z | 2018-04-16T09:04:37.000Z | btceapi/trade.py | Queeq/btce-api | b9f1045e604e46d89574a960915c51d8076a5c6d | [
"MIT"
] | null | null | null | btceapi/trade.py | Queeq/btce-api | b9f1045e604e46d89574a960915c51d8076a5c6d | [
"MIT"
] | null | null | null | # Copyright (c) 2013 Alan McIntyre
import urllib
import hashlib
import hmac
import warnings
from datetime import datetime
from btceapi import common
from btceapi import keyhandler
def setHistoryParams(params, from_number, count_number, from_id, end_id,
order, since, end):
if from_num... | 36.206767 | 79 | 0.602326 |
4702d3ea64c33128158593ce3ec94ea461005ad4 | 776 | py | Python | inventory_management/inventory/inventory.py | gmaher/blog_posts | 2db1c0f88adaa76a4bbd188fc3ac230ff9eaefb5 | [
"MIT"
] | null | null | null | inventory_management/inventory/inventory.py | gmaher/blog_posts | 2db1c0f88adaa76a4bbd188fc3ac230ff9eaefb5 | [
"MIT"
] | null | null | null | inventory_management/inventory/inventory.py | gmaher/blog_posts | 2db1c0f88adaa76a4bbd188fc3ac230ff9eaefb5 | [
"MIT"
] | 1 | 2019-12-15T17:17:10.000Z | 2019-12-15T17:17:10.000Z | import numpy as np
| 20.972973 | 76 | 0.45232 |
4703b8b3047a8ef94c23101c750894c129122120 | 1,388 | py | Python | chillpill_examples/cloud_hp_tuning_from_train_fn/run_hp_search.py | kevinbache/chillpill_examples | d9c5fac9972f1afbf7bb4e6b6e5388b9f52c73c3 | [
"MIT"
] | null | null | null | chillpill_examples/cloud_hp_tuning_from_train_fn/run_hp_search.py | kevinbache/chillpill_examples | d9c5fac9972f1afbf7bb4e6b6e5388b9f52c73c3 | [
"MIT"
] | null | null | null | chillpill_examples/cloud_hp_tuning_from_train_fn/run_hp_search.py | kevinbache/chillpill_examples | d9c5fac9972f1afbf7bb4e6b6e5388b9f52c73c3 | [
"MIT"
] | null | null | null | """This module runs a distributed hyperparameter tuning job on Google Cloud AI Platform."""
from pathlib import Path
import numpy as np
import chillpill
from chillpill import packages, params, search
from chillpill_examples.cloud_hp_tuning_from_train_fn import train
if __name__ == '__main__':
# Create a Cloud A... | 35.589744 | 91 | 0.713977 |
4706c990a64c224b744ada7eefc49fc8bb2c5644 | 858 | py | Python | tests/timing/test_timing_encoding.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | 1 | 2019-09-14T16:59:34.000Z | 2019-09-14T16:59:34.000Z | tests/timing/test_timing_encoding.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | null | null | null | tests/timing/test_timing_encoding.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | 7 | 2020-01-19T14:40:08.000Z | 2022-01-14T12:50:30.000Z | """Tests timing of encoding classes
"""
import time
import numpy as np
import pandas as pd
#import matplotlib.pyplot as plt
from dsutils.encoding import MultiTargetEncoderLOO
def test_timing_MultiTargetEncoderLOO():
"""Tests timing of encoding.MultiTargetEncoderLOO"""
# Dummy data
N = 10000
Nc = ... | 22.578947 | 61 | 0.638695 |
4707b4d7f941097b9eae2aa1a1af3bbf0a103d6c | 3,350 | py | Python | configr/test.py | ArneBachmann/configr | ed41d18467f370abcadf6f8661f10486ae1cfd00 | [
"MIT"
] | 1 | 2016-12-30T22:18:24.000Z | 2016-12-30T22:18:24.000Z | configr/test.py | ArneBachmann/configr | ed41d18467f370abcadf6f8661f10486ae1cfd00 | [
"MIT"
] | 8 | 2017-05-15T12:11:04.000Z | 2018-02-20T20:50:15.000Z | configr/test.py | ArneBachmann/configr | ed41d18467f370abcadf6f8661f10486ae1cfd00 | [
"MIT"
] | null | null | null | import doctest, json, logging, os, unittest, sys
sys.path.insert(0, "..")
import configr
def load_tests(loader, tests, ignore):
''' The function name suffix "_tests" tells the unittest module about a test case. '''
tests.addTests(doctest.DocTestSuite(configr))
return tests
if __name__ == "__main__":
loggin... | 37.222222 | 136 | 0.64209 |
47082baa4e7989bb5b9aca7bfcf972c10b053741 | 1,640 | py | Python | euler.py | Epitrochoid/biophys-class | 622bc8c6cfd3e22abf2473115b878843545f29d3 | [
"Zlib"
] | null | null | null | euler.py | Epitrochoid/biophys-class | 622bc8c6cfd3e22abf2473115b878843545f29d3 | [
"Zlib"
] | null | null | null | euler.py | Epitrochoid/biophys-class | 622bc8c6cfd3e22abf2473115b878843545f29d3 | [
"Zlib"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
# define constants
g_l = 2.0
g_ca = 4.0
g_k = 8.0
e_l = -50.0
e_ca = 100.0
e_k = -70.0
tau = 0.1
v1 = -1.2
v2 = 18.0
v3 = 2.0
v4 = 30.0
cap = 20.0
# steady state functions
# define nullcline functions then vectorize them
vnullvec = np.vectorize(vnull)
nnullvec =... | 21.298701 | 80 | 0.628049 |
47082ce9e469b71dd433d3cc99431608afdc8cec | 12,059 | py | Python | prepare_data.py | ondrejklejch/acoustic_punctuation | a58b79d838ca0cdd82186189be290289ed70b106 | [
"Apache-2.0"
] | 10 | 2020-02-12T18:35:27.000Z | 2021-06-09T03:28:44.000Z | prepare_data.py | choko/acoustic_punctuation | a58b79d838ca0cdd82186189be290289ed70b106 | [
"Apache-2.0"
] | 2 | 2020-03-30T07:58:33.000Z | 2020-05-09T02:12:09.000Z | prepare_data.py | choko/acoustic_punctuation | a58b79d838ca0cdd82186189be290289ed70b106 | [
"Apache-2.0"
] | 4 | 2019-10-08T07:35:35.000Z | 2020-10-16T08:33:19.000Z | import h5py
import kaldi_io
import numpy as np
from collections import defaultdict
from config import get_config
from fuel.datasets.hdf5 import H5PYDataset
from lexicon import create_dictionary_from_lexicon, create_dictionary_from_punctuation_marks
if __name__ == "__main__":
config = get_config()
data_file =... | 43.222222 | 195 | 0.623518 |
47083658578f509f29ab5750cc149c0842c89002 | 511 | py | Python | TSSystem/apps/student/migrations/0013_auto_20180607_1924.py | LittleBai0606/TeachingSecretarySystem | c9067b83f8e1edaf06974db73b7cc47a5b49e0d4 | [
"MIT"
] | null | null | null | TSSystem/apps/student/migrations/0013_auto_20180607_1924.py | LittleBai0606/TeachingSecretarySystem | c9067b83f8e1edaf06974db73b7cc47a5b49e0d4 | [
"MIT"
] | 5 | 2020-06-05T18:13:28.000Z | 2022-02-11T03:39:14.000Z | TSSystem/apps/student/migrations/0013_auto_20180607_1924.py | WhiteBrownBottle/TeachingSecretarySystem | c9067b83f8e1edaf06974db73b7cc47a5b49e0d4 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.5 on 2018-06-07 19:24
from django.db import migrations, models
| 26.894737 | 164 | 0.665362 |
47092f96a5b0022e0fac79b527512d8f3952d111 | 3,409 | py | Python | instagram/views.py | derrokip34/Instagram-Clone | 63fdff902382b5e4986667566a901cca748b5731 | [
"MIT"
] | null | null | null | instagram/views.py | derrokip34/Instagram-Clone | 63fdff902382b5e4986667566a901cca748b5731 | [
"MIT"
] | 4 | 2020-06-02T13:03:34.000Z | 2021-06-10T22:59:11.000Z | instagram/views.py | derrokip34/Instagram-Clone | 63fdff902382b5e4986667566a901cca748b5731 | [
"MIT"
] | null | null | null | from django.shortcuts import render,redirect
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from .models import Image,Profile,Comments
from .forms import UpdateProfile,UpdateUser,PostImageForm,CommentForm
from django.conf.urls import url
# Create your views here.
... | 37.054348 | 137 | 0.694045 |
4709430dc3111986d3531b884a393ec597c0e3c5 | 10,596 | py | Python | wahltraud/bot/bot.py | wdr-data/wahltraud | 0f972680f6cdbb66028aa8a39fc4a78a3e0ca08a | [
"RSA-MD"
] | 7 | 2017-07-02T12:25:45.000Z | 2019-05-27T10:39:41.000Z | wahltraud/bot/bot.py | wdr-data/wahltraud | 0f972680f6cdbb66028aa8a39fc4a78a3e0ca08a | [
"RSA-MD"
] | null | null | null | wahltraud/bot/bot.py | wdr-data/wahltraud | 0f972680f6cdbb66028aa8a39fc4a78a3e0ca08a | [
"RSA-MD"
] | null | null | null | import logging
from threading import Thread
from time import sleep
import os
import json
import schedule
#from django.utils.timezone import localtime, now
from apiai import ApiAI
from backend.models import Push, FacebookUser, Wiki
from .fb import send_text, send_buttons, button_postback, PAGE_TOKEN
from .handlers.pay... | 40.288973 | 147 | 0.60806 |
470e472fe7ae958fe62d97b5ce9dca8b55363b3a | 4,994 | py | Python | dbix/postgresql.py | alexbodn/python-dbix | 769298cc510a95437d9d7e7641b616b6aec97ced | [
"Apache-2.0"
] | null | null | null | dbix/postgresql.py | alexbodn/python-dbix | 769298cc510a95437d9d7e7641b616b6aec97ced | [
"Apache-2.0"
] | 3 | 2021-03-25T21:40:41.000Z | 2021-11-15T17:46:46.000Z | dbix/postgresql.py | alexbodn/python-dbix | 769298cc510a95437d9d7e7641b616b6aec97ced | [
"Apache-2.0"
] | null | null | null |
from .sqlschema import SQLSchema, SQLResultSet
import psycopg2
import psycopg2.extensions as pe
| 25.222222 | 94 | 0.692231 |
470f91dbbbad1edd443e920c9753325697ced101 | 2,232 | py | Python | datahub/cleanup/cleanup_config.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 6 | 2019-12-02T16:11:24.000Z | 2022-03-18T10:02:02.000Z | datahub/cleanup/cleanup_config.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 1,696 | 2019-10-31T14:08:37.000Z | 2022-03-29T12:35:57.000Z | datahub/cleanup/cleanup_config.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 9 | 2019-11-22T12:42:03.000Z | 2021-09-03T14:25:05.000Z | from datetime import datetime
from typing import Any, Mapping, NamedTuple, Sequence, Union
from dateutil.relativedelta import relativedelta
from dateutil.utils import today
from django.db.models import Q
from django.utils.timezone import utc
| 36 | 95 | 0.696237 |
47101f05f02766f88ec6f7f2f38dd2a79a508d4e | 7,696 | py | Python | script/balance_stream_weights.py | oliverwatts/snickery | 6d7e0b48cbb21760089bbbe85f6d7bd206f89821 | [
"Apache-2.0"
] | 28 | 2018-06-26T02:57:45.000Z | 2021-12-01T01:07:23.000Z | script/balance_stream_weights.py | oliverwatts/snickery | 6d7e0b48cbb21760089bbbe85f6d7bd206f89821 | [
"Apache-2.0"
] | 1 | 2018-11-02T09:29:29.000Z | 2018-11-02T10:20:28.000Z | script/balance_stream_weights.py | oliverwatts/snickery | 6d7e0b48cbb21760089bbbe85f6d7bd206f89821 | [
"Apache-2.0"
] | 5 | 2018-12-21T08:05:06.000Z | 2021-01-16T16:43:42.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
## Project:
## Author: Oliver Watts - owatts@staffmail.ed.ac.uk
import sys
import os
import glob
import re
import timeit
import math
from argparse import ArgumentParser
import numpy as np
from synth_halfphone import Synthesiser
import copy
# import pylab
if __name__... | 33.903084 | 124 | 0.588617 |
4711f0f7f0f4b6e8dfb47ed59210af2da72647a5 | 39,693 | py | Python | cinder/tests/unit/volume/drivers/test_hgst.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | 1 | 2019-02-08T05:24:58.000Z | 2019-02-08T05:24:58.000Z | cinder/tests/unit/volume/drivers/test_hgst.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | 1 | 2021-03-21T11:38:29.000Z | 2021-03-21T11:38:29.000Z | cinder/tests/unit/volume/drivers/test_hgst.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | 15 | 2017-01-12T10:35:10.000Z | 2019-04-19T08:22:10.000Z | # Copyright (c) 2015 HGST Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 42.407051 | 78 | 0.586149 |
4712fd08313b612b844d6ece1a959125317b1b34 | 9,044 | py | Python | usaspending_api/database_scripts/matview_generator/matview_sql_generator.py | Theyfeartruthfedgov2020/usaspending-api | 579a981282302a0e6dc0f19bebf9d446d0a12e75 | [
"CC0-1.0"
] | null | null | null | usaspending_api/database_scripts/matview_generator/matview_sql_generator.py | Theyfeartruthfedgov2020/usaspending-api | 579a981282302a0e6dc0f19bebf9d446d0a12e75 | [
"CC0-1.0"
] | null | null | null | usaspending_api/database_scripts/matview_generator/matview_sql_generator.py | Theyfeartruthfedgov2020/usaspending-api | 579a981282302a0e6dc0f19bebf9d446d0a12e75 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
import argparse
import glob
import hashlib
import os
from shared_sql_generator import (
COMPONENT_DIR,
generate_uid,
HERE,
ingest_json,
make_indexes_sql,
make_matview_refresh,
make_modification_sql,
make_stats_sql,
split_indexes_chunks,
TEMPLATE,
)
# Usa... | 34.128302 | 118 | 0.685648 |
47145db2bd97cca1e96b5c6c5f106f848f49e927 | 1,526 | py | Python | p287m/find_duplicate.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | 1 | 2020-02-20T12:04:46.000Z | 2020-02-20T12:04:46.000Z | p287m/find_duplicate.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | null | null | null | p287m/find_duplicate.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | null | null | null | from typing import List
# TESTS
tests = [
([1, 1], 1),
([1, 2, 1], 1),
([1, 1, 1], 1),
([1, 3, 4, 2, 2], 2),
([3, 1, 3, 4, 2], 3),
([3, 1, 3, 3, 2], 3),
([1, 3, 4, 2, 1], 1),
([7, 9, 7, 4, 2, 8, 7, 7, 1, 5], 7),
([3, 1, 4, 5, 2, 6, 9, 8, 7, 9], 9),
]
for t in tests:
sol = Solu... | 25.433333 | 57 | 0.415465 |
4715f519d8a21d72474f587c7da538635e521fe0 | 13,733 | py | Python | examples/gaussian_processes/plot_sparse_log_cox_gaussian_process_keras.py | ltiao/scribbles | 9f30ea92ee348154568a7791751634d1feaba774 | [
"MIT"
] | 1 | 2020-03-01T04:36:36.000Z | 2020-03-01T04:36:36.000Z | examples/gaussian_processes/plot_sparse_log_cox_gaussian_process_keras.py | ltiao/scribbles | 9f30ea92ee348154568a7791751634d1feaba774 | [
"MIT"
] | 3 | 2020-01-02T19:09:40.000Z | 2020-01-02T19:11:02.000Z | examples/gaussian_processes/plot_sparse_log_cox_gaussian_process_keras.py | ltiao/scribbles | 9f30ea92ee348154568a7791751634d1feaba774 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Variational Sparse Log Cox Gaussian Process
===========================================
Here we fit the hyperparameters of a Gaussian Process by maximizing the (log)
marginal likelihood. This is commonly referred to as empirical Bayes, or
type-II maximum likelihood estimation.
"""
# sphinx_... | 26.874755 | 82 | 0.675599 |
4716481bbd0431d8beee38613c06cbb5f7bf0cd1 | 822 | py | Python | material/week1/py/w1e1d.py | mpambasange/MachineLearning | 8b813345264513a57934317b01e1311628dc5b01 | [
"MIT"
] | 16 | 2016-09-01T08:50:59.000Z | 2022-02-15T20:56:07.000Z | material/week1/py/w1e1d.py | olehermanse/INF3490-PythonAI | 8b813345264513a57934317b01e1311628dc5b01 | [
"MIT"
] | 2 | 2016-10-20T09:36:19.000Z | 2017-08-29T00:28:54.000Z | material/week1/py/w1e1d.py | olehermanse/INF3490-PythonAI | 8b813345264513a57934317b01e1311628dc5b01 | [
"MIT"
] | 15 | 2016-10-31T12:30:37.000Z | 2021-03-15T12:12:50.000Z | #!/usr/bin/env python3
import numpy as np
import matplotlib.pyplot as plt
import random
if __name__ == "__main__":
plot_exhaustive(f,-2,3,100)
| 25.6875 | 70 | 0.599757 |
471654000ff572cf541ee8cb15531d2329efd52d | 389 | py | Python | 06-sayi-tahmin-oyunu.py | omerkocadayi/WeWantEd--Python-a-Giris- | bedde84d0933d05a3a73b894c90c7d04736c3bba | [
"MIT"
] | 2 | 2017-03-26T13:02:42.000Z | 2017-04-03T00:50:19.000Z | 06-sayi-tahmin-oyunu.py | omerkocadayi/WeWantEd--Python-a-Giris- | bedde84d0933d05a3a73b894c90c7d04736c3bba | [
"MIT"
] | null | null | null | 06-sayi-tahmin-oyunu.py | omerkocadayi/WeWantEd--Python-a-Giris- | bedde84d0933d05a3a73b894c90c7d04736c3bba | [
"MIT"
] | null | null | null | import random
sayi = random.randint(1,100)
print ("Tahmin Oyununa Hos Geldiniz")
sayac=0
while True:
tahmin = int(input("Sayi Girin:"))
sayac += 1
if tahmin == sayi:
print ("\nTebrikler {} denemede bildiniz!" .format(sayac))
break
elif tahmin < sayi:
print ("Daha Buyuk Bir... | 20.473684 | 66 | 0.604113 |
4716e8dc731b778858ae5d8316051f6d4d545541 | 47 | py | Python | src/zope/hookable/tests/__init__.py | prakritichauhan07/zope.hookable | 3c4ae8ddc9c4a2819e4e8e0c4e23394daebb7669 | [
"ZPL-2.1"
] | 4 | 2021-02-20T06:00:01.000Z | 2022-01-07T20:37:37.000Z | src/zope/hookable/tests/__init__.py | prakritichauhan07/zope.hookable | 3c4ae8ddc9c4a2819e4e8e0c4e23394daebb7669 | [
"ZPL-2.1"
] | 2 | 2020-04-30T13:03:09.000Z | 2021-05-05T10:20:15.000Z | src/zope/hookable/tests/__init__.py | prakritichauhan07/zope.hookable | 3c4ae8ddc9c4a2819e4e8e0c4e23394daebb7669 | [
"ZPL-2.1"
] | 5 | 2020-05-07T08:14:36.000Z | 2022-03-24T15:15:08.000Z | # This line required to prevent an empty file.
| 23.5 | 46 | 0.765957 |
47170ca3654fffbe8da2a35f88340beab3b11a2b | 3,333 | py | Python | osm/parser.py | ChenZhongPu/osmRoad | 5c4ce5e7476b6f35c2917efa835c4f1a0f308ebf | [
"MIT"
] | 1 | 2019-05-02T21:33:05.000Z | 2019-05-02T21:33:05.000Z | osm/parser.py | ChenZhongPu/osmRoad | 5c4ce5e7476b6f35c2917efa835c4f1a0f308ebf | [
"MIT"
] | 1 | 2019-05-02T22:55:43.000Z | 2019-05-02T22:55:43.000Z | osm/parser.py | ChenZhongPu/osmRoad | 5c4ce5e7476b6f35c2917efa835c4f1a0f308ebf | [
"MIT"
] | 3 | 2019-05-02T22:37:42.000Z | 2021-04-24T05:59:32.000Z | # --------------------------------------------------------------------
# The osmRoad is
#
# Copyright (c) 2018 by Zhongpu Chen (chenloveit@gmail.com)
#
# By obtaining, using, and/or copying this software and/or its
# associated documentation, you agree that you have read, understood,
# and will comply with the followin... | 35.457447 | 94 | 0.643264 |
4718c7e9cd589624b9835b0bd07e75e39f735f11 | 8,319 | py | Python | cs-restaurant/input/devel/expand.py | stg880631/tgen | 67db94bf3bfc851e673e50b84230ed9f533b2c23 | [
"Apache-2.0"
] | null | null | null | cs-restaurant/input/devel/expand.py | stg880631/tgen | 67db94bf3bfc851e673e50b84230ed9f533b2c23 | [
"Apache-2.0"
] | null | null | null | cs-restaurant/input/devel/expand.py | stg880631/tgen | 67db94bf3bfc851e673e50b84230ed9f533b2c23 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
import sys
import codecs
from argparse import ArgumentParser
from util import load_dais, load_texts, write_das, write_texts, write_toks, DAI
import kenlm
import numpy as np
from delexicalize import Delexicalizer
from tgen.l... | 40.383495 | 121 | 0.60464 |
471b858095fda906a1b28e6ede6d239359d69d10 | 532 | py | Python | app/blueprints/bot_blueprint.py | jattoabdul/andela-genie-backend | 62f49a3783a3dbf21f92449e83ca5c941053a690 | [
"MIT"
] | null | null | null | app/blueprints/bot_blueprint.py | jattoabdul/andela-genie-backend | 62f49a3783a3dbf21f92449e83ca5c941053a690 | [
"MIT"
] | null | null | null | app/blueprints/bot_blueprint.py | jattoabdul/andela-genie-backend | 62f49a3783a3dbf21f92449e83ca5c941053a690 | [
"MIT"
] | null | null | null | from app.blueprints.base_blueprint import Blueprint, BaseBlueprint, request, Security, Auth
from app.controllers.bot_controller import BotController
url_prefix = '{}/bot'.format(BaseBlueprint.base_url_prefix)
bot_blueprint = Blueprint('bot', __name__, url_prefix=url_prefix)
bot_controller = BotController(request)
| 31.294118 | 91 | 0.780075 |
471b8e5515166730fbb412862998cac37508651d | 394 | py | Python | ckanext/__init__.py | keitaroinc/ckanext-visualize | eb53fd00b6a99efd9d8924543ec3bb22774ec083 | [
"MIT"
] | 13 | 2019-10-29T22:50:42.000Z | 2021-12-13T09:31:33.000Z | ckanext/__init__.py | keitaroinc/ckanext-visualize | eb53fd00b6a99efd9d8924543ec3bb22774ec083 | [
"MIT"
] | 10 | 2019-11-04T00:01:09.000Z | 2021-04-23T10:59:04.000Z | ckanext/__init__.py | keitaroinc/ckanext-visualize | eb53fd00b6a99efd9d8924543ec3bb22774ec083 | [
"MIT"
] | 6 | 2020-02-17T15:29:29.000Z | 2021-04-01T15:55:00.000Z | # encoding: utf-8
"""
Copyright (c) 2019 Keitaro AB
Use of this source code is governed by an MIT license
that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
"""
# this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
... | 21.888889 | 54 | 0.751269 |
471ba427f7183a39af603bd2c7e5e3442783239a | 3,908 | py | Python | rpi-config/scripts/arduinoMotor.py | DiamondLightSource/rpi-config | 617f5e176c0621e3ea1b567e9586e96ba0f8b5db | [
"Apache-2.0"
] | 4 | 2016-08-23T12:13:21.000Z | 2018-08-22T12:55:55.000Z | rpi-config/scripts/arduinoMotor.py | DiamondLightSource/rpi-config | 617f5e176c0621e3ea1b567e9586e96ba0f8b5db | [
"Apache-2.0"
] | null | null | null | rpi-config/scripts/arduinoMotor.py | DiamondLightSource/rpi-config | 617f5e176c0621e3ea1b567e9586e96ba0f8b5db | [
"Apache-2.0"
] | 2 | 2016-09-15T19:17:30.000Z | 2018-03-06T06:34:13.000Z | from gda.device.scannable import PseudoDevice
from arduinoScannable import arduinoScannable
import time
from org.slf4j import LoggerFactory
logger = LoggerFactory.getLogger(__name__ + '.py') | 39.877551 | 91 | 0.575486 |
471d1b188d910549e91d819995fe38aa8ba0edcd | 809 | py | Python | Tests/ChoreStartTime.py | lapstue/tm1py | a71886b0f96a3e270d5a39ef999e45b413ba4232 | [
"MIT"
] | null | null | null | Tests/ChoreStartTime.py | lapstue/tm1py | a71886b0f96a3e270d5a39ef999e45b413ba4232 | [
"MIT"
] | null | null | null | Tests/ChoreStartTime.py | lapstue/tm1py | a71886b0f96a3e270d5a39ef999e45b413ba4232 | [
"MIT"
] | null | null | null | import unittest
from TM1py import ChoreStartTime
| 42.578947 | 100 | 0.757726 |
471e1e651b0efcca16a531bc8067e597b5c516f6 | 2,986 | py | Python | polling_stations/apps/data_collection/management/commands/import_torbay.py | alexsdutton/UK-Polling-Stations | 01ec234fd4a832694870d5ed9de069a228397f53 | [
"BSD-3-Clause"
] | null | null | null | polling_stations/apps/data_collection/management/commands/import_torbay.py | alexsdutton/UK-Polling-Stations | 01ec234fd4a832694870d5ed9de069a228397f53 | [
"BSD-3-Clause"
] | null | null | null | polling_stations/apps/data_collection/management/commands/import_torbay.py | alexsdutton/UK-Polling-Stations | 01ec234fd4a832694870d5ed9de069a228397f53 | [
"BSD-3-Clause"
] | null | null | null | from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
| 50.610169 | 100 | 0.630944 |
471f52f2f33824650411aa0f802cfadb11f387c5 | 179 | py | Python | des050.py | LeonardoPereirajr/Curso_em_video_Python | 9d8a97ba3389c8e86b37dfd089fab5d04adc146d | [
"MIT"
] | null | null | null | des050.py | LeonardoPereirajr/Curso_em_video_Python | 9d8a97ba3389c8e86b37dfd089fab5d04adc146d | [
"MIT"
] | null | null | null | des050.py | LeonardoPereirajr/Curso_em_video_Python | 9d8a97ba3389c8e86b37dfd089fab5d04adc146d | [
"MIT"
] | null | null | null | soma = 0
for c in range(0,6):
c = int(input('Digite um numero : '))
if c%2==1 :
soma = soma+c
print(' A soma dos impares dara {}'.format(soma))
print('FIM ') | 25.571429 | 50 | 0.541899 |
47215d1dcdc8fe290f39a9541fde0fa54188307f | 6,325 | py | Python | scenic/projects/vivit/configs/epic_kitchens/vivit_large_factorised_encoder.py | NielsRogge/scenic | 4418bf4c6954fffe61d9bafc802981baa9440e49 | [
"Apache-2.0"
] | 1 | 2022-02-17T18:48:43.000Z | 2022-02-17T18:48:43.000Z | scenic/projects/vivit/configs/epic_kitchens/vivit_large_factorised_encoder.py | NielsRogge/scenic | 4418bf4c6954fffe61d9bafc802981baa9440e49 | [
"Apache-2.0"
] | null | null | null | scenic/projects/vivit/configs/epic_kitchens/vivit_large_factorised_encoder.py | NielsRogge/scenic | 4418bf4c6954fffe61d9bafc802981baa9440e49 | [
"Apache-2.0"
] | null | null | null | r"""ViViT Factorised Encoder model for Epic Kitchens.
"""
from absl import logging
import ml_collections
EPIC_TRAIN_SIZE = 67217
EPIC_VALID_SIZE = 9668
def get_config():
"""Returns the base experiment configuration."""
config = ml_collections.ConfigDict()
config.experiment_name = 'vivit_large_factorised_enc... | 39.53125 | 129 | 0.784348 |
472180e30875c4ac8339f38fa4c6fde5ae82de74 | 376 | py | Python | nlp100/12.py | walkingmask/expr4-dm-2016 | b62d4c9d57ea8e4efe044fc98e4bdc365e87666d | [
"MIT"
] | null | null | null | nlp100/12.py | walkingmask/expr4-dm-2016 | b62d4c9d57ea8e4efe044fc98e4bdc365e87666d | [
"MIT"
] | null | null | null | nlp100/12.py | walkingmask/expr4-dm-2016 | b62d4c9d57ea8e4efe044fc98e4bdc365e87666d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 12.py
# 2016/10/11()
# walkingmask
# check
# cut -f1 hightemp.txt
# cut -f2 hightemp.txt
col1f = open('col1.txt', 'w')
col2f = open('col2.txt', 'w')
for line in open('hightemp.txt', 'r'):
raw = line.rstrip().replace("\t"," ").split(" ")
col1f.write(raw[0]+"\n")
... | 17.090909 | 50 | 0.590426 |
47223575ffe3dacf450a360bb6f35695e71e393c | 1,115 | py | Python | libnd4j/include/graph/generated/nd4j/graph/DataType.py | nutonchain/Deeplearning | 20f222c1eff95205c6c9c9b666b04402405e4442 | [
"Apache-2.0"
] | 1 | 2018-08-29T05:46:54.000Z | 2018-08-29T05:46:54.000Z | libnd4j/include/graph/generated/nd4j/graph/DataType.py | nutonchain/Deeplearning | 20f222c1eff95205c6c9c9b666b04402405e4442 | [
"Apache-2.0"
] | null | null | null | libnd4j/include/graph/generated/nd4j/graph/DataType.py | nutonchain/Deeplearning | 20f222c1eff95205c6c9c9b666b04402405e4442 | [
"Apache-2.0"
] | 1 | 2020-12-13T22:26:47.000Z | 2020-12-13T22:26:47.000Z | ################################################################################
# Copyright (c) 2015-2018 Skymind, Inc.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless... | 27.875 | 80 | 0.591031 |
47226c18564ce8f55f4fdb06c8ed33bfda9ac9a4 | 1,026 | py | Python | tests/test_app.py | Habbie/stockbot | 648e70604828d0ed762c243b4eb83122fd393b4d | [
"Apache-2.0"
] | null | null | null | tests/test_app.py | Habbie/stockbot | 648e70604828d0ed762c243b4eb83122fd393b4d | [
"Apache-2.0"
] | 16 | 2017-10-12T09:10:28.000Z | 2021-05-20T20:30:15.000Z | tests/test_app.py | Habbie/stockbot | 648e70604828d0ed762c243b4eb83122fd393b4d | [
"Apache-2.0"
] | 1 | 2021-06-18T18:23:36.000Z | 2021-06-18T18:23:36.000Z | import unittest
import datetime
from app import ScheduleHandler
| 31.090909 | 87 | 0.517544 |
47232224564cdd8a5caa75cbc4ac2385651ab18d | 96 | py | Python | venv/lib/python3.8/site-packages/cachecontrol/serialize.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/cachecontrol/serialize.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/cachecontrol/serialize.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/97/d1/9c/0ee9b4b39bafa05abf8cf04999afafcd584adf4911ee4f06c64e772d34 | 96 | 96 | 0.895833 |
47240275a74da00053f650b9e1be9d450a7288f2 | 6,150 | py | Python | aiida_quantumespresso/cli/utils/validate.py | lin-cp/aiida-quantumespresso | 55f2bc8c137a69be24709a119bc285c700997907 | [
"MIT"
] | null | null | null | aiida_quantumespresso/cli/utils/validate.py | lin-cp/aiida-quantumespresso | 55f2bc8c137a69be24709a119bc285c700997907 | [
"MIT"
] | null | null | null | aiida_quantumespresso/cli/utils/validate.py | lin-cp/aiida-quantumespresso | 55f2bc8c137a69be24709a119bc285c700997907 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Utility functions for validation of command line interface parameter inputs."""
from aiida.cmdline.utils import decorators
from aiida.common import exceptions
import click
def validate_starting_magnetization(structure, parameters, starting_magnetization=None):
"""Validate starting mag... | 39.423077 | 120 | 0.696585 |
47243b3e8295742da8d317aaf12c06c679cc0aca | 972 | py | Python | tests/trac/test-trac-0058.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | tests/trac/test-trac-0058.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | tests/trac/test-trac-0058.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | import pyxb.binding.generate
import pyxb.binding.datatypes as xs
import pyxb.binding.basis
import pyxb.utils.domutils
import os.path
xsd='''
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="iopt" nillable="true" type="xs:integer"/>
</xs:schema>
'''
#file('schema.xsd', 'w').write(xsd)
code =... | 27 | 98 | 0.696502 |
472541c1fb45432416447fbd232a3ef995de7235 | 35 | py | Python | cstool/input_data/__init__.py | Nebula-simulator/cstool | 4d8a6434fa0d05287876f656842257fbd5d196bd | [
"BSD-3-Clause"
] | null | null | null | cstool/input_data/__init__.py | Nebula-simulator/cstool | 4d8a6434fa0d05287876f656842257fbd5d196bd | [
"BSD-3-Clause"
] | 2 | 2021-08-05T12:36:13.000Z | 2022-02-05T15:51:39.000Z | cstool/input_data/__init__.py | Nebula-simulator/cstool | 4d8a6434fa0d05287876f656842257fbd5d196bd | [
"BSD-3-Clause"
] | 1 | 2021-08-06T09:20:43.000Z | 2021-08-06T09:20:43.000Z | from .param_file import param_file
| 17.5 | 34 | 0.857143 |
4725bdc2094e9f435b0639c37370a8daffc3e956 | 2,197 | py | Python | src/Utils/Trade.py | andrebask/TradingMate | 1b07c70cb6d911201c6983942353b3d70f1fc479 | [
"MIT"
] | null | null | null | src/Utils/Trade.py | andrebask/TradingMate | 1b07c70cb6d911201c6983942353b3d70f1fc479 | [
"MIT"
] | null | null | null | src/Utils/Trade.py | andrebask/TradingMate | 1b07c70cb6d911201c6983942353b3d70f1fc479 | [
"MIT"
] | null | null | null | from enum import Enum
import os
import sys
import inspect
import logging
import datetime
currentdir = os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentdir)
from Utils.Utils import Actions
| 34.873016 | 171 | 0.578971 |
472734dfa2d0143ee41b2ebd5310df9144aa63b2 | 497 | py | Python | scorebot/players.py | cloudlinux/scorebot | e2a105a605e17bcdeee8493efaa66b29c434ca80 | [
"MIT"
] | 3 | 2017-06-15T17:42:20.000Z | 2021-04-04T14:11:21.000Z | scorebot/players.py | cloudlinux/scorebot | e2a105a605e17bcdeee8493efaa66b29c434ca80 | [
"MIT"
] | null | null | null | scorebot/players.py | cloudlinux/scorebot | e2a105a605e17bcdeee8493efaa66b29c434ca80 | [
"MIT"
] | 2 | 2017-02-14T08:05:25.000Z | 2017-03-11T08:26:35.000Z | from collections import namedtuple
from config.config import CONF
PlayerInfo = namedtuple('PlayerInfo', ['team', 'slack_name'])
| 26.157895 | 64 | 0.672032 |
4727ec432d8a9e9863602a7ee35cae1cb0d9b01d | 1,862 | py | Python | getHostsPerf.py | yungbyr/jri-spb | 63b69ef7e842419d8346930b982b385224308a88 | [
"Beerware"
] | null | null | null | getHostsPerf.py | yungbyr/jri-spb | 63b69ef7e842419d8346930b982b385224308a88 | [
"Beerware"
] | null | null | null | getHostsPerf.py | yungbyr/jri-spb | 63b69ef7e842419d8346930b982b385224308a88 | [
"Beerware"
] | null | null | null | #!/bin/env python
import os
import sys
from XenServer import XenServer
from GELF import GELF
import traceback
try:
xs_session = XenServer().make_session()
pool = xs_session.xenapi.pool.get_all()[0]
pool_uuid = xs_session.xenapi.pool.get_uuid(pool)
hosts = xs_session.xenapi.host.get_all()
for ho... | 32.103448 | 80 | 0.529538 |
472b0a2f2e9b3fe1b62227a85d0dd389ed036ca6 | 18,590 | py | Python | elm/elmr.py | ShubhamDiwan/elm | bf33f2498551fba3b2fd42d982feb0d22c031a71 | [
"BSD-3-Clause"
] | 84 | 2015-03-08T07:39:47.000Z | 2022-03-06T03:41:23.000Z | elm/elmr.py | ShubhamDiwan/elm | bf33f2498551fba3b2fd42d982feb0d22c031a71 | [
"BSD-3-Clause"
] | 11 | 2015-09-10T04:01:26.000Z | 2021-06-01T23:04:46.000Z | elm/elmr.py | ShubhamDiwan/elm | bf33f2498551fba3b2fd42d982feb0d22c031a71 | [
"BSD-3-Clause"
] | 70 | 2015-03-30T10:20:14.000Z | 2022-03-06T03:41:24.000Z | # -*- coding: utf-8 -*-
"""
This file contains ELMKernel classes and all developed methods.
"""
# Python2 support
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from .mltools import *
import numpy as np
import ... | 35.75 | 83 | 0.537063 |
472d943521309da5bdb5ecbc1180c718f5245c0f | 1,561 | py | Python | ctapipe/image/concentration.py | nbiederbeck/ctapipe | cdd2fe5205bd2747d2846cfc751c51868b4a0bdd | [
"BSD-3-Clause"
] | null | null | null | ctapipe/image/concentration.py | nbiederbeck/ctapipe | cdd2fe5205bd2747d2846cfc751c51868b4a0bdd | [
"BSD-3-Clause"
] | null | null | null | ctapipe/image/concentration.py | nbiederbeck/ctapipe | cdd2fe5205bd2747d2846cfc751c51868b4a0bdd | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import astropy.units as u
from ..instrument import CameraGeometry
from ..containers import ConcentrationContainer
from .hillas import camera_to_shower_coordinates
from ..utils.quantities import all_to_value
__all__ = ["concentration_parameters"]
def concentration_parameters(geom: CameraGeometry, ... | 30.607843 | 88 | 0.679052 |
472df55e17729fcc47b160990f5f92d48d797df5 | 5,647 | py | Python | config/settings.py | jochenklar/django-project | ae46a6bdaf7a7711a3862009754c27f953d5f8eb | [
"MIT"
] | null | null | null | config/settings.py | jochenklar/django-project | ae46a6bdaf7a7711a3862009754c27f953d5f8eb | [
"MIT"
] | null | null | null | config/settings.py | jochenklar/django-project | ae46a6bdaf7a7711a3862009754c27f953d5f8eb | [
"MIT"
] | null | null | null | import os
from pathlib import Path
import dj_database_url
from django.utils.translation import gettext_lazy as _
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = os.getenv('SECRET_KEY')
DEBUG = (os.getenv('DEBUG', 'False').upper() == 'TRUE')
DEBUG_TOOLBAR = (os.getenv('DEBUG_TOOLBAR', 'False').upper... | 28.376884 | 79 | 0.556933 |
472f5b894c74ee5cb53c8c6e4af3b516896e2691 | 2,682 | py | Python | pyethapp/console_service.py | heikoheiko/pyethapp | 17a560abe8f8742bf5e30fa8f7e5495faf3cb101 | [
"BSD-3-Clause"
] | 48 | 2015-12-23T14:38:14.000Z | 2022-01-19T06:01:57.000Z | pyethapp/console_service.py | WEI-HE/pyethapp | 17a560abe8f8742bf5e30fa8f7e5495faf3cb101 | [
"BSD-3-Clause"
] | 2 | 2016-05-08T02:27:47.000Z | 2017-03-06T23:37:47.000Z | pyethapp/console_service.py | WEI-HE/pyethapp | 17a560abe8f8742bf5e30fa8f7e5495faf3cb101 | [
"BSD-3-Clause"
] | 27 | 2015-04-05T05:26:14.000Z | 2022-02-05T16:43:20.000Z | """
Essential parts borrowed from https://github.com/ipython/ipython/pull/1654
"""
import signal
from devp2p.service import BaseService
import gevent
from gevent.event import Event
import IPython
import IPython.core.shellapp
from IPython.lib.inputhook import inputhook_manager, stdin_ready
from ethereum import slogging
... | 27.9375 | 84 | 0.637211 |
472fb90bf8e9c1984e67a20df2a05e17dc5e6ff0 | 670 | py | Python | adventure/migrations/0008_auto_20160320_2237.py | matthew-macgregor/eamon | e59d14e790fd8e95f5f1a91d1965f549c2b673ba | [
"MIT"
] | 22 | 2016-03-22T07:28:42.000Z | 2022-02-12T16:03:17.000Z | adventure/migrations/0008_auto_20160320_2237.py | matthew-macgregor/eamon | e59d14e790fd8e95f5f1a91d1965f549c2b673ba | [
"MIT"
] | 103 | 2017-04-14T23:19:19.000Z | 2022-01-27T03:05:36.000Z | adventure/migrations/0008_auto_20160320_2237.py | matthew-macgregor/eamon | e59d14e790fd8e95f5f1a91d1965f549c2b673ba | [
"MIT"
] | 7 | 2019-04-09T16:12:10.000Z | 2021-12-15T17:09:32.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-03-21 05:37
from __future__ import unicode_literals
from django.db import migrations, models
| 25.769231 | 127 | 0.604478 |
472fc2f3d672c86f9759f9ac2c9539102d5e1b0b | 175 | py | Python | src/metrics/__init__.py | Alicegaz/torchok | 7b8f95df466a25b1ad8ee93bed1a3c7516440cf4 | [
"Apache-2.0"
] | 8 | 2021-10-12T05:39:20.000Z | 2022-03-31T10:55:01.000Z | src/metrics/__init__.py | Alicegaz/torchok | 7b8f95df466a25b1ad8ee93bed1a3c7516440cf4 | [
"Apache-2.0"
] | 1 | 2022-03-30T19:23:42.000Z | 2022-03-30T19:23:42.000Z | src/metrics/__init__.py | Alicegaz/torchok | 7b8f95df466a25b1ad8ee93bed1a3c7516440cf4 | [
"Apache-2.0"
] | 5 | 2021-11-17T07:38:28.000Z | 2022-01-31T10:46:36.000Z | from .common import *
from .classification import *
from .segmentation import *
from .verification import *
from .retrieval import *
from .metric_manager import MetricManager
| 25 | 41 | 0.8 |
4731fabfe155fe4caec4fa4a58fe927e97e941d4 | 4,935 | py | Python | custom_components/magicstrip/light.py | elahd/ha-magicstrip | f33aeafc4a313d8674591e44c0d1d9c11c91e9cd | [
"MIT"
] | null | null | null | custom_components/magicstrip/light.py | elahd/ha-magicstrip | f33aeafc4a313d8674591e44c0d1d9c11c91e9cd | [
"MIT"
] | null | null | null | custom_components/magicstrip/light.py | elahd/ha-magicstrip | f33aeafc4a313d8674591e44c0d1d9c11c91e9cd | [
"MIT"
] | null | null | null | """MagicStrip light implementation."""
from __future__ import annotations
import logging
from typing import Any, MutableMapping
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_EFFECT,
ATTR_RGB_COLOR,
COLOR_MODE_RGB,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_EFFECT,
... | 32.9 | 119 | 0.674772 |
5b259cabbea070c2cb0e3c57684d6e4cf99916c1 | 1,069 | py | Python | src/advanced_plot/vertical_bar.py | ikedaosushi/advanced-plot | 8a2ef3f0fc7921cdfe990fdf1e2044af664dc7b0 | [
"MIT"
] | null | null | null | src/advanced_plot/vertical_bar.py | ikedaosushi/advanced-plot | 8a2ef3f0fc7921cdfe990fdf1e2044af664dc7b0 | [
"MIT"
] | null | null | null | src/advanced_plot/vertical_bar.py | ikedaosushi/advanced-plot | 8a2ef3f0fc7921cdfe990fdf1e2044af664dc7b0 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns | 32.393939 | 95 | 0.614593 |
5b26a2989cc751d061fee5e02533b62c0199aa67 | 1,407 | py | Python | matrix/spiralOrder.py | nishantml/100-days-of-code | fdbd7f8d195363467ab462bd4f0774a34379a769 | [
"MIT"
] | 1 | 2021-03-20T12:23:31.000Z | 2021-03-20T12:23:31.000Z | matrix/spiralOrder.py | nishantml/100-days-of-code | fdbd7f8d195363467ab462bd4f0774a34379a769 | [
"MIT"
] | null | null | null | matrix/spiralOrder.py | nishantml/100-days-of-code | fdbd7f8d195363467ab462bd4f0774a34379a769 | [
"MIT"
] | null | null | null | """
Given an m x n matrix, return all elements of the matrix in spiral order.
Example 1:
Input: matrix = [[1,2,3],[4,5,6],[7,8,9]]
Output: [1,2,3,6,9,8,7,4,5]
Example 2:
Input: matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]]
Output: [1,2,3,4,8,12,11,10,9,5,6,7]
Constraints:
m == matrix.length
n == matrix[i].len... | 22.693548 | 73 | 0.471215 |
5b2c78d7a80a1e068c05e2fcdde3201711ae2bcd | 2,161 | py | Python | telegram_ecommerce/database/db_wrapper.py | Anonylions/telegram_ecommerce | f5382886bbebf607c735e2f451774c56df8d6011 | [
"MIT"
] | 10 | 2020-11-20T20:55:52.000Z | 2022-02-10T20:25:45.000Z | telegram_ecommerce/database/db_wrapper.py | Anonylions/telegram_ecommerce | f5382886bbebf607c735e2f451774c56df8d6011 | [
"MIT"
] | 1 | 2022-02-16T10:28:18.000Z | 2022-02-16T10:35:31.000Z | telegram_ecommerce/database/db_wrapper.py | Anonylions/telegram_ecommerce | f5382886bbebf607c735e2f451774c56df8d6011 | [
"MIT"
] | 8 | 2021-05-01T01:13:09.000Z | 2022-03-13T14:00:01.000Z |
import mysql.connector as connector
from ..utils.utils import get_sql_commands_from_a_file
from ..utils.consts import db_credentials
from ..utils.log import logger
db = DBWrapper(db_credentials)
logger.info("conected to database {}".format(db.database_name))
| 29.202703 | 76 | 0.661731 |
5b2da810c7adee849036ab5f31a31b82ac508c08 | 5,346 | py | Python | src/addnn/node/proto/neural_network_pb2.py | MatthiasJReisinger/addnn | 1d68648e81faf478cfb1f7d9a3f944a014fa3867 | [
"MIT"
] | 4 | 2022-01-25T23:09:24.000Z | 2022-03-30T20:57:18.000Z | src/addnn/node/proto/neural_network_pb2.py | MatthiasJReisinger/addnn | 1d68648e81faf478cfb1f7d9a3f944a014fa3867 | [
"MIT"
] | null | null | null | src/addnn/node/proto/neural_network_pb2.py | MatthiasJReisinger/addnn | 1d68648e81faf478cfb1f7d9a3f944a014fa3867 | [
"MIT"
] | 1 | 2022-01-25T23:08:50.000Z | 2022-01-25T23:08:50.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: addnn/node/proto/neural_network.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflec... | 35.403974 | 467 | 0.770857 |
5b2dd18e1ecfbb5e9df7c4c7ce61b73c2c764de6 | 5,334 | py | Python | satsense/extract.py | fossabot/satsense | 6666dd01a6988a86319c71a8f8802bf4b096c550 | [
"Apache-2.0"
] | 22 | 2018-03-14T10:29:38.000Z | 2022-03-29T10:54:51.000Z | satsense/extract.py | fdbesanto2/satsense | b0fa650193995a30328f26a36ebab2437c0e37ef | [
"Apache-2.0"
] | 49 | 2018-05-25T13:28:07.000Z | 2021-07-31T09:48:02.000Z | satsense/extract.py | fdbesanto2/satsense | b0fa650193995a30328f26a36ebab2437c0e37ef | [
"Apache-2.0"
] | 11 | 2018-04-24T08:55:28.000Z | 2021-02-17T22:32:05.000Z | """Module for computing features."""
import logging
from concurrent.futures import ProcessPoolExecutor
from functools import partial
from itertools import groupby
from os import cpu_count
from typing import Iterator
import numpy as np
from .features import Feature
from .generators import FullGenerator
from .image imp... | 34.412903 | 79 | 0.630484 |
5b2e595b9f19bfb2e8967ee33be2a32475c6a58f | 2,319 | py | Python | main.py | lbellomo/mafalda_bot | a2037d266d3c7ba2129b65686d05c9611fd10c61 | [
"MIT"
] | 1 | 2021-02-20T16:33:37.000Z | 2021-02-20T16:33:37.000Z | main.py | lbellomo/mafalda_bot | a2037d266d3c7ba2129b65686d05c9611fd10c61 | [
"MIT"
] | null | null | null | main.py | lbellomo/mafalda_bot | a2037d266d3c7ba2129b65686d05c9611fd10c61 | [
"MIT"
] | null | null | null | import os
import sys
import time
from pathlib import Path
from random import choice
from codecs import decode
from base64 import b64decode
import tweepy
max_errors_count = 5
CONSUMER_KEY = os.environ["CONSUMER_KEY"]
CONSUMER_SECRET = os.environ["CONSUMER_SECRET"]
ACCESS_TOKEN = os.environ["ACCESS_TOKEN"]
ACCESS_TOKE... | 24.670213 | 129 | 0.598103 |
5b2f1506a9908854c576dc2669ef2013acbe7667 | 1,787 | py | Python | steelpy/f2uModel/load/sqlite/main.py | svortega/steelpy | bef35eb8ab8728fc29f57b7070b5f3bac0b0e840 | [
"MIT"
] | 4 | 2021-09-28T12:52:01.000Z | 2022-02-24T22:30:22.000Z | steelpy/f2uModel/load/sqlite/main.py | svortega/steelpy | bef35eb8ab8728fc29f57b7070b5f3bac0b0e840 | [
"MIT"
] | null | null | null | steelpy/f2uModel/load/sqlite/main.py | svortega/steelpy | bef35eb8ab8728fc29f57b7070b5f3bac0b0e840 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2009-2021 fem2ufo
#
# Python stdlib imports
#from typing import NamedTuple, Dict, List, Iterable, Union
# package imports
from steelpy.f2uModel.load.sqlite.basic_load import BasicLoadSQL
from steelpy.f2uModel.load.sqlite.combination import LoadCombSQL
from steelpy.f2uModel.results.sqlite.operation.... | 29.783333 | 97 | 0.588137 |
5b2f83d5cd93c073ad130cc113bab25a1d03255b | 423 | py | Python | wrap/pybind11/pybind11/__init__.py | xxiao-1/gtsam | 8b1516f43ffdf6b5098fc282b566f2ee1edb50f6 | [
"BSD-3-Clause"
] | 84 | 2020-09-07T01:38:44.000Z | 2022-03-31T16:05:11.000Z | wrap/pybind11/pybind11/__init__.py | xxiao-1/gtsam | 8b1516f43ffdf6b5098fc282b566f2ee1edb50f6 | [
"BSD-3-Clause"
] | 39 | 2016-11-25T22:14:09.000Z | 2022-01-13T21:44:51.000Z | wrap/pybind11/pybind11/__init__.py | xxiao-1/gtsam | 8b1516f43ffdf6b5098fc282b566f2ee1edb50f6 | [
"BSD-3-Clause"
] | 22 | 2018-07-12T06:16:57.000Z | 2022-01-15T03:38:51.000Z | # -*- coding: utf-8 -*-
from ._version import version_info, __version__ # noqa: F401 imported but unused
| 30.214286 | 81 | 0.64539 |
5b2ff50acd81015198f76d11e3cd2e26119bee9b | 990 | py | Python | templates/event-source.py | mediatemple/ReC2 | c4074050cad99ddc7b0190cbbc278e0d37c361c7 | [
"MIT"
] | 3 | 2016-12-17T02:19:36.000Z | 2017-03-20T05:22:37.000Z | templates/event-source.py | mediatemple/ReC2 | c4074050cad99ddc7b0190cbbc278e0d37c361c7 | [
"MIT"
] | null | null | null | templates/event-source.py | mediatemple/ReC2 | c4074050cad99ddc7b0190cbbc278e0d37c361c7 | [
"MIT"
] | 2 | 2016-07-29T22:40:11.000Z | 2019-09-09T17:46:29.000Z | #!/usr/bin/env python
from troposphere import Template, Output, GetAtt, Parameter, Ref, events, awslambda
t = Template()
lambda_arn = t.add_parameter(Parameter(
'LambdaArn',
Type='String',
Description='Lambda Arn'
))
rule = t.add_resource(
events.Rule(
"ReC2Rule",
Targets=[events.Tar... | 20.204082 | 83 | 0.588889 |
5b305aaea3f5ffab82ca7d9b11d0a932e9ea8b70 | 3,716 | py | Python | errorguimonitor/report_retriever.py | imalkevich/errorguimonitor | 73280bd81027949a11e3facd60a2fb41c2c4a1d1 | [
"MIT"
] | null | null | null | errorguimonitor/report_retriever.py | imalkevich/errorguimonitor | 73280bd81027949a11e3facd60a2fb41c2c4a1d1 | [
"MIT"
] | null | null | null | errorguimonitor/report_retriever.py | imalkevich/errorguimonitor | 73280bd81027949a11e3facd60a2fb41c2c4a1d1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Report retriever module.
Grab HTML from the url provided.
"""
import random
import requests
from urllib.parse import quote as url_quote
from pyquery import PyQuery as pq
USER_AGENTS = ('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20100101 Firefox/11.0',
'Mo... | 39.531915 | 134 | 0.640743 |
5b30d2a47cc806b49df80d10546f31a2ce91bf14 | 20,347 | py | Python | h3/tree.py | rajatkapoor/pyh3 | 874b6aa94d61cd13b2d8e9232b1cc5971fc193f3 | [
"MIT"
] | 61 | 2015-08-11T00:44:58.000Z | 2022-02-10T12:14:01.000Z | h3/tree.py | rajatkapoor/pyh3 | 874b6aa94d61cd13b2d8e9232b1cc5971fc193f3 | [
"MIT"
] | 3 | 2016-02-26T17:27:19.000Z | 2016-08-12T03:04:12.000Z | h3/tree.py | rajatkapoor/pyh3 | 874b6aa94d61cd13b2d8e9232b1cc5971fc193f3 | [
"MIT"
] | 17 | 2015-08-10T20:32:55.000Z | 2019-03-13T19:33:21.000Z | import logging
import math
from collections import deque
from node import Node
from operator import itemgetter
from h3math import compute_radius, compute_hyperbolic_area, compute_delta_phi, compute_delta_theta
import mpl_toolkits.mplot3d.art3d as art3d
from matplotlib.patches import Circle
import matplotlib.pyplot as ... | 48.101655 | 120 | 0.57291 |
5b317e57461183461d3c250ff021fc4851ed0c97 | 744 | py | Python | researchutils/image/converter.py | yuishihara/researchutils | bb3ec467386d43a1e2282ec6d024216ce4dae841 | [
"MIT"
] | 1 | 2018-09-06T00:54:49.000Z | 2018-09-06T00:54:49.000Z | researchutils/image/converter.py | yuishihara/researchutils | bb3ec467386d43a1e2282ec6d024216ce4dae841 | [
"MIT"
] | 28 | 2018-08-25T03:54:30.000Z | 2018-10-14T12:09:47.000Z | researchutils/image/converter.py | yuishihara/researchutils | bb3ec467386d43a1e2282ec6d024216ce4dae841 | [
"MIT"
] | null | null | null | def hwc2chw(image):
"""
Changes the order of image pixels from Height-Width-Color to Color-Height-Width
Parameters
-------
image : numpy.ndarray
Image with pixels in Height-Width-Color order
Returns
-------
image : numpy.ndarray
Image with pixels in Color-Height-Width o... | 22.545455 | 83 | 0.620968 |
5b31f0b330141ac44d0ebd212cbd8605bcb60314 | 1,530 | py | Python | utils/plot_results.py | miniautonomous/trainer_ai | 953b6c22b65e249a9d7595d15c78c24c12bc254e | [
"MIT"
] | 1 | 2021-06-23T22:32:53.000Z | 2021-06-23T22:32:53.000Z | utils/plot_results.py | miniautonomous/trainer_ai | 953b6c22b65e249a9d7595d15c78c24c12bc254e | [
"MIT"
] | null | null | null | utils/plot_results.py | miniautonomous/trainer_ai | 953b6c22b65e249a9d7595d15c78c24c12bc254e | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
def plot_results(model_name: str, history, history_keys: list, training_dictionary:dict):
"""
Plot the results of a simulation.
Parameters
----------
model_name: (str) model name
history: (tf history) result of a Keras model fit
history_keys: (list) lis... | 36.428571 | 89 | 0.66732 |
5b3441a35ce26d50d34036f034d95f41123e550e | 3,564 | py | Python | 003-longest-substring-without-repeating-characters.py | mvj3/leetcode | 3111199beeaefbb3a74173e783ed21c9e53ab203 | [
"MIT"
] | null | null | null | 003-longest-substring-without-repeating-characters.py | mvj3/leetcode | 3111199beeaefbb3a74173e783ed21c9e53ab203 | [
"MIT"
] | null | null | null | 003-longest-substring-without-repeating-characters.py | mvj3/leetcode | 3111199beeaefbb3a74173e783ed21c9e53ab203 | [
"MIT"
] | null | null | null | """
Question:
Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with the len... | 34.601942 | 263 | 0.614478 |
5b34aa1af56249ef97f4b6fdf0c203875ab7d112 | 1,971 | py | Python | abel/tests/test_basex.py | Derollez/PyAbel | c8be4ed7e8e08ee026634b9e856fb473e58d7330 | [
"MIT"
] | null | null | null | abel/tests/test_basex.py | Derollez/PyAbel | c8be4ed7e8e08ee026634b9e856fb473e58d7330 | [
"MIT"
] | null | null | null | abel/tests/test_basex.py | Derollez/PyAbel | c8be4ed7e8e08ee026634b9e856fb473e58d7330 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import numpy as np
from numpy.testing import assert_allclose
import abel
DATA_DIR = os.path.join(os.path.split(__file__)[0], 'data')
def test_basex_step_ratio():
"""Check a gaussian so... | 27.760563 | 93 | 0.690005 |
5b3a8027dd21491237d65a61527430d014ff49a1 | 23,554 | py | Python | shogi-main1.py | GudSirSnek/GameOfShogi | 3961cdcba68561de9eb98d96dcc50df498cc9fcc | [
"Apache-2.0"
] | null | null | null | shogi-main1.py | GudSirSnek/GameOfShogi | 3961cdcba68561de9eb98d96dcc50df498cc9fcc | [
"Apache-2.0"
] | null | null | null | shogi-main1.py | GudSirSnek/GameOfShogi | 3961cdcba68561de9eb98d96dcc50df498cc9fcc | [
"Apache-2.0"
] | null | null | null | #main class handles user input and current gameState class
import pygame as p
import shogiEngine1
import os
import copy
import Piece
import Menu
height = 1057 #defines the board resolution
width = 1920
sq_size = 66
x_offset = 459
y_offset = 243
scale = 1
p.font.init()
myfont = p.font.SysFont('Comi... | 43.537893 | 263 | 0.484164 |
5b3cf373d640df91c859693048fae4d02399c861 | 2,848 | py | Python | mqtt/mqtt.py | luchosr/dht11Streams | f51922257c4aa4703556f546e43cf3a3219d203f | [
"Apache-2.0"
] | 1 | 2020-10-11T03:04:48.000Z | 2020-10-11T03:04:48.000Z | mqtt/mqtt.py | luchosr/dht11Streams | f51922257c4aa4703556f546e43cf3a3219d203f | [
"Apache-2.0"
] | null | null | null | mqtt/mqtt.py | luchosr/dht11Streams | f51922257c4aa4703556f546e43cf3a3219d203f | [
"Apache-2.0"
] | 1 | 2020-10-11T11:48:21.000Z | 2020-10-11T11:48:21.000Z | from sense_hat import SenseHat
#from collections import OrderedDict
import paho.mqtt.client as mqttClient
import time
import config
import json
sense=SenseHat()
sense.clear()
Connected = False
client = mqttClient.Client("Python")
client.username_pw_set(config.user, password=config.password)
... | 27.921569 | 159 | 0.554424 |
5b44f8f617dbbc8726355dc4049488c47d0b36f7 | 1,315 | py | Python | ai_covid_19/utils/utils.py | nestauk/ai_covid_19 | 4367b1c7a110094f090167dbe02a1c47ce27e0e9 | [
"MIT"
] | null | null | null | ai_covid_19/utils/utils.py | nestauk/ai_covid_19 | 4367b1c7a110094f090167dbe02a1c47ce27e0e9 | [
"MIT"
] | 14 | 2020-06-12T12:02:29.000Z | 2020-06-28T12:45:14.000Z | ai_covid_19/utils/utils.py | nestauk/ai_covid_19 | 4367b1c7a110094f090167dbe02a1c47ce27e0e9 | [
"MIT"
] | null | null | null | import numpy as np
import re
import random
from toolz.curried import *
def preview(df):
'''Previews a dataframe
Args:
x (df) a dataframe
'''
print(df.head())
return df
| 23.482143 | 85 | 0.612167 |
5b4664424009b5bcedec6cac5e139fe193b9a090 | 6,777 | py | Python | train_bayes_nn.py | afcarl/Fall2017_Individual_Study | 620dbeaa557105a7444fa01e6d78e4e59c646eac | [
"MIT"
] | 1 | 2019-04-22T16:42:09.000Z | 2019-04-22T16:42:09.000Z | train_bayes_nn.py | afcarl/Fall2017_Individual_Study | 620dbeaa557105a7444fa01e6d78e4e59c646eac | [
"MIT"
] | null | null | null | train_bayes_nn.py | afcarl/Fall2017_Individual_Study | 620dbeaa557105a7444fa01e6d78e4e59c646eac | [
"MIT"
] | null | null | null | import os
from os.path import join as pjoin
import cPickle as cp
import numpy as np
import tensorflow as tf
from sklearn.metrics import accuracy_score
from models.bnn import BNN
# command line arguments
flags = tf.flags
flags.DEFINE_integer("batchSize", 128, "batch size.")
flags.DEFINE_integer("nEpochs", 1500, "numb... | 42.892405 | 231 | 0.645418 |
5b4943551755f3bba451eb447ce7bcc2219f2a29 | 234 | py | Python | webapp/build.py | DavidGeisel/machine-learning-lab | 2d7a9ecae3780a5ecfe323e55b5d555ac41ce261 | [
"Apache-2.0"
] | null | null | null | webapp/build.py | DavidGeisel/machine-learning-lab | 2d7a9ecae3780a5ecfe323e55b5d555ac41ce261 | [
"Apache-2.0"
] | null | null | null | webapp/build.py | DavidGeisel/machine-learning-lab | 2d7a9ecae3780a5ecfe323e55b5d555ac41ce261 | [
"Apache-2.0"
] | null | null | null | """
Build ML Lab React Webapp
"""
import os
import subprocess
import argparse
# Wrapper to print out command
call("npm run setup")
| 15.6 | 47 | 0.722222 |
5b4adf85d7a1a04cebb1c8771aa76f2f5d18e037 | 505 | py | Python | others/levenshtein.py | Mifour/Algorithms | 77cfafc49bc0130da0f6041b169a15053f81af87 | [
"MIT"
] | null | null | null | others/levenshtein.py | Mifour/Algorithms | 77cfafc49bc0130da0f6041b169a15053f81af87 | [
"MIT"
] | null | null | null | others/levenshtein.py | Mifour/Algorithms | 77cfafc49bc0130da0f6041b169a15053f81af87 | [
"MIT"
] | null | null | null | import numpy as np
def levenshtein(first, second):
"""
O(nm) time & space for word of n and m characters
"""
n = len(first)
m = len(second)
matrix = np.array([np.arange(m)+i+1 for i in range(n)])
for i in range(1, n):
for j in range(1, m):
matrix[i,j] = min(
matrix[i-1, j] +1,
matrix[i, j-1] +1... | 21.956522 | 56 | 0.592079 |
5b51125a1a090c9fc8cb4d27953bb17cb0175781 | 159 | py | Python | ex005.py | juniorpedroso/Exercicios-CEV-Python | 4adad3b6f3994cf61f9ead5564124b8b9c58d304 | [
"MIT"
] | null | null | null | ex005.py | juniorpedroso/Exercicios-CEV-Python | 4adad3b6f3994cf61f9ead5564124b8b9c58d304 | [
"MIT"
] | null | null | null | ex005.py | juniorpedroso/Exercicios-CEV-Python | 4adad3b6f3994cf61f9ead5564124b8b9c58d304 | [
"MIT"
] | null | null | null | n = int(input('Digite um nmero: '))
#prox = n + 1
#ant = n -1
print ('Analizando o valor {}, seu antecessor {} e o sucessor {}.'.format(n, (n-1), (n+1)))
| 31.8 | 95 | 0.572327 |
5b52819344cdd9b254cb63f54c8459751f763cd8 | 2,781 | py | Python | dp_conceptual_search/ons/search/queries/ons_query_builders.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 3 | 2018-05-10T16:49:27.000Z | 2022-03-29T15:23:04.000Z | dp_conceptual_search/ons/search/queries/ons_query_builders.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 2 | 2018-09-20T06:37:27.000Z | 2018-11-12T12:05:08.000Z | dp_conceptual_search/ons/search/queries/ons_query_builders.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 3 | 2018-06-25T10:48:43.000Z | 2021-04-11T08:01:27.000Z | """
Defines a series of useful Elasticsearch queries for the ONS
"""
from typing import List
from elasticsearch_dsl import query as Q
from elasticsearch_dsl.aggs import A as Aggregation
from dp_conceptual_search.ons.search.fields import AvailableFields
from dp_conceptual_search.ons.search.content_type import ContentT... | 36.116883 | 144 | 0.667026 |
5b574f2296ecb2d56b23821c1097178c52787f98 | 1,486 | py | Python | 02_crowsnest/crowsnest.py | leszekgrechowicz/tiny_python_projects | 792c21a9a56c1dbe35d1aa1d4959c030a7921acd | [
"MIT"
] | null | null | null | 02_crowsnest/crowsnest.py | leszekgrechowicz/tiny_python_projects | 792c21a9a56c1dbe35d1aa1d4959c030a7921acd | [
"MIT"
] | null | null | null | 02_crowsnest/crowsnest.py | leszekgrechowicz/tiny_python_projects | 792c21a9a56c1dbe35d1aa1d4959c030a7921acd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Author : Leszek Grechowicz <leszek_grechowicz@o2.pl>
Date : 2021-06-13
Purpose: Choose the correct article
"""
import argparse
# --------------------------------------------------
def get_args():
"""Get command-line arguments"""
parser = argparse.ArgumentParser(
descript... | 25.62069 | 75 | 0.514132 |
5b59e0a9cb3bd76343fae397453413bc3b371849 | 68 | py | Python | sublime-plugin/poli/sublime/__init__.py | egnartsms/poli | 3a9eab2261688ed84b83808722360356b8e67522 | [
"MIT"
] | 1 | 2020-06-07T20:55:27.000Z | 2020-06-07T20:55:27.000Z | sublime-plugin/poli/sublime/__init__.py | egnartsms/poli | 3a9eab2261688ed84b83808722360356b8e67522 | [
"MIT"
] | 2 | 2021-01-22T08:45:48.000Z | 2021-01-22T08:45:49.000Z | sublime-plugin/poli/sublime/__init__.py | egnartsms/poli | 3a9eab2261688ed84b83808722360356b8e67522 | [
"MIT"
] | null | null | null | from .edit import *
from .regedit import *
from .view_dict import *
| 17 | 24 | 0.735294 |
5b59e6ee04f97441e3d69e0a51c1f84e9553c272 | 4,233 | py | Python | acl18/layers.py | tzshi/mh4-parser-acl18 | 20234703d6a2824fb6f76d45499db0a6ec6e27fb | [
"MIT"
] | 4 | 2018-08-22T13:54:38.000Z | 2021-05-16T16:22:36.000Z | acl18/layers.py | tzshi/mh4-parser-acl18 | 20234703d6a2824fb6f76d45499db0a6ec6e27fb | [
"MIT"
] | null | null | null | acl18/layers.py | tzshi/mh4-parser-acl18 | 20234703d6a2824fb6f76d45499db0a6ec6e27fb | [
"MIT"
] | 1 | 2019-05-19T16:59:20.000Z | 2019-05-19T16:59:20.000Z | #!/usr/bin/env python
# encoding: utf-8
from dynet import parameter, transpose, dropout, rectify
from dynet import layer_norm, affine_transform
from dynet import concatenate, zeroes, dot_product
from dynet import GlorotInitializer, ConstInitializer, SaxeInitializer
import math
def identity(x):
return x
| 29.601399 | 110 | 0.613749 |
5b5aa95c7ad2759e3e5ddaf4a2bed48b5f164af1 | 222 | py | Python | palindrome_number.py | I8PI/Blueberry | 4b21fa170614cc15810e5aff6e8f6c0520ade078 | [
"MIT"
] | 1 | 2020-02-27T09:41:33.000Z | 2020-02-27T09:41:33.000Z | palindrome_number.py | I8PI/Blueberry | 4b21fa170614cc15810e5aff6e8f6c0520ade078 | [
"MIT"
] | null | null | null | palindrome_number.py | I8PI/Blueberry | 4b21fa170614cc15810e5aff6e8f6c0520ade078 | [
"MIT"
] | null | null | null | n=int(input("enter the number: "))
temp=n
rev=0
while n>0:
dig=n%10
rev=rev*10+dig
n=n//10
if temp==rev:
print ("number is a palindrome", sep='a')
else:
print("number is not a palindrome")
| 17.076923 | 46 | 0.576577 |