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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
085032988e88ff97c5e5625045b5cdf1e156b81f | 2,273 | py | Python | examples/ad_manager/v201908/creative_wrapper_service/create_creative_wrappers.py | ale180192/googleads-python-lib | 783a2d40a49956fb16ed73280708f6f9e322aa09 | [
"Apache-2.0"
] | 1 | 2019-09-30T06:36:07.000Z | 2019-09-30T06:36:07.000Z | examples/ad_manager/v201908/creative_wrapper_service/create_creative_wrappers.py | ale180192/googleads-python-lib | 783a2d40a49956fb16ed73280708f6f9e322aa09 | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v201908/creative_wrapper_service/create_creative_wrappers.py | ale180192/googleads-python-lib | 783a2d40a49956fb16ed73280708f6f9e322aa09 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 35.515625 | 80 | 0.741311 |
10c0206a91fdcfd871718c9bd97e7a95eeb4e53a | 1,982 | py | Python | examples/pygame_test.py | starsflower/human-interface | f6b03d95b2a903eeae2c1969b65837421b27401f | [
"MIT"
] | null | null | null | examples/pygame_test.py | starsflower/human-interface | f6b03d95b2a903eeae2c1969b65837421b27401f | [
"MIT"
] | null | null | null | examples/pygame_test.py | starsflower/human-interface | f6b03d95b2a903eeae2c1969b65837421b27401f | [
"MIT"
] | null | null | null | import pygame
from pygame import color
from src.cluster_detection import ClusterDetection
from . import colors
# Get center of Color Detection rect
def center(rect):
return [(rect[0] + rect[2]) / 2, (rect[1] + rect[3]) / 2]
# Dimensions
width = 900
height = 800
# Initailize pygame
pygame.init()
screen = pygame.... | 27.150685 | 102 | 0.585772 |
21d7f8d780ea90cae0dc5daf7c85afb01b7cbfff | 11,617 | py | Python | eZmaxApi/model/activesession_get_current_v1_response_all_of.py | eZmaxinc/eZmax-SDK-python | 5b4d54b69db68aab8ee814a1e26460a0af03784e | [
"MIT"
] | null | null | null | eZmaxApi/model/activesession_get_current_v1_response_all_of.py | eZmaxinc/eZmax-SDK-python | 5b4d54b69db68aab8ee814a1e26460a0af03784e | [
"MIT"
] | null | null | null | eZmaxApi/model/activesession_get_current_v1_response_all_of.py | eZmaxinc/eZmax-SDK-python | 5b4d54b69db68aab8ee814a1e26460a0af03784e | [
"MIT"
] | null | null | null | """
eZmax API Definition
This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501
The version of the OpenAPI document: 1.1.3
Contact: support-api@ezmax.ca
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from ... | 43.185874 | 121 | 0.582681 |
f197f072dec12000ec2e9030981d1d9fbc5b2455 | 801 | py | Python | community_detection/group_segments/helper_functions/pipeline_newcall.py | etherlabsio/hinton | eedd99f6a5fbbc38283bbf945dff4f4006a3d1f5 | [
"MIT"
] | null | null | null | community_detection/group_segments/helper_functions/pipeline_newcall.py | etherlabsio/hinton | eedd99f6a5fbbc38283bbf945dff4f4006a3d1f5 | [
"MIT"
] | null | null | null | community_detection/group_segments/helper_functions/pipeline_newcall.py | etherlabsio/hinton | eedd99f6a5fbbc38283bbf945dff4f4006a3d1f5 | [
"MIT"
] | 1 | 2020-04-19T11:08:02.000Z | 2020-04-19T11:08:02.000Z | import sys, json
sys.path.append("../") # grouping functions main.py file location
sys.path.append("/home/ray__/ssd/BERT/") # gpt model utils location
sys.path.append("/home/ray__/CS/org/etherlabs/ai-engine/pkg/") # ai-engine pkg location
from gpt_feat_utils import GPT_Inference
gpt_model = GPT_Inference("/home/ray__... | 34.826087 | 117 | 0.697878 |
b221375f8a24733a4dcf6b7ee66e09d297aea31e | 328 | py | Python | ca_qc_kirkland/__init__.py | tor-councilmatic/scrapers-ca | 821be4ccfc4f5aef3f8272b626b031e225aef7ee | [
"MIT"
] | 2 | 2017-06-02T09:41:28.000Z | 2017-11-17T15:27:07.000Z | ca_qc_kirkland/__init__.py | tor-councilmatic/scrapers-ca | 821be4ccfc4f5aef3f8272b626b031e225aef7ee | [
"MIT"
] | null | null | null | ca_qc_kirkland/__init__.py | tor-councilmatic/scrapers-ca | 821be4ccfc4f5aef3f8272b626b031e225aef7ee | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from utils import CanadianJurisdiction
class Kirkland(CanadianJurisdiction):
classification = 'legislature'
division_id = 'ocd-division/country:ca/csd:2466102'
division_name = 'Kirkland'
name = 'Conseil municipal de Kirkland'
url = 'http://www.ville.kirkland... | 29.818182 | 55 | 0.756098 |
21ddd63b8e7966e76fed7b2a8700acd44e83f9a2 | 28,843 | py | Python | player.py | Princ3x/ddmbot | 088eb6b46447a1ec184b1bc7fea493b66ee35284 | [
"MIT"
] | 8 | 2016-12-13T17:52:51.000Z | 2019-06-23T22:11:42.000Z | player.py | Princ3x/ddmbot | 088eb6b46447a1ec184b1bc7fea493b66ee35284 | [
"MIT"
] | 13 | 2016-12-13T17:35:09.000Z | 2017-07-08T10:53:51.000Z | player.py | Princ3x/ddmbot | 088eb6b46447a1ec184b1bc7fea493b66ee35284 | [
"MIT"
] | 4 | 2016-12-13T17:52:53.000Z | 2019-01-01T17:43:33.000Z | import audioop
import asyncio
import enum
import errno
import fcntl
import functools
import logging
import os
import shlex
import subprocess
import threading
import time
from contextlib import suppress
from math import ceil
import discord.utils
import youtube_dl
from database.player import UnavailableSongError, Playe... | 40.796322 | 120 | 0.582672 |
f18e869de8a027c40b70993d1abb91546749eca3 | 1,228 | py | Python | modules/plugins/PABot/database.py | Kaosar-Symphony/SymphonyBot-Kaosar | 09047ef776ce529d254a2c99efca6005e8ddfe33 | [
"MIT"
] | null | null | null | modules/plugins/PABot/database.py | Kaosar-Symphony/SymphonyBot-Kaosar | 09047ef776ce529d254a2c99efca6005e8ddfe33 | [
"MIT"
] | null | null | null | modules/plugins/PABot/database.py | Kaosar-Symphony/SymphonyBot-Kaosar | 09047ef776ce529d254a2c99efca6005e8ddfe33 | [
"MIT"
] | null | null | null | import codecs
import json
import os
import sqlite3
_configPath = os.path.abspath('modules/plugins/PABot/config.json')
with codecs.open(_configPath, 'r', 'utf-8-sig') as json_file:
_config = json.load(json_file)
sqliteDBPath = os.path.abspath('modules/plugins/PABot/' + _config['databasePath'])
def InitDB():
... | 25.583333 | 82 | 0.62785 |
eb0bf5de1c4f79576670ebbb79aa10b9aeff3959 | 538 | py | Python | setup.py | AlvaroMolano/tuition | d6e9b55c1cf7a297895df748c481f8bdac4f0cdf | [
"CECILL-B"
] | null | null | null | setup.py | AlvaroMolano/tuition | d6e9b55c1cf7a297895df748c481f8bdac4f0cdf | [
"CECILL-B"
] | null | null | null | setup.py | AlvaroMolano/tuition | d6e9b55c1cf7a297895df748c481f8bdac4f0cdf | [
"CECILL-B"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('requirements.txt') as f:
install_requires = f.read().strip().split('\n')
# get version from __version__ variable in tuition/__init__.py
from tuition import __version__ as version
setup(
name='tuition',
version=version,
description='Ad... | 25.619048 | 62 | 0.765799 |
133d4eca6e935802b6d1d3d7de773724650f162b | 32,525 | py | Python | aries_cloudagent/protocols/issue_credential/v1_0/manager.py | brianorwhatever/aries-cloudagent-python | 9eb97df5956ed1156e6de353d87455b8df952483 | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/protocols/issue_credential/v1_0/manager.py | brianorwhatever/aries-cloudagent-python | 9eb97df5956ed1156e6de353d87455b8df952483 | [
"Apache-2.0"
] | 22 | 2021-02-13T18:48:53.000Z | 2021-04-27T07:29:50.000Z | aries_cloudagent/protocols/issue_credential/v1_0/manager.py | brianorwhatever/aries-cloudagent-python | 9eb97df5956ed1156e6de353d87455b8df952483 | [
"Apache-2.0"
] | 2 | 2021-02-19T17:53:37.000Z | 2021-02-19T17:56:48.000Z | """Classes to manage credentials."""
import asyncio
import json
import logging
from typing import Mapping, Tuple
from ....cache.base import BaseCache
from ....core.error import BaseError
from ....core.profile import Profile
from ....indy.holder import IndyHolder, IndyHolderError
from ....indy.issuer import IndyIssue... | 40.253713 | 89 | 0.603105 |
5b6ec64d3c9db99f444eb6a83fa9b645d499dcac | 1,446 | py | Python | src/robot/result/modeldeprecation.py | bradyarthur/RobotFramework | f45747dfec1095359379ba0088cecd955a83e576 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/result/modeldeprecation.py | bradyarthur/RobotFramework | f45747dfec1095359379ba0088cecd955a83e576 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/result/modeldeprecation.py | bradyarthur/RobotFramework | f45747dfec1095359379ba0088cecd955a83e576 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... | 21.58209 | 75 | 0.651452 |
77ff749ae58fe8ee41bac6a739f5c435b21e66a4 | 441 | py | Python | django_mercadopago/migrations/0021_remove_preference_item_fields.py | walterleonardo/django-mercadopago | f54cf28ff75909fc63ac0135df36f2c5ad72fbf3 | [
"0BSD"
] | 1 | 2021-01-28T17:43:26.000Z | 2021-01-28T17:43:26.000Z | django_mercadopago/migrations/0021_remove_preference_item_fields.py | walterleonardo/django-mercadopago | f54cf28ff75909fc63ac0135df36f2c5ad72fbf3 | [
"0BSD"
] | null | null | null | django_mercadopago/migrations/0021_remove_preference_item_fields.py | walterleonardo/django-mercadopago | f54cf28ff75909fc63ac0135df36f2c5ad72fbf3 | [
"0BSD"
] | null | null | null | # Generated by Django 2.1.5 on 2019-03-11 16:28
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("mp", "0020_move_preference_items"),
]
operations = [
migrations.RemoveField(model_name="preference", name="price",),
migrations.RemoveField(m... | 27.5625 | 74 | 0.675737 |
ffae6c960594b0045c80be5ee36537a6da2b4d4a | 1,494 | py | Python | palsbet/urls.py | denis254/overtimebet | 063af2fc263580d96e396e953ef8658a75ac38a5 | [
"BSD-3-Clause"
] | null | null | null | palsbet/urls.py | denis254/overtimebet | 063af2fc263580d96e396e953ef8658a75ac38a5 | [
"BSD-3-Clause"
] | 4 | 2020-06-05T18:24:14.000Z | 2021-12-13T19:48:13.000Z | palsbet/urls.py | denis254/overtimebet | 063af2fc263580d96e396e953ef8658a75ac38a5 | [
"BSD-3-Clause"
] | null | null | null | from django.urls import path, include
from palsbet import views
from rest_framework import routers
router = routers.DefaultRouter()
router.register(r'FreeTipsGames', views.FreeTipsGamesViewSet)
router.register(r'SingleBetGames', views.SingleBetGamesViewSet)
from . views import rolloverh, information, register, no... | 22.298507 | 243 | 0.688755 |
7a68bd3617be26069db170855f6493bcb4f0fd90 | 9,792 | py | Python | gff/add_gff3_locus_tags.py | olgatsiouri1996/bio-tool | 1734f394c4ca2e934e9623a9a36f5a09f6525773 | [
"MIT"
] | 4 | 2018-06-13T07:34:27.000Z | 2021-11-17T21:07:18.000Z | gff/add_gff3_locus_tags.py | olgatsiouri1996/bio-tool | 1734f394c4ca2e934e9623a9a36f5a09f6525773 | [
"MIT"
] | null | null | null | gff/add_gff3_locus_tags.py | olgatsiouri1996/bio-tool | 1734f394c4ca2e934e9623a9a36f5a09f6525773 | [
"MIT"
] | 4 | 2018-06-13T07:34:29.000Z | 2020-03-10T01:43:30.000Z | #!/usr/bin/env python3
"""
This script is used to take any GFF3 file and add locus tags. Be sure you've sorted your features
first, as this script assigns them in the order they are already found.
NCBI's specification on locus_tag usage:
http://www.ncbi.nlm.nih.gov/genbank/genomesubmit_annotation#locus_tag
Th... | 42.206897 | 186 | 0.64665 |
96862012bb7ba505254e310f6ef4ce780e609922 | 6,582 | py | Python | supra/GUI/Tabs/StationInfo.py | wmpg/Supracenter | 17b9d66095d63a5aa679c30c281f12a4a46db55a | [
"MIT"
] | 6 | 2021-02-16T20:49:37.000Z | 2022-03-25T08:46:57.000Z | supra/GUI/Tabs/StationInfo.py | wmpg/Supracenter | 17b9d66095d63a5aa679c30c281f12a4a46db55a | [
"MIT"
] | 1 | 2021-02-26T02:16:22.000Z | 2021-04-23T14:10:37.000Z | supra/GUI/Tabs/StationInfo.py | wmpg/Supracenter | 17b9d66095d63a5aa679c30c281f12a4a46db55a | [
"MIT"
] | null | null | null |
import os
import numpy as np
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from supra.GUI.Tools.CustomWidgets import StationEx
from supra.GUI.Dialogs.StationSource import StationWindow
from supra.GUI.Tools.GUITools import *
from supra.Utils.Classes import Position
from supra.Fil... | 32.91 | 133 | 0.636737 |
7a232cc170ec131d10a4e5cc979aaae3db0fa1cb | 3,518 | py | Python | app.py | openeventdata/hypnos | f9822ab2bed942f059e77c851a488ba2ae4df01b | [
"MIT"
] | 9 | 2016-07-01T20:15:57.000Z | 2021-02-01T19:03:12.000Z | app.py | openeventdata/hypnos | f9822ab2bed942f059e77c851a488ba2ae4df01b | [
"MIT"
] | 4 | 2016-10-19T20:03:24.000Z | 2019-07-09T20:55:40.000Z | app.py | openeventdata/hypnos | f9822ab2bed942f059e77c851a488ba2ae4df01b | [
"MIT"
] | 4 | 2016-10-26T23:46:10.000Z | 2019-07-09T16:37:08.000Z | import os
import json
import requests
from tornado.ioloop import IOLoop
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from flask import Flask, jsonify, make_response
from flask.ext.restful import Api, Resource, reqparse
app = Flask(__name__)
api = Api(app)
cwd = os.path.abspath(os.p... | 31.693694 | 89 | 0.643832 |
81505f778af6068a18660388315e953d574eceba | 1,701 | py | Python | tests/utils/test_serve_logs.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"Apache-2.0"
] | 3 | 2019-12-11T15:54:13.000Z | 2021-05-24T20:21:08.000Z | tests/utils/test_serve_logs.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"Apache-2.0"
] | 37 | 2020-07-21T07:50:02.000Z | 2022-03-29T22:31:28.000Z | tests/utils/test_serve_logs.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"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... | 37.8 | 78 | 0.728395 |
be965a6145f9824e91f94e53a91a54994dc015a3 | 2,910 | py | Python | enso/contrib/open/platform/linux/__init__.py | curaloucura/Enso-Ubuntu | 903d0daad525569b2fdc2f30b0768361a9ba75e9 | [
"BSD-3-Clause"
] | 2 | 2015-12-02T16:54:36.000Z | 2018-02-04T00:41:39.000Z | enso/contrib/open/platform/linux/__init__.py | curaloucura/Enso-Ubuntu | 903d0daad525569b2fdc2f30b0768361a9ba75e9 | [
"BSD-3-Clause"
] | null | null | null | enso/contrib/open/platform/linux/__init__.py | curaloucura/Enso-Ubuntu | 903d0daad525569b2fdc2f30b0768361a9ba75e9 | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Imports
# ----------------------------------------------------------------------------
# Imports
import os
import logging
import glob
from enso.contrib.open import interfaces
from enso.contrib.open import shortcuts
from enso.contrib.open... | 29.693878 | 88 | 0.654983 |
5aaf37bb9a62061c4410ed6463a0f7718e12f482 | 4,187 | py | Python | Lib/site-packages/django/contrib/admindocs/utils.py | ashutoshsuman99/Web-Blog-D19 | a01a0ccc40e8823110c01ebe4f43d9351df57295 | [
"bzip2-1.0.6"
] | 123 | 2015-01-15T06:56:45.000Z | 2022-03-19T22:18:55.000Z | Lib/site-packages/django/contrib/admindocs/utils.py | ashutoshsuman99/Web-Blog-D19 | a01a0ccc40e8823110c01ebe4f43d9351df57295 | [
"bzip2-1.0.6"
] | 21 | 2015-03-25T18:00:33.000Z | 2019-08-12T17:11:10.000Z | Lib/site-packages/django/contrib/admindocs/utils.py | ashutoshsuman99/Web-Blog-D19 | a01a0ccc40e8823110c01ebe4f43d9351df57295 | [
"bzip2-1.0.6"
] | 72 | 2015-01-14T16:29:47.000Z | 2021-10-09T16:31:47.000Z | "Misc. utility functions/classes for admin documentation generator."
import re
from email.errors import HeaderParseError
from email.parser import HeaderParser
from django.core.urlresolvers import reverse
from django.utils.encoding import force_bytes
from django.utils.safestring import mark_safe
try:
import docut... | 29.27972 | 94 | 0.621686 |
6ab1176e7cd9de245bc530d51fc549a63877b471 | 955 | py | Python | src/do_for.py | maokuntao/python-study | d4761ff417405788ad098850dc928e342c99977f | [
"Apache-2.0"
] | null | null | null | src/do_for.py | maokuntao/python-study | d4761ff417405788ad098850dc928e342c99977f | [
"Apache-2.0"
] | null | null | null | src/do_for.py | maokuntao/python-study | d4761ff417405788ad098850dc928e342c99977f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Created on 2017年11月21日
@author: taomk
'''
print("NBA Star :")
nbaStar = ["Kobe", "Duncun", "Curry", "Wade"]
for name in nbaStar: # for...in循环,依次遍历list、range或者tuple等中的每个元素
print("\t", name)
print("=================")
sum = 0
for x in range(101): # range(n)生成一个[... | 18.365385 | 63 | 0.520419 |
b781a4f78ee8fc946bf55aebf0dc4a092d70d7e4 | 7,730 | py | Python | pytorch/datasets/ShapeNetPart.py | paulwong16/CloserLook3D | 71a7f519e55354c96c579adc7322a26fe7779ce7 | [
"MIT"
] | 215 | 2020-07-03T01:39:57.000Z | 2022-03-21T09:05:55.000Z | pytorch/datasets/ShapeNetPart.py | eglrp/CloserLook3D | f640be8e7ec9fb99a563034616b7ef413f5bf58e | [
"MIT"
] | 35 | 2020-07-15T04:12:26.000Z | 2022-01-15T13:38:36.000Z | pytorch/datasets/ShapeNetPart.py | eglrp/CloserLook3D | f640be8e7ec9fb99a563034616b7ef413f5bf58e | [
"MIT"
] | 39 | 2020-07-05T13:53:00.000Z | 2022-03-14T01:53:50.000Z | import os
import torch
import json
import shlex
import pickle
import subprocess
import numpy as np
import torch.utils.data as data
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(BASE_DIR)
def pc_normalize(pc):
# Center and rescale point for 1m radius
pmin = np.min(pc, axis=0... | 43.672316 | 116 | 0.517853 |
ac450cab0e5e5b4d6962d1fd1efb59134f13d14a | 321 | py | Python | tooi/lab14/config.py | EgorBolt/studying | d279e1c4aebcf5ec852d577159ac94cfafd17cae | [
"MIT"
] | 161 | 2019-09-09T13:16:14.000Z | 2022-03-30T16:59:11.000Z | tooi/lab14/config.py | EgorBolt/studying | d279e1c4aebcf5ec852d577159ac94cfafd17cae | [
"MIT"
] | 32 | 2018-05-01T05:24:43.000Z | 2022-03-11T23:20:39.000Z | tooi/lab14/config.py | EgorBolt/studying | d279e1c4aebcf5ec852d577159ac94cfafd17cae | [
"MIT"
] | 21 | 2019-09-17T06:14:37.000Z | 2022-02-12T22:49:57.000Z | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
'sqlite:///' + os.path.join(basedir, 'app.db')
SQLALCHEMY_TRACK_MODIFICATIONS = Fals... | 40.125 | 71 | 0.713396 |
2993f73f18c33189a301a780d7721d343a8f2bf3 | 403 | py | Python | herokuproject/wsgi.py | harshitabes/herokuproject | 99f483cc9fd8e868acbcc37562abffa14c055487 | [
"MIT"
] | null | null | null | herokuproject/wsgi.py | harshitabes/herokuproject | 99f483cc9fd8e868acbcc37562abffa14c055487 | [
"MIT"
] | null | null | null | herokuproject/wsgi.py | harshitabes/herokuproject | 99f483cc9fd8e868acbcc37562abffa14c055487 | [
"MIT"
] | null | null | null | """
WSGI config for herokuproject 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.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO... | 23.705882 | 78 | 0.791563 |
6bd993ffd9de6f59b1802fc4dc759293dd56898f | 591 | py | Python | scripts/update_versions.py | nmashewske/playwright-python | b0667c4aca9a9050c525ae5b5d2ba7e83800a9f8 | [
"Apache-2.0"
] | 1 | 2021-03-16T08:10:08.000Z | 2021-03-16T08:10:08.000Z | scripts/update_versions.py | nmashewske/playwright-python | b0667c4aca9a9050c525ae5b5d2ba7e83800a9f8 | [
"Apache-2.0"
] | 1 | 2021-01-31T05:51:38.000Z | 2021-01-31T05:51:38.000Z | scripts/update_versions.py | nmashewske/playwright-python | b0667c4aca9a9050c525ae5b5d2ba7e83800a9f8 | [
"Apache-2.0"
] | null | null | null | import re
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
r = open("README.md", "r")
text = r.read()
for browser_type in [p.chromium, p.firefox, p.webkit]:
rx = re.compile(
r"<!-- GEN:" + browser_type.name + r"-version -->([^<]+)<!-- GEN:stop -->"
)... | 26.863636 | 90 | 0.526227 |
6a20f72aa82b765dba7999f27e0a1f9c44e9e2a2 | 15,076 | py | Python | distribution/scripts/jmeter/create-comparison-charts.py | ruks/performance-apim | 47789b8551639f7897f7c5229f338866b73600a2 | [
"Apache-2.0"
] | null | null | null | distribution/scripts/jmeter/create-comparison-charts.py | ruks/performance-apim | 47789b8551639f7897f7c5229f338866b73600a2 | [
"Apache-2.0"
] | null | null | null | distribution/scripts/jmeter/create-comparison-charts.py | ruks/performance-apim | 47789b8551639f7897f7c5229f338866b73600a2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3.6
# Copyright 2017 WSO2 Inc. (http://wso2.org)
#
# 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... | 52.16609 | 120 | 0.594587 |
68af366065bc887aaeb563f5d9025db39b428603 | 3,553 | py | Python | ratkaisin4.py | anttispitkanen/hirsipuutin | e4005e58a47b417d514d3fdde7a992d1982458e3 | [
"MIT"
] | null | null | null | ratkaisin4.py | anttispitkanen/hirsipuutin | e4005e58a47b417d514d3fdde7a992d1982458e3 | [
"MIT"
] | null | null | null | ratkaisin4.py | anttispitkanen/hirsipuutin | e4005e58a47b417d514d3fdde7a992d1982458e3 | [
"MIT"
] | null | null | null | # Simple hangman solver, guesses letters in order of frequency
import re
print('anttispitkanen')
words = []
temp_words = []
word = input().strip()
while word:
words.append(word)
temp_words.append(word)
word = input().strip()
letters = {letter for word in words for letter in word}
frequencies = [(lette... | 28.653226 | 104 | 0.609344 |
8a84bcdd4b11a73c658b2d10b884a35383f49005 | 11,621 | py | Python | example/scripts/sample_data_loader.py | sauravsrijan/amundsendatabuilder | 3e78a5dff61b8e214157b5fc4f78cb397e4845b3 | [
"Apache-2.0"
] | null | null | null | example/scripts/sample_data_loader.py | sauravsrijan/amundsendatabuilder | 3e78a5dff61b8e214157b5fc4f78cb397e4845b3 | [
"Apache-2.0"
] | null | null | null | example/scripts/sample_data_loader.py | sauravsrijan/amundsendatabuilder | 3e78a5dff61b8e214157b5fc4f78cb397e4845b3 | [
"Apache-2.0"
] | null | null | null | """
This is a example script which demo how to load data into neo4j without using Airflow DAG.
"""
import csv
from elasticsearch import Elasticsearch
import logging
from pyhocon import ConfigFactory
import sqlite3
from sqlalchemy.ext.declarative import declarative_base
import textwrap
import uuid
from databuilder.ext... | 43.36194 | 111 | 0.637983 |
2b01b1e16d4fb0aadbcaebc9c57bac16f6125d72 | 986 | py | Python | base/singleton.py | journeyOS/global_scripts | 583dbc1876948b505321b07e7fcabef07ddb6c61 | [
"Apache-2.0"
] | null | null | null | base/singleton.py | journeyOS/global_scripts | 583dbc1876948b505321b07e7fcabef07ddb6c61 | [
"Apache-2.0"
] | null | null | null | base/singleton.py | journeyOS/global_scripts | 583dbc1876948b505321b07e7fcabef07ddb6c61 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -*- encoding: utf-8 -*-
#
# Copyright (c) 2020 anqi.huang@outlook.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.apach... | 35.214286 | 74 | 0.692698 |
cbb8e5611f1b7ed3ec62227df62725d90f622872 | 1,080 | py | Python | VOTA_Control/VOTAScopeHW/sound/sound_hw.py | VNMurthyLab/VOTA-1 | 3a5cfc1e210ac7ea274537a8d189b54660416599 | [
"MIT"
] | null | null | null | VOTA_Control/VOTAScopeHW/sound/sound_hw.py | VNMurthyLab/VOTA-1 | 3a5cfc1e210ac7ea274537a8d189b54660416599 | [
"MIT"
] | null | null | null | VOTA_Control/VOTAScopeHW/sound/sound_hw.py | VNMurthyLab/VOTA-1 | 3a5cfc1e210ac7ea274537a8d189b54660416599 | [
"MIT"
] | 1 | 2021-12-27T23:34:54.000Z | 2021-12-27T23:34:54.000Z | '''
Created on Aug 9, 2017
@author: Hao Wu
'''
from ScopeFoundry import HardwareComponent
import simpleaudio as sa
class SoundHW(HardwareComponent):
'''
Hardware Component Class for receiving AI input for breathing, licking etc
'''
name='sound'
def setup(self):
pass
... | 25.116279 | 125 | 0.605556 |
09498ba4fb14c84129341156e4c4ca0268790b16 | 905 | py | Python | util/__init__.py | trichter/sito | 1b3895f3a56fe0fa6cdce1201545111025d606c8 | [
"MIT"
] | 18 | 2015-01-30T00:48:30.000Z | 2021-04-03T03:11:15.000Z | util/__init__.py | trichter/sito | 1b3895f3a56fe0fa6cdce1201545111025d606c8 | [
"MIT"
] | null | null | null | util/__init__.py | trichter/sito | 1b3895f3a56fe0fa6cdce1201545111025d606c8 | [
"MIT"
] | 21 | 2015-04-09T13:55:13.000Z | 2021-06-19T22:22:08.000Z | # -*- coding: utf-8 -*-
# TR
from main import (isint, isfloat, isnumber, gps2DistDegree, smooth, filterResp,
calculate, yeargen, timegen)
from helper import (NullHandler, checkDir, exha, add_doc,
vectorize_args, parameters, pop, runBash, setRootLogger,
fillArra... | 39.347826 | 94 | 0.696133 |
6e534142ddb728479e711b8540a3bdc7ed2a0726 | 179 | py | Python | codewars/8kyu/doha22/kata8/removing_elements/removing_elements.py | doha22/Training_one | 0cd7cf86c7da0f6175834146296b763d1841766b | [
"MIT"
] | null | null | null | codewars/8kyu/doha22/kata8/removing_elements/removing_elements.py | doha22/Training_one | 0cd7cf86c7da0f6175834146296b763d1841766b | [
"MIT"
] | 2 | 2019-01-22T10:53:42.000Z | 2019-01-31T08:02:48.000Z | codewars/8kyu/doha22/kata8/removing_elements/removing_elements.py | doha22/Training_one | 0cd7cf86c7da0f6175834146296b763d1841766b | [
"MIT"
] | 13 | 2019-01-22T10:37:42.000Z | 2019-01-25T13:30:43.000Z | def remove_every_other(my_list):
# Your code here!
a = my_list[::2]
return a
def remove_every_other2(my_list):
return [v for c,v in enumerate(my_list) if not c%2] | 25.571429 | 55 | 0.681564 |
10f5c76bd1ca8812e7e2876fb25cb5f06ded5772 | 1,234 | py | Python | azure/mgmt/network/v2016_09_01/models/express_route_circuits_routes_table_summary_list_result.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2016_09_01/models/express_route_circuits_routes_table_summary_list_result.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2016_09_01/models/express_route_circuits_routes_table_summary_list_result.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"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.
# C... | 36.294118 | 88 | 0.604538 |
0235084086290cf2bd5eac7a0c128094423e1798 | 1,755 | py | Python | src/pkgcore/const.py | thesamesam/pkgcore | be2d9264a3fe61a323f0075cbc4838ed6ec5ffcf | [
"BSD-3-Clause"
] | null | null | null | src/pkgcore/const.py | thesamesam/pkgcore | be2d9264a3fe61a323f0075cbc4838ed6ec5ffcf | [
"BSD-3-Clause"
] | null | null | null | src/pkgcore/const.py | thesamesam/pkgcore | be2d9264a3fe61a323f0075cbc4838ed6ec5ffcf | [
"BSD-3-Clause"
] | null | null | null | """
Internal constants.
"""
import os
import sys
from snakeoil import mappings
from . import __title__
osp = os.path
_reporoot = osp.realpath(__file__).rsplit(os.path.sep, 3)[0]
_module = sys.modules[__name__]
try:
# This is a file written during pkgcore installation;
# if it exists, we defer to it. If it... | 30.789474 | 87 | 0.703704 |
104a9961ef4f28553335d1df46d90d109677c42d | 2,608 | py | Python | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ModifySecurityIpsRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ModifySecurityIpsRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ModifySecurityIpsRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.222222 | 84 | 0.785276 |
27d223925108e2bb2fedaa5d34e081ff54d37656 | 330 | py | Python | vtctrans/__init__.py | joshuaspence/vtctrans | ee146a8647b3e019261f216961c8588a854a85d5 | [
"BSD-2-Clause"
] | null | null | null | vtctrans/__init__.py | joshuaspence/vtctrans | ee146a8647b3e019261f216961c8588a854a85d5 | [
"BSD-2-Clause"
] | null | null | null | vtctrans/__init__.py | joshuaspence/vtctrans | ee146a8647b3e019261f216961c8588a854a85d5 | [
"BSD-2-Clause"
] | 1 | 2019-07-21T23:57:02.000Z | 2019-07-21T23:57:02.000Z | import sys
from vtctrans.varnishtest import VarnishTest
def main():
vtc = VarnishTest()
argv = sys.argv
argc = len(argv)
opt = ''
if(argv == 1):
exit
results = vtc.execVarnishTest(argv[1:])
for result in results:
if (result['result'] != 'passed'):
exit(1)
... | 17.368421 | 44 | 0.557576 |
4e7b1771c1c3e42cf01250708ae4862fbd890c5d | 2,780 | py | Python | modules/dense_correspondence_manipulation/scripts/render_depth_images.py | DexaiRobotics/pytorch-dense-correspondence | f7e66856413212cbde53fc91e650123e3669a339 | [
"BSD-3-Clause"
] | null | null | null | modules/dense_correspondence_manipulation/scripts/render_depth_images.py | DexaiRobotics/pytorch-dense-correspondence | f7e66856413212cbde53fc91e650123e3669a339 | [
"BSD-3-Clause"
] | 1 | 2020-06-12T13:21:35.000Z | 2020-06-12T13:21:35.000Z | modules/dense_correspondence_manipulation/scripts/render_depth_images.py | DexaiRobotics/pytorch-dense-correspondence | f7e66856413212cbde53fc91e650123e3669a339 | [
"BSD-3-Clause"
] | 1 | 2020-11-28T03:02:23.000Z | 2020-11-28T03:02:23.000Z | #!/usr/bin/env directorPython
import os
import argparse
import dense_correspondence_manipulation.change_detection.change_detection as change_detection
import dense_correspondence_manipulation.utils.utils as utils
from dense_correspondence_manipulation.utils.constants import *
from director.timercallback import TimerC... | 31.954023 | 144 | 0.71259 |
44896f51f9be139ded2b655c7ca5714dd38993fb | 3,300 | py | Python | build.py | atom-moyer/getpy | 8d5a846d030d345408a4dc71793d5918521180c4 | [
"MIT"
] | 83 | 2019-04-14T05:39:34.000Z | 2022-03-28T18:18:03.000Z | build.py | atom-moyer/getpy | 8d5a846d030d345408a4dc71793d5918521180c4 | [
"MIT"
] | 5 | 2019-04-30T16:23:10.000Z | 2021-03-26T12:15:52.000Z | build.py | atom-moyer/getpy | 8d5a846d030d345408a4dc71793d5918521180c4 | [
"MIT"
] | 5 | 2019-04-29T19:15:15.000Z | 2022-03-04T19:08:50.000Z | import itertools
import numpy as np
# byteset_lengths = [4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64]
byteset_lengths = [8, 16]
key_types = [
'u4',
'u8',
'i4',
'i8',
*[f'S{i}' for i in byteset_lengths],
]
value_types = [
'u1',
'u2',
'u4',
'u8',
'i1',
... | 22.44898 | 137 | 0.637879 |
0d5348c4b763cd3f9b8c9f117cfaa1def54db61b | 4,531 | py | Python | sphinx_toolbox/decorators.py | Fuyukai/sphinx-toolbox | cc2d4c5bc9af6d5c19602f325b290daffe872db1 | [
"MIT"
] | null | null | null | sphinx_toolbox/decorators.py | Fuyukai/sphinx-toolbox | cc2d4c5bc9af6d5c19602f325b290daffe872db1 | [
"MIT"
] | null | null | null | sphinx_toolbox/decorators.py | Fuyukai/sphinx-toolbox | cc2d4c5bc9af6d5c19602f325b290daffe872db1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# decorators.py
"""
reStructuredText XRef role for decorators.
.. versionadded:: 0.9.0
.. extensions:: sphinx_toolbox.decorators
Usage
------
.. rst:role:: deco
Adds a cross reference to a decorator, prefixed with an ``@``.
.. rest-example::
.. decorator:: my_decorator
A decorat... | 30.006623 | 105 | 0.727433 |
514675655e61b413edc779dfbd09dff5230dfbde | 785 | py | Python | pysatSpaceWeather/instruments/methods/general.py | JonathonMSmith/pysatSpaceWeather | b403a14bd9a37dd010e97be6e5da15c54a87b888 | [
"BSD-3-Clause"
] | 3 | 2021-02-02T05:33:46.000Z | 2022-01-20T16:54:35.000Z | pysatSpaceWeather/instruments/methods/general.py | JonathonMSmith/pysatSpaceWeather | b403a14bd9a37dd010e97be6e5da15c54a87b888 | [
"BSD-3-Clause"
] | 48 | 2020-08-13T22:05:06.000Z | 2022-01-21T22:48:14.000Z | pysatSpaceWeather/instruments/methods/general.py | JonathonMSmith/pysatSpaceWeather | b403a14bd9a37dd010e97be6e5da15c54a87b888 | [
"BSD-3-Clause"
] | 3 | 2021-02-02T05:33:54.000Z | 2021-08-19T17:14:24.000Z | # -*- coding: utf-8 -*-.
"""Provides default routines for the space weather instruments
"""
import numpy as np
def preprocess(inst):
"""Preprocess the meta data by replacing the file fill values with NaN
Parameters
----------
inst : pysat.Instrument
pysat.Instrument object
"""
# Re... | 28.035714 | 76 | 0.635669 |
e0c6308b5de96b2e1cb8523f4ec5e7bff42c6296 | 37,165 | py | Python | tools/intogen/runtime/pyenv/lib/python2.7/site-packages/scipy/optimize/tests/test_optimize.py | globusgenomics/galaxy | 7caf74d9700057587b3e3434c64e82c5b16540f1 | [
"CC-BY-3.0"
] | 1 | 2021-02-05T13:19:58.000Z | 2021-02-05T13:19:58.000Z | tools/intogen/runtime/pyenv/lib/python2.7/site-packages/scipy/optimize/tests/test_optimize.py | globusgenomics/galaxy | 7caf74d9700057587b3e3434c64e82c5b16540f1 | [
"CC-BY-3.0"
] | 1 | 2018-04-15T22:59:15.000Z | 2018-04-15T22:59:15.000Z | tools/intogen/runtime/pyenv/lib/python2.7/site-packages/scipy/optimize/tests/test_optimize.py | globusgenomics/galaxy | 7caf74d9700057587b3e3434c64e82c5b16540f1 | [
"CC-BY-3.0"
] | null | null | null | """
Unit tests for optimization routines from optimize.py and tnc.py
Authors:
Ed Schofield, Nov 2005
Andrew Straw, April 2008
To run it in its simplest form::
nosetests test_optimize.py
"""
from __future__ import division, print_function, absolute_import
from numpy.testing import assert_raises, assert_allcl... | 39.621535 | 84 | 0.498641 |
4bcda841a90b8bbe042fe862771682d656023d89 | 3,619 | py | Python | Handlers/CreateFile.py | KhalilThabet/Medical-Practice | 9b5ab68af9d741bf9dcf86f2e354e9cfd0b8dba9 | [
"MIT"
] | null | null | null | Handlers/CreateFile.py | KhalilThabet/Medical-Practice | 9b5ab68af9d741bf9dcf86f2e354e9cfd0b8dba9 | [
"MIT"
] | null | null | null | Handlers/CreateFile.py | KhalilThabet/Medical-Practice | 9b5ab68af9d741bf9dcf86f2e354e9cfd0b8dba9 | [
"MIT"
] | null | null | null | import sys
sys.path.insert(1, "../")
from Verifications.Cin import Cin_verif
from Verifications.String import String_verif
from Verifications.Age import Age_verif
from Verifications.Sexe import Sexe_verif
def Creation_fichier_patient(System):
i = 0
while i < 10:
Dpatient = {}
ligne = ""
... | 41.597701 | 73 | 0.500691 |
3e7fd26ac615a890ee9f153da888cff45affee9e | 5,078 | py | Python | examples/browser-remote/browser_remote.py | shaperilio/sony_camera_api | ff1c071f9c41903e585aed7d868cbe7a4350e9db | [
"MIT"
] | null | null | null | examples/browser-remote/browser_remote.py | shaperilio/sony_camera_api | ff1c071f9c41903e585aed7d868cbe7a4350e9db | [
"MIT"
] | null | null | null | examples/browser-remote/browser_remote.py | shaperilio/sony_camera_api | ff1c071f9c41903e585aed7d868cbe7a4350e9db | [
"MIT"
] | null | null | null | # A remote cotrol app that runs in your browser.
# Shows you live view, allows taking photos, and shows you the post-photo preview.
# Modeled after https://medium.com/datadriveninvestor/video-streaming-using-flask-and-opencv-c464bf8473d6
# and https://blog.miguelgrinberg.com/post/video-streaming-with-flask/page/8
impo... | 34.780822 | 109 | 0.67113 |
5d6b117ff54c0a212e696b72df178bd86618ec06 | 1,391 | py | Python | owmeta_core/graph_serialization.py | mwatts15/owmeta-core | b072178f8e7b83cc8665a29f4d038554d18adc35 | [
"MIT"
] | 2 | 2021-03-06T16:25:35.000Z | 2022-03-24T15:00:03.000Z | owmeta_core/graph_serialization.py | mwatts15/owmeta-core | b072178f8e7b83cc8665a29f4d038554d18adc35 | [
"MIT"
] | 39 | 2020-02-08T21:58:33.000Z | 2022-01-03T15:28:18.000Z | owmeta_core/graph_serialization.py | openworm/owmeta-core | b072178f8e7b83cc8665a29f4d038554d18adc35 | [
"MIT"
] | null | null | null | '''
Utilies for graph serialization
'''
import hashlib
from os.path import join as p, exists
from rdflib import plugin
from rdflib.parser import Parser, create_input_source
from rdflib.serializer import Serializer
from .rdf_utils import BatchAddGraph
def write_canonical_to_file(graph, file_name):
'''
Write ... | 27.27451 | 75 | 0.678648 |
b65665eb2c9ad2e4195702e9591f9aaf505a3a5c | 3,909 | py | Python | homeassistant/components/evohome/water_heater.py | miggs125/home-assistant | 2307cac942d4f5b1cef5bdf4a11d9baa5160791c | [
"Apache-2.0"
] | null | null | null | homeassistant/components/evohome/water_heater.py | miggs125/home-assistant | 2307cac942d4f5b1cef5bdf4a11d9baa5160791c | [
"Apache-2.0"
] | 3 | 2018-01-23T20:41:55.000Z | 2018-01-23T20:42:12.000Z | homeassistant/components/evohome/water_heater.py | kit-klein/home-assistant | 9c49b8dfc1b9723abe77fb7bb975f94b5233ad00 | [
"Apache-2.0"
] | null | null | null | """Support for WaterHeater devices of (EMEA/EU) Honeywell TCC systems."""
import logging
from typing import List
from homeassistant.components.water_heater import (
SUPPORT_AWAY_MODE,
SUPPORT_OPERATION_MODE,
WaterHeaterDevice,
)
from homeassistant.const import PRECISION_WHOLE, STATE_OFF, STATE_ON
from home... | 34.59292 | 88 | 0.686109 |
a8ffab34e31da8f6a688fb4b142b4d6332817ea6 | 2,074 | py | Python | contrib/devtools/check-doc.py | zevebe/Bitx | 50435e1635e06a4e97203bbcd338aae3594d4fc2 | [
"MIT"
] | null | null | null | contrib/devtools/check-doc.py | zevebe/Bitx | 50435e1635e06a4e97203bbcd338aae3594d4fc2 | [
"MIT"
] | null | null | null | contrib/devtools/check-doc.py | zevebe/Bitx | 50435e1635e06a4e97203bbcd338aae3594d4fc2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
This checks if all command line args are documented.
Return value is 0 to indicate no error.
Author:... | 43.208333 | 299 | 0.688042 |
f8f6489b9106e3abe17301c5b2a8084254555795 | 27,568 | py | Python | mujoco_py/tests/test_cymj.py | wangcongrobot/mujoco-py | 63579a0ea577bc462e03cf8f96c17695f123ef41 | [
"Linux-OpenIB"
] | 1 | 2019-12-06T02:30:39.000Z | 2019-12-06T02:30:39.000Z | mujoco_py/tests/test_cymj.py | shawwn/mujoco-py | 0711ab58777a28aff847adbf05ba246a337908a0 | [
"Linux-OpenIB"
] | null | null | null | mujoco_py/tests/test_cymj.py | shawwn/mujoco-py | 0711ab58777a28aff847adbf05ba246a337908a0 | [
"Linux-OpenIB"
] | null | null | null | import numpy as np
import pytest
import sys
import unittest
from io import BytesIO, StringIO
from multiprocessing import get_context
from numbers import Number
from numpy.testing import assert_array_equal, assert_array_almost_equal
# from threading import Thread, Event
from PIL import Image
from mujoco_py import (MjS... | 34.546366 | 112 | 0.599354 |
95e65d74141b902a4792e64d6a8048582cfda005 | 9,622 | py | Python | fitness.py | Machine-Learning/Genetic-Algorithm | b5006b3fcae89fc4838eaa20fe288633743dd42a | [
"MIT"
] | null | null | null | fitness.py | Machine-Learning/Genetic-Algorithm | b5006b3fcae89fc4838eaa20fe288633743dd42a | [
"MIT"
] | null | null | null | fitness.py | Machine-Learning/Genetic-Algorithm | b5006b3fcae89fc4838eaa20fe288633743dd42a | [
"MIT"
] | 1 | 2022-03-13T06:09:37.000Z | 2022-03-13T06:09:37.000Z | import numpy
import re
import json
import random
from client import *
# def convert(g):
# f = []
# e = g.replace("]"," ").replace("["," ").split(" ")
# for i in e:
# if i != "":
# f.append(float(i))
# return f
sending_array = [
[-1.44909562e-06, -1.09792665e-12, -1.20265933e-13, 7.11858431e-11, -... | 135.521127 | 242 | 0.676263 |
ffd1248c9dd879ba3d85551d9cbeb5ef3accece5 | 1,059 | py | Python | src/bot.py | EpicKiwi/bottosan-discord | 9530f4b8fa0130580ce13f8c644cb98d4261ac3d | [
"MIT"
] | null | null | null | src/bot.py | EpicKiwi/bottosan-discord | 9530f4b8fa0130580ce13f8c644cb98d4261ac3d | [
"MIT"
] | null | null | null | src/bot.py | EpicKiwi/bottosan-discord | 9530f4b8fa0130580ce13f8c644cb98d4261ac3d | [
"MIT"
] | null | null | null | import re
from features import INSTALLED_FEATURES
import discord
import settings
import os
print("starting ボットさん")
client = discord.Client()
MENTION_REGEX = re.compile("<@&######>")
@client.event
async def on_ready():
global MENTION_REGEX
MENTION_REGEX = re.compile("^\s*<@!{}>".format(client.user.id))
... | 25.214286 | 76 | 0.694995 |
79d6292a02105238eb67b0a6e152a357b77c8700 | 2,258 | py | Python | .config/sublime-text-3/Packages/SublimeLinter-rst/linter.py | deltakapa/dot-files | bb43088d2bcea15e892dfa45bff934b8e7399e17 | [
"MIT"
] | 1 | 2019-04-19T09:40:39.000Z | 2019-04-19T09:40:39.000Z | .config/sublime-text-3/Packages/SublimeLinter-rst/linter.py | deltakapa/dot-files | bb43088d2bcea15e892dfa45bff934b8e7399e17 | [
"MIT"
] | null | null | null | .config/sublime-text-3/Packages/SublimeLinter-rst/linter.py | deltakapa/dot-files | bb43088d2bcea15e892dfa45bff934b8e7399e17 | [
"MIT"
] | null | null | null | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by German M. Bravo (Kronuz)
# Copyright (c) 2013 German M. Bravo (Kronuz)
#
# License: MIT
#
"""This module exports the rst plugin linter class."""
from SublimeLinter.lint import highlight, Linter
import docutils
from... | 29.710526 | 77 | 0.611603 |
4ec623afeebb4afc942009c31cf7911bfc71b134 | 7,853 | py | Python | test/test_trans.py | sebleier/colr | 72913aca7fcb19bf1a7f1c34dd820e40459143a4 | [
"MIT"
] | 36 | 2016-06-06T03:57:19.000Z | 2022-03-01T05:11:26.000Z | test/test_trans.py | sebleier/colr | 72913aca7fcb19bf1a7f1c34dd820e40459143a4 | [
"MIT"
] | 9 | 2017-05-30T19:30:33.000Z | 2019-12-13T22:51:55.000Z | test/test_trans.py | sebleier/colr | 72913aca7fcb19bf1a7f1c34dd820e40459143a4 | [
"MIT"
] | 7 | 2017-03-16T10:28:15.000Z | 2021-11-16T17:28:16.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" test_trans.py
Unit tests for colr/trans.py
-Christopher Welborn 03-29-2017
"""
import sys
import unittest
from colr import (
__version__,
)
from colr.trans import (
ColorCode,
fix_hex,
hex2rgb,
hex2term,
hex2termhex,
is_code,
... | 29.302239 | 76 | 0.46339 |
1eb11ca62d4aaa5dee80febde38ef0f854d7baac | 9,387 | py | Python | tests/unit/test_gates.py | Shor-dev/shor | 8814030a1a7890084362327a14dd8838c246dd8a | [
"MIT"
] | 8 | 2020-05-14T23:31:43.000Z | 2021-02-24T20:38:32.000Z | tests/unit/test_gates.py | Shor-dev/shor | 8814030a1a7890084362327a14dd8838c246dd8a | [
"MIT"
] | 41 | 2020-06-08T22:42:17.000Z | 2021-04-21T17:34:42.000Z | tests/unit/test_gates.py | Shor-dev/shor | 8814030a1a7890084362327a14dd8838c246dd8a | [
"MIT"
] | 3 | 2020-06-30T04:09:55.000Z | 2020-09-27T20:58:32.000Z | import math
import numpy as np
from tests.util import is_square, is_unitary
def test_cnot_init():
from shor.gates import CNOT
CNOT()
def test_hadamard_init():
from shor.gates import H, Hadamard
gate1 = H()
gate2 = Hadamard()
assert gate1.__class__ == gate2.__class__
# Try with para... | 22.783981 | 119 | 0.550549 |
b27b978dd0a2962a43ced4f769b833d5100c60fb | 387 | py | Python | kubernetes_typed/client/models/v1_replica_set_condition.py | nikhiljha/kubernetes-typed | 4f4b969aa400c88306f92560e56bda6d19b2a895 | [
"Apache-2.0"
] | 22 | 2020-12-10T13:06:02.000Z | 2022-02-13T21:58:15.000Z | kubernetes_typed/client/models/v1_replica_set_condition.py | nikhiljha/kubernetes-typed | 4f4b969aa400c88306f92560e56bda6d19b2a895 | [
"Apache-2.0"
] | 4 | 2021-03-08T07:06:12.000Z | 2022-03-29T23:41:45.000Z | kubernetes_typed/client/models/v1_replica_set_condition.py | nikhiljha/kubernetes-typed | 4f4b969aa400c88306f92560e56bda6d19b2a895 | [
"Apache-2.0"
] | 2 | 2021-09-05T19:18:28.000Z | 2022-03-14T02:56:17.000Z | # Code generated by `typeddictgen`. DO NOT EDIT.
"""V1ReplicaSetConditionDict generated type."""
import datetime
from typing import TypedDict
V1ReplicaSetConditionDict = TypedDict(
"V1ReplicaSetConditionDict",
{
"lastTransitionTime": datetime.datetime,
"message": str,
"reason": str,
... | 22.764706 | 48 | 0.648579 |
f03b7390c728c16a83838e37b499882389245fb1 | 19,997 | py | Python | MBsandbox/tests/test_ERA5_WFDE5_W5E5_daily.py | lilianschuster/massbalance-sandbox | 8b9fa3e3393603e59248400828edd6e8c02599a3 | [
"BSD-3-Clause"
] | null | null | null | MBsandbox/tests/test_ERA5_WFDE5_W5E5_daily.py | lilianschuster/massbalance-sandbox | 8b9fa3e3393603e59248400828edd6e8c02599a3 | [
"BSD-3-Clause"
] | null | null | null | MBsandbox/tests/test_ERA5_WFDE5_W5E5_daily.py | lilianschuster/massbalance-sandbox | 8b9fa3e3393603e59248400828edd6e8c02599a3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 17 18:34:35 2020
@author: lilianschuster
"""
import warnings
import numpy as np
import pandas as pd
import pytest
import xarray as xr
from numpy.testing import assert_allclose
import oggm
# imports from oggm
from oggm.exceptions import InvalidParam... | 45.139955 | 83 | 0.60224 |
fb2bb35b07479ab27943417223a55b6dd53cebc7 | 633 | py | Python | unittest/scripts/auto/py_shell/validation/shell_cli_integration_norecord.py | mueller/mysql-shell | 29bafc5692bd536a12c4e41c54cb587375fe52cf | [
"Apache-2.0"
] | 119 | 2016-04-14T14:16:22.000Z | 2022-03-08T20:24:38.000Z | unittest/scripts/auto/py_shell/validation/shell_cli_integration_norecord.py | mueller/mysql-shell | 29bafc5692bd536a12c4e41c54cb587375fe52cf | [
"Apache-2.0"
] | 9 | 2017-04-26T20:48:42.000Z | 2021-09-07T01:52:44.000Z | unittest/scripts/auto/py_shell/validation/shell_cli_integration_norecord.py | mueller/mysql-shell | 29bafc5692bd536a12c4e41c54cb587375fe52cf | [
"Apache-2.0"
] | 51 | 2016-07-20T05:06:48.000Z | 2022-03-09T01:20:53.000Z | #@<OUT> utils CLI calls
ERROR: Please connect the shell to the MySQL server to be checked or specify the server URI as a parameter.
ERROR: Argument connectionData: Invalid connection options, expected either a URI or a Connection Options Dictionary
ERROR: The following option is invalid: --dummyOption
#@<OUT> shell CL... | 39.5625 | 116 | 0.78357 |
6da6c3efe5c55b11b4a50d0e5f7bb93182c86ef1 | 5,167 | py | Python | tests/python/relay/test_pass_dead_code_elimination.py | janifer112x/incubator-tvm | 98c2096f4944bdbdbbb2b7b20ccd35c6c11dfbf6 | [
"Apache-2.0"
] | 22 | 2022-03-18T07:29:31.000Z | 2022-03-23T14:54:32.000Z | tests/python/relay/test_pass_dead_code_elimination.py | janifer112x/incubator-tvm | 98c2096f4944bdbdbbb2b7b20ccd35c6c11dfbf6 | [
"Apache-2.0"
] | 3 | 2020-04-20T15:37:55.000Z | 2020-05-13T05:34:28.000Z | tests/python/relay/test_pass_dead_code_elimination.py | janifer112x/incubator-tvm | 98c2096f4944bdbdbbb2b7b20ccd35c6c11dfbf6 | [
"Apache-2.0"
] | 5 | 2018-03-27T01:02:13.000Z | 2020-12-29T00:32:31.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... | 33.771242 | 100 | 0.664989 |
e511dbb5e5593699476d824e08df67c91af7987d | 6,065 | py | Python | tests/engine/storage/test_local_model_storage.py | fintzd/rasa | 6359be5509c7d87cd29c2ab5149bc45e843fea85 | [
"Apache-2.0"
] | 1 | 2021-11-12T08:01:05.000Z | 2021-11-12T08:01:05.000Z | tests/engine/storage/test_local_model_storage.py | fintzd/rasa | 6359be5509c7d87cd29c2ab5149bc45e843fea85 | [
"Apache-2.0"
] | 36 | 2020-06-23T02:33:23.000Z | 2021-04-01T14:35:09.000Z | tests/engine/storage/test_local_model_storage.py | fintzd/rasa | 6359be5509c7d87cd29c2ab5149bc45e843fea85 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from pathlib import Path
import freezegun
import pytest
from _pytest.tmpdir import TempPathFactory
import rasa.shared.utils.io
from rasa.engine.graph import SchemaNode, GraphSchema, GraphModelConfiguration
from rasa.engine.storage.local_model_storage import LocalModelStorage
from rasa.en... | 34.460227 | 87 | 0.6892 |
59bb5a4cb634d89163b3775b95bb47349c586572 | 2,180 | py | Python | logistic regression.py | amirshnll/Abalone | 17bd03dd583e90b1fd3b3881acca1928f27e433b | [
"MIT"
] | 3 | 2021-01-29T21:24:40.000Z | 2022-01-08T10:30:54.000Z | logistic regression.py | amirshnll/Abalone | 17bd03dd583e90b1fd3b3881acca1928f27e433b | [
"MIT"
] | null | null | null | logistic regression.py | amirshnll/Abalone | 17bd03dd583e90b1fd3b3881acca1928f27e433b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
##### Author : Amir Shokri
##### github link : https://github.com/amirshnll/Abalone
##### dataset link : http://archive.ics.uci.edu/ml/datasets/Abalone
##### email : amirsh.nll@gmail.com
# In[2]:
import sklearn
import numpy as np
import pandas as pd
import seaborn a... | 21.8 | 86 | 0.739908 |
d76696dc5abc5694a43e9dbd7e617b04c15994e9 | 138 | py | Python | mal/__init__.py | Authum09/mal-api | f7a64fb72c7932cbde6f0617fc3eee9053f328f0 | [
"MIT"
] | null | null | null | mal/__init__.py | Authum09/mal-api | f7a64fb72c7932cbde6f0617fc3eee9053f328f0 | [
"MIT"
] | null | null | null | mal/__init__.py | Authum09/mal-api | f7a64fb72c7932cbde6f0617fc3eee9053f328f0 | [
"MIT"
] | null | null | null | from mal.anime import Anime
from mal.manga import Manga
from mal.anime_search import AnimeSearch
from mal.manga_search import MangaSearch
| 27.6 | 40 | 0.855072 |
1c10f2ec222a860d1c8af9198c04bb612c9283a4 | 2,493 | py | Python | Nile/Test.py | ee1tbg/elanFirstPyProj | 34dce646b14bf33d0adb673fbcd52a43986fe1cb | [
"MIT"
] | null | null | null | Nile/Test.py | ee1tbg/elanFirstPyProj | 34dce646b14bf33d0adb673fbcd52a43986fe1cb | [
"MIT"
] | null | null | null | Nile/Test.py | ee1tbg/elanFirstPyProj | 34dce646b14bf33d0adb673fbcd52a43986fe1cb | [
"MIT"
] | null | null | null | def test_function(fn):
if fn.__name__ == "calculate_shipping_cost":
test_shipping(fn)
if fn.__name__ == "calculate_driver_cost":
test_driver(fn)
if fn.__name__ == "calculate_money_made":
test_money(fn)
def test_shipping(f):
try:
costs = f((0, 0), (1, 1))
e... | 34.150685 | 123 | 0.626955 |
8988e0e8dacd9cc15c4db5bdbc925bf6e8e0a804 | 625 | py | Python | EstruturaSequencial/exercicio13.py | Nicolas-Wursthorn/exercicios-python-brasil | b2b564d48b519be04643636033ec0815e6d99ea1 | [
"MIT"
] | null | null | null | EstruturaSequencial/exercicio13.py | Nicolas-Wursthorn/exercicios-python-brasil | b2b564d48b519be04643636033ec0815e6d99ea1 | [
"MIT"
] | null | null | null | EstruturaSequencial/exercicio13.py | Nicolas-Wursthorn/exercicios-python-brasil | b2b564d48b519be04643636033ec0815e6d99ea1 | [
"MIT"
] | null | null | null | # Tendo como dado de entrada a altura(h) de uma pessoa, construa um algorítmo que calcule seu peso ideal utilizando as seguintes fórmulas:
# a. Para homens: (72.7 * h) - 58
# b. Para mulheres: (62.1 * h) - 44.7
altura = float(input("Digite sua altura em metros: "))
genero = int(input("Digite 1 (um) se você é homem, e... | 41.666667 | 138 | 0.6736 |
24eddcc2c72e340198f827dabad619e8b887a446 | 114,257 | py | Python | tensorflow/python/keras/metrics.py | leike666666/tensorflow | a3fd0ddfcb716be124e95b51e96e6c1e4507ef64 | [
"Apache-2.0"
] | 12 | 2020-12-28T18:42:10.000Z | 2022-03-24T17:34:21.000Z | tensorflow/python/keras/metrics.py | leike666666/tensorflow | a3fd0ddfcb716be124e95b51e96e6c1e4507ef64 | [
"Apache-2.0"
] | 2 | 2021-08-25T15:57:08.000Z | 2022-02-10T00:40:07.000Z | tensorflow/python/keras/metrics.py | leike666666/tensorflow | a3fd0ddfcb716be124e95b51e96e6c1e4507ef64 | [
"Apache-2.0"
] | 3 | 2020-11-13T09:01:58.000Z | 2021-08-02T08:04:14.000Z | # Copyright 2015 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... | 35.329932 | 115 | 0.667933 |
b9e431e03420b032c6eeec23d11b3602fa40ad34 | 2,526 | py | Python | tests/unittests/utils/configuration/test_scenario.py | ulope/scenario-player | f466d80f54617ccaf1cb5668a3873b328c040c73 | [
"MIT"
] | null | null | null | tests/unittests/utils/configuration/test_scenario.py | ulope/scenario-player | f466d80f54617ccaf1cb5668a3873b328c040c73 | [
"MIT"
] | null | null | null | tests/unittests/utils/configuration/test_scenario.py | ulope/scenario-player | f466d80f54617ccaf1cb5668a3873b328c040c73 | [
"MIT"
] | null | null | null | import pytest
from scenario_player.exceptions.config import ScenarioConfigurationError
from scenario_player.utils.configuration.base import ConfigMapping
from scenario_player.utils.configuration.scenario import ScenarioConfig
class TestScenarioConfig:
def test_is_subclass_of_config_mapping(self, minimal_definiti... | 50.52 | 100 | 0.750198 |
1d9d9b119648a291dffcf82d140f12d8cb65f793 | 4,421 | py | Python | plasmapy/utils/roman.py | seanjunheng2/PlasmaPy | 7b4e4aaf8b03d88b654456bca881329ade09e377 | [
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-1-Clause",
"BSD-3-Clause"
] | 429 | 2016-10-31T19:40:32.000Z | 2022-03-25T12:27:11.000Z | plasmapy/utils/roman.py | RAJAGOPALAN-GANGADHARAN/PlasmaPy | 6df9583cc47375687a07300c0aa11ba31634d770 | [
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-1-Clause",
"BSD-3-Clause"
] | 1,400 | 2015-11-24T23:00:44.000Z | 2022-03-30T21:03:25.000Z | plasmapy/utils/roman.py | RAJAGOPALAN-GANGADHARAN/PlasmaPy | 6df9583cc47375687a07300c0aa11ba31634d770 | [
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-1-Clause",
"BSD-3-Clause"
] | 289 | 2015-11-24T18:54:57.000Z | 2022-03-18T17:26:59.000Z | """
Convert to and from Roman numerals.
This file is adapted from the roman package that is available on PyPI,
which has the following copyright/license information:
Copyright (c) 2001 Mark Pilgrim
This program is free software; you can redistribute it and/or modify
it under the terms of the Python 2.1.1 license, av... | 22.671795 | 79 | 0.555983 |
0d66db8ad3d4c7014359842a48bfa696747a7991 | 298 | py | Python | Calliope/21 Lagesensor TP/Cp3a.py | frankyhub/Python | 323ef1399efcbc24ddc66ad069ff99b4999fff38 | [
"MIT"
] | null | null | null | Calliope/21 Lagesensor TP/Cp3a.py | frankyhub/Python | 323ef1399efcbc24ddc66ad069ff99b4999fff38 | [
"MIT"
] | null | null | null | Calliope/21 Lagesensor TP/Cp3a.py | frankyhub/Python | 323ef1399efcbc24ddc66ad069ff99b4999fff38 | [
"MIT"
] | null | null | null | """
Accelerometer mit Accel_x simulieren
========= TigerJython =========="""
from calliope_mini import *
while True:
acc = accelerometer.get_x()
print (acc)
if acc > 0:
display.show(Image.ARROW_N)
else:
display.show(Image.ARROW_S)
sleep(100)
| 18.625 | 37 | 0.567114 |
b76b595b2a0ec20495c984d2f353f93d92e63476 | 18,913 | py | Python | research/object_detection/protos/input_reader_pb2.py | arunodhayan/Tensorflow-objectdetection | ebe5eee433c781487ee1852bda48a815da4e8dd8 | [
"Apache-2.0"
] | null | null | null | research/object_detection/protos/input_reader_pb2.py | arunodhayan/Tensorflow-objectdetection | ebe5eee433c781487ee1852bda48a815da4e8dd8 | [
"Apache-2.0"
] | null | null | null | research/object_detection/protos/input_reader_pb2.py | arunodhayan/Tensorflow-objectdetection | ebe5eee433c781487ee1852bda48a815da4e8dd8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/input_reader.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message a... | 52.682451 | 2,012 | 0.773648 |
06d42f07b1cc2fab38ff9f1f24109b8526cbe702 | 20,640 | py | Python | tests/plotting/test_plot_manager.py | rob-opsi/chia-blockchain | 536d90f3b2d3be6ea78ce64528d04dcaba08fcb4 | [
"Apache-2.0"
] | null | null | null | tests/plotting/test_plot_manager.py | rob-opsi/chia-blockchain | 536d90f3b2d3be6ea78ce64528d04dcaba08fcb4 | [
"Apache-2.0"
] | 20 | 2021-12-16T03:08:57.000Z | 2022-03-29T17:15:32.000Z | tests/plotting/test_plot_manager.py | rob-opsi/chia-blockchain | 536d90f3b2d3be6ea78ce64528d04dcaba08fcb4 | [
"Apache-2.0"
] | null | null | null | import logging
from os import unlink
from pathlib import Path
from shutil import copy, move
from typing import Callable, Iterator, List, Optional
import pytest
from dataclasses import dataclass
from chia.plotting.util import (
PlotInfo,
PlotRefreshResult,
PlotRefreshEvents,
remove_plot,
get_plot_di... | 41.612903 | 120 | 0.702955 |
88acce184a6fec74079c4bb6f56180635dfde8f8 | 54,475 | py | Python | tests/core/full_node/test_mempool.py | vito-jwt/chia-blockchain | cd0a1c28e3c41ac2650ab7b3ef6a041e0c7f87b2 | [
"Apache-2.0"
] | 6 | 2021-05-21T10:29:32.000Z | 2021-07-10T12:51:34.000Z | tests/core/full_node/test_mempool.py | vito-jwt/chia-blockchain | cd0a1c28e3c41ac2650ab7b3ef6a041e0c7f87b2 | [
"Apache-2.0"
] | 28 | 2021-07-13T21:07:14.000Z | 2022-03-29T21:10:38.000Z | tests/core/full_node/test_mempool.py | vito-jwt/chia-blockchain | cd0a1c28e3c41ac2650ab7b3ef6a041e0c7f87b2 | [
"Apache-2.0"
] | 2 | 2021-05-18T15:33:58.000Z | 2021-05-28T21:15:09.000Z | import asyncio
import logging
from time import time
from typing import Dict, List
import pytest
from chia.full_node.mempool import Mempool
from chia.protocols import full_node_protocol
from chia.simulator.simulator_protocol import FarmNewBlockProtocol
from chia.types.announcement import Announcement
from chia.types.b... | 41.051243 | 120 | 0.699734 |
df5a9db03c22be428a20e636d1c9fd9e477fab73 | 3,498 | py | Python | tests/builder/runtime/test_executables_scanner.py | lexatnet/appimage-builder | 58b8849a837cab6618c3ca0de3ade5f884fc954a | [
"MIT"
] | null | null | null | tests/builder/runtime/test_executables_scanner.py | lexatnet/appimage-builder | 58b8849a837cab6618c3ca0de3ade5f884fc954a | [
"MIT"
] | null | null | null | tests/builder/runtime/test_executables_scanner.py | lexatnet/appimage-builder | 58b8849a837cab6618c3ca0de3ade5f884fc954a | [
"MIT"
] | null | null | null | # Copyright 2021 Alexis Lopez Zubieta
#
# 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, publi... | 40.206897 | 80 | 0.717839 |
ee1cb652da680342b0390ae60710d7a10dc3775b | 30,339 | py | Python | tests/chainermn_tests/communicator_tests/test_communicator.py | zaltoprofen/chainer | 3b03f9afc80fd67f65d5e0395ef199e9506b6ee1 | [
"MIT"
] | null | null | null | tests/chainermn_tests/communicator_tests/test_communicator.py | zaltoprofen/chainer | 3b03f9afc80fd67f65d5e0395ef199e9506b6ee1 | [
"MIT"
] | null | null | null | tests/chainermn_tests/communicator_tests/test_communicator.py | zaltoprofen/chainer | 3b03f9afc80fd67f65d5e0395ef199e9506b6ee1 | [
"MIT"
] | null | null | null | import mock
import mpi4py.MPI
import numpy as np
import pytest
import unittest
import chainer
import chainer.cuda
import chainer.initializers
import chainer.links
import chainer.testing
import chainer.testing.attr
import chainermn
from chainermn.communicators import _communication_utility
from chainermn.communicators.... | 33.747497 | 79 | 0.607766 |
8c7f2a85135eeba4cda32519a247ec426559abad | 240 | py | Python | tests/test_articles.py | JAMAL-MOHAMED-JALDESA-2893/news | 5f6e57e01eed6c49e670f14742320cdbea40ca53 | [
"MIT"
] | null | null | null | tests/test_articles.py | JAMAL-MOHAMED-JALDESA-2893/news | 5f6e57e01eed6c49e670f14742320cdbea40ca53 | [
"MIT"
] | null | null | null | tests/test_articles.py | JAMAL-MOHAMED-JALDESA-2893/news | 5f6e57e01eed6c49e670f14742320cdbea40ca53 | [
"MIT"
] | null | null | null | import unittest
from app.models import Articles
class Articles(unittest.TestCase):
def setUp(self):
self.new_articles = Articles( )
def test_instance(self):
self.assertTrue(isinstance(self.new_article, Articles))
| 24 | 63 | 0.720833 |
a641d23b2d9ed6c452e466130d2d2ffb02c18201 | 2,212 | py | Python | ros-workspace/src/client_temp_humidity_si7021/scripts/node.py | Nextfood/grow-unit-control | dbf9255500e5940ac7af806756c0412d14bdd90d | [
"MIT"
] | 1 | 2017-08-26T21:28:10.000Z | 2017-08-26T21:28:10.000Z | ros-workspace/src/client_temp_humidity_si7021/scripts/node.py | Nextfood/grow-unit-control | dbf9255500e5940ac7af806756c0412d14bdd90d | [
"MIT"
] | null | null | null | ros-workspace/src/client_temp_humidity_si7021/scripts/node.py | Nextfood/grow-unit-control | dbf9255500e5940ac7af806756c0412d14bdd90d | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import json
import serial
import serial.tools.list_ports
import time
import rospy
from std_msgs.msg import Float64
from atmega328p_service_discovery.srv import *
polling_frequency = 1 # Hz
def main():
if len(sys.argv) < 2:
rospy.loginfo("Unable to start client with no identi... | 32.057971 | 96 | 0.641049 |
2fbcd6e97434f0c483e0b9f7376b9e31fd73e295 | 569 | py | Python | faddr/database.py | kido5217/faddr | 116c789ac3985cc3f461203e249d8043dcb73428 | [
"MIT"
] | 1 | 2022-03-10T17:52:13.000Z | 2022-03-10T17:52:13.000Z | faddr/database.py | kido5217/faddr | 116c789ac3985cc3f461203e249d8043dcb73428 | [
"MIT"
] | 45 | 2021-08-08T15:23:42.000Z | 2022-03-28T20:23:57.000Z | faddr/database.py | kido5217/faddr | 116c789ac3985cc3f461203e249d8043dcb73428 | [
"MIT"
] | 1 | 2021-10-22T00:46:35.000Z | 2021-10-22T00:46:35.000Z | from tinydb import TinyDB
# TODO: redo this, maybe use SQL
class Database:
def __init__(self, db_file):
"""Create database file, erase previous one if exists."""
self.db = TinyDB(db_file)
# TODO: implement db files rotation, for now just replace all data
self.db.truncate()
... | 28.45 | 74 | 0.643234 |
8e34674eeb224b502d46a911b2bb4233cff68756 | 671 | py | Python | LeetCode/Python/number_of_good_pairs.py | parizadas/HacktoberFest2020-3 | 48cb0c7f2d43d38cb7d8343df18035c9288c63ea | [
"MIT"
] | 51 | 2020-09-27T15:28:05.000Z | 2021-09-29T02:07:25.000Z | LeetCode/Python/number_of_good_pairs.py | parizadas/HacktoberFest2020-3 | 48cb0c7f2d43d38cb7d8343df18035c9288c63ea | [
"MIT"
] | 152 | 2020-09-27T12:12:12.000Z | 2021-10-03T18:22:15.000Z | LeetCode/Python/number_of_good_pairs.py | parizadas/HacktoberFest2020-3 | 48cb0c7f2d43d38cb7d8343df18035c9288c63ea | [
"MIT"
] | 453 | 2020-09-27T12:34:35.000Z | 2021-10-16T08:33:33.000Z | class Solution(object):
def numIdenticalPairs(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
count = 0
for i in range(len(nums)):
for j in range(len(nums)):
if nums[i] == nums[j] and i < j:
count += 1
ret... | 23.137931 | 56 | 0.460507 |
53a4c1e3bc8cd87638c548dfebae8df7114bec52 | 1,670 | py | Python | Recursion/Aditya_Verma/Input_Output_Method/Letter_Case_Permutation/Letter_Case_Permutation.py | prash-kr-meena/GoogleR | 27aca71e51cc2442e604e07ab00406a98d8d63a4 | [
"Apache-2.0"
] | null | null | null | Recursion/Aditya_Verma/Input_Output_Method/Letter_Case_Permutation/Letter_Case_Permutation.py | prash-kr-meena/GoogleR | 27aca71e51cc2442e604e07ab00406a98d8d63a4 | [
"Apache-2.0"
] | null | null | null | Recursion/Aditya_Verma/Input_Output_Method/Letter_Case_Permutation/Letter_Case_Permutation.py | prash-kr-meena/GoogleR | 27aca71e51cc2442e604e07ab00406a98d8d63a4 | [
"Apache-2.0"
] | null | null | null | from typing import List
# Note : You can return the output in any order.
# in worst case, all characters are alphabets, hence 2 choices for each so its exponential
# Time : O(2^n)
def get_letter_case_permutations(permutations: List[str], input, output="", index=0):
if index >= len(input):
permutations.ap... | 38.837209 | 120 | 0.724551 |
7f884171140cd361d0f5eca4ab969a9651fc2fc3 | 1,931 | py | Python | wb_common/uid.py | contactless/wb-common | 401a1bafa1ccf401b79360f577c267128f135db3 | [
"MIT"
] | null | null | null | wb_common/uid.py | contactless/wb-common | 401a1bafa1ccf401b79360f577c267128f135db3 | [
"MIT"
] | null | null | null | wb_common/uid.py | contactless/wb-common | 401a1bafa1ccf401b79360f577c267128f135db3 | [
"MIT"
] | 1 | 2021-11-04T09:01:45.000Z | 2021-11-04T09:01:45.000Z | from __future__ import print_function
import re
import os
import subprocess
# get_mac() has been moved to test_suite, because it uses wb-gen-serial,
# which depends on this (wb-common) package (avoid circular dependency)
def get_cpuinfo_serial():
data = open('/proc/cpuinfo').read()
matches = re.findall('^Ser... | 30.650794 | 87 | 0.615225 |
856d63b547e5c9eab4003db5124425095f4d1dcd | 1,365 | py | Python | userbot/modules/sql_helper/snips_sql.py | alexa-v2/Amroslayeruserbot | 2a1a3b2da6294700eab13ed404fd300291ba40e6 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2019-09-24T15:14:00.000Z | 2019-12-07T07:24:25.000Z | userbot/modules/sql_helper/snips_sql.py | alexa-v2/Amroslayeruserbot | 2a1a3b2da6294700eab13ed404fd300291ba40e6 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/sql_helper/snips_sql.py | alexa-v2/Amroslayeruserbot | 2a1a3b2da6294700eab13ed404fd300291ba40e6 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 57 | 2019-12-01T17:03:16.000Z | 2021-04-30T01:50:35.000Z | try:
from userbot.modules.sql_helper import SESSION, BASE
except ImportError:
raise AttributeError
from sqlalchemy import Column, UnicodeText, LargeBinary, Numeric
class Snips(BASE):
__tablename__ = "snips"
snip = Column(UnicodeText, primary_key=True)
f_mesg_id = Column(Numeric)
def __init__... | 22.016129 | 64 | 0.638095 |
dfd439be6653be7153dc6ad8df94dab140f3439a | 766 | py | Python | get_airports.py | edenmui/edenmui.github.io | 47df2de6ee957d84e3546af1519d7d22bd48e8e3 | [
"Apache-2.0"
] | null | null | null | get_airports.py | edenmui/edenmui.github.io | 47df2de6ee957d84e3546af1519d7d22bd48e8e3 | [
"Apache-2.0"
] | null | null | null | get_airports.py | edenmui/edenmui.github.io | 47df2de6ee957d84e3546af1519d7d22bd48e8e3 | [
"Apache-2.0"
] | null | null | null | # %%
doc = 'Assets/airports.csv'
import pandas as pd
df = pd.read_csv(doc)
print(df.head())
df = df[df['type'] != 'closed']
iata = df[['iata_code', 'name', 'iso_country']].dropna()
iata.columns = ['IATA', 'Name', 'Country']
iata['ID'] = range(0,iata.shape[0])
iata.set_index('ID', drop=False, inplace=True)
iata['Name... | 28.37037 | 113 | 0.591384 |
a8acffc47a1b7418eced8c5c37c8a41d8c184640 | 2,216 | py | Python | sa/profiles/Huawei/VRP/oidrules/slot.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | sa/profiles/Huawei/VRP/oidrules/slot.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | sa/profiles/Huawei/VRP/oidrules/slot.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# Huawei.VRP.SlotRule
# ----------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# NOC modu... | 36.327869 | 94 | 0.376805 |
7d1cef89c679006501c016484f0058b6d9dd8c59 | 319 | py | Python | packages/pyright-internal/src/tests/samples/import10.py | Jasha10/pyright | 0ce0cfa10fe7faa41071a2cc417bb449cf8276fe | [
"MIT"
] | 3,934 | 2019-03-22T09:26:41.000Z | 2019-05-06T21:03:08.000Z | packages/pyright-internal/src/tests/samples/import10.py | Jasha10/pyright | 0ce0cfa10fe7faa41071a2cc417bb449cf8276fe | [
"MIT"
] | 107 | 2019-03-24T04:09:37.000Z | 2019-05-06T17:00:04.000Z | packages/pyright-internal/src/tests/samples/import10.py | Jasha10/pyright | 0ce0cfa10fe7faa41071a2cc417bb449cf8276fe | [
"MIT"
] | 119 | 2019-03-23T10:48:04.000Z | 2019-05-06T08:57:56.000Z | # This sample tests the handling of an unresolved import.
# It should report a single error but not have cascading
# errors when the unresolved symbol is used.
# This should generate an error.
import unresolved_import
def test_zero_division():
with unresolved_import.raises(ZeroDivisionError):
v = 1 / 0
| 26.583333 | 57 | 0.758621 |
ff1f0f4e5a9b66c15f23aa054dd4bd1dade04118 | 1,988 | py | Python | sdk/python/setup.py | spacelift-io/pulumi-spacelift | e9a49f5baddb02c32db45dc21fa79b4643653048 | [
"MIT"
] | null | null | null | sdk/python/setup.py | spacelift-io/pulumi-spacelift | e9a49f5baddb02c32db45dc21fa79b4643653048 | [
"MIT"
] | null | null | null | sdk/python/setup.py | spacelift-io/pulumi-spacelift | e9a49f5baddb02c32db45dc21fa79b4643653048 | [
"MIT"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import errno
from setuptools import setup, find_packages
from setuptools.command.install import install
from subprocess import check_ca... | 33.133333 | 150 | 0.597586 |
459b9547371c809f624df5282356ab92994a9c7a | 1,603 | py | Python | Side-bar layout/testiing_dash.py | aakash-cse/emo-Website | bdb71a0daf896ac010a704b2d9fefefa4cf4e8c8 | [
"MIT"
] | null | null | null | Side-bar layout/testiing_dash.py | aakash-cse/emo-Website | bdb71a0daf896ac010a704b2d9fefefa4cf4e8c8 | [
"MIT"
] | null | null | null | Side-bar layout/testiing_dash.py | aakash-cse/emo-Website | bdb71a0daf896ac010a704b2d9fefefa4cf4e8c8 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template
from flask import request
from flask import request, redirect, render_template, url_for
import json
from dashboard import *
from mail import email_content
from log_load import verify
from extra import write_log
app = Flask(__name__)
@app.route('/',... | 33.395833 | 66 | 0.68247 |
a299e2149aae31173a77acdb912d6a25d76e89b7 | 3,067 | py | Python | test/aqua/test_grover.py | hushaohan/aqua | 8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d | [
"Apache-2.0"
] | 1 | 2020-08-01T21:07:54.000Z | 2020-08-01T21:07:54.000Z | test/aqua/test_grover.py | hushaohan/aqua | 8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d | [
"Apache-2.0"
] | null | null | null | test/aqua/test_grover.py | hushaohan/aqua | 8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d | [
"Apache-2.0"
] | 1 | 2022-01-25T07:09:10.000Z | 2022-01-25T07:09:10.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 36.082353 | 98 | 0.589175 |
adec9d8ed3b94f90d236159a64303d3e3faca067 | 2,128 | py | Python | tests/test_state_orders.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | 3,999 | 2018-11-09T10:38:51.000Z | 2022-03-31T12:29:12.000Z | tests/test_state_orders.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | 172 | 2020-04-16T16:19:08.000Z | 2022-03-28T13:28:55.000Z | tests/test_state_orders.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | 495 | 2019-03-01T21:48:53.000Z | 2022-03-30T15:35:19.000Z | from jesse.config import config, reset_config
from jesse.enums import exchanges
from jesse.factories import fake_order
from jesse.store import store
def set_up():
"""
"""
reset_config()
config['app']['trading_exchanges'] = [exchanges.SANDBOX, exchanges.BITFINEX]
config['app']['trading_symbols'] =... | 30.4 | 80 | 0.660244 |
572ec48c0f17f723591123e5fa6e9184cac3bc8b | 562 | py | Python | manage.py | MaheshBodas/BriteCorePOCAPI | 2f189bbcea64aa707992f7fa139eac71dd3e9c7c | [
"MIT"
] | null | null | null | manage.py | MaheshBodas/BriteCorePOCAPI | 2f189bbcea64aa707992f7fa139eac71dd3e9c7c | [
"MIT"
] | 3 | 2020-06-05T18:17:25.000Z | 2022-02-10T10:11:13.000Z | manage.py | MaheshBodas/BriteCorePOCAPI | 2f189bbcea64aa707992f7fa139eac71dd3e9c7c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "BriteCorePOCAPI.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't i... | 35.125 | 80 | 0.672598 |
2fdf1cdd8e9a8fefb8cadff2995d051d6aad4c74 | 647 | py | Python | networking_fortinet/cmd/__init__.py | samsu/networking-fortinet | f9c99bcfbae7d328d0de815fb68fe3b6719c9050 | [
"Apache-2.0"
] | null | null | null | networking_fortinet/cmd/__init__.py | samsu/networking-fortinet | f9c99bcfbae7d328d0de815fb68fe3b6719c9050 | [
"Apache-2.0"
] | null | null | null | networking_fortinet/cmd/__init__.py | samsu/networking-fortinet | f9c99bcfbae7d328d0de815fb68fe3b6719c9050 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 38.058824 | 78 | 0.74034 |
0bc9c78b712dc3ca67b3ba3892e194d5d5097e91 | 5,337 | py | Python | sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipeline_operation_statuses_operations.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipeline_operation_statuses_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipeline_operation_statuses_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.081081 | 232 | 0.691212 |
22cada980baf913bf8cb2889fa8216a921c0460c | 2,912 | py | Python | cirq/testing/__init__.py | m-szalay/Cirq | 1bd083a87fdf49212f347d88f15713e90cc72f8f | [
"Apache-2.0"
] | null | null | null | cirq/testing/__init__.py | m-szalay/Cirq | 1bd083a87fdf49212f347d88f15713e90cc72f8f | [
"Apache-2.0"
] | null | null | null | cirq/testing/__init__.py | m-szalay/Cirq | 1bd083a87fdf49212f347d88f15713e90cc72f8f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Cirq 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 30.020619 | 74 | 0.809753 |
cb2030aab31509e7086fdba8692b1a3f666a205f | 5,372 | py | Python | tools/accuracy_checker/openvino/tools/accuracy_checker/main.py | TolyaTalamanov/open_model_zoo | 1697e60712df4ca72635a2080a197b9d3bc24129 | [
"Apache-2.0"
] | 1 | 2019-05-31T14:01:42.000Z | 2019-05-31T14:01:42.000Z | tools/accuracy_checker/openvino/tools/accuracy_checker/main.py | Pandinosaurus/open_model_zoo | 2543996541346418919c5cddfb71e33e2cdef080 | [
"Apache-2.0"
] | null | null | null | tools/accuracy_checker/openvino/tools/accuracy_checker/main.py | Pandinosaurus/open_model_zoo | 2543996541346418919c5cddfb71e33e2cdef080 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2018-2022 Intel Corporation
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.371429 | 116 | 0.691549 |
9c50717b733e44e0ebe83fcfd78c6570358a11cf | 127 | py | Python | apps/exercises/apps.py | ospreyelm/HarmonyLab | 0934c67ab93a7da21e45f7956cb1b32ed3c9f728 | [
"BSD-3-Clause"
] | 4 | 2018-02-09T01:18:46.000Z | 2020-11-23T10:06:21.000Z | apps/exercises/apps.py | ospreyelm/HarmonyLab | 0934c67ab93a7da21e45f7956cb1b32ed3c9f728 | [
"BSD-3-Clause"
] | 8 | 2020-07-26T22:06:05.000Z | 2021-08-19T04:17:18.000Z | apps/exercises/apps.py | ospreyelm/HarmonyLab | 0934c67ab93a7da21e45f7956cb1b32ed3c9f728 | [
"BSD-3-Clause"
] | 6 | 2018-02-09T19:11:15.000Z | 2020-09-06T22:49:43.000Z | from django.apps import AppConfig
class ExercisesConfig(AppConfig):
name = 'apps.exercises'
verbose_name = 'Content'
| 18.142857 | 33 | 0.740157 |
690d9e506cbf46d2f7a7189523789df91d7ae65a | 1,018 | py | Python | grokking-the-coding-interview/bitwise-xor/Complement-of-Base-10-Number-(medium).py | huandrew99/LeetCode | aa36b48d06100ce5f0bc64c789a906ec29409440 | [
"MIT"
] | 36 | 2021-12-23T15:44:41.000Z | 2022-03-31T04:26:26.000Z | grokking-the-coding-interview/bitwise-xor/Complement-of-Base-10-Number-(medium).py | wzy0766/LeetCode-1 | 3070e672c519e8af74966811b8058a9baef8c0bc | [
"MIT"
] | null | null | null | grokking-the-coding-interview/bitwise-xor/Complement-of-Base-10-Number-(medium).py | wzy0766/LeetCode-1 | 3070e672c519e8af74966811b8058a9baef8c0bc | [
"MIT"
] | 11 | 2022-02-26T22:41:26.000Z | 2022-03-02T07:18:41.000Z | """
LC 1009
Every non-negative integer N has a binary representation, for example, 8 can be represented as “1000” in binary and 7 as “0111” in binary.
The complement of a binary representation is the number in binary that we get when we change every 1 to a 0 and every 0 to a 1. For example, the binary complement of “10... | 29.941176 | 183 | 0.713163 |
9c095e87b37fd71abd9bf6bad60defae66ff7e5c | 601 | py | Python | server/stores/migrations/0003_store_rider.py | Taycode/jumga | 77b9a8735da11aaf2b21c92ad6750b9e98aae267 | [
"MIT"
] | 5 | 2021-01-20T00:14:54.000Z | 2021-11-16T23:46:40.000Z | server/stores/migrations/0003_store_rider.py | Taycode/jumga | 77b9a8735da11aaf2b21c92ad6750b9e98aae267 | [
"MIT"
] | null | null | null | server/stores/migrations/0003_store_rider.py | Taycode/jumga | 77b9a8735da11aaf2b21c92ad6750b9e98aae267 | [
"MIT"
] | 2 | 2021-01-19T23:11:16.000Z | 2021-01-21T10:34:45.000Z | # Generated by Django 3.1.4 on 2021-01-13 08:31
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('stores', '0002_store_own... | 27.318182 | 144 | 0.675541 |
ffa458fb5c9ffd60a4197f738ae66b8225f2e835 | 389 | py | Python | src/posts/migrations/0015_post_announcement.py | PeterKim321/DjangoFoodBlog | 7a0a63a8fd8eaf4bb18945b655f3115fa7b4a580 | [
"Apache-2.0"
] | null | null | null | src/posts/migrations/0015_post_announcement.py | PeterKim321/DjangoFoodBlog | 7a0a63a8fd8eaf4bb18945b655f3115fa7b4a580 | [
"Apache-2.0"
] | null | null | null | src/posts/migrations/0015_post_announcement.py | PeterKim321/DjangoFoodBlog | 7a0a63a8fd8eaf4bb18945b655f3115fa7b4a580 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.4 on 2020-12-26 05:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('posts', '0014_auto_20201225_0345'),
]
operations = [
migrations.AddField(
model_name='post',
name='announcement',
... | 20.473684 | 53 | 0.601542 |
13ebe5c2be9d1c06fa8ff3ca1eb0cd3398010e5c | 694 | py | Python | leerdrisDS/App/leerdrisDs.py | GitLuisG/Mineria_de_datos-Trabajo_CSV | f539d00a28e52106567e529857d42b3645c36bfa | [
"MIT"
] | null | null | null | leerdrisDS/App/leerdrisDs.py | GitLuisG/Mineria_de_datos-Trabajo_CSV | f539d00a28e52106567e529857d42b3645c36bfa | [
"MIT"
] | null | null | null | leerdrisDS/App/leerdrisDs.py | GitLuisG/Mineria_de_datos-Trabajo_CSV | f539d00a28e52106567e529857d42b3645c36bfa | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
IrisDataFrame = pd.read_csv('iris.data', header=None, index_col=None)
print(type(IrisDataFrame))
# Convertimos el "DataFrame" a un "Numpy Array"
IrisNumpyArray = IrisDataFrame.to_numpy()
num_filas, num_columnas = IrisNumpyArray.shape
print('Num. filas = {}, Num. columnas = {}'.fo... | 36.526316 | 78 | 0.746398 |
0db1f1fbfaceeb83f82afd6ef0df765f639bc49c | 170 | py | Python | submitter/urls.py | MartinStevko/sutazeStrom | 8b7dbc8c5a7e6ca64c5c2ab0ec9d51ec15773512 | [
"MIT"
] | 3 | 2018-08-30T21:32:15.000Z | 2018-09-23T10:18:32.000Z | submitter/urls.py | ZdruzenieSTROM/sutazeStrom | 8b7dbc8c5a7e6ca64c5c2ab0ec9d51ec15773512 | [
"MIT"
] | 9 | 2018-09-25T17:07:25.000Z | 2021-09-22T17:45:28.000Z | submitter/urls.py | MartinStevko/sutazeStrom | 8b7dbc8c5a7e6ca64c5c2ab0ec9d51ec15773512 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('competition.urls')),
]
| 21.25 | 42 | 0.694118 |
8e6d6120a7d15341f1953f93d6d284d905cd0bcb | 714 | py | Python | popita/chat/models.py | gpiechnik2/popita | ad044f0884d1dcac6943e036187d867d5209ffd1 | [
"Apache-2.0"
] | null | null | null | popita/chat/models.py | gpiechnik2/popita | ad044f0884d1dcac6943e036187d867d5209ffd1 | [
"Apache-2.0"
] | null | null | null | popita/chat/models.py | gpiechnik2/popita | ad044f0884d1dcac6943e036187d867d5209ffd1 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from accounts.models import User
# Create your models here.
class Room(models.Model):
title = models.CharField(max_length=100, blank=True, default='')
receivers = models.ManyToManyField(User)
def __str__(self):
return self.title
class Message(models.Model):
rec... | 26.444444 | 68 | 0.704482 |
e202f3e69d08556c4b5540517b3e165919ec0469 | 4,885 | py | Python | experiments/ashvin/vae/reacher2d/test_vae_goal2.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/vae/reacher2d/test_vae_goal2.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/vae/reacher2d/test_vae_goal2.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | from railrl.envs.multitask.multitask_env import MultitaskToFlatEnv
from railrl.envs.multitask.point2d import MultitaskImagePoint2DEnv
from railrl.envs.mujoco.pusher2d import Pusher2DEnv
from railrl.envs.wrappers import NormalizedBoxEnv
from railrl.exploration_strategies.base import (
PolicyWrappedWithExplorationStr... | 33.458904 | 105 | 0.663255 |
0e1263c39876b80771a3f505fe01780e2c80ed07 | 11,344 | py | Python | pychebfun/chebfun.py | jamadagni/pychebfun | cda92838186f20ed1458f4f988b5affd213b2648 | [
"BSD-3-Clause"
] | 72 | 2015-02-23T17:08:38.000Z | 2022-02-09T18:17:08.000Z | pychebfun/chebfun.py | jamadagni/pychebfun | cda92838186f20ed1458f4f988b5affd213b2648 | [
"BSD-3-Clause"
] | 6 | 2015-01-19T14:12:23.000Z | 2021-11-05T08:16:27.000Z | pychebfun/chebfun.py | jamadagni/pychebfun | cda92838186f20ed1458f4f988b5affd213b2648 | [
"BSD-3-Clause"
] | 14 | 2015-07-31T00:08:36.000Z | 2021-02-01T22:20:41.000Z | #!/usr/bin/env python
# coding: UTF-8
"""
Chebfun module
==============
.. moduleauthor :: Chris Swierczewski <cswiercz@gmail.com>
.. moduleauthor :: Olivier Verdier <olivier.verdier@gmail.com>
.. moduleauthor :: Gregory Potter <ghpotter@gmail.com>
"""
from __future__ import division
import operator
import numpy a... | 32.411429 | 236 | 0.517278 |
bd08e3e456f441130b9179cbb76655c2b5d9d0bf | 492 | py | Python | project4/network/migrations/0009_auto_20201120_2329.py | mjs375/cs50_Network | 31a2399f4429931b15721861a2940b57811ae844 | [
"MIT"
] | null | null | null | project4/network/migrations/0009_auto_20201120_2329.py | mjs375/cs50_Network | 31a2399f4429931b15721861a2940b57811ae844 | [
"MIT"
] | null | null | null | project4/network/migrations/0009_auto_20201120_2329.py | mjs375/cs50_Network | 31a2399f4429931b15721861a2940b57811ae844 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2020-11-20 23:29
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('network', '0008_auto_20201117_1727'),
]
operations = [
migrations.AlterField(
model_name='post'... | 24.6 | 124 | 0.650407 |
777dac95a6d9cdd3e05a5996f241eade9630a0ae | 5,660 | py | Python | tests/test_utils.py | nirum/descent | 074c8452f15a0da638668a4fe139fde06ccfae7f | [
"MIT"
] | 25 | 2015-07-03T20:04:00.000Z | 2021-06-15T00:02:13.000Z | tests/test_utils.py | nirum/descent | 074c8452f15a0da638668a4fe139fde06ccfae7f | [
"MIT"
] | 5 | 2015-10-04T08:21:10.000Z | 2017-07-16T19:51:57.000Z | tests/test_utils.py | nirum/descent | 074c8452f15a0da638668a4fe139fde06ccfae7f | [
"MIT"
] | 8 | 2015-10-04T08:18:18.000Z | 2021-06-15T00:02:15.000Z | """
Test conversion utilities
"""
import numpy as np
import descent
from descent.utils import destruct, restruct, lrucache, check_grad
from io import StringIO
from time import sleep, time
import re
def test_all():
"""Test that __all__ contains only names that are actually exported."""
missing = set(n for n in... | 32.159091 | 103 | 0.579152 |
f3fbe2b030d91f20209651417bdbda5d748fef3c | 3,367 | py | Python | indicators/tests/test_indicator_model_helper_methods.py | mercycorps/toladata | 4d5f9b45905a81af9981b586690e020d5b3bfc60 | [
"Apache-2.0"
] | null | null | null | indicators/tests/test_indicator_model_helper_methods.py | mercycorps/toladata | 4d5f9b45905a81af9981b586690e020d5b3bfc60 | [
"Apache-2.0"
] | 268 | 2020-03-31T15:46:59.000Z | 2022-03-31T18:01:08.000Z | indicators/tests/test_indicator_model_helper_methods.py | mercycorps/toladata | 4d5f9b45905a81af9981b586690e020d5b3bfc60 | [
"Apache-2.0"
] | 1 | 2021-01-05T01:58:24.000Z | 2021-01-05T01:58:24.000Z | import datetime
from django.test import TestCase
from factories.indicators_models import (
IndicatorFactory,
PeriodicTargetFactory,
RFIndicatorFactory,
IndicatorTypeFactory
)
from indicators.models import Indicator
from tola.test.base_classes import TestBase
def _create_3_periodic_targets(indicator... | 34.71134 | 116 | 0.716068 |
3bb728c4fa335a1fbc9077ee256581562c06fb50 | 848 | py | Python | tuskar_ui/infrastructure/images/panel.py | rdo-management/tuskar-ui | 513f0da17bc4714d8c93209dd71c1f52c2713a8b | [
"Apache-2.0"
] | 1 | 2015-02-19T12:23:23.000Z | 2015-02-19T12:23:23.000Z | tuskar_ui/infrastructure/images/panel.py | rdo-management/tuskar-ui | 513f0da17bc4714d8c93209dd71c1f52c2713a8b | [
"Apache-2.0"
] | null | null | null | tuskar_ui/infrastructure/images/panel.py | rdo-management/tuskar-ui | 513f0da17bc4714d8c93209dd71c1f52c2713a8b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
#
# 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... | 31.407407 | 78 | 0.733491 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.