hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e60bf0fffa5d03c3b96086eba8b1615a72a54c3f | 15,002 | py | Python | fhir/resources/DSTU2/careplan.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 144 | 2019-05-08T14:24:43.000Z | 2022-03-30T02:37:11.000Z | fhir/resources/DSTU2/careplan.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 82 | 2019-05-13T17:43:13.000Z | 2022-03-30T16:45:17.000Z | fhir/resources/DSTU2/careplan.py | cstoltze/fhir.resources | 52f99738935b7313089d89daf94d73ce7d167c9d | [
"BSD-3-Clause"
] | 48 | 2019-04-04T14:14:53.000Z | 2022-03-30T06:07:31.000Z | # -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/CarePlan
Release: DSTU2
Version: 1.0.2
Revision: 7202
"""
from typing import Any, Dict
from typing import List as ListType
from pydantic import Field, root_validator
from . import fhirtypes
from .backboneelement import BackboneElement
from .... | 33.190265 | 95 | 0.611318 | 14,630 | 0.975203 | 0 | 0 | 1,927 | 0.12845 | 0 | 0 | 7,241 | 0.482669 |
e60f46b99d8c8cc0e5235381e1f3fff24068c1ab | 19,993 | py | Python | cogen/core/sockets.py | ionelmc/cogen | 83b0edb88425eba6e5bfda9f1dcd34642517e2a8 | [
"MIT"
] | 6 | 2016-01-22T09:42:45.000Z | 2020-11-28T14:00:25.000Z | cogen/core/sockets.py | ionelmc/cogen | 83b0edb88425eba6e5bfda9f1dcd34642517e2a8 | [
"MIT"
] | 1 | 2017-02-16T15:20:11.000Z | 2017-02-16T22:50:41.000Z | cogen/core/sockets.py | ionelmc/python-cogen | 83b0edb88425eba6e5bfda9f1dcd34642517e2a8 | [
"MIT"
] | null | null | null | """
Socket-only coroutine operations and `Socket` wrapper.
Really - the only thing you need to know for most stuff is
the :class:`~cogen.core.sockets.Socket` class.
"""
#TODO: how to deal with requets that have unicode params
__all__ = [
'getdefaulttimeout', 'setdefaulttimeout', 'Socket', 'SendFile', 'Re... | 32.991749 | 92 | 0.553644 | 18,845 | 0.94258 | 5,819 | 0.291052 | 5,903 | 0.295253 | 0 | 0 | 6,987 | 0.349472 |
e6129fa4f147cc4a7f5689db1f136f1e4febaef9 | 399 | py | Python | observatory/views/side.py | spookey/observatory | be5cc92f53f12e6341e7e3040f26360e54cfdf7d | [
"MIT"
] | null | null | null | observatory/views/side.py | spookey/observatory | be5cc92f53f12e6341e7e3040f26360e54cfdf7d | [
"MIT"
] | 1 | 2020-03-28T09:51:56.000Z | 2020-03-28T09:51:56.000Z | observatory/views/side.py | spookey/dz_stats_page | be5cc92f53f12e6341e7e3040f26360e54cfdf7d | [
"MIT"
] | null | null | null | from flask import Blueprint, current_app, send_from_directory
BLUEPRINT_SIDE = Blueprint('side', __name__)
@BLUEPRINT_SIDE.route('/logo.png', endpoint='logo')
@BLUEPRINT_SIDE.route('/favicon.ico')
@BLUEPRINT_SIDE.route('/favicon.png')
def favicon():
return send_from_directory(
current_app.static_folder,
... | 26.6 | 61 | 0.719298 | 0 | 0 | 0 | 0 | 288 | 0.721805 | 0 | 0 | 71 | 0.177945 |
e615a7a5295760430baa3da38fd3109a777ed978 | 226 | py | Python | TestDictComprehension.py | prakharindoria/Python-Code-Snippets | 96887caa73c92fda7ebae0b59a72cf24c97a94f5 | [
"MIT"
] | null | null | null | TestDictComprehension.py | prakharindoria/Python-Code-Snippets | 96887caa73c92fda7ebae0b59a72cf24c97a94f5 | [
"MIT"
] | null | null | null | TestDictComprehension.py | prakharindoria/Python-Code-Snippets | 96887caa73c92fda7ebae0b59a72cf24c97a94f5 | [
"MIT"
] | null | null | null | t=input("Type a string")
s=t.lower()
alll="abcdefghijklmnopqrstuvwxyz1234567890"
for c in alll:
d={c:s.count(c) for c in s}
dt=sorted(d.items(), key=lambda x: x[1], reverse=True)
for k,v in dt.items():
print(k,":",v)
| 25.111111 | 54 | 0.654867 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.252212 |
e6170d2f693f08c4d21d708512f6fdcb2389cdda | 1,183 | py | Python | scripts/update_readme_metrics.py | ygormutti/executor-exporter | 4b985fdf03cbf0515b912aa9631c3c8f0c81a461 | [
"Apache-2.0"
] | 1 | 2022-02-24T02:21:14.000Z | 2022-02-24T02:21:14.000Z | scripts/update_readme_metrics.py | ygormutti/executor-exporter | 4b985fdf03cbf0515b912aa9631c3c8f0c81a461 | [
"Apache-2.0"
] | null | null | null | scripts/update_readme_metrics.py | ygormutti/executor-exporter | 4b985fdf03cbf0515b912aa9631c3c8f0c81a461 | [
"Apache-2.0"
] | null | null | null | from sys import argv
from executor_exporter.exporter import metrics
def update_readme_metrics(readme_path):
columns = ("Name", "Type", "Labels", "Description")
sep = " | "
table_lines = [sep.join(columns), sep.join(["---"] * len(columns))]
for metric in metrics:
table_lines.append(
... | 26.288889 | 71 | 0.540997 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.08115 |
e61732e97bfa8fdbdf35bca08255c56c7737afe4 | 1,717 | py | Python | accounts/migrations/0002_auto_20160226_1548.py | adrienlachaize/dezede | 584ec30cedab95152e2f95595b7691a04e6736e2 | [
"BSD-3-Clause"
] | 15 | 2015-02-10T21:16:31.000Z | 2021-03-25T16:46:20.000Z | accounts/migrations/0002_auto_20160226_1548.py | adrienlachaize/dezede | 584ec30cedab95152e2f95595b7691a04e6736e2 | [
"BSD-3-Clause"
] | 4 | 2021-02-10T15:42:08.000Z | 2022-03-11T23:20:38.000Z | accounts/migrations/0002_auto_20160226_1548.py | adrienlachaize/dezede | 584ec30cedab95152e2f95595b7691a04e6736e2 | [
"BSD-3-Clause"
] | 6 | 2016-07-10T14:20:48.000Z | 2022-01-19T18:34:02.000Z | import accounts.models
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
]
operations = [
migrations.AlterModelManagers(
name='hierarchicuser',
managers=[
... | 42.925 | 409 | 0.630169 | 1,620 | 0.943506 | 0 | 0 | 0 | 0 | 0 | 0 | 554 | 0.322656 |
e6184b491c0b4ec3b27d15dd525a54b420ab6962 | 109 | py | Python | tests/python-reference/dict/dict-bool.py | jpolitz/lambda-py-paper | 746ef63fc1123714b4adaf78119028afbea7bd76 | [
"Apache-2.0"
] | 25 | 2015-04-16T04:31:49.000Z | 2022-03-10T15:53:28.000Z | tests/python-reference/dict/dict-bool.py | jpolitz/lambda-py-paper | 746ef63fc1123714b4adaf78119028afbea7bd76 | [
"Apache-2.0"
] | 1 | 2018-11-21T22:40:02.000Z | 2018-11-26T17:53:11.000Z | tests/python-reference/dict/dict-bool.py | jpolitz/lambda-py-paper | 746ef63fc1123714b4adaf78119028afbea7bd76 | [
"Apache-2.0"
] | 1 | 2021-03-26T03:36:19.000Z | 2021-03-26T03:36:19.000Z | ___assertIs(not {}, True)
___assertTrue({1: 2})
___assertIs(bool({}), False)
___assertIs(bool({1: 2}), True)
| 21.8 | 31 | 0.678899 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e618960b87b4b729b558ed9c9d5f90f4d0854b6a | 8,575 | py | Python | danceschool/private_lessons/forms.py | django-danceschool/django-danceschool | 65ae09ffdcb0821e82df0e1f634fe13c0384a525 | [
"BSD-3-Clause"
] | 32 | 2017-09-12T04:25:25.000Z | 2022-03-21T10:48:07.000Z | danceschool/private_lessons/forms.py | django-danceschool/django-danceschool | 65ae09ffdcb0821e82df0e1f634fe13c0384a525 | [
"BSD-3-Clause"
] | 97 | 2017-09-01T02:43:08.000Z | 2022-01-03T18:20:34.000Z | danceschool/private_lessons/forms.py | django-danceschool/django-danceschool | 65ae09ffdcb0821e82df0e1f634fe13c0384a525 | [
"BSD-3-Clause"
] | 19 | 2017-09-26T13:34:46.000Z | 2022-03-21T10:48:10.000Z | from django import forms
from django.utils.translation import gettext_lazy as _
from django.conf import settings
from django.core.exceptions import ValidationError
from datetime import datetime, timedelta
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Div, Submit
from danceschool.c... | 38.977273 | 102 | 0.661574 | 7,607 | 0.887114 | 0 | 0 | 0 | 0 | 0 | 0 | 2,316 | 0.270087 |
e61a46397ce546d99911d246529ba90ca1cf69a8 | 32,292 | py | Python | engine/modules.py | scofield7419/HeSyFu | cc06a644918d65aa898f65348077f3d9a3e5252b | [
"Apache-2.0"
] | 1 | 2021-11-04T02:31:39.000Z | 2021-11-04T02:31:39.000Z | engine/modules.py | scofield7419/HeSyFu | cc06a644918d65aa898f65348077f3d9a3e5252b | [
"Apache-2.0"
] | null | null | null | engine/modules.py | scofield7419/HeSyFu | cc06a644918d65aa898f65348077f3d9a3e5252b | [
"Apache-2.0"
] | 2 | 2021-12-28T03:38:37.000Z | 2021-12-29T12:56:41.000Z | import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
from typing import List, Tuple, Dict
import numpy as np
from torch.autograd import Variable
class DepGCN(nn.Module):
"""
Label-aware Dependency Convolutional Neural Network Layer
"""
def __init__(self, dep_num, dep_dim, in_fe... | 38.488677 | 120 | 0.580515 | 24,894 | 0.770903 | 0 | 0 | 0 | 0 | 0 | 0 | 4,068 | 0.125975 |
e61d028876011792c07b86f917e40c7cc75e894b | 2,293 | py | Python | src/ScreenCapLibrary/utils.py | davesliu/ScreenCapLibrary | b5537c44c740e0f43e424fb0028dbcfd0e5b0557 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ScreenCapLibrary/utils.py | davesliu/ScreenCapLibrary | b5537c44c740e0f43e424fb0028dbcfd0e5b0557 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ScreenCapLibrary/utils.py | davesliu/ScreenCapLibrary | b5537c44c740e0f43e424fb0028dbcfd0e5b0557 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... | 31.410959 | 81 | 0.647187 | 536 | 0.233755 | 0 | 0 | 0 | 0 | 0 | 0 | 1,211 | 0.528129 |
e61e22d90752c055fa760632a6070ebc75d3da15 | 228 | py | Python | utils/alerts.py | RealDebian/Palpeo | 23be184831a3c529cf933277944e7aacda08cdad | [
"MIT"
] | null | null | null | utils/alerts.py | RealDebian/Palpeo | 23be184831a3c529cf933277944e7aacda08cdad | [
"MIT"
] | null | null | null | utils/alerts.py | RealDebian/Palpeo | 23be184831a3c529cf933277944e7aacda08cdad | [
"MIT"
] | null | null | null | from colorama import Fore
good = Fore.GREEN + '[*]' + Fore.RESET
bad = Fore.RED + '[!]' + Fore.RESET
warning = Fore.RED + '[$]' + Fore.RESET
excellent = Fore.CYAN + '[$]' + Fore.RESET
debug_point = Fore.RED + '{*}' + Fore.RESET | 32.571429 | 43 | 0.609649 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.109649 |
e6230fc750b387220c642ab851a058153bb25082 | 7,206 | py | Python | pybilt/common/gaussian.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 11 | 2019-07-29T16:21:53.000Z | 2022-02-02T11:44:57.000Z | pybilt/common/gaussian.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 11 | 2019-05-15T09:30:05.000Z | 2021-07-19T16:49:59.000Z | pybilt/common/gaussian.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 9 | 2019-08-12T11:14:45.000Z | 2020-12-22T18:22:55.000Z | """Define Gaussian function objects.
This module defines the Gaussian class and the GaussianRange class.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from builtins import object
import numpy as np
from six.moves import range
class Gaussian(object... | 30.927039 | 79 | 0.592007 | 6,903 | 0.957952 | 0 | 0 | 0 | 0 | 0 | 0 | 4,294 | 0.595892 |
e62402ac83b864060bad9000d2d1550eba4920c4 | 3,538 | py | Python | savingzelda/lib.py | recarreira/saving-zelda | 70d1dd799f516ceb7ea9a435472da74b3b58bf91 | [
"MIT"
] | 2 | 2016-07-11T01:56:08.000Z | 2017-01-04T17:39:17.000Z | savingzelda/lib.py | recarreira/saving-zelda | 70d1dd799f516ceb7ea9a435472da74b3b58bf91 | [
"MIT"
] | 5 | 2016-07-10T16:25:44.000Z | 2016-07-22T14:20:02.000Z | savingzelda/lib.py | recarreira/saving-zelda | 70d1dd799f516ceb7ea9a435472da74b3b58bf91 | [
"MIT"
] | 1 | 2016-07-21T22:10:02.000Z | 2016-07-21T22:10:02.000Z | import requests
import re
from urlparse import urlparse
from bs4 import BeautifulSoup
from collections import defaultdict
class SavingZelda(object):
def __init__(self, url, logger):
self.url = url
self.logger = logger
self.body = ""
self.not_checked = []
self.list_of_links... | 35.38 | 112 | 0.628604 | 3,302 | 0.933296 | 0 | 0 | 0 | 0 | 0 | 0 | 336 | 0.094969 |
e6257ae02757a301799ad06a407d32569d49a6d5 | 1,352 | py | Python | django_forms/forms_project/forms_project/urls.py | joyliao07/django_review | e4311d2ccbb96646a6867e5fc426ca67a122d7ed | [
"MIT"
] | null | null | null | django_forms/forms_project/forms_project/urls.py | joyliao07/django_review | e4311d2ccbb96646a6867e5fc426ca67a122d7ed | [
"MIT"
] | 8 | 2020-02-12T00:30:10.000Z | 2021-06-10T18:16:37.000Z | django_forms/forms_project/forms_project/urls.py | joyliao07/django_review | e4311d2ccbb96646a6867e5fc426ca67a122d7ed | [
"MIT"
] | null | null | null | """forms_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class... | 39.764706 | 77 | 0.697485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 825 | 0.610207 |
e625df758f3e2fdaeb576f8377536aeeebd5b8b3 | 635 | py | Python | extractors/folha_news_extractor.py | LorhanSohaky/POOA | c604f03f9b7bbfccecb75a982cc76fe428c36433 | [
"MIT"
] | 1 | 2020-12-05T21:01:10.000Z | 2020-12-05T21:01:10.000Z | extractors/folha_news_extractor.py | LorhanSohaky/POOA | c604f03f9b7bbfccecb75a982cc76fe428c36433 | [
"MIT"
] | null | null | null | extractors/folha_news_extractor.py | LorhanSohaky/POOA | c604f03f9b7bbfccecb75a982cc76fe428c36433 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
from news import News
from .abstract_news_extractor import AbstractNewsExtractor
class FolhaNewsExtractor(AbstractNewsExtractor):
def __init__(self):
super().__init__('https://www.folha.uol.com.br')
def extract_news(self):
news = []
html_... | 27.608696 | 62 | 0.661417 | 505 | 0.795276 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.168504 |
e626176d8836eb758155d498bd351936493ec76d | 3,871 | py | Python | pyrbi/__init__.py | hack-a-team/pyrbi | 09296788d9b9a29ae7aaeff960992d2893468372 | [
"MIT"
] | null | null | null | pyrbi/__init__.py | hack-a-team/pyrbi | 09296788d9b9a29ae7aaeff960992d2893468372 | [
"MIT"
] | null | null | null | pyrbi/__init__.py | hack-a-team/pyrbi | 09296788d9b9a29ae7aaeff960992d2893468372 | [
"MIT"
] | null | null | null | """
Provides a simple Python client for RBI REST API
"""
from . import exceptions
import requests
__version__ = "0.1.0"
class PyRBI:
"""
A client for RBI Blockchain's REST API
Usage:
Create a new instance using your credentials
>>> cli = PyRBI("user", "pass")
From there on you can creat... | 28.674074 | 88 | 0.57427 | 3,745 | 0.96745 | 0 | 0 | 0 | 0 | 0 | 0 | 1,681 | 0.434255 |
e6266840cb7ce270f6afeec9709e2ac1a2d1d286 | 1,426 | py | Python | scripts/sequence/replace_selenocystein.py | mahajrod/MAVR | 4db74dff7376a2ffe4426db720b241de9198f329 | [
"MIT"
] | 10 | 2015-04-28T14:15:04.000Z | 2021-03-15T00:07:38.000Z | scripts/sequence/replace_selenocystein.py | mahajrod/MAVR | 4db74dff7376a2ffe4426db720b241de9198f329 | [
"MIT"
] | null | null | null | scripts/sequence/replace_selenocystein.py | mahajrod/MAVR | 4db74dff7376a2ffe4426db720b241de9198f329 | [
"MIT"
] | 6 | 2017-03-16T22:38:41.000Z | 2021-08-11T00:22:52.000Z | #!/usr/bin/env python
__author__ = 'Sergei F. Kliver'
import argparse
import os
from copy import deepcopy
from Bio import SeqIO
from Bio.Seq import Seq
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--input_file", action="store", dest="input_file",
help="Input file with sequences... | 33.952381 | 125 | 0.691445 | 0 | 0 | 297 | 0.208275 | 0 | 0 | 0 | 0 | 395 | 0.276999 |
e626e6e7f40b567d4b7615f9b578110b40aa795b | 438 | py | Python | Aulas Gustavo Guanabara/Aula018.1.py | RobertoRanulfo/Phyton | d7ba1aaffac2f3d78e46fc96b480b6a62d6dfe01 | [
"MIT"
] | null | null | null | Aulas Gustavo Guanabara/Aula018.1.py | RobertoRanulfo/Phyton | d7ba1aaffac2f3d78e46fc96b480b6a62d6dfe01 | [
"MIT"
] | null | null | null | Aulas Gustavo Guanabara/Aula018.1.py | RobertoRanulfo/Phyton | d7ba1aaffac2f3d78e46fc96b480b6a62d6dfe01 | [
"MIT"
] | null | null | null | teste = list()
teste.append('Gustavo')
teste.append(40)
galera = []
galera.append(teste) #neste caso estamos criando uma ligação entre as duas listas
teste[0] = 'Maria'
teste[1] = 22
galera.append(teste)
print(teste)
print(galera) # No caso os elementos não se acumularam porque não foi feita uma cópia dos elementos da ... | 39.818182 | 112 | 0.730594 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 273 | 0.616253 |
e62704d640c5f34b51dc4894e557ad6bcb2ec7d5 | 1,637 | py | Python | ad_hoc/name_mapper_backfill.py | Connor-R/NSBL | 16615990d058d171fab4790f937846fd1f0b2ee9 | [
"MIT"
] | 1 | 2020-11-19T23:20:19.000Z | 2020-11-19T23:20:19.000Z | ad_hoc/name_mapper_backfill.py | Connor-R/NSBL | 16615990d058d171fab4790f937846fd1f0b2ee9 | [
"MIT"
] | null | null | null | ad_hoc/name_mapper_backfill.py | Connor-R/NSBL | 16615990d058d171fab4790f937846fd1f0b2ee9 | [
"MIT"
] | null | null | null | from py_db import db
import NSBL_helpers as helper
db = db("NSBL")
table_dict = {"register_batting_analytical": "a.player_name"
, "register_batting_primary": "a.player_name"
, "register_batting_secondary": "a.player_name"
, "register_batting_splits": "a.player_name"
, "register_pitching_analytical":... | 32.098039 | 82 | 0.681735 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,194 | 0.729383 |
e628182131b1688593a8c2682f0d77aa16ecd697 | 1,287 | py | Python | camcommander/watcher.py | tparker-usgs/camcommander | 0e508a1b24cc99496745652e52118000470d7e32 | [
"CC0-1.0"
] | null | null | null | camcommander/watcher.py | tparker-usgs/camcommander | 0e508a1b24cc99496745652e52118000470d7e32 | [
"CC0-1.0"
] | null | null | null | camcommander/watcher.py | tparker-usgs/camcommander | 0e508a1b24cc99496745652e52118000470d7e32 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
#
# I waive copyright and related rights in the this work worldwide
# through the CC0 1.0 Universal public domain dedication.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
#
# Author(s):
# Tom Parker <tparker@usgs.gov>
""" watch for new webcam images."""
import zmq
import to... | 26.8125 | 79 | 0.655012 | 548 | 0.425796 | 0 | 0 | 0 | 0 | 0 | 0 | 420 | 0.32634 |
e629f1eb273463da4f3c8be6f4e44ca1b639ae9f | 1,866 | py | Python | Filter/kalman_filter.py | KNakane/filter | 43ece9771003b63b477499dab2eb8d69e5bfdabe | [
"MIT"
] | null | null | null | Filter/kalman_filter.py | KNakane/filter | 43ece9771003b63b477499dab2eb8d69e5bfdabe | [
"MIT"
] | null | null | null | Filter/kalman_filter.py | KNakane/filter | 43ece9771003b63b477499dab2eb8d69e5bfdabe | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from tqdm import tqdm
class KalmanFilter():
def __init__(self, data, dim=1):
self.data = data.values
self.timelength = len(self.data)
# 潜在変数
self.x = np.zeros((self.timelength+1, dim))
self.x_filter = np.zeros((self.timelen... | 33.927273 | 113 | 0.559486 | 1,859 | 0.96122 | 0 | 0 | 0 | 0 | 0 | 0 | 309 | 0.159772 |
e62b0481e9ee04d621f3915eddb5dfd2397e270a | 4,394 | py | Python | mwarp1d/ui/figures/artists/draggable_points.py | 0todd0000/mwarp1d | 7b40a47e6c112a8da5a1b67aff890fc77fe83d71 | [
"MIT"
] | null | null | null | mwarp1d/ui/figures/artists/draggable_points.py | 0todd0000/mwarp1d | 7b40a47e6c112a8da5a1b67aff890fc77fe83d71 | [
"MIT"
] | 6 | 2019-11-25T08:15:05.000Z | 2020-02-07T13:05:59.000Z | mwarp1d/ui/figures/artists/draggable_points.py | 0todd0000/mwarp1d | 7b40a47e6c112a8da5a1b67aff890fc77fe83d71 | [
"MIT"
] | 2 | 2019-11-28T02:58:14.000Z | 2019-12-18T11:45:33.000Z |
from PyQt5 import QtWidgets, QtCore
from math import floor
import numpy as np
from . _base import _SelectableArtist2D
class _DraggablePoints(_SelectableArtist2D):
dragged = QtCore.pyqtSignal(object, int, int, float)
dragging_stopped = QtCore.pyqtSignal()
point_added = QtCore.pyqtSigna... | 24.824859 | 134 | 0.649067 | 4,259 | 0.969276 | 0 | 0 | 112 | 0.025489 | 0 | 0 | 195 | 0.044379 |
e62bee983944925691e81c42d718cf0680c6b087 | 7,370 | py | Python | convert/tartan_air_to_benchmark.py | AaltoML/vio_benchmark | cb2277026f824f88f3bc131057ebc687cb19d648 | [
"Apache-2.0"
] | 32 | 2021-04-23T15:07:04.000Z | 2022-03-30T08:04:28.000Z | convert/tartan_air_to_benchmark.py | AaltoML/vio_benchmark | cb2277026f824f88f3bc131057ebc687cb19d648 | [
"Apache-2.0"
] | 3 | 2021-02-10T18:54:06.000Z | 2022-03-12T16:58:19.000Z | convert/tartan_air_to_benchmark.py | AaltoML/vio_benchmark | cb2277026f824f88f3bc131057ebc687cb19d648 | [
"Apache-2.0"
] | 4 | 2021-02-08T11:11:09.000Z | 2022-03-15T12:45:05.000Z | #!/usr/bin/env python
#
# Download and convert TartanAir data <https://theairlab.org/tartanair-dataset/>.
#
# NOTE The whole dataset is several terabytes, so be sure to tune the `LEVELS` and
# `DATASETS` variables before running.
#
# It is recommended to install "AzCopy", an official tool for Azure, to get tolerable
# ... | 31.767241 | 142 | 0.53867 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,655 | 0.360244 |
e62c2f0e0a2aa9f2cc633c9f3f0f670db80af86f | 24,534 | py | Python | test/test_tsdb.py | eneelo/qats | 9280e2487bde97874cc8857b2780ac830323f363 | [
"MIT"
] | null | null | null | test/test_tsdb.py | eneelo/qats | 9280e2487bde97874cc8857b2780ac830323f363 | [
"MIT"
] | null | null | null | test/test_tsdb.py | eneelo/qats | 9280e2487bde97874cc8857b2780ac830323f363 | [
"MIT"
] | 1 | 2020-10-29T13:40:47.000Z | 2020-10-29T13:40:47.000Z | # -*- coding: utf-8 -*-
"""
Module for testing TsDB class
"""
from qats import TimeSeries, TsDB
import unittest
import os
import numpy as np
import sys
# todo: add tests for listing subset(s) based on specifying parameter `names` (with and wo param. `keys`)
# todo: add test for getm() with fullkey=False (... | 44.36528 | 121 | 0.59815 | 24,094 | 0.982066 | 0 | 0 | 0 | 0 | 0 | 0 | 9,435 | 0.384568 |
e62dd8453d35731f8df986056643c1efd1e8ea57 | 1,257 | py | Python | py/py_0105_special_subset_sums_testing.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0105_special_subset_sums_testing.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0105_special_subset_sums_testing.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | # Solution of;
# Project Euler Problem 105: Special subset sums: testing
# https://projecteuler.net/problem=105
#
# Let S(A) represent the sum of elements in set A of size n.
# We shall call it a special sum set if for any two non-empty disjoint
# subsets, B and C, the following properties are true:
#
# S(B) ≠ S(C);... | 34.916667 | 76 | 0.67144 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,095 | 0.869738 |
e62e5420e9280590cadcb41f39f8b617ff3cad05 | 3,673 | py | Python | pyserver/item/attc/annotation.py | lbouma/Cyclopath | d09d927a1e6f9e07924007fd39e8e807cd9c0f8c | [
"Apache-2.0"
] | 15 | 2015-05-06T05:11:48.000Z | 2021-12-03T14:56:58.000Z | pyserver/item/attc/annotation.py | landonb/Cyclopath | d09d927a1e6f9e07924007fd39e8e807cd9c0f8c | [
"Apache-2.0"
] | null | null | null | pyserver/item/attc/annotation.py | landonb/Cyclopath | d09d927a1e6f9e07924007fd39e8e807cd9c0f8c | [
"Apache-2.0"
] | 8 | 2015-05-06T05:11:36.000Z | 2020-11-04T05:11:22.000Z | # Copyright (c) 2006-2013 Regents of the University of Minnesota.
# For licensing terms, see the file LICENSE.
import conf
import g
from item import attachment
from item import item_base
from item import item_versioned
from item.util.item_type import Item_Type
from util_.streetaddress import ccp_stop_words
log = g.l... | 30.355372 | 79 | 0.632181 | 3,314 | 0.90226 | 0 | 0 | 0 | 0 | 0 | 0 | 1,522 | 0.414375 |
e62e88ca85209412b46b34f3a3135f7a89043c82 | 183 | py | Python | examples/sandbox/sandbox/__main__.py | salt-die/nurses_2 | 29b76c34b9a28bf7c115998f4e81979966c82df0 | [
"MIT"
] | 171 | 2021-06-23T15:29:15.000Z | 2022-03-25T18:53:10.000Z | examples/sandbox/sandbox/__main__.py | salt-die/nurses_2 | 29b76c34b9a28bf7c115998f4e81979966c82df0 | [
"MIT"
] | 1 | 2022-01-07T05:08:35.000Z | 2022-01-10T04:53:57.000Z | examples/sandbox/sandbox/__main__.py | salt-die/nurses_2 | 29b76c34b9a28bf7c115998f4e81979966c82df0 | [
"MIT"
] | 3 | 2021-10-01T09:12:15.000Z | 2022-01-14T21:31:11.000Z | from nurses_2.app import App
from .sandbox import Sandbox
class SandboxApp(App):
async def on_start(self):
self.add_widget(Sandbox(size=(31, 100)))
SandboxApp().run()
| 16.636364 | 48 | 0.704918 | 101 | 0.551913 | 0 | 0 | 0 | 0 | 74 | 0.404372 | 0 | 0 |
e630f7f1230425fb80852a1c185d9c2e86b9dabb | 4,985 | py | Python | midas2/common/bowtie2.py | czbiohub/microbiome-igg | fd4bc62bee15e53587a947ca32bf3c5b9e8022e6 | [
"MIT"
] | null | null | null | midas2/common/bowtie2.py | czbiohub/microbiome-igg | fd4bc62bee15e53587a947ca32bf3c5b9e8022e6 | [
"MIT"
] | 6 | 2022-03-14T19:37:52.000Z | 2022-03-14T19:51:47.000Z | midas2/common/bowtie2.py | czbiohub/microbiome-igg | fd4bc62bee15e53587a947ca32bf3c5b9e8022e6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import numpy as np
from midas2.common.utils import tsprint, command, split, OutputStream
def bowtie2_index_exists(bt2_db_dir, bt2_db_name):
bt2_db_suffixes = ["1.bt2", "2.bt2", "3.bt2", "4.bt2", "rev.1.bt2", "rev.2.bt2"]
if all(os.path.exists(f"{bt2_db_dir}/{bt2_db_name}.{ext}... | 38.643411 | 154 | 0.649549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,244 | 0.45015 |
e6314fc5be266fa2fd430fad718dac793df709ff | 3,541 | py | Python | src/race/src/my_lane_detection/findpoint.py | young43/ISCC_2020 | 2a7187410bceca901bd87b753a91fd35b73ca036 | [
"MIT"
] | 3 | 2020-11-13T04:59:27.000Z | 2021-04-02T06:36:03.000Z | src/race/src/my_lane_detection/findpoint.py | yongbeomkwak/ISCC_2021 | 7e7e5a8a14b9ed88e1cfbe2ee585fe24e4701015 | [
"MIT"
] | null | null | null | src/race/src/my_lane_detection/findpoint.py | yongbeomkwak/ISCC_2021 | 7e7e5a8a14b9ed88e1cfbe2ee585fe24e4701015 | [
"MIT"
] | 5 | 2020-09-13T09:06:16.000Z | 2021-06-19T02:31:23.000Z | import numpy as np
import cv2
class FindPoint:
def __init__(self,img):
self.window_height = 10
self.nwindows = 15
self.margin = 20
self.minpix = 70
self.center = img.shape[1]/2
def findpoint(self, img):
out_img = np.dstack((img, img, img))
h, w = img.sha... | 40.238636 | 119 | 0.475572 | 3,508 | 0.990681 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.027111 |
e6315a99e2517f5c7110b8dd1b8d7574b184b340 | 6,198 | py | Python | backend/ibutsu_server/tasks/db.py | john-dupuy/ibutsu-server | ae380fc7a72a4898075291bac8fdb86952bfd06a | [
"MIT"
] | null | null | null | backend/ibutsu_server/tasks/db.py | john-dupuy/ibutsu-server | ae380fc7a72a4898075291bac8fdb86952bfd06a | [
"MIT"
] | null | null | null | backend/ibutsu_server/tasks/db.py | john-dupuy/ibutsu-server | ae380fc7a72a4898075291bac8fdb86952bfd06a | [
"MIT"
] | null | null | null | import time
from datetime import datetime
from datetime import timedelta
from bson import ObjectId
from bson.errors import InvalidId
from dynaconf import settings
from ibutsu_server.mongo import mongo
from ibutsu_server.tasks.queues import task
from ibutsu_server.tasks.results import add_result_start_time
from ibutsu_... | 35.016949 | 99 | 0.62262 | 0 | 0 | 0 | 0 | 5,568 | 0.898354 | 0 | 0 | 1,860 | 0.300097 |
e631a24a11407592b87e8e8c899720b7b1343b18 | 1,457 | py | Python | vectorc2/blocks/migrations/0002_initialize_data.py | sebastiankruk/vectorc2 | 13232cd63ebed32346fb4a669511b102b8ed24c0 | [
"Apache-2.0"
] | 11 | 2019-02-27T01:38:47.000Z | 2020-11-13T02:14:58.000Z | vectorc2/blocks/migrations/0002_initialize_data.py | sebastiankruk/vectorc2 | 13232cd63ebed32346fb4a669511b102b8ed24c0 | [
"Apache-2.0"
] | 20 | 2019-02-27T21:22:59.000Z | 2022-01-13T01:22:16.000Z | vectorc2/blocks/migrations/0002_initialize_data.py | sebastiankruk/vectorc2 | 13232cd63ebed32346fb4a669511b102b8ed24c0 | [
"Apache-2.0"
] | 1 | 2020-01-14T09:14:28.000Z | 2020-01-14T09:14:28.000Z | # Generated by Django 2.1.7 on 2019-05-14 20:36
from django.db import migrations
from blocks.models import AnimationName, AnimationTrigger
import anki_vector
def generate_names(apps, schema_editor):
"""
Helper function to populate names of animations and triggers and update their status
"""
def __update_or_... | 28.019231 | 86 | 0.705559 | 174 | 0.119423 | 0 | 0 | 0 | 0 | 0 | 0 | 320 | 0.219629 |
e6329473dcae584a805afb6f3b7a11b77f6eec4b | 130 | py | Python | src/app/groups/apps.py | serious-notreally/cappa | 993a8df35ca6c3b22f3ca811937fd29c07fc71aa | [
"MIT"
] | 9 | 2020-04-05T07:35:55.000Z | 2021-08-03T05:50:05.000Z | src/app/groups/apps.py | serious-notreally/cappa | 993a8df35ca6c3b22f3ca811937fd29c07fc71aa | [
"MIT"
] | 89 | 2020-01-26T11:50:06.000Z | 2022-03-31T07:14:18.000Z | src/app/groups/apps.py | serious-notreally/cappa | 993a8df35ca6c3b22f3ca811937fd29c07fc71aa | [
"MIT"
] | 13 | 2020-03-10T14:45:07.000Z | 2021-07-31T02:43:40.000Z | from django.apps import AppConfig
class GroupsAppConfig(AppConfig):
name = 'app.groups'
verbose_name = "Учебные группы"
| 18.571429 | 35 | 0.738462 | 106 | 0.741259 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.286713 |
e6338656305747e7dd588f6558bdad231c542786 | 830 | py | Python | Estudos/namedtuple.py | Gbrvi/Python | 02f0125c990f06ccb5cd705b4bf6ec5ecb6d1eab | [
"MIT"
] | null | null | null | Estudos/namedtuple.py | Gbrvi/Python | 02f0125c990f06ccb5cd705b4bf6ec5ecb6d1eab | [
"MIT"
] | null | null | null | Estudos/namedtuple.py | Gbrvi/Python | 02f0125c990f06ccb5cd705b4bf6ec5ecb6d1eab | [
"MIT"
] | null | null | null | from collections import namedtuple
# É tipo um dicionario, é mais lento, mas é imutável!
#Jogador é a classe | #Atributos da classe
J = namedtuple('Jogador', ['nome', 'time', 'camisa', 'numero'])
j = J('Abel Hernadez', 'Flu', 99, 100) #Adicionando valores
j2 = J('Fred', 'Fluminense', 9, 157) ... | 31.923077 | 91 | 0.591566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 554 | 0.661098 |
e6342f9f6fc2f8be229cda6971a2b29ca77c7c7c | 1,330 | py | Python | src/decker/format/command.py | douglasfarinelli/pydev | 9d43d485b102e5b44ee28894278ae496c3cec024 | [
"MIT"
] | 21 | 2020-12-11T17:59:50.000Z | 2022-03-12T02:22:09.000Z | src/decker/format/command.py | douglasfarinelli/decker | 9d43d485b102e5b44ee28894278ae496c3cec024 | [
"MIT"
] | null | null | null | src/decker/format/command.py | douglasfarinelli/decker | 9d43d485b102e5b44ee28894278ae496c3cec024 | [
"MIT"
] | 2 | 2021-07-31T00:05:25.000Z | 2021-11-04T12:09:26.000Z | import sys
from typing import List
import click
from decker.conf import Config
from decker.utils import print_done
from .pool import FormatterBackendPool
from .services import run_format
@click.option(
'-b',
'--backend',
type=click.Choice([backend.id for backend in FormatterBackendPool.all()]),
mul... | 19 | 80 | 0.635338 | 0 | 0 | 0 | 0 | 1,137 | 0.854887 | 0 | 0 | 240 | 0.180451 |
e63506be46724ae2661303db422a81cac16e9cfd | 709 | py | Python | seeds.py | hazzillrodriguez/Flaskdesk | 16123f4d63c686a3332f3f91eda9bb3a8e2a3ed5 | [
"MIT"
] | null | null | null | seeds.py | hazzillrodriguez/Flaskdesk | 16123f4d63c686a3332f3f91eda9bb3a8e2a3ed5 | [
"MIT"
] | null | null | null | seeds.py | hazzillrodriguez/Flaskdesk | 16123f4d63c686a3332f3f91eda9bb3a8e2a3ed5 | [
"MIT"
] | null | null | null | from app import app, db
from app.models import Category, Priority, Status
from sqlalchemy.exc import SQLAlchemyError
category = 'Uncategorized'
priorities = ['Low', 'Medium', 'High', 'Urgent']
statuses = ['Open', 'Resolved', 'Pending', 'Closed']
def db_commit():
try:
db.session.commit()
print('Category, prioriti... | 28.36 | 63 | 0.734838 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 129 | 0.181946 |
e637df68b541d6e5860c6604066ab8cbf8d7df24 | 164 | py | Python | xs/nn/__init__.py | eLeVeNnN/xshinnosuke | 69da91e0ea5042437edfc31c0e6ff9ef394c6cc9 | [
"MIT"
] | 290 | 2020-07-06T02:13:12.000Z | 2021-01-04T14:23:39.000Z | xs/nn/__init__.py | E1eveNn/xshinnosuke | 69da91e0ea5042437edfc31c0e6ff9ef394c6cc9 | [
"MIT"
] | 1 | 2020-12-03T11:11:48.000Z | 2020-12-03T11:11:48.000Z | xs/nn/__init__.py | E1eveNn/xshinnosuke | 69da91e0ea5042437edfc31c0e6ff9ef394c6cc9 | [
"MIT"
] | 49 | 2020-07-16T00:27:47.000Z | 2020-11-26T03:03:14.000Z | from .objectives import MSELoss, CrossEntropyLoss
from .models import Sequential, Model, Module
from .grad_fn import Parameter, Tensor
from .td_functional import *
| 32.8 | 49 | 0.823171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e63871f321b5d3bb45b965cb63b221c456ac757e | 2,527 | py | Python | eval/plot.py | yhlleo/TriangleGAN | 5bab76561e75145c2645a93e23d22abd3f66f329 | [
"BSD-3-Clause"
] | 32 | 2019-07-15T11:11:57.000Z | 2022-01-09T11:03:00.000Z | eval/plot.py | yhlleo/TriangleGAN | 5bab76561e75145c2645a93e23d22abd3f66f329 | [
"BSD-3-Clause"
] | null | null | null | eval/plot.py | yhlleo/TriangleGAN | 5bab76561e75145c2645a93e23d22abd3f66f329 | [
"BSD-3-Clause"
] | 4 | 2019-07-17T09:00:14.000Z | 2021-11-16T21:20:25.000Z | # plot prd scores
import os
import json
from matplotlib import pyplot as plt
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("json_files", nargs="*")
parser.add_argument("--output_fig", type=str, default='prd.png')
args = parser.parse_args()
def load_jsons(file_paths):
scores, labels = [], []... | 37.716418 | 79 | 0.693708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,069 | 0.423031 |
e63ab07fc8212736ff3ef91cca7ad9e31b8c2243 | 2,218 | py | Python | data_output.py | adebraine/Time-Series-RNN | 2e5ef0a222d84e15ed09141724fa437492c1466e | [
"MIT"
] | null | null | null | data_output.py | adebraine/Time-Series-RNN | 2e5ef0a222d84e15ed09141724fa437492c1466e | [
"MIT"
] | null | null | null | data_output.py | adebraine/Time-Series-RNN | 2e5ef0a222d84e15ed09141724fa437492c1466e | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import keras
def evaluate_model(model, split_sets):
training_error = model.evaluate(split_sets['X_train'], split_sets['y_train'], verbose=0)
print('training error = ' + str(training_error))
testing_error = model.evaluate(split_sets['X_test'], split_sets[... | 35.206349 | 92 | 0.595131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 545 | 0.245717 |
e63b0d4192a6f56afdb4ff053aeafe21f3a6cf89 | 1,837 | py | Python | vector_auto_regression.py | hotpxl/nebuchadnezzar | b26e0f19b9fdfeb8baa094e0f5ee2526cefb6409 | [
"MIT"
] | 2 | 2015-05-20T18:02:40.000Z | 2016-08-07T18:57:27.000Z | vector_auto_regression.py | hotpxl/nebuchadnezzar | b26e0f19b9fdfeb8baa094e0f5ee2526cefb6409 | [
"MIT"
] | null | null | null | vector_auto_regression.py | hotpxl/nebuchadnezzar | b26e0f19b9fdfeb8baa094e0f5ee2526cefb6409 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.4
import stats.data
import stats.plot
import stats.preprocess
import pandas
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates
import datetime
from statsmodels.tsa.api import VAR, DynamicVAR
sse_indices = stats.data.sse_indices()
for i in sse_indices:
d = stats.data.g... | 37.489796 | 132 | 0.625476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 380 | 0.206859 |
e63cd901a3e8b73ecbb160ecf9c349073434a2bf | 2,086 | py | Python | ArticleClassifierTF/src/data_models/weights/theme_weights.py | joduss/ArticleClassifier | 38c0e168cdd74214b7f591c7cfc7b93fc496e46b | [
"Unlicense"
] | null | null | null | ArticleClassifierTF/src/data_models/weights/theme_weights.py | joduss/ArticleClassifier | 38c0e168cdd74214b7f591c7cfc7b93fc496e46b | [
"Unlicense"
] | null | null | null | ArticleClassifierTF/src/data_models/weights/theme_weights.py | joduss/ArticleClassifier | 38c0e168cdd74214b7f591c7cfc7b93fc496e46b | [
"Unlicense"
] | null | null | null | from typing import Dict, List
from classifier.preprocessing.article_theme_tokenizer import ArticleThemeTokenizer
from data_models.ThemeStat import ThemeStat
class ThemeWeights:
theme_stats: List[ThemeStat]
theme_tokenizer: ArticleThemeTokenizer
def __init__(self, theme_stats: List[ThemeStat], theme_tok... | 32.59375 | 93 | 0.650527 | 1,926 | 0.923298 | 0 | 0 | 0 | 0 | 0 | 0 | 338 | 0.162033 |
e63cf8d084bbaa33179f664b68770d2a61c1830b | 2,688 | py | Python | installation_text.py | bryanrtboy/videoselector | 6867c14ebb3f9ac563a2aa5533806ec4872a53e9 | [
"MIT"
] | 1 | 2017-12-10T12:42:09.000Z | 2017-12-10T12:42:09.000Z | installation_text.py | bryanrtboy/videoselector | 6867c14ebb3f9ac563a2aa5533806ec4872a53e9 | [
"MIT"
] | null | null | null | installation_text.py | bryanrtboy/videoselector | 6867c14ebb3f9ac563a2aa5533806ec4872a53e9 | [
"MIT"
] | null | null | null | #!/usr/bin/python
from pssh import SSHClient, ParallelSSHClient, utils
import datetime
import time
import random
import sys
output = []
hosts = ['client0', 'client1', 'client2','client3', 'client4']
client = ParallelSSHClient(hosts)
values = ["bear","cake","fork","pipe","gun"]
def open_movies(my_values, delay):
c... | 29.217391 | 111 | 0.679315 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 993 | 0.36942 |
e63d83d29b28004d4dc6e59ec720b1e34cdc3bc7 | 3,744 | py | Python | poi/cache.py | jchluo/poi | 6892d3e219ee2b841053a41d308887a5e6b60017 | [
"Apache-2.0"
] | 10 | 2016-01-11T09:24:38.000Z | 2021-07-20T06:40:15.000Z | poi/cache.py | jchluo/poi | 6892d3e219ee2b841053a41d308887a5e6b60017 | [
"Apache-2.0"
] | 1 | 2018-04-10T04:48:18.000Z | 2018-04-10T04:48:18.000Z | poi/cache.py | jchluo/poi | 6892d3e219ee2b841053a41d308887a5e6b60017 | [
"Apache-2.0"
] | 8 | 2016-01-11T09:24:56.000Z | 2020-04-23T08:25:53.000Z | # -*- coding: utf-8 -*-
"""Cache Recommender.
dump : run topN predict item for each user, and
dump them to file like object(disk file or memory).
load : recover from file like object, return CacheRecommender.
Note that this recommender just a tiny version of the original one,
which can... | 27.328467 | 75 | 0.576656 | 583 | 0.155716 | 0 | 0 | 0 | 0 | 0 | 0 | 1,683 | 0.449519 |
e63da7efdb0e189e1a9e15a53af922678e7b6e0e | 2,335 | py | Python | p2p/protocol.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | null | null | null | p2p/protocol.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | null | null | null | p2p/protocol.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | null | null | null | import logging
from typing import (
Any,
Sequence,
Tuple,
Type,
)
from eth_utils.toolz import accumulate
from p2p.abc import (
CommandAPI,
ProtocolAPI,
TransportAPI,
)
from p2p.constants import P2P_PROTOCOL_COMMAND_LENGTH
from p2p.typing import Capability
class BaseProtocol(ProtocolAPI):... | 31.986301 | 93 | 0.677088 | 1,379 | 0.590578 | 0 | 0 | 225 | 0.09636 | 0 | 0 | 415 | 0.17773 |
e63f1e8cde7eb9bc19101fd61c76b84d56a931e5 | 6,314 | py | Python | soocii_services_lib/tokens.py | jonascheng/services-lib | 5345be2ddeab8bbdbeccbc2bcbecf3202163d0bc | [
"Apache-2.0"
] | null | null | null | soocii_services_lib/tokens.py | jonascheng/services-lib | 5345be2ddeab8bbdbeccbc2bcbecf3202163d0bc | [
"Apache-2.0"
] | 5 | 2017-11-23T08:24:09.000Z | 2018-12-25T04:42:48.000Z | soocii_services_lib/tokens.py | jonascheng/services-lib | 5345be2ddeab8bbdbeccbc2bcbecf3202163d0bc | [
"Apache-2.0"
] | 3 | 2017-06-28T07:54:40.000Z | 2018-12-25T04:44:42.000Z | import binascii
import json
import time
import jsonschema
from .crypter import AESCipher
from .exceptions import AccessTokenValidationError, RefreshTokenValidationError, TokenExpiredError, TokenSchemaError
class BaseToken(dict):
_schema = {}
def is_valid(self, age=None, raise_exception=False):
try... | 28.062222 | 116 | 0.464365 | 6,092 | 0.96484 | 0 | 0 | 61 | 0.009661 | 0 | 0 | 1,168 | 0.184986 |
e648ade42231ae7382e8ffb8232ee7fd02bab1ce | 6,060 | py | Python | software/camera-imu/tools/imu_driver_alt.py | MomsFriendlyRobotCompany/mjolnir | 76f53e8e650ba1051b5f14e94ff2a9a283158da4 | [
"MIT"
] | 1 | 2020-08-17T04:36:14.000Z | 2020-08-17T04:36:14.000Z | software/camera-imu/tools/imu_driver_alt.py | MomsFriendlyRobotCompany/mjolnir | 76f53e8e650ba1051b5f14e94ff2a9a283158da4 | [
"MIT"
] | null | null | null | software/camera-imu/tools/imu_driver_alt.py | MomsFriendlyRobotCompany/mjolnir | 76f53e8e650ba1051b5f14e94ff2a9a283158da4 | [
"MIT"
] | 1 | 2021-04-06T08:26:03.000Z | 2021-04-06T08:26:03.000Z |
from serial import Serial
import struct
from math import log10, sin, cos, acos, atan2, asin, pi, sqrt
import time
from collections import namedtuple
from colorama import Fore
# agmpt_t = namedtuple("agmpt_t", "accel gyro mag pressure temperature timestamp")
# ImageIMU = namedtuple("ImageIMU","image accel gyro tempera... | 25.897436 | 87 | 0.518317 | 5,294 | 0.873597 | 0 | 0 | 0 | 0 | 0 | 0 | 1,645 | 0.271452 |
e64b61756e2c5141a88d05ce00a52ea06f0af2cf | 1,718 | py | Python | main.py | hwangseonu/pokeka | 39e56c59dfc85a0c73232ac9105766ef060aa90e | [
"MIT"
] | 1 | 2021-06-01T05:26:48.000Z | 2021-06-01T05:26:48.000Z | main.py | hwangseonu/pokeka | 39e56c59dfc85a0c73232ac9105766ef060aa90e | [
"MIT"
] | null | null | null | main.py | hwangseonu/pokeka | 39e56c59dfc85a0c73232ac9105766ef060aa90e | [
"MIT"
] | null | null | null | import base64
import svgwrite
import svgwrite.container
import svgwrite.shapes
import svgwrite.image
import bs4
import os
from urllib.request import urlopen
from selenium import webdriver
index = 0
code = input('덱 코드를 입력하세요.> ')
os.mkdir(code)
url = 'https://pokemoncard.co.kr/recipe/search?code=' + code
driver = we... | 24.542857 | 81 | 0.610594 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 257 | 0.148041 |
e64c6e151cf650530049e08cc621f9b0d7bf3833 | 967 | py | Python | save.py | jonoxia/pencilbox | 1ebcbefd0110a2d23ad0da27427df2e32eadfbfe | [
"Condor-1.1"
] | 3 | 2015-04-01T07:20:09.000Z | 2020-12-26T02:37:56.000Z | save.py | jonoxia/pencilbox | 1ebcbefd0110a2d23ad0da27427df2e32eadfbfe | [
"Condor-1.1"
] | null | null | null | save.py | jonoxia/pencilbox | 1ebcbefd0110a2d23ad0da27427df2e32eadfbfe | [
"Condor-1.1"
] | null | null | null | #!/usr/bin/python
from database_tables import DrawingHistory
from webserver_utils import verify_id
import cgi
import cgitb
import datetime
def createNew(title, creator, history, layers):
kwargs = {"date": datetime.datetime.now(),
"title": title,
"history_json": history,
... | 23.585366 | 64 | 0.677353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.135471 |
e64d35a8b39dc13cbd44e4267a4f6d20a1f20bd8 | 746 | py | Python | games/stock/environment.py | hkp1030/muzero-stock | d3acddf11afa523b81bbe1a626a50c95eb78c165 | [
"MIT"
] | 1 | 2022-01-21T21:15:49.000Z | 2022-01-21T21:15:49.000Z | games/stock/environment.py | hkp1030/muzero-stock | d3acddf11afa523b81bbe1a626a50c95eb78c165 | [
"MIT"
] | null | null | null | games/stock/environment.py | hkp1030/muzero-stock | d3acddf11afa523b81bbe1a626a50c95eb78c165 | [
"MIT"
] | 1 | 2022-01-21T21:30:37.000Z | 2022-01-21T21:30:37.000Z | class Environment:
PRICE_IDX = 4 # 종가의 위치
def __init__(self, chart_data=None, training_data=None):
self.chart_data = chart_data
self.training_data = training_data
self.observation = None
self.idx = -1
def reset(self):
self.observation = None
self.idx = -1
... | 24.866667 | 61 | 0.591153 | 755 | 0.998677 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.02381 |
e64d3c1360f948a0e4e91a1e5bc77802db0ff7e0 | 2,148 | py | Python | synthesis/paramGen/testcase2.py | hyunynim/DIST-Renderer | 4717ee8cea77f4f413b61f380a893c6800d0bde5 | [
"MIT"
] | 176 | 2020-06-11T19:16:33.000Z | 2022-03-29T01:38:28.000Z | synthesis/paramGen/testcase2.py | hyunynim/DIST-Renderer | 4717ee8cea77f4f413b61f380a893c6800d0bde5 | [
"MIT"
] | 6 | 2020-06-26T05:26:56.000Z | 2021-11-10T07:31:21.000Z | synthesis/paramGen/testcase2.py | hyunynim/DIST-Renderer | 4717ee8cea77f4f413b61f380a893c6800d0bde5 | [
"MIT"
] | 23 | 2020-06-11T21:43:03.000Z | 2022-02-18T00:16:16.000Z | '''
2019-08-07 00:01
Method:
20 x 5 grid over (camera x lighting)
'''
VIEW_NUM, LIGHTING_NUM = 20, 5
import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from src.param_decomposer import AllParams
def generate_params(shape_list, randomizer):
nowpath = os.path.dirname(os.path... | 39.777778 | 103 | 0.640596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 298 | 0.138734 |
e64e4471df6551917b2b1289cce293fbc929f162 | 12,219 | py | Python | daisy-world/dashdir/plotting.py | frossmann/addon_containers | de6dde175947b24bbfa35d94d44c9d9633a73226 | [
"BSD-3-Clause"
] | null | null | null | daisy-world/dashdir/plotting.py | frossmann/addon_containers | de6dde175947b24bbfa35d94d44c9d9633a73226 | [
"BSD-3-Clause"
] | null | null | null | daisy-world/dashdir/plotting.py | frossmann/addon_containers | de6dde175947b24bbfa35d94d44c9d9633a73226 | [
"BSD-3-Clause"
] | 2 | 2021-11-16T06:05:02.000Z | 2021-11-18T17:16:35.000Z | import plotly.graph_objects as go
import plotly.figure_factory as ff
import numpy as np
import calculations as calc
from plotly.subplots import make_subplots
def initialize_albedo_plot(T_min, T_opt):
# how does the growth curve of the Daisies look like?
gw = []
gb = []
# amount of intervals to plot
... | 30.022113 | 87 | 0.554301 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,644 | 0.298224 |
e64e9265798874238fe8da1d312e841fe0ab8876 | 36 | py | Python | opendart/config/__init__.py | JehunYoo/opendart | c88105baf85af57d006cc2404d192aaf9baf73cc | [
"MIT"
] | null | null | null | opendart/config/__init__.py | JehunYoo/opendart | c88105baf85af57d006cc2404d192aaf9baf73cc | [
"MIT"
] | 2 | 2021-07-12T10:59:20.000Z | 2021-07-13T02:06:27.000Z | opendart/config/__init__.py | JehunYoo/opendart | c88105baf85af57d006cc2404d192aaf9baf73cc | [
"MIT"
] | null | null | null | from opendart.config.config import * | 36 | 36 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e64ebb3be618b728917060906d4f5af8a1cfc287 | 10,720 | py | Python | NetworkScanners/libs/Pyssh/pyssh.py | isislovecruft/torflow | 666689ad18d358d764a35d041a7b16adb8d3287c | [
"BSD-3-Clause"
] | null | null | null | NetworkScanners/libs/Pyssh/pyssh.py | isislovecruft/torflow | 666689ad18d358d764a35d041a7b16adb8d3287c | [
"BSD-3-Clause"
] | 1 | 2018-12-18T15:58:40.000Z | 2018-12-26T16:52:51.000Z | NetworkScanners/libs/Pyssh/pyssh.py | isislovecruft/torflow | 666689ad18d358d764a35d041a7b16adb8d3287c | [
"BSD-3-Clause"
] | null | null | null | """A SSH Interface class.
An interface to ssh on posix systems, and plink (part of the Putty
suite) on Win32 systems.
By Rasjid Wilcox.
Copyright (c) 2002.
Version: 0.2
Last modified 4 September 2002.
Drawing on ideas from work by Julian Schaefer-Jasinski, Guido's telnetlib and
version 0.1 of pyssh (htt... | 33.395639 | 82 | 0.547201 | 6,942 | 0.647575 | 0 | 0 | 0 | 0 | 0 | 0 | 3,749 | 0.34972 |
e64ec15e4f7b983862625b28f909feef4c9e7bb4 | 3,894 | py | Python | pygacal/camera/__init__.py | ereide/pyga-camcal | fd25748ddb11c5b05ef24a2deca2689e0d899875 | [
"MIT"
] | 5 | 2018-05-22T09:11:31.000Z | 2022-03-11T02:32:01.000Z | pygacal/camera/__init__.py | ereide/pyga-camcal | fd25748ddb11c5b05ef24a2deca2689e0d899875 | [
"MIT"
] | null | null | null | pygacal/camera/__init__.py | ereide/pyga-camcal | fd25748ddb11c5b05ef24a2deca2689e0d899875 | [
"MIT"
] | null | null | null |
from clifford import g3c
import numpy as np
import scipy.optimize as opt
from pygacal.rotation.costfunction import restrictedImageCostFunction, restrictedMultiViewImageCostFunction
from pygacal.rotation import minimizeError
from pygacal.rotation.mapping import BivectorLineImageMapping, BivectorLineMapping, LineProper... | 34.460177 | 159 | 0.612994 | 3,024 | 0.776579 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.044171 |
e651cc7d2f10c7d86c7ce7b411ef45695942e02f | 1,320 | py | Python | tests/test_utils.py | SalemHarrache/dbcut | 0fd60e15f3b5532c5c531923d2e9ef08ce17c935 | [
"MIT"
] | 16 | 2019-11-22T16:36:56.000Z | 2022-03-12T01:49:03.000Z | tests/test_utils.py | SalemHarrache/dbcut | 0fd60e15f3b5532c5c531923d2e9ef08ce17c935 | [
"MIT"
] | 3 | 2019-11-23T06:11:30.000Z | 2020-06-23T13:34:04.000Z | tests/test_utils.py | SalemHarrache/dbcut | 0fd60e15f3b5532c5c531923d2e9ef08ce17c935 | [
"MIT"
] | 4 | 2019-11-22T20:42:57.000Z | 2022-02-23T09:10:00.000Z | import unittest
from collections import OrderedDict
from dbcut.utils import sorted_nested_dict
def test_simple_dict_is_sorted():
data = {
"c": 1,
"a": 2,
"b": 3,
}
expected = OrderedDict([("a", 2), ("b", 3), ("c", 1)])
assert expected == sorted_nested_dict(data)
def test_nes... | 22.372881 | 82 | 0.524242 | 26 | 0.019697 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.125758 |
e6543ff7671521504ac838b1689dbe9bfbccaca2 | 4,704 | py | Python | sprout/runner.py | tjduigna/sprout | d8762ce7e6f04bb082b8ca1e65f73d8900338d9d | [
"Apache-2.0"
] | null | null | null | sprout/runner.py | tjduigna/sprout | d8762ce7e6f04bb082b8ca1e65f73d8900338d9d | [
"Apache-2.0"
] | null | null | null | sprout/runner.py | tjduigna/sprout | d8762ce7e6f04bb082b8ca1e65f73d8900338d9d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019, Sprout Development Team
# Distributed under the terms of the Apache License 2.0
import os
import asyncio
import asyncpg
from tortoise import Tortoise
import sprout
class Runner(sprout.Log):
"""An object-oriented interface
to the sprout utilities.
Args:
... | 32.895105 | 67 | 0.577594 | 4,492 | 0.954932 | 0 | 0 | 0 | 0 | 1,714 | 0.364371 | 1,133 | 0.240859 |
e6546737a433ea44c0aabf656ba019b30d17d227 | 1,033 | py | Python | tests/test_service.py | beepscore/pi_gpio_service | 47aa9c6e4e378a168320d1f42b6d4c18c998e4db | [
"MIT"
] | 2 | 2018-10-16T18:22:04.000Z | 2021-05-04T21:09:53.000Z | tests/test_service.py | beepscore/pi_gpio_service | 47aa9c6e4e378a168320d1f42b6d4c18c998e4db | [
"MIT"
] | null | null | null | tests/test_service.py | beepscore/pi_gpio_service | 47aa9c6e4e378a168320d1f42b6d4c18c998e4db | [
"MIT"
] | null | null | null | #!/usr/bin/env/python3
import unittest
from pi_gpio_service import service
class TestPiGpioService(unittest.TestCase):
def test_input_pins(self):
pins = {
'23': {'name': 'IN_23', 'pin_direction': 'input'},
'24': {'name': 'OUT_24', 'pin_direction': 'output'},
'25': {'... | 30.382353 | 77 | 0.535334 | 954 | 0.923524 | 0 | 0 | 0 | 0 | 0 | 0 | 433 | 0.419167 |
e654e957c98bffeffb8209db916fbae89bbb1792 | 2,726 | py | Python | sangam_poem_csv.py | naturalstupid/sangam_tamil_bot | 2b8117504f10ce4b4bdc2fa8160951374c9d1516 | [
"MIT"
] | null | null | null | sangam_poem_csv.py | naturalstupid/sangam_tamil_bot | 2b8117504f10ce4b4bdc2fa8160951374c9d1516 | [
"MIT"
] | null | null | null | sangam_poem_csv.py | naturalstupid/sangam_tamil_bot | 2b8117504f10ce4b4bdc2fa8160951374c9d1516 | [
"MIT"
] | null | null | null | import string
import regex
import pandas as pd
from pandas.tests.io.parser import index_col
sangam_text_folder = "./sangam_tamil_text/"
sangam_poem_folder = "./sangam_tamil_poems/"
sangam_csv_folder = "./sangam_tamil_csv/"
data_files = ['agananuru','purananuru','ainkurunuru','kalithokai', 'kurunthokai', 'natrinai', 'p... | 69.897436 | 128 | 0.655906 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,103 | 0.627761 |
e65ac754450ace4ed72f64034c033bc64885d270 | 4,026 | py | Python | backend/src/chat/api/views.py | CSCapstone2019/WebDoctor | cda9e4e2bd2c4e22dc4a4aa9c0758e67cdee62d5 | [
"MIT"
] | 4 | 2019-09-13T14:50:22.000Z | 2019-11-27T03:19:44.000Z | backend/src/chat/api/views.py | CSCapstone2019/WebDoctor | cda9e4e2bd2c4e22dc4a4aa9c0758e67cdee62d5 | [
"MIT"
] | 8 | 2019-09-15T23:02:21.000Z | 2022-02-10T09:26:10.000Z | backend/src/chat/api/views.py | CSCapstone2019/WebDoctor | cda9e4e2bd2c4e22dc4a4aa9c0758e67cdee62d5 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.shortcuts import get_object_or_404
from rest_framework import permissions
from rest_framework import viewsets
from django.views.decorators.csrf import csrf_exempt
from django.core.files.storage import FileSystemStorage
from rest_framework.generics import (
... | 29.822222 | 80 | 0.748634 | 3,281 | 0.814953 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.011923 |
e65bcafb9495c37c2cdeefdfa42cd99132b78632 | 6,256 | py | Python | flask_opa.py | hirosh7/flask-opa | a090083ce62944d1085a6923572ed9c68f0dbfa3 | [
"MIT"
] | 34 | 2018-10-16T03:12:44.000Z | 2022-02-21T09:53:13.000Z | flask_opa.py | hirosh7/flask-opa | a090083ce62944d1085a6923572ed9c68f0dbfa3 | [
"MIT"
] | 12 | 2018-10-17T00:41:27.000Z | 2021-03-16T12:58:33.000Z | flask_opa.py | hirosh7/flask-opa | a090083ce62944d1085a6923572ed9c68f0dbfa3 | [
"MIT"
] | 8 | 2019-05-28T19:54:41.000Z | 2022-02-23T13:19:33.000Z | """
Flask Extension for OPA
"""
import requests
from flask.app import Flask
__version__ = "1.0.0"
class OPAException(Exception):
"""Exception evaluating a request in OPA"""
def __init__(self, message):
super().__init__(message)
class OPAUnexpectedException(OPAException):
"""Unexpected error ev... | 30.076923 | 78 | 0.605499 | 6,139 | 0.981298 | 0 | 0 | 972 | 0.155371 | 0 | 0 | 557 | 0.089035 |
e65e9051029543698ac667d8972b05b6ac01763f | 8,920 | py | Python | model.py | Schrodinger1926/Project-3 | 88f8a1411a712a8ba62036e400ebce9e6df8e40f | [
"MIT"
] | null | null | null | model.py | Schrodinger1926/Project-3 | 88f8a1411a712a8ba62036e400ebce9e6df8e40f | [
"MIT"
] | null | null | null | model.py | Schrodinger1926/Project-3 | 88f8a1411a712a8ba62036e400ebce9e6df8e40f | [
"MIT"
] | null | null | null | import sys
import os
import csv
from random import shuffle
import cv2
import numpy as np
import matplotlib.pyplot as plt
import sklearn
from sklearn.model_selection import train_test_split
from keras.models import Sequential
from keras.layers import Flatten,\
Dense,\
... | 27.875 | 118 | 0.638453 | 0 | 0 | 1,030 | 0.115471 | 0 | 0 | 0 | 0 | 3,711 | 0.416031 |
e65f8dcc762ad6c2b71e1c9a7964a20b18c50603 | 3,807 | py | Python | enlarge_form/enlarge_form.py | lester-lees/extra_addons_sz | cddaf972cf4ea64c553bcff0006eb006a115d5ee | [
"Apache-2.0"
] | null | null | null | enlarge_form/enlarge_form.py | lester-lees/extra_addons_sz | cddaf972cf4ea64c553bcff0006eb006a115d5ee | [
"Apache-2.0"
] | null | null | null | enlarge_form/enlarge_form.py | lester-lees/extra_addons_sz | cddaf972cf4ea64c553bcff0006eb006a115d5ee | [
"Apache-2.0"
] | null | null | null | #! -*- encoding: utf-8 -*-
from openerp import addons
from openerp.osv import fields, osv, orm
from openerp import tools
from openerp.tools.translate import _
class ir_ui_view(orm.Model):
_inherit = 'ir.ui.view'
_columns={
'enlarge_form' : fields.boolean('Use full width of the screen?' ,help='Set to... | 34.297297 | 186 | 0.504334 | 3,645 | 0.957447 | 0 | 0 | 0 | 0 | 0 | 0 | 1,030 | 0.270554 |
e65fe6b2cc9e13aae056f4e22435bebdff299fe1 | 1,148 | py | Python | tests/test_app.py | betasewer/machaon | 63ccb4405ac693f14f9d25f6a706466a917dddbf | [
"MIT"
] | 2 | 2020-07-05T08:39:12.000Z | 2022-01-19T22:08:21.000Z | tests/test_app.py | betasewer/machaon | 63ccb4405ac693f14f9d25f6a706466a917dddbf | [
"MIT"
] | 23 | 2020-06-23T16:18:17.000Z | 2021-12-29T09:56:48.000Z | tests/test_app.py | betasewer/machaon | 63ccb4405ac693f14f9d25f6a706466a917dddbf | [
"MIT"
] | null | null | null | from machaon.app import AppRoot, deploy_directory, transfer_deployed_directory
from machaon.process import Spirit, TempSpirit
from machaon.types.shell import Path
def test_deploy(tmpdir):
deploydir = tmpdir.mkdir("deploy")
deploy_directory(Path(deploydir))
assert deploydir.join("machaon").check()
ass... | 39.586207 | 87 | 0.715157 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.222125 |
e66034257961b772951c35834b998bf6cf78de31 | 74 | py | Python | 02 Algorithm Reference/06 Securities and Portfolio/01 Securities and Portfolio Classes/03 code.py | Jay-Jay-D/Documentation | c4894e5ac20355ec82ee0db19618ad7f17bf8592 | [
"Apache-2.0"
] | null | null | null | 02 Algorithm Reference/06 Securities and Portfolio/01 Securities and Portfolio Classes/03 code.py | Jay-Jay-D/Documentation | c4894e5ac20355ec82ee0db19618ad7f17bf8592 | [
"Apache-2.0"
] | null | null | null | 02 Algorithm Reference/06 Securities and Portfolio/01 Securities and Portfolio Classes/03 code.py | Jay-Jay-D/Documentation | c4894e5ac20355ec82ee0db19618ad7f17bf8592 | [
"Apache-2.0"
] | null | null | null | #Securities array access to Security Objects:
self.Securities["IBM"].Price | 37 | 45 | 0.810811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.675676 |
e66228a86c2396ec8a63b8d48e9ca8a5edd9c594 | 502 | py | Python | migrations/versions/1d09e9261d5_.py | mainulhossain/biowl | 039adc96539fae25843b1fc36074a4e5e55830ec | [
"MIT"
] | null | null | null | migrations/versions/1d09e9261d5_.py | mainulhossain/biowl | 039adc96539fae25843b1fc36074a4e5e55830ec | [
"MIT"
] | null | null | null | migrations/versions/1d09e9261d5_.py | mainulhossain/biowl | 039adc96539fae25843b1fc36074a4e5e55830ec | [
"MIT"
] | 1 | 2020-01-05T10:47:21.000Z | 2020-01-05T10:47:21.000Z | """empty message
Revision ID: 1d09e9261d5
Revises: 40d93619b7d
Create Date: 2016-12-16 11:38:41.336859
"""
# revision identifiers, used by Alembic.
revision = '1d09e9261d5'
down_revision = '40d93619b7d'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | 18.592593 | 63 | 0.687251 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 348 | 0.693227 |
e6622feade344255592fd9a7d47d6b9f1bd055ff | 5,732 | py | Python | hops/xattr.py | robzor92/hops-util-py | 88540a0c2b4e366fe6d2acb0441cea9378150c01 | [
"Apache-2.0"
] | 24 | 2018-09-20T17:56:43.000Z | 2021-11-11T23:34:43.000Z | hops/xattr.py | robzor92/hops-util-py | 88540a0c2b4e366fe6d2acb0441cea9378150c01 | [
"Apache-2.0"
] | 39 | 2018-10-04T15:19:07.000Z | 2021-12-23T10:50:33.000Z | hops/xattr.py | robzor92/hops-util-py | 88540a0c2b4e366fe6d2acb0441cea9378150c01 | [
"Apache-2.0"
] | 23 | 2018-09-18T07:51:56.000Z | 2021-08-10T12:10:27.000Z | """
API for attaching, detaching, and reading extended metadata to HopsFS files/directories.
It uses the Hopsworks /xattrs REST API
"""
from hops import constants, util, hdfs
from hops.exceptions import RestAPIError
import urllib
def set_xattr(hdfs_path, xattr_name, value):
"""
Attach an extended attribute to... | 53.074074 | 116 | 0.694348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,442 | 0.25157 |
e66279995933e8ecb67f6f34946455046a6bef43 | 96 | py | Python | protonn/vis/__init__.py | protoNN-ai/protoNN | 812fd524a8c2de49612bbb1fc991c503fe3f1202 | [
"Apache-2.0"
] | 3 | 2018-06-20T08:37:13.000Z | 2019-02-21T00:14:47.000Z | protonn/vis/__init__.py | protoNN-ai/protoNN | 812fd524a8c2de49612bbb1fc991c503fe3f1202 | [
"Apache-2.0"
] | null | null | null | protonn/vis/__init__.py | protoNN-ai/protoNN | 812fd524a8c2de49612bbb1fc991c503fe3f1202 | [
"Apache-2.0"
] | null | null | null | from .vis import df_from_file, df_from_dir, filter_by, PivotTable
from .lines import plot_lines
| 32 | 65 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e663a08bf8bd9abb5a531e95d22eb32be3364bee | 2,173 | py | Python | slidingWindow/smallestSubarrayWithGivenSum.py | YasinEhsan/interview-prep | ed9f95af5a37b05304e45b41511068b6f72533e7 | [
"Apache-2.0"
] | 11 | 2019-05-02T22:27:01.000Z | 2020-10-30T08:43:02.000Z | slidingWindow/smallestSubarrayWithGivenSum.py | YasinEhsan/interview-prep | ed9f95af5a37b05304e45b41511068b6f72533e7 | [
"Apache-2.0"
] | null | null | null | slidingWindow/smallestSubarrayWithGivenSum.py | YasinEhsan/interview-prep | ed9f95af5a37b05304e45b41511068b6f72533e7 | [
"Apache-2.0"
] | 3 | 2019-11-01T01:35:01.000Z | 2020-01-11T18:00:39.000Z | # 5 27 20
def smallest_subarray_with_given_sum(s, arr):
# TODO: Write your code here
windowStart, minLen, currSum = 0,100,0
for windowEnd in range(len(arr)):
currSum += arr[windowEnd]
while currSum >= s:
minLen = min(minLen, windowEnd - windowStart +1)
currSum -= arr[windowStart]
win... | 23.879121 | 196 | 0.658997 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 680 | 0.311784 |
e666c5e9e0189a92959abe01ef942dcddf54c96d | 16,028 | py | Python | build/build.py | lukas-ke/faint-graphics-editor | 33eb9e6a3f2216fb2cf6ef9709a14f3d20b78fbf | [
"Apache-2.0"
] | 10 | 2016-12-28T22:06:31.000Z | 2021-05-24T13:42:30.000Z | build/build.py | lukas-ke/faint-graphics-editor | 33eb9e6a3f2216fb2cf6ef9709a14f3d20b78fbf | [
"Apache-2.0"
] | 4 | 2015-10-09T23:55:10.000Z | 2020-04-04T08:09:22.000Z | build/build.py | lukas-ke/faint-graphics-editor | 33eb9e6a3f2216fb2cf6ef9709a14f3d20b78fbf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2014 Lukas Kemmer
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You
# may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 31.12233 | 109 | 0.630334 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,257 | 0.203207 |
e6671dd4f2c0b71c8a3b385713a43ac751148356 | 2,119 | py | Python | printAlternatively.py | kamwithak/competitiveProgramming | ab4433568081900212a8a987d7bf8cb78d2698d1 | [
"MIT"
] | null | null | null | printAlternatively.py | kamwithak/competitiveProgramming | ab4433568081900212a8a987d7bf8cb78d2698d1 | [
"MIT"
] | 1 | 2020-07-19T15:40:25.000Z | 2020-07-19T15:40:25.000Z | printAlternatively.py | kamwithak/competitiveProgramming | ab4433568081900212a8a987d7bf8cb78d2698d1 | [
"MIT"
] | null | null | null | class Solution():
def __init__(self, A, B):
self.A = A
self.B = B
def printAlternativelySameSize(self):
"""
Assumes that len(self.A) == len(self.B) != 0
Alternatively print each element in the two Lists
"""
if (len(self.A) != len(self.B)):
raise Exception("the two lists must be of same ... | 21.40404 | 77 | 0.547428 | 1,789 | 0.844266 | 0 | 0 | 0 | 0 | 0 | 0 | 440 | 0.207645 |
e667758e13389c3d1155786a731f2598edf57be3 | 981 | py | Python | test/test_theaigame_bot.py | gnmerritt/poker | 5e7241efac1b0757f39c28f6d485f4d79960095b | [
"MIT"
] | 5 | 2015-04-09T02:45:12.000Z | 2018-06-27T05:34:41.000Z | test/test_theaigame_bot.py | gnmerritt/poker | 5e7241efac1b0757f39c28f6d485f4d79960095b | [
"MIT"
] | null | null | null | test/test_theaigame_bot.py | gnmerritt/poker | 5e7241efac1b0757f39c28f6d485f4d79960095b | [
"MIT"
] | 2 | 2017-09-19T04:49:07.000Z | 2018-12-09T19:58:18.000Z | import unittest
from pokeher.theaigame_bot import TheAiGameBot
class QuietBot(TheAiGameBot):
def log(self, msg):
pass
class TheAiGameBotTest(unittest.TestCase):
"""Test that the bot class is instantiated properly and has all the methods
that it's supposed to"""
def setUp(self):
self.bo... | 31.645161 | 79 | 0.670744 | 914 | 0.931702 | 0 | 0 | 0 | 0 | 0 | 0 | 245 | 0.249745 |
e66883315cccecf4d95a549214dcc1704e5e4e46 | 429 | py | Python | tests/test_exp.py | SiddeshSambasivam/MatterIx | e9d3bc54c4f5793cc1262c89c7cb9d5a9dd99139 | [
"MIT"
] | 9 | 2020-07-25T12:00:30.000Z | 2021-07-07T09:30:57.000Z | tests/test_exp.py | SiddeshSambasivam/MatterIx | e9d3bc54c4f5793cc1262c89c7cb9d5a9dd99139 | [
"MIT"
] | null | null | null | tests/test_exp.py | SiddeshSambasivam/MatterIx | e9d3bc54c4f5793cc1262c89c7cb9d5a9dd99139 | [
"MIT"
] | null | null | null | import unittest
from matterix import Tensor
import numpy as np
class TestTensorExponents(unittest.TestCase):
def test_simple_exp(self):
an = np.random.randint(0, 10, (10, 10))
at = Tensor(an, requires_grad=True)
result = at * at
result.backward(gradient=Tensor.ones_like(result))
... | 25.235294 | 58 | 0.638695 | 363 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e6691884e90ad61e89f19cad4d887cbd1d5007c5 | 2,161 | py | Python | tests/scripts/run_lookups.py | abelard2008/overlog | 8df2bb95d2e39e41dd8e30249da6bb8a1615f39f | [
"BSD-3-Clause"
] | 3 | 2016-01-26T22:19:12.000Z | 2019-07-10T02:12:38.000Z | tests/scripts/run_lookups.py | abelard2008/overlog | 8df2bb95d2e39e41dd8e30249da6bb8a1615f39f | [
"BSD-3-Clause"
] | null | null | null | tests/scripts/run_lookups.py | abelard2008/overlog | 8df2bb95d2e39e41dd8e30249da6bb8a1615f39f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
# -*- Mode: python -*-
#
# DESCRIPTION: Setup and run n chord nodes.
#
#
import getopt
import os
import sys
import time
import random
import signal
import threading
def print_usage():
print
print "Usage: run_lookups -p <port> [-t <sleep_time>] [-v <vantages>] [-s <seed>] lookup_exec outp... | 30.43662 | 126 | 0.529847 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 542 | 0.25081 |
e6692d7fe75e939ec528720c041175b24637e974 | 1,722 | py | Python | src/tests/test_task_2_4.py | Python-course/Python-course | 59de0ef9928aeaa5dd185ceaafa334eb8e719217 | [
"MIT"
] | null | null | null | src/tests/test_task_2_4.py | Python-course/Python-course | 59de0ef9928aeaa5dd185ceaafa334eb8e719217 | [
"MIT"
] | null | null | null | src/tests/test_task_2_4.py | Python-course/Python-course | 59de0ef9928aeaa5dd185ceaafa334eb8e719217 | [
"MIT"
] | null | null | null | """
Тесты для задания 2.4.
"""
from unittest import TestCase, main
from fractions import Fraction
from tasks import task_2_4
class TestFractionFromString(TestCase):
def test_fraction_from_string__CorrectArguments__ShouldReturnCorrectResult(self):
"""
Проверяет работу с корректными данными.
... | 28.7 | 103 | 0.577236 | 1,665 | 0.89372 | 0 | 0 | 0 | 0 | 0 | 0 | 537 | 0.288245 |
e6693d31028174fac6a03f7991d1cc9f5830e4f5 | 1,007 | py | Python | aioweb_auth/helpers.py | kreopt/aioweb_auth | e6a982296b52fc2068dd09afb0827dab527ef9b7 | [
"MIT"
] | null | null | null | aioweb_auth/helpers.py | kreopt/aioweb_auth | e6a982296b52fc2068dd09afb0827dab527ef9b7 | [
"MIT"
] | null | null | null | aioweb_auth/helpers.py | kreopt/aioweb_auth | e6a982296b52fc2068dd09afb0827dab527ef9b7 | [
"MIT"
] | null | null | null | from aiohttp import web
from aiohttp_security import authorized_userid
from aioweb.conf import settings
async def redirect_authenticated(request):
user_id = await authorized_userid(request)
if user_id and not request.is_ajax():
redirect_url = request.query.get('redirect_to')
if not redirect_ur... | 34.724138 | 70 | 0.725919 | 0 | 0 | 0 | 0 | 0 | 0 | 613 | 0.608739 | 64 | 0.063555 |
e669828a1fd8d946f628655596de52579956c2b4 | 442 | py | Python | Leetcode/560-Subarray_Sum.py | EdwaRen/Competitve-Programming | e8bffeb457936d28c75ecfefb5a1f316c15a9b6c | [
"MIT"
] | 1 | 2021-05-03T21:48:25.000Z | 2021-05-03T21:48:25.000Z | Leetcode/560-Subarray_Sum.py | EdwaRen/Competitve_Programming | e8bffeb457936d28c75ecfefb5a1f316c15a9b6c | [
"MIT"
] | null | null | null | Leetcode/560-Subarray_Sum.py | EdwaRen/Competitve_Programming | e8bffeb457936d28c75ecfefb5a1f316c15a9b6c | [
"MIT"
] | null | null | null | class Solution(object):
def subarraySum(self, nums, k):
sum = 0
res = 0
sum_history = {0:1}
for i in nums:
sum+=i
if sum - k in sum_history:
res+=sum_history[sum-k]
if sum in sum_history:
sum_history[sum]+=1
... | 22.1 | 39 | 0.466063 | 387 | 0.875566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c6fd9ed01bdcac2a90cc2cff054eefd30d07deb0 | 3,901 | py | Python | functions/aou/tests/upload_test_files.py | broadinstitute/wfl | 1e5691100330a9afa0270fb4bab0a7d0a7d3bdc2 | [
"BSD-3-Clause"
] | 15 | 2020-03-04T17:30:25.000Z | 2022-03-09T14:57:26.000Z | functions/aou/tests/upload_test_files.py | broadinstitute/wfl | 1e5691100330a9afa0270fb4bab0a7d0a7d3bdc2 | [
"BSD-3-Clause"
] | 184 | 2020-03-06T20:55:15.000Z | 2022-03-15T18:24:57.000Z | functions/aou/tests/upload_test_files.py | broadinstitute/wfl | 1e5691100330a9afa0270fb4bab0a7d0a7d3bdc2 | [
"BSD-3-Clause"
] | 2 | 2020-07-08T19:16:26.000Z | 2020-07-10T18:47:30.000Z | """ Helper script that copies all of the files for an arrays sample into the dev aou input bucket. This will trigger
the submit_aou_workload cloud function for each file. When all files have been uploaded, it will launch an arrays
workflow via the workflow launcher (but only if a workflow with that chipwell barcode & a... | 47.573171 | 141 | 0.681364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,325 | 0.596001 |
c6fe87b224a7fdc40686930d3055375689c20f4c | 2,019 | py | Python | warp_gui.py | maciejczechowski/CarND-Advanced-Lane-Lines | 058a17a2ac1e0ee4c1e8fa2fc5222cb7d2eaa230 | [
"MIT"
] | null | null | null | warp_gui.py | maciejczechowski/CarND-Advanced-Lane-Lines | 058a17a2ac1e0ee4c1e8fa2fc5222cb7d2eaa230 | [
"MIT"
] | null | null | null | warp_gui.py | maciejczechowski/CarND-Advanced-Lane-Lines | 058a17a2ac1e0ee4c1e8fa2fc5222cb7d2eaa230 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
from src import lane_finder as lf
from src import parameters
import argparse
class WarpFinder:
def __init__(self, image, horizon = 400, x1 = 500):
self.image1 = image
self._horizon = horizon
self._x1 = x1
def onChangeHorizon(pos):
self._ho... | 25.884615 | 103 | 0.602278 | 1,630 | 0.80733 | 0 | 0 | 0 | 0 | 0 | 0 | 445 | 0.220406 |
05007036c73f4b4b153318ac832ce22662ff0e07 | 2,041 | py | Python | election_data/uc_santa_barbara/2017/src_data/parser/ElectionBallotParser.py | dkupsh/stvote | dbe906681a171c5654341b93dc0fb5b0208cfd33 | [
"MIT"
] | null | null | null | election_data/uc_santa_barbara/2017/src_data/parser/ElectionBallotParser.py | dkupsh/stvote | dbe906681a171c5654341b93dc0fb5b0208cfd33 | [
"MIT"
] | null | null | null | election_data/uc_santa_barbara/2017/src_data/parser/ElectionBallotParser.py | dkupsh/stvote | dbe906681a171c5654341b93dc0fb5b0208cfd33 | [
"MIT"
] | null | null | null | ###############
# Ballot Parser for UC Berkeley Results
#
# This ballot parser has been tailored to the ballot
# system used by UCB. If you use another software
# to define ballots, ensure the data returned by the
# ballot parser returns data in the following fashion:
#
# [
# {
# "ballot_id": "unique_ballot_i... | 26.166667 | 82 | 0.526213 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,457 | 0.713866 |
05018611063b1ec5bb0bc5adba5e6965095d97d4 | 5,971 | py | Python | deco/__init__.py | patdex/deco | 83141719b3b68fb1e99b43384a25288aea5c3e8c | [
"MIT"
] | null | null | null | deco/__init__.py | patdex/deco | 83141719b3b68fb1e99b43384a25288aea5c3e8c | [
"MIT"
] | null | null | null | deco/__init__.py | patdex/deco | 83141719b3b68fb1e99b43384a25288aea5c3e8c | [
"MIT"
] | null | null | null | import collections
import inspect
import time
import re
# module config:
disable_tracing = False
indent = True
# indentation for log output
_log_indent = dict()
def indent_str(cnt, end=False):
"""
indent string
:param cnt: indentation count
:param end: close actual indentation?
:return:
""... | 26.420354 | 117 | 0.601574 | 2,856 | 0.478312 | 0 | 0 | 684 | 0.114554 | 0 | 0 | 1,671 | 0.279853 |
0501d436e365fc40c731e765ab901eb50645cb02 | 1,489 | py | Python | main.py | ytyaru/Hatena.WebSite.Login.201703040757 | 11ffc5549398478146a9966189e06cf535b34092 | [
"CC0-1.0"
] | null | null | null | main.py | ytyaru/Hatena.WebSite.Login.201703040757 | 11ffc5549398478146a9966189e06cf535b34092 | [
"CC0-1.0"
] | null | null | null | main.py | ytyaru/Hatena.WebSite.Login.201703040757 | 11ffc5549398478146a9966189e06cf535b34092 | [
"CC0-1.0"
] | null | null | null | #!python3
#encoding:utf-8
from urllib.request import build_opener, HTTPCookieProcessor
from urllib.parse import urlencode
from http.cookiejar import CookieJar
import pprint
import dataset
class HatenaSite(object):
def __init__(self, path_hatena_accounts_sqlite3):
self.path_hatena_accounts_sqlite3 = path_ha... | 33.088889 | 110 | 0.646071 | 1,151 | 0.746918 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.214147 |
05031a4fb3f43f4e15927e78ef77f8dcad229be0 | 767 | py | Python | csf_tz/fleet_management/doctype/vehicle/vehicle.py | Craftint/CSF_TZ | b5cb2d59d8f4e958ad7d4cb89421cfbec992abc5 | [
"MIT"
] | 4 | 2021-09-24T12:30:32.000Z | 2022-03-19T14:55:34.000Z | csf_tz/fleet_management/doctype/vehicle/vehicle.py | Craftint/CSF_TZ | b5cb2d59d8f4e958ad7d4cb89421cfbec992abc5 | [
"MIT"
] | null | null | null | csf_tz/fleet_management/doctype/vehicle/vehicle.py | Craftint/CSF_TZ | b5cb2d59d8f4e958ad7d4cb89421cfbec992abc5 | [
"MIT"
] | 7 | 2021-09-24T12:30:33.000Z | 2022-03-21T11:34:02.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Bravo Logistics and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class Vehicle(Document):
pass
@frappe.whitelist(allow_guest=True)
def change_status(**a... | 25.566667 | 62 | 0.741851 | 30 | 0.039113 | 0 | 0 | 499 | 0.650587 | 0 | 0 | 230 | 0.29987 |
05067ca48cd1bf1cfe7a6e17e6b2e4d00c579d5b | 3,780 | py | Python | app/mysql2json.py | ToHanwei/CORD | 09f75b136431222ec945b2ddd6798ae805ec332e | [
"MIT"
] | null | null | null | app/mysql2json.py | ToHanwei/CORD | 09f75b136431222ec945b2ddd6798ae805ec332e | [
"MIT"
] | null | null | null | app/mysql2json.py | ToHanwei/CORD | 09f75b136431222ec945b2ddd6798ae805ec332e | [
"MIT"
] | null | null | null | #!coding:utf-8
import json
import pymysql
import pandas as pd
class ReadJson():
def __init__(self, host, user, passwd, db, table, sort=None, _filter=None):
self.host =host
self.user =user
self.passwd = passwd
self.db = db
self.table = table
self.sort = sort
... | 30.983607 | 100 | 0.552381 | 3,704 | 0.979894 | 0 | 0 | 0 | 0 | 0 | 0 | 552 | 0.146032 |
0506e61a9ace0c2d5bc6f23b2cc7e615718656a8 | 3,583 | py | Python | dict2xml.py | lucasicf/dict2xml | 7421414c71e1d95a4d60e84f942379edb4df2df5 | [
"BSD-3-Clause"
] | 12 | 2015-07-12T20:07:10.000Z | 2022-02-10T05:16:14.000Z | dict2xml.py | lucasicf/dict2xml | 7421414c71e1d95a4d60e84f942379edb4df2df5 | [
"BSD-3-Clause"
] | null | null | null | dict2xml.py | lucasicf/dict2xml | 7421414c71e1d95a4d60e84f942379edb4df2df5 | [
"BSD-3-Clause"
] | 7 | 2015-05-21T09:39:52.000Z | 2021-02-28T22:01:15.000Z | # -*- coding: utf-8 -*-
from xml.dom import minidom
import re
# Thrown on any dictionary error
class Dict2XMLException(Exception):
pass
def _dict_sort_key(key_value):
key = key_value[0]
match = re.match('(\d+)__.*', key)
return match and int(match.groups()[0]) or key
_iter_dict_sorted = lambda dic: ... | 34.786408 | 88 | 0.6542 | 44 | 0.01228 | 0 | 0 | 0 | 0 | 0 | 0 | 700 | 0.195367 |
05071a1ee7761ffc57199c77291dcea3601a853d | 1,247 | py | Python | 06_rotation_transformation.py | Mathanraj-Sharma/OpenCV_Sample_Codes | a20710fa05d7817b9c4c78acc64b852b0cde7583 | [
"Apache-2.0"
] | 1 | 2019-11-23T06:52:58.000Z | 2019-11-23T06:52:58.000Z | 06_rotation_transformation.py | Mathanraj-Sharma/OpenCV_Sample_Codes | a20710fa05d7817b9c4c78acc64b852b0cde7583 | [
"Apache-2.0"
] | null | null | null | 06_rotation_transformation.py | Mathanraj-Sharma/OpenCV_Sample_Codes | a20710fa05d7817b9c4c78acc64b852b0cde7583 | [
"Apache-2.0"
] | 1 | 2019-11-23T11:18:37.000Z | 2019-11-23T11:18:37.000Z | import cv2
import argparse
import numpy as np
ap = argparse.ArgumentParser()
ap.add_argument('-i', required = True, help = 'Enter the path of Image')
args = vars(ap.parse_args())
image = cv2.imread(args['i'])
def wheel(image, center):
i = 1
while (True):
if i > 359:
cv2.imshow('Wheel', image)
cv2.waitKey(... | 22.267857 | 75 | 0.690457 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 397 | 0.318364 |
0507429bfe72a62ce8131002bc3538a2af143672 | 3,972 | py | Python | feichangzun/directGetFlightData.py | Octoberr/weizhuangIP | d37e82df35d0b8b84bfa38f3a487fd81ab969070 | [
"Apache-2.0"
] | null | null | null | feichangzun/directGetFlightData.py | Octoberr/weizhuangIP | d37e82df35d0b8b84bfa38f3a487fd81ab969070 | [
"Apache-2.0"
] | null | null | null | feichangzun/directGetFlightData.py | Octoberr/weizhuangIP | d37e82df35d0b8b84bfa38f3a487fd81ab969070 | [
"Apache-2.0"
] | null | null | null | import getflightdata
import requests
from bs4 import BeautifulSoup
import random
import json
import pymongo
import datetime
from Utils.config import config
# import config
mongoConf = config['mongo']
feichangzun = 'http://www.variflight.com/flight/fnum/'
feichangzunhouzui = '.html?AE71649A58c77&fdate='
def get_h... | 34.842105 | 108 | 0.629909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,132 | 0.284995 |
0507ce8c6b29b5cd6c3e947a8e5f6cea05343e0b | 2,402 | py | Python | face/face-30sec.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 28 | 2018-08-09T13:10:34.000Z | 2022-01-07T13:39:31.000Z | face/face-30sec.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 4 | 2018-08-09T13:18:12.000Z | 2021-04-06T19:04:54.000Z | face/face-30sec.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 15 | 2018-12-17T09:17:28.000Z | 2021-03-02T11:25:05.000Z | import numpy as np
import cv2
import face_recognition
import time
# Load a sample picture and learn how to recognize it.
me_image = face_recognition.load_image_file("known/joakim.png")
me_face_encoding = face_recognition.face_encodings(me_image)[0]
known_face_encodings = [
me_face_encoding,
]
known_face_names = [... | 32.459459 | 89 | 0.651957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 528 | 0.219817 |
0509cd66d3399c704328d6c31b4db43646200a86 | 8,576 | py | Python | sdtables/sdtables.py | cunningr/sdtables | a698acbeca30e5451ca3285292f089109b360a04 | [
"MIT"
] | null | null | null | sdtables/sdtables.py | cunningr/sdtables | a698acbeca30e5451ca3285292f089109b360a04 | [
"MIT"
] | 1 | 2020-06-25T08:55:00.000Z | 2021-03-22T12:54:48.000Z | sdtables/sdtables.py | cunningr/sdtables | a698acbeca30e5451ca3285292f089109b360a04 | [
"MIT"
] | 1 | 2020-07-03T10:18:58.000Z | 2020-07-03T10:18:58.000Z | # coding: utf-8
"""
xlTables - Load/generate table data with Excel
from python dictionary structures
cunningr - 2020
Requires openpyxl >= 2.6.2, jsonschema
"""
import os
import openpyxl
from openpyxl import Workbook
from sdtables import xlTables
from tabulate import tabulate
class SdTables:
... | 40.262911 | 160 | 0.649021 | 8,135 | 0.948577 | 0 | 0 | 0 | 0 | 0 | 0 | 2,693 | 0.314016 |
050a2b44b8dd6b46945c916a81b519efe47b76fb | 2,473 | py | Python | solutions/dropbox/compare_functions.py | roman-kachanovsky/checkio | 3134cbc04ed56e92006d1e2f09d7365e900953db | [
"BSD-3-Clause"
] | 1 | 2017-02-07T19:50:52.000Z | 2017-02-07T19:50:52.000Z | solutions/dropbox/compare_functions.py | roman-kachanovsky/checkio-python | 3134cbc04ed56e92006d1e2f09d7365e900953db | [
"BSD-3-Clause"
] | null | null | null | solutions/dropbox/compare_functions.py | roman-kachanovsky/checkio-python | 3134cbc04ed56e92006d1e2f09d7365e900953db | [
"BSD-3-Clause"
] | null | null | null | """ --- Compare Functions --- Simple
Two functions f and g are provided as inputs to checkio.
The first function f is the primary function and the second
function g is the backup. Use your coding skills to return
a third function h which returns the same output as f unless
f raises an exception or returns None. In thi... | 32.973333 | 78 | 0.595633 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,361 | 0.550344 |
050b0bea353171a3c51a6088825350acb0d9291f | 3,402 | py | Python | yawndb/sync.py | selectel/python-yawndb | 6d1c7d4b16a5cb5ef96496a22a3afb0bae7f2bb6 | [
"MIT"
] | null | null | null | yawndb/sync.py | selectel/python-yawndb | 6d1c7d4b16a5cb5ef96496a22a3afb0bae7f2bb6 | [
"MIT"
] | null | null | null | yawndb/sync.py | selectel/python-yawndb | 6d1c7d4b16a5cb5ef96496a22a3afb0bae7f2bb6 | [
"MIT"
] | null | null | null | """
yawndb.sync
~~~~~~~~~~~
Sync YAWNDB transport. Use standart socket object methods.
"""
import time
import json
import socket
import urllib2
import logging
from collections import deque
from yawndb._base import _YAWNDBBase
_logger = logging.getLogger(__name__)
class YAWNDB(_YAWNDBBase):
"""Syn... | 29.076923 | 79 | 0.546149 | 3,118 | 0.91652 | 0 | 0 | 0 | 0 | 0 | 0 | 711 | 0.208995 |
050b23d1c21cc11db93c4c94dba0b845a1f1693e | 1,209 | py | Python | setup.py | ofek/depq | 370e3ad503d3e9cedc3c49dc64add393ba945764 | [
"MIT"
] | 1 | 2019-02-12T13:17:56.000Z | 2019-02-12T13:17:56.000Z | setup.py | ofek/depq | 370e3ad503d3e9cedc3c49dc64add393ba945764 | [
"MIT"
] | 4 | 2016-12-10T20:17:38.000Z | 2017-06-16T19:02:47.000Z | setup.py | ofek/depq | 370e3ad503d3e9cedc3c49dc64add393ba945764 | [
"MIT"
] | 5 | 2016-12-10T20:13:42.000Z | 2020-09-28T09:02:10.000Z | from setuptools import setup, find_packages
with open('README.rst', 'r') as infile:
read_me = infile.read()
setup(
packages=find_packages(),
name='depq',
version='1.5.5',
description='Double-ended priority queue',
long_description=read_me,
author='Ofek Lev',
author_email='ofekmeister@... | 28.116279 | 71 | 0.612076 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 663 | 0.548387 |
050bc5ae6e8eba8aac368023fb49c3014cb5ef03 | 880 | py | Python | tests/exact_tests/contour_tests/strategies.py | lycantropos/rene | c73c616f3e360b994e92c950a3616a8ccb1136b9 | [
"MIT"
] | null | null | null | tests/exact_tests/contour_tests/strategies.py | lycantropos/rene | c73c616f3e360b994e92c950a3616a8ccb1136b9 | [
"MIT"
] | null | null | null | tests/exact_tests/contour_tests/strategies.py | lycantropos/rene | c73c616f3e360b994e92c950a3616a8ccb1136b9 | [
"MIT"
] | null | null | null | from hypothesis import strategies
from rithm import Fraction
from rene import MIN_CONTOUR_VERTICES_COUNT
from rene.exact import (Contour,
Point)
integers = strategies.integers()
non_zero_integers = integers.filter(bool)
scalars = (integers | strategies.fractions()
| strategies.build... | 36.666667 | 73 | 0.664773 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
050d54bffebd30db922715e17f24f419261765d4 | 2,834 | py | Python | bendyprank.py | gazhay/bendyprank | 9af6b2536fb54001fe1681551362418f1ae78ed3 | [
"Unlicense"
] | null | null | null | bendyprank.py | gazhay/bendyprank | 9af6b2536fb54001fe1681551362418f1ae78ed3 | [
"Unlicense"
] | null | null | null | bendyprank.py | gazhay/bendyprank | 9af6b2536fb54001fe1681551362418f1ae78ed3 | [
"Unlicense"
] | null | null | null | /*
Bendy and the Ink Machine, BATIM, and all graphics and sounds are © The Meatly
NOT AN OFFICIAL BENDY AND THE INK MACHINE PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH THEMEATLY GAMES, LTD.
Code below released under GPLv2
*/
import wx
import subprocess
from random import randint
from time import sleep
... | 34.560976 | 111 | 0.617855 | 2,041 | 0.719929 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.05291 |
050f7c817ca7e48958c01acf2a63b083dd36ff69 | 1,347 | py | Python | src/answer_key.py | quuu/ASCIImage | d276b9428b8b127069999ffe8e025e8e0ad43c0c | [
"MIT"
] | 2 | 2018-08-01T02:13:31.000Z | 2018-08-01T03:02:31.000Z | src/answer_key.py | quuu/Genetic-ASCIImage | d276b9428b8b127069999ffe8e025e8e0ad43c0c | [
"MIT"
] | 11 | 2018-08-12T13:28:19.000Z | 2018-09-08T19:15:30.000Z | src/answer_key.py | quuu/ASCIImage | d276b9428b8b127069999ffe8e025e8e0ad43c0c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
from skimage import io
from skimage import color
from PIL import Image
#TODO Multi-thread
def avg_brightness(image_list):
"""
A list of grey scale images
"""
brightness_per_block=[]
for image in image_list:
img_shape = image.shape
img_Size = image... | 26.94 | 71 | 0.626578 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.097253 |
05108d99ff3259ead7d1205123464ffd5c4850a2 | 5,504 | py | Python | app.py | makerdao-data/gov-tracker | 52b7588e5c200b0af5b64a2891b276cbcc149ff1 | [
"Apache-2.0"
] | null | null | null | app.py | makerdao-data/gov-tracker | 52b7588e5c200b0af5b64a2891b276cbcc149ff1 | [
"Apache-2.0"
] | null | null | null | app.py | makerdao-data/gov-tracker | 52b7588e5c200b0af5b64a2891b276cbcc149ff1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 DAI Foundation
#
# 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,... | 28.518135 | 117 | 0.677871 | 0 | 0 | 851 | 0.154615 | 3,527 | 0.640807 | 0 | 0 | 1,703 | 0.309411 |
051130482cb3691a34b0be84581c86dd2a4ce54f | 3,280 | py | Python | open_spiel/python/mst/run_mst.py | BrandonKates/open_spiel | f820abe9bdfdbc4bd45c2e933439393d4ad3622a | [
"Apache-2.0"
] | null | null | null | open_spiel/python/mst/run_mst.py | BrandonKates/open_spiel | f820abe9bdfdbc4bd45c2e933439393d4ad3622a | [
"Apache-2.0"
] | null | null | null | open_spiel/python/mst/run_mst.py | BrandonKates/open_spiel | f820abe9bdfdbc4bd45c2e933439393d4ad3622a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 DeepMind Technologies Ltd. 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 appl... | 34.166667 | 129 | 0.695122 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,246 | 0.379878 |
0511c5e889756be6d1498e4e5630fe4522e1af10 | 176 | py | Python | dzien1/p1_start.py | angelm1974/przyklady | ee0483ca69b789270641f3cd6c945b0cd0afbea9 | [
"MIT"
] | 1 | 2021-09-20T21:48:11.000Z | 2021-09-20T21:48:11.000Z | dzien1/p1_start.py | angelm1974/przyklady | ee0483ca69b789270641f3cd6c945b0cd0afbea9 | [
"MIT"
] | null | null | null | dzien1/p1_start.py | angelm1974/przyklady | ee0483ca69b789270641f3cd6c945b0cd0afbea9 | [
"MIT"
] | null | null | null |
from PyQt6.QtWidgets import QApplication, QWidget
import sys # komentarz
app = QApplication(sys.argv) # ([]) -bez argumentów
window = QWidget()
window.show()
app.exec()
| 14.666667 | 52 | 0.715909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.19209 |
0511cceb2ee442a4c70aeab49d84be0233b7fcac | 10,952 | py | Python | classify.py | clulab/incivility | 82d8e8164b81e9f4d5737520f2cbf308d3fcd033 | [
"Apache-2.0"
] | 1 | 2020-09-18T12:05:13.000Z | 2020-09-18T12:05:13.000Z | classify.py | clulab/incivility | 82d8e8164b81e9f4d5737520f2cbf308d3fcd033 | [
"Apache-2.0"
] | null | null | null | classify.py | clulab/incivility | 82d8e8164b81e9f4d5737520f2cbf308d3fcd033 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import subprocess
from typing import List, Sequence, Text
import textwrap
import numpy as np
import pandas as pd
import sklearn
import tensorflow as tf
import tensorflow_addons as tfa
import transformers
import data
import models
import ga
def train(model_path: Text,
train_data_p... | 38.975089 | 137 | 0.603543 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,771 | 0.253013 |
051260c977d73217e66d8ef66398ae1931f7b899 | 814 | py | Python | p2/src/prove.py | ruimgf/AIDS | 72bc808ef5e21113f635f34581d18c0dc2c8c7da | [
"MIT"
] | null | null | null | p2/src/prove.py | ruimgf/AIDS | 72bc808ef5e21113f635f34581d18c0dc2c8c7da | [
"MIT"
] | null | null | null | p2/src/prove.py | ruimgf/AIDS | 72bc808ef5e21113f635f34581d18c0dc2c8c7da | [
"MIT"
] | null | null | null | import sys
from kb import *
#receives a list of setences if it is in test mode
def main(lista=None):
sentences = []
if lista is None:
with sys.stdin as f : #open stdin as a file
lines = f.readlines()
for line in lines: # convert each line to a python object
lin... | 25.4375 | 69 | 0.5086 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.146192 |
0513d4822718f78bada1c9c056ce41bfe1fb2ffe | 472 | py | Python | rest_framework_tracking/mixins.py | Zagrebelin/drf-tracking | 5fe102439e7baaffc886253e39c21dd96481391f | [
"ISC"
] | 387 | 2015-05-26T08:23:52.000Z | 2022-03-18T11:10:44.000Z | rest_framework_tracking/mixins.py | Zagrebelin/drf-tracking | 5fe102439e7baaffc886253e39c21dd96481391f | [
"ISC"
] | 138 | 2015-05-26T16:20:25.000Z | 2021-09-22T18:07:24.000Z | rest_framework_tracking/mixins.py | Zagrebelin/drf-tracking | 5fe102439e7baaffc886253e39c21dd96481391f | [
"ISC"
] | 121 | 2015-09-25T16:53:48.000Z | 2021-08-18T12:42:04.000Z | from .base_mixins import BaseLoggingMixin
from .models import APIRequestLog
class LoggingMixin(BaseLoggingMixin):
def handle_log(self):
"""
Hook to define what happens with the log.
Defaults on saving the data on the db.
"""
APIRequestLog(**self.log).save()
class Logging... | 21.454545 | 49 | 0.658898 | 390 | 0.826271 | 0 | 0 | 0 | 0 | 0 | 0 | 144 | 0.305085 |
0514df3dee36ec46f44f8239441b8f0b35d0374b | 758 | py | Python | stub_extractor/util.py | srittau/stub-extractor | f161c10a2f041a74040a04e00e0b0d33cb94a0fe | [
"MIT"
] | null | null | null | stub_extractor/util.py | srittau/stub-extractor | f161c10a2f041a74040a04e00e0b0d33cb94a0fe | [
"MIT"
] | null | null | null | stub_extractor/util.py | srittau/stub-extractor | f161c10a2f041a74040a04e00e0b0d33cb94a0fe | [
"MIT"
] | null | null | null | from typing import Iterator, List, Optional, Sequence, Tuple, TypeVar
_T1 = TypeVar("_T1")
_T2 = TypeVar("_T2")
def rzip_longest(
seq1: Sequence[_T1], seq2: Sequence[_T2]
) -> Iterator[Tuple[_T1, Optional[_T2]]]:
"""Make an iterator over tuples, with elements from the input sequences.
If the second sequ... | 30.32 | 76 | 0.647757 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 337 | 0.444591 |