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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d407929c4b0bf64d15071879c336b090bd7b4eb9 | 1,580 | py | Python | vision_api_batch.py | swowko51/pfch_humanvsmachine_2019 | ba5a4c0db804e62892a28c72ba2d2180c6e44282 | [
"MIT"
] | null | null | null | vision_api_batch.py | swowko51/pfch_humanvsmachine_2019 | ba5a4c0db804e62892a28c72ba2d2180c6e44282 | [
"MIT"
] | null | null | null | vision_api_batch.py | swowko51/pfch_humanvsmachine_2019 | ba5a4c0db804e62892a28c72ba2d2180c6e44282 | [
"MIT"
] | null | null | null | import io
import os
import pandas as pd
import re
# Imports the Google Cloud client library
from google.cloud import vision
from google.cloud.vision import types
# Set Google API authentication
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = "INSERT_FULL_KEY_FILE_PATH"
# ---------------------------------------------... | 28.727273 | 85 | 0.73038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 773 | 0.489241 |
d407d7b9d817bbd5e0d8ab001619f9db240a997f | 1,556 | py | Python | examples/ElasticsearchDomain.py | hmain/troposphere-fork | 815ee739bcf3d024e1aef5caeca4e4d63e85e98e | [
"BSD-2-Clause"
] | null | null | null | examples/ElasticsearchDomain.py | hmain/troposphere-fork | 815ee739bcf3d024e1aef5caeca4e4d63e85e98e | [
"BSD-2-Clause"
] | null | null | null | examples/ElasticsearchDomain.py | hmain/troposphere-fork | 815ee739bcf3d024e1aef5caeca4e4d63e85e98e | [
"BSD-2-Clause"
] | null | null | null | # Converted from Elasticsearch Domain example located at:
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticsearch-domain.html#d0e51519
from troposphere import Template, constants
from troposphere.elasticsearch import Domain, EBSOptions
from troposphere.elasticsearch import Elasticsea... | 36.186047 | 111 | 0.633676 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 391 | 0.251285 |
d40859cfcfbe9d41075f18e967f903d43551b1c9 | 43 | py | Python | tests/distributed/test_dir_structures/src5/executors/utils/data.py | vishalbelsare/jina | ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43 | [
"Apache-2.0"
] | 3 | 2021-12-06T08:10:02.000Z | 2021-12-06T14:50:11.000Z | tests/distributed/test_dir_structures/src5/executors/utils/data.py | vishalbelsare/jina | ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43 | [
"Apache-2.0"
] | 2 | 2021-12-17T15:22:12.000Z | 2021-12-18T07:19:06.000Z | tests/distributed/test_dir_structures/src5/executors/utils/data.py | vishalbelsare/jina | ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43 | [
"Apache-2.0"
] | 1 | 2022-02-03T08:30:53.000Z | 2022-02-03T08:30:53.000Z | def dataops():
print('doing data ops')
| 14.333333 | 27 | 0.627907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.372093 |
d408bd7479135ab6ed59636c6e768556e8569655 | 133 | py | Python | src/fritzscrapercargo.py | jodli/FritzScraper | 7e96b5555a9e17d6920d08593d431df081c53f49 | [
"MIT"
] | 5 | 2017-12-03T07:27:26.000Z | 2020-11-05T09:58:42.000Z | src/fritzscrapercargo.py | jodli/FritzScraper | 7e96b5555a9e17d6920d08593d431df081c53f49 | [
"MIT"
] | null | null | null | src/fritzscrapercargo.py | jodli/FritzScraper | 7e96b5555a9e17d6920d08593d431df081c53f49 | [
"MIT"
] | null | null | null |
import time
class FritzScraperCargo(object):
def __init__(self, cargo):
self.timestamp = time.time()
self.cargo = cargo
| 14.777778 | 32 | 0.699248 | 118 | 0.887218 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d408fc1b6721eb44808e49cf65005653acafaac9 | 453 | py | Python | accounts/urls.py | yusufom/ERP | a1844d0ece0ab5fff748d75a3ac7a2a963e56576 | [
"Unlicense"
] | null | null | null | accounts/urls.py | yusufom/ERP | a1844d0ece0ab5fff748d75a3ac7a2a963e56576 | [
"Unlicense"
] | null | null | null | accounts/urls.py | yusufom/ERP | a1844d0ece0ab5fff748d75a3ac7a2a963e56576 | [
"Unlicense"
] | null | null | null | from django.urls import path
from . import views
app_name = 'accounts'
urlpatterns = [
path('', views.account_login, name='Login'),
path('logout/',views.logout_view,name='Logout'),
path('dashboard/profile/',views.user_profile_view, name='Userprofile'),
path('dashboard/profile/change-password/',views.... | 32.357143 | 90 | 0.724062 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.364238 |
d40984bcd14733bbc43b1c6fcd7a5a580108415f | 4,222 | py | Python | qtpythonic/qtpythonic/lookup.py | uranusjr/qtpythonic | 97669fd1ee52ac833b732e98c0da514996914753 | [
"MIT"
] | null | null | null | qtpythonic/qtpythonic/lookup.py | uranusjr/qtpythonic | 97669fd1ee52ac833b732e98c0da514996914753 | [
"MIT"
] | null | null | null | qtpythonic/qtpythonic/lookup.py | uranusjr/qtpythonic | 97669fd1ee52ac833b732e98c0da514996914753 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
# Starts with a lowercase letter, followed by a sequence of lowercase letters
# and underscores.
FUNCTION_PATTERN = re.compile(r'^[a-z][a-z_]*$')
PROPERTY_PATTERN = FUNCTION_PATTERN
# Starts with an uppercase letter, followed by a sequence of uppercase letters
... | 33.776 | 78 | 0.61819 | 89 | 0.02108 | 0 | 0 | 0 | 0 | 0 | 0 | 1,156 | 0.273804 |
d409f34383374dd7cd26218ce4cee29f4ca7b7c0 | 3,917 | py | Python | footprint/models/audio.py | arthurtofani/footprint | 572401d4cba3299ae9915fca2a7d08ea1a3a9bc4 | [
"MIT"
] | null | null | null | footprint/models/audio.py | arthurtofani/footprint | 572401d4cba3299ae9915fca2a7d08ea1a3a9bc4 | [
"MIT"
] | null | null | null | footprint/models/audio.py | arthurtofani/footprint | 572401d4cba3299ae9915fca2a7d08ea1a3a9bc4 | [
"MIT"
] | null | null | null | from collections import defaultdict
import librosa
import os
import numpy as np
import h5py
class Audio:
filename = None
project = None
bucket = None
tempo = None
beats = None
features = None
tokens = None
loaded_from_cache = False
has_changed = False
def __init__(self, filename, project):
sel... | 29.900763 | 76 | 0.693643 | 3,823 | 0.976002 | 0 | 0 | 0 | 0 | 0 | 0 | 229 | 0.058463 |
d40a02528d58fe92a0117b78210b7cc191ea3776 | 2,634 | py | Python | src/solr.py | ielm/CSCI6964 | 5ab46ea68d9a1bf6192a2f3cbae0acea0e3696c8 | [
"MIT"
] | null | null | null | src/solr.py | ielm/CSCI6964 | 5ab46ea68d9a1bf6192a2f3cbae0acea0e3696c8 | [
"MIT"
] | null | null | null | src/solr.py | ielm/CSCI6964 | 5ab46ea68d9a1bf6192a2f3cbae0acea0e3696c8 | [
"MIT"
] | null | null | null | import json
import os
import urllib.request, urllib.parse
from collections import OrderedDict
from typing import List, Union, Dict
class SOLR:
"""
Wrapper for the SOLR retrieval engine.
"""
def __init__(
self,
host: str = "localhost",
port: int = 8983,
cookie: dict = ... | 27.154639 | 85 | 0.509112 | 2,499 | 0.948747 | 0 | 0 | 0 | 0 | 0 | 0 | 490 | 0.186029 |
d40bd0e8a76f18b193a91aefda5569f8c67d163b | 3,773 | py | Python | modules/slack.py | KTH/Jan-Ove | 661acf5843b7b6dd459b0dddd64cffe27840e3c8 | [
"MIT"
] | null | null | null | modules/slack.py | KTH/Jan-Ove | 661acf5843b7b6dd459b0dddd64cffe27840e3c8 | [
"MIT"
] | null | null | null | modules/slack.py | KTH/Jan-Ove | 661acf5843b7b6dd459b0dddd64cffe27840e3c8 | [
"MIT"
] | null | null | null | __author__ = 'tinglev@kth.se'
import os
import re
import logging
from slackclient import SlackClient
def init():
#global CLIENT, BOT_ID
log = logging.getLogger(__name__)
client = SlackClient(os.environ.get('SLACK_BOT_TOKEN'))
auth_test = client.api_call("auth.test")
log.debug('Auth test response: ... | 31.974576 | 82 | 0.655712 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 798 | 0.211503 |
d40c0bad03a56999b23c54f3b491a32e5393de51 | 196 | py | Python | aggregationtools/__init__.py | alexandria-julius/plttools | 0feb298e5f0d52c73b926bd127f32339bda4a62e | [
"MIT"
] | null | null | null | aggregationtools/__init__.py | alexandria-julius/plttools | 0feb298e5f0d52c73b926bd127f32339bda4a62e | [
"MIT"
] | null | null | null | aggregationtools/__init__.py | alexandria-julius/plttools | 0feb298e5f0d52c73b926bd127f32339bda4a62e | [
"MIT"
] | 2 | 2021-11-15T14:20:52.000Z | 2022-01-07T06:27:48.000Z | """ PLT tools module imports to create a better module interface """
from aggregationtools.ep_curve import EPCurve, EPType
from aggregationtools.plt import PLT
from aggregationtools.elt import ELT | 49 | 68 | 0.826531 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.346939 |
d40cd5794c364cbfbd47cd7ffe66063081da15e8 | 952 | py | Python | gitconfig_parser/parser.py | seanfisk/gitconfig-parser | f747a4263bdd7fc4ffd6b6a0fe34ef7cf7e935a8 | [
"MIT"
] | null | null | null | gitconfig_parser/parser.py | seanfisk/gitconfig-parser | f747a4263bdd7fc4ffd6b6a0fe34ef7cf7e935a8 | [
"MIT"
] | null | null | null | gitconfig_parser/parser.py | seanfisk/gitconfig-parser | f747a4263bdd7fc4ffd6b6a0fe34ef7cf7e935a8 | [
"MIT"
] | 2 | 2019-03-07T04:55:29.000Z | 2019-03-28T00:59:55.000Z | """:mod:`gitconfig_parser.parser` -- Parser implementation
"""
from pyparsing import (
OneOrMore, restOfLine, Group, ZeroOrMore,
CharsNotIn, Suppress, Word, alphanums, Literal, pythonStyleComment)
def build_parser():
key = Word(alphanums).setResultsName('key')
value = restOfLine.setParseAction(
... | 35.259259 | 73 | 0.697479 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.122899 |
d40d751818208fbb5ac12dea45e5d857cfe9c460 | 1,641 | py | Python | chroma-manager/tests/unit/chroma_api/test_command.py | GarimaVishvakarma/intel-chroma | fdf68ed00b13643c62eb7480754d3216d9295e0b | [
"MIT"
] | null | null | null | chroma-manager/tests/unit/chroma_api/test_command.py | GarimaVishvakarma/intel-chroma | fdf68ed00b13643c62eb7480754d3216d9295e0b | [
"MIT"
] | null | null | null | chroma-manager/tests/unit/chroma_api/test_command.py | GarimaVishvakarma/intel-chroma | fdf68ed00b13643c62eb7480754d3216d9295e0b | [
"MIT"
] | null | null | null |
from chroma_core.models import Command
from chroma_core.models.host import ManagedHost
from chroma_core.services.job_scheduler.job_scheduler_client import JobSchedulerClient
import mock
from tests.unit.chroma_api.chroma_api_test_case import ChromaApiTestCase
class TestCommandResource(ChromaApiTestCase):
def test... | 42.076923 | 154 | 0.604509 | 1,378 | 0.839732 | 0 | 0 | 0 | 0 | 0 | 0 | 404 | 0.246191 |
d40e05ca54d2f05415844295db6aa87aa4fcad8b | 743 | py | Python | tps/problems/forms/export.py | akmohtashami/tps-web | 9dab3ffe97c21f658be30ce2f2711dd93e4ba60f | [
"MIT"
] | 5 | 2019-02-26T06:10:43.000Z | 2021-07-24T17:11:45.000Z | tps/problems/forms/export.py | akmohtashami/tps-web | 9dab3ffe97c21f658be30ce2f2711dd93e4ba60f | [
"MIT"
] | 3 | 2019-08-15T13:56:03.000Z | 2021-06-10T18:43:16.000Z | tps/problems/forms/export.py | jonathanirvings/tps-web | 46519347d4fc8bdced9b5bceb6cdee5ea4e508f2 | [
"MIT"
] | 2 | 2018-12-28T13:12:59.000Z | 2020-12-25T18:42:13.000Z | from django import forms
from problems.models import ExportPackage
class ExportForm(forms.ModelForm):
class Meta:
model = ExportPackage
fields = ('exporter', 'export_format',)
def __init__(self, *args, **kwargs):
self.problem = kwargs.pop('problem')
self.revision = kwargs.pop... | 30.958333 | 67 | 0.664872 | 672 | 0.904441 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.067295 |
d40e772ae52c17b142e2d7efa20aa49ff2ef1d17 | 186 | py | Python | appyratus/schema/exc.py | gigaquads/appyratus | 09d88c000e0f3d254f5e1875388ccf87cec4be7c | [
"MIT"
] | 1 | 2021-02-26T15:31:01.000Z | 2021-02-26T15:31:01.000Z | appyratus/schema/exc.py | gigaquads/appyratus | 09d88c000e0f3d254f5e1875388ccf87cec4be7c | [
"MIT"
] | null | null | null | appyratus/schema/exc.py | gigaquads/appyratus | 09d88c000e0f3d254f5e1875388ccf87cec4be7c | [
"MIT"
] | null | null | null | class ValidationError(Exception):
def __init__(self, schema: 'Schema', errors: dict):
super().__init__(str(errors))
self.schema = schema
self.errors = errors
| 31 | 55 | 0.645161 | 185 | 0.994624 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.043011 |
d4112f52a0cbfaf422eb8c4063d5420c3f79065c | 851 | py | Python | presenterServer.py | eliahvo/presenter-app | 9d5b90e15590316b1c769b94d1d88f62ea594f7e | [
"MIT"
] | null | null | null | presenterServer.py | eliahvo/presenter-app | 9d5b90e15590316b1c769b94d1d88f62ea594f7e | [
"MIT"
] | null | null | null | presenterServer.py | eliahvo/presenter-app | 9d5b90e15590316b1c769b94d1d88f62ea594f7e | [
"MIT"
] | null | null | null | import socket
import sys
from pynput.keyboard import Key, Controller
import time
TCP_IP = sys.argv[1]
TCP_PORT = 5005
BUFFER_SIZE = 20 # Normally 1024, but we want fast response
keyboard = Controller()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)
print("Server: ", TC... | 19.790698 | 60 | 0.690952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.213365 |
d411989115cbd46c3d67f874ee5a2a13e7088d38 | 1,991 | py | Python | ARC_B/ARC005_B.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | ARC_B/ARC005_B.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | ARC_B/ARC005_B.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | xyw = input().split()
X = int(xyw[0])-1
Y = int(xyw[1])-1
C = []
for _ in range(9):
li = list(input())
C.append(li)
ans = ''
flg = True
if xyw[2] == 'R':
x_add = 1
for i in range(4):
ans += C[Y][X]
if X == 8:
x_add = -1
X += x_add
elif xyw[2] == 'L':
x_add = -1
... | 20.525773 | 31 | 0.353591 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.015068 |
d411e41531f233c38e217781ca3261dc0049615e | 4,119 | py | Python | backend/app/api/models/auth.py | PY-GZKY/fastapi-crawl-admin | 6535054994d11e3c31b4caeae65e8fa0f495d2b7 | [
"MIT"
] | 13 | 2021-07-25T15:26:04.000Z | 2022-03-02T12:12:02.000Z | backend/app/api/models/auth.py | PY-GZKY/fastapi-crawl-admin | 6535054994d11e3c31b4caeae65e8fa0f495d2b7 | [
"MIT"
] | 1 | 2021-07-26T03:26:09.000Z | 2021-07-26T09:05:38.000Z | backend/app/api/models/auth.py | PY-GZKY/fastapi-crawl-admin | 6535054994d11e3c31b4caeae65e8fa0f495d2b7 | [
"MIT"
] | 3 | 2021-07-26T01:44:24.000Z | 2021-07-31T14:31:49.000Z |
# -*- coding: utf-8 -*-
# @Time : 2020/7/7 14:16
# @Author : CoderCharm
# @File : auth.py
# @Software: PyCharm
# @Desc :
"""
用户模块
"""
from datetime import datetime
from sqlalchemy import BIGINT, Column, DateTime, Integer, SmallInteger, VARCHAR
from app.api.db.baseClass import Base
from app.api.db.baseCla... | 37.108108 | 104 | 0.677106 | 4,193 | 0.919719 | 0 | 0 | 0 | 0 | 0 | 0 | 1,127 | 0.247203 |
d41296a966b725cdd8a0e830cd9e45a19e9ec57d | 729 | py | Python | djangocms_markdown/cms_plugins.py | tuan243/djangocms-markdown | 53dbf2473da013987e0bc53103a2b894f5463c0c | [
"MIT"
] | null | null | null | djangocms_markdown/cms_plugins.py | tuan243/djangocms-markdown | 53dbf2473da013987e0bc53103a2b894f5463c0c | [
"MIT"
] | null | null | null | djangocms_markdown/cms_plugins.py | tuan243/djangocms-markdown | 53dbf2473da013987e0bc53103a2b894f5463c0c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Implementation of CMSPluginBase class for ``cmsplugin-markdown``."""
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext_lazy as _
from djangocms_markdown.models import Markdown
class MarkdownPlugin(CMSPluginBase):... | 30.375 | 74 | 0.757202 | 398 | 0.545953 | 0 | 0 | 0 | 0 | 0 | 0 | 181 | 0.248285 |
d4137fb795db6c1885430d3738fc61716e37a474 | 3,226 | py | Python | newserver/server.py | packedbread/hack.moscow | d00aeabd5b46d1c95990e181cb08895e9a4e2ff7 | [
"MIT"
] | null | null | null | newserver/server.py | packedbread/hack.moscow | d00aeabd5b46d1c95990e181cb08895e9a4e2ff7 | [
"MIT"
] | 2 | 2021-03-09T22:13:16.000Z | 2021-05-10T18:42:36.000Z | newserver/server.py | packedbread/hack.moscow | d00aeabd5b46d1c95990e181cb08895e9a4e2ff7 | [
"MIT"
] | null | null | null | from concurrent.futures import ProcessPoolExecutor
from storage import ClientStorage
from aiohttp import web, hdrs
import aiofiles
import tempfile
import asyncio
import logging
import shutil
import os
MAX_FILE_SIZE = 20 * 1024 * 1024
PROCESS_POOL_SIZE = 8
STATIC_PATH = '../client/dist'
TEMP_PATH = 'temp'
logger = log... | 27.810345 | 85 | 0.6646 | 0 | 0 | 0 | 0 | 2,216 | 0.686919 | 2,085 | 0.646311 | 499 | 0.154681 |
d413f6505308e4d39c96e7ca124b0fa0f103d091 | 8,548 | py | Python | t2dm/manager/intelligence/interactions/inpatient1.py | nhsx-mirror/SynPath_Diabetes | 1d9bd1c83f20820a35125c94e8b058bdd1a6ac3c | [
"MIT"
] | null | null | null | t2dm/manager/intelligence/interactions/inpatient1.py | nhsx-mirror/SynPath_Diabetes | 1d9bd1c83f20820a35125c94e8b058bdd1a6ac3c | [
"MIT"
] | null | null | null | t2dm/manager/intelligence/interactions/inpatient1.py | nhsx-mirror/SynPath_Diabetes | 1d9bd1c83f20820a35125c94e8b058bdd1a6ac3c | [
"MIT"
] | 1 | 2021-09-29T10:00:23.000Z | 2021-09-29T10:00:23.000Z | import datetime
# Interactions for inpatient care
# "review_and_consultation",
# "bd_hypoglycaemic_ep",
# "bd_hyperglycaemic_ep",
# "bd_lower_limb_compl",
# "enhanced_independence",
# "retinal_procedure",
# "amputation"
# Inpatient interaction 1: Inpatient review and consultation (might take out if not in spell)
de... | 31.776952 | 94 | 0.62576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,967 | 0.347099 |
d414c13a693261e067977fffbcfd18adb9931eb1 | 881 | py | Python | src/adafruit-circuitpython-bundle-4.x-mpy-20190713/examples/miniesptool_esp32nina.py | mbaaba/solar_panel | 42059d8c61320494ad1298065dbc50cd9b3bd51e | [
"MIT"
] | 1 | 2020-04-13T16:10:53.000Z | 2020-04-13T16:10:53.000Z | infra/libs-400rc2-20190512/examples/miniesptool_esp32nina.py | jadudm/feather-isa | b7419e6698c3f64be4d8122656eb8124631ca859 | [
"MIT"
] | null | null | null | infra/libs-400rc2-20190512/examples/miniesptool_esp32nina.py | jadudm/feather-isa | b7419e6698c3f64be4d8122656eb8124631ca859 | [
"MIT"
] | null | null | null | import time
import board
import busio
from digitalio import DigitalInOut, Direction # pylint: disable=unused-import
import adafruit_miniesptool
print("ESP32 Nina-FW")
uart = busio.UART(board.TX, board.RX, baudrate=115200, timeout=1)
resetpin = DigitalInOut(board.D5)
gpio0pin = DigitalInOut(board.D6)
espt... | 30.37931 | 81 | 0.708286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 229 | 0.259932 |
d416c187ae283cbe42a03ab6bc7df55912901374 | 148 | py | Python | python/client/parser/__init__.py | loumir/modelinstanceinvot-code | 246bd04b9eab558813ef09ad69a2a2f3ed7d2d92 | [
"Unlicense"
] | null | null | null | python/client/parser/__init__.py | loumir/modelinstanceinvot-code | 246bd04b9eab558813ef09ad69a2a2f3ed7d2d92 | [
"Unlicense"
] | 2 | 2022-03-09T18:39:21.000Z | 2022-03-11T16:27:45.000Z | python/client/parser/__init__.py | loumir/modelinstanceinvot-code | 246bd04b9eab558813ef09ad69a2a2f3ed7d2d92 | [
"Unlicense"
] | 1 | 2021-07-09T12:30:57.000Z | 2021-07-09T12:30:57.000Z | import sys, os
from utils.logger_setup import LoggerSetup
logger = LoggerSetup.get_logger()
logger.info("client.inst_builder package intialized")
| 21.142857 | 53 | 0.817568 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.27027 |
d417880052032f76146a52a10cf7662251c5d90b | 122 | py | Python | typeconversion.py | ShivamDevopsCommunity/Python_app | aa496fab65267061d5b4f4f374f63d2b5ae43f67 | [
"Apache-2.0"
] | 1 | 2020-07-23T11:30:22.000Z | 2020-07-23T11:30:22.000Z | typeconversion.py | ShivamDevopsCommunity/Python_app | aa496fab65267061d5b4f4f374f63d2b5ae43f67 | [
"Apache-2.0"
] | null | null | null | typeconversion.py | ShivamDevopsCommunity/Python_app | aa496fab65267061d5b4f4f374f63d2b5ae43f67 | [
"Apache-2.0"
] | null | null | null | birth_year = input('Birth year: ')
print(type(birth_year))
age = 2020 - int(birth_year)
print(type(age))
print(age)
| 10.166667 | 34 | 0.680328 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.114754 |
d418716dae9acd4334a9f34e0f2074dd64298ebb | 451 | py | Python | sqlalchemy/test_delete.py | WebSofter/lessnor | f5843a29f443126d30955a2fe4e7f3cadb216ad8 | [
"MIT"
] | null | null | null | sqlalchemy/test_delete.py | WebSofter/lessnor | f5843a29f443126d30955a2fe4e7f3cadb216ad8 | [
"MIT"
] | null | null | null | sqlalchemy/test_delete.py | WebSofter/lessnor | f5843a29f443126d30955a2fe4e7f3cadb216ad8 | [
"MIT"
] | null | null | null | #Import our configuration functions
from models import Film
from config import get_session
#Get instances for working with DB
session = get_session()
#***********************Working with db********************
#Update spcify row v1
film = session.query(Film).filter(Film.id == 3).one()
session.delete(film)
session.co... | 25.055556 | 61 | 0.687361 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.37694 |
d41946ca90fe6073895898eb60b2f62a025bcdcd | 1,045 | py | Python | kakakucom-scrape/recover.py | GINK03/itmedia-scraping | 5afbe06dd0aa12db1694a2b387aa2eeafb20e981 | [
"MIT"
] | 16 | 2018-02-06T14:43:41.000Z | 2021-01-23T05:07:33.000Z | kakakucom-scrape/recover.py | GINK03/itmedia-scraping | 5afbe06dd0aa12db1694a2b387aa2eeafb20e981 | [
"MIT"
] | null | null | null | kakakucom-scrape/recover.py | GINK03/itmedia-scraping | 5afbe06dd0aa12db1694a2b387aa2eeafb20e981 | [
"MIT"
] | 4 | 2018-01-16T13:50:43.000Z | 2019-12-16T19:45:54.000Z | import glob
import json
import pickle
import gzip
import os
import hashlib
import re
import bs4
import concurrent.futures
names = set([name.split('/').pop() for name in glob.glob('hrefs/*')])
size = len(names)
def _map(arg):
urls = set()
index, size, name = arg
print(index, '/', size, name)
try:
h... | 20.9 | 71 | 0.639234 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.108134 |
d41ba959656db47ebcf8cbb11038ffe513c678ca | 7,339 | py | Python | scrounger/core/session.py | NORD-Function/IOS-tools | dd393666aa1ba1117d1c472cfdef4d0b18216904 | [
"BSD-3-Clause"
] | 217 | 2018-08-23T12:00:45.000Z | 2022-01-20T12:09:09.000Z | scrounger/core/session.py | Warlockk/scrounger | dd393666aa1ba1117d1c472cfdef4d0b18216904 | [
"BSD-3-Clause"
] | 18 | 2018-08-24T09:28:54.000Z | 2020-05-19T04:49:54.000Z | scrounger/core/session.py | Warlockk/scrounger | dd393666aa1ba1117d1c472cfdef4d0b18216904 | [
"BSD-3-Clause"
] | 48 | 2018-08-23T12:51:45.000Z | 2022-01-20T12:09:02.000Z | """
Module that holds all information of a session of scrounger
"""
# custom module imports
from sys import path as _path
# config imports
from scrounger.utils.config import _SCROUNGER_HOME
class Session(object):
_name = ""
_rows, _columns = 128, 80
options = {}
global_options = ... | 28.55642 | 80 | 0.571331 | 5,326 | 0.725712 | 0 | 0 | 0 | 0 | 0 | 0 | 2,145 | 0.292274 |
d41d1b57c833f3f45020982a1362ffc5bb62328a | 8,703 | py | Python | deepmath/treegen/cnf_model_test.py | LaudateCorpus1/deepmath | b5b721f54de1d5d6a02d78f5da5995237f9995f9 | [
"Apache-2.0"
] | 830 | 2016-11-07T21:46:27.000Z | 2022-03-23T08:01:03.000Z | deepmath/treegen/cnf_model_test.py | LaudateCorpus1/deepmath | b5b721f54de1d5d6a02d78f5da5995237f9995f9 | [
"Apache-2.0"
] | 26 | 2016-11-07T22:06:31.000Z | 2022-02-16T00:18:29.000Z | deepmath/treegen/cnf_model_test.py | LaudateCorpus1/deepmath | b5b721f54de1d5d6a02d78f5da5995237f9995f9 | [
"Apache-2.0"
] | 168 | 2016-11-07T21:48:55.000Z | 2022-03-19T02:47:14.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 42.871921 | 80 | 0.649087 | 7,670 | 0.881305 | 0 | 0 | 0 | 0 | 0 | 0 | 4,534 | 0.52097 |
d41dac3657c44fb744404a9ec259d063e17765ee | 3,905 | py | Python | codes/utils.py | k1101jh/Alpha-Zero | f2a83f430f186ad0633e38baa31c2a042e1305b6 | [
"Apache-2.0"
] | 1 | 2021-11-12T13:36:47.000Z | 2021-11-12T13:36:47.000Z | codes/utils.py | k1101jh/Alpha-Zero | f2a83f430f186ad0633e38baa31c2a042e1305b6 | [
"Apache-2.0"
] | null | null | null | codes/utils.py | k1101jh/Alpha-Zero | f2a83f430f186ad0633e38baa31c2a042e1305b6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
import io
import importlib
import math
from typing import Dict, Iterable, List, Optional, Tuple
from games.game_types import Move, Player
from games.game_types import Point
from games.game_types import game_name_dict
from games.game_types import game_state_dict
sys.stdout ... | 29.583333 | 103 | 0.628169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 589 | 0.150447 |
d41fccb7523d2734e1207ea00040f62a02a41e0c | 1,545 | py | Python | obdlib/uart.py | s-s-boika/obdlib | 5b0b35276575a522d20858b6993a9bebf0acc968 | [
"MIT"
] | 9 | 2015-07-14T07:15:58.000Z | 2021-06-03T01:42:19.000Z | obdlib/uart.py | s-s-boika/obdlib | 5b0b35276575a522d20858b6993a9bebf0acc968 | [
"MIT"
] | null | null | null | obdlib/uart.py | s-s-boika/obdlib | 5b0b35276575a522d20858b6993a9bebf0acc968 | [
"MIT"
] | 4 | 2015-07-15T09:05:46.000Z | 2022-02-06T04:28:53.000Z | DEFAULT_BAUDRATE = 38400
import sys
if (hasattr(sys, 'implementation') and
sys.implementation.name == 'micropython'):
# if using pyBoard
from pyb import UART as uart_base
else:
from serial import Serial as uart_base
from obdlib.logging import logger
class UART(object):
def __init__(self)... | 27.105263 | 77 | 0.55534 | 1,266 | 0.819417 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.099029 |
d422caf64fbf4d1c710933fbc0a822835d9b9411 | 6,411 | py | Python | inst/pythonScript/extraTEmergep_pall.py | niccw/repeatCraft | 84ac019189a940d884ec61b5aab0b7b87a74ed52 | [
"MIT"
] | null | null | null | inst/pythonScript/extraTEmergep_pall.py | niccw/repeatCraft | 84ac019189a940d884ec61b5aab0b7b87a74ed52 | [
"MIT"
] | null | null | null | inst/pythonScript/extraTEmergep_pall.py | niccw/repeatCraft | 84ac019189a940d884ec61b5aab0b7b87a74ed52 | [
"MIT"
] | 1 | 2022-02-19T13:30:57.000Z | 2022-02-19T13:30:57.000Z | import sys
import subprocess
from collections import defaultdict
nested_dict = lambda: defaultdict(nested_dict)
# arguments
if len(sys.argv) <= 1:
sys.exit("Usage: combineTE.py [reformatted .gff] [gap size, default=150]")
gff = sys.argv[1]
# quick check number of line of the file
sh = subprocess.run(['wc', '-l',g... | 37.273256 | 120 | 0.583684 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,694 | 0.420215 |
d423ccff923c193b1018a53c447911773c46989d | 1,352 | py | Python | 4-gen_diffs.py | lcmd-epfl/Local_Kernel_Regression | 5be1b01fb347a8b8473ffe62a2f2d1fe2c1c4157 | [
"MIT"
] | null | null | null | 4-gen_diffs.py | lcmd-epfl/Local_Kernel_Regression | 5be1b01fb347a8b8473ffe62a2f2d1fe2c1c4157 | [
"MIT"
] | null | null | null | 4-gen_diffs.py | lcmd-epfl/Local_Kernel_Regression | 5be1b01fb347a8b8473ffe62a2f2d1fe2c1c4157 | [
"MIT"
] | null | null | null | import numpy as np
import time
import sklearn as sk
from sklearn import metrics
import gc
import sys
import pickle
init_t = time.time()
at = sys.argv[1]
ref_envs = np.load('./data/train_envs.npy',
allow_pickle=True).item()[at]
reps_dict = np.load('./data/red_reps_dict.npy', allow_pickle=True)
at... | 22.163934 | 79 | 0.623521 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 284 | 0.210059 |
d426fe625d6ef6fff91e3cb4328137b87944afc4 | 6,540 | py | Python | crypto.py | aivalja/Crypto-Scrooge | 98fb08f3eb1008de66e02b30a70f6e772c095a48 | [
"MIT"
] | null | null | null | crypto.py | aivalja/Crypto-Scrooge | 98fb08f3eb1008de66e02b30a70f6e772c095a48 | [
"MIT"
] | null | null | null | crypto.py | aivalja/Crypto-Scrooge | 98fb08f3eb1008de66e02b30a70f6e772c095a48 | [
"MIT"
] | null | null | null | from json import loads
import argparse
from urllib.request import urlopen
from pprint import pprint
from datetime import datetime
def main():
parser = argparse.ArgumentParser()
parser.add_argument("start_date", help="Start date in format DD.MM.YYYY",
type=lambda s: datetime.strptime(s... | 38.928571 | 92 | 0.647706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,677 | 0.256422 |
d4276c833da8da729c76c47b1baa7513e58dc63c | 4,504 | py | Python | main.py | pechhenka/itmo_parser_table | 8cefcad00290539872759c6a4dc8050e03333a1f | [
"Unlicense"
] | null | null | null | main.py | pechhenka/itmo_parser_table | 8cefcad00290539872759c6a4dc8050e03333a1f | [
"Unlicense"
] | null | null | null | main.py | pechhenka/itmo_parser_table | 8cefcad00290539872759c6a4dc8050e03333a1f | [
"Unlicense"
] | null | null | null | import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
url = "https://abit.itmo.ru/bachelor/rating_rank/all/261/"
required_name = 'Шараев Павел Ильдарович'
def write_to_file(result):
global required_name
import xlsxwriter
with xlsxwriter.Workbook('result.xlsx') as workbook:
... | 30.026667 | 118 | 0.538854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,356 | 0.269851 |
d4284956c70586476c90480dd8b13432ac59b14e | 3,503 | py | Python | makeplotz.py | Munfred/scutils | 9c6b6ce078c0b2aeb7a9f801933cf767197f4efd | [
"Unlicense"
] | null | null | null | makeplotz.py | Munfred/scutils | 9c6b6ce078c0b2aeb7a9f801933cf767197f4efd | [
"Unlicense"
] | null | null | null | makeplotz.py | Munfred/scutils | 9c6b6ce078c0b2aeb7a9f801933cf767197f4efd | [
"Unlicense"
] | null | null | null | ### EXAMPLE JOB SUBMISISON ###
# sbatch -A SternbergGroup --gres gpu --mem=64000 -t 15:00:00 --ntasks 10 --nodes 1 --job-name "bcbg" --wrap "python bcbg.py"
### FILENAME CHANGE BEFORE RUNNING ###
model_name= 'blah'
adata_file='../blah.h5ad'
######################################
import sys
import warnings; warnings... | 35.383838 | 126 | 0.633172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 822 | 0.234656 |
d42854dec66dab2bfdf36e91642dcd8421c577f7 | 1,244 | py | Python | examples/injecting_existing_instance/injecting_existing_instance_example.py | allrod5/injectable | 74e640f0911480fb06fa97c1a468c3863541c0fd | [
"MIT"
] | 71 | 2018-02-05T04:12:27.000Z | 2022-02-15T23:08:16.000Z | examples/injecting_existing_instance/injecting_existing_instance_example.py | Euraxluo/injectable | 74e640f0911480fb06fa97c1a468c3863541c0fd | [
"MIT"
] | 104 | 2018-02-06T23:37:36.000Z | 2021-08-25T04:50:15.000Z | examples/injecting_existing_instance/injecting_existing_instance_example.py | Euraxluo/injectable | 74e640f0911480fb06fa97c1a468c3863541c0fd | [
"MIT"
] | 13 | 2019-02-10T18:52:50.000Z | 2022-01-26T17:12:35.000Z | """
In this example you'll see how to supply an already-initialized instance as injectable.
For whatever reason we have already initialized an instance of ``Application`` and
assigned it to the ``app`` variable so we use the
:meth:`injectable_factory <injectable.injectable_factory>` decorator in a lambda which
in turn... | 27.644444 | 88 | 0.734727 | 219 | 0.176045 | 0 | 0 | 109 | 0.087621 | 0 | 0 | 711 | 0.571543 |
d42903bc52bf571f31d31df1a834976bfcbfa6a0 | 2,736 | py | Python | fHDHR/device/tuners/__init__.py | crackers8199/fHDHR_Youtube-IHOPKC | e1878d972ffba96ff813690630e30e2de8b5f504 | [
"WTFPL"
] | null | null | null | fHDHR/device/tuners/__init__.py | crackers8199/fHDHR_Youtube-IHOPKC | e1878d972ffba96ff813690630e30e2de8b5f504 | [
"WTFPL"
] | null | null | null | fHDHR/device/tuners/__init__.py | crackers8199/fHDHR_Youtube-IHOPKC | e1878d972ffba96ff813690630e30e2de8b5f504 | [
"WTFPL"
] | null | null | null |
from fHDHR.exceptions import TunerError
from .tuner import Tuner
class Tuners():
def __init__(self, fhdhr, epg, channels):
self.fhdhr = fhdhr
self.channels = channels
self.epg = epg
self.max_tuners = int(self.fhdhr.config.dict["fhdhr"]["tuner_count"])
self.tuners = {}
... | 31.448276 | 97 | 0.612208 | 2,666 | 0.974415 | 0 | 0 | 0 | 0 | 0 | 0 | 383 | 0.139985 |
d429bb0c4adaa592f5410526e05f433a6c840f55 | 1,057 | py | Python | cpdb/social_graph/serializers/trr_detail_serializer.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 25 | 2018-07-20T22:31:40.000Z | 2021-07-15T16:58:41.000Z | cpdb/social_graph/serializers/trr_detail_serializer.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 13 | 2018-06-18T23:08:47.000Z | 2022-02-10T07:38:25.000Z | cpdb/social_graph/serializers/trr_detail_serializer.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 6 | 2018-05-17T21:59:43.000Z | 2020-11-17T00:30:26.000Z | from rest_framework import serializers
from shared.serializer import NoNullSerializer, OfficerPercentileSerializer
class CoaccusedSerializer(OfficerPercentileSerializer):
id = serializers.IntegerField()
full_name = serializers.CharField()
allegation_count = serializers.IntegerField()
class TRRDetailSer... | 32.030303 | 75 | 0.737938 | 935 | 0.884579 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.029328 |
d42a55595da119edc0308b2e2db15256c5068aa2 | 1,478 | py | Python | PhysicsTools/HeppyCore/python/statistics/value.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | PhysicsTools/HeppyCore/python/statistics/value.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | PhysicsTools/HeppyCore/python/statistics/value.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | # Copyright (C) 2014 Colin Bernet
# https://github.com/cbernet/heppy/blob/master/LICENSE
import math
import copy
class Value(object):
def __init__(self, val, err):
self.val = val
self.err = err
def relerr(self):
return abs(self.err / self.val)
def __eq__(self, other):
ret... | 27.886792 | 91 | 0.535183 | 1,362 | 0.921516 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.088633 |
d42a555feb139bc108823ade4d37c679cce5b802 | 3,317 | py | Python | mlimages/gather/__init__.py | icoxfog417/imageset | 724ce145e95a2e2c3597db43327f6e69babb83e2 | [
"MIT"
] | 29 | 2016-02-23T13:11:10.000Z | 2020-08-27T04:36:21.000Z | mlimages/gather/__init__.py | icoxfog417/imageset | 724ce145e95a2e2c3597db43327f6e69babb83e2 | [
"MIT"
] | 14 | 2016-03-22T11:37:52.000Z | 2022-03-11T23:13:57.000Z | mlimages/gather/__init__.py | icoxfog417/imageset | 724ce145e95a2e2c3597db43327f6e69babb83e2 | [
"MIT"
] | 13 | 2016-05-08T08:15:12.000Z | 2020-03-18T06:23:02.000Z | import os
import asyncio
import concurrent.futures
import requests
import aiohttp
from mlimages.util.file_api import FileAPI
import mlimages.util.log_api as LogAPI
class API():
def __init__(self, data_root, proxy="", proxy_user="", proxy_password="", parallel=-1, limit=-1, timeout=10, debug=False):
self.... | 36.855556 | 126 | 0.574013 | 3,149 | 0.949352 | 0 | 0 | 0 | 0 | 1,569 | 0.473018 | 130 | 0.039192 |
d42f67e9e0f814fed2def88800445e02b82253cc | 401 | py | Python | ARC/arc001-arc050/arc040/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | ARC/arc001-arc050/arc040/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | ARC/arc001-arc050/arc040/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
def main():
n = int(input())
r_count = 0
b_count = 0
for i in range(n):
si = input()
r_count += si.count('R')
b_count += si.count('B')
if r_count > b_count:
print('TAKAHASHI')
elif r_count < b_count:
print('AOKI'... | 16.708333 | 33 | 0.456359 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.157107 |
d4305b27996382bcf34ae4f2d283d939605b8ef7 | 6,622 | py | Python | labs/lab3/lab3b.py | MITLLRacecar/racecar-parth-kocheta | 6e244575b83e312880c5540342a380364032d326 | [
"MIT"
] | 1 | 2021-08-01T17:06:39.000Z | 2021-08-01T17:06:39.000Z | labs/lab3/lab3b.py | MITLLRacecar/racecar-parth-kocheta | 6e244575b83e312880c5540342a380364032d326 | [
"MIT"
] | null | null | null | labs/lab3/lab3b.py | MITLLRacecar/racecar-parth-kocheta | 6e244575b83e312880c5540342a380364032d326 | [
"MIT"
] | null | null | null | """
Copyright MIT and Harvey Mudd College
MIT License
Summer 2020
Lab 3B - Depth Camera Cone Parking
"""
########################################################################################
# Imports
########################################################################################
import sys
import cv2 as ... | 31.235849 | 99 | 0.593174 | 53 | 0.008004 | 0 | 0 | 0 | 0 | 0 | 0 | 2,744 | 0.414376 |
d4318826121e4a0a63a9ff18a3888788c700b50d | 19,272 | py | Python | ska-tmc/ska-tmc-sdpsubarrayleafnode-mid/src/ska_tmc_sdpsubarrayleafnode_mid/sdp_subarray_leaf_node.py | ska-telescope/tmc-prototype | 4138274e933d4b05f7fe9fc34a11c417b6d0d336 | [
"BSD-3-Clause"
] | 3 | 2019-01-10T11:49:36.000Z | 2019-07-19T03:32:52.000Z | ska-tmc/ska-tmc-sdpsubarrayleafnode-mid/src/ska_tmc_sdpsubarrayleafnode_mid/sdp_subarray_leaf_node.py | ska-telescope/tmc-prototype | 4138274e933d4b05f7fe9fc34a11c417b6d0d336 | [
"BSD-3-Clause"
] | 19 | 2019-01-07T14:50:26.000Z | 2019-10-02T13:25:23.000Z | ska-tmc/ska-tmc-sdpsubarrayleafnode-mid/src/ska_tmc_sdpsubarrayleafnode_mid/sdp_subarray_leaf_node.py | ska-telescope/tmc-prototype | 4138274e933d4b05f7fe9fc34a11c417b6d0d336 | [
"BSD-3-Clause"
] | 1 | 2018-12-21T13:39:23.000Z | 2018-12-21T13:39:23.000Z | # -*- coding: utf-8 -*-
#
# This file is part of the SdpSubarrayLeafNode project
#
#
#
# Distributed under the terms of the BSD-3-Clause license.
# See LICENSE.txt for more info.
"""
SDP Subarray Leaf node is to monitor the SDP Subarray and issue control actions during an observation.
It also acts as a SDP contact poi... | 31.749588 | 120 | 0.643161 | 16,733 | 0.868254 | 0 | 0 | 3,037 | 0.157586 | 0 | 0 | 10,524 | 0.546077 |
d431a229e5bc2ae5e5df2bc300491d02cd7bb9da | 4,255 | py | Python | src/app.py | qq20004604/qq-robot | f109a774666efcd0cf36ed4da0d79f53b32b1577 | [
"Apache-2.0"
] | 8 | 2019-05-20T03:30:27.000Z | 2020-09-24T13:16:53.000Z | src/app.py | qq20004604/qq-robot | f109a774666efcd0cf36ed4da0d79f53b32b1577 | [
"Apache-2.0"
] | null | null | null | src/app.py | qq20004604/qq-robot | f109a774666efcd0cf36ed4da0d79f53b32b1577 | [
"Apache-2.0"
] | 2 | 2020-09-24T13:16:56.000Z | 2020-12-25T09:44:48.000Z | from aiocqhttp import CQHttp
from datetime import datetime
from sendmsg import SendMsg
from loadData import LoadData
import threading
import time
# windows本机运行本脚本与coolq的配置
# HOST = '127.0.0.1'
# PORT = 7788
# 这个url是发送给docker容器里的coolq
# 举例来说,假如docker命令有这样的 -p 3542:9000 -p 15700:5700
# 9000 是coolq暴露的页面访问地址(这里映射到了外面的35... | 31.518519 | 135 | 0.647239 | 0 | 0 | 0 | 0 | 1,387 | 0.271694 | 1,301 | 0.254848 | 3,448 | 0.675416 |
d431ad0f4ad590fbccad4eb29cd76488bac8859f | 179 | py | Python | setup.py | Horta/pystart | 684dad092e8b64929e2e559fe95bb39c46f065dc | [
"MIT"
] | 1 | 2019-05-07T06:52:59.000Z | 2019-05-07T06:52:59.000Z | setup.py | Horta/pystart | 684dad092e8b64929e2e559fe95bb39c46f065dc | [
"MIT"
] | 1 | 2018-05-30T09:49:58.000Z | 2018-05-30T14:56:12.000Z | setup.py | horta/pystart | 684dad092e8b64929e2e559fe95bb39c46f065dc | [
"MIT"
] | null | null | null | from setuptools import setup
if __name__ == '__main__':
console_scripts = ["pystart = pystart.cmd:entry_point"]
setup(entry_points=dict(console_scripts=console_scripts))
| 29.833333 | 61 | 0.765363 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.251397 |
d43225857e03fb7ddf01914d178202068463e0a6 | 231 | py | Python | docs/conf.py | R1tschY/iterage | c9feb37c803fe031c883c315b5e449d0f2a68fa0 | [
"MIT"
] | null | null | null | docs/conf.py | R1tschY/iterage | c9feb37c803fe031c883c315b5e449d0f2a68fa0 | [
"MIT"
] | null | null | null | docs/conf.py | R1tschY/iterage | c9feb37c803fe031c883c315b5e449d0f2a68fa0 | [
"MIT"
] | null | null | null | """Sphinx configuration."""
from datetime import datetime
project = "iterage"
author = "Richard Liebscher"
copyright = f"{datetime.now().year}, {author}"
extensions = [
"sphinx.ext.autodoc",
"sphinx_autodoc_typehints",
]
| 19.25 | 46 | 0.701299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.584416 |
d43272fbb73b6c6b6b7fe45a8e85aee3304ff420 | 1,359 | py | Python | src/9/enforcing_type_checking_on_a_function_using_a_decorator/example.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 14 | 2017-05-20T04:06:46.000Z | 2022-01-23T06:48:45.000Z | src/9/enforcing_type_checking_on_a_function_using_a_decorator/example.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 1 | 2021-06-10T20:17:55.000Z | 2021-06-10T20:17:55.000Z | src/9/enforcing_type_checking_on_a_function_using_a_decorator/example.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 15 | 2017-03-29T17:57:33.000Z | 2021-08-24T02:20:08.000Z | from inspect import signature
from functools import wraps
def typeassert(*ty_args, **ty_kwargs):
def decorate(func):
# If in optimized mode, disable type checking
if not __debug__:
return func
# Map function argument names to supplied types
sig = signature(func)
... | 26.134615 | 84 | 0.557027 | 0 | 0 | 0 | 0 | 649 | 0.477557 | 0 | 0 | 215 | 0.158205 |
d433b3494ae66595b5f31b0ee2375f4a611bbe3e | 2,230 | py | Python | muk_web_theme/muk_dms_actions/tests/test_file.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | null | null | null | muk_web_theme/muk_dms_actions/tests/test_file.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | null | null | null | muk_web_theme/muk_dms_actions/tests/test_file.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | 1 | 2021-05-05T07:59:08.000Z | 2021-05-05T07:59:08.000Z | ###################################################################################
#
# Copyright (C) 2017 MuK IT GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, eithe... | 44.6 | 97 | 0.675336 | 954 | 0.427803 | 0 | 0 | 763 | 0.342152 | 0 | 0 | 1,047 | 0.469507 |
d4343b5d871290ec2f4ca3f7e5cf287d0875613d | 2,500 | py | Python | populate.py | yueguoguo/shopify-flask-example | dc556aeac21bfcd9bbd5fdeece5cd4827e090055 | [
"Apache-2.0"
] | null | null | null | populate.py | yueguoguo/shopify-flask-example | dc556aeac21bfcd9bbd5fdeece5cd4827e090055 | [
"Apache-2.0"
] | null | null | null | populate.py | yueguoguo/shopify-flask-example | dc556aeac21bfcd9bbd5fdeece5cd4827e090055 | [
"Apache-2.0"
] | null | null | null | # Mock method to populate data to a Shopify store
# This is used only for development purpose
import io
import requests
import random
from typing import List
from time import sleep
import shopify
from faker import Faker
ACCESS_TOKEN = "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" # Temporary use only
API_VERSION = "2020... | 23.809524 | 92 | 0.7288 | 1,792 | 0.7168 | 0 | 0 | 0 | 0 | 0 | 0 | 702 | 0.2808 |
d43594d2c1b672c278943517c110acaf9fee2089 | 1,067 | py | Python | examples/VNH5019_example.py | being24/VNH5019 | 1030050d363991e43f63befbb052c423c3470156 | [
"MIT"
] | null | null | null | examples/VNH5019_example.py | being24/VNH5019 | 1030050d363991e43f63befbb052c423c3470156 | [
"MIT"
] | null | null | null | examples/VNH5019_example.py | being24/VNH5019 | 1030050d363991e43f63befbb052c423c3470156 | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
# -*- coding: utf-8 -*-
import time
from logging import DEBUG, ERROR, FATAL, INFO, WARN
import pigpio
from VNH5019_driver import VNH5019 as MOTOR
if __name__ == "__main__":
count = 0.0
one_count = 360 * 4 / (64 * 50)
pi = pigpio.pi()
motor0 = MOTOR(
pi,
dri... | 20.921569 | 63 | 0.626992 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 236 | 0.207564 |
d43e3a93b1b34f633fe835ba894b15dba7cc0781 | 306 | py | Python | idm_lp/commands/members_manager/__init__.py | lper1/dgm-. | aae14b2758b220f42030745bb941e7012bf77ae2 | [
"MIT"
] | 47 | 2020-09-15T11:13:35.000Z | 2022-03-30T06:37:52.000Z | idm_lp/commands/members_manager/__init__.py | lper1/dgm-. | aae14b2758b220f42030745bb941e7012bf77ae2 | [
"MIT"
] | 2 | 2020-10-27T15:30:33.000Z | 2020-11-14T16:50:01.000Z | idm_lp/commands/members_manager/__init__.py | lper1/dgm-. | aae14b2758b220f42030745bb941e7012bf77ae2 | [
"MIT"
] | 111 | 2020-09-27T20:06:42.000Z | 2022-03-19T20:29:29.000Z | from idm_lp.commands.members_manager import ignored
from idm_lp.commands.members_manager import ignored_global
from idm_lp.commands.members_manager import muted
from idm_lp.commands.members_manager import trusted
users_bp = (
ignored.user,
ignored_global.user,
muted.user,
trusted.user,
)
| 25.5 | 58 | 0.803922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d43f4c8e8daff28f9449dbacb0f541d11f998d5f | 326 | py | Python | stockUpdater/update.py | SamrathPalSingh/stockmarketwebsite | ea91647e25066c1a5c7f48015dccd19117428e9b | [
"MIT"
] | null | null | null | stockUpdater/update.py | SamrathPalSingh/stockmarketwebsite | ea91647e25066c1a5c7f48015dccd19117428e9b | [
"MIT"
] | 9 | 2020-05-05T18:43:29.000Z | 2021-09-22T18:58:59.000Z | stockUpdater/update.py | SamrathPalSingh/stockmarketwebsite | ea91647e25066c1a5c7f48015dccd19117428e9b | [
"MIT"
] | null | null | null | from .stock_prediction_logic.analyse import start_analysis
from home.models import stock
def updateStocks():
# start_analysis()
obj = stock.objects.get(stockSymbol = "AAPL")
obj.macd_trend = 'be'
obj.rank = int(4)
import datetime
now = datetime.datetime.now()
obj.volume = str(now)
obj.s... | 25.076923 | 58 | 0.687117 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.08589 |
d43f8d272d0dc80157cca7a95bb20fb7ed44e527 | 187 | py | Python | tk.16.py | ap19013/tkinter_sample | e0f12bb2fa386a3416a5cdc7a9d757094e7cb9c0 | [
"MIT"
] | null | null | null | tk.16.py | ap19013/tkinter_sample | e0f12bb2fa386a3416a5cdc7a9d757094e7cb9c0 | [
"MIT"
] | null | null | null | tk.16.py | ap19013/tkinter_sample | e0f12bb2fa386a3416a5cdc7a9d757094e7cb9c0 | [
"MIT"
] | null | null | null | import tkinter as tk
def btn_press():
print('Button was pressed')
root=tk.Tk()
root.geometry('150x80')
bt=tk.Button(bitmap='question',command=btn_press)
bt.pack()
root.mainloop()
| 14.384615 | 49 | 0.716578 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.203209 |
d43fb21fc63432d8db4d6094061fd258a4b6f29b | 790 | py | Python | train.py | jindal2309/conv-ai-model | 2238780bdc01965a97726edaeb834cda7ed73867 | [
"MIT"
] | null | null | null | train.py | jindal2309/conv-ai-model | 2238780bdc01965a97726edaeb834cda7ed73867 | [
"MIT"
] | null | null | null | train.py | jindal2309/conv-ai-model | 2238780bdc01965a97726edaeb834cda7ed73867 | [
"MIT"
] | null | null | null | from torch.utils.data.dataloader import DataLoader
from dataloader import ConvAIDataset
from utils import combine_contexts
from vocab.text import BPEVocab
max_seq_len = 512
train_data = 'data/train_self_revised_no_cands.txt'
bpe_vocab_path = 'vocab/bpe.vocab'
bpe_codes_path = 'vocab/bpe.code'
params = {'batch_size': ... | 30.384615 | 94 | 0.702532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.160759 |
d440b9f21f95bdb0021bcda32bda78128d97dda1 | 1,415 | py | Python | leetcode/binary_tree_level _order_traversal_leetcode_102/binary_tree_level _order_traversal.py | Williano/Interview-Prep | 0ad688637215080c7e4d26c640d74c89227e7cfb | [
"MIT"
] | null | null | null | leetcode/binary_tree_level _order_traversal_leetcode_102/binary_tree_level _order_traversal.py | Williano/Interview-Prep | 0ad688637215080c7e4d26c640d74c89227e7cfb | [
"MIT"
] | null | null | null | leetcode/binary_tree_level _order_traversal_leetcode_102/binary_tree_level _order_traversal.py | Williano/Interview-Prep | 0ad688637215080c7e4d26c640d74c89227e7cfb | [
"MIT"
] | null | null | null | """
Leetcode No: 102
Title: Binary Tree Level Order Traversal
Description:
Given the root of a binary tree, return the level order traversal of its
nodes' values. (i.e., from left to right, level by level).
Example 1:
Input: root = [3,9,20,null,null,15,7]
Output: [[3],[9,20],[15,7]]
... | 21.769231 | 76 | 0.579505 | 913 | 0.64523 | 0 | 0 | 0 | 0 | 0 | 0 | 431 | 0.304594 |
d4430fca441867f9bd80ffce1daeda8281c206ea | 5,785 | py | Python | Validation/Performance/test/ThreadTest.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | Validation/Performance/test/ThreadTest.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 7 | 2016-07-17T02:34:54.000Z | 2019-08-13T07:58:37.000Z | Validation/Performance/test/ThreadTest.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | #!/usr/bin/env python
#A script to test threading concepts/implementations
from __future__ import print_function
import threading,time,sys
#The following used from past bad experience with multithreading in Python
def _cleanup():
pass
#Define the "thread" class, of which each thread is a instance
class TestThread(... | 39.353741 | 185 | 0.621262 | 2,156 | 0.372688 | 0 | 0 | 0 | 0 | 0 | 0 | 2,707 | 0.467934 |
d443a92b3d66d3399c8c6a3006c5303d8c1121f2 | 2,512 | py | Python | test/test_loader.py | miguelgf/flask-pypendency | 44f1ab9ab65a4cc5951ba3ce9e3cf332ea44a23d | [
"MIT"
] | 4 | 2020-03-30T07:40:26.000Z | 2020-05-24T12:30:07.000Z | test/test_loader.py | miguelgf/flask-pypendency | 44f1ab9ab65a4cc5951ba3ce9e3cf332ea44a23d | [
"MIT"
] | null | null | null | test/test_loader.py | miguelgf/flask-pypendency | 44f1ab9ab65a4cc5951ba3ce9e3cf332ea44a23d | [
"MIT"
] | null | null | null | import os
from unittest import TestCase
from unittest.mock import patch, call
from flask import Flask
from flask_pypendency import Pypendency
class TestLoader(TestCase):
def setUp(self) -> None:
self.test_folder = os.path.dirname(os.path.abspath(__file__))
@patch("flask_pypendency.YamlLoader")
... | 35.885714 | 98 | 0.693869 | 2,364 | 0.941083 | 0 | 0 | 2,220 | 0.883758 | 0 | 0 | 1,000 | 0.398089 |
d44510e870ea216676fc2c3138e5db6f9bb2ae40 | 3,301 | py | Python | gui/plot.py | kklmn/ParSeq | 46178c21c3ee39b84bbf3d80bcd9f93128ace9e2 | [
"MIT"
] | 3 | 2018-11-19T07:14:25.000Z | 2020-07-28T17:20:14.000Z | gui/plot.py | kklmn/ParSeq | 46178c21c3ee39b84bbf3d80bcd9f93128ace9e2 | [
"MIT"
] | null | null | null | gui/plot.py | kklmn/ParSeq | 46178c21c3ee39b84bbf3d80bcd9f93128ace9e2 | [
"MIT"
] | 2 | 2019-03-25T09:36:11.000Z | 2021-12-19T07:52:38.000Z | # -*- coding: utf-8 -*-
__author__ = "Konstantin Klementiev"
__date__ = "16 Feb 2019"
# !!! SEE CODERULES.TXT !!!
import os
from silx.gui import qt
from silx.gui import plot as splot
from ..core import singletons as csi
class Plot1D(splot.PlotWindow):
def __init__(self, parent=None, backend=None, position=True)... | 37.511364 | 77 | 0.565586 | 3,070 | 0.930021 | 0 | 0 | 0 | 0 | 0 | 0 | 480 | 0.14541 |
d447131af35c0ceaefed1b6ddf58ca65242fff7a | 1,463 | py | Python | python-practice/leetcode/solveSudoku.py | daohuei/practice-playground | 50522a57ef056108c662cf668f26c97078caf61c | [
"MIT"
] | null | null | null | python-practice/leetcode/solveSudoku.py | daohuei/practice-playground | 50522a57ef056108c662cf668f26c97078caf61c | [
"MIT"
] | null | null | null | python-practice/leetcode/solveSudoku.py | daohuei/practice-playground | 50522a57ef056108c662cf668f26c97078caf61c | [
"MIT"
] | null | null | null | def solveSudoku(board: list()) -> None:
solver(board)
def solver(board) -> bool:
for i in range(9):
for j in range(9):
if board[i][j] == ".":
for count in range(1, 10):
print(board)
if isValidSudoku(board, str(count), i, j):
... | 30.479167 | 62 | 0.330144 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 249 | 0.170198 |
d44834c9eaa5437119fdcf7514ce64d66090c5cb | 576 | py | Python | src/test_app.py | perylemke/immutable_infra | 9e7ce2fec2ace5d2efdb598883483142b02ceac0 | [
"Apache-2.0"
] | 10 | 2019-05-06T20:48:48.000Z | 2020-10-30T21:30:23.000Z | src/test_app.py | perylemke/immutable_infra | 9e7ce2fec2ace5d2efdb598883483142b02ceac0 | [
"Apache-2.0"
] | null | null | null | src/test_app.py | perylemke/immutable_infra | 9e7ce2fec2ace5d2efdb598883483142b02ceac0 | [
"Apache-2.0"
] | null | null | null | from app import app
import json
import socket
import os.path
# The first and the second test validate json structure
def test_get_status_code():
app.config["TESTING"] = True
with app.test_client() as client:
response = client.get("/request")
assert response.status_code == 200
def test_get_sta... | 27.428571 | 56 | 0.661458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.234375 |
d44893b62aa4f04058abcb6d418e243ab45c2f58 | 1,874 | py | Python | bin/tag-generator.py | RealCamar/corretto-docker | 2152d770c3a0e1e695617ab16aa779ec0ada7336 | [
"MIT-0"
] | null | null | null | bin/tag-generator.py | RealCamar/corretto-docker | 2152d770c3a0e1e695617ab16aa779ec0ada7336 | [
"MIT-0"
] | null | null | null | bin/tag-generator.py | RealCamar/corretto-docker | 2152d770c3a0e1e695617ab16aa779ec0ada7336 | [
"MIT-0"
] | null | null | null | import json
DEFAULT_ALPINE_VERSION = '3.15'
ALPINE_VERSIONS = ['3.12','3.13','3.14', '3.15']
def generate_tags(key, version):
update = version.split('.')[1] if (key == '8') else version.split('.')[2]
expanded_version = f"{key}u{update}" if (key == '8') else f"{key}.0.{update}"
al2_tags = [f"{key}", f"{ex... | 44.619048 | 176 | 0.614728 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 823 | 0.439168 |
d44934c340554c98f34eefb9a2b323aeeec6a374 | 265 | py | Python | wifi-scheduler/deets.py | lileddie/guest-wifi-scheduler | 37b7256458145ab677df4b5fffb270f7cede83b8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | wifi-scheduler/deets.py | lileddie/guest-wifi-scheduler | 37b7256458145ab677df4b5fffb270f7cede83b8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | wifi-scheduler/deets.py | lileddie/guest-wifi-scheduler | 37b7256458145ab677df4b5fffb270f7cede83b8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | ssh_username='Wireless-LAN-controller-USERNAME'
ssh_password='Wireless-LAN-controller-PASSWD'
ssh_ip='10.1.1.1'
gmail_user='some_user@gmail.com'
gmail_password='PASSWD'
emdomain='@your_domain.com'
emailAddrs=['IT-team@your_domain.com','Wifi-Admin@your_domain.com']
| 33.125 | 67 | 0.803774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 176 | 0.664151 |
d44a00f74c482c7832f425339e2417ab5c29c7e3 | 35,663 | py | Python | lingvodoc/scripts/docx_import.py | SegFaulti4/lingvodoc | 8b296b43453a46b814d3cd381f94382ebcb9c6a6 | [
"Apache-2.0"
] | null | null | null | lingvodoc/scripts/docx_import.py | SegFaulti4/lingvodoc | 8b296b43453a46b814d3cd381f94382ebcb9c6a6 | [
"Apache-2.0"
] | 1 | 2021-07-26T09:52:46.000Z | 2021-07-26T09:52:46.000Z | lingvodoc/scripts/docx_import.py | Winking-maniac/lingvodoc | f037bf0e91ccdf020469037220a43e63849aa24a | [
"Apache-2.0"
] | null | null | null |
# Standard library imports.
import ast
import getopt
import logging
import pprint
import re
import sys
# External imports.
import docx
import pympi
import pyramid.paster as paster
# Project imports.
from lingvodoc.models import (
DBSession,
Dictionary,
)
# Setting up logging, if we are not being run as ... | 28.462091 | 108 | 0.535653 | 4,138 | 0.116031 | 3,517 | 0.098618 | 0 | 0 | 0 | 0 | 7,211 | 0.202198 |
d44a39453789db4c72fb031457a84e78d700988f | 355 | py | Python | auth/auth.py | helthazar/contestparser | 43843de5fd3cb7af7f24c8cbbd5ea068abb7f469 | [
"MIT"
] | null | null | null | auth/auth.py | helthazar/contestparser | 43843de5fd3cb7af7f24c8cbbd5ea068abb7f469 | [
"MIT"
] | null | null | null | auth/auth.py | helthazar/contestparser | 43843de5fd3cb7af7f24c8cbbd5ea068abb7f469 | [
"MIT"
] | null | null | null | class Auth:
@staticmethod
def opencup():
return {'login': '', 'password' : ''}
@staticmethod
def yandexcontest():
return {'login': '', 'password' : ''}
@staticmethod
def atcoder():
return {'login': '', 'password' : ''}
@staticmethod
def hackerrank():
re... | 22.1875 | 45 | 0.512676 | 355 | 1 | 0 | 0 | 321 | 0.904225 | 0 | 0 | 84 | 0.23662 |
d44a88c704f4a4c32fe66a7e2c86ec7176703a10 | 3,580 | py | Python | excel_loader/excel_loader.py | anontechnology/sheetloader-python | 9225b680d309fbedfdd569a11bed20e3e31f233c | [
"MIT"
] | null | null | null | excel_loader/excel_loader.py | anontechnology/sheetloader-python | 9225b680d309fbedfdd569a11bed20e3e31f233c | [
"MIT"
] | null | null | null | excel_loader/excel_loader.py | anontechnology/sheetloader-python | 9225b680d309fbedfdd569a11bed20e3e31f233c | [
"MIT"
] | null | null | null | from .configuration import Configuration
import vizivault
import openpyxl
def validate_columns(headers, column_config):
if type(column_config) is str:
if column_config not in headers:
raise TypeError("Attempting to read from nonexistent column", column_config)
else:
for key, value i... | 38.494624 | 159 | 0.663966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.160894 |
d44da7d127e1ce8cb7767fe40398dec1469b4993 | 4,509 | py | Python | mindhome_alpha/erpnext/demo/user/stock.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | mindhome_alpha/erpnext/demo/user/stock.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | null | null | null | mindhome_alpha/erpnext/demo/user/stock.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import print_function, unicode_literals
import frappe, random, erpnext
from frappe.desk import query_report
from erpnext.stock.stock_ledger import NegativeStockError
from erpn... | 34.684615 | 113 | 0.745842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 618 | 0.137059 |
d44e500b8a0f1c401858f71c9cd6e9f814642807 | 2,376 | py | Python | scripts/dot2txt.py | cartoonist/PairG | db7d28a5b9d01368dbfd2d9ae97a1d5179605be0 | [
"Apache-2.0"
] | 2 | 2020-07-08T09:10:19.000Z | 2020-09-01T17:54:41.000Z | scripts/dot2txt.py | cartoonist/PairG | db7d28a5b9d01368dbfd2d9ae97a1d5179605be0 | [
"Apache-2.0"
] | 1 | 2020-10-14T09:09:05.000Z | 2021-03-28T04:38:17.000Z | scripts/dot2txt.py | cartoonist/PairG | db7d28a5b9d01368dbfd2d9ae97a1d5179605be0 | [
"Apache-2.0"
] | 1 | 2020-08-28T09:02:56.000Z | 2020-08-28T09:02:56.000Z | #
# @file dot2txt.py
# @author Chirag Jain <cjain7@gatech.edu>
# @brief convert dot formatted compressed DBG from splitMEM to our .txt format
# note: splitMEM.cc was modified to print vertex DNA labels as well
# (set OPT_DisplaySeq=1 and OPT_SeqToDisplay= <int>::max() )
# ... | 28.285714 | 89 | 0.627525 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,177 | 0.49537 |
d45013e19ee94ead3bc3ab1cecb032b98f2fafda | 720 | py | Python | posts/templatetags/paginator.py | ujlbu4/vas3k.club | 1ec907cf7e5ae3a74059cde8729ca0b3e2d55a3e | [
"MIT"
] | 496 | 2020-04-24T04:20:32.000Z | 2022-03-31T21:55:57.000Z | posts/templatetags/paginator.py | ujlbu4/vas3k.club | 1ec907cf7e5ae3a74059cde8729ca0b3e2d55a3e | [
"MIT"
] | 642 | 2020-04-24T11:54:13.000Z | 2022-03-26T15:41:06.000Z | posts/templatetags/paginator.py | ujlbu4/vas3k.club | 1ec907cf7e5ae3a74059cde8729ca0b3e2d55a3e | [
"MIT"
] | 243 | 2020-04-24T11:49:11.000Z | 2022-03-24T18:38:48.000Z | from django import template
register = template.Library()
@register.inclusion_tag("common/paginator.html")
def paginator(items):
adjacent_pages = 4
num_pages = items.paginator.num_pages
page = items.number
start_page = max(page - adjacent_pages, 1)
if start_page <= 3:
start_page = 1
... | 24 | 81 | 0.643056 | 0 | 0 | 0 | 0 | 658 | 0.913889 | 0 | 0 | 78 | 0.108333 |
d4504bcd464e9711733f6e23b9e032a1b7ce8a80 | 18,784 | py | Python | svb/prior.py | physimals/svb | 9c04309ef1fc1d5f81103a50a01e3bf4c8f4ea44 | [
"Apache-2.0"
] | 3 | 2022-01-08T12:50:25.000Z | 2022-03-22T00:55:17.000Z | svb/prior.py | physimals/svb | 9c04309ef1fc1d5f81103a50a01e3bf4c8f4ea44 | [
"Apache-2.0"
] | 1 | 2020-10-16T15:27:46.000Z | 2020-10-16T15:59:48.000Z | svb/prior.py | physimals/svb | 9c04309ef1fc1d5f81103a50a01e3bf4c8f4ea44 | [
"Apache-2.0"
] | null | null | null | """
Definition of prior distribution
"""
import numpy as np
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
from .utils import LogBase
from .dist import Normal
PRIOR_TYPE_NONSPATIAL = "N"
PRIOR_TYPE_SPATIAL_MRF = "M"
def get_prior(param, data_model, **kwargs):
"""
... | 44.511848 | 156 | 0.638948 | 17,377 | 0.925096 | 0 | 0 | 0 | 0 | 0 | 0 | 7,750 | 0.412585 |
d450c2b05cb1f4cb1899bd454fdcaba9cb8d8618 | 1,767 | py | Python | pymediasoup/sctp_parameters.py | skymaze/pymediasoup | 362fa202448ef31ee512a6d1e7fc4e8c93c53566 | [
"MIT"
] | 9 | 2021-01-04T03:29:28.000Z | 2021-06-30T12:25:33.000Z | pymediasoup/sctp_parameters.py | skymaze/pymediasoup | 362fa202448ef31ee512a6d1e7fc4e8c93c53566 | [
"MIT"
] | 4 | 2021-02-23T06:24:01.000Z | 2021-07-23T01:15:00.000Z | pymediasoup/sctp_parameters.py | skymaze/pymediasoup | 362fa202448ef31ee512a6d1e7fc4e8c93c53566 | [
"MIT"
] | 3 | 2021-02-13T07:48:33.000Z | 2021-08-30T05:24:43.000Z | import sys
if sys.version_info >= (3, 8):
from typing import Optional, Literal
else:
from typing import Optional
from typing_extensions import Literal
from pydantic import BaseModel
class NumSctpStreams(BaseModel):
# Initially requested number of outgoing SCTP streams.
OS: int
# Maximum numbe... | 33.980769 | 80 | 0.736276 | 1,322 | 0.748161 | 0 | 0 | 0 | 0 | 0 | 0 | 1,009 | 0.571024 |
d451e78026744df79562580a63a5aa68b269af10 | 1,123 | py | Python | setup.py | open-contracting/extensions-data-collector | 041f7b44de60b3d241e4891da1bb1c1cb8ce9ec4 | [
"BSD-3-Clause"
] | null | null | null | setup.py | open-contracting/extensions-data-collector | 041f7b44de60b3d241e4891da1bb1c1cb8ce9ec4 | [
"BSD-3-Clause"
] | 23 | 2018-06-29T15:34:41.000Z | 2018-11-03T13:29:49.000Z | setup.py | open-contracting/extensions-data-collector | 041f7b44de60b3d241e4891da1bb1c1cb8ce9ec4 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
with open('README.rst') as f:
long_description = f.read()
setup(
name='ocdsextensionsdatacollector',
version='0.0.1',
author='Open Contracting Partnership, Open Data Services',
author_email='data@open-contracting.org',
url='https://github.com/open-co... | 27.390244 | 90 | 0.601959 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 559 | 0.497774 |
d4531e43111597e9d512203074171f5484832a7b | 423 | py | Python | server_side_python/DetectionAndTracking.py | Tpierga/2I_ProjetDetectionIA | 39ba28a1d98bf7f0e908ee6cab933b219cc98977 | [
"MIT"
] | null | null | null | server_side_python/DetectionAndTracking.py | Tpierga/2I_ProjetDetectionIA | 39ba28a1d98bf7f0e908ee6cab933b219cc98977 | [
"MIT"
] | null | null | null | server_side_python/DetectionAndTracking.py | Tpierga/2I_ProjetDetectionIA | 39ba28a1d98bf7f0e908ee6cab933b219cc98977 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import cv2
def detect_body(frame):
body_img = frame.copy()
body_classifier = cv2.CascadeClassifier("haarcascade_fullbody.xml")
gray = cv2.cvtColor(body_img, cv2.COLOR_BGR2GRAY)
bodies = body_classifier.detectMultiScale(gray)
for (x, y, w, h) i... | 18.391304 | 71 | 0.678487 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.061466 |
d453fbe6cb754cbcc0bc6074f266abb4c1ebf8ac | 1,333 | py | Python | packages/infra_libs/infra_libs/_command_line_linux.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | null | null | null | packages/infra_libs/infra_libs/_command_line_linux.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | 7 | 2022-02-15T01:11:37.000Z | 2022-03-02T12:46:13.000Z | packages/infra_libs/infra_libs/_command_line_linux.py | NDevTK/chromium-infra | d38e088e158d81f7f2065a38aa1ea1894f735ec4 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import ctypes
import ctypes.util
import sys
_CACHED_CMDLINE_LENGTH = None
def set_command_line(cmdline):
"""Replaces the commandline of this process as... | 34.179487 | 78 | 0.740435 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 561 | 0.420855 |
d4563d756cea51df08af818dd4f5a3f61d84a870 | 231 | py | Python | 4.py | CarineGhisiCadorin/infosatc-lp-avaliativo-02 | 0018df4f52c0659611c484c909ff4bbf925c450a | [
"MIT"
] | null | null | null | 4.py | CarineGhisiCadorin/infosatc-lp-avaliativo-02 | 0018df4f52c0659611c484c909ff4bbf925c450a | [
"MIT"
] | null | null | null | 4.py | CarineGhisiCadorin/infosatc-lp-avaliativo-02 | 0018df4f52c0659611c484c909ff4bbf925c450a | [
"MIT"
] | null | null | null | lista = [1,2,3,4,5,6,7,8,9,10]
print(lista)
lista2 = [11, 12, 13]
print(lista2)
lista_completa = lista + lista2
print(lista_completa)
#Ou
listaA = [1,2,3,4,5,6,7,8,9,10]
listaB = [11, 12, 13]
listaA = listaB.copy()
print(listaA)
| 17.769231 | 31 | 0.65368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0.017316 |
d457da1f72c081a9943cc4f083598a70a7403071 | 14,240 | py | Python | soundsig/discriminate.py | theunissenlab/sounsig | fca413aa71ce6fec079c59e615e328e6781d1d35 | [
"MIT"
] | 22 | 2017-08-05T12:41:49.000Z | 2022-01-24T23:14:59.000Z | soundsig/discriminate.py | theunissenlab/sounsig | fca413aa71ce6fec079c59e615e328e6781d1d35 | [
"MIT"
] | 3 | 2017-07-06T19:23:54.000Z | 2020-10-13T10:41:27.000Z | soundsig/discriminate.py | theunissenlab/sounsig | fca413aa71ce6fec079c59e615e328e6781d1d35 | [
"MIT"
] | 6 | 2017-05-13T18:41:23.000Z | 2022-01-24T23:15:01.000Z |
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis as QDA
from sklearn.ensemble import RandomForestClassifier as RF
from sklearn.mode... | 41.037464 | 134 | 0.589466 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,682 | 0.258567 |
d457ff551e1af72008fb3c2b85fdd39fc33404b0 | 4,477 | py | Python | backend_receitas/core/views.py | gugact/backend_web | 32b72ec460c1b6bae63bfd391c87b0c4bf644821 | [
"Apache-2.0"
] | null | null | null | backend_receitas/core/views.py | gugact/backend_web | 32b72ec460c1b6bae63bfd391c87b0c4bf644821 | [
"Apache-2.0"
] | null | null | null | backend_receitas/core/views.py | gugact/backend_web | 32b72ec460c1b6bae63bfd391c87b0c4bf644821 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render
from rest_framework import viewsets
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from django.http import *
from django.contrib.auth import *
fro... | 33.162963 | 101 | 0.682153 | 3,772 | 0.842528 | 0 | 0 | 0 | 0 | 0 | 0 | 625 | 0.139602 |
d458328c51a408b45453324ab4274a2b24ca3ca7 | 4,133 | py | Python | test_requests.py | charlax/vcrpy | 1d3fe5c33ecf06b494fa6cbea4acd62585820687 | [
"MIT"
] | null | null | null | test_requests.py | charlax/vcrpy | 1d3fe5c33ecf06b494fa6cbea4acd62585820687 | [
"MIT"
] | null | null | null | test_requests.py | charlax/vcrpy | 1d3fe5c33ecf06b494fa6cbea4acd62585820687 | [
"MIT"
] | null | null | null | # coding=utf-8
import os
import unittest
import vcr
import requests
TEST_CASSETTE_FILE = 'cassettes/test_req.yaml'
class TestRequestsGet(unittest.TestCase):
def setUp(self):
self.unmolested_response = requests.get('http://httpbin.org/')
with vcr.use_cassette(TEST_CASSETTE_FILE):
self... | 37.572727 | 121 | 0.709412 | 4,005 | 0.96903 | 0 | 0 | 0 | 0 | 0 | 0 | 571 | 0.138156 |
d459cbe1a695f12684fad0e549571c60487537ba | 736 | py | Python | src/predict.py | tarasowski/starbucks-offer-engine | 51b80e5b390b58427d842964867a5db2aed6dda6 | [
"MIT"
] | 1 | 2020-02-19T06:59:30.000Z | 2020-02-19T06:59:30.000Z | src/predict.py | tarasowski/starbucks-offer-engine | 51b80e5b390b58427d842964867a5db2aed6dda6 | [
"MIT"
] | null | null | null | src/predict.py | tarasowski/starbucks-offer-engine | 51b80e5b390b58427d842964867a5db2aed6dda6 | [
"MIT"
] | null | null | null | import joblib
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
def predict(data):
clf, X_test, y_test = data
y_pred = clf.predict(X_test)
print(f'Accuracy: {round(accuracy_score(y_test, y_pred) * 100, 2)}%')
print(f'F1 Score: {round(f1_score(y_test, y_pred) * 100, 2)... | 35.047619 | 83 | 0.677989 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 327 | 0.444293 |
d45bb49795fcb2f093014163608b945bdcaafd58 | 3,238 | py | Python | examples/optimize_polyfaces.py | hh-wu/ezdxf | 62509ba39b826ee9b36f19c0a5abad7f3518186a | [
"MIT"
] | 1 | 2021-06-05T09:15:15.000Z | 2021-06-05T09:15:15.000Z | examples/optimize_polyfaces.py | luoyu-123/ezdxf | 40963a2010028f87846241e08434f43ab421f3fb | [
"MIT"
] | null | null | null | examples/optimize_polyfaces.py | luoyu-123/ezdxf | 40963a2010028f87846241e08434f43ab421f3fb | [
"MIT"
] | null | null | null | # Purpose: open example files with big polyface models
# Created: 23.04.2014
# Copyright (c) 2014-2020, Manfred Moitzi
# License: MIT License
import time
from pathlib import Path
import ezdxf
from ezdxf.render import MeshVertexMerger
SRCDIR = Path(r'D:\Source\dxftest\CADKitSamples')
OUTDIR = Path('~/Desktop/Outbox').... | 32.38 | 94 | 0.661519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,072 | 0.331069 |
d45c7405d2149d4710720762085175c95dab0d57 | 1,576 | py | Python | glashammer/bundles/contrib/dev/firephp.py | passy/glashammer-rdrei | 9e56952d70b961d8945707469aad9cfe97c4e7b7 | [
"MIT"
] | 1 | 2016-07-04T15:23:59.000Z | 2016-07-04T15:23:59.000Z | glashammer/bundles/contrib/dev/firephp.py | passy/glashammer-rdrei | 9e56952d70b961d8945707469aad9cfe97c4e7b7 | [
"MIT"
] | null | null | null | glashammer/bundles/contrib/dev/firephp.py | passy/glashammer-rdrei | 9e56952d70b961d8945707469aad9cfe97c4e7b7 | [
"MIT"
] | null | null | null |
# adapted from http://code.cmlenz.net/diva/browser/trunk/diva/ext/firephp.py
# (c) 2008 C. M. Lenz, Glashammer Developers
from time import time
from logging import Handler
from simplejson import dumps
from glashammer.utils import local
from glashammer.utils.log import add_log_handler
LEVEL_MAP = {'DEBUG': 'LOG', ... | 29.735849 | 85 | 0.64467 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 447 | 0.283629 |
d45e087825bbd78e5f7c80d653a07a247d6d0607 | 5,667 | py | Python | neural machine translation/data_load.py | quanganh1997polytechnique/Project-DL-Seq2Seq | de7b118ec865af60ee44c5a463f59ac548e76794 | [
"MIT"
] | null | null | null | neural machine translation/data_load.py | quanganh1997polytechnique/Project-DL-Seq2Seq | de7b118ec865af60ee44c5a463f59ac548e76794 | [
"MIT"
] | null | null | null | neural machine translation/data_load.py | quanganh1997polytechnique/Project-DL-Seq2Seq | de7b118ec865af60ee44c5a463f59ac548e76794 | [
"MIT"
] | null | null | null | """
** deeplean-ai.com **
created by :: GauravBh1010tt
contact :: gauravbhatt.deeplearn@gmail.com
"""
from __future__ import unicode_literals, print_function, division
import math
import re
import os
import numpy as np
import torch
import random
import warnings
from io import open
import unicodedata
import matplotlib... | 26.85782 | 77 | 0.640551 | 616 | 0.108699 | 0 | 0 | 0 | 0 | 0 | 0 | 859 | 0.151579 |
d45fdaebbda1324d20d94461daceb3de9d2ddda0 | 9,041 | py | Python | tests/channels/mock.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 415 | 2016-06-10T00:46:55.000Z | 2021-10-16T00:56:06.000Z | tests/channels/mock.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 25 | 2016-06-11T13:48:59.000Z | 2021-01-05T11:19:30.000Z | tests/channels/mock.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 109 | 2016-06-11T05:17:05.000Z | 2021-12-22T11:02:22.000Z | import codecs
import two1.bitcoin as bitcoin
import two1.bitcoin.utils as utils
import two1.channels.server as server
import two1.channels.blockchain as blockchain
import two1.channels.statemachine as statemachine
class MockTwo1Wallet:
"""Mock Two1 Wallet interface for unit testing. See two1.wallet.Two1Wallet fo... | 41.856481 | 181 | 0.685433 | 8,817 | 0.975224 | 0 | 0 | 53 | 0.005862 | 0 | 0 | 2,728 | 0.301737 |
d46043e7e3ee4e0fd2cb4b7196675dd558bf6307 | 2,256 | py | Python | dev/Gems/CloudGemMetric/v1/AWS/common-code/LoadTest/LoadTest__CloudGemMetric.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 8 | 2019-10-07T16:33:47.000Z | 2020-12-07T03:59:58.000Z | dev/Gems/CloudGemMetric/v1/AWS/common-code/LoadTest/LoadTest__CloudGemMetric.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | null | null | null | dev/Gems/CloudGemMetric/v1/AWS/common-code/LoadTest/LoadTest__CloudGemMetric.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 5 | 2020-08-27T20:44:18.000Z | 2021-08-21T22:54:11.000Z | # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the ... | 35.809524 | 143 | 0.734486 | 750 | 0.332447 | 0 | 0 | 0 | 0 | 0 | 0 | 1,002 | 0.444149 |
d461b5026cb626462925369752d7e402976cff47 | 2,300 | py | Python | subir/base.py | xyla-io/subir | fde16a16643466aa64ea43647c588caf3d3057cf | [
"MIT"
] | null | null | null | subir/base.py | xyla-io/subir | fde16a16643466aa64ea43647c588caf3d3057cf | [
"MIT"
] | null | null | null | subir/base.py | xyla-io/subir | fde16a16643466aa64ea43647c588caf3d3057cf | [
"MIT"
] | null | null | null | from __future__ import annotations
import re
import pandas as pd
from enum import Enum
from typing import Dict
class ColumnType(Enum):
integer = 'bigint'
decimal = 'double precision'
date = 'date'
short_text = 'character varying(256)'
medium_text = 'character varying(8192)'
long_text = 'character varying... | 28.04878 | 139 | 0.630435 | 1,991 | 0.865652 | 0 | 0 | 1,737 | 0.755217 | 0 | 0 | 347 | 0.15087 |
d463a1c535606eac893445765a893c90912ac9f7 | 756 | py | Python | python/django-app/config/urls.py | mp5maker/library | b4d2eea70ae0da9d917285569031edfb4d8ab9fc | [
"MIT"
] | null | null | null | python/django-app/config/urls.py | mp5maker/library | b4d2eea70ae0da9d917285569031edfb4d8ab9fc | [
"MIT"
] | 23 | 2020-08-15T15:18:32.000Z | 2022-02-26T13:49:05.000Z | python/django-app/config/urls.py | mp5maker/library | b4d2eea70ae0da9d917285569031edfb4d8ab9fc | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import (static, )
urlpatterns = [
path('admin/', admin.site.urls),
path('api-auth/', include('rest_framework.urls', namespace="rest_framework")),
path('api/v1/', include('su... | 34.363636 | 82 | 0.702381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.214286 |
d463c99b03f786a3e4037e0d14d949c40fda1d7c | 1,492 | py | Python | config.py | proteus1991/RawVSR | 56686859498a07c83fde191fa1fc109d7aafb3da | [
"MIT"
] | 24 | 2021-01-05T02:34:09.000Z | 2022-03-15T12:26:21.000Z | config.py | baowenbo/RawVSR | 56686859498a07c83fde191fa1fc109d7aafb3da | [
"MIT"
] | 3 | 2021-01-11T17:43:58.000Z | 2021-02-04T19:59:36.000Z | config.py | baowenbo/RawVSR | 56686859498a07c83fde191fa1fc109d7aafb3da | [
"MIT"
] | 4 | 2021-01-25T08:45:04.000Z | 2021-12-22T09:14:35.000Z | """
paper: Exploit Camera Raw Data for Video Super-Resolution via Hidden Markov Model Inference
file: config.py
author: Xiaohong Liu
date: 17/09/19
"""
def get_config(args):
scale = args.scale_ratio
save_tag = args.save_image
if scale not in [2, 4]:
raise Exception('scale {} is not supported!'.fo... | 31.083333 | 91 | 0.432306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 588 | 0.394102 |
d4644f1d055899deb023c3fcbded50db465c8acd | 29 | py | Python | model/tests/test_gibbssampler.py | JonasPC/BayesFactorModel | 7a210a8b198400d911b3269f277d4bb50106c688 | [
"MIT"
] | null | null | null | model/tests/test_gibbssampler.py | JonasPC/BayesFactorModel | 7a210a8b198400d911b3269f277d4bb50106c688 | [
"MIT"
] | null | null | null | model/tests/test_gibbssampler.py | JonasPC/BayesFactorModel | 7a210a8b198400d911b3269f277d4bb50106c688 | [
"MIT"
] | null | null | null |
### Write some goddamn test
| 9.666667 | 27 | 0.689655 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.931034 |
d4651fb797f26004f86c5fb02f0497881f2eee93 | 965 | py | Python | leetcode/lru-cache/LRUCache.py | giwankim/algo | 8dd1cf8aed6e89db54e753c7ce5821019628c47f | [
"MIT"
] | null | null | null | leetcode/lru-cache/LRUCache.py | giwankim/algo | 8dd1cf8aed6e89db54e753c7ce5821019628c47f | [
"MIT"
] | null | null | null | leetcode/lru-cache/LRUCache.py | giwankim/algo | 8dd1cf8aed6e89db54e753c7ce5821019628c47f | [
"MIT"
] | null | null | null | import collections
class LRUCache:
def __init__(self, capacity: int):
self.cache = collections.OrderedDict()
self.capacity = capacity
def get(self, key: int) -> int:
if key not in self.cache:
return -1
self.cache.move_to_end(key)
return self.cache[key]
... | 23.536585 | 48 | 0.569948 | 499 | 0.517098 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.010363 |
d46677069c648d405454e7408df8cbf599f1a80c | 436 | py | Python | staticfiles/context_processors.py | nttks/django-staticfiles | cd4e024e44c0be909333fcac5c328b2e4d2747bd | [
"BSD-3-Clause"
] | 1 | 2021-02-08T07:49:35.000Z | 2021-02-08T07:49:35.000Z | staticfiles/context_processors.py | nttks/django-staticfiles | cd4e024e44c0be909333fcac5c328b2e4d2747bd | [
"BSD-3-Clause"
] | 2 | 2021-06-01T22:03:20.000Z | 2022-01-13T00:43:38.000Z | staticfiles/context_processors.py | nttks/django-staticfiles | cd4e024e44c0be909333fcac5c328b2e4d2747bd | [
"BSD-3-Clause"
] | 1 | 2020-11-04T08:39:52.000Z | 2020-11-04T08:39:52.000Z | import warnings
from django.conf import settings
def static(request):
"""
Adds static-related context variables to the context.
"""
return {'STATIC_URL': settings.STATIC_URL}
def static_url(request):
warnings.warn(
"The context processor 'staticfiles.context_processors.static_url' "
... | 27.25 | 76 | 0.713303 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.472477 |
d4672e7716b611a83d36c41530dceaaadca832b5 | 4,018 | py | Python | src/datasets/emnist.py | bjfranks/Classification-AD | 4eecd6648bb6b54662944921924c8960c2ca236c | [
"MIT"
] | 27 | 2020-05-30T16:27:31.000Z | 2022-03-28T16:45:25.000Z | src/datasets/emnist.py | bjfranks/Classification-AD | 4eecd6648bb6b54662944921924c8960c2ca236c | [
"MIT"
] | 3 | 2021-04-22T10:01:55.000Z | 2022-01-13T02:50:31.000Z | src/datasets/emnist.py | bjfranks/Classification-AD | 4eecd6648bb6b54662944921924c8960c2ca236c | [
"MIT"
] | 7 | 2020-06-15T16:31:23.000Z | 2022-03-23T09:33:32.000Z | from torch.utils.data import Subset
from PIL import Image
from torchvision.datasets import EMNIST
from base.torchvision_dataset import TorchvisionDataset
from PIL.ImageFilter import GaussianBlur
import numpy as np
import torch
import torchvision.transforms as transforms
import random
class EMNIST_Dataset(Torchvision... | 39.009709 | 117 | 0.639373 | 3,726 | 0.927327 | 0 | 0 | 0 | 0 | 0 | 0 | 742 | 0.184669 |
d467fadd8af4902f63395f8f7006d9ea2380851a | 10,037 | py | Python | dfdone/plot.py | elespike/dfdone | c514e290a0eb0f74fd3c8f74ddbfddb917b2a629 | [
"MIT"
] | 7 | 2020-06-05T15:33:40.000Z | 2021-03-07T16:57:55.000Z | dfdone/plot.py | elespike/dfdone | c514e290a0eb0f74fd3c8f74ddbfddb917b2a629 | [
"MIT"
] | null | null | null | dfdone/plot.py | elespike/dfdone | c514e290a0eb0f74fd3c8f74ddbfddb917b2a629 | [
"MIT"
] | 1 | 2020-06-05T20:01:46.000Z | 2020-06-05T20:01:46.000Z | from collections import defaultdict as ddict
from operator import attrgetter, methodcaller
from string import punctuation
from graphviz import Digraph
from dfdone.enums import (
Profile,
Role,
)
ASSUMPTION = 'assumption'
DATA = 'data'
MEASURE = 'measure'
THREAT = 'threat'
def table_from_list(class_name, t... | 32.800654 | 78 | 0.565209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,547 | 0.253761 |
d468f2c87e5ec8bf7bc10de9d752f8c5b503e861 | 1,159 | py | Python | asilmedia.py | kamronbek29/asilmedia_scrapper | b94b6a0fc05f22adab8ba18ea466cd8511dfd319 | [
"MIT"
] | null | null | null | asilmedia.py | kamronbek29/asilmedia_scrapper | b94b6a0fc05f22adab8ba18ea466cd8511dfd319 | [
"MIT"
] | null | null | null | asilmedia.py | kamronbek29/asilmedia_scrapper | b94b6a0fc05f22adab8ba18ea466cd8511dfd319 | [
"MIT"
] | null | null | null | import os
import requests
from pyquery import PyQuery as pq
def get_download_url(movie_url):
get_request = requests.get(movie_url)
get_request_str = str(get_request.content, 'utf-8')
pq_obj_items = pq(get_request_str)('div.download-list.d-hidden').eq(0)('div')('a').items()
download_urls = []
fo... | 28.975 | 117 | 0.701467 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.180328 |
d46a143b038029e9b4c40e27ea30ecd1cee32a8c | 552 | py | Python | Project/dbconnect.py | G00387859/DATA-REPRESENTATION-AND-QUERY | 56490e235e393b350ec2eda8933ae3463c801be6 | [
"MIT"
] | null | null | null | Project/dbconnect.py | G00387859/DATA-REPRESENTATION-AND-QUERY | 56490e235e393b350ec2eda8933ae3463c801be6 | [
"MIT"
] | null | null | null | Project/dbconnect.py | G00387859/DATA-REPRESENTATION-AND-QUERY | 56490e235e393b350ec2eda8933ae3463c801be6 | [
"MIT"
] | null | null | null | from flask_sqlalchemy import SQLAlchemy
if __name__ == "__main__":
app.run(debug=True)
SQLALCHEMY_DATABASE_URI = "mysql+mysqlconnector://{username}:{password}@{hostname}/{databasename}".format(username="donalmaher067.mysql.pythonanywhere-services.com",password="Hollyroco@9552",hostname="donalmaher067.mysql.pythonan... | 78.857143 | 300 | 0.820652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.567029 |
d46e9c27f6de917156be5e00b0df07e53661338f | 22,470 | py | Python | USBIP.py | Frazew/PythonUSBIP | 480195837bb3fc25892dedcdf8b5a0d113ad33d5 | [
"Unlicense"
] | 57 | 2016-09-22T00:19:26.000Z | 2022-03-11T15:26:47.000Z | USBIP.py | Frazew/PythonUSBIP | 480195837bb3fc25892dedcdf8b5a0d113ad33d5 | [
"Unlicense"
] | 2 | 2018-08-28T15:54:30.000Z | 2018-09-05T18:03:23.000Z | USBIP.py | Frazew/PythonUSBIP | 480195837bb3fc25892dedcdf8b5a0d113ad33d5 | [
"Unlicense"
] | 9 | 2017-12-17T17:33:03.000Z | 2022-03-22T08:37:58.000Z | # Copyright (c) 2014 Yaron Shani <yaron.shani@gmail.com>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notic... | 37.140496 | 145 | 0.522519 | 20,781 | 0.924833 | 0 | 0 | 0 | 0 | 0 | 0 | 5,366 | 0.238807 |
d46f232434b4694a4a36f6f3d592acbd62feb370 | 371 | py | Python | eth2/_utils/hash.py | dendisuhubdy/trinity | 001664781259c7dd0779a0ef6f822451b608ded4 | [
"MIT"
] | 14 | 2020-08-24T18:23:31.000Z | 2021-11-04T14:11:04.000Z | eth2/_utils/hash.py | dendisuhubdy/trinity | 001664781259c7dd0779a0ef6f822451b608ded4 | [
"MIT"
] | 19 | 2020-08-25T15:57:05.000Z | 2021-07-07T00:49:45.000Z | eth2/_utils/hash.py | dendisuhubdy/trinity | 001664781259c7dd0779a0ef6f822451b608ded4 | [
"MIT"
] | 7 | 2020-08-24T22:53:02.000Z | 2022-03-28T18:51:48.000Z | from hashlib import sha256
from typing import Union
from eth_typing import Hash32
def hash_eth2(data: Union[bytes, bytearray]) -> Hash32:
"""
Return SHA-256 hash of ``data``.
Note: it's a placeholder and we aim to migrate to a S[T/N]ARK-friendly hash function in
a future Ethereum 2.0 deployment phase... | 26.5 | 91 | 0.700809 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 184 | 0.495957 |
d46f429828765f453153f4024780bc7dd3ec8f3f | 1,011 | py | Python | scripts/venv/lib/python2.7/site-packages/cogent/struct/annotation.py | sauloal/cnidaria | fe6f8c8dfed86d39c80f2804a753c05bb2e485b4 | [
"MIT"
] | 3 | 2015-11-20T08:44:42.000Z | 2016-12-14T01:40:03.000Z | scripts/venv/lib/python2.7/site-packages/cogent/struct/annotation.py | sauloal/cnidaria | fe6f8c8dfed86d39c80f2804a753c05bb2e485b4 | [
"MIT"
] | 1 | 2017-09-04T14:04:32.000Z | 2020-05-26T19:04:00.000Z | scripts/venv/lib/python2.7/site-packages/cogent/struct/annotation.py | sauloal/cnidaria | fe6f8c8dfed86d39c80f2804a753c05bb2e485b4 | [
"MIT"
] | null | null | null | """Contains functions to annotate macromolecular entities."""
from cogent.core.entity import HIERARCHY
__author__ = "Marcin Cieslik"
__copyright__ = "Copyright 2007-2012, The Cogent Project"
__credits__ = ["Marcin Cieslik"]
__license__ = "GPL"
__version__ = "1.5.3"
__maintainer__ = "Marcin Cieslik"
__email__ = "mpc4p... | 33.7 | 80 | 0.670623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 551 | 0.545005 |
d470ff56ce7d42894f9f9e01bcb618251f87a397 | 3,618 | py | Python | cerebralcortex/core/data_manager/sql/kafka_offsets_handler.py | brinnaebent/CerebralCortex-Kernel | b0daad06df118d27e62e178e123170e8f189065e | [
"BSD-2-Clause"
] | null | null | null | cerebralcortex/core/data_manager/sql/kafka_offsets_handler.py | brinnaebent/CerebralCortex-Kernel | b0daad06df118d27e62e178e123170e8f189065e | [
"BSD-2-Clause"
] | null | null | null | cerebralcortex/core/data_manager/sql/kafka_offsets_handler.py | brinnaebent/CerebralCortex-Kernel | b0daad06df118d27e62e178e123170e8f189065e | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2019, MD2K Center of Excellence
# - Nasir Ali <nasir.ali08@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above cop... | 45.225 | 147 | 0.67717 | 2,197 | 0.607242 | 0 | 0 | 0 | 0 | 0 | 0 | 2,650 | 0.732449 |
d472079cf7438e4b98eb936c27d2f9a994e896f2 | 255 | py | Python | webservice/tasks/email_tasks.py | geekgao/Dev_Blog_Webservice | a58e0f662ad98dc0b7b38cee5e50aed951f990f9 | [
"MIT"
] | 1 | 2015-03-13T17:38:11.000Z | 2015-03-13T17:38:11.000Z | webservice/tasks/email_tasks.py | geekgao/Dev_Blog_Webservice | a58e0f662ad98dc0b7b38cee5e50aed951f990f9 | [
"MIT"
] | null | null | null | webservice/tasks/email_tasks.py | geekgao/Dev_Blog_Webservice | a58e0f662ad98dc0b7b38cee5e50aed951f990f9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from celery.task import task
from webservice.mail import send_reply_mail
@task
def send_email_task(receiver, title, content, did, username, diary_title):
send_reply_mail(receiver, title, content, did, username, diary_title)
| 25.5 | 74 | 0.760784 | 0 | 0 | 0 | 0 | 154 | 0.603922 | 0 | 0 | 23 | 0.090196 |
d4736994de9c464bb6f5278b4dbda2f2dd43fd96 | 3,790 | py | Python | Rejection-System/rejection_system.py | willtop/imitation-learning | 2c00f77e4e575e38ef233cc5eac6862e598ec4ac | [
"MIT"
] | null | null | null | Rejection-System/rejection_system.py | willtop/imitation-learning | 2c00f77e4e575e38ef233cc5eac6862e598ec4ac | [
"MIT"
] | null | null | null | Rejection-System/rejection_system.py | willtop/imitation-learning | 2c00f77e4e575e38ef233cc5eac6862e598ec4ac | [
"MIT"
] | null | null | null | import os
import tensorflow as tf
import numpy as np
import rejection_network
class RejectionSystem():
def __init__(self):
self.dir_path = os.path.dirname(os.path.abspath(__file__))
self._train_dir = os.path.join(self.dir_path, "Data/Train/")
self._valid_dir = os.path.join(self.dir_path, ... | 48.589744 | 167 | 0.629815 | 3,420 | 0.902375 | 0 | 0 | 0 | 0 | 0 | 0 | 316 | 0.083377 |
d473bd2a6111d692be84e1c6bd981d1b8ff3ee2c | 2,370 | py | Python | examples/display_youtube_subs_single_tilechain.py | netmanchris/pylifxtiles | f9a77fe0beaabff4c792032d7778a8ad2815e2bd | [
"Apache-2.0"
] | 6 | 2020-04-27T00:55:47.000Z | 2020-10-11T19:16:38.000Z | examples/display_youtube_subs_single_tilechain.py | netmanchris/pylifxtiles | f9a77fe0beaabff4c792032d7778a8ad2815e2bd | [
"Apache-2.0"
] | null | null | null | examples/display_youtube_subs_single_tilechain.py | netmanchris/pylifxtiles | f9a77fe0beaabff4c792032d7778a8ad2815e2bd | [
"Apache-2.0"
] | null | null | null | import requests
import inflect
#create a file called secrets.py and place your googleAPI key in a var called youtube_api_key DO NOT POSTS THIS TO GITHUB
from lifxlan import *
# from random import randint, betavariate
from time import sleep
from examples.secrets import youtube_api_key
from pylifxtiles import actions
fro... | 32.465753 | 121 | 0.627426 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 510 | 0.21519 |
d47455c84e22f79970850d0a4f527fa6cc12c816 | 6,031 | py | Python | lib/cfnvpn/templates/lambdas/auto_route_populator/app.py | base2Services/cfn-vpn | d26c01eb675cd47b2162aefeb26540a2a5891062 | [
"MIT"
] | 1 | 2019-10-17T02:36:16.000Z | 2019-10-17T02:36:16.000Z | lib/cfnvpn/templates/lambdas/auto_route_populator/app.py | base2Services/cfn-vpn | d26c01eb675cd47b2162aefeb26540a2a5891062 | [
"MIT"
] | 7 | 2019-12-12T00:34:31.000Z | 2022-03-30T03:47:51.000Z | lib/cfnvpn/templates/lambdas/auto_route_populator/app.py | base2Services/cfn-vpn | d26c01eb675cd47b2162aefeb26540a2a5891062 | [
"MIT"
] | 7 | 2019-12-11T22:23:15.000Z | 2021-11-23T03:51:54.000Z | import socket
import boto3
from botocore.exceptions import ClientError
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def delete_route(client, vpn_endpoint, subnet, cidr):
client.delete_client_vpn_route(
ClientVpnEndpointId=vpn_endpoint,
TargetVpcSubnetId=subnet,
Dest... | 34.462857 | 138 | 0.664898 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,336 | 0.387332 |