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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794781bd6e364a332a2613163d1cb55f1e20423f | 1,838 | py | Python | fast_jtnn/vocab.py | croningp/JTNN-VAE | bc5562dabe30118fa10be3b53395a504f8d78173 | [
"MIT"
] | 2 | 2021-11-12T11:54:54.000Z | 2022-03-28T18:05:10.000Z | fast_jtnn/vocab.py | croningp/JTNN-VAE | bc5562dabe30118fa10be3b53395a504f8d78173 | [
"MIT"
] | null | null | null | fast_jtnn/vocab.py | croningp/JTNN-VAE | bc5562dabe30118fa10be3b53395a504f8d78173 | [
"MIT"
] | null | null | null | import copy
import rdkit.Chem as Chem
def get_slots(smiles):
mol = Chem.MolFromSmiles(smiles)
return [
(atom.GetSymbol(), atom.GetFormalCharge(), atom.GetTotalNumHs())
for atom in mol.GetAtoms()
]
class Vocab(object):
benzynes = [
"C1=CC=CC=C1",
"C1=CC=NC=C1",
... | 23.564103 | 77 | 0.476061 |
794781c1a01e5a86b741d3a1d0e4b5d36c2234c0 | 5,434 | py | Python | lib/fpn/proposal_assignments/proposal_assignments_postnms.py | zxydi1992/neural-motifs | d37a441c612b51c0085d364a3c6a58c2309164d4 | [
"MIT"
] | null | null | null | lib/fpn/proposal_assignments/proposal_assignments_postnms.py | zxydi1992/neural-motifs | d37a441c612b51c0085d364a3c6a58c2309164d4 | [
"MIT"
] | null | null | null | lib/fpn/proposal_assignments/proposal_assignments_postnms.py | zxydi1992/neural-motifs | d37a441c612b51c0085d364a3c6a58c2309164d4 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Goal: assign ROIs to targets
# --------------------------------------------------------
import numpy as np
import numpy.random as npr
from .proposal_assignments_rel import _sel_rels
from nmotif.lib.fpn.box_utils import bbox_overlaps
from nmotif.lib.pytorch_... | 40.552239 | 100 | 0.635996 |
79478292166fc524440b421b0697ed7f1c90223f | 15,520 | py | Python | common/waf.py | cillianodonnell/rtems-docs | deb9c29b79fccd03790d35190996a348f64d5b61 | [
"BSD-2-Clause"
] | null | null | null | common/waf.py | cillianodonnell/rtems-docs | deb9c29b79fccd03790d35190996a348f64d5b61 | [
"BSD-2-Clause"
] | null | null | null | common/waf.py | cillianodonnell/rtems-docs | deb9c29b79fccd03790d35190996a348f64d5b61 | [
"BSD-2-Clause"
] | null | null | null | import sys, os, re
from waflib.Build import BuildContext
import latex
sphinx_min_version = (1, 3)
def build_date():
import datetime
now = datetime.date.today()
m = now.strftime('%B')
y = now.strftime('%Y')
if now.day % 10 == 1:
s = 'st'
elif now.day % 10 == 2:
s = 'nd'
eli... | 34.565702 | 99 | 0.579188 |
7947842c374785da9c1b39fdf777608f286863a2 | 1,720 | py | Python | mro.py | iansantana00/Python-Course | 43852aa64c93099342ab4765b0fe8729a959449e | [
"MIT"
] | 2 | 2022-01-13T15:55:58.000Z | 2022-02-11T23:18:34.000Z | mro.py | iansantana00/Python-Course | 43852aa64c93099342ab4765b0fe8729a959449e | [
"MIT"
] | null | null | null | mro.py | iansantana00/Python-Course | 43852aa64c93099342ab4765b0fe8729a959449e | [
"MIT"
] | null | null | null | """
POO - MRO - METHOD Resolution Order
Resolução da ordem de métodos é a ordem de execução dos métodos (quem será executado primeiro).
Em Python, a gente pode conferir a ordem de execução dos métodos (MRO) de 3 formas:
- Via propriedade da classe __mro__
- Via método mro()
- Via help
>>> from ... | 24.927536 | 113 | 0.630233 |
7947843d5aeb05d5a727d5e604625f136101ef54 | 4,052 | py | Python | tests/unittests/algo/test_dehb.py | dendisuhubdy/evolve | 54e0aa05b8df5f7833186b32462629ddb9198eea | [
"BSD-3-Clause"
] | 1 | 2017-09-07T06:20:39.000Z | 2017-09-07T06:20:39.000Z | tests/unittests/algo/test_dehb.py | dendisuhubdy/evolve | 54e0aa05b8df5f7833186b32462629ddb9198eea | [
"BSD-3-Clause"
] | null | null | null | tests/unittests/algo/test_dehb.py | dendisuhubdy/evolve | 54e0aa05b8df5f7833186b32462629ddb9198eea | [
"BSD-3-Clause"
] | null | null | null | """Perform integration tests for `orion.algo.dehb`."""
import itertools
from typing import ClassVar
import numpy
import pytest
from orion.algo.dehb.dehb import IMPORT_ERROR, UnsupportedConfiguration
from orion.core.utils import backward, format_trials
from orion.testing.algo import BaseAlgoTests, TestPhase, last_pha... | 32.416 | 88 | 0.615005 |
79478534c3a23764194edd32e9c9d6af845542a4 | 2,537 | py | Python | tests/expm_multiply_parallel_batch_test.py | Alehud/QuSpin | c72d5fb2b2e9cd9a37d6917bba0337faf3b6c201 | [
"BSD-3-Clause"
] | 195 | 2016-10-24T18:05:31.000Z | 2022-03-29T10:11:56.000Z | tests/expm_multiply_parallel_batch_test.py | Alehud/QuSpin | c72d5fb2b2e9cd9a37d6917bba0337faf3b6c201 | [
"BSD-3-Clause"
] | 303 | 2016-10-25T20:08:11.000Z | 2022-03-31T16:52:09.000Z | tests/expm_multiply_parallel_batch_test.py | Alehud/QuSpin | c72d5fb2b2e9cd9a37d6917bba0337faf3b6c201 | [
"BSD-3-Clause"
] | 54 | 2017-01-03T18:47:52.000Z | 2022-03-16T06:54:33.000Z | from __future__ import print_function, division
import sys,os
qspin_path = os.path.join(os.getcwd(),"../")
sys.path.insert(0,qspin_path)
#print(os.environ["OMP_NUM_THREADS"])
from quspin.basis import spin_basis_1d
from quspin.operators import hamiltonian
from quspin.tools.evolution import expm_multiply_parallel
from ... | 25.887755 | 114 | 0.68309 |
7947853a24627ba241a9c008bdc34b702479dce4 | 3,662 | py | Python | main.py | Ahaan123/DiscordBrawlMemer | 8e1fc95d1d6fa409935be7159971166adf511482 | [
"MIT"
] | null | null | null | main.py | Ahaan123/DiscordBrawlMemer | 8e1fc95d1d6fa409935be7159971166adf511482 | [
"MIT"
] | null | null | null | main.py | Ahaan123/DiscordBrawlMemer | 8e1fc95d1d6fa409935be7159971166adf511482 | [
"MIT"
] | null | null | null | import praw
import discord
from discord.ext import commands
import random
import os
from WebServer import keep_alive
brawl_bot = commands.Bot(command_prefix='brawl ')
TOKEN = "TOKEN IS HIDDEN"
class meme_post:
url = ''
title = ''
meme_link = ''
permalink = ''
def __init__(self, post_url, post_title, meme_urlx... | 34.87619 | 208 | 0.696068 |
79478541aca3277b0546828737dff256632955d4 | 2,190 | py | Python | Machine Learning Summer School 2019 (Moscow, Russia)/tutorials/bayesian_deep_learning/mlss2019bdl/bdl/bernoulli.py | xuedong/rlss2019 | d7468c2fcf269d8afd6fb0f44993aa9797867944 | [
"MIT"
] | null | null | null | Machine Learning Summer School 2019 (Moscow, Russia)/tutorials/bayesian_deep_learning/mlss2019bdl/bdl/bernoulli.py | xuedong/rlss2019 | d7468c2fcf269d8afd6fb0f44993aa9797867944 | [
"MIT"
] | null | null | null | Machine Learning Summer School 2019 (Moscow, Russia)/tutorials/bayesian_deep_learning/mlss2019bdl/bdl/bernoulli.py | xuedong/rlss2019 | d7468c2fcf269d8afd6fb0f44993aa9797867944 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
from torch.nn import Linear, Conv2d
from .base import FreezableWeight, PenalizedWeight
class DropoutLinear(Linear, FreezableWeight):
"""Linear layer with dropout on inputs."""
def __init__(self, in_features, out_features, bias=True, p=0.5):
super().__init... | 34.21875 | 82 | 0.634247 |
7947882f7992a2e92a5534fbedad35e26f9dd60d | 377 | py | Python | authz/controller/apiv1/user.py | amnshzd/authz | 63a60bd185bd8119b0aac48fa5d0e19754b8d03b | [
"Apache-2.0"
] | null | null | null | authz/controller/apiv1/user.py | amnshzd/authz | 63a60bd185bd8119b0aac48fa5d0e19754b8d03b | [
"Apache-2.0"
] | null | null | null | authz/controller/apiv1/user.py | amnshzd/authz | 63a60bd185bd8119b0aac48fa5d0e19754b8d03b | [
"Apache-2.0"
] | null | null | null | from authz.util.jsonify import jsonify
class UserController:
def creat_user():
return jsonify(status=501)
def get_user_list():
return jsonify(status=501)
def get_user(user_id):
return jsonify(status=501)
def update_user(user_id):
return jsonify(status=501)
def d... | 18.85 | 38 | 0.665782 |
79478909d76eebc38332834eb6c300d07d848a6b | 145 | py | Python | TIDALDL-PY/tidal_dl/__main__.py | luuray/Tidal-Media-Downloader | de1ea10c93fdb45732b252fa010fde57dfeafab6 | [
"Apache-2.0"
] | null | null | null | TIDALDL-PY/tidal_dl/__main__.py | luuray/Tidal-Media-Downloader | de1ea10c93fdb45732b252fa010fde57dfeafab6 | [
"Apache-2.0"
] | null | null | null | TIDALDL-PY/tidal_dl/__main__.py | luuray/Tidal-Media-Downloader | de1ea10c93fdb45732b252fa010fde57dfeafab6 | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.append('./')
import tidal_dl
if __name__ == '__main__':
# tidal_dl.debug()
tidal_dl.main(sys.argv)
| 13.181818 | 28 | 0.593103 |
7947893cbdc395fab757201b2cba1182029ba7f1 | 51 | py | Python | sample.py | santosh4b6/python_sample_pkg_files | 6a1a997508478693a29f6ad36c4150cbfc84032b | [
"MIT"
] | null | null | null | sample.py | santosh4b6/python_sample_pkg_files | 6a1a997508478693a29f6ad36c4150cbfc84032b | [
"MIT"
] | null | null | null | sample.py | santosh4b6/python_sample_pkg_files | 6a1a997508478693a29f6ad36c4150cbfc84032b | [
"MIT"
] | null | null | null |
def test_print():
print('[INFO] Hello World') | 12.75 | 31 | 0.627451 |
794789b762fc74c10f4c24a1c94a95dea6619a26 | 4,507 | py | Python | HashTables/main.py | maksbrz184/AaDS | 489f3e88af2ff7d263a761f2f7e0ee29f6e91962 | [
"MIT"
] | null | null | null | HashTables/main.py | maksbrz184/AaDS | 489f3e88af2ff7d263a761f2f7e0ee29f6e91962 | [
"MIT"
] | null | null | null | HashTables/main.py | maksbrz184/AaDS | 489f3e88af2ff7d263a761f2f7e0ee29f6e91962 | [
"MIT"
] | null | null | null | from HashTables import hashTables
from Sources import fileDriver
import random
htl = hashTables.HashTableLinear(1000000, 20)
htd = hashTables.HashTableDouble(1000000)
nums = fileDriver.getIntArrayPath("../Sources/set_of_1050000_random_numbers.txt")
searched = fileDriver.getIntArrayPath("../Sources/set_of_1050000_ran... | 31.298611 | 101 | 0.584868 |
79478b69efd3f77fddf6f9e9e8c7d1a8459ede93 | 4,465 | py | Python | mysql-utilities-1.6.0/mysql/utilities/common/charsets.py | bopopescu/mysql-dbcompare | 1e912fd87282be3b3bed48487e6beb0ecb1de339 | [
"Apache-2.0"
] | 2 | 2018-03-20T07:42:58.000Z | 2018-03-20T07:43:49.000Z | mysql-utilities-1.6.0/mysql/utilities/common/charsets.py | bopopescu/mysql-dbcompare | 1e912fd87282be3b3bed48487e6beb0ecb1de339 | [
"Apache-2.0"
] | null | null | null | mysql-utilities-1.6.0/mysql/utilities/common/charsets.py | bopopescu/mysql-dbcompare | 1e912fd87282be3b3bed48487e6beb0ecb1de339 | [
"Apache-2.0"
] | 1 | 2020-07-23T23:07:08.000Z | 2020-07-23T23:07:08.000Z | #
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope... | 33.074074 | 79 | 0.640538 |
79478b79e1316730a919e66c127e5edb5e138549 | 1,929 | py | Python | simfempy/examples/solverstokes.py | beckerrh/fempy | dd7214ea7f6d81a5200fcb4a91f07a5cd3322e9e | [
"MIT"
] | null | null | null | simfempy/examples/solverstokes.py | beckerrh/fempy | dd7214ea7f6d81a5200fcb4a91f07a5cd3322e9e | [
"MIT"
] | 3 | 2018-12-18T16:36:52.000Z | 2019-01-29T18:34:55.000Z | simfempy/examples/solverstokes.py | beckerrh/fempy | dd7214ea7f6d81a5200fcb4a91f07a5cd3322e9e | [
"MIT"
] | null | null | null | assert __name__ == '__main__'
# in shell
import os, sys
simfempypath = os.path.abspath(os.path.join(__file__, os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir,'simfempy'))
sys.path.insert(0,simfempypath)
from simfempy.applications.stokes import Stokes
from simfempy.meshes.simplexmesh import SimplexMesh
f... | 49.461538 | 168 | 0.660446 |
79478bc46ec6852442ca3e7d0a214a79d0c9d16f | 150 | py | Python | majavahbot/api/__init__.py | supertassu/MajavahBot | 79313fc1b40d7adcd2161f5f3d31c6563856c451 | [
"MIT"
] | 2 | 2021-02-01T07:52:06.000Z | 2022-01-17T19:05:32.000Z | majavahbot/api/__init__.py | supertassu/MajavahBot | 79313fc1b40d7adcd2161f5f3d31c6563856c451 | [
"MIT"
] | null | null | null | majavahbot/api/__init__.py | supertassu/MajavahBot | 79313fc1b40d7adcd2161f5f3d31c6563856c451 | [
"MIT"
] | null | null | null | from majavahbot.api.mediawiki import MediawikiApi, get_mediawiki_api
from majavahbot.api.database import ReplicaDatabase, TaskDatabase, task_database
| 50 | 80 | 0.88 |
79478cc6960226acef5ad900e8fb63afc53c1890 | 1,520 | py | Python | auth.py | raminaji/Hackathon | cebf037ad42ba85579eb3b287a1b9bc58144f1e4 | [
"Apache-2.0"
] | null | null | null | auth.py | raminaji/Hackathon | cebf037ad42ba85579eb3b287a1b9bc58144f1e4 | [
"Apache-2.0"
] | null | null | null | auth.py | raminaji/Hackathon | cebf037ad42ba85579eb3b287a1b9bc58144f1e4 | [
"Apache-2.0"
] | null | null | null | import firebase_admin
import json
from firebase_admin import db
cred_obj = firebase_admin.credentials.Certificate('hackathon-6c0c9-firebase-adminsdk-mvfav-92e3c52dc8.json')
default_app = firebase_admin.initialize_app(cred_obj, {
'databaseURL':"https://hackathon-6c0c9-default-rtdb.firebaseio.com/"
})
ref = db.refe... | 33.043478 | 108 | 0.714474 |
79478d605341bfb2f64cfbd3b735ab2fdbefe65c | 4,353 | py | Python | filebrowser/templatetags/fb_versions.py | bastiaanraa/django-filebrowser | de8cceb58f1b9f0f41e927a81cc3c3b8deee7108 | [
"BSD-3-Clause"
] | 522 | 2015-01-04T05:26:10.000Z | 2022-03-29T20:09:24.000Z | filebrowser/templatetags/fb_versions.py | bastiaanraa/django-filebrowser | de8cceb58f1b9f0f41e927a81cc3c3b8deee7108 | [
"BSD-3-Clause"
] | 144 | 2015-01-06T11:52:27.000Z | 2022-03-22T19:07:15.000Z | filebrowser/templatetags/fb_versions.py | bastiaanraa/django-filebrowser | de8cceb58f1b9f0f41e927a81cc3c3b8deee7108 | [
"BSD-3-Clause"
] | 221 | 2015-01-13T07:20:32.000Z | 2022-02-23T10:58:31.000Z | # coding: utf-8
from django.conf import settings
from django.core.files import File
from django.template import Library, Node, Variable, VariableDoesNotExist, TemplateSyntaxError
from filebrowser.settings import VERSIONS, PLACEHOLDER, SHOW_PLACEHOLDER, FORCE_PLACEHOLDER
from filebrowser.base import FileObject
from fi... | 36.889831 | 134 | 0.652883 |
79478d8951e50055e1645ec2a52d602e35756c5e | 571 | py | Python | examples/first_run.py | SvenAke/pyadb | 6585a00fd3f8511dd3b4224fc0c84bb71694dfab | [
"BSD-2-Clause"
] | null | null | null | examples/first_run.py | SvenAke/pyadb | 6585a00fd3f8511dd3b4224fc0c84bb71694dfab | [
"BSD-2-Clause"
] | null | null | null | examples/first_run.py | SvenAke/pyadb | 6585a00fd3f8511dd3b4224fc0c84bb71694dfab | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Very basic PyADB example
#
try:
import sys
from pyadb import ADB
except ImportError,e:
# should never be reached
print "[f] Required module missing. %s" % e.args[0]
sys.exit(-1)
def main():
# creates the ADB object
adb = ADB()
# IMPORTANT: You should supply th... | 22.84 | 80 | 0.635727 |
79478e2097e23a4ae28a670c1b5e4ac0be1bae5b | 9,591 | py | Python | get_data/hue_polling_to_db.py | damok6/apartmentMonitor | 686ce7748c91407f4110ceda508391f40e2086f5 | [
"MIT"
] | null | null | null | get_data/hue_polling_to_db.py | damok6/apartmentMonitor | 686ce7748c91407f4110ceda508391f40e2086f5 | [
"MIT"
] | null | null | null | get_data/hue_polling_to_db.py | damok6/apartmentMonitor | 686ce7748c91407f4110ceda508391f40e2086f5 | [
"MIT"
] | 1 | 2021-02-14T19:58:52.000Z | 2021-02-14T19:58:52.000Z | import time
import json
import sys
import os
import csv
import urllib2
import sqlite3
import requests
csv.field_size_limit(sys.maxsize)
if "HUE_IP_ADDRESS" in os.environ:
HUE_IP_ADDRESS = os.environ["HUE_IP_ADDRESS"]
else:
HUE_IP_ADDRESS = "set_ip_address_here" # If you don't want to set in environment variables
... | 25.644385 | 101 | 0.653738 |
7947919d149f556fa9f1b74da89d9cfa2c7b906c | 8,174 | py | Python | keras/layers/advanced_activations.py | asanoboy/keras | e467ee5a1a00afdfa1cb7f5508fdbfd2c5eab1e5 | [
"MIT"
] | 1 | 2020-05-18T03:08:48.000Z | 2020-05-18T03:08:48.000Z | keras/layers/advanced_activations.py | asanoboy/keras | e467ee5a1a00afdfa1cb7f5508fdbfd2c5eab1e5 | [
"MIT"
] | null | null | null | keras/layers/advanced_activations.py | asanoboy/keras | e467ee5a1a00afdfa1cb7f5508fdbfd2c5eab1e5 | [
"MIT"
] | 1 | 2019-11-19T12:13:27.000Z | 2019-11-19T12:13:27.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .. import activations
from .. import initializers
from .. import regularizers
from .. import constraints
from ..engine import Layer
from ..engine import InputSpec
from .. import backend as K
from ..legacy import interfaces
class LeakyReLU(Layer):
... | 33.917012 | 145 | 0.620382 |
7947928f668501c6d000d5fd14fb597fb9090a4e | 6,296 | py | Python | doc/source/conf.py | 1990chs/pymapdl-reader | 6fa369c9019ac87f13b9a505d66e6399f36f1a66 | [
"MIT"
] | null | null | null | doc/source/conf.py | 1990chs/pymapdl-reader | 6fa369c9019ac87f13b9a505d66e6399f36f1a66 | [
"MIT"
] | null | null | null | doc/source/conf.py | 1990chs/pymapdl-reader | 6fa369c9019ac87f13b9a505d66e6399f36f1a66 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import warnings
import os
import pyvista
import numpy as np
from ansys.mapdl import reader as pymapdl_reader
# -- pyvista configuration ---------------------------------------------------
# Manage errors
pyvista.set_error_output_file('errors.txt')
# Ensure that offscreen rendering is used for... | 31.323383 | 104 | 0.658196 |
7947946e2d520cd6e42df84172077b14940808f5 | 12,923 | py | Python | refinement/networks/deeplab_xception.py | Guliisgreat/PReMVOS | b177e4d7c2aab40f93e181a8282ca72c5d789cb9 | [
"MIT"
] | 11 | 2019-01-20T06:41:32.000Z | 2021-03-13T13:34:07.000Z | refinement/networks/deeplab_xception.py | Guliisgreat/PReMVOS | b177e4d7c2aab40f93e181a8282ca72c5d789cb9 | [
"MIT"
] | null | null | null | refinement/networks/deeplab_xception.py | Guliisgreat/PReMVOS | b177e4d7c2aab40f93e181a8282ca72c5d789cb9 | [
"MIT"
] | 1 | 2019-04-14T07:19:49.000Z | 2019-04-14T07:19:49.000Z | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.model_zoo as model_zoo
class SeparableConv2d(nn.Module):
def __init__(self, inplanes, planes, kernel_size=3, stride=1, padding=0, dilation=1, bias=False):
super(SeparableConv2d, self).__init__()
self... | 36.609065 | 111 | 0.576259 |
79479631cc2e02a85900e5333906b14171228f07 | 1,691 | py | Python | data/covering_grammar/lib/make_test_file.py | wannaphong/wikipron | fefd89a9ecc62ac62abd91486049e5162e94e8a5 | [
"Apache-2.0"
] | 111 | 2019-08-11T05:57:50.000Z | 2022-03-22T03:32:33.000Z | data/covering_grammar/lib/make_test_file.py | wannaphong/wikipron | fefd89a9ecc62ac62abd91486049e5162e94e8a5 | [
"Apache-2.0"
] | 256 | 2019-08-10T20:14:35.000Z | 2021-05-09T16:35:06.000Z | data/covering_grammar/lib/make_test_file.py | wannaphong/wikipron | fefd89a9ecc62ac62abd91486049e5162e94e8a5 | [
"Apache-2.0"
] | 47 | 2019-08-10T01:47:13.000Z | 2021-04-24T15:19:41.000Z | #!/usr/bin/env python
"""Makes test file.
Using gold data and the model output, this script creates a three-column TSV
file in which each row contains a word, its gold pronunciation, and the
predicted pronunciation, assuming that the input files have the words listed
in the same order."""
import argparse
import conte... | 34.510204 | 76 | 0.635719 |
794796aeaf424d20ac58c40c6051118ca28ce3e3 | 3,825 | py | Python | imageprocessing/imageprocessing_pb2.py | LukasMaly/grpc-playground | fc67a9b4e47cc7a18954ad66023c771328edb428 | [
"MIT"
] | null | null | null | imageprocessing/imageprocessing_pb2.py | LukasMaly/grpc-playground | fc67a9b4e47cc7a18954ad66023c771328edb428 | [
"MIT"
] | null | null | null | imageprocessing/imageprocessing_pb2.py | LukasMaly/grpc-playground | fc67a9b4e47cc7a18954ad66023c771328edb428 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: imageprocessing.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.prot... | 32.974138 | 372 | 0.750065 |
7947971ea12ed25a9a272c9f9d8e064174cb8624 | 11,520 | py | Python | py_rpb/gd2js.py | refugee-phrasebook/py_rpb | 678e6658ecb3088e1a5f535c9c82d1dc96f3d0dc | [
"MIT"
] | 2 | 2015-09-19T11:17:51.000Z | 2016-01-27T15:16:13.000Z | py_rpb/gd2js.py | refugee-phrasebook/py_rpb | 678e6658ecb3088e1a5f535c9c82d1dc96f3d0dc | [
"MIT"
] | null | null | null | py_rpb/gd2js.py | refugee-phrasebook/py_rpb | 678e6658ecb3088e1a5f535c9c82d1dc96f3d0dc | [
"MIT"
] | null | null | null | import scrapesheet as sc
import sys
import string
import sampa2x
from iso6393 import iso6393dic
import json
from data import domaind
#provide a commandline version to scrape google doc and output to either tsv or js
#tabulate from original class was not working at the time of writing
class lexeme():
def __init__(sel... | 42.666667 | 139 | 0.644531 |
794798aff045dc6b478e07c5df7e4769f202116a | 383 | py | Python | src/art/asgi.py | Denis-Gerashchenko/artsite | b7289dffa5bf49c41886355b3f6698639f8035cc | [
"MIT"
] | null | null | null | src/art/asgi.py | Denis-Gerashchenko/artsite | b7289dffa5bf49c41886355b3f6698639f8035cc | [
"MIT"
] | null | null | null | src/art/asgi.py | Denis-Gerashchenko/artsite | b7289dffa5bf49c41886355b3f6698639f8035cc | [
"MIT"
] | null | null | null | """
ASGI config for art project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_... | 22.529412 | 78 | 0.780679 |
794798faeaad88c7f8c2cd98c936a01b69379c30 | 173 | py | Python | teerace/api/v1/helpers.py | chaosk/teerace | 16110c739eb12009d8e70fb3c3bfe8ed87112cfa | [
"BSD-3-Clause"
] | 3 | 2016-06-10T03:45:19.000Z | 2018-09-27T15:32:17.000Z | teerace/api/v1/helpers.py | teerace/web | 16110c739eb12009d8e70fb3c3bfe8ed87112cfa | [
"BSD-3-Clause"
] | 26 | 2018-12-31T12:54:27.000Z | 2019-04-08T02:34:44.000Z | teerace/api/v1/helpers.py | teerace/web | 16110c739eb12009d8e70fb3c3bfe8ed87112cfa | [
"BSD-3-Clause"
] | 3 | 2017-01-08T14:59:18.000Z | 2018-11-21T14:59:03.000Z | def get_filtered_checkpoints(checkpoints):
try:
return ";".join([v for v in checkpoints.split(";") if float(v) != 0.0])
except ValueError:
return ""
| 28.833333 | 79 | 0.612717 |
794798fe34d3356fab12bcb429c5aa3a0ef82719 | 446 | py | Python | tests/verifiers_tests/bab_tests.py | nathzi1505/DNNV | 16c6e6ecb681ce66196f9274d4a43eede8686319 | [
"MIT"
] | 33 | 2019-12-13T18:54:52.000Z | 2021-11-16T06:29:29.000Z | tests/verifiers_tests/bab_tests.py | nathzi1505/DNNV | 16c6e6ecb681ce66196f9274d4a43eede8686319 | [
"MIT"
] | 28 | 2020-01-30T14:06:03.000Z | 2022-01-27T01:07:37.000Z | tests/verifiers_tests/bab_tests.py | nathzi1505/DNNV | 16c6e6ecb681ce66196f9274d4a43eede8686319 | [
"MIT"
] | 14 | 2020-04-08T01:57:00.000Z | 2021-11-26T09:35:02.000Z | import os
import unittest
from tests.verifiers_tests.utils import VerifierTests
from tests.utils import network_artifact_dir, property_artifact_dir
from dnnv.verifiers.bab import BaB
@unittest.skipIf(not BaB.is_installed(), "BaB is not installed")
class BabVerifierTests(VerifierTests, unittest.TestCase):
def in... | 23.473684 | 67 | 0.764574 |
794799aeb51c13238794011f0587b6531b1adf26 | 3,108 | py | Python | labs/lab-06/plot_words_4.py | elihschiff/oss-repo-template | 3bb03a350be0e4b1c662a37948a6ac00cd94dcef | [
"MIT"
] | null | null | null | labs/lab-06/plot_words_4.py | elihschiff/oss-repo-template | 3bb03a350be0e4b1c662a37948a6ac00cd94dcef | [
"MIT"
] | null | null | null | labs/lab-06/plot_words_4.py | elihschiff/oss-repo-template | 3bb03a350be0e4b1c662a37948a6ac00cd94dcef | [
"MIT"
] | null | null | null | """
=====
Words
=====
Words/Ladder Graph
------------------
Generate an undirected graph over the 5757 5-letter words in the
datafile `words_dat.txt.gz`. Two words are connected by an edge
if they differ in one letter, resulting in 14,135 edges. This example
is described in Section 1.1 in Knuth's book (see [1]_ and ... | 32.375 | 76 | 0.549871 |
79479a45120a92fc1b120227c512b8e07f2e3fd6 | 667 | py | Python | Python/7. calculator.py | mohitdhaundiyal/laravel_emtechtalks | a8274aa2d77f57e2c8e2686a023f7bdcf01db4ca | [
"MIT"
] | null | null | null | Python/7. calculator.py | mohitdhaundiyal/laravel_emtechtalks | a8274aa2d77f57e2c8e2686a023f7bdcf01db4ca | [
"MIT"
] | 4 | 2021-02-02T21:27:12.000Z | 2022-02-27T09:14:45.000Z | Python/7. calculator.py | mohitdhaundiyal/laravel_emtechtalks | a8274aa2d77f57e2c8e2686a023f7bdcf01db4ca | [
"MIT"
] | null | null | null | while True:
def add(num1,num2):
print(num1+num2)
def sub(num1,num2):
print(num1-num2)
def product(num1,num2):
print(num1*num2)
def divide(num1,num2):
print(num1/num2)
break
print('select operation')
print('1, Add')
print('2, Sub')
print('3, Product')
print('4, Divide... | 18.527778 | 34 | 0.622189 |
79479bbfd02ea5354ef7e5d26f55fbf77009af0f | 14,721 | py | Python | MdlUtilities.py | Ivanfdezr/CentralSoftware | 8681fedd4814dc60deb527a370411350b40c994c | [
"MIT"
] | null | null | null | MdlUtilities.py | Ivanfdezr/CentralSoftware | 8681fedd4814dc60deb527a370411350b40c994c | [
"MIT"
] | 44 | 2021-02-10T23:58:28.000Z | 2021-12-14T02:38:21.000Z | MdlUtilities.py | Ivanfdezr/CentralSoftware | 8681fedd4814dc60deb527a370411350b40c994c | [
"MIT"
] | null | null | null | import numpy as np
#from numpy import array
import re
import copy
import dbUtils
import matplotlib.tri as mpltri
import sys, inspect
gravitationalAcceleration = 32.17405*12 #in/s²
configurations = { ('b', None,None): {'nest':[['A']],'label':'=\n|\nA\n|\n=','PLfactor':0.05},
('r', None,None): {'nest':[['A']],'lab... | 27.110497 | 121 | 0.629305 |
79479c6db8d9d180e99668269ab391ccd39e32ea | 14,759 | py | Python | pandas/core/indexers.py | nofarm3/pandas | c5b4272ed1e7d71266e06660ce9970527711fd55 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-01-14T15:16:34.000Z | 2021-01-14T15:16:34.000Z | pandas/core/indexers.py | gershonc/pandas | 963cf2b5abf4e1ee99a7f6b9031ad485804c5dff | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/indexers.py | gershonc/pandas | 963cf2b5abf4e1ee99a7f6b9031ad485804c5dff | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | """
Low-dependency indexing utilities.
"""
import warnings
import numpy as np
from pandas._typing import Any, AnyArrayLike, ArrayLike
from pandas.core.dtypes.common import (
is_array_like,
is_bool_dtype,
is_extension_array_dtype,
is_integer,
is_integer_dtype,
is_list_like,
)
from pandas.core.... | 28.328215 | 88 | 0.587574 |
79479cd3da1396b399deaf518e3bf37d21005725 | 2,474 | py | Python | videomaker/interface/menu/menu.py | TheTimebike/VideoMaker-Studio | 289fd3b9f3c27d298ee94b1e79415a20ec084c4c | [
"MIT"
] | 4 | 2019-03-03T12:10:20.000Z | 2021-09-05T12:30:25.000Z | videomaker/interface/menu/menu.py | TheTimebike/VideoMaker-Studio | 289fd3b9f3c27d298ee94b1e79415a20ec084c4c | [
"MIT"
] | null | null | null | videomaker/interface/menu/menu.py | TheTimebike/VideoMaker-Studio | 289fd3b9f3c27d298ee94b1e79415a20ec084c4c | [
"MIT"
] | 2 | 2019-03-27T23:40:34.000Z | 2019-10-07T11:09:32.000Z | from tkinter import *
from videomaker.functions.startThread import startThread
from videomaker.functions.clearSelection import clearSelections
from videomaker.functions.deleteOldClips import deleteOldClips
from videomaker.functions.addTheme import addNewTheme
from videomaker.functions.redirect import *
from videomaker.... | 54.977778 | 127 | 0.806386 |
79479d7c8c056c0421467bc30ff31b0444fcbcaf | 3,565 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/messages/peer_dialogs.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/messages/peer_dialogs.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/messages/peer_dialogs.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 34.95098 | 197 | 0.617952 |
79479d98145a6e5beb5d4b291d7b4365562ab001 | 1,524 | py | Python | debug_toolbar/panels/templates/views.py | zborboa-google/django-debug-toolbar | 2b1d98b0e098518171211fe98e447449f73dadf8 | [
"BSD-3-Clause"
] | 2 | 2020-02-14T18:10:16.000Z | 2020-05-17T08:16:54.000Z | debug_toolbar/panels/templates/views.py | zborboa-google/django-debug-toolbar | 2b1d98b0e098518171211fe98e447449f73dadf8 | [
"BSD-3-Clause"
] | null | null | null | debug_toolbar/panels/templates/views.py | zborboa-google/django-debug-toolbar | 2b1d98b0e098518171211fe98e447449f73dadf8 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, unicode_literals
from django.http import HttpResponseBadRequest
from django.conf import settings
from django.shortcuts import render
from django.template import TemplateDoesNotExist
from django.template.loader import find_template_loader
from django.utils.safestring import mark_... | 32.425532 | 77 | 0.703412 |
7947a1149a505848a245086effbeed4650a7ef68 | 3,078 | py | Python | tatsu/semantics.py | smarty-timmi/TatSu | f09240959b51782cc3c38a9059b32f212077c802 | [
"BSD-2-Clause"
] | 1 | 2021-02-25T10:44:10.000Z | 2021-02-25T10:44:10.000Z | tatsu/semantics.py | smarty-timmi/TatSu | f09240959b51782cc3c38a9059b32f212077c802 | [
"BSD-2-Clause"
] | null | null | null | tatsu/semantics.py | smarty-timmi/TatSu | f09240959b51782cc3c38a9059b32f212077c802 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import generator_stop
import builtins
from tatsu.util import simplify_list
from tatsu.exceptions import SemanticError
from tatsu.objectmodel import Node
from tatsu.objectmodel import BASE_CLASS_TOKEN
from tatsu.synth import synthesize
class ASTSemantics(object):
def group... | 30.78 | 82 | 0.607862 |
7947a237df4aa77dc886c2970f7abc8545e64f25 | 16,063 | gyp | Python | node.gyp | adityaanupindi/node | f755ecf484a9789525746475b924ddf2b3f316d0 | [
"Artistic-2.0"
] | 1 | 2019-06-27T13:01:40.000Z | 2019-06-27T13:01:40.000Z | node.gyp | hafeez-syed/node | 5b230007adba91163a2f49dbdd9a16d5834fd322 | [
"Artistic-2.0"
] | null | null | null | node.gyp | hafeez-syed/node | 5b230007adba91163a2f49dbdd9a16d5834fd322 | [
"Artistic-2.0"
] | 1 | 2021-03-15T17:23:59.000Z | 2021-03-15T17:23:59.000Z | {
'variables': {
'v8_use_snapshot%': 'true',
# Turn off -Werror in V8
# See http://codereview.chromium.org/8159015
'werror': '',
'node_use_dtrace%': 'false',
'node_use_etw%': 'false',
'node_use_perfctr%': 'false',
'node_has_winsdk%': 'false',
'node_shared_v8%': 'false',
'node_s... | 30.59619 | 90 | 0.455768 |
7947a3e831c263e802bdcb0294b6349a04698cb7 | 17,756 | py | Python | backend/flask_oauth.py | yuvatia/isREAL-ui | 5e8cf36009e08a595550e4abd569a2382518f948 | [
"MIT"
] | null | null | null | backend/flask_oauth.py | yuvatia/isREAL-ui | 5e8cf36009e08a595550e4abd569a2382518f948 | [
"MIT"
] | null | null | null | backend/flask_oauth.py | yuvatia/isREAL-ui | 5e8cf36009e08a595550e4abd569a2382518f948 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Fixed compatibility issues with Python 3.x
"""
flask_oauth
~~~~~~~~~~~
Implements basic OAuth support for Flask.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import httplib2
from functools import wraps
from urllib.parse import u... | 40.724771 | 88 | 0.601205 |
7947a4d8c50dac13b0160f95cc7b1dac1c4e5bc9 | 6,669 | py | Python | bin/utils/plot_utils.py | hillmich/quantum-benchmarks-1 | e7ab97e004f638d8681b5ee9cbbe662d64bc3378 | [
"MIT"
] | 79 | 2019-07-03T01:54:30.000Z | 2021-04-19T12:28:08.000Z | bin/utils/plot_utils.py | hillmich/quantum-benchmarks-1 | e7ab97e004f638d8681b5ee9cbbe662d64bc3378 | [
"MIT"
] | 28 | 2019-07-16T21:03:49.000Z | 2021-02-14T14:59:45.000Z | bin/utils/plot_utils.py | hillmich/quantum-benchmarks-1 | e7ab97e004f638d8681b5ee9cbbe662d64bc3378 | [
"MIT"
] | 21 | 2019-07-04T05:21:53.000Z | 2021-02-22T18:59:47.000Z | from typing import List
import pandas as pd
import os
import json
ROOT_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
IMAGE_PATH = os.path.join(ROOT_PATH, 'images')
COLOR = {
'yao': 'tab:red',
'yao (cuda)': 'tab:orange',
'yao x 1000': 'tab:blue',
'yao x 64': 'tab:blue',
... | 40.174699 | 135 | 0.591993 |
7947a5f1f2b566b255cb7870440226807cb0cdf7 | 15,102 | py | Python | applications/zcomx/modules/rss.py | zcomx/zco.mx | 70a7372af5787c2e4dea14b25bab0bbb2b959881 | [
"BSD-3-Clause"
] | null | null | null | applications/zcomx/modules/rss.py | zcomx/zco.mx | 70a7372af5787c2e4dea14b25bab0bbb2b959881 | [
"BSD-3-Clause"
] | null | null | null | applications/zcomx/modules/rss.py | zcomx/zco.mx | 70a7372af5787c2e4dea14b25bab0bbb2b959881 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Classes and functions related to rss feeds.
"""
import datetime
import os
import gluon.contrib.rss2 as rss2
from gluon import *
from applications.zcomx.modules.activity_logs import ActivityLog
from applications.zcomx.modules.book_pages import \
BookPage, \
Abr... | 28.765714 | 85 | 0.581777 |
7947a6a71ac5717d7356d64a84136e857e90a80b | 661 | py | Python | messages/HostReserveLinkRequestMessage.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 2 | 2020-04-15T11:20:59.000Z | 2021-05-12T13:01:36.000Z | messages/HostReserveLinkRequestMessage.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 1 | 2018-06-05T04:48:56.000Z | 2018-06-05T04:48:56.000Z | messages/HostReserveLinkRequestMessage.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 1 | 2018-08-15T06:45:46.000Z | 2018-08-15T06:45:46.000Z | # last generated 2018-04-08 02:13:50.681000
from messages import BaseMessage
from msg_codes import HOST_RESERVE_LINK_REQUEST as HOST_RESERVE_LINK_REQUEST
__author__ = 'Mike'
class HostReserveLinkRequestMessage(BaseMessage):
def __init__(self, cloud_uname=None, cname=None):
super(HostReserveLinkRequestMess... | 31.47619 | 76 | 0.729198 |
7947a6c85ef347aad4ade698693d0d1fb4b525f5 | 1,824 | py | Python | neoload/commands/project.py | stephanemartin/neoload-cli | aa128aad9a446e94d5700e8a25b674397d633e1a | [
"BSD-2-Clause"
] | 9 | 2020-06-01T14:28:37.000Z | 2022-03-06T23:21:09.000Z | neoload/commands/project.py | stephanemartin/neoload-cli | aa128aad9a446e94d5700e8a25b674397d633e1a | [
"BSD-2-Clause"
] | 97 | 2019-12-06T23:52:19.000Z | 2022-02-11T14:22:07.000Z | neoload/commands/project.py | stephanemartin/neoload-cli | aa128aad9a446e94d5700e8a25b674397d633e1a | [
"BSD-2-Clause"
] | 23 | 2020-03-24T18:38:58.000Z | 2022-03-04T16:09:23.000Z | import os
import click
from commands import test_settings
from neoload_cli_lib import user_data, tools, rest_crud, neoLoad_project
@click.command()
@click.argument("command", required=True, type=click.Choice(['up', 'upload', 'meta']))
@click.option("--path", "-p", type=click.Path(exists=True), default=os.getcwd(),
... | 38 | 109 | 0.730263 |
7947a7be11854c0f8b78750d60895fd7e04c28c4 | 3,882 | py | Python | util/debug/ai_performance.py | littlebee/shelly-bot | e25f2759bf1c7ac61bacbe70221910184e49beba | [
"MIT"
] | null | null | null | util/debug/ai_performance.py | littlebee/shelly-bot | e25f2759bf1c7ac61bacbe70221910184e49beba | [
"MIT"
] | null | null | null | util/debug/ai_performance.py | littlebee/shelly-bot | e25f2759bf1c7ac61bacbe70221910184e49beba | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import time
import cv2
import pickle
import face_recognition
import numpy
# last n seconds to use for fps calc
FPS_WINDOW = 60
# if true, use face_recognition.face_distance to determin known faces
USE_FACE_DISTANCE = os.getenv('USE_FACE_DISTANCE') == '1' or False
if USE_FACE_DISTANCE... | 33.465517 | 120 | 0.60304 |
7947a8202bafd8b4f43e5d6245dda8a1a1f4bbcc | 1,837 | py | Python | chatbot/test/test_chatbot.py | sachibalata/testix | 8c1acf839c00753609a809ca4ab5942956d29656 | [
"MIT"
] | 3 | 2016-09-24T16:56:48.000Z | 2020-01-08T14:15:19.000Z | chatbot/test/test_chatbot.py | haarcuba/testix | 9cd7975a4b0baf6cadfab8d9405f6d19defe8372 | [
"MIT"
] | 32 | 2019-05-03T20:08:47.000Z | 2022-02-19T13:53:26.000Z | chatbot/test/test_chatbot.py | sachibalata/testix | 8c1acf839c00753609a809ca4ab5942956d29656 | [
"MIT"
] | 1 | 2021-08-23T10:30:51.000Z | 2021-08-23T10:30:51.000Z | import pytest
import socket
from testix.frequentlyused import *
from testix import patch_module
from chatbot import chatbot
class TestChatbot:
@pytest.fixture(autouse=True)
def globals_patch(self, patch_module):
patch_module( chatbot, 'responder' )
def construct(self):
with Scenario() as s... | 35.326923 | 74 | 0.556342 |
7947a8f5f125053e393efc42423c6eddd0a955c0 | 1,723 | py | Python | setup.py | hart-seg-reg/amsaf | e2c5aaf3fd0a367f7b607b68f716e810f6896ed7 | [
"MIT"
] | null | null | null | setup.py | hart-seg-reg/amsaf | e2c5aaf3fd0a367f7b607b68f716e810f6896ed7 | [
"MIT"
] | null | null | null | setup.py | hart-seg-reg/amsaf | e2c5aaf3fd0a367f7b607b68f716e810f6896ed7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'Click>=6.0',
'scipy',
'... | 23.283784 | 82 | 0.615206 |
7947a9037d638cc702a7a29dd6256906caf4f6fc | 43,705 | py | Python | turbulenz_tools/tools/vmath.py | turbulenz/turbulenz_tools | 36e4a15d4fd9cdc0adf0ea365e2e09013565d6fa | [
"MIT"
] | 12 | 2015-01-26T16:15:28.000Z | 2021-12-11T08:51:41.000Z | turbulenz_tools/tools/vmath.py | turbulenz/turbulenz_tools | 36e4a15d4fd9cdc0adf0ea365e2e09013565d6fa | [
"MIT"
] | null | null | null | turbulenz_tools/tools/vmath.py | turbulenz/turbulenz_tools | 36e4a15d4fd9cdc0adf0ea365e2e09013565d6fa | [
"MIT"
] | 6 | 2015-02-23T13:39:54.000Z | 2021-09-30T10:04:22.000Z | #!/usr/bin/python
# Copyright (c) 2009-2014 Turbulenz Limited
"""
Collection of math functions.
"""
import math
__version__ = '1.0.0'
# pylint: disable=C0302,C0111,R0914,R0913
# C0111 - Missing docstring
# C0302 - Too many lines in module
# R0914 - Too many local variables
# R0913 - Too many arguments
#############... | 29.510466 | 119 | 0.41533 |
7947a9d7ee0e8b5967a3445a80aaee4fab32fa3b | 7,309 | py | Python | OSSER/commands/DnsReconCommand.py | Selora/OSST | f89dbf2d9baa75dfbabad93cbf72be2f01bc76bd | [
"BSD-2-Clause"
] | null | null | null | OSSER/commands/DnsReconCommand.py | Selora/OSST | f89dbf2d9baa75dfbabad93cbf72be2f01bc76bd | [
"BSD-2-Clause"
] | null | null | null | OSSER/commands/DnsReconCommand.py | Selora/OSST | f89dbf2d9baa75dfbabad93cbf72be2f01bc76bd | [
"BSD-2-Clause"
] | null | null | null | import sys
from typing import Iterable
import OSSER.core.helpers as helpers
from OSSER.commands.AbstractCommand import AbstractCommand
from OSSER.commands.DnsQueryCommand import DnsQueryCommand
from OSSER.modules.DnsQuery import DnsQuery
class DnsReconCommand(AbstractCommand):
"""
This class is used to perfo... | 38.267016 | 123 | 0.621973 |
7947a9e4f1ddda6d633ea4df0d167332095e2a53 | 989 | py | Python | publiapp_api/migrations/0010_auto_20200925_0300.py | KevinPercy/PubliAppAPI | 262fe66eaf2ac1d895681b0e611f6d7633e2353e | [
"MIT"
] | null | null | null | publiapp_api/migrations/0010_auto_20200925_0300.py | KevinPercy/PubliAppAPI | 262fe66eaf2ac1d895681b0e611f6d7633e2353e | [
"MIT"
] | 6 | 2020-06-30T02:38:05.000Z | 2021-09-22T19:21:35.000Z | publiapp_api/migrations/0010_auto_20200925_0300.py | KevinPercy/PubliAppAPI | 262fe66eaf2ac1d895681b0e611f6d7633e2353e | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-09-25 03:00
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('publiapp_api', '0009_auto_20200922_0303'),
]
operations = [
migrations.CreateModel(
name='Ubige... | 32.966667 | 132 | 0.600607 |
7947aaf20b4092c63a32f342ac9c102e75de7e63 | 11,848 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_webfilter_ips_urlfilter_cache_setting.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_webfilter_ips_urlfilter_cache_setting.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_webfilter_ips_urlfilter_cache_setting.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019-2020 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of th... | 33.280899 | 144 | 0.64188 |
7947ac1482ad4f136f54b3921d258e07ee149d09 | 2,295 | py | Python | app/base/models.py | asad70/reddit-analysis | 32a6c7ceaa314bdc9c723cebe0413c422ae4b414 | [
"MIT"
] | null | null | null | app/base/models.py | asad70/reddit-analysis | 32a6c7ceaa314bdc9c723cebe0413c422ae4b414 | [
"MIT"
] | null | null | null | app/base/models.py | asad70/reddit-analysis | 32a6c7ceaa314bdc9c723cebe0413c422ae4b414 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
from flask_login import UserMixin
from sqlalchemy import Binary, Column, Integer, String
from sqlalchemy.sql.sqltypes import Date, PickleType
import time
from app import db, login_manager
import datetime
from app.base.util import hash_pass
clas... | 31.875 | 79 | 0.639651 |
7947ac891ebb152e8dacf521c57570a7fb08d4cc | 1,772 | py | Python | hyppo/independence/tests/test_utils.py | bstraus1/hyppo | cf0ebed8fdb23078447a06ceb4eed4aca92a287c | [
"Apache-2.0"
] | 116 | 2020-02-28T10:29:22.000Z | 2022-03-22T12:19:39.000Z | hyppo/independence/tests/test_utils.py | bstraus1/hyppo | cf0ebed8fdb23078447a06ceb4eed4aca92a287c | [
"Apache-2.0"
] | 253 | 2020-02-17T16:18:56.000Z | 2022-03-30T16:55:02.000Z | hyppo/independence/tests/test_utils.py | bstraus1/hyppo | cf0ebed8fdb23078447a06ceb4eed4aca92a287c | [
"Apache-2.0"
] | 27 | 2020-03-02T21:07:41.000Z | 2022-03-08T08:33:23.000Z | import numpy as np
import pytest
from numpy.testing import assert_raises
from sklearn.ensemble import RandomForestRegressor
from ...tools.common import _check_kernmat
from .._utils import _CheckInputs, sim_matrix
class TestErrorWarn:
"""Tests errors and warnings."""
def test_error_notndarray(self):
... | 30.033898 | 68 | 0.62754 |
7947acd6adc1366fd08219acb60188e0c62e123a | 1,327 | py | Python | module2-sql-for-analysis/module2.py | BoWarburton/DS-Unit-3-Sprint-2-SQL-and-Databases | 847fa627f74133e529ac47014167f34915f8df66 | [
"MIT"
] | null | null | null | module2-sql-for-analysis/module2.py | BoWarburton/DS-Unit-3-Sprint-2-SQL-and-Databases | 847fa627f74133e529ac47014167f34915f8df66 | [
"MIT"
] | null | null | null | module2-sql-for-analysis/module2.py | BoWarburton/DS-Unit-3-Sprint-2-SQL-and-Databases | 847fa627f74133e529ac47014167f34915f8df66 | [
"MIT"
] | null | null | null | #!/usr/env/bin Python
import sqlite3
import psycopg2
dbname = 'elvrajlo'
user = 'elvrajlo'
password = 'Mq4dGr1-4InqYz1NxinWY93fKQ0YMj1'
host = "otto.db.elephantsql.com"
pg_conn = psycopg2.connect(dbname=dbname, user=user, password=password, host=host)
pg_curs = pg_conn.cursor()
create_test_table_statement = """
CRE... | 21.063492 | 82 | 0.738508 |
7947ad2294abc24ed39d73013f66bbd4e9912428 | 50,294 | py | Python | language/question_answering/bert_joint/run_nq.py | naveenjafer/language | efc5183855a7aeecac3e81fe12ce60fc824f8ca7 | [
"Apache-2.0"
] | 2 | 2020-09-30T11:52:51.000Z | 2020-09-30T12:07:41.000Z | language/question_answering/bert_joint/run_nq.py | naveenjafer/language | efc5183855a7aeecac3e81fe12ce60fc824f8ca7 | [
"Apache-2.0"
] | null | null | null | language/question_answering/bert_joint/run_nq.py | naveenjafer/language | efc5183855a7aeecac3e81fe12ce60fc824f8ca7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... | 34.805536 | 82 | 0.687259 |
7947ad480c49cb2d2324e5b8b2114f6acc815258 | 6,068 | py | Python | server.py | uggla/lab_droplet | 5fb6388e16aa84215f7329b5972a8a5b49ff9308 | [
"Apache-2.0"
] | null | null | null | server.py | uggla/lab_droplet | 5fb6388e16aa84215f7329b5972a8a5b49ff9308 | [
"Apache-2.0"
] | null | null | null | server.py | uggla/lab_droplet | 5fb6388e16aa84215f7329b5972a8a5b49ff9308 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import re
import json
import jinja2
from flask import Flask
from flask import jsonify
from flask import request
from flask import send_from_directory
from flask_sockets import Sockets
from api_exception import InvalidUsage
from flask_httpauth import HT... | 26.268398 | 113 | 0.638266 |
7947aec7efec0a0d025e7807c9197c5cb3012bae | 960 | py | Python | stipo/places/api/serializers.py | azaleas/stipo | 5bd7954f89b46f359f9dfc45a8230e7b5e154986 | [
"MIT"
] | null | null | null | stipo/places/api/serializers.py | azaleas/stipo | 5bd7954f89b46f359f9dfc45a8230e7b5e154986 | [
"MIT"
] | null | null | null | stipo/places/api/serializers.py | azaleas/stipo | 5bd7954f89b46f359f9dfc45a8230e7b5e154986 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from ..models import Attend, Facility, YelpToken
class AttendSerializer(serializers.ModelSerializer):
is_going = serializers.BooleanField(required=True)
class Meta:
model = Attend
fields = ['id', 'attender', 'facility',
'is_going', 'created... | 28.235294 | 84 | 0.672917 |
7947afa66a5b96471f9cb306c009f5cbcb9945b4 | 4,498 | py | Python | src/microprobe/target/uarch/element_type.py | TheArni/microprobe | 46d17a9744b943bb448fc5e2872f3521084d8bec | [
"Apache-2.0"
] | 13 | 2018-09-06T05:16:08.000Z | 2022-03-07T23:03:46.000Z | src/microprobe/target/uarch/element_type.py | TheArni/microprobe | 46d17a9744b943bb448fc5e2872f3521084d8bec | [
"Apache-2.0"
] | 24 | 2018-07-10T01:56:10.000Z | 2022-02-22T22:38:25.000Z | src/microprobe/target/uarch/element_type.py | TheArni/microprobe | 46d17a9744b943bb448fc5e2872f3521084d8bec | [
"Apache-2.0"
] | 12 | 2018-09-06T13:58:24.000Z | 2022-01-27T21:15:39.000Z | # Copyright 2011-2021 IBM 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 writ... | 27.595092 | 78 | 0.675634 |
7947afef3cf96d4bc16959ac0d0584721aa15001 | 3,713 | py | Python | fbpcs/pcf/tests/test_private_computation_framework.py | HaipengGuan/fbpcs | 97829881b741fc84702250ae15d232787eac1946 | [
"MIT"
] | null | null | null | fbpcs/pcf/tests/test_private_computation_framework.py | HaipengGuan/fbpcs | 97829881b741fc84702250ae15d232787eac1946 | [
"MIT"
] | null | null | null | fbpcs/pcf/tests/test_private_computation_framework.py | HaipengGuan/fbpcs | 97829881b741fc84702250ae15d232787eac1946 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import shutil
from fbpcs.pcf.games import ConversionLift
from fbpcs.pcf.mpc.tests.utils import MPCTestCase
f... | 39.084211 | 80 | 0.664422 |
7947affc69202c7d42a47bf495d1c1474f11f712 | 3,625 | py | Python | tests/test_results.py | LukasBeiske/aict-tools | ccf61c051c58040cf4b676180ae7184021d1b81b | [
"MIT"
] | null | null | null | tests/test_results.py | LukasBeiske/aict-tools | ccf61c051c58040cf4b676180ae7184021d1b81b | [
"MIT"
] | null | null | null | tests/test_results.py | LukasBeiske/aict-tools | ccf61c051c58040cf4b676180ae7184021d1b81b | [
"MIT"
] | null | null | null | import tempfile
import os
from click.testing import CliRunner
import shutil
import pandas as pd
import numpy as np
def test_energy_regression_results():
from aict_tools.scripts.train_energy_regressor import main as train
from aict_tools.io import read_telescope_data
from aict_tools.apply import predict_en... | 30.982906 | 112 | 0.653793 |
7947b08f3df25d39e9cef29a211cbc3d215311b4 | 550 | py | Python | longclaw/orders/migrations/0004_auto_20190307_1708.py | YokoTheSlayer/longclaw | 83801feb24ca6f0dfe0fb7a2ef2e9614e5b75611 | [
"MIT"
] | null | null | null | longclaw/orders/migrations/0004_auto_20190307_1708.py | YokoTheSlayer/longclaw | 83801feb24ca6f0dfe0fb7a2ef2e9614e5b75611 | [
"MIT"
] | null | null | null | longclaw/orders/migrations/0004_auto_20190307_1708.py | YokoTheSlayer/longclaw | 83801feb24ca6f0dfe0fb7a2ef2e9614e5b75611 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-03-07 14:08
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('orders', '0003_auto_20190307_1704'),
]
operations = [
migrations.RemoveField(
model_name='order',
name='billing_address',
... | 21.153846 | 47 | 0.552727 |
7947b107f4176fe4ee7ca4ee6a9c3241fc1dfc4a | 27,069 | py | Python | Lib/site-packages/pygments/lexers/freefem.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | 1 | 2021-12-14T21:23:25.000Z | 2021-12-14T21:23:25.000Z | Lib/site-packages/pygments/lexers/freefem.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/pygments/lexers/freefem.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | """
pygments.lexers.freefem
~~~~~~~~~~~~~~~~~~~~~~~
Lexer for FreeFem++ language.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, include, bygroups, inherit, words, \
default
from pygments.to... | 30.110122 | 88 | 0.357642 |
7947b1a18064d729d8bb20fef64e3d3d0aa71ded | 858 | py | Python | lib/surface/ml/video/__init__.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/surface/ml/video/__init__.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/surface/ml/video/__init__.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | 1 | 2020-07-24T20:13:29.000Z | 2020-07-24T20:13:29.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 37.304348 | 74 | 0.765734 |
7947b1f2bf9ce7d7673aee1d67def43404705041 | 1,902 | py | Python | Model/nets.py | zigoom/DrawAndPainting_Pytorch | 690de052f1ef1f9b5dc4012a003e87200d6ba892 | [
"Apache-2.0"
] | 9 | 2019-05-29T02:29:05.000Z | 2021-07-24T08:07:31.000Z | Model/nets.py | zigoom/DrawAndPainting_Pytorch | 690de052f1ef1f9b5dc4012a003e87200d6ba892 | [
"Apache-2.0"
] | 1 | 2019-06-07T23:58:35.000Z | 2019-06-07T23:58:35.000Z | Model/nets.py | zigoom/DrawAndPainting_Pytorch | 690de052f1ef1f9b5dc4012a003e87200d6ba892 | [
"Apache-2.0"
] | 7 | 2020-04-15T06:49:19.000Z | 2021-04-29T09:52:08.000Z | import torchvision.models as models
import torch.nn as nn
import torch.nn.functional as F
def resnet18(numclasses, pretrained=False):
model = models.resnet18(pretrained)
conv1_out_channels = model.conv1.out_channels
model.conv1 = nn.Conv2d(1, conv1_out_channels, kernel_size=3,
... | 29.261538 | 65 | 0.59306 |
7947b2003e60d0eabdcadcd1bba4277a7bdd8720 | 3,710 | py | Python | microsoft/testsuites/xdp/common.py | srveniga/lisa | 0b5bcf028ed4211d79ff90b9f915981c426baab4 | [
"MIT"
] | null | null | null | microsoft/testsuites/xdp/common.py | srveniga/lisa | 0b5bcf028ed4211d79ff90b9f915981c426baab4 | [
"MIT"
] | null | null | null | microsoft/testsuites/xdp/common.py | srveniga/lisa | 0b5bcf028ed4211d79ff90b9f915981c426baab4 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import re
from typing import List, Pattern
from lisa import Logger, Node, SkippedException, UnsupportedDistroException
from lisa.nic import NicInfo
from lisa.tools import Echo, Ethtool, Mount
from microsoft.testsuites.xdp.xdpdump import XdpDump
... | 27.686567 | 87 | 0.642857 |
7947b2126fd1c9546c0d37e608e7873bc913c89b | 1,005 | py | Python | login/migrations/0003_auto_20170407_1749.py | aotella/calcoff_backend | 7f25ff494ea2e1e4119fe7450d805c986fa77f0c | [
"Apache-2.0",
"MIT"
] | null | null | null | login/migrations/0003_auto_20170407_1749.py | aotella/calcoff_backend | 7f25ff494ea2e1e4119fe7450d805c986fa77f0c | [
"Apache-2.0",
"MIT"
] | null | null | null | login/migrations/0003_auto_20170407_1749.py | aotella/calcoff_backend | 7f25ff494ea2e1e4119fe7450d805c986fa77f0c | [
"Apache-2.0",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-04-07 17:49
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('login', '0002_auto_20170404_0714'),
]
operations =... | 29.558824 | 103 | 0.587065 |
7947b31a1071a0c2f371350c67208e8296e3a0ed | 10,381 | py | Python | ai_covid_19/transformers/nlp.py | nestauk/ai_covid_19 | 4367b1c7a110094f090167dbe02a1c47ce27e0e9 | [
"MIT"
] | null | null | null | ai_covid_19/transformers/nlp.py | nestauk/ai_covid_19 | 4367b1c7a110094f090167dbe02a1c47ce27e0e9 | [
"MIT"
] | 14 | 2020-06-12T12:02:29.000Z | 2020-06-28T12:45:14.000Z | ai_covid_19/transformers/nlp.py | nestauk/ai_covid_19 | 4367b1c7a110094f090167dbe02a1c47ce27e0e9 | [
"MIT"
] | null | null | null | #Various functions and utilities that we use to work with text
import re
import string
from string import punctuation
from string import digits
import pandas as pd
import numpy as np
from nltk.corpus import stopwords
from sklearn.feature_extraction.text import TfidfVectorizer
from gensim import corpora, models
from nlt... | 28.916435 | 114 | 0.608516 |
7947b3279bbde19392540a8c219832e8c871ccf3 | 11,017 | py | Python | src/gamesbyexample/hexapawn.py | asweigart/gamesbyexample | 222bfc3b15ade1cf3bde158ba72a8b7a969ccc5a | [
"Python-2.0"
] | 83 | 2021-03-01T09:16:07.000Z | 2022-01-04T20:52:42.000Z | src/gamesbyexample/hexapawn.py | asweigart/gamesbyexample | 222bfc3b15ade1cf3bde158ba72a8b7a969ccc5a | [
"Python-2.0"
] | null | null | null | src/gamesbyexample/hexapawn.py | asweigart/gamesbyexample | 222bfc3b15ade1cf3bde158ba72a8b7a969ccc5a | [
"Python-2.0"
] | 9 | 2021-03-01T09:16:18.000Z | 2021-11-21T12:22:03.000Z | """Hexapawn, by Al Sweigart al@inventwithpython.com
A pawn-only chess variant where you must try to move one of your
pawns to the opposite end of the board. You also win if you block
your opponent from making a move. The original Hexapawn had a 3x3
board with six pawns, but this program lets you use boards of any
size.... | 36.359736 | 73 | 0.588 |
7947b32ee3a7379b2c8e7ebf71723c71392cd4b3 | 70 | py | Python | gpu_test.py | fangchenplus/CarND-Behavioral-Cloning-P3 | 06664d942674d978fe3346e3c168df63ba071f9d | [
"MIT"
] | null | null | null | gpu_test.py | fangchenplus/CarND-Behavioral-Cloning-P3 | 06664d942674d978fe3346e3c168df63ba071f9d | [
"MIT"
] | null | null | null | gpu_test.py | fangchenplus/CarND-Behavioral-Cloning-P3 | 06664d942674d978fe3346e3c168df63ba071f9d | [
"MIT"
] | null | null | null | import tensorflow as tf
tf.config.experimental.list_physical_devices() | 35 | 46 | 0.871429 |
7947b3bf08972c42264adde426fb94f43a50092a | 11,245 | py | Python | rf2settings/app_settings.py | tappi287/rf2_video_settings | 6ae73c63f48e6d515a9efb653f236dea0494d9f1 | [
"MIT"
] | 8 | 2020-12-09T17:34:40.000Z | 2022-02-21T10:15:09.000Z | rf2settings/app_settings.py | tappi287/rf2_video_settings | 6ae73c63f48e6d515a9efb653f236dea0494d9f1 | [
"MIT"
] | 11 | 2021-02-27T00:21:47.000Z | 2022-02-25T14:41:56.000Z | rf2settings/app_settings.py | tappi287/rf2_video_settings | 6ae73c63f48e6d515a9efb653f236dea0494d9f1 | [
"MIT"
] | 2 | 2021-06-28T21:11:53.000Z | 2022-02-06T17:20:18.000Z | import json
import logging
from pathlib import Path, WindowsPath
from shutil import copyfile
from typing import Iterator, Union, Dict
from .globals import get_settings_dir, SETTINGS_FILE_NAME, SETTINGS_CONTENT_FILE_NAME, get_default_presets_dir, \
get_present_mon_bin
from .preset.preset_base import PRESET_TYPES
fr... | 35.698413 | 117 | 0.601334 |
7947b45b7b951a9404bdb37be9e7e5724f21040e | 3,339 | py | Python | data/p2DJ/New/program/qiskit/simulator/startQiskit332.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/qiskit/simulator/startQiskit332.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/qiskit/simulator/startQiskit332.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=2
# total number=19
import cirq
import qiskit
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy a... | 29.034783 | 82 | 0.627134 |
7947b658367cacd53f1d800ebdf48de1f7d790da | 455 | py | Python | asyncmy/structs.py | kijk2869/asyncmy | 02e5daa901898dc134bfa5ef56183ca6e7665242 | [
"Apache-2.0"
] | 82 | 2021-02-08T03:38:44.000Z | 2022-03-23T02:14:36.000Z | asyncmy/structs.py | kijk2869/asyncmy | 02e5daa901898dc134bfa5ef56183ca6e7665242 | [
"Apache-2.0"
] | 32 | 2021-03-16T07:30:35.000Z | 2022-03-31T22:38:00.000Z | asyncmy/structs.py | kijk2869/asyncmy | 02e5daa901898dc134bfa5ef56183ca6e7665242 | [
"Apache-2.0"
] | 11 | 2021-03-16T08:54:46.000Z | 2022-03-31T13:24:13.000Z | import struct
h = struct.Struct("<h")
I = struct.Struct("<I") # noqa
H = struct.Struct("<H")
Q = struct.Struct("<Q")
i = struct.Struct("<i")
B = struct.Struct("!B")
B_ = struct.Struct("B")
HBB = struct.Struct("<HBB")
iB = struct.Struct("<iB")
IIB = struct.Struct("<IIB")
iIB23s = struct.Struct("<iIB23s")
BHHB = struct... | 23.947368 | 37 | 0.635165 |
7947b6f5fb10230306669facd7f77d4901ad9892 | 6,674 | py | Python | networkx-d3-v2/lib/gdata/Crypto/PublicKey/DSA.py | suraj-testing2/Clock_Websites | 0e65331da40cfd3766f1bde17f0a9c7ff6666dea | [
"Apache-2.0"
] | 2,293 | 2015-01-02T12:46:10.000Z | 2022-03-29T09:45:43.000Z | networkx-d3-v2/lib/gdata/Crypto/PublicKey/DSA.py | suraj-testing2/Clock_Websites | 0e65331da40cfd3766f1bde17f0a9c7ff6666dea | [
"Apache-2.0"
] | 315 | 2015-05-31T11:55:46.000Z | 2022-01-12T08:36:37.000Z | networkx-d3-v2/lib/gdata/Crypto/PublicKey/DSA.py | suraj-testing2/Clock_Websites | 0e65331da40cfd3766f1bde17f0a9c7ff6666dea | [
"Apache-2.0"
] | 1,033 | 2015-01-04T07:48:40.000Z | 2022-03-24T09:34:37.000Z |
#
# DSA.py : Digital Signature Algorithm
#
# Part of the Python Cryptography Toolkit
#
# Distribute and use freely; there are no restrictions on further
# dissemination and usage except those imposed by the laws of your
# country of residence. This software is provided "as is" without
# warranty of fitness for use... | 27.924686 | 96 | 0.570722 |
7947b7bf595fbf238505e34b1da412454050320c | 15,180 | py | Python | library/juniper_junos_pmtud.py | janul/ansible-junos-stdlib | 5c7ff7c880fffe741b96cc6705acaca0e617e1a1 | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2015-10-01T21:55:22.000Z | 2016-06-21T13:45:16.000Z | library/juniper_junos_pmtud.py | janul/ansible-junos-stdlib | 5c7ff7c880fffe741b96cc6705acaca0e617e1a1 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | library/juniper_junos_pmtud.py | janul/ansible-junos-stdlib | 5c7ff7c880fffe741b96cc6705acaca0e617e1a1 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2018-02-17T09:49:15.000Z | 2018-02-17T09:49:15.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 1999-2018, Juniper Networks Inc.
# 2017, Martin Komon
#
# All rights reserved.
#
# License: Apache 2.0
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | 36.934307 | 96 | 0.627866 |
7947b7c2f6b143e49d4d083d5bdaffad71c7bd2c | 7,084 | py | Python | lib/python3.6/site-packages/statsmodels/sandbox/pca.py | KshitizSharmaV/Quant_Platform_Python | d784aa0604d8de5ba5ca0c3a171e3556c0cd6b39 | [
"BSD-3-Clause"
] | 1 | 2020-05-09T08:42:52.000Z | 2020-05-09T08:42:52.000Z | statsmodels/sandbox/pca.py | yanzhenxiong/statsmodels | e56c4046ff8807c3c16d6a9293b5cb5dfe6f0cd0 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/sandbox/pca.py | yanzhenxiong/statsmodels | e56c4046ff8807c3c16d6a9293b5cb5dfe6f0cd0 | [
"BSD-3-Clause"
] | 1 | 2020-05-09T08:42:58.000Z | 2020-05-09T08:42:58.000Z | #Copyright (c) 2008 Erik Tollerud (etolleru@uci.edu)
from statsmodels.compat.python import zip
import numpy as np
class Pca(object):
"""
A basic class for Principal Component Analysis (PCA).
p is the number of dimensions, while N is the number of data points
"""
_colors=('r','g','b','c','y','m',... | 31.207048 | 112 | 0.547149 |
7947ba368134e90b18c9e3ebc80b8cd2b310bbbd | 1,375 | py | Python | dnm_cohorts/de_novos/mcrae_nature.py | jeremymcrae/dnm_cohorts | e968357797d2d370b44904129c32c2e74b36b903 | [
"MIT"
] | 1 | 2020-12-10T05:17:21.000Z | 2020-12-10T05:17:21.000Z | dnm_cohorts/de_novos/mcrae_nature.py | jeremymcrae/dnm_cohorts | e968357797d2d370b44904129c32c2e74b36b903 | [
"MIT"
] | null | null | null | dnm_cohorts/de_novos/mcrae_nature.py | jeremymcrae/dnm_cohorts | e968357797d2d370b44904129c32c2e74b36b903 | [
"MIT"
] | null | null | null |
import logging
import pandas
from dnm_cohorts.de_novo import DeNovo
url = 'https://static-content.springer.com/esm/art%3A10.1038%2Fnature21062/MediaObjects/41586_2017_BFnature21062_MOESM34_ESM.xlsx'
async def mcrae_nature_de_novos(result):
""" load de novo mutations from McRae et al Nature 2017
These ... | 31.976744 | 130 | 0.648 |
7947ba5ccef07479a0c1a96188c72f3047b56e6f | 2,768 | py | Python | tests/components/recorder/test_migrate.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 23 | 2017-11-15T21:03:53.000Z | 2021-03-29T21:33:48.000Z | tests/components/recorder/test_migrate.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 9 | 2022-01-27T06:32:10.000Z | 2022-03-31T07:07:51.000Z | tests/components/recorder/test_migrate.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 10 | 2018-01-01T00:12:51.000Z | 2021-12-21T23:08:05.000Z | """The tests for the Recorder component."""
# pylint: disable=protected-access
from unittest.mock import call, patch
import pytest
from sqlalchemy import create_engine
from sqlalchemy.pool import StaticPool
from homeassistant.bootstrap import async_setup_component
from homeassistant.components.recorder import const, ... | 35.037975 | 84 | 0.714595 |
7947ba7599980a6f39df83cb589751e2a9273537 | 7,437 | py | Python | homeassistant/components/apcupsd/sensor.py | zcmosz/home-assistant | 58b4efe880478f8c66f0bf53e957268667301220 | [
"Apache-2.0"
] | 1 | 2021-01-10T05:35:53.000Z | 2021-01-10T05:35:53.000Z | homeassistant/components/apcupsd/sensor.py | zcmosz/home-assistant | 58b4efe880478f8c66f0bf53e957268667301220 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/apcupsd/sensor.py | zcmosz/home-assistant | 58b4efe880478f8c66f0bf53e957268667301220 | [
"Apache-2.0"
] | 1 | 2020-02-24T16:17:42.000Z | 2020-02-24T16:17:42.000Z | """Support for APCUPSd sensors."""
import logging
from apcaccess.status import ALL_UNITS
import voluptuous as vol
from homeassistant.components import apcupsd
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_RESOURCES,
POWER_WATT,
TEMP_CELSIUS,
TIME_MI... | 38.138462 | 79 | 0.603738 |
7947baf4d75b9926705793127085229eca7bbc38 | 1,636 | py | Python | python_modules/libraries/dagster-azure/dagster_azure_tests/adls2_tests/test_object_store.py | sd2k/dagster | d15542e2be374a0c35f2b1623c1fff98f002c605 | [
"Apache-2.0"
] | 1 | 2021-05-13T08:42:14.000Z | 2021-05-13T08:42:14.000Z | python_modules/libraries/dagster-azure/dagster_azure_tests/adls2_tests/test_object_store.py | sd2k/dagster | d15542e2be374a0c35f2b1623c1fff98f002c605 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-azure/dagster_azure_tests/adls2_tests/test_object_store.py | sd2k/dagster | d15542e2be374a0c35f2b1623c1fff98f002c605 | [
"Apache-2.0"
] | null | null | null | from dagster_azure.adls2 import ADLS2ObjectStore, FakeADLS2ServiceClient
from dagster_azure.blob import FakeBlobServiceClient
from dagster.core.storage.object_store import DEFAULT_SERIALIZATION_STRATEGY
def test_adls2_object_store(
storage_account, credential, file_system, caplog
): # pylint: disable=too-many-f... | 38.952381 | 86 | 0.75978 |
7947bb0d11fb366733d12a5ccd730fa1fb04d588 | 565 | py | Python | Minimizing height of the maximum difference of array/minmax.py | sparkingdark/450cracker | 7aa62d0321e30998ced9a7a1c586e4c6395e1dcd | [
"Unlicense"
] | null | null | null | Minimizing height of the maximum difference of array/minmax.py | sparkingdark/450cracker | 7aa62d0321e30998ced9a7a1c586e4c6395e1dcd | [
"Unlicense"
] | null | null | null | Minimizing height of the maximum difference of array/minmax.py | sparkingdark/450cracker | 7aa62d0321e30998ced9a7a1c586e4c6395e1dcd | [
"Unlicense"
] | null | null | null | def min_max_diff(arr,n,k):
if n==1:
return 0
arr.sort()
ans = arr[n-1]-arr[0]
small = arr[0]+k
big = arr[n-1]-k
if small>big:
small,big = big,small
for i in range(1,n-1):
subtract = arr[i]-k
add = arr[i]+k
if subtract>=small or add<=big:
... | 17.121212 | 70 | 0.481416 |
7947bb4b1af359cd46f63a4be04019e30c84a3c3 | 12,064 | py | Python | sdk/python/pulumi_azure_native/recoveryservices/v20180710/replication_migration_item.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/recoveryservices/v20180710/replication_migration_item.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/recoveryservices/v20180710/replication_migration_item.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 46.045802 | 830 | 0.672994 |
7947bcefd76bec5a4a2d0b2e086501f4c8be42b6 | 4,898 | py | Python | nextdl/extractor/r7.py | devenu85/nextdl | 0b458f556e2e0be80cb94bd9a9b1405ad2e9182d | [
"MIT"
] | 1 | 2021-12-19T13:55:20.000Z | 2021-12-19T13:55:20.000Z | nextdl/extractor/r7.py | devenu85/nextdl | 0b458f556e2e0be80cb94bd9a9b1405ad2e9182d | [
"MIT"
] | null | null | null | nextdl/extractor/r7.py | devenu85/nextdl | 0b458f556e2e0be80cb94bd9a9b1405ad2e9182d | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
from ..utils import int_or_none
from .common import InfoExtractor
class R7IE(InfoExtractor):
_VALID_URL = r"""(?x)
https?://
(?:
(?:[a-zA-Z]+)\.r7\.com(?:/[^/]+)+/idmedia/|
... | 37.968992 | 528 | 0.535321 |
7947bd40e22d9e4b37ccabdbcd493cfa926a33a7 | 154 | py | Python | 001146StepikPyBegin/Stepik001146PyBeginсh07p06st10CODE06_20210122.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | 001146StepikPyBegin/Stepik001146PyBeginсh07p06st10CODE06_20210122.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | 001146StepikPyBegin/Stepik001146PyBeginсh07p06st10CODE06_20210122.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | '''
Будет ли выполнен блок кода else, в приведенном ниже фрагменте кода?
'''
n = 0
while n < 10:
n += 2
print(n)
else:
print('Цикл завершен.') | 17.111111 | 68 | 0.616883 |
7947bef84ff372a56373786d113a400945a3f635 | 1,237 | py | Python | indra/tests/test_rlimsp.py | zebulon2/indra | 7727ddcab52ad8012eb6592635bfa114e904bd48 | [
"BSD-2-Clause"
] | 136 | 2016-02-11T22:06:37.000Z | 2022-03-31T17:26:20.000Z | indra/tests/test_rlimsp.py | zebulon2/indra | 7727ddcab52ad8012eb6592635bfa114e904bd48 | [
"BSD-2-Clause"
] | 748 | 2016-02-03T16:27:56.000Z | 2022-03-09T14:27:54.000Z | indra/tests/test_rlimsp.py | zebulon2/indra | 7727ddcab52ad8012eb6592635bfa114e904bd48 | [
"BSD-2-Clause"
] | 56 | 2015-08-28T14:03:44.000Z | 2022-02-04T06:15:55.000Z | import os
import unittest
from indra.sources import rlimsp
@unittest.skip('RLIMS-P webservice is down')
def test_simple_usage():
rp = rlimsp.process_from_webservice('PMC3717945')
stmts = rp.statements
assert len(stmts) == 33, len(stmts)
for s in stmts:
assert len(s.evidence) == 1, "Wrong amount... | 32.552632 | 65 | 0.674212 |
7947c1b19c4f586a75a08e6b43de40904814495f | 10,443 | py | Python | plugins/modules/wiring_validate.py | realnirmal/dellemc.os10 | 5f6d7d969fad78824c35a6853e06a3cae15e4e2d | [
"Apache-2.0"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | plugins/modules/wiring_validate.py | realnirmal/dellemc.os10 | 5f6d7d969fad78824c35a6853e06a3cae15e4e2d | [
"Apache-2.0"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | plugins/modules/wiring_validate.py | realnirmal/dellemc.os10 | 5f6d7d969fad78824c35a6853e06a3cae15e4e2d | [
"Apache-2.0"
] | 3 | 2020-03-16T06:48:29.000Z | 2020-04-30T06:24:41.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__copyright__ = "(c) 2020 Dell Inc. or its subsidiaries. All rights reserved."
__metaclass__ = type
DOCUMENTATION ... | 42.279352 | 139 | 0.53385 |
7947c1b2634a0800781b94e29392cccb39e18d78 | 2,447 | py | Python | pydoof/helpers.py | EnriqueSoria/pydoof | e5a2b7129e6c18e92b69501946be35cd386fcb47 | [
"MIT"
] | null | null | null | pydoof/helpers.py | EnriqueSoria/pydoof | e5a2b7129e6c18e92b69501946be35cd386fcb47 | [
"MIT"
] | null | null | null | pydoof/helpers.py | EnriqueSoria/pydoof | e5a2b7129e6c18e92b69501946be35cd386fcb47 | [
"MIT"
] | null | null | null | """
Collection of functions to assist PyDoof modules.
"""
from collections import Iterable
from datetime import date
from enum import Enum
from typing import Any, List
def parse_query_params(params):
"""
Parses a query-parameters dictionary into their proper parameters schema.
Each key value of the dicti... | 30.974684 | 78 | 0.616673 |
7947c1dbc09f433e39f61b171aefe7d0e3bca890 | 263 | py | Python | The fizzbuzz.py | Nadeemk07/The-FizzBuzz-Game | e63688d63c3c9c3f38b21070ce8b0d0269c1a8f8 | [
"MIT"
] | null | null | null | The fizzbuzz.py | Nadeemk07/The-FizzBuzz-Game | e63688d63c3c9c3f38b21070ce8b0d0269c1a8f8 | [
"MIT"
] | null | null | null | The fizzbuzz.py | Nadeemk07/The-FizzBuzz-Game | e63688d63c3c9c3f38b21070ce8b0d0269c1a8f8 | [
"MIT"
] | null | null | null | # the code starts here
for number in range(1, 101):
if number % 3 == 0 and number % 5 == 0:
print("Fizz Buzz")
elif number % 3 == 0:
print("fizz")
elif number % 5 == 0:
print("buzz")
else:
print(number)
| 21.916667 | 44 | 0.486692 |
7947c2e034e6a77465faa03ebd6d37be73f54105 | 569 | py | Python | pytube/__init__.py | programwithrey/pytube | 8883b154c6b4f42a0d9e920dada501ef13ff5a1c | [
"MIT-0"
] | 5 | 2021-01-26T08:39:47.000Z | 2021-01-30T00:34:43.000Z | pytube/__init__.py | programwithrey/pytube | 8883b154c6b4f42a0d9e920dada501ef13ff5a1c | [
"MIT-0"
] | 2 | 2021-04-06T18:35:52.000Z | 2021-06-02T03:55:13.000Z | pytube/__init__.py | programwithrey/pytube | 8883b154c6b4f42a0d9e920dada501ef13ff5a1c | [
"MIT-0"
] | null | null | null | # -*- coding: utf-8 -*-
# flake8: noqa: F401
# noreorder
"""
Pytube: a very serious Python library for downloading YouTube Videos.
"""
__title__ = "pytube"
__author__ = "Nick Ficano, Harold Martin"
__license__ = "MIT License"
__copyright__ = "Copyright 2019 Nick Ficano"
__js__ = None
__js_url__ = None
from pytube.vers... | 27.095238 | 69 | 0.787346 |
7947c2f3dc1e553f54c9dd62754073e1ec9a98cd | 10,451 | py | Python | pytorch_widedeep/models/text/stacked_attentive_rnn.py | TangleSpace/pytorch-widedeep | ccc55a15c1b3205ffc8c054abc5cd25cba9ccdff | [
"MIT"
] | null | null | null | pytorch_widedeep/models/text/stacked_attentive_rnn.py | TangleSpace/pytorch-widedeep | ccc55a15c1b3205ffc8c054abc5cd25cba9ccdff | [
"MIT"
] | null | null | null | pytorch_widedeep/models/text/stacked_attentive_rnn.py | TangleSpace/pytorch-widedeep | ccc55a15c1b3205ffc8c054abc5cd25cba9ccdff | [
"MIT"
] | null | null | null | import warnings
import numpy as np
import torch
from torch import nn
from pytorch_widedeep.wdtypes import * # noqa: F403
from pytorch_widedeep.models.text._encoders import ContextAttentionEncoder
from pytorch_widedeep.models.tabular.mlp._layers import MLP
class StackedAttentiveRNN(nn.Module):
r"""Text classifi... | 37.458781 | 91 | 0.6031 |
7947c3ad6deb6d12b751307d2fa7af5bef1809e0 | 6,289 | py | Python | homeassistant/components/tradfri/config_flow.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 6 | 2016-11-25T06:36:27.000Z | 2021-11-16T11:20:23.000Z | homeassistant/components/tradfri/config_flow.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 58 | 2020-08-03T07:33:02.000Z | 2022-03-31T06:02:05.000Z | homeassistant/components/tradfri/config_flow.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 14 | 2018-08-19T16:28:26.000Z | 2021-09-02T18:26:53.000Z | """Config flow for Tradfri."""
import asyncio
from uuid import uuid4
import async_timeout
from pytradfri import Gateway, RequestError
from pytradfri.api.aiocoap_api import APIFactory
import voluptuous as vol
from homeassistant import config_entries
from .const import (
CONF_GATEWAY_ID,
CONF_HOST,
CONF_ID... | 31.288557 | 86 | 0.613929 |
7947c408025eacd4581048e9f5f63fb1130a354a | 1,766 | py | Python | pygame_demos2/world.py | chivitc1/pygamedemo | e1515ed9b94171a9e61a92ecec9da8cdcbe0efde | [
"MIT"
] | null | null | null | pygame_demos2/world.py | chivitc1/pygamedemo | e1515ed9b94171a9e61a92ecec9da8cdcbe0efde | [
"MIT"
] | null | null | null | pygame_demos2/world.py | chivitc1/pygamedemo | e1515ed9b94171a9e61a92ecec9da8cdcbe0efde | [
"MIT"
] | null | null | null | import pygame
from pygame_demos2.vector2 import Vector2
class World:
SCR_SIZE = SRC_W, SRC_H = 640, 480
BACKGROUND_COLOR = (255, 255, 255)
NEST_POSITION = (SRC_W//2, SRC_H//2)
NEST_SIZE = 80.0
def __init__(self):
self.entities = {}
self.last_entity_id = 0
# Draw the nest... | 32.109091 | 101 | 0.63137 |
7947c42ec231c4d4528e5bfa6744c0b7c559e0aa | 1,985 | py | Python | models/sem_ch_graph_conv.py | fullmoonhalf/SemGCN | ce1dce98f8b7cc600ba7e733d17d71192c24b596 | [
"Apache-2.0"
] | 384 | 2019-06-21T18:27:20.000Z | 2022-03-29T06:22:46.000Z | models/sem_ch_graph_conv.py | fullmoonhalf/SemGCN | ce1dce98f8b7cc600ba7e733d17d71192c24b596 | [
"Apache-2.0"
] | 52 | 2019-07-12T12:39:16.000Z | 2021-12-18T15:18:45.000Z | models/sem_ch_graph_conv.py | fullmoonhalf/SemGCN | ce1dce98f8b7cc600ba7e733d17d71192c24b596 | [
"Apache-2.0"
] | 82 | 2019-06-26T07:51:52.000Z | 2022-02-27T10:40:27.000Z | from __future__ import absolute_import, division
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class SemCHGraphConv(nn.Module):
"""
Semantic channel-wise graph convolution layer
"""
def __init__(self, in_features, out_features, adj, bias=True):
super(SemCHGra... | 36.759259 | 109 | 0.606045 |
7947c59429e8044841971e29c9e8dee145f96c9b | 87 | py | Python | src/hedm/metrics.py | csm-adapt/hedm | 33a4983d914ce8873d23ca2fcae14c0d6e162e0d | [
"MIT"
] | null | null | null | src/hedm/metrics.py | csm-adapt/hedm | 33a4983d914ce8873d23ca2fcae14c0d6e162e0d | [
"MIT"
] | null | null | null | src/hedm/metrics.py | csm-adapt/hedm | 33a4983d914ce8873d23ca2fcae14c0d6e162e0d | [
"MIT"
] | null | null | null | __author__ = "Branden Kappes"
__package__ = "hedm"
import numpy as np
def probable
| 9.666667 | 29 | 0.735632 |
7947c6bf7263e49c5a263f3d283dc112a25f64cb | 8,723 | py | Python | contrib/linearize/linearize-data.py | ashleyholman/bitcoin | 5121c68657fb90baa50b709adcc48348c4876783 | [
"MIT"
] | 1,422 | 2016-03-22T19:43:18.000Z | 2021-07-23T02:20:42.000Z | contrib/linearize/linearize-data.py | ashleyholman/bitcoin | 5121c68657fb90baa50b709adcc48348c4876783 | [
"MIT"
] | 91 | 2016-10-13T19:32:42.000Z | 2020-12-13T09:00:23.000Z | contrib/linearize/linearize-data.py | ashleyholman/bitcoin | 5121c68657fb90baa50b709adcc48348c4876783 | [
"MIT"
] | 73 | 2016-10-05T02:40:28.000Z | 2022-02-01T17:55:40.000Z | #!/usr/bin/python
#
# linearize-data.py: Construct a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import print_func... | 28.884106 | 108 | 0.687722 |
7947c6c4e743987d9f5ccc07ea3954b48f01c2ba | 1,000 | py | Python | tests/test_plugins.py | kevincarrogan/mistune | 5baf7bd007b6da8c9e751bed2a4f3e54824fba52 | [
"BSD-3-Clause"
] | null | null | null | tests/test_plugins.py | kevincarrogan/mistune | 5baf7bd007b6da8c9e751bed2a4f3e54824fba52 | [
"BSD-3-Clause"
] | null | null | null | tests/test_plugins.py | kevincarrogan/mistune | 5baf7bd007b6da8c9e751bed2a4f3e54824fba52 | [
"BSD-3-Clause"
] | null | null | null | from mistune import Markdown, AstRenderer, HTMLRenderer, plugins
from tests import BaseTestCase, fixtures
def load_plugin(plugin_name, ast=False):
_plugin = getattr(plugins, "plugin_{}".format(plugin_name))
class TestPlugin(BaseTestCase):
md = Markdown(renderer=HTMLRenderer(escape=False), plugins=[_p... | 32.258065 | 77 | 0.72 |
7947c724860f4913e26b3c7f95b3de922e0f9551 | 5,669 | py | Python | mmdetection/third_party/text_perceptron/mmdet/models/detectors/text_perceptron_det.py | chengzhanzhan/DAVAR-Lab-OCR | 79776915c616731698d452d935e7b599b1ce46f0 | [
"Apache-2.0"
] | 4 | 2021-07-08T03:08:16.000Z | 2022-03-20T02:53:29.000Z | mmdetection/third_party/text_perceptron/mmdet/models/detectors/text_perceptron_det.py | chengzhanzhan/DAVAR-Lab-OCR | 79776915c616731698d452d935e7b599b1ce46f0 | [
"Apache-2.0"
] | null | null | null | mmdetection/third_party/text_perceptron/mmdet/models/detectors/text_perceptron_det.py | chengzhanzhan/DAVAR-Lab-OCR | 79776915c616731698d452d935e7b599b1ce46f0 | [
"Apache-2.0"
] | null | null | null | """
##################################################################################################
# Copyright Info : Copyright (c) Davar Lab @ Hikvision Research Institute. All rights reserved.
# Filename : text_perceptron_det.py
# Abstract : the main pipeline definition of tp_det model
# Cur... | 31.848315 | 112 | 0.566414 |
7947c93e64a4fbfdadefedc2346f85578e6c8d12 | 549 | py | Python | dia_2/simple_flask.py | mariogen/curso_python | 767512edd07ee02f72293f539aa61b73e1dfe78d | [
"MIT"
] | null | null | null | dia_2/simple_flask.py | mariogen/curso_python | 767512edd07ee02f72293f539aa61b73e1dfe78d | [
"MIT"
] | null | null | null | dia_2/simple_flask.py | mariogen/curso_python | 767512edd07ee02f72293f539aa61b73e1dfe78d | [
"MIT"
] | null | null | null | from flask import Flask, request, render_template
import json
app = Flask(__name__)
@app.route("/hello")
def hello():
return "Hello World!"
@app.route("/sum/<a>/<b>")
def sum(a,b):
return str(int(a)+int(b))
@app.route("/operations",methods=['POST'])
def operations():
a,b = request.json['a... | 22.875 | 50 | 0.52459 |
7947cad8dbd8fa7159010bdd0bb66eb3dddd9601 | 216 | py | Python | app/defaults/AB_Test/set_reward.py | bartfrenk/streamingbandit | 4237a05b439c2c12912e813f0b76ccf8af382aef | [
"MIT"
] | 64 | 2017-05-21T06:08:57.000Z | 2022-01-25T14:44:54.000Z | app/defaults/AB_Test/set_reward.py | bartfrenk/streamingbandit | 4237a05b439c2c12912e813f0b76ccf8af382aef | [
"MIT"
] | 76 | 2017-05-04T10:30:59.000Z | 2020-05-07T06:43:03.000Z | app/defaults/AB_Test/set_reward.py | bartfrenk/streamingbandit | 4237a05b439c2c12912e813f0b76ccf8af382aef | [
"MIT"
] | 12 | 2017-05-04T13:10:23.000Z | 2020-02-22T17:12:49.000Z | # -*- coding: utf-8 -*-
prop = base.Proportion(self.get_theta(key="treatment", value=self.action["treatment"]))
prop.update(self.reward["value"])
self.set_theta(prop, key="treatment", value=self.action["treatment"])
| 43.2 | 87 | 0.717593 |
7947cb61c910e429036f18962a447e9df0ae9ab2 | 549 | py | Python | data_types.py | natewachter/astr-119-session-3 | 0c26350d543195c6a593eef1a6f590ca35644ca2 | [
"MIT"
] | null | null | null | data_types.py | natewachter/astr-119-session-3 | 0c26350d543195c6a593eef1a6f590ca35644ca2 | [
"MIT"
] | null | null | null | data_types.py | natewachter/astr-119-session-3 | 0c26350d543195c6a593eef1a6f590ca35644ca2 | [
"MIT"
] | null | null | null | import numpy as np
#integers
i = 10 # integer
print("The data type of i is ",type(i)) # integer
a_i = np.zeros(i,dtype=int) # declare an array of zeros
print("The data type of a_i is ",type(a_i)) #np.ndarray
print("The data type of a_i[0] is", type(a_i[0])) #int64
#floats
x = 119.0
print("The data type... | 22.875 | 58 | 0.648452 |
7947cc082d1881f0e8a0f7ca90ba880f1f37a60d | 88 | py | Python | baekjoon/math/5596-total-score.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | 2 | 2019-02-08T01:23:07.000Z | 2020-11-19T12:23:52.000Z | baekjoon/math/5596-total-score.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | null | null | null | baekjoon/math/5596-total-score.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | null | null | null | a = sum(map(int, input().split()))
b = sum(map(int, input().split()))
print (max(a, b))
| 22 | 34 | 0.568182 |
7947cc15cdd371fc15a7a007d64c9bf4eeadf3f8 | 3,409 | py | Python | xrpl/asyncio/transaction/reliable_submission.py | SubCODERS/xrpl-py | 24a02d099002625794f5b6491ec2cafd872cc721 | [
"ISC"
] | 1 | 2022-03-11T07:01:02.000Z | 2022-03-11T07:01:02.000Z | xrpl/asyncio/transaction/reliable_submission.py | SubCODERS/xrpl-py | 24a02d099002625794f5b6491ec2cafd872cc721 | [
"ISC"
] | null | null | null | xrpl/asyncio/transaction/reliable_submission.py | SubCODERS/xrpl-py | 24a02d099002625794f5b6491ec2cafd872cc721 | [
"ISC"
] | 1 | 2022-01-28T14:12:57.000Z | 2022-01-28T14:12:57.000Z | """High-level reliable submission methods with XRPL transactions."""
import asyncio
from typing import Any, Dict, cast
from typing_extensions import Final
from xrpl.asyncio.clients import Client
from xrpl.asyncio.ledger import get_latest_validated_ledger_sequence
from xrpl.asyncio.transaction.ledger import get_trans... | 37.461538 | 87 | 0.75418 |
7947cc7a7beeb68ddeedac6b2c608e61277ceacf | 6,727 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/avi/avi_applicationpersistenceprofile.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/avi/avi_applicationpersistenceprofile.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/avi/avi_applicationpersistenceprofile.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | 39.804734 | 154 | 0.673554 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.