hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | 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 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797704e351b779418d27389552084a8c80670780 | 20,524 | py | Python | shadowsocks/asyncdns.py | alenpoe/ssr | da1dcd671f235e9bf7a70b11f8275a54289e9221 | [
"Apache-2.0"
] | 3,773 | 2017-07-27T16:12:04.000Z | 2022-03-31T09:49:28.000Z | shadowsocks/asyncdns.py | JerryKwok/shadowsocksr | fd723a92c488d202b407323f0512987346944136 | [
"Apache-2.0"
] | 97 | 2017-08-04T05:25:45.000Z | 2022-02-21T16:43:45.000Z | shadowsocks/asyncdns.py | JerryKwok/shadowsocksr | fd723a92c488d202b407323f0512987346944136 | [
"Apache-2.0"
] | 1,892 | 2017-07-27T16:08:48.000Z | 2022-03-25T07:50:46.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014-2015 clowwindy
#
# 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 r... | 36.913669 | 90 | 0.486796 |
7977053e34b360efa705892cf067502831579485 | 377 | py | Python | backend/migrations/0026_auto_20200429_1417.py | Software-Engineering-Bachelor-Project/mycroft | 8ca3b6bfaa7b573f67def06c637f3c57838440a4 | [
"MIT"
] | 5 | 2020-03-01T11:17:09.000Z | 2021-07-08T20:45:47.000Z | backend/migrations/0026_auto_20200429_1417.py | Software-Engineering-Bachelor-Project/mycroft | 8ca3b6bfaa7b573f67def06c637f3c57838440a4 | [
"MIT"
] | 245 | 2020-03-28T11:59:12.000Z | 2020-05-26T10:05:22.000Z | backend/migrations/0026_auto_20200429_1417.py | Software-Engineering-Bachelor-Project/mycroft | 8ca3b6bfaa7b573f67def06c637f3c57838440a4 | [
"MIT"
] | 5 | 2020-02-03T08:15:13.000Z | 2020-04-15T07:22:47.000Z | # Generated by Django 3.0.3 on 2020-04-29 12:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0025_clip_playable'),
]
operations = [
migrations.AlterField(
model_name='area',
name='radius',
... | 19.842105 | 48 | 0.591512 |
797706025b855f14efda63a05b3786f462f7a4ed | 161 | py | Python | src/skypyblue/core/marker.py | knub/skypyblue | 93aa91446c652466b8f9311f0e403c201dbce21b | [
"MIT"
] | 4 | 2019-04-29T15:10:36.000Z | 2021-09-11T23:21:05.000Z | src/skypyblue/core/marker.py | babelsberg/skypyblue | 6b74344959a734f352925c8c817ec6c89ee31772 | [
"MIT"
] | 1 | 2021-06-30T12:16:34.000Z | 2021-06-30T12:16:34.000Z | src/skypyblue/core/marker.py | knub/skypyblue | 93aa91446c652466b8f9311f0e403c201dbce21b | [
"MIT"
] | 1 | 2015-07-23T14:01:52.000Z | 2015-07-23T14:01:52.000Z | class Marker(object):
def __init__(self):
super(Marker, self).__init__()
self.mark = 0
def new_mark(self):
self.mark += 1
return self.mark
| 16.1 | 34 | 0.63354 |
7977061551ddfe0b5e495708cbd5f83ec75bb3bd | 6,591 | py | Python | fs/contrib/davfs/xmlobj.py | rimrim/pyfs | ce9f3c76468a0779a0517ea7d7c191caf1bffd25 | [
"BSD-3-Clause"
] | 1 | 2021-07-15T22:45:17.000Z | 2021-07-15T22:45:17.000Z | fs/contrib/davfs/xmlobj.py | rimrim/pyfs | ce9f3c76468a0779a0517ea7d7c191caf1bffd25 | [
"BSD-3-Clause"
] | null | null | null | fs/contrib/davfs/xmlobj.py | rimrim/pyfs | ce9f3c76468a0779a0517ea7d7c191caf1bffd25 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the MIT License.
"""
fs.contrib.davfs.xmlobj: dexml model definitions for WebDAV
This module defines the various XML element structures for WebDAV as a set
of dexml.Model subclasses.
"""
from urllib.parse impo... | 31.6875 | 93 | 0.669094 |
797707827cf04afea6c1df29f280b46018c6d2f9 | 2,458 | py | Python | utils.py | gitlost-murali/generating-reviews-discovering-sentiment | 0032e4b87903713ad4242599f5dda2eb7b8c40fd | [
"MIT"
] | 1,548 | 2017-04-06T05:43:46.000Z | 2022-03-02T05:52:45.000Z | utils.py | gitlost-murali/generating-reviews-discovering-sentiment | 0032e4b87903713ad4242599f5dda2eb7b8c40fd | [
"MIT"
] | 52 | 2017-04-06T18:54:19.000Z | 2020-06-01T15:33:24.000Z | utils.py | gitlost-murali/generating-reviews-discovering-sentiment | 0032e4b87903713ad4242599f5dda2eb7b8c40fd | [
"MIT"
] | 391 | 2017-04-06T06:01:18.000Z | 2022-01-30T15:21:57.000Z | import os
import html
import numpy as np
import pandas as pd
import tensorflow as tf
from sklearn.linear_model import LogisticRegression
def train_with_reg_cv(trX, trY, vaX, vaY, teX=None, teY=None, penalty='l1',
C=2**np.arange(-8, 1).astype(np.float), seed=42):
scores = []
for i, c in enumerate(C):
... | 28.581395 | 80 | 0.617575 |
797708a15a57ae12a724a3314a399896d40ddcb3 | 3,638 | py | Python | lldb/test/API/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py | mkinsner/llvm | 589d48844edb12cd357b3024248b93d64b6760bf | [
"Apache-2.0"
] | 2,338 | 2018-06-19T17:34:51.000Z | 2022-03-31T11:00:37.000Z | lldb/test/API/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py | mkinsner/llvm | 589d48844edb12cd357b3024248b93d64b6760bf | [
"Apache-2.0"
] | 3,740 | 2019-01-23T15:36:48.000Z | 2022-03-31T22:01:13.000Z | lldb/test/API/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py | mkinsner/llvm | 589d48844edb12cd357b3024248b93d64b6760bf | [
"Apache-2.0"
] | 500 | 2019-01-23T07:49:22.000Z | 2022-03-30T02:59:37.000Z | """
Test that the breakpoint auto-continue flag works correctly.
"""
import lldb
import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.lldbtest import *
class BreakpointAutoContinue(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True
def test_breakpoint_auto_co... | 38.294737 | 98 | 0.670423 |
7977098558044b1e6f2f98fc340d796cc7527aae | 3,405 | py | Python | src/features/build_features.py | sa616473/real_or_not | d8feac56efc000aae36b4028a0f70fd22057b074 | [
"MIT"
] | null | null | null | src/features/build_features.py | sa616473/real_or_not | d8feac56efc000aae36b4028a0f70fd22057b074 | [
"MIT"
] | null | null | null | src/features/build_features.py | sa616473/real_or_not | d8feac56efc000aae36b4028a0f70fd22057b074 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import io
import json
import re
import string
def remove_stopwords(tweet_data_text):
'''
This functions removes the stopwords
'''
stop = [ "a", "about", "above", "after", "again", "against", "all",
"am", "an", "and", "any", "are", "as", "at", "be", "be... | 47.291667 | 109 | 0.521292 |
79770b28ca109affbb0d4f234807ffe43ea1d846 | 2,753 | py | Python | sidekick/migrations/0002_create_common_cron.py | CurrieBen/sidekick | c0d9d32ce83c87cdcc5d6d828cf2c748d012d9b3 | [
"MIT"
] | 3 | 2019-07-19T07:20:22.000Z | 2022-02-17T10:16:20.000Z | sidekick/migrations/0002_create_common_cron.py | CurrieBen/sidekick | c0d9d32ce83c87cdcc5d6d828cf2c748d012d9b3 | [
"MIT"
] | null | null | null | sidekick/migrations/0002_create_common_cron.py | CurrieBen/sidekick | c0d9d32ce83c87cdcc5d6d828cf2c748d012d9b3 | [
"MIT"
] | 1 | 2020-07-06T15:18:40.000Z | 2020-07-06T15:18:40.000Z | from django.db import migrations
def do_func(apps, schema_editor):
# We get the model from the versioned app registry;
# if we directly import it, it'll be the wrong version
CronSchedule = apps.get_model("sidekick", "CronSchedule")
db_alias = schema_editor.connection.alias
CronSchedule.objects.usi... | 36.706667 | 89 | 0.495823 |
79770b8d8a266040f2abbfe35ba81685bb4a042f | 2,603 | py | Python | polymatrix/payoff.py | python-polymatrix-games/polymatrix | cd7966ff0f028bb9bcd80f5c5340918b1748735e | [
"MIT"
] | 2 | 2020-10-31T00:27:42.000Z | 2020-11-20T15:52:30.000Z | polymatrix/payoff.py | python-polymatrix-games/polymatrix-games | cd7966ff0f028bb9bcd80f5c5340918b1748735e | [
"MIT"
] | null | null | null | polymatrix/payoff.py | python-polymatrix-games/polymatrix-games | cd7966ff0f028bb9bcd80f5c5340918b1748735e | [
"MIT"
] | 1 | 2021-03-05T15:50:01.000Z | 2021-03-05T15:50:01.000Z | import numpy as np
from .logger import log
class PayoffFunction():
def __init__(self, alpha, players, function='pairwise_fractional'):
self.players = players
self.alpha = alpha
self.function = self.choose_function(function_name=function)
def __call__(self, player1: int, player2: int):
... | 41.983871 | 121 | 0.597003 |
79770bb13a9f7a2b8fb6041463ebd0a056a4abfb | 2,994 | py | Python | pysoa/server/django/cache.py | zetahernandez/pysoa | 006e55ba877196a42c64f2ff453583d366082d55 | [
"Apache-2.0"
] | null | null | null | pysoa/server/django/cache.py | zetahernandez/pysoa | 006e55ba877196a42c64f2ff453583d366082d55 | [
"Apache-2.0"
] | null | null | null | pysoa/server/django/cache.py | zetahernandez/pysoa | 006e55ba877196a42c64f2ff453583d366082d55 | [
"Apache-2.0"
] | null | null | null | from __future__ import (
absolute_import,
unicode_literals,
)
from django.core.cache.backends.locmem import LocMemCache
from django.core.cache.backends.memcached import (
MemcachedCache,
PyLibMCCache,
)
__all__ = (
'PySOAMemcachedCache',
'PySOAProcessScopedMemoryCache',
'PySOAPyLibMCCache... | 37.898734 | 119 | 0.701403 |
79770bd3a7f5628514236ea3cee430fcc6472696 | 10,503 | py | Python | plantcv/plantcv/analyze_object.py | Howzit123/plantcv | b4ff6ad765da36353f40827ce3816b33d1d3596a | [
"MIT"
] | 1 | 2021-02-25T16:57:45.000Z | 2021-02-25T16:57:45.000Z | plantcv/plantcv/analyze_object.py | Howzit123/plantcv | b4ff6ad765da36353f40827ce3816b33d1d3596a | [
"MIT"
] | null | null | null | plantcv/plantcv/analyze_object.py | Howzit123/plantcv | b4ff6ad765da36353f40827ce3816b33d1d3596a | [
"MIT"
] | null | null | null | # Analyzes an object and outputs numeric properties
import os
import cv2
import numpy as np
from plantcv.plantcv import print_image
from plantcv.plantcv import plot_image
from plantcv.plantcv import params
from plantcv.plantcv import outputs
from plantcv.plantcv import within_frame
def analyze_object(img, obj, mask)... | 46.68 | 119 | 0.610683 |
79770bf687c989c304fc11147f0dc1aee977e316 | 2,303 | py | Python | tests/models/symbol/mgmt_client_record_read_descriptor_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 5 | 2016-08-23T17:52:22.000Z | 2019-05-16T08:45:30.000Z | tests/models/symbol/mgmt_client_record_read_descriptor_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 2 | 2016-11-10T05:30:21.000Z | 2019-04-05T15:03:37.000Z | tests/models/symbol/mgmt_client_record_read_descriptor_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 7 | 2016-08-25T16:11:44.000Z | 2021-02-22T05:31:25.000Z | #!/usr/bin/env python
# coding: utf-8
"""
The Clear BSD License
Copyright (c) – 2016, NetApp, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions... | 60.605263 | 845 | 0.785497 |
79770ca684479cdddd1a663d7ffba04f955d79b7 | 1,232 | py | Python | apps/users/tests/__init__.py | GiannisClipper/payments | 94e08144597b3f4cd0de8485edf3f5535aeb9da6 | [
"MIT"
] | null | null | null | apps/users/tests/__init__.py | GiannisClipper/payments | 94e08144597b3f4cd0de8485edf3f5535aeb9da6 | [
"MIT"
] | null | null | null | apps/users/tests/__init__.py | GiannisClipper/payments | 94e08144597b3f4cd0de8485edf3f5535aeb9da6 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
import copy
USER_SAMPLES = {
1: {'username': 'user1', 'password': 'pass123', 'email': 'user1@testemail.org'},
2: {'username': 'user2', 'password': 'pass234', 'email': 'user2@testemail.org'},
3: {'username': 'user3', 'password... | 28.651163 | 86 | 0.637987 |
79770dc11865a5b8798b4ea785499f3f5622bc86 | 267 | py | Python | socialdistribution/api/migrations/0007_merge_20211028_2315.py | CMPUT404-Project-Group/CMPUT404-Group-Project | e541cc609f260d7221fe0be8975c5b2444d74af0 | [
"W3C-20150513"
] | null | null | null | socialdistribution/api/migrations/0007_merge_20211028_2315.py | CMPUT404-Project-Group/CMPUT404-Group-Project | e541cc609f260d7221fe0be8975c5b2444d74af0 | [
"W3C-20150513"
] | 44 | 2021-10-14T15:44:46.000Z | 2021-12-05T00:57:23.000Z | socialdistribution/api/migrations/0007_merge_20211028_2315.py | CMPUT404-Project-Group/Social-Distribution-CMPUT404-Group-Project | e541cc609f260d7221fe0be8975c5b2444d74af0 | [
"W3C-20150513"
] | 1 | 2021-12-07T01:14:14.000Z | 2021-12-07T01:14:14.000Z | # Generated by Django 3.2.8 on 2021-10-29 05:15
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0006_merge_20211028_2112'),
('api', '0006_merge_20211028_2132'),
]
operations = [
]
| 17.8 | 47 | 0.640449 |
79770e7b8075d9b9a187fdf78460111b42eb5b6a | 4,036 | py | Python | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/CreateAlarmRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/CreateAlarmRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/CreateAlarmRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.355372 | 110 | 0.751239 |
79770ee3084f787578a5457eaa4d7c4cc4d16aca | 12,235 | py | Python | acredapi/views.py | rdenaux/acred | ffe44953a96338acfe3860a9898e7f0b70b5c9cb | [
"Apache-2.0"
] | 8 | 2020-08-31T04:14:22.000Z | 2021-09-29T06:00:31.000Z | acredapi/views.py | expertailab/acred | ee45840c942ef2fac4f26da8d756b7c47e42847c | [
"Apache-2.0"
] | null | null | null | acredapi/views.py | expertailab/acred | ee45840c942ef2fac4f26da8d756b7c47e42847c | [
"Apache-2.0"
] | 1 | 2020-10-07T08:09:29.000Z | 2020-10-07T08:09:29.000Z | #
# Copyright (c) 2019 Expert System Iberia
#
"""
API Views for serving user requests with examples
"""
import logging
import subprocess
from flask import jsonify, request
import werkzeug
from werkzeug.datastructures import MultiDict
from acredapi import app, config, claim
from esiutils import citimings, dictu
from acr... | 38.596215 | 113 | 0.646915 |
79771088cbc89af163c27a246e95c583994238d3 | 8,265 | py | Python | tools/test_reverse.py | fjczx/OpenPCDet-lazurite | e3f17ab17b2c295e1786e34c6feb86adffe84b49 | [
"Apache-2.0"
] | null | null | null | tools/test_reverse.py | fjczx/OpenPCDet-lazurite | e3f17ab17b2c295e1786e34c6feb86adffe84b49 | [
"Apache-2.0"
] | null | null | null | tools/test_reverse.py | fjczx/OpenPCDet-lazurite | e3f17ab17b2c295e1786e34c6feb86adffe84b49 | [
"Apache-2.0"
] | null | null | null | import argparse
import datetime
import glob
import os
import re
import time
from pathlib import Path
import numpy as np
import torch
from tensorboardX import SummaryWriter
from eval_utils import eval_utils
from pcdet.config import cfg, cfg_from_list, cfg_from_yaml_file, log_config_to_file
from pcdet.datasets import b... | 41.325 | 120 | 0.679734 |
797710bf5ca0720c03434892debba1e375d5d50b | 1,324 | py | Python | docs/zeroMQ-guide2/examples/Python/mtrelay.py | krattai/noo-ebs | 00f67fd8f25b7c1eadf7348245670cb0ac911184 | [
"BSD-2-Clause"
] | 2 | 2015-04-07T14:37:24.000Z | 2015-11-06T00:31:01.000Z | examples/Python/mtrelay.py | tzuryby/zguide | 609b4255d87287a42932392db1d50256c1b878ae | [
"Zed",
"X11",
"MIT"
] | null | null | null | examples/Python/mtrelay.py | tzuryby/zguide | 609b4255d87287a42932392db1d50256c1b878ae | [
"Zed",
"X11",
"MIT"
] | null | null | null | """
Multithreaded relay
Author: Guillaume Aubert (gaubert) <guillaume(dot)aubert(at)gmail(dot)com>
"""
import threading
import zmq
def step1(context):
""" step1 """
# Signal downstream to step 2
sender = context.socket(zmq.PAIR)
sender.connect("inproc://step2")
sender.send(""... | 19.470588 | 77 | 0.610272 |
79771148558f10140a5223c39bb1b2fa4f14585b | 751 | py | Python | tblu_python_agent/shared_module/enviar_dados_adapter.py | PauloFerreira25/tblu_python_agent | 1a40a538b8ecdae16b227f45df46d8ca751d08d7 | [
"MIT"
] | null | null | null | tblu_python_agent/shared_module/enviar_dados_adapter.py | PauloFerreira25/tblu_python_agent | 1a40a538b8ecdae16b227f45df46d8ca751d08d7 | [
"MIT"
] | null | null | null | tblu_python_agent/shared_module/enviar_dados_adapter.py | PauloFerreira25/tblu_python_agent | 1a40a538b8ecdae16b227f45df46d8ca751d08d7 | [
"MIT"
] | null | null | null | import sys
import requests
from .coletas_adapter.entity.coleta_entity import Coleta
import time
import json
def enviaDados(ctx, metric, resultado):
extra = {"local": __name__,
"method": sys._getframe().f_code.co_name}
try:
logMSG = "Envia Dados: {}".format(metric.getUniq())
ctx.lo... | 32.652174 | 88 | 0.643142 |
797712aec916fc80d3bb42bc07bded8941a35c2b | 1,896 | py | Python | MergeSort.py | kyhunter/Algorithm-Practice | b7104bf00027b8df046632ebefae13e5939fee01 | [
"MIT"
] | 1 | 2018-08-29T00:52:43.000Z | 2018-08-29T00:52:43.000Z | MergeSort.py | kyhunter/Algorithm-Practice | b7104bf00027b8df046632ebefae13e5939fee01 | [
"MIT"
] | null | null | null | MergeSort.py | kyhunter/Algorithm-Practice | b7104bf00027b8df046632ebefae13e5939fee01 | [
"MIT"
] | null | null | null | # merge sort algorithm
import math
A_ori = [1, 3, 5, 4, 2, 8, 6, 11]
print('original array is', A_ori)
def merge(A, p, q, r):
L = A[p:q+1]
R = A[q+1:r+1]
L.append(math.inf)
R.append(math.inf)
i = 0
j = 0
for k in range(p, r+1):
if L[i] <= R[j]:
A[k] =... | 20.387097 | 67 | 0.450422 |
7977132c806e57a2d43b58dfd7e0c3aded823083 | 674 | py | Python | manage.py | Floyd-Droid/jf-issue-tracker | 77907a57ec13952a026b813d952e0699ca065d23 | [
"MIT"
] | null | null | null | manage.py | Floyd-Droid/jf-issue-tracker | 77907a57ec13952a026b813d952e0699ca065d23 | [
"MIT"
] | null | null | null | manage.py | Floyd-Droid/jf-issue-tracker | 77907a57ec13952a026b813d952e0699ca065d23 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tracker.settings.production')
try:
from django.core.management import execute_from_command_line
... | 29.304348 | 82 | 0.682493 |
7977148371153bbc8ca89e0500b741ee012cbeac | 10,220 | py | Python | legacy/contrib/NeurIPS_SN7/pdseg/models/modeling/deeplab.py | veritas0505yg/PaddleSeg | 12395e8f6e07bec85a33d83ae9c369a2e554a9a8 | [
"Apache-2.0"
] | 2 | 2021-08-19T08:06:22.000Z | 2021-11-09T10:42:17.000Z | legacy/contrib/NeurIPS_SN7/pdseg/models/modeling/deeplab.py | neonhuang/PaddleSeg | 8dcb0756e54522b6f87c83f760dfe55a33732850 | [
"Apache-2.0"
] | null | null | null | legacy/contrib/NeurIPS_SN7/pdseg/models/modeling/deeplab.py | neonhuang/PaddleSeg | 8dcb0756e54522b6f87c83f760dfe55a33732850 | [
"Apache-2.0"
] | 2 | 2021-08-04T02:48:50.000Z | 2021-11-16T08:13:41.000Z | # coding: utf8
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
# 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
#
# Un... | 37.028986 | 81 | 0.530235 |
797714f28ac36356996b99a52965ba3fa73041d5 | 1,752 | py | Python | app.py | Sravanksk/flask-crud-todo | 11c6ab45622ca2f72d110d1f59c3fd438f8e2323 | [
"MIT"
] | null | null | null | app.py | Sravanksk/flask-crud-todo | 11c6ab45622ca2f72d110d1f59c3fd438f8e2323 | [
"MIT"
] | null | null | null | app.py | Sravanksk/flask-crud-todo | 11c6ab45622ca2f72d110d1f59c3fd438f8e2323 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, url_for, request, redirect
from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db'
db = SQLAlchemy(app)
class Todo(db.Model):
id = db.Column(db.Integer, primary_key=True)
... | 26.953846 | 68 | 0.63242 |
797716f7da87c384ee42be407e0b6cc3d7e23c58 | 1,867 | py | Python | sabnzbd/decorators.py | Ablecken/sabnzbd | 6609248fceb17b77014c966df181f00f2223fa21 | [
"0BSD",
"PSF-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | sabnzbd/decorators.py | Ablecken/sabnzbd | 6609248fceb17b77014c966df181f00f2223fa21 | [
"0BSD",
"PSF-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | sabnzbd/decorators.py | Ablecken/sabnzbd | 6609248fceb17b77014c966df181f00f2223fa21 | [
"0BSD",
"PSF-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python -OO
# Copyright 2007-2018 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later... | 35.226415 | 81 | 0.639529 |
797717c4cadfc5b173fc506bbdf2f53dd750cd35 | 618 | py | Python | scripts/db.py | DeepSea-Developments/YodaPi | 545d1d8f487920dd72450eaa0567d549d6fab3ef | [
"MIT"
] | 1 | 2020-10-10T21:42:14.000Z | 2020-10-10T21:42:14.000Z | scripts/db.py | DeepSea-Developments/YodaPi | 545d1d8f487920dd72450eaa0567d549d6fab3ef | [
"MIT"
] | null | null | null | scripts/db.py | DeepSea-Developments/YodaPi | 545d1d8f487920dd72450eaa0567d549d6fab3ef | [
"MIT"
] | 1 | 2020-10-05T01:46:46.000Z | 2020-10-05T01:46:46.000Z | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
import pathlib
Base = declarative_base()
DEFAULT_DATABASE_PATH = pathlib.Path(__file__).parent / '../data/yodapi_v1.db'
SessionLocal = None
def init(db_path=DEFAULT_DATABASE_PATH):
... | 32.526316 | 79 | 0.723301 |
7977194798614aab282cb6779c0bb312e05e581a | 2,688 | py | Python | code/clonesizedistributions/plot-emerson-stepbystep.py | andim/paper-tcellimprint | e89605e51014fa3f347f96bab3d3d84c2b013a2f | [
"MIT"
] | 2 | 2020-07-28T10:47:40.000Z | 2021-11-14T20:07:21.000Z | code/clonesizedistributions/plot-emerson-stepbystep.py | andim/paper-tcellimprint | e89605e51014fa3f347f96bab3d3d84c2b013a2f | [
"MIT"
] | null | null | null | code/clonesizedistributions/plot-emerson-stepbystep.py | andim/paper-tcellimprint | e89605e51014fa3f347f96bab3d3d84c2b013a2f | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
import sys
sys.path.append('..')
from lib import *
from lib.fitting import *
from common import *
plt.style.use('../custom.mplstyle')
meta = pd.read_csv(data_directory + 'emerson-counts.csv')
print(meta.shape[0])
agemin, agemax... | 34.461538 | 81 | 0.521949 |
79771a27a55620bf236df8357350873fd16e4772 | 7,833 | py | Python | captioning/models/ShowTellModel.py | xuewyang/Fashion-Image-Captioning-Benchmark | 5494e6fb453d01984f18e9872412897bbab95681 | [
"MIT"
] | null | null | null | captioning/models/ShowTellModel.py | xuewyang/Fashion-Image-Captioning-Benchmark | 5494e6fb453d01984f18e9872412897bbab95681 | [
"MIT"
] | null | null | null | captioning/models/ShowTellModel.py | xuewyang/Fashion-Image-Captioning-Benchmark | 5494e6fb453d01984f18e9872412897bbab95681 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import *
from . import utils
from .CaptionModel import CaptionModel
class ShowTellModel(CaptionModel):
def __init__(... | 44.76 | 123 | 0.573216 |
79771c31eed7d40448cb793d5c60bbaf694ff57b | 740 | py | Python | zhongdeng/client.py | winterwd/company-crawler | 9efde76be7c620faa698375dd1a6337a8f3aa43d | [
"MIT"
] | null | null | null | zhongdeng/client.py | winterwd/company-crawler | 9efde76be7c620faa698375dd1a6337a8f3aa43d | [
"MIT"
] | null | null | null | zhongdeng/client.py | winterwd/company-crawler | 9efde76be7c620faa698375dd1a6337a8f3aa43d | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*-: coding: utf-8 -*-
"""
:author: winter
:date: 2022-02-21
:desc:
"""
from tencent_ocr import TencentOCR
from baidu_ocr import BaiduOCR
from ali_ocr import AliOCR
class ZDClient:
@staticmethod
def ocr_detect():
res = TencentOCR().detect()
if res is None:
pr... | 19.473684 | 40 | 0.541892 |
79771d1be2bd6a4b646affbd931ea3f3bae1f56f | 2,827 | py | Python | DL_model/test.py | dhruvsharma15/Research-Paper-Tagger | 1f25d23d8e33e6325386c3eaa9ee43eb579eb92a | [
"MIT"
] | null | null | null | DL_model/test.py | dhruvsharma15/Research-Paper-Tagger | 1f25d23d8e33e6325386c3eaa9ee43eb579eb92a | [
"MIT"
] | null | null | null | DL_model/test.py | dhruvsharma15/Research-Paper-Tagger | 1f25d23d8e33e6325386c3eaa9ee43eb579eb92a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 4 11:35:47 2018
@author: dhruv
"""
import numpy as np
import tensorflow as tf
import pickle
import time
start = time.perf_counter()
import os
import pickle
###### this data has been vectorized, that is, processed to be containing the word vectors
data_path = 'vector_d... | 24.798246 | 104 | 0.710294 |
79771d36b487ec59423c97257fbabda557115120 | 7,907 | py | Python | seahub/dtable/models.py | JIMhackKING/seahub-1 | c10ef67f2118287e6c0d4d194ef27f93ddff0164 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | seahub/dtable/models.py | JIMhackKING/seahub-1 | c10ef67f2118287e6c0d4d194ef27f93ddff0164 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | seahub/dtable/models.py | JIMhackKING/seahub-1 | c10ef67f2118287e6c0d4d194ef27f93ddff0164 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import uuid
import hmac
from hashlib import sha1
import datetime
from django.db import models
from seaserv import seafile_api
from seahub.utils.timeutils import timestamp_to_isoformat_timestr, datetime_to_isoformat_timestr
from seahub.base.templatetags.seahub_tags import email2nickname
cla... | 32.012146 | 96 | 0.646389 |
79771d8da402fd7d21bb9aabc34f9fb1ee1c8c62 | 1,347 | py | Python | boilerplate.py | jchristman/adventofcode | 8ac4408aa5cda12a1996a657e4d336bae5156ccb | [
"MIT"
] | 13 | 2015-12-08T23:13:39.000Z | 2021-01-03T01:27:45.000Z | boilerplate.py | jchristman/adventofcode | 8ac4408aa5cda12a1996a657e4d336bae5156ccb | [
"MIT"
] | null | null | null | boilerplate.py | jchristman/adventofcode | 8ac4408aa5cda12a1996a657e4d336bae5156ccb | [
"MIT"
] | 1 | 2015-12-16T22:29:08.000Z | 2015-12-16T22:29:08.000Z | # ----------------------------------------------------------------------------------------------------------------------
# Advent of Code - Day X
#
# The Python One-Liner challenge:
#
# Rules:
#
# - Reading input into a variable from another file or with an assignment is acceptable and does not count against
# ... | 37.416667 | 120 | 0.320713 |
79771efde9e069e55748ac7cf6aa36ebaadce6de | 705 | py | Python | repos/system_upgrade/el7toel8/actors/checkchrony/actor.py | panovotn/leapp-repository | e80bdbf65393e68bc2e91b43b46fdd9b9b787878 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/checkchrony/actor.py | panovotn/leapp-repository | e80bdbf65393e68bc2e91b43b46fdd9b9b787878 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/checkchrony/actor.py | panovotn/leapp-repository | e80bdbf65393e68bc2e91b43b46fdd9b9b787878 | [
"Apache-2.0"
] | null | null | null | from leapp.actors import Actor
from leapp.libraries.actor.library import check_chrony
from leapp.libraries.common.rpms import has_package
from leapp.models import InstalledRedHatSignedRPM
from leapp.reporting import Report
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
class CheckChrony(Actor):
"""
Che... | 29.375 | 74 | 0.765957 |
797720614f58dec174b60f317b3b8f0fecaff4c6 | 1,957 | py | Python | Projects/simple/DomainSlice.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Projects/simple/DomainSlice.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Projects/simple/DomainSlice.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | '''
DEVELOPER NAME: BALAVIGNESH.M
IMPLEMENTED DATE : 17-11-2018
ProjectName : DomainSlice
Project Scope Details:
This project is intresting to slice the user entered string to get the seprate information from
that string about the user
Implementati... | 35.581818 | 112 | 0.588656 |
797721834083028b5e3de0b7e095da3103dd5912 | 43,899 | py | Python | release/scripts/mgear/rigbits/facial_rigger/lips_rigger.py | tk-aria/mgear4 | eac1af6882dd7dc4cec1a4b71854040d376704ce | [
"MIT"
] | 1 | 2022-03-16T12:10:47.000Z | 2022-03-16T12:10:47.000Z | release/scripts/mgear/rigbits/facial_rigger/lips_rigger.py | tk-aria/mgear4 | eac1af6882dd7dc4cec1a4b71854040d376704ce | [
"MIT"
] | null | null | null | release/scripts/mgear/rigbits/facial_rigger/lips_rigger.py | tk-aria/mgear4 | eac1af6882dd7dc4cec1a4b71854040d376704ce | [
"MIT"
] | null | null | null | """Rigbits lips rigger tool"""
import json
from functools import partial
from six import string_types
import mgear.core.pyqt as gqt
import pymel.core as pm
from maya.app.general.mayaMixin import MayaQWidgetDockableMixin
from mgear.vendor.Qt import QtCore, QtWidgets
from pymel.core import datatypes
from mgear import ... | 38.507895 | 79 | 0.54106 |
797721b434808ad3a9fe00cea735fde99981ec3f | 4,499 | py | Python | src/ssvc.py | ahouseholder/SSVC | eefcab9148f3357b1cac509602f60a0210e0de51 | [
"MIT"
] | null | null | null | src/ssvc.py | ahouseholder/SSVC | eefcab9148f3357b1cac509602f60a0210e0de51 | [
"MIT"
] | 2 | 2021-01-11T19:38:37.000Z | 2021-02-26T14:13:06.000Z | src/ssvc.py | ahouseholder/SSVC | eefcab9148f3357b1cac509602f60a0210e0de51 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
file: ssvc
author: adh
created_at: 12/2/19 2:23 PM
'''
import pandas as pd
_app_cols = ['Exploitation', 'Exposure', 'MissionImpact', 'SafetyImpact', 'Outcome']
_dev_cols = ['Exploitation', 'Utility', 'TechnicalImpact', 'SafetyImpact', 'Outcome']
_df_applier = pd.read_csv("../data/ssvc_1_app... | 36.577236 | 95 | 0.690153 |
797721eebf5b6654b12f02d3e5f8c81680cb2036 | 11,998 | py | Python | samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/capitalization.py | JigarJoshi/openapi-generator | 785535b8d6881b358463994823abbda2b26ff42e | [
"Apache-2.0"
] | 1 | 2022-01-03T04:40:07.000Z | 2022-01-03T04:40:07.000Z | samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/capitalization.py | JigarJoshi/openapi-generator | 785535b8d6881b358463994823abbda2b26ff42e | [
"Apache-2.0"
] | 28 | 2021-04-07T07:38:36.000Z | 2022-03-31T03:10:56.000Z | samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/capitalization.py | JigarJoshi/openapi-generator | 785535b8d6881b358463994823abbda2b26ff42e | [
"Apache-2.0"
] | 2 | 2020-09-11T10:07:58.000Z | 2021-11-24T14:51:39.000Z | """
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import re # noq... | 44.437037 | 174 | 0.568095 |
79772409eb58519d5984ce1198c29699ac361523 | 493 | py | Python | exapi/models_mappers/binance/base/mapper.py | astsu-dev/exapi | 1ef39ccdd77e9ddb60ec6eaa16a2cc26e1ac3e12 | [
"MIT"
] | null | null | null | exapi/models_mappers/binance/base/mapper.py | astsu-dev/exapi | 1ef39ccdd77e9ddb60ec6eaa16a2cc26e1ac3e12 | [
"MIT"
] | null | null | null | exapi/models_mappers/binance/base/mapper.py | astsu-dev/exapi | 1ef39ccdd77e9ddb60ec6eaa16a2cc26e1ac3e12 | [
"MIT"
] | null | null | null | from exapi.models.binance import BinanceErrorJson, BinanceErrorModel
class BinanceBaseModelsMapper:
"""Binance base models mapper.
Maps json to models.
"""
def map_to_error(self, error_json: BinanceErrorJson) -> BinanceErrorModel:
"""Maps error json to error model.
Args:
... | 23.47619 | 80 | 0.661258 |
7977247048bd7bd23242e2dd5252d84027521193 | 4,821 | py | Python | msgraph/cli/command_modules/usersfunctions/azext_usersfunctions/vendored_sdks/usersfunctions/aio/operations/_usersonenotepagesparentnotebooksectionspages_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | msgraph/cli/command_modules/usersfunctions/azext_usersfunctions/vendored_sdks/usersfunctions/aio/operations/_usersonenotepagesparentnotebooksectionspages_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | 22 | 2022-03-29T22:54:37.000Z | 2022-03-29T22:55:27.000Z | msgraph/cli/command_modules/usersfunctions/azext_usersfunctions/vendored_sdks/usersfunctions/aio/operations/_usersonenotepagesparentnotebooksectionspages_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 45.056075 | 191 | 0.680357 |
797726003c1139ebc656c21c6c6f7a87ccb56404 | 5,421 | py | Python | obm/model_base.py | aploium/obm | d68a15d2b53accbb661eb66f6610825285f4ef7b | [
"MIT"
] | null | null | null | obm/model_base.py | aploium/obm | d68a15d2b53accbb661eb66f6610825285f4ef7b | [
"MIT"
] | null | null | null | obm/model_base.py | aploium/obm | d68a15d2b53accbb661eb66f6610825285f4ef7b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding=utf-8
import inspect
import collections
from .datastruct import Bits
from .fields import FieldBase
class MetaPackage(type):
@classmethod
def __prepare__(mcs, name, bases, **kwargs):
return collections.OrderedDict()
def __new__(cls, name, bases, attrs):
# p... | 34.310127 | 94 | 0.595647 |
797727e5377e553b43ffb7701469de73fc92887b | 16,070 | py | Python | tests/core/daemon/test_daemon.py | ageorge95/chia-blockchain | 55f453d1e84d544ecad1b5c7a59c4439a6cbe1fa | [
"Apache-2.0"
] | 2 | 2022-03-22T22:00:46.000Z | 2022-03-22T22:42:45.000Z | tests/core/daemon/test_daemon.py | su77ungr/chia-blockchain | 7f84309e70876e227a14a6d2e10eb63a30a393b8 | [
"Apache-2.0"
] | 3 | 2022-03-21T22:00:11.000Z | 2022-03-21T22:00:40.000Z | tests/core/daemon/test_daemon.py | su77ungr/chia-blockchain | 7f84309e70876e227a14a6d2e10eb63a30a393b8 | [
"Apache-2.0"
] | 1 | 2022-03-20T14:51:39.000Z | 2022-03-20T14:51:39.000Z | import aiohttp
import asyncio
import json
import logging
import pytest
import pytest_asyncio
from chia.daemon.server import WebSocketServer
from chia.server.outbound_message import NodeType
from chia.types.peer_info import PeerInfo
from tests.block_tools import BlockTools, create_block_tools_async
from chia.util.ints ... | 46.178161 | 119 | 0.629807 |
797728041aebb0d075b25005cf4db7bbcc052f16 | 16,865 | py | Python | salt/modules/ceph.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2021-08-14T13:48:38.000Z | 2021-08-14T13:48:38.000Z | salt/modules/ceph.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 3 | 2015-03-31T14:44:05.000Z | 2015-06-18T19:02:24.000Z | salt/modules/ceph.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2020-01-02T09:03:24.000Z | 2020-01-02T09:03:24.000Z | # -*- coding: utf-8 -*-
'''
Module to provide ceph control with salt.
:depends: - ceph_cfg Python module
.. versionadded:: 2016.11.0
'''
# Import Python Libs
from __future__ import absolute_import
import logging
log = logging.getLogger(__name__)
__virtualname__ = 'ceph'
try:
import ceph_cfg
HAS_CEPH_CFG... | 20.718673 | 98 | 0.587252 |
79772887ea5f64c770c21ca2d936122fbc24d643 | 3,838 | py | Python | configs/_base_/models/faster_rcnn_r50_fpn_grid_assigner.py | nithinksath96/Small_object_detection | b2ccd29d128487909f92e4fc796f72a0a4458e32 | [
"Apache-2.0"
] | null | null | null | configs/_base_/models/faster_rcnn_r50_fpn_grid_assigner.py | nithinksath96/Small_object_detection | b2ccd29d128487909f92e4fc796f72a0a4458e32 | [
"Apache-2.0"
] | null | null | null | configs/_base_/models/faster_rcnn_r50_fpn_grid_assigner.py | nithinksath96/Small_object_detection | b2ccd29d128487909f92e4fc796f72a0a4458e32 | [
"Apache-2.0"
] | null | null | null | model = dict(
type='FasterRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch'... | 31.983333 | 77 | 0.512767 |
797729542f414dcbfdfac1e349ec2226c70f6c03 | 7,880 | py | Python | script/hassfest/manifest.py | nickna/core | c682d5d5e430de52e3da7e06026cd8b4087e864f | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | script/hassfest/manifest.py | flexy2dd/core | 1019ee22ff13e5f542e868179d791e6a0d87369a | [
"Apache-2.0"
] | 77 | 2020-07-16T16:43:09.000Z | 2022-03-31T06:14:37.000Z | script/hassfest/manifest.py | Vaarlion/core | f3de8b9f28de01abf72c0f5bb0b457eb1841f201 | [
"Apache-2.0"
] | 7 | 2021-03-20T12:34:01.000Z | 2021-12-02T10:13:52.000Z | """Manifest validation."""
from __future__ import annotations
from pathlib import Path
from urllib.parse import urlparse
from awesomeversion import (
AwesomeVersion,
AwesomeVersionException,
AwesomeVersionStrategy,
)
import voluptuous as vol
from voluptuous.humanize import humanize_error
from .model impo... | 27.266436 | 88 | 0.604061 |
797729ab82b480e21165b52096a685d143864b5e | 638 | py | Python | var/spack/repos/builtin/packages/genrich/package.py | gmfricke/spack | 0684a58d164c46cab03b5cc31ad1b4bdbd19b1c4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-09-15T23:55:48.000Z | 2019-09-15T23:55:48.000Z | var/spack/repos/builtin/packages/genrich/package.py | vlkale/spack | 011b6e684d3978c956e5ea60d2982ccc0bac5d6d | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/genrich/package.py | vlkale/spack | 011b6e684d3978c956e5ea60d2982ccc0bac5d6d | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2017-01-21T17:19:32.000Z | 2017-01-21T17:19:32.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Genrich(MakefilePackage):
"""Genrich is a peak-caller for genomic enrichment assays."""
... | 31.9 | 93 | 0.722571 |
79772a09c621b2cf0a52f79d570b86378017be70 | 5,211 | py | Python | erservice.py | lrei/er_match | 88429455cafa4afa85a3702bc515157701e788a6 | [
"MIT"
] | 2 | 2015-01-22T19:01:58.000Z | 2018-05-07T22:51:53.000Z | erservice.py | lrei/er_match | 88429455cafa4afa85a3702bc515157701e788a6 | [
"MIT"
] | null | null | null | erservice.py | lrei/er_match | 88429455cafa4afa85a3702bc515157701e788a6 | [
"MIT"
] | null | null | null | import sys
import datetime
import mmh3
from ermdb import db_open, db_close, db_get, db_put, db_exists, db_check
from ermdb import db_add_map, db_add_list, db_append_list_map
from er_common import er_get_urls_for_day, er_get_events_article, er_get_latest
from ermcfg import ER_URL_DB_FILENAME, ER_DATE_DB_FILENAME
from... | 29.111732 | 135 | 0.624256 |
79772b8916d4a883690f79548badbe2097efd3c3 | 5,400 | py | Python | 2020/25_ComboBreaker/handshake.py | deanearlwright/AdventOfCode | ca4cf6315c0efa38bd7748fb6f4bc99e7934871d | [
"MIT"
] | 1 | 2021-01-03T23:09:28.000Z | 2021-01-03T23:09:28.000Z | 2020/25_ComboBreaker/handshake.py | deanearlwright/AdventOfCode | ca4cf6315c0efa38bd7748fb6f4bc99e7934871d | [
"MIT"
] | 6 | 2020-12-26T21:02:42.000Z | 2020-12-26T21:02:52.000Z | 2020/25_ComboBreaker/handshake.py | deanearlwright/AdventOfCode | ca4cf6315c0efa38bd7748fb6f4bc99e7934871d | [
"MIT"
] | null | null | null | # ======================================================================
# Combo Breaker
# Advent of Code 2020 Day 25 -- Eric Wastl -- https://adventofcode.com
#
# Python implementation by Dr. Dean Earl Wright III
# ======================================================================
# ============================... | 35.064935 | 89 | 0.467222 |
79772c8bfa7562bc3b2a74584597744a5ebef7f0 | 4,376 | py | Python | src/slidingwindowssearch.py | theimgclist/SelfDrivingCarTerm1 | 4769975fae4d466990ac315f9650b6aaf416d239 | [
"MIT"
] | 1 | 2018-11-22T16:08:15.000Z | 2018-11-22T16:08:15.000Z | src/slidingwindowssearch.py | theimgclist/SelfDrivingCarTerm1 | 4769975fae4d466990ac315f9650b6aaf416d239 | [
"MIT"
] | null | null | null | src/slidingwindowssearch.py | theimgclist/SelfDrivingCarTerm1 | 4769975fae4d466990ac315f9650b6aaf416d239 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import glob
import cv2
# Read in a thresholded image
warped = mpimg.imread('warped_example.jpg')
# window settings
window_width = 50
window_height = 80 # Break image into 9 vertical layers since image height is 720
margin = 100 # How ... | 49.168539 | 158 | 0.72989 |
79772d79e6e511a8dee9fd463d229b09ccb26bdd | 46 | py | Python | merit/__init__.py | tayrobin/merit | 6274b5ca9f5f0962ca54c44d2adbd2a034188642 | [
"MIT"
] | null | null | null | merit/__init__.py | tayrobin/merit | 6274b5ca9f5f0962ca54c44d2adbd2a034188642 | [
"MIT"
] | null | null | null | merit/__init__.py | tayrobin/merit | 6274b5ca9f5f0962ca54c44d2adbd2a034188642 | [
"MIT"
] | null | null | null | from .merit import Merit
from .org import Org
| 15.333333 | 24 | 0.782609 |
79772e9e53966ceb73660354db5003b8cf296395 | 2,783 | py | Python | get_posts.py | gregdetre/wordpress-python-emacs | 66d1ed78c673af0e2d8877fa723a505cfe0519c9 | [
"MIT"
] | 2 | 2015-05-16T22:08:29.000Z | 2020-01-03T22:08:52.000Z | get_posts.py | gregdetre/wordpress-python-emacs | 66d1ed78c673af0e2d8877fa723a505cfe0519c9 | [
"MIT"
] | null | null | null | get_posts.py | gregdetre/wordpress-python-emacs | 66d1ed78c673af0e2d8877fa723a505cfe0519c9 | [
"MIT"
] | null | null | null | from argparse import ArgumentParser
from utils import *
"""
Gets Posts (default) or Pages as python objects.
"""
# python get_posts.py
#
# OR
#
# posts = get_all_posts(verbose=True)
# print posts[0].content
#
# (Pdb) dir(posts[0])
# [... 'comment_status', 'content', 'custom_fields', 'date', 'date_modified', 'definit... | 31.625 | 301 | 0.564858 |
79772f28b45b0d2a57e516a28e62c9dc9f3c4c25 | 1,558 | py | Python | src/ball_bounce_mixin.py | R3mmurd/Breakout-py | a78b2f082c67e5e847040f23f8ea3474bc239710 | [
"MIT"
] | null | null | null | src/ball_bounce_mixin.py | R3mmurd/Breakout-py | a78b2f082c67e5e847040f23f8ea3474bc239710 | [
"MIT"
] | null | null | null | src/ball_bounce_mixin.py | R3mmurd/Breakout-py | a78b2f082c67e5e847040f23f8ea3474bc239710 | [
"MIT"
] | null | null | null | """
This file contains the implementation of a mixin that contains a
method that solves the collision between a rectangular shape with
the ball.
Collision solve algorithm taken from:
https://github.com/noooway/love2d_arkanoid_tutorial/wiki/Resolving-Collisions
Author: Alejandro Mujica
Date: 15/07/2020
"""
class Bal... | 25.540984 | 77 | 0.564185 |
79772f8157a92328c6668c9b62e54f135ea93c80 | 1,102 | py | Python | pipeline/c3eg.py | exoplanetvetting/DAVE | aea19a30d987b214fb4c0cf01aa733f127c411b9 | [
"MIT"
] | 7 | 2019-05-07T02:01:51.000Z | 2022-03-16T08:09:39.000Z | pipeline/c3eg.py | barentsen/dave | 45ba97b7b535ad26dd555c33c963c6224a9af23c | [
"MIT"
] | 18 | 2015-12-09T22:18:59.000Z | 2017-04-26T13:11:44.000Z | pipeline/c3eg.py | barentsen/dave | 45ba97b7b535ad26dd555c33c963c6224a9af23c | [
"MIT"
] | 5 | 2017-03-08T11:42:53.000Z | 2020-05-07T00:10:37.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 23 15:24:17 2015
@author: fergal
$Id$
$URL$
"""
__version__ = "$Id$"
__URL__ = "$URL$"
import numpy as np
import dave.pipeline.task as task
import dave.pipeline.pipeline as pl
from multiprocessing import pool
import multiprocessing
import contextlib
import parmap
... | 20.407407 | 70 | 0.651543 |
79772f93de772991a644191af3e013c0e2de3591 | 768 | bzl | Python | ruby/private/sdk.bzl | thiagohmcruz/rules_ruby | e7399aca5aecc796bcf5cc37493053938a0c2026 | [
"Apache-2.0"
] | null | null | null | ruby/private/sdk.bzl | thiagohmcruz/rules_ruby | e7399aca5aecc796bcf5cc37493053938a0c2026 | [
"Apache-2.0"
] | null | null | null | ruby/private/sdk.bzl | thiagohmcruz/rules_ruby | e7399aca5aecc796bcf5cc37493053938a0c2026 | [
"Apache-2.0"
] | null | null | null | load(
"@bazelruby_rules_ruby//ruby/private/toolchains:ruby_runtime.bzl",
_ruby_runtime = "ruby_runtime",
)
def rules_ruby_select_sdk(version = "host"):
"""Registers ruby toolchains in the WORKSPACE file."""
supported_versions = [
"host",
"2.5.8",
"2.6.1",
"2.6.3",
"2.6... | 24 | 112 | 0.572917 |
79772fbaf5b7eaa5731387bdf92c83e723c6ec4e | 564 | py | Python | python/sprint0/e.py | Chiga2030/algorithms-templates | 6e0ee665e2420c77a3d56d153f67dcfab60be622 | [
"MIT"
] | 38 | 2021-09-14T08:22:32.000Z | 2022-03-15T08:52:20.000Z | python/sprint0/e.py | Chiga2030/algorithms-templates | 6e0ee665e2420c77a3d56d153f67dcfab60be622 | [
"MIT"
] | null | null | null | python/sprint0/e.py | Chiga2030/algorithms-templates | 6e0ee665e2420c77a3d56d153f67dcfab60be622 | [
"MIT"
] | 38 | 2021-10-04T14:06:35.000Z | 2022-03-31T12:24:04.000Z | from typing import List, Tuple, Optional
def two_sum(arr: List[int], target_sum: int) -> Optional[Tuple[int, int]]:
# Здесь реализация вашего решения
pass
def read_input() -> Tuple[List[int], int]:
n = int(input())
arr = list(map(int, input().strip().split()))
target_sum = int(input())
return ... | 26.857143 | 74 | 0.648936 |
797731705247665925fb766182c42afd260a89ca | 10,988 | py | Python | sympy/core/tests/test_evalf.py | pernici/sympy | 5e6e3b71da777f5b85b8ca2d16f33ed020cf8a41 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/tests/test_evalf.py | pernici/sympy | 5e6e3b71da777f5b85b8ca2d16f33ed020cf8a41 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/tests/test_evalf.py | pernici/sympy | 5e6e3b71da777f5b85b8ca2d16f33ed020cf8a41 | [
"BSD-3-Clause"
] | null | null | null | from sympy.core.evalf import PrecisionExhausted, complex_accuracy
from sympy import pi, I, Symbol, Add, Rational, exp, sqrt, sin, cos, \
fibonacci, Integral, oo, E, atan, log, integrate, floor, ceiling, \
factorial, binomial, Sum, zeta, Catalan, Pow, GoldenRatio, sympify, \
sstr, Function, Eq, Mul, Pow, De... | 47.362069 | 130 | 0.628413 |
797731d6e7ac29714c8eabfcb0f221671fb32afe | 6,016 | py | Python | exercises/twelve-days/twelve_days_test.py | kishankj/python | 82042de746128127502e109111e6c4e8ab002af6 | [
"MIT"
] | 1 | 2020-06-14T17:26:54.000Z | 2020-06-14T17:26:54.000Z | exercises/twelve-days/twelve_days_test.py | kishankj/python | 82042de746128127502e109111e6c4e8ab002af6 | [
"MIT"
] | 16 | 2020-05-30T12:38:13.000Z | 2022-02-19T09:23:31.000Z | exercises/twelve-days/twelve_days_test.py | kishankj/python | 82042de746128127502e109111e6c4e8ab002af6 | [
"MIT"
] | 1 | 2020-12-08T14:52:16.000Z | 2020-12-08T14:52:16.000Z | import unittest
from twelve_days import recite
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0
class TwelveDaysTest(unittest.TestCase):
def test_first_day_a_partridge_in_a_pear_tree(self):
expected = [
"On the first day of Christmas my true love gave to me: "
... | 34.574713 | 75 | 0.550199 |
79773252f9c735229e8a2314fe346f6def54f672 | 1,250 | py | Python | infra/lib/lambda/pre-provision-hook/lambda.py | randyridgley/simple-go-iot-device | 23062a4c004d5e995c0e8cf10ed6019ec7c88958 | [
"Apache-2.0"
] | 1 | 2022-02-07T14:12:02.000Z | 2022-02-07T14:12:02.000Z | infra/lib/lambda/pre-provision-hook/lambda.py | randyridgley/simple-go-iot-device | 23062a4c004d5e995c0e8cf10ed6019ec7c88958 | [
"Apache-2.0"
] | null | null | null | infra/lib/lambda/pre-provision-hook/lambda.py | randyridgley/simple-go-iot-device | 23062a4c004d5e995c0e8cf10ed6019ec7c88958 | [
"Apache-2.0"
] | null | null | null | import json
import logging
import sys
# Configure logging
logger = logging.getLogger()
for h in logger.handlers:
logger.removeHandler(h)
h = logging.StreamHandler(sys.stdout)
FORMAT = "[%(asctime)s - %(levelname)s - %(filename)s:%(lineno)s - %(funcName)s - %(message)s"
h.setFormatter(logging.Formatter(FORMAT))
... | 29.761905 | 122 | 0.7112 |
797732900e8d67dc7236b75d5161fe91af1b9fa4 | 1,684 | py | Python | setup.py | briancurtin/pine | a1ca3046686a0f8fed3e322222b1a03c0a9ab7e8 | [
"Apache-2.0"
] | null | null | null | setup.py | briancurtin/pine | a1ca3046686a0f8fed3e322222b1a03c0a9ab7e8 | [
"Apache-2.0"
] | 8 | 2018-03-07T21:55:56.000Z | 2018-06-27T14:44:33.000Z | setup.py | briancurtin/pine | a1ca3046686a0f8fed3e322222b1a03c0a9ab7e8 | [
"Apache-2.0"
] | null | null | null | import os
from setuptools import setup
NAME = "Brian Curtin"
EMAIL = "brian@python.org"
CLASSIFIERS = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python... | 32.384615 | 74 | 0.577197 |
797733be2f69d9472331b56f816f3f2cbb568728 | 209 | py | Python | lang/Python/sum-digits-of-an-integer-3.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/sum-digits-of-an-integer-3.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/sum-digits-of-an-integer-3.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | def sumDigits(num, base=10):
return sum([int(x, base) for x in list(str(num))])
print(sumDigits(1))
print(sumDigits(12345))
print(sumDigits(123045))
print(sumDigits('fe', 16))
print(sumDigits("f0e", 16))
| 23.222222 | 54 | 0.69378 |
797733cbab9059e22cb92e4573796f87b14451fd | 7,244 | py | Python | pyleecan/Functions/Plot/plot_2D.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | pyleecan/Functions/Plot/plot_2D.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | pyleecan/Functions/Plot/plot_2D.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from itertools import repeat
import matplotlib.pyplot as plt
from numpy import argmin, abs, squeeze, split, ndarray
from ...Functions.init_fig import init_fig
from ...definitions import config_dict
# Import values from config dict
FONT_NAME = config_dict["PLOT"]["FONT_NAME"]
FONT_SIZE_TITLE ... | 29.933884 | 103 | 0.574959 |
7977340bbdc420f3807c6759f96088e25879a099 | 1,760 | py | Python | vsts/vsts/member_entitlement_management/v4_1/models/user_entitlements_post_response.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/member_entitlement_management/v4_1/models/user_entitlements_post_response.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/member_entitlement_management/v4_1/models/user_entitlements_post_response.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 55 | 142 | 0.64375 |
79773426c7f04a4b0cd95800f05bbe437f6a8fed | 1,177 | py | Python | rock_paper_scissors.py | Haaris-Sayyed/hello-Mk | 3ed0049c9f036e4052bb5eda89a3a12cd28953f8 | [
"MIT"
] | 1 | 2021-02-05T08:59:39.000Z | 2021-02-05T08:59:39.000Z | Pr12: Rock, Paper and Scissor game.py | Nishi-16-K/Python-Projects | e1f38a4b38fa359d036575124f6ca8e3a3d11f4f | [
"MIT"
] | null | null | null | Pr12: Rock, Paper and Scissor game.py | Nishi-16-K/Python-Projects | e1f38a4b38fa359d036575124f6ca8e3a3d11f4f | [
"MIT"
] | 2 | 2021-10-14T15:41:24.000Z | 2021-10-17T00:36:33.000Z | import random
choices = ["Rock", "Paper", "Scissors"]
computer = random.choice(choices)
player = False
cpu_score = 0
player_score = 0
while True:
player = input("Rock, Paper or Scissors?").capitalize()
## Conditions of Rock,Paper and Scissors
if player == computer:
print("Tie!")
elif player == ... | 30.973684 | 61 | 0.541206 |
797734299a9603c801e437f35204af1eb8c5dba3 | 2,190 | py | Python | topo_processor/stac/asset.py | linz/processor-aerial-imagery | cf6425560cea381278fe7857865e3d9158b28d7e | [
"MIT"
] | null | null | null | topo_processor/stac/asset.py | linz/processor-aerial-imagery | cf6425560cea381278fe7857865e3d9158b28d7e | [
"MIT"
] | 15 | 2020-07-21T04:56:31.000Z | 2020-09-21T06:28:57.000Z | topo_processor/stac/asset.py | linz/processor-aerial-imagery | cf6425560cea381278fe7857865e3d9158b28d7e | [
"MIT"
] | null | null | null | from mimetypes import MimeTypes
from os import path
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
import pystac
from topo_processor.util.checksum import multihash_as_hex
from topo_processor.util.configuration import get_topo_processor_version
from topo_processor.util.files import get_file_update_time
f... | 35.322581 | 109 | 0.69589 |
7977342cdb5d15b9b421c77cdf23c859dbd9831e | 41 | py | Python | SteveSmithThing2/__init__.py | STEVE-al/Factorial | fc1f9364453453a16b60b28cfcccaddd55f1b628 | [
"MIT"
] | null | null | null | SteveSmithThing2/__init__.py | STEVE-al/Factorial | fc1f9364453453a16b60b28cfcccaddd55f1b628 | [
"MIT"
] | null | null | null | SteveSmithThing2/__init__.py | STEVE-al/Factorial | fc1f9364453453a16b60b28cfcccaddd55f1b628 | [
"MIT"
] | null | null | null | from SteveSmithThing2.factorial import *
| 20.5 | 40 | 0.853659 |
797734d31e08d3482cb4f0f764d8ce1351ebc5fe | 108,749 | py | Python | selfdrive/car/toyota/values.py | hjesse92/openpilot | cc718ab1e72f9e4eae0a069a9e5f29f167f7fb71 | [
"MIT"
] | null | null | null | selfdrive/car/toyota/values.py | hjesse92/openpilot | cc718ab1e72f9e4eae0a069a9e5f29f167f7fb71 | [
"MIT"
] | null | null | null | selfdrive/car/toyota/values.py | hjesse92/openpilot | cc718ab1e72f9e4eae0a069a9e5f29f167f7fb71 | [
"MIT"
] | null | null | null | # flake8: noqa
from selfdrive.car import dbc_dict
from cereal import car
Ecu = car.CarParams.Ecu
class CarControllerParams:
ACCEL_HYST_GAP = 0.02 # don't change accel command for small oscilalitons within this value
ACCEL_MAX = 1.5 # 1.5 m/s2
ACCEL_MIN = -3.0 # 3 m/s2
ACCEL_SCALE = max(ACCEL_MAX, -ACCEL_... | 74.0797 | 1,376 | 0.585605 |
7977379623039f231aff110236e8ca7c55d4b210 | 5,547 | py | Python | cirq-google/cirq_google/experimental/noise_models/calibration_to_noise_properties.py | peterse/Cirq | 31daa9410a0e1e1ac3da38109aa8ce3a15aed17b | [
"Apache-2.0"
] | 3,326 | 2018-07-18T23:17:21.000Z | 2022-03-29T22:28:24.000Z | cirq-google/cirq_google/experimental/noise_models/calibration_to_noise_properties.py | peterse/Cirq | 31daa9410a0e1e1ac3da38109aa8ce3a15aed17b | [
"Apache-2.0"
] | 3,443 | 2018-07-18T21:07:28.000Z | 2022-03-31T20:23:21.000Z | cirq-google/cirq_google/experimental/noise_models/calibration_to_noise_properties.py | peterse/Cirq | 31daa9410a0e1e1ac3da38109aa8ce3a15aed17b | [
"Apache-2.0"
] | 865 | 2018-07-18T23:30:24.000Z | 2022-03-30T11:43:23.000Z | import cirq_google
import numpy as np
from cirq.devices.noise_properties import NoiseProperties
def _xeb_fidelity_to_decay_constant(xeb_fidelity, num_qubits=2):
# Converts from XEB Fidelity to depolarization decay constant
if xeb_fidelity is not None:
N = 2 ** num_qubits # Dimension of Hilbert space
... | 47.410256 | 100 | 0.719308 |
79773809d556ed744ff5531be49b3174a82f7569 | 3,060 | py | Python | scripts/verification.py | Paktosan/final-countdown | 562692acc1b5283a9df4d4c77d5f2b055fcbb009 | [
"CC0-1.0"
] | null | null | null | scripts/verification.py | Paktosan/final-countdown | 562692acc1b5283a9df4d4c77d5f2b055fcbb009 | [
"CC0-1.0"
] | null | null | null | scripts/verification.py | Paktosan/final-countdown | 562692acc1b5283a9df4d4c77d5f2b055fcbb009 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2018 Christoph Kepler <development@kepler.international>
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# bina... | 30 | 73 | 0.69183 |
79773928b83d9314070e90e7e5792ba543c6480e | 2,424 | py | Python | 2017/aoc_01.py | justanotherdot/advent-linguist | 4dfd4ef483ddbd40fb8cf7a1719705186d4ed823 | [
"MIT"
] | null | null | null | 2017/aoc_01.py | justanotherdot/advent-linguist | 4dfd4ef483ddbd40fb8cf7a1719705186d4ed823 | [
"MIT"
] | 4 | 2016-12-06T03:23:27.000Z | 2019-04-07T21:50:04.000Z | 2017/aoc_01.py | justanotherdot/advent-linguist | 4dfd4ef483ddbd40fb8cf7a1719705186d4ed823 | [
"MIT"
] | null | null | null | # Input.
s = '367436765224262147416876392821832169781285655941123648172835986213848397566284241467793119283183835972359686446876651595915734132336167171121577524691918457577129283476247264385162111539468922414495231484194262592917889386218863347344978231632813893898536759322467341535638612338949526576258684154323161554... | 101 | 2,036 | 0.914604 |
79773aaf8410a2efe739db52e03366a9082996d7 | 725 | py | Python | TTS/tts.py | SivadineshPonrajan/Python_Applications | db3ca9de1b99be24da2d276a0bb8004943928bb7 | [
"MIT"
] | 3 | 2020-03-31T09:40:55.000Z | 2020-04-10T17:22:04.000Z | TTS/tts.py | SivadineshPonrajan/Python_Applications | db3ca9de1b99be24da2d276a0bb8004943928bb7 | [
"MIT"
] | null | null | null | TTS/tts.py | SivadineshPonrajan/Python_Applications | db3ca9de1b99be24da2d276a0bb8004943928bb7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Aug 19 00:40:07 2018
@author: Avis_King
"""
import win32com.client as wincl
from tkinter import *
def text2Speech():
text = e.get()
speak = wincl.Dispatch("SAPI.SpVoice")
speak.Speak(text)
tts = Tk()
tts.resizable(0,0)
tts.title("Text to Speech")
tts... | 22.65625 | 47 | 0.664828 |
79773b3947f04669e94a8796b6bdb03f845e38ae | 534 | py | Python | tests/unit/resources/basic/metrics/test_manager.py | System73/tamarco | c85bec267d39057a4cd5f1c9854d5e2840cebb1e | [
"MIT"
] | 9 | 2019-09-06T10:57:36.000Z | 2019-10-14T07:24:02.000Z | tests/unit/resources/basic/metrics/test_manager.py | System73/tamarco | c85bec267d39057a4cd5f1c9854d5e2840cebb1e | [
"MIT"
] | 4 | 2020-04-06T15:52:40.000Z | 2021-06-02T00:27:33.000Z | tests/unit/resources/basic/metrics/test_manager.py | System73/tamarco | c85bec267d39057a4cd5f1c9854d5e2840cebb1e | [
"MIT"
] | 3 | 2019-09-06T10:52:05.000Z | 2019-10-10T07:45:26.000Z | from tamarco.resources.basic.metrics import MetersManager
from tamarco.resources.basic.metrics.collector import MetricsCollector
from tamarco.resources.basic.metrics.reporters import FileHandler
def test_configure_meters_manager():
MetricsCollector.handlers.clear()
MetricsCollector.collect_period = 2
Mete... | 44.5 | 119 | 0.79588 |
79773bf5480d408dcccf0f6f480548723ecb1ebe | 13,200 | py | Python | synapse/lib/trigger.py | ackroute/synapse | 51197f89ab372d2e357bcd054358352ecca66840 | [
"Apache-2.0"
] | null | null | null | synapse/lib/trigger.py | ackroute/synapse | 51197f89ab372d2e357bcd054358352ecca66840 | [
"Apache-2.0"
] | null | null | null | synapse/lib/trigger.py | ackroute/synapse | 51197f89ab372d2e357bcd054358352ecca66840 | [
"Apache-2.0"
] | null | null | null | import asyncio
import logging
import contextlib
import collections
import contextvars
import synapse.exc as s_exc
import synapse.common as s_common
import synapse.lib.chop as s_chop
import synapse.lib.cache as s_cache
import synapse.lib.config as s_config
import synapse.lib.grammar as s_grammar
import synapse.lib.pro... | 32.195122 | 119 | 0.545379 |
79773cf474617c9cee6ad16ef5dd8ab085c40026 | 5,708 | py | Python | src/rprblender/nodes/__init__.py | Speedwag00n/RadeonProRenderBlenderAddon | fb1c0958d289c687c832aa7428fd5a1b41e93dcf | [
"Apache-2.0"
] | null | null | null | src/rprblender/nodes/__init__.py | Speedwag00n/RadeonProRenderBlenderAddon | fb1c0958d289c687c832aa7428fd5a1b41e93dcf | [
"Apache-2.0"
] | null | null | null | src/rprblender/nodes/__init__.py | Speedwag00n/RadeonProRenderBlenderAddon | fb1c0958d289c687c832aa7428fd5a1b41e93dcf | [
"Apache-2.0"
] | null | null | null | #**********************************************************************
# Copyright 2020 Advanced Micro Devices, Inc
# 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.o... | 34.593939 | 107 | 0.700245 |
79773db3f45d48f0a4ce04e7613c3cb23523399c | 6,008 | py | Python | spleeter/commands/__init__.py | ogut77/spleeter3 | fb900a8eea57a5a286acf2bf257e66a70db50f2f | [
"MIT"
] | null | null | null | spleeter/commands/__init__.py | ogut77/spleeter3 | fb900a8eea57a5a286acf2bf257e66a70db50f2f | [
"MIT"
] | null | null | null | spleeter/commands/__init__.py | ogut77/spleeter3 | fb900a8eea57a5a286acf2bf257e66a70db50f2f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf8
""" This modules provides spleeter command as well as CLI parsing methods. """
import json
import logging
from argparse import ArgumentParser
from tempfile import gettempdir
from os.path import exists, join
__email__ = 'spleeter@deezer.com'
__author__ = 'Deezer Research'
__licens... | 28.746411 | 111 | 0.661119 |
79773de7e2ecadc7c1b3d199f10bec6d5e377ba2 | 2,235 | py | Python | scrapers/clients/stirioficiale.py | andreipradan/telegrambot | 605889ef8904b7291f5772f10eadd5d3d3a4eba7 | [
"MIT"
] | 8 | 2020-04-15T09:08:49.000Z | 2022-03-13T21:29:43.000Z | scrapers/clients/stirioficiale.py | andreipradan/telegrambot | 605889ef8904b7291f5772f10eadd5d3d3a4eba7 | [
"MIT"
] | null | null | null | scrapers/clients/stirioficiale.py | andreipradan/telegrambot | 605889ef8904b7291f5772f10eadd5d3d3a4eba7 | [
"MIT"
] | null | null | null | import logging
import requests
from bs4 import BeautifulSoup
from core import database
from core.constants import SLUG, COLLECTION
logger = logging.getLogger(__name__)
def get_children(elements):
return elements.find_all(True, recursive=False)
def parse_text(element):
return element.text.strip()
def pa... | 27.256098 | 77 | 0.595526 |
79773e7153918b85bbd9d59a4ef2d2fba1512889 | 16,736 | py | Python | tests/utils/test_datetime_methods.py | RichieB2B/tcex | eba20a67d4b8e3596c895b7c45325716267d7c85 | [
"Apache-2.0"
] | 18 | 2017-01-09T22:17:49.000Z | 2022-01-24T20:46:42.000Z | tests/utils/test_datetime_methods.py | RichieB2B/tcex | eba20a67d4b8e3596c895b7c45325716267d7c85 | [
"Apache-2.0"
] | 84 | 2017-04-11T13:47:49.000Z | 2022-03-21T20:12:57.000Z | tests/utils/test_datetime_methods.py | RichieB2B/tcex | eba20a67d4b8e3596c895b7c45325716267d7c85 | [
"Apache-2.0"
] | 43 | 2017-01-05T20:40:26.000Z | 2022-03-31T19:18:02.000Z | """Test the TcEx Utils Module."""
# standard library
import operator
import re
from datetime import datetime, timedelta
# third-party
import pytest
import pytz
from dateutil.relativedelta import relativedelta
# pylint: disable=no-self-use
class TestUtils:
"""Test the TcEx Utils Module."""
@pytest.mark.param... | 39.847619 | 100 | 0.482314 |
79773eb04a179bccfd9137af3303c12abc90ee85 | 49,618 | py | Python | Packs/ArcherRSA/Integrations/ArcherV2/ArcherV2.py | alphasoc/content | bdd2083b3e258b11e716ab4324e48677df547d3d | [
"MIT"
] | null | null | null | Packs/ArcherRSA/Integrations/ArcherV2/ArcherV2.py | alphasoc/content | bdd2083b3e258b11e716ab4324e48677df547d3d | [
"MIT"
] | null | null | null | Packs/ArcherRSA/Integrations/ArcherV2/ArcherV2.py | alphasoc/content | bdd2083b3e258b11e716ab4324e48677df547d3d | [
"MIT"
] | null | null | null | from datetime import timezone
from typing import Dict, Tuple
import dateparser
import urllib3
from CommonServerPython import *
''' IMPORTS '''
# Disable insecure warnings
urllib3.disable_warnings()
OCCURRED_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
REQUEST_HEADERS = {
'Accept': 'application/json,text/html,application/xht... | 40.770748 | 120 | 0.598472 |
79773f23ceff70736db75b544fac824eb6d0023d | 787 | py | Python | parse/parse address.py | pydeveloper510/Python | 2e3cf5f9d132fbc6dd8c41a96166b6e879d86e0d | [
"MIT"
] | 3 | 2021-04-23T08:04:14.000Z | 2021-05-08T01:24:08.000Z | parse/parse address.py | pydeveloper510/Python | 2e3cf5f9d132fbc6dd8c41a96166b6e879d86e0d | [
"MIT"
] | null | null | null | parse/parse address.py | pydeveloper510/Python | 2e3cf5f9d132fbc6dd8c41a96166b6e879d86e0d | [
"MIT"
] | 1 | 2021-05-08T01:24:46.000Z | 2021-05-08T01:24:46.000Z | import usaddress
addr='123 Main St. Suite 100 Chicago, IL'
# The parse method will split your address string into components, and label each component.
# expected output: [(u'123', 'AddressNumber'), (u'Main', 'StreetName'), (u'St.', 'StreetNamePostType'), (u'Suite', 'OccupancyType'), (u'100', 'OccupancyIdentifier'), (... | 71.545455 | 247 | 0.702668 |
7977405b404953d8e0c79b59efe9ee7e4336a5cd | 7,295 | py | Python | examples/rllib/experiments/baseline_i696/baseline_i696_horizon2000_warmup1000_simstep0.2_flow1500_merge160_mingap0.py | cuijiaxun/MITC | a226308424237a69b5e938baf72949de9b1b4bf2 | [
"MIT"
] | 1 | 2021-06-17T03:25:13.000Z | 2021-06-17T03:25:13.000Z | examples/rllib/experiments/baseline_i696/baseline_i696_horizon2000_warmup1000_simstep0.2_flow1500_merge160_mingap0.py | cuijiaxun/MITC | a226308424237a69b5e938baf72949de9b1b4bf2 | [
"MIT"
] | null | null | null | examples/rllib/experiments/baseline_i696/baseline_i696_horizon2000_warmup1000_simstep0.2_flow1500_merge160_mingap0.py | cuijiaxun/MITC | a226308424237a69b5e938baf72949de9b1b4bf2 | [
"MIT"
] | 1 | 2021-03-18T16:20:57.000Z | 2021-03-18T16:20:57.000Z | """Open merge example.
Trains a a small percentage of rl vehicles to dissipate shockwaves caused by
merges in an open network.
"""
import json
import os
import random
import numpy as np
from argparse import ArgumentParser
import pickle
import ray
try:
from ray.rllib.agents.agent import get_agent_class
except Impor... | 31.995614 | 202 | 0.668403 |
797740f37af6e06602ea03697e0b6ae283d87775 | 1,437 | py | Python | locations/spiders/coto.py | thismakessand/alltheplaces | b6116199844c9e88bff3a691290f07a7457470ba | [
"MIT"
] | 1 | 2019-08-19T10:00:55.000Z | 2019-08-19T10:00:55.000Z | locations/spiders/coto.py | thismakessand/alltheplaces | b6116199844c9e88bff3a691290f07a7457470ba | [
"MIT"
] | null | null | null | locations/spiders/coto.py | thismakessand/alltheplaces | b6116199844c9e88bff3a691290f07a7457470ba | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
import json
from locations.items import GeojsonPointItem
class CotoSpider(scrapy.Spider):
name = "coto"
allowed_domains = ["www.coto.com"]
start_urls = ['http://www.coto.com.ar/mapassucursales/Sucursales/ListadoSucursalesPorDistancia.json.aspx?latitud=-34.603... | 35.04878 | 193 | 0.51357 |
7977415e8d299cdcf76a433eacbc4d575103f3e3 | 9,028 | py | Python | services/geom2pickle/recQueryFuncReturn.py | projekt-scope/scope-data-service | 1445f17b1b817a1c9c4bfa69b8f664e4952409bf | [
"MIT"
] | 4 | 2019-11-06T15:56:10.000Z | 2020-01-17T08:19:18.000Z | services/geom2pickle/recQueryFuncReturn.py | projekt-scope/scope-data-service | 1445f17b1b817a1c9c4bfa69b8f664e4952409bf | [
"MIT"
] | null | null | null | services/geom2pickle/recQueryFuncReturn.py | projekt-scope/scope-data-service | 1445f17b1b817a1c9c4bfa69b8f664e4952409bf | [
"MIT"
] | 2 | 2020-01-15T14:33:09.000Z | 2020-06-10T08:09:58.000Z | # generell imports
import os
import time
import requests
import urllib.request
import json
import string
import random
# pythonOCC imports
import OCC
#FIXME OCC imports are neccessary fix this !
from OCC import VERSION as OCC_VERSION
from OCC.Core.Standard import Standard_Transient
from OCC.Core import gp
from OCC.... | 34.326996 | 88 | 0.549402 |
797742c7c43c2c704200ad6de500f2120191a549 | 394 | py | Python | backend/contacts/models.py | relaxxpls/Music-Control | 76f5d10904f820607b3eb756850d5c5d7d89d875 | [
"MIT"
] | null | null | null | backend/contacts/models.py | relaxxpls/Music-Control | 76f5d10904f820607b3eb756850d5c5d7d89d875 | [
"MIT"
] | null | null | null | backend/contacts/models.py | relaxxpls/Music-Control | 76f5d10904f820607b3eb756850d5c5d7d89d875 | [
"MIT"
] | null | null | null | from django.db import models
from datetime import datetime
class Contact(models.Model):
name = models.CharField(max_length=200)
email = models.EmailField(max_length=100)
subject = models.CharField(max_length=100)
message = models.TextField(blank=True)
contact_date = models.DateTimeField(default=da... | 28.142857 | 73 | 0.741117 |
7977431c6352633e805f51a2c5227ec8e2628152 | 1,575 | py | Python | get_area.py | somal/VIA2COCO | 7bce45a77eea8fdbf09cee8ed5b5c469366eba62 | [
"MIT"
] | null | null | null | get_area.py | somal/VIA2COCO | 7bce45a77eea8fdbf09cee8ed5b5c469366eba62 | [
"MIT"
] | null | null | null | get_area.py | somal/VIA2COCO | 7bce45a77eea8fdbf09cee8ed5b5c469366eba62 | [
"MIT"
] | null | null | null | import math
from typing import List
class Point:
__slots__ = ('x', 'y')
def __init__(self, x, y):
self.x = x
self.y = y
def get_area_of_polygon(points: List[Point]):
area = 0
if len(points) < 3:
raise Exception("error")
p1 = points[0]
for i in range(1, len(points) -... | 21.283784 | 68 | 0.544127 |
797743979f228f163a2fbc41f900c7b7a0542bb5 | 5,054 | py | Python | moto/cloudformation/parsing.py | andrewgross/moto | 912c3ceb396e1e460c75d6a0a65f2431800a1583 | [
"Apache-2.0"
] | null | null | null | moto/cloudformation/parsing.py | andrewgross/moto | 912c3ceb396e1e460c75d6a0a65f2431800a1583 | [
"Apache-2.0"
] | null | null | null | moto/cloudformation/parsing.py | andrewgross/moto | 912c3ceb396e1e460c75d6a0a65f2431800a1583 | [
"Apache-2.0"
] | null | null | null | import collections
import logging
from moto.autoscaling import models as autoscaling_models
from moto.ec2 import models as ec2_models
from moto.elb import models as elb_models
from moto.iam import models as iam_models
from moto.sqs import models as sqs_models
MODEL_MAP = {
"AWS::AutoScaling::AutoScalingGroup": au... | 35.843972 | 91 | 0.698655 |
7977439a8405deb71d6e5cbcfe324287e13e592a | 5,532 | py | Python | metalibm-master/metalibm_functions/unit_tests/implicit_interval_eval.py | JeffreySarnoff/UsingSollya | bc559b7cfe1b4ce7eb8934d41ddca2670d0e839a | [
"MIT"
] | null | null | null | metalibm-master/metalibm_functions/unit_tests/implicit_interval_eval.py | JeffreySarnoff/UsingSollya | bc559b7cfe1b4ce7eb8934d41ddca2670d0e839a | [
"MIT"
] | null | null | null | metalibm-master/metalibm_functions/unit_tests/implicit_interval_eval.py | JeffreySarnoff/UsingSollya | bc559b7cfe1b4ce7eb8934d41ddca2670d0e839a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
###############################################################################
# This file is part of metalibm (https://github.com/kalray/metalibm)
###############################################################################
# MIT License
#
# Copyright (c) 2018 Kalray
#
# Permission is here... | 37.127517 | 119 | 0.697397 |
797744371e54d217139bb63adb683040adda2310 | 1,917 | py | Python | filesdb/utils.py | remram44/filesdb | 3f8a6f3edbb0763489a563f6165ffb4f2d26362d | [
"MIT"
] | 2 | 2019-01-04T04:49:18.000Z | 2019-01-10T01:32:07.000Z | filesdb/utils.py | ViDA-NYU/filesdb | 3f8a6f3edbb0763489a563f6165ffb4f2d26362d | [
"MIT"
] | 8 | 2019-01-03T17:16:03.000Z | 2019-01-04T20:06:31.000Z | filesdb/utils.py | remram44/filesdb | 3f8a6f3edbb0763489a563f6165ffb4f2d26362d | [
"MIT"
] | null | null | null | import functools
import os
import re
import traceback
def normalize_project_name(name):
return name.replace('_', '-').lower()
_windows_device_files = ('CON', 'AUX', 'COM1', 'COM2', 'COM3', 'COM4', 'LPT1',
'LPT2', 'LPT3', 'PRN', 'NUL')
_not_ascii_re = re.compile(r'[^A-Za-z0-9_.-]')
def... | 27.782609 | 79 | 0.533125 |
7977447d8f67a39e2bac9185b6cd08692a7a3dc5 | 887 | py | Python | tests/core/middleware/test_request_param_normalizer.py | pjryan93/web3.py | e066452a7b0e78d6cb8a9462532d169de901ef99 | [
"MIT"
] | 3 | 2019-03-18T11:06:03.000Z | 2021-09-22T06:19:36.000Z | tests/core/middleware/test_request_param_normalizer.py | pjryan93/web3.py | e066452a7b0e78d6cb8a9462532d169de901ef99 | [
"MIT"
] | null | null | null | tests/core/middleware/test_request_param_normalizer.py | pjryan93/web3.py | e066452a7b0e78d6cb8a9462532d169de901ef99 | [
"MIT"
] | 5 | 2019-03-24T15:46:16.000Z | 2020-08-28T02:42:51.000Z | import pytest
from web3 import Web3
from web3.middleware import ( # noqa: F401
construct_result_generator_middleware,
request_parameter_normalizer,
)
from web3.providers.base import (
BaseProvider,
)
@pytest.fixture
def w3_base():
return Web3(providers=[BaseProvider()], middlewares=[])
@pytest.fix... | 24.638889 | 83 | 0.756483 |
797744a712c8baa51d740abeaad63d5bb5a004fe | 24,952 | py | Python | data/transcoder_evaluation_gfg/python/ROW_WISE_COMMON_ELEMENTS_TWO_DIAGONALS_SQUARE_MATRIX.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/ROW_WISE_COMMON_ELEMENTS_TWO_DIAGONALS_SQUARE_MATRIX.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/ROW_WISE_COMMON_ELEMENTS_TWO_DIAGONALS_SQUARE_MATRIX.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( mat , n ) :
res = 0
for i in range ( n ) :
if mat [ i ] [ i ] == mat [ i ] [ n - i - 1 ] :
... | 733.882353 | 9,524 | 0.423052 |
7977452045575832ced4a569a176b62bf4fd6a20 | 14,917 | py | Python | main.py | mathisfchx/ASTUSbot | 068de1835483961ca45925ff947d2636dc3badeb | [
"MIT"
] | 1 | 2020-12-03T16:40:38.000Z | 2020-12-03T16:40:38.000Z | main.py | mathisfchx/ASTUSbot | 068de1835483961ca45925ff947d2636dc3badeb | [
"MIT"
] | null | null | null | main.py | mathisfchx/ASTUSbot | 068de1835483961ca45925ff947d2636dc3badeb | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
import os
import cogs
from myutils import MyUtils
TOKEN = os.getenv("BOT_TOKEN")
PREFIX = "&"
bot = commands.Bot(command_prefix=PREFIX, description="Bot de l'ASTUS")
@bot.event
async def on_ready():
await bot.change_presence(activity=discord.Game(name="Help"))
... | 52.710247 | 120 | 0.574311 |
7977455fd1eba96f922be70ce589325d7cede36e | 5,141 | py | Python | wechinelearn/database.py | MacHu-GWU/wechinelearn-project | 2230299be2b3b62d7a44a9093835441fbb6540f0 | [
"MIT"
] | null | null | null | wechinelearn/database.py | MacHu-GWU/wechinelearn-project | 2230299be2b3b62d7a44a9093835441fbb6540f0 | [
"MIT"
] | null | null | null | wechinelearn/database.py | MacHu-GWU/wechinelearn-project | 2230299be2b3b62d7a44a9093835441fbb6540f0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module defines the data schema.
There are 8 major table used in this app. Let's go through them one by one.
database schema settings::
(
engine,
t_station,
t_weather_raw,
t_weather,
t_object,
t_object_data... | 29.377143 | 83 | 0.699086 |
797745787a49fefe7e64667b4b0b0355275bf8fa | 76,929 | py | Python | lib/python3.4/site-packages/pip/_vendor/html5lib/tokenizer.py | LChristakis/chalice-hunter | 6bffea4620e23ce9ff12ac30526ebafcb9c10058 | [
"MIT"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | pip/_vendor/html5lib/tokenizer.py | alex/pip | d51a4b345b31ec4c8defbefe7f12b996c00c67fa | [
"MIT"
] | 4,640 | 2015-07-08T16:19:08.000Z | 2019-12-02T15:01:27.000Z | pip/_vendor/html5lib/tokenizer.py | alex/pip | d51a4b345b31ec4c8defbefe7f12b996c00c67fa | [
"MIT"
] | 698 | 2015-06-02T19:18:35.000Z | 2022-03-29T16:57:15.000Z | from __future__ import absolute_import, division, unicode_literals
try:
chr = unichr # flake8: noqa
except NameError:
pass
from collections import deque
from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, ... | 44.416282 | 109 | 0.530229 |
79774587f8c1556ca356d8607fcf6dff9d9035b4 | 4,960 | py | Python | automl/google/cloud/automl_v1beta1/proto/text_segment_pb2.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 2 | 2021-11-26T07:08:43.000Z | 2022-03-07T20:20:04.000Z | automl/google/cloud/automl_v1beta1/proto/text_segment_pb2.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 6 | 2019-05-27T22:05:58.000Z | 2019-08-05T16:46:16.000Z | automl/google/cloud/automl_v1beta1/proto/text_segment_pb2.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 1 | 2019-03-29T18:26:16.000Z | 2019-03-29T18:26:16.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/automl_v1beta1/proto/text_segment.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
from google.protobuf import descriptor as _descriptor
from google.protobuf impor... | 34.685315 | 519 | 0.6625 |
797746dfd3afc01253af82609c068c3285182d72 | 3,631 | py | Python | Kaggle/DecMeg2014/Python/sampleBench.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2019-02-13T12:02:26.000Z | 2019-02-13T12:02:26.000Z | Kaggle/DecMeg2014/Python/sampleBench.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2018-08-13T15:58:33.000Z | 2018-08-13T15:58:33.000Z | Kaggle/DecMeg2014/Python/sampleBench.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 2 | 2017-08-10T20:01:29.000Z | 2021-07-01T08:39:13.000Z | """DecMeg2014 example code.
Simple prediction of the class labels of the test set by:
- pooling all the triaining trials of all subjects in one dataset.
- Extracting the MEG data in the first 500ms from when the
stimulus starts.
- Using a linear classifier (logistic regression).
"""
import numpy as np
from sklearn.li... | 29.762295 | 120 | 0.64087 |
79774794c5a8eda4154f1de1174ce8be92a0de90 | 5,038 | py | Python | assets/codes/bktree.py | kkly1995/algorithms | 526ea30dd499696788915981cf978af1ee24dae4 | [
"MIT"
] | 2 | 2019-03-06T05:59:49.000Z | 2020-03-27T14:21:58.000Z | assets/codes/bktree.py | kkly1995/algorithms | 526ea30dd499696788915981cf978af1ee24dae4 | [
"MIT"
] | 4 | 2019-02-01T16:53:15.000Z | 2021-06-11T00:17:44.000Z | assets/codes/bktree.py | kkly1995/algorithms | 526ea30dd499696788915981cf978af1ee24dae4 | [
"MIT"
] | 8 | 2016-12-02T20:56:12.000Z | 2021-06-09T20:50:39.000Z |
# pip install python-levenshtein
import Levenshtein as lev
import numpy as np
import string
class WordSearch:
def __init__(self,wordbank,compare=lev.distance):
''' Base class for word searching.'''
self.wordbank=wordbank
self.compare=compare
self.ncompares=0
def query(self,key):
''' Return cl... | 28.463277 | 98 | 0.644502 |
79774aafeb9a22873e1ea87d993b5cb0fe713343 | 21,573 | py | Python | apimd/parser.py | KmolYuan/apimd | f32841bffdc658194a6cca2f8d9d084c1f220274 | [
"MIT"
] | 2 | 2020-12-10T02:26:37.000Z | 2021-03-19T05:46:57.000Z | apimd/parser.py | KmolYuan/apimd | f32841bffdc658194a6cca2f8d9d084c1f220274 | [
"MIT"
] | 4 | 2021-02-26T03:32:24.000Z | 2021-03-15T06:36:41.000Z | apimd/parser.py | KmolYuan/apimd | f32841bffdc658194a6cca2f8d9d084c1f220274 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Data structures."""
__author__ = "Yuan Chang"
__copyright__ = "Copyright (C) 2020-2021"
__license__ = "MIT"
__email__ = "pyslvs@gmail.com"
from typing import cast, TypeVar, Union, Optional
from types import ModuleType
from collections.abc import Sequence, Iterable, Iterator
from itertools ... | 35.716887 | 80 | 0.531173 |
79774da5fe2cd5317c8acdd1db9ea541732d5526 | 1,099 | py | Python | src/profiles/migrations/0001_initial.py | morph1904/PYNginx | 3bf42d9255082112726860a521406393375d6449 | [
"MIT"
] | 2 | 2019-01-22T03:50:43.000Z | 2019-04-12T11:13:40.000Z | src/profiles/migrations/0001_initial.py | morph1904/PYNginx | 3bf42d9255082112726860a521406393375d6449 | [
"MIT"
] | 9 | 2020-02-11T22:03:15.000Z | 2022-03-11T23:12:38.000Z | src/profiles/migrations/0001_initial.py | morph1904/PYNginx | 3bf42d9255082112726860a521406393375d6449 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import uuid
class Migration(migrations.Migration):
dependencies = [
('auth', '0001_initial'),
]
operations = [
migrations.CreateModel(
nam... | 34.34375 | 114 | 0.567789 |
79774dd5f36597d77b10a9e077c5e08880786828 | 12,582 | py | Python | tensorflow_gan/python/estimator/stargan_estimator_test.py | Aerochip7/gan | d3648c0f3996bd9e5564c05a44ff4215e5156cbd | [
"Apache-2.0"
] | null | null | null | tensorflow_gan/python/estimator/stargan_estimator_test.py | Aerochip7/gan | d3648c0f3996bd9e5564c05a44ff4215e5156cbd | [
"Apache-2.0"
] | null | null | null | tensorflow_gan/python/estimator/stargan_estimator_test.py | Aerochip7/gan | d3648c0f3996bd9e5564c05a44ff4215e5156cbd | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2022 The TensorFlow GAN 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 applicabl... | 37.783784 | 81 | 0.706644 |
79774def9700fb79cee9510cb077afffff2204cd | 19,759 | py | Python | bundle/python-mode/pymode/libs/pylama/lint/pylama_pylint/pylint/checkers/typecheck.py | wezhang/vim-setup | dac2f91fe0d9ca6f832df51010d8ced45e99e457 | [
"Apache-2.0"
] | null | null | null | bundle/python-mode/pymode/libs/pylama/lint/pylama_pylint/pylint/checkers/typecheck.py | wezhang/vim-setup | dac2f91fe0d9ca6f832df51010d8ced45e99e457 | [
"Apache-2.0"
] | null | null | null | bundle/python-mode/pymode/libs/pylama/lint/pylama_pylint/pylint/checkers/typecheck.py | wezhang/vim-setup | dac2f91fe0d9ca6f832df51010d8ced45e99e457 | [
"Apache-2.0"
] | 1 | 2020-10-01T18:51:49.000Z | 2020-10-01T18:51:49.000Z | # Copyright (c) 2006-2013 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, o... | 43.714602 | 105 | 0.577964 |
79774ec06d6cd55c76fb2c8f8abad940924c7dcf | 12,381 | py | Python | app/Matrix_Capsules_EM/datasets/norb.py | wudidaizi/RAVEN | 10d126930ed31056e55803da4f8d606cde2b56d2 | [
"MIT"
] | 97 | 2018-04-23T03:56:05.000Z | 2021-09-28T11:45:20.000Z | app/Matrix_Capsules_EM/datasets/norb.py | wudidaizi/RAVEN | 10d126930ed31056e55803da4f8d606cde2b56d2 | [
"MIT"
] | 13 | 2018-05-02T02:32:39.000Z | 2020-07-04T04:16:29.000Z | app/Matrix_Capsules_EM/datasets/norb.py | wudidaizi/RAVEN | 10d126930ed31056e55803da4f8d606cde2b56d2 | [
"MIT"
] | 34 | 2018-04-24T08:43:15.000Z | 2021-11-02T14:38:49.000Z | from __future__ import print_function
import torch.utils.data as data
from PIL import Image
import os
import os.path
import errno
import numpy as np
import torch
import codecs
import struct
class NORB(data.Dataset):
"""`NORB <https://cs.nyu.edu/~ylclab/data/norb-v1.0/>`_ Dataset.
The training set is composed ... | 38.811912 | 130 | 0.576771 |
79774ed9454692b39050581fb84a4d6409db68c9 | 1,797 | py | Python | schedules_tools/tests/__init__.py | RedHat-Eng-PGM/python-schedules-tools | 6166cdd0e5f7c08fba1c50f113ae6a6103460f9b | [
"MIT"
] | 1 | 2019-05-06T21:10:35.000Z | 2019-05-06T21:10:35.000Z | schedules_tools/tests/__init__.py | RedHat-Eng-PGM/schedules-tools | fd96a9e1df4e53b8da3048c013af0cd2c290f9b5 | [
"MIT"
] | 5 | 2019-05-06T21:25:38.000Z | 2021-02-05T20:54:30.000Z | schedules_tools/tests/__init__.py | RedHat-Eng-PGM/schedules-tools | fd96a9e1df4e53b8da3048c013af0cd2c290f9b5 | [
"MIT"
] | 1 | 2019-10-31T01:51:41.000Z | 2019-10-31T01:51:41.000Z | from schedules_tools import models
import datetime
def create_test_schedule():
sch = models.Schedule()
sch.dStart = datetime.datetime(2016, 12, 1, 8, 0)
sch.dFinish = datetime.datetime(2016, 12, 22, 8, 0)
sch.name = 'Schedules tools'
sch.used_flags = set(['qe', 'pm', 'dev'])
sch.slug = 'scht'
... | 30.982759 | 57 | 0.634391 |
797750adfb9f4999f508641ce20693b92ca2d570 | 13,815 | py | Python | tests/contrib/hardware/test_pci.py | addyess/charm-helpers | 868d2ef2755f57d4ca0c0e6de95b8fe573dec3c1 | [
"Apache-2.0"
] | null | null | null | tests/contrib/hardware/test_pci.py | addyess/charm-helpers | 868d2ef2755f57d4ca0c0e6de95b8fe573dec3c1 | [
"Apache-2.0"
] | null | null | null | tests/contrib/hardware/test_pci.py | addyess/charm-helpers | 868d2ef2755f57d4ca0c0e6de95b8fe573dec3c1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Canonical Ltd
#
# 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.375 | 79 | 0.604271 |
7977515bb76f3976efa90fc0d854d191966943f8 | 7,526 | py | Python | qa/rpc-tests/test_framework/test_framework.py | msy2008/infinitecoin | 7636b1b21946cc7ffb3f179a527423615108b073 | [
"MIT"
] | 2 | 2019-12-20T02:15:59.000Z | 2019-12-20T08:19:56.000Z | qa/rpc-tests/test_framework/test_framework.py | msy2008/infinitecoin | af19c36e8214d22cb15e7d20c0dfff977fb68364 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/test_framework.py | msy2008/infinitecoin | af19c36e8214d22cb15e7d20c0dfff977fb68364 | [
"MIT"
] | 1 | 2020-05-22T11:54:48.000Z | 2020-05-22T11:54:48.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Base class for RPC testing
import logging
import optparse
import os
import sys
import shutil
import te... | 36.009569 | 139 | 0.619585 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.