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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
46b4aae481a7dcad8401c1fdb98aae95f3b590c6 | 2,207 | py | Python | api/patients/urls.py | Wellheor1/l2 | d980210921c545c68fe9d5522bb693d567995024 | [
"MIT"
] | 10 | 2018-03-14T06:17:06.000Z | 2022-03-10T05:33:34.000Z | api/patients/urls.py | Wellheor1/l2 | d980210921c545c68fe9d5522bb693d567995024 | [
"MIT"
] | 512 | 2018-09-10T07:37:34.000Z | 2022-03-30T02:23:43.000Z | api/patients/urls.py | D00dleman/l2 | 0870144537ee340cd8db053a608d731e186f02fb | [
"MIT"
] | 24 | 2018-07-31T05:52:12.000Z | 2022-02-08T00:39:41.000Z | from django.urls import path
from . import views
urlpatterns = [
path('search-card', views.patients_search_card),
path('search-individual', views.patients_search_individual),
path('search-l2-card', views.patients_search_l2_card),
path('create-l2-individual-from-card', views.create_l2_individual_from_ca... | 53.829268 | 86 | 0.752152 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 852 | 0.386044 |
46b5e33d3c7311128739c73f9d648a67b6c52c18 | 1,139 | py | Python | resolwe_bio/kb/migrations/0002_alter_field_max_length.py | JureZmrzlikar/resolwe-bio | 54cde9b293abebad2db0564c9fefa33d6d2fe835 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/kb/migrations/0002_alter_field_max_length.py | JureZmrzlikar/resolwe-bio | 54cde9b293abebad2db0564c9fefa33d6d2fe835 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/kb/migrations/0002_alter_field_max_length.py | JureZmrzlikar/resolwe-bio | 54cde9b293abebad2db0564c9fefa33d6d2fe835 | [
"Apache-2.0"
] | 1 | 2021-09-03T08:50:54.000Z | 2021-09-03T08:50:54.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2016-11-15 07:06
from __future__ import unicode_literals
import django.contrib.postgres.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('resolwe_bio_kb', '0001_initial'),
]
operation... | 35.59375 | 302 | 0.604039 | 943 | 0.827919 | 0 | 0 | 0 | 0 | 0 | 0 | 335 | 0.294118 |
46b6263389154f262f0911cbbda3dfc8ad613ae7 | 3,014 | py | Python | setup.py | conan-hdk/xlwings | 44395c4d18b46f76249279b7d0965e640291499c | [
"BSD-3-Clause"
] | null | null | null | setup.py | conan-hdk/xlwings | 44395c4d18b46f76249279b7d0965e640291499c | [
"BSD-3-Clause"
] | null | null | null | setup.py | conan-hdk/xlwings | 44395c4d18b46f76249279b7d0965e640291499c | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import re
import glob
from setuptools import setup, find_packages
# long_description: Take from README file
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
readme = f.read()
# Version Number
with open(os.path.join(os.path.dirname(__file__), 'xlwings', '__init__.py')) as... | 42.450704 | 214 | 0.651626 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,650 | 0.547445 |
46b6eaa6075021f6bee39458eda6a940c6b7c8b2 | 2,044 | py | Python | secedgar/tests/test_cli.py | abbadata/sec-edgar | f801d2137a988c928449bf64b44a85c01e80fd3a | [
"Apache-2.0"
] | null | null | null | secedgar/tests/test_cli.py | abbadata/sec-edgar | f801d2137a988c928449bf64b44a85c01e80fd3a | [
"Apache-2.0"
] | null | null | null | secedgar/tests/test_cli.py | abbadata/sec-edgar | f801d2137a988c928449bf64b44a85c01e80fd3a | [
"Apache-2.0"
] | null | null | null | import pytest
from click.testing import CliRunner
from secedgar.cli import daily, filing
from secedgar.utils.exceptions import FilingTypeError
def run_cli_command(cli, user_input, directory, catch_exceptions=False):
runner = CliRunner()
user_input = user_input + " --directory {}".format(directory)
return ... | 34.066667 | 90 | 0.672211 | 1,275 | 0.623777 | 0 | 0 | 1,218 | 0.59589 | 0 | 0 | 441 | 0.215753 |
46b74e2cb30b2d76500271ee27ada8ec4c26cdc1 | 2,013 | py | Python | hydro.py | garethcmurphy/hydrosolve | ef150a6adcab1e835b4b907c5fed2dd58cd4ba08 | [
"MIT"
] | null | null | null | hydro.py | garethcmurphy/hydrosolve | ef150a6adcab1e835b4b907c5fed2dd58cd4ba08 | [
"MIT"
] | null | null | null | hydro.py | garethcmurphy/hydrosolve | ef150a6adcab1e835b4b907c5fed2dd58cd4ba08 | [
"MIT"
] | null | null | null | import os
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import gridspec
nstep=200
nx=400
nv=3
u=np.zeros((nx,nv))
prim=np.zeros((nx,nv))
gam=5./3.
dx=1./nx
dt=1e-3
time=0
x=np.linspace(0,1,num=nx)
def ptou(pri):
u=np.zeros((nx,nv))
rho=pri[:,0]
v=pri[:,1]
prs=pri[:,2]
mom=rho*v
... | 18.638889 | 42 | 0.516642 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.008942 |
d3b125d2c7eabb30628cc33826a64ef3ed9c92f4 | 22,179 | py | Python | tests/test_pluralize.py | weixu365/pluralizer-py | 793b2a8ff1320f701e70810038e0902c610aa5b0 | [
"MIT"
] | 4 | 2020-05-10T12:02:57.000Z | 2022-02-02T11:20:02.000Z | tests/test_pluralize.py | weixu365/pluralizer-py | 793b2a8ff1320f701e70810038e0902c610aa5b0 | [
"MIT"
] | 30 | 2020-05-10T10:07:00.000Z | 2022-03-26T18:22:43.000Z | tests/test_pluralize.py | weixu365/pluralizer-py | 793b2a8ff1320f701e70810038e0902c610aa5b0 | [
"MIT"
] | null | null | null |
import unittest
from pluralizer import Pluralizer
import re
# Standard singular/plural matches.
#
# @type {Array}
BASIC_TESTS = [
# Uncountables.
['firmware', 'firmware'],
['fish', 'fish'],
['media', 'media'],
['moose', 'moose'],
['police', 'police'],
['sheep', 'sheep'],
['series', 's... | 28.039191 | 83 | 0.515803 | 3,649 | 0.164096 | 0 | 0 | 0 | 0 | 0 | 0 | 12,082 | 0.543329 |
d3b146cefcbdfbb497115b74257a2891722524b5 | 1,988 | py | Python | promgen/util.py | sundy-li/promgen | e532bde46b542dd66f46e3dd654bc1ad31deeec7 | [
"MIT"
] | null | null | null | promgen/util.py | sundy-li/promgen | e532bde46b542dd66f46e3dd654bc1ad31deeec7 | [
"MIT"
] | 8 | 2021-04-08T21:59:34.000Z | 2022-02-10T10:42:43.000Z | promgen/util.py | Andreich2010/promgen | dae2b720f30b0c002aa50a74c4c4fc8dfbcbb2b7 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017 LINE Corporation
# These sources are released under the terms of the MIT license: see LICENSE
import requests.sessions
from django.db.models import F
from promgen.version import __version__
from django.conf import settings
# Wrappers around request api to ensure we always attach our user agent
#... | 28.811594 | 87 | 0.667505 | 331 | 0.166499 | 0 | 0 | 0 | 0 | 0 | 0 | 696 | 0.350101 |
d3b1ab341873d6a614ea74d34b804a1a2793bea2 | 5,478 | py | Python | integration_tests/test_suites/k8s-integration-test-suite/test_utils.py | ericct/dagster | dd2c9f05751e1bae212a30dbc54381167a14f6c5 | [
"Apache-2.0"
] | null | null | null | integration_tests/test_suites/k8s-integration-test-suite/test_utils.py | ericct/dagster | dd2c9f05751e1bae212a30dbc54381167a14f6c5 | [
"Apache-2.0"
] | null | null | null | integration_tests/test_suites/k8s-integration-test-suite/test_utils.py | ericct/dagster | dd2c9f05751e1bae212a30dbc54381167a14f6c5 | [
"Apache-2.0"
] | null | null | null | import time
import kubernetes
import pytest
from dagster_k8s.client import DagsterK8sError, WaitForPodState
from dagster_k8s.utils import retrieve_pod_logs, wait_for_job_success, wait_for_pod
from dagster_k8s_test_infra.helm import get_helm_test_namespace
def construct_pod_spec(name, cmd):
return kubernetes.clie... | 41.18797 | 100 | 0.61245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,559 | 0.284593 |
d3b2063cf7dc483f806ac22531b14a9333116ffb | 1,092 | py | Python | radioepg/migrations/0001_initial.py | mervij/radiodns | 01543cf1e4de8de335af0301616e089c35fc67f8 | [
"Apache-2.0"
] | null | null | null | radioepg/migrations/0001_initial.py | mervij/radiodns | 01543cf1e4de8de335af0301616e089c35fc67f8 | [
"Apache-2.0"
] | 8 | 2021-05-17T10:54:28.000Z | 2021-06-08T12:02:37.000Z | radioepg/migrations/0001_initial.py | mervij/radiodns | 01543cf1e4de8de335af0301616e089c35fc67f8 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.6 on 2021-02-15 08:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Service',
fields=[
... | 32.117647 | 115 | 0.571429 | 966 | 0.884615 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.14652 |
d3b26049eb155f0068830e3349db9d53a2b93029 | 2,088 | py | Python | uitester/ui/case_manager/tag_names_line_edit.py | IfengAutomation/uitester | 6f9c78c86965b05efea875d38dbd9587386977fa | [
"Apache-2.0"
] | 4 | 2016-07-12T09:01:52.000Z | 2016-12-07T03:11:02.000Z | uitester/ui/case_manager/tag_names_line_edit.py | IfengAutomation/uitester | 6f9c78c86965b05efea875d38dbd9587386977fa | [
"Apache-2.0"
] | null | null | null | uitester/ui/case_manager/tag_names_line_edit.py | IfengAutomation/uitester | 6f9c78c86965b05efea875d38dbd9587386977fa | [
"Apache-2.0"
] | 3 | 2016-11-29T02:13:17.000Z | 2019-10-16T06:25:20.000Z | from PyQt5.QtCore import Qt, QStringListModel
from PyQt5.QtWidgets import QLineEdit, QCompleter
class TagNamesLineEdit(QLineEdit):
def __init__(self, parent=None):
super(QLineEdit, self).__init__(parent)
self.cmp = None
self.is_completer = True
def setCompleter(self, completer):
... | 34.229508 | 84 | 0.631226 | 1,985 | 0.95067 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.00431 |
d3b26adf9f1c111614b51c252d8d80c26d192abc | 337 | py | Python | utils/__init__.py | millermuttu/torch_soft | 70a692650b6eb8c70000e0f8dc2b22cbb9f94741 | [
"MIT"
] | null | null | null | utils/__init__.py | millermuttu/torch_soft | 70a692650b6eb8c70000e0f8dc2b22cbb9f94741 | [
"MIT"
] | null | null | null | utils/__init__.py | millermuttu/torch_soft | 70a692650b6eb8c70000e0f8dc2b22cbb9f94741 | [
"MIT"
] | null | null | null | # # importing all the modules at once
# from .config import *
# from .normalization import *
# from .others import *
# from .img_reg import *
# from .transformation import *
# from .visualization import *
# importing the modules in a selective way
import utils.config
import utils.normalization
import utils.misc
import... | 24.071429 | 42 | 0.762611 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.712166 |
d3b2a1b997cbe83aa232f13b17539c3d7b815053 | 434 | py | Python | tasks.py | epu-ntua/QualiChain-mediator | 1d0f848d60861665d95ad0359914add361551763 | [
"MIT"
] | 2 | 2020-03-09T11:10:15.000Z | 2020-03-11T06:11:58.000Z | tasks.py | epu-ntua/QualiChain-mediator | 1d0f848d60861665d95ad0359914add361551763 | [
"MIT"
] | 2 | 2021-03-31T19:43:58.000Z | 2021-12-13T20:34:57.000Z | tasks.py | epu-ntua/QualiChain-mediator | 1d0f848d60861665d95ad0359914add361551763 | [
"MIT"
] | 2 | 2020-03-12T11:14:20.000Z | 2020-07-07T06:17:45.000Z | from celery import Celery
from clients.dobie_client import send_data_to_dobie
app = Celery('qualichain_mediator')
app.config_from_object('settings', namespace='CELERY_')
@app.task()
def consume_messages_async(message):
"""
This task is used to received job posting text and feed DOBIE component
"""
e... | 25.529412 | 75 | 0.767281 | 0 | 0 | 0 | 0 | 259 | 0.596774 | 0 | 0 | 127 | 0.292627 |
d3b3426ac37ef57bd78d3b9aa39a2ef7e95619d6 | 1,174 | py | Python | ingest/ambit_geo.py | brianhouse/okavango | 4006940ddead3f31eea701efb9b9dcdc7b19402e | [
"MIT"
] | 2 | 2015-01-25T06:20:03.000Z | 2015-02-15T23:54:41.000Z | ingest/ambit_geo.py | brianhouse/okavango_15 | 4006940ddead3f31eea701efb9b9dcdc7b19402e | [
"MIT"
] | null | null | null | ingest/ambit_geo.py | brianhouse/okavango_15 | 4006940ddead3f31eea701efb9b9dcdc7b19402e | [
"MIT"
] | 3 | 2017-11-14T21:18:23.000Z | 2021-06-20T21:08:31.000Z | import json, math
from ingest import ingest_json_body
from housepy import config, log, strings, util
def parse(request):
log.info("ambit_geo.parse")
sample = ingest_json_body(request)
if sample is None:
return sample, "Could not parse"
data = {}
for key, value in sample.items():
if... | 32.611111 | 87 | 0.537479 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 238 | 0.202726 |
d3b45e5164e572fbde2110d62cb448013353f1cd | 1,593 | py | Python | gandyndns.py | nim65s/scripts | 2c61bd77bfca6ae6437654e43ad2bc95d611360a | [
"BSD-2-Clause"
] | 1 | 2020-12-17T09:41:42.000Z | 2020-12-17T09:41:42.000Z | gandyndns.py | nim65s/scripts | 2c61bd77bfca6ae6437654e43ad2bc95d611360a | [
"BSD-2-Clause"
] | null | null | null | gandyndns.py | nim65s/scripts | 2c61bd77bfca6ae6437654e43ad2bc95d611360a | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
'''update gandi DNS domain entry, with LiveDNS v5
Cf. https://doc.livedns.gandi.net/#work-with-domains
'''
import argparse
import ipaddress
import json
import os
from subprocess import check_output
import requests
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('-v', '... | 32.510204 | 112 | 0.696171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 612 | 0.384181 |
d3b4e36f678d36e360884bedfd448ece0a34ced3 | 1,895 | py | Python | leetcode.com/python/314_Binary_Tree_Vertical_Order_Traversal.py | mamane19/coding-interview-gym | 20ae1a048eddbc9a32c819cf61258e2b57572f05 | [
"MIT"
] | 713 | 2019-11-19T16:11:25.000Z | 2022-03-31T02:27:52.000Z | leetcode.com/python/314_Binary_Tree_Vertical_Order_Traversal.py | arunsank/coding-interview-gym | 8131e3a82795707e144fe55d765b6c15bdb97306 | [
"MIT"
] | 7 | 2020-01-16T17:07:18.000Z | 2021-11-15T18:24:39.000Z | leetcode.com/python/314_Binary_Tree_Vertical_Order_Traversal.py | arunsank/coding-interview-gym | 8131e3a82795707e144fe55d765b6c15bdb97306 | [
"MIT"
] | 393 | 2019-11-18T17:55:45.000Z | 2022-03-28T20:26:32.000Z | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
from collections import deque
from collections import defaultdict
class Solution(object):
def verticalOrder(self, ... | 31.583333 | 109 | 0.582058 | 1,503 | 0.79314 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0.211082 |
d3b4eac02574fc5ff2fd374b340d31cb4dba25c1 | 3,750 | py | Python | src/sentry/models/pluginhealth.py | ayesha-omarali/sentry | 96f81a1805227c26234e6317771bc0dcb5c176ad | [
"BSD-3-Clause"
] | null | null | null | src/sentry/models/pluginhealth.py | ayesha-omarali/sentry | 96f81a1805227c26234e6317771bc0dcb5c176ad | [
"BSD-3-Clause"
] | null | null | null | src/sentry/models/pluginhealth.py | ayesha-omarali/sentry | 96f81a1805227c26234e6317771bc0dcb5c176ad | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from sentry.db.models import (
ArrayField, BoundedPositiveIntegerField, Model, FlexibleForeignKey, sane_repr
)
from django.db import models
from jsonfield import JSONField
from django.utils import timezone
from sentry.constants import ObjectStatus
from django.utils.translatio... | 32.327586 | 82 | 0.686133 | 3,393 | 0.9048 | 0 | 0 | 0 | 0 | 0 | 0 | 342 | 0.0912 |
d3b76c1c0fc989bb41ad8f58fabce2395587d211 | 1,615 | py | Python | src/masonite/oauth/drivers/FacebookDriver.py | girardinsamuel/masonite-socialite | 04110601b299d8505ec453b7743124cb88047d9d | [
"MIT"
] | 1 | 2021-05-07T16:37:03.000Z | 2021-05-07T16:37:03.000Z | src/masonite/oauth/drivers/FacebookDriver.py | girardinsamuel/masonite-socialite | 04110601b299d8505ec453b7743124cb88047d9d | [
"MIT"
] | 11 | 2021-05-17T06:45:48.000Z | 2021-10-03T15:16:23.000Z | src/masonite/oauth/drivers/FacebookDriver.py | girardinsamuel/masonite-socialite | 04110601b299d8505ec453b7743124cb88047d9d | [
"MIT"
] | null | null | null | from .BaseDriver import BaseDriver
from ..OAuthUser import OAuthUser
class FacebookDriver(BaseDriver):
def get_default_scopes(self):
return ["email"]
def get_auth_url(self):
return "https://www.facebook.com/dialog/oauth"
def get_token_url(self):
return "https://graph.facebook.com... | 28.333333 | 90 | 0.479257 | 1,543 | 0.955418 | 0 | 0 | 0 | 0 | 0 | 0 | 363 | 0.224768 |
d3b8efd54656a0b32ac0c5b886fd7d4ce09f8a83 | 1,266 | py | Python | python/convert_to_readwise.py | t27/highlights-convert | a6c6696ece4fabbbb56e420cb23c0466710e1345 | [
"MIT"
] | null | null | null | python/convert_to_readwise.py | t27/highlights-convert | a6c6696ece4fabbbb56e420cb23c0466710e1345 | [
"MIT"
] | null | null | null | python/convert_to_readwise.py | t27/highlights-convert | a6c6696ece4fabbbb56e420cb23c0466710e1345 | [
"MIT"
] | 1 | 2021-06-29T20:40:06.000Z | 2021-06-29T20:40:06.000Z | import pandas as pd
import json
import glob
columns = ["Highlight","Title","Author","URL","Note","Location"]
# for sample of the input json look at any json in the root of the `results` folder
def convert_to_readwise_df(json_files):
"""Convert the internal json format to a readwise compatible dataframe
Args:... | 32.461538 | 83 | 0.590837 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 485 | 0.383096 |
d3ba25fae7aacb5e43b639c41eadbd3d14fb7a48 | 303 | py | Python | ms_deisotope/qc/__init__.py | mstim/ms_deisotope | 29f4f466e92e66b65a2d21eca714aa627caa21db | [
"Apache-2.0"
] | 18 | 2017-09-01T12:26:12.000Z | 2022-02-23T02:31:29.000Z | ms_deisotope/qc/__init__.py | mstim/ms_deisotope | 29f4f466e92e66b65a2d21eca714aa627caa21db | [
"Apache-2.0"
] | 19 | 2017-03-12T20:40:36.000Z | 2022-03-31T22:50:47.000Z | ms_deisotope/qc/__init__.py | mstim/ms_deisotope | 29f4f466e92e66b65a2d21eca714aa627caa21db | [
"Apache-2.0"
] | 14 | 2016-05-06T02:25:30.000Z | 2022-03-31T14:40:06.000Z | """A collection of methods for determining whether a given spectrum is
of high quality (likely to produce a high quality interpretation)
"""
from .heuristic import xrea
from .isolation import CoIsolation, PrecursorPurityEstimator
__all__ = [
"xrea",
"CoIsolation", "PrecursorPurityEstimator"
]
| 27.545455 | 70 | 0.772277 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.610561 |
d3bbc84b4a938b83b84adeff2d313509849c11f6 | 3,855 | py | Python | rpi_animations/message.py | Anski-D/rpi_animations_old | b019a301ba777d76e3cedc6b86359570e2c2f18b | [
"MIT"
] | null | null | null | rpi_animations/message.py | Anski-D/rpi_animations_old | b019a301ba777d76e3cedc6b86359570e2c2f18b | [
"MIT"
] | null | null | null | rpi_animations/message.py | Anski-D/rpi_animations_old | b019a301ba777d76e3cedc6b86359570e2c2f18b | [
"MIT"
] | null | null | null | from .item import Item
class Message(Item):
"""
Message feature object in the rpi_animations package.
"""
def __init__(self, group, screen_animator) -> None:
"""
Initialise Message object with sprite group and screen object. Run initial setup methods.
Args:
group ... | 27.147887 | 107 | 0.575357 | 3,829 | 0.993256 | 0 | 0 | 0 | 0 | 0 | 0 | 1,659 | 0.43035 |
d3bc12f8ef0d8afa0eabbca33671def2b9e2dfc8 | 4,293 | py | Python | styrobot/cogs/help.py | ThatRedKite/styrobot | c6c449aec99cb59c4695f739d59efe2def0e0064 | [
"MIT"
] | 1 | 2021-08-02T23:19:31.000Z | 2021-08-02T23:19:31.000Z | styrobot/cogs/help.py | ThatRedKite/styrobot | c6c449aec99cb59c4695f739d59efe2def0e0064 | [
"MIT"
] | null | null | null | styrobot/cogs/help.py | ThatRedKite/styrobot | c6c449aec99cb59c4695f739d59efe2def0e0064 | [
"MIT"
] | 1 | 2021-07-28T02:26:54.000Z | 2021-07-28T02:26:54.000Z | import discord
from discord.ext import commands
from styrobot.util.contrib import info
import random
class BetterHelpCommand(commands.HelpCommand):
async def send_embed(self, embed):
embed.colour = discord.Colour.random()
await self.get_destination().send(embed=embed)
def blank_line(self, emb... | 44.257732 | 109 | 0.610063 | 4,145 | 0.963953 | 0 | 0 | 0 | 0 | 2,850 | 0.662791 | 500 | 0.116279 |
d3bcd85e84067fe1c97d2fef2c0994e569b7ca18 | 1,527 | py | Python | misc/Queue_hello.py | benhunter/py-stuff | a04f94851370e08a65792a53a6207f3146eb130b | [
"MIT"
] | 3 | 2017-05-22T03:14:21.000Z | 2019-05-24T11:44:15.000Z | misc/Queue_hello.py | benhunter/py-stuff | a04f94851370e08a65792a53a6207f3146eb130b | [
"MIT"
] | null | null | null | misc/Queue_hello.py | benhunter/py-stuff | a04f94851370e08a65792a53a6207f3146eb130b | [
"MIT"
] | null | null | null | # Testing with threading and queue modules for Thread-based parallelism
import threading, queue, time
# The worker thread gets jobs off the queue. When the queue is empty, it
# assumes there will be no more work and exits.
# (Realistically workers will run until terminated.)
def worker():
print('Running worker'... | 26.327586 | 90 | 0.629339 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 728 | 0.476752 |
d3bea2de7d4525c6881fb3abdb31815d971e7131 | 506 | py | Python | tests/conftest.py | Beanxx/alonememo | aa90bcca6a5dcaa41305b162ac5d6dbe8d0d2562 | [
"MIT"
] | null | null | null | tests/conftest.py | Beanxx/alonememo | aa90bcca6a5dcaa41305b162ac5d6dbe8d0d2562 | [
"MIT"
] | null | null | null | tests/conftest.py | Beanxx/alonememo | aa90bcca6a5dcaa41305b162ac5d6dbe8d0d2562 | [
"MIT"
] | null | null | null | import pytest
from pymongo import MongoClient
import app as flask_app
test_database_name = 'spartatest'
client = MongoClient('localhost', 27017)
db = client.get_database(test_database_name)
@pytest.fixture
def app():
test_app = flask_app.create_app(test_database_name)
# 제네레이터 문법(yield 구문까지만 실행하고 대기,
#... | 20.24 | 55 | 0.727273 | 0 | 0 | 439 | 0.673313 | 455 | 0.697853 | 0 | 0 | 298 | 0.457055 |
d3bfaf1d9fa752290f67cc0958281b146d4daff0 | 98 | py | Python | threader/__init__.py | mwoolweaver/threader | fdb4fe9ab71d3c85146969f716d10b78f970323e | [
"MIT"
] | 34 | 2017-07-24T20:54:06.000Z | 2022-03-18T13:10:11.000Z | threader/__init__.py | mwoolweaver/threader | fdb4fe9ab71d3c85146969f716d10b78f970323e | [
"MIT"
] | 2 | 2019-05-28T07:21:15.000Z | 2019-07-23T21:45:43.000Z | threader/__init__.py | mwoolweaver/threader | fdb4fe9ab71d3c85146969f716d10b78f970323e | [
"MIT"
] | 8 | 2019-05-28T06:49:02.000Z | 2022-02-04T22:59:09.000Z | """Tools to quickly create twitter threads."""
from .thread import Threader
__version__ = "0.1.1" | 24.5 | 46 | 0.734694 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.540816 |
d3bfd6a64622fae1b5dc880f345c000e85f77a5b | 1,080 | py | Python | src/utility/count_pages.py | WikiCommunityHealth/wikimedia-revert | b584044d8b6a61a79d98656db356bf1f74d23ee0 | [
"MIT"
] | null | null | null | src/utility/count_pages.py | WikiCommunityHealth/wikimedia-revert | b584044d8b6a61a79d98656db356bf1f74d23ee0 | [
"MIT"
] | null | null | null | src/utility/count_pages.py | WikiCommunityHealth/wikimedia-revert | b584044d8b6a61a79d98656db356bf1f74d23ee0 | [
"MIT"
] | null | null | null | # count numbers of pages from the Mediawiki history dumps
import bz2
import subprocess
import os
from datetime import datetime
inizio = datetime.now()
dataset_folder = '/home/gandelli/dev/data/it/'
totali = set()
revisioni = set()
revert = set()
ns0 = set()
for year in range(2001, 2021):
dump_in = bz2.open(da... | 23.478261 | 74 | 0.566667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.197222 |
d3c078904bb9cd81a5346502975e431e6b94a34e | 6,395 | py | Python | livescore/LivescoreCommon.py | TechplexEngineer/frc-livescore | dedf68218a1a8e2f8a463ded835ea2a7d4b51b78 | [
"MIT"
] | null | null | null | livescore/LivescoreCommon.py | TechplexEngineer/frc-livescore | dedf68218a1a8e2f8a463ded835ea2a7d4b51b78 | [
"MIT"
] | null | null | null | livescore/LivescoreCommon.py | TechplexEngineer/frc-livescore | dedf68218a1a8e2f8a463ded835ea2a7d4b51b78 | [
"MIT"
] | null | null | null | import colorsys
import cv2
from PIL import Image
import pkg_resources
from .LivescoreBase import LivescoreBase
from .details import Alliance, OngoingMatchDetails
class LivescoreCommon(LivescoreBase):
def __init__(self, game_year, **kwargs):
super(LivescoreCommon, self).__init__(game_year, **kwargs)
... | 39.475309 | 124 | 0.603597 | 6,229 | 0.974042 | 0 | 0 | 0 | 0 | 0 | 0 | 359 | 0.056138 |
d3c0c248eab748f6973cc1f7d32930648b9e6320 | 1,825 | py | Python | challenges/challenge.py | Tech-With-Tim/models | 221fce614776df01b151e73071c788c3ce57dc52 | [
"MIT"
] | 2 | 2021-07-09T18:53:15.000Z | 2021-08-06T06:21:14.000Z | challenges/challenge.py | Tech-With-Tim/models | 221fce614776df01b151e73071c788c3ce57dc52 | [
"MIT"
] | 8 | 2021-07-09T13:08:07.000Z | 2021-09-12T20:25:08.000Z | challenges/challenge.py | Tech-With-Tim/models | 221fce614776df01b151e73071c788c3ce57dc52 | [
"MIT"
] | 4 | 2021-07-09T12:32:20.000Z | 2021-07-29T15:19:25.000Z | from postDB import Model, Column, types
from datetime import datetime
import utils
class Challenge(Model):
"""
Challenge class to store the challenge details
Database Attributes:
Attributes stored in the `challenges` table.
:param int id: The challenge Snowflake... | 40.555556 | 101 | 0.633973 | 1,738 | 0.952329 | 0 | 0 | 149 | 0.081644 | 0 | 0 | 1,039 | 0.569315 |
d3c2f371f8e9bd53dfa26410d72fcf0c4b952e00 | 1,004 | py | Python | settings.py | embrace-inpe/cycle-slip-correction | c465dd4d45ea7df63a18749e26ba4bf0aa27eb59 | [
"MIT"
] | 6 | 2019-05-20T21:23:41.000Z | 2021-06-23T15:00:30.000Z | settings.py | embrace-inpe/cycle-slip-correction | c465dd4d45ea7df63a18749e26ba4bf0aa27eb59 | [
"MIT"
] | null | null | null | settings.py | embrace-inpe/cycle-slip-correction | c465dd4d45ea7df63a18749e26ba4bf0aa27eb59 | [
"MIT"
] | 5 | 2018-12-27T16:46:45.000Z | 2020-09-14T13:44:00.000Z | """
Commom settings to all applications
"""
A = 40.3
TECU = 1.0e16
C = 299792458
F1 = 1.57542e9
F2 = 1.22760e9
factor_1 = (F1 - F2) / (F1 + F2) / C
factor_2 = (F1 * F2) / (F2 - F1) / C
DIFF_TEC_MAX = 0.05
LIMIT_STD = 7.5
plot_it = True
REQUIRED_VERSION = 3.01
CONSTELLATIONS = ['G', 'R']
COLUMNS_IN_RINEX = {'3.03': ... | 33.466667 | 100 | 0.351594 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 347 | 0.345618 |
d3c36036476de94ac751c017398b3c5474c873f2 | 51 | py | Python | io_almacen/channel/__init__.py | xyla-io/io_almacen | 76725391b496fe3f778d013fc680ae80637eb74b | [
"MIT"
] | null | null | null | io_almacen/channel/__init__.py | xyla-io/io_almacen | 76725391b496fe3f778d013fc680ae80637eb74b | [
"MIT"
] | null | null | null | io_almacen/channel/__init__.py | xyla-io/io_almacen | 76725391b496fe3f778d013fc680ae80637eb74b | [
"MIT"
] | null | null | null | from .channel_io import Channel, channel_entity_url | 51 | 51 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d3c3d276986b71cc9d8aae788f2dcd9c3f2eb96a | 1,009 | py | Python | tests/api/test_libcoap_api.py | ggravlingen/ikeatradfri | 9eef5317ab770de874c407449489604b2fdf35f1 | [
"MIT"
] | 726 | 2017-04-12T22:55:39.000Z | 2020-09-02T20:47:13.000Z | tests/api/test_libcoap_api.py | ggravlingen/ikeatradfri | 9eef5317ab770de874c407449489604b2fdf35f1 | [
"MIT"
] | 248 | 2017-04-12T21:45:10.000Z | 2020-09-03T08:48:37.000Z | tests/api/test_libcoap_api.py | ggravlingen/ikeatradfri | 9eef5317ab770de874c407449489604b2fdf35f1 | [
"MIT"
] | 140 | 2017-04-12T20:02:57.000Z | 2020-09-02T08:54:23.000Z | """Test API utilities."""
import json
from pytradfri.api.libcoap_api import APIFactory
from pytradfri.gateway import Gateway
def test_constructor_timeout_passed_to_subprocess(monkeypatch):
"""Test that original timeout is passed to subprocess."""
capture = {}
def capture_args(*args, **kwargs):
c... | 28.027778 | 64 | 0.698712 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 235 | 0.232904 |
d3c44721938c2e001d9a0ea64b9e887be6780370 | 1,293 | py | Python | scrape_tvz.py | awordforthat/rhymes | b7d47b48a9b641e4736ed04058a183afc0a83b04 | [
"MIT"
] | null | null | null | scrape_tvz.py | awordforthat/rhymes | b7d47b48a9b641e4736ed04058a183afc0a83b04 | [
"MIT"
] | null | null | null | scrape_tvz.py | awordforthat/rhymes | b7d47b48a9b641e4736ed04058a183afc0a83b04 | [
"MIT"
] | 1 | 2021-02-16T03:06:38.000Z | 2021-02-16T03:06:38.000Z | # scrapes Townes van Zandt lyrics
# sample code so I don't have to remember all of this stuff
# the next time I want to source some verses
from bs4 import BeautifulSoup as soup
import requests
import string
punctuation_trans_table = str.maketrans("", "", string.punctuation)
def strip_punctuation(s):
return s.tr... | 28.108696 | 67 | 0.657386 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 381 | 0.294664 |
d3c48e47d2fa33e8114041e17aa2a33b9c9c1809 | 895 | py | Python | chapter04/ifelse.py | persevere-in-coding-persist-in-learning/python2 | b207d0040232abae63638784b34a950b932bef77 | [
"Apache-2.0"
] | 3 | 2020-08-05T01:15:41.000Z | 2020-08-05T09:28:36.000Z | chapter04/ifelse.py | persevere-in-coding-persist-in-learning/python2 | b207d0040232abae63638784b34a950b932bef77 | [
"Apache-2.0"
] | null | null | null | chapter04/ifelse.py | persevere-in-coding-persist-in-learning/python2 | b207d0040232abae63638784b34a950b932bef77 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
"""
控制结构if elif else的研究
Version: 0.1
Author: huijz
Date: 2020-08-24
"""
# 例1:if的基本用法:
flag = False
name = 'huijz'
if name == 'python': # 判断变量是否为 python
flag = True # 条件成立时设置标志为真
print 'welcome boss' # 并输出欢迎信息
else:
print name # 条件不成立时输出变量名称
# 例2:elif用法
num = 5
if num == 3: # 判断num的值
... | 16.886792 | 41 | 0.606704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 701 | 0.606926 |
d3c5d75262328f54482b5a9f8b47cfdc49c36760 | 445 | py | Python | setup.py | korymath/JANN | 98468a2e90a6b55ccb15e905ee10a1d1130cf5d8 | [
"MIT"
] | 39 | 2018-09-25T21:40:38.000Z | 2022-01-19T23:26:51.000Z | setup.py | korymath/JANN | 98468a2e90a6b55ccb15e905ee10a1d1130cf5d8 | [
"MIT"
] | 22 | 2018-09-25T21:36:46.000Z | 2021-09-07T16:03:41.000Z | setup.py | korymath/JANN | 98468a2e90a6b55ccb15e905ee10a1d1130cf5d8 | [
"MIT"
] | 9 | 2018-09-26T00:38:35.000Z | 2020-02-27T05:59:03.000Z | from setuptools import setup
from setuptools import find_packages
setup(
name="Jann",
version="4.0.0",
description="Jann is a Nearest Neighbour retrieval-based chatbot.",
author="Kory Mathewson",
author_email="korymath@gmail.com",
license="MIT",
url="https://github.com/korymath/jann",
... | 20.227273 | 71 | 0.647191 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.370787 |
d3c6c4df7fb938e9c1ce540f827eb9b023f7dd26 | 7,895 | py | Python | tests/scanner/scanners/ke_version_scanner_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | 1 | 2018-03-26T08:15:21.000Z | 2018-03-26T08:15:21.000Z | tests/scanner/scanners/ke_version_scanner_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | null | null | null | tests/scanner/scanners/ke_version_scanner_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Forseti Security Authors. 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 ap... | 41.119792 | 76 | 0.500823 | 6,767 | 0.857125 | 0 | 0 | 2,536 | 0.321216 | 0 | 0 | 3,175 | 0.402153 |
d3c71f0ccce66077dfdcd88c05a9aa625f2426c0 | 1,147 | py | Python | metrics/utils.py | edwardyehuang/iSeg | 256b0f7fdb6e854fe026fa8df41d9a4a55db34d5 | [
"MIT"
] | 4 | 2021-12-13T09:49:26.000Z | 2022-02-19T11:16:50.000Z | metrics/utils.py | edwardyehuang/iSeg | 256b0f7fdb6e854fe026fa8df41d9a4a55db34d5 | [
"MIT"
] | 1 | 2021-07-28T10:40:56.000Z | 2021-08-09T07:14:06.000Z | metrics/utils.py | edwardyehuang/iSeg | 256b0f7fdb6e854fe026fa8df41d9a4a55db34d5 | [
"MIT"
] | null | null | null | # ================================================================
# MIT License
# Copyright (c) 2021 edwardyehuang (https://github.com/edwardyehuang)
# ================================================================
import tensorflow as tf
from iseg.metrics.seg_metric_wrapper import SegMetricWrapper
from iseg.metri... | 26.068182 | 118 | 0.569311 | 797 | 0.694856 | 0 | 0 | 62 | 0.054054 | 0 | 0 | 228 | 0.198779 |
d3c7eb72e9d8627f04182ce89238416d18909674 | 1,436 | py | Python | src/core/stats.py | dynaryu/vaws | f6ed9b75408f7ce6100ed59b7754f745e59be152 | [
"BSD-3-Clause"
] | null | null | null | src/core/stats.py | dynaryu/vaws | f6ed9b75408f7ce6100ed59b7754f745e59be152 | [
"BSD-3-Clause"
] | null | null | null | src/core/stats.py | dynaryu/vaws | f6ed9b75408f7ce6100ed59b7754f745e59be152 | [
"BSD-3-Clause"
] | null | null | null | import math
def lognormal_mean(m, stddev):
""" compute mean of log x with mean and std. of x
Args:
m: mean of x
stddev: standard deviation of x
Returns: mean of log x
"""
return math.log(m) - (0.5 * math.log(1.0 + (stddev * stddev) / (m * m)))
def lognormal_stdde... | 23.16129 | 77 | 0.521588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 891 | 0.620474 |
d3c82c2d822564092119880c7f993bd3fd1d721b | 5,720 | py | Python | vim.d/vimfiles/bundle/taghighlight/plugin/TagHighlight/module/languages.py | lougxing/gbox | f28402d97cacd22b5e564003af72c4022908cb4d | [
"MIT"
] | null | null | null | vim.d/vimfiles/bundle/taghighlight/plugin/TagHighlight/module/languages.py | lougxing/gbox | f28402d97cacd22b5e564003af72c4022908cb4d | [
"MIT"
] | 13 | 2020-01-28T22:30:33.000Z | 2022-03-02T14:57:16.000Z | vim.d/vimfiles/bundle/taghighlight/plugin/TagHighlight/module/languages.py | lougxing/gbox | f28402d97cacd22b5e564003af72c4022908cb4d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Tag Highlighter:
# Author: A. S. Budden <abudden _at_ gmail _dot_ com>
# Copyright: Copyright (C) 2009-2013 A. S. Budden
# Permission is hereby granted to use and distribute this code,
# with or without modifications, provided that this copyright
# notice is c... | 38.648649 | 110 | 0.544755 | 4,827 | 0.843881 | 0 | 0 | 0 | 0 | 0 | 0 | 1,601 | 0.279895 |
d3c84323f9dc3dcd909b2c9adb14b8efc078f1c5 | 6,099 | py | Python | archive/bayes_sensor.py | robmarkcole/HASS-data-science | 7edd07a1519682683b42d140d6268a87d91522ec | [
"MIT"
] | 11 | 2018-01-21T02:37:02.000Z | 2022-01-20T03:32:40.000Z | archive/bayes_sensor.py | robmarkcole/HASS-data-science | 7edd07a1519682683b42d140d6268a87d91522ec | [
"MIT"
] | null | null | null | archive/bayes_sensor.py | robmarkcole/HASS-data-science | 7edd07a1519682683b42d140d6268a87d91522ec | [
"MIT"
] | 8 | 2017-12-19T14:05:33.000Z | 2021-12-08T09:54:06.000Z | """
Bayes sensor code split out from
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/binary_sensor/bayesian.py
This module is used to explore the sensor.
"""
from collections import OrderedDict
from const import *
def update_probability(prior, prob_true, prob_false):
"""Update ... | 33.510989 | 108 | 0.643384 | 5,146 | 0.843745 | 0 | 0 | 1,897 | 0.311035 | 0 | 0 | 1,773 | 0.290703 |
d3c8f408394af973ef52e2eab96bcf7c6c3f5ac5 | 27,212 | py | Python | CoarseNet/MinutiaeNet_utils.py | khaihp98/minutiae | afb7feff33ef86a673f899006aded486964f18dc | [
"MIT"
] | null | null | null | CoarseNet/MinutiaeNet_utils.py | khaihp98/minutiae | afb7feff33ef86a673f899006aded486964f18dc | [
"MIT"
] | null | null | null | CoarseNet/MinutiaeNet_utils.py | khaihp98/minutiae | afb7feff33ef86a673f899006aded486964f18dc | [
"MIT"
] | null | null | null | import os
import glob
import shutil
import logging
import matplotlib.pyplot as plt
import numpy as np
from scipy import ndimage, misc, signal, spatial
from skimage.filters import gaussian, gabor_kernel
import cv2
import math
def mkdir(path):
if not os.path.exists(path):
os.makedirs(path)
def re_mkdir(p... | 32.785542 | 118 | 0.561921 | 5,101 | 0.187454 | 0 | 0 | 0 | 0 | 0 | 0 | 1,487 | 0.054645 |
d3c9a9f08cb2ab991b3fa5be8156332e24b37380 | 52 | py | Python | config/paths.py | fusic-com/flask-todo | 909ce22132ed081feca02e2fb255afa08b59611d | [
"MIT"
] | 34 | 2015-01-08T07:11:54.000Z | 2021-08-28T23:55:25.000Z | config/paths.py | spacecode-live/flask-todo | 909ce22132ed081feca02e2fb255afa08b59611d | [
"MIT"
] | null | null | null | config/paths.py | spacecode-live/flask-todo | 909ce22132ed081feca02e2fb255afa08b59611d | [
"MIT"
] | 13 | 2015-02-10T09:48:53.000Z | 2021-03-02T15:23:21.000Z | from settings import VAR_DIR
CACHE=VAR_DIR/'cache'
| 13 | 28 | 0.807692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.134615 |
d3c9f4c940421bb8e75ec41e434f5dfd39d574c9 | 1,687 | py | Python | Android.py | ChakradharG/Sudoku-Core | 5963db235cecec4cc6682380c30b7af10a3c4d11 | [
"MIT"
] | null | null | null | Android.py | ChakradharG/Sudoku-Core | 5963db235cecec4cc6682380c30b7af10a3c4d11 | [
"MIT"
] | 1 | 2022-02-10T07:19:40.000Z | 2022-02-10T07:19:40.000Z | Android.py | ChakradharG/Sudoku-Solver | 5963db235cecec4cc6682380c30b7af10a3c4d11 | [
"MIT"
] | null | null | null | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' #To suppress warnings thrown by tensorflow
from time import sleep
import numpy as np
from cv2 import cv2
import pyautogui as pg
import Sudoku_Core as SC
import OCR
s = 513//9 #Size of board//9
fs = 25 #Size of the final image
def getBoard():
pg.click(266, 740)
sl... | 24.449275 | 109 | 0.653231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 402 | 0.238293 |
d3cb3a07ae3bcc910cc22e9e664b83887e73f8fe | 3,570 | py | Python | app/model.py | kurapikaaaa/CITS3403Project | 8958219845d5251830f2abd7c58dfd87d97b8c4a | [
"MIT"
] | 1 | 2021-08-04T12:50:57.000Z | 2021-08-04T12:50:57.000Z | app/model.py | kurapikaaaa/CITS3403Project | 8958219845d5251830f2abd7c58dfd87d97b8c4a | [
"MIT"
] | null | null | null | app/model.py | kurapikaaaa/CITS3403Project | 8958219845d5251830f2abd7c58dfd87d97b8c4a | [
"MIT"
] | 1 | 2021-08-12T10:40:28.000Z | 2021-08-12T10:40:28.000Z | from app import db, login
from flask_login import UserMixin
from datetime import datetime
from flask import url_for, redirect
from werkzeug.security import generate_password_hash, check_password_hash
class users(UserMixin, db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True, autoinc... | 30.254237 | 81 | 0.654622 | 3,174 | 0.889076 | 0 | 0 | 171 | 0.047899 | 0 | 0 | 215 | 0.060224 |
d3cb4fc2b23e4f4fb2c765f3d7673f2b43240708 | 19,911 | py | Python | bert_multitask_learning/top.py | akashnd/bert-multitask-learning | aee5be006ef6a3feadf0c751a6f9b42c24c3fd21 | [
"Apache-2.0"
] | 1 | 2021-07-11T14:07:59.000Z | 2021-07-11T14:07:59.000Z | bert_multitask_learning/top.py | akashnd/bert-multitask-learning | aee5be006ef6a3feadf0c751a6f9b42c24c3fd21 | [
"Apache-2.0"
] | null | null | null | bert_multitask_learning/top.py | akashnd/bert-multitask-learning | aee5be006ef6a3feadf0c751a6f9b42c24c3fd21 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: source_nbs/12_top.ipynb (unless otherwise specified).
__all__ = ['empty_tensor_handling_loss', 'nan_loss_handling', 'create_dummy_if_empty', 'BaseTop', 'SequenceLabel',
'Classification', 'PreTrain', 'Seq2Seq', 'MultiLabelClassification', 'MaskLM']
# Cell
import l... | 42.095137 | 138 | 0.638491 | 18,177 | 0.912912 | 0 | 0 | 951 | 0.047763 | 0 | 0 | 3,444 | 0.17297 |
d3cc0271bb0d934fe7034974b1385e41735a694e | 447 | py | Python | strings/#387/strings.py | sharmarkei/DSA-Practice | c98e9f5ae1824d86f02d1002d908dc24c8be8812 | [
"MIT"
] | null | null | null | strings/#387/strings.py | sharmarkei/DSA-Practice | c98e9f5ae1824d86f02d1002d908dc24c8be8812 | [
"MIT"
] | null | null | null | strings/#387/strings.py | sharmarkei/DSA-Practice | c98e9f5ae1824d86f02d1002d908dc24c8be8812 | [
"MIT"
] | null | null | null | class Solution(object):
def firstUniqChar(self, s):
"""
:type s: str
:rtype: int
"""
dict_1 = {}
for i in s:
if i not in dict_1:
dict_1[i] = 1
else:
dict_1[i] += 1
print(dict_1)
... | 20.318182 | 37 | 0.364653 | 438 | 0.979866 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.12528 |
d3cc0f069903b9e861ac782e53bdcec6efa743dd | 3,332 | py | Python | challenge/utils/cancellation_code.py | AlonViz/IML.HUJI | 107f7c20b8bd64d41452e4a5b66abe843af7eb18 | [
"MIT"
] | null | null | null | challenge/utils/cancellation_code.py | AlonViz/IML.HUJI | 107f7c20b8bd64d41452e4a5b66abe843af7eb18 | [
"MIT"
] | null | null | null | challenge/utils/cancellation_code.py | AlonViz/IML.HUJI | 107f7c20b8bd64d41452e4a5b66abe843af7eb18 | [
"MIT"
] | null | null | null | import re
def process_cancellation_code(code):
regex_days_before = "^(([0-9]+)D)(([0-9]+)N|([0-9]+)P)"
regex_no_show = "(([0-9]+)P|([0-9]+)N)"
options = re.split("_", code)
final = []
for option in options:
days_match = re.match(regex_days_before, option)
if days_match:
... | 40.634146 | 117 | 0.680972 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 513 | 0.153962 |
d3cd8f9eafbfda626f2013905a1df1f02a7ae23e | 1,163 | py | Python | acronym/scoring.py | sigma67/acronym | b197d12aa843fbf0e74efb67361f74b8157cc3e1 | [
"MIT"
] | 340 | 2018-03-30T21:00:54.000Z | 2022-03-25T20:05:45.000Z | acronym/scoring.py | sigma67/acronym | b197d12aa843fbf0e74efb67361f74b8157cc3e1 | [
"MIT"
] | 12 | 2018-03-30T15:48:05.000Z | 2020-07-16T08:27:02.000Z | acronym/scoring.py | sigma67/acronym | b197d12aa843fbf0e74efb67361f74b8157cc3e1 | [
"MIT"
] | 29 | 2018-03-30T16:55:34.000Z | 2022-02-25T03:20:26.000Z | import re
regex = re.compile('[^a-zA-Z]')
def score_word(word, corpus=None):
word = regex.sub('', word) # leave only alpha
score = 0
consec_bonus = 2
for i, letter in enumerate(word):
if letter.islower():
continue
if i > 0 and word[i-1].upper():
score += conse... | 31.432432 | 97 | 0.575236 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 430 | 0.369733 |
d3ce35364812f96b726436b7cd0cab140d019f97 | 956 | py | Python | e2e_test.py | bartossh/hebbian_mirror | 2d080ae7a707845e0922894e5cee2ad7b0119e8f | [
"MIT"
] | 2 | 2019-11-15T09:10:19.000Z | 2019-12-26T15:05:16.000Z | e2e_test.py | bartOssh/hebbian_mirror | 2d080ae7a707845e0922894e5cee2ad7b0119e8f | [
"MIT"
] | 1 | 2019-11-07T11:06:09.000Z | 2019-11-07T11:06:09.000Z | e2e_test.py | bartOssh/hebbian_mirror | 2d080ae7a707845e0922894e5cee2ad7b0119e8f | [
"MIT"
] | null | null | null | import requests
num_of_iter = 2
data = open('./assets/test.jpg', 'rb').read()
for i in range(0, num_of_iter):
res = requests.get(
url='http://0.0.0.0:8000/recognition/object/boxes_names'
)
print("\n RESPONSE GET boxes names for test number {}: \n {}"
.format(i, res.__dict__))
res = req... | 43.454545 | 94 | 0.58159 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 470 | 0.491632 |
d3ce5432cde433f90fde37eb3f5e56f8a23b111c | 7,698 | py | Python | appendix/auc_accuracy/train_nn_metric.py | rit-git/tagging | b075ce1553492be7088026b67f525a529bf03770 | [
"Apache-2.0"
] | 7 | 2020-11-21T03:45:34.000Z | 2022-03-25T00:40:20.000Z | appendix/auc_accuracy/train_nn_metric.py | rit-git/tagging | b075ce1553492be7088026b67f525a529bf03770 | [
"Apache-2.0"
] | null | null | null | appendix/auc_accuracy/train_nn_metric.py | rit-git/tagging | b075ce1553492be7088026b67f525a529bf03770 | [
"Apache-2.0"
] | 5 | 2020-09-21T15:07:21.000Z | 2021-06-02T20:25:36.000Z | import argparse
import os
import torch
import torch.nn as nn
from torchtext.data import TabularDataset, BucketIterator
from torchtext.data import Field
from torchtext.vocab import Vectors, GloVe
from tqdm import tqdm, trange
import sys
import os
sys.path.insert(0, "../../pyfunctor")
sys.path.insert(0, "../../model")
f... | 34.990909 | 99 | 0.587685 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 914 | 0.118732 |
d3ce6f7210df816909e214cda327fef650ba334a | 1,566 | py | Python | setup.py | teamproserve/pinkopy | 48842ac26aff90728482f7cac2977f56d5fc579f | [
"MIT"
] | null | null | null | setup.py | teamproserve/pinkopy | 48842ac26aff90728482f7cac2977f56d5fc579f | [
"MIT"
] | null | null | null | setup.py | teamproserve/pinkopy | 48842ac26aff90728482f7cac2977f56d5fc579f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
import sys
try:
import pypandoc
readme = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
with open('README.md') as f:
readme = f.read()
install_requires = [
'cachetools>=1.1.5',
'requests>=2.7.0',
'xm... | 27.964286 | 81 | 0.621328 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 832 | 0.53129 |
d3cf16476f10f947ae96e115903c726cd418feaf | 24,050 | py | Python | scss/extension/core.py | xen0n/pyScss | 86712d21fe7c3abdd7e593973fb35010422f1a41 | [
"MIT"
] | null | null | null | scss/extension/core.py | xen0n/pyScss | 86712d21fe7c3abdd7e593973fb35010422f1a41 | [
"MIT"
] | null | null | null | scss/extension/core.py | xen0n/pyScss | 86712d21fe7c3abdd7e593973fb35010422f1a41 | [
"MIT"
] | null | null | null | """Extension for built-in Sass functionality."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from itertools import product
import math
import os.path
from pathlib import PurePosixPath
from six.moves import xrange
... | 27.052868 | 80 | 0.614012 | 2,774 | 0.115343 | 0 | 0 | 17,612 | 0.732308 | 0 | 0 | 6,551 | 0.272391 |
d3d01a6d5b6d4e91e1847f49e77097d90f67ce9c | 906 | py | Python | pypy/module/cpyext/test/test_iterator.py | wdv4758h/mu-client-pypy | d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf | [
"Apache-2.0",
"OpenSSL"
] | 34 | 2015-07-09T04:53:27.000Z | 2021-07-19T05:22:27.000Z | pypy/module/cpyext/test/test_iterator.py | wdv4758h/mu-client-pypy | d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf | [
"Apache-2.0",
"OpenSSL"
] | 6 | 2015-05-30T17:20:45.000Z | 2017-06-12T14:29:23.000Z | pypy/module/cpyext/test/test_iterator.py | wdv4758h/mu-client-pypy | d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf | [
"Apache-2.0",
"OpenSSL"
] | 11 | 2015-09-07T14:26:08.000Z | 2020-04-10T07:20:41.000Z | from pypy.module.cpyext.test.test_api import BaseApiTest
class TestIterator(BaseApiTest):
def test_check_iter(self, space, api):
assert api.PyIter_Check(space.iter(space.wrap("a")))
assert api.PyIter_Check(space.iter(space.newlist([])))
assert not api.PyIter_Check(space.w_type)
ass... | 39.391304 | 62 | 0.684327 | 846 | 0.933775 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.003311 |
d3d143abd1287d1ebf9fec072e925b1f0bce15d1 | 21,407 | py | Python | capsule_em/experiment.py | jrmendeshurb/google-research | f9fa8cdd2fb77975b524371fd29df008b9dc6cf4 | [
"Apache-2.0"
] | 6 | 2019-12-16T04:23:57.000Z | 2021-12-09T14:17:14.000Z | capsule_em/experiment.py | jrmendeshurb/google-research | f9fa8cdd2fb77975b524371fd29df008b9dc6cf4 | [
"Apache-2.0"
] | 13 | 2020-01-28T22:19:53.000Z | 2022-02-10T00:39:26.000Z | capsule_em/experiment.py | ZachT1711/google-research | 662e6837a3efa0c40b11cb4122447c4b028d2115 | [
"Apache-2.0"
] | 1 | 2020-03-05T09:24:01.000Z | 2020-03-05T09:24:01.000Z | # coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# 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 applicab... | 40.390566 | 95 | 0.633998 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,113 | 0.285561 |
d3d3a5b087e35b140a4cca72077a3d96a9f4d93b | 42,865 | py | Python | grafana/common/dashboards/aggregated/client_subnet_statistics_detail.py | MikeAT/visualizer | 946b98d82eaf7ec508861115585afd683fc49e5c | [
"MIT"
] | 6 | 2021-03-03T17:52:24.000Z | 2022-02-10T11:45:22.000Z | grafana/common/dashboards/aggregated/client_subnet_statistics_detail.py | Acidburn0zzz/visualizer | 20fba91f0d26b98531f97f643c8329640d1c0d11 | [
"MIT"
] | 1 | 2021-04-29T12:34:04.000Z | 2021-04-29T14:50:17.000Z | grafana/common/dashboards/aggregated/client_subnet_statistics_detail.py | Acidburn0zzz/visualizer | 20fba91f0d26b98531f97f643c8329640d1c0d11 | [
"MIT"
] | 2 | 2021-04-27T14:02:03.000Z | 2021-11-12T10:34:32.000Z | # Copyright 2021 Internet Corporation for Assigned Names and Numbers.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# Developed by Sinodun IT (sinodun.com)
#
# Ag... | 46.04189 | 133 | 0.30778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27,147 | 0.633314 |
d3d41214e53cc3ba9f42c3c82841438366d8ce1d | 2,812 | py | Python | pylearn2/neuroimaging_utils/tutorials/nice/jobman/simple_train.py | rdevon/pylearn2 | f7b9a6ea0e2498176b47202f5bb83aec4976e1dd | [
"BSD-3-Clause"
] | 1 | 2017-10-29T06:18:35.000Z | 2017-10-29T06:18:35.000Z | pylearn2/neuroimaging_utils/tutorials/nice/jobman/simple_train.py | rdevon/pylearn2 | f7b9a6ea0e2498176b47202f5bb83aec4976e1dd | [
"BSD-3-Clause"
] | null | null | null | pylearn2/neuroimaging_utils/tutorials/nice/jobman/simple_train.py | rdevon/pylearn2 | f7b9a6ea0e2498176b47202f5bb83aec4976e1dd | [
"BSD-3-Clause"
] | null | null | null | """
Module to train a simple MLP for demo.
"""
from jobman.tools import expand
from jobman.tools import flatten
import logging
import nice_experiment
import numpy as np
from os import path
from pylearn2.config import yaml_parse
from pylearn2.neuroimaging_utils.datasets import MRI
from pylearn2.neuroimaging_utils.data... | 34.292683 | 91 | 0.629445 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 435 | 0.154694 |
d3d4d6dda5b57fc2a5aa6672a9cd0393e4d62ee6 | 6,199 | py | Python | _Framework/Layer.py | isfopo/MacroPushScript | 46c440aa3f6325d8767e88252c5520d76a9fa634 | [
"MIT"
] | null | null | null | _Framework/Layer.py | isfopo/MacroPushScript | 46c440aa3f6325d8767e88252c5520d76a9fa634 | [
"MIT"
] | null | null | null | _Framework/Layer.py | isfopo/MacroPushScript | 46c440aa3f6325d8767e88252c5520d76a9fa634 | [
"MIT"
] | null | null | null | #Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/Layer.py
u"""
Module implementing a way to resource-based access to controls in an
unified interface dynamic.
"""
from __future__ import absolute_import, print_function, unicode_literals
fr... | 33.874317 | 139 | 0.658816 | 5,575 | 0.899339 | 0 | 0 | 0 | 0 | 0 | 0 | 1,878 | 0.302952 |
d3d6cda09c480bcbc5eba0a289993557df421803 | 1,529 | py | Python | src/retrieve_exons_sequence_genomes.py | naturalis/brassicaceae-hybseq-pipeline | b71462d308b8a4adbc370691bf085d44666914d7 | [
"MIT"
] | 5 | 2020-04-22T12:08:07.000Z | 2021-09-03T01:56:44.000Z | src/retrieve_exons_sequence_genomes.py | naturalis/brassicaceae-hybseq-pipeline | b71462d308b8a4adbc370691bf085d44666914d7 | [
"MIT"
] | 1 | 2020-09-16T11:29:15.000Z | 2020-09-16T11:29:15.000Z | src/retrieve_exons_sequence_genomes.py | naturalis/brassicaceae-hybseq-pipeline | b71462d308b8a4adbc370691bf085d44666914d7 | [
"MIT"
] | 1 | 2020-09-16T14:05:08.000Z | 2020-09-16T14:05:08.000Z | # retrieve_exons_sequence_genomes.py
# This script is to retrieve exons from sequenced genomes which are also present in the reference genome (A. thaliana).
# To identify the contigs from the sequenced genomes, each contig has to be retrieved from A. thaliana first.
# Then, for each sequence query of A. thaliana, the q... | 41.324324 | 119 | 0.743623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 929 | 0.607587 |
d3d7b8b121c459940512749ce36dcfbad947c964 | 1,136 | py | Python | lexical/lexical.py | xmeng17/Malicious-URL-Detection | f286aeb50570455486b470cbc2db9aa0fae99b8f | [
"MIT"
] | null | null | null | lexical/lexical.py | xmeng17/Malicious-URL-Detection | f286aeb50570455486b470cbc2db9aa0fae99b8f | [
"MIT"
] | null | null | null | lexical/lexical.py | xmeng17/Malicious-URL-Detection | f286aeb50570455486b470cbc2db9aa0fae99b8f | [
"MIT"
] | null | null | null | import re
class lexical(object):
'''Lexical Features:
Top Level domain (str)
Number of dots in hostname (int)
Average token length of hostname (float)
Max token length of hostname (int)
Average token length of path (float)
Max token length of path (int)
'''
def __init__(self):
pass
de... | 26.418605 | 70 | 0.617958 | 1,148 | 0.989655 | 0 | 0 | 0 | 0 | 0 | 0 | 418 | 0.360345 |
d3d87b798d29e52210031306b4e2f4fee10a8cd2 | 992 | py | Python | stacker/tests/providers/aws/test_interactive.py | GoodRx/stacker | 0cf1df67b4ae5aeda5845442c84905909101c238 | [
"BSD-2-Clause"
] | 1 | 2021-11-06T17:01:01.000Z | 2021-11-06T17:01:01.000Z | stacker/tests/providers/aws/test_interactive.py | GoodRx/stacker | 0cf1df67b4ae5aeda5845442c84905909101c238 | [
"BSD-2-Clause"
] | null | null | null | stacker/tests/providers/aws/test_interactive.py | GoodRx/stacker | 0cf1df67b4ae5aeda5845442c84905909101c238 | [
"BSD-2-Clause"
] | 1 | 2021-11-06T17:00:53.000Z | 2021-11-06T17:00:53.000Z | import unittest
from ....providers.aws.interactive import requires_replacement
def generate_resource_change(replacement=True):
resource_change = {
"Action": "Modify",
"Details": [],
"LogicalResourceId": "Fake",
"PhysicalResourceId": "arn:aws:fake",
"Replacement": "True" if ... | 30.060606 | 79 | 0.634073 | 477 | 0.480847 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.222782 |
d3d9152a0002e3e05bd42184c7b5ca8570672123 | 1,046 | py | Python | setup.py | digicert/digicert_express | 292fb4e7f8a39e53c384a79c50a9488c51258f97 | [
"MIT"
] | 2 | 2017-03-03T20:37:29.000Z | 2018-06-01T22:22:15.000Z | setup.py | digicert/digicert_express | 292fb4e7f8a39e53c384a79c50a9488c51258f97 | [
"MIT"
] | null | null | null | setup.py | digicert/digicert_express | 292fb4e7f8a39e53c384a79c50a9488c51258f97 | [
"MIT"
] | 2 | 2018-01-26T07:11:42.000Z | 2019-03-06T23:30:39.000Z | from setuptools import setup, find_packages
def readme():
with open('README.rst') as f:
return f.read()
setup(
name='digicert-express',
version='1.1dev2',
description='Express Install for DigiCert, Inc.',
long_description=readme(),
classifiers=[
'Development Status :: 3 - Alpha... | 29.885714 | 92 | 0.605163 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 536 | 0.512428 |
d3d9c66d64ebac5543f8099d6066695442fe0072 | 11,392 | py | Python | pytorch/plane.py | NunoEdgarGFlowHub/autoregressive-energy-machines | eb5517a513cf4e99db674fa41170f018e212f1e2 | [
"MIT"
] | 83 | 2019-04-12T10:23:23.000Z | 2022-03-30T12:40:43.000Z | pytorch/plane.py | sten2lu/autoregressive-energy-machines | eb5517a513cf4e99db674fa41170f018e212f1e2 | [
"MIT"
] | null | null | null | pytorch/plane.py | sten2lu/autoregressive-energy-machines | eb5517a513cf4e99db674fa41170f018e212f1e2 | [
"MIT"
] | 11 | 2019-04-12T11:26:00.000Z | 2020-05-12T01:14:21.000Z | import argparse
import json
import numpy as np
import os
import torch
import data_
import models
import utils
from matplotlib import cm, pyplot as plt
from tensorboardX import SummaryWriter
from torch import optim
from torch.utils import data
from tqdm import tqdm
from utils import io
parser = argparse.ArgumentPars... | 39.147766 | 98 | 0.675298 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,762 | 0.242451 |
d3d9fd962e6f2a91b7a5a73a99c81d54531258d8 | 2,266 | py | Python | music/music.py | spacerunaway/world_recoder | fcafe0d910511cfd043735cf451564febb558e40 | [
"MIT"
] | null | null | null | music/music.py | spacerunaway/world_recoder | fcafe0d910511cfd043735cf451564febb558e40 | [
"MIT"
] | null | null | null | music/music.py | spacerunaway/world_recoder | fcafe0d910511cfd043735cf451564febb558e40 | [
"MIT"
] | null | null | null | import sys
sys.path.append('../utils')
from utils import *
from doubly_linkedlist import *
def link_chords(chordprogression):
"""
Chord progression is a sequences of chords.
A valid linked_chords can be one of the following:
1: the chord name(str) in CHORD dict
2: the key(type Key)
and a music ... | 29.815789 | 98 | 0.573698 | 706 | 0.311562 | 0 | 0 | 0 | 0 | 0 | 0 | 948 | 0.418358 |
d3da2efce64cb5f88a134e97d2a4092ee8ea80bb | 5,777 | py | Python | azure-mgmt/tests/test_mgmt_documentdb.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure-mgmt/tests/test_mgmt_documentdb.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 54 | 2016-03-25T17:25:01.000Z | 2018-10-22T17:27:54.000Z | azure-mgmt/tests/test_mgmt_documentdb.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.000Z | # 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.
#---------------------------------------------------------------------... | 37.512987 | 101 | 0.570885 | 5,043 | 0.872642 | 0 | 0 | 668 | 0.115591 | 0 | 0 | 1,317 | 0.227894 |
d3da88558c778364e49a959d5f0d8f942db1cc43 | 3,758 | py | Python | config.py | somritabanerjee/speedplusbaseline | 5913c611d8c182ad8070abcf5f1baffc554dfd90 | [
"MIT"
] | null | null | null | config.py | somritabanerjee/speedplusbaseline | 5913c611d8c182ad8070abcf5f1baffc554dfd90 | [
"MIT"
] | null | null | null | config.py | somritabanerjee/speedplusbaseline | 5913c611d8c182ad8070abcf5f1baffc554dfd90 | [
"MIT"
] | null | null | null | import argparse
PROJROOTDIR = {'mac': '/Users/taehapark/SLAB/speedplusbaseline',
'linux': '/home/somrita/Documents/Satellite_Pose_Estimation/speedplusbaseline'}
DATAROOTDIR = {'mac': '/Users/taehapark/SLAB/speedplus/data/datasets',
'linux': '/home/somrita/Documents/Satellite_Pose_Estim... | 58.71875 | 104 | 0.631453 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,736 | 0.461948 |
d3dacb32ea41d2fb0546ec04640a3b17315faa08 | 118,963 | py | Python | h1/api/insight_project_journal_api.py | hyperonecom/h1-client-python | 4ce355852ba3120ec1b8f509ab5894a5c08da730 | [
"MIT"
] | null | null | null | h1/api/insight_project_journal_api.py | hyperonecom/h1-client-python | 4ce355852ba3120ec1b8f509ab5894a5c08da730 | [
"MIT"
] | null | null | null | h1/api/insight_project_journal_api.py | hyperonecom/h1-client-python | 4ce355852ba3120ec1b8f509ab5894a5c08da730 | [
"MIT"
] | null | null | null | """
HyperOne
HyperOne API # noqa: E501
The version of the OpenAPI document: 0.1.0
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from h1.api_client import ApiClient, Endpoint as _Endpoint
from h1.model_utils import ( # noqa: F401
check_allowe... | 37.362751 | 179 | 0.451342 | 117,868 | 0.990795 | 0 | 0 | 0 | 0 | 0 | 0 | 64,388 | 0.541244 |
d3db48db20a20bc47e28f0062af79ebd64f3fa41 | 811 | py | Python | forms/views.py | urchinpro/L2-forms | 37f33386984efbb2d1e92c73d915256247801109 | [
"MIT"
] | null | null | null | forms/views.py | urchinpro/L2-forms | 37f33386984efbb2d1e92c73d915256247801109 | [
"MIT"
] | null | null | null | forms/views.py | urchinpro/L2-forms | 37f33386984efbb2d1e92c73d915256247801109 | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.utils.module_loading import import_string
def pdf(request):
"""
Get form's number (decimal type: 101.15 - where "101" is form's group and "15"-number itsels).
Can't use 1,2,3,4,5,6,7,8,9 for number itsels - which stands after the point.
Bacause in datab... | 38.619048 | 103 | 0.670777 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 487 | 0.600493 |
d3dcc92c42ee28b5565e1b1bdf3f0bd8727161d9 | 5,087 | py | Python | main.py | code-aifarmer/Python-EXE-maker | 4b7436353c9a0d46b52543304209b057dcac51c1 | [
"MIT"
] | 2 | 2021-01-26T10:19:15.000Z | 2021-06-27T03:38:00.000Z | main.py | code-aifarmer/Python-EXE-maker | 4b7436353c9a0d46b52543304209b057dcac51c1 | [
"MIT"
] | null | null | null | main.py | code-aifarmer/Python-EXE-maker | 4b7436353c9a0d46b52543304209b057dcac51c1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import PySimpleGUI as sg
import cv2
import subprocess
import shutil
import os
import sys
# Demonstrates a number of PySimpleGUI features including:
# Default element size
# auto_size_buttons
# Button
# Dictionary return values
# update of elements in form (Text, Input)
def runCommand(cmd... | 38.832061 | 120 | 0.569294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,628 | 0.319028 |
d3dd8c075e4b425fd099e7113200bcfa2c88d3c5 | 152 | py | Python | seisflows/system/lsf_sm.py | jpvantassel/seisflows | 5155ec177b5df0218e1fb5204f1fcd6969c66f20 | [
"BSD-2-Clause"
] | 97 | 2016-11-18T21:19:28.000Z | 2022-03-31T15:02:42.000Z | seisflows/system/lsf_sm.py | SuwenJunliu/seisflows | 14d246691acf8e8549487a5db7c7cd877d23a2ae | [
"BSD-2-Clause"
] | 30 | 2017-02-21T14:54:14.000Z | 2021-08-30T01:44:39.000Z | seisflows/system/lsf_sm.py | SuwenJunliu/seisflows | 14d246691acf8e8549487a5db7c7cd877d23a2ae | [
"BSD-2-Clause"
] | 78 | 2017-03-01T15:32:29.000Z | 2022-01-31T09:09:17.000Z | #
# This is Seisflows
#
# See LICENCE file
#
###############################################################################
raise NotImplementedError
| 16.888889 | 79 | 0.348684 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.782895 |
d3ddd574dde8899b673c876fe79246ef6fe9f23e | 938 | py | Python | data/objects/sample.py | predictive-analytics-lab/tiny-comparison-framework | 8ae482a2e69aa5affe94bcd7982e53ad69228d43 | [
"Apache-2.0"
] | null | null | null | data/objects/sample.py | predictive-analytics-lab/tiny-comparison-framework | 8ae482a2e69aa5affe94bcd7982e53ad69228d43 | [
"Apache-2.0"
] | null | null | null | data/objects/sample.py | predictive-analytics-lab/tiny-comparison-framework | 8ae482a2e69aa5affe94bcd7982e53ad69228d43 | [
"Apache-2.0"
] | null | null | null | from data.objects.data import Data
class Sample(Data):
"""
A way to sample from a dataset for testing purposes.
"""
def __init__(self, data, num = 100):
self.data = data
self.dataset_name = data.get_dataset_name()
self.class_attr = data.get_class_attribute()
self.positiv... | 42.636364 | 80 | 0.711087 | 901 | 0.960554 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.089552 |
d3de757442c04a58c632f23911d3bb3230eadbab | 572 | py | Python | parkrundata/views.py | remarkablerocket/parkrundata | c717b59771629d6308ec093e29fd373981726fde | [
"BSD-3-Clause"
] | null | null | null | parkrundata/views.py | remarkablerocket/parkrundata | c717b59771629d6308ec093e29fd373981726fde | [
"BSD-3-Clause"
] | null | null | null | parkrundata/views.py | remarkablerocket/parkrundata | c717b59771629d6308ec093e29fd373981726fde | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from rest_framework import viewsets
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from .models import Country, Event
from .serializers import CountrySerializer, EventSerializer
class CountryViewSet(viewsets.ModelViewSet):
queryset = Country.objects.all()
serializer... | 28.6 | 64 | 0.798951 | 344 | 0.601399 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.04021 |
d3df3020e02d0033dd7ab9554f7528acd2742527 | 21,764 | py | Python | spearmint/models/gp_classifier.py | jatinarora2409/Spearmint | a209eb8aa7d5d93f2fdca6cff50dc17a94d926ab | [
"RSA-MD"
] | null | null | null | spearmint/models/gp_classifier.py | jatinarora2409/Spearmint | a209eb8aa7d5d93f2fdca6cff50dc17a94d926ab | [
"RSA-MD"
] | null | null | null | spearmint/models/gp_classifier.py | jatinarora2409/Spearmint | a209eb8aa7d5d93f2fdca6cff50dc17a94d926ab | [
"RSA-MD"
] | null | null | null | # -*- coding: utf-8 -*-
# Spearmint
#
# Academic and Non-Commercial Research Use Software License and Terms
# of Use
#
# Spearmint is a software package to perform Bayesian optimization
# according to specific algorithms (the “Software”). The Software is
# designed to automatically run experiments (thus the code name
... | 43.354582 | 142 | 0.684111 | 11,149 | 0.510626 | 0 | 0 | 635 | 0.029083 | 0 | 0 | 12,354 | 0.565815 |
d3e0c86fec4a82ec7ab6e46d19afaf6635bc9e88 | 1,125 | py | Python | pycom_lopy4_LoRaBattMonitor/transmitter/main.py | AidanTek/Fab-Cre8_IoT | 3d358a484aea2e2a50d6dbef443e9a2757ef9ab8 | [
"MIT"
] | null | null | null | pycom_lopy4_LoRaBattMonitor/transmitter/main.py | AidanTek/Fab-Cre8_IoT | 3d358a484aea2e2a50d6dbef443e9a2757ef9ab8 | [
"MIT"
] | null | null | null | pycom_lopy4_LoRaBattMonitor/transmitter/main.py | AidanTek/Fab-Cre8_IoT | 3d358a484aea2e2a50d6dbef443e9a2757ef9ab8 | [
"MIT"
] | null | null | null | from machine import Pin, ADC
from network import LoRa
import socket
from utime import sleep
# Use a pin for a 'config' mode
configPin = Pin('P21', Pin.IN, Pin.PULL_UP)
# Create an ADC object
adc = ADC()
# vbatt pin:
vbatt = adc.channel(attn=1, pin='P16')
def battConversion():
adcVoltage = vbatt()
voltage = ... | 20.454545 | 59 | 0.686222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 362 | 0.321778 |
d3e103df05be9ac935fd9148b0ac418dab33e33f | 7,209 | py | Python | scrapi/harvesters/lwbin.py | wearpants/scrapi | b1619a1212d9fc7e1f2247336fc2e4a3d453a4bb | [
"Apache-2.0"
] | 34 | 2015-10-06T20:08:43.000Z | 2022-03-16T12:46:24.000Z | scrapi/harvesters/lwbin.py | jgw4sq/twilio | 796e97dc6a8fdb8983fd736b328ad907bb1ff73e | [
"Apache-2.0"
] | 100 | 2015-09-10T19:57:32.000Z | 2016-06-22T03:09:51.000Z | scrapi/harvesters/lwbin.py | jgw4sq/twilio | 796e97dc6a8fdb8983fd736b328ad907bb1ff73e | [
"Apache-2.0"
] | 32 | 2015-09-09T21:28:54.000Z | 2019-05-09T03:18:02.000Z | """
A Lake Winnipeg Basin Information Network (BIN) harvester for the SHARE project
Example API request: http://130.179.67.140/api/3/action/package_search?q= (problematic)
http://130.179.67.140/api/3/action/current_package_list_with_resources (currently using)
It oddly returns 5 more datasets than all searchable ones ... | 36.226131 | 148 | 0.615758 | 2,761 | 0.382993 | 0 | 0 | 1,670 | 0.231655 | 0 | 0 | 3,312 | 0.459426 |
d3e19347ed0ddda8633be363dd6cfd4b345245b2 | 402 | py | Python | catalog/bindings/gmd/point.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/gmd/point.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/gmd/point.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from bindings.gmd.point_type import PointType
__NAMESPACE__ = "http://www.opengis.net/gml"
@dataclass
class Point(PointType):
"""A Point is defined by a single coordinate tuple.
The direct position of a point is specified by the pos element which
is of type DirectPositi... | 23.647059 | 72 | 0.721393 | 262 | 0.651741 | 0 | 0 | 273 | 0.679104 | 0 | 0 | 224 | 0.557214 |
d3e28f994d4f8d390af434d713b2e934cf2435a9 | 1,050 | py | Python | hknweb/exams/migrations/0019_auto_20200413_0212.py | AndrewKe/hknweb | 8b0591625ffe0b2fa1f50fec453d674a03f52a2e | [
"MIT"
] | null | null | null | hknweb/exams/migrations/0019_auto_20200413_0212.py | AndrewKe/hknweb | 8b0591625ffe0b2fa1f50fec453d674a03f52a2e | [
"MIT"
] | null | null | null | hknweb/exams/migrations/0019_auto_20200413_0212.py | AndrewKe/hknweb | 8b0591625ffe0b2fa1f50fec453d674a03f52a2e | [
"MIT"
] | null | null | null | # Generated by Django 2.2.8 on 2020-04-13 09:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('exams', '0018_auto_20200412_1715'),
]
operations = [
migrations.CreateModel(
name='ExamChoice',... | 30 | 114 | 0.590476 | 924 | 0.88 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.189524 |
d3e3af31f72741b010fae28e3067fb84c2fb37ac | 1,028 | py | Python | tools/linear_algebra/preconditioners/Jacobi.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | 1 | 2020-10-14T12:48:35.000Z | 2020-10-14T12:48:35.000Z | tools/linear_algebra/preconditioners/Jacobi.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | null | null | null | tools/linear_algebra/preconditioners/Jacobi.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Jacobian preconditioner.
"""
from root.config.main import *
from scipy import sparse as spspa
from tools.linear_algebra.preconditioners.base import Preconditioner
class JacobiPreconditioner(Preconditioner):
""""""
def __init__(self, A):
""""""
super(JacobiPreconditio... | 25.073171 | 68 | 0.592412 | 836 | 0.81323 | 0 | 0 | 645 | 0.627432 | 0 | 0 | 86 | 0.083658 |
d3e577b90c506a8bda99f5b1083dfe14aebd03c5 | 904 | py | Python | social_redirects/models.py | JoshZero87/site | c8024b805ff5ff0e16f54dce7bf05097fd2f08e0 | [
"MIT"
] | 4 | 2017-01-29T00:38:41.000Z | 2019-09-04T14:30:24.000Z | social_redirects/models.py | JoshZero87/site | c8024b805ff5ff0e16f54dce7bf05097fd2f08e0 | [
"MIT"
] | 74 | 2017-10-02T04:42:54.000Z | 2022-01-13T00:44:16.000Z | social_redirects/models.py | JoshZero87/site | c8024b805ff5ff0e16f54dce7bf05097fd2f08e0 | [
"MIT"
] | 3 | 2017-03-24T23:26:46.000Z | 2019-10-21T01:16:03.000Z | from django.contrib.sites.models import Site
from django.db import models
class Redirect(models.Model):
title = models.CharField(max_length=200)
description = models.CharField(max_length=1024, blank=True, null=True)
social_image = models.ImageField(null=True, blank=True)
old_path = models.CharField(m... | 45.2 | 193 | 0.710177 | 826 | 0.913717 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.267699 |
d3e869c2c7fff869303aff8cf0f763aad3c88462 | 7,767 | py | Python | response_model/python/population_subunits/coarse/analysis/few_cells_tf_analyse_all.py | googlearchive/rgc-models | 0dea94bbd54f591d82d95169e33d40bb55b6be94 | [
"Apache-2.0"
] | 1 | 2018-09-18T16:47:09.000Z | 2018-09-18T16:47:09.000Z | response_model/python/population_subunits/coarse/analysis/few_cells_tf_analyse_all.py | google/rgc-models | 0dea94bbd54f591d82d95169e33d40bb55b6be94 | [
"Apache-2.0"
] | null | null | null | response_model/python/population_subunits/coarse/analysis/few_cells_tf_analyse_all.py | google/rgc-models | 0dea94bbd54f591d82d95169e33d40bb55b6be94 | [
"Apache-2.0"
] | 1 | 2022-01-12T12:44:17.000Z | 2022-01-12T12:44:17.000Z | # Copyright 2018 Google LLC
#
# 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, s... | 38.450495 | 143 | 0.624179 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,459 | 0.316596 |
d3e9aaa50f57573a484dd6d782bbd14b01bbbceb | 2,074 | py | Python | wagtail/admin/views/pages/unpublish.py | brownaa/wagtail | c97bc56c6822eb1b6589d5c33e07f71acfc48845 | [
"BSD-3-Clause"
] | 8,851 | 2016-12-09T19:01:45.000Z | 2022-03-31T04:45:06.000Z | wagtail/admin/views/pages/unpublish.py | brownaa/wagtail | c97bc56c6822eb1b6589d5c33e07f71acfc48845 | [
"BSD-3-Clause"
] | 5,197 | 2016-12-09T19:24:37.000Z | 2022-03-31T22:17:55.000Z | wagtail/admin/views/pages/unpublish.py | brownaa/wagtail | c97bc56c6822eb1b6589d5c33e07f71acfc48845 | [
"BSD-3-Clause"
] | 2,548 | 2016-12-09T18:16:55.000Z | 2022-03-31T21:34:38.000Z | from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404, redirect
from django.template.response import TemplateResponse
from django.urls import reverse
from django.utils.translation import gettext as _
from wagtail.admin import messages
from wagtail.admin.views.pages.utils im... | 37.709091 | 112 | 0.696721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 254 | 0.122469 |
d3e9c1e71145908db6a37bf71e7072535569119d | 14,783 | py | Python | bcipy/display/rsvp/display.py | mberkanbicer/BciPy | c18878ad6fc4d1f69e2091b8f029f3b9ab9a923a | [
"MIT"
] | 32 | 2020-11-13T17:53:25.000Z | 2022-03-24T21:12:31.000Z | bcipy/display/rsvp/display.py | mberkanbicer/BciPy | c18878ad6fc4d1f69e2091b8f029f3b9ab9a923a | [
"MIT"
] | 20 | 2020-12-02T17:40:42.000Z | 2022-03-16T16:38:05.000Z | bcipy/display/rsvp/display.py | mberkanbicer/BciPy | c18878ad6fc4d1f69e2091b8f029f3b9ab9a923a | [
"MIT"
] | 10 | 2020-12-16T02:32:37.000Z | 2022-03-23T16:31:59.000Z | import logging
import os.path as path
from typing import List, Optional, Tuple
from psychopy import core, visual
from bcipy.acquisition.marker_writer import NullMarkerWriter, MarkerWriter
from bcipy.helpers.task import SPACE_CHAR
from bcipy.helpers.stimuli import resize_image
from bcipy.helpers.system_utils import ge... | 37.330808 | 102 | 0.558412 | 14,367 | 0.97186 | 0 | 0 | 0 | 0 | 0 | 0 | 4,453 | 0.301224 |
d3e9f7de3f63d7f3de57a5c2272c7c0ae564d742 | 932 | py | Python | cloud/db/db.py | bother3000/Smart-IoT-Planting-System | 7c33f150850fb8c9bc250fa02bf306f02f7cafb8 | [
"MIT"
] | 171 | 2017-09-22T08:25:18.000Z | 2022-02-28T07:56:41.000Z | cloud/db/db.py | bother3000/Smart-IoT-Planting-System | 7c33f150850fb8c9bc250fa02bf306f02f7cafb8 | [
"MIT"
] | 2 | 2018-06-28T02:33:04.000Z | 2021-06-09T06:56:58.000Z | cloud/db/db.py | bother3000/Smart-IoT-Planting-System | 7c33f150850fb8c9bc250fa02bf306f02f7cafb8 | [
"MIT"
] | 108 | 2017-10-03T20:11:52.000Z | 2022-03-19T15:21:48.000Z | #!/usr/bin/env python
import pymysql #Python3
db = pymysql.connect("localhost","sips","root","zaijian" )
cursor = db.cursor()
cursor.execute("SELECT VERSION()")
data = cursor.fetchone()
print ("Database version : %s " % data)
db.close()
def create_table():
db = pymysql.connect("localhost","sips","root","zaijian"... | 23.897436 | 60 | 0.610515 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 487 | 0.522532 |
d3ea46bda3dee2d1a7eb7b7fac100d0a90820e25 | 14,363 | py | Python | sdk/python/pulumi_aws_native/amplify/_inputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/amplify/_inputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/amplify/_inputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 34.609639 | 124 | 0.664555 | 13,540 | 0.9427 | 0 | 0 | 13,711 | 0.954606 | 0 | 0 | 2,111 | 0.146975 |
d3eaa974be46c94752b5084755d30c91ec1e2ca1 | 4,203 | py | Python | awsecommerceservice/models/item_lookup_request.py | nidaizamir/Test-PY | 26ea1019115a1de3b1b37a4b830525e164ac55ce | [
"MIT"
] | null | null | null | awsecommerceservice/models/item_lookup_request.py | nidaizamir/Test-PY | 26ea1019115a1de3b1b37a4b830525e164ac55ce | [
"MIT"
] | null | null | null | awsecommerceservice/models/item_lookup_request.py | nidaizamir/Test-PY | 26ea1019115a1de3b1b37a4b830525e164ac55ce | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
awsecommerceservice
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""
class ItemLookupRequest(object):
"""Implementation of the 'ItemLookupRequest' model.
TODO: type model description here.
Attributes:
condition (ConditionE... | 35.618644 | 83 | 0.623602 | 4,056 | 0.965025 | 0 | 0 | 1,613 | 0.383773 | 0 | 0 | 2,057 | 0.489412 |
d3eb09e186d2266dd713792bddd6301d09f60a0f | 6,372 | py | Python | data.py | zhaoyun630/R-NET-in-Keras | 425ed06ff5322cd5187b8e321865ab0459ec3825 | [
"MIT"
] | 207 | 2017-07-12T18:14:38.000Z | 2021-08-01T20:25:44.000Z | data.py | zhaoyun630/R-NET-in-Keras | 425ed06ff5322cd5187b8e321865ab0459ec3825 | [
"MIT"
] | 31 | 2017-08-20T08:30:48.000Z | 2021-03-03T17:47:46.000Z | data.py | zhaoyun630/R-NET-in-Keras | 425ed06ff5322cd5187b8e321865ab0459ec3825 | [
"MIT"
] | 102 | 2017-07-28T11:19:49.000Z | 2021-08-01T20:26:31.000Z | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import numpy as np
import cPickle as pickle
from keras import backend as K
from keras.utils import np_utils
from keras.preprocessing import sequence
from random import shuffle
import itertools
def load_datas... | 31.701493 | 97 | 0.557439 | 5,142 | 0.806968 | 2,750 | 0.431576 | 0 | 0 | 0 | 0 | 555 | 0.0871 |
d3ebad071ed8577b67556835d306ad97a7a130ad | 217 | py | Python | algoritmos/ajuste-curvas/caso-linear/Teste.py | mauriciomoccelin/metodos-numericos | 67bdb305d4db8a59943a17128ba2c06fefcc4a36 | [
"MIT"
] | 3 | 2019-07-03T18:05:44.000Z | 2020-02-04T16:37:21.000Z | algoritmos/ajuste-curvas/caso-linear/Teste.py | mauriciomoccelin/metodos-numericos | 67bdb305d4db8a59943a17128ba2c06fefcc4a36 | [
"MIT"
] | null | null | null | algoritmos/ajuste-curvas/caso-linear/Teste.py | mauriciomoccelin/metodos-numericos | 67bdb305d4db8a59943a17128ba2c06fefcc4a36 | [
"MIT"
] | null | null | null | from RegressaoLinear import RegressaoLinear
planoCartesiano = {
0.5: 4.4,
2.8: 1.8,
4.2: 1.0,
6.7: 0.4,
8.3: 0.2
}
regressaoLinear = RegressaoLinear(planoCartesiano)
print(regressaoLinear.gerar_equacao())
| 16.692308 | 50 | 0.705069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d3ec165a9fa9c3cf83a87cdf6db9f7df86904452 | 1,528 | py | Python | src/app.py | UBC-MDS/dsci_532_group19 | 9814f8f3bc2cf95c5855becf2d92265b8a97893d | [
"MIT"
] | null | null | null | src/app.py | UBC-MDS/dsci_532_group19 | 9814f8f3bc2cf95c5855becf2d92265b8a97893d | [
"MIT"
] | 27 | 2022-02-15T01:08:06.000Z | 2022-03-18T23:49:45.000Z | src/app.py | UBC-MDS/dsci_532_group19 | 9814f8f3bc2cf95c5855becf2d92265b8a97893d | [
"MIT"
] | 2 | 2022-02-17T06:11:41.000Z | 2022-03-02T03:24:54.000Z | import dash
from dash import html
from dash import dcc
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output
from .layout import *
from .plot import *
# from layout import *
# from plot import *
app = dash.Dash(
__name__, external_stylesheets=[dbc.themes.BOOTSTRAP, "/css/button.css"... | 20.931507 | 76 | 0.655759 | 0 | 0 | 0 | 0 | 936 | 0.612565 | 0 | 0 | 407 | 0.266361 |
d3ed6b32008718ad48f1726c2f8858cca85dfe86 | 3,035 | py | Python | jaeger-cli/rpc.py | shwsun/jaeger-cli | cf8bb7a00184220c206ccd7468b89ce4ab5a706e | [
"Apache-2.0"
] | null | null | null | jaeger-cli/rpc.py | shwsun/jaeger-cli | cf8bb7a00184220c206ccd7468b89ce4ab5a706e | [
"Apache-2.0"
] | null | null | null | jaeger-cli/rpc.py | shwsun/jaeger-cli | cf8bb7a00184220c206ccd7468b89ce4ab5a706e | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 MassOpenCloud.
#
# 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 agr... | 27.590909 | 80 | 0.725206 | 1,086 | 0.357825 | 0 | 0 | 0 | 0 | 0 | 0 | 1,552 | 0.511367 |
d3ededa11ab3bf342dc8f952cbe323bf1951fb20 | 3,296 | py | Python | data_structure/tree/test_binarytree.py | lp1225/my_algorithm | c5995fd6ec8692a4f25280097b5c7f1459481b40 | [
"MIT"
] | 1 | 2019-07-03T16:23:09.000Z | 2019-07-03T16:23:09.000Z | data_structure/tree/test_binarytree.py | lp1225/my_algorithm | c5995fd6ec8692a4f25280097b5c7f1459481b40 | [
"MIT"
] | null | null | null | data_structure/tree/test_binarytree.py | lp1225/my_algorithm | c5995fd6ec8692a4f25280097b5c7f1459481b40 | [
"MIT"
] | null | null | null | # 搜索二叉树
from queue import Queue
class Node(object):
"""节点"""
def __init__(self, data):
self.data = data
self.node_left = None
self.node_right = None
class BinaryTree(object):
def __init__(self):
self.root = None
def insert(tree, node):
"""插入节点"""
if tree.... | 22.575342 | 58 | 0.531553 | 231 | 0.06719 | 0 | 0 | 0 | 0 | 0 | 0 | 569 | 0.165503 |
d3eed0d68517bbf2b89eb59f3fef60d4cac6c141 | 703 | py | Python | Python-desenvolvimento/ex036.py | MarcosMaciel-MMRS/Desenvolvimento-python | 2b2fc54788da3ca110d495b9e80a494f2b31fb09 | [
"MIT"
] | null | null | null | Python-desenvolvimento/ex036.py | MarcosMaciel-MMRS/Desenvolvimento-python | 2b2fc54788da3ca110d495b9e80a494f2b31fb09 | [
"MIT"
] | null | null | null | Python-desenvolvimento/ex036.py | MarcosMaciel-MMRS/Desenvolvimento-python | 2b2fc54788da3ca110d495b9e80a494f2b31fb09 | [
"MIT"
] | null | null | null | #empréstimos bancários. pegue o valor da casa, o salario da pessoa e em quanto tempo ela quer pagar.
#se as parcelas ficarem acima de 30% do salario, negue o imprestimo.
casa = float(input('Informe o valor da casa: R$'))
salario = float(input('informe seu salario: R$'))
tempo = int(input('Em quanto tempo planeja ... | 58.583333 | 117 | 0.709815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 508 | 0.714487 |
d3f026b7191d98da19a4514bcacdc0c4c65fbbab | 433 | py | Python | UDEMY-Learn Python Programming Masterclass/Section 3-Stepping into the World of Python/exercise4.py | Sanjay9921/Python | 05ac161dd46f9b4731a5c14ff5ef52adb705e8e6 | [
"MIT"
] | null | null | null | UDEMY-Learn Python Programming Masterclass/Section 3-Stepping into the World of Python/exercise4.py | Sanjay9921/Python | 05ac161dd46f9b4731a5c14ff5ef52adb705e8e6 | [
"MIT"
] | null | null | null | UDEMY-Learn Python Programming Masterclass/Section 3-Stepping into the World of Python/exercise4.py | Sanjay9921/Python | 05ac161dd46f9b4731a5c14ff5ef52adb705e8e6 | [
"MIT"
] | null | null | null | #Integer division
#You have a shop selling buns for $2.40 each. A customer comes in with $15, and would like to buy as many buns as possible.
#Complete the code to calculate how many buns the customer can afford.
#Note: Your customer won't be happy if you try to sell them part of a bun.
#Print only the result, any o... | 36.083333 | 124 | 0.745958 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.852194 |
d3f12db2d9a12b691dfde83d5ec0f772b55deb37 | 1,708 | py | Python | scripts/test_maths.py | paulscottrobson/Basic65816 | 167c25b1bbc2680f55acdf4bff771750acfe907c | [
"MIT"
] | null | null | null | scripts/test_maths.py | paulscottrobson/Basic65816 | 167c25b1bbc2680f55acdf4bff771750acfe907c | [
"MIT"
] | 4 | 2019-06-18T14:45:35.000Z | 2019-06-22T17:18:22.000Z | scripts/test_maths.py | paulscottrobson/Basic65816 | 167c25b1bbc2680f55acdf4bff771750acfe907c | [
"MIT"
] | 1 | 2021-03-18T04:31:44.000Z | 2021-03-18T04:31:44.000Z | # *******************************************************************************************
# *******************************************************************************************
#
# Name : test_maths.py
# Purpose : Create lots of variables/arrays and arithmetic/bitwise.
# Date : 10th June 2019
# Author... | 26.6875 | 93 | 0.466042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 676 | 0.395785 |
d3f286f3f58a2b5e1d9a8943be97eb809e75f53c | 19,191 | py | Python | qa/char_analyze.py | JinkelaCrops/t2t-learning | 5d9b5a5164af763c24f1cbce9d97561e9f2b772c | [
"Apache-2.0"
] | 5 | 2019-03-28T03:52:32.000Z | 2021-02-24T07:09:26.000Z | qa/char_analyze.py | JinkelaCrops/t2t-learning | 5d9b5a5164af763c24f1cbce9d97561e9f2b772c | [
"Apache-2.0"
] | null | null | null | qa/char_analyze.py | JinkelaCrops/t2t-learning | 5d9b5a5164af763c24f1cbce9d97561e9f2b772c | [
"Apache-2.0"
] | 2 | 2018-08-07T03:43:09.000Z | 2019-12-09T06:41:40.000Z | # 所有的unicode字符
from collections import Counter
import qa.regex_utils as regutil
import re
resource_path = "/media/tmxmall/a36811aa-0e87-4ba1-b14f-370134452449/data/medicine.txt"
with open(resource_path, "r", encoding="utf8") as f:
char_stream = f.read()
char_dictionary = Counter(list(char_stream))
med_unicodes =... | 35.604824 | 124 | 0.472617 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15,462 | 0.761112 |
d3f53c7bfc8c69e3589a13dbe7ec8f22516451e9 | 622 | py | Python | challenges/largest_product_array/test_largest_product.py | jayadams011/data-structures-and-algorithms | b9a49c65ca769c82b2a34d840bd1e4dd626be025 | [
"MIT"
] | null | null | null | challenges/largest_product_array/test_largest_product.py | jayadams011/data-structures-and-algorithms | b9a49c65ca769c82b2a34d840bd1e4dd626be025 | [
"MIT"
] | 4 | 2018-03-22T16:56:06.000Z | 2018-03-28T23:30:29.000Z | challenges/largest_product_array/test_largest_product.py | jayadams011/data-structures-and-algorithms | b9a49c65ca769c82b2a34d840bd1e4dd626be025 | [
"MIT"
] | null | null | null | from largest_product.py import largest_product
import pytest
def test_product_returns():
"""test if return is a single product """
assert largest_product.largest([[2, 2]]) is 4
def test_returns_largest():
""" test if return is the largest of longer array """
assert largest_product.largest([[1, 3], [6... | 24.88 | 67 | 0.672026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 175 | 0.28135 |
d3f5e1c2b805610da261a12d23a2c36165256863 | 4,086 | py | Python | examples/transformer/model.py | namin/dm-haiku | 7ddb4776761a7220031c6b323fa6f797bb02f75c | [
"Apache-2.0"
] | null | null | null | examples/transformer/model.py | namin/dm-haiku | 7ddb4776761a7220031c6b323fa6f797bb02f75c | [
"Apache-2.0"
] | null | null | null | examples/transformer/model.py | namin/dm-haiku | 7ddb4776761a7220031c6b323fa6f797bb02f75c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 DeepMind Technologies Limited. 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 ... | 32.428571 | 80 | 0.634606 | 2,954 | 0.722956 | 0 | 0 | 0 | 0 | 0 | 0 | 1,335 | 0.326725 |
d3f792b947cbc2077ccc06bcee6654417c6fd2ce | 7,827 | py | Python | face.py | shwang95/Intelligence-Surveillance-System | f7107096b447e929c36808c341ff91b0b5f49010 | [
"MIT"
] | 1 | 2018-04-01T18:25:44.000Z | 2018-04-01T18:25:44.000Z | face.py | shwang95/Intelligence-Surveillance-System | f7107096b447e929c36808c341ff91b0b5f49010 | [
"MIT"
] | null | null | null | face.py | shwang95/Intelligence-Surveillance-System | f7107096b447e929c36808c341ff91b0b5f49010 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import boto3
import cv2
import numpy
import os
import base64
import gspread
from email.mime.base import MIMEBase
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from httplib2 import Http
from time import localtime, strftim... | 33.592275 | 80 | 0.536093 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,149 | 0.274562 |
d3f7c63f805726000751c5b956986db551d0d877 | 8,480 | py | Python | unpythonic/syntax/autoref.py | aisha-w/unpythonic | 0f63abf6ac7efb7304b676d0e1ebce0ef4040438 | [
"BSD-2-Clause"
] | null | null | null | unpythonic/syntax/autoref.py | aisha-w/unpythonic | 0f63abf6ac7efb7304b676d0e1ebce0ef4040438 | [
"BSD-2-Clause"
] | null | null | null | unpythonic/syntax/autoref.py | aisha-w/unpythonic | 0f63abf6ac7efb7304b676d0e1ebce0ef4040438 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Implicitly reference attributes of an object."""
from ast import Name, Assign, Load, Call, Lambda, With, Str, arg, \
Attribute, Subscript, Store, Del
from macropy.core.quotes import macros, q, u, name, ast_literal
from macropy.core.hquotes import macros, hq
from macropy.core... | 51.393939 | 122 | 0.604481 | 0 | 0 | 0 | 0 | 2,255 | 0.26592 | 0 | 0 | 4,470 | 0.527123 |
d3fa9c7a54272bce3d4b342c353619a4cf77a19a | 2,935 | py | Python | doit/exceptions.py | m4ta1l/doit | d1a1b7b3abc7641d977d3b78b580d97aea4e27ea | [
"MIT"
] | 1,390 | 2015-01-01T21:11:47.000Z | 2022-03-31T11:35:44.000Z | doit/exceptions.py | m4ta1l/doit | d1a1b7b3abc7641d977d3b78b580d97aea4e27ea | [
"MIT"
] | 393 | 2015-01-05T11:18:29.000Z | 2022-03-20T11:46:46.000Z | doit/exceptions.py | m4ta1l/doit | d1a1b7b3abc7641d977d3b78b580d97aea4e27ea | [
"MIT"
] | 176 | 2015-01-07T16:58:56.000Z | 2022-03-28T12:12:11.000Z | """Handle exceptions generated from 'user' code"""
import sys
import traceback
class InvalidCommand(Exception):
"""Invalid command line argument."""
def __init__(self, *args, **kwargs):
self.not_found = kwargs.pop('not_found', None)
super(InvalidCommand, self).__init__(*args, **kwargs)
... | 29.35 | 81 | 0.627257 | 2,826 | 0.962862 | 0 | 0 | 0 | 0 | 0 | 0 | 1,086 | 0.370017 |
d3fd7d52c6c44f8af7fa618793093cc47061e14f | 17,358 | py | Python | python/redmonster/tools/plot_fits.py | timahutchinson/redmonster | 73adfb20213b89e43b950eb6a7f6525f3d11cec4 | [
"CNRI-Python"
] | 5 | 2017-03-22T21:29:40.000Z | 2022-03-24T16:02:21.000Z | python/redmonster/tools/plot_fits.py | timahutchinson/redmonster | 73adfb20213b89e43b950eb6a7f6525f3d11cec4 | [
"CNRI-Python"
] | 4 | 2016-06-24T10:50:23.000Z | 2016-11-09T19:48:00.000Z | python/redmonster/tools/plot_fits.py | timahutchinson/redmonster | 73adfb20213b89e43b950eb6a7f6525f3d11cec4 | [
"CNRI-Python"
] | 6 | 2016-06-21T16:52:34.000Z | 2020-03-12T05:24:14.000Z | # GUI used for quickly plotting BOSS spectra. Also allows overplotting of best-fit template as
# determined by redmonster pipeline. Sort of a redmonster version of plotspec.pro, though currently
# with less bells and whistles.
#
# Tim Hutchinson, University of Utah, April 2014
# Signifcantly updated by TH, October 20... | 47.04065 | 100 | 0.44625 | 16,489 | 0.949937 | 0 | 0 | 0 | 0 | 0 | 0 | 1,987 | 0.114472 |
d3fe4ecd726c46ffcb95a62b678fd7cd36fc2ddd | 565 | py | Python | QueueReconstruction.py | yashpatel0369/PythonDataStructures | 4839150c9eb4882e975859084d6b3787c72ce5f3 | [
"MIT"
] | null | null | null | QueueReconstruction.py | yashpatel0369/PythonDataStructures | 4839150c9eb4882e975859084d6b3787c72ce5f3 | [
"MIT"
] | null | null | null | QueueReconstruction.py | yashpatel0369/PythonDataStructures | 4839150c9eb4882e975859084d6b3787c72ce5f3 | [
"MIT"
] | 1 | 2020-10-01T03:53:22.000Z | 2020-10-01T03:53:22.000Z | # An algorithm to reconstruct the queue.
# Suppose you have a random list of people standing in a queue.
# Each person is described by a pair of integers (h,k), where h is the height of the person and k is the number of people in front of this person who have a height greater than or equal to h.
class Solution:
de... | 43.461538 | 191 | 0.644248 | 266 | 0.470796 | 0 | 0 | 0 | 0 | 0 | 0 | 294 | 0.520354 |
d3ffb66f226d9d5f6c6c34d8eb1cb0a764f6d67e | 255 | py | Python | passagens/models/classe_viagem.py | carlosrjhoe/Aplicacao_Formulario_com_Django | e16b8bc99aeb120e89c615a34261372bc81f6528 | [
"MIT"
] | null | null | null | passagens/models/classe_viagem.py | carlosrjhoe/Aplicacao_Formulario_com_Django | e16b8bc99aeb120e89c615a34261372bc81f6528 | [
"MIT"
] | null | null | null | passagens/models/classe_viagem.py | carlosrjhoe/Aplicacao_Formulario_com_Django | e16b8bc99aeb120e89c615a34261372bc81f6528 | [
"MIT"
] | null | null | null | from django.db import models
from django.utils.translation import gettext_lazy as _
class ClasseViagem(models.TextChoices):
ECONOMICA = 'ECO', _('Econômica')
EXECUTIVA = 'EXE', _('Executiva')
PRIMEIRA_CLASSE = 'PRI', _('Primeira') | 36.428571 | 54 | 0.690196 | 171 | 0.667969 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.1875 |
d3ffbfb469a902f14133370371345f427175f9fd | 9,046 | py | Python | tests/unit/test_HashlistsByAlgLoaderThread.py | AntonKuzminRussia/hbs-cli | a4109adeb7f4fe3b1d85b29f90c3f2329a8c4153 | [
"MIT"
] | 5 | 2016-07-13T18:21:57.000Z | 2018-03-15T21:35:30.000Z | tests/unit/test_HashlistsByAlgLoaderThread.py | AntonKuzminRussia/hbs-cli | a4109adeb7f4fe3b1d85b29f90c3f2329a8c4153 | [
"MIT"
] | null | null | null | tests/unit/test_HashlistsByAlgLoaderThread.py | AntonKuzminRussia/hbs-cli | a4109adeb7f4fe3b1d85b29f90c3f2329a8c4153 | [
"MIT"
] | 2 | 2016-12-04T01:06:03.000Z | 2018-09-01T17:44:14.000Z | # -*- coding: utf-8 -*-
"""
This is part of HashBruteStation software
Docs EN: http://hack4sec.pro/wiki/index.php/Hash_Brute_Station_en
Docs RU: http://hack4sec.pro/wiki/index.php/Hash_Brute_Station
License: MIT
Copyright (c) Anton Kuzmin <http://anton-kuzmin.ru> (ru) <http://anton-kuzmin.pro> (en)
Integration tests f... | 38.330508 | 116 | 0.64371 | 8,458 | 0.934999 | 0 | 0 | 988 | 0.10922 | 0 | 0 | 2,406 | 0.265974 |