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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
98d27e1afae7e20a55ab580a59b04b651b094b02 | 2,382 | py | Python | cnns/grad_simple.py | nilsgumpfer/predictiveanalytics2021 | 27ec7a48cecfeb8462b3f3530ee382f564b50712 | [
"MIT"
] | null | null | null | cnns/grad_simple.py | nilsgumpfer/predictiveanalytics2021 | 27ec7a48cecfeb8462b3f3530ee382f564b50712 | [
"MIT"
] | null | null | null | cnns/grad_simple.py | nilsgumpfer/predictiveanalytics2021 | 27ec7a48cecfeb8462b3f3530ee382f564b50712 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import Normalize
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
def plot_function_surface(x1, x2, Z, C, t, cmap='gist_earth'):
fig = plt.figure(figsize=(18, 12))
ax = fig.add_subplot(projection='3d')
vmax = np.m... | 35.029412 | 133 | 0.604954 |
27a6670dde631410fd459ff1779eb90893ae8dba | 9,791 | py | Python | tempest/api/compute/security_groups/test_security_groups_negative.py | anshprat/tempest | 890bf4f03cd8ae4af90fd3c3cd922f76fbbc699f | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/security_groups/test_security_groups_negative.py | anshprat/tempest | 890bf4f03cd8ae4af90fd3c3cd922f76fbbc699f | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/security_groups/test_security_groups_negative.py | anshprat/tempest | 890bf4f03cd8ae4af90fd3c3cd922f76fbbc699f | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Huawei Technologies Co.,LTD.
# 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
#
# Unl... | 46.402844 | 79 | 0.671637 |
62ca46770b8ee696de78e375d0171edf18769ce1 | 6,606 | py | Python | sdk/python/kfp_tekton/compiler/_k8s_helper.py | evan-hataishi/kfp-tekton | 6e1f367841c7add4ca13e5472220939846da81b0 | [
"Apache-2.0"
] | null | null | null | sdk/python/kfp_tekton/compiler/_k8s_helper.py | evan-hataishi/kfp-tekton | 6e1f367841c7add4ca13e5472220939846da81b0 | [
"Apache-2.0"
] | 1 | 2021-05-28T02:56:07.000Z | 2021-05-28T02:56:07.000Z | sdk/python/kfp_tekton/compiler/_k8s_helper.py | evan-hataishi/kfp-tekton | 6e1f367841c7add4ca13e5472220939846da81b0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2020 kubeflow.org.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 32.865672 | 128 | 0.648955 |
ed4c4fb63835cf89255d5176e94997ddc080663c | 1,337 | py | Python | tools/minreq.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 1,345 | 2019-03-03T21:14:14.000Z | 2022-03-31T19:46:39.000Z | tools/minreq.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 3,904 | 2019-03-02T01:30:24.000Z | 2022-03-31T20:17:27.000Z | tools/minreq.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 306 | 2019-03-29T17:09:10.000Z | 2022-03-30T09:54:11.000Z | """
Script to replace minimum requirements with exact requirements in setup.cfg
This ensures that our test matrix includes a version with only the minimum
required versions of packages, and we don't accidentally use features only
available in newer versions.
This script does nothing if the 'MIN_REQ' environment varia... | 30.386364 | 75 | 0.672401 |
e36c11d59cca5a1c9ecf39b21fa9ed07e8d84ed7 | 499 | py | Python | metrics_service.py | MarcinStachowiak/CIFAR-10_challange | 3fd114eddf2577c3b1f718ccba0aacbefc7d26f1 | [
"Apache-2.0"
] | null | null | null | metrics_service.py | MarcinStachowiak/CIFAR-10_challange | 3fd114eddf2577c3b1f718ccba0aacbefc7d26f1 | [
"Apache-2.0"
] | 8 | 2020-01-28T22:07:45.000Z | 2022-02-09T23:29:15.000Z | metrics_service.py | MarcinStachowiak/CIFAR-10_challange | 3fd114eddf2577c3b1f718ccba0aacbefc7d26f1 | [
"Apache-2.0"
] | null | null | null | from sklearn.metrics import matthews_corrcoef
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
__author__ = "Marcin Stachowiak"
__version__ = "1.0"
__email__ = "marcin.stachowiak.ms@gmail.com"
def print_full_metrics(y_true, y_pred):
print('Matthews correlation coefficient (M... | 38.384615 | 91 | 0.775551 |
57788a9d2fca28dd54caf67c4421b5e55e61260e | 16,742 | py | Python | sugartex/_version.py | kiwi0fruit/sugartex | a80aa33d560f8e93dbdfa984bdf3caf3800ea6c6 | [
"MIT"
] | 75 | 2018-05-28T18:01:50.000Z | 2020-11-30T03:28:09.000Z | sugartex/_version.py | kiwi0fruit/sugartex | a80aa33d560f8e93dbdfa984bdf3caf3800ea6c6 | [
"MIT"
] | 9 | 2018-01-24T08:46:35.000Z | 2020-10-19T16:53:59.000Z | sugartex/_version.py | kiwi0fruit/sugartex | a80aa33d560f8e93dbdfa984bdf3caf3800ea6c6 | [
"MIT"
] | 2 | 2018-05-29T09:18:08.000Z | 2019-06-01T03:28:12.000Z |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 34.519588 | 79 | 0.59061 |
797009e558007087d298e132b5069cfbdf667dbf | 3,384 | py | Python | tensorflow_asr/optimizers/schedules.py | joaoalvarenga/TensorFlowASR | 3e303b6693bcb7afd5e94858ac8ace89b6426b50 | [
"Apache-2.0"
] | 1 | 2020-10-20T11:42:08.000Z | 2020-10-20T11:42:08.000Z | tensorflow_asr/optimizers/schedules.py | dathudeptrai/TensorFlowASR | 72cd5d2b932d66ddd61e79ab41bb0d64cb8c4919 | [
"Apache-2.0"
] | null | null | null | tensorflow_asr/optimizers/schedules.py | dathudeptrai/TensorFlowASR | 72cd5d2b932d66ddd61e79ab41bb0d64cb8c4919 | [
"Apache-2.0"
] | 1 | 2021-10-16T22:40:42.000Z | 2021-10-16T22:40:42.000Z | # Copyright 2020 Huy Le Nguyen (@usimarit)
#
# 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 ... | 37.6 | 86 | 0.641548 |
a0c08e91184a44dcd47099f3b7b8f38361ced083 | 1,717 | py | Python | tests/test_config.py | dennisdnyce/Questioner | 7d981019786d20ee5352b3379b6c34f3636417c0 | [
"MIT"
] | null | null | null | tests/test_config.py | dennisdnyce/Questioner | 7d981019786d20ee5352b3379b6c34f3636417c0 | [
"MIT"
] | 7 | 2019-01-06T16:12:44.000Z | 2022-03-08T21:09:34.000Z | tests/test_config.py | dennisdnyce/Questioner | 7d981019786d20ee5352b3379b6c34f3636417c0 | [
"MIT"
] | 2 | 2019-01-09T07:04:49.000Z | 2019-01-09T13:08:29.000Z | import pytest
import unittest
from app import create_app
from flask import Flask
import instance
class TestConfig(unittest.TestCase):
''' tests the default configuration environment '''
def test_config(self):
app = Flask(__name__, instance_relative_config=True)
app.config.from_object(instance.... | 39.022727 | 71 | 0.70297 |
ff97f827a83b63ca4d9ce1efdee7f0d7c571789a | 1,041 | py | Python | lib/python2.7/site-packages/openopt/examples/eig_1.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | 5 | 2017-01-23T16:23:43.000Z | 2022-01-20T16:14:06.000Z | lib/python2.7/site-packages/openopt/examples/eig_1.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2015-04-24T06:46:25.000Z | 2015-04-24T06:46:25.000Z | lib/python2.7/site-packages/openopt/examples/eig_1.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | 8 | 2016-05-30T13:35:17.000Z | 2021-06-15T22:24:29.000Z | from openopt import EIG
# create a 5 x 5 matrix
import numpy.random as nr
nr.seed(0)
N = 5
A = nr.rand(N, N)
#define prob
p = EIG(A, goal = {'lm':3}) # search for 3 eigenvalues of largest magnitude
# or goal={'largest magnitude':3}, with or without space inside, case-insensitive
# for whole list of available goals s... | 37.178571 | 96 | 0.637848 |
e455d6d7c17a4014b02d6a79cfebd2173903bb79 | 3,013 | py | Python | skmultilearn/cluster/matrix.py | emrecncelik/scikit-multilearn | 1d7f7b74702cb9a5a8245726bf38e23e1f2f3382 | [
"BSD-2-Clause"
] | 763 | 2015-03-22T18:54:33.000Z | 2022-03-25T07:54:04.000Z | skmultilearn/cluster/matrix.py | emrecncelik/scikit-multilearn | 1d7f7b74702cb9a5a8245726bf38e23e1f2f3382 | [
"BSD-2-Clause"
] | 187 | 2015-01-27T15:06:35.000Z | 2022-03-22T21:41:47.000Z | skmultilearn/cluster/matrix.py | emrecncelik/scikit-multilearn | 1d7f7b74702cb9a5a8245726bf38e23e1f2f3382 | [
"BSD-2-Clause"
] | 157 | 2015-04-13T16:47:36.000Z | 2022-03-17T19:12:59.000Z | from __future__ import absolute_import
import numpy as np
from .base import LabelSpaceClustererBase
from .helpers import _membership_to_list_of_communities
class MatrixLabelSpaceClusterer(LabelSpaceClustererBase):
"""Cluster the label space using a scikit-compatible matrix-based clusterer
Parameters
--... | 36.743902 | 94 | 0.706605 |
e7998ff8fa2540b0e7e6f45e38e677fa7a5dac1f | 668 | py | Python | constant/useragent.py | minghsu/tw_stock_v2.0 | 058e0afb9fc5b5e8936ca88c155829af2a56d4e1 | [
"MIT"
] | 2 | 2018-09-09T00:44:56.000Z | 2018-09-16T06:13:58.000Z | constant/useragent.py | minghsu/tw_stock_v2.0 | 058e0afb9fc5b5e8936ca88c155829af2a56d4e1 | [
"MIT"
] | null | null | null | constant/useragent.py | minghsu/tw_stock_v2.0 | 058e0afb9fc5b5e8936ca88c155829af2a56d4e1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# User Agent
USER_AGENT_LIST = [
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246",
"Mozilla/5.0 (X11; CrOS x86_64 8172.45.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.64 ... | 55.666667 | 134 | 0.691617 |
6c429118a018554ff5ce0122191ec9f060079da6 | 12,638 | py | Python | build/android/incremental_install/installer.py | TwistedCore/external_v8 | c6725dab9be251fbfc6fd7d53c3513a23e78c36c | [
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | build/android/incremental_install/installer.py | TwistedCore/external_v8 | c6725dab9be251fbfc6fd7d53c3513a23e78c36c | [
"BSD-3-Clause"
] | null | null | null | build/android/incremental_install/installer.py | TwistedCore/external_v8 | c6725dab9be251fbfc6fd7d53c3513a23e78c36c | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | #!/usr/bin/env python
#
# Copyright 2015 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.
"""Install *_incremental.apk targets as well as their dependent files."""
import argparse
import glob
import logging
import os
impor... | 39.742138 | 80 | 0.658095 |
bd3b148ac55f24e00450084d57c7a7c6461d2068 | 9,268 | py | Python | atomic_reactor/plugins/pre_fetch_maven_artifacts.py | MartinBasti/atomic-reactor | 4431225c5a474c7f88c63ec1f25216d4b84a0f1d | [
"BSD-3-Clause"
] | null | null | null | atomic_reactor/plugins/pre_fetch_maven_artifacts.py | MartinBasti/atomic-reactor | 4431225c5a474c7f88c63ec1f25216d4b84a0f1d | [
"BSD-3-Clause"
] | null | null | null | atomic_reactor/plugins/pre_fetch_maven_artifacts.py | MartinBasti/atomic-reactor | 4431225c5a474c7f88c63ec1f25216d4b84a0f1d | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2017 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals
import fnmatch
import hashlib
import koji
import os
from atomic_reactor import util
from atomic_reac... | 39.105485 | 99 | 0.618688 |
f68d7069f4b1263b2e0de4ae87329d592f694d91 | 4,488 | py | Python | src/primaires/hook/__init__.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/hook/__init__.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/hook/__init__.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# lis... | 41.174312 | 79 | 0.717023 |
7eae96cb83378f55c28b5ba406eae1585decb9c2 | 8,999 | py | Python | eahub/config/settings.py | sebgrebe/eahub.org | fb17417c1620bf0d06c494208f77a511eb04f000 | [
"MIT"
] | 1 | 2020-12-05T13:10:58.000Z | 2020-12-05T13:10:58.000Z | eahub/config/settings.py | sebgrebe/eahub.org | fb17417c1620bf0d06c494208f77a511eb04f000 | [
"MIT"
] | null | null | null | eahub/config/settings.py | sebgrebe/eahub.org | fb17417c1620bf0d06c494208f77a511eb04f000 | [
"MIT"
] | null | null | null | import environ
from django.core import exceptions
from django.utils.safestring import mark_safe
env = environ.Env()
base_dir = environ.Path(__file__) - 3
# Core settings: cache
CACHES = {
"default": env.cache_url("CACHE_URL", backend="django_redis.cache.RedisCache")
}
# Core settings: database
DATABASES = {
... | 30.299663 | 88 | 0.703189 |
aa886aa2e6ef2267ab86152278e759a725878bb0 | 14,490 | py | Python | Assignment 1/assn1.py | not-cosmo/AER1415-Comp-Opt | 598f6b289385713db1f1c067e1e3a72453ec5c29 | [
"MIT"
] | null | null | null | Assignment 1/assn1.py | not-cosmo/AER1415-Comp-Opt | 598f6b289385713db1f1c067e1e3a72453ec5c29 | [
"MIT"
] | null | null | null | Assignment 1/assn1.py | not-cosmo/AER1415-Comp-Opt | 598f6b289385713db1f1c067e1e3a72453ec5c29 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
""" AER1415 Computer Optimization - Assignment 1
Author: Atilla Saadat
Submitted: Feb 25, 2021
Email: asaadat@utias-sfl.net
Descripton:
"""
from numpy import *
import os
from matplotlib import pyplot as plt
from IPython import embed
from mpl_toolkits import mplot3d
from matplot... | 41.164773 | 267 | 0.62236 |
8c06ceba93896331bcd10d6b6f4f8a4d0f8b9d0f | 465 | py | Python | hail/python/hailtop/aiocloud/aiogoogle/session.py | johnc1231/hail | 3235d42aea8c1a682258493ff77b320025903df3 | [
"MIT"
] | 789 | 2016-09-05T04:14:25.000Z | 2022-03-30T09:51:54.000Z | hail/python/hailtop/aiocloud/aiogoogle/session.py | hail-is/hail | 0d33f03a19084a29bcd0eb4b3b76f7ef7f61198a | [
"MIT"
] | 5,724 | 2016-08-29T18:58:40.000Z | 2022-03-31T23:49:42.000Z | hail/python/hailtop/aiocloud/aiogoogle/session.py | johnc1231/hail | 3235d42aea8c1a682258493ff77b320025903df3 | [
"MIT"
] | 233 | 2016-08-31T20:42:38.000Z | 2022-02-17T16:42:39.000Z | from typing import Mapping, Optional
from ..common import Session as BaseSession
from .credentials import GoogleCredentials
class GoogleSession(BaseSession):
def __init__(self, *, credentials: Optional[GoogleCredentials] = None, params: Optional[Mapping[str, str]] = None, **kwargs):
if credentials is No... | 35.769231 | 129 | 0.741935 |
57a08340e8729b0bfe71917dcc2cdb2c8b50b856 | 17,611 | py | Python | analysis/webservice/algorithms/doms/MatchupQuery.py | mayadebellis/incubator-sdap-nexus | d8942edd3e969d710e4d3c490f04651cb9418673 | [
"Apache-2.0"
] | null | null | null | analysis/webservice/algorithms/doms/MatchupQuery.py | mayadebellis/incubator-sdap-nexus | d8942edd3e969d710e4d3c490f04651cb9418673 | [
"Apache-2.0"
] | null | null | null | analysis/webservice/algorithms/doms/MatchupQuery.py | mayadebellis/incubator-sdap-nexus | d8942edd3e969d710e4d3c490f04651cb9418673 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 38.87638 | 123 | 0.546988 |
20d574fd6073b224eb4c12f3d85ef811f1bce45a | 1,105 | py | Python | qiskit/circuit/classicalfunction/exceptions.py | SpinQTech/SpinQKit | 2e24826688b2b26cf7efa66fd47f0e7ef883a96c | [
"Apache-2.0"
] | 2 | 2021-12-20T05:19:44.000Z | 2021-12-20T05:21:48.000Z | qiskit/circuit/classicalfunction/exceptions.py | SpinQTech/SpinQKit | 2e24826688b2b26cf7efa66fd47f0e7ef883a96c | [
"Apache-2.0"
] | null | null | null | qiskit/circuit/classicalfunction/exceptions.py | SpinQTech/SpinQKit | 2e24826688b2b26cf7efa66fd47f0e7ef883a96c | [
"Apache-2.0"
] | 1 | 2021-12-20T05:20:35.000Z | 2021-12-20T05:20:35.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or deriv... | 30.694444 | 78 | 0.750226 |
94797b5a6fd8f73d50389c94180477a73e747582 | 68 | py | Python | FreeCodeCamp.org/WhileLoop.py | MizaN13/PythonAbc | db8aa05497a6a1bf3eafcfdd6c31880b57e509fb | [
"MIT"
] | null | null | null | FreeCodeCamp.org/WhileLoop.py | MizaN13/PythonAbc | db8aa05497a6a1bf3eafcfdd6c31880b57e509fb | [
"MIT"
] | null | null | null | FreeCodeCamp.org/WhileLoop.py | MizaN13/PythonAbc | db8aa05497a6a1bf3eafcfdd6c31880b57e509fb | [
"MIT"
] | null | null | null | i = 1
while i <= 10:
print(i)
i += 1
print("Done with loop") | 13.6 | 23 | 0.514706 |
6e7ed52ec29f587312a157eaa3cd3f76461f7844 | 1,859 | py | Python | tools/pnnx/tests/ncnn/test_Tensor_reshape.py | zhangtaoshan/ncnn | 73c8de6c4355b2f7cc4e8c52f0dabb7557eda7a0 | [
"BSD-3-Clause"
] | 1 | 2022-03-29T05:45:52.000Z | 2022-03-29T05:45:52.000Z | tools/pnnx/tests/ncnn/test_Tensor_reshape.py | embrace58/ncnn | e8d1d403985945d1fb4f21ff9996b85c23fdb3e5 | [
"BSD-3-Clause"
] | null | null | null | tools/pnnx/tests/ncnn/test_Tensor_reshape.py | embrace58/ncnn | e8d1d403985945d1fb4f21ff9996b85c23fdb3e5 | [
"BSD-3-Clause"
] | null | null | null | # Tencent is pleased to support the open source community by making ncnn available.
#
# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the... | 28.6 | 97 | 0.635826 |
9cd52cffd05412ab429a8e9eac851122cc65ed79 | 616 | py | Python | data-science-essentials-in-python/nltk-basic.py | zzragida/study-datascience | 8de0945fcab1e58e255c59f9fc40aeadf133e75e | [
"MIT"
] | null | null | null | data-science-essentials-in-python/nltk-basic.py | zzragida/study-datascience | 8de0945fcab1e58e255c59f9fc40aeadf133e75e | [
"MIT"
] | null | null | null | data-science-essentials-in-python/nltk-basic.py | zzragida/study-datascience | 8de0945fcab1e58e255c59f9fc40aeadf133e75e | [
"MIT"
] | null | null | null | import nltk
from nltk.tokenize import WordPunctTokenizer
# nltk.download()
def main():
wn = nltk.corpus.wordnet
print(wn.synsets('cat'))
x = wn.synset('cat.n.01')
y = wn.synset('lynx.n.01')
print(x.path_similarity(y))
result = [simxy.definition() for simxy in max(
(x.path_similarity(y... | 22 | 50 | 0.613636 |
1535bafc89862742ce0541e93bdf59f0a2a372e5 | 22,364 | py | Python | source/code/configuration/scheduler_config_builder.py | rackerlabs/aws-instance-scheduler | 3870e417d659d912093cf0401c6999fc8c9e0516 | [
"MIT"
] | null | null | null | source/code/configuration/scheduler_config_builder.py | rackerlabs/aws-instance-scheduler | 3870e417d659d912093cf0401c6999fc8c9e0516 | [
"MIT"
] | null | null | null | source/code/configuration/scheduler_config_builder.py | rackerlabs/aws-instance-scheduler | 3870e417d659d912093cf0401c6999fc8c9e0516 | [
"MIT"
] | 1 | 2019-03-23T15:19:29.000Z | 2019-03-23T15:19:29.000Z | ######################################################################################################################
# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... | 45.455285 | 128 | 0.599759 |
f476e083c9d4c0d5ac5ffbedf49971679e95502a | 2,258 | py | Python | avalon/maya/workio.py | MoonShineVFX/core | 22bdc5b697cb3c67f4e1e0ea15239c14623bf648 | [
"MIT"
] | 6 | 2017-09-13T19:34:57.000Z | 2017-12-02T16:20:00.000Z | avalon/maya/workio.py | MoonShineVFX/core | 22bdc5b697cb3c67f4e1e0ea15239c14623bf648 | [
"MIT"
] | 18 | 2017-09-15T08:23:45.000Z | 2017-11-20T17:49:24.000Z | avalon/maya/workio.py | MoonShineVFX/core | 22bdc5b697cb3c67f4e1e0ea15239c14623bf648 | [
"MIT"
] | 1 | 2019-02-16T07:56:37.000Z | 2019-02-16T07:56:37.000Z | """Host API required Work Files tool"""
import os
from maya import cmds
def file_extensions():
return [".ma", ".mb"]
def dictated_file_extension(session):
if session["AVALON_TASK"] in ("animating",):
return ".mb"
def has_unsaved_changes():
return cmds.file(query=True, modified=True)
def sav... | 29.710526 | 79 | 0.64349 |
826f1c5e53e53248d112373f3ef15ecf70154be7 | 8,524 | py | Python | DataBase.py | Zeebra38/Schedule_bot | 903f7cde755940f226cf8077c2c35550d0291d51 | [
"MIT"
] | null | null | null | DataBase.py | Zeebra38/Schedule_bot | 903f7cde755940f226cf8077c2c35550d0291d51 | [
"MIT"
] | null | null | null | DataBase.py | Zeebra38/Schedule_bot | 903f7cde755940f226cf8077c2c35550d0291d51 | [
"MIT"
] | null | null | null | import sqlite3
from threading import Thread
from SubjestClass import Subject
from UserClass import User
from utils import weeknum
from yadupload import upload_to_disk
from typing import List
class Schedule:
def __init__(self, path='private/rasp.db'):
"""Создание соединения с БД. path - путь к БД. con-соед... | 39.281106 | 109 | 0.528625 |
d450cfdb40c485e0d9dfcf2adb3cb485cd1246db | 133 | py | Python | dataUtils/jsonToFile.py | ichang1/covid-statistics | ea1ef5239bf7b374a6291e8e6b32e273c087fc2e | [
"MIT"
] | 3 | 2021-09-06T04:46:06.000Z | 2021-09-06T19:58:49.000Z | dataUtils/jsonToFile.py | ichang1/covid-tracker-backend | c33dbf671684365a950d2c179fb6cb1042271510 | [
"MIT"
] | 3 | 2021-08-17T23:31:28.000Z | 2021-09-03T21:56:14.000Z | dataUtils/jsonToFile.py | ichang1/covid-tracker-backend | c33dbf671684365a950d2c179fb6cb1042271510 | [
"MIT"
] | null | null | null | import json
def jsonToText(file, jason):
s = json.dumps(jason)
with open(file, 'w') as f:
f.write(s)
f.close()
| 14.777778 | 30 | 0.571429 |
3cec188266881165adc9f0ba6dfcc08d684fcc4a | 132 | py | Python | tools.py | romchegue/Python | 444476088e64d5da66cb00174f3d1d30ebbe38f6 | [
"bzip2-1.0.6"
] | null | null | null | tools.py | romchegue/Python | 444476088e64d5da66cb00174f3d1d30ebbe38f6 | [
"bzip2-1.0.6"
] | null | null | null | tools.py | romchegue/Python | 444476088e64d5da66cb00174f3d1d30ebbe38f6 | [
"bzip2-1.0.6"
] | null | null | null | # file: tools.py
def safe(func, *args):
try:
func(*args)
except:
import sys
print(sys.exc_info())
| 13.2 | 29 | 0.515152 |
3279abea86a665959cd70353b4ffa92844632f0e | 734 | py | Python | tessled/effects/animations/starfield.py | hodgestar/tesseract-control-software | 41f47a4b901a0069f1745c90abe28f0778704b0e | [
"MIT"
] | 2 | 2019-07-13T14:15:30.000Z | 2020-01-04T10:44:47.000Z | tessled/effects/animations/starfield.py | hodgestar/tesseract-control-software | 41f47a4b901a0069f1745c90abe28f0778704b0e | [
"MIT"
] | null | null | null | tessled/effects/animations/starfield.py | hodgestar/tesseract-control-software | 41f47a4b901a0069f1745c90abe28f0778704b0e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Starfield animation.
Many LEDs that turn on and off.
"""
import numpy as np
from ..engine import Animation
class Starfield(Animation):
ANIMATION = __name__
ARGS = {
}
def post_init(self):
self.stars = [[], [], []]
self.n = 100
self.add_star... | 19.837838 | 64 | 0.544959 |
64a5eac1f039a21addecb533d5a00a720d97c3fd | 46,029 | py | Python | app/ui/iptv.py | mapi68/DemonEditor | d8626e63cc6cc8de7469420bcbcf880a15e134fc | [
"MIT"
] | null | null | null | app/ui/iptv.py | mapi68/DemonEditor | d8626e63cc6cc8de7469420bcbcf880a15e134fc | [
"MIT"
] | null | null | null | app/ui/iptv.py | mapi68/DemonEditor | d8626e63cc6cc8de7469420bcbcf880a15e134fc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2018-2022 Dmitriy Yefremov
#
# 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 limitat... | 43.382658 | 119 | 0.636099 |
8d9e01f4c96f8871ffd938a3e805d2a1f1dd95bb | 16,904 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/azure/azcollection/plugins/modules/azure_rm_postgresqlserver.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/azure/azcollection/plugins/modules/azure_rm_postgresqlserver.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/azure/azcollection/plugins/modules/azure_rm_postgresqlserver.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
module: azure_rm_postgresqlser... | 36.747826 | 157 | 0.555076 |
a3390e93fc79b6d69929bb2bb466356e8bf2b7fb | 2,035 | py | Python | hashPy.py | dclopez2013/DFSTools | 299b0395fe8fc088adb7838dd5d7d1b19bd0c9b8 | [
"MIT"
] | null | null | null | hashPy.py | dclopez2013/DFSTools | 299b0395fe8fc088adb7838dd5d7d1b19bd0c9b8 | [
"MIT"
] | null | null | null | hashPy.py | dclopez2013/DFSTools | 299b0395fe8fc088adb7838dd5d7d1b19bd0c9b8 | [
"MIT"
] | null | null | null | import os
import hashlib
import sys
from functools import partial
def hashItOut(file):
hashObj = hashlib.md5()
done= False;
with open(file, 'rb') as file:
while not done:
block = file.read(1024)
if block:
hashObj.update(block)
else:
... | 23.941176 | 70 | 0.545455 |
ef262de3c4e3afb192d685f4a800549e630e7dc1 | 7,244 | py | Python | tests/test_stackrate.py | jmettes/PyRate | 4b61cefca9522f4546cd45e1691eb00d3e10ec34 | [
"Apache-2.0"
] | 1 | 2021-03-22T17:25:55.000Z | 2021-03-22T17:25:55.000Z | tests/test_stackrate.py | jmettes/PyRate | 4b61cefca9522f4546cd45e1691eb00d3e10ec34 | [
"Apache-2.0"
] | null | null | null | tests/test_stackrate.py | jmettes/PyRate | 4b61cefca9522f4546cd45e1691eb00d3e10ec34 | [
"Apache-2.0"
] | null | null | null | # This Python module is part of the PyRate software package.
#
# Copyright 2020 Geoscience Australia
#
# 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/... | 34.331754 | 120 | 0.664688 |
de5d0550d105312f73f505f3ef820ef253f1b18a | 1,018 | py | Python | backend/home/api/v1/viewsets.py | crowdbotics-apps/ideapros-llc-viaggi-32125 | 8749fea0e08f50289cb7a192fd4d923f94770386 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/api/v1/viewsets.py | crowdbotics-apps/ideapros-llc-viaggi-32125 | 8749fea0e08f50289cb7a192fd4d923f94770386 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/api/v1/viewsets.py | crowdbotics-apps/ideapros-llc-viaggi-32125 | 8749fea0e08f50289cb7a192fd4d923f94770386 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from rest_framework.authtoken.serializers import AuthTokenSerializer
from rest_framework.viewsets import ModelViewSet, ViewSet
from rest_framework.authtoken.models import Token
from rest_framework.response import Response
from home.api.v1.serializers import (
SignupSerializer,
UserSerializer,
)
class SignupV... | 32.83871 | 76 | 0.740668 |
9f02521794c1215f92d8516a27cc2d9dea21740e | 131 | py | Python | curso-em-video/ex003.py | Luanlpg/jesonel | 3e2011ff13fee7f10decc8135d488b50ab50cbbc | [
"MIT"
] | null | null | null | curso-em-video/ex003.py | Luanlpg/jesonel | 3e2011ff13fee7f10decc8135d488b50ab50cbbc | [
"MIT"
] | null | null | null | curso-em-video/ex003.py | Luanlpg/jesonel | 3e2011ff13fee7f10decc8135d488b50ab50cbbc | [
"MIT"
] | null | null | null | n1 = int(input('Digite um numero: '))
n2 = int(input('Digite outro numero: '))
soma = n1 + n2
print('A soma vale {}'.format(soma))
| 26.2 | 40 | 0.633588 |
a8819b1753602921d1eb2453c266b1ebd91bd493 | 46,488 | py | Python | plotly/figure_factory/_scatterplot.py | SamLau95/plotly.py | 7dd4ddd4e18e79ff30cec3ef331fa2f8949ed1bd | [
"MIT"
] | null | null | null | plotly/figure_factory/_scatterplot.py | SamLau95/plotly.py | 7dd4ddd4e18e79ff30cec3ef331fa2f8949ed1bd | [
"MIT"
] | 9 | 2020-06-05T20:31:50.000Z | 2022-03-11T23:45:47.000Z | plotly/figure_factory/_scatterplot.py | SamLau95/plotly.py | 7dd4ddd4e18e79ff30cec3ef331fa2f8949ed1bd | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from plotly import exceptions, optional_imports
from plotly.figure_factory import utils
from plotly.graph_objs import graph_objs
from plotly.tools import make_subplots
pd = optional_imports.get_module('pandas')
DIAG_CHOICES = ['scatter', 'histogram', 'box']
VALID_COLORMAP_TYPES... | 40.886544 | 78 | 0.4348 |
3d8e200bb8b99f6c1366b0a59bb9cf205618816f | 35,948 | py | Python | libs/utils/energy_model.py | ADVAN-ELAA-8QM-PRC1/platform-external-lisa | ad62d3bbb2178c1458c466e2e09dfa2060556c37 | [
"Apache-2.0"
] | 2 | 2017-04-20T15:35:19.000Z | 2020-04-29T05:40:02.000Z | libs/utils/energy_model.py | RenderBroken/lisa_toolkit | dde4826139d143a7e712abbbde2a4fa0aacb447e | [
"Apache-2.0"
] | null | null | null | libs/utils/energy_model.py | RenderBroken/lisa_toolkit | dde4826139d143a7e712abbbde2a4fa0aacb447e | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2016, ARM Limited and contributors.
#
# 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
#
# ... | 41.31954 | 82 | 0.6155 |
17c6a8009fe166790780589d21e258e0e3b705af | 1,233 | py | Python | test/test_ezsigndocumentlog_response_compound.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_ezsigndocumentlog_response_compound.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_ezsigndocumentlog_response_compound.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | """
eZmax API Definition (Full)
This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501
The version of the OpenAPI document: 1.1.7
Contact: support-api@ezmax.ca
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import eZmaxApi
from... | 30.073171 | 97 | 0.770479 |
cd426bd9e959a6e929ca55f75b9bb2e816bbb589 | 886 | py | Python | setup.py | naderAbolfazli/bale-bot-python | 1e694adfd0850cb9e288d180ed0231f148f4c223 | [
"Apache-2.0"
] | 24 | 2018-07-08T12:17:55.000Z | 2022-03-05T22:00:28.000Z | setup.py | naderAbolfazli/bale-bot-python | 1e694adfd0850cb9e288d180ed0231f148f4c223 | [
"Apache-2.0"
] | 21 | 2018-08-30T03:18:25.000Z | 2022-03-11T23:36:16.000Z | setup.py | naderAbolfazli/bale-bot-python | 1e694adfd0850cb9e288d180ed0231f148f4c223 | [
"Apache-2.0"
] | 12 | 2018-07-07T08:29:12.000Z | 2022-03-05T22:00:05.000Z | import os
from setuptools import find_packages, setup
here = os.path.abspath(os.path.dirname(__file__))
requires = [
'aiohttp==2.3.7',
'asyncio==3.4.3',
'graypy==0.2.14',
'pillow==5.2.0',
'redis==3.0.1'
]
about = {}
with open(os.path.join(here, 'balebot', '__version__... | 27.6875 | 94 | 0.60158 |
6f1c811c8559345e9851a74980c996c3e47fc694 | 6,270 | py | Python | multi_exp.py | pltrdy/autoalign | 9b17f36282f9be0bbf423840af88dce501b9070f | [
"MIT"
] | 6 | 2020-07-16T01:13:55.000Z | 2020-07-21T01:49:14.000Z | multi_exp.py | pltrdy/autoalign | 9b17f36282f9be0bbf423840af88dce501b9070f | [
"MIT"
] | null | null | null | multi_exp.py | pltrdy/autoalign | 9b17f36282f9be0bbf423840af88dce501b9070f | [
"MIT"
] | 1 | 2020-06-24T11:55:40.000Z | 2020-06-24T11:55:40.000Z | #!/usr/bin/env python
import pickle
import json
import os
import autoalign
# from multiprocessing import Pool
# pathos is less restricting during the serialization
from pathos.multiprocessing import ProcessingPool as Pool
from autoalign.pipeline import instantiate
from grid_search import grid_search_params, subgrid
f... | 33.351064 | 107 | 0.577512 |
a56273bf02083e622c134bf93bc9a9d1871bee86 | 7,927 | py | Python | app/api/controllers/container.py | kylepwarren/lxdui | 140bb80729163dc6aff3260070f68b0303761cfb | [
"Apache-2.0"
] | 589 | 2017-10-22T04:11:08.000Z | 2022-03-26T22:50:30.000Z | app/api/controllers/container.py | kylepwarren/lxdui | 140bb80729163dc6aff3260070f68b0303761cfb | [
"Apache-2.0"
] | 134 | 2017-11-14T02:52:03.000Z | 2022-03-22T12:51:09.000Z | app/api/controllers/container.py | kylepwarren/lxdui | 140bb80729163dc6aff3260070f68b0303761cfb | [
"Apache-2.0"
] | 170 | 2017-10-06T06:22:43.000Z | 2022-03-15T02:12:34.000Z | from flask import Blueprint, request
from flask_jwt_extended import jwt_required
from app.api.schemas.container_schema import doValidate, doValidateCloneMove, doValidateImageExport
from app.api.models.LXCContainer import LXCContainer
from app.api.models.LXDModule import LXDModule
from app.api.utils import response
fro... | 35.075221 | 160 | 0.69812 |
56f2caa97c20a7c30ff07c302b70c6f46d785c17 | 4,424 | py | Python | dataset_script/mrpc_construct.py | TITC/bert | bed2ff5dc4cdf2f01599cfdcb9862f6016bf44f6 | [
"Apache-2.0"
] | null | null | null | dataset_script/mrpc_construct.py | TITC/bert | bed2ff5dc4cdf2f01599cfdcb9862f6016bf44f6 | [
"Apache-2.0"
] | null | null | null | dataset_script/mrpc_construct.py | TITC/bert | bed2ff5dc4cdf2f01599cfdcb9862f6016bf44f6 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import csv
from itertools import combinations
import random
def read_antonym():
# Using readlines()
file1 = open(
'/content/bert/datasets/chinese_dictionary-master/antonym_wy.txt', 'r')
Lines = file1.readlines()
antonyms = []
for line in Lines:
line = line.repla... | 33.515152 | 105 | 0.637884 |
5ec34fce7463c587cfce3ed12e7a5f0ea877ffe6 | 855 | py | Python | Mot.py | Palo-IT/petitext | 9da19c810b957b199eb891cc626e0fd36faffac4 | [
"Apache-2.0"
] | 1 | 2019-02-01T19:44:46.000Z | 2019-02-01T19:44:46.000Z | Mot.py | Palo-IT/petitext | 9da19c810b957b199eb891cc626e0fd36faffac4 | [
"Apache-2.0"
] | null | null | null | Mot.py | Palo-IT/petitext | 9da19c810b957b199eb891cc626e0fd36faffac4 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#!/usr/bin/env python
from nltk.stem.snowball import FrenchStemmer
class Mot:
def __init__(self, label = "", role = "", ner = ""):
self.label = label
self.role = role
self.ner = ner
##print(repr(label))
stemmer = FrenchStemmer()
self.le... | 24.428571 | 91 | 0.521637 |
805694df4478e6d45879db0909ae014c59364b48 | 406 | py | Python | exercises/zh/test_03_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/zh/test_03_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/zh/test_03_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert Doc.has_extension("has_number"), "你有在doc上注册这个扩展吗?"
ext = Doc.get_extension("has_number")
assert ext[2] is not None, "你有正确设置取值器getter吗?"
assert (
"getter=get_has_number" in __solution__
), "你有正确把get_has_number赋给getter吗?"
assert "doc._.has_number" in __solution__, "你有读取到... | 33.833333 | 62 | 0.694581 |
fe3f6ba07d37e077129b9cd8b249c3ac6e66521b | 2,796 | py | Python | website/drawquest/apps/whitelisting/tests.py | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 19 | 2015-11-10T17:36:20.000Z | 2021-04-12T07:36:00.000Z | website/drawquest/apps/whitelisting/tests.py | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 1 | 2021-06-09T03:45:34.000Z | 2021-06-09T03:45:34.000Z | website/drawquest/apps/whitelisting/tests.py | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 6 | 2015-11-11T00:38:38.000Z | 2020-07-25T20:10:08.000Z | import time
from django.conf import settings
from drawquest.tests.tests_helpers import (CanvasTestCase, create_content, create_user, create_group,
create_comment, create_staff, create_quest, create_quest_comment,
create_current_ques... | 39.942857 | 125 | 0.658083 |
b2e040bc03cd8fc7c8499303ed3c156f067770e6 | 10,373 | py | Python | model_ensemble_binary_bidir.py | FreeEnergy/neuramanteau | 7142a2b58792abaefcb968fafd586295b3d94c10 | [
"Apache-2.0"
] | 2 | 2019-08-21T12:42:07.000Z | 2019-09-11T14:35:44.000Z | model_ensemble_binary_bidir.py | FreeEnergy/neuramanteau | 7142a2b58792abaefcb968fafd586295b3d94c10 | [
"Apache-2.0"
] | null | null | null | model_ensemble_binary_bidir.py | FreeEnergy/neuramanteau | 7142a2b58792abaefcb968fafd586295b3d94c10 | [
"Apache-2.0"
] | 2 | 2019-08-21T12:42:22.000Z | 2019-09-13T14:52:16.000Z |
import tensorflow as tf
from tensorflow.python.util import nest
import numpy as np
from params import Hyperparams
from functools import reduce
class Model(object):
"""
The hybrid bidirectional binary encoder decoder model
"""
def __init__(self, hyperparams, vocab_size, num_steps_encoder, num_steps_de... | 53.469072 | 134 | 0.599152 |
017e55d642d5538825c140878f54396db436426d | 19,404 | py | Python | yt/analysis_modules/level_sets/clump_handling.py | kastalpes/yt | b1e197ca84433fbd61eaf44b28ff5cdb37981d4c | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/analysis_modules/level_sets/clump_handling.py | kastalpes/yt | b1e197ca84433fbd61eaf44b28ff5cdb37981d4c | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/analysis_modules/level_sets/clump_handling.py | kastalpes/yt | b1e197ca84433fbd61eaf44b28ff5cdb37981d4c | [
"BSD-3-Clause-Clear"
] | null | null | null | """
Clump finding helper classes
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, yt Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#--------------... | 37.67767 | 85 | 0.551278 |
7c73c19aac5deaa34e50d5d8b700b4966ca7063e | 2,752 | py | Python | src/ggrc/migrations/versions/20131018184243_5aaff2fe5bfc_remove_deprecated_ta.py | Smotko/ggrc-core | b3abb58b24e7559960d71a94ba79c75539e7fe29 | [
"Apache-2.0"
] | null | null | null | src/ggrc/migrations/versions/20131018184243_5aaff2fe5bfc_remove_deprecated_ta.py | Smotko/ggrc-core | b3abb58b24e7559960d71a94ba79c75539e7fe29 | [
"Apache-2.0"
] | 12 | 2015-01-08T14:50:19.000Z | 2017-11-29T19:37:53.000Z | src/ggrc/migrations/versions/20131018184243_5aaff2fe5bfc_remove_deprecated_ta.py | mikecb/ggrc-core | 1cda560cb0920021416e07740c6cca1acba56268 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2015-01-08T13:25:09.000Z | 2015-01-08T13:25:09.000Z | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
"""Remove deprecated tables
Revision ID: 5aaff2fe5bfc
Revises: 307bd54ac651
Cr... | 43.68254 | 97 | 0.714026 |
4b9397298d4fa7fa780cfcd53977375afde3eb5a | 204 | py | Python | Python/14.longest-common-prefix.py | Mo-Shakib/LeetCode | a3f1cfda648d9abf504e9d79697f1ca433c48460 | [
"Apache-2.0"
] | 1 | 2022-01-10T01:10:03.000Z | 2022-01-10T01:10:03.000Z | Python/14.longest-common-prefix.py | Mo-Shakib/LeetCode | a3f1cfda648d9abf504e9d79697f1ca433c48460 | [
"Apache-2.0"
] | 3 | 2022-01-10T18:24:21.000Z | 2022-01-10T22:38:38.000Z | Python/14.longest-common-prefix.py | Mo-Shakib/LeetCode | a3f1cfda648d9abf504e9d79697f1ca433c48460 | [
"Apache-2.0"
] | 2 | 2022-01-10T05:06:22.000Z | 2022-01-14T06:20:09.000Z | #
# @lc app=leetcode id=14 lang=python3
#
# [14] Longest Common Prefix
#
# @lc code=start
class Solution:
def longestCommonPrefix(self, strs: List[str]) -> str:
pass
# @lc code=end
| 14.571429 | 58 | 0.617647 |
65ff307de48c95d9925c5d234ba1a6a2394a4b7d | 1,487 | py | Python | extractors/lizhiFM.py | XiyaoWong/extract-api | c87b97ba01cc007d25e47ff64c6d6b4aba257112 | [
"MIT"
] | null | null | null | extractors/lizhiFM.py | XiyaoWong/extract-api | c87b97ba01cc007d25e47ff64c6d6b4aba257112 | [
"MIT"
] | null | null | null | extractors/lizhiFM.py | XiyaoWong/extract-api | c87b97ba01cc007d25e47ff64c6d6b4aba257112 | [
"MIT"
] | null | null | null | from urllib.parse import urlparse
import requests as rs
from extractors.result import Result
from extractors.errors import errors, NotFoundException, ServerErrorException, SpecialErrorException
headers = {"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Ver... | 35.404762 | 163 | 0.610625 |
e4fa223790e7287b5c33c04c6f0fb78cdb9e85da | 1,402 | py | Python | dmlc-core/tracker/dmlc_tracker/submit.py | felixwzh/TSGB | 80dfb42c153c19a58ae170565d50ff8831a3029a | [
"Apache-2.0"
] | 181 | 2017-01-29T23:50:25.000Z | 2022-01-15T13:43:17.000Z | dmlc-core/tracker/dmlc_tracker/submit.py | felixwzh/TSGB | 80dfb42c153c19a58ae170565d50ff8831a3029a | [
"Apache-2.0"
] | 33 | 2017-01-30T00:50:24.000Z | 2020-12-19T07:00:56.000Z | dmlc-core/tracker/dmlc_tracker/submit.py | felixwzh/TSGB | 80dfb42c153c19a58ae170565d50ff8831a3029a | [
"Apache-2.0"
] | 77 | 2016-08-21T00:35:00.000Z | 2021-06-01T05:03:34.000Z | """Job submission script"""
from __future__ import absolute_import
import logging
from . import opts
from . import local
from . import mpi
from . import sge
from . import yarn
def config_logger(args):
"""Configure the logger according to the arguments
Parameters
----------
args: argparser.Arguments
... | 27.490196 | 79 | 0.643367 |
7297daafd37afca68d0a61583ad98cbf16c2c550 | 11,599 | py | Python | cchecker.py | benjwadams/compliance-checker | 886cfeb4b68cafbd4c6e092c37cec90acbe87379 | [
"Apache-2.0"
] | null | null | null | cchecker.py | benjwadams/compliance-checker | 886cfeb4b68cafbd4c6e092c37cec90acbe87379 | [
"Apache-2.0"
] | null | null | null | cchecker.py | benjwadams/compliance-checker | 886cfeb4b68cafbd4c6e092c37cec90acbe87379 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import argparse
import sys
import warnings
from collections import defaultdict
from textwrap import dedent
from compliance_checker import __version__
from compliance_checker.cf.util import download_cf_standard_name_table
from compliance_checker.runner import CheckSuite, ComplianceChecker
def ... | 33.718023 | 98 | 0.525821 |
77e24b4b579a1ac7b4b35cbcec8641ef0f5c93b6 | 6,595 | py | Python | selfdrive/car/car_helpers.py | wolterhv/openpilot | c189d15af9a613d8f109b39298c0ab3e22f39f6d | [
"MIT"
] | 10 | 2018-08-26T22:27:03.000Z | 2021-11-17T21:21:54.000Z | selfdrive/car/car_helpers.py | wolterhv/openpilot | c189d15af9a613d8f109b39298c0ab3e22f39f6d | [
"MIT"
] | 10 | 2020-12-07T16:27:21.000Z | 2021-03-13T13:44:04.000Z | selfdrive/car/car_helpers.py | wolterhv/openpilot | c189d15af9a613d8f109b39298c0ab3e22f39f6d | [
"MIT"
] | 11 | 2018-06-24T12:00:16.000Z | 2021-06-14T17:49:08.000Z | import os
from common.params import Params
from common.basedir import BASEDIR
from selfdrive.version import comma_remote, tested_branch
from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_known_cars
from selfdrive.car.vin import get_vin, VIN_UNKNOWN
from selfdrive.car.fw_versions import get_fw_versi... | 35.26738 | 110 | 0.714632 |
8397c1ddc25e73ee51ee07ac1ac6e3b7f1fb5552 | 756 | py | Python | fullstack_backend/config.py | wgd3/fullstack-backend | 47b0c9351e6356736311f7cfed1d3a3706c8df45 | [
"MIT"
] | null | null | null | fullstack_backend/config.py | wgd3/fullstack-backend | 47b0c9351e6356736311f7cfed1d3a3706c8df45 | [
"MIT"
] | null | null | null | fullstack_backend/config.py | wgd3/fullstack-backend | 47b0c9351e6356736311f7cfed1d3a3706c8df45 | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
HERE = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path.pardir(HERE)
load_dotenv(os.path.join(PROJECT_ROOT, '.env'))
FLASK_APP = os.environ.get('FLASK_APP')
FLASK_DEBUG = os.environ.get('FLASK_DEBUG')
FLASK_ENV = os.environ.get("FLASK_ENV")
SECRET_KEY = os.en... | 29.076923 | 88 | 0.77381 |
c6fe5b3b6e3b78e00b11c942b9c601f36dd2abad | 878 | py | Python | Form.py | jonaprojects/PythonGameNetworks | 3239ae8d8c845e8ea29240324bfa55d82693059f | [
"MIT"
] | null | null | null | Form.py | jonaprojects/PythonGameNetworks | 3239ae8d8c845e8ea29240324bfa55d82693059f | [
"MIT"
] | null | null | null | Form.py | jonaprojects/PythonGameNetworks | 3239ae8d8c845e8ea29240324bfa55d82693059f | [
"MIT"
] | null | null | null | from validate_email import validate_email
from password_strength import PasswordPolicy
class Form:
policy = PasswordPolicy.from_names(
length=8,
uppercase=1,
numbers=1
)
@staticmethod
def valid_email(email):
return validate_email(email_address=email,
... | 25.085714 | 66 | 0.637813 |
95924dd99388e399530b2db0e1a1f2b17ba5518c | 1,545 | py | Python | activities.py | dayluke/TinkeringGraphics | 0f5aa2a256e75c668a5f7ceb2620bb559934d40f | [
"MIT"
] | null | null | null | activities.py | dayluke/TinkeringGraphics | 0f5aa2a256e75c668a5f7ceb2620bb559934d40f | [
"MIT"
] | null | null | null | activities.py | dayluke/TinkeringGraphics | 0f5aa2a256e75c668a5f7ceb2620bb559934d40f | [
"MIT"
] | null | null | null | import pygame
pygame.init()
main_window = pygame.display.set_mode((2400,1602))
running = True
path = "D:/pic.jpg"
pygame.image.load(path).get_width()
def greyscale(img):
for x in range(img.get_width()):
for y in range(img.get_height()):
colour = img.get_at((x,y))
... | 24.919355 | 83 | 0.519741 |
229ff8e273f3bb1e535694fdf92a28c044c7378f | 370 | py | Python | src/jetson/ev3control/messages.py | ichalkiad/VW_challenge | 333222010ecf3d1ca4a0e181239f761c975453e9 | [
"Apache-2.0"
] | 1 | 2017-08-16T08:42:49.000Z | 2017-08-16T08:42:49.000Z | src/jetson/ev3control/messages.py | ichalkiad/VW_challenge | 333222010ecf3d1ca4a0e181239f761c975453e9 | [
"Apache-2.0"
] | 4 | 2017-08-09T23:01:30.000Z | 2017-08-24T16:44:13.000Z | src/jetson/ev3control/messages.py | yhalk/vw_challenge_ECR | c1ff50070d0f7367ccfbf473c69e90fd2be5e85e | [
"Apache-2.0"
] | null | null | null | """Defines the types of messages."""
from collections import namedtuple
ShowAttrMessage = namedtuple("ShowAttrMessage", "obj_name attr_name")
SetAttrMessage = namedtuple("SetAttrMessage", "obj_name attr_name value")
RunMethodMessage = namedtuple("RunMethodMessage", "obj_name method_name args")
AddDeviceMessage = na... | 33.636364 | 78 | 0.8 |
402607750a0f3de5e79baa3e1bbbe8b3721113ea | 708 | py | Python | color_conversion.py | mniami/python-scripts | c9c81cae7f208b27c2bdf37c4d6f47782a125206 | [
"MIT"
] | null | null | null | color_conversion.py | mniami/python-scripts | c9c81cae7f208b27c2bdf37c4d6f47782a125206 | [
"MIT"
] | null | null | null | color_conversion.py | mniami/python-scripts | c9c81cae7f208b27c2bdf37c4d6f47782a125206 | [
"MIT"
] | null | null | null | import os
from PIL import Image
import click
@click.command()
@click.argument("path-to-image")
@click.argument("color-format")
def convert(path_to_image: str, color_format: str):
image = Image.open(path_to_image)
file_name, _ = os.path.splitext(path_to_image)
output_path = os.path.join(
os.path.di... | 24.413793 | 73 | 0.676554 |
df4c6c97fccaf024294f44f579ccce74bbda41d4 | 7,696 | py | Python | intersight/models/storage_host_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | intersight/models/storage_host_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | intersight/models/storage_host_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen... | 32.888889 | 1,052 | 0.618243 |
633a848624613b9a68c0c43c83e7510e987539d3 | 10,520 | py | Python | haystack/modeling/utils.py | MichelBartels/haystack | fcd19d8dea05ec3fc2a9a23dc15e9a27876d87e4 | [
"Apache-2.0"
] | null | null | null | haystack/modeling/utils.py | MichelBartels/haystack | fcd19d8dea05ec3fc2a9a23dc15e9a27876d87e4 | [
"Apache-2.0"
] | null | null | null | haystack/modeling/utils.py | MichelBartels/haystack | fcd19d8dea05ec3fc2a9a23dc15e9a27876d87e4 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Iterator, Tuple
import logging
import os
import pickle
import random
import signal
from copy import deepcopy
from itertools import islice
import numpy as np
import torch
import torch.distributed as dist
from torch import multiprocessing as mp
from haystack.modeling.visual import WORKER_M, WORK... | 36.401384 | 118 | 0.652376 |
d80cc90a714bdd6c213eb2d942056cc202d35909 | 1,183 | py | Python | lnt/server/db/rules/rule_update_profile_stats.py | llvm-mirror/lnt | 8c57bba3687ada10de5653ae46c537e957525bdb | [
"Apache-2.0"
] | 12 | 2015-10-29T19:28:02.000Z | 2020-02-04T21:25:32.000Z | lnt/server/db/rules/rule_update_profile_stats.py | DalavanCloud/llvm-lnt | 6912bb97c7959a402922461893ef2be044bb40b0 | [
"Apache-2.0"
] | 3 | 2017-03-04T14:23:14.000Z | 2019-11-02T21:56:51.000Z | lnt/server/db/rules/rule_update_profile_stats.py | DalavanCloud/llvm-lnt | 6912bb97c7959a402922461893ef2be044bb40b0 | [
"Apache-2.0"
] | 14 | 2015-04-03T03:36:06.000Z | 2019-10-23T14:09:08.000Z | """
Post submission hook to write the current state of the profiles directory. This
gets fed into the profile/admin page.
"""
import datetime
import glob
import json
import os
import subprocess
import time
def update_profile_stats(session, ts, run_id):
config = ts.v4db.config
history_path = os.path.join(conf... | 25.717391 | 79 | 0.647506 |
ebd61588f487871fa260e9c48cf8e35b1914829e | 9,473 | py | Python | pycaption/base.py | KyleJamesWalker/pycaption | 4fc0e30048610627e76f5a7c8bba30ae737da3c3 | [
"Apache-2.0"
] | null | null | null | pycaption/base.py | KyleJamesWalker/pycaption | 4fc0e30048610627e76f5a7c8bba30ae737da3c3 | [
"Apache-2.0"
] | null | null | null | pycaption/base.py | KyleJamesWalker/pycaption | 4fc0e30048610627e76f5a7c8bba30ae737da3c3 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from datetime import timedelta
DEFAULT_LANGUAGE_CODE = u'en-US'
def force_byte_string(content):
try:
return content.encode(u'UTF-8')
except UnicodeEncodeError:
raise RuntimeError(u'Invalid content encoding')
except UnicodeDecodeError:
return co... | 31.576667 | 80 | 0.620078 |
e4fbb884c574756940a1c7319ebb8f2f48b6257d | 250 | py | Python | python/simple.py | angus-ai/angus-getting-started | dcaccd4290a7567513974c27d870acfeaefc241b | [
"Apache-2.0"
] | 1 | 2015-08-25T23:04:28.000Z | 2015-08-25T23:04:28.000Z | python/simple.py | angus-ai/angus-getting-started | dcaccd4290a7567513974c27d870acfeaefc241b | [
"Apache-2.0"
] | null | null | null | python/simple.py | angus-ai/angus-getting-started | dcaccd4290a7567513974c27d870acfeaefc241b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import angus
import json
conn = angus.connect()
service = conn.services.get_service('age_and_gender_estimation', version=1)
job = service.process({'image': open("./images/macgyver.jpg")})
print json.dumps(job.result, indent=4)
| 27.777778 | 75 | 0.752 |
6701378c0768b5c2ae376ee6f1e2abdb8a75f88d | 14,183 | py | Python | Code/mlp.py | payamsiyari/Deep-Learning-for-Sign-Language-Recognition | 95259d961f7cfc359945e66adaf6aaab6c6ec5f0 | [
"MIT"
] | 92 | 2016-03-05T23:33:13.000Z | 2022-01-12T11:44:16.000Z | mlp.py | deepanjanroy/aml3 | e70999c77a8d4d9c40cdceb1168922e5cd5ea40d | [
"MIT"
] | 4 | 2016-06-03T14:07:19.000Z | 2018-11-18T14:04:57.000Z | mlp.py | deepanjanroy/aml3 | e70999c77a8d4d9c40cdceb1168922e5cd5ea40d | [
"MIT"
] | 46 | 2016-05-25T13:59:30.000Z | 2022-02-08T12:10:33.000Z | """
This tutorial introduces the multilayer perceptron using Theano.
A multilayer perceptron is a logistic regressor where
instead of feeding the input to the logistic regression you insert a
intermediate layer, called the hidden layer, that has a nonlinear
activation function (usually tanh or sigmoid) . One can use ... | 35.019753 | 79 | 0.593245 |
5c4774ee2da867ec9b237ae7f5f686dcf110aa8a | 5,253 | py | Python | test/functional/llmq-signing.py | LKSCOIN/LKSCOIN | e533e9669a45a0d704915469b03d9b718548761a | [
"MIT"
] | 4 | 2020-05-21T20:41:17.000Z | 2021-03-20T12:57:48.000Z | test/functional/llmq-signing.py | LKSCOIN/lkscoin | e533e9669a45a0d704915469b03d9b718548761a | [
"MIT"
] | 1 | 2020-03-05T15:04:01.000Z | 2020-03-05T15:04:01.000Z | test/functional/llmq-signing.py | LKSCOIN/LKSCOIN | e533e9669a45a0d704915469b03d9b718548761a | [
"MIT"
] | 1 | 2020-03-12T19:11:08.000Z | 2020-03-12T19:11:08.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2020 The Lksc Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import time
from test_framework.mininode import *
from test_framework.test_framework import LksTestFramewor... | 41.690476 | 123 | 0.644584 |
a7ea44e0f9355c96da0165ca2e8f06e162f6c327 | 731 | py | Python | cdbk.py | CraigDawson/gbin | 5eb3e3cc37c9a1f00e51e21f7670d75c9f24dd25 | [
"MIT"
] | null | null | null | cdbk.py | CraigDawson/gbin | 5eb3e3cc37c9a1f00e51e21f7670d75c9f24dd25 | [
"MIT"
] | null | null | null | cdbk.py | CraigDawson/gbin | 5eb3e3cc37c9a1f00e51e21f7670d75c9f24dd25 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import os
from shutil import move
from shutil import rmtree
def cdbk(full):
def addExt(path, ext):
return path + ext
last = addExt(full, ".last")
old = addExt(full, ".old")
try:
print last, " -> ", old
if os.path.isdir(old):
rmtree(o... | 16.613636 | 45 | 0.541724 |
f53a2ce566b2ff96830b37554ef9a20be238c962 | 49,644 | py | Python | sdk/lusid/api/schemas_api.py | rizwansaeed/lusid-sdk-python-preview | 52d092d6d4099b8526f0318f3fe1ddc0b943da6a | [
"MIT"
] | null | null | null | sdk/lusid/api/schemas_api.py | rizwansaeed/lusid-sdk-python-preview | 52d092d6d4099b8526f0318f3fe1ddc0b943da6a | [
"MIT"
] | null | null | null | sdk/lusid/api/schemas_api.py | rizwansaeed/lusid-sdk-python-preview | 52d092d6d4099b8526f0318f3fe1ddc0b943da6a | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
# Introduction This page documents the [LUSID APIs](https://www.lusid.com/api/swagger), which allows authorised clients to query and update their data within the LUSID platform. SDKs to interact with the LUSID APIs are available in the following languages : * [C#](https://gith... | 102.358763 | 28,647 | 0.662034 |
e2c844f6cd7c4665cb222cc032e8aa85f2c01747 | 3,650 | py | Python | mergify_engine/actions/merge/helpers.py | mscherer/mergify-engine | 730493d638d18320359e2daaa69cc0683fbb143b | [
"Apache-2.0"
] | null | null | null | mergify_engine/actions/merge/helpers.py | mscherer/mergify-engine | 730493d638d18320359e2daaa69cc0683fbb143b | [
"Apache-2.0"
] | null | null | null | mergify_engine/actions/merge/helpers.py | mscherer/mergify-engine | 730493d638d18320359e2daaa69cc0683fbb143b | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
#
# 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, so... | 36.5 | 104 | 0.645479 |
7607706bb1b6c6bb365eab479a299e4e2c0be99d | 1,787 | py | Python | shoptools/contrib/shipping/migrations/0001_initial.py | gregplaysguitar/django-shoptools | 7af9b69409d146b3627931430714b934122a2498 | [
"BSD-3-Clause"
] | 3 | 2015-09-11T01:24:25.000Z | 2018-08-19T16:47:09.000Z | shoptools/contrib/shipping/migrations/0001_initial.py | gregplaysguitar/django-shoptools | 7af9b69409d146b3627931430714b934122a2498 | [
"BSD-3-Clause"
] | 29 | 2015-10-06T22:15:50.000Z | 2017-12-14T20:50:52.000Z | shoptools/contrib/shipping/migrations/0001_initial.py | gregplaysguitar/django-shoptools | 7af9b69409d146b3627931430714b934122a2498 | [
"BSD-3-Clause"
] | 5 | 2015-10-05T23:33:51.000Z | 2019-01-14T19:49:40.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-20 13:29
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('regions', '0001_initial'),
]
o... | 39.711111 | 146 | 0.592613 |
af7935b947117fec2da77b930b47bddbccd71842 | 2,870 | py | Python | tests/integration/mci/test_multiple_surveys_open.py | uk-gov-mirror/ONSdigital.eq-survey-runner | b3a67a82347d024177f7fa6bf05499f47ece7ea5 | [
"MIT"
] | 27 | 2015-10-02T17:27:54.000Z | 2021-04-05T12:39:16.000Z | tests/integration/mci/test_multiple_surveys_open.py | uk-gov-mirror/ONSdigital.eq-survey-runner | b3a67a82347d024177f7fa6bf05499f47ece7ea5 | [
"MIT"
] | 1,836 | 2015-09-16T09:59:03.000Z | 2022-03-30T14:27:06.000Z | tests/integration/mci/test_multiple_surveys_open.py | uk-gov-mirror/ONSdigital.eq-survey-runner | b3a67a82347d024177f7fa6bf05499f47ece7ea5 | [
"MIT"
] | 20 | 2016-09-09T16:56:12.000Z | 2021-11-12T06:09:27.000Z | from tests.integration.integration_test_case import IntegrationTestCase
class MultipleSurveysOpen(IntegrationTestCase):
def test_multiple_surveys_open(self):
# We start the first survey
self.launchSurvey('test', 'numbers')
self.post(action='start_questionnaire')
self.assertInUrl(r... | 36.329114 | 86 | 0.659233 |
23e2223ad5a94b7249d417f24953f091e3453f45 | 12,492 | py | Python | tests/vlan/test_vlan.py | vdahiya12/sonic-mgmt | f785cd0bd07f8d2deb0b4bab16feb64f2eeba054 | [
"Apache-2.0"
] | null | null | null | tests/vlan/test_vlan.py | vdahiya12/sonic-mgmt | f785cd0bd07f8d2deb0b4bab16feb64f2eeba054 | [
"Apache-2.0"
] | null | null | null | tests/vlan/test_vlan.py | vdahiya12/sonic-mgmt | f785cd0bd07f8d2deb0b4bab16feb64f2eeba054 | [
"Apache-2.0"
] | null | null | null |
import pytest
import ptf.packet as scapy
import ptf.testutils as testutils
from ptf.mask import Mask
from collections import defaultdict
import time
import json
import itertools
import logging
import pprint
from tests.common.errors import RunAnsibleModuleFail
logger = logging.getLogger(__name__)
vlan_id_list = [ 1... | 40.296774 | 136 | 0.627602 |
4808a4a555067dafd7c9fd8eb8346276925b005d | 3,048 | py | Python | scripts/sick2snli.py | yuichigoto/ccg2lambda | 442a9ec9be7393d92c77a03856aa4a9c71c20078 | [
"Apache-2.0"
] | 200 | 2015-10-08T10:54:00.000Z | 2022-03-31T07:55:09.000Z | scripts/sick2snli.py | masashi-y/ccg2lambda | 4fc9d706e282f9c8422d21f8639417295588cc4f | [
"Apache-2.0"
] | 25 | 2020-03-07T14:56:22.000Z | 2021-11-18T17:14:26.000Z | scripts/sick2snli.py | masashi-y/ccg2lambda | 4fc9d706e282f9c8422d21f8639417295588cc4f | [
"Apache-2.0"
] | 47 | 2016-11-21T09:24:52.000Z | 2021-11-09T09:39:36.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright 2017 Pascual Martinez-Gomez
#
# 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
#
... | 32.774194 | 94 | 0.660105 |
99003a8b6da884bd244158f53b6b30502db3c49b | 19 | py | Python | xlsx/cython/update/tmp_execute.py | ekzemplaro/data_base_language | e77030367ffc595f1fac8583f03f9a3ce5eb1611 | [
"MIT",
"Unlicense"
] | 3 | 2015-05-12T16:44:27.000Z | 2021-02-09T00:39:24.000Z | xlsx/cython/update/tmp_execute.py | ekzemplaro/data_base_language | e77030367ffc595f1fac8583f03f9a3ce5eb1611 | [
"MIT",
"Unlicense"
] | null | null | null | xlsx/cython/update/tmp_execute.py | ekzemplaro/data_base_language | e77030367ffc595f1fac8583f03f9a3ce5eb1611 | [
"MIT",
"Unlicense"
] | null | null | null | import xlsx_update
| 9.5 | 18 | 0.894737 |
4ed4d04824dd074afb8a68bf5d3ee7e79f3d3dc1 | 3,595 | py | Python | time_series_detector/algorithm/isolation_forest.py | alexanderqiu/Metis | bf50841faf36cf29378c7b774e6abe4327596bbd | [
"Apache-2.0"
] | 1,367 | 2018-10-20T02:03:26.000Z | 2022-03-31T09:43:42.000Z | time_series_detector/algorithm/isolation_forest.py | alexanderqiu/Metis | bf50841faf36cf29378c7b774e6abe4327596bbd | [
"Apache-2.0"
] | 104 | 2018-10-20T04:45:57.000Z | 2022-01-09T03:53:38.000Z | time_series_detector/algorithm/isolation_forest.py | alexanderqiu/Metis | bf50841faf36cf29378c7b774e6abe4327596bbd | [
"Apache-2.0"
] | 445 | 2018-10-20T02:57:40.000Z | 2022-03-28T11:34:42.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Tencent is pleased to support the open source community by making Metis available.
Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in compliance with th... | 51.357143 | 305 | 0.67733 |
552d17c8d91c3e04539be4ae2c3c9f78a2b0fc68 | 13,335 | py | Python | lm/splitcross.py | aistairc/lm_syntax_negative | 19889a84d6ce32531fe82dfeea7a48df233d7f50 | [
"MIT"
] | 3 | 2020-05-07T06:58:53.000Z | 2021-02-19T13:37:57.000Z | lm/splitcross.py | aistairc/lm_syntax_negative | 19889a84d6ce32531fe82dfeea7a48df233d7f50 | [
"MIT"
] | null | null | null | lm/splitcross.py | aistairc/lm_syntax_negative | 19889a84d6ce32531fe82dfeea7a48df233d7f50 | [
"MIT"
] | null | null | null | from collections import defaultdict
import torch
import torch.nn as nn
import numpy as np
class SplitCrossEntropyLoss(nn.Module):
r'''SplitCrossEntropyLoss calculates an approximate softmax'''
def __init__(self, hidden_size, splits, verbose=False, ignore_index=-100):
# We assume splits is [0, split1... | 48.667883 | 135 | 0.617698 |
4cb37c576822beae8649e39ee895373ca2de491f | 2,553 | py | Python | docs/conf.py | Mbompr/deepr | 1fb28e15aeeac6ef2d8e5b678feb380f2b1951f2 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | Mbompr/deepr | 1fb28e15aeeac6ef2d8e5b678feb380f2b1951f2 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | Mbompr/deepr | 1fb28e15aeeac6ef2d8e5b678feb380f2b1951f2 | [
"Apache-2.0"
] | null | null | null | # 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 --------------------------------------------------------------
# If ex... | 31.9125 | 84 | 0.652174 |
e76954f1ad3ca5e3abd2c57386a213a7e13db1fd | 4,366 | py | Python | PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/vertex_type_2_10_10_10_rev.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/vertex_type_2_10_10_10_rev.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/vertex_type_2_10_10_10_rev.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | '''Autogenerated by get_gl_extensions script, do not edit!'''
from OpenGL import platform as _p, constants as _cs, arrays
from OpenGL.GL import glget
import ctypes
EXTENSION_NAME = 'GL_ARB_vertex_type_2_10_10_10_rev'
def _f( function ):
return _p.createFunction( function,_p.GL,'GL_ARB_vertex_type_2_10_10_10_rev',Fa... | 33.844961 | 87 | 0.789968 |
ac705a79829e9bda1e64f197c6735020e6e1dba8 | 8,559 | py | Python | official/vision/beta/modeling/decoders/aspp.py | sakibguy/models | 662f392677be0e6822eb9852a57f06b3fd1513bf | [
"Apache-2.0"
] | 1 | 2022-02-02T06:29:41.000Z | 2022-02-02T06:29:41.000Z | official/vision/beta/modeling/decoders/aspp.py | sakibguy/models | 662f392677be0e6822eb9852a57f06b3fd1513bf | [
"Apache-2.0"
] | null | null | null | official/vision/beta/modeling/decoders/aspp.py | sakibguy/models | 662f392677be0e6822eb9852a57f06b3fd1513bf | [
"Apache-2.0"
] | 1 | 2020-12-13T22:10:09.000Z | 2020-12-13T22:10:09.000Z | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.955882 | 80 | 0.710597 |
0aa7d03986a94d50d705083e13385d7a576049bd | 1,040 | py | Python | var/spack/repos/builtin/packages/py-pympler/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/py-pympler/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/py-pympler/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPympler(PythonPackage):
"""Development tool to measure, monitor and analyze the memory b... | 43.333333 | 95 | 0.769231 |
b221fa6b01075526f6db85e2002acd2b6bf76181 | 12,058 | py | Python | gym_kuka_mujoco/envs/modified_peg_insertion_env.py | leonmkim/gym-kuka-mujoco | ed45ae74d10e69f4e51439de2d1d0c0811623b6b | [
"MIT"
] | null | null | null | gym_kuka_mujoco/envs/modified_peg_insertion_env.py | leonmkim/gym-kuka-mujoco | ed45ae74d10e69f4e51439de2d1d0c0811623b6b | [
"MIT"
] | null | null | null | gym_kuka_mujoco/envs/modified_peg_insertion_env.py | leonmkim/gym-kuka-mujoco | ed45ae74d10e69f4e51439de2d1d0c0811623b6b | [
"MIT"
] | null | null | null | import os
import random
import numpy as np
from gym_kuka_mujoco.envs import kuka_env
from gym_kuka_mujoco.utils.kinematics import forwardKin, forwardKinSite, forwardKinJacobianSite
from gym_kuka_mujoco.utils.insertion import hole_insertion_samples
from gym_kuka_mujoco.utils.projection import rotate_cost_by_matrix
from... | 40.463087 | 185 | 0.612954 |
f807a75310aa8b8ecfa9655dbd696c070dfda5c9 | 719 | py | Python | stt/stt.py | matteolutz/IAP | 19a021fa3b4ea94d266c7e450e82c3e1c8908c05 | [
"Unlicense"
] | null | null | null | stt/stt.py | matteolutz/IAP | 19a021fa3b4ea94d266c7e450e82c3e1c8908c05 | [
"Unlicense"
] | null | null | null | stt/stt.py | matteolutz/IAP | 19a021fa3b4ea94d266c7e450e82c3e1c8908c05 | [
"Unlicense"
] | 1 | 2021-03-11T16:18:39.000Z | 2021-03-11T16:18:39.000Z | import speech_recognition as sr
import json
options = {}
with open("./utils/options.json") as f:
options = json.load(f)
def recognize():
r = sr.Recognizer()
m = sr.Microphone()
with m as source:
# r.adjust_for_ambient_noise(source)
audio = r.listen(source)
response = {
... | 21.787879 | 91 | 0.617524 |
b94e48933aab6da2d616e724e8ee56baa521ba0f | 3,232 | py | Python | model.py | VirajBagal/cyclegan | 959f71cc1087d9239a94bdcfb71e4aaa25d878b1 | [
"MIT"
] | null | null | null | model.py | VirajBagal/cyclegan | 959f71cc1087d9239a94bdcfb71e4aaa25d878b1 | [
"MIT"
] | null | null | null | model.py | VirajBagal/cyclegan | 959f71cc1087d9239a94bdcfb71e4aaa25d878b1 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.nn.functional as F
class ResidualBlock(nn.Module):
def __init__(self, in_features):
super(ResidualBlock, self).__init__()
conv_block = [ nn.ReflectionPad2d(1),
nn.Conv2d(in_features, in_features, 3),
nn.InstanceNor... | 35.130435 | 112 | 0.539604 |
5f6eec4f3b2d7e8c8ec0324b4df0ef5e91b032eb | 360 | py | Python | run.py | lawreka/montagarticlernn | f3b7829f36fcf711891601a879d66136db8ada74 | [
"MIT"
] | 1 | 2020-05-25T16:25:17.000Z | 2020-05-25T16:25:17.000Z | run.py | lawreka/montagarticlernn | f3b7829f36fcf711891601a879d66136db8ada74 | [
"MIT"
] | null | null | null | run.py | lawreka/montagarticlernn | f3b7829f36fcf711891601a879d66136db8ada74 | [
"MIT"
] | null | null | null | import gpt_2_simple as gpt2
model_name = "117M"
gpt2.download_gpt2(model_name=model_name) # model is saved into current directory under /models/117M/
sess = gpt2.start_tf_sess()
gpt2.finetune(sess,
'montagtext.txt',
model_name=model_name,
steps=1000) # steps is max number... | 27.692308 | 103 | 0.688889 |
cbf00843c47d4e8de5dd4015238d4c708e631251 | 2,157 | py | Python | applications/ShapeOptimizationApplication/tests/opt_process_min_max/run_test.py | ma6yu/Kratos | 02380412f8a833a2cdda6791e1c7f9c32e088530 | [
"BSD-4-Clause"
] | null | null | null | applications/ShapeOptimizationApplication/tests/opt_process_min_max/run_test.py | ma6yu/Kratos | 02380412f8a833a2cdda6791e1c7f9c32e088530 | [
"BSD-4-Clause"
] | null | null | null | applications/ShapeOptimizationApplication/tests/opt_process_min_max/run_test.py | ma6yu/Kratos | 02380412f8a833a2cdda6791e1c7f9c32e088530 | [
"BSD-4-Clause"
] | null | null | null | # Import Kratos core and apps
import KratosMultiphysics as KM
import KratosMultiphysics.ShapeOptimizationApplication as KSO
# Additional imports
from KratosMultiphysics.ShapeOptimizationApplication import optimizer_factory
from KratosMultiphysics.KratosUnittest import TestCase
import KratosMultiphysics.kratos_utilitie... | 43.14 | 115 | 0.573018 |
28e38e1aedc7f399c41fc0e1c8809c4bc40f69e9 | 1,023 | py | Python | gnsq/contrib/queue.py | dfa/gnsq | fd37ae7d8337c2dcd4358be4f092f8467549750f | [
"BSD-3-Clause"
] | 71 | 2015-01-21T08:59:20.000Z | 2021-04-02T05:41:04.000Z | gnsq/contrib/queue.py | dfa/gnsq | fd37ae7d8337c2dcd4358be4f092f8467549750f | [
"BSD-3-Clause"
] | 26 | 2015-02-11T00:42:54.000Z | 2020-10-25T17:15:46.000Z | gnsq/contrib/queue.py | dfa/gnsq | fd37ae7d8337c2dcd4358be4f092f8467549750f | [
"BSD-3-Clause"
] | 17 | 2015-02-10T18:31:48.000Z | 2020-11-12T12:27:37.000Z | # -*- coding: utf-8 -*-
import gevent.queue
class QueueHandler(gevent.queue.Queue):
"""Iterator like api for gnsq.
Example usage::
>>> queue = QueueHandler()
>>> consumer = Consumer('topic', 'worker', max_in_flight=16)
>>> consumer.on_message.connect(queue)
>>> consumer.start... | 25.575 | 79 | 0.607038 |
687d4425b65f0060be4c0f610b132f3e79bb6ee3 | 4,200 | py | Python | monocle/fields.py | bigjust/django-monocle | f546a9061834b41a1a701ef89f8371bfaf4f1691 | [
"MIT"
] | 1 | 2019-04-21T17:25:16.000Z | 2019-04-21T17:25:16.000Z | monocle/fields.py | bigjust/django-monocle | f546a9061834b41a1a701ef89f8371bfaf4f1691 | [
"MIT"
] | null | null | null | monocle/fields.py | bigjust/django-monocle | f546a9061834b41a1a701ef89f8371bfaf4f1691 | [
"MIT"
] | null | null | null | """
A collection of Django field extensions that handle OEmbed content prefetching
"""
import logging
from django.db.models import fields
from monocle.consumers import prefetch
from monocle.settings import settings
logger = logging.getLogger(__name__)
class OEmbedCharField(fields.CharField):
"""
An extens... | 37.837838 | 100 | 0.681667 |
1ae674a52c7de9caaa6d4c122018aac28d402ea0 | 63,819 | py | Python | deepflash2/gui.py | adriHei/deepflash2 | 82d2fd56f24a995b5c7e301c9c8b3d7b63430414 | [
"Apache-2.0"
] | null | null | null | deepflash2/gui.py | adriHei/deepflash2 | 82d2fd56f24a995b5c7e301c9c8b3d7b63430414 | [
"Apache-2.0"
] | null | null | null | deepflash2/gui.py | adriHei/deepflash2 | 82d2fd56f24a995b5c7e301c9c8b3d7b63430414 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/08_gui.ipynb (unless otherwise specified).
__all__ = ['GRID_COLS', 'set_css_in_cell_output', 'tooltip_css', 'ZipUpload', 'ItemsPerPage', 'BaseParamWidget',
'BaseUI', 'PathSelector', 'PathDownloads', 'PathConfig', 'GTDataSB', 'GTEstSB', 'GTEstUI', 'TrainDataSB'... | 41.986184 | 400 | 0.62765 |
011c6fd0c0122224768492c9baab01678460fcda | 1,518 | py | Python | utils/money.py | jeongbal/Gamble | 630fcc5e5c55a27266e8ca60cc0021264bbd0fed | [
"Apache-2.0"
] | null | null | null | utils/money.py | jeongbal/Gamble | 630fcc5e5c55a27266e8ca60cc0021264bbd0fed | [
"Apache-2.0"
] | null | null | null | utils/money.py | jeongbal/Gamble | 630fcc5e5c55a27266e8ca60cc0021264bbd0fed | [
"Apache-2.0"
] | 1 | 2021-08-30T15:24:27.000Z | 2021-08-30T15:24:27.000Z | from utils.database.mongo import Mongo
from discord import Embed
from discord.ext.commands.context import Context
from random import randint
class MoneyExt:
def __init__(self, mongo: Mongo) -> None:
self.mongo = mongo
async def money(self, user_id: int) -> Embed:
if user_data := await self.mo... | 37.95 | 77 | 0.596838 |
546e5655cf5793033db1142aa135473f46442750 | 1,460 | py | Python | setup.py | scrubber-reviews/otzovik_com | 5697f558404a8a235468bb600e1e34a8bf35dc84 | [
"MIT"
] | null | null | null | setup.py | scrubber-reviews/otzovik_com | 5697f558404a8a235468bb600e1e34a8bf35dc84 | [
"MIT"
] | null | null | null | setup.py | scrubber-reviews/otzovik_com | 5697f558404a8a235468bb600e1e34a8bf35dc84 | [
"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 = ['bs4', 'requests']
setup_requirement... | 28.627451 | 52 | 0.641781 |
0f7ef851c624de0e573d635a2153d461269f826f | 2,846 | py | Python | RaspberryPiSmartKey/.sync/Archive/SmartKeyService2.2.py | jtromo/ASU-Thesis-RaspberryPiSmartKey | c5899a98400dc97eb825cac384aa82608db7127b | [
"Apache-2.0"
] | null | null | null | RaspberryPiSmartKey/.sync/Archive/SmartKeyService2.2.py | jtromo/ASU-Thesis-RaspberryPiSmartKey | c5899a98400dc97eb825cac384aa82608db7127b | [
"Apache-2.0"
] | null | null | null | RaspberryPiSmartKey/.sync/Archive/SmartKeyService2.2.py | jtromo/ASU-Thesis-RaspberryPiSmartKey | c5899a98400dc97eb825cac384aa82608db7127b | [
"Apache-2.0"
] | null | null | null | __author__ = 'jtromo'
#Developed at : SEFCOM Labs by James Romo
#With assistance from : JJ SEO and Clinton Dsouza
from bluetooth import *
import threading
import time
from Crypto.Cipher import AES
import base64
import os
# the block size for the cipher object; must be 16, 24, or 32 for AES
BLOCK_SIZE = 32
# the char... | 27.631068 | 92 | 0.716444 |
ed1c734a27c5f42385debf5ba7ee46999e24f37c | 1,263 | py | Python | index.py | saikksub/python-hotkey-listener | a5fd8ab3e5108cc6200426d712ecc289b7855fe2 | [
"MIT"
] | null | null | null | index.py | saikksub/python-hotkey-listener | a5fd8ab3e5108cc6200426d712ecc289b7855fe2 | [
"MIT"
] | null | null | null | index.py | saikksub/python-hotkey-listener | a5fd8ab3e5108cc6200426d712ecc289b7855fe2 | [
"MIT"
] | null | null | null | import platform
import keyboard
import threading
import atexit
from threading import Timer
triggerCount = 0
triggerTimer = -1
result = None
def cleanup ():
print 'cleanup before exit'
clearTimer()
keyboard
triggerCount = 0
def clearTimer ():
global triggerTimer
global triggerCount
try:
... | 18.850746 | 49 | 0.640538 |
d72d6c2be5fbd818a97e9970718383b06776b44b | 658 | py | Python | manage/update_manifest.py | mudape/iphonedetect | f8b51ba96b6620e0206091f94ee051dd813cf59f | [
"MIT"
] | 189 | 2019-07-28T04:12:42.000Z | 2022-03-25T02:41:05.000Z | manage/update_manifest.py | mudape/iphonedetect | f8b51ba96b6620e0206091f94ee051dd813cf59f | [
"MIT"
] | 60 | 2019-07-02T03:30:02.000Z | 2022-03-23T22:08:59.000Z | manage/update_manifest.py | mudape/iphonedetect | f8b51ba96b6620e0206091f94ee051dd813cf59f | [
"MIT"
] | 29 | 2019-07-28T15:55:24.000Z | 2022-03-31T20:38:18.000Z | """Update the manifest file."""
import sys
import json
import os
def update_manifest():
"""Update the manifest file."""
version = "0.0.0"
for index, value in enumerate(sys.argv):
if value in ["--version", "-V"]:
version = sys.argv[index + 1]
with open(f"{os.getcwd()}/custom_compon... | 25.307692 | 93 | 0.651976 |
57d5d3046e2e14f28766180e9b010aa0c0bdbf1f | 2,806 | py | Python | sample-code/Python/01 Admin/get_partner_admin_user_children.py | Mesitis/community | da5ae7d57d7ed4c4f55ef1671520ff32270ad213 | [
"MIT"
] | 2 | 2017-06-12T06:19:05.000Z | 2018-02-07T05:32:22.000Z | sample-code/Python/01 Admin/get_partner_admin_user_children.py | Mesitis/community | da5ae7d57d7ed4c4f55ef1671520ff32270ad213 | [
"MIT"
] | null | null | null | sample-code/Python/01 Admin/get_partner_admin_user_children.py | Mesitis/community | da5ae7d57d7ed4c4f55ef1671520ff32270ad213 | [
"MIT"
] | 2 | 2017-07-05T05:26:27.000Z | 2018-09-05T13:52:27.000Z | '''
- login and get token
- process 2FA if 2FA is setup for this account
- Gets a list of children of one of the parent accounts of a partner admin
'''
import requests
import json
get_token_url = "https://api.canopy.cloud:443/api/v1/sessions/"
validate_otp_url = "https://api.canopy.cloud:443/api/v1/sessions/otp/val... | 35.974359 | 140 | 0.729152 |
c43a62068ea1fce70562465f03343ad74165fdf9 | 2,167 | py | Python | GUIWiki.py | safiraben-pong/MyPythonBootcamp2021 | d385f6ebf2d33e4193c90e488fc7180e2c86d5f2 | [
"MIT"
] | null | null | null | GUIWiki.py | safiraben-pong/MyPythonBootcamp2021 | d385f6ebf2d33e4193c90e488fc7180e2c86d5f2 | [
"MIT"
] | null | null | null | GUIWiki.py | safiraben-pong/MyPythonBootcamp2021 | d385f6ebf2d33e4193c90e488fc7180e2c86d5f2 | [
"MIT"
] | null | null | null | # GUIWiki.py
import wikipedia
# python to docx
from docx import Document
def Wiki(keyword,lang='th'):
wikipedia.set_lang(lang)
# summary สำหรับบทความที่สรุป
data = wikipedia.summary(keyword)
# page + content
data2 = wikipedia.page(keyword)
data2 = data2.content
doc =... | 25.494118 | 85 | 0.624827 |
95b0ad6e9f88e7b8017e72920db321903b29d6e0 | 4,951 | py | Python | huaweicloud-sdk-cpts/huaweicloudsdkcpts/v1/model/reportdetails_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-cpts/huaweicloudsdkcpts/v1/model/reportdetails_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-cpts/huaweicloudsdkcpts/v1/model/reportdetails_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ReportdetailsInfo:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key ... | 25.260204 | 79 | 0.555241 |
eb8fcc645e798c9a5a3bf61d126b40eb2f238e88 | 8,804 | py | Python | tests/conftest.py | sfc-gh-pkommini/dispatch | 4474e2f8556c92ac53d5711d138bd354effd3704 | [
"Apache-2.0"
] | 1 | 2022-02-23T02:42:10.000Z | 2022-02-23T02:42:10.000Z | tests/conftest.py | sfc-gh-pkommini/dispatch | 4474e2f8556c92ac53d5711d138bd354effd3704 | [
"Apache-2.0"
] | 1 | 2021-04-08T10:03:36.000Z | 2021-04-08T10:03:36.000Z | tests/conftest.py | AlexaKelley/dispatch | b46d8416a0e4ec9badb76f6f3d1765c6093203f8 | [
"Apache-2.0"
] | 1 | 2021-05-10T23:22:31.000Z | 2021-05-10T23:22:31.000Z | import pytest
from sqlalchemy_utils import create_database, database_exists, drop_database
from starlette.testclient import TestClient
from starlette.config import environ
# set test config
environ["DATABASE_CREDENTIALS"] = "postgres:dispatch"
environ["DATABASE_HOSTNAME"] = "localhost"
environ["DISPATCH_HELP_EMAIL"] ... | 22.927083 | 91 | 0.764652 |
a23787bfd71e43727e0ce664fdaefb6a82c65e1d | 4,728 | py | Python | algs/kpolicy_tabular.py | katetolstaya/kernelrl | 963d72a4912faffeaab2627f16e6c103a7678fc4 | [
"MIT"
] | null | null | null | algs/kpolicy_tabular.py | katetolstaya/kernelrl | 963d72a4912faffeaab2627f16e6c103a7678fc4 | [
"MIT"
] | null | null | null | algs/kpolicy_tabular.py | katetolstaya/kernelrl | 963d72a4912faffeaab2627f16e6c103a7678fc4 | [
"MIT"
] | null | null | null | import copy
import pickle
import random
import numpy as np
from corerl.core import ScheduledParameter
# ==================================================
# A POLK Policy improvements Model
class KPolicyTabModel(object):
def __init__(self, config):
# Learning rate
self.eta = ScheduledParameter... | 30.11465 | 117 | 0.572124 |
cd6c30485e34e117ae561c547c2b9740f69987e8 | 2,558 | py | Python | sdk/schemaregistry/azure-schemaregistry/setup.py | mrwbarg/azure-sdk-for-python | ecfd1093cd623040d1359444d76ac0b57a786f63 | [
"MIT"
] | 2 | 2021-09-07T18:30:33.000Z | 2021-11-23T02:50:57.000Z | sdk/schemaregistry/azure-schemaregistry/setup.py | mrwbarg/azure-sdk-for-python | ecfd1093cd623040d1359444d76ac0b57a786f63 | [
"MIT"
] | 4 | 2021-10-06T16:39:52.000Z | 2021-11-18T18:33:37.000Z | sdk/schemaregistry/azure-schemaregistry/setup.py | mrwbarg/azure-sdk-for-python | ecfd1093cd623040d1359444d76ac0b57a786f63 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# ------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ---------------------------------------------------------------... | 32.794872 | 91 | 0.606333 |
737feed66c57208d25c29a3a2c976158d6bfc81c | 55,802 | py | Python | pKaTool/pKa_system.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | 3 | 2016-11-11T06:11:03.000Z | 2021-09-12T22:13:51.000Z | pKaTool/pKa_system.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | null | null | null | pKaTool/pKa_system.py | shambo001/peat | 7a26e896aa9914b084a9064df09ed15df4047cf3 | [
"MIT"
] | 2 | 2016-02-15T16:10:36.000Z | 2018-02-27T10:33:21.000Z | #!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
#
# pKaTool - analysis of systems of titratable groups
# Copyright (C) 2010 Jens Erik Nielsen
#
# 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... | 36.93051 | 667 | 0.528046 |
bd1ca1470f5bd4472b18ee68dec47f3857f31c72 | 1,420 | py | Python | locale/pot/api/plotting/_autosummary/pyvista-Plotter-add_mesh-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 4 | 2020-08-07T08:19:19.000Z | 2020-12-04T09:51:11.000Z | locale/pot/api/plotting/_autosummary/pyvista-Plotter-add_mesh-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 19 | 2020-08-06T00:24:30.000Z | 2022-03-30T19:22:24.000Z | locale/pot/api/plotting/_autosummary/pyvista-Plotter-add_mesh-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 1 | 2021-03-09T07:50:40.000Z | 2021-03-09T07:50:40.000Z | # Add a sphere to the plotter and show it with a custom scalar
# bar title.
#
import pyvista
sphere = pyvista.Sphere()
sphere['Data'] = sphere.points[:, 2]
plotter = pyvista.Plotter()
_ = plotter.add_mesh(sphere,
scalar_bar_args={'title': 'Z Position'})
plotter.show()
#
# Plot using RGB on a single... | 34.634146 | 77 | 0.607042 |
e9544ce9035e6a5986dd7c714a804c312ceabc05 | 30,236 | py | Python | tests/components/history/test_init.py | squirrel289/core | 6c5bcbfc3ee40927458e9188d6b79bf63933d3f9 | [
"Apache-2.0"
] | 5 | 2020-09-17T21:47:23.000Z | 2021-06-04T04:37:29.000Z | tests/components/history/test_init.py | squirrel289/core | 6c5bcbfc3ee40927458e9188d6b79bf63933d3f9 | [
"Apache-2.0"
] | 47 | 2020-07-23T07:14:33.000Z | 2022-03-31T06:01:46.000Z | tests/components/history/test_init.py | squirrel289/core | 6c5bcbfc3ee40927458e9188d6b79bf63933d3f9 | [
"Apache-2.0"
] | 2 | 2021-01-11T22:51:43.000Z | 2021-08-29T01:25:04.000Z | """The tests the History component."""
# pylint: disable=protected-access,invalid-name
from copy import copy
from datetime import timedelta
import json
import unittest
from homeassistant.components import history, recorder
from homeassistant.components.recorder.models import process_timestamp
import homeassistant.core... | 36.649697 | 88 | 0.598029 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.