hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
56d069f936f05834c7ec7bb88b2ed427f7707994 | 1,966 | py | Python | action/demo5/d2.py | pearpai/TensorFlow-action | 264099d933988532ed59eaf0f2ad495d40ede4d2 | [
"Apache-2.0"
] | 3 | 2018-06-07T07:15:00.000Z | 2018-10-09T07:59:50.000Z | action/demo5/d2.py | pearpai/TensorFlow-action | 264099d933988532ed59eaf0f2ad495d40ede4d2 | [
"Apache-2.0"
] | null | null | null | action/demo5/d2.py | pearpai/TensorFlow-action | 264099d933988532ed59eaf0f2ad495d40ede4d2 | [
"Apache-2.0"
] | 4 | 2017-04-23T05:30:41.000Z | 2018-09-27T07:13:37.000Z | # -*- coding: utf-8 -*-
import os
import StringIO
from PIL import Image, ImageFont, ImageDraw
import pygame
import random
def demo1():
pygame.init()
text = ' 6231 6260 3100 3992 '
bgcolor = (int(random.uniform(0, 255)), int(random.uniform(0, 255)), int(random.uniform(0, 255)))
card_no_color = (i... | 29.343284 | 109 | 0.612411 |
abec88cffca7c67a8b98b846f296849862435bb6 | 3,663 | py | Python | todotrains/settings.py | princeofnubia/todo-trains | d1440ba88e2a89436681f0d66b290b1d45f719d6 | [
"BSD-2-Clause"
] | null | null | null | todotrains/settings.py | princeofnubia/todo-trains | d1440ba88e2a89436681f0d66b290b1d45f719d6 | [
"BSD-2-Clause"
] | null | null | null | todotrains/settings.py | princeofnubia/todo-trains | d1440ba88e2a89436681f0d66b290b1d45f719d6 | [
"BSD-2-Clause"
] | 4 | 2021-07-13T10:29:36.000Z | 2021-07-27T15:55:47.000Z | """
Django settings for todotrains project.
Generated by 'django-admin startproject' using Django 3.2.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from path... | 25.615385 | 91 | 0.69424 |
b17975811247aebc759bc4b16e5ad703df4bb1b9 | 27,933 | py | Python | tensorflow/contrib/gan/python/eval/python/classifier_metrics_impl.py | deltheil/tensorflow | 48178e04e3ef764cda5c9746637e978b080fabf2 | [
"Apache-2.0"
] | 13 | 2018-07-23T18:53:35.000Z | 2021-11-18T19:56:45.000Z | tensorflow/contrib/gan/python/eval/python/classifier_metrics_impl.py | QinganZhao/tensorflow | 6f0dd0425c51360fe2be5a938a8f3fb39e420fa3 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/gan/python/eval/python/classifier_metrics_impl.py | QinganZhao/tensorflow | 6f0dd0425c51360fe2be5a938a8f3fb39e420fa3 | [
"Apache-2.0"
] | 13 | 2018-09-07T13:28:38.000Z | 2020-07-17T15:06:24.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.159836 | 93 | 0.728135 |
57967cd1109928af716f0b20ac04e7dc7c0ca248 | 624 | py | Python | python/ray/experimental/workflow/tests/test_dynamic_workflow_ref.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 1 | 2022-01-10T07:41:17.000Z | 2022-01-10T07:41:17.000Z | python/ray/experimental/workflow/tests/test_dynamic_workflow_ref.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 61 | 2021-01-30T08:05:55.000Z | 2022-03-26T07:06:15.000Z | python/ray/experimental/workflow/tests/test_dynamic_workflow_ref.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 1 | 2021-11-20T14:19:48.000Z | 2021-11-20T14:19:48.000Z | from ray.tests.conftest import * # noqa
import pytest
from ray.experimental import workflow
from ray.experimental.workflow.common import WorkflowRef
@workflow.step
def incr(x):
return x + 1
def test_dynamic_workflow_ref(workflow_start_regular_shared):
# This test also shows different "style" of running wo... | 26 | 66 | 0.74359 |
16e2d05df23018e0d9ed127209240b6402915cf2 | 1,492 | py | Python | tests/test_psycopg2.py | skriems/cherrypy-recipes | 730188ce01511e81263b4c9645e2aa43533dbef8 | [
"MIT"
] | null | null | null | tests/test_psycopg2.py | skriems/cherrypy-recipes | 730188ce01511e81263b4c9645e2aa43533dbef8 | [
"MIT"
] | null | null | null | tests/test_psycopg2.py | skriems/cherrypy-recipes | 730188ce01511e81263b4c9645e2aa43533dbef8 | [
"MIT"
] | null | null | null | from psycopg2_app import create_app
import pytest
import webtest
@pytest.fixture(scope='module')
def app():
return webtest.TestApp(create_app())
class Testing(object):
def test_create(self, app):
resp = app.get('/create?name=test')
assert resp.status == '201 Created'
assert resp.hea... | 33.909091 | 65 | 0.613941 |
23a5d37e1c0a80c36dab215138c77e732d96887c | 2,108 | py | Python | 2014-09-22-como-trabalhar-com-ajax-no-django/django_ajax_example/settings.py | vitorfs/blog-code-snippets | bdb88ba16d918f4a68ad7bfe1619110a8ee6614f | [
"MIT"
] | 3 | 2019-01-22T21:39:45.000Z | 2021-09-11T14:22:15.000Z | 2014-09-22-como-trabalhar-com-ajax-no-django/django_ajax_example/settings.py | vitorfs/blog-code-snippets | bdb88ba16d918f4a68ad7bfe1619110a8ee6614f | [
"MIT"
] | null | null | null | 2014-09-22-como-trabalhar-com-ajax-no-django/django_ajax_example/settings.py | vitorfs/blog-code-snippets | bdb88ba16d918f4a68ad7bfe1619110a8ee6614f | [
"MIT"
] | 2 | 2015-09-20T20:22:06.000Z | 2021-09-11T14:22:16.000Z | """
Django settings for django_ajax_example project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_... | 23.685393 | 71 | 0.737666 |
6bb31e2c807fb2d8a4e386176a928a5385f59724 | 9,855 | py | Python | octavia/common/exceptions.py | acdc-cloud/openstack-octavia | f68460ddd31f9b09d59fff876f103324078473a6 | [
"Apache-2.0"
] | null | null | null | octavia/common/exceptions.py | acdc-cloud/openstack-octavia | f68460ddd31f9b09d59fff876f103324078473a6 | [
"Apache-2.0"
] | null | null | null | octavia/common/exceptions.py | acdc-cloud/openstack-octavia | f68460ddd31f9b09d59fff876f103324078473a6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 VMware, Inc, 2014 A10 Networks
# 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
#
# U... | 26.92623 | 78 | 0.69934 |
1a3ee24010a46a1439a5ea25e1f1de24f44eea56 | 462 | py | Python | fiz/dataset/integrate2.py | 20x48/fiz | 33972ed846d47418a2bc07d06a23277d6d53aeab | [
"MIT"
] | null | null | null | fiz/dataset/integrate2.py | 20x48/fiz | 33972ed846d47418a2bc07d06a23277d6d53aeab | [
"MIT"
] | null | null | null | fiz/dataset/integrate2.py | 20x48/fiz | 33972ed846d47418a2bc07d06a23277d6d53aeab | [
"MIT"
] | null | null | null | # 不觉得代码顶头没有几句`import`很难受吗?
# 有条件者可使用PyPy运行。
result = set()
with open('words_alpha.txt', encoding='utf-8') as f:
for word in f.read().splitlines():
result.add(word)
with open('out.txt', 'wb') as f:
for word in sorted(result):
if len(word) >= 5: # 过滤单词!
try:
f.write... | 25.666667 | 52 | 0.508658 |
1c09ec3a892a3069c775c84e98c5411b505906e5 | 946 | py | Python | Unidad_03/Uni3_lab_05_diccionarios.py | Fundamentos-de-Informatica-Python/fund-info-py | 60c64f1ae29b833abc5a395361814c15472c0c11 | [
"Apache-2.0"
] | 1 | 2022-03-31T12:45:42.000Z | 2022-03-31T12:45:42.000Z | Unidad_03/Uni3_lab_05_diccionarios.py | Fundamentos-de-Informatica-Python/fund-info-py | 60c64f1ae29b833abc5a395361814c15472c0c11 | [
"Apache-2.0"
] | 1 | 2022-03-21T02:22:30.000Z | 2022-03-21T02:22:30.000Z | Unidad_03/Uni3_lab_05_diccionarios.py | Fundamentos-de-Informatica-Python/fund-info-py | 60c64f1ae29b833abc5a395361814c15472c0c11 | [
"Apache-2.0"
] | null | null | null | # UNIDAD 03.D28 - D29
# Diccionarios
print('\n\n---[Diapo 27]---------------------')
print('Diccionarios e Iteraciones:')
diccio = {
'naranja': 'orange',
'manzana': 'apple',
'pera': 'pear'
}
print('Se imprimen las claves: ')
for fruta in diccio:
print(fruta)
print('Se imprime con clave, valores: ')... | 22.52381 | 69 | 0.604651 |
e22c5d25fe2359a185e4a819d945a39a7c16462f | 4,186 | py | Python | Conputional_Genonics/Assignment/assignment2/sample_solution/snv_caller/caller_strategies.py | infinityglow/Unimelb-CS-Subjects | 07bdb49fd4c50035b7f2e80ca218ac2b620098e4 | [
"MIT"
] | 1 | 2022-02-14T16:31:07.000Z | 2022-02-14T16:31:07.000Z | Conputional_Genonics/Assignment/assignment2/sample_solution/snv_caller/caller_strategies.py | hidara2000/Unimelb-CS-Subjects | 07bdb49fd4c50035b7f2e80ca218ac2b620098e4 | [
"MIT"
] | null | null | null | Conputional_Genonics/Assignment/assignment2/sample_solution/snv_caller/caller_strategies.py | hidara2000/Unimelb-CS-Subjects | 07bdb49fd4c50035b7f2e80ca218ac2b620098e4 | [
"MIT"
] | 1 | 2021-06-14T11:59:13.000Z | 2021-06-14T11:59:13.000Z | from Bio import SeqIO, Seq
import re
import itertools
class SubReference():
def __init__(self,reference_file):
reference = next(SeqIO.parse(reference_file,'fasta'))
(self.reference_name,self.min_pos,self.max_pos) = self._parse_label(reference.name)
self._reference_seq = reference.seq
def is_valid_pos(... | 36.086207 | 134 | 0.688247 |
b03fc8c96fa1e01b13ada555b8fb38f1b961edd8 | 1,248 | py | Python | tests/old_suite/interactive/test_pyqt5.py | yoda-vid/pyinstaller | 419f349dad721a253b19d9c596e251818132d6ba | [
"Apache-2.0"
] | 2 | 2017-02-08T22:22:09.000Z | 2020-10-08T12:28:36.000Z | tests/old_suite/interactive/test_pyqt5.py | 416426/pyinstaller | 0f2b2e921433ab5a510c7efdb21d9c1d7cfbc645 | [
"Apache-2.0"
] | 3 | 2020-04-06T15:48:37.000Z | 2021-03-23T10:22:21.000Z | tests/old_suite/interactive/test_pyqt5.py | 416426/pyinstaller | 0f2b2e921433ab5a510c7efdb21d9c1d7cfbc645 | [
"Apache-2.0"
] | 4 | 2018-06-04T20:40:37.000Z | 2020-10-13T22:38:40.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2013-2021, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... | 32.842105 | 81 | 0.619391 |
89589edc7eb65d6549b33ac352eeab4e5e039e21 | 1,740 | py | Python | test/test_project.py | LuJie0403/iterlife-pybase | d85444826365677938c58dc68bf7d30516f02e4d | [
"MIT"
] | 89 | 2018-05-31T06:51:36.000Z | 2022-02-21T06:16:36.000Z | test/test_project.py | LuJie0403/iterlife-pybase | d85444826365677938c58dc68bf7d30516f02e4d | [
"MIT"
] | 235 | 2018-05-21T03:32:37.000Z | 2021-07-20T08:45:09.000Z | test/test_project.py | LuJie0403/iterlife-pybase | d85444826365677938c58dc68bf7d30516f02e4d | [
"MIT"
] | 20 | 2018-05-29T14:26:13.000Z | 2022-02-21T06:16:50.000Z | # coding=utf-8
import os
import shutil
import pytest
from fishbase.fish_project import init_project_by_yml
# 2018.6.27 v1.0.14 #73 create by Jia ChunYing
class TestProject(object):
# 2021.6.22, #294, 修复小错误
def test_load_bad_01(self):
"""
empty file
"""
base_dir = os.path.dir... | 32.222222 | 116 | 0.506322 |
2036caa325f480ed36b0e7154890d44d049798a1 | 13,619 | py | Python | nipyapi/nifi/models/listing_request_dto.py | Paul-Verardi/nipyapi | 7a709611d9cf30e4ce8943db4d4dd617f2f7c81c | [
"Apache-2.0"
] | null | null | null | nipyapi/nifi/models/listing_request_dto.py | Paul-Verardi/nipyapi | 7a709611d9cf30e4ce8943db4d4dd617f2f7c81c | [
"Apache-2.0"
] | 1 | 2018-11-13T21:01:33.000Z | 2018-11-13T21:01:33.000Z | nipyapi/nifi/models/listing_request_dto.py | Paul-Verardi/nipyapi | 7a709611d9cf30e4ce8943db4d4dd617f2f7c81c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
NiFi Rest Api
The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, ... | 29.478355 | 479 | 0.60981 |
2fda7b697c034e5bf265008c8a9f966adc351bc3 | 17,595 | py | Python | library/library/modules/bigip_snmp_trap.py | meverett1167/Ansible_Demos | dad515d43af19bcb201f31929e03352d09097efc | [
"Apache-2.0"
] | null | null | null | library/library/modules/bigip_snmp_trap.py | meverett1167/Ansible_Demos | dad515d43af19bcb201f31929e03352d09097efc | [
"Apache-2.0"
] | null | null | null | library/library/modules/bigip_snmp_trap.py | meverett1167/Ansible_Demos | dad515d43af19bcb201f31929e03352d09097efc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 30.076923 | 91 | 0.611822 |
e24bac7ea1f67cbed8321d83e01c8d2a15bef7b2 | 1,854 | py | Python | homedisplay/info_weather/management/commands/fetch_marine_weather.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 1 | 2016-11-28T04:35:06.000Z | 2016-11-28T04:35:06.000Z | homedisplay/info_weather/management/commands/fetch_marine_weather.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 160 | 2015-01-01T20:59:29.000Z | 2016-04-25T13:36:52.000Z | homedisplay/info_weather/management/commands/fetch_marine_weather.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 1 | 2015-02-25T21:24:01.000Z | 2015-02-25T21:24:01.000Z | # -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.utils import timezone
from homedisplay.utils import publish_ws
from info_weather.models import MarineDataPoint
import aaltopoiju
import datetime
import js... | 34.981132 | 78 | 0.593312 |
457f8cddc4f054cc99674b90995292fde07387a9 | 3,142 | py | Python | main.py | GuoooooJing/snkrs_monitor | 6bcfbe78589f6817125fae617800c95b6e5ddbc0 | [
"MIT"
] | 2 | 2020-07-25T13:28:25.000Z | 2020-11-01T15:13:45.000Z | main.py | GuoooooJing/snkrs_monitor | 6bcfbe78589f6817125fae617800c95b6e5ddbc0 | [
"MIT"
] | null | null | null | main.py | GuoooooJing/snkrs_monitor | 6bcfbe78589f6817125fae617800c95b6e5ddbc0 | [
"MIT"
] | null | null | null | import time
import requests
from discord_webhook import DiscordWebhook, DiscordEmbed
url = 'https://api.nike.com/snkrs/content/v1/?country=US&language=en&offset=0&orderBy=published'
webhook_url = 'your discord webhook url'
def check_update(data, previous):
new_dict = {}
extra_dict = {}
new =... | 36.534884 | 117 | 0.549332 |
0dff79d11cd3040c89fb9b5d38eb034253346d32 | 9,336 | py | Python | p2p/protocol.py | Gauddel/trinity | 0b12943ac36f4090abc22fc965e9e9a4f42c6f35 | [
"MIT"
] | null | null | null | p2p/protocol.py | Gauddel/trinity | 0b12943ac36f4090abc22fc965e9e9a4f42c6f35 | [
"MIT"
] | null | null | null | p2p/protocol.py | Gauddel/trinity | 0b12943ac36f4090abc22fc965e9e9a4f42c6f35 | [
"MIT"
] | null | null | null | from abc import ABC
import logging
import operator
import struct
from typing import (
Any,
ClassVar,
Dict,
Generic,
Iterable,
List,
Sequence,
Tuple,
Type,
TypeVar,
Union,
)
from mypy_extensions import (
TypedDict,
)
import snappy
from eth_utils import to_tuple
from eth... | 33.342857 | 99 | 0.654135 |
7ee81203286206d50cc2a210f1841b0a36935905 | 11,373 | py | Python | tensorflow_probability/python/distributions/triangular.py | brianwa84/probability | 6f8e78d859ac41170be5147c8c7bde54cc5aa83e | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/triangular.py | brianwa84/probability | 6f8e78d859ac41170be5147c8c7bde54cc5aa83e | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/triangular.py | brianwa84/probability | 6f8e78d859ac41170be5147c8c7bde54cc5aa83e | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability 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 o... | 37.288525 | 80 | 0.641431 |
f9a1496b7e654ae4d2966528a807a49cd3966417 | 5,142 | py | Python | python3-virtualenv/Lib/python3.6/site-packages/flask_sqlalchemy/model.py | LindaNayeli104/mlh-orientation-hackathon-project | d86b58f76721a9d5f3374399bfc6d3b1445d16ca | [
"MIT"
] | null | null | null | python3-virtualenv/Lib/python3.6/site-packages/flask_sqlalchemy/model.py | LindaNayeli104/mlh-orientation-hackathon-project | d86b58f76721a9d5f3374399bfc6d3b1445d16ca | [
"MIT"
] | null | null | null | python3-virtualenv/Lib/python3.6/site-packages/flask_sqlalchemy/model.py | LindaNayeli104/mlh-orientation-hackathon-project | d86b58f76721a9d5f3374399bfc6d3b1445d16ca | [
"MIT"
] | 1 | 2021-06-20T19:28:37.000Z | 2021-06-20T19:28:37.000Z | import re
import sqlalchemy as sa
from sqlalchemy import inspect
from sqlalchemy.ext.declarative import DeclarativeMeta, declared_attr
from sqlalchemy.schema import _get_table_key
from ._compat import to_str
def should_set_tablename(cls):
"""Determine whether ``__tablename__`` should be automatically... | 33.174194 | 81 | 0.609685 |
e9a734c8702e39ccfebb37c6b3ffa933b9387767 | 605 | py | Python | beatsaver/entity/MapParitySummary.py | jundoll/bs-api-py | 1e12e1d68d6cbc4c8e25c0da961396854391be5b | [
"MIT"
] | null | null | null | beatsaver/entity/MapParitySummary.py | jundoll/bs-api-py | 1e12e1d68d6cbc4c8e25c0da961396854391be5b | [
"MIT"
] | null | null | null | beatsaver/entity/MapParitySummary.py | jundoll/bs-api-py | 1e12e1d68d6cbc4c8e25c0da961396854391be5b | [
"MIT"
] | null | null | null | # load modules
from dataclasses import dataclass
# definition class
@dataclass(frozen=True)
class MapParitySummary:
errors: int
resets: int
warns: int
# definition function
def gen(response):
if response is not None:
instance = MapParitySummary(
errors=response.get('errors'),
... | 18.333333 | 45 | 0.601653 |
fe86c657be4152059da23e31836f4e2f4270b808 | 8,427 | py | Python | inference/utils.py | joyjeni/detr-fine | dfc0f4abc2579a2b3ef4527904af3345c7a9de4d | [
"Apache-2.0"
] | null | null | null | inference/utils.py | joyjeni/detr-fine | dfc0f4abc2579a2b3ef4527904af3345c7a9de4d | [
"Apache-2.0"
] | null | null | null | inference/utils.py | joyjeni/detr-fine | dfc0f4abc2579a2b3ef4527904af3345c7a9de4d | [
"Apache-2.0"
] | null | null | null | import math
import time
import datetime
import io
import itertools
import torch
from pathlib import Path
from copy import deepcopy
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from PIL import Image, ImageDraw, ImageFont
from panopticapi.utils import id2rgb, rgb2id
from detectron2.utils.v... | 32.164122 | 161 | 0.632728 |
27e8400bb5aa13a6b575823a459aa105948e76cf | 836 | py | Python | src/models/model.py | akash-harijan/cataract-detection | ccb7045290a7a002bba1ff68220d19ec3a79ea2d | [
"MIT"
] | null | null | null | src/models/model.py | akash-harijan/cataract-detection | ccb7045290a7a002bba1ff68220d19ec3a79ea2d | [
"MIT"
] | null | null | null | src/models/model.py | akash-harijan/cataract-detection | ccb7045290a7a002bba1ff68220d19ec3a79ea2d | [
"MIT"
] | null | null | null | from tensorflow import keras
import tensorflow as tf
def create_model(img_size=(160, 160, 3)):
base_model = keras.applications.MobileNetV2(
weights="imagenet",
input_shape=img_size,
include_top=False,
)
base_model.trainable = False
inputs = keras.Input(shape=img_size)
x = ... | 29.857143 | 76 | 0.67823 |
1e3c1b2f82d63d436b3d191343215bffda7b1e99 | 3,122 | py | Python | python/tests/random_agent_test.py | bfakhri/dml_custom | 1e908b10890df11e510d72c21f3125e3069a0eac | [
"CC-BY-4.0"
] | null | null | null | python/tests/random_agent_test.py | bfakhri/dml_custom | 1e908b10890df11e510d72c21f3125e3069a0eac | [
"CC-BY-4.0"
] | null | null | null | python/tests/random_agent_test.py | bfakhri/dml_custom | 1e908b10890df11e510d72c21f3125e3069a0eac | [
"CC-BY-4.0"
] | null | null | null | # Copyright 2016 Google Inc.
#
# 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 version.
#
# This program is distributed in the ho... | 29.45283 | 73 | 0.648943 |
af43a86dfd1fac51ec074a3286dca14f904b42c4 | 867 | py | Python | setup.py | TimCosby/generic_execute | 85fdee7ea1bd6ae027223c80333bf8c6899128d9 | [
"Apache-2.0"
] | null | null | null | setup.py | TimCosby/generic_execute | 85fdee7ea1bd6ae027223c80333bf8c6899128d9 | [
"Apache-2.0"
] | null | null | null | setup.py | TimCosby/generic_execute | 85fdee7ea1bd6ae027223c80333bf8c6899128d9 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
with open('README.md', 'r') as file:
long_description = file.read()
setup(
name='gexecute',
version='0.0.6',
author='Tim Cosby',
author_email='tim470773@gmail.com',
url='https://github.com/TimCosby/generic_execute',
description='Generically execute a... | 32.111111 | 107 | 0.637832 |
e7b09695aeb06f61a2c26b5230e0c3bd6d05d4c2 | 6,680 | py | Python | storyscript/Cli.py | edvald/storyscript | a912586a65c1ee31cb634092e952767da6215269 | [
"Apache-2.0"
] | null | null | null | storyscript/Cli.py | edvald/storyscript | a912586a65c1ee31cb634092e952767da6215269 | [
"Apache-2.0"
] | null | null | null | storyscript/Cli.py | edvald/storyscript | a912586a65c1ee31cb634092e952767da6215269 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import io
import os
import click
from click_alias import ClickAliasedGroup
from .App import App
from .Features import Features
from .Project import Project
from .Version import version as app_version
from .exceptions import StoryError
story_features = Features.all_feature_names()
def prev... | 31.509434 | 77 | 0.538024 |
8d2deb738560edfc77fe50b8b99b462e62687bbb | 16,397 | py | Python | front-end/testsuite-python-lib/Python-3.3.0/Lib/venv/__init__.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2020-11-26T18:53:46.000Z | 2020-11-26T18:53:46.000Z | front-end/testsuite-python-lib/Python-3.3.0/Lib/venv/__init__.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | null | null | null | front-end/testsuite-python-lib/Python-3.3.0/Lib/venv/__init__.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2019-04-11T11:27:01.000Z | 2019-04-11T11:27:01.000Z | """
Virtual environment (venv) package for Python. Based on PEP 405.
Copyright (C) 2011-2012 Vinay Sajip.
Licensed to the PSF under a contributor agreement.
usage: python -m venv [-h] [--system-site-packages] [--symlinks] [--clear]
[--upgrade]
ENV_DIR [ENV_DIR ...]
Creates virtual Python envi... | 41.095238 | 105 | 0.554736 |
f1db7e2a3846ae5bb95517d709e5d0346e8f9f39 | 953 | py | Python | ucscentralsdk/methodmeta/ConfigConfMoGroupMeta.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/methodmeta/ConfigConfMoGroupMeta.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/methodmeta/ConfigConfMoGroupMeta.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | """This module contains the meta information of ConfigConfMoGroup ExternalMethod."""
from ..ucscentralcoremeta import MethodMeta, MethodPropertyMeta
method_meta = MethodMeta("ConfigConfMoGroup", "configConfMoGroup", "Version142b")
prop_meta = {
"cookie": MethodPropertyMeta("Cookie", "cookie", "Xs:string", "Versi... | 41.434783 | 122 | 0.705142 |
d3dbdfa79d765601c8746b92a508666e27db40ca | 787 | py | Python | BreadthFirstSearchPath.py | 1090504117/PyStructureLearning | 207d6e7a6b818d9665c2529f86fea70000cd674f | [
"MIT"
] | null | null | null | BreadthFirstSearchPath.py | 1090504117/PyStructureLearning | 207d6e7a6b818d9665c2529f86fea70000cd674f | [
"MIT"
] | null | null | null | BreadthFirstSearchPath.py | 1090504117/PyStructureLearning | 207d6e7a6b818d9665c2529f86fea70000cd674f | [
"MIT"
] | null | null | null | from collections import deque
def person_is_seller(name):
return name[-1] == 'm'
def search(name):
graph = {}
graph["you"] = ["alice", "bob", "claire"]
graph["bob"] = ["anuj", "peggy"]
graph["alice"] = ["peggy"]
graph["claire"] = ["thom", "jonny"]
graph["anuj"] = []
graph["peggy"] = []... | 27.137931 | 52 | 0.52986 |
ded315fc3018ed28ee637cff3af744b1de9c542f | 134 | py | Python | setup.py | kaustubh-sadekar/dlutils | 91b98f7701f4d682ae2790e4cf41b9daa5e3cf77 | [
"MIT"
] | 3 | 2020-03-12T09:21:24.000Z | 2021-12-27T14:06:20.000Z | setup.py | kaustubh-sadekar/dlutils | 91b98f7701f4d682ae2790e4cf41b9daa5e3cf77 | [
"MIT"
] | null | null | null | setup.py | kaustubh-sadekar/dlutils | 91b98f7701f4d682ae2790e4cf41b9daa5e3cf77 | [
"MIT"
] | null | null | null | import setuptools
setuptools.setup(name = 'kdlutils', packages = ['dlutils/kdlutils'],version = '0.1', author = 'Kaustubh sadekar')
| 26.8 | 113 | 0.716418 |
f6a78aa3b721814a9683d58f4c57d377d074323b | 405 | py | Python | TTSHLINENotify/wsgi.py | vincentinttsh/TTSHLINENotify | 3d6a460bf995aa22192eaf69acc0274b962acb75 | [
"BSD-3-Clause"
] | null | null | null | TTSHLINENotify/wsgi.py | vincentinttsh/TTSHLINENotify | 3d6a460bf995aa22192eaf69acc0274b962acb75 | [
"BSD-3-Clause"
] | null | null | null | TTSHLINENotify/wsgi.py | vincentinttsh/TTSHLINENotify | 3d6a460bf995aa22192eaf69acc0274b962acb75 | [
"BSD-3-Clause"
] | null | null | null | """
WSGI config for TTSHLINENotify 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/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANG... | 23.823529 | 78 | 0.792593 |
e1c14bdaa4b3bd5f4edb85637be60b42dce32b9a | 23,894 | py | Python | yolov5/utils/general.py | JadeMaveric/CoinShift-Imaging-Box | 3d1599099697bc12ffc91ab9b50387dc9cb19092 | [
"Apache-2.0"
] | 23 | 2021-01-19T11:55:53.000Z | 2021-07-22T05:30:57.000Z | yolov5/utils/general.py | JadeMaveric/CoinShift-Imaging-Box | 3d1599099697bc12ffc91ab9b50387dc9cb19092 | [
"Apache-2.0"
] | 122 | 2021-03-06T15:46:08.000Z | 2021-06-09T10:36:11.000Z | yolov5/utils/general.py | JadeMaveric/CoinShift-Imaging-Box | 3d1599099697bc12ffc91ab9b50387dc9cb19092 | [
"Apache-2.0"
] | 40 | 2021-01-20T13:12:52.000Z | 2021-05-29T18:26:43.000Z | # General utils
import glob
import logging
import math
import os
import platform
import random
import re
import subprocess
import time
from pathlib import Path
import cv2
import numpy as np
import torch
import torchvision
import yaml
from utils.google_utils import gsutil_getsize
from utils.metrics import fitness
fro... | 41.410745 | 120 | 0.572278 |
13a51fdcaf85725d26775cae30e81b2bd7027c2e | 11,311 | py | Python | src/harvesters/util/pfnc.py | jcormier/harvesters | 81ec7aad4799e4432f7bd474b9215d248b7e1be5 | [
"Apache-2.0"
] | null | null | null | src/harvesters/util/pfnc.py | jcormier/harvesters | 81ec7aad4799e4432f7bd474b9215d248b7e1be5 | [
"Apache-2.0"
] | null | null | null | src/harvesters/util/pfnc.py | jcormier/harvesters | 81ec7aad4799e4432f7bd474b9215d248b7e1be5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# ----------------------------------------------------------------------------
#
# Copyright 2018 EMVA
#
# 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://ww... | 17.401538 | 81 | 0.583503 |
ee82ea1ec759ee004eaacb23d3cba41cf50c5b43 | 4,722 | py | Python | hyper_parameter_tuning/_v4_build_model_general_u.py | sunway1999/deep_omics | 5ceb61aa1555ceed49c85a1b49c99ca9ca48e6b5 | [
"MIT"
] | 16 | 2022-01-11T19:58:18.000Z | 2022-02-27T14:48:15.000Z | hyper_parameter_tuning/_v4_build_model_general_u.py | sunway1999/deep_omics | 5ceb61aa1555ceed49c85a1b49c99ca9ca48e6b5 | [
"MIT"
] | null | null | null | hyper_parameter_tuning/_v4_build_model_general_u.py | sunway1999/deep_omics | 5ceb61aa1555ceed49c85a1b49c99ca9ca48e6b5 | [
"MIT"
] | 4 | 2022-01-15T03:25:29.000Z | 2022-03-27T00:21:02.000Z |
# change CNN structure to the same as that from the
# De novo prediction of cancer-associated T cell receptors
# for noninvasive cancer detection
# paper
# https://github.com/s175573/DeepCAT
# all parameters for CNN part are directly carried over from
# the inplementation of this repo
from tensorflow.keras.activati... | 46.752475 | 90 | 0.638289 |
d856a4c7f36c1584eb876c64217a2d7fa7188a3d | 2,999 | py | Python | tests/objects/test_boolobject.py | mswart/topaz | 4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae | [
"BSD-3-Clause"
] | 241 | 2015-01-02T18:49:09.000Z | 2022-03-15T15:08:45.000Z | tests/objects/test_boolobject.py | mswart/topaz | 4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae | [
"BSD-3-Clause"
] | 16 | 2015-05-04T21:31:08.000Z | 2020-06-04T22:49:36.000Z | tests/objects/test_boolobject.py | mswart/topaz | 4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae | [
"BSD-3-Clause"
] | 24 | 2015-02-15T05:35:11.000Z | 2022-03-22T13:29:04.000Z | from ..base import BaseTopazTest
class TestTrueObject(BaseTopazTest):
def test_name(self, space):
space.execute("TrueClass")
def test_to_s(self, space):
w_res = space.execute("return true.to_s")
assert space.str_w(w_res) == "true"
def test_inspect(self, space):
w_res = sp... | 34.872093 | 75 | 0.643881 |
8ee576696ac4780f959d152c8e7d1a4f298c87cf | 464 | py | Python | plotly/validators/layout/scene/yaxis/_zerolinecolor.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/layout/scene/yaxis/_zerolinecolor.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/layout/scene/yaxis/_zerolinecolor.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name='zerolinecolor',
parent_name='layout.scene.yaxis',
**kwargs
):
super(ZerolinecolorValidator, self).__init__(
plotl... | 24.421053 | 74 | 0.612069 |
61feb4a4c3a3e8695e2e6faf17cc54d324a1586c | 5,424 | py | Python | nova/objectstore/bucket.py | joshuamckenty/yolo-octo-wookie | 8e078e91d367f3deaf1785c46ee7734dd7907f24 | [
"Apache-2.0"
] | 1 | 2021-06-09T17:58:53.000Z | 2021-06-09T17:58:53.000Z | nova/objectstore/bucket.py | joshuamckenty/yolo-octo-wookie | 8e078e91d367f3deaf1785c46ee7734dd7907f24 | [
"Apache-2.0"
] | null | null | null | nova/objectstore/bucket.py | joshuamckenty/yolo-octo-wookie | 8e078e91d367f3deaf1785c46ee7734dd7907f24 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | 30.818182 | 85 | 0.590892 |
27c898a6ba655b69e09c6e6206e0db767a8be15c | 19,391 | py | Python | tests/ile_structural_objects_component_test.py | NextCenturyCorporation/mcs-scene-generator | e0a6ee778359cadd2de682a5006581b7a6134431 | [
"Apache-2.0"
] | 4 | 2021-02-04T03:57:52.000Z | 2022-02-08T18:19:58.000Z | tests/ile_structural_objects_component_test.py | NextCenturyCorporation/mcs-scene-generator | e0a6ee778359cadd2de682a5006581b7a6134431 | [
"Apache-2.0"
] | 68 | 2021-05-06T08:52:46.000Z | 2022-03-23T16:46:03.000Z | tests/ile_structural_objects_component_test.py | NextCenturyCorporation/mcs-scene-generator | e0a6ee778359cadd2de682a5006581b7a6134431 | [
"Apache-2.0"
] | 1 | 2021-02-04T03:21:57.000Z | 2021-02-04T03:21:57.000Z | from typing import List
from machine_common_sense.config_manager import Vector3d
from ideal_learning_env import RandomStructuralObjectsComponent
from ideal_learning_env.numerics import MinMaxFloat, VectorFloatConfig
from ideal_learning_env.structural_objects_component import (
RandomStructuralObjectConfig,
Sp... | 31.225443 | 75 | 0.627972 |
300aab92ae8a2974060e5356ec5d2e2e0b92bb38 | 1,318 | py | Python | django/api/migrations/0003_vindecodedinformation.py | emi-hi/cthub | 6e1da9d4e0d0b6037177854de9bb5df1746c848d | [
"Apache-2.0"
] | 1 | 2021-12-05T22:11:20.000Z | 2021-12-05T22:11:20.000Z | django/api/migrations/0003_vindecodedinformation.py | emi-hi/cthub | 6e1da9d4e0d0b6037177854de9bb5df1746c848d | [
"Apache-2.0"
] | 5 | 2021-09-24T16:54:38.000Z | 2022-01-22T22:08:38.000Z | django/api/migrations/0003_vindecodedinformation.py | emi-hi/cthub | 6e1da9d4e0d0b6037177854de9bb5df1746c848d | [
"Apache-2.0"
] | 2 | 2021-10-19T17:26:34.000Z | 2021-12-05T22:12:56.000Z | # Generated by Django 3.1.6 on 2021-11-15 19:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0002_ldvrebates'),
]
operations = [
migrations.CreateModel(
name='VINDecodedInformation',
fields=[
... | 41.1875 | 114 | 0.594082 |
2ee9db30af2627889b67adc650b16c5bd685390d | 23 | py | Python | dataview/__init__.py | srkama/haysolr | 0195f5fc113e416a4cabf3f5ceb1ba55901e4aaa | [
"Apache-2.0"
] | null | null | null | dataview/__init__.py | srkama/haysolr | 0195f5fc113e416a4cabf3f5ceb1ba55901e4aaa | [
"Apache-2.0"
] | null | null | null | dataview/__init__.py | srkama/haysolr | 0195f5fc113e416a4cabf3f5ceb1ba55901e4aaa | [
"Apache-2.0"
] | null | null | null | __author__ = 'Kamal.S'
| 11.5 | 22 | 0.695652 |
e0eb8134a903c1d15547fc9ccf8fa66a7d8eeb28 | 3,312 | py | Python | layers/poky/meta/lib/oeqa/selftest/cases/oelib/path.py | dtischler/px30-test | 55dce0b7aff1c4a7dea3ac94f94cc9c67fba7c9f | [
"Apache-2.0"
] | 1 | 2020-09-10T02:47:54.000Z | 2020-09-10T02:47:54.000Z | layers/poky/meta/lib/oeqa/selftest/cases/oelib/path.py | dtischler/px30-test | 55dce0b7aff1c4a7dea3ac94f94cc9c67fba7c9f | [
"Apache-2.0"
] | 3 | 2019-11-20T02:53:01.000Z | 2019-12-26T03:00:15.000Z | layers/poky/meta/lib/oeqa/selftest/cases/oelib/path.py | dtischler/px30-test | 55dce0b7aff1c4a7dea3ac94f94cc9c67fba7c9f | [
"Apache-2.0"
] | null | null | null | from unittest.case import TestCase
import oe, oe.path
import tempfile
import os
import errno
import shutil
class TestRealPath(TestCase):
DIRS = [ "a", "b", "etc", "sbin", "usr", "usr/bin", "usr/binX", "usr/sbin", "usr/include", "usr/include/gdbm" ]
FILES = [ "etc/passwd", "b/file" ]
LINKS = [
( "bi... | 38.511628 | 115 | 0.46407 |
f3085e09e1f88e6c5aa48fd2a714a6fbd88c42ac | 3,953 | py | Python | tests/automation_framework/src/libs/test_base.py | shresthichauhan/trusted-compute-framework | 1ad89fa6fa4492f43bb79e1c9be3536c4f0ff7f7 | [
"Apache-2.0"
] | null | null | null | tests/automation_framework/src/libs/test_base.py | shresthichauhan/trusted-compute-framework | 1ad89fa6fa4492f43bb79e1c9be3536c4f0ff7f7 | [
"Apache-2.0"
] | null | null | null | tests/automation_framework/src/libs/test_base.py | shresthichauhan/trusted-compute-framework | 1ad89fa6fa4492f43bb79e1c9be3536c4f0ff7f7 | [
"Apache-2.0"
] | null | null | null | from src.libs.avalon_test_wrapper \
import build_request_obj, read_json, submit_request, \
pre_test_env
import logging
import globals
from src.libs.direct_listener import ListenerImpl
from src.libs.direct_sdk import SDKImpl
from src.libs import constants
logger = logging.getLogger(__name__)
class TestBase()... | 38.009615 | 74 | 0.676448 |
baddc62992d36e34d77f32baa80ce4dd7555d0e0 | 11,407 | py | Python | deployment/deploy-env.py | edoburu/demo.django-fluent.org | 10556eb383849fb20b8c6958d87c4b9f94085af2 | [
"CC-BY-3.0"
] | 24 | 2016-09-09T02:54:18.000Z | 2021-02-28T05:35:01.000Z | deployment/deploy-env.py | edoburu/demo.django-fluent.org | 10556eb383849fb20b8c6958d87c4b9f94085af2 | [
"CC-BY-3.0"
] | 288 | 2017-04-13T16:00:23.000Z | 2022-01-06T13:48:02.000Z | deployment/deploy-env.py | edoburu/demo.django-fluent.org | 10556eb383849fb20b8c6958d87c4b9f94085af2 | [
"CC-BY-3.0"
] | 5 | 2017-03-20T10:37:59.000Z | 2020-07-28T15:44:08.000Z | #!/usr/bin/env python3
import atexit
import json
import os
import sys
from http.client import HTTPResponse
from tempfile import TemporaryDirectory
from ssl import SSLError
from typing import cast
from urllib.error import HTTPError
from urllib.request import urlopen, Request
from time import sleep
import argparse
imp... | 31.252055 | 93 | 0.578855 |
1bc28457ad973bd55a7ac34f6f3584473063b3f1 | 7,877 | py | Python | contrib/verify-commits/verify-commits.py | SumExchange/sumcoin | 59b8e657027b0df9b0da44e5d48c1877621f65ba | [
"MIT"
] | 1 | 2020-05-17T09:44:17.000Z | 2020-05-17T09:44:17.000Z | contrib/verify-commits/verify-commits.py | SumExchange/sumcoin | 59b8e657027b0df9b0da44e5d48c1877621f65ba | [
"MIT"
] | null | null | null | contrib/verify-commits/verify-commits.py | SumExchange/sumcoin | 59b8e657027b0df9b0da44e5d48c1877621f65ba | [
"MIT"
] | 3 | 2020-09-29T04:19:41.000Z | 2021-02-08T22:32:01.000Z | #!/usr/bin/env python3
# Copyright (c) 2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Verify commits against a trusted keys list."""
import argparse
import hashlib
import os
import subprocess
i... | 50.49359 | 190 | 0.633109 |
9430aa4810cc826e9bf6148992ab4dc3f568f29a | 2,797 | py | Python | maps/Print.py | agrc/surface-water-quality | 5454a3c36ea00aa59d1fc6358d78807caf71c811 | [
"MIT"
] | 1 | 2019-11-25T07:19:33.000Z | 2019-11-25T07:19:33.000Z | maps/Print.py | agrc/surface-water-quality | 5454a3c36ea00aa59d1fc6358d78807caf71c811 | [
"MIT"
] | 7 | 2015-01-16T16:34:49.000Z | 2022-03-30T21:05:20.000Z | maps/Print.py | agrc/surface-water-quality | 5454a3c36ea00aa59d1fc6358d78807caf71c811 | [
"MIT"
] | null | null | null | import arcpy
from json import loads
from os.path import join
import os
'''
GP Parameters
0 - baseMap: String - name of the cached service (e.g. 'Streets')
1 - extent: {xmin: Number, ymin: Number, xmax: Number, ymax: Number}
2 - selectedPolys: featureSet (schema is BlankPoly)
3 - selectedLines: featureSet (sc... | 31.426966 | 83 | 0.720057 |
1424bd5b1df7525ba62fea5604e004f8ef3b151a | 13,957 | py | Python | mypy/newsemanal/semanal_main.py | phamnhatthe/mypy | 892b8d85afb80c9833248f2a8acf1c65023e0cad | [
"PSF-2.0"
] | null | null | null | mypy/newsemanal/semanal_main.py | phamnhatthe/mypy | 892b8d85afb80c9833248f2a8acf1c65023e0cad | [
"PSF-2.0"
] | null | null | null | mypy/newsemanal/semanal_main.py | phamnhatthe/mypy | 892b8d85afb80c9833248f2a8acf1c65023e0cad | [
"PSF-2.0"
] | null | null | null | """Top-level logic for the new semantic analyzer.
The semantic analyzer binds names, resolves imports, detects various
special constructs that don't have dedicated AST nodes after parse
(such as 'cast' which looks like a call), and performs various simple
consistency checks.
Semantic analysis of each SCC (strongly co... | 43.210526 | 99 | 0.658666 |
07c384c3de54747bab6d1cef9ba39e74b080410f | 605 | py | Python | sobotka/hosts_file_manager.py | looneym/sobotka | 7df0f86b9c8115b6b81165df8e88b753a6156970 | [
"MIT"
] | 2 | 2017-09-22T16:08:20.000Z | 2019-04-16T08:57:43.000Z | sobotka/hosts_file_manager.py | looneym/sobotka | 7df0f86b9c8115b6b81165df8e88b753a6156970 | [
"MIT"
] | 8 | 2017-08-18T11:40:10.000Z | 2017-11-01T09:10:25.000Z | sobotka/hosts_file_manager.py | looneym/sobotka | 7df0f86b9c8115b6b81165df8e88b753a6156970 | [
"MIT"
] | null | null | null | from python_hosts import Hosts, HostsEntry
class HostsFileManager:
def __init__(self):
self.my_hosts = Hosts()
def add_entry(self, ip, name):
name = name + ".dev"
# just to be safe
self.remove_entry(ip, name)
new_entry = HostsEntry(entry_type='ipv4', address=ip, names... | 25.208333 | 75 | 0.629752 |
19226b63c4456994b8f8f123a376044e13a5150c | 265 | py | Python | yoi/migrations/20120801-01-event_created.py | doptio/you-owe-it | 8da7f6816c95ace56f33c50f44b81b687503dca9 | [
"MIT"
] | null | null | null | yoi/migrations/20120801-01-event_created.py | doptio/you-owe-it | 8da7f6816c95ace56f33c50f44b81b687503dca9 | [
"MIT"
] | 1 | 2019-12-09T09:44:53.000Z | 2019-12-09T09:44:53.000Z | yoi/migrations/20120801-01-event_created.py | doptio/you-owe-it | 8da7f6816c95ace56f33c50f44b81b687503dca9 | [
"MIT"
] | null | null | null | db.session.execute('''
alter table "event"
add column created timestamp
''')
db.session.execute('''
update "event" set created = '1979-07-07'
''')
db.session.execute('''
alter table "event" alter column created set not null
''')
db.session.commit()
| 22.083333 | 57 | 0.660377 |
aa125e430a4cdd4d85d1c7dd88143c4c51db733d | 2,525 | py | Python | atc-codes/parallel-annotations.py | librairy/covid19 | d9a454a40df510135e8856b9670888ef194b469a | [
"Apache-2.0"
] | 1 | 2020-07-07T09:30:47.000Z | 2020-07-07T09:30:47.000Z | atc-codes/parallel-annotations.py | librairy/covid19 | d9a454a40df510135e8856b9670888ef194b469a | [
"Apache-2.0"
] | null | null | null | atc-codes/parallel-annotations.py | librairy/covid19 | d9a454a40df510135e8856b9670888ef194b469a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# docker run -d -p 6200:5000 librairy/bio-nlp:latest
import tarfile
import urllib.request
import json
import requests
import pysolr
import os
import multiprocessing as mp
from datetime import datetime
import time
initial = 0
# librAIry Bio-NLP Endpoint
#API_ENDPOINT = "http://localhost:5000/bio... | 31.17284 | 152 | 0.649901 |
2ca83c3283d72a48cae5456694a6b51f31827e69 | 3,898 | py | Python | InstaPy.py | NodeZer0/InstagramLoginHistory | 6b2f34f16a4a01956e662438b3fae7d5723fbb2b | [
"MIT"
] | null | null | null | InstaPy.py | NodeZer0/InstagramLoginHistory | 6b2f34f16a4a01956e662438b3fae7d5723fbb2b | [
"MIT"
] | null | null | null | InstaPy.py | NodeZer0/InstagramLoginHistory | 6b2f34f16a4a01956e662438b3fae7d5723fbb2b | [
"MIT"
] | null | null | null | #####################
# MADE BY EKO 2020
# PRESENTED BY DR. TEILAW
#####################
import os
import json
import base64
import sqlite3
import win32crypt
from Crypto.Cipher import AES
import shutil
import dropbox
from codecs import encode
import getpass
def upload_passfile():
# pass accesst... | 38.215686 | 134 | 0.646998 |
42b37ca63dca7488737a9e86d516fdcff2c7c5b4 | 6,934 | py | Python | tests/make_animation.py | larsgeb/psvWave | f02e7567d69fc6a6b5dbea8a3d2001e40c506019 | [
"BSD-3-Clause"
] | 15 | 2020-10-18T07:01:37.000Z | 2022-03-22T14:35:44.000Z | tests/make_animation.py | larsgeb/psvWave | f02e7567d69fc6a6b5dbea8a3d2001e40c506019 | [
"BSD-3-Clause"
] | 4 | 2020-06-27T10:03:13.000Z | 2020-07-07T08:36:27.000Z | tests/make_animation.py | larsgeb/forward-virieux | 15b831b6ee2c8a9d3412f6dcd53fc52b81b88fae | [
"BSD-3-Clause"
] | 4 | 2018-11-16T07:16:31.000Z | 2020-05-22T10:31:59.000Z | from matplotlib import animation
import psvWave
import matplotlib.pyplot as plt
import numpy
model = psvWave.fdModel(
"../tests/test_configurations/forward_configuration_4_sources.ini"
)
# Create target model ---------------------------------------------------------
# Get the coordinates of every grid point
IX, ... | 25.492647 | 82 | 0.613499 |
e50cb0f1dbf2d87261d5fa6bd68ea7caf29178d5 | 1,124 | py | Python | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/errors/types/not_empty_error.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/errors/types/not_empty_error.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/errors/types/not_empty_error.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 28.820513 | 74 | 0.705516 |
23e3522d632df3ac38ddaf8b081e711c2243eb92 | 3,847 | py | Python | wilson/util/test_smeftutil.py | bednya/wilson | 2cd803bc298c3f967401aed119f617fc5d7ba5c0 | [
"MIT"
] | null | null | null | wilson/util/test_smeftutil.py | bednya/wilson | 2cd803bc298c3f967401aed119f617fc5d7ba5c0 | [
"MIT"
] | null | null | null | wilson/util/test_smeftutil.py | bednya/wilson | 2cd803bc298c3f967401aed119f617fc5d7ba5c0 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
import numpy.testing as npt
from wilson.run.smeft import beta
from wilson.util import smeftutil
from wilson.run.smeft.tests import test_beta
from wilson.test_wilson import get_random_wc
from wilson import wcxf
from numbers import Number
C = test_beta.C.copy()
for i in C:
if i in ... | 43.224719 | 143 | 0.587731 |
54a2820b7e2fafe68fca48c0dcb594ce898b3f2f | 685 | py | Python | manage.py | sayoojbk/recommendation | 24d8e2b5c7c92550a4b0a9c2004eb33d0f50762f | [
"MIT"
] | 1 | 2020-06-20T06:02:51.000Z | 2020-06-20T06:02:51.000Z | manage.py | sayoojbk/recommendation | 24d8e2b5c7c92550a4b0a9c2004eb33d0f50762f | [
"MIT"
] | 2 | 2019-08-04T11:19:08.000Z | 2019-08-20T16:34:12.000Z | manage.py | sayoojbk/recommendation | 24d8e2b5c7c92550a4b0a9c2004eb33d0f50762f | [
"MIT"
] | 2 | 2019-07-30T13:17:23.000Z | 2019-08-04T04:57:17.000Z | import os
import unittest
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
from app import blueprint
from app.main import create_app
app = create_app(os.getenv('BOILERPLATE_ENV') or 'dev')
app.register_blueprint(blueprint)
app.app_context().push()
manager = Manager(app)
@manager... | 20.147059 | 74 | 0.715328 |
c12e3cd6fde55c67ce53fb7fecf63cff6a719dcb | 31,186 | py | Python | src-tmp/articulation2.py | EulerProject/EulerX | 49e63e6a27be97ab30832180a47d214494388e15 | [
"MIT"
] | 15 | 2016-02-17T20:48:29.000Z | 2021-03-05T20:38:05.000Z | src-tmp/articulation2.py | eddy7896/EulerX | 49e63e6a27be97ab30832180a47d214494388e15 | [
"MIT"
] | 16 | 2015-02-05T18:38:48.000Z | 2021-06-14T11:38:36.000Z | src-tmp/articulation2.py | eddy7896/EulerX | 49e63e6a27be97ab30832180a47d214494388e15 | [
"MIT"
] | 4 | 2016-01-26T03:24:52.000Z | 2020-01-09T07:57:15.000Z | # Copyright (c) 2014 University of California, Davis
#
#
# 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,... | 61.876984 | 169 | 0.415218 |
29a9a0f33428b7947202d40d46a5d24d1439afc7 | 3,032 | py | Python | airflow/utils/log/colored_log.py | Ryan-Miao/airflow | a2aca8714fac014ed7da97229d7877f1bc6e5a59 | [
"Apache-2.0"
] | 2 | 2020-10-12T05:21:27.000Z | 2021-07-07T09:23:47.000Z | airflow/utils/log/colored_log.py | Ryan-Miao/airflow | a2aca8714fac014ed7da97229d7877f1bc6e5a59 | [
"Apache-2.0"
] | 3 | 2021-03-11T06:46:16.000Z | 2021-09-29T17:48:20.000Z | airflow/utils/log/colored_log.py | Ryan-Miao/airflow | a2aca8714fac014ed7da97229d7877f1bc6e5a59 | [
"Apache-2.0"
] | 1 | 2019-12-09T08:41:32.000Z | 2019-12-09T08:41:32.000Z | # -*- coding: utf-8 -*-
#
# 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
#... | 35.670588 | 83 | 0.661939 |
fe5093485bde89aced3aa481dd4f347f672ee9f9 | 45 | py | Python | aim/sdk/types.py | avkudr/aim | 5961f31d358929287986ace09c73310886a94704 | [
"Apache-2.0"
] | 2,195 | 2020-01-23T03:08:11.000Z | 2022-03-31T14:32:19.000Z | aim/sdk/types.py | deepanprabhu/aim | c00d8ec7bb2d9fd230a9430b516ca90cdb8072cb | [
"Apache-2.0"
] | 696 | 2020-02-08T21:55:45.000Z | 2022-03-31T16:52:22.000Z | aim/sdk/types.py | deepanprabhu/aim | c00d8ec7bb2d9fd230a9430b516ca90cdb8072cb | [
"Apache-2.0"
] | 150 | 2020-03-27T10:44:25.000Z | 2022-03-21T21:29:41.000Z | from aim.storage.types import * # noqa F401
| 22.5 | 44 | 0.733333 |
29e52b7a03150a104462d917259c77ab4b997841 | 34,234 | py | Python | travello/views.py | KaushikAlwala/COVID-19---a-DBMS-approach | 66af73c92bd33d134d4353e0e1e34ab165e1529b | [
"CC-BY-3.0"
] | null | null | null | travello/views.py | KaushikAlwala/COVID-19---a-DBMS-approach | 66af73c92bd33d134d4353e0e1e34ab165e1529b | [
"CC-BY-3.0"
] | null | null | null | travello/views.py | KaushikAlwala/COVID-19---a-DBMS-approach | 66af73c92bd33d134d4353e0e1e34ab165e1529b | [
"CC-BY-3.0"
] | null | null | null | from django.shortcuts import render
from .models import Destination
from .models import Daily_cases
from .models import people
from .models import people3
from .models import victims
from .models import Travel_history
import psycopg2
# Create your views here.
def index(request):
return render(reques... | 49.686502 | 269 | 0.60361 |
d616e41be0ea8901b26b2beb53e41bbb12ebe211 | 2,314 | py | Python | oas_erf/util/eusaar_data/histc_vars.py | sarambl/OAS-ERF | 7510c21a630748eda2961608166227ad77935a67 | [
"MIT"
] | null | null | null | oas_erf/util/eusaar_data/histc_vars.py | sarambl/OAS-ERF | 7510c21a630748eda2961608166227ad77935a67 | [
"MIT"
] | null | null | null | oas_erf/util/eusaar_data/histc_vars.py | sarambl/OAS-ERF | 7510c21a630748eda2961608166227ad77935a67 | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
import xarray as xr
from oas_erf.constants import path_eusaar_data
from oas_erf.util.eusaar_data import time_h, station_codes, long_name_var_dic, standard_varlist_histc, \
savepath_histc_vars
from oas_erf.util.eusaar_data.flags import load_gd
from oas_erf.util.prac... | 24.617021 | 104 | 0.672861 |
e68642a86744ff463f3b6765ac7a35d2f7eb5afe | 44,147 | py | Python | tools/management/commands/build_bias_data.py | AlibekMamyrbekov/protwis | b3d477b1982623618d995ab5c7f47c918a70238b | [
"Apache-2.0"
] | 3 | 2019-07-29T11:49:38.000Z | 2021-03-03T10:59:29.000Z | tools/management/commands/build_bias_data.py | AlibekMamyrbekov/protwis | b3d477b1982623618d995ab5c7f47c918a70238b | [
"Apache-2.0"
] | 1 | 2021-05-12T14:21:53.000Z | 2021-05-12T14:21:53.000Z | tools/management/commands/build_bias_data.py | AlibekMamyrbekov/protwis | b3d477b1982623618d995ab5c7f47c918a70238b | [
"Apache-2.0"
] | null | null | null | from decimal import Decimal
import logging
import math
import pandas as pd
import os
from build.management.commands.base_build import Command as BaseBuild
from ligand.models import BiasedExperiment, AnalyzedExperiment, AnalyzedAssay
from django.conf import settings
class Command(BaseBuild):
mylog = logging.getLog... | 50.110102 | 204 | 0.52665 |
8f1dd4b3fcea8841f1725ebadb2d6e995c47c438 | 74 | py | Python | plugins/openphish/komand_openphish/triggers/save_feed_file/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/openphish/komand_openphish/triggers/save_feed_file/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/openphish/komand_openphish/triggers/save_feed_file/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
from .trigger import SaveFeedFile
| 24.666667 | 39 | 0.783784 |
b9aff89920212d9537e9d1d11ae5861e1fbec7b7 | 12,926 | py | Python | oldp/apps/processing/content_processor.py | docsuleman/oldp | 8dcaa8e6e435794c872346b5014945ace885adb4 | [
"MIT"
] | 66 | 2018-05-07T12:34:39.000Z | 2022-02-23T20:14:24.000Z | oldp/apps/processing/content_processor.py | Justice-PLP-DHV/oldp | eadf235bb0925453d9a5b81963a0ce53afeb17fd | [
"MIT"
] | 68 | 2018-06-11T16:13:17.000Z | 2022-02-10T08:03:26.000Z | oldp/apps/processing/content_processor.py | Justice-PLP-DHV/oldp | eadf235bb0925453d9a5b81963a0ce53afeb17fd | [
"MIT"
] | 15 | 2018-06-23T19:41:13.000Z | 2021-08-18T08:21:49.000Z | import glob
import logging.config
import os
from enum import Enum
from importlib import import_module
from typing import List
from urllib.parse import parse_qsl
from django.conf import settings
from django.db.models import Model
from oldp.apps.processing.errors import ProcessingError
from oldp.apps.processing.process... | 37.25072 | 133 | 0.637397 |
6634df436895202bf7adc234f984525b4a52f919 | 3,427 | py | Python | src/compas/geometry/transformations/scale.py | funkchaser/compas | b58de8771484aa0c6068d43df78b1679503215de | [
"MIT"
] | 235 | 2017-11-07T07:33:22.000Z | 2022-03-25T16:20:00.000Z | src/compas/geometry/transformations/scale.py | funkchaser/compas | b58de8771484aa0c6068d43df78b1679503215de | [
"MIT"
] | 770 | 2017-09-22T13:42:06.000Z | 2022-03-31T21:26:45.000Z | src/compas/geometry/transformations/scale.py | funkchaser/compas | b58de8771484aa0c6068d43df78b1679503215de | [
"MIT"
] | 99 | 2017-11-06T23:15:28.000Z | 2022-03-25T16:05:36.000Z | """
This library for transformations partly derived and was re-implemented from the
following online resources:
* http://www.lfd.uci.edu/~gohlke/code/transformations.py.html
* http://www.euclideanspace.com/maths/geometry/rotations/
* http://code.activestate.com/recipes/578108-determinant-of-matrix-of-any-o... | 33.271845 | 84 | 0.618325 |
4381df39395ce49072d0f6451d7e48751d8baac7 | 10,201 | py | Python | datadog_checks_base/datadog_checks/base/utils/db/core.py | OuesFa/integrations-core | 0ffe4ca306580a2e775b515152384034c2dfdc03 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_base/datadog_checks/base/utils/db/core.py | OuesFa/integrations-core | 0ffe4ca306580a2e775b515152384034c2dfdc03 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_base/datadog_checks/base/utils/db/core.py | OuesFa/integrations-core | 0ffe4ca306580a2e775b515152384034c2dfdc03 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import logging
from itertools import chain
from typing import Any, Callable, Dict, List, Tuple
from datadog_checks.base import AgentCheck
from datadog_checks.base.utils.db.types import QueriesExecutor, Qu... | 40.480159 | 118 | 0.606901 |
1da7ff2c0066124e27700befb1c1944bacae8df5 | 5,621 | py | Python | autoops/settings.py | jiajipan/autoops | edd728cf5c40675828d8e135370b5a3f0d070d24 | [
"Apache-2.0"
] | 2 | 2019-09-12T07:14:26.000Z | 2020-05-26T15:07:53.000Z | autoops/settings.py | jiajipan/autoops | edd728cf5c40675828d8e135370b5a3f0d070d24 | [
"Apache-2.0"
] | null | null | null | autoops/settings.py | jiajipan/autoops | edd728cf5c40675828d8e135370b5a3f0d070d24 | [
"Apache-2.0"
] | null | null | null | #/usr/src/python3
# -*- coding: utf-8 -*-
"""
Django settings for autoops project.
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs... | 26.144186 | 92 | 0.667675 |
ccede5afa7c0446284976cb5d43cb77793a8f876 | 1,888 | py | Python | flatlatex/transliteration.py | jb-leger/flatlatex | 744afe3b6afa5b3b1996aad14d184af3a0590dfb | [
"BSD-2-Clause"
] | 4 | 2021-12-01T23:25:37.000Z | 2021-12-12T09:30:33.000Z | flatlatex/transliteration.py | jb-leger/flatlatex | 744afe3b6afa5b3b1996aad14d184af3a0590dfb | [
"BSD-2-Clause"
] | null | null | null | flatlatex/transliteration.py | jb-leger/flatlatex | 744afe3b6afa5b3b1996aad14d184af3a0590dfb | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2016, Jean-Benoist Leger <jb@leger.tf>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list ... | 40.170213 | 80 | 0.728814 |
9fe893242b4360fe80f3aa8e7ae202024b5402db | 6,034 | py | Python | tests/imprinting_evaluation_test.py | notaJiminLee/pycoral | d04eabadb69b57899c429d808633969444985ff2 | [
"Apache-2.0"
] | 1 | 2021-04-30T19:49:01.000Z | 2021-04-30T19:49:01.000Z | tests/imprinting_evaluation_test.py | notaJiminLee/pycoral | d04eabadb69b57899c429d808633969444985ff2 | [
"Apache-2.0"
] | null | null | null | tests/imprinting_evaluation_test.py | notaJiminLee/pycoral | d04eabadb69b57899c429d808633969444985ff2 | [
"Apache-2.0"
] | 1 | 2021-06-03T21:24:40.000Z | 2021-06-03T21:24:40.000Z | # Lint as: python3
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 39.437908 | 80 | 0.670036 |
5464a9f02415ec1f1b704a5fb0bbf29e52066acf | 155 | py | Python | preprocessing.py | saurabhghatnekar/Iris-dataset-practice | b3bdb842c51d3a18a4a2b4a44663f9bf901a9468 | [
"MIT"
] | null | null | null | preprocessing.py | saurabhghatnekar/Iris-dataset-practice | b3bdb842c51d3a18a4a2b4a44663f9bf901a9468 | [
"MIT"
] | null | null | null | preprocessing.py | saurabhghatnekar/Iris-dataset-practice | b3bdb842c51d3a18a4a2b4a44663f9bf901a9468 | [
"MIT"
] | null | null | null | import pandas as pd
from io import StringIO
csv_data = \
'''A,B,C,D
1.0,2.0,3.0,4.0
5.0,6.0,,8.0
10.0,11.0,12.0,'''
df = pd.read_csv(StringIO(csv_data))
| 14.090909 | 36 | 0.63871 |
0250f8486ed71d37b29d05c41524c9e87b6ba9c7 | 5,787 | py | Python | src/youtube.py | j3parker/playlists | 06710cf3ac5ed03f3280f4925284794184db021c | [
"CC0-1.0"
] | null | null | null | src/youtube.py | j3parker/playlists | 06710cf3ac5ed03f3280f4925284794184db021c | [
"CC0-1.0"
] | null | null | null | src/youtube.py | j3parker/playlists | 06710cf3ac5ed03f3280f4925284794184db021c | [
"CC0-1.0"
] | null | null | null | import google.oauth2.credentials
import google_auth_oauthlib.flow
import googleapiclient.discovery
import googleapiclient.errors
import model
import os
class Client:
"""Interface with YouTube for syncing playlists."""
def __init__(self, client):
self.client = client
self.placeholder_map = {}
... | 31.112903 | 76 | 0.507862 |
2bed9b36d5c6415119415401c03586363a01bbff | 8,037 | py | Python | friendly_ground_truth/view/light_theme.py | p2irc/friendly_ground_truth | 69415a435ff46d424bf204894a1691dd2e900fc6 | [
"MIT"
] | null | null | null | friendly_ground_truth/view/light_theme.py | p2irc/friendly_ground_truth | 69415a435ff46d424bf204894a1691dd2e900fc6 | [
"MIT"
] | 139 | 2020-02-23T16:42:10.000Z | 2021-07-26T23:19:53.000Z | friendly_ground_truth/view/light_theme.py | p2irc/friendly_ground_truth | 69415a435ff46d424bf204894a1691dd2e900fc6 | [
"MIT"
] | null | null | null | """
File Name: light_theme.py
Authors: Kyle Seidenthal
Date: 22-05-2020
Description: Light Theme
"""
from tkinter import ttk
colours = {
"toolbar_activate": "#ffde4d",
"pbar_colour": "#2640b5",
"link_colour": "#5978ff",
"bg_level_0": "#d9d9d9",
"fg_level... | 34.055085 | 73 | 0.393679 |
4aa0146947a7e097243416a89dfd3270d7fb67d1 | 3,226 | py | Python | fake-data.py | zack-klein/multi-tenant-sqlalchemy | 99c512be840d99706c32223eeb89b5113615179e | [
"MIT"
] | 3 | 2020-12-21T21:09:05.000Z | 2021-02-01T06:10:06.000Z | fake-data.py | zack-klein/multi-tenant-sqlalchemy | 99c512be840d99706c32223eeb89b5113615179e | [
"MIT"
] | null | null | null | fake-data.py | zack-klein/multi-tenant-sqlalchemy | 99c512be840d99706c32223eeb89b5113615179e | [
"MIT"
] | null | null | null | from faker import Faker
from flask import current_app
from flask_appbuilder.security.sqla.models import Role, User
from random import choice, randint
from tqdm import tqdm
from werkzeug.security import generate_password_hash
from app import app
from app.database import db
from app.models import Post, Tenant
def a... | 27.109244 | 78 | 0.606634 |
91dc94682bac3b8f91c5b96f6b1f4d3f8e57186e | 611 | py | Python | smsapigateway.py | tivisse/yogame | a6de2789febf43958ed48bcf4c35f81900262b7a | [
"BSD-2-Clause"
] | 2 | 2016-03-22T13:36:22.000Z | 2016-03-22T13:37:17.000Z | smsapigateway.py | tivisse/yogame | a6de2789febf43958ed48bcf4c35f81900262b7a | [
"BSD-2-Clause"
] | null | null | null | smsapigateway.py | tivisse/yogame | a6de2789febf43958ed48bcf4c35f81900262b7a | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import urllib2
from urlparse import urlparse
from urllib import quote
class SMSAPIGateway(object):
PASS_MD5 = '85d9ee56e9927912119fbc89de2eb22e'
USERNAME = 'username'
URL = 'https://ssl.smsapi.pl/sms.do?'
TO = '0032471071323'
def send(self, msg):
url = '%susername=%s&passwor... | 26.565217 | 78 | 0.657938 |
e81f8b1a30832ba7c4ae67bcadc94a48a22c8d68 | 2,531 | py | Python | Algo and DSA/LeetCode-Solutions-master/Python/shortest-palindrome.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 3,269 | 2018-10-12T01:29:40.000Z | 2022-03-31T17:58:41.000Z | Algo and DSA/LeetCode-Solutions-master/Python/shortest-palindrome.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 53 | 2018-12-16T22:54:20.000Z | 2022-02-25T08:31:20.000Z | Algo and DSA/LeetCode-Solutions-master/Python/shortest-palindrome.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 1,236 | 2018-10-12T02:51:40.000Z | 2022-03-30T13:30:37.000Z | # Time: O(n)
# Space: O(n)
# optimized from Solution2
class Solution(object):
def shortestPalindrome(self, s):
"""
:type s: str
:rtype: str
"""
def getPrefix(pattern):
prefix = [-1] * len(pattern)
j = -1
for i in xrange(1, len(pattern)):
... | 25.565657 | 81 | 0.41288 |
22160d7ba65bccacf6f5e8eb006a656428d9d199 | 937 | py | Python | tests/nn/pipe_process/__init__.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1,662 | 2020-07-15T21:40:19.000Z | 2022-03-31T10:45:12.000Z | tests/nn/pipe_process/__init__.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | 648 | 2020-07-21T19:00:32.000Z | 2022-03-30T23:11:41.000Z | tests/nn/pipe_process/__init__.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | 170 | 2020-07-16T00:28:01.000Z | 2022-03-15T19:39:21.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
# Copyright 2019 Kakao Brain
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this f... | 42.590909 | 98 | 0.769477 |
6897ea66bbd379f8199ee09c53bd780db61ebc95 | 321 | py | Python | atlas/__init__.py | animesh/atlas | 7c744f9ccaaa0ebf2845b4331969b2fff82575e3 | [
"BSD-3-Clause"
] | null | null | null | atlas/__init__.py | animesh/atlas | 7c744f9ccaaa0ebf2845b4331969b2fff82575e3 | [
"BSD-3-Clause"
] | null | null | null | atlas/__init__.py | animesh/atlas | 7c744f9ccaaa0ebf2845b4331969b2fff82575e3 | [
"BSD-3-Clause"
] | null | null | null | __version__ = "2.6a2"
from .scripts import utils
TAX_LEVELS = ["superkingdom", "phylum", "class", "order", "family", "genus", "species"]
BLAST6 = [
"qseqid",
"sseqid",
"pident",
"length",
"mismatch",
"gapopen",
"qstart",
"qend",
"sstart",
"send",
"evalue",
"bitscore",
]... | 16.05 | 87 | 0.535826 |
e0f7d634c64a75ddd28ac0bcc1edcb79c8c25f7a | 961 | py | Python | algopro/k_biggest_elem.py | Mifour/Algorithms | 77cfafc49bc0130da0f6041b169a15053f81af87 | [
"MIT"
] | null | null | null | algopro/k_biggest_elem.py | Mifour/Algorithms | 77cfafc49bc0130da0f6041b169a15053f81af87 | [
"MIT"
] | null | null | null | algopro/k_biggest_elem.py | Mifour/Algorithms | 77cfafc49bc0130da0f6041b169a15053f81af87 | [
"MIT"
] | null | null | null | import heapq
import random
"""
Soution from AlgoPro
"""
def findKthLargest(nums, k):
return sorted(nums)[len(nums) - k]
def findKthLargest2(nums, k):
return heapq.nlargest(k, nums)[-1]
def findKthLargest3(nums, k):
def select(list, l, r, index):
if l == r:
return list[l]
pivot_index = random.ran... | 23.439024 | 59 | 0.58897 |
429729dc4c2cad61907c2bb12ddf7a643ddd8222 | 19,073 | py | Python | util/minGenome.py | Spherotob/iJL208 | 3a0e878963f46742cc9c973327dd24028f67a4d3 | [
"MIT"
] | 4 | 2020-12-07T04:32:34.000Z | 2021-07-20T17:42:49.000Z | util/minGenome.py | Spherotob/iJL208 | 3a0e878963f46742cc9c973327dd24028f67a4d3 | [
"MIT"
] | null | null | null | util/minGenome.py | Spherotob/iJL208 | 3a0e878963f46742cc9c973327dd24028f67a4d3 | [
"MIT"
] | 1 | 2021-01-15T13:26:00.000Z | 2021-01-15T13:26:00.000Z | ###########################
### SOLVING FOR iJL208 ###
###########################
import json
import pandas as pd
import pulp
import itertools
import pdb
import re
import os
from tqdm import tqdm
def build_MIP_by_Cobrapy(model, growth_rate, essential_genes_file, parameters_file, regulator_genes_file, TU_Json_file, ou... | 42.764574 | 196 | 0.531275 |
1e85a2c32a4b035641275ebdb0f9d2fbe58b6e99 | 499 | py | Python | p3.py | geetharamson/problemset-pands | 16fff4c8feea674232c03d96881196c866318e93 | [
"Apache-2.0"
] | null | null | null | p3.py | geetharamson/problemset-pands | 16fff4c8feea674232c03d96881196c866318e93 | [
"Apache-2.0"
] | null | null | null | p3.py | geetharamson/problemset-pands | 16fff4c8feea674232c03d96881196c866318e93 | [
"Apache-2.0"
] | null | null | null | # Geetha Karthikesan ,2019
# divisors.py
#program to output nos between 1000 & 10000 divisible by 6 not 12
# Using for loop to set n is the no ranging from 1000 to 10000
for n in range (1000, 10000):
# checking if the no is completely divisible by 6 and not divisible by 12 based on their remainders
if n... | 29.352941 | 103 | 0.653307 |
f83f3eeff2925906fb987a4084595eed43f740ed | 2,786 | py | Python | python_roms_modules/emooring.py | NoeLahaye/InTideScat_JGR | 6849e82b3cda816ca7bdc6ab207e2c857a3f5f5f | [
"CC0-1.0"
] | null | null | null | python_roms_modules/emooring.py | NoeLahaye/InTideScat_JGR | 6849e82b3cda816ca7bdc6ab207e2c857a3f5f5f | [
"CC0-1.0"
] | null | null | null | python_roms_modules/emooring.py | NoeLahaye/InTideScat_JGR | 6849e82b3cda816ca7bdc6ab207e2c857a3f5f5f | [
"CC0-1.0"
] | null | null | null | from netCDF4 import Dataset
import numpy as np
class emooring(object):
""" class containing all variables from a virtual mooring taken from a simulation
copy variables data ("ndplusArray" instance objects) and some meta_informations """
def __init__(self,ncfile,itmin=None,itmax=None):
nc = Da... | 37.648649 | 90 | 0.570711 |
bf2ffade5340ea9139f48c7a5cca2fb7aa149ab2 | 1,131 | py | Python | python/twicorder/web/migrations/versions/2b7189e2db00_users_table.py | thimic/twicorder | f3ae11501f5e9fa6b7eecefcf2a652e99c711bc0 | [
"MIT"
] | 2 | 2020-01-22T23:22:50.000Z | 2020-02-02T05:56:08.000Z | python/twicorder/web/migrations/versions/2b7189e2db00_users_table.py | thimic/twicorder | f3ae11501f5e9fa6b7eecefcf2a652e99c711bc0 | [
"MIT"
] | 1 | 2018-03-28T19:53:11.000Z | 2018-03-28T19:53:11.000Z | python/twicorder/web/migrations/versions/2b7189e2db00_users_table.py | thimic/twicorder | f3ae11501f5e9fa6b7eecefcf2a652e99c711bc0 | [
"MIT"
] | null | null | null | """users table
Revision ID: 2b7189e2db00
Revises:
Create Date: 2020-07-29 22:46:06.005235
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2b7189e2db00'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto genera... | 29 | 80 | 0.678161 |
a490d02cf6d5ea29e82cfc273c4d7115d1a767b2 | 2,495 | py | Python | official_examples/技能模板/Static_Gesture_Recognition_Template/index.py | huaweicloud/HiLens-Lab | 2b0613db2a40ec86c267bc69076e9fb7987fc610 | [
"Apache-2.0"
] | 31 | 2020-01-09T11:11:35.000Z | 2022-02-25T06:19:19.000Z | official_examples/技能模板/Static_Gesture_Recognition_Template/index.py | huaweicloud/HiLens-Lab | 2b0613db2a40ec86c267bc69076e9fb7987fc610 | [
"Apache-2.0"
] | null | null | null | official_examples/技能模板/Static_Gesture_Recognition_Template/index.py | huaweicloud/HiLens-Lab | 2b0613db2a40ec86c267bc69076e9fb7987fc610 | [
"Apache-2.0"
] | 12 | 2020-01-09T16:00:32.000Z | 2021-05-24T07:33:08.000Z | #! /usr/bin/python3.7
import os
import cv2
import time
import numpy as np
import hilens
from utils import *
def run():
# 配置系统日志级别
hilens.set_log_level(hilens.ERROR)
# 系统初始化,参数要与创建技能时填写的检验值保持一致
hilens.init("gesture")
# 初始化模型
gesture_model_path = hilens.get_model_dir() + "gesture_temp... | 30.426829 | 83 | 0.581964 |
7c954dd76f1e7dd230ee298de2cb2597f8953fb3 | 2,297 | py | Python | commands/textchannels.py | nstra111/autovc | e73e1fea7b566721c3dce3ca6f587472e7ee9d1b | [
"MIT"
] | 177 | 2020-02-02T18:03:46.000Z | 2022-03-17T06:18:43.000Z | commands/textchannels.py | zigsphere/Auto-Voice-Channels | 6ae901728580bef4246737a6f1b9f10763badd3e | [
"MIT"
] | 82 | 2020-02-02T17:43:18.000Z | 2022-03-24T20:34:55.000Z | commands/textchannels.py | zigsphere/Auto-Voice-Channels | 6ae901728580bef4246737a6f1b9f10763badd3e | [
"MIT"
] | 165 | 2019-02-17T20:15:20.000Z | 2022-03-27T23:59:23.000Z | import utils
from commands.base import Cmd
help_text = [
[
("Usage:", "<PREFIX><COMMAND>"),
("Description:",
"Toggle whether or not to create temporary private text channels for each voice chat, "
"for people to spam links, music bot commands, `/tts` commands, or for people withou... | 45.94 | 120 | 0.659556 |
18dc623b229c2191726ab19bd983ac1a353f200a | 2,819 | py | Python | cleverhans/utils_pytorch.py | industrysc/cleverhans | 5ff7e42fc5379ba7dc9972f3dc85930e49b7f729 | [
"MIT"
] | 10 | 2017-06-09T00:54:11.000Z | 2021-07-07T14:44:02.000Z | cleverhans/utils_pytorch.py | industrysc/cleverhans | 5ff7e42fc5379ba7dc9972f3dc85930e49b7f729 | [
"MIT"
] | 1 | 2018-11-18T17:33:42.000Z | 2018-11-18T17:33:42.000Z | cleverhans/utils_pytorch.py | industrysc/cleverhans | 5ff7e42fc5379ba7dc9972f3dc85930e49b7f729 | [
"MIT"
] | 7 | 2017-06-06T17:18:29.000Z | 2021-02-15T11:40:46.000Z | """Basic utilities for pytorch code"""
from random import getrandbits
import tensorflow as tf
import torch
from torch.autograd import Variable
# https://gist.github.com/kingspp/3ec7d9958c13b94310c1a365759aa3f4
# Pyfunc Gradient Function
def _py_func_with_gradient(func, inp, Tout, stateful=True, name=None,
... | 31.674157 | 74 | 0.674353 |
67563af8924b9179c2eff923c1b0a2dcae7fa3b0 | 5,550 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/stat/ns/nslimitidentifier_stats.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/stat/ns/nslimitidentifier_stats.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/stat/ns/nslimitidentifier_stats.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2021 Citrix Systems, 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... | 25.694444 | 140 | 0.708829 |
09eabdd060d5be264e5f10529d38b3c7a7a92ca6 | 831 | py | Python | src/api/modules/tumblr_manager.py | jelly-ape/dts_server | e770e7fc5b960f551f6008f70388ab63e98f876b | [
"MIT"
] | null | null | null | src/api/modules/tumblr_manager.py | jelly-ape/dts_server | e770e7fc5b960f551f6008f70388ab63e98f876b | [
"MIT"
] | null | null | null | src/api/modules/tumblr_manager.py | jelly-ape/dts_server | e770e7fc5b960f551f6008f70388ab63e98f876b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import pymongo
import os
try:
import ujson as json
except ImportError:
import json
import api.libs.utils
@api.libs.utils.singleton
class TumblrManager(object):
def __init__(self):
self._photos = self.__load()
def __load(self):
photos = ... | 21.868421 | 55 | 0.540313 |
d69f0df8984a73c116e5f517cee5a519e104a123 | 2,859 | py | Python | flagstatus.py | FlyBoy8869/flagstatus | fae205aa63957ab926f1164f845755f08a446d9c | [
"MIT"
] | null | null | null | flagstatus.py | FlyBoy8869/flagstatus | fae205aa63957ab926f1164f845755f08a446d9c | [
"MIT"
] | null | null | null | flagstatus.py | FlyBoy8869/flagstatus | fae205aa63957ab926f1164f845755f08a446d9c | [
"MIT"
] | null | null | null | from datetime import date
from enum import Enum
from tkinter import *
from tkinter import ttk
import requests
from PIL import Image, ImageTk
from tkinter_helpers import center
URL = "https://www.nh.gov/index.htm"
MARKER_1 = "icon-flag"
MARKER_2 = "full"
HTML_COMMENT_START = "<!--"
HTML_COMMENT_END = "-->"
# date fo... | 24.86087 | 89 | 0.685904 |
bd49d2245a2a07d39902fe19ce72d64f5516831f | 6,627 | py | Python | scripts/addons/RetopoFlow/retopoflow/rftool_strokes/strokes_utils.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | 1,600 | 2015-03-19T12:26:15.000Z | 2022-03-30T21:07:37.000Z | retopoflow/rftool_strokes/strokes_utils.py | Varelshen/retopoflow | 5e9fd7ff65e7a5a64bf3078c78fb71cc270fdb71 | [
"OML"
] | 1,026 | 2015-03-18T22:17:42.000Z | 2022-03-28T17:47:04.000Z | retopoflow/rftool_strokes/strokes_utils.py | Varelshen/retopoflow | 5e9fd7ff65e7a5a64bf3078c78fb71cc270fdb71 | [
"OML"
] | 241 | 2015-03-19T13:44:36.000Z | 2022-03-30T21:07:39.000Z | '''
Copyright (C) 2021 CG Cookie
http://cgcookie.com
hello@cgcookie.com
Created by Jonathan Denning, Jonathan Williamson
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 3 ... | 33.469697 | 147 | 0.56813 |
a6c4773c55a956ac11906f5904ca5a702b588514 | 621 | py | Python | Eso.API.Discovery/integration/execution_queue_handler.py | afgbeveridge/EsotericLanguagesToolkit | 05f391f5c03c9fc7dd60f7f4ef89e480315dc1bc | [
"MIT"
] | 1 | 2021-07-14T23:39:19.000Z | 2021-07-14T23:39:19.000Z | Eso.API.Discovery/integration/execution_queue_handler.py | afgbeveridge/EsotericLanguagesToolkit | 05f391f5c03c9fc7dd60f7f4ef89e480315dc1bc | [
"MIT"
] | null | null | null | Eso.API.Discovery/integration/execution_queue_handler.py | afgbeveridge/EsotericLanguagesToolkit | 05f391f5c03c9fc7dd60f7f4ef89e480315dc1bc | [
"MIT"
] | null | null | null |
import json
from json.decoder import JSONDecodeError
import datetime
import io
from constants import *
from repos.language_repository import LanguageRepository
from integration.abstract_queue_handler import AbstractQueueHandler
class ExecutionQueueHandler(AbstractQueueHandler):
def __init__(self, nature):
... | 27 | 76 | 0.753623 |
22fc9c5473a1f92e49cec12d524d0bf526b73f24 | 1,200 | py | Python | yellow_club_project/yellow_site/migrations/0003_auto_20200629_0721.py | yellow-club/yellow_site | 03999920d43877cbc54788aa2821d0c39b3c591e | [
"MIT"
] | null | null | null | yellow_club_project/yellow_site/migrations/0003_auto_20200629_0721.py | yellow-club/yellow_site | 03999920d43877cbc54788aa2821d0c39b3c591e | [
"MIT"
] | 2 | 2020-06-28T11:18:12.000Z | 2020-06-30T12:58:21.000Z | yellow_club_project/yellow_site/migrations/0003_auto_20200629_0721.py | yellow-club/yellow_site | 03999920d43877cbc54788aa2821d0c39b3c591e | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-06-29 07:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('yellow_site', '0002_auto_20200627_1450'),
]
operations = [
migrations.AlterModelOptions(
name='post',
options={'orde... | 28.571429 | 109 | 0.5575 |
6340e9418a4530f0736dfbf3f441c5afdf8f3247 | 1,586 | py | Python | test/azure/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/models/parameter_grouping_post_required_parameters_py3.py | iscai-msft/autorest.python | a9f38dd762fbc046ce6197bfabea2f56045d2957 | [
"MIT"
] | null | null | null | test/azure/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/models/parameter_grouping_post_required_parameters_py3.py | iscai-msft/autorest.python | a9f38dd762fbc046ce6197bfabea2f56045d2957 | [
"MIT"
] | null | null | null | test/azure/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/models/parameter_grouping_post_required_parameters_py3.py | iscai-msft/autorest.python | a9f38dd762fbc046ce6197bfabea2f56045d2957 | [
"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 ... | 33.041667 | 106 | 0.580076 |
d09d4f443faa0fb33e47e7e4fe5e8fff220ac10e | 1,632 | py | Python | frosted/test/test_noqa.py | magro11/frosted | bd05f782d9bee62379b8447dd4dcb2818f7f2142 | [
"MIT"
] | 59 | 2015-01-05T19:23:58.000Z | 2018-05-11T09:42:53.000Z | frosted/test/test_noqa.py | magro11/frosted | bd05f782d9bee62379b8447dd4dcb2818f7f2142 | [
"MIT"
] | 5 | 2015-09-15T03:57:22.000Z | 2017-12-27T16:17:53.000Z | frosted/test/test_noqa.py | magro11/frosted | bd05f782d9bee62379b8447dd4dcb2818f7f2142 | [
"MIT"
] | 10 | 2015-01-27T10:37:10.000Z | 2018-03-05T19:10:44.000Z | from frosted import messages as m
from frosted.api import _noqa_lines, _re_noqa, check
from frosted.reporter import Reporter
from .utils import LoggingReporter, flakes
def test_regex():
# simple format
assert _re_noqa.search('#noqa')
assert _re_noqa.search('# noqa')
# simple format is strict, must be... | 30.222222 | 92 | 0.679534 |
f1bc5abc818df13b291097ac4a0f9080c9e2a5b2 | 4,795 | py | Python | tests/stats_manager_tests.py | aweimeow/enodebd | e1cd20693153e6b85e5d1bf9d21af2501c358601 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/stats_manager_tests.py | aweimeow/enodebd | e1cd20693153e6b85e5d1bf9d21af2501c358601 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/stats_manager_tests.py | aweimeow/enodebd | e1cd20693153e6b85e5d1bf9d21af2501c358601 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # SPDX-FileCopyrightText: 2020 The Magma Authors.
# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
#
# SPDX-License-Identifier: BSD-3-Clause
from unittest import TestCase, mock
from xml.etree import ElementTree
import pkg_resources
from enodebd import metrics
from data_models.dat... | 40.294118 | 87 | 0.672576 |
757bf5846bd3969b78e5d71845cb2f69cb379c42 | 588 | py | Python | OpenAPI/api/tools/prestarter.py | eleldar/Translator | 33e41e545d63c2319cdf74284230f6ca70a3e9e7 | [
"MIT"
] | null | null | null | OpenAPI/api/tools/prestarter.py | eleldar/Translator | 33e41e545d63c2319cdf74284230f6ca70a3e9e7 | [
"MIT"
] | null | null | null | OpenAPI/api/tools/prestarter.py | eleldar/Translator | 33e41e545d63c2319cdf74284230f6ca70a3e9e7 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
import codecs
drive, path_and_file = os.path.splitdrive(Path(__file__).absolute())
path, _ = os.path.split(path_and_file)
curdir = os.path.join(drive, path)
files_path = os.path.join(curdir, 'prestart_examples')
def examples(direct):
language_id = direct.split('-')[0]
file =... | 26.727273 | 68 | 0.668367 |
f55e63940184a65bde15d4ff755e62803206043f | 18,539 | py | Python | autotest/utilities/test_ogrinfo.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | null | null | null | autotest/utilities/test_ogrinfo.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | null | null | null | autotest/utilities/test_ogrinfo.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: ogrinfo testing
# Author: Even Rouault <even dot rouault @ mines-paris dot org>
#
########################################################... | 32.639085 | 177 | 0.587788 |
3b2c805bec1393566901d694bb93b78f8c6fe545 | 394 | py | Python | museum_api/urls.py | DrDos0016/museum-of-zzt | 0caa1cbeb2e0ab22206e72bc4ecf4c1b66c25fc4 | [
"MIT"
] | 2 | 2020-01-05T08:32:51.000Z | 2021-07-27T06:36:40.000Z | museum_api/urls.py | DrDos0016/museum-of-zzt | 0caa1cbeb2e0ab22206e72bc4ecf4c1b66c25fc4 | [
"MIT"
] | 26 | 2020-02-11T22:10:43.000Z | 2022-02-03T20:54:08.000Z | museum_api/urls.py | DrDos0016/museum-of-zzt | 0caa1cbeb2e0ab22206e72bc4ecf4c1b66c25fc4 | [
"MIT"
] | null | null | null | from django.urls import path
import museum_api.endpoints
urlpatterns = [
path("worlds-of-zzt/", museum_api.endpoints.worlds_of_zzt, name="api_wozzt"),
path("v1/get/file/", museum_api.endpoints.get_file, name="api_get_file"),
path("v1/help/", museum_api.endpoints.help, name="api_help"),
path("v1/searc... | 32.833333 | 89 | 0.733503 |
8774ba3de9d084ca883a12f97c8df3c5a1f9be8a | 7,083 | py | Python | pytablereader/csv/core.py | sthagen/thombashi-pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 81 | 2017-03-18T02:57:29.000Z | 2022-03-26T16:54:59.000Z | pytablereader/csv/core.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 4 | 2017-08-09T14:58:48.000Z | 2020-04-17T12:59:29.000Z | pytablereader/csv/core.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 11 | 2017-05-02T16:23:59.000Z | 2021-12-10T15:05:39.000Z | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import csv
import io
import warnings
import typepy
from mbstrdecoder import MultiByteStrDecoder
from pytablereader import DataError
from .._common import get_file_encoding
from .._constant import TableNameTemplate as tnt
from .._logger import F... | 29.760504 | 93 | 0.585486 |
ff94e44306b17bcfe72a1f62095067b676385cae | 1,932 | py | Python | tensor2tensor/data_generators/audio_test.py | SamuelmsWong/tensor2tensor | 7172ad8dc5f1d8f8c0e21cbb831ae2657387a2af | [
"Apache-2.0"
] | 3 | 2021-01-19T20:21:15.000Z | 2021-01-19T21:36:37.000Z | tensor2tensor/data_generators/audio_test.py | SamuelmsWong/tensor2tensor | 7172ad8dc5f1d8f8c0e21cbb831ae2657387a2af | [
"Apache-2.0"
] | null | null | null | tensor2tensor/data_generators/audio_test.py | SamuelmsWong/tensor2tensor | 7172ad8dc5f1d8f8c0e21cbb831ae2657387a2af | [
"Apache-2.0"
] | 1 | 2021-05-03T17:34:21.000Z | 2021-05-03T17:34:21.000Z | # coding=utf-8
# Copyright 2020 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... | 31.672131 | 75 | 0.710145 |
5aee13bb4438e8b32d22316f5acb1ec9332c9fbf | 19,233 | py | Python | autoaugment.py | rosinality/vision-transformers-pytorch | b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f | [
"MIT"
] | 77 | 2021-04-03T06:44:19.000Z | 2021-07-07T07:05:01.000Z | autoaugment.py | rosinality/vision-transformers-pytorch | b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f | [
"MIT"
] | 1 | 2021-04-08T06:59:41.000Z | 2021-04-08T11:20:32.000Z | autoaugment.py | rosinality/vision-transformers-pytorch | b884b5da79900c96e4ce17fbb575cf1c5cb3cd5f | [
"MIT"
] | 6 | 2021-04-15T13:36:37.000Z | 2022-02-03T12:32:20.000Z | import random
import math
import torch
from PIL import Image, ImageOps, ImageEnhance, ImageDraw
from torchvision.transforms import functional as F
import transforms
from transforms import check_prob, PIL_INTER_MAP, RandomTransform
def rescale_float(level, max_val, param_max=10):
return float(level) ... | 28.325479 | 119 | 0.578901 |
fc4b200914fc5b2f27202d342d2a2b0c08caa342 | 7,020 | py | Python | hplip-3.20.3/levels.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | null | null | null | hplip-3.20.3/levels.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | 1 | 2021-11-20T16:33:39.000Z | 2021-11-20T16:33:39.000Z | hplip-3.20.3/levels.py | Deril-Pana/wikiBlackcoinNL | 9633307f0b485c27feae5da242944adf450e8963 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- 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... | 33.270142 | 120 | 0.569088 |
5732f4a8ad70e684c865c19dac06c365c19865af | 660 | py | Python | portxpress/users/tests/test_urls.py | zoeinola/PortXpress | c69d9071e36a87942c3bba63a3ef079d06fe7baf | [
"MIT"
] | null | null | null | portxpress/users/tests/test_urls.py | zoeinola/PortXpress | c69d9071e36a87942c3bba63a3ef079d06fe7baf | [
"MIT"
] | null | null | null | portxpress/users/tests/test_urls.py | zoeinola/PortXpress | c69d9071e36a87942c3bba63a3ef079d06fe7baf | [
"MIT"
] | null | null | null | import pytest
from django.urls import resolve, reverse
from portxpress.users.models import User
pytestmark = pytest.mark.django_db
def test_detail(user: User):
assert (
reverse("users:detail", kwargs={"username": user.username})
== f"/users/{user.username}/"
)
assert resolve(f"/users/{us... | 26.4 | 74 | 0.677273 |
ba3576e3933e8a81e662bbb41c57c494fb0e2401 | 2,467 | py | Python | scripts/perf/perf_kit/memory.py | troywinter/airflow | ba66ba0d97941c55d9f00f66329a9d3c7ad673e7 | [
"Apache-2.0"
] | 3 | 2015-08-25T13:56:44.000Z | 2020-03-21T10:26:58.000Z | scripts/perf/perf_kit/memory.py | troywinter/airflow | ba66ba0d97941c55d9f00f66329a9d3c7ad673e7 | [
"Apache-2.0"
] | 37 | 2020-07-21T07:50:02.000Z | 2022-03-29T22:31:28.000Z | scripts/perf/perf_kit/memory.py | vuppalli/airflow | dfe8337ca2d3ed173d9ecc112938271519792c40 | [
"Apache-2.0"
] | 4 | 2020-07-17T14:02:28.000Z | 2022-02-23T04:29:58.000Z | # 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... | 29.722892 | 97 | 0.679773 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.