hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
842ec14c66c0643829e7c656d1a5e1e232009092 | 20,753 | py | Python | ext/modular.py | lun-4/avabot | f9fe22a497291773588734f7d3a33f7d42d65251 | [
"MIT"
] | null | null | null | ext/modular.py | lun-4/avabot | f9fe22a497291773588734f7d3a33f7d42d65251 | [
"MIT"
] | null | null | null | ext/modular.py | lun-4/avabot | f9fe22a497291773588734f7d3a33f7d42d65251 | [
"MIT"
] | null | null | null | # https://killsixbilliondemons.com/feed/
# http://twokinds.keenspot.com/feed.xml
# http://mylifewithfel.smackjeeves.com/rss/
import asyncio
import json
import re
import os
import math
import time
import discord
import aiohttp
# Oops, my finger slipped
import lxml.html
# import rethinkdb as r
import dateutil.parser
i... | 33.41868 | 159 | 0.630945 |
d2ad70957920471751e9f65cbf2c39fa14560414 | 6,051 | py | Python | flaskblog/users/routes.py | oecorrechag/Block | b65152dc768ece64ea93535ade5e8c66c3ab9de4 | [
"MIT"
] | null | null | null | flaskblog/users/routes.py | oecorrechag/Block | b65152dc768ece64ea93535ade5e8c66c3ab9de4 | [
"MIT"
] | null | null | null | flaskblog/users/routes.py | oecorrechag/Block | b65152dc768ece64ea93535ade5e8c66c3ab9de4 | [
"MIT"
] | 1 | 2021-01-04T20:13:06.000Z | 2021-01-04T20:13:06.000Z | from flask import render_template, url_for, flash, redirect, request, Blueprint
from flask_login import login_user, current_user, logout_user, login_required
from flaskblog import db, bcrypt
from flaskblog.models import User, Post, Todo
from flaskblog.users.forms import (RegistrationForm, LoginForm, UpdateAccountForm,
... | 37.583851 | 97 | 0.672451 |
972d345195a25c000efe9c33b1dcdc3d1bcf361a | 4,030 | py | Python | src/main.py | kikei/vivaldiUpdater | c53315a1542f29d929ea627ff5f297023fa8fb13 | [
"MIT"
] | null | null | null | src/main.py | kikei/vivaldiUpdater | c53315a1542f29d929ea627ff5f297023fa8fb13 | [
"MIT"
] | null | null | null | src/main.py | kikei/vivaldiUpdater | c53315a1542f29d929ea627ff5f297023fa8fb13 | [
"MIT"
] | null | null | null | import requests
import os
from pyquery import PyQuery
from urllib.parse import urlparse, urljoin
import posixpath
import zipfile
USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.98 Safari/537.36 Vivaldi/1.6.689.46'
VIVALDI_COM_URL = 'https://vivaldi.com/download/'
L... | 26.866667 | 138 | 0.6866 |
ec38afcaa153d1541d578cb150decef1b0c66d04 | 3,863 | py | Python | mythx_models/response/analysis.py | s0b0lev/mythx-models | 0fc14fef9e41a68a7d97e0bb170fd0eca5693d9a | [
"MIT"
] | null | null | null | mythx_models/response/analysis.py | s0b0lev/mythx-models | 0fc14fef9e41a68a7d97e0bb170fd0eca5693d9a | [
"MIT"
] | null | null | null | mythx_models/response/analysis.py | s0b0lev/mythx-models | 0fc14fef9e41a68a7d97e0bb170fd0eca5693d9a | [
"MIT"
] | null | null | null | """This module contains domain models regarding analysis jobs"""
from enum import Enum
from inflection import underscore
from mythx_models.response.base import BaseResponse
from mythx_models.util import deserialize_api_timestamp, serialize_api_timestamp
class AnalysisStatus(str, Enum):
"""An Enum describing th... | 33.885965 | 96 | 0.609371 |
5843d53d1f764be53feee69786346a108a4348c8 | 792 | py | Python | profiles-rest-api/profiles_api/migrations/0002_profilesfeeditem.py | Naoya-abe/django_REST_framework_basic | dcdb7efcb4b75550bd01cbe18619f2d0b75e0421 | [
"MIT"
] | 1 | 2021-08-28T08:40:23.000Z | 2021-08-28T08:40:23.000Z | profiles-rest-api/profiles_api/migrations/0002_profilesfeeditem.py | Naoya-abe/django_REST_framework_basic | dcdb7efcb4b75550bd01cbe18619f2d0b75e0421 | [
"MIT"
] | null | null | null | profiles-rest-api/profiles_api/migrations/0002_profilesfeeditem.py | Naoya-abe/django_REST_framework_basic | dcdb7efcb4b75550bd01cbe18619f2d0b75e0421 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.12 on 2020-05-24 22:47
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('profiles_api', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 31.68 | 126 | 0.633838 |
46d422a64062e4b0d13297ead64a301f0d186202 | 3,108 | py | Python | add_outline.py | azeemba/blender-add-outline | 36c6b92a10834f2e0ff108a7c4b18cd61daf5010 | [
"MIT"
] | 2 | 2020-12-08T13:10:05.000Z | 2022-01-30T02:10:38.000Z | add_outline.py | azeemba/blender-add-outline | 36c6b92a10834f2e0ff108a7c4b18cd61daf5010 | [
"MIT"
] | null | null | null | add_outline.py | azeemba/blender-add-outline | 36c6b92a10834f2e0ff108a7c4b18cd61daf5010 | [
"MIT"
] | 1 | 2021-08-28T11:04:30.000Z | 2021-08-28T11:04:30.000Z |
bl_info = {
"name": "Outline",
"description": "Add NPR/cartoon outline to an object that works in eevee and cycles",
"author": "Azeem Bande-Ali",
"version": (0, 1),
"blender": (2, 90),
"category": "Material"
}
import bpy
from bpy.props import StringProperty
from bpy.types import Operator, Addo... | 29.320755 | 89 | 0.694659 |
96f0d84f6ab3812d8c490f393857d39c9d05b657 | 1,996 | py | Python | notifications/migrations/0001_initial.py | bizeasy17/investtrack | 3840948896573f3906a5df80ea80859a492f4133 | [
"MIT"
] | null | null | null | notifications/migrations/0001_initial.py | bizeasy17/investtrack | 3840948896573f3906a5df80ea80859a492f4133 | [
"MIT"
] | 3 | 2021-07-15T13:23:28.000Z | 2021-12-09T03:32:16.000Z | notifications/migrations/0001_initial.py | bizeasy17/investtrack | 3840948896573f3906a5df80ea80859a492f4133 | [
"MIT"
] | 1 | 2021-08-19T14:42:59.000Z | 2021-08-19T14:42:59.000Z | # Generated by Django 3.0.2 on 2020-02-13 09:29
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
mi... | 51.179487 | 330 | 0.622244 |
0eab2bb54e85a8fbdd97595fda895f75c24205ba | 5,955 | py | Python | m2-modified/ims/common/agentless-system-crawler/tests/unit/test_osinfo.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | null | null | null | m2-modified/ims/common/agentless-system-crawler/tests/unit/test_osinfo.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | 1 | 2017-05-12T14:33:23.000Z | 2017-05-12T14:33:23.000Z | m2-modified/ims/common/agentless-system-crawler/tests/unit/test_osinfo.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | null | null | null | import unittest
from unittest import TestCase
import mock
from utils.osinfo import (_get_file_name,
parse_lsb_release,
parse_os_release,
parse_redhat_release,
parse_centos_release,
get_osi... | 38.173077 | 78 | 0.584215 |
440a6bbcc93e62c390a0ce8c7ae95fc784c3b3e2 | 1,301 | py | Python | src/zope/app/server/accesslog.py | zopefoundation/zope.app.server | e0734fdc7327a1b41542b664eb745fa4299c2a57 | [
"ZPL-2.1"
] | null | null | null | src/zope/app/server/accesslog.py | zopefoundation/zope.app.server | e0734fdc7327a1b41542b664eb745fa4299c2a57 | [
"ZPL-2.1"
] | 6 | 2017-10-30T14:56:41.000Z | 2020-11-11T14:08:19.000Z | src/zope/app/server/accesslog.py | zopefoundation/zope.app.server | e0734fdc7327a1b41542b664eb745fa4299c2a57 | [
"ZPL-2.1"
] | 1 | 2015-04-03T08:06:09.000Z | 2015-04-03T08:06:09.000Z | ##############################################################################
#
# Copyright (c) 2004 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 35.162162 | 78 | 0.648732 |
3fcee7147cfddbf915b7867580fea2e638a12e20 | 5,732 | py | Python | kubernetes/client/models/v1_env_var.py | carloscastrojumo/python | f461dd42d48650a4ae1b41d630875cad9fcb68ad | [
"Apache-2.0"
] | 2 | 2021-03-09T12:42:05.000Z | 2021-03-09T13:27:50.000Z | kubernetes/client/models/v1_env_var.py | carloscastrojumo/python | f461dd42d48650a4ae1b41d630875cad9fcb68ad | [
"Apache-2.0"
] | 7 | 2021-04-13T03:04:42.000Z | 2022-03-02T03:10:18.000Z | kubernetes/client/models/v1_env_var.py | carloscastrojumo/python | f461dd42d48650a4ae1b41d630875cad9fcb68ad | [
"Apache-2.0"
] | 1 | 2021-06-13T09:21:37.000Z | 2021-06-13T09:21:37.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.17
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | 32.202247 | 443 | 0.604676 |
52bee7b395f739dcaa8b3c6ff04686fa4266ee70 | 25,324 | py | Python | tests/hazmat/backends/test_openssl.py | maqp/cryptography | d824f6005a8520e3b98fb349a899c33f300b7a08 | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2020-02-05T04:57:55.000Z | 2021-03-03T23:29:30.000Z | tests/hazmat/backends/test_openssl.py | maqp/cryptography | d824f6005a8520e3b98fb349a899c33f300b7a08 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/hazmat/backends/test_openssl.py | maqp/cryptography | d824f6005a8520e3b98fb349a899c33f300b7a08 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-03-03T23:31:18.000Z | 2021-03-03T23:31:18.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import datetime
import os
import subprocess
import sys
import textwrap
i... | 37.241176 | 79 | 0.649147 |
67906fcc568b07043cf8238642c44cb213e613ec | 2,483 | py | Python | sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.000Z | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
from typing import TYPE_CHECKING
from six.moves.urllib_parse import parse_qs, urlparse
try:
from http.server import HTTPServer, BaseHTTPRequestHandler
except Impor... | 34.486111 | 120 | 0.655658 |
faca6bf58dccd65c12d7254a5c68e623f59161dc | 5,096 | py | Python | pymc3/distributions/__init__.py | HVoltBb/pymc3 | da482cd5ba08e421e8a62d879822cc41e5b91420 | [
"Apache-2.0"
] | null | null | null | pymc3/distributions/__init__.py | HVoltBb/pymc3 | da482cd5ba08e421e8a62d879822cc41e5b91420 | [
"Apache-2.0"
] | null | null | null | pymc3/distributions/__init__.py | HVoltBb/pymc3 | da482cd5ba08e421e8a62d879822cc41e5b91420 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The PyMC Developers
#
# 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 ag... | 29.456647 | 76 | 0.679749 |
8deabbe11489b65ac1755055fe2b86b0724f3e20 | 5,855 | py | Python | reconcile/openshift_clusterrolebindings.py | janboll/qontract-reconcile | 20d8136dfaec76700aa2b0487e9f7a02adae566c | [
"Apache-2.0"
] | null | null | null | reconcile/openshift_clusterrolebindings.py | janboll/qontract-reconcile | 20d8136dfaec76700aa2b0487e9f7a02adae566c | [
"Apache-2.0"
] | null | null | null | reconcile/openshift_clusterrolebindings.py | janboll/qontract-reconcile | 20d8136dfaec76700aa2b0487e9f7a02adae566c | [
"Apache-2.0"
] | null | null | null | import sys
from reconcile.utils import gql
import reconcile.openshift_base as ob
from reconcile import queries
from reconcile.utils.semver_helper import make_semver
from reconcile.utils.openshift_resource import (OpenshiftResource as OR,
ResourceKeyExistsError)
from rec... | 31.820652 | 77 | 0.537148 |
05bb45ef652e1dd1462dc876f616152a0202ac6f | 512 | py | Python | Python/Logic-2/make_chocolate.py | LucasHenrique-dev/exerc-cios-codingbat | ff92db10387757b9a2e3f72be6b7e51824b1ffa6 | [
"MIT"
] | 2 | 2020-12-09T13:36:44.000Z | 2021-08-16T01:17:16.000Z | Python/Logic-2/make_chocolate.py | LucasHenrique-dev/exerc-cios-codingbat | ff92db10387757b9a2e3f72be6b7e51824b1ffa6 | [
"MIT"
] | null | null | null | Python/Logic-2/make_chocolate.py | LucasHenrique-dev/exerc-cios-codingbat | ff92db10387757b9a2e3f72be6b7e51824b1ffa6 | [
"MIT"
] | null | null | null | """
Sabendo que cada unidade de "small" vale 1 e que cada unidade de "big" vale 5,
retorne a quantidade de "small" necessária para se atingir o "goal", sabendo que
deverá se usar todas as "big" possíveis antes. Caso não dê para atingir o "goal",
retorne -1.
Ex.:((4, 1, 9) → 4; (4, 1, 10) → -1; (4, 1, 7) → 2).
"""
def... | 26.947368 | 81 | 0.623047 |
8b68bf55ef486673d897ede1bff8c6e6d7c1bcc0 | 36,764 | py | Python | tests/test_sdc_resource_properties.py | devfest-bugbust/python-onapsdk | 90c03dfbd3cf8e47978315ab04694b7f7a5032f8 | [
"Apache-2.0"
] | null | null | null | tests/test_sdc_resource_properties.py | devfest-bugbust/python-onapsdk | 90c03dfbd3cf8e47978315ab04694b7f7a5032f8 | [
"Apache-2.0"
] | 10 | 2021-09-20T15:42:47.000Z | 2021-09-23T12:49:51.000Z | tests/test_sdc_resource_properties.py | devfest-bugbust/python-onapsdk | 90c03dfbd3cf8e47978315ab04694b7f7a5032f8 | [
"Apache-2.0"
] | 2 | 2021-09-20T13:53:12.000Z | 2021-09-21T08:05:58.000Z | from unittest import mock
import pytest
from onapsdk.exceptions import ParameterError
from onapsdk.sdc.properties import Input, Property
from onapsdk.sdc.sdc_resource import SdcResource
from onapsdk.sdc.service import Service
from onapsdk.sdc.vf import Vf
from onapsdk.sdc.vl import Vl
INPUTS = {
'inputs': [
... | 34.423221 | 144 | 0.51205 |
9e8b768b5a3c0bbc16ae186764146f4ec70d3261 | 506 | py | Python | common/tests/test_sequence_field.py | Jenks18/mfl_api | ecbb8954053be06bbcac7e1132811d73534c78d9 | [
"MIT"
] | 19 | 2015-04-16T09:37:08.000Z | 2022-02-10T11:50:30.000Z | common/tests/test_sequence_field.py | Jenks18/mfl_api | ecbb8954053be06bbcac7e1132811d73534c78d9 | [
"MIT"
] | 125 | 2015-03-26T14:05:49.000Z | 2020-05-14T08:16:50.000Z | common/tests/test_sequence_field.py | Jenks18/mfl_api | ecbb8954053be06bbcac7e1132811d73534c78d9 | [
"MIT"
] | 39 | 2015-04-15T09:17:33.000Z | 2022-03-28T18:08:16.000Z | from django.contrib.auth import get_user_model
from django.test import TestCase
from model_mommy import mommy
from common.fields import SequenceField
from common.models import County
class SequenceFieldTest(TestCase):
def setUp(self):
self.user = mommy.make(get_user_model())
self.test_model = Cou... | 28.111111 | 60 | 0.731225 |
ac711b6d710130781fe03ae1e658fd081df5b410 | 29,880 | py | Python | hplip-3.20.3/base/LedmWifi.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | null | null | null | hplip-3.20.3/base/LedmWifi.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | 1 | 2021-11-20T16:33:39.000Z | 2021-11-20T16:33:39.000Z | hplip-3.20.3/base/LedmWifi.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# (c) Copyright 2003-2015 HP Development Company, L.P.
#
# 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 late... | 44.332344 | 760 | 0.594344 |
3a7183871e525fed1826259a3e2158dd2c2f7258 | 1,237 | py | Python | Python/Python20/22b.py | sapieninja/AdventOfCode | 8190c11e3eb2e4292a0cf66a6ef9261dee880f2e | [
"MIT"
] | null | null | null | Python/Python20/22b.py | sapieninja/AdventOfCode | 8190c11e3eb2e4292a0cf66a6ef9261dee880f2e | [
"MIT"
] | 1 | 2021-03-30T12:31:38.000Z | 2021-03-30T12:31:38.000Z | Python/Python20/22b.py | sapieninja/AdventOfCode | 8190c11e3eb2e4292a0cf66a6ef9261dee880f2e | [
"MIT"
] | null | null | null | from collections import *
import itertools
import random
import re
import sys
import aoc_utils
import queue
from operator import *
import math
import functools
from copy import deepcopy
lines = aoc_utils.readlines()
p1 = []
p2 = []
count = 0
for line in lines:
if line.count(":") == 0 and count != 2:
p1.appe... | 22.089286 | 45 | 0.522231 |
ed383ef30f3ba233d559e4451a496c9b05d256a3 | 2,754 | py | Python | src/training/lambertw_torch.py | kungfuai/d3m-segmentation-research | 5bc44ddd0e8522fb2b369866ad47aa62a24a8f63 | [
"MIT"
] | 1 | 2020-12-07T02:25:53.000Z | 2020-12-07T02:25:53.000Z | src/training/lambertw_torch.py | kungfuai/d3m-segmentation-research | 5bc44ddd0e8522fb2b369866ad47aa62a24a8f63 | [
"MIT"
] | null | null | null | src/training/lambertw_torch.py | kungfuai/d3m-segmentation-research | 5bc44ddd0e8522fb2b369866ad47aa62a24a8f63 | [
"MIT"
] | null | null | null | # Based off of https://github.com/locuslab/projected_sinkhorn
# Reimplementation of scipy version of lambertw for branching factor = 0
import torch
import math
import warnings
OMEGA = 0.56714329040978387299997 # W(1, 0)
EXPN1 = 0.36787944117144232159553 # exp(-1)
def evalpoly(coeff, degree, z):
powers = torch... | 29.612903 | 72 | 0.525781 |
3f176a13f0e0cd09650524b787ffc3c944ec9fd5 | 1,342 | py | Python | server/models/AlexNet.py | dcsgfl/acceleratefl | 9c928ff06dd4dd02eb27cb71d7d539ba4527ec58 | [
"MIT"
] | null | null | null | server/models/AlexNet.py | dcsgfl/acceleratefl | 9c928ff06dd4dd02eb27cb71d7d539ba4527ec58 | [
"MIT"
] | null | null | null | server/models/AlexNet.py | dcsgfl/acceleratefl | 9c928ff06dd4dd02eb27cb71d7d539ba4527ec58 | [
"MIT"
] | null | null | null | import torch.nn as nn
#CIFAR10 => 10 classes
NUM_CLASSES = 10
class AlexNet(nn.Module):
def __init__(self, num_classes=NUM_CLASSES):
super(AlexNet, self).__init__()
self.features = nn.Sequential(
nn.Conv2d(3, 64, kernel_size=3, stride=2, padding=1),
nn.ReLU(inplace=True),
... | 31.209302 | 65 | 0.533532 |
0f4b448992daf91bd2a9143d074e07de2b2051a7 | 1,294 | py | Python | xlsxwriter/test/comparison/test_chart_column05.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-07-25T06:08:09.000Z | 2019-11-01T02:33:56.000Z | xlsxwriter/test/comparison/test_chart_column05.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 13 | 2019-07-14T00:29:05.000Z | 2019-11-26T06:16:46.000Z | xlsxwriter/test/comparison/test_chart_column05.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 24.884615 | 79 | 0.557187 |
f0c06c430eb22c455dab60dd9236793a31fff12e | 290 | py | Python | mmcv/visualization/__init__.py | XinYangDong/mmcv-0.2.10 | 527388ea7c5daf7149a88b3dc833373d5a5fb850 | [
"Apache-2.0"
] | 54 | 2021-11-05T02:15:15.000Z | 2022-03-23T13:40:43.000Z | mmcv/visualization/__init__.py | XinYangDong/mmcv-0.2.10 | 527388ea7c5daf7149a88b3dc833373d5a5fb850 | [
"Apache-2.0"
] | 8 | 2019-06-13T06:00:08.000Z | 2021-07-24T05:25:33.000Z | mmcv/visualization/__init__.py | XinYangDong/mmcv-0.2.10 | 527388ea7c5daf7149a88b3dc833373d5a5fb850 | [
"Apache-2.0"
] | 6 | 2019-07-30T06:36:27.000Z | 2021-06-03T11:57:36.000Z | from .color import Color, color_val
from .image import imshow, imshow_bboxes, imshow_det_bboxes
from .optflow import flowshow, flow2rgb, make_color_wheel
__all__ = [
'Color', 'color_val', 'imshow', 'imshow_bboxes', 'imshow_det_bboxes',
'flowshow', 'flow2rgb', 'make_color_wheel'
]
| 32.222222 | 73 | 0.751724 |
aec12f4cedceaf503d37e6bbfff16b50b27033bd | 33,982 | py | Python | pandas/tests/indexing/test_indexing.py | rlukevie/pandas | a7402c1140116661dbba98f3a6ca923f9a957875 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-05-13T17:34:58.000Z | 2021-05-13T17:34:58.000Z | pandas/tests/indexing/test_indexing.py | rlukevie/pandas | a7402c1140116661dbba98f3a6ca923f9a957875 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/indexing/test_indexing.py | rlukevie/pandas | a7402c1140116661dbba98f3a6ca923f9a957875 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | """ test fancy indexing & misc """
from datetime import datetime
import re
import weakref
import numpy as np
import pytest
from pandas.core.dtypes.common import (
is_float_dtype,
is_integer_dtype,
)
import pandas as pd
from pandas import (
DataFrame,
Index,
NaT,
Series,
date_range,
o... | 33.44685 | 88 | 0.522806 |
3b22be3797b589f63b4849be485034dde8a632f5 | 2,036 | py | Python | python/fedml/simulation/mpi_p2p_mp/fedseg/FedSegTrainer.py | NCLPhD/FedML | ffa15262ee963b9c856f34f0b2202f4dfeb3a76b | [
"Apache-2.0"
] | null | null | null | python/fedml/simulation/mpi_p2p_mp/fedseg/FedSegTrainer.py | NCLPhD/FedML | ffa15262ee963b9c856f34f0b2202f4dfeb3a76b | [
"Apache-2.0"
] | null | null | null | python/fedml/simulation/mpi_p2p_mp/fedseg/FedSegTrainer.py | NCLPhD/FedML | ffa15262ee963b9c856f34f0b2202f4dfeb3a76b | [
"Apache-2.0"
] | null | null | null | from .utils import transform_tensor_to_list
class FedSegTrainer(object):
def __init__(
self,
client_index,
train_data_local_dict,
train_data_local_num_dict,
train_data_num,
test_data_local_dict,
device,
model,
args,
model_trainer,
... | 33.377049 | 87 | 0.696955 |
a4bf2969f4a77f7f8700add5cdf2a3e91af8e11a | 45,471 | py | Python | pytorch_lightning/trainer/__init__.py | wdmwhh/pytorch-lightning | 5d10a36762776c4b6f6a9c55b4e6bf7bd258137f | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/trainer/__init__.py | wdmwhh/pytorch-lightning | 5d10a36762776c4b6f6a9c55b4e6bf7bd258137f | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/trainer/__init__.py | wdmwhh/pytorch-lightning | 5d10a36762776c4b6f6a9c55b4e6bf7bd258137f | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# 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 i... | 29.073529 | 148 | 0.710343 |
1a18e3a1d0c48aacb9b65fbfa63da8440e22b2c4 | 15,674 | py | Python | libcloud/dns/drivers/godaddy.py | dineshbhoopathy/libcloud | fec8af6a4d43ef45eafa3631fb1a91ff33a6440e | [
"Apache-2.0"
] | null | null | null | libcloud/dns/drivers/godaddy.py | dineshbhoopathy/libcloud | fec8af6a4d43ef45eafa3631fb1a91ff33a6440e | [
"Apache-2.0"
] | null | null | null | libcloud/dns/drivers/godaddy.py | dineshbhoopathy/libcloud | fec8af6a4d43ef45eafa3631fb1a91ff33a6440e | [
"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 use ... | 31.161034 | 78 | 0.555378 |
f167c960979c680b993ac2182bdcdb02c5c95b24 | 168 | py | Python | app/utils/__init__.py | kryvokhyzha/lyrics-generation | 981bbc35c6bd6fe134e3a800a96f2c5825427139 | [
"MIT"
] | 1 | 2021-02-22T20:02:20.000Z | 2021-02-22T20:02:20.000Z | app/utils/__init__.py | kryvokhyzha/lyrics-generation | 981bbc35c6bd6fe134e3a800a96f2c5825427139 | [
"MIT"
] | null | null | null | app/utils/__init__.py | kryvokhyzha/lyrics-generation | 981bbc35c6bd6fe134e3a800a96f2c5825427139 | [
"MIT"
] | null | null | null | import yaml
def get_config(file_name='config.yaml'):
with open(file_name, 'r') as file:
config = yaml.load(file, Loader=yaml.FullLoader)
return config | 24 | 56 | 0.690476 |
8ec73a3d2aa9813c4ffb1b2b0d04a4c9358598c8 | 340 | py | Python | whimsical-woodpeckers/mysite/routing.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 40 | 2020-08-02T07:38:22.000Z | 2021-07-26T01:46:50.000Z | whimsical-woodpeckers/mysite/routing.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 134 | 2020-07-31T12:15:45.000Z | 2020-12-13T04:42:19.000Z | whimsical-woodpeckers/mysite/routing.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 101 | 2020-07-31T12:00:47.000Z | 2021-11-01T09:06:58.000Z | from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
import messages.routing
application = ProtocolTypeRouter({
# (http->django views is added by default)
'websocket': AuthMiddlewareStack(
URLRouter(
messages.routing.websocket_urlpatterns
... | 26.153846 | 58 | 0.726471 |
b9f915bc4ba31343271d28ecf2882aeae79165e0 | 9,795 | py | Python | magenta/models/pianoroll_rnn_nade/pianoroll_rnn_nade_generate.py | workproduct/magenta | ba43c3e1a2b3b6a5731fa10a5a6bddd0c821eb84 | [
"Apache-2.0"
] | null | null | null | magenta/models/pianoroll_rnn_nade/pianoroll_rnn_nade_generate.py | workproduct/magenta | ba43c3e1a2b3b6a5731fa10a5a6bddd0c821eb84 | [
"Apache-2.0"
] | null | null | null | magenta/models/pianoroll_rnn_nade/pianoroll_rnn_nade_generate.py | workproduct/magenta | ba43c3e1a2b3b6a5731fa10a5a6bddd0c821eb84 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The Magenta 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 applicable law or agreed to in ... | 38.411765 | 117 | 0.741194 |
2dcea46078c483f955e3116bd8c6faf672e0ce9b | 3,328 | py | Python | ordertype.py | msfzq3/zqbt | 277bc95d6b42b0cd17ae890a165f95fbafc95477 | [
"Apache-2.0"
] | null | null | null | ordertype.py | msfzq3/zqbt | 277bc95d6b42b0cd17ae890a165f95fbafc95477 | [
"Apache-2.0"
] | null | null | null | ordertype.py | msfzq3/zqbt | 277bc95d6b42b0cd17ae890a165f95fbafc95477 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from event import OrderEvent
# 设计一些委托单类型函数,方便策略中的下单操作
# 仅在Strategy中使用,不参与到具体的事件循环
# 优化:使用order类,直接加载bars、symbol、events,减少交易函数输入
class Order(object):
def __init__(self,events, bars, portfolio):
self.events = events
self.bars = bars
self.portfolio = por... | 38.252874 | 87 | 0.635216 |
b504185d3e365e2622b5cd097194c0852fb29e2f | 6,984 | py | Python | tests/x509/test_x509_revokedcertbuilder.py | wdscxsj/cryptography | 94590a9aecc9e5ef6fc8eda52bae43643a4c44bd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 4,492 | 2015-01-02T23:02:52.000Z | 2022-03-31T12:59:57.000Z | tests/x509/test_x509_revokedcertbuilder.py | wdscxsj/cryptography | 94590a9aecc9e5ef6fc8eda52bae43643a4c44bd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 3,692 | 2015-01-01T03:16:56.000Z | 2022-03-31T19:20:25.000Z | tests/x509/test_x509_revokedcertbuilder.py | wdscxsj/cryptography | 94590a9aecc9e5ef6fc8eda52bae43643a4c44bd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 1,155 | 2015-01-09T00:48:05.000Z | 2022-03-31T23:46:43.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import datetime
import pytest
import pytz
from cryptography import x509
class TestRevokedCertificateBuilder(object):
def test_ser... | 36 | 79 | 0.647766 |
571896e5a7bad3f2e01ca47232b179ede79e7220 | 98,145 | py | Python | neutron/tests/functional/agent/l3/test_dvr_router.py | weiqiLee/neutron | ddc72ebd41a0e7804b33a21583d3add008191229 | [
"Apache-2.0"
] | 1 | 2018-11-19T15:09:53.000Z | 2018-11-19T15:09:53.000Z | neutron/tests/functional/agent/l3/test_dvr_router.py | weiqiLee/neutron | ddc72ebd41a0e7804b33a21583d3add008191229 | [
"Apache-2.0"
] | null | null | null | neutron/tests/functional/agent/l3/test_dvr_router.py | weiqiLee/neutron | ddc72ebd41a0e7804b33a21583d3add008191229 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Red Hat, 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 require... | 48.804078 | 79 | 0.653665 |
850a6a04d88a2b3863a9105b9b4c55b53193fb0b | 3,983 | py | Python | src/train.py | Throvn/WordDetectorNN | 087d028519c7a3cd148adf7907978c8cc1b4f032 | [
"MIT"
] | null | null | null | src/train.py | Throvn/WordDetectorNN | 087d028519c7a3cd148adf7907978c8cc1b4f032 | [
"MIT"
] | null | null | null | src/train.py | Throvn/WordDetectorNN | 087d028519c7a3cd148adf7907978c8cc1b4f032 | [
"MIT"
] | null | null | null | import argparse
import json
import torch
from path import Path
from torch.utils.tensorboard import SummaryWriter
from dataloader import DataLoaderIAM
from dataset import DatasetIAM, DatasetIAMSplit
from eval import evaluate
from loss import compute_loss
from net import WordDetectorNet
from visualization import visual... | 30.875969 | 92 | 0.640221 |
4b758c44cf65f1f26c98fdce1dccafbec022c327 | 4,035 | py | Python | service/common/common_service.py | youjiajia/loonflow | 0542e543ffea49b2eda864397b9875b6bf107dd5 | [
"MIT"
] | null | null | null | service/common/common_service.py | youjiajia/loonflow | 0542e543ffea49b2eda864397b9875b6bf107dd5 | [
"MIT"
] | null | null | null | service/common/common_service.py | youjiajia/loonflow | 0542e543ffea49b2eda864397b9875b6bf107dd5 | [
"MIT"
] | null | null | null | import time
import hashlib
from service.base_service import BaseService
from service.common.log_service import auto_log
class CommonService(BaseService):
def __init__(self):
pass
@classmethod
@auto_log
def signature_check(cls, timestamp: str, signature: str, md5_key: str) -> tuple:
""... | 31.523438 | 107 | 0.596035 |
3f416e12353887116df7c6799e0ae142067007b8 | 13,130 | py | Python | nova/tests/api/openstack/compute/contrib/test_flavors_extra_specs.py | vasart/nova | bca5004d367e0418e35f8a72fe0f2e106e977ab0 | [
"Apache-2.0"
] | 1 | 2021-09-10T15:29:02.000Z | 2021-09-10T15:29:02.000Z | nova/tests/api/openstack/compute/contrib/test_flavors_extra_specs.py | PFZheng/nova | 84be8abbccb5ddc2d7c5a7db59019ed1edb19e7f | [
"Apache-2.0"
] | null | null | null | nova/tests/api/openstack/compute/contrib/test_flavors_extra_specs.py | PFZheng/nova | 84be8abbccb5ddc2d7c5a7db59019ed1edb19e7f | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 University of Southern California
# 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
#
# ... | 41.159875 | 79 | 0.61706 |
89f324bc963b3e80a28cc87c398a40101bb900b6 | 12,264 | py | Python | spar_python/report_generation/common/graphing.py | nathanawmk/SPARTA | 6eeb28b2dd147088b6e851876b36eeba3e700f16 | [
"BSD-2-Clause"
] | 37 | 2017-06-09T13:55:23.000Z | 2022-01-28T12:51:17.000Z | spar_python/report_generation/common/graphing.py | nathanawmk/SPARTA | 6eeb28b2dd147088b6e851876b36eeba3e700f16 | [
"BSD-2-Clause"
] | null | null | null | spar_python/report_generation/common/graphing.py | nathanawmk/SPARTA | 6eeb28b2dd147088b6e851876b36eeba3e700f16 | [
"BSD-2-Clause"
] | 5 | 2017-06-09T13:55:26.000Z | 2021-11-11T03:51:56.000Z | # *****************************************************************
# Copyright 2013 MIT Lincoln Laboratory
# Project: SPAR
# Authors: MZ
# Description: Class for graphing results from other analytics ocde
#
#
# Modifications:
# Date ... | 41.292929 | 78 | 0.617335 |
b9d191f1ae8baa638208ff3434519d62148b33b9 | 8,671 | py | Python | config/pydPiper/pages_lcd_20x4 (original).py | DennisB66/MoodeAudio-Scripting | 9534fdadc9989e3b5cf9c15efd011fcbefd5820c | [
"MIT"
] | 72 | 2017-03-13T11:01:01.000Z | 2021-11-29T20:53:53.000Z | config/pydPiper/pages_lcd_20x4 (original).py | DennisB66/MoodeAudio-Scripting | 9534fdadc9989e3b5cf9c15efd011fcbefd5820c | [
"MIT"
] | 126 | 2017-03-13T16:06:59.000Z | 2022-03-27T14:14:49.000Z | config/pydPiper/pages_lcd_20x4 (original).py | DennisB66/MoodeAudio-Scripting | 9534fdadc9989e3b5cf9c15efd011fcbefd5820c | [
"MIT"
] | 41 | 2017-10-11T18:37:50.000Z | 2021-06-18T17:02:45.000Z | #!/usr/bin/python.pydPiper
# coding: UTF-8
from __future__ import unicode_literals
# Page Definitions
# See Page Format.txt for instructions and examples on how to modify your display settings
# Load the fonts needed for this system
FONTS = {
'small': { 'default':True, 'file':'latin1_5x8_lcd.fnt','size':(5,8) },
... | 65.689394 | 239 | 0.607658 |
5f33d0fc59f508ff570b523a239f6b4bd646ad43 | 28,024 | py | Python | bzt/swagger2yaml.py | Avi-Labs/taurus | 3aa9bc294778d99be545575467fb5897dc815330 | [
"Apache-2.0"
] | 1,743 | 2015-03-30T20:56:03.000Z | 2022-03-31T09:08:37.000Z | bzt/swagger2yaml.py | Avi-Labs/taurus | 3aa9bc294778d99be545575467fb5897dc815330 | [
"Apache-2.0"
] | 1,159 | 2015-04-01T08:25:53.000Z | 2022-03-29T08:15:31.000Z | bzt/swagger2yaml.py | Avi-Labs/taurus | 3aa9bc294778d99be545575467fb5897dc815330 | [
"Apache-2.0"
] | 497 | 2015-03-31T21:05:18.000Z | 2022-03-17T12:45:21.000Z | """
Swagger to YAML converter for Taurus
Copyright 2017 BlazeMeter 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.org/licenses/LICENSE-2.0
Unless required by applicable... | 40.555716 | 119 | 0.588139 |
60c928cc5ccbd5c0317099368c4c2c4f16278f52 | 413 | py | Python | proj_spam_detector/proj_spam_detector/wsgi.py | rizcodes/aiml-nlp-spam-detector-app | e894aacc0d76ad2eb20258d358edd28bad9c5170 | [
"MIT"
] | null | null | null | proj_spam_detector/proj_spam_detector/wsgi.py | rizcodes/aiml-nlp-spam-detector-app | e894aacc0d76ad2eb20258d358edd28bad9c5170 | [
"MIT"
] | null | null | null | proj_spam_detector/proj_spam_detector/wsgi.py | rizcodes/aiml-nlp-spam-detector-app | e894aacc0d76ad2eb20258d358edd28bad9c5170 | [
"MIT"
] | null | null | null | """
WSGI config for proj_spam_detector project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('D... | 24.294118 | 78 | 0.79661 |
5fa25187124d329c2301d8dfd5f87e1d0ef7aebd | 1,251 | py | Python | theory/fit.py | akononovicius/anomalous-diffusion-in-nonlinear-transformations-of-the-noisy-voter-model | 471fcf1bbc7cbf3865144e4b1c1bbfcd7be182f6 | [
"Unlicense"
] | null | null | null | theory/fit.py | akononovicius/anomalous-diffusion-in-nonlinear-transformations-of-the-noisy-voter-model | 471fcf1bbc7cbf3865144e4b1c1bbfcd7be182f6 | [
"Unlicense"
] | null | null | null | theory/fit.py | akononovicius/anomalous-diffusion-in-nonlinear-transformations-of-the-noisy-voter-model | 471fcf1bbc7cbf3865144e4b1c1bbfcd7be182f6 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from numpy import exp
from scipy.special import hyp1f1
from scipy.special import gamma
def yStationaryMoment(k, alpha, epsi1, epsi2):
return gamma(epsi2-k/alpha)*gamma(epsi1+k/alpha)/(gamma(epsi1)*gamma(epsi2))
def yMoment(k, T, x0, alpha, epsi1, epsi2):
y0 = (x... | 27.195652 | 80 | 0.565947 |
9642c4ee58c4ee2d219afb195d8e0c0d0a3e0739 | 98,861 | py | Python | src/sage/algebras/clifford_algebra.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 3 | 2019-07-15T13:48:24.000Z | 2019-11-08T12:31:43.000Z | src/sage/algebras/clifford_algebra.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 2 | 2018-10-30T13:40:20.000Z | 2020-07-23T12:13:30.000Z | src/sage/algebras/clifford_algebra.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 1 | 2019-06-02T03:16:55.000Z | 2019-06-02T03:16:55.000Z | r"""
Clifford Algebras
AUTHORS:
- Travis Scrimshaw (2013-09-06): Initial version
"""
#*****************************************************************************
# Copyright (C) 2013 Travis Scrimshaw <tscrim at ucdavis.edu>
#
# This program is free software: you can redistribute it and/or modify
# it under t... | 34.797958 | 118 | 0.502048 |
e4271a7efffe2a2de2bd150e26e18d8488d80775 | 1,538 | py | Python | jdcloud_sdk/services/ipanti/apis/ModifyForwardRuleRequest.py | lidaobing/jdcloud-sdk-python | f305e8ddd74ab4ad445477744534e7299d4d93fb | [
"Apache-2.0"
] | null | null | null | jdcloud_sdk/services/ipanti/apis/ModifyForwardRuleRequest.py | lidaobing/jdcloud-sdk-python | f305e8ddd74ab4ad445477744534e7299d4d93fb | [
"Apache-2.0"
] | null | null | null | jdcloud_sdk/services/ipanti/apis/ModifyForwardRuleRequest.py | lidaobing/jdcloud-sdk-python | f305e8ddd74ab4ad445477744534e7299d4d93fb | [
"Apache-2.0"
] | 1 | 2019-03-01T08:44:37.000Z | 2019-03-01T08:44:37.000Z | # coding=utf8
# Copyright 2018-2025 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 32.041667 | 112 | 0.717815 |
99cba8667e8139a7dd425caa5b8e0ea8e230e675 | 1,914 | py | Python | handlers/private.py | AftahBagas/AlphaMusik | c8c3804a26ad393b6f666fecd4d3464727ce2544 | [
"MIT"
] | null | null | null | handlers/private.py | AftahBagas/AlphaMusik | c8c3804a26ad393b6f666fecd4d3464727ce2544 | [
"MIT"
] | null | null | null | handlers/private.py | AftahBagas/AlphaMusik | c8c3804a26ad393b6f666fecd4d3464727ce2544 | [
"MIT"
] | 1 | 2021-06-22T08:08:43.000Z | 2021-06-22T08:08:43.000Z | from telethon import Client, filters
from telethon.types import Message, InlineKeyboardMarkup, InlineKeyboardButton
from config import BOT_NAME as bn
from helpers.filters import other_filters2
@Client.on_message(other_filters2)
async def start(_, message: Message):
await message.reply_sticker("CAACAgUAAxkBAAIVxG... | 34.178571 | 106 | 0.539707 |
e9e7df0468fc9d3a9e4c3d9f38099edb0214a9bc | 1,598 | py | Python | setup.py | tranquochuy/data-science-utilities | 578b05cce40ae410868c79e7427c401bf0531e80 | [
"MIT"
] | 1 | 2018-05-21T03:30:44.000Z | 2018-05-21T03:30:44.000Z | setup.py | tranquochuy/data-science-utilities | 578b05cce40ae410868c79e7427c401bf0531e80 | [
"MIT"
] | null | null | null | setup.py | tranquochuy/data-science-utilities | 578b05cce40ae410868c79e7427c401bf0531e80 | [
"MIT"
] | 1 | 2018-09-21T08:51:18.000Z | 2018-09-21T08:51:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = ['Click>=6.0']
setup_requirements = [... | 29.054545 | 69 | 0.649562 |
14eaedc33d9e4fcf9d0cb5baedd0e5b70465969d | 358 | py | Python | main.py | znkd/kysc-service | dcb17d3ecf376dcbb2a54cbcf3e1e1b7fc907fd2 | [
"MIT"
] | 1 | 2019-08-24T14:07:29.000Z | 2019-08-24T14:07:29.000Z | main.py | znkd/kysc-service | dcb17d3ecf376dcbb2a54cbcf3e1e1b7fc907fd2 | [
"MIT"
] | null | null | null | main.py | znkd/kysc-service | dcb17d3ecf376dcbb2a54cbcf3e1e1b7fc907fd2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Flask
from flask_restful import Api
from api.user import User
from api.login import Tel
from api.good import List
app = Flask(__name__)
api = Api(app)
api.add_resource(Tel, '/login/tel')
api.add_resource(User, '/user')
api.add_resource(List, '/good/list')
if __name__ =... | 17.047619 | 36 | 0.706704 |
19eb4e30334abfefd3f77272e4936e215f2d6484 | 13,327 | py | Python | LeagueClient/api/utils_data.py | CharmingDays/League-Wrapper | 0f388f25e3be5cee62b36cd5ed9520b96e56a562 | [
"MIT"
] | 1 | 2022-02-01T12:18:08.000Z | 2022-02-01T12:18:08.000Z | LeagueClient/api/utils_data.py | CharmingDays/League-Wrapper | 0f388f25e3be5cee62b36cd5ed9520b96e56a562 | [
"MIT"
] | null | null | null | LeagueClient/api/utils_data.py | CharmingDays/League-Wrapper | 0f388f25e3be5cee62b36cd5ed9520b96e56a562 | [
"MIT"
] | null | null | null | queue_types={
"queue_ids":[100,310,313,317,325,400,420,430,440,450,600,610,700,820,830,840,850,900,910,920,940,950,960,980,990,100,101,102,72,73,75,76,78,83,98],
72: "1v1 Snowdown Showdown games",
73: "2v2 Snowdown Showdown games",
75: "6v6 Hexakill games",
76: "Ultra Rapid Fire games",
78: "One... | 18.796897 | 151 | 0.385308 |
3e1b90f91dedd4a960cd891d3cb93aed75c01164 | 3,734 | py | Python | pyqc/backends/simulator/fullAmplitude/full_amplitude_sim.py | shunzgim/PyQC | 8bcbb5b6c5990cac578b2645c558a1fdac29bc1f | [
"MIT"
] | null | null | null | pyqc/backends/simulator/fullAmplitude/full_amplitude_sim.py | shunzgim/PyQC | 8bcbb5b6c5990cac578b2645c558a1fdac29bc1f | [
"MIT"
] | null | null | null | pyqc/backends/simulator/fullAmplitude/full_amplitude_sim.py | shunzgim/PyQC | 8bcbb5b6c5990cac578b2645c558a1fdac29bc1f | [
"MIT"
] | null | null | null | from pyqc.gates import *
from pyqc.backends.simulator.libs import fullAlib
class FullAmplitudeSimulator:
"""
"""
def __init__(self):
self.fullASim = fullAlib.fullASim()
def exec_circ(self, circ):
self.fullASim.flush(circ.qubit_nums)
for tup in circ.qgate_list:
... | 51.150685 | 103 | 0.592394 |
de016b4c767ec8aba4458997a1432c68e557066d | 11,907 | py | Python | src/utils/python/arc/control/Services.py | fnevgeny/arc | e09294554745b33fccec0705b13c2e2488acd020 | [
"Apache-2.0"
] | null | null | null | src/utils/python/arc/control/Services.py | fnevgeny/arc | e09294554745b33fccec0705b13c2e2488acd020 | [
"Apache-2.0"
] | null | null | null | src/utils/python/arc/control/Services.py | fnevgeny/arc | e09294554745b33fccec0705b13c2e2488acd020 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from .ControlCommon import *
import sys
from .OSService import OSServiceManagement
from .OSPackage import OSPackageManagement
def complete_service_name(prefix, parsed_args, **kwargs):
arcconf = get_parsed_arcconf(parsed_args.config)
... | 43.298182 | 115 | 0.606282 |
563f0f2ae228157639dcc150f299ecebc65e4e5d | 885 | py | Python | src/sdk/python/test/test_schema_error_model.py | mstest123/self-managed-osdu_from_Daniel | 10a0c1d25804caa920bf18c6c7c1d8e711c63756 | [
"MIT"
] | 3 | 2021-11-05T20:52:54.000Z | 2021-11-23T23:02:29.000Z | src/sdk/python/test/test_schema_error_model.py | mstest123/self-managed-osdu_from_Daniel | 10a0c1d25804caa920bf18c6c7c1d8e711c63756 | [
"MIT"
] | 4 | 2021-11-05T19:57:08.000Z | 2021-12-14T13:59:04.000Z | src/sdk/python/test/test_schema_error_model.py | mstest123/self-managed-osdu_from_Daniel | 10a0c1d25804caa920bf18c6c7c1d8e711c63756 | [
"MIT"
] | 36 | 2021-08-31T20:58:25.000Z | 2022-03-30T17:02:57.000Z | # coding: utf-8
"""
self-managed-osdu
Rest API Documentation for Self Managed OSDU # noqa: E501
OpenAPI spec version: 0.11.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import OsduClient
from OsduClient.models.s... | 21.585366 | 87 | 0.703955 |
6efc453b256cf0f9828d72022e9cfc280ee76474 | 555 | py | Python | tests/base/views_test.py | Dafov/portfolio | fb3cb3721b944624c092d6046b0d9b005b7d9019 | [
"MIT"
] | null | null | null | tests/base/views_test.py | Dafov/portfolio | fb3cb3721b944624c092d6046b0d9b005b7d9019 | [
"MIT"
] | null | null | null | tests/base/views_test.py | Dafov/portfolio | fb3cb3721b944624c092d6046b0d9b005b7d9019 | [
"MIT"
] | null | null | null | import django
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'portfolio.settings')
django.setup()
from django.test import TestCase, Client
from django.urls.base import reverse
class TestView(TestCase):
def test_home_view_template(self):
client = Client()
response = client.get(re... | 25.227273 | 69 | 0.708108 |
54ea112649ba175257d148e038ce21ecd0ecbdff | 6,537 | py | Python | algorithm/binary_search_examples.py | ganeshskudva/Algorithm_Templates | 8d180acb1fe885b2585c611f7edec14f26e45479 | [
"MIT"
] | 190 | 2019-05-08T06:50:30.000Z | 2022-03-31T15:09:26.000Z | algorithm/binary_search_examples.py | sm2774us/Python_Algorithm_Templates | d493139e0ed03695ff6a111ddcffef44b2cfc353 | [
"MIT"
] | null | null | null | algorithm/binary_search_examples.py | sm2774us/Python_Algorithm_Templates | d493139e0ed03695ff6a111ddcffef44b2cfc353 | [
"MIT"
] | 61 | 2019-06-25T11:07:42.000Z | 2022-03-25T07:39:31.000Z | import bisect
# [367] https://leetcode.com/problems/valid-perfect-square/
# Given a positive integer num, write a function which returns True if num is a perfect square else False.
#
# standard scenario
def is_perfect_square(num: 'int') -> 'bool':
low, high = 1, num // 2
while low <= high:
mid = low +... | 34.225131 | 123 | 0.579165 |
124a8ec4f2b1d70a9bd559a43e1203e86c99b706 | 18,948 | py | Python | dldp/patch_extract/Patch_Extractor.py | 3dimaging/DeepLearningCamelyon_II | 1d48032fd6e229190a3f95264f7871cb348cc294 | [
"CC0-1.0"
] | 1 | 2022-01-06T18:35:52.000Z | 2022-01-06T18:35:52.000Z | dldp/patch_extract/Patch_Extractor.py | DIDSR/dldp | 2749f86f98280220617b4ffcd2597f8a087c9332 | [
"CC0-1.0"
] | null | null | null | dldp/patch_extract/Patch_Extractor.py | DIDSR/dldp | 2749f86f98280220617b4ffcd2597f8a087c9332 | [
"CC0-1.0"
] | 2 | 2021-01-16T02:29:40.000Z | 2022-01-07T14:15:39.000Z | #!/home/wli/env python3
# -*- coding: utf-8 -*-
"""
Title: patch extractor
======================
Created: 10-31-2019
Python-Version: 3.5, 3.6
Description:
------------
This libray module provides functions for patch extraction.
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from PIL i... | 36.368522 | 159 | 0.642337 |
8ed9d2d00987414cb0cd50cef4667f9616de2dd4 | 156 | py | Python | CONFIG/SavedPostAPP/apps.py | Brktrlw/Instagram-Clone-Django-and-React | 6390db2133d3beae2097a680097e170bd4fbcabe | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | CONFIG/SavedPostAPP/apps.py | Brktrlw/Instagram-Clone-Django-and-React | 6390db2133d3beae2097a680097e170bd4fbcabe | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | CONFIG/SavedPostAPP/apps.py | Brktrlw/Instagram-Clone-Django-and-React | 6390db2133d3beae2097a680097e170bd4fbcabe | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | from django.apps import AppConfig
class SavedpostappConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'SavedPostAPP'
| 22.285714 | 56 | 0.775641 |
6c9f863391c22d584a34243766731ca5e8d95055 | 720 | py | Python | src/Python/car_detection.py | codemaniac011/graph_algos | 845f8387d0f26873138df7e27c4d0752926de4a4 | [
"MIT"
] | 1 | 2022-01-19T03:26:53.000Z | 2022-01-19T03:26:53.000Z | src/Python/car_detection.py | mahimonga/graph_algos | 845f8387d0f26873138df7e27c4d0752926de4a4 | [
"MIT"
] | null | null | null | src/Python/car_detection.py | mahimonga/graph_algos | 845f8387d0f26873138df7e27c4d0752926de4a4 | [
"MIT"
] | 2 | 2021-10-21T23:26:23.000Z | 2021-10-30T18:48:14.000Z | import cv2
# image
img_file = 'Car Image.jpg'
#video = cv2.VideoCapture('Cars_video.mp4')
#video = cv2.VideoCapture('Traffic.mp4')
video = cv2.VideoCapture('Real_time_Video.mp4')
# pre-trained car classifier
classifier_file = 'cars.xml'
car_tracker = cv2.CascadeClassifier(classifier_file)
while True:
(read_s... | 22.5 | 67 | 0.669444 |
53e3ea89d095de29f73c6a1baf69a1dcdf8473c0 | 13 | py | Python | projects/isort/test.py | quinn-dougherty/python-on-nix | 910d3f6554acd4a4ef0425ebccd31104dccb283c | [
"Unlicense"
] | 25 | 2021-10-30T19:54:59.000Z | 2022-03-29T06:11:02.000Z | projects/isort/test.py | quinn-dougherty/python-on-nix | 910d3f6554acd4a4ef0425ebccd31104dccb283c | [
"Unlicense"
] | 21 | 2021-10-19T01:09:38.000Z | 2022-03-24T16:08:53.000Z | projects/isort/test.py | quinn-dougherty/python-on-nix | 910d3f6554acd4a4ef0425ebccd31104dccb283c | [
"Unlicense"
] | 3 | 2022-01-25T20:25:13.000Z | 2022-03-08T02:58:50.000Z | import isort
| 6.5 | 12 | 0.846154 |
db74a4b64e0b57490914e743219260669f950338 | 1,072 | py | Python | ArmRuntime/generateReplacements.py | daeken/GrinningSoul | d35ac197dade35d8a831ffb10fffd2ec93a791ea | [
"Apache-2.0"
] | 94 | 2020-11-22T00:35:08.000Z | 2022-02-22T15:45:41.000Z | ArmRuntime/generateReplacements.py | CrackerCat/GrinningSoul | d35ac197dade35d8a831ffb10fffd2ec93a791ea | [
"Apache-2.0"
] | 1 | 2021-05-14T14:18:23.000Z | 2021-05-15T16:03:24.000Z | ArmRuntime/generateReplacements.py | CrackerCat/GrinningSoul | d35ac197dade35d8a831ffb10fffd2ec93a791ea | [
"Apache-2.0"
] | 8 | 2020-11-22T10:23:26.000Z | 2022-02-22T08:34:46.000Z | import glob
with file('../Runtime/replacements.generated.h', 'w') as fp:
nfuncs = []
sels = []
for fn in glob.glob('*.cpp') + glob.glob('*.m') + glob.glob('*.mm') + glob.glob('*.h'):
source = file(fn, 'r').read().split('\n')
for line in source:
line = line.strip()
if... | 38.285714 | 91 | 0.476679 |
9026f941d105d33639451db1553a5526747557d0 | 1,214 | py | Python | example/first_example/model/userModel.py | suuperhu/Pyside2MVCFramework | c28bd0fbb6b53bb2cdad8d0723b4251fc93319d6 | [
"MIT"
] | 1 | 2021-03-11T13:34:41.000Z | 2021-03-11T13:34:41.000Z | example/first_example/model/userModel.py | suuperhu/Pyside2MVCFramework | c28bd0fbb6b53bb2cdad8d0723b4251fc93319d6 | [
"MIT"
] | null | null | null | example/first_example/model/userModel.py | suuperhu/Pyside2MVCFramework | c28bd0fbb6b53bb2cdad8d0723b4251fc93319d6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
# @SoftwareIDE : PyCharm2020Pro
# @ProjectName : PySide2MVCFramework
# @FileName : userModel.py
# @Author : 胡守杰
# @Email : 2839414139@qq.com
# @ZhFileDescription :
# @EnFileDescription :
"""
from PySide2.QtCore import Signal, Q... | 21.678571 | 64 | 0.605437 |
81db2ed40c7b8229615eaf0791c50362dc103ee2 | 27 | py | Python | test/plugins/blog/__init__.py | Kokemomo/Kokemomo | 614504dc49b2f509b25c9ec2229f4438db73bab7 | [
"MIT"
] | 4 | 2016-06-12T13:19:23.000Z | 2020-01-29T09:46:15.000Z | test/plugins/blog/__init__.py | Kokemomo/Kokemomo | 614504dc49b2f509b25c9ec2229f4438db73bab7 | [
"MIT"
] | 67 | 2015-09-10T04:28:33.000Z | 2019-09-19T09:08:11.000Z | test/plugins/blog/__init__.py | Kokemomo/Kokemomo | 614504dc49b2f509b25c9ec2229f4438db73bab7 | [
"MIT"
] | 2 | 2016-06-13T11:20:42.000Z | 2016-07-22T07:44:31.000Z |
__author__ = 'hiroki-m'
| 5.4 | 23 | 0.62963 |
03e9819f0ef73ce7909ccd2eeeb92d76c8f0127e | 2,863 | py | Python | build_scripts/CompileCurl-Linux.py | tahussle/bebbang | 93be7665680d454f2f5a8c1124b1f1fa83f95960 | [
"MIT"
] | null | null | null | build_scripts/CompileCurl-Linux.py | tahussle/bebbang | 93be7665680d454f2f5a8c1124b1f1fa83f95960 | [
"MIT"
] | 1 | 2019-04-19T03:20:52.000Z | 2019-04-19T03:20:52.000Z | build_scripts/CompileCurl-Linux.py | tahussle/bebbang | 93be7665680d454f2f5a8c1124b1f1fa83f95960 | [
"MIT"
] | null | null | null | import os
from subprocess import call
import sys
import re
import multiprocessing as mp
import string
import urllib
import shutil
version = "7.61.1"
def get_curl_filename(ver):
return "curl-" + ver + ".tar.gz"
def get_curl_link(ver):
link = "https://curl.haxx.se/download/" + get_curl_filename(ver)
# prin... | 27.796117 | 228 | 0.667132 |
1b91a0c736fd73899baeae1280d226967c509c78 | 3,876 | py | Python | YOLOv5/models/export.py | Danthe-GH/Danzas | 4bad7589c8fd548dfed5ebf66c680372a8f1e6d3 | [
"MIT"
] | 5 | 2020-10-18T05:08:07.000Z | 2022-02-09T07:41:47.000Z | YOLOv5/models/export.py | Danthe-GH/Danzas | 4bad7589c8fd548dfed5ebf66c680372a8f1e6d3 | [
"MIT"
] | null | null | null | YOLOv5/models/export.py | Danthe-GH/Danzas | 4bad7589c8fd548dfed5ebf66c680372a8f1e6d3 | [
"MIT"
] | 7 | 2020-10-16T02:04:22.000Z | 2021-01-29T17:58:33.000Z | """Exports a YOLOv5 *.pt model to ONNX and TorchScript formats
Usage:
$ export PYTHONPATH="$PWD" && python models/export.py --weights ./weights/yolov5s.pt --img 640 --batch 1
"""
import argparse
import sys
import time
import os
#sys.path.append('./../../yolo-v5') # to run '$ python *.py' files in subdirectories... | 39.55102 | 134 | 0.643447 |
268a23586fe5b550891356e25674cafc6c27b848 | 10,394 | py | Python | models/vit.py | Jokererer/VIT-ResNet-CIFAR10 | a6cc2f1c6bc720e1d899020da6573f56686db109 | [
"MIT"
] | null | null | null | models/vit.py | Jokererer/VIT-ResNet-CIFAR10 | a6cc2f1c6bc720e1d899020da6573f56686db109 | [
"MIT"
] | null | null | null | models/vit.py | Jokererer/VIT-ResNet-CIFAR10 | a6cc2f1c6bc720e1d899020da6573f56686db109 | [
"MIT"
] | null | null | null | # https://github.com/lucidrains/vit-pytorch/blob/main/vit_pytorch/vit_pytorch.py
import torch
import torch.nn.functional as F
from einops import rearrange
from torch import nn
MIN_NUM_PATCHES = 16
class Residual(nn.Module):
def __init__(self, fn):
super().__init__()
self.fn = fn
def forward(s... | 36.858156 | 166 | 0.567154 |
ed44d7b99f7b78d9f9d66cb7712a4f1a71e17444 | 17,169 | py | Python | rllib/policy/rnn_sequencing.py | jacobowitz/ray | a69f2c7bf759b35fa6573329ec244a60f4d56a2a | [
"Apache-2.0"
] | 1 | 2021-11-30T15:06:24.000Z | 2021-11-30T15:06:24.000Z | rllib/policy/rnn_sequencing.py | jacobowitz/ray | a69f2c7bf759b35fa6573329ec244a60f4d56a2a | [
"Apache-2.0"
] | 84 | 2021-03-06T08:02:56.000Z | 2022-03-05T08:07:19.000Z | rllib/policy/rnn_sequencing.py | jacobowitz/ray | a69f2c7bf759b35fa6573329ec244a60f4d56a2a | [
"Apache-2.0"
] | null | null | null | """RNN utils for RLlib.
The main trick here is that we add the time dimension at the last moment.
The non-LSTM layers of the model see their inputs as one flat batch. Before
the LSTM cell, we reshape the input to add the expected time dimension. During
postprocessing, we dynamically pad the experience batches so that ... | 40.114486 | 79 | 0.595434 |
9e552333f3083e771d4e854a55c29e88d0694747 | 3,781 | py | Python | docs/conf.py | empymod/emg3d-gallery | 7de6ba58546a819e80c957c312bb1cdfeba0bd9e | [
"Apache-2.0"
] | 3 | 2020-01-12T00:34:33.000Z | 2020-09-03T08:56:47.000Z | docs/conf.py | empymod/emg3d-gallery | 7de6ba58546a819e80c957c312bb1cdfeba0bd9e | [
"Apache-2.0"
] | 14 | 2020-02-11T14:25:43.000Z | 2020-12-06T16:54:23.000Z | docs/conf.py | emsig/emg3d-gallery | cb83d0f57c3157ef89c912ab4ae8baa0d5b08d0e | [
"Apache-2.0"
] | null | null | null | import time
import warnings
from emg3d import __version__
from sphinx_gallery.sorting import ExampleTitleSortKey
# ==== 1. Extensions ====
# Load extensions
extensions = [
'numpydoc',
'sphinx_panels',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx_gallery.gen_gallery',
]
panels_add_boots... | 28.643939 | 79 | 0.67178 |
db2e5cf6fc9d62bb9f37ff0b50d896ba15aac97e | 2,932 | py | Python | metaspace/engine/migrations/r1_5_20190812_ion_formulas.py | richardgoater/metaspace | 5db6b2fd0170b8d90aabe04b887a2a7c6adefdc4 | [
"Apache-2.0"
] | null | null | null | metaspace/engine/migrations/r1_5_20190812_ion_formulas.py | richardgoater/metaspace | 5db6b2fd0170b8d90aabe04b887a2a7c6adefdc4 | [
"Apache-2.0"
] | null | null | null | metaspace/engine/migrations/r1_5_20190812_ion_formulas.py | richardgoater/metaspace | 5db6b2fd0170b8d90aabe04b887a2a7c6adefdc4 | [
"Apache-2.0"
] | null | null | null | import argparse
import logging
from sm.engine.formula_parser import safe_generate_ion_formula
from sm.engine.ion_mapping import get_ion_id_mapping
from sm.engine.util import init_loggers, SMConfig
from sm.engine.db import DB, ConnectionPool
BATCH_SIZE = 10000
logger = logging.getLogger('engine')
def populate_ion_fo... | 34.494118 | 100 | 0.641201 |
7f633b2d11e6bd248c3cbc7e6a367e9fe231c37d | 9,182 | py | Python | hawk/client.py | pyGrowler/PyHawk | 3199b77c04b22ec89e2e6377a48940e64a438a4a | [
"BSD-3-Clause"
] | 5 | 2015-01-15T17:21:29.000Z | 2022-03-26T20:31:59.000Z | hawk/client.py | pyGrowler/PyHawk | 3199b77c04b22ec89e2e6377a48940e64a438a4a | [
"BSD-3-Clause"
] | 15 | 2015-10-15T14:10:11.000Z | 2021-07-10T05:34:51.000Z | hawk/client.py | pyGrowler/PyHawk | 3199b77c04b22ec89e2e6377a48940e64a438a4a | [
"BSD-3-Clause"
] | 5 | 2015-05-14T07:20:45.000Z | 2020-07-18T23:31:51.000Z | # -*- coding: utf-8 -*-
"""
Server APIs for HAWK Authentication.
"""
import logging
import math
import pprint
import time
import hawk.hcrypto as hcrypto
import hawk.util as util
from hawk.server import BadRequest
log = logging.getLogger(__name__)
def header(url, method, options=None):
"""
:param uri: 'htt... | 29.619355 | 77 | 0.596275 |
2264e6b9662a0e7f52e9ba9f853bb7161aa06324 | 10,705 | py | Python | peregrinearb/tests/test_bellmannx.py | Stakedllc/peregrine-1 | e84971bae80aa2c03242a54f8451af0c1a3c4aa5 | [
"MIT"
] | 15 | 2018-06-23T22:15:49.000Z | 2022-01-24T16:04:55.000Z | peregrinearb/tests/test_bellmannx.py | Stakedllc/peregrine-1 | e84971bae80aa2c03242a54f8451af0c1a3c4aa5 | [
"MIT"
] | null | null | null | peregrinearb/tests/test_bellmannx.py | Stakedllc/peregrine-1 | e84971bae80aa2c03242a54f8451af0c1a3c4aa5 | [
"MIT"
] | 2 | 2018-11-12T15:34:54.000Z | 2020-06-05T09:28:13.000Z | from unittest import TestCase
from peregrinearb import bellman_ford_multi, multi_digraph_from_json, multi_digraph_from_dict, \
calculate_profit_ratio_for_path, bellman_ford, NegativeWeightFinder, NegativeWeightDepthFinder, \
print_profit_opportunity_for_path
import json
import networkx as nx
import math
import ... | 39.356618 | 120 | 0.572723 |
9264dc833bdf706cf1cbd788484a431d4a3a4eae | 1,351 | py | Python | tests/test_tools_get_platform.py | lucatrv/hooks4git | a1cac75d4119d82ce26dfde72ca3404c1064c3de | [
"MIT"
] | 32 | 2018-07-09T19:45:56.000Z | 2022-02-11T19:38:46.000Z | tests/test_tools_get_platform.py | lucatrv/hooks4git | a1cac75d4119d82ce26dfde72ca3404c1064c3de | [
"MIT"
] | 63 | 2018-07-06T19:09:24.000Z | 2020-12-14T19:54:00.000Z | tests/test_tools_get_platform.py | lucatrv/hooks4git | a1cac75d4119d82ce26dfde72ca3404c1064c3de | [
"MIT"
] | 3 | 2020-03-14T21:28:40.000Z | 2021-11-18T22:00:53.000Z | # -*- coding: utf-8 -*-
from tests import BaseTestCase
from hooks4git.tools import get_platform
import mock
class GetPlatformTestCase(BaseTestCase):
@mock.patch("sys.platform", "FakeOS")
def test_get_platform_invalid(self):
platform = get_platform()
self.assertTrue(platform == "FakeOS")
@... | 31.418605 | 58 | 0.659511 |
cf4da0d07a3889b9876a3f30b1dacf638143c5d5 | 2,539 | py | Python | tests/models.py | pawnhearts/django-ordered-model | ed4cb3d65d918459fbf227dfae06ccc7ee1e4d1c | [
"BSD-3-Clause"
] | 2 | 2018-11-24T11:16:01.000Z | 2019-02-25T18:27:00.000Z | tests/models.py | pawnhearts/django-ordered-model | ed4cb3d65d918459fbf227dfae06ccc7ee1e4d1c | [
"BSD-3-Clause"
] | null | null | null | tests/models.py | pawnhearts/django-ordered-model | ed4cb3d65d918459fbf227dfae06ccc7ee1e4d1c | [
"BSD-3-Clause"
] | 1 | 2022-03-10T15:11:00.000Z | 2022-03-10T15:11:00.000Z | from django.db import models
from ordered_model.models import OrderedModel, OrderedModelBase
class Item(OrderedModel):
name = models.CharField(max_length=100)
class Question(models.Model):
pass
class TestUser(models.Model):
pass
class Answer(OrderedModel):
question = models.ForeignKey(
... | 26.726316 | 88 | 0.724301 |
b7afc9ff165c9a974c1c5e14d36f4cba5e63eea1 | 110 | py | Python | lib/IPCE/Lib/fepy/fileobject.py | AustralianDisabilityLimited/MultiversePlatform | 7e1aad33d48b9e47f3db2ca638cb57592336ddb7 | [
"MIT"
] | 33 | 2015-02-16T02:52:08.000Z | 2022-02-18T08:46:32.000Z | lib/IPCE/Lib/fepy/fileobject.py | bensku/MultiversePlatform | 7e1aad33d48b9e47f3db2ca638cb57592336ddb7 | [
"MIT"
] | 1 | 2017-09-09T18:50:23.000Z | 2020-12-29T18:13:56.000Z | lib/IPCE/Lib/fepy/fileobject.py | bensku/MultiversePlatform | 7e1aad33d48b9e47f3db2ca638cb57592336ddb7 | [
"MIT"
] | 31 | 2015-02-07T16:20:24.000Z | 2022-02-23T15:02:43.000Z | def install():
import socket
from _fileobject import _fileobject
socket._fileobject = _fileobject
| 22 | 39 | 0.745455 |
05540894bca42dcfc861ed6c058d90ecfd588441 | 7,244 | py | Python | kaggle/mobike/track_predict.py | uptonking/code-playing | 30a7c80f5a160a24b49574635e31682e0922bb7d | [
"MIT"
] | 2 | 2017-11-15T07:21:48.000Z | 2017-11-24T00:17:55.000Z | kaggle/mobike/track_predict.py | uptonking/code-playing | 30a7c80f5a160a24b49574635e31682e0922bb7d | [
"MIT"
] | null | null | null | kaggle/mobike/track_predict.py | uptonking/code-playing | 30a7c80f5a160a24b49574635e31682e0922bb7d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 6 13:41:45 2017
@author: ZHILANGTAOSHA
"""
import pandas as pd
import geohash
from math import radians, cos, sin, asin, sqrt
# import itertools
import numpy as np
import math
import xgboost as xgb
def distance_haver(lon1, lat1, lon2, lat2):
dx = np.absolute(lon1 -... | 33.229358 | 118 | 0.637079 |
2a089a363f0c91f4fe876a4511a5d974255d51b5 | 592 | py | Python | backend/api/apps/work/views.py | Jeffallan/timekeeper | ecad4dba84781a9f5b592cd639ad43dc35708e11 | [
"Apache-2.0"
] | 1 | 2022-02-13T21:13:10.000Z | 2022-02-13T21:13:10.000Z | backend/api/apps/work/views.py | Jeffallan/timekeeper | ecad4dba84781a9f5b592cd639ad43dc35708e11 | [
"Apache-2.0"
] | 8 | 2021-11-14T20:00:25.000Z | 2021-12-04T18:52:18.000Z | backend/api/apps/work/views.py | Jeffallan/timekeeper | ecad4dba84781a9f5b592cd639ad43dc35708e11 | [
"Apache-2.0"
] | null | null | null | from rest_framework import viewsets
from .models import WorkPerformed
from .serializers import WorkPerformedSerializer
from api.apps.users.models import User
from dry_rest_permissions.generics import DRYPermissions
class WorkPerformedViewSet(viewsets.ModelViewSet):
queryset = WorkPerformed.objects.all()
seria... | 34.823529 | 74 | 0.782095 |
69e02209d200ba02b88f9b757dd5f6d2b398b386 | 1,363 | py | Python | ssguan/ignitor/web/app.py | samuelbaizg/ssguan | 97def0609d61e40472554464470758b5fb9eca35 | [
"Apache-2.0"
] | 1 | 2015-07-14T14:24:05.000Z | 2015-07-14T14:24:05.000Z | ssguan/ignitor/web/app.py | samuelbaizg/ssguan | 97def0609d61e40472554464470758b5fb9eca35 | [
"Apache-2.0"
] | null | null | null | ssguan/ignitor/web/app.py | samuelbaizg/ssguan | 97def0609d61e40472554464470758b5fb9eca35 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2015 www.suishouguan.com
#
# Licensed under the Private License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/samuelbaizg/ssguan/blob/master/LICENSE
#
# Unless ... | 34.075 | 76 | 0.69259 |
d45f756107edb45343f831a4d1d6782c25a2454c | 526 | py | Python | examples/spam/example_spam.py | Sowul/fc | bc4f42a555a3db78fb733761bf9443108e88f32a | [
"MIT"
] | 1 | 2017-10-12T11:38:47.000Z | 2017-10-12T11:38:47.000Z | examples/spam/example_spam.py | Sowul/fc | bc4f42a555a3db78fb733761bf9443108e88f32a | [
"MIT"
] | null | null | null | examples/spam/example_spam.py | Sowul/fc | bc4f42a555a3db78fb733761bf9443108e88f32a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# data source: https://archive.ics.uci.edu/ml/datasets/Spambase
from __future__ import print_function
import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from fc import FeatureConstructor
clf = RandomForestClassifier(max_depth=3)
... | 21.916667 | 63 | 0.728137 |
ae77d0a29c9bee2ca258a92a948ef4a04790263f | 2,365 | py | Python | tests/ongoing.py | jakkso/pytermgui | 039a25a29679a78a721b4ecc3925aadfda6771af | [
"MIT"
] | 771 | 2021-04-16T02:52:13.000Z | 2022-03-31T20:34:29.000Z | tests/ongoing.py | jakkso/pytermgui | 039a25a29679a78a721b4ecc3925aadfda6771af | [
"MIT"
] | 29 | 2021-09-29T01:14:25.000Z | 2022-03-12T18:11:13.000Z | tests/ongoing.py | jakkso/pytermgui | 039a25a29679a78a721b4ecc3925aadfda6771af | [
"MIT"
] | 22 | 2021-08-14T05:05:40.000Z | 2022-03-30T08:18:33.000Z | from __future__ import annotations
import sys
from typing import Any
from random import randint
from pytermgui import (
InputField,
get_widget,
MarkupFormatter,
MouseTarget,
Container,
keys,
markup,
Widget,
real_length,
Slider,
Label,
)
from pytermgui.ansi_interface import... | 24.894737 | 76 | 0.542072 |
47cbf3b58e4a19d914a680a7f595edb17fbb9e87 | 319 | py | Python | moto/redshift/__init__.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 3 | 2020-08-04T20:29:41.000Z | 2020-11-09T09:28:19.000Z | moto/redshift/__init__.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 17 | 2020-08-28T12:53:56.000Z | 2020-11-10T01:04:46.000Z | moto/redshift/__init__.py | jonnangle/moto-1 | 40b4e299abb732aad7f56cc0f680c0a272a46594 | [
"Apache-2.0"
] | 2 | 2017-03-02T05:59:52.000Z | 2020-09-03T13:25:44.000Z | from __future__ import unicode_literals
from .models import redshift_backends
from ..core.models import base_decorator, deprecated_base_decorator
redshift_backend = redshift_backends["us-east-1"]
mock_redshift = base_decorator(redshift_backends)
mock_redshift_deprecated = deprecated_base_decorator(redshift_backends)
| 39.875 | 71 | 0.871473 |
2e0684d94f4e373bc5a4e35b2b28ea85877b402c | 1,035 | py | Python | tests/dm_control/test_dm_control_tf_policy.py | shadiakiki1986/garage | 095bb5d25b32df1d44b47e99a78a9b01796941d9 | [
"MIT"
] | 3 | 2019-08-11T22:26:55.000Z | 2020-11-28T10:23:50.000Z | tests/dm_control/test_dm_control_tf_policy.py | shadiakiki1986/garage | 095bb5d25b32df1d44b47e99a78a9b01796941d9 | [
"MIT"
] | null | null | null | tests/dm_control/test_dm_control_tf_policy.py | shadiakiki1986/garage | 095bb5d25b32df1d44b47e99a78a9b01796941d9 | [
"MIT"
] | 2 | 2019-08-11T22:30:14.000Z | 2021-03-25T02:57:50.000Z | from dm_control.suite import ALL_TASKS
from garage.baselines import LinearFeatureBaseline
from garage.envs.dm_control import DmControlEnv
from garage.tf.algos import TRPO
from garage.tf.envs import TfEnv
from garage.tf.policies import GaussianMLPPolicy
from tests.fixtures import TfGraphTestCase
class TestDmControlTf... | 28.75 | 77 | 0.601932 |
4fdf147a593d066f7147ef70a0baaf6c57e57c95 | 5,453 | py | Python | pymongo/daemon.py | blink1073/mongo-python-driver | 98d393336411b7cd5ad4e184ca45192f76fb48e8 | [
"Apache-2.0"
] | null | null | null | pymongo/daemon.py | blink1073/mongo-python-driver | 98d393336411b7cd5ad4e184ca45192f76fb48e8 | [
"Apache-2.0"
] | null | null | null | pymongo/daemon.py | blink1073/mongo-python-driver | 98d393336411b7cd5ad4e184ca45192f76fb48e8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-present MongoDB, 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.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 38.401408 | 94 | 0.644233 |
6fab9c1690a45746322163eb969d1a2d5e40215a | 14,044 | py | Python | edk2toollib/uefi/edk2/parsers/base_parser.py | joschock/edk2-pytool-library | 7281a7c5cff7b0ed273b89717cd1304c3db73e50 | [
"BSD-2-Clause-Patent"
] | null | null | null | edk2toollib/uefi/edk2/parsers/base_parser.py | joschock/edk2-pytool-library | 7281a7c5cff7b0ed273b89717cd1304c3db73e50 | [
"BSD-2-Clause-Patent"
] | null | null | null | edk2toollib/uefi/edk2/parsers/base_parser.py | joschock/edk2-pytool-library | 7281a7c5cff7b0ed273b89717cd1304c3db73e50 | [
"BSD-2-Clause-Patent"
] | null | null | null | # @file BaseParser.py
# Code to support parsing EDK2 files
#
# Copyright (c) Microsoft Corporation
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import logging
class BaseParser(object):
""" """
def __init__(self, log=""):
self.Logger = logging.getLogger(log)
self.Lines = []
... | 27.645669 | 120 | 0.51538 |
ec1a8f877703d9ff60bbadc936d76cd8e06f2926 | 79,811 | py | Python | statsmodels/tsa/statespace/sarimax.py | rdhyee/statsmodels | e45c1b8be327807c58e7c21bc985bce609907a3f | [
"BSD-3-Clause"
] | 1 | 2019-04-20T09:42:23.000Z | 2019-04-20T09:42:23.000Z | statsmodels/tsa/statespace/sarimax.py | christianjauregui/statsmodels | e45c1b8be327807c58e7c21bc985bce609907a3f | [
"BSD-3-Clause"
] | null | null | null | statsmodels/tsa/statespace/sarimax.py | christianjauregui/statsmodels | e45c1b8be327807c58e7c21bc985bce609907a3f | [
"BSD-3-Clause"
] | 1 | 2019-04-20T09:42:12.000Z | 2019-04-20T09:42:12.000Z | """
SARIMAX Model
Author: Chad Fulton
License: Simplified-BSD
"""
from __future__ import division, absolute_import, print_function
from statsmodels.compat.python import long
from warnings import warn
import numpy as np
from .initialization import Initialization
from .mlemodel import MLEModel, MLEResults, MLEResultsW... | 40.761491 | 80 | 0.600368 |
10f712e601281931519f0041296953f302e4ca8b | 1,068 | py | Python | kubernetes/test/test_apps_v1beta1_deployment_strategy.py | woqer/python | 3a6fe8231cefe1fa39a0a69d4b2f33044ab32745 | [
"Apache-2.0"
] | 1 | 2019-07-12T05:38:06.000Z | 2019-07-12T05:38:06.000Z | kubernetes/test/test_apps_v1beta1_deployment_strategy.py | woqer/python | 3a6fe8231cefe1fa39a0a69d4b2f33044ab32745 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_apps_v1beta1_deployment_strategy.py | woqer/python | 3a6fe8231cefe1fa39a0a69d4b2f33044ab32745 | [
"Apache-2.0"
] | 1 | 2021-05-18T12:25:56.000Z | 2021-05-18T12:25:56.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 23.733333 | 106 | 0.737828 |
7245021b90a853ba763f54e0c76f0b63a6f899a2 | 359 | py | Python | src/sessions/ses-friends-s2.py | eddyfortier/task_stimuli | b3e0c477775d42b0efa4389531042a80a848fe86 | [
"MIT"
] | 4 | 2019-09-10T13:21:23.000Z | 2021-11-17T11:37:54.000Z | src/sessions/ses-friends-s2.py | eddyfortier/task_stimuli | b3e0c477775d42b0efa4389531042a80a848fe86 | [
"MIT"
] | 14 | 2019-11-14T16:41:42.000Z | 2022-03-25T14:55:40.000Z | src/sessions/ses-friends-s2.py | eddyfortier/task_stimuli | b3e0c477775d42b0efa4389531042a80a848fe86 | [
"MIT"
] | 9 | 2019-08-19T19:08:11.000Z | 2021-09-16T15:45:43.000Z | from ..tasks import video
TASKS = []
for episode in range(1, 25):
for segment in "ab":
TASKS.append(
video.SingleVideo(
"data/videos/friends/s2/friends_s2e%02d%s.mkv" % (episode, segment),
aspect_ratio=4 / 3.0,
name="task-friends-s2e%d%s" % (epis... | 25.642857 | 84 | 0.518106 |
ad7bc6799ee46ecd099879d4daafe4e3717d48b6 | 596 | py | Python | src/PyMIPS/__main__.py | shenganzhang/Py-MI-PS | 2d22327c75bac1b58a4804a61e7a703ecc5ba978 | [
"MIT"
] | 3 | 2019-05-14T21:24:59.000Z | 2021-08-04T01:43:22.000Z | src/PyMIPS/__main__.py | shenganzhang/Py-MI-PS | 2d22327c75bac1b58a4804a61e7a703ecc5ba978 | [
"MIT"
] | null | null | null | src/PyMIPS/__main__.py | shenganzhang/Py-MI-PS | 2d22327c75bac1b58a4804a61e7a703ecc5ba978 | [
"MIT"
] | 2 | 2021-08-04T01:43:25.000Z | 2021-11-23T06:54:17.000Z | #!/usr/local/bin/python
import sys
from PyMIPS.lexer import lex
from PyMIPS.AST.ast import parse
from PyMIPS.Datastructure.execution_stack import run_program
def main(args=None):
if len(sys.argv) == 1:
print("Usage: pymips <path to file>")
return
elif len(sys.argv) > 2:
print("Too man... | 22.074074 | 60 | 0.61745 |
e3f8cebfd3c8193ca0ae882ef9bc4307e2b9ce1f | 7,707 | py | Python | simulator/simuDropout.py | neevor/brie | 42873ade2ed4e11288c7626182d6ef732aa1bd09 | [
"Apache-2.0"
] | 38 | 2017-01-06T00:18:46.000Z | 2022-01-25T19:44:10.000Z | simulator/simuDropout.py | neevor/brie | 42873ade2ed4e11288c7626182d6ef732aa1bd09 | [
"Apache-2.0"
] | 28 | 2017-01-11T09:12:57.000Z | 2022-02-14T14:53:48.000Z | simulator/simuDropout.py | neevor/brie | 42873ade2ed4e11288c7626182d6ef732aa1bd09 | [
"Apache-2.0"
] | 12 | 2018-02-13T20:23:00.000Z | 2022-01-05T18:39:19.000Z | # This file to simulate single cell RNA-seq reads based on real bulk RNA-seq
# expression profile and input dropout rate and number of reads.
import os
import sys
import time
import subprocess
import numpy as np
from optparse import OptionParser, OptionGroup
# import pyximport; pyximport.install()
from utils import ... | 35.353211 | 82 | 0.626314 |
2db932d4583a97e4ad371ebfd07d0768b4f3a8d1 | 8,175 | py | Python | sal/decorators.py | lfaraone/sal | d0dff90cebcbc87f18c2c6957264f21566d52000 | [
"Apache-2.0"
] | 1 | 2019-11-01T20:54:47.000Z | 2019-11-01T20:54:47.000Z | sal/decorators.py | grahamgilbert/sal | d247ec1ea8855e65e5855b0dd63eae93b40f86ca | [
"Apache-2.0"
] | null | null | null | sal/decorators.py | grahamgilbert/sal | d247ec1ea8855e65e5855b0dd63eae93b40f86ca | [
"Apache-2.0"
] | null | null | null | """Decorators for class based views."""
import base64
import logging
from functools import wraps
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.http import HttpResponse
from django.http.response import Http40... | 30.965909 | 88 | 0.648196 |
5d5510adef4947a959954e8e8752aac9623ddb6f | 126 | py | Python | eds/openmtc-gevent/common/openmtc/src/openmtc/mapper/exc.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | eds/openmtc-gevent/common/openmtc/src/openmtc/mapper/exc.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | eds/openmtc-gevent/common/openmtc/src/openmtc/mapper/exc.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | """
Created on 02.06.2013
@author: kca
"""
from openmtc.exc import OpenMTCError
class MapperError(OpenMTCError):
pass
| 10.5 | 36 | 0.714286 |
a6ab814ec7a556b8306acea6227cc1635f7b6d89 | 1,641 | py | Python | Leetcode-cn/1002.查找共用字符.py | joey66666/Codeyard | 08fc599baf1d99e39f878386124af854006a3602 | [
"MIT"
] | null | null | null | Leetcode-cn/1002.查找共用字符.py | joey66666/Codeyard | 08fc599baf1d99e39f878386124af854006a3602 | [
"MIT"
] | 3 | 2020-08-11T10:18:23.000Z | 2021-05-18T15:25:42.000Z | Leetcode-cn/1002.查找共用字符.py | joey66666/Codeyard | 08fc599baf1d99e39f878386124af854006a3602 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode.cn id=1002 lang=python3
#
# [1002] 查找共用字符
#
# https://leetcode-cn.com/problems/find-common-characters/description/
#
# algorithms
# Easy (73.68%)
# Likes: 240
# Dislikes: 0
# Total Accepted: 56.8K
# Total Submissions: 77.2K
# Testcase Example: '["bella","label","roller"]'
#
# 给你一个字符串数组 words... | 21.88 | 122 | 0.540524 |
a60f631c5d15f6f6d5d22a5941df4cd24d54bfc3 | 2,263 | py | Python | colour/models/rgb/datasets/xtreme_rgb.py | aurelienpierre/colour | 3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47 | [
"BSD-3-Clause"
] | null | null | null | colour/models/rgb/datasets/xtreme_rgb.py | aurelienpierre/colour | 3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47 | [
"BSD-3-Clause"
] | null | null | null | colour/models/rgb/datasets/xtreme_rgb.py | aurelienpierre/colour | 3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47 | [
"BSD-3-Clause"
] | null | null | null | """
Xtreme RGB Colourspace
======================
Defines the *Xtreme RGB* colourspace:
- :attr:`colour.models.RGB_COLOURSPACE_XTREME_RGB`.
References
----------
- :cite:`HutchColore` : HutchColor. (n.d.). XtremeRGB (4 K).
http://www.hutchcolor.com/profiles/XtremeRGB.zip
"""
from __future__ import annotatio... | 26.313953 | 78 | 0.734865 |
34ff4422b94dd3f26749bef600870681ff75f8c5 | 5,384 | py | Python | pychron/entry/editors/irradiation_editor.py | WiscAr/pychron | 8d335d53ba7a5fc70760d9a7cb60540ad169ae84 | [
"Apache-2.0"
] | null | null | null | pychron/entry/editors/irradiation_editor.py | WiscAr/pychron | 8d335d53ba7a5fc70760d9a7cb60540ad169ae84 | [
"Apache-2.0"
] | 80 | 2018-07-17T20:10:20.000Z | 2021-08-17T15:38:24.000Z | pychron/entry/editors/irradiation_editor.py | UManPychron/pychron | b84c9fd70072f9cbda30abe2c471e64fe3dd75d8 | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2014 Jake Ross
#
# 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... | 36.378378 | 118 | 0.549034 |
f09e658d8141b9aef3b461719e8d452596ce338d | 21,058 | py | Python | conda_concourse_ci/concourse_config.py | mingwandroid/conda-concourse-ci | 06a581aff81a0b3df59471d49955f0b9708fd04a | [
"BSD-3-Clause"
] | null | null | null | conda_concourse_ci/concourse_config.py | mingwandroid/conda-concourse-ci | 06a581aff81a0b3df59471d49955f0b9708fd04a | [
"BSD-3-Clause"
] | null | null | null | conda_concourse_ci/concourse_config.py | mingwandroid/conda-concourse-ci | 06a581aff81a0b3df59471d49955f0b9708fd04a | [
"BSD-3-Clause"
] | null | null | null | """
Classes for representing Concourse pipeline configuration items
These map to the schema's in https://concourse-ci.org/docs.html
"""
import os
CONDA_SUBDIR_TO_CONCOURSE_PLATFORM = {
'win-64': 'windows',
'win-32': 'windows',
'osx-64': 'darwin',
'linux-64': 'linux',
'linux-32': 'linux',
'li... | 35.935154 | 173 | 0.507266 |
acdcc3437578126c1b60767c9a023679a58d1cf3 | 615 | py | Python | sales_register/adapters/repositories/postgres/settings.py | tamercuba/purchase-system | cfd3e4fecbd96c130f620d11491fa14979c0d996 | [
"MIT"
] | null | null | null | sales_register/adapters/repositories/postgres/settings.py | tamercuba/purchase-system | cfd3e4fecbd96c130f620d11491fa14979c0d996 | [
"MIT"
] | 6 | 2021-05-15T21:44:19.000Z | 2021-05-23T22:20:13.000Z | sales_register/adapters/repositories/postgres/settings.py | tamercuba/sales-register | cfd3e4fecbd96c130f620d11491fa14979c0d996 | [
"MIT"
] | null | null | null | from decouple import config
from sqlalchemy import create_engine, orm, pool
from sqlalchemy.engine import URL
_DB_HOST = config('POSTGRES_PORT_5432_TCP_ADDR', None) or config('DB_HOST')
_DB_PORT = config('DB_PORT')
_DB_USER = config('DB_USER')
_DB_PW = config('DB_PW')
_DB_NAME = config('DB_NAME')
DB_URI = URL(
dr... | 24.6 | 75 | 0.746341 |
1fc2cf84056520014399ffb7a4c4b9b731bade23 | 3,161 | py | Python | nearface/detectors/SsdWrapper.py | palmtrey/nearface | 9274f13b2924a3ad9f97446772eb63bc7c482bff | [
"MIT"
] | null | null | null | nearface/detectors/SsdWrapper.py | palmtrey/nearface | 9274f13b2924a3ad9f97446772eb63bc7c482bff | [
"MIT"
] | null | null | null | nearface/detectors/SsdWrapper.py | palmtrey/nearface | 9274f13b2924a3ad9f97446772eb63bc7c482bff | [
"MIT"
] | null | null | null | import gdown
from pathlib import Path
import os
import cv2
import pandas as pd
from nearface.detectors import OpenCvWrapper
from nearface.commons import functions
def build_model():
home = functions.get_deepface_home()
#model structure
if os.path.isfile(home+'/.deepface/weights/deploy.prototxt') != True:
prin... | 30.68932 | 175 | 0.746599 |
048dfa6888e739aeb6ee0a0fd720a724b3b8f1e3 | 8,971 | py | Python | assets/src/ba_data/python/bastd/activity/coopjoin.py | Awesome-Logic/ballistica | 233a4a4f7840c9c666a1809626b6993a4b145349 | [
"MIT"
] | 1 | 2020-04-04T01:32:29.000Z | 2020-04-04T01:32:29.000Z | assets/src/ba_data/python/bastd/activity/coopjoin.py | Awesome-Logic/ballistica | 233a4a4f7840c9c666a1809626b6993a4b145349 | [
"MIT"
] | null | null | null | assets/src/ba_data/python/bastd/activity/coopjoin.py | Awesome-Logic/ballistica | 233a4a4f7840c9c666a1809626b6993a4b145349 | [
"MIT"
] | null | null | null | # Copyright (c) 2011-2020 Eric Froemling
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish,... | 43.548544 | 79 | 0.50496 |
8970c9aa2c103d01792fbf180ce3b4ca55137936 | 1,912 | py | Python | code.py | karthik-charan/The-Stable-Marriage-Problem | f1af816a967ce740eabe971c6e4c8c944005b21a | [
"MIT"
] | null | null | null | code.py | karthik-charan/The-Stable-Marriage-Problem | f1af816a967ce740eabe971c6e4c8c944005b21a | [
"MIT"
] | null | null | null | code.py | karthik-charan/The-Stable-Marriage-Problem | f1af816a967ce740eabe971c6e4c8c944005b21a | [
"MIT"
] | null | null | null | #### Complete code for Stable Marriage Problem
## Declaring the required datastructures
guy_preferences = {
'andrew': ['caroline', 'abigail', 'betty'],
'bill': ['caroline', 'betty', 'abigail'],
'chester': ['betty', 'caroline', 'abigail'],
}
gal_preferences = {
'abigail': ['andrew', 'bill', 'chester'],
... | 29.415385 | 88 | 0.54341 |
dcdc6fa4fcaf2cc3ee6c3f72ab7cc22feb6e39bd | 38,637 | py | Python | detectron2/utils/visualizer.py | sayef/detectron2 | 2d0f20d5862e114f9efa0e09efa93a9f6d756377 | [
"Apache-2.0"
] | null | null | null | detectron2/utils/visualizer.py | sayef/detectron2 | 2d0f20d5862e114f9efa0e09efa93a9f6d756377 | [
"Apache-2.0"
] | null | null | null | detectron2/utils/visualizer.py | sayef/detectron2 | 2d0f20d5862e114f9efa0e09efa93a9f6d756377 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import colorsys
import numpy as np
from enum import Enum, unique
import cv2
import matplotlib as mpl
import matplotlib.colors as mplc
import matplotlib.figure as mplfigure
import pycocotools.mask as mask_util
import torch
from matplotlib.backends.ba... | 39.345214 | 100 | 0.579186 |
1e788a64c4cd2e41e2d001fb4877392bf61e30b1 | 17,097 | py | Python | venv/lib/python3.8/site-packages/matplotlib/texmanager.py | willBear/willBear-Fundamental_Analysis | bc67eb1e69dcf6765c0b77314d37f7f165a7318f | [
"MIT"
] | 15 | 2020-06-29T08:33:39.000Z | 2022-02-12T00:28:51.000Z | venv/lib/python3.8/site-packages/matplotlib/texmanager.py | willBear/willBear-Fundamental_Analysis | bc67eb1e69dcf6765c0b77314d37f7f165a7318f | [
"MIT"
] | 30 | 2020-04-15T19:37:40.000Z | 2020-04-22T21:19:35.000Z | venv/lib/python3.8/site-packages/matplotlib/texmanager.py | willBear/willBear-Fundamental_Analysis | bc67eb1e69dcf6765c0b77314d37f7f165a7318f | [
"MIT"
] | 11 | 2020-06-29T08:40:24.000Z | 2022-02-24T17:39:16.000Z | r"""
This module supports embedded TeX expressions in matplotlib via dvipng
and dvips for the raster and postscript backends. The tex and
dvipng/dvips information is cached in ~/.matplotlib/tex.cache for reuse between
sessions
Requirements:
* latex
* \*Agg backends: dvipng>=1.6
* PS backend: psfrag, dvips, and Ghost... | 37.575824 | 79 | 0.570451 |
e797de3f3cf89a187c6faff9031c9a319654c1c6 | 508 | py | Python | 300-/560.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | 300-/560.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | 300-/560.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | # Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k.
#
# Example 1:
# Input:nums = [1,1,1], k = 2
# Output: 2
# Note:
# The length of the array is in range [1, 20,000].
# The range of numbers in the array is [-1000, 1000] and the range of the in... | 29.882353 | 127 | 0.608268 |
847e209d58138ed2c5972141c7d82f50d4419f3f | 145 | py | Python | result/admin.py | ShwethaRGowda/FADB | c6f29701b884ea69fe9a357c6a6b8e5672669222 | [
"MIT"
] | 149 | 2019-09-29T08:56:12.000Z | 2022-03-27T00:52:07.000Z | result/admin.py | ShwethaRGowda/FADB | c6f29701b884ea69fe9a357c6a6b8e5672669222 | [
"MIT"
] | 8 | 2021-03-30T13:59:50.000Z | 2022-03-12T00:41:22.000Z | result/admin.py | Krittin-Khanueng/school_management_system | b34e40da452cf87d2acddd183f1e5af59ec7b3ce | [
"MIT"
] | 75 | 2020-01-24T13:00:10.000Z | 2022-02-17T06:19:29.000Z | from django.contrib import admin
from .models import SubjectRegistration
# Register your models here.
admin.site.register(SubjectRegistration)
| 20.714286 | 40 | 0.834483 |
248d966668e9a598ef33c277337d6abb2e592cda | 10,648 | py | Python | tensor2tensor/utils/cloud_mlengine.py | xueeinstein/tensor2tensor | b42e7bae72044916d465b7e298569b2823fe9bc0 | [
"Apache-2.0"
] | 1 | 2019-03-02T15:59:06.000Z | 2019-03-02T15:59:06.000Z | tensor2tensor/utils/cloud_mlengine.py | xueeinstein/tensor2tensor | b42e7bae72044916d465b7e298569b2823fe9bc0 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/utils/cloud_mlengine.py | xueeinstein/tensor2tensor | b42e7bae72044916d465b7e298569b2823fe9bc0 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Tensor2Tensor 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 applicable... | 34.019169 | 84 | 0.692524 |
c850ea0fc27659ec72837d1d1e8f7c6e787a495d | 273,324 | py | Python | Ch15/s15_04/ex15_04_rc.py | Deteriorator/PyQt5-Guide | d34a9659894d279b17369528359844a4ae4aeb20 | [
"CC0-1.0"
] | 1 | 2022-02-23T09:58:11.000Z | 2022-02-23T09:58:11.000Z | Ch15/s15_04/ex15_04_rc.py | Deteriorator/PyQt5-Guide | d34a9659894d279b17369528359844a4ae4aeb20 | [
"CC0-1.0"
] | null | null | null | Ch15/s15_04/ex15_04_rc.py | Deteriorator/PyQt5-Guide | d34a9659894d279b17369528359844a4ae4aeb20 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.9.7)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x66\x07\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\xc8\x0... | 65.216893 | 103 | 0.727185 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.