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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d4c36cf6c98489965bf8dccd7333caab4140d49f | 8,373 | py | Python | iengage_client/models/question_category.py | iEngage/python-sdk | 76cc6ed697d7599ce9af74124c12d33ad5aff419 | [
"Apache-2.0"
] | null | null | null | iengage_client/models/question_category.py | iEngage/python-sdk | 76cc6ed697d7599ce9af74124c12d33ad5aff419 | [
"Apache-2.0"
] | null | null | null | iengage_client/models/question_category.py | iEngage/python-sdk | 76cc6ed697d7599ce9af74124c12d33ad5aff419 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
iEngage 2.0 API
This API enables Intelligent Engagement for your Business. iEngage is a platform that combines process, augmented intelligence and rewards to help you intelligently engage customers.
OpenAPI spec version: 2.0
Generated by: https://github.com/swagger-api/swagge... | 27.185065 | 186 | 0.605637 |
f63ef32376e308028c5a94aeda9f1aaf08453cf6 | 1,315 | py | Python | defacto_zips/w9s1_slam/build/catkin_generated/generate_cached_setup.py | Psyf/WincentPanzer | da546042ce5b22f45e84f3568a9d0825695d5aaa | [
"MIT"
] | null | null | null | defacto_zips/w9s1_slam/build/catkin_generated/generate_cached_setup.py | Psyf/WincentPanzer | da546042ce5b22f45e84f3568a9d0825695d5aaa | [
"MIT"
] | null | null | null | defacto_zips/w9s1_slam/build/catkin_generated/generate_cached_setup.py | Psyf/WincentPanzer | da546042ce5b22f45e84f3568a9d0825695d5aaa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import os
import stat
import sys
# find the import for catkin's python package - either from source space or from an installed underlay
if os.path.exists(os.path.join('/opt/ros/kinetic/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.... | 42.419355 | 102 | 0.736122 |
b8ea8347ff370699354d1eef948d305fe5f88008 | 1,982 | py | Python | analysis/evaluate_models.py | colinbrust/sm_ml | 853f9b9607ab2160362d03e134419aa8ef3e0887 | [
"MIT"
] | null | null | null | analysis/evaluate_models.py | colinbrust/sm_ml | 853f9b9607ab2160362d03e134419aa8ef3e0887 | [
"MIT"
] | null | null | null | analysis/evaluate_models.py | colinbrust/sm_ml | 853f9b9607ab2160362d03e134419aa8ef3e0887 | [
"MIT"
] | null | null | null | import pickle
import pandas as np
import numpy as np
import pydot
from pprint import pprint
from sklearn.model_selection import train_test_split, RandomizedSearchCV
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import mean_squared_error, r2_score
from sklearn.tree import export_graphviz
# L... | 34.77193 | 99 | 0.739152 |
462d852a2659cc34087710692a19c930f8bca79e | 151 | py | Python | tests/unit/conftest.py | wwwtyro/layer-calico-cni | c73f07f6be2e6c0a8f9d2c79fec8b8ea6c43dd90 | [
"Apache-2.0"
] | 6 | 2021-10-01T19:46:14.000Z | 2022-03-31T17:05:08.000Z | tests/unit/conftest.py | wwwtyro/layer-calico-cni | c73f07f6be2e6c0a8f9d2c79fec8b8ea6c43dd90 | [
"Apache-2.0"
] | 111 | 2021-10-01T18:18:17.000Z | 2022-03-29T12:23:20.000Z | tests/unit/conftest.py | wwwtyro/layer-calico-cni | c73f07f6be2e6c0a8f9d2c79fec8b8ea6c43dd90 | [
"Apache-2.0"
] | 10 | 2021-09-29T14:47:54.000Z | 2022-03-18T14:52:16.000Z | import charms.unit_test
charms.unit_test.patch_reactive()
charms.unit_test.patch_module('conctl')
charms.unit_test.patch_module('charms.leadership')
| 21.571429 | 50 | 0.834437 |
43bc2173253cc101a3e17a65e2f2708503f0643b | 6,112 | py | Python | AstroMl/RRLyrae/AstroML_GMM_bayes_RRLyrae.py | vais-ral/CCPi-ML | ca9baeb0dd5db3a97ac8ab9e33e03aeae42ebfa4 | [
"Apache-2.0"
] | null | null | null | AstroMl/RRLyrae/AstroML_GMM_bayes_RRLyrae.py | vais-ral/CCPi-ML | ca9baeb0dd5db3a97ac8ab9e33e03aeae42ebfa4 | [
"Apache-2.0"
] | null | null | null | AstroMl/RRLyrae/AstroML_GMM_bayes_RRLyrae.py | vais-ral/CCPi-ML | ca9baeb0dd5db3a97ac8ab9e33e03aeae42ebfa4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 24 09:13:48 2018
@author: zyv57124
"""
import numpy as np
import pandas
import sys
import matplotlib.pyplot as plt
import scipy.io as sio
import tensorflow as tf
import sklearn
from tensorflow import keras
from sklearn.model_selection import train_test_split
from sklearn... | 29.384615 | 130 | 0.65805 |
f24662ec290cf258937cc7895db183ad22110574 | 253 | py | Python | src/manage.py | sitture/docker-django | d6495b9b72a485bd5268a9c835ee38477f8a7b2c | [
"MIT"
] | 14 | 2015-11-24T08:56:32.000Z | 2022-03-13T22:52:42.000Z | src/manage.py | sitture/docker-django | d6495b9b72a485bd5268a9c835ee38477f8a7b2c | [
"MIT"
] | 3 | 2020-02-11T23:16:16.000Z | 2021-06-10T18:32:14.000Z | src/manage.py | sitture/docker-django | d6495b9b72a485bd5268a9c835ee38477f8a7b2c | [
"MIT"
] | 4 | 2016-06-08T22:41:05.000Z | 2018-07-25T18:09:06.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_app.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 23 | 74 | 0.774704 |
eb4cd78e38e940a07759acc1bdcc5767ba021c1c | 22,095 | py | Python | openstack/tests/functional/cloud/test_compute.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | null | null | null | openstack/tests/functional/cloud/test_compute.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | null | null | null | openstack/tests/functional/cloud/test_compute.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | 1 | 2021-03-12T14:28:28.000Z | 2021-03-12T14:28:28.000Z | # 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 t... | 45.36961 | 78 | 0.653904 |
2946d785aca18621e41c1f98eef975203f3e1f87 | 93 | py | Python | tests/client/test_coinbase.py | kanzure/eth-testrpc | cbb22ff2bebc9f12098b0bb7f2a245f3510522b4 | [
"MIT"
] | 164 | 2016-04-20T08:30:22.000Z | 2022-01-05T07:43:12.000Z | tests/client/test_coinbase.py | kanzure/eth-testrpc | cbb22ff2bebc9f12098b0bb7f2a245f3510522b4 | [
"MIT"
] | 55 | 2016-06-30T20:06:56.000Z | 2019-12-12T07:36:02.000Z | tests/client/test_coinbase.py | kanzure/eth-testrpc | cbb22ff2bebc9f12098b0bb7f2a245f3510522b4 | [
"MIT"
] | 46 | 2016-04-27T16:28:46.000Z | 2022-01-09T17:59:09.000Z | def test_coinbase(client, hex_accounts):
assert client.get_coinbase() == hex_accounts[0]
| 31 | 51 | 0.763441 |
25254e6fdb9ae98745cc0d5cf70076089e9e1a5c | 640 | py | Python | backend/manage.py | crowdbotics-apps/good-guyz-2-go-28652 | 647e96e61e8bed5f69ca7583c568ec2031958b5a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/good-guyz-2-go-28652 | 647e96e61e8bed5f69ca7583c568ec2031958b5a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/good-guyz-2-go-28652 | 647e96e61e8bed5f69ca7583c568ec2031958b5a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'good_guyz_2_go_28652.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
... | 29.090909 | 84 | 0.689063 |
3c37f638b4d89211676d2400b6f8e7974539c307 | 483 | py | Python | setup.py | bobbybabu007/django-simple-helpdesk | d507682e82808ba182736d33e26824dcad8d801f | [
"BSD-2-Clause"
] | 14 | 2016-10-11T21:29:32.000Z | 2021-09-21T13:51:16.000Z | setup.py | bobbybabu007/django-simple-helpdesk | d507682e82808ba182736d33e26824dcad8d801f | [
"BSD-2-Clause"
] | 7 | 2015-11-14T19:15:47.000Z | 2021-06-24T18:35:42.000Z | setup.py | bobbybabu007/django-simple-helpdesk | d507682e82808ba182736d33e26824dcad8d801f | [
"BSD-2-Clause"
] | 17 | 2015-06-01T17:35:58.000Z | 2021-09-11T22:01:19.000Z | # -*- encoding: utf-8 -*-
from setuptools import setup, find_packages
version = '0.7.3'
setup(
name='django-simple-helpdesk',
version=version,
author='Kirill Bubochkin',
author_email='ookami.kb@gmail.com',
description='Simple HelpDesk for Django',
url='https://github.com/ookami-kb/django-simpl... | 28.411765 | 86 | 0.703934 |
e6f2f07a37463d35ad4d226976703d1b2d78c5e3 | 1,715 | py | Python | userprofile/migrations/0001_initial.py | AntInso/GreaterWMS | 9eabb1b9b0f5376dcccd89ed86dd76995955a8ec | [
"Apache-2.0"
] | 1 | 2021-02-17T14:04:29.000Z | 2021-02-17T14:04:29.000Z | userprofile/migrations/0001_initial.py | AntInso/GreaterWMS | 9eabb1b9b0f5376dcccd89ed86dd76995955a8ec | [
"Apache-2.0"
] | null | null | null | userprofile/migrations/0001_initial.py | AntInso/GreaterWMS | 9eabb1b9b0f5376dcccd89ed86dd76995955a8ec | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.4 on 2021-01-17 15:22
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Users',
fields=[
('id', models.AutoField(au... | 47.638889 | 114 | 0.604665 |
31b23312e6643e95278a2225ec84f190096c74fe | 69 | py | Python | src/python_import/C/cc.py | matiastang/matias-python | b7785217e5d386c01198305751ecd562259ea2b7 | [
"MIT"
] | null | null | null | src/python_import/C/cc.py | matiastang/matias-python | b7785217e5d386c01198305751ecd562259ea2b7 | [
"MIT"
] | null | null | null | src/python_import/C/cc.py | matiastang/matias-python | b7785217e5d386c01198305751ecd562259ea2b7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
#coding=utf-8
def cc_debug():
print(__name__) | 13.8 | 19 | 0.681159 |
350cae2165e6df4f44afaa2b28ed707d582c0d2d | 3,970 | py | Python | src/hackurllib/help.py | ox01024/hackurllib | 61c7b282d54e0818c6e13dc2bbdc65dd0f406219 | [
"Apache-2.0"
] | 1 | 2021-11-12T15:06:58.000Z | 2021-11-12T15:06:58.000Z | src/hackurllib/help.py | ox01024/hackurllib | 61c7b282d54e0818c6e13dc2bbdc65dd0f406219 | [
"Apache-2.0"
] | null | null | null | src/hackurllib/help.py | ox01024/hackurllib | 61c7b282d54e0818c6e13dc2bbdc65dd0f406219 | [
"Apache-2.0"
] | null | null | null | """Module containing bug report helper(s)."""
from __future__ import print_function
import json
import platform
import sys
import ssl
import idna
import urllib3
from . import __version__ as requests_version
try:
import charset_normalizer
except ImportError:
charset_normalizer = None
try:
import chardet... | 29.191176 | 78 | 0.637783 |
fb3b4057c040e038fa422049be0d0b786996ccc3 | 1,946 | py | Python | main/auth/mailru.py | alexmrval/temp | 28df4c7ca980a22b54a52eef15d7e6e81970d91e | [
"MIT"
] | 23 | 2015-01-13T19:26:04.000Z | 2019-12-21T06:23:20.000Z | main/auth/mailru.py | alexmrval/temp | 28df4c7ca980a22b54a52eef15d7e6e81970d91e | [
"MIT"
] | 227 | 2015-11-30T20:39:06.000Z | 2019-05-22T09:13:27.000Z | main/auth/mailru.py | alexmrval/temp | 28df4c7ca980a22b54a52eef15d7e6e81970d91e | [
"MIT"
] | 18 | 2015-03-13T19:33:04.000Z | 2019-06-27T04:31:44.000Z | # coding: utf-8
from __future__ import absolute_import
import hashlib
import flask
import auth
import config
import model
import util
from main import app
mailru_config = dict(
access_token_url='https://connect.mail.ru/oauth/token',
authorize_url='https://connect.mail.ru/oauth/authorize',
base_url='https://... | 24.325 | 78 | 0.711202 |
7695aa11b78cb34906e075401c08c3674bb4e1ed | 1,098 | py | Python | tests/end_to_end/scenarios/get_irc_connection_info.py | norayr/biboumi | 805671032d25ee6ce09ed75e8a385c04e9563cdd | [
"Zlib"
] | 68 | 2015-01-29T21:07:37.000Z | 2022-03-20T14:48:07.000Z | tests/end_to_end/scenarios/get_irc_connection_info.py | norayr/biboumi | 805671032d25ee6ce09ed75e8a385c04e9563cdd | [
"Zlib"
] | 5 | 2016-10-24T18:34:30.000Z | 2021-08-31T13:30:37.000Z | tests/end_to_end/scenarios/get_irc_connection_info.py | norayr/biboumi | 805671032d25ee6ce09ed75e8a385c04e9563cdd | [
"Zlib"
] | 13 | 2015-12-11T15:19:05.000Z | 2021-08-31T13:24:35.000Z | from scenarios import *
scenario = (
send_stanza("<iq type='set' id='command1' from='{jid_one}/{resource_one}' to='{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='get-irc-connection-info' action='execute' /></iq>"),
expect_stanza("/iq/commands:command/commands:note[text()='You are ... | 78.428571 | 230 | 0.701275 |
127233dbaeb6b4def0d9d3bee8e6e62f363c37a8 | 7,098 | py | Python | apps/amo/decorators.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | apps/amo/decorators.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | apps/amo/decorators.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import functools
import json
from django import http
from django.conf import settings
from django.core.exceptions import PermissionDenied
import commonware.log
from . import models as context
from .utils import JSONEncoder, redirect_for_login
from amo import get_user, set_user
from mkt.users.utils i... | 29.209877 | 79 | 0.604396 |
8a03475a6ca4ab198ea2ff01f38c4575281cf7e5 | 1,480 | py | Python | test_resize.py | bdabrowski/resizer | b069ede9ec5f546e7c7999daeabc18e6411516f6 | [
"MIT"
] | null | null | null | test_resize.py | bdabrowski/resizer | b069ede9ec5f546e7c7999daeabc18e6411516f6 | [
"MIT"
] | 8 | 2019-01-13T12:13:07.000Z | 2022-03-11T23:37:52.000Z | test_resize.py | bdabrowski/resizer | b069ede9ec5f546e7c7999daeabc18e6411516f6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import uuid
import pytest
from PIL import Image
from resize import resize_image
FIXTURE_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test_files')
output_path = ''
def setup_module(module):
""" setup any state specific... | 32.888889 | 121 | 0.704054 |
d0742f1cdcf5f2507aada0a48f463d216d428690 | 374 | py | Python | tests/conftest.py | financelurker/cryptocom-exchange | aeda9623e427ae50934821e99b0127c6d43918e1 | [
"MIT"
] | 47 | 2020-02-18T19:48:39.000Z | 2022-03-12T18:22:44.000Z | tests/conftest.py | financelurker/cryptocom-exchange | aeda9623e427ae50934821e99b0127c6d43918e1 | [
"MIT"
] | 29 | 2020-05-14T11:09:10.000Z | 2022-03-07T21:52:37.000Z | tests/conftest.py | financelurker/cryptocom-exchange | aeda9623e427ae50934821e99b0127c6d43918e1 | [
"MIT"
] | 40 | 2020-03-25T10:00:56.000Z | 2022-02-25T20:30:26.000Z | import pytest
import cryptocom.exchange as cro
@pytest.fixture
async def exchange() -> cro.Exchange:
ex = cro.Exchange()
await ex.sync_pairs()
return ex
@pytest.fixture
@pytest.mark.asyncio
async def account() -> cro.Account:
acc = cro.Account(from_env=True)
await acc.sync_pairs()
yield acc... | 18.7 | 52 | 0.71123 |
57996db072d369ea46429bd9760b59309cf0261f | 3,518 | py | Python | modoboa/lib/events.py | vinaebizs/modoboa | fb1e7f4c023b7eb6be3aa77174bfa12fc653670e | [
"0BSD"
] | null | null | null | modoboa/lib/events.py | vinaebizs/modoboa | fb1e7f4c023b7eb6be3aa77174bfa12fc653670e | [
"0BSD"
] | null | null | null | modoboa/lib/events.py | vinaebizs/modoboa | fb1e7f4c023b7eb6be3aa77174bfa12fc653670e | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
"""
:mod:`EVENTS` --- simple EVENTS handling
----------------------------------------
This module provides a simple way of managing EVENTS between Modoboa
core application and additional components.
"""
EVENTS = []
CALLBACKS = {}
def declare(nevents):
"""Declare new events.
:param... | 25.867647 | 70 | 0.630756 |
bfff81e84f550311c73c09746e1fe900e5da619f | 53,572 | py | Python | uhd_restpy/testplatform/sessions/ixnetwork/topology/cfmbridge_0d1f83a1e9fee8ee7d444b2a33a0e03b.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | uhd_restpy/testplatform/sessions/ixnetwork/topology/cfmbridge_0d1f83a1e9fee8ee7d444b2a33a0e03b.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | uhd_restpy/testplatform/sessions/ixnetwork/topology/cfmbridge_0d1f83a1e9fee8ee7d444b2a33a0e03b.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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, ... | 46.422877 | 319 | 0.625737 |
9231404efbf80576045c0ad5db4e9654515e5c18 | 6,851 | py | Python | configs/_base_/models/cascade_rcnn_r50_fpn.py | NEUdeep/mmdetection | d4fe59a755b45e9cc18ba4124fdbc8b7797ba069 | [
"Apache-2.0"
] | null | null | null | configs/_base_/models/cascade_rcnn_r50_fpn.py | NEUdeep/mmdetection | d4fe59a755b45e9cc18ba4124fdbc8b7797ba069 | [
"Apache-2.0"
] | null | null | null | configs/_base_/models/cascade_rcnn_r50_fpn.py | NEUdeep/mmdetection | d4fe59a755b45e9cc18ba4124fdbc8b7797ba069 | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='CascadeRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
... | 34.60101 | 79 | 0.434973 |
fc51cca36caee6290a87750482b01a66d3e97982 | 1,167 | py | Python | data/p4VQE/R4/benchmark/startPyquil717.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startPyquil717.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startPyquil717.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=12
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=1
pr... | 22.882353 | 64 | 0.60497 |
8b9942f6e0e8f29553f2891ae317f73ef01df14c | 2,419 | py | Python | xadmin/plugins/sortablelist.py | perryyo/xadmin | 4ca63479ebd9b52ec094ae5afc47c49ff6854bc6 | [
"BSD-3-Clause"
] | 3,639 | 2016-04-20T08:22:41.000Z | 2022-03-27T02:04:08.000Z | xadmin/plugins/sortablelist.py | perryyo/xadmin | 4ca63479ebd9b52ec094ae5afc47c49ff6854bc6 | [
"BSD-3-Clause"
] | 405 | 2016-04-20T10:36:10.000Z | 2022-03-07T08:33:35.000Z | xadmin/plugins/sortablelist.py | perryyo/xadmin | 4ca63479ebd9b52ec094ae5afc47c49ff6854bc6 | [
"BSD-3-Clause"
] | 1,248 | 2016-04-23T14:20:33.000Z | 2022-03-31T11:08:46.000Z | # coding: utf-8
"""
Make items sortable by drag-drop in list view. Diffierent from
builtin plugin sortable, it touches model field indeed intead
of only for display.
"""
from __future__ import unicode_literals
from django.template.loader import render_to_string
from django.core.urlresolvers import reverse
from django... | 29.5 | 91 | 0.684167 |
92ef241ed75e2756bddbdc1c678b9c7b2e4b67d9 | 97,033 | py | Python | test/orm/test_events.py | hugovk/sqlalchemy | bfd66239250190114560114ef2ed324d58abedf3 | [
"MIT"
] | null | null | null | test/orm/test_events.py | hugovk/sqlalchemy | bfd66239250190114560114ef2ed324d58abedf3 | [
"MIT"
] | null | null | null | test/orm/test_events.py | hugovk/sqlalchemy | bfd66239250190114560114ef2ed324d58abedf3 | [
"MIT"
] | null | null | null | from unittest.mock import ANY
from unittest.mock import call
from unittest.mock import Mock
import sqlalchemy as sa
from sqlalchemy import delete
from sqlalchemy import event
from sqlalchemy import ForeignKey
from sqlalchemy import inspect
from sqlalchemy import Integer
from sqlalchemy import literal_column
from sqlal... | 29.359455 | 79 | 0.564107 |
d4c5506b8ab8dc3063b93a7ec87327c8f81e151a | 977 | py | Python | ExperimentScripts/ClusterScripts/gen_experiment.py | AdamJelley/openai-spinningup | b1f7a5b4014899dcc7208b290a7dac64f27e3422 | [
"MIT"
] | null | null | null | ExperimentScripts/ClusterScripts/gen_experiment.py | AdamJelley/openai-spinningup | b1f7a5b4014899dcc7208b290a7dac64f27e3422 | [
"MIT"
] | null | null | null | ExperimentScripts/ClusterScripts/gen_experiment.py | AdamJelley/openai-spinningup | b1f7a5b4014899dcc7208b290a7dac64f27e3422 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Script for generating spinningup_experiments.txt"""
import os
# The home dir on the node's scratch disk
USER = os.getenv('USER')
# This may need changing depending on the cluster:
SCRATCH_DISK = '/disk/scratch'
SCRATCH_HOME = f'{SCRATCH_DISK}/{USER}'
# NEED TO SET ALGO, ENV AND DATA_DIR HERE... | 25.710526 | 124 | 0.696008 |
c664ec7614d5cb0257956bedc0d5af78f4bfe479 | 1,725 | py | Python | 2014/Round A/Problem C/C-solution.py | prashantsingh2408/Google-Kick-Start | 23d614b28dff5b320494aca297c3dbc0d180fbcb | [
"MIT"
] | 237 | 2019-02-20T16:14:00.000Z | 2022-03-02T16:35:52.000Z | 2014/Round A/Problem C/C-solution.py | palisettychanikya/Google-Kick-Start | 44173bb3d3308ced743275e6fbe0165ac17d8eef | [
"MIT"
] | 1 | 2021-04-01T15:18:58.000Z | 2021-04-01T15:18:58.000Z | 2014/Round A/Problem C/C-solution.py | palisettychanikya/Google-Kick-Start | 44173bb3d3308ced743275e6fbe0165ac17d8eef | [
"MIT"
] | 92 | 2019-02-09T02:25:27.000Z | 2022-03-07T11:55:42.000Z | from itertools import combinations_with_replacement as combinations_w_r
T = int(input())
for t in range(1, T + 1):
N = int(input())
equations = {}
original_equations = {}
for n in range(N):
expression, z = input().split('=')
x, y = expression.split('+')
if (x, y) not in equation... | 43.125 | 76 | 0.505507 |
7fae6869709de5afa8f54f4cc4ebb8e918601f51 | 5,611 | py | Python | example_opt_root/pysot_optimizer.py | goncaloperes/bayesmark | 8c420e935718f0d6867153b781e58943ecaf2338 | [
"Apache-2.0"
] | 102 | 2019-09-27T02:38:52.000Z | 2022-03-12T13:31:11.000Z | example_opt_root/pysot_optimizer.py | goncaloperes/bayesmark | 8c420e935718f0d6867153b781e58943ecaf2338 | [
"Apache-2.0"
] | 17 | 2019-10-07T18:20:21.000Z | 2022-01-03T08:19:16.000Z | example_opt_root/pysot_optimizer.py | goncaloperes/bayesmark | 8c420e935718f0d6867153b781e58943ecaf2338 | [
"Apache-2.0"
] | 34 | 2019-09-27T02:38:31.000Z | 2022-02-09T21:32:25.000Z | import warnings
from copy import copy
import numpy as np
from poap.strategy import EvalRecord
from pySOT.experimental_design import SymmetricLatinHypercube
from pySOT.optimization_problems import OptimizationProblem
from pySOT.strategy import SRBFStrategy
from pySOT.surrogate import CubicKernel, LinearTail, RBFInterpo... | 35.06875 | 86 | 0.612903 |
32cdc919ddb899c1ea4ff9e0bf6cfa9fa9e79725 | 3,851 | py | Python | python/src/nnabla/config.py | syoyo/nnabla | b776b68dcdffe894cac1233dfd07c301415cc0fb | [
"Apache-2.0"
] | 1 | 2020-07-18T20:08:36.000Z | 2020-07-18T20:08:36.000Z | python/src/nnabla/config.py | syoyo/nnabla | b776b68dcdffe894cac1233dfd07c301415cc0fb | [
"Apache-2.0"
] | null | null | null | python/src/nnabla/config.py | syoyo/nnabla | b776b68dcdffe894cac1233dfd07c301415cc0fb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 Sony Corporation. 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 applicabl... | 43.761364 | 124 | 0.534407 |
fc01ff0fe5ee09b6ac2cb0b99ba2e8650dc987f3 | 10,239 | py | Python | contrib/spendfrom/spendfrom.py | guifalci/bitcoinzero | ed9a48ba941fd87ca48745d009e322e2f46a745c | [
"MIT"
] | 1 | 2018-08-23T20:44:31.000Z | 2018-08-23T20:44:31.000Z | contrib/spendfrom/spendfrom.py | guifalci/bitcoinzero | ed9a48ba941fd87ca48745d009e322e2f46a745c | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | guifalci/bitcoinzero | ed9a48ba941fd87ca48745d009e322e2f46a745c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2013 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Use the raw transactions API to spend bitcoins received on particular addresses,
# and send any change back ... | 37.782288 | 111 | 0.635121 |
9ecc4f6da5a84eb647692f8abfe8279e25f55309 | 66,062 | py | Python | model/db_queries.py | Cooops/ABUpower | ec84f8f0177b09a09195a974357d328376df7efc | [
"MIT"
] | 2 | 2018-10-09T01:17:21.000Z | 2019-05-17T11:01:46.000Z | model/db_queries.py | Cooops/ABUpower | ec84f8f0177b09a09195a974357d328376df7efc | [
"MIT"
] | null | null | null | model/db_queries.py | Cooops/ABUpower | ec84f8f0177b09a09195a974357d328376df7efc | [
"MIT"
] | null | null | null | import pandas as pd
import psycopg2
import json
import datetime
import configparser
from utils.gen_utils import get_trace_and_log, fetch_data
###################
# general queries #
###################
# begin general queries
def prune_completed(value, cursor):
query = (
f'''
DELETE
... | 41.600756 | 324 | 0.664845 |
9106fa31831380a859c6e7853bcd86a250c93ec9 | 1,070 | py | Python | kubernetes/test/test_v1beta1_cluster_role_binding_list.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | 1 | 2019-02-17T15:28:39.000Z | 2019-02-17T15:28:39.000Z | kubernetes/test/test_v1beta1_cluster_role_binding_list.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1beta1_cluster_role_binding_list.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 23.777778 | 107 | 0.738318 |
e03252db2926a35e0a7d6547953a014c2565d669 | 927 | py | Python | settings/auto_sprint.py | HansGR/WorldsCollide | af227be553e120ee004b130598360c61daf7df59 | [
"MIT"
] | 7 | 2022-01-15T02:53:53.000Z | 2022-02-17T00:51:32.000Z | settings/auto_sprint.py | HansGR/WorldsCollide | af227be553e120ee004b130598360c61daf7df59 | [
"MIT"
] | 8 | 2022-01-16T02:45:24.000Z | 2022-03-21T02:08:27.000Z | settings/auto_sprint.py | HansGR/WorldsCollide | af227be553e120ee004b130598360c61daf7df59 | [
"MIT"
] | 5 | 2022-01-15T02:53:38.000Z | 2022-01-19T17:42:10.000Z | from memory.space import Reserve
import instruction.asm as asm
import args
class AutoSprint:
def __init__(self):
if args.auto_sprint:
self.mod()
def mod(self):
# set sprint by default, b button to walk, sprint shoes do nothing
WALK_SPEED = 2
SPRINT_SPEED = 3
... | 25.054054 | 74 | 0.560949 |
fd224682b775fa89112da6b95ec74796c8b3d377 | 691 | py | Python | Leetcode/0297. Serialize and Deserialize Binary Tree/0297-2.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | Leetcode/0297. Serialize and Deserialize Binary Tree/0297-2.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | Leetcode/0297. Serialize and Deserialize Binary Tree/0297-2.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | class Codec:
def serialize(self, root: 'TreeNode') -> str:
"""Encodes a tree to a single string."""
s = []
def preorder(root: 'TreeNode') -> None:
if not root:
s.append('n')
return
s.append(str(root.val))
preorder(root.left)
preorder(root.right)
preorder(root... | 20.939394 | 49 | 0.549928 |
3b68da0714a73fa37eb78e63d1ba3968cb736d96 | 154 | py | Python | tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_Lag1Trend_BestCycle_MLP.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_Lag1Trend_BestCycle_MLP.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_Lag1Trend_BestCycle_MLP.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Integration'] , ['Lag1Trend'] , ['BestCycle'] , ['MLP'] ); | 38.5 | 81 | 0.746753 |
f4d053ef2c6af2dfe90e5cfee63aacc5223adbea | 1,995 | py | Python | sample/crud.py | rogrs/pythoncrud | 3e1f62eb27164f5eb89dd58281c30045fb917882 | [
"BSD-2-Clause"
] | null | null | null | sample/crud.py | rogrs/pythoncrud | 3e1f62eb27164f5eb89dd58281c30045fb917882 | [
"BSD-2-Clause"
] | null | null | null | sample/crud.py | rogrs/pythoncrud | 3e1f62eb27164f5eb89dd58281c30045fb917882 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
'''
MySQL CRUD (Create Retrieve Update Delete) Operations using Python
'''
# Import MySQLdb $ sudo apt-get install python-mysqldb
import MySQLdb as mdb
import sys
# CREATE A NEW TABLE and INSERT SOME VALUES
def createTable(con):
with con:
cur = con.cursor()
cur.exec... | 20.357143 | 80 | 0.610526 |
10136edf23ff9eb50c2309b1db84e8c77f85b138 | 2,970 | py | Python | app.py | Stuartbkushner/CCLRC-Code-Test | 02f688d7f0c67bb00c7d8bcab60a1f31b883d7ab | [
"MIT"
] | null | null | null | app.py | Stuartbkushner/CCLRC-Code-Test | 02f688d7f0c67bb00c7d8bcab60a1f31b883d7ab | [
"MIT"
] | null | null | null | app.py | Stuartbkushner/CCLRC-Code-Test | 02f688d7f0c67bb00c7d8bcab60a1f31b883d7ab | [
"MIT"
] | null | null | null | import json
import xmltodict
from urllib.request import urlopen
from flask import Flask, render_template
from flask_bootstrap import Bootstrap
app = Flask(__name__)
bootstrap = Bootstrap(app)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/house1')
def house1():
with urlopen("http... | 40.135135 | 98 | 0.713805 |
18ce4d0c17f3f790b3a89afb45bb60a7be8b97a6 | 1,003 | py | Python | src/profiles/migrations/0004_auto_20171029_2312.py | RogerRueegg/lvw-young-talents | baf8490230230fffb232a13eb641b55ede29a710 | [
"MIT"
] | 1 | 2018-02-13T08:09:02.000Z | 2018-02-13T08:09:02.000Z | src/profiles/migrations/0004_auto_20171029_2312.py | RogerRueegg/lvw-young-talents | baf8490230230fffb232a13eb641b55ede29a710 | [
"MIT"
] | null | null | null | src/profiles/migrations/0004_auto_20171029_2312.py | RogerRueegg/lvw-young-talents | baf8490230230fffb232a13eb641b55ede29a710 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-29 22:12
from __future__ import unicode_literals
from django.db import migrations, models
import phonenumber_field.modelfields
class Migration(migrations.Migration):
dependencies = [
('profiles', '0003_auto_20171029_1442'),
]
opera... | 31.34375 | 156 | 0.633101 |
4e8657052d5159a8476c7eae3173c3db149bd516 | 51,326 | py | Python | timm/models/resnet.py | michalwols/pytorch-image-models | 8c77f14cae7d974abb35a5c9f206274da49970ed | [
"Apache-2.0"
] | 28 | 2020-10-15T08:40:15.000Z | 2022-03-17T07:52:37.000Z | timm/models/resnet.py | n01z3/pytorch-image-models | dab9935b363ddcaa99bac43cf7f3f91aee79aa33 | [
"Apache-2.0"
] | 1 | 2020-10-21T15:06:20.000Z | 2020-10-23T08:34:51.000Z | timm/models/resnet.py | n01z3/pytorch-image-models | dab9935b363ddcaa99bac43cf7f3f91aee79aa33 | [
"Apache-2.0"
] | 7 | 2020-11-16T12:11:24.000Z | 2021-12-26T14:42:26.000Z | """PyTorch ResNet
This started as a copy of https://github.com/pytorch/vision 'resnet.py' (BSD-3-Clause) with
additional dropout and dynamic global avg/max pool.
ResNeXt, SE-ResNeXt, SENet, and MXNet Gluon stem/downsample variants, tiered stems added by Ross Wightman
"""
import math
import torch.nn as nn
import torc... | 43.981148 | 135 | 0.694736 |
f86d6eb07b68e64cd2c194e7e331d75e1f251977 | 2,610 | py | Python | stock/stockApi/models/base_db.py | minplemon/stockApi | a9fd5310796b5efa15aaf66357eb778c97ab553a | [
"MIT"
] | null | null | null | stock/stockApi/models/base_db.py | minplemon/stockApi | a9fd5310796b5efa15aaf66357eb778c97ab553a | [
"MIT"
] | 2 | 2019-06-28T10:03:10.000Z | 2019-06-28T10:03:12.000Z | stock/stockApi/models/base_db.py | minplemon/stockApi | a9fd5310796b5efa15aaf66357eb778c97ab553a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019-05-18 10:40
# @Author : minp
# @contact : king101125s@gmail.com
# @Site :
# @File : base_stock.py
# @Software: PyCharm
from flask import Flask, Response
import tushare as ts
from stockApi.common.util import data_to_json
import os
import pandas as p... | 25.588235 | 83 | 0.577778 |
158bdef5ee117492b5ac1c6dcb3ef19bfc28f4e6 | 4,362 | py | Python | resources/models/commons/mysql_manager.py | Jonasdart/SESP-API | 7a86caac09327917b7ee93df14b66a449c988bfa | [
"MIT"
] | null | null | null | resources/models/commons/mysql_manager.py | Jonasdart/SESP-API | 7a86caac09327917b7ee93df14b66a449c988bfa | [
"MIT"
] | 1 | 2020-05-21T18:25:07.000Z | 2020-05-21T18:25:07.000Z | resources/models/commons/mysql_manager.py | duzzsys/SESP-API | 7a86caac09327917b7ee93df14b66a449c988bfa | [
"MIT"
] | 1 | 2020-11-22T19:19:45.000Z | 2020-11-22T19:19:45.000Z | #encoding utf-8
#__author__ = Jonas Duarte, duarte.jsystem@gmail.com
#Python3
__author__ = 'Jonas Duarte'
class Gera_query(object):
def __init__(self):
self.query = ""
def nova_tabela(self, banco_de_dados, nova_tabela):
self.query = f"CREATE TABLE `{banco_de_dados}`"
self.query += f... | 29.876712 | 136 | 0.525447 |
619d0cc5f3ea036931c34a0fe23d98a5fef9cfdb | 23,381 | py | Python | tests/test_compressed_graph.py | MGibsonint/nncf_pytorch | 1c1ee370460d2e4531c2bf353c7b89ccc659fa38 | [
"Apache-2.0"
] | null | null | null | tests/test_compressed_graph.py | MGibsonint/nncf_pytorch | 1c1ee370460d2e4531c2bf353c7b89ccc659fa38 | [
"Apache-2.0"
] | null | null | null | tests/test_compressed_graph.py | MGibsonint/nncf_pytorch | 1c1ee370460d2e4531c2bf353c7b89ccc659fa38 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2019-2020 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 w... | 46.390873 | 116 | 0.70506 |
bc18534654ce54511da9cfa1053a0ed0aa9d4b1d | 866 | py | Python | tests/gamemania/test.py | Defeat3d/inventory-hunter | d48dbe5ec9c5e0d164b18ece1b39cb1c9f77afc3 | [
"MIT"
] | null | null | null | tests/gamemania/test.py | Defeat3d/inventory-hunter | d48dbe5ec9c5e0d164b18ece1b39cb1c9f77afc3 | [
"MIT"
] | null | null | null | tests/gamemania/test.py | Defeat3d/inventory-hunter | d48dbe5ec9c5e0d164b18ece1b39cb1c9f77afc3 | [
"MIT"
] | null | null | null | import logging
import pathlib
import unittest
from driver import HttpGetResponse
from scraper.gamemania import GameManiaScrapeResult as ScrapeResult
def load_result(filename):
this_dir = pathlib.Path(__file__).parent.absolute()
with open(this_dir / filename, 'r', encoding='utf-8') as f:
response = Ht... | 26.242424 | 67 | 0.715935 |
8e1e798b66136dc0f5adc4b5aff2f69a19853305 | 1,184 | py | Python | setup.py | ajheaps/cf-plot | 365de4b43db27a4e88481af89d5e9a4671cafcd9 | [
"MIT"
] | 5 | 2019-11-18T22:44:37.000Z | 2021-09-27T06:16:24.000Z | setup.py | ajheaps/cf-plot | 365de4b43db27a4e88481af89d5e9a4671cafcd9 | [
"MIT"
] | 4 | 2017-07-05T16:42:53.000Z | 2020-02-12T17:08:39.000Z | setup.py | ajheaps/cf-plot | 365de4b43db27a4e88481af89d5e9a4671cafcd9 | [
"MIT"
] | 5 | 2017-07-05T16:37:54.000Z | 2021-07-07T15:30:45.000Z | from setuptools import setup
import os
import fnmatch
import sys
import importlib
import subprocess
def find_package_data_files(directory):
for root, dirs, files in os.walk(directory):
for basename in files:
if fnmatch.fnmatch(basename, '*'):
filename = os.path.join(root, basen... | 27.534884 | 72 | 0.592061 |
a707446284acd1bef5f8387a137fe894d62f8425 | 2,597 | py | Python | nicos_mlz/refsans/guisupport/elements/detector.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_mlz/refsans/guisupport/elements/detector.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_mlz/refsans/guisupport/elements/detector.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 36.069444 | 79 | 0.633038 |
0af498c37c4c9c23959734247e895c847bdf3c82 | 5,473 | py | Python | pyspider/webui/debug.py | hxs91/pyspider | 01a9122e586774b5e89e850b0987387eb74166aa | [
"Apache-2.0"
] | 1 | 2020-09-24T07:16:22.000Z | 2020-09-24T07:16:22.000Z | pyspider/webui/debug.py | hxs91/pyspider | 01a9122e586774b5e89e850b0987387eb74166aa | [
"Apache-2.0"
] | null | null | null | pyspider/webui/debug.py | hxs91/pyspider | 01a9122e586774b5e89e850b0987387eb74166aa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-02-23 00:19:06
import re
import sys
import time
import inspect
import datetime
import traceback
from app import app
from flask import abort, render_t... | 32.005848 | 106 | 0.582496 |
8e2ae803021020350bb09f7d54399a26e4cd9148 | 4,400 | py | Python | irm/cges_utils.py | ashok-arjun/DomainBed | 8c21f36c0b447221c9ad9792d4d867fb5aa26198 | [
"MIT"
] | null | null | null | irm/cges_utils.py | ashok-arjun/DomainBed | 8c21f36c0b447221c9ad9792d4d867fb5aa26198 | [
"MIT"
] | null | null | null | irm/cges_utils.py | ashok-arjun/DomainBed | 8c21f36c0b447221c9ad9792d4d867fb5aa26198 | [
"MIT"
] | null | null | null | import os
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
import torch
import random
import numpy as np
import torch
import os
from collections import OrderedDict
... | 66.666667 | 150 | 0.277045 |
80d3a2835ed97cf2e07abf59935d6df82c2addb6 | 25,738 | py | Python | neural_sp/models/seq2seq/encoders/rnn.py | lfgogogo/neural_sp | 19101a74747ebead23b1cad3f229fdf41608d33d | [
"Apache-2.0"
] | null | null | null | neural_sp/models/seq2seq/encoders/rnn.py | lfgogogo/neural_sp | 19101a74747ebead23b1cad3f229fdf41608d33d | [
"Apache-2.0"
] | null | null | null | neural_sp/models/seq2seq/encoders/rnn.py | lfgogogo/neural_sp | 19101a74747ebead23b1cad3f229fdf41608d33d | [
"Apache-2.0"
] | 1 | 2021-02-28T05:59:29.000Z | 2021-02-28T05:59:29.000Z | # Copyright 2018 Kyoto University (Hirofumi Inaguma)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""(Hierarchical) RNN encoder."""
from distutils.util import strtobool
import logging
import math
import numpy as np
import random
import torch
import torch.nn as nn
from torch.nn.utils.rnn import pack_pa... | 44.684028 | 112 | 0.562359 |
a32672d1318451663b513497569b06ac0eb8b40a | 2,822 | py | Python | src/sima/report/modeldescription.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/report/modeldescription.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/report/modeldescription.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | # This an autogenerated file
#
# Generated with ModelDescription
from __future__ import annotations
from typing import Dict,Sequence,List
from dmt.entity import Entity
from dmt.blueprint import Blueprint
from .blueprints.modeldescription import ModelDescriptionBlueprint
from typing import Dict
from sima.report.reporti... | 25.196429 | 79 | 0.606308 |
6c4cd732510e98038adb8f94dbfd2eb2038bcb2c | 981 | py | Python | alipay/aop/api/response/AlipayCommerceTransportTaxiDriverinfoModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayCommerceTransportTaxiDriverinfoModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayCommerceTransportTaxiDriverinfoModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayCommerceTransportTaxiDriverinfoModifyResponse(AlipayResponse):
def __init__(self):
super(AlipayCommerceTransportTaxiDriverinfoModifyResponse, self).__init__()
s... | 27.25 | 124 | 0.682977 |
6899fc13f388844e17ea7cebed69594bc550ab50 | 399 | py | Python | src/jose/jwa/tests/__init__.py | hdknr/jose | d872407e9f3b3a0262e6bb1cdb599b5c4c1d9ee4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/jose/jwa/tests/__init__.py | hdknr/jose | d872407e9f3b3a0262e6bb1cdb599b5c4c1d9ee4 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2015-01-23T09:37:17.000Z | 2015-01-23T09:37:17.000Z | src/jose/jwa/tests/__init__.py | hdknr/jose | d872407e9f3b3a0262e6bb1cdb599b5c4c1d9ee4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- coding: utf-8 -*-
if __name__ == '__main__':
import unittest
import importlib
for name in ['jwa', 'rsa', 'ec', 'aes', 'gcm', 'hmac', 'pbes2', ]:
mod = importlib.import_module("test_{:s}".format(name))
for attr in dir(mod):
if not attr.startswith('Test'):
... | 24.9375 | 70 | 0.533835 |
7b8fd881ffe4e3c5a54f59ed26e11f1e14b4a88f | 16,983 | py | Python | cwltool/singularity.py | hknust/cwltool | 2978c8bff88be2ad357554c9291cc992d3e74a47 | [
"Apache-2.0"
] | null | null | null | cwltool/singularity.py | hknust/cwltool | 2978c8bff88be2ad357554c9291cc992d3e74a47 | [
"Apache-2.0"
] | null | null | null | cwltool/singularity.py | hknust/cwltool | 2978c8bff88be2ad357554c9291cc992d3e74a47 | [
"Apache-2.0"
] | null | null | null | """Support for executing Docker containers using the Singularity 2.x engine."""
import os
import os.path
import re
import shutil
import sys
import tempfile
from distutils import spawn
from io import open # pylint: disable=redefined-builtin
from subprocess import ( # nosec
DEVNULL,
PIPE,
Popen,
Timeou... | 39.041379 | 92 | 0.544015 |
626a7fc77a723516690b1ddd1b3580ba28186ae5 | 2,142 | py | Python | ui/widgets/SliderWidget.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 25 | 2015-11-08T16:36:54.000Z | 2022-01-20T16:03:28.000Z | ui/widgets/SliderWidget.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 2 | 2016-12-01T23:13:08.000Z | 2017-07-25T02:40:49.000Z | ui/widgets/SliderWidget.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 10 | 2016-07-05T14:39:16.000Z | 2022-01-01T02:05:55.000Z | """
SliderWidget
:Authors:
Berend Klein Haneveld
"""
from PySide.QtGui import QWidget
from PySide.QtGui import QLabel
from PySide.QtGui import QSlider
from PySide.QtGui import QSpinBox
# from PySide.QtGui import QHBoxLayout
from PySide.QtGui import QGridLayout
from PySide.QtCore import Signal
from PySide.QtCore impor... | 21.636364 | 54 | 0.739963 |
816cc1b7bc379fd2ac35a5158c76ef1c62d9e443 | 1,349 | py | Python | modules/runtime/runtime.py | ChenyangTang1/bark | c4215be6464c249639b8c7b390684bd13100b41e | [
"MIT"
] | null | null | null | modules/runtime/runtime.py | ChenyangTang1/bark | c4215be6464c249639b8c7b390684bd13100b41e | [
"MIT"
] | null | null | null | modules/runtime/runtime.py | ChenyangTang1/bark | c4215be6464c249639b8c7b390684bd13100b41e | [
"MIT"
] | null | null | null | # Copyright (c) 2019 fortiss GmbH
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
from bark.world.opendrive import *
from bark.world import *
from bark.geometry import *
from bark.runtime import PyRuntime
class Runtime(PyRuntime):
def __init__(self,
step_ti... | 25.942308 | 52 | 0.681245 |
b93052fa58c85baad0b301032db57be769a126d4 | 639 | py | Python | tests/homework/b_in_proc_out/tests_in_proc_out.py | WillCapo/acc-cosc-1336-spring-2022-WillCapo | a21a9b6b280b59bda5049d66ee70c20ab8a87d12 | [
"MIT"
] | null | null | null | tests/homework/b_in_proc_out/tests_in_proc_out.py | WillCapo/acc-cosc-1336-spring-2022-WillCapo | a21a9b6b280b59bda5049d66ee70c20ab8a87d12 | [
"MIT"
] | null | null | null | tests/homework/b_in_proc_out/tests_in_proc_out.py | WillCapo/acc-cosc-1336-spring-2022-WillCapo | a21a9b6b280b59bda5049d66ee70c20ab8a87d12 | [
"MIT"
] | 1 | 2022-02-09T02:28:56.000Z | 2022-02-09T02:28:56.000Z | import unittest
'''
The file at /src/homework/b_in_proc_out/output has
the function get_number.
'''
from src.homework.b_in_proc_out.output import get_number, multiply_numbers
from src.homework.b_in_proc_out.output import multiply_numbers
class Test_Config(unittest.TestCase):
def test_get_number_1(self):
... | 30.428571 | 74 | 0.738654 |
3220ceb8b5769f59b5184ab8b90f028f70e10ec8 | 1,055 | py | Python | Python/cp/anagram_checker.py | zhcet19/NeoAlgo-1 | c534a23307109280bda0e4867d6e8e490002a4ee | [
"MIT"
] | 897 | 2020-06-25T00:12:52.000Z | 2022-03-24T00:49:31.000Z | Python/cp/anagram_checker.py | zhcet19/NeoAlgo-1 | c534a23307109280bda0e4867d6e8e490002a4ee | [
"MIT"
] | 5,707 | 2020-06-24T17:53:28.000Z | 2022-01-22T05:03:15.000Z | Python/cp/anagram_checker.py | zhcet19/NeoAlgo-1 | c534a23307109280bda0e4867d6e8e490002a4ee | [
"MIT"
] | 1,817 | 2020-06-25T03:51:05.000Z | 2022-03-29T05:14:07.000Z | """
This script takes two input strings and compare them to check if they are anagrams or not.
"""
def check_anagrams(first_string, second_string):
#If the length of both these words dont match then they cant be anagrams
if len(first_string) == len(second_string):
#Sort both the strings a... | 25.731707 | 90 | 0.651185 |
b9d1bc12f8fb4724fa37d579515f0f4225783c83 | 1,839 | py | Python | 2015/D13/D13.py | buchasia/advent-of-code | f568c6330c8934325913705b39ef8c25a1023057 | [
"MIT"
] | null | null | null | 2015/D13/D13.py | buchasia/advent-of-code | f568c6330c8934325913705b39ef8c25a1023057 | [
"MIT"
] | null | null | null | 2015/D13/D13.py | buchasia/advent-of-code | f568c6330c8934325913705b39ef8c25a1023057 | [
"MIT"
] | null | null | null | import timeit
import re
# This function reads the input file and prepares the data in the needed format
def getInput(inputPath):
fileP = open(inputPath, 'r')
regEx = re.compile('(\w*) would (\w*) (\d*) [ \w]+ (\w*)')
return {(line[0], line[3]): int(line[2]) if line[1] == 'gain' else -1 * int(line[2])
... | 39.12766 | 204 | 0.655247 |
14358a74cc215a84cc0b25a8cbd373f82d631ab5 | 68 | py | Python | src/face_recognition/youtube_dl/version.py | alxgrh/CATANA | 417ffce26db0c2ee9d399399b16c276d5336174d | [
"MIT"
] | 12 | 2017-11-01T12:35:47.000Z | 2020-02-26T19:41:30.000Z | src/face_recognition/youtube_dl/version.py | christiannkoch/CATANA | 417ffce26db0c2ee9d399399b16c276d5336174d | [
"MIT"
] | 8 | 2017-12-05T23:45:54.000Z | 2022-02-09T23:28:51.000Z | src/face_recognition/youtube_dl/version.py | lodemo/CATANA | a349f460772511ccbb16429b40bfb50f774d45d4 | [
"MIT"
] | 6 | 2017-09-09T12:22:53.000Z | 2019-12-17T07:54:18.000Z | from __future__ import unicode_literals
__version__ = '2017.07.09'
| 17 | 39 | 0.808824 |
0a3a7483fcc91b721d2c9a4d5c06fb6ff5f63ff9 | 13,933 | py | Python | doc/make.py | YuechengWu/pandas | 7f753892eb6b29aaa62176cb9f00ad84c092c09a | [
"BSD-3-Clause"
] | 1 | 2018-12-07T18:33:30.000Z | 2018-12-07T18:33:30.000Z | doc/make.py | YuechengWu/pandas | 7f753892eb6b29aaa62176cb9f00ad84c092c09a | [
"BSD-3-Clause"
] | 1 | 2016-08-15T12:35:16.000Z | 2016-08-15T12:35:16.000Z | doc/make.py | YuechengWu/pandas | 7f753892eb6b29aaa62176cb9f00ad84c092c09a | [
"BSD-3-Clause"
] | 2 | 2017-05-27T03:25:12.000Z | 2021-09-21T21:51:12.000Z | #!/usr/bin/env python
"""
Python script for building documentation.
To build the docs you must have all optional dependencies for pandas
installed. See the installation instructions for a list of these.
Usage
-----
$ python make.py clean
$ python make.py html
$ python make.py latex
"""
import importlib
im... | 36.473822 | 79 | 0.552501 |
c9391f293c214539a66fa35f782df0793eb21b62 | 8,387 | py | Python | test/functional/feature_proxy.py | minblock/turbocoin | 0cb6be54bce944cd4067aeee3c6eab64f092eaf9 | [
"MIT"
] | null | null | null | test/functional/feature_proxy.py | minblock/turbocoin | 0cb6be54bce944cd4067aeee3c6eab64f092eaf9 | [
"MIT"
] | null | null | null | test/functional/feature_proxy.py | minblock/turbocoin | 0cb6be54bce944cd4067aeee3c6eab64f092eaf9 | [
"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.
"""Test turbocoinsd with different proxy configuration.
Test plan:
- Start turbocoinsd's with different p... | 41.519802 | 121 | 0.626565 |
d96888726b4aca4caa9ce2040ad010b9e8ca6d7d | 3,080 | py | Python | app/app/settings.py | vonghoangvinh1989/recipe-app-api | 7095eb6174702e70b1e13785857d2ce5dc4890c3 | [
"MIT"
] | null | null | null | app/app/settings.py | vonghoangvinh1989/recipe-app-api | 7095eb6174702e70b1e13785857d2ce5dc4890c3 | [
"MIT"
] | null | null | null | app/app/settings.py | vonghoangvinh1989/recipe-app-api | 7095eb6174702e70b1e13785857d2ce5dc4890c3 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.1.10.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Bu... | 25.454545 | 91 | 0.693831 |
5cb77ddcf639b34e71bb014a96e840e5398c6d26 | 184 | py | Python | profiles_api/admin.py | APPIAHTECH/profiles-rest-api | 32ac950ea06071cbb2a9f0ec67bdb4cdcced5074 | [
"MIT"
] | null | null | null | profiles_api/admin.py | APPIAHTECH/profiles-rest-api | 32ac950ea06071cbb2a9f0ec67bdb4cdcced5074 | [
"MIT"
] | null | null | null | profiles_api/admin.py | APPIAHTECH/profiles-rest-api | 32ac950ea06071cbb2a9f0ec67bdb4cdcced5074 | [
"MIT"
] | null | null | null | from django.contrib import admin
from profiles_api import models
# Register your models here.
admin.site.register( models.UserProfile )
admin.site.register( models.ProfileFeedItem ) | 23 | 45 | 0.815217 |
565de69b7a6dd9c8b59907c94c8806fc0823f42b | 126 | py | Python | bizweb/home/views.py | alexhla/technaponics-company-website | 1b6cafb927f07d7dcda5b7a985a508819cba3a18 | [
"MIT"
] | 2 | 2019-07-04T06:27:26.000Z | 2019-08-03T18:19:10.000Z | bizweb/home/views.py | alexhla/technaponics-company-website | 1b6cafb927f07d7dcda5b7a985a508819cba3a18 | [
"MIT"
] | null | null | null | bizweb/home/views.py | alexhla/technaponics-company-website | 1b6cafb927f07d7dcda5b7a985a508819cba3a18 | [
"MIT"
] | 1 | 2019-12-28T10:20:53.000Z | 2019-12-28T10:20:53.000Z | from django.shortcuts import render
# Create your views here.
def index(request):
return render(request, 'home/home.html')
| 18 | 41 | 0.761905 |
23e5ef0322ecb3091c2dcb4837e3ab93f01c0454 | 944 | py | Python | yodatools/converter/Abstract/iInputs.py | ODM2/YODAParser | 274a1fc5ed1810bc748a4ab108855254f8b9fc46 | [
"BSD-3-Clause"
] | null | null | null | yodatools/converter/Abstract/iInputs.py | ODM2/YODAParser | 274a1fc5ed1810bc748a4ab108855254f8b9fc46 | [
"BSD-3-Clause"
] | 21 | 2016-02-06T00:43:44.000Z | 2018-02-02T20:22:05.000Z | yodatools/converter/Abstract/iInputs.py | ODM2/ODM2YODAParser | 274a1fc5ed1810bc748a4ab108855254f8b9fc46 | [
"BSD-3-Clause"
] | 1 | 2017-07-06T18:42:22.000Z | 2017-07-06T18:42:22.000Z | from odm2api.ODMconnection import dbconnection
from odm2api.models import Base, setSchema
class iInputs(object):
DB_VERSION = 2.0
def __init__(self, **kwargs):
if 'conn' in kwargs:
self.conn = kwargs.pop('conn')
else:
self.conn = ':memory:'
self.__init_sess... | 26.222222 | 94 | 0.67161 |
7d5078659b419909333082280f5ea588cc2cc143 | 1,754 | py | Python | revscoring/revscoring.py | kevinbazira/revscoring | 625f8b8048eb3c0c1c872ed9c15687c56f125747 | [
"MIT"
] | 1 | 2020-01-17T09:15:04.000Z | 2020-01-17T09:15:04.000Z | revscoring/revscoring.py | kevinbazira/revscoring | 625f8b8048eb3c0c1c872ed9c15687c56f125747 | [
"MIT"
] | null | null | null | revscoring/revscoring.py | kevinbazira/revscoring | 625f8b8048eb3c0c1c872ed9c15687c56f125747 | [
"MIT"
] | null | null | null | """
Provides access to a set of utilities for working with revision scorer models.
Utilities:
* score Scores a set of revisions using a trained model
* extract Extracts a cache of dependencies for a set of observations
* fetch_text Fetches text for a set of observations
* test_model ... | 30.241379 | 84 | 0.615165 |
91cb0161104ea259e0a1cc0e66860cda9183000c | 6,233 | py | Python | server/oj/settings.py | chenhongqiao/TeamsCodeOJ | eb9a53cdaa39f1bc14994b283348fc021a35dcb6 | [
"MIT"
] | null | null | null | server/oj/settings.py | chenhongqiao/TeamsCodeOJ | eb9a53cdaa39f1bc14994b283348fc021a35dcb6 | [
"MIT"
] | 2 | 2021-09-18T00:07:50.000Z | 2021-09-18T00:08:03.000Z | server/oj/settings.py | chenhongqiao/TeamsCodeOJ | eb9a53cdaa39f1bc14994b283348fc021a35dcb6 | [
"MIT"
] | null | null | null | """
Django settings for oj project.
Generated by 'django-admin startproject' using Django 1.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
import os
import ra... | 25.440816 | 94 | 0.638376 |
aa48446f2f2e12a1d3284134162576d24baa892d | 4,178 | py | Python | discriminate_agkistrodon/capetian_modifier.py | kwierman/discriminate_agkistrodon | f6eac7d3f4898ad5362ac840de95647282d24f23 | [
"MIT"
] | null | null | null | discriminate_agkistrodon/capetian_modifier.py | kwierman/discriminate_agkistrodon | f6eac7d3f4898ad5362ac840de95647282d24f23 | [
"MIT"
] | null | null | null | discriminate_agkistrodon/capetian_modifier.py | kwierman/discriminate_agkistrodon | f6eac7d3f4898ad5362ac840de95647282d24f23 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Model definitions for `discriminate_agkistrodon`
TODO: repeat for Conv3DTranspose
"""
from keras.layers import Input
from keras.layers.convolutional import (MaxPooling3D, Conv3D,
UpSampling3D)
from keras.models import Model
import logging
class ca... | 38.330275 | 74 | 0.594303 |
21d5599b5619cbb8aed94020e59145b38fa9657c | 47,746 | py | Python | test/unit3/test_math.py | AliasT/skulpt | c0e8f4a91092ef4503dc2c1726b5c0436a888f55 | [
"MIT"
] | null | null | null | test/unit3/test_math.py | AliasT/skulpt | c0e8f4a91092ef4503dc2c1726b5c0436a888f55 | [
"MIT"
] | 3 | 2021-05-11T05:23:29.000Z | 2022-02-27T00:41:46.000Z | test/unit3/test_math.py | AliasT/skulpt | c0e8f4a91092ef4503dc2c1726b5c0436a888f55 | [
"MIT"
] | 1 | 2020-01-16T16:41:59.000Z | 2020-01-16T16:41:59.000Z | # Python test set -- math module
# XXXX Should not do tests around zero only
import unittest
import math
import sys
eps = 1E-05
NAN = float('nan')
INF = float('inf')
NINF = float('-inf')
# detect evidence of double-rounding: fsum is not always correctly
# rounded on machines that suffer from double rounding.
x, y = ... | 43.884191 | 98 | 0.577305 |
7df8cfc9e31937b7f6d9394b752cb945e54dc212 | 1,750 | py | Python | day045/beautiful-soup/main.py | rainleander/100daysofcode | 0391170af80b251e7fb3a78a60b55c3145e4551a | [
"Apache-2.0"
] | 8 | 2021-01-25T09:14:41.000Z | 2021-11-24T12:29:26.000Z | day045/beautiful-soup/main.py | rainleander/100daysofcode | 0391170af80b251e7fb3a78a60b55c3145e4551a | [
"Apache-2.0"
] | null | null | null | day045/beautiful-soup/main.py | rainleander/100daysofcode | 0391170af80b251e7fb3a78a60b55c3145e4551a | [
"Apache-2.0"
] | null | null | null | from bs4 import BeautifulSoup
import requests
response = requests.get("https://news.ycombinator.com/news")
yc_web_page = response.text
soup = BeautifulSoup(yc_web_page, "html.parser")
articles = soup.find_all(name="a", class_="storylink")
article_texts = []
article_links = []
for article_tag in articles:
text =... | 25 | 107 | 0.702286 |
fd96fd175b56dfc5bb1ab329e82ad2703821fd1e | 485 | py | Python | python_demos/celery_demos/tasks.py | t4d-classes/advanced-python_01102022 | bf20d78f0ad44324998ceed8bdd377ec1805f97e | [
"MIT"
] | null | null | null | python_demos/celery_demos/tasks.py | t4d-classes/advanced-python_01102022 | bf20d78f0ad44324998ceed8bdd377ec1805f97e | [
"MIT"
] | null | null | null | python_demos/celery_demos/tasks.py | t4d-classes/advanced-python_01102022 | bf20d78f0ad44324998ceed8bdd377ec1805f97e | [
"MIT"
] | 1 | 2022-01-14T18:12:37.000Z | 2022-01-14T18:12:37.000Z | from celery import Celery
from time import sleep
app = Celery(
'tasks',
broker='pyamqp://guest@localhost//',
backend="redis://localhost:6379/0")
@app.task
def echo(msg: str):
sleep(15)
return msg
@app.task
def get_list(x: int, y: int):
sleep(15)
return [x] * y
class Person:
def __i... | 16.724138 | 40 | 0.606186 |
df7e0e5823c6dc946dcfc7f1a0508a84513a732b | 16,056 | py | Python | backend/dataset/publish/service/asrunlabeled.py | agupta54/ulca | c1f570ac254ce2ac73f40c49716458f4f7cbaee2 | [
"MIT"
] | 3 | 2022-01-12T06:51:51.000Z | 2022-02-23T18:54:33.000Z | backend/dataset/publish/service/asrunlabeled.py | agupta54/ulca | c1f570ac254ce2ac73f40c49716458f4f7cbaee2 | [
"MIT"
] | 6 | 2021-08-31T19:21:26.000Z | 2022-01-03T05:53:42.000Z | backend/dataset/publish/service/asrunlabeled.py | agupta54/ulca | c1f570ac254ce2ac73f40c49716458f4f7cbaee2 | [
"MIT"
] | 8 | 2021-08-12T08:07:49.000Z | 2022-01-25T04:40:51.000Z | import logging
import re
import time
from logging.config import dictConfig
from configs.configs import ds_batch_size, \
sample_size, offset, limit, asr_unlabeled_immutable_keys, asr_unlabeled_non_tag_keys, dataset_type_asr, \
user_mode_pseudo, \
asr_unlabeled_search_ignore_keys, asr_unlabeled_updatable_keys... | 52.12987 | 159 | 0.560476 |
20141f7550a1a21c9a178ba97ea12f30aeea1893 | 323 | py | Python | badwing/scenes/sandbox2.py | kfields/badwing | 5f53c98cbb6fca8390e1632fa559f5201861365b | [
"MIT"
] | 3 | 2020-03-23T06:43:25.000Z | 2022-02-18T16:35:56.000Z | badwing/scenes/sandbox2.py | kfields/badwing | 5f53c98cbb6fca8390e1632fa559f5201861365b | [
"MIT"
] | 2 | 2020-03-26T02:05:36.000Z | 2021-08-02T19:13:06.000Z | badwing/scenes/sandbox2.py | kfields/badwing | 5f53c98cbb6fca8390e1632fa559f5201861365b | [
"MIT"
] | null | null | null | from badwing.level import StickerLevel
class Sandbox(StickerLevel):
@classmethod
def create(self):
level = Sandbox('sandbox2')
level.setup()
return level
#next level
def get_next_level(self):
import badwing.scenes.level2
return badwing.scenes.level2.Leve... | 23.071429 | 43 | 0.647059 |
f341545275a61b58976301459e45e39b39aa5995 | 1,960 | py | Python | client/my_cmd.py | Heisenberg2017/LogColorizer | 61ac64d1e4e8b1cc4d0e3104d25ff20d7ce39262 | [
"MIT"
] | null | null | null | client/my_cmd.py | Heisenberg2017/LogColorizer | 61ac64d1e4e8b1cc4d0e3104d25ff20d7ce39262 | [
"MIT"
] | null | null | null | client/my_cmd.py | Heisenberg2017/LogColorizer | 61ac64d1e4e8b1cc4d0e3104d25ff20d7ce39262 | [
"MIT"
] | null | null | null | # coding=utf-8
import argparse
from output_handle import pipeline
import validation
from monitor import api as monitor_api
from tail import api as tail_api
parser = argparse.ArgumentParser()
TAIL_HELP = """Print the last 10 lines of each FILE to standard output.
With more than one FILE, precede... | 24.197531 | 114 | 0.658673 |
e7f0b2f60a7f2b04347495348ed95fac0802e340 | 1,049 | py | Python | src/Persistence/tests/test_mapping.py | somyasharmapuresoftware/Persistence | 8c2e9f16074d010667a6c821793a1a150a4029cd | [
"ZPL-2.1"
] | null | null | null | src/Persistence/tests/test_mapping.py | somyasharmapuresoftware/Persistence | 8c2e9f16074d010667a6c821793a1a150a4029cd | [
"ZPL-2.1"
] | 23 | 2016-07-01T15:52:17.000Z | 2022-03-10T07:56:09.000Z | src/Persistence/tests/test_mapping.py | somyasharmapuresoftware/Persistence | 8c2e9f16074d010667a6c821793a1a150a4029cd | [
"ZPL-2.1"
] | 2 | 2015-04-03T05:15:26.000Z | 2021-12-03T04:31:02.000Z | import unittest
class PersistentMappingTests(unittest.TestCase):
def _getTargetClass(self):
from Persistence import PersistentMapping
return PersistentMapping
def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)
def test___setstate__(self):
m = sel... | 29.138889 | 65 | 0.584366 |
45a413a4b8a3a048fbfcfbce368c95692a01d894 | 1,305 | py | Python | schedTest/RSS.py | tu-dortmund-ls12-rt/SSSEvaluation | 7e7c181fde24c98ef4432cf6ef2e91bd99911541 | [
"MIT"
] | 4 | 2021-06-21T12:19:22.000Z | 2021-07-06T12:58:42.000Z | schedTest/RSS.py | tu-dortmund-ls12-rt/SSSEvaluation | 7e7c181fde24c98ef4432cf6ef2e91bd99911541 | [
"MIT"
] | 5 | 2019-07-09T14:43:59.000Z | 2021-07-05T14:22:20.000Z | schedTest/RSS.py | tu-dortmund-ls12-rt/SSSEvaluation | 7e7c181fde24c98ef4432cf6ef2e91bd99911541 | [
"MIT"
] | 1 | 2019-07-06T20:46:57.000Z | 2019-07-06T20:46:57.000Z | import math # math.ceil(), math.floor()
# Sorts the given task set by the execution time + suspension length in ascending order
# Input: Task set
# Output: Sorted Task set
def sort_by_ex_and_susp(tasks): # lowest ex + susp first
return sorted(tasks, key=lambda k: k['execution']+k['sslength'])
# Redundant Self Suspen... | 39.545455 | 151 | 0.669732 |
051ab7835e1abe186242276be7745b3a24f2328d | 292 | py | Python | dogs_vs_cats/fine_tuning.py | slaily/deep-learning-bits | cb9ce7ec539efbdfcaa023d141466f919bd31b71 | [
"MIT"
] | null | null | null | dogs_vs_cats/fine_tuning.py | slaily/deep-learning-bits | cb9ce7ec539efbdfcaa023d141466f919bd31b71 | [
"MIT"
] | null | null | null | dogs_vs_cats/fine_tuning.py | slaily/deep-learning-bits | cb9ce7ec539efbdfcaa023d141466f919bd31b71 | [
"MIT"
] | null | null | null | """
Freezing all layers up to a specific one
"""
conv_base.trainable = True
set_trainable = False
for layer in conv_base.layers:
if layer.name == 'block5_conv1':
set_trainable = True
if set_trainable:
layer.trainable = True
else:
layer.trainable = False
| 19.466667 | 40 | 0.664384 |
d14c1b0b3c7aa20fef6a57c8abdbbb45db6e844e | 1,535 | py | Python | engines/pdfid/scanner.py | scsich/phagescan | 3394b6a80e62c175b1e10477f58f7b609c399085 | [
"Apache-2.0"
] | 21 | 2015-02-03T18:41:23.000Z | 2022-03-18T20:16:13.000Z | engines/pdfid/scanner.py | scsich/phagescan | 3394b6a80e62c175b1e10477f58f7b609c399085 | [
"Apache-2.0"
] | null | null | null | engines/pdfid/scanner.py | scsich/phagescan | 3394b6a80e62c175b1e10477f58f7b609c399085 | [
"Apache-2.0"
] | 6 | 2015-03-03T11:22:21.000Z | 2021-07-18T10:59:15.000Z |
from engines.generic.abstract import AbstractMDEngine, L32_PLATFORM
from subprocess import check_output
from os import write, close, path
import tempfile
class pdfid_engine(AbstractMDEngine):
def __init__(self, engine_path=path.join(path.dirname(path.abspath(__file__)), 'file', 'pdfid.py')):
super(pdfid_engine, ... | 28.425926 | 112 | 0.738762 |
ff20a1f3f86349c45213e400867cbd10573b0cd6 | 3,090 | py | Python | pyvplm/gui/save_plots.py | ArthurAmmeux/pyVPLM-GUI | e7b0866137b0f83455aa7e839527a95b668e964b | [
"BSD-2-Clause"
] | null | null | null | pyvplm/gui/save_plots.py | ArthurAmmeux/pyVPLM-GUI | e7b0866137b0f83455aa7e839527a95b668e964b | [
"BSD-2-Clause"
] | null | null | null | pyvplm/gui/save_plots.py | ArthurAmmeux/pyVPLM-GUI | e7b0866137b0f83455aa7e839527a95b668e964b | [
"BSD-2-Clause"
] | null | null | null | import os
import shutil
from datetime import datetime
def save_all_plots(workdir):
"""
Parameters
----------
workdir Current work directory
Returns Saves all plots from the temp folder to the current work directory
-------
"""
source_dir = workdir + "\\temp"
targe... | 26.869565 | 102 | 0.603883 |
dbb5f8e2cd4ccd970a93379dfbdd161d93482e79 | 11,474 | py | Python | mmseg/models/decode_heads/decode_head.py | aim-uofa/NRD_decoder | 275f0a1e74bb24cd8555fa8bcccb488d5bf1ed8c | [
"Apache-2.0"
] | 9 | 2021-10-30T07:12:12.000Z | 2021-11-01T12:54:50.000Z | mmseg/models/decode_heads/decode_head.py | aim-uofa/NRD_decoder | 275f0a1e74bb24cd8555fa8bcccb488d5bf1ed8c | [
"Apache-2.0"
] | 1 | 2022-01-28T02:45:06.000Z | 2022-01-28T02:45:06.000Z | mmseg/models/decode_heads/decode_head.py | zbwxp/NRD_decoder | 4b75721daeb620ff5b71dd7f629c319e17e0eaa5 | [
"Apache-2.0"
] | 1 | 2021-12-29T08:48:37.000Z | 2021-12-29T08:48:37.000Z | from abc import ABCMeta, abstractmethod
import torch
import torch.nn as nn
from mmcv.cnn import normal_init
from mmcv.runner import auto_fp16, force_fp32
from mmseg.core import build_pixel_sampler, add_prefix
from mmseg.ops import resize, aligned_bilinear
from ..builder import build_loss
from ..losses import accuracy... | 40.401408 | 130 | 0.581663 |
9f51f578f70276bd26bb9ec1a4c7b03d89b0e20e | 3,852 | py | Python | pcmc/pcmc-orig-synthetic.py | alherit/PCMC-Net | c9d7299e6664fda8952cd071b3b7655c98295bd3 | [
"MIT"
] | 1 | 2020-02-12T02:32:39.000Z | 2020-02-12T02:32:39.000Z | pcmc/pcmc-orig-synthetic.py | alherit/PCMC-Net | c9d7299e6664fda8952cd071b3b7655c98295bd3 | [
"MIT"
] | null | null | null | pcmc/pcmc-orig-synthetic.py | alherit/PCMC-Net | c9d7299e6664fda8952cd071b3b7655c98295bd3 | [
"MIT"
] | 1 | 2021-04-15T13:30:19.000Z | 2021-04-15T13:30:19.000Z | # (c) 2020 alherit
# This code is licensed under MIT license (see LICENSE.txt for details)
# python 2
# requires pcmc-nips\\lib from https://github.com/sragain/pcmc-nips in PYTHONPATH
import numpy as np
import pickle
import os
import pandas as pd
from pcmc_utils import infer,solve_ctmc, comp_Q
fr... | 25.342105 | 186 | 0.648494 |
1edb370b2d267de6fec02a5a06ff6c77538add6b | 392 | py | Python | search/migrations/0009_auto_20180521_2314.py | kimyou7/ParkGoGreen | a0b21210823d711af56d76226919950aa01a2b92 | [
"MIT"
] | null | null | null | search/migrations/0009_auto_20180521_2314.py | kimyou7/ParkGoGreen | a0b21210823d711af56d76226919950aa01a2b92 | [
"MIT"
] | null | null | null | search/migrations/0009_auto_20180521_2314.py | kimyou7/ParkGoGreen | a0b21210823d711af56d76226919950aa01a2b92 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.2 on 2018-05-22 06:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('search', '0008_park_static_string'),
]
operations = [
migrations.AlterField(
model_name='report',
name='description'... | 20.631579 | 52 | 0.604592 |
344eb9bbf205535025236353c43d00a892b59eaf | 7,021 | py | Python | accelbyte_py_sdk/api/iam/operations/roles/update_role.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/iam/operations/roles/update_role.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/iam/operations/roles/update_role.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | # Auto-generated at 2021-09-27T17:01:24.753667+08:00
# from: Justice Iam Service (4.1.0)
# Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
# pylint: disable=duplicate-code
# pylint: ... | 27.750988 | 141 | 0.612876 |
e180886db35588fa849cb8215fe32fe85335c4f5 | 6,241 | py | Python | docs_zh-CN/conf.py | yawara/mmpose | 228747c298c0801dea093371abeca539d41a7584 | [
"Apache-2.0"
] | null | null | null | docs_zh-CN/conf.py | yawara/mmpose | 228747c298c0801dea093371abeca539d41a7584 | [
"Apache-2.0"
] | null | null | null | docs_zh-CN/conf.py | yawara/mmpose | 228747c298c0801dea093371abeca539d41a7584 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup -----------------------... | 33.196809 | 79 | 0.544784 |
3f29daaa506ef92dce1015d520831af0cdb7ee2f | 3,399 | py | Python | tests/bugs/core_4668_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_4668_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_4668_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# id: bugs.core_4668
# title: Select from mon$table_stats doesn`t work on SC and CS
# decription:
# tracker_id: CORE-4668
# min_versions: ['3.0']
# versions: 3.0
# qmid: None
import pytest
from firebird.qa import db_factory, isql_act, Action
# version: 3.0
# resources... | 30.079646 | 118 | 0.578405 |
36e6dc70d921eecc178d93f5dd5726f866abc30b | 2,691 | py | Python | masters/master.chromium.webkit/master_win_webkit_latest_cfg.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | null | null | null | masters/master.chromium.webkit/master_win_webkit_latest_cfg.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | null | null | null | masters/master.chromium.webkit/master_win_webkit_latest_cfg.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | 1 | 2020-07-23T10:57:32.000Z | 2020-07-23T10:57:32.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.
from master import master_config
from master.factory import annotator_factory
import master_site_config
ActiveMaster = master_site_config.ChromiumWebki... | 27.742268 | 80 | 0.659606 |
f8f8b0fdb0d93d80293be9255c1ecb1b8d2cb743 | 19,820 | py | Python | src/olympia/activity/models.py | NeilRashbrook/addons-server | ba8842473b0fbda0ad97eeed690c6704462d97af | [
"BSD-3-Clause"
] | null | null | null | src/olympia/activity/models.py | NeilRashbrook/addons-server | ba8842473b0fbda0ad97eeed690c6704462d97af | [
"BSD-3-Clause"
] | null | null | null | src/olympia/activity/models.py | NeilRashbrook/addons-server | ba8842473b0fbda0ad97eeed690c6704462d97af | [
"BSD-3-Clause"
] | null | null | null | import json
import string
import uuid
from copy import copy
from datetime import datetime
from django.apps import apps
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.translation import ugettext
import jinja2
import olympia.core.logger
fr... | 35.840868 | 79 | 0.572048 |
28c5f9bc51b660a5570df4db52f0eca81a70d458 | 3,223 | py | Python | tests/oxml/test___init__.py | just4jc/python-pptx | ec433085d84d48b5539c379e52eb3c279ab2cbc0 | [
"MIT"
] | 1 | 2020-02-15T08:01:05.000Z | 2020-02-15T08:01:05.000Z | tests/oxml/test___init__.py | just4jc/python-pptx | ec433085d84d48b5539c379e52eb3c279ab2cbc0 | [
"MIT"
] | 4 | 2021-03-18T20:28:17.000Z | 2022-03-11T23:18:51.000Z | tests/oxml/test___init__.py | just4jc/python-pptx | ec433085d84d48b5539c379e52eb3c279ab2cbc0 | [
"MIT"
] | 3 | 2019-05-14T13:40:08.000Z | 2021-04-12T08:00:34.000Z | # encoding: utf-8
"""
Test suite for pptx.oxml.__init__.py module, primarily XML parser-related.
"""
from __future__ import print_function, unicode_literals
import pytest
from lxml import etree
from pptx.oxml import (
oxml_parser, parse_xml, register_element_cls
)
from pptx.oxml.ns import qn
from pptx.oxml.xml... | 28.026087 | 77 | 0.665529 |
083efa8c909d29bc1f351362adb60375fd39c708 | 300 | py | Python | testproj/testproj/core/models/__init__.py | pivotal-energy-solutions/django-input-collection | cc2ce3e0a7104ba9c524eaba5706da94ddb04a5f | [
"Apache-2.0"
] | null | null | null | testproj/testproj/core/models/__init__.py | pivotal-energy-solutions/django-input-collection | cc2ce3e0a7104ba9c524eaba5706da94ddb04a5f | [
"Apache-2.0"
] | 4 | 2019-08-25T15:47:24.000Z | 2022-03-24T19:35:09.000Z | testproj/testproj/core/models/__init__.py | pivotal-energy-solutions/django-input-collection | cc2ce3e0a7104ba9c524eaba5706da94ddb04a5f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf import settings
from .base import *
if settings.INPUT_COLLECTEDINPUT_MODEL == "core.CollectedInput_MySQL_JSON":
from .mysql_json import *
elif settings.INPUT_COLLECTEDINPUT_MODEL == "core.CollectedInput_Postgres_JSON":
from .mysql_postgres import *
| 30 | 80 | 0.77 |
eb5cde1edf5baed70af0a5044486034a23b1900e | 9,552 | py | Python | tests/test_management_command.py | pauloxnet/django-extensions | c666e7e5a383a2a1475d20182f96957a6b031cf0 | [
"MIT"
] | null | null | null | tests/test_management_command.py | pauloxnet/django-extensions | c666e7e5a383a2a1475d20182f96957a6b031cf0 | [
"MIT"
] | null | null | null | tests/test_management_command.py | pauloxnet/django-extensions | c666e7e5a383a2a1475d20182f96957a6b031cf0 | [
"MIT"
] | 2 | 2019-05-15T12:04:21.000Z | 2019-05-21T09:38:07.000Z | # -*- coding: utf-8 -*-
import os
import sys
import shutil
import logging
import importlib
import django
from django.core.management import call_command, find_commands, load_command_class
from django.test import TestCase
from django.utils.six import StringIO, PY3
from django_extensions.management.modelviz import use_... | 32.053691 | 84 | 0.602701 |
ac0eddeb5cb6fe74a23d4dc626d2fe21598d300d | 14,249 | py | Python | neural_network/convolution_neural_network.py | mlopezarango/Python | a4c65ee210bd65cb7904980448515407ea399333 | [
"MIT"
] | 7 | 2020-03-29T08:20:07.000Z | 2022-03-19T06:41:19.000Z | neural_network/convolution_neural_network.py | Mathewsmusukuma/Python | 4866b1330bc7c77c0ed0e050e6b99efdeb026448 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | neural_network/convolution_neural_network.py | Mathewsmusukuma/Python | 4866b1330bc7c77c0ed0e050e6b99efdeb026448 | [
"MIT"
] | 6 | 2020-05-31T20:40:50.000Z | 2021-12-23T04:52:15.000Z | """
- - - - - -- - - - - - - - - - - - - - - - - - - - - - -
Name - - CNN - Convolution Neural Network For Photo Recognizing
Goal - - Recognize Handing Writing Word Photo
Detail:Total 5 layers neural network
* Convolution layer
* Pooling layer
* Input layer layer of ... | 40.138028 | 87 | 0.533301 |
da6f8072e716ea2a080677ffb60ddc3ee9d6d6f0 | 3,173 | py | Python | Python/algorithm.py | PiotrGrzybowski/SwarmIntelligence | 171fd1b2db59a79af12f7820b9e415370e4430a5 | [
"MIT"
] | null | null | null | Python/algorithm.py | PiotrGrzybowski/SwarmIntelligence | 171fd1b2db59a79af12f7820b9e415370e4430a5 | [
"MIT"
] | null | null | null | Python/algorithm.py | PiotrGrzybowski/SwarmIntelligence | 171fd1b2db59a79af12f7820b9e415370e4430a5 | [
"MIT"
] | null | null | null | import numpy as np
import copy
from visualization_utils import RoomDrawer
class Algorithm:
def find_best_solution(self, benchmark):
pass
class PartialSwarmOptimization:
def __init__(self, benchmark, low, high):
self.benchmark = benchmark
self.global_solution = None
self.part... | 37.329412 | 159 | 0.658367 |
1e40043f6cdb0be2563e1b9baa2a3a3ae24febf2 | 5,715 | py | Python | Kyubyong_tacotron/networks.py | weixsong/Codeblock | 413e7acd6addc4950bffe2d57eb0cc7973c6fb7a | [
"MIT"
] | null | null | null | Kyubyong_tacotron/networks.py | weixsong/Codeblock | 413e7acd6addc4950bffe2d57eb0cc7973c6fb7a | [
"MIT"
] | null | null | null | Kyubyong_tacotron/networks.py | weixsong/Codeblock | 413e7acd6addc4950bffe2d57eb0cc7973c6fb7a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#/usr/bin/python2
'''
By kyubyong park. kbpark.linguist@gmail.com.
https://www.github.com/kyubyong/tacotron
'''
from __future__ import print_function
from hyperparams import Hyperparams as hp
from modules import *
from prepro import load_vocab
import tensorflow as tf
def encode(inputs, is_t... | 36.634615 | 86 | 0.581102 |
98f0e860460f986e90f3061739dd9b14d27d66c1 | 896 | py | Python | src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_validators.py | saurabsa/azure-cli-old | f77477a98c9aa9cb55daf5b0d2f410d1455a9225 | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_validators.py | saurabsa/azure-cli-old | f77477a98c9aa9cb55daf5b0d2f410d1455a9225 | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_validators.py | saurabsa/azure-cli-old | f77477a98c9aa9cb55daf5b0d2f410d1455a9225 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 40.727273 | 94 | 0.607143 |
db32add303ac27bea638375f8092a50b14fc7285 | 10,216 | py | Python | src/python/grpcio_tests/tests_aio/unit/metadata_test.py | agudpp/grpc | aca4421113c63a86eeefa40b90fd2bced4623b40 | [
"Apache-2.0"
] | 1 | 2020-11-10T21:25:34.000Z | 2020-11-10T21:25:34.000Z | src/python/grpcio_tests/tests_aio/unit/metadata_test.py | agudpp/grpc | aca4421113c63a86eeefa40b90fd2bced4623b40 | [
"Apache-2.0"
] | null | null | null | src/python/grpcio_tests/tests_aio/unit/metadata_test.py | agudpp/grpc | aca4421113c63a86eeefa40b90fd2bced4623b40 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 37.149091 | 80 | 0.675509 |
59f8f216829339da0046c6a6d0d966dc3f2f84d0 | 11,097 | py | Python | gae_proxy/local/proxy.py | billvsme/XX-Net | 5199a9bea4af2d208736e23f756c505411c1706e | [
"BSD-2-Clause"
] | 1 | 2019-08-19T11:58:37.000Z | 2019-08-19T11:58:37.000Z | gae_proxy/local/proxy.py | billvsme/XX-Net | 5199a9bea4af2d208736e23f756c505411c1706e | [
"BSD-2-Clause"
] | null | null | null | gae_proxy/local/proxy.py | billvsme/XX-Net | 5199a9bea4af2d208736e23f756c505411c1706e | [
"BSD-2-Clause"
] | 1 | 2019-08-19T11:58:39.000Z | 2019-08-19T11:58:39.000Z | #!/usr/bin/env python2
# coding:utf-8
# Based on GAppProxy 2.0.0 by Du XiaoGang <dugang.2008@gmail.com>
# Based on WallProxy 0.4.0 by Hust Moon <www.ehust@gmail.com>
# Contributor:
# Phus Lu <phus.lu@gmail.com>
# Hewig Xu <hewigovens@gmail.com>
# Ayanamist Yang <ayanamist@gmail.com>... | 39.351064 | 159 | 0.627737 |
272d6de176697777fa6daf75ebe6725dae04e048 | 2,984 | py | Python | rls/algorithms/base/sarl_on_policy.py | StepNeverStop/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 371 | 2019-04-26T00:37:33.000Z | 2022-03-31T07:33:12.000Z | rls/algorithms/base/sarl_on_policy.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 47 | 2019-07-21T11:51:57.000Z | 2021-08-31T08:45:22.000Z | rls/algorithms/base/sarl_on_policy.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 102 | 2019-06-29T13:11:15.000Z | 2022-03-28T13:51:04.000Z | #!/usr/bin/env python3
# encoding: utf-8
import numpy as np
from rls.algorithms.base.sarl_policy import SarlPolicy
from rls.common.data import Data
from rls.common.decorator import iton
from rls.utils.converter import to_tensor, to_numpy
from rls.utils.np_utils import int2one_hot
class SarlOnPolicy(Sarl... | 34.697674 | 111 | 0.575402 |
d9d4ef096c5000c19c28daa0a4bfeaadbf71a116 | 6,782 | py | Python | atom/client.py | RusticiSoftware/SCORMCloud_GoogAppEngApp | 6501fe0da7e4d0c3001750c33c532a7d2c40cecd | [
"Unlicense"
] | 2 | 2015-05-15T20:28:45.000Z | 2017-07-23T20:35:59.000Z | atom/client.py | RusticiSoftware/SCORMCloud_GoogAppEngApp | 6501fe0da7e4d0c3001750c33c532a7d2c40cecd | [
"Unlicense"
] | null | null | null | atom/client.py | RusticiSoftware/SCORMCloud_GoogAppEngApp | 6501fe0da7e4d0c3001750c33c532a7d2c40cecd | [
"Unlicense"
] | 2 | 2021-05-03T01:30:32.000Z | 2022-03-23T19:53:08.000Z | #!/usr/bin/env python
#
# Copyright (C) 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 37.060109 | 79 | 0.683574 |
4afd15fd1f5c43ac0d32420e0254057f9678f7a6 | 1,366 | py | Python | musics/migrations/0001_initial.py | anordy/music-mood | 0f1177152b8c41108799fae44e86c75d51ad5799 | [
"MIT"
] | 2 | 2020-10-30T15:54:18.000Z | 2021-01-27T10:14:55.000Z | musics/migrations/0001_initial.py | anordy/music-mood | 0f1177152b8c41108799fae44e86c75d51ad5799 | [
"MIT"
] | 3 | 2021-06-08T21:46:37.000Z | 2022-01-13T02:51:44.000Z | musics/migrations/0001_initial.py | anordy/music-mood | 0f1177152b8c41108799fae44e86c75d51ad5799 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-05-29 09:23
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Album',
fields=[
('id', models.AutoField(au... | 35.947368 | 114 | 0.550512 |
d1afc5dc9bb286e663f0f2a3ecb854171191a461 | 3,541 | py | Python | material/widgets.py | prafullkotecha/django-material | a81641634893db132d17a4b355b66c3e12bceeff | [
"BSD-3-Clause"
] | 11 | 2018-06-13T10:10:11.000Z | 2021-06-05T08:23:43.000Z | material/widgets.py | prafullkotecha/django-material | a81641634893db132d17a4b355b66c3e12bceeff | [
"BSD-3-Clause"
] | 5 | 2021-03-19T23:41:21.000Z | 2022-03-12T00:37:18.000Z | material/widgets.py | prafullkotecha/django-material | a81641634893db132d17a4b355b66c3e12bceeff | [
"BSD-3-Clause"
] | 5 | 2018-08-17T16:09:33.000Z | 2021-06-06T05:32:10.000Z | import datetime
from django.conf import settings
from django.utils import formats, six
from django.forms.widgets import Widget
from django.utils.encoding import force_str
class SelectDateWidget(Widget):
"""Wrapper around django.widgets.SelectDateWidget.
Provides api suitable for template-based rendering
... | 31.616071 | 77 | 0.51059 |
39b0363c5ecb0d1abb44284c313ce50dbb683562 | 1,453 | py | Python | MouseTools/auth.py | scaratozzolo/MouseTools | d9b4fc06dc60d232433b2a085094a2aeecd8739a | [
"MIT"
] | 23 | 2018-06-05T19:33:50.000Z | 2022-01-15T02:58:56.000Z | MouseTools/auth.py | scaratozzolo/MouseTools | d9b4fc06dc60d232433b2a085094a2aeecd8739a | [
"MIT"
] | 8 | 2018-09-18T15:05:47.000Z | 2021-09-15T03:31:32.000Z | MouseTools/auth.py | scaratozzolo/MouseTools | d9b4fc06dc60d232433b2a085094a2aeecd8739a | [
"MIT"
] | 6 | 2018-12-26T19:12:52.000Z | 2021-01-29T08:15:23.000Z | import requests
import json
from datetime import datetime, timedelta
def Authentication():
"""Gets an authentication (access) token from Disney and returns it"""
headers = {"User-Agent":"CouchbaseLite/1.3 (1.4.1/8a21c5927a273a038fb3b66ec29c86425e871b11)","Content-Type":"application/json","Accept":"multipart/... | 46.870968 | 269 | 0.71576 |
ba904649465cb6e5f0b38abba1f33d67340ae78d | 5,852 | py | Python | generate_pile.py | jcsmccaw/Wood-pile-Lattices | 16e31b4e8b5bd9939a9b25d8026f2cb6c81f4918 | [
"MIT"
] | null | null | null | generate_pile.py | jcsmccaw/Wood-pile-Lattices | 16e31b4e8b5bd9939a9b25d8026f2cb6c81f4918 | [
"MIT"
] | null | null | null | generate_pile.py | jcsmccaw/Wood-pile-Lattices | 16e31b4e8b5bd9939a9b25d8026f2cb6c81f4918 | [
"MIT"
] | null | null | null | from numpy import array, linspace, floor_divide
from gcode_parsing_functions import *
bound_x = array([50, 60]) # mm
bound_y = array([50, 60]) # mm
height = 5 # mm
first_layer = 0.2 # mm
layer_height = 0.3 # mm
layers = int(floor_divide(height, layer_height))
num_trace_x = 8
num_trace_y = num_trace_x
offset = (bound... | 44 | 95 | 0.515379 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.