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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
efd461c9230c324e2c8e6e92be4631dc26caa578 | 768 | py | Python | DailyProgrammer/20120316A.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | 2 | 2020-12-23T18:59:22.000Z | 2021-04-14T13:16:09.000Z | DailyProgrammer/20120316A.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | DailyProgrammer/20120316A.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | """
you have a string "ddaaiillyypprrooggrraammeerr". We want to remove all the consecutive duplicates and put them in a
separate string, which yields two separate instances of the string "dailyprogramer".
use this list for testing:
input: "balloons"
expected output: "balons" "lo"
input: "ddaaiillyypprrooggrraammeerr"... | 25.6 | 116 | 0.69401 |
efd60ec0f5dfed774930cf3e30f7572bed405c2b | 6,485 | py | Python | src/preppipe/enginesupport/enginesupport.py | PrepPipe/preppipe-python | 6fc547a539737ec37a7528eb97ce92e56d4f404a | [
"Apache-2.0"
] | 1 | 2022-02-28T03:34:57.000Z | 2022-02-28T03:34:57.000Z | src/preppipe/enginesupport/enginesupport.py | PrepPipe/preppipe-python | 6fc547a539737ec37a7528eb97ce92e56d4f404a | [
"Apache-2.0"
] | null | null | null | src/preppipe/enginesupport/enginesupport.py | PrepPipe/preppipe-python | 6fc547a539737ec37a7528eb97ce92e56d4f404a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import typing
import PIL.Image
from enum import Enum
import re
import preppipe.commontypes
from preppipe.vnmodel import *
# we define an MIR infrastructure for backend... Engine Model (EM)
# helper functions
def _get_label_name(name : str, type_prefix : str, scope_pre... | 32.918782 | 143 | 0.665998 |
efd85393ed4e8b07da224123311c11a7291f7173 | 190 | py | Python | openprocurement/tender/limited/__init__.py | Leits/openprocurement.tender.limited | c216e5b96dc850036d94fdf21883845afee34252 | [
"Apache-2.0"
] | null | null | null | openprocurement/tender/limited/__init__.py | Leits/openprocurement.tender.limited | c216e5b96dc850036d94fdf21883845afee34252 | [
"Apache-2.0"
] | 2 | 2021-03-26T00:30:52.000Z | 2022-03-21T22:22:09.000Z | openprocurement/tender/limited/__init__.py | Leits/openprocurement.tender.limited | c216e5b96dc850036d94fdf21883845afee34252 | [
"Apache-2.0"
] | null | null | null | from openprocurement.tender.limited.models import Tender
| 27.142857 | 56 | 0.815789 |
efd8cec6101a750931dee27419124950274496b7 | 3,422 | py | Python | upload.py | woodlords/nftmaker-pro-scripts | 86e1eef0d297bf9589d56272b1edea9bb3e18612 | [
"Apache-2.0"
] | 2 | 2022-02-09T17:48:33.000Z | 2022-02-12T08:18:42.000Z | upload.py | woodlords/nftmaker-pro-scripts | 86e1eef0d297bf9589d56272b1edea9bb3e18612 | [
"Apache-2.0"
] | null | null | null | upload.py | woodlords/nftmaker-pro-scripts | 86e1eef0d297bf9589d56272b1edea9bb3e18612 | [
"Apache-2.0"
] | null | null | null | from pprint import pprint
import requests
import base64
import json
import argparse
import sys
p = argparse.ArgumentParser(description="New")
p.add_argument('-f','--folder-name', required=True, help='Folder name of the images/metadata files')
p.add_argument('-s','--start', required=False, help='Start ID to upload')
p... | 30.553571 | 136 | 0.648159 |
efdbc298676774176ab064bb9bca24e8e6416478 | 1,613 | py | Python | runner/runner.py | lorne-luo/quicksilver | 79f2b66de9ab7aa63a35f56cac800b64c202f70c | [
"MIT"
] | null | null | null | runner/runner.py | lorne-luo/quicksilver | 79f2b66de9ab7aa63a35f56cac800b64c202f70c | [
"MIT"
] | null | null | null | runner/runner.py | lorne-luo/quicksilver | 79f2b66de9ab7aa63a35f56cac800b64c202f70c | [
"MIT"
] | null | null | null | import logging
from queue import Queue
from redis_queue.queue import RedisQueue
from runner.base import BaseRunner
logger = logging.getLogger(__name__)
if __name__ == '__main__':
# python -m event.runner
from handler import *
r = TestRedisRunner('test_runner', [], [],
[Heart... | 25.603175 | 97 | 0.650341 |
efdeda6cab101f5fe55ec27079a0f853fcc20c7e | 6,790 | py | Python | ultron/sentry/Analysis/TechnicalAnalysis/__init__.py | wangjiehui11235/ultron | ade46fdcff7eaf01187cdf9b9fb1d6a04ae972b7 | [
"Apache-2.0"
] | 4 | 2019-06-06T09:38:49.000Z | 2022-01-29T00:02:11.000Z | ultron/sentry/Analysis/TechnicalAnalysis/__init__.py | wangjiehui11235/ultron | ade46fdcff7eaf01187cdf9b9fb1d6a04ae972b7 | [
"Apache-2.0"
] | 1 | 2022-02-11T03:43:10.000Z | 2022-02-11T03:43:10.000Z | ultron/sentry/Analysis/TechnicalAnalysis/__init__.py | wangjiehui11235/ultron | ade46fdcff7eaf01187cdf9b9fb1d6a04ae972b7 | [
"Apache-2.0"
] | 8 | 2019-06-02T13:11:00.000Z | 2021-11-11T01:06:22.000Z | # -*- coding: utf-8 -*-
from ultron.sentry.Analysis.TechnicalAnalysis.StatelessTechnicalAnalysers import SecuritySignValueHolder
from ultron.sentry.Analysis.TechnicalAnalysis.StatelessTechnicalAnalysers import SecurityAverageValueHolder
from ultron.sentry.Analysis.TechnicalAnalysis.StatelessTechnicalAnalysers import S... | 70 | 119 | 0.841679 |
efdf05259aeb476a54f281ec506c8577fe42f662 | 17,015 | py | Python | app/common/helper.py | lguobin/KB_API | f7180cf430cb8de2eac8fa78e3937666da950c7a | [
"Apache-2.0"
] | null | null | null | app/common/helper.py | lguobin/KB_API | f7180cf430cb8de2eac8fa78e3937666da950c7a | [
"Apache-2.0"
] | null | null | null | app/common/helper.py | lguobin/KB_API | f7180cf430cb8de2eac8fa78e3937666da950c7a | [
"Apache-2.0"
] | null | null | null | # from app.common.utils import *
from sqlalchemy import desc
from settings import Config
from app.models import *
from app.extensions import db
from app.models.base import _BaseModel
from app.common.message import DBError
#
# ------------------------------
# ------------------------------
# ----------------... | 33.759921 | 132 | 0.53253 |
efe02360bc1283274b4bc2434f2af992e192e9a4 | 7,403 | py | Python | package/tests/test_cp/test_azure/test_domain/test_services/test_vm_credentials_service.py | tim-spiglanin/Azure-Shell | 58c52994f0d6cfd798c5dca33737419ec18363d4 | [
"Apache-2.0"
] | 5 | 2016-09-08T08:33:47.000Z | 2020-02-10T12:31:15.000Z | package/tests/test_cp/test_azure/test_domain/test_services/test_vm_credentials_service.py | tim-spiglanin/Azure-Shell | 58c52994f0d6cfd798c5dca33737419ec18363d4 | [
"Apache-2.0"
] | 505 | 2016-08-09T07:41:03.000Z | 2021-02-08T20:26:46.000Z | package/tests/test_cp/test_azure/test_domain/test_services/test_vm_credentials_service.py | tim-spiglanin/Azure-Shell | 58c52994f0d6cfd798c5dca33737419ec18363d4 | [
"Apache-2.0"
] | 5 | 2016-12-21T12:52:55.000Z | 2021-07-08T09:50:42.000Z | from unittest import TestCase
import mock
from cloudshell.cp.azure.domain.services.vm_credentials_service import VMCredentialsService
from cloudshell.cp.azure.models.vm_credentials import VMCredentials
def test_prepare_windows_credentials_without_user_and_password(self):
"""Check that method will return... | 51.409722 | 120 | 0.685533 |
efe17a7b9267d6d10ac42dd61070b721d1c277ec | 751 | py | Python | src/handler/quit.py | junhg0211/Kreylin | aae5e1e5ba5cfaadfab6708cb0bf26a75c6dcb7a | [
"Apache-2.0"
] | 1 | 2019-09-11T12:02:53.000Z | 2019-09-11T12:02:53.000Z | src/handler/quit.py | junhg0211/Kreylin | aae5e1e5ba5cfaadfab6708cb0bf26a75c6dcb7a | [
"Apache-2.0"
] | 8 | 2019-09-11T12:06:54.000Z | 2020-02-09T04:42:13.000Z | src/handler/quit.py | junhg0211/Kreylin | aae5e1e5ba5cfaadfab6708cb0bf26a75c6dcb7a | [
"Apache-2.0"
] | 1 | 2021-05-24T12:43:07.000Z | 2021-05-24T12:43:07.000Z | from sys import platform
import pygame
from handler.handler import Handler
| 34.136364 | 120 | 0.663116 |
efe1e27548d4a791c0325857f9e7735c777989c1 | 2,635 | py | Python | decisive/__init__.py | decisive/api-demo-python | 58cd14e9e1f6373a3cd927536fd29f5f286940a0 | [
"MIT"
] | null | null | null | decisive/__init__.py | decisive/api-demo-python | 58cd14e9e1f6373a3cd927536fd29f5f286940a0 | [
"MIT"
] | null | null | null | decisive/__init__.py | decisive/api-demo-python | 58cd14e9e1f6373a3cd927536fd29f5f286940a0 | [
"MIT"
] | null | null | null | import requests
import requests.exceptions
import datetime
import ujson as json
import logging
| 38.188406 | 88 | 0.603036 |
efe41b6dc8f659359b1e12cb86ef509b2e8e51a8 | 38,284 | py | Python | app/main/views/service_settings.py | karlchillmaid/notifications-admin | 9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880 | [
"MIT"
] | null | null | null | app/main/views/service_settings.py | karlchillmaid/notifications-admin | 9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880 | [
"MIT"
] | null | null | null | app/main/views/service_settings.py | karlchillmaid/notifications-admin | 9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880 | [
"MIT"
] | null | null | null | from flask import (
abort,
current_app,
flash,
redirect,
render_template,
request,
session,
url_for,
)
from flask_login import current_user, login_required
from notifications_python_client.errors import HTTPError
from notifications_utils.field import Field
from notifications_utils.format... | 37.132881 | 119 | 0.709252 |
efe457cbb3f9ed9d770c24aeb1ca7014a5e1296d | 3,094 | py | Python | doctools/spelling.py | Sketch98/oil | 2d5c51432b9699e48178236da2e5b3bf1a33d79f | [
"Apache-2.0"
] | null | null | null | doctools/spelling.py | Sketch98/oil | 2d5c51432b9699e48178236da2e5b3bf1a33d79f | [
"Apache-2.0"
] | null | null | null | doctools/spelling.py | Sketch98/oil | 2d5c51432b9699e48178236da2e5b3bf1a33d79f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
"""
spelling.py
Filter the output of 'lynx -dump' into a list of words to spell check.
"""
from __future__ import print_function
from collections import Counter
import optparse
import re
import sys
def Options():
"""Returns an option parser instance."""
p = optparse.OptionParser()
p.... | 21.636364 | 80 | 0.591791 |
efe4b76066b7fc615a3d5cb419d39e72b57d7593 | 20,659 | py | Python | train_deep_ls.py | Kamysek/DeepLocalShapes | 24ee92889381d40acbb5ad1c7c8abb512a8c26b5 | [
"MIT"
] | 4 | 2021-09-23T11:36:30.000Z | 2022-02-23T20:10:46.000Z | train_deep_ls.py | Kamysek/DeepLocalShapes | 24ee92889381d40acbb5ad1c7c8abb512a8c26b5 | [
"MIT"
] | null | null | null | train_deep_ls.py | Kamysek/DeepLocalShapes | 24ee92889381d40acbb5ad1c7c8abb512a8c26b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Based on: https://github.com/facebookresearch/DeepSDF using MIT LICENSE (https://github.com/facebookresearch/DeepSDF/blob/master/LICENSE)
# Copyright 2021-present Philipp Friedrich, Josef Kamysek. All Rights Reserved.
import functools
import json
import logging
import math
import os
import sig... | 32.330203 | 182 | 0.628588 |
efe7d81ac7833b8ba25967361da1b664addd861c | 498 | py | Python | setup.py | nicosandller/python-ethereumrpc | e826f99bbb34dc3d8009ac9392677e9ae2c9fa36 | [
"MIT"
] | 1 | 2019-03-28T19:16:21.000Z | 2019-03-28T19:16:21.000Z | setup.py | nicosandller/python-ethereumrpc | e826f99bbb34dc3d8009ac9392677e9ae2c9fa36 | [
"MIT"
] | null | null | null | setup.py | nicosandller/python-ethereumrpc | e826f99bbb34dc3d8009ac9392677e9ae2c9fa36 | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name = 'python-ethereumrpc',
packages = ['python-ethereumrpc'],
version = '0.1',
description = 'A python interface for ethereum JSON-RPC service.',
author = 'Nicolas Sandller',
author_email = 'nicosandller@gmail.com',
url = 'https://github.com/nicosandller/python-et... | 35.571429 | 82 | 0.696787 |
efe8537711357e13e0aa907bd882c404ad86cc4e | 988 | py | Python | interface.py | robotafm/motor | 1c0838db12514304b930aec976d7adcbc51b7c92 | [
"MIT"
] | null | null | null | interface.py | robotafm/motor | 1c0838db12514304b930aec976d7adcbc51b7c92 | [
"MIT"
] | null | null | null | interface.py | robotafm/motor | 1c0838db12514304b930aec976d7adcbc51b7c92 | [
"MIT"
] | null | null | null | # /robotafm/motor/interface.py
# Main web interface, contains basic
# information display
# imports:
import xml.dom.minidom
from flask import Flask, render_template
# constants:
LANG = "./lang/rus.xml"
# XML: load text strings from language file
dom = xml.dom.minidom.parse(LANG)
main_title = dom.getElem... | 29.058824 | 87 | 0.709514 |
efe95ae7664ab58458aa225b5cb6251325f40d6d | 317 | py | Python | src/eval_codalab_offline.py | bjj9/EVE_SCPT | c91b13f8bbfe8ea29a0e9f1df0dc016a258c904f | [
"MIT"
] | 21 | 2021-06-20T02:35:08.000Z | 2022-03-16T06:57:03.000Z | src/eval_codalab_offline.py | bjj9/EVE_SCPT | c91b13f8bbfe8ea29a0e9f1df0dc016a258c904f | [
"MIT"
] | 2 | 2021-06-20T15:43:28.000Z | 2021-08-02T08:37:02.000Z | src/eval_codalab_offline.py | bjj9/EVE_SCPT | c91b13f8bbfe8ea29a0e9f1df0dc016a258c904f | [
"MIT"
] | 1 | 2021-07-19T11:07:13.000Z | 2021-07-19T11:07:13.000Z | from eval_codalab_basic import eval_codalab_basic
if __name__ == '__main__':
# 1. run first round to prepare full memory
eval_codalab_basic(output_suffix='online', skip_first_round_if_memory_is_ready=True)
# 2. do offline evaluation when memory is ready
eval_codalab_basic(output_suffix='offline')
| 31.7 | 88 | 0.782334 |
efed594b93f7036fd9e0fbb23d74fff628cd47d4 | 922 | py | Python | CountingValleys/ValleyCounter.py | monemonesi/TDD_Katas_Python | f21a4f3516b75d7618dcd044453e25be015b4251 | [
"MIT"
] | null | null | null | CountingValleys/ValleyCounter.py | monemonesi/TDD_Katas_Python | f21a4f3516b75d7618dcd044453e25be015b4251 | [
"MIT"
] | null | null | null | CountingValleys/ValleyCounter.py | monemonesi/TDD_Katas_Python | f21a4f3516b75d7618dcd044453e25be015b4251 | [
"MIT"
] | null | null | null | UP = "U"
DOWN = "D"
ALLOWED_PATH_I = [UP, DOWN]
def update_high_for_step(high: int, step: str) -> int:
"""Update the current high given a step"""
if step == UP:
high += 1
elif step == DOWN:
high -= 1
return high
def count_valley(steps: int, path: str) -> int:
"""... | 27.117647 | 83 | 0.611714 |
efee0f491f5feefbc9f83692582c209722451e90 | 84 | py | Python | examples/coordinates3.py | r0the/gpanel | 34cb31ef5abf08b139330fce6b301d920b22cea4 | [
"MIT"
] | 1 | 2021-03-22T06:31:38.000Z | 2021-03-22T06:31:38.000Z | examples/coordinates3.py | r0the/gpanel | 34cb31ef5abf08b139330fce6b301d920b22cea4 | [
"MIT"
] | 8 | 2021-03-10T09:50:04.000Z | 2021-03-22T06:33:18.000Z | examples/coordinates3.py | r0the/gpanel | 34cb31ef5abf08b139330fce6b301d920b22cea4 | [
"MIT"
] | null | null | null | from gpanel import *
coordinates(-3, -3, 11, 11)
line(0, 0, 8, 8)
line(8, 0, 0, 8)
| 14 | 27 | 0.583333 |
efee470e855ae2a217e0a35720dd990d8a0f3c8b | 333 | py | Python | Ex044.py | JeanPauloGarcia/Python-Exercicios | faff4670806c423680ee00a88d3c4c49b437e72e | [
"MIT"
] | null | null | null | Ex044.py | JeanPauloGarcia/Python-Exercicios | faff4670806c423680ee00a88d3c4c49b437e72e | [
"MIT"
] | null | null | null | Ex044.py | JeanPauloGarcia/Python-Exercicios | faff4670806c423680ee00a88d3c4c49b437e72e | [
"MIT"
] | null | null | null | preo = float(input('Preo: '))
print('''Preencha a forma de pagamento com:
1 - p/ VISTA
2 - p/ CARTO 1x
3 - p/ CARTO 2x
4 - p/ CARTO 3x ou mais
''')
pagto = str(input('Pagamento: ')).strip()
if pagto == '1':
preo = preo*0.9
elif pagto == '2':
preo = preo*0.95
elif pagto == '4':
preo = preo*1.2
print(preo)
| 19.588235 | 43 | 0.597598 |
eff27556e4f9b47dbc9ed41d42898d35ce432f5c | 1,264 | py | Python | scorebee/main.py | mikeboers/ScoreBee | e8c3476b6401808a61b495b9c42e8cbe752906b4 | [
"BSD-3-Clause"
] | null | null | null | scorebee/main.py | mikeboers/ScoreBee | e8c3476b6401808a61b495b9c42e8cbe752906b4 | [
"BSD-3-Clause"
] | null | null | null | scorebee/main.py | mikeboers/ScoreBee | e8c3476b6401808a61b495b9c42e8cbe752906b4 | [
"BSD-3-Clause"
] | null | null | null |
import logging
import sys
from .application import Application
from .document import Document, Track, Event
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
app = Application(sys.argv)
if '--debug' in sys.argv:
# # Load a document.
# # We absolutely MUST have ... | 28.088889 | 84 | 0.511076 |
eff28154f7d481027598302c0ee3f1c65be8e270 | 45,609 | py | Python | ceci/stage.py | eacharles/ceci | e52e956c9e373c9a632ad0c312770f32ceab0c8b | [
"BSD-3-Clause"
] | null | null | null | ceci/stage.py | eacharles/ceci | e52e956c9e373c9a632ad0c312770f32ceab0c8b | [
"BSD-3-Clause"
] | 1 | 2022-01-05T22:04:57.000Z | 2022-01-05T22:04:57.000Z | ceci/stage.py | eacharles/ceci | e52e956c9e373c9a632ad0c312770f32ceab0c8b | [
"BSD-3-Clause"
] | null | null | null | """Module with core functionality for a single pipeline stage """
import pathlib
import os
import sys
from textwrap import dedent
import shutil
import cProfile
from abc import abstractmethod
from . import errors
from .monitor import MemoryMonitor
from .config import StageConfig, cast_to_streamable
SERIAL = "serial"
... | 35.912598 | 118 | 0.568967 |
eff725f55234c2a2a095069fa9d26ab47ed278d3 | 8,400 | py | Python | TrinaPointAndClick/src/TrinaPointAndClick/scripts/Marker_List_Node.py | mjclements/TRINA-WPI-2.0 | aa060819522ed9010d20e9db0cf45b19f6b083af | [
"MIT"
] | null | null | null | TrinaPointAndClick/src/TrinaPointAndClick/scripts/Marker_List_Node.py | mjclements/TRINA-WPI-2.0 | aa060819522ed9010d20e9db0cf45b19f6b083af | [
"MIT"
] | null | null | null | TrinaPointAndClick/src/TrinaPointAndClick/scripts/Marker_List_Node.py | mjclements/TRINA-WPI-2.0 | aa060819522ed9010d20e9db0cf45b19f6b083af | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
import numpy as np
import math
from geometry_msgs.msg import PoseStamped, Transform
from TrinaPointAndClick.msg import Marker, MarkerArray
if __name__ == '__main__':
"""
Initializes node and names it
Parameters:
None
Returns:
... | 38.181818 | 202 | 0.616548 |
eff99e10986bd9b8e0f53017db77d82913562ddf | 1,102 | py | Python | topology.py | Patatone/ryu-static-load-balancing | 7f3508ff8b135736150ad5c38b544d6e6ba90509 | [
"Apache-2.0"
] | null | null | null | topology.py | Patatone/ryu-static-load-balancing | 7f3508ff8b135736150ad5c38b544d6e6ba90509 | [
"Apache-2.0"
] | null | null | null | topology.py | Patatone/ryu-static-load-balancing | 7f3508ff8b135736150ad5c38b544d6e6ba90509 | [
"Apache-2.0"
] | null | null | null | from mininet.topo import Topo
from mininet.link import TCLink
topos = { 'topology': ( lambda: Topology() ) }
| 39.357143 | 81 | 0.607985 |
eff9cec3835ce08f6cdd64396a53993ba845ce23 | 5,155 | py | Python | JFJB.py | stevevai/JFJB-crawler | 182c8930e5e979ea9176452764e9494a17574b1f | [
"Apache-2.0"
] | 1 | 2019-04-14T16:28:28.000Z | 2019-04-14T16:28:28.000Z | JFJB.py | stevevai/JFJB-crawler | 182c8930e5e979ea9176452764e9494a17574b1f | [
"Apache-2.0"
] | null | null | null | JFJB.py | stevevai/JFJB-crawler | 182c8930e5e979ea9176452764e9494a17574b1f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 12 23:00:28 2018
@author: wangshuai
"""
import urllib
import urllib.request as urllib2
import http.cookiejar as cookielib
import io
import re
import gzip
from selenium import webdriver
import datetime
if __name__ == '__main__':
config = Config()
... | 31.625767 | 156 | 0.49098 |
effa145f7d27636ce9979e5fe2ebebe04e1345c3 | 392 | py | Python | tensorprob/samplers/base.py | ibab/tensorfit | 53bbb324520f34335a272dc057c3ae6e9d2c575e | [
"MIT"
] | 95 | 2016-02-29T08:25:07.000Z | 2021-06-02T15:33:01.000Z | tensorprob/samplers/base.py | ibab/tensorprob | 79efa5678f984a2bb92573fb25c17b9475baef23 | [
"MIT"
] | 48 | 2016-02-19T00:56:05.000Z | 2016-02-28T23:12:12.000Z | tensorprob/samplers/base.py | ibab/tensorfit | 53bbb324520f34335a272dc057c3ae6e9d2c575e | [
"MIT"
] | 19 | 2016-02-29T00:14:34.000Z | 2020-06-18T06:07:39.000Z | import tensorflow as tf
| 21.777778 | 59 | 0.67602 |
effaf46adea62c6d7c4589ee3471fc9f1f1bc8dc | 3,327 | py | Python | scripts/ocgis_subset.py | Zeitsperre/flyingpigeon | 678370bf428af7ffe11ee79be3b8a89c73215e5e | [
"Apache-2.0"
] | 1 | 2016-12-04T18:01:49.000Z | 2016-12-04T18:01:49.000Z | scripts/ocgis_subset.py | Zeitsperre/flyingpigeon | 678370bf428af7ffe11ee79be3b8a89c73215e5e | [
"Apache-2.0"
] | 13 | 2017-03-16T15:44:21.000Z | 2019-08-19T16:56:04.000Z | scripts/ocgis_subset.py | Zeitsperre/flyingpigeon | 678370bf428af7ffe11ee79be3b8a89c73215e5e | [
"Apache-2.0"
] | null | null | null | from os import path, listdir
import ocgis
from flyingpigeon import subset
from flyingpigeon import utils
from flyingpigeon.ocgis_module import call
def get_prediction(gam_model, ncs_indices): # mask=None
"""
predict the probabillity based on the gam_model and the given climate index datasets
:param gam... | 31.386792 | 110 | 0.644725 |
effb3d0f203ab8c4e4ea27554b71aa4fcc456877 | 746 | py | Python | jacc/migrations/0019_entrytype_identifier.py | bachvtuan/django-jacc | 37cdd54d8602d25e43a433bd66ccbed61f45a112 | [
"MIT"
] | 10 | 2019-02-25T23:30:33.000Z | 2021-05-02T18:02:48.000Z | jacc/migrations/0019_entrytype_identifier.py | bachvtuan/django-jacc | 37cdd54d8602d25e43a433bd66ccbed61f45a112 | [
"MIT"
] | null | null | null | jacc/migrations/0019_entrytype_identifier.py | bachvtuan/django-jacc | 37cdd54d8602d25e43a433bd66ccbed61f45a112 | [
"MIT"
] | 4 | 2019-09-09T09:33:55.000Z | 2022-01-01T09:28:13.000Z | # Generated by Django 2.1.2 on 2018-10-18 15:36
from django.db import migrations, models
from django.db.models import F
| 28.692308 | 116 | 0.687668 |
effc0cb6fddb743089c7bdb462500e13e334b104 | 342 | py | Python | tests/test_invalid_login.py | joshmgrant/Python-Pytest-Nerodia | 55e8d92cd21e3093e6eb434e4ab7b126c974c6f0 | [
"MIT"
] | 1 | 2019-03-19T08:29:02.000Z | 2019-03-19T08:29:02.000Z | tests/test_invalid_login.py | joshmgrant/Python-Pytest-Nerodia | 55e8d92cd21e3093e6eb434e4ab7b126c974c6f0 | [
"MIT"
] | null | null | null | tests/test_invalid_login.py | joshmgrant/Python-Pytest-Nerodia | 55e8d92cd21e3093e6eb434e4ab7b126c974c6f0 | [
"MIT"
] | null | null | null | import pytest
| 28.5 | 70 | 0.733918 |
effc7b61a293ddc828780cd36ebddcbb6d17256b | 403 | py | Python | splicemachine/mlflow_support/flavors/mlflow_onnx.py | myles-novick/pysplice | 96a848d4adda0a937002798865d32939f059f4d1 | [
"Apache-2.0"
] | null | null | null | splicemachine/mlflow_support/flavors/mlflow_onnx.py | myles-novick/pysplice | 96a848d4adda0a937002798865d32939f059f4d1 | [
"Apache-2.0"
] | null | null | null | splicemachine/mlflow_support/flavors/mlflow_onnx.py | myles-novick/pysplice | 96a848d4adda0a937002798865d32939f059f4d1 | [
"Apache-2.0"
] | null | null | null | from splicemachine.mlflow_support import *
from splicemachine.mlflow_support.mlflow_support import _GORILLA_SETTINGS
import gorilla
import mlflow.onnx
gorilla.apply(gorilla.Patch(mlflow.onnx, _log_model.__name__.lstrip('_'), _log_model, settings=_GORILLA_SETTINGS))
| 40.3 | 114 | 0.816377 |
effc868ba3985263b54f27c9ba1dafa032b3a960 | 351 | py | Python | services/shortto.py | joshthecoder/shorty-python | 35687d010683944d75e3f0dce7799903296172c5 | [
"MIT"
] | 11 | 2015-05-29T04:58:28.000Z | 2020-05-31T17:07:52.000Z | services/shortto.py | joshthecoder/shorty-python | 35687d010683944d75e3f0dce7799903296172c5 | [
"MIT"
] | null | null | null | services/shortto.py | joshthecoder/shorty-python | 35687d010683944d75e3f0dce7799903296172c5 | [
"MIT"
] | 2 | 2015-03-10T06:22:31.000Z | 2018-06-18T18:20:59.000Z | ## Shorty
## Copyright 2009 Joshua Roesslein
## See LICENSE
## @url short.to
| 21.9375 | 65 | 0.60114 |
effded4514a6e107993718820a8e681baef231bd | 4,743 | py | Python | spinup/examples/pg_math/1_simple_pg.py | MengTianjian/spinningup-pytorch | 6b9b87ed7a8140a52f3c86cc88f61428a9fd1176 | [
"MIT"
] | 1 | 2019-04-23T04:32:35.000Z | 2019-04-23T04:32:35.000Z | spinup/examples/pg_math/1_simple_pg.py | MengTianjian/spinningup-pytorch | 6b9b87ed7a8140a52f3c86cc88f61428a9fd1176 | [
"MIT"
] | null | null | null | spinup/examples/pg_math/1_simple_pg.py | MengTianjian/spinningup-pytorch | 6b9b87ed7a8140a52f3c86cc88f61428a9fd1176 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Categorical
import numpy as np
import gym
from gym.spaces import Discrete, Box
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--env_name', '--env', type=str... | 37.346457 | 83 | 0.609741 |
560191c793a93a302d95f1bc0f3bed7552833bd0 | 2,334 | py | Python | examples/protobuf/protobuftools.py | sunjinopensource/asynmsg | 9c1d14f859cc6702446c3bb30b9916280429bd1d | [
"MIT"
] | 3 | 2015-05-10T16:10:35.000Z | 2019-02-08T12:22:27.000Z | examples/protobuf/protobuftools.py | sunjinopensource/asynmsg | 9c1d14f859cc6702446c3bb30b9916280429bd1d | [
"MIT"
] | null | null | null | examples/protobuf/protobuftools.py | sunjinopensource/asynmsg | 9c1d14f859cc6702446c3bb30b9916280429bd1d | [
"MIT"
] | null | null | null | import asynmsg
import struct
import google.protobuf.message
| 33.826087 | 115 | 0.602828 |
56027f5cae2f8100bbcabdb3f59b412acf2181e4 | 6,402 | py | Python | client/python/thegame/entity.py | afq984/thegame | 3769fffa281b7d5e8d1336d57e73c8e8d4d2289a | [
"MIT"
] | 3 | 2017-08-18T00:32:54.000Z | 2017-11-18T02:25:51.000Z | client/python/thegame/entity.py | afq984/thegame | 3769fffa281b7d5e8d1336d57e73c8e8d4d2289a | [
"MIT"
] | 3 | 2017-08-15T09:59:25.000Z | 2018-08-22T17:28:13.000Z | client/python/thegame/entity.py | afq984/thegame | 3769fffa281b7d5e8d1336d57e73c8e8d4d2289a | [
"MIT"
] | 1 | 2018-08-07T12:38:48.000Z | 2018-08-07T12:38:48.000Z | import collections
from thegame.abilities import Ability
Vector = collections.namedtuple('Vector', ('x', 'y'))
Vector.__doc__ = '''
A 2D vector.
Used to represent a point and velocity in thegame
'''
HeroAbility = collections.namedtuple(
'HeroAbility',
['level', 'value']
)
HeroAbilityList = collectio... | 25.710843 | 76 | 0.592002 |
4bc69e662f7af10d0c2438ee8ea0f1bb00d372e9 | 3,456 | py | Python | services/web/project/__init__.py | shekharRavi/croationa_topic_api | a68bc69a69c5a6898b74ee0f3adf83b23d29b40b | [
"MIT"
] | null | null | null | services/web/project/__init__.py | shekharRavi/croationa_topic_api | a68bc69a69c5a6898b74ee0f3adf83b23d29b40b | [
"MIT"
] | null | null | null | services/web/project/__init__.py | shekharRavi/croationa_topic_api | a68bc69a69c5a6898b74ee0f3adf83b23d29b40b | [
"MIT"
] | null | null | null | import os
import json
# import wget
from flask import (
Flask,
jsonify,
send_from_directory,
request,
redirect,
url_for
)
from flask_sqlalchemy import SQLAlchemy
import werkzeug
werkzeug.cached_property = werkzeug.utils.cached_property
from werkzeug.utils import secure_filename
from werkzeug.mi... | 35.628866 | 109 | 0.739005 |
4bc780e7bf91dc67b2e9b3c85f1b9477066d6c29 | 87 | py | Python | opensanctions/helpers/gender.py | fastbone/opensanctions | dea7f7d073083eece26241bcade697a2b959a09e | [
"MIT"
] | null | null | null | opensanctions/helpers/gender.py | fastbone/opensanctions | dea7f7d073083eece26241bcade697a2b959a09e | [
"MIT"
] | null | null | null | opensanctions/helpers/gender.py | fastbone/opensanctions | dea7f7d073083eece26241bcade697a2b959a09e | [
"MIT"
] | null | null | null | # Welcome to the wonderful world of police databases:
MALE = "male"
FEMALE = "female"
| 17.4 | 53 | 0.724138 |
4bc81ada6770b9d230169abfe03aa04a2271356b | 472 | py | Python | backups_operator/servers/views.py | jetchirag/backops | 777e8d3b3b89afdc0482f71f1ecc499036c62968 | [
"MIT"
] | null | null | null | backups_operator/servers/views.py | jetchirag/backops | 777e8d3b3b89afdc0482f71f1ecc499036c62968 | [
"MIT"
] | null | null | null | backups_operator/servers/views.py | jetchirag/backops | 777e8d3b3b89afdc0482f71f1ecc499036c62968 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from backups_operator.servers.models import Server
# Create your views here. | 21.454545 | 53 | 0.711864 |
4bc9a28e7931530bacfb9f635e9e8859c38140a3 | 1,460 | py | Python | scripts/inspect_docker.py | lijing1996/DockerMonitor | b1105e120d9079a0d24a90ef401221dfceeed7b6 | [
"Apache-2.0"
] | 1 | 2021-04-12T09:35:08.000Z | 2021-04-12T09:35:08.000Z | scripts/inspect_docker.py | lijing1996/DockerMonitor | b1105e120d9079a0d24a90ef401221dfceeed7b6 | [
"Apache-2.0"
] | null | null | null | scripts/inspect_docker.py | lijing1996/DockerMonitor | b1105e120d9079a0d24a90ef401221dfceeed7b6 | [
"Apache-2.0"
] | null | null | null | import argparse
import sys
import subprocess
import psutil
def insepect_process(pid):
"""Determine
1. is the process running in the container
2. if it's true, ourput the container id and the user
:return:
"""
assert psutil.pid_exists(pid), "The process doesn't exist"
try:
result = ... | 33.181818 | 113 | 0.678767 |
4bc9dc6d068e1225034cf817b0d3efa5bdeee220 | 128 | py | Python | Aula10.py | rsmelocunha/Python-projects | 1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093 | [
"MIT"
] | null | null | null | Aula10.py | rsmelocunha/Python-projects | 1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093 | [
"MIT"
] | null | null | null | Aula10.py | rsmelocunha/Python-projects | 1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093 | [
"MIT"
] | null | null | null | ano = int(input('Digite o ano do seu carro: '))
idadecarro = 2022 - ano
print('Carro novo' if idadecarro <=3 else 'Carro Velho') | 42.666667 | 56 | 0.695313 |
4bca99ba9eda853683218d8ee0882faa531e6181 | 3,531 | py | Python | companion_app/live_log_retrieval.py | MorganJamesSmith/uni-project-ideas | 6c48d0edb526908ed95192e97ab47df1257b6036 | [
"BSD-3-Clause"
] | 1 | 2020-09-15T15:33:33.000Z | 2020-09-15T15:33:33.000Z | companion_app/live_log_retrieval.py | MorganJamesSmith/uni-project | 6c48d0edb526908ed95192e97ab47df1257b6036 | [
"BSD-3-Clause"
] | null | null | null | companion_app/live_log_retrieval.py | MorganJamesSmith/uni-project | 6c48d0edb526908ed95192e97ab47df1257b6036 | [
"BSD-3-Clause"
] | null | null | null | """
implements a wrapper for loading live data from the serial connection and passing it to plotting
"""
import serial
import time
import struct
import plotly.express as px
try:
from . import log_parser
except ImportError:
import log_parser
# TODO: clean up CLI code
if __name__ == "__main__":
import argpar... | 46.460526 | 118 | 0.664118 |
4bcbbf9c4a02cc75f67572b9d3e876126fc65c10 | 313 | py | Python | bin/bucrm.py | aelzenaar/bucephalus | 49cc084a5444ffbde2f850fc1f7b230d3bb8dfbc | [
"MIT"
] | null | null | null | bin/bucrm.py | aelzenaar/bucephalus | 49cc084a5444ffbde2f850fc1f7b230d3bb8dfbc | [
"MIT"
] | 12 | 2018-11-09T03:00:28.000Z | 2019-01-02T05:39:55.000Z | bin/bucrm.py | aelzenaar/bucephalus | 49cc084a5444ffbde2f850fc1f7b230d3bb8dfbc | [
"MIT"
] | null | null | null | import sys
import dbops
from pathlib import Path
if len(sys.argv) < 2:
print("Bucephalus Remove File Script")
print("Usage: " + sys.argv[0] + " <identifier>")
sys.exit()
sys.argv.pop(0)
ident = sys.argv.pop(0)
if dbops.remove_record_by_id(ident) == None:
print("*** Error: failed to remove record.")
| 18.411765 | 50 | 0.677316 |
4bcbcc55408d8cf46761e62d961a3d39291ace5d | 440 | py | Python | tests/test_get_current_os_name.py | c-pher/PyWinOS | a16a16a24abaa53a06b9365b2535c8ab31a7fdfb | [
"MIT"
] | 4 | 2020-04-17T15:54:43.000Z | 2020-11-08T06:39:05.000Z | tests/test_get_current_os_name.py | c-pher/PyWinOS | a16a16a24abaa53a06b9365b2535c8ab31a7fdfb | [
"MIT"
] | 65 | 2020-01-05T21:45:17.000Z | 2022-03-31T16:50:20.000Z | tests/test_get_current_os_name.py | c-pher/PyWinOS | a16a16a24abaa53a06b9365b2535c8ab31a7fdfb | [
"MIT"
] | null | null | null | import os
| 29.333333 | 70 | 0.661364 |
4bcc388c3974bdfcd63888beb8ed71bb0fa61380 | 5,133 | py | Python | GUI/GUI_windows/TranslationLanguageWindow.py | Chenger1/stellaris-trpack | 5d85bbbc7374975b5da729899b5691ea77c16ea2 | [
"MIT"
] | 3 | 2020-07-23T00:32:06.000Z | 2020-10-09T18:05:56.000Z | GUI/GUI_windows/TranslationLanguageWindow.py | Chenger1/stellaris-trpack | 5d85bbbc7374975b5da729899b5691ea77c16ea2 | [
"MIT"
] | 105 | 2020-07-16T12:23:57.000Z | 2021-01-18T18:11:40.000Z | GUI/GUI_windows/TranslationLanguageWindow.py | Letiso/Stellaris-True-Machine-Translation-Tool | b80431c1c9b49c2482cb9aefa02eb0de62d7cc56 | [
"MIT"
] | 1 | 2020-07-15T13:30:57.000Z | 2020-07-15T13:30:57.000Z | """
"""
from PyQt5 import QtWidgets, QtCore
from GUI.GUI_windows_source import TranslationLanguage
from json import load, dump
from functools import partial
import copy
from scripts.stylesheets import choosen_lang_style, not_chosen_lang_style
| 37.742647 | 109 | 0.601403 |
4bcc5632c54ea11fd3756fc709d789ae83392c50 | 55 | py | Python | dearpygui_map/__init__.py | mkouhia/dearpygui_map | 8db86e6917b88c118aff94a22e383ef517c40620 | [
"MIT"
] | null | null | null | dearpygui_map/__init__.py | mkouhia/dearpygui_map | 8db86e6917b88c118aff94a22e383ef517c40620 | [
"MIT"
] | 21 | 2022-02-21T08:31:03.000Z | 2022-03-08T19:27:33.000Z | dearpygui_map/__init__.py | mkouhia/dearpygui_map | 8db86e6917b88c118aff94a22e383ef517c40620 | [
"MIT"
] | null | null | null | """Map widget for Dear PyGui"""
__version__ = "0.0.1"
| 13.75 | 31 | 0.636364 |
4bcdc5c2dfab2675a93de75f43fee73049b1f7fb | 1,347 | py | Python | demosauruswebapp/demosaurus/subject_headings.py | KBNLresearch/Demosaurus | 9235e315d9eef9d8d64f94a90ab4fc8220670ef2 | [
"Apache-2.0"
] | 1 | 2020-06-25T16:39:35.000Z | 2020-06-25T16:39:35.000Z | demosauruswebapp/demosaurus/subject_headings.py | KBNLresearch/Demosaurus | 9235e315d9eef9d8d64f94a90ab4fc8220670ef2 | [
"Apache-2.0"
] | 6 | 2020-03-06T12:31:38.000Z | 2021-09-20T15:08:17.000Z | demosauruswebapp/demosaurus/subject_headings.py | KBNLresearch/Demosaurus | 9235e315d9eef9d8d64f94a90ab4fc8220670ef2 | [
"Apache-2.0"
] | null | null | null | from flask import (
Blueprint, request)#, flash, g, redirect, render_template, get_template_attribute, url_for, jsonify
# )
# from werkzeug.exceptions import abort
import requests
# from demosaurus.db import get_db
# import pandas as pd
# from nltk.metrics import distance
# import re
# import numpy as np
bp = B... | 32.071429 | 104 | 0.697105 |
4bcf87fdcdb2f4bd16f622a1e7e79b1aeb825b7c | 3,448 | py | Python | server/Kusa/views.py | meshellchoo/senior-design-project-kusa | 829575259c31a620c895a0f2d5654ea099298eb6 | [
"MIT"
] | 1 | 2022-03-28T23:20:09.000Z | 2022-03-28T23:20:09.000Z | server/Kusa/views.py | meshellchoo/senior-design-project-kusa | 829575259c31a620c895a0f2d5654ea099298eb6 | [
"MIT"
] | null | null | null | server/Kusa/views.py | meshellchoo/senior-design-project-kusa | 829575259c31a620c895a0f2d5654ea099298eb6 | [
"MIT"
] | 2 | 2022-03-24T07:17:27.000Z | 2022-03-28T23:20:18.000Z | from django.http import HttpResponse
from django.http.response import JsonResponse
from django.shortcuts import render
from rest_framework.serializers import Serializer
from admin import settings
import requests
from rest_framework import viewsets
from time import gmtime, strftime
from Kusa.models import SteamUser
from... | 36.680851 | 231 | 0.706787 |
4bd7a0c2448cc617b69365e5bcaa51dd7caf5ceb | 478 | py | Python | webapp/config.py | sebastien6/simple-project | 2f662c74695a7f566172330dcb7140efd6c71723 | [
"MIT"
] | null | null | null | webapp/config.py | sebastien6/simple-project | 2f662c74695a7f566172330dcb7140efd6c71723 | [
"MIT"
] | null | null | null | webapp/config.py | sebastien6/simple-project | 2f662c74695a7f566172330dcb7140efd6c71723 | [
"MIT"
] | null | null | null | import os
from redis import StrictRedis
| 31.866667 | 73 | 0.728033 |
4bd7fb5f5d36389c2c5a61d083613ef4ed377538 | 15,928 | py | Python | moleculegen/estimation/model.py | sanjaradylov/moleculegen-ml | 4acb77244909cf8cfe4fb75461d4bed9b77f29f1 | [
"BSD-3-Clause"
] | 3 | 2021-11-18T11:41:21.000Z | 2022-02-08T22:01:20.000Z | moleculegen/estimation/model.py | sanjaradylov/moleculegen-ml | 4acb77244909cf8cfe4fb75461d4bed9b77f29f1 | [
"BSD-3-Clause"
] | 20 | 2019-12-12T11:47:32.000Z | 2021-06-02T07:55:18.000Z | moleculegen/estimation/model.py | sanjaradylov/moleculegen-ml | 4acb77244909cf8cfe4fb75461d4bed9b77f29f1 | [
"BSD-3-Clause"
] | 2 | 2019-12-23T08:17:01.000Z | 2022-02-08T22:01:21.000Z | """
Generative language models.
Classes
-------
SMILESEncoderDecoder
A generative recurrent neural network to encode-decode SMILES strings.
SMILESEncoderDecoderFineTuner
The fine-tuner of SMILESEncoderDecoder model.
"""
__all__ = (
'SMILESEncoderDecoder',
'SMILESEncoderDecoderFineTuner',
)
import jso... | 36.28246 | 89 | 0.597878 |
4bdd1cbdd04848eac2016e69df46179145d19903 | 2,351 | py | Python | projects/radish_paper/run_tpch_radish_sym_gbp.py | bmyerz/log2slqite | edb6bcba061132caa545b5e46c98b86547c68b48 | [
"MIT"
] | null | null | null | projects/radish_paper/run_tpch_radish_sym_gbp.py | bmyerz/log2slqite | edb6bcba061132caa545b5e46c98b86547c68b48 | [
"MIT"
] | 1 | 2015-07-15T00:00:19.000Z | 2015-07-15T00:06:33.000Z | projects/radish_paper/run_tpch_radish_sym_gbp.py | bmyerz/log2slqite | edb6bcba061132caa545b5e46c98b86547c68b48 | [
"MIT"
] | null | null | null | from grappa import GrappaExperiment, MPIRunGrappaExperiment
tpch_bigdatann = MPIRunGrappaExperiment({
'trial': range(1, 3 + 1),
#'qn': [x for x in range(8, 20 + 1) if x!=7 and x!=9 and x!=8 and x!=10 and x!=11], # exclude 7 that runs forever
... | 54.674419 | 146 | 0.35772 |
4bdf2c801d395b3543ef88d753e14f32dd4a9b4a | 362 | py | Python | Activation Function/Softmax/softmax_cpp/test.py | kaka-lin/ML-Notes | 047b88d59346b2ec719b1b3e2fcd605e1ccfaf91 | [
"MIT"
] | null | null | null | Activation Function/Softmax/softmax_cpp/test.py | kaka-lin/ML-Notes | 047b88d59346b2ec719b1b3e2fcd605e1ccfaf91 | [
"MIT"
] | null | null | null | Activation Function/Softmax/softmax_cpp/test.py | kaka-lin/ML-Notes | 047b88d59346b2ec719b1b3e2fcd605e1ccfaf91 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.special import softmax
np.set_printoptions(precision=6)
if __name__ == "__main__":
x = np.array([[1, 4.2, 0.6, 1.23, 4.3, 1.2, 2.5]])
print("Input Array: ", x)
print("Softmax Array: ", k_softmax(x))
print("Softmax Array: ", softmax(x))
| 21.294118 | 54 | 0.618785 |
4be3297fddc6fb6fba4bd8355331638ba8b66d70 | 707 | py | Python | models/zeros.py | DawyD/illumination-preserving-rotations | 4fb69dc2526579a7677c27e75eae3a0b0000b5de | [
"MIT"
] | null | null | null | models/zeros.py | DawyD/illumination-preserving-rotations | 4fb69dc2526579a7677c27e75eae3a0b0000b5de | [
"MIT"
] | null | null | null | models/zeros.py | DawyD/illumination-preserving-rotations | 4fb69dc2526579a7677c27e75eae3a0b0000b5de | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras.layers import Conv2D, ReLU, SeparableConv2D, Input, SpatialDropout2D, MaxPool2D, Concatenate, Conv2DTranspose, BatchNormalization
from tensorflow.keras.regularizers import l1, l2
from models.net import Net
from layers.kerasGroupNorm import GroupNormalization
| 35.35 | 151 | 0.721358 |
4be3c4c8872c7fe3765bcf529106a1cedf839f7c | 7,008 | py | Python | util/post_db.py | ReadMoa/web-service | f47c6cce471d97104074d403ab9ec39a08276213 | [
"MIT"
] | null | null | null | util/post_db.py | ReadMoa/web-service | f47c6cce471d97104074d403ab9ec39a08276213 | [
"MIT"
] | 21 | 2020-08-19T05:05:45.000Z | 2021-02-07T23:21:17.000Z | util/post_db.py | ReadMoa/web-service | f47c6cce471d97104074d403ab9ec39a08276213 | [
"MIT"
] | 1 | 2020-09-05T03:40:45.000Z | 2020-09-05T03:40:45.000Z | """PostDB class definition.
PostDB encapsualte interactions (lookup, scan, insert) with the posts table.
Typical usage example:
from post import Post
from post_db import PostDB
post_db = PostDB(mode = "dev")
post = Post(
post_url = "https://www.example.com/",
title = "Test",
main_image... | 36.884211 | 85 | 0.558219 |
4be4aa437d26726d4e8976afdb8dcefd45f45a42 | 9,491 | py | Python | plugins/leading_bot_mention.py | YukiSinonome/guided_bot | 3aff47c4192e9dae4ad4d95c1553a4752ce043cc | [
"MIT"
] | null | null | null | plugins/leading_bot_mention.py | YukiSinonome/guided_bot | 3aff47c4192e9dae4ad4d95c1553a4752ce043cc | [
"MIT"
] | null | null | null | plugins/leading_bot_mention.py | YukiSinonome/guided_bot | 3aff47c4192e9dae4ad4d95c1553a4752ce043cc | [
"MIT"
] | null | null | null | # coding: utf-8
from slackbot.bot import respond_to
from slacker import Slacker
import slackbot_settings
# @respond_to("")
# @respond_to("")
# def cheer(message):
# message.reply("")
import MeCab
import random
import ChatBotScript
import SentenceGenerator
import datetime
import webbrowser
import time
import sys
... | 38.425101 | 599 | 0.565272 |
4be54c7f61feb9501683fa638bd0374bbe09f529 | 13,922 | py | Python | Lib/pagebot/elements/conditions.py | bghryct/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 68 | 2018-10-22T22:42:58.000Z | 2022-03-19T11:07:31.000Z | Lib/pagebot/elements/conditions.py | TypeNetwork/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 97 | 2017-07-10T23:49:30.000Z | 2018-10-03T08:17:55.000Z | Lib/pagebot/elements/conditions.py | TypeNetwork/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 9 | 2017-07-11T09:59:00.000Z | 2018-09-12T11:59:30.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T
#
# Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# ... | 35.789203 | 108 | 0.617943 |
4be5a05c40ee31ef9f187f13c41d25d878a65ca6 | 7,099 | py | Python | Pix2Pix/Streamlit_Pix2Pix_Main.py | NB094/LHL_Final_Project | 5df15d7bbf33d51840ea274629591cd938f58fce | [
"Apache-2.0"
] | 2 | 2021-10-04T05:53:29.000Z | 2022-01-21T12:53:43.000Z | Pix2Pix/Streamlit_Pix2Pix_Main.py | NB094/LHL_Final_Project | 5df15d7bbf33d51840ea274629591cd938f58fce | [
"Apache-2.0"
] | null | null | null | Pix2Pix/Streamlit_Pix2Pix_Main.py | NB094/LHL_Final_Project | 5df15d7bbf33d51840ea274629591cd938f58fce | [
"Apache-2.0"
] | 1 | 2021-10-04T05:53:32.000Z | 2021-10-04T05:53:32.000Z | from PIL import Image
import streamlit as st
from streamlit_drawable_canvas import st_canvas
from Streamlit_Pix2Pix_Generator import Generator
import numpy as np
import urllib.request
from keras.preprocessing.image import load_img
from keras.models import load_model
import requests
# Page intro
st.title('Pix2Pix See ... | 41.273256 | 190 | 0.720947 |
4be8b0689a8d30b24d0eb351d73f642c1be6c5a9 | 4,584 | py | Python | rbs/rbs.py | dexbiobot/SML-Cogs | e8d3d12e5bf1d760196006f86a6c16ed95e3c964 | [
"MIT"
] | 17 | 2017-05-30T13:21:18.000Z | 2022-03-27T13:08:17.000Z | rbs/rbs.py | dexbiobot/SML-Cogs | e8d3d12e5bf1d760196006f86a6c16ed95e3c964 | [
"MIT"
] | 16 | 2017-06-11T12:55:06.000Z | 2019-02-20T21:00:59.000Z | rbs/rbs.py | dexbiobot/SML-Cogs | e8d3d12e5bf1d760196006f86a6c16ed95e3c964 | [
"MIT"
] | 17 | 2017-05-03T16:09:46.000Z | 2020-05-13T21:19:37.000Z | """
The MIT License (MIT)
Copyright (c) 2017 SML
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish,... | 29.960784 | 75 | 0.648778 |
4beabadec3de979135423c3abb7be1e6a84c41ad | 2,845 | py | Python | tests/nutsflow/test_iterfunction.py | maet3608/nuts-flow | 0d7b8eefc80cb45c079b155ff5062d1d93ff2caf | [
"Apache-2.0"
] | 21 | 2017-05-01T10:15:41.000Z | 2022-01-25T07:02:44.000Z | tests/nutsflow/test_iterfunction.py | maet3608/nuts-flow | 0d7b8eefc80cb45c079b155ff5062d1d93ff2caf | [
"Apache-2.0"
] | 7 | 2017-02-09T03:36:37.000Z | 2017-08-22T11:23:03.000Z | tests/nutsflow/test_iterfunction.py | maet3608/nuts-flow | 0d7b8eefc80cb45c079b155ff5062d1d93ff2caf | [
"Apache-2.0"
] | 5 | 2017-05-30T01:56:31.000Z | 2020-10-05T08:21:43.000Z | """
.. module:: test_iterfunction
:synopsis: Unit tests for iterfunction module
"""
import time
import nutsflow.iterfunction as itf
from six.moves import range
| 23.319672 | 63 | 0.555712 |
4beb4afba8d4e82f6ec0587a4a66ce29bdfa1be9 | 6,591 | py | Python | microcosm_flask/tests/conventions/test_upload.py | Sinon/microcosm-flask | c1404ebc94459c8156b04f5e04490a330117524c | [
"Apache-2.0"
] | 11 | 2017-01-30T21:53:20.000Z | 2020-05-29T22:39:19.000Z | microcosm_flask/tests/conventions/test_upload.py | Sinon/microcosm-flask | c1404ebc94459c8156b04f5e04490a330117524c | [
"Apache-2.0"
] | 139 | 2016-03-09T19:09:59.000Z | 2021-09-03T17:14:00.000Z | microcosm_flask/tests/conventions/test_upload.py | Sinon/microcosm-flask | c1404ebc94459c8156b04f5e04490a330117524c | [
"Apache-2.0"
] | 10 | 2016-12-19T22:39:42.000Z | 2021-03-09T19:23:15.000Z | """
Alias convention tests.
"""
from io import BytesIO
from json import loads
from uuid import uuid4
from hamcrest import (
all_of,
anything,
assert_that,
contains,
equal_to,
has_entries,
has_entry,
has_item,
has_key,
is_,
is_not,
)
from marshmallow import Schema, fields
fr... | 29.823529 | 103 | 0.576847 |
4becdb4fe42c069830f83a3d86842e13caf2edcf | 135 | py | Python | molecool/io/__init__.py | nitrosx/molecool | 58ce78aceb707ff92b26bf6c90b3703714c09786 | [
"BSD-3-Clause"
] | null | null | null | molecool/io/__init__.py | nitrosx/molecool | 58ce78aceb707ff92b26bf6c90b3703714c09786 | [
"BSD-3-Clause"
] | null | null | null | molecool/io/__init__.py | nitrosx/molecool | 58ce78aceb707ff92b26bf6c90b3703714c09786 | [
"BSD-3-Clause"
] | null | null | null | '''
molecool.io package
configure access to subpackage functions
'''
from .pdb import open_pdb
from .xyz import open_xyz, write_xyz
| 13.5 | 40 | 0.77037 |
4bf119d7edb9acf18b1f1e428e435fcd728fc1f4 | 866 | py | Python | tests/check-result.py | getupcloud/tiny-controllers | e896b2015a9e29eab421225cb5a5f0d488df9e37 | [
"Apache-2.0"
] | null | null | null | tests/check-result.py | getupcloud/tiny-controllers | e896b2015a9e29eab421225cb5a5f0d488df9e37 | [
"Apache-2.0"
] | null | null | null | tests/check-result.py | getupcloud/tiny-controllers | e896b2015a9e29eab421225cb5a5f0d488df9e37 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import json
from flatten_dict import flatten as _flatten
try:
data = json.load(sys.stdin)['object']
except Exception as ex:
print("Missing or invalid test data:", ex)
sys.exit(1)
try:
results = json.load(open(sys.argv[1], "r"))['results']
except Exception as ex:
p... | 23.405405 | 88 | 0.590069 |
4bf224e8c8f4fa354c35d1431a9957707b55eb9b | 331 | py | Python | thriftpy2_httpx_client/__init__.py | hans00/ThriftPy2-HTTPX-Client | e94944218915bcec6b2e0c00200f5d5e6f823053 | [
"MIT"
] | null | null | null | thriftpy2_httpx_client/__init__.py | hans00/ThriftPy2-HTTPX-Client | e94944218915bcec6b2e0c00200f5d5e6f823053 | [
"MIT"
] | 5 | 2021-07-13T13:56:17.000Z | 2022-03-02T02:43:46.000Z | thriftpy2_httpx_client/__init__.py | hans00/ThriftPy2-HTTPX-Client | e94944218915bcec6b2e0c00200f5d5e6f823053 | [
"MIT"
] | 2 | 2021-07-13T06:08:59.000Z | 2022-03-16T22:15:57.000Z | __all__ = [
'make_aio_client',
'make_sync_client',
'TAsyncHTTPXClient',
'THTTPXClient',
]
from .aio import TAsyncHTTPXClient, make_client as make_aio_client
from .sync import THTTPXClient, make_client as make_sync_client
from ._version import get_versions
__version__ = get_versions()['version']
del ge... | 23.642857 | 66 | 0.770393 |
4bf41bde14de2173375d4d1e4381757de1699557 | 3,553 | py | Python | kalc/model/kinds/Node.py | KellyGriffin/kalc | 9b78c4177ed9ffccbf1ecfbf9a7946286cd7c583 | [
"Apache-2.0"
] | null | null | null | kalc/model/kinds/Node.py | KellyGriffin/kalc | 9b78c4177ed9ffccbf1ecfbf9a7946286cd7c583 | [
"Apache-2.0"
] | null | null | null | kalc/model/kinds/Node.py | KellyGriffin/kalc | 9b78c4177ed9ffccbf1ecfbf9a7946286cd7c583 | [
"Apache-2.0"
] | null | null | null | import sys
import random
from kalc.model.system.base import ModularKind
from typing import Set
from kalc.model.system.primitives import Label, StatusNode
from kalc.model.system.base import HasLabel
from kalc.misc.util import cpuConvertToAbstractProblem, memConvertToAbstractProblem
from kalc.misc.const import STATUS_NOD... | 33.838095 | 83 | 0.690684 |
4bf46aef0cec7975f957c42ac0e9212705e2eac4 | 6,154 | py | Python | Betsy/Betsy/modules/summarize_fastqc_results.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 9 | 2017-01-13T02:38:41.000Z | 2021-04-08T00:44:39.000Z | Betsy/Betsy/modules/summarize_fastqc_results.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | null | null | null | Betsy/Betsy/modules/summarize_fastqc_results.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 4 | 2017-01-05T16:25:25.000Z | 2019-12-12T20:07:38.000Z | from Module import AbstractModule
def read_fastqc_results(fastqc_path):
import os
from genomicode import filelib
summary_file = os.path.join(fastqc_path, "summary.txt")
data_file = os.path.join(fastqc_path, "fastqc_data.txt")
filelib.assert_exists_nz(summary_file)
filelib.assert_exists_nz(da... | 34.573034 | 76 | 0.614722 |
4bf674c2dd9e1aaac9f80a20682c800896278be3 | 792 | py | Python | propnet/models/__init__.py | nile0316/propnet | 3e1f1476c70a878c6eb43587c328d108b0e2a410 | [
"BSD-3-Clause-LBNL"
] | 57 | 2018-01-09T14:56:20.000Z | 2022-02-24T11:44:42.000Z | propnet/models/__init__.py | ruriboshi/propnet | 770703fb4fc344f785f89c02f26b31ea5733d2bd | [
"BSD-3-Clause-LBNL"
] | 214 | 2017-09-26T23:31:09.000Z | 2022-03-14T04:50:58.000Z | propnet/models/__init__.py | nile0316/propnet | 3e1f1476c70a878c6eb43587c328d108b0e2a410 | [
"BSD-3-Clause-LBNL"
] | 26 | 2017-10-29T21:34:22.000Z | 2022-01-12T05:59:12.000Z | # noinspection PyUnresolvedReferences
import propnet.symbols
from propnet.models import serialized, python, composite
from propnet.core.registry import Registry
# This is just to enable importing the model directly from this module for example code generation
_update_globals()
| 33 | 98 | 0.792929 |
4bf6a8cffebce41ae5095ad681541b2d2a477027 | 1,369 | py | Python | python/clean_dataset.py | catarinaacsilva/user_mapping_twitter | 7350ed35b465a7db6747c4035e7b119bff23131d | [
"MIT"
] | null | null | null | python/clean_dataset.py | catarinaacsilva/user_mapping_twitter | 7350ed35b465a7db6747c4035e7b119bff23131d | [
"MIT"
] | null | null | null | python/clean_dataset.py | catarinaacsilva/user_mapping_twitter | 7350ed35b465a7db6747c4035e7b119bff23131d | [
"MIT"
] | null | null | null |
import csv
import re
regex = re.compile('[^a-zA-Z]')
if __name__ == '__main__':
for user in ['katyperry', 'TheEllenShow', 'YouTube', 'realDonaldTrump', 'BillGates',
'nytimes', 'CNN', 'espn', 'NASA', 'aliciakeys']:
clean_dataset(user)
| 30.422222 | 89 | 0.519357 |
4bf72918258e1f5f04c1079f6fc0ade0637b2962 | 4,690 | py | Python | kpext/kp_crfsuite.py | snovd/sdavid-tests | c5f7e60f83ecb2d4cbaec18fff84861907f59c27 | [
"MIT"
] | null | null | null | kpext/kp_crfsuite.py | snovd/sdavid-tests | c5f7e60f83ecb2d4cbaec18fff84861907f59c27 | [
"MIT"
] | null | null | null | kpext/kp_crfsuite.py | snovd/sdavid-tests | c5f7e60f83ecb2d4cbaec18fff84861907f59c27 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import os
from nltk.tokenize import TreebankWordTokenizer as Tokenizer
from nltk.tag.perceptron import PerceptronTagger
import operator
from itertools import chain
import nltk
from sklearn.metrics import classification_report, confusion_matrix
from sklearn.preprocessing import LabelBinariz... | 41.875 | 141 | 0.465885 |
4bf9bd37e91a5feca68c63420808cdbf5f96022e | 6,736 | py | Python | models/analysis_transform.py | LiuLei95/PyTorch-Learned-Image-Compression-with-GMM-and-Attention | 484aced5bea25fbc1ba1380f4ab81bda9b099c1e | [
"Apache-2.0"
] | 27 | 2021-07-28T01:33:02.000Z | 2022-03-18T04:01:02.000Z | models/analysis_transform.py | LiuLei95/PyTorch-Learned-Image-Compression-with-GMM-and-Attention | 484aced5bea25fbc1ba1380f4ab81bda9b099c1e | [
"Apache-2.0"
] | 5 | 2021-11-13T05:58:51.000Z | 2022-02-13T09:07:44.000Z | models/analysis_transform.py | LiuLei95/PyTorch-Learned-Image-Compression-with-GMM-and-Attention | 484aced5bea25fbc1ba1380f4ab81bda9b099c1e | [
"Apache-2.0"
] | 1 | 2021-08-21T13:14:28.000Z | 2021-08-21T13:14:28.000Z | #!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
import math
import torch.nn as nn
import torch
from .GDN import GDN
from .attention import Attention
# class Analysis_transform(nn.Module):
# def __init__(self, num_filters=128):
# super(Analysis_transform, self).__init__()
# self.co... | 38.936416 | 96 | 0.55478 |
4bf9cae86ed3b64532d63a132ed50c966d6bd0b4 | 826 | py | Python | app/models.py | Katze2/Flask-template | 99925f6bfbaf92ace9b0fd7c792b989ed90a7e00 | [
"MIT"
] | null | null | null | app/models.py | Katze2/Flask-template | 99925f6bfbaf92ace9b0fd7c792b989ed90a7e00 | [
"MIT"
] | null | null | null | app/models.py | Katze2/Flask-template | 99925f6bfbaf92ace9b0fd7c792b989ed90a7e00 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
from app import db
| 24.294118 | 75 | 0.634383 |
4bfb4d961bec58ff15fe5b25777f51138ea3c5dc | 1,516 | py | Python | tests/dataset_balancer_test.py | MarinkoBa/Hate-Speech-Classification | 72f6bbe93b823daefa138df4f81a3a4df5b34c4c | [
"MIT"
] | null | null | null | tests/dataset_balancer_test.py | MarinkoBa/Hate-Speech-Classification | 72f6bbe93b823daefa138df4f81a3a4df5b34c4c | [
"MIT"
] | null | null | null | tests/dataset_balancer_test.py | MarinkoBa/Hate-Speech-Classification | 72f6bbe93b823daefa138df4f81a3a4df5b34c4c | [
"MIT"
] | 1 | 2020-12-14T13:56:50.000Z | 2020-12-14T13:56:50.000Z | # -*- coding: utf-8 -*-
from src.utils.get_data import load_data
from src.utils.get_data import get_datasets
from src.utils.get_data import concatenate_datasets
from src.utils.dataset_balancer import balance_data
import os
import pandas as pd
import unittest
if __name__ == "__main__":
unittest.ma... | 35.255814 | 110 | 0.550792 |
4bfb89534390da200300df58f33c846fbb2cba39 | 12,695 | py | Python | gptorch/models/sparse_gpr.py | cics-nd/gptorch | 80c62a227c466bb7fa29e11263e94c41f96ff93f | [
"MIT"
] | 28 | 2018-11-05T03:01:18.000Z | 2021-04-02T18:11:05.000Z | gptorch/models/sparse_gpr.py | cics-nd/gptorch | 80c62a227c466bb7fa29e11263e94c41f96ff93f | [
"MIT"
] | 7 | 2019-06-04T21:43:40.000Z | 2021-11-04T04:19:26.000Z | gptorch/models/sparse_gpr.py | cics-nd/gptorch | 80c62a227c466bb7fa29e11263e94c41f96ff93f | [
"MIT"
] | 8 | 2019-04-03T12:28:05.000Z | 2021-12-23T10:15:34.000Z | #
# Yinhao Zhu, May 01, 2017
#
"""
Sparse GP regression, including variational GP and others.
"""
from __future__ import absolute_import
import torch
import numpy as np
from torch.utils.data import TensorDataset, DataLoader
from torch.distributions.transforms import LowerCholeskyTransform
from ..model import Param
f... | 33.232984 | 87 | 0.59228 |
4bfe8f82bf9964afbee833e2a996e71d61b97873 | 1,638 | py | Python | Code/list.py | sunjinshuai/Python | b4d76bc20e9d740108c98cb8d023ca5da3e6c070 | [
"MIT"
] | null | null | null | Code/list.py | sunjinshuai/Python | b4d76bc20e9d740108c98cb8d023ca5da3e6c070 | [
"MIT"
] | null | null | null | Code/list.py | sunjinshuai/Python | b4d76bc20e9d740108c98cb8d023ca5da3e6c070 | [
"MIT"
] | null | null | null | list1 = ['physics', 'chemistry', 1997, 2000]
list2 = [1, 2, 3, 4, 5 ]
list3 = ["a", "b", "c", "d"]
print list1, list2, list3
#
#
print "list1[0]: ", list1[0]
print "list2[1:5]: ", list2[1:5]
#
# append()
list = [] ##
list.append('Google') ## append()
list.append('Python')
print list
#
# de... | 20.222222 | 49 | 0.651404 |
ef0025261578f6f3b594dd1953fdfd38e1b064c9 | 10,015 | py | Python | xyw_macro/notify.py | xue0228/keyboard | dcb0def1d87a9197676c0f405b980a67e128ab24 | [
"MIT"
] | null | null | null | xyw_macro/notify.py | xue0228/keyboard | dcb0def1d87a9197676c0f405b980a67e128ab24 | [
"MIT"
] | null | null | null | xyw_macro/notify.py | xue0228/keyboard | dcb0def1d87a9197676c0f405b980a67e128ab24 | [
"MIT"
] | null | null | null | import tkinter as tk
import tkinter.font as tf
from tkinter import ttk
from tkinter import messagebox
from tkinter.filedialog import askopenfilename, askdirectory
import time
import threading
from functools import wraps
from xyw_macro.utils import SingletonType
from xyw_macro.contants import SLEEP_TIME
class Inpu... | 30.348485 | 120 | 0.563155 |
ef015b72b0d9f9a36582b5d4563b3165aa3bb897 | 1,206 | py | Python | tests/test_utils.py | yiannisha/dbmanage | 9e1e36e2b59e7e369595f4804bef2c2a7ec0ec56 | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | yiannisha/dbmanage | 9e1e36e2b59e7e369595f4804bef2c2a7ec0ec56 | [
"Apache-2.0"
] | 10 | 2021-11-06T18:12:54.000Z | 2021-12-01T18:49:29.000Z | tests/test_utils.py | yiannisha/dbmanage | 9e1e36e2b59e7e369595f4804bef2c2a7ec0ec56 | [
"Apache-2.0"
] | null | null | null |
""" Utilities for testing """
import os
import json
TESTDATADIR = os.path.join(os.path.dirname(__file__), 'testdata')
def get_pass(pass_name : str) -> str:
""" Returns pass from test_credentials.json """
creds_path = os.path.join(os.path.dirname(__file__), 'test_credentials.json')
with open(creds_path,... | 28.046512 | 93 | 0.619403 |
ef0261d204ca26d250b0a03064510e798b9c7feb | 152 | py | Python | ballistics/collision/dispatch/__init__.py | flupke/ballistics | 844ef7dd9fd55f6f7d0be04df6b564beaa5aaa1a | [
"Zlib"
] | null | null | null | ballistics/collision/dispatch/__init__.py | flupke/ballistics | 844ef7dd9fd55f6f7d0be04df6b564beaa5aaa1a | [
"Zlib"
] | null | null | null | ballistics/collision/dispatch/__init__.py | flupke/ballistics | 844ef7dd9fd55f6f7d0be04df6b564beaa5aaa1a | [
"Zlib"
] | 1 | 2020-04-29T13:52:31.000Z | 2020-04-29T13:52:31.000Z | from ballistics.collision.dispatch.config import DefaultCollisionConfiguration
from ballistics.collision.dispatch.dispatcher import CollisionDispatcher
| 50.666667 | 78 | 0.907895 |
ef032589a15b54709c2cc0f764228c621cd157d2 | 750 | py | Python | venv/lib/python3.7/site-packages/webdriver_manager/chrome.py | wayshon/pylogin | 12ecfddc3ceaf552a42f62608027924541c63254 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.7/site-packages/webdriver_manager/chrome.py | wayshon/pylogin | 12ecfddc3ceaf552a42f62608027924541c63254 | [
"Apache-2.0"
] | 7 | 2019-12-04T23:08:08.000Z | 2022-02-10T12:47:38.000Z | venv/lib/python3.7/site-packages/webdriver_manager/chrome.py | wayshon/pylogin | 12ecfddc3ceaf552a42f62608027924541c63254 | [
"Apache-2.0"
] | null | null | null | import os
from webdriver_manager.driver import ChromeDriver
from webdriver_manager.manager import DriverManager
from webdriver_manager import utils
| 34.090909 | 72 | 0.652 |
ef038b82c703bdd42d7eb00adaf52c73105e5c39 | 321 | py | Python | polling_stations/apps/data_importers/management/commands/import_brent.py | danielgriffin48/UK-Polling-Stations | 0e5273357a4fdc00c2af794c71558b6f8f2a0a49 | [
"BSD-3-Clause"
] | null | null | null | polling_stations/apps/data_importers/management/commands/import_brent.py | danielgriffin48/UK-Polling-Stations | 0e5273357a4fdc00c2af794c71558b6f8f2a0a49 | [
"BSD-3-Clause"
] | null | null | null | polling_stations/apps/data_importers/management/commands/import_brent.py | danielgriffin48/UK-Polling-Stations | 0e5273357a4fdc00c2af794c71558b6f8f2a0a49 | [
"BSD-3-Clause"
] | null | null | null | from data_importers.management.commands import BaseDemocracyCountsCsvImporter
| 35.666667 | 77 | 0.76947 |
ef0469d45705f95287d4ed042d4ea25304eabf8c | 3,217 | py | Python | tests/test_data/movies.py | jmolinski/traktpy | e6ff22acaf273b7b45070a4f8938c210fe4d63d7 | [
"MIT"
] | null | null | null | tests/test_data/movies.py | jmolinski/traktpy | e6ff22acaf273b7b45070a4f8938c210fe4d63d7 | [
"MIT"
] | 1 | 2019-04-13T10:15:48.000Z | 2019-04-13T10:15:48.000Z | tests/test_data/movies.py | jmolinski/traktpy | e6ff22acaf273b7b45070a4f8938c210fe4d63d7 | [
"MIT"
] | null | null | null | MOVIE1 = {
"title": "Guardians of the Galaxy",
"year": 2014,
"ids": {
"trakt": 28,
"slug": "guardians-of-the-galaxy-2014",
"imdb": "tt2015381",
"tmdb": 118340,
},
}
MOVIE2 = {
"title": "Guardians of the Galaxy",
"year": 2014,
"ids": {
"trakt": 28,
... | 22.496503 | 269 | 0.520361 |
ef051797168d89a7cce543aa7efcba75f787978c | 2,689 | py | Python | azext_iot/digitaltwins/common.py | v-andreaco/azure-iot-cli-extension | 18b20b0a6ba9f75556979eb905e6d2271eb27ddd | [
"MIT"
] | null | null | null | azext_iot/digitaltwins/common.py | v-andreaco/azure-iot-cli-extension | 18b20b0a6ba9f75556979eb905e6d2271eb27ddd | [
"MIT"
] | null | null | null | azext_iot/digitaltwins/common.py | v-andreaco/azure-iot-cli-extension | 18b20b0a6ba9f75556979eb905e6d2271eb27ddd | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------... | 31.267442 | 121 | 0.670881 |
ef05389e99b6d9f3d5e451c4f3f4a586cd843bd5 | 7,580 | py | Python | lib/FeatureSetUtils/Utils/AveExpressionMatrixBuilder.py | mclark58/FeatureSetUtils | 2b84bc40d6a8f8aec878aa965ca567537c67267e | [
"MIT"
] | 1 | 2020-01-13T19:38:50.000Z | 2020-01-13T19:38:50.000Z | lib/FeatureSetUtils/Utils/AveExpressionMatrixBuilder.py | mclark58/FeatureSetUtils | 2b84bc40d6a8f8aec878aa965ca567537c67267e | [
"MIT"
] | 6 | 2017-09-19T17:46:03.000Z | 2020-06-09T04:28:36.000Z | lib/FeatureSetUtils/Utils/AveExpressionMatrixBuilder.py | mclark58/FeatureSetUtils | 2b84bc40d6a8f8aec878aa965ca567537c67267e | [
"MIT"
] | 9 | 2017-06-30T16:01:48.000Z | 2020-08-13T20:19:42.000Z | import json
import time
import uuid
from installed_clients.DataFileUtilClient import DataFileUtil
from installed_clients.KBaseReportClient import KBaseReport
from installed_clients.WorkspaceClient import Workspace as Workspace
def log(message, prefix_newline=False):
"""Logging function, provides a hook to suppre... | 41.648352 | 98 | 0.61504 |
ef055217f03abbaf7fba6a972f73a617fc132c0f | 838 | py | Python | src/python/modules/TensorflowCommon/utils.py | dsyme/ADBench | 87af0219a568807f8432754688ceb636efac12c6 | [
"MIT"
] | 58 | 2019-12-30T16:22:01.000Z | 2022-01-23T12:26:51.000Z | src/python/modules/TensorflowCommon/utils.py | dsyme/ADBench | 87af0219a568807f8432754688ceb636efac12c6 | [
"MIT"
] | 112 | 2019-05-25T07:26:58.000Z | 2019-12-28T13:55:33.000Z | src/python/modules/TensorflowCommon/utils.py | dsyme/ADBench | 87af0219a568807f8432754688ceb636efac12c6 | [
"MIT"
] | 22 | 2020-03-12T16:37:55.000Z | 2022-02-23T10:14:37.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import tensorflow as tf
def to_tf_tensor(ndarray, dtype = tf.float64):
'''Converts the given multidimensional array to a tensorflow tensor.
Args:
ndarray (ndarray-like): parameter for conversion.
dtype (type, optional)... | 22.648649 | 78 | 0.674224 |
ef066c9d7e1e24986e561e37f408aef403cdc52a | 127 | py | Python | learning_sets.py | guppikan/PythonLearning | b1674b7187c783b682da26c2190e2b47938faa16 | [
"MIT"
] | null | null | null | learning_sets.py | guppikan/PythonLearning | b1674b7187c783b682da26c2190e2b47938faa16 | [
"MIT"
] | null | null | null | learning_sets.py | guppikan/PythonLearning | b1674b7187c783b682da26c2190e2b47938faa16 | [
"MIT"
] | null | null | null | # this file describe sets data structures on python
thisSet={"Car","Bike","Truk"}
# Printing sets on terminal
print(thisSet) | 21.166667 | 52 | 0.740157 |
ef071178a07b347765b3a959b7f835718f3934a3 | 588 | py | Python | s3bro/pool_map.py | rsavordelli/s3bro | e5b1d41052fd2491c08589b8a2bffeb6aae7cf33 | [
"MIT"
] | 22 | 2018-03-13T18:46:33.000Z | 2021-11-03T09:41:39.000Z | s3bro/pool_map.py | rsavordelli/s3bro | e5b1d41052fd2491c08589b8a2bffeb6aae7cf33 | [
"MIT"
] | 5 | 2018-06-26T21:39:06.000Z | 2020-08-03T12:53:10.000Z | s3bro/pool_map.py | rsavordelli/s3bro | e5b1d41052fd2491c08589b8a2bffeb6aae7cf33 | [
"MIT"
] | 2 | 2019-09-04T06:40:09.000Z | 2020-07-06T01:56:44.000Z | from multiprocessing import Pool
import logging
| 32.666667 | 114 | 0.690476 |
ef07256f31589e2d434bffa64e958f93097dc4b3 | 11,290 | py | Python | htmlmth/utils.py | ZwCreatePhoton/htmlmth | 74d23ca2fa53e11b2587251d2f71c8f275548182 | [
"MIT"
] | null | null | null | htmlmth/utils.py | ZwCreatePhoton/htmlmth | 74d23ca2fa53e11b2587251d2f71c8f275548182 | [
"MIT"
] | null | null | null | htmlmth/utils.py | ZwCreatePhoton/htmlmth | 74d23ca2fa53e11b2587251d2f71c8f275548182 | [
"MIT"
] | null | null | null | import os
import yaml
from HTMLScriptExtractor import HTMLScriptExtractor
MIME_TYPE_MAP = {
'.htm': 'text/html',
'.html': 'text/html',
'.js': 'text/javascript',
'.vbs': 'text/vbscript',
'.txt': 'text/plain',
'.jpg': 'image/jpeg',
'.jpeg': 'image/jpeg'
}
# input:
# a function "mime_ty... | 35.84127 | 184 | 0.615766 |
ef094d452aa651937866c8d859cce7f5a8e866fa | 1,265 | py | Python | examples/235. Lowest Common Ancestor of a Binary Search Tree.py | yehzhang/RapidTest | 2302fc10ddafba1d16ef1d7448d46c66f5a05da2 | [
"MIT"
] | null | null | null | examples/235. Lowest Common Ancestor of a Binary Search Tree.py | yehzhang/RapidTest | 2302fc10ddafba1d16ef1d7448d46c66f5a05da2 | [
"MIT"
] | null | null | null | examples/235. Lowest Common Ancestor of a Binary Search Tree.py | yehzhang/RapidTest | 2302fc10ddafba1d16ef1d7448d46c66f5a05da2 | [
"MIT"
] | null | null | null | from rapidtest import Test, Case, TreeNode
from solutions.lowest_common_ancestor_of_a_binary_search_tree import Solution
with Test(Solution, post_proc=TreeNode.get_val) as test:
root = TreeNode.from_iterable([6, 2, 8, 0, 4, 7, 9, None, None, 3, 5])
Case(root, TreeNode(2), TreeNode(4), result=TreeNode(2))
C... | 43.62069 | 91 | 0.660079 |
ef09cb460708054f80c71807033f5ec91f1f2963 | 12,087 | py | Python | proto/npu_utilization_pb2.py | akaczm/jun-telemetry | 84c7208669f4f1749f8db45f4815dafefdbec083 | [
"MIT"
] | 4 | 2019-12-02T12:20:47.000Z | 2021-08-25T12:52:26.000Z | proto/npu_utilization_pb2.py | akaczm/jun-telemetry | 84c7208669f4f1749f8db45f4815dafefdbec083 | [
"MIT"
] | null | null | null | proto/npu_utilization_pb2.py | akaczm/jun-telemetry | 84c7208669f4f1749f8db45f4815dafefdbec083 | [
"MIT"
] | 1 | 2021-08-25T12:47:44.000Z | 2021-08-25T12:47:44.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: npu_utilization.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.prot... | 40.972881 | 1,125 | 0.755522 |
ef0a465c711275ee344dd982144bb689f29fa28c | 4,409 | py | Python | tests/test_models.py | rramaa/pynnotate | 7cf983dd16726032d3d53340415a823c9e8bd76c | [
"MIT"
] | 1 | 2019-07-24T12:56:16.000Z | 2019-07-24T12:56:16.000Z | tests/test_models.py | rramaa/pynnotate | 7cf983dd16726032d3d53340415a823c9e8bd76c | [
"MIT"
] | 14 | 2019-03-12T08:49:34.000Z | 2019-04-04T09:51:16.000Z | tests/test_models.py | rramaa/pynnotate | 7cf983dd16726032d3d53340415a823c9e8bd76c | [
"MIT"
] | 2 | 2019-10-13T14:45:11.000Z | 2019-12-24T22:22:46.000Z | from annotatelib.models import (
models, class_from_filename,
table_name_from_filename, _get_column_description_from_object,
_get_indices_description_from_oject
)
import sqlite3
from orator import DatabaseManager
import os
import sys
sys.path.insert(0, os.path.abspath(
os.path.join(os.path.dirname(__fil... | 41.205607 | 148 | 0.577682 |
ef0b1e90a414cd10b99ab947636c1ca2151cab55 | 430 | py | Python | flatlist/__init__.py | dwabece/flatlist | 61b6f7f70bf9db2bf14f8bfdebce2c4f9a95811f | [
"WTFPL"
] | null | null | null | flatlist/__init__.py | dwabece/flatlist | 61b6f7f70bf9db2bf14f8bfdebce2c4f9a95811f | [
"WTFPL"
] | null | null | null | flatlist/__init__.py | dwabece/flatlist | 61b6f7f70bf9db2bf14f8bfdebce2c4f9a95811f | [
"WTFPL"
] | null | null | null | __version__ = '0.0.1'
def flatten_list(input_list):
"""
Flattens list with many nested lists.
>>> flatten_list([1, [2, [3], [4]]])
[1, 2, 3, 4]
"""
result = []
for item in input_list:
if isinstance(item, list):
result.extend(flatten_list(item))
# yield from... | 20.47619 | 45 | 0.532558 |
ef0dbb4129bccb5de4e10f51b60990b9ac3393bb | 607 | py | Python | slackcast/token.py | rbdixon/slackcast | ac4ac4591bbcf62d64ec05b5479e6e8315f92a69 | [
"MIT"
] | null | null | null | slackcast/token.py | rbdixon/slackcast | ac4ac4591bbcf62d64ec05b5479e6e8315f92a69 | [
"MIT"
] | 1 | 2021-11-15T17:47:27.000Z | 2021-11-15T17:47:27.000Z | slackcast/token.py | rbdixon/slackcast | ac4ac4591bbcf62d64ec05b5479e6e8315f92a69 | [
"MIT"
] | null | null | null | import os
import keyring
from prompt_toolkit import prompt
KEY = ('slackcast', 'token')
SLACKCAST_INSTALL_URL = os.environ.get(
'SLACKCAST_INSTALL_URL', 'https://slackcast.devtestit.com/install'
)
| 22.481481 | 88 | 0.667216 |
ef0f41777334766f27b085f4b278863d8beee416 | 790 | py | Python | baidupan.py | iSteveyang/GraduateDesign-pyqt | ce4e6c8b0de2398081a83c63fb98cc03126bc6d0 | [
"MIT"
] | null | null | null | baidupan.py | iSteveyang/GraduateDesign-pyqt | ce4e6c8b0de2398081a83c63fb98cc03126bc6d0 | [
"MIT"
] | null | null | null | baidupan.py | iSteveyang/GraduateDesign-pyqt | ce4e6c8b0de2398081a83c63fb98cc03126bc6d0 | [
"MIT"
] | null | null | null | import progressbar
from baidupcsapi import PCS
pcs = PCS('username','password')
test_file = open('bigfile.pdf','rb').read()
ret = pcs.upload('/',test_file,'bigfile.pdf',callback=ProgressBar())
| 34.347826 | 115 | 0.611392 |
ef0f95f25a14e3a1c31217d9a079a1f1c52c743d | 541 | py | Python | pps/message.py | SeungUkLee/preview-pipfile-script | d28d963f1feee9ed1621a04b25c02d34a0919829 | [
"MIT"
] | null | null | null | pps/message.py | SeungUkLee/preview-pipfile-script | d28d963f1feee9ed1621a04b25c02d34a0919829 | [
"MIT"
] | null | null | null | pps/message.py | SeungUkLee/preview-pipfile-script | d28d963f1feee9ed1621a04b25c02d34a0919829 | [
"MIT"
] | null | null | null | """
messages
"""
from .color import ENDC, FAIL, OKBLUE, YELLOW
EXE_SCRIPT_ERR_MSG = '{0}[!]{1} An error occurred while executing script in Pipfile'.format(
FAIL, ENDC
)
KEYWORD_NOT_FOUND_MSG = "{0}[!]{1} {2}Pipfile{1} in {3}[scripts]{1} keyword not found!".format(
FAIL, ENDC, OKBLUE, YELLOW
)
FILE_NOT_FOUND_MS... | 31.823529 | 95 | 0.685767 |
ef1093497c62d32b5e459bb8bfbe26c27ca18a49 | 2,101 | py | Python | lambdafunctions/LogEvent/LogEvent.py | rpetrina/slack-sentiment-bot | 47969d8a8c476aa60939fab88f0af793a24a4acc | [
"MIT"
] | null | null | null | lambdafunctions/LogEvent/LogEvent.py | rpetrina/slack-sentiment-bot | 47969d8a8c476aa60939fab88f0af793a24a4acc | [
"MIT"
] | null | null | null | lambdafunctions/LogEvent/LogEvent.py | rpetrina/slack-sentiment-bot | 47969d8a8c476aa60939fab88f0af793a24a4acc | [
"MIT"
] | null | null | null | import sys
import logging
import pymysql
import json
import os
#rds settings - Lambda role must have RDS access
rds_host = os.environ['RDS_HOST'] # Set in Lambda Dashboard
name = os.environ['DB_USERNAME']
password = os.environ['DB_PW']
db_name = os.environ['DB_NAME']
db_table = os.environ['DB_TABLE']
logger = loggin... | 29.180556 | 107 | 0.619229 |
ef124d3ce81475f29c8f62fc6238715aeebcf110 | 764 | py | Python | ACCNTS/migrations/0012_auto_20190329_0554.py | domambia/csdigital-gs1kenya-internal-erp | 6736d0e9a3a51653689f8ae921cf811f378d9d8e | [
"MIT"
] | 12 | 2019-08-02T07:58:16.000Z | 2022-01-31T23:45:08.000Z | ACCNTS/migrations/0012_auto_20190329_0554.py | domambia/csdigital-gs1kenya-internal-erp | 6736d0e9a3a51653689f8ae921cf811f378d9d8e | [
"MIT"
] | 8 | 2019-08-02T08:06:18.000Z | 2022-03-11T23:45:17.000Z | ACCNTS/migrations/0012_auto_20190329_0554.py | domambia/csdigital-gs1kenya-internal-erp | 6736d0e9a3a51653689f8ae921cf811f378d9d8e | [
"MIT"
] | 11 | 2019-07-31T16:23:36.000Z | 2022-01-29T08:30:07.000Z | # Generated by Django 2.1.5 on 2019-03-29 05:54
import datetime
from django.db import migrations, models
| 25.466667 | 66 | 0.590314 |
ef1252f9351ea7758743cb386119d19cc1470cf1 | 171 | py | Python | doacao/forms.py | CyberDagger/quatropatas | 7fd9b51dd65d6242112ab40c834a66c4cc8c8c73 | [
"MIT"
] | null | null | null | doacao/forms.py | CyberDagger/quatropatas | 7fd9b51dd65d6242112ab40c834a66c4cc8c8c73 | [
"MIT"
] | null | null | null | doacao/forms.py | CyberDagger/quatropatas | 7fd9b51dd65d6242112ab40c834a66c4cc8c8c73 | [
"MIT"
] | 1 | 2019-04-16T19:19:10.000Z | 2019-04-16T19:19:10.000Z | from django import forms
from .models import Doacao
| 21.375 | 37 | 0.631579 |
ef12df78f36f2adabef28423fa54313ee1270534 | 1,707 | py | Python | data/build_wd_elastic_index.py | flaneuse/reframedb-backend | 863423fb9fad547aa8c2f826dc2d39939fe1b991 | [
"MIT"
] | null | null | null | data/build_wd_elastic_index.py | flaneuse/reframedb-backend | 863423fb9fad547aa8c2f826dc2d39939fe1b991 | [
"MIT"
] | null | null | null | data/build_wd_elastic_index.py | flaneuse/reframedb-backend | 863423fb9fad547aa8c2f826dc2d39939fe1b991 | [
"MIT"
] | null | null | null | import requests
from elasticsearch import Elasticsearch, client
from elasticsearch.exceptions import RequestError
es = Elasticsearch()
# retrieve all QIDs from the populated reframe ES index
body = {
"_source": {
"includes": ["qid"],
},
"query": {
"query_string": {
"query": "... | 21.884615 | 91 | 0.565319 |
ef135d999c596568c19df6fc41a299bbb48ab07f | 3,049 | py | Python | dj_twitter_clone_app/blog/views.py | ivanprytula/dj_demo_app | 49ca506b22d3d99608e192b28787e185b39d3c24 | [
"MIT"
] | null | null | null | dj_twitter_clone_app/blog/views.py | ivanprytula/dj_demo_app | 49ca506b22d3d99608e192b28787e185b39d3c24 | [
"MIT"
] | null | null | null | dj_twitter_clone_app/blog/views.py | ivanprytula/dj_demo_app | 49ca506b22d3d99608e192b28787e185b39d3c24 | [
"MIT"
] | null | null | null | from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.urls import reverse_lazy
from django.views.generic import (ListView, CreateView, TemplateView, )
from django.views.generic.detail import DetailView
from django.views.generic.edit import (UpdateView, DeleteView, )
from blog.models impo... | 29.601942 | 73 | 0.648081 |
ef1431dac95c7e69b7262a40569f5236bf33fd8b | 4,217 | py | Python | code/service/flaskapp/flaskapp.py | Wyss/evolvulator | c026b9e7425cabba8b7a5b49024173c6f9667337 | [
"MIT"
] | 1 | 2016-01-05T20:10:10.000Z | 2016-01-05T20:10:10.000Z | code/service/flaskapp/flaskapp.py | Wyss/evolvulator | c026b9e7425cabba8b7a5b49024173c6f9667337 | [
"MIT"
] | null | null | null | code/service/flaskapp/flaskapp.py | Wyss/evolvulator | c026b9e7425cabba8b7a5b49024173c6f9667337 | [
"MIT"
] | null | null | null | """
Copyright (c) 2012 Wyss Institute at Harvard University
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge... | 35.436975 | 109 | 0.708798 |
ef1825ce5af0c1bb4c24887ac8d1e612fd32ac97 | 5,383 | py | Python | ena-dts/framework/rst.py | amzn/amzn-ec2-ena-utilities | 99502ff5bb025dc71727d4991ea5e29a4e9388c6 | [
"MIT-0"
] | 7 | 2021-04-29T05:23:56.000Z | 2022-03-23T02:26:55.000Z | ena-dts/framework/rst.py | amzn/amzn-ec2-ena-utilities | 99502ff5bb025dc71727d4991ea5e29a4e9388c6 | [
"MIT-0"
] | null | null | null | ena-dts/framework/rst.py | amzn/amzn-ec2-ena-utilities | 99502ff5bb025dc71727d4991ea5e29a4e9388c6 | [
"MIT-0"
] | 4 | 2021-06-10T19:02:57.000Z | 2021-12-06T01:31:06.000Z | # BSD LICENSE
#
# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copy... | 33.228395 | 75 | 0.583132 |
ef191d6989e1e630c43331526ecc6be3b87686af | 331 | py | Python | tests/test_models.py | kajigga/dj-pylti | 2388719ee799b3033a9ab7ccf28667e69bcd8cd6 | [
"BSD-3-Clause"
] | null | null | null | tests/test_models.py | kajigga/dj-pylti | 2388719ee799b3033a9ab7ccf28667e69bcd8cd6 | [
"BSD-3-Clause"
] | null | null | null | tests/test_models.py | kajigga/dj-pylti | 2388719ee799b3033a9ab7ccf28667e69bcd8cd6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_dj-pylti
------------
Tests for `dj-pylti` models module.
"""
from django.test import TestCase
from dj_pylti import models
| 12.730769 | 35 | 0.607251 |
ef19d273749fc5c7cda4c1d9c7f1b0e4fb378f5e | 30,467 | py | Python | mutation.py | nklapste/mutation | 28eb3eaa3173f0a9cfcd22c2cabe6d0c87f50dfa | [
"MIT"
] | null | null | null | mutation.py | nklapste/mutation | 28eb3eaa3173f0a9cfcd22c2cabe6d0c87f50dfa | [
"MIT"
] | null | null | null | mutation.py | nklapste/mutation | 28eb3eaa3173f0a9cfcd22c2cabe6d0c87f50dfa | [
"MIT"
] | null | null | null | """Mutation.
Usage:
mutation play [--verbose] [--exclude=<globs>] [--only-deadcode-detection] [--include=<globs>] [--sampling=<s>] [--randomly-seed=<n>] [--max-workers=<n>] [<file-or-directory> ...] [-- TEST-COMMAND ...]
mutation replay [--verbose] [--max-workers=<n>]
mutation list
mutation show MUTATION
mut... | 28.961027 | 202 | 0.573046 |
ef1a0f68bf7e4627785fe119d1363f10a767d348 | 1,058 | py | Python | main.py | bijilap/ColorRecognition | a070645e5bda40c0d06d03db468f31c79b63d0bd | [
"Apache-2.0"
] | 2 | 2018-03-29T12:15:04.000Z | 2019-01-09T02:09:41.000Z | main.py | bijilap/ColorRecognition | a070645e5bda40c0d06d03db468f31c79b63d0bd | [
"Apache-2.0"
] | null | null | null | main.py | bijilap/ColorRecognition | a070645e5bda40c0d06d03db468f31c79b63d0bd | [
"Apache-2.0"
] | null | null | null | import argparse
from ColorDetector import ColorDetector
if __name__ == "__main__":
main()
| 30.228571 | 111 | 0.660681 |
ef1bad6bf6953bfcc6d21e0a6fe6026bfa17d421 | 286 | py | Python | desafio64.py | DantonMatheus/desafios-python | 709a3f1774596fc536dd4b882c78a6b951c92a9c | [
"MIT"
] | null | null | null | desafio64.py | DantonMatheus/desafios-python | 709a3f1774596fc536dd4b882c78a6b951c92a9c | [
"MIT"
] | null | null | null | desafio64.py | DantonMatheus/desafios-python | 709a3f1774596fc536dd4b882c78a6b951c92a9c | [
"MIT"
] | null | null | null | print('===== DESAFIO 64 =====')
num = 0
cont = 0
soma = 0
num = int(input('Digite um nmero [999 para SAIR]: '))
while num != 999:
soma += num
cont += 1
num = int(input('Digite um nmero [999 para SAIR]: '))
print(f'Voc digitou {cont} nmeros! A soma entre eles {soma}')
| 26 | 65 | 0.594406 |