hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a038eb75904f29c41fd684c2ce83758ff6a889d | 3,580 | py | Python | tests/test_pytest_plugin.py | bcb/aiohttp | 77638364958c74fff7719fdc028a79aa2281c3ad | [
"Apache-2.0"
] | null | null | null | tests/test_pytest_plugin.py | bcb/aiohttp | 77638364958c74fff7719fdc028a79aa2281c3ad | [
"Apache-2.0"
] | 2 | 2018-06-12T15:22:48.000Z | 2018-06-12T15:31:13.000Z | tests/test_pytest_plugin.py | bcb/aiohttp | 77638364958c74fff7719fdc028a79aa2281c3ad | [
"Apache-2.0"
] | 1 | 2020-01-17T00:33:59.000Z | 2020-01-17T00:33:59.000Z | pytest_plugins = 'pytester'
def test_myplugin(testdir):
testdir.makepyfile("""\
import asyncio
import pytest
from unittest import mock
from aiohttp import web
pytest_plugins = 'aiohttp.pytest_plugin'
@asyncio.coroutine
def hello(request):
return web.Response(body=b'Hello, world')
def create_app(loop):
... | 24.026846 | 68 | 0.681564 |
4a038f521d584f28c9011d14a01b5919e0989d27 | 5,537 | py | Python | data/external/repositories_2to3/132160/kaggle-ndsb-master/configurations/bagging_14_convroll4_big_weightdecay.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/132160/kaggle-ndsb-master/configurations/bagging_14_convroll4_big_weightdecay.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/132160/kaggle-ndsb-master/configurations/bagging_14_convroll4_big_weightdecay.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | import numpy as np
import theano
import theano.tensor as T
import lasagne as nn
import data
import load
import nn_plankton
import dihedral
import dihedral_fast
import tmp_dnn
import tta
validation_split_path = "splits/bagging_split_14.pkl"
patch_size = (95, 95)
augmentation_params = {
'... | 44.296 | 206 | 0.711577 |
4a03905c279f598174db8de3151753cdadb5c3d6 | 10,055 | py | Python | termtosvg/main.py | pshevtsov/termtosvg | 5b5c91ff17294ccc71a4ba3cff9ecc7a1cc3fafe | [
"BSD-3-Clause"
] | null | null | null | termtosvg/main.py | pshevtsov/termtosvg | 5b5c91ff17294ccc71a4ba3cff9ecc7a1cc3fafe | [
"BSD-3-Clause"
] | null | null | null | termtosvg/main.py | pshevtsov/termtosvg | 5b5c91ff17294ccc71a4ba3cff9ecc7a1cc3fafe | [
"BSD-3-Clause"
] | null | null | null | """Command line interface of termtosvg"""
import argparse
import logging
import sys
import tempfile
import termtosvg.config
import termtosvg.anim
logger = logging.getLogger('termtosvg')
USAGE = """termtosvg [output_file] [-g GEOMETRY] [-m MIN_DURATION] [-M MAX_DURATION]
[-t TEMPLATE] [-h]
Record a... | 43.154506 | 132 | 0.654799 |
4a0390d92a3a5b2e36abc224e1bda5a4f8d7618d | 11,128 | py | Python | src/pip/_internal/__init__.py | Cristie/pip | e74d7a8bc9faa971e89b6aeed33e5187b983ebbd | [
"MIT"
] | 1 | 2018-07-24T14:56:11.000Z | 2018-07-24T14:56:11.000Z | src/pip/_internal/__init__.py | Cristie/pip | e74d7a8bc9faa971e89b6aeed33e5187b983ebbd | [
"MIT"
] | null | null | null | src/pip/_internal/__init__.py | Cristie/pip | e74d7a8bc9faa971e89b6aeed33e5187b983ebbd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import absolute_import
import locale
import logging
import os
import optparse
import warnings
import sys
# 2016-06-17 barry@debian.org: urllib3 1.14 added optional support for socks,
# but if invoked (i.e. imported), it will issue a warning to stderr if socks
# isn't available. ... | 36.847682 | 79 | 0.65115 |
4a039442ae83d8b3cb98f9a7954593cfbbf4ae8a | 956 | py | Python | twitoff/predict.py | TheJoys2019/TwitOff | 9b441280c333c854cd97489f3c19027c44788fb5 | [
"MIT"
] | null | null | null | twitoff/predict.py | TheJoys2019/TwitOff | 9b441280c333c854cd97489f3c19027c44788fb5 | [
"MIT"
] | null | null | null | twitoff/predict.py | TheJoys2019/TwitOff | 9b441280c333c854cd97489f3c19027c44788fb5 | [
"MIT"
] | null | null | null | """Predictions"""
import numpy as np
from sklearn.linear_model import LogisticRegression
from .models import User
from .twitter import BASILICA
def predict_user(user1_name, user2_name, tweet_text, cache=None):
"""Determine and return which user is more likely to say a given Tweet."""
user1 = User.query.filter... | 50.315789 | 78 | 0.726987 |
4a0395045736e16d50acab98628e20c7d21af130 | 2,418 | py | Python | pa-to-es/result_parser.py | jimmyjones2/community | 10182ded35a8bdc3537f40e6321a5f66a23da59a | [
"Apache-2.0"
] | null | null | null | pa-to-es/result_parser.py | jimmyjones2/community | 10182ded35a8bdc3537f40e6321a5f66a23da59a | [
"Apache-2.0"
] | null | null | null | pa-to-es/result_parser.py | jimmyjones2/community | 10182ded35a8bdc3537f40e6321a5f66a23da59a | [
"Apache-2.0"
] | null | null | null | '''
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
result_parser provides a class that takes the results of calling the performance
analyzer and putting together a document suitable for sending to Elasticsearch
'''
import json
class ResultParser():
''' Co... | 43.178571 | 81 | 0.61828 |
4a03963f27ccabb3ec0c594e05fcfd1f482107ef | 305 | py | Python | demo/click/greeter1.py | the-dalee/ww-improve-your-python-fu | b6fc09ff7635bca5578c9cca5fef860063906907 | [
"CC-BY-4.0"
] | null | null | null | demo/click/greeter1.py | the-dalee/ww-improve-your-python-fu | b6fc09ff7635bca5578c9cca5fef860063906907 | [
"CC-BY-4.0"
] | null | null | null | demo/click/greeter1.py | the-dalee/ww-improve-your-python-fu | b6fc09ff7635bca5578c9cca5fef860063906907 | [
"CC-BY-4.0"
] | null | null | null | #!/bin/env python3
import click
@click.command()
@click.argument('greet_from')
@click.argument('greet_to')
def greet(greet_from, greet_to):
"""
This script will greet you politely
"""
print("Hello {} from {}".format(greet_to, greet_from))
if __name__ == "__main__":
greet()
| 19.0625 | 58 | 0.645902 |
4a03973dac7fb3aee5c25a8fc1605885d3fe2f07 | 7,385 | py | Python | layout_base.py | erdoganonal/daily_scrum_tool | 5e0291d44965ddf41352893658750f30d243d965 | [
"MIT"
] | 1 | 2020-11-11T09:13:58.000Z | 2020-11-11T09:13:58.000Z | layout_base.py | erdoganonal/daily_scrum_tool | 5e0291d44965ddf41352893658750f30d243d965 | [
"MIT"
] | null | null | null | layout_base.py | erdoganonal/daily_scrum_tool | 5e0291d44965ddf41352893658750f30d243d965 | [
"MIT"
] | null | null | null | """Base for layout, includes common functions"""
from enum import Enum, auto
import abc
import tkinter as tk
from tkinter import ttk
import constants as const
def _configure(widget):
properties = {
"background": const.LAYOUT_BG
}
if isinstance(widget, (ttk.Menubutton,)):
properties.upd... | 29.422311 | 84 | 0.614083 |
4a03976ea07e745a8617dc9c30a215e3f2f0b4d1 | 283 | py | Python | blog/urls.py | selfsryo/django_nuxt_blog | 6c5aaaf580132129fda070323afe4e5af21dc3c5 | [
"MIT"
] | 2 | 2021-12-15T08:27:46.000Z | 2022-02-02T11:51:41.000Z | blog/urls.py | selfsryo/django_nuxt_blog | 6c5aaaf580132129fda070323afe4e5af21dc3c5 | [
"MIT"
] | null | null | null | blog/urls.py | selfsryo/django_nuxt_blog | 6c5aaaf580132129fda070323afe4e5af21dc3c5 | [
"MIT"
] | null | null | null | from django.urls import path, include
from rest_framework import routers
from blog import views
router = routers.DefaultRouter()
router.register('articles', views.ArticleViewSet)
router.register('tags', views.TagViewSet)
urlpatterns = [
path('api/', include(router.urls)),
]
| 20.214286 | 49 | 0.763251 |
4a0397f901c40160e26127b49e10389d15bb7cdd | 448 | py | Python | tests/test_routers.py | chopdgd/django-genomix | 2f56186ff1e9c7e1ff861ab6db912892cfa48e64 | [
"MIT"
] | 3 | 2017-12-04T16:04:18.000Z | 2019-08-29T15:53:00.000Z | tests/test_routers.py | chopdgd/django-genomix | 2f56186ff1e9c7e1ff861ab6db912892cfa48e64 | [
"MIT"
] | 208 | 2017-12-02T19:55:10.000Z | 2022-03-28T14:46:15.000Z | tests/test_routers.py | chopdgd/django-genomix | 2f56186ff1e9c7e1ff861ab6db912892cfa48e64 | [
"MIT"
] | 1 | 2021-05-26T12:04:59.000Z | 2021-05-26T12:04:59.000Z | from django.test import TestCase
from mock import MagicMock
from rest_framework.routers import SimpleRouter
from genomix import routers
class TestDefaultRouter(TestCase):
def setUp(self):
self.DefaultRouter = routers.DefaultRouter()
self.router = MagicMock(spec=SimpleRouter, registry=['url'])
... | 24.888889 | 68 | 0.732143 |
4a0398d42bd40b9439345b046ba0ee714817e237 | 21,678 | py | Python | test/functional/test_framework/util.py | Polpette/compare-number435398 | 9099a2d43a69f8cb1f6894b8489b83a519a940a3 | [
"MIT"
] | null | null | null | test/functional/test_framework/util.py | Polpette/compare-number435398 | 9099a2d43a69f8cb1f6894b8489b83a519a940a3 | [
"MIT"
] | null | null | null | test/functional/test_framework/util.py | Polpette/compare-number435398 | 9099a2d43a69f8cb1f6894b8489b83a519a940a3 | [
"MIT"
] | 1 | 2019-12-21T21:36:08.000Z | 2019-12-21T21:36:08.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Helpful routines for regression testing."""
from base64 import b64encode
from binascii import hexlify,... | 38.098418 | 119 | 0.651398 |
4a0398fd9be4a6e735c8c9f7ff112a1493b0b401 | 620 | py | Python | corehq/sql_accessors/migrations/0054_drop_reindexa_accessor_functions.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 471 | 2015-01-10T02:55:01.000Z | 2022-03-29T18:07:18.000Z | corehq/sql_accessors/migrations/0054_drop_reindexa_accessor_functions.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 14,354 | 2015-01-01T07:38:23.000Z | 2022-03-31T20:55:14.000Z | corehq/sql_accessors/migrations/0054_drop_reindexa_accessor_functions.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 175 | 2015-01-06T07:16:47.000Z | 2022-03-29T13:27:01.000Z | # Generated by Django 1.10.7 on 2017-07-06 21:18
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('sql_accessors', '0053_drop_unused_sql'),
]
operations = [
migrations.RunSQL("DROP FUNCTION IF EXISTS get_all_cases_modified_since(timestamp with ... | 32.631579 | 134 | 0.735484 |
4a039a8f69efbd32b79f5d22fec6b573877b8eba | 6,897 | py | Python | SLAM_Lectures/Unit_PP/pp_01_f_astar_potential_function_question.py | yubaoliu/AISLAM | b12bba78b17ca61253ee0584927e3efaaa3d13d8 | [
"MIT"
] | 7 | 2017-06-03T15:40:20.000Z | 2021-05-17T16:05:58.000Z | SLAM_Lectures/Unit_PP/pp_01_f_astar_potential_function_question.py | yubaoliu/AISLAM | b12bba78b17ca61253ee0584927e3efaaa3d13d8 | [
"MIT"
] | null | null | null | SLAM_Lectures/Unit_PP/pp_01_f_astar_potential_function_question.py | yubaoliu/AISLAM | b12bba78b17ca61253ee0584927e3efaaa3d13d8 | [
"MIT"
] | 7 | 2017-06-03T15:40:26.000Z | 2020-08-12T12:11:41.000Z | # A* path planning.
# Addition of potential function keeps path away from obstacles.
# Note this modification changes only a single line in the A* algorithm.
# pp_01_f_astar_potential_function
# (c) Claus Brenner, 18 JAN 2014
from heapq import heappush, heappop
import numpy as np
import scipy.ndimage
import tra... | 38.747191 | 80 | 0.61795 |
4a039b407da29b5d3a2683bd53ca39820efb97da | 34,366 | py | Python | tests/test_generation.py | goibibo/swaggergenerator | 60aeb44c6e9df874e527a3f34ae77e1c82df4fa9 | [
"MIT"
] | 1 | 2021-06-07T10:37:52.000Z | 2021-06-07T10:37:52.000Z | tests/test_generation.py | goibibo/swaggergenerator | 60aeb44c6e9df874e527a3f34ae77e1c82df4fa9 | [
"MIT"
] | null | null | null | tests/test_generation.py | goibibo/swaggergenerator | 60aeb44c6e9df874e527a3f34ae77e1c82df4fa9 | [
"MIT"
] | 1 | 2021-06-05T08:26:44.000Z | 2021-06-05T08:26:44.000Z | import pytest
import requests
from swaggergenerator3 import Generator, get_yaml
def test_no_params(httpbin):
generator = Generator()
response = requests.get(httpbin.url + '/get')
generator.provide_example(response.request, response)
response = requests.post(httpbin.url + '/post')
generator.provi... | 45.337731 | 99 | 0.33312 |
4a039fac5dd802b7fc4f80a49ddd7b12e55dee15 | 4,329 | py | Python | setup.py | JamesSeaward/qiskit-terra | 03083dcc23c13fce17c66369c555943299547aeb | [
"Apache-2.0"
] | null | null | null | setup.py | JamesSeaward/qiskit-terra | 03083dcc23c13fce17c66369c555943299547aeb | [
"Apache-2.0"
] | null | null | null | setup.py | JamesSeaward/qiskit-terra | 03083dcc23c13fce17c66369c555943299547aeb | [
"Apache-2.0"
] | 1 | 2020-02-27T14:05:24.000Z | 2020-02-27T14:05:24.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# 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 modif... | 34.632 | 79 | 0.637792 |
4a03a1a5be0741377fd495149846b0ba78edd314 | 3,069 | py | Python | code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_add.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | null | null | null | code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_add.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | 10 | 2020-06-05T19:42:26.000Z | 2022-03-11T23:38:35.000Z | code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_add.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | null | null | null | ##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2017, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
import json
impor... | 43.842857 | 76 | 0.576083 |
4a03a3c78295802c208b86ec41d7dba1f343076c | 959 | py | Python | tests/api/products/test_products.py | lionsdigitalsolutions/python-amazon-sp-api | 7374523ebc65e2e01e37d03fc4009a44fabf2c3b | [
"MIT"
] | null | null | null | tests/api/products/test_products.py | lionsdigitalsolutions/python-amazon-sp-api | 7374523ebc65e2e01e37d03fc4009a44fabf2c3b | [
"MIT"
] | null | null | null | tests/api/products/test_products.py | lionsdigitalsolutions/python-amazon-sp-api | 7374523ebc65e2e01e37d03fc4009a44fabf2c3b | [
"MIT"
] | null | null | null | import urllib
from sp_api.api.products.products import Products
from sp_api.base import Marketplaces, SellingApiBadRequestException
def test_pricing_for_sku():
res = Products().get_product_pricing_for_skus([])
assert res.payload[0].get('status') == 'Success'
def test_pricing_for_asin():
res = Products(... | 29.060606 | 97 | 0.728884 |
4a03a58b13f38c71eafa4ba96b0912c5f42615b3 | 11,197 | py | Python | library/ipadm_addr.py | xen0l/ansible-illumos | 979e1337ac128f7fccb9c49cde5452feaac95f1c | [
"BSD-3-Clause"
] | null | null | null | library/ipadm_addr.py | xen0l/ansible-illumos | 979e1337ac128f7fccb9c49cde5452feaac95f1c | [
"BSD-3-Clause"
] | null | null | null | library/ipadm_addr.py | xen0l/ansible-illumos | 979e1337ac128f7fccb9c49cde5452feaac95f1c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Adam Števko <adam.stevko@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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 of the L... | 29.938503 | 116 | 0.543806 |
4a03a58c5ac5aa47a959115a6cd9abfbf6c085b2 | 435 | py | Python | books/migrations/0002_auto_20210103_1850.py | Marlinekhavele/RentalStore | f86f16a18193f05476f81007df70032d406e1156 | [
"Unlicense"
] | null | null | null | books/migrations/0002_auto_20210103_1850.py | Marlinekhavele/RentalStore | f86f16a18193f05476f81007df70032d406e1156 | [
"Unlicense"
] | null | null | null | books/migrations/0002_auto_20210103_1850.py | Marlinekhavele/RentalStore | f86f16a18193f05476f81007df70032d406e1156 | [
"Unlicense"
] | 1 | 2021-01-03T19:31:15.000Z | 2021-01-03T19:31:15.000Z | # Generated by Django 3.0.7 on 2021-01-03 18:50
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('books', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='book',
name='id',
... | 21.75 | 106 | 0.616092 |
4a03a59483dc9748d6478a6f82b8bedb07f4a8e0 | 4,664 | py | Python | pytorch_optimizer/sam.py | gheyret/pytorch_optimizer | 34e6fd04c76332c2611ad65180b976a2ec7da8eb | [
"Apache-2.0"
] | 20 | 2021-09-21T09:36:00.000Z | 2022-03-16T11:45:55.000Z | pytorch_optimizer/sam.py | gheyret/pytorch_optimizer | 34e6fd04c76332c2611ad65180b976a2ec7da8eb | [
"Apache-2.0"
] | 14 | 2021-11-01T12:37:59.000Z | 2022-03-05T18:33:12.000Z | pytorch_optimizer/sam.py | gheyret/pytorch_optimizer | 34e6fd04c76332c2611ad65180b976a2ec7da8eb | [
"Apache-2.0"
] | 4 | 2021-10-31T08:36:38.000Z | 2022-02-26T12:49:42.000Z | from typing import Dict
import torch
from torch.optim.optimizer import Optimizer
from pytorch_optimizer.base_optimizer import BaseOptimizer
from pytorch_optimizer.types import CLOSURE, DEFAULTS, PARAMETERS
class SAM(Optimizer, BaseOptimizer):
"""
Reference : https://github.com/davda54/sam
Example :
... | 30.887417 | 104 | 0.57783 |
4a03a648f2be39e1f4e59f9b9b005f164f484013 | 1,609 | gyp | Python | win8/delegate_execute/delegate_execute.gyp | junmin-zhu/chromium-rivertrail | eb1a57aca71fe68d96e48af8998dcfbe45171ee1 | [
"BSD-3-Clause"
] | 5 | 2018-03-10T13:08:42.000Z | 2021-07-26T15:02:11.000Z | win8/delegate_execute/delegate_execute.gyp | sanyaade-mobiledev/chromium.src | d496dfeebb0f282468827654c2b3769b3378c087 | [
"BSD-3-Clause"
] | 1 | 2015-07-21T08:02:01.000Z | 2015-07-21T08:02:01.000Z | win8/delegate_execute/delegate_execute.gyp | jianglong0156/chromium.src | d496dfeebb0f282468827654c2b3769b3378c087 | [
"BSD-3-Clause"
] | 6 | 2016-11-14T10:13:35.000Z | 2021-01-23T15:29:53.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
},
'includes': [
'../../build/win_precompile.gypi',
],
'targets': [
{
'target_name': 'del... | 27.271186 | 72 | 0.551274 |
4a03a6c11d0d95e84eb54672f97d7ab5c5070df2 | 22,431 | py | Python | warehouse/accounts/services.py | MHalseyPerry/warehouse | c80fc4cb7c2b97a7a19507dd56cc46a0a876ad86 | [
"Apache-2.0"
] | 2 | 2021-10-11T21:45:06.000Z | 2021-11-17T10:29:15.000Z | warehouse/accounts/services.py | MHalseyPerry/warehouse | c80fc4cb7c2b97a7a19507dd56cc46a0a876ad86 | [
"Apache-2.0"
] | null | null | null | warehouse/accounts/services.py | MHalseyPerry/warehouse | c80fc4cb7c2b97a7a19507dd56cc46a0a876ad86 | [
"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
# distributed under the Li... | 35.324409 | 88 | 0.628149 |
4a03a6c2bf47d1db1beafe7b97147d0acc8bc7c9 | 4,984 | py | Python | kubernetes/test/test_io_xk8s_cluster_addons_v1beta1_cluster_resource_set_binding.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_io_xk8s_cluster_addons_v1beta1_cluster_resource_set_binding.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_io_xk8s_cluster_addons_v1beta1_cluster_resource_set_binding.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unitte... | 47.018868 | 208 | 0.548154 |
4a03a7214b8911985f8ff2336f7c024a39c897c3 | 9,517 | py | Python | hsds/servicenode.py | JonosGit/hsds | 4abc4fc22c1e75cc9b15c879c8d00448a115fc92 | [
"Apache-2.0"
] | null | null | null | hsds/servicenode.py | JonosGit/hsds | 4abc4fc22c1e75cc9b15c879c8d00448a115fc92 | [
"Apache-2.0"
] | null | null | null | hsds/servicenode.py | JonosGit/hsds | 4abc4fc22c1e75cc9b15c879c8d00448a115fc92 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright by The HDF Group. #
# All rights reserved. #
# #
# Th... | 55.982353 | 114 | 0.67763 |
4a03a7875ad8ebd30448a8955e38ecb55ba19824 | 865 | py | Python | plyio/binary_io.py | bernardomig/plyio | f38b385e6bdbad9565c0199b6e704ff24cc14bac | [
"MIT"
] | null | null | null | plyio/binary_io.py | bernardomig/plyio | f38b385e6bdbad9565c0199b6e704ff24cc14bac | [
"MIT"
] | null | null | null | plyio/binary_io.py | bernardomig/plyio | f38b385e6bdbad9565c0199b6e704ff24cc14bac | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from struct import Struct
BINARY_DATA_TYPES = {
np.dtype('float32'): 'f',
np.dtype('int32'): 'i',
np.dtype('uint32'): 'I',
np.dtype('int64'): 'q',
np.dtype('uint64'): 'Q',
np.dtype('int8'): 'b',
np.dtype('uint8'): 'B',
}
def _binary_struct(dtypes):
... | 25.441176 | 79 | 0.610405 |
4a03a81a81ae898b10727ed1d88cacfd193c460c | 20,847 | py | Python | ai/quantization/onnx/src/quantize_base/quantize_detection.py | Aiden-Chen/python_tools | 2e5d6dbdf45ede8c8d9f12a98c3a6d542c00e085 | [
"Apache-2.0"
] | null | null | null | ai/quantization/onnx/src/quantize_base/quantize_detection.py | Aiden-Chen/python_tools | 2e5d6dbdf45ede8c8d9f12a98c3a6d542c00e085 | [
"Apache-2.0"
] | null | null | null | ai/quantization/onnx/src/quantize_base/quantize_detection.py | Aiden-Chen/python_tools | 2e5d6dbdf45ede8c8d9f12a98c3a6d542c00e085 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*- #
# @Author :wang dian
import pickle
import time
import torch
import math
import numpy as np
import math
import config as Cfg
# from shapely.geometry import Polygon
from spconv.spconv_utils import rotate_non_max_suppression_cpu
class Detection(object):
def __init__(self):
self.out... | 44.449893 | 117 | 0.564877 |
4a03a8f43dda59abe2fc4e60886c504b6714656e | 1,513 | py | Python | bnn_mcmc_examples/examples/mlp/penguins/metropolis_hastings/pilot_visual_summary.py | papamarkou/bnn_mcmc_examples | 7bb4ecfb33db4c30a8e61e31f528bda0efb24e3d | [
"MIT"
] | 1 | 2021-09-09T15:55:37.000Z | 2021-09-09T15:55:37.000Z | bnn_mcmc_examples/examples/mlp/penguins/metropolis_hastings/pilot_visual_summary.py | kushagragpt99/bnn_mcmc_examples | 297cdb1e74335860989bebdb4ff6f6322b6adc06 | [
"MIT"
] | null | null | null | bnn_mcmc_examples/examples/mlp/penguins/metropolis_hastings/pilot_visual_summary.py | kushagragpt99/bnn_mcmc_examples | 297cdb1e74335860989bebdb4ff6f6322b6adc06 | [
"MIT"
] | 1 | 2021-10-05T06:38:57.000Z | 2021-10-05T06:38:57.000Z | # %% Import packages
import kanga.plots as ps
from kanga.chains import ChainArray
from bnn_mcmc_examples.examples.mlp.penguins.constants import diagnostic_iter_thres
from bnn_mcmc_examples.examples.mlp.penguins.metropolis_hastings.constants import sampler_output_pilot_path
from bnn_mcmc_examples.examples.mlp.penguin... | 29.666667 | 107 | 0.696629 |
4a03a8fd988b7c5f05ff3c56db6d93ad69c35892 | 3,246 | py | Python | replot/helpers/render.py | Phyks/replot | 5d77471f5156c162a9839db612e73897bce8c8ee | [
"MIT"
] | null | null | null | replot/helpers/render.py | Phyks/replot | 5d77471f5156c162a9839db612e73897bce8c8ee | [
"MIT"
] | 30 | 2016-03-01T13:58:23.000Z | 2016-08-01T10:02:23.000Z | replot/helpers/render.py | Phyks/replot | 5d77471f5156c162a9839db612e73897bce8c8ee | [
"MIT"
] | null | null | null | """
Various helper functions for plotting.
"""
import numpy as np
def set_axis_property(group_, setter, value, default_setter=None):
"""
Set a property on an axis at render time.
:param group_: The subplot for this axis.
:param setter: The setter to use to set the axis property.
:param value: The... | 32.787879 | 115 | 0.639864 |
4a03a9ae73a5c8cf44973a16b3e3885439b58d13 | 620 | py | Python | contrib/qt_translations.py | LambocoinFoundation/Lambocoin | 823e1ad3e3811f8a938b09c192ecf87d56d25fb4 | [
"MIT"
] | null | null | null | contrib/qt_translations.py | LambocoinFoundation/Lambocoin | 823e1ad3e3811f8a938b09c192ecf87d56d25fb4 | [
"MIT"
] | null | null | null | contrib/qt_translations.py | LambocoinFoundation/Lambocoin | 823e1ad3e3811f8a938b09c192ecf87d56d25fb4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Helpful little script that spits out a comma-separated list of
# language codes for Qt icons that should be included
# in binary bitcoin distributions
import glob
import os
import re
import sys
if len(sys.argv) != 3:
sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys.arg... | 26.956522 | 112 | 0.683871 |
4a03aa5915f5017c57fa10a292f09bf435652875 | 16,575 | py | Python | proxy/http/handler.py | Sanake/proxy.py | bd808af81f8bdaf49c8693821d8417cdecf31dd6 | [
"BSD-3-Clause"
] | null | null | null | proxy/http/handler.py | Sanake/proxy.py | bd808af81f8bdaf49c8693821d8417cdecf31dd6 | [
"BSD-3-Clause"
] | null | null | null | proxy/http/handler.py | Sanake/proxy.py | bd808af81f8bdaf49c8693821d8417cdecf31dd6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE... | 40.036232 | 113 | 0.587511 |
4a03ab8dc9e65675235aba95f7b0a963f108eda5 | 262 | py | Python | alinsco_auth_server/users/apps.py | sregdorr/django-auth-server | 174dfe96c66ed7187c69686c32481c92c97a31a5 | [
"MIT"
] | null | null | null | alinsco_auth_server/users/apps.py | sregdorr/django-auth-server | 174dfe96c66ed7187c69686c32481c92c97a31a5 | [
"MIT"
] | null | null | null | alinsco_auth_server/users/apps.py | sregdorr/django-auth-server | 174dfe96c66ed7187c69686c32481c92c97a31a5 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class UsersAppConfig(AppConfig):
name = "alinsco_auth_server.users"
verbose_name = "Users"
def ready(self):
try:
import users.signals # noqa F401
except ImportError:
pass
| 18.714286 | 45 | 0.625954 |
4a03abd6550d92cf8ff4230f0f29b12cb96f51ee | 34,484 | py | Python | arc/species/speciesTest.py | goldmanm/ARC | e2fd97942cb50e3ccbf80ee344c8c9ca83f195de | [
"MIT"
] | null | null | null | arc/species/speciesTest.py | goldmanm/ARC | e2fd97942cb50e3ccbf80ee344c8c9ca83f195de | [
"MIT"
] | null | null | null | arc/species/speciesTest.py | goldmanm/ARC | e2fd97942cb50e3ccbf80ee344c8c9ca83f195de | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module contains unit tests of the arc.species.species module
"""
from __future__ import (absolute_import, division, print_function, unicode_literals)
import unittest
import os
import shutil
from rmgpy.molecule.molecule import Molecule
from rmgpy.species import S... | 51.855639 | 119 | 0.570699 |
4a03ac7ddde42681aedea307d4cd1b814c863003 | 236 | py | Python | Exercicios/ex029.py | mauroalbuquerque/Python-CursoEmVideo | 5a9fcbd878af49d7b8aa3f7d904b1f22e643edd8 | [
"MIT"
] | null | null | null | Exercicios/ex029.py | mauroalbuquerque/Python-CursoEmVideo | 5a9fcbd878af49d7b8aa3f7d904b1f22e643edd8 | [
"MIT"
] | null | null | null | Exercicios/ex029.py | mauroalbuquerque/Python-CursoEmVideo | 5a9fcbd878af49d7b8aa3f7d904b1f22e643edd8 | [
"MIT"
] | null | null | null | #Radar de Trânsito
velocidade = float(input('Digite a velocidade do veiculo: '))
if velocidade > 80:
multa = (velocidade - 80) * 7
print(velocidade, 'Multa: R$ {}'.format(multa))
else:
print('Velocidade dentro do limite!') | 26.222222 | 61 | 0.669492 |
4a03acc5d36129a3f64d2a850e3cf53f8b3182f3 | 1,228 | py | Python | AppTaskQueue/test/unit/test_taskqueue_server.py | Honcharov12/appscale | be1cf90fcd24f1a5a88848f7eb73331b6e4e66d9 | [
"Apache-2.0"
] | null | null | null | AppTaskQueue/test/unit/test_taskqueue_server.py | Honcharov12/appscale | be1cf90fcd24f1a5a88848f7eb73331b6e4e66d9 | [
"Apache-2.0"
] | 1 | 2019-10-15T15:57:53.000Z | 2019-10-15T15:57:53.000Z | AppTaskQueue/test/unit/test_taskqueue_server.py | Honcharov12/appscale | be1cf90fcd24f1a5a88848f7eb73331b6e4e66d9 | [
"Apache-2.0"
] | 1 | 2019-08-27T05:19:48.000Z | 2019-08-27T05:19:48.000Z | #!/usr/bin/env python
import unittest
from mock import MagicMock, patch
from appscale.common import file_io
from appscale.taskqueue import distributed_tq
class TestDistributedTaskQueue(unittest.TestCase):
"""
A set of test cases for the distributed taskqueue module
"""
def setUp(self):
self._read_patche... | 25.583333 | 61 | 0.732899 |
4a03ae89961de0ac9090db7b314318529674159f | 9,437 | py | Python | airflow/providers/qubole/hooks/qubole.py | Adil-Ibragimov/airflow | e565368f2e988a06b0398b77e66859c138905ae7 | [
"Apache-2.0"
] | 1 | 2020-08-05T18:30:40.000Z | 2020-08-05T18:30:40.000Z | airflow/providers/qubole/hooks/qubole.py | Adil-Ibragimov/airflow | e565368f2e988a06b0398b77e66859c138905ae7 | [
"Apache-2.0"
] | 20 | 2021-01-23T12:33:08.000Z | 2021-12-07T22:30:37.000Z | airflow/providers/qubole/hooks/qubole.py | Adil-Ibragimov/airflow | e565368f2e988a06b0398b77e66859c138905ae7 | [
"Apache-2.0"
] | 1 | 2020-09-10T09:51:46.000Z | 2020-09-10T09:51:46.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... | 36.157088 | 106 | 0.628484 |
4a03af238ce56ec75363907d46056d18b56d24eb | 9,259 | py | Python | src/onelogin/saml2/idp_metadata_parser.py | colinjeanne/python3-saml | c45c0f8ae029254642db036cf06058ec9e302098 | [
"MIT"
] | null | null | null | src/onelogin/saml2/idp_metadata_parser.py | colinjeanne/python3-saml | c45c0f8ae029254642db036cf06058ec9e302098 | [
"MIT"
] | null | null | null | src/onelogin/saml2/idp_metadata_parser.py | colinjeanne/python3-saml | c45c0f8ae029254642db036cf06058ec9e302098 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" OneLogin_Saml2_IdPMetadataParser class
Copyright (c) 2014, OneLogin, Inc.
All rights reserved.
Metadata class of OneLogin's Python Toolkit.
"""
from copy import deepcopy
try:
import urllib.request as urllib2
except ImportError:
import urllib2
from onelogin.saml2.constants import... | 39.738197 | 122 | 0.598661 |
4a03b0b4b278059869a25f28237d155a190ad1bc | 3,243 | py | Python | servicecatalog_puppet/workflow/service_control_policies/do_terminate_service_control_policies_task.py | mtrampic/aws-service-catalog-puppet | faa6ebe15929dc0040b85e5fd3313161821daa36 | [
"Apache-2.0"
] | 2 | 2019-04-12T23:28:46.000Z | 2019-04-15T15:35:04.000Z | servicecatalog_puppet/workflow/service_control_policies/do_terminate_service_control_policies_task.py | mtrampic/aws-service-catalog-puppet | faa6ebe15929dc0040b85e5fd3313161821daa36 | [
"Apache-2.0"
] | null | null | null | servicecatalog_puppet/workflow/service_control_policies/do_terminate_service_control_policies_task.py | mtrampic/aws-service-catalog-puppet | faa6ebe15929dc0040b85e5fd3313161821daa36 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import functools
import luigi
from servicecatalog_puppet import constants
from servicecatalog_puppet.workflow import dependency
from servicecatalog_puppet.workflow.service_control_policies import (
se... | 35.25 | 78 | 0.647549 |
4a03b42c9c7e751e7b4b6bff44cfb3957eb03cd1 | 1,218 | py | Python | KvasirAPI/test/conftest.py | KvasirSecurity/kvasirapi-python | ec8c5818bd5913f3afd150f25eaec6e7cc732f4c | [
"BSD-3-Clause"
] | null | null | null | KvasirAPI/test/conftest.py | KvasirSecurity/kvasirapi-python | ec8c5818bd5913f3afd150f25eaec6e7cc732f4c | [
"BSD-3-Clause"
] | 2 | 2017-07-11T23:18:36.000Z | 2021-03-25T21:47:25.000Z | KvasirAPI/test/conftest.py | KvasirSecurity/kvasirapi-python | ec8c5818bd5913f3afd150f25eaec6e7cc732f4c | [
"BSD-3-Clause"
] | 1 | 2017-05-13T07:08:17.000Z | 2017-05-13T07:08:17.000Z | # -*- coding: utf-8 -*-
##--------------------------------------#
## API for Kvasir
##
## (c) 2010-2014 Cisco Systems, Inc.
##
## Configuration pytest fixtures
##
## Author: Kurt Grutzmacher <kgrutzma@cisco.com>
##--------------------------------------#
import pytest
import KvasirAPI
@pytest.fixture(scope="module"... | 21.75 | 60 | 0.642857 |
4a03b4c61983484addfe6d3808434789e784b66a | 121 | py | Python | 00-basics/00-function_return_value.py | ralexrivero/python_fundation | 34a855db7380d3d91db6a8f02d97f287d038ef5f | [
"Apache-2.0"
] | 1 | 2021-09-19T04:09:48.000Z | 2021-09-19T04:09:48.000Z | 00-basics/00-function_return_value.py | ralexrivero/python_fundation | 34a855db7380d3d91db6a8f02d97f287d038ef5f | [
"Apache-2.0"
] | null | null | null | 00-basics/00-function_return_value.py | ralexrivero/python_fundation | 34a855db7380d3d91db6a8f02d97f287d038ef5f | [
"Apache-2.0"
] | null | null | null | #
# function that returns a value
#
def cube(x):
return x * x * x
# call function and pass argument
print(cube(3)) | 12.1 | 33 | 0.652893 |
4a03b5321495d761b986fe89e401d248a0536ff1 | 7,001 | py | Python | homeassistant/components/sensibo/coordinator.py | edenhaus/home-assistant | 9d42a425fc6d88482161d93f78c5125a3f6059eb | [
"Apache-2.0"
] | null | null | null | homeassistant/components/sensibo/coordinator.py | edenhaus/home-assistant | 9d42a425fc6d88482161d93f78c5125a3f6059eb | [
"Apache-2.0"
] | null | null | null | homeassistant/components/sensibo/coordinator.py | edenhaus/home-assistant | 9d42a425fc6d88482161d93f78c5125a3f6059eb | [
"Apache-2.0"
] | null | null | null | """DataUpdateCoordinator for the Sensibo integration."""
from __future__ import annotations
from dataclasses import dataclass
from datetime import timedelta
from typing import Any
from pysensibo import SensiboClient
from pysensibo.exceptions import AuthenticationError, SensiboError
from homeassistant.config_entries ... | 39.778409 | 98 | 0.581488 |
4a03b5762441dbc31c1d186f22fa004e2bc7aafd | 2,165 | py | Python | sampledb/scripts/create_action.py | FlorianRhiem/sampledb | 3363adbe5f2771d1178a5b6d530be960ce41c560 | [
"MIT"
] | null | null | null | sampledb/scripts/create_action.py | FlorianRhiem/sampledb | 3363adbe5f2771d1178a5b6d530be960ce41c560 | [
"MIT"
] | null | null | null | sampledb/scripts/create_action.py | FlorianRhiem/sampledb | 3363adbe5f2771d1178a5b6d530be960ce41c560 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Script for creating an action in SampleDB.
Usage: python -m sampledb create_action <instrument_id> <type: sample or measurement > <name> <description> <schema_file_name>
"""
import json
import sys
from .. import create_app
from ..logic.actions import create_action, ActionType
from ..logic.instrume... | 34.919355 | 126 | 0.638799 |
4a03b62c2aacdab302ef8ee5673422edeb662fa8 | 1,278 | py | Python | test/test_ds.py | JalexChang/cross-media-attribution | 09a94774798c0d05d9142fde056de72e69872acb | [
"BSD-2-Clause"
] | null | null | null | test/test_ds.py | JalexChang/cross-media-attribution | 09a94774798c0d05d9142fde056de72e69872acb | [
"BSD-2-Clause"
] | null | null | null | test/test_ds.py | JalexChang/cross-media-attribution | 09a94774798c0d05d9142fde056de72e69872acb | [
"BSD-2-Clause"
] | null | null | null | import numpy
import unittest
from mta.ds.touch_row import TouchRow
from mta.ds.rating_row import RatingRow
class TestDs(unittest.TestCase):
def setUp(self):
self.ratin_rows = numpy.loadtxt('cust_ratings',delimiter=',')
self.touch_rows = numpy.loadtxt('cust_touchs',delimiter=',')
def t... | 36.514286 | 84 | 0.612676 |
4a03b641051e696f18a4c0b44bbad00dea329f17 | 128 | py | Python | ConfigSpace/__version__.py | franchuterivera/ConfigSpace | 26a55ff019859412a11bb68a2eb177e8ba65e00a | [
"BSD-3-Clause"
] | null | null | null | ConfigSpace/__version__.py | franchuterivera/ConfigSpace | 26a55ff019859412a11bb68a2eb177e8ba65e00a | [
"BSD-3-Clause"
] | null | null | null | ConfigSpace/__version__.py | franchuterivera/ConfigSpace | 26a55ff019859412a11bb68a2eb177e8ba65e00a | [
"BSD-3-Clause"
] | null | null | null | """Version information."""
# The following line *must* be the last in the module, exactly as formatted:
__version__ = "0.4.19"
| 25.6 | 76 | 0.710938 |
4a03b6d49b8e357e522278097b7b9f254f18e251 | 80 | py | Python | missing_video_finder/exception.py | KylianCadet/missing-video-finder | d3defe710dc372d5132f2d9a2c4e304c7ecda1e5 | [
"MIT"
] | 3 | 2021-04-28T13:46:13.000Z | 2021-05-07T11:23:31.000Z | missing_video_finder/exception.py | KylianCadet/missing-video-finder | d3defe710dc372d5132f2d9a2c4e304c7ecda1e5 | [
"MIT"
] | null | null | null | missing_video_finder/exception.py | KylianCadet/missing-video-finder | d3defe710dc372d5132f2d9a2c4e304c7ecda1e5 | [
"MIT"
] | null | null | null | class NotAuthenticated(Exception):
pass
class APIError(Exception):
pass | 16 | 34 | 0.75 |
4a03b8574e800d2390d8de3058f1cce1dbc4a6d8 | 17,594 | py | Python | mriqc/viz/utils.py | erramuzpe/mriqc | 03eb869b0966cf27fe85db88a970f8ab8640c9e9 | [
"BSD-3-Clause"
] | 1 | 2019-08-17T21:20:48.000Z | 2019-08-17T21:20:48.000Z | mriqc/viz/utils.py | erramuzpe/mriqc | 03eb869b0966cf27fe85db88a970f8ab8640c9e9 | [
"BSD-3-Clause"
] | null | null | null | mriqc/viz/utils.py | erramuzpe/mriqc | 03eb869b0966cf27fe85db88a970f8ab8640c9e9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# @Author: oesteban
# @Date: 2016-01-05 11:32:01
# @Email: code@oscaresteban.es
# @Last modified by: oesteban
""" Visualization utilities """
import mat... | 32.105839 | 84 | 0.59742 |
4a03b871514beda83a37e8345adf4331a3f93073 | 1,032 | py | Python | task2/gen_cap.py | Save404/captcha | 70bf55285f2cf6102bac7995c9f782b640bd9f53 | [
"MIT"
] | 3 | 2018-01-16T13:24:05.000Z | 2018-06-02T07:39:32.000Z | task2/gen_cap.py | save404/captcha | 70bf55285f2cf6102bac7995c9f782b640bd9f53 | [
"MIT"
] | null | null | null | task2/gen_cap.py | save404/captcha | 70bf55285f2cf6102bac7995c9f782b640bd9f53 | [
"MIT"
] | 1 | 2018-03-28T10:52:21.000Z | 2018-03-28T10:52:21.000Z | #-*- coding: utf-8 -*-
import random
import string
import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
from image import ImageCaptcha
chars = string.digits + string.ascii_lowercase + string.ascii_uppercase
#生成随机验证码文本
def random_captcha_text(char_set=chars, captcha_size=5):
captcha_text = []
fo... | 21.957447 | 75 | 0.745155 |
4a03b9aed73aa4c385bd813a476915476ff90a3f | 240 | py | Python | HackyEaster/he2022/level8/ch35/payload-unpickle.py | tbrup/ctf-writeups | dfac11abb3051af657ed3384c3c389c14a40c10e | [
"MIT"
] | null | null | null | HackyEaster/he2022/level8/ch35/payload-unpickle.py | tbrup/ctf-writeups | dfac11abb3051af657ed3384c3c389c14a40c10e | [
"MIT"
] | null | null | null | HackyEaster/he2022/level8/ch35/payload-unpickle.py | tbrup/ctf-writeups | dfac11abb3051af657ed3384c3c389c14a40c10e | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Pickle deserialization RCE payload.
# To be invoked with command to execute at it's first parameter.
# Otherwise, the default one will be used.
#
import pickle
with open('rce.png', 'rb') as inF:
pickle.load(inF)
| 20 | 64 | 0.7125 |
4a03bb80aa92dac9b41b72f5f5979100473424fe | 1,056 | py | Python | qiskit/aqua/components/uncertainty_problems/__init__.py | pistoia/qiskit-aqua | c7900ffdabc1499145739bfab29a392709bee1a0 | [
"Apache-2.0"
] | 1 | 2019-01-03T20:06:19.000Z | 2019-01-03T20:06:19.000Z | qiskit_aqua/components/uncertainty_problems/__init__.py | jodyburksphd/qiskit-aqua | d1050e3362276894b0e3442717f0f2a774a177b0 | [
"Apache-2.0"
] | null | null | null | qiskit_aqua/components/uncertainty_problems/__init__.py | jodyburksphd/qiskit-aqua | d1050e3362276894b0e3442717f0f2a774a177b0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018 IBM.
#
# 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 agre... | 39.111111 | 79 | 0.710227 |
4a03bcb3bd8c6e28dbe929f292e23f8ce9517be0 | 3,085 | py | Python | tests/conftest.py | leoil/nequip | 83b888797025c94b9963a508bc213a7c98da5bcb | [
"MIT"
] | 1 | 2022-03-13T10:17:53.000Z | 2022-03-13T10:17:53.000Z | tests/conftest.py | leoil/nequip | 83b888797025c94b9963a508bc213a7c98da5bcb | [
"MIT"
] | null | null | null | tests/conftest.py | leoil/nequip | 83b888797025c94b9963a508bc213a7c98da5bcb | [
"MIT"
] | null | null | null | from typing import List
import numpy as np
import pathlib
import pytest
import tempfile
from ase.atoms import Atoms
from ase.build import molecule
from ase.calculators.singlepoint import SinglePointCalculator
from ase.io import write
import torch
from torch_geometric.data import Batch
from nequip.utils.test import s... | 30.544554 | 103 | 0.719611 |
4a03bd498577b45bb9f1da681116cbf102a4510e | 836 | py | Python | tcex/threat_intelligence/mappings/group/group_types/email.py | kdeltared/tcex | 818c0d09256764f871e42d9ca5916f92d941d882 | [
"Apache-2.0"
] | null | null | null | tcex/threat_intelligence/mappings/group/group_types/email.py | kdeltared/tcex | 818c0d09256764f871e42d9ca5916f92d941d882 | [
"Apache-2.0"
] | null | null | null | tcex/threat_intelligence/mappings/group/group_types/email.py | kdeltared/tcex | 818c0d09256764f871e42d9ca5916f92d941d882 | [
"Apache-2.0"
] | null | null | null | """ThreatConnect TI Email"""
from ..group import Group
class Email(Group):
"""Unique API calls for Email API Endpoints
Args:
tcex (TcEx): An instantiated instance of TcEx object.
body (str): The body for this Email.
from_addr (str, kwargs): The **from** address for this Email.
... | 38 | 99 | 0.639952 |
4a03bd4dad851d2371c9be55bde0f89ae453adf6 | 2,683 | py | Python | show-versions.py | mqelibari/Document_searcher | 1d4f0800471a76e7fb4b0f1d17e84b3df8e8d70a | [
"MIT"
] | null | null | null | show-versions.py | mqelibari/Document_searcher | 1d4f0800471a76e7fb4b0f1d17e84b3df8e8d70a | [
"MIT"
] | null | null | null | show-versions.py | mqelibari/Document_searcher | 1d4f0800471a76e7fb4b0f1d17e84b3df8e8d70a | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3
import sys
from pathlib import Path
import glob
import os
global ver
def change_working_dir():
home = str(Path.home())
home += "/commands/"
os.chdir(home)
return home
def get_py_files(path):
files = [f for f in glob.glob(pathname=(path + "*.py"))]
for idx, file in en... | 30.146067 | 130 | 0.595975 |
4a03bd7fcee05d9fc2e55d15ab7511b1e71605fa | 92 | py | Python | examples/setuptools-test_loader/a_package/some_tests.py | andreztz/SomePackage | eb12009e32d8da6e8699b539c1db89e93a515887 | [
"BSD-2-Clause"
] | 1 | 2019-03-13T15:07:31.000Z | 2019-03-13T15:07:31.000Z | examples/setuptools-test_loader/a_package/some_tests.py | andreztz/SomePackage | eb12009e32d8da6e8699b539c1db89e93a515887 | [
"BSD-2-Clause"
] | null | null | null | examples/setuptools-test_loader/a_package/some_tests.py | andreztz/SomePackage | eb12009e32d8da6e8699b539c1db89e93a515887 | [
"BSD-2-Clause"
] | null | null | null | import unittest
class TheTestCase(unittest.TestCase):
def test_foo(self):
pass
| 15.333333 | 37 | 0.706522 |
4a03bf19ddfe7b027204b03a6c498f19f863d9d9 | 4,965 | py | Python | nova/tests/unit/virt/xenapi/image/test_bittorrent.py | cloud-zuiwanyuan/nova | 0b59a2d9dc22e4fb172810019dba5ece09bb4526 | [
"Apache-2.0"
] | 1 | 2019-07-29T10:30:24.000Z | 2019-07-29T10:30:24.000Z | nova/tests/unit/virt/xenapi/image/test_bittorrent.py | cloud-zuiwanyuan/nova | 0b59a2d9dc22e4fb172810019dba5ece09bb4526 | [
"Apache-2.0"
] | 1 | 2016-04-04T18:41:59.000Z | 2016-04-04T18:41:59.000Z | nova/tests/unit/virt/xenapi/image/test_bittorrent.py | cloud-zuiwanyuan/nova | 0b59a2d9dc22e4fb172810019dba5ece09bb4526 | [
"Apache-2.0"
] | 2 | 2015-12-04T23:51:46.000Z | 2016-06-07T20:01:59.000Z | # Copyright 2013 OpenStack Foundation
# 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 requ... | 37.613636 | 78 | 0.622155 |
4a03bf968a41c0f5f2cd8de84f0b967ccd85da06 | 1,021 | py | Python | accounts/migrations/0004_auto_20200404_1315.py | BVPIEEE/hackathon_portal | 0a67704ae42d5680c6f4d05ca9c63a1f06f556c0 | [
"Apache-2.0"
] | 3 | 2020-04-07T12:25:59.000Z | 2020-04-16T18:21:27.000Z | accounts/migrations/0004_auto_20200404_1315.py | BVPIEEE/hackathon_portal | 0a67704ae42d5680c6f4d05ca9c63a1f06f556c0 | [
"Apache-2.0"
] | 3 | 2021-03-30T12:57:08.000Z | 2021-09-22T18:48:35.000Z | accounts/migrations/0004_auto_20200404_1315.py | BVPIEEE/hackathon_portal | 0a67704ae42d5680c6f4d05ca9c63a1f06f556c0 | [
"Apache-2.0"
] | 1 | 2020-04-16T18:21:38.000Z | 2020-04-16T18:21:38.000Z | # Generated by Django 3.0.4 on 2020-04-04 07:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0003_auto_20200402_1849'),
]
operations = [
migrations.RemoveField(
model_name='phaseselectionmodel',
... | 26.179487 | 50 | 0.536729 |
4a03c008d7bd6fe1b25466b8281d9ae2e9c1adf4 | 28 | py | Python | hover/hover/test/test_core.py | DouglasOrr/Snippets | 026e15a422b518ee7d9ce4849f971c4403ad9fe8 | [
"MIT"
] | null | null | null | hover/hover/test/test_core.py | DouglasOrr/Snippets | 026e15a422b518ee7d9ce4849f971c4403ad9fe8 | [
"MIT"
] | 1 | 2020-04-11T18:07:19.000Z | 2020-04-11T18:07:19.000Z | hover/hover/test/test_core.py | DouglasOrr/Snippets | 026e15a422b518ee7d9ce4849f971c4403ad9fe8 | [
"MIT"
] | null | null | null | from .. import core # noqa
| 14 | 27 | 0.642857 |
4a03c0687f3876d35fa4901d77cfef13dbdf35a4 | 2,571 | py | Python | utils/model_helper.py | Ian-Liao/SegCaps | 1b67516e5a19ba30286c9fb5fec12c639ef140bc | [
"Apache-2.0"
] | null | null | null | utils/model_helper.py | Ian-Liao/SegCaps | 1b67516e5a19ba30286c9fb5fec12c639ef140bc | [
"Apache-2.0"
] | 11 | 2020-09-26T01:22:00.000Z | 2022-03-12T00:42:16.000Z | utils/model_helper.py | Ian-Liao/SegCaps | 1b67516e5a19ba30286c9fb5fec12c639ef140bc | [
"Apache-2.0"
] | 1 | 2020-07-24T17:28:08.000Z | 2020-07-24T17:28:08.000Z | '''
Capsules for Object Segmentation (SegCaps)
Original Paper by Rodney LaLonde and Ulas Bagci (https://arxiv.org/abs/1804.04241)
Code written by: Rodney LaLonde
If you use significant portions of this code or the ideas from our paper, please cite it :)
If you have any questions, please email me at lalonde@knights.ucf.... | 40.809524 | 91 | 0.604823 |
4a03c0ca7500c2ccc23a17aa968a8d5d2b6368ab | 219 | py | Python | src/tests/test_base_common.py | charlestian/NetEaseMusic | 5d8fa4747fcecabb5a09174ff6838718d62c2b31 | [
"MIT"
] | 19 | 2015-04-18T15:16:58.000Z | 2021-04-12T06:19:48.000Z | src/tests/test_base_common.py | charlestian/NetEaseMusic | 5d8fa4747fcecabb5a09174ff6838718d62c2b31 | [
"MIT"
] | null | null | null | src/tests/test_base_common.py | charlestian/NetEaseMusic | 5d8fa4747fcecabb5a09174ff6838718d62c2b31 | [
"MIT"
] | 12 | 2015-04-18T15:16:59.000Z | 2016-04-20T17:22:58.000Z | # -*- coding: utf8 -*-
import pytest
from base.common import *
def test_singleton():
@singleton
class A():
def __init__(self):
pass
a1 = A()
a2 = A()
assert id(a1) == id(a2)
| 12.882353 | 27 | 0.515982 |
4a03c20b289ca5d0f14b8a113d227b58c06bd8cb | 727 | py | Python | accounts/migrations/0004_auto_20200823_0225.py | AnjalBam/iw-capstone-project | 38065885ada3d236823689c8a9e43f581d6f5a97 | [
"MIT"
] | null | null | null | accounts/migrations/0004_auto_20200823_0225.py | AnjalBam/iw-capstone-project | 38065885ada3d236823689c8a9e43f581d6f5a97 | [
"MIT"
] | 9 | 2021-04-08T20:15:32.000Z | 2022-03-12T00:50:21.000Z | accounts/migrations/0004_auto_20200823_0225.py | AnjalBam/iw-capstone-project | 38065885ada3d236823689c8a9e43f581d6f5a97 | [
"MIT"
] | 1 | 2020-09-12T05:25:23.000Z | 2020-09-12T05:25:23.000Z | # Generated by Django 3.1 on 2020-08-23 02:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0003_merge_20200818_0143'),
]
operations = [
migrations.AlterField(
model_name='education',
name='college'... | 24.233333 | 50 | 0.562586 |
4a03c3831b54147adc94ab3d8a911a6f40537f4c | 4,668 | py | Python | get_aws_range.py | hoxhaeris/aws_helper | fe52754c83620284acc688abc6cf87809ca4268b | [
"MIT"
] | 1 | 2021-02-24T16:20:52.000Z | 2021-02-24T16:20:52.000Z | get_aws_range.py | hoxhaeris/aws_helper | fe52754c83620284acc688abc6cf87809ca4268b | [
"MIT"
] | null | null | null | get_aws_range.py | hoxhaeris/aws_helper | fe52754c83620284acc688abc6cf87809ca4268b | [
"MIT"
] | null | null | null | import argparse
import json
import requests
def parse_filters():
class ParseFilterString(argparse.Action):
def __call__(self, parser, args, values, option_string=None):
filters = values.split(',')
filters_dict = {}
for input_filter in filters:
... | 40.591304 | 120 | 0.565338 |
4a03c3d1c01560ac2599543179ec71e4b77c3f80 | 4,304 | py | Python | tools/c7n_azure/c7n_azure/constants.py | chris-angeli-rft/cloud-custodian | 5ff331b114a591dbaf6d672e30ceefb7ae64a5dd | [
"Apache-2.0"
] | 2 | 2020-10-20T11:05:54.000Z | 2021-05-09T15:24:01.000Z | tools/c7n_azure/c7n_azure/constants.py | chris-angeli-rft/cloud-custodian | 5ff331b114a591dbaf6d672e30ceefb7ae64a5dd | [
"Apache-2.0"
] | 1 | 2021-04-30T21:13:50.000Z | 2021-04-30T21:13:50.000Z | tools/c7n_azure/c7n_azure/constants.py | chris-angeli-rft/cloud-custodian | 5ff331b114a591dbaf6d672e30ceefb7ae64a5dd | [
"Apache-2.0"
] | 1 | 2020-12-28T23:21:30.000Z | 2020-12-28T23:21:30.000Z | # Copyright 2019 Microsoft 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... | 29.888889 | 100 | 0.760455 |
4a03c3dcab5b19ff1eb9fc2a8cddd7a44955c52c | 18,787 | py | Python | kms/google/cloud/kms_v1/gapic/transports/key_management_service_grpc_transport.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | null | null | null | kms/google/cloud/kms_v1/gapic/transports/key_management_service_grpc_transport.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | 40 | 2019-07-16T10:04:48.000Z | 2020-01-20T09:04:59.000Z | kms/google/cloud/kms_v1/gapic/transports/key_management_service_grpc_transport.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | 2 | 2019-07-18T00:05:31.000Z | 2019-11-27T14:17:22.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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 37.349901 | 105 | 0.65359 |
4a03c7ab4f434e25a78237ef8ae01d111572dcf1 | 1,405 | py | Python | output/models/ms_data/model_groups/mg_f017_xsd/mg_f017.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/model_groups/mg_f017_xsd/mg_f017.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/model_groups/mg_i017_xsd/mg_i017.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from typing import Optional
@dataclass
class Foo:
class Meta:
name = "foo"
c1: Optional[object] = field(
default=None,
metadata={
"type": "Element",
"namespace": "",
}
)
c2: Optional[object] = field(
... | 19.513889 | 40 | 0.43274 |
4a03c7afe7bc80d82d4d1a038bf6475666c283f9 | 724 | py | Python | venv/Lib/site-packages/commands/mixins.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/commands/mixins.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | 3 | 2021-03-23T04:58:47.000Z | 2021-04-02T02:40:54.000Z | venv/Lib/site-packages/commands/mixins.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | null | null | null | from django.http import JsonResponse
class AjaxMixin(object):
@staticmethod
def success(results, meta=None, status=200):
if isinstance(results, list) or isinstance(results, tuple):
content = {'results': results}
elif results is not None:
content = {'result': results}
else:
content = {}
if meta: c... | 24.965517 | 61 | 0.722376 |
4a03c80a1d73d6f8a7a8ce51b0ccb14e037671e0 | 411 | py | Python | src/update_handlers/messages_in_channels.py | Arseny-Tokmancev/channels-watchbot | 102edc07c9d8c306f47b6a5b8318fa0ba56534f0 | [
"MIT"
] | 1 | 2020-11-10T22:50:14.000Z | 2020-11-10T22:50:14.000Z | src/update_handlers/messages_in_channels.py | Arseny-Tokmancev/channels-watchbot | 102edc07c9d8c306f47b6a5b8318fa0ba56534f0 | [
"MIT"
] | null | null | null | src/update_handlers/messages_in_channels.py | Arseny-Tokmancev/channels-watchbot | 102edc07c9d8c306f47b6a5b8318fa0ba56534f0 | [
"MIT"
] | 1 | 2022-01-31T19:23:03.000Z | 2022-01-31T19:23:03.000Z | from pyrogram import filters
from django.utils import timezone
from data.models import Channel
def register(app):
@app.on_message(filters.channel)
def update_time(client, message):
for channel in Channel.objects.filter(channel_id=message.chat.id):
channel.last_message_time = timezone.now()... | 34.25 | 74 | 0.698297 |
4a03c845099c38b919de262ba7245934300ac4df | 1,029 | py | Python | platalea/fix_json.py | egpbos/platalea | 6ed7139095043135805c446f1fca089cb5eb9ba9 | [
"Apache-2.0"
] | 2 | 2021-03-13T12:19:36.000Z | 2021-11-13T06:33:21.000Z | platalea/fix_json.py | egpbos/platalea | 6ed7139095043135805c446f1fca089cb5eb9ba9 | [
"Apache-2.0"
] | 97 | 2020-03-13T16:12:01.000Z | 2021-11-23T09:00:47.000Z | platalea/fix_json.py | egpbos/platalea | 6ed7139095043135805c446f1fca089cb5eb9ba9 | [
"Apache-2.0"
] | 2 | 2021-02-02T18:06:50.000Z | 2021-02-22T12:08:11.000Z | import json
import glob
from shutil import copyfile
import pandas as pd
import logging
import io
logging.basicConfig(level=logging.INFO)
def fix():
paths = glob.glob("experiments/*/result.json")
for path in paths:
logging.info("Fixing {}".format(path))
copyfile(path, path + ".orig")
w... | 27.078947 | 77 | 0.580175 |
4a03c8fe8c529bef47b6a7dab98b62aa67a49131 | 3,751 | py | Python | test/functional/rpc_blockchain.py | 8899kkA/REBELCoin | 42e21696292c98ffdaf959d6c0c060460aa188a7 | [
"MIT"
] | null | null | null | test/functional/rpc_blockchain.py | 8899kkA/REBELCoin | 42e21696292c98ffdaf959d6c0c060460aa188a7 | [
"MIT"
] | null | null | null | test/functional/rpc_blockchain.py | 8899kkA/REBELCoin | 42e21696292c98ffdaf959d6c0c060460aa188a7 | [
"MIT"
] | 1 | 2022-01-30T23:45:34.000Z | 2022-01-30T23:45:34.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPCs related to blockchainstate.
Test the following RPCs:
- getblockchaininfo
- gettxouts... | 33.19469 | 87 | 0.66089 |
4a03c9028fd33b4348fa433998f02515543f422c | 1,915 | py | Python | notify.py | Na0ki/ipnotify | 4104c15b81a69e9def604ddc50c14d193965b3b6 | [
"MIT"
] | null | null | null | notify.py | Na0ki/ipnotify | 4104c15b81a69e9def604ddc50c14d193965b3b6 | [
"MIT"
] | null | null | null | notify.py | Na0ki/ipnotify | 4104c15b81a69e9def604ddc50c14d193965b3b6 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import re
import urllib.parse
import urllib.request
from configparser import ConfigParser
def load():
"""
.config からIP通知のリストを取得する
:return: ConfigParser object
"""
config = ConfigParser()
try:
with open('/etc/ipnotify/config') as f:
config.read_file(f)
... | 26.597222 | 81 | 0.643864 |
4a03c996dcac9e7d1a40a547ffcd8d857ea3688d | 1,436 | py | Python | urls.py | GFH24/demo-master-master | c5b55bf26fea1333567cfd5b2e4fc1c238e65ded | [
"Apache-2.0"
] | null | null | null | urls.py | GFH24/demo-master-master | c5b55bf26fea1333567cfd5b2e4fc1c238e65ded | [
"Apache-2.0"
] | null | null | null | urls.py | GFH24/demo-master-master | c5b55bf26fea1333567cfd5b2e4fc1c238e65ded | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云(BlueKing) available.
Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obt... | 38.810811 | 115 | 0.746518 |
4a03ca21a6365fb62415b616a91fd6a1d2ce3ad3 | 3,388 | py | Python | maelstrom/tests/test_db_utils.py | maelstromio/maelstrom-py | b88e73496195d59960c2cff43b97aa6329d39f48 | [
"MIT"
] | null | null | null | maelstrom/tests/test_db_utils.py | maelstromio/maelstrom-py | b88e73496195d59960c2cff43b97aa6329d39f48 | [
"MIT"
] | null | null | null | maelstrom/tests/test_db_utils.py | maelstromio/maelstrom-py | b88e73496195d59960c2cff43b97aa6329d39f48 | [
"MIT"
] | null | null | null | from uuid import uuid4
from maelstrom.search import Search
from maelstrom.tests.account import Account
from maelstrom.lookup import LookUp
from maelstrom.data import Data
from test import CassandraTestCase
class DBUnitTests(CassandraTestCase):
"""
The Data class is the generic protoype for the database models... | 33.215686 | 82 | 0.601535 |
4a03ca80dc09466dbde024d775c7c53c6d0e78bc | 3,633 | py | Python | webexteamssdk/webexteamssdk/models/mixins/webhook.py | Steeve135/WebexBot | 6188ca2cfccd8885c5c2e492f17a6e935dee416e | [
"MIT"
] | null | null | null | webexteamssdk/webexteamssdk/models/mixins/webhook.py | Steeve135/WebexBot | 6188ca2cfccd8885c5c2e492f17a6e935dee416e | [
"MIT"
] | 4 | 2020-03-24T16:20:45.000Z | 2021-06-01T22:56:24.000Z | venv/lib/python3.7/site-packages/webexteamssdk/models/mixins/webhook.py | miceder/dnacbot | fb8fd60674cadfec60691b49c13d890bcf6141d7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Webex Teams Webhook data model.
Copyright (c) 2016-2018 Cisco and/or its affiliates.
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 with... | 30.275 | 78 | 0.676851 |
4a03cbb143a75cebc707619084dbc7320ae37388 | 2,177 | py | Python | neural_guided_symbolic_regression/utils/timeout.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | neural_guided_symbolic_regression/utils/timeout.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | neural_guided_symbolic_regression/utils/timeout.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | 28.272727 | 108 | 0.710611 |
4a03cde6961c687b3d56f052b895483fb951f81f | 805 | py | Python | GreedyBestFirstSearch.py | azaharyan/DeepCube | d7b7182b6e140150630e058b169b3cf8713f7564 | [
"MIT"
] | 1 | 2022-02-27T13:50:32.000Z | 2022-02-27T13:50:32.000Z | GreedyBestFirstSearch.py | azaharyan/DeepCube | d7b7182b6e140150630e058b169b3cf8713f7564 | [
"MIT"
] | null | null | null | GreedyBestFirstSearch.py | azaharyan/DeepCube | d7b7182b6e140150630e058b169b3cf8713f7564 | [
"MIT"
] | null | null | null | import time
import numpy as np
from cubeEnv import CubeEnv
class GreedyBestFirstSearch:
def __init__(self, model, max_time_in_seconds):
self.model = model
self.max_time_in_seconds = max_time_in_seconds
def gbfs(self, state):
if state.is_solved():
return []
state ... | 27.758621 | 105 | 0.62236 |
4a03d1a08a967aa09bc8e011830611abc333dca0 | 2,583 | py | Python | mittab/libs/tests/tab_logic/test_outround_pairing.py | DanielS6/mit-tab | f2b5bb609546514582697b998b8b50a66bc8a396 | [
"MIT"
] | 9 | 2015-01-22T01:19:15.000Z | 2017-11-01T20:09:47.000Z | mittab/libs/tests/tab_logic/test_outround_pairing.py | DanielS6/mit-tab | f2b5bb609546514582697b998b8b50a66bc8a396 | [
"MIT"
] | 152 | 2018-04-06T14:32:51.000Z | 2022-02-11T22:12:53.000Z | mittab/libs/tests/tab_logic/test_outround_pairing.py | DanielS6/mit-tab | f2b5bb609546514582697b998b8b50a66bc8a396 | [
"MIT"
] | 13 | 2015-09-14T00:40:06.000Z | 2018-01-24T04:05:32.000Z | import random
from django.test import TestCase
import pytest
from mittab.apps.tab.models import *
from mittab.libs import outround_tab_logic
@pytest.mark.django_db
class TestOutroundPairingLogic(TestCase):
fixtures = ["testing_finished_db"]
pytestmark = pytest.mark.django_db
def generate_checkins(self)... | 28.076087 | 135 | 0.640341 |
4a03d1dec4637edcf9d2b0b81c66c4c009e39bf0 | 7,946 | py | Python | graph4nlp/pytorch/modules/loss/general_loss.py | IBM/graph4nlp | a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297 | [
"Apache-2.0"
] | 18 | 2020-09-09T03:33:29.000Z | 2021-07-22T11:17:16.000Z | graph4nlp/pytorch/modules/loss/general_loss.py | IBM/graph4nlp | a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297 | [
"Apache-2.0"
] | null | null | null | graph4nlp/pytorch/modules/loss/general_loss.py | IBM/graph4nlp | a9bf20b23fa1ec368d9bd40cc8c557f86a9f8297 | [
"Apache-2.0"
] | 1 | 2021-02-19T19:46:03.000Z | 2021-02-19T19:46:03.000Z | import torch.nn as nn
from .base import GeneralLossBase
class GeneralLoss(GeneralLossBase):
r"""
This general loss are backended on the pytorch loss function.
The detailed decription for each loss function can be found at:
`pytorch loss function <https://pytorch.org/docs/stable/nn.html#lo... | 55.566434 | 149 | 0.619683 |
4a03d26d4dfb23895b259d408439cd969920d8ae | 129 | py | Python | zlogo/__init__.py | zjykzj/zlogo | 11c8d383c8580716cd3d32284f75510fd98e1206 | [
"Apache-2.0"
] | 1 | 2021-01-28T08:06:57.000Z | 2021-01-28T08:06:57.000Z | zlogo/__init__.py | zjykzj/zlogo | 11c8d383c8580716cd3d32284f75510fd98e1206 | [
"Apache-2.0"
] | null | null | null | zlogo/__init__.py | zjykzj/zlogo | 11c8d383c8580716cd3d32284f75510fd98e1206 | [
"Apache-2.0"
] | 3 | 2020-10-12T06:25:20.000Z | 2021-11-16T12:51:28.000Z | # -*- coding: utf-8 -*-
"""
@date: 2020/8/12 下午9:03
@file: __init__.py.py
@author: zj
@description:
"""
__version__ = '0.1.0'
| 11.727273 | 23 | 0.581395 |
4a03d346823e7135766ae2e6dc2b5671a24d1a78 | 20,941 | py | Python | python_modules/dagster/dagster/__init__.py | schrockn/dagster | 3bb4e9247a693e48d84e9c86f73d83633d91a5c7 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/__init__.py | schrockn/dagster | 3bb4e9247a693e48d84e9c86f73d83633d91a5c7 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/__init__.py | schrockn/dagster | 3bb4e9247a693e48d84e9c86f73d83633d91a5c7 | [
"Apache-2.0"
] | null | null | null | import importlib
import sys
import typing
from pep562 import pep562
import dagster._module_alias_map as _module_alias_map
# Imports of a key will return the module named by the corresponding value.
sys.meta_path.insert(
_module_alias_map.get_meta_path_insertion_index(),
_module_alias_map.AliasedModuleFinder(... | 30.261561 | 99 | 0.745237 |
4a03d404ad22b5e9d2be70d83d6c238e80cb2a03 | 345 | py | Python | app_LPB/migrations/0016_remove_tarefa_concluida.py | reglabel/ConquerTime | fe91c8eb02424246681814b7d5792c689e5787e0 | [
"MIT"
] | null | null | null | app_LPB/migrations/0016_remove_tarefa_concluida.py | reglabel/ConquerTime | fe91c8eb02424246681814b7d5792c689e5787e0 | [
"MIT"
] | null | null | null | app_LPB/migrations/0016_remove_tarefa_concluida.py | reglabel/ConquerTime | fe91c8eb02424246681814b7d5792c689e5787e0 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-07 19:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app_LPB', '0015_alter_tarefa_data_e_hora_criacao'),
]
operations = [
migrations.RemoveField(
model_name='tarefa',
name='conc... | 19.166667 | 61 | 0.611594 |
4a03d4065816cfb7f1549adb285b28e158533fd6 | 8,733 | py | Python | kairon/shared/actions/utils.py | Shashank411/kairon | 8a3a083136d8cf89359021e49a7610509772ca9b | [
"Apache-2.0"
] | null | null | null | kairon/shared/actions/utils.py | Shashank411/kairon | 8a3a083136d8cf89359021e49a7610509772ca9b | [
"Apache-2.0"
] | null | null | null | kairon/shared/actions/utils.py | Shashank411/kairon | 8a3a083136d8cf89359021e49a7610509772ca9b | [
"Apache-2.0"
] | null | null | null | import json
import logging
import os
from pathlib import Path
from typing import Any, List
import requests
from loguru import logger
from mongoengine import DoesNotExist, connect
from rasa_sdk import Tracker
from smart_config import ConfigLoader
from .data_objects import HttpActionConfig, HttpActionRequestBody
from .... | 42.393204 | 124 | 0.648002 |
4a03d55a2c0881eb93e06caff7b88055dbb03957 | 550 | py | Python | apps/accounts/search_indexes.py | dstl/lighthouse | b810742d9f4cbfac02bf99096542499d25c88b58 | [
"MIT"
] | 5 | 2016-05-12T13:47:38.000Z | 2020-06-22T07:33:35.000Z | apps/accounts/search_indexes.py | dstl/lighthouse | b810742d9f4cbfac02bf99096542499d25c88b58 | [
"MIT"
] | 7 | 2016-10-24T12:41:09.000Z | 2016-12-08T21:58:18.000Z | apps/accounts/search_indexes.py | dstl/lighthouse | b810742d9f4cbfac02bf99096542499d25c88b58 | [
"MIT"
] | 4 | 2016-05-12T21:53:21.000Z | 2021-04-10T22:02:26.000Z | # (c) Crown Owned Copyright, 2016. Dstl.
from haystack import indexes
from .models import User
class UserIndex(indexes.SearchIndex, indexes.Indexable):
name = indexes.CharField(model_attr='name')
slug = indexes.CharField(model_attr='slug')
full_name = indexes.CharField(model_attr='full_name')
text =... | 26.190476 | 72 | 0.705455 |
4a03d5bce16e5809cd0ec72f015889133f0179cc | 713 | py | Python | Books/GodOfPython/P12_File/direct/num4.py | Tim232/Python-Things | 05f0f373a4cf298e70d9668c88a6e3a9d1cd8146 | [
"MIT"
] | 2 | 2020-12-05T07:42:55.000Z | 2021-01-06T23:23:18.000Z | Books/GodOfPython/P12_File/direct/num4.py | Tim232/Python-Things | 05f0f373a4cf298e70d9668c88a6e3a9d1cd8146 | [
"MIT"
] | null | null | null | Books/GodOfPython/P12_File/direct/num4.py | Tim232/Python-Things | 05f0f373a4cf298e70d9668c88a6e3a9d1cd8146 | [
"MIT"
] | null | null | null | import pickle
class Member():
def __init__(self, name, age, gender):
self.__name = name
self.__age = age
self.__gender = gender
@property
def name(self):
return self.__name
@property
def age(self):
return self.__age
@property
def gender(self):
... | 21.606061 | 59 | 0.614306 |
4a03d5dea8afb81f624c1b25a49a9e2eb7f68726 | 1,193 | py | Python | demo/confnp/urls.py | jeanqasaur/jeeves | 1b5783a98f88fa2fc9e4cae7e005d2c9242cfea4 | [
"MIT"
] | 253 | 2015-01-02T01:54:27.000Z | 2022-03-10T01:44:02.000Z | demo/conf/urls.py | jeanqasaur/jeeves | 1b5783a98f88fa2fc9e4cae7e005d2c9242cfea4 | [
"MIT"
] | 4 | 2015-06-09T03:36:28.000Z | 2017-08-11T15:54:24.000Z | demo/conf/urls.py | jeanqasaur/jeeves | 1b5783a98f88fa2fc9e4cae7e005d2c9242cfea4 | [
"MIT"
] | 29 | 2015-02-14T02:24:08.000Z | 2021-12-16T02:46:16.000Z | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
from django.conf.urls.static import static
from django.conf import settings
from conf import views
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'conf.views.home', name='home'),
# url(r'^blog/... | 33.138889 | 78 | 0.684828 |
4a03d61047f980dd3be73776e4c1d62515923204 | 3,654 | py | Python | duolinguo-robot.py | ret0x7c00/assistant-bot | 4fad0f214a095a97c5e27135f6dfc99b15c0cc00 | [
"MIT"
] | null | null | null | duolinguo-robot.py | ret0x7c00/assistant-bot | 4fad0f214a095a97c5e27135f6dfc99b15c0cc00 | [
"MIT"
] | null | null | null | duolinguo-robot.py | ret0x7c00/assistant-bot | 4fad0f214a095a97c5e27135f6dfc99b15c0cc00 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import requests
import time
from random import randrange
import json
import os
from stopwatch import Stopwatch
from barknotify import send_notify
# auth token
AUTH_TOKEN = os.environ.get('DUOLINGO_AUTH_TOKEN')
TOTAL_CNT_MIN = os.environ.get('DUOLINGO_TOTAL_CNT_MIN') or 3
TOTAL_CNT_MAX = os.enviro... | 39.290323 | 761 | 0.635742 |
4a03d626ab33f7ba0d48d0030b2db4634836ad43 | 417 | py | Python | my_django_extensions/wsgi.py | aamishbaloch/my-django-extensions | 446f9a8d33355177e9d09ef926adeb003f1bd6d1 | [
"MIT"
] | null | null | null | my_django_extensions/wsgi.py | aamishbaloch/my-django-extensions | 446f9a8d33355177e9d09ef926adeb003f1bd6d1 | [
"MIT"
] | null | null | null | my_django_extensions/wsgi.py | aamishbaloch/my-django-extensions | 446f9a8d33355177e9d09ef926adeb003f1bd6d1 | [
"MIT"
] | null | null | null | """
WSGI config for my_django_extensions 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.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault(... | 24.529412 | 80 | 0.798561 |
4a03d7e820f5e8a0d58790c830ae9fa2457c53e9 | 11,236 | py | Python | canopy/io/file.py | SomaLogic/Canopy | 535111c40995731e941da8cbf484c2aa9cb9b444 | [
"MIT"
] | 7 | 2020-10-30T17:41:16.000Z | 2022-03-30T06:18:26.000Z | canopy/io/file.py | SomaLogic/Canopy | 535111c40995731e941da8cbf484c2aa9cb9b444 | [
"MIT"
] | 1 | 2020-10-29T12:29:55.000Z | 2020-12-17T17:49:18.000Z | canopy/io/file.py | SomaLogic/Canopy | 535111c40995731e941da8cbf484c2aa9cb9b444 | [
"MIT"
] | 1 | 2021-05-10T21:01:56.000Z | 2021-05-10T21:01:56.000Z | from __future__ import annotations
from typing import TextIO, Dict, List, Tuple
from canopy import Adat
from canopy.tools.math import jround
from canopy.io.errors import AdatReadError
import csv
import json
import pkg_resources
import warnings
import re
def parse_file(f: TextIO) -> Tuple[List[List[float]], Dict[str, ... | 37.959459 | 158 | 0.602617 |
4a03d7fbba121bc021adc76119aad215e556b143 | 6,309 | py | Python | extensions/bag.py | ESDLMapEditorESSIM/esdl-mapeditor | c17090e19de8ff3a0cc552f347639bac67840d22 | [
"Apache-2.0"
] | null | null | null | extensions/bag.py | ESDLMapEditorESSIM/esdl-mapeditor | c17090e19de8ff3a0cc552f347639bac67840d22 | [
"Apache-2.0"
] | 14 | 2020-09-30T21:16:46.000Z | 2021-11-08T18:54:34.000Z | extensions/bag.py | ESDLMapEditorESSIM/esdl-mapeditor | c17090e19de8ff3a0cc552f347639bac67840d22 | [
"Apache-2.0"
] | 1 | 2020-09-17T12:48:57.000Z | 2020-09-17T12:48:57.000Z | # This work is based on original code developed and copyrighted by TNO 2020.
# Subsequent contributions are licensed to you by the developers of such code and are
# made available to the Project under one or several contributor license agreements.
#
# This work is licensed to you under the Apache License, Version 2... | 48.160305 | 306 | 0.525281 |
4a03d9831bb44758ed1926b705dd8de9dc47d735 | 20,181 | py | Python | python/ccxt/async_support/coinone.py | qbtrade/ccxt | ff625fc55bff733e570c4960f44578cfa3100666 | [
"MIT"
] | null | null | null | python/ccxt/async_support/coinone.py | qbtrade/ccxt | ff625fc55bff733e570c4960f44578cfa3100666 | [
"MIT"
] | null | null | null | python/ccxt/async_support/coinone.py | qbtrade/ccxt | ff625fc55bff733e570c4960f44578cfa3100666 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import base64
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.bas... | 42.756356 | 369 | 0.491452 |
4a03da375fae801fc464984e04a18005b3dfd418 | 5,774 | py | Python | Matc_links/Matc_links/spiders/get_links2.py | Nouldine/MyCrawlerSystem | 7bba8ba3ec76e10f70a35700602812ee6f039b63 | [
"MIT"
] | null | null | null | Matc_links/Matc_links/spiders/get_links2.py | Nouldine/MyCrawlerSystem | 7bba8ba3ec76e10f70a35700602812ee6f039b63 | [
"MIT"
] | null | null | null | Matc_links/Matc_links/spiders/get_links2.py | Nouldine/MyCrawlerSystem | 7bba8ba3ec76e10f70a35700602812ee6f039b63 | [
"MIT"
] | null | null | null | from scrapy import Spider
from scrapy.spiders import CrawlSpider, Rule
from scrapy.selector import Selector
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.linkextractors import LinkExtractor
import scrapy
from scrapy.spidermiddlewares.ht... | 43.089552 | 95 | 0.661586 |
4a03db345a92ff0ce170ddcf1853bf873762632a | 2,916 | py | Python | source_code/namespace/iter.py | itsjunqing/fit1008-introduction-to-computer-science | aaf2061ecdcbf10c08b60ef481d1e8c6d3199f94 | [
"MIT"
] | 7 | 2019-08-29T10:11:17.000Z | 2021-11-28T20:36:32.000Z | source_code/namespace/iter.py | itsjunqing/fit1008-introduction-to-computer-science | aaf2061ecdcbf10c08b60ef481d1e8c6d3199f94 | [
"MIT"
] | null | null | null | source_code/namespace/iter.py | itsjunqing/fit1008-introduction-to-computer-science | aaf2061ecdcbf10c08b60ef481d1e8c6d3199f94 | [
"MIT"
] | 6 | 2020-10-21T07:55:10.000Z | 2021-11-05T10:08:06.000Z | from data_structures.node import Node
# ListIterator class to iterate a list through the command "for xxx in xxx"
# Class will consists of the __init__, __iter__, and __next__ method
# all three methods are needed to construct an iterable list
class ListIterator:
def __init__(self, head):
# this ListIterator uses l... | 19.702703 | 75 | 0.6893 |
4a03db7f64c2ff4e41890745c9b3daeabec4d3e0 | 209 | py | Python | test_commands.py | PerformLine/python-performline-client | 82c8f0dc47e007d35702455a2cd8167c0908bddd | [
"BSD-3-Clause"
] | null | null | null | test_commands.py | PerformLine/python-performline-client | 82c8f0dc47e007d35702455a2cd8167c0908bddd | [
"BSD-3-Clause"
] | 1 | 2019-03-01T05:39:00.000Z | 2019-03-01T05:39:00.000Z | test_commands.py | PerformLine/python-performline-client | 82c8f0dc47e007d35702455a2cd8167c0908bddd | [
"BSD-3-Clause"
] | null | null | null | from performline.client import Client
c = Client("976794ca6e5897e27d1b439064691bb1c3eb0420")
tf = list(c.trafficsources())
brands2 = list(c.brands(limit=2))
# brands2 = list(c.brands(create_date=">20200810"))
| 34.833333 | 54 | 0.77512 |
4a03dbc0217011304ea5efa3ee054d40aae9eba1 | 902 | py | Python | ca_on_oshawa/__init__.py | dcycle/scrapers-ca | 4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f | [
"MIT"
] | 19 | 2015-05-26T03:18:50.000Z | 2022-01-31T03:27:41.000Z | ca_on_oshawa/__init__.py | dcycle/scrapers-ca | 4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f | [
"MIT"
] | 119 | 2015-01-09T06:09:35.000Z | 2022-01-20T23:05:05.000Z | ca_on_oshawa/__init__.py | dcycle/scrapers-ca | 4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f | [
"MIT"
] | 17 | 2015-11-23T05:00:10.000Z | 2021-09-15T16:03:33.000Z | from utils import CanadianJurisdiction
from pupa.scrape import Organization
class Oshawa(CanadianJurisdiction):
classification = 'legislature'
division_id = 'ocd-division/country:ca/csd:3518013'
division_name = 'Oshawa'
name = 'Oshawa City Council'
url = 'http://www.oshawa.ca'
def get_organiz... | 41 | 123 | 0.716186 |
4a03dbef58d40837606b0b248f5cf914a4db40b9 | 3,223 | py | Python | pypureclient/flasharray/FA_2_8/models/api_client_patch.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_8/models/api_client_patch.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_8/models/api_client_patch.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.8
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from .... | 28.776786 | 162 | 0.551039 |
4a03dc0288b281346162bcc29ec9141c182c8cb6 | 24,894 | py | Python | src/cryptoadvance/specter/devices/hwi/jadepy/jade.py | GoofyAF/specter-desktop | 9317f70f5e0529e1cf19bfd05dfe3777bc084184 | [
"MIT"
] | 1 | 2021-09-06T16:58:30.000Z | 2021-09-06T16:58:30.000Z | src/cryptoadvance/specter/devices/hwi/jadepy/jade.py | GoofyAF/specter-desktop | 9317f70f5e0529e1cf19bfd05dfe3777bc084184 | [
"MIT"
] | null | null | null | src/cryptoadvance/specter/devices/hwi/jadepy/jade.py | GoofyAF/specter-desktop | 9317f70f5e0529e1cf19bfd05dfe3777bc084184 | [
"MIT"
] | null | null | null | import cbor
import hashlib
import json
import time
import logging
import collections
import collections.abc
import traceback
import random
import sys
# JadeError
from .jade_error import JadeError
# Low-level comms backends
from .jade_serial import JadeSerialImpl
from .jade_tcp import JadeTCPImpl
# from .jade_ble im... | 35.613734 | 92 | 0.605568 |
4a03dc136589f7c161cfe69b25a9a2641e839c09 | 2,413 | py | Python | setup.py | vam-google/python-iot | 6054a14c007ea967bcef275fc4aafc70e48b8b5d | [
"Apache-2.0"
] | null | null | null | setup.py | vam-google/python-iot | 6054a14c007ea967bcef275fc4aafc70e48b8b5d | [
"Apache-2.0"
] | null | null | null | setup.py | vam-google/python-iot | 6054a14c007ea967bcef275fc4aafc70e48b8b5d | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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 agreed to in writing, ... | 32.173333 | 85 | 0.678409 |
4a03dcdd518eaed6815e42f07613893739165cf3 | 668 | py | Python | manage.py | Ishikashah2510/nirvaas_main | 5eaf92756d06261a7f555b10aad864a34c9e761b | [
"MIT"
] | null | null | null | manage.py | Ishikashah2510/nirvaas_main | 5eaf92756d06261a7f555b10aad864a34c9e761b | [
"MIT"
] | null | null | null | manage.py | Ishikashah2510/nirvaas_main | 5eaf92756d06261a7f555b10aad864a34c9e761b | [
"MIT"
] | 3 | 2020-12-30T11:35:22.000Z | 2021-01-07T13:10:26.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'nirvaas_main.settings')
try:
from django.core.management import execute_from_command_line
except... | 29.043478 | 76 | 0.681138 |
4a03dd6060b029e5bbc5a601e95e19d16ac521d0 | 2,362 | py | Python | src/python/zquantum/core/interfaces/ansatz_utils.py | kottmanj/z-quantum-core | 21752e92e79aafedbfeb6e7ae196bdc2fd5803e4 | [
"Apache-2.0"
] | null | null | null | src/python/zquantum/core/interfaces/ansatz_utils.py | kottmanj/z-quantum-core | 21752e92e79aafedbfeb6e7ae196bdc2fd5803e4 | [
"Apache-2.0"
] | null | null | null | src/python/zquantum/core/interfaces/ansatz_utils.py | kottmanj/z-quantum-core | 21752e92e79aafedbfeb6e7ae196bdc2fd5803e4 | [
"Apache-2.0"
] | null | null | null | from functools import wraps
class _InvalidatingSetter(object):
"""Setter descriptor that sets target object's _parametrized_circuit to None.
The descriptor uses __get__ and __set__ methods. Both of them accept ansatz as a
first argument (in this case).
We just forward the __get__, but in __set__ we s... | 34.231884 | 92 | 0.681202 |
4a03de4bf0252fe09c54bf1dce80222a464b23ab | 554 | py | Python | zuoti/runoob/6_fibonacci_sequence.py | Ethan16/python_misc | 29cf2fdbd7529a05bcf35768e0244e634fe2ae7a | [
"Apache-2.0"
] | 1 | 2019-05-04T09:26:29.000Z | 2019-05-04T09:26:29.000Z | zuoti/runoob/6_fibonacci_sequence.py | Ethan16/python_misc | 29cf2fdbd7529a05bcf35768e0244e634fe2ae7a | [
"Apache-2.0"
] | null | null | null | zuoti/runoob/6_fibonacci_sequence.py | Ethan16/python_misc | 29cf2fdbd7529a05bcf35768e0244e634fe2ae7a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@version: 1.0
@author: James
@license: Apache Licence
@contact: euler52201044@sina.com
@file: 6_fibonacci_sequence.py
@time: 2019/5/2 下午4:20
@description: 题目:斐波那契数列。
程序分析:斐波那契数列(Fibonacci sequence),又称黄金分割数列,指的是这样一个数列:0、1、1、2、3、5、8、13、21、34、……。
在数学上,费波那契数列是以递归的方法来定义:
F0 = 0 (n=0)
F1 = 1... | 19.103448 | 77 | 0.611913 |
4a03de7b2faf9b6cc0095c48fec69a44c260024d | 4,050 | py | Python | forest/benchmarking/tests/test_robust_phase_estimation.py | stjordanis/forest-benchmarking | f9ad9701c2d253de1a0c922d7220ed7de75ac685 | [
"Apache-2.0"
] | 40 | 2019-01-25T18:35:24.000Z | 2022-03-13T11:21:18.000Z | forest/benchmarking/tests/test_robust_phase_estimation.py | stjordanis/forest-benchmarking | f9ad9701c2d253de1a0c922d7220ed7de75ac685 | [
"Apache-2.0"
] | 140 | 2019-01-25T20:09:02.000Z | 2022-03-12T01:08:01.000Z | forest/benchmarking/tests/test_robust_phase_estimation.py | stjordanis/forest-benchmarking | f9ad9701c2d253de1a0c922d7220ed7de75ac685 | [
"Apache-2.0"
] | 22 | 2019-02-01T13:18:35.000Z | 2022-01-12T15:03:13.000Z | import numpy as np
from numpy import pi
from pyquil.gates import I, H, RY, RZ, RX
from pyquil.noise import damping_after_dephasing
from pyquil.quil import Program
from pyquil.quilbase import Measurement
import forest.benchmarking.robust_phase_estimation as rpe
from forest.benchmarking.observable_estimation import Obse... | 41.326531 | 99 | 0.624198 |
4a03dece1659a6e7d9da3db66fbeddf5c6b72f09 | 9,441 | py | Python | libs/client/cornflow_client/tests/unit/test_schema_manager.py | ggsdc/corn | 4c17c46a70f95b8882bcb6a55ef7daa1f69e0456 | [
"MIT"
] | 2 | 2020-07-09T20:58:47.000Z | 2020-07-20T20:40:46.000Z | cornflow-client/cornflow_client/tests/unit/test_schema_manager.py | baobabsoluciones/cornflow | bd7cae22107e5fe148704d5f41d4f58f9c410b40 | [
"Apache-2.0"
] | 2 | 2022-03-31T08:42:10.000Z | 2022-03-31T12:05:23.000Z | libs/client/cornflow_client/tests/unit/test_schema_manager.py | ggsdc/corn | 4c17c46a70f95b8882bcb6a55ef7daa1f69e0456 | [
"MIT"
] | null | null | null | """
"""
#
import json
import os
#
from unittest import TestCase
#
from cornflow_client import SchemaManager
from cornflow_client.constants import DATASCHEMA
from cornflow_client.core.tools import load_json
from cornflow_client.tests.const import dict_example
class TestSchemaManager(TestCase):
def setUp(self):
... | 38.692623 | 105 | 0.633937 |
4a03df052cd9499c67acb4c2ef25e34f3b10e7df | 338 | py | Python | server/src/tests/samples/assert1.py | AndrewLester/pyright | a47c20a7d74dd88f06396d66e201a684571d99b0 | [
"MIT"
] | null | null | null | server/src/tests/samples/assert1.py | AndrewLester/pyright | a47c20a7d74dd88f06396d66e201a684571d99b0 | [
"MIT"
] | 1 | 2021-08-31T20:37:43.000Z | 2021-08-31T20:37:43.000Z | server/src/tests/samples/assert1.py | AndrewLester/pyright | a47c20a7d74dd88f06396d66e201a684571d99b0 | [
"MIT"
] | null | null | null | # This sample tests the ability to detect errant assert calls
# that are always true - the "reportAssertAlwaysTrue" option.
# This should generate a warning.
from typing import Any, Tuple
assert (1 != 2, "Error message")
a: Tuple[Any, ...] = (2, 3)
assert a
b = ()
assert b
c = (2, 3)
# This should generate a w... | 14.695652 | 61 | 0.680473 |
4a03dfcef82b26c04a4f7276a7e17db3e513eb2a | 1,646 | py | Python | extract_raw_txt.py | opensmartmesh/osmesh-analytics-utils | 074a4b739b30535ff9530f4a0864ac9d1b9932b6 | [
"MIT"
] | null | null | null | extract_raw_txt.py | opensmartmesh/osmesh-analytics-utils | 074a4b739b30535ff9530f4a0864ac9d1b9932b6 | [
"MIT"
] | null | null | null | extract_raw_txt.py | opensmartmesh/osmesh-analytics-utils | 074a4b739b30535ff9530f4a0864ac9d1b9932b6 | [
"MIT"
] | null | null | null |
# Dependencies : pandas
# Install pandas with : pip install pandas
import pandas as pd
import glob
from os.path import basename, dirname, join
import datetime
def build_datetime(month, day, time_str, year=2017):
dt_str = str(year) + '/' + str(month) + '/' + str(day) + ' ' + time_str
dt = datetime.datetime.... | 28.877193 | 132 | 0.671932 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.