hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2a6891d82ede3ff8138101987ed0ea7e1afd718b | 4,774 | py | Python | cardpay/model/mobile_verification_request.py | cardpay/python-sdk-v3 | 35e7c42ca3e9a1ea6222fe2150f92ede64c70248 | [
"MIT"
] | 6 | 2019-07-16T06:27:25.000Z | 2021-03-04T14:24:05.000Z | cardpay/model/mobile_verification_request.py | cardpay/python-sdk-v3 | 35e7c42ca3e9a1ea6222fe2150f92ede64c70248 | [
"MIT"
] | 5 | 2019-11-18T09:07:51.000Z | 2021-02-12T13:59:55.000Z | cardpay/model/mobile_verification_request.py | cardpay/python-sdk-v3 | 35e7c42ca3e9a1ea6222fe2150f92ede64c70248 | [
"MIT"
] | 5 | 2019-07-18T13:42:15.000Z | 2021-11-18T12:40:32.000Z | # coding: utf-8
"""
CardPay REST API
Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to c... | 33.384615 | 546 | 0.603268 |
853af9a7cdf1b0360cadb77ee946564a5d10cf2f | 15,386 | py | Python | Streamlit/app_v2.py | fbontron/Son_atyPyque | 3819520f1e473f3d3b77525e9d0d6e4ec7633c53 | [
"MIT"
] | null | null | null | Streamlit/app_v2.py | fbontron/Son_atyPyque | 3819520f1e473f3d3b77525e9d0d6e4ec7633c53 | [
"MIT"
] | null | null | null | Streamlit/app_v2.py | fbontron/Son_atyPyque | 3819520f1e473f3d3b77525e9d0d6e4ec7633c53 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 4 12:18:14 2021
@author: Quasarlight
"""
import streamlit as st
import os, sys
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import librosa as lb
import seaborn as sns
import random
from os import listdir
from os.path import isfi... | 39.050761 | 235 | 0.627908 |
1b8489e1650bc95014cb34ff0855e06aa05dc5d2 | 935 | py | Python | ws_py/pysocket_client.py | garameki/websocket_client-max31856 | 37e8b53f0d039d050bdc8f8080fe65bbd56dcbbd | [
"MIT"
] | null | null | null | ws_py/pysocket_client.py | garameki/websocket_client-max31856 | 37e8b53f0d039d050bdc8f8080fe65bbd56dcbbd | [
"MIT"
] | null | null | null | ws_py/pysocket_client.py | garameki/websocket_client-max31856 | 37e8b53f0d039d050bdc8f8080fe65bbd56dcbbd | [
"MIT"
] | null | null | null | #!/usr/bin/enb python3
#_*_ coding : utf-8 _*_
from lib import pt
from handshake import handshake
from send import send
from receive import receive
from close import close
from error import *
import socket
import select
class Pysocket:
def __init__(self,host,port):
self.sock = socket.socket(socket.AF_INET,socket... | 18.333333 | 62 | 0.71016 |
cd92de7d3be5979989822d49449d1bb260e5c347 | 1,403 | bzl | Python | tools/build_rules/utilities.bzl | xylocarp-whelky/bazel | 4ba404f7ed0473df3f0effa016c107ef677464f6 | [
"Apache-2.0"
] | 1 | 2020-01-26T09:55:10.000Z | 2020-01-26T09:55:10.000Z | tools/build_rules/utilities.bzl | xylocarp-whelky/bazel | 4ba404f7ed0473df3f0effa016c107ef677464f6 | [
"Apache-2.0"
] | null | null | null | tools/build_rules/utilities.bzl | xylocarp-whelky/bazel | 4ba404f7ed0473df3f0effa016c107ef677464f6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc. All Rights Reserved.
# Copyright 2017 The Bazel 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/license... | 36.921053 | 83 | 0.699216 |
00caf5f5c4443efe0e7fa27ac0f065445d56495f | 2,592 | py | Python | montecarlo.py | arpanmangal/Red-Jack | 7af4f9fe978238606358bbee2ca3943e07b3e14d | [
"MIT"
] | null | null | null | montecarlo.py | arpanmangal/Red-Jack | 7af4f9fe978238606358bbee2ca3943e07b3e14d | [
"MIT"
] | null | null | null | montecarlo.py | arpanmangal/Red-Jack | 7af4f9fe978238606358bbee2ca3943e07b3e14d | [
"MIT"
] | null | null | null | """
Using monte-carlo method for policy evaluation
"""
from tqdm import tqdm
from environment.simulator import Simulator, GameEndError
from qpitables import *
def montecarlo (sim, PItable, first_visit=False, num_episodes=100):
"""
Given a policy pi, runs monte-carlo method
and do policy-evaluation to com... | 26.721649 | 120 | 0.627701 |
837efc95c7e94bdd9182e27c91239fbb9deaa7f6 | 1,763 | py | Python | tests/classes/test_credentials.py | ravensorb/py-wordpress-database | e82e6aa3845a1590ef39c2d87b25eb5b5462c2a9 | [
"MIT"
] | null | null | null | tests/classes/test_credentials.py | ravensorb/py-wordpress-database | e82e6aa3845a1590ef39c2d87b25eb5b5462c2a9 | [
"MIT"
] | null | null | null | tests/classes/test_credentials.py | ravensorb/py-wordpress-database | e82e6aa3845a1590ef39c2d87b25eb5b5462c2a9 | [
"MIT"
] | null | null | null | """ Tests for the WpCredentials class. """
import unittest
from wpdatabase2.classes import WpCredentials
class CredentialsTestCase(unittest.TestCase):
""" Tests for the WpCredentials class. """
def test_from_aws_secrets_manager(self):
"""
Assert that from_aws_secrets_manager() returns a clas... | 30.396552 | 90 | 0.66591 |
e18d490e88cfc6c649cf3e19f069a310ab277599 | 21,268 | py | Python | datacube/scripts/dataset.py | eodcgmbh/datacube-core | 0792e519ccfd33e0a0acf368aa6f33ca2c1ea50f | [
"Apache-2.0"
] | 1 | 2021-08-21T08:54:22.000Z | 2021-08-21T08:54:22.000Z | datacube/scripts/dataset.py | eodcgmbh/datacube-core | 0792e519ccfd33e0a0acf368aa6f33ca2c1ea50f | [
"Apache-2.0"
] | null | null | null | datacube/scripts/dataset.py | eodcgmbh/datacube-core | 0792e519ccfd33e0a0acf368aa6f33ca2c1ea50f | [
"Apache-2.0"
] | null | null | null | # This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2020 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
import csv
import datetime
import logging
import sys
from collections import OrderedDict
from typing import Iterable, Mapping, MutableMapping, A... | 37.910873 | 120 | 0.62239 |
8d8a791c209325849ff61ba63502741b89a1d433 | 3,455 | py | Python | src/python/WMCore/WMRuntime/TaskSpace.py | hufnagel/WMCore | b150cc725b68fc1cf8e6e0fa07c826226a4421fa | [
"Apache-2.0"
] | 1 | 2015-02-05T13:43:46.000Z | 2015-02-05T13:43:46.000Z | src/python/WMCore/WMRuntime/TaskSpace.py | hufnagel/WMCore | b150cc725b68fc1cf8e6e0fa07c826226a4421fa | [
"Apache-2.0"
] | 1 | 2016-10-13T14:57:35.000Z | 2016-10-13T14:57:35.000Z | src/python/WMCore/WMRuntime/TaskSpace.py | hufnagel/WMCore | b150cc725b68fc1cf8e6e0fa07c826226a4421fa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
_TaskSpace_
Runtime utils for a Task
"""
import os
import sys
import inspect
import pickle
from WMCore.WMSpec.WMWorkload import WMWorkloadHelper
def preloadWorkload(x):
"""
_preloadWorkload_
Method decorator to ensure that accessors to the workload are
called only when... | 23.993056 | 84 | 0.592764 |
92c3c038c820ffe728b60afef7c4e197d930c92d | 55 | py | Python | build/tools/__init__.py | DevinCarr/artemis-build | 5730ff943d6ace08606f72083262b222410277b0 | [
"MIT"
] | null | null | null | build/tools/__init__.py | DevinCarr/artemis-build | 5730ff943d6ace08606f72083262b222410277b0 | [
"MIT"
] | null | null | null | build/tools/__init__.py | DevinCarr/artemis-build | 5730ff943d6ace08606f72083262b222410277b0 | [
"MIT"
] | null | null | null | from .make import main
def make(args):
main(args)
| 11 | 22 | 0.672727 |
ee089bf883de1cc5fbc754bb85f4195af1763c04 | 405 | py | Python | pip_detector/setup.py | Ajapaik/ml-2021-ajapaik | 31e318f10329405237a5773a1d963b3ab867fa02 | [
"Apache-2.0"
] | null | null | null | pip_detector/setup.py | Ajapaik/ml-2021-ajapaik | 31e318f10329405237a5773a1d963b3ab867fa02 | [
"Apache-2.0"
] | 9 | 2021-11-12T16:54:24.000Z | 2021-12-12T14:13:49.000Z | pip_detector/setup.py | iharsuvorau/ml-2021-ajapaik | 31e318f10329405237a5773a1d963b3ab867fa02 | [
"Apache-2.0"
] | 1 | 2022-02-24T21:23:06.000Z | 2022-02-24T21:23:06.000Z | from setuptools import setup, find_packages
setup(
name='pip_detector',
version='0.1.0',
packages=find_packages(where='src'),
package_dir={"": "src"},
include_package_data=True,
install_requires=[
'click',
'opencv-python',
'numpy'
],
entry_points={
'conso... | 20.25 | 51 | 0.57284 |
e2a20beec51981f08e698157143e58154ed3cd72 | 6,712 | py | Python | test/functional/wallet_balance.py | joaquimsilva12/Q8bitcoin | 10b5901120a0ef369e403f761323680f1b61f1bc | [
"MIT"
] | 2 | 2020-10-29T05:43:16.000Z | 2021-07-02T13:29:27.000Z | test/functional/wallet_balance.py | yujiye/bitcoin | a35e937096a128a749b149e257a5829f5c9a9089 | [
"MIT"
] | 3 | 2018-10-01T15:57:47.000Z | 2019-02-06T16:47:55.000Z | test/functional/wallet_balance.py | yujiye/bitcoin | a35e937096a128a749b149e257a5829f5c9a9089 | [
"MIT"
] | 3 | 2020-10-23T13:45:58.000Z | 2022-01-06T17:25:51.000Z | #!/usr/bin/env python3
# Copyright (c) 2018-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet balance RPC methods."""
from decimal import Decimal
from test_framework.test_framework... | 45.972603 | 150 | 0.675954 |
460d85f8413db1e216f6107ce6ec568e39a93842 | 12,198 | py | Python | test/mitmproxy/proxy/protocol/test_websocket.py | takeratta/mitmproxy | 569d275d763f499cce9673fcf118dcc8d59d2eeb | [
"MIT"
] | 4 | 2018-03-14T03:47:22.000Z | 2018-06-28T08:00:39.000Z | test/mitmproxy/proxy/protocol/test_websocket.py | takeratta/mitmproxy | 569d275d763f499cce9673fcf118dcc8d59d2eeb | [
"MIT"
] | null | null | null | test/mitmproxy/proxy/protocol/test_websocket.py | takeratta/mitmproxy | 569d275d763f499cce9673fcf118dcc8d59d2eeb | [
"MIT"
] | 1 | 2018-04-22T15:43:46.000Z | 2018-04-22T15:43:46.000Z | import pytest
import os
import tempfile
import traceback
from mitmproxy import options
from mitmproxy import exceptions
from mitmproxy.http import HTTPFlow
from mitmproxy.websocket import WebSocketFlow
from mitmproxy.net import tcp
from mitmproxy.net import http
from ...net import tservers as net_tservers
from ... im... | 33.603306 | 125 | 0.644204 |
8dccddf60604571e068ed2cd986fa05176554715 | 4,850 | py | Python | cliggle/helpers.py | jkarimi91/cliggle | 8ec19a97b6a10e6787334a5c2454a0bef455666f | [
"MIT"
] | 6 | 2017-06-09T21:55:48.000Z | 2017-10-17T15:06:57.000Z | cliggle/helpers.py | jkarimi91/cliggle | 8ec19a97b6a10e6787334a5c2454a0bef455666f | [
"MIT"
] | 3 | 2017-06-10T18:16:34.000Z | 2021-06-01T21:58:24.000Z | cliggle/helpers.py | jkarimi91/cliggle | 8ec19a97b6a10e6787334a5c2454a0bef455666f | [
"MIT"
] | null | null | null | import json
import os
import re
import click
import requests
import tqdm
BASE_URL = 'https://www.kaggle.com'
def get_competition_list():
response = requests.get(BASE_URL + '/competitions')
pattern = r'\"competitions\":(\[.+?\])'
return get_json(response.text, pattern)
def get_file_list(competition_url... | 35.661765 | 118 | 0.660412 |
d8a93d82c434ed09ff8a6b087c6cff73218da0f2 | 1,423 | py | Python | app/functions/predictWinPercentage.py | vikdad1/fantasy_basketball | 87208de262cf6f52aa86fd4ede021f2d16a352ad | [
"Apache-2.0"
] | null | null | null | app/functions/predictWinPercentage.py | vikdad1/fantasy_basketball | 87208de262cf6f52aa86fd4ede021f2d16a352ad | [
"Apache-2.0"
] | null | null | null | app/functions/predictWinPercentage.py | vikdad1/fantasy_basketball | 87208de262cf6f52aa86fd4ede021f2d16a352ad | [
"Apache-2.0"
] | null | null | null | import os
import pickle
import pandas as pd
from sklearn.linear_model import LinearRegression
path = os.getcwd() #get working directory
model = pickle.load(open(path + '/models/top_5_players.sav', 'rb'))
def aggregatePlayerStats(data, player_list):
team_data = data[data['player'].isin(player_list)] #subset data ... | 47.433333 | 100 | 0.639494 |
61b9133750b9f5b5243521757bf047b62b018984 | 135 | py | Python | PP4E-Examples-1.4/Examples/PP4E/System/Exits/testexit_sys.py | AngelLiang/PP4E | 3a7f63b366e1e4700b4d2524884696999a87ba9d | [
"MIT"
] | null | null | null | PP4E-Examples-1.4/Examples/PP4E/System/Exits/testexit_sys.py | AngelLiang/PP4E | 3a7f63b366e1e4700b4d2524884696999a87ba9d | [
"MIT"
] | null | null | null | PP4E-Examples-1.4/Examples/PP4E/System/Exits/testexit_sys.py | AngelLiang/PP4E | 3a7f63b366e1e4700b4d2524884696999a87ba9d | [
"MIT"
] | null | null | null | def later():
import sys
print('Bye sys world')
sys.exit(42)
print('Never reached')
if __name__ == '__main__': later()
| 16.875 | 34 | 0.607407 |
55c7a70f1bf14be151d5f49948474f563229bf2c | 135 | py | Python | py65emu/__init__.py | cmgriffin/py65emu | b611215c2034f099844c237589658d4a39563b08 | [
"WTFPL"
] | 71 | 2017-06-20T14:40:03.000Z | 2022-03-06T12:49:18.000Z | py65emu/__init__.py | cmgriffin/py65emu | b611215c2034f099844c237589658d4a39563b08 | [
"WTFPL"
] | 7 | 2018-07-03T01:42:55.000Z | 2021-12-30T22:25:08.000Z | py65emu/__init__.py | cmgriffin/py65emu | b611215c2034f099844c237589658d4a39563b08 | [
"WTFPL"
] | 20 | 2018-06-29T23:53:40.000Z | 2022-03-25T16:08:41.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Jeremy Neiman'
__email__ = 'docmarionum1@gmail.com'
__version__ = '0.0.0'
| 19.285714 | 36 | 0.666667 |
28db20419386e497830bf0b25413c7140d3f1644 | 1,475 | py | Python | backend/polzybackend/messenger.py | Athos1972/PoLZy | 794eb152cfa2ad3d02c1c5110bd106b7486ff615 | [
"MIT"
] | null | null | null | backend/polzybackend/messenger.py | Athos1972/PoLZy | 794eb152cfa2ad3d02c1c5110bd106b7486ff615 | [
"MIT"
] | 4 | 2020-12-30T11:01:08.000Z | 2021-06-29T15:41:23.000Z | backend/polzybackend/messenger.py | Athos1972/PoLZy | 794eb152cfa2ad3d02c1c5110bd106b7486ff615 | [
"MIT"
] | null | null | null | import queue
import json
class Messenger:
def __init__(self):
self.listeners = []
def listen(self):
q = queue.Queue(maxsize=5)
self.listeners.append(q)
return q
def announce(self, msg):
for i in reversed(range(len(self.listeners))):
try:
... | 27.314815 | 84 | 0.524746 |
5505ef4896aa851425858bc7a8171e2fc2177857 | 9,756 | py | Python | geister2.py | srpkdyy/geister_rl | 8190243d6b3ccd48aa6dfbc3920b903bedb79901 | [
"MIT"
] | null | null | null | geister2.py | srpkdyy/geister_rl | 8190243d6b3ccd48aa6dfbc3920b903bedb79901 | [
"MIT"
] | null | null | null | geister2.py | srpkdyy/geister_rl | 8190243d6b3ccd48aa6dfbc3920b903bedb79901 | [
"MIT"
] | null | null | null | # added by Kaoru Shiga
import copy
import _pickle as cPickle
from geister import Geister
class Geister2(Geister):
def __init__(self, info=None):
self._turn = 0
if info is None:
super().__init__()
else:
super().__init__(info)
# raise error. and change direct: d=... | 36.402985 | 282 | 0.440754 |
f2c384397db17db158f0722fcfc664cac9e2b47e | 2,244 | py | Python | app/utils/api_exception.py | vonsago/service_platform | 2433761be021968889af4c7b08b6d801453ab3b1 | [
"MIT"
] | 6 | 2018-09-08T13:18:15.000Z | 2019-06-08T06:45:25.000Z | app/utils/api_exception.py | vonsago/service_platform | 2433761be021968889af4c7b08b6d801453ab3b1 | [
"MIT"
] | null | null | null | app/utils/api_exception.py | vonsago/service_platform | 2433761be021968889af4c7b08b6d801453ab3b1 | [
"MIT"
] | 2 | 2018-09-06T01:32:24.000Z | 2018-09-09T14:35:17.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/9/8 下午9:04
# @Author : Vassago
# @File : api_exception.py
# @Software: PyCharm
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from flask import Response
class APIException(Exception):
def __init__(self, status_code=None, msg=None, e... | 29.92 | 113 | 0.686275 |
8e16db842a0528b6082c8b48955aa7330771da78 | 2,598 | py | Python | wolframclient/serializers/__init__.py | krbarker/WolframClientForPython | f2198b15cad0f406b78ad40a4d1e3ca76125b408 | [
"MIT"
] | null | null | null | wolframclient/serializers/__init__.py | krbarker/WolframClientForPython | f2198b15cad0f406b78ad40a4d1e3ca76125b408 | [
"MIT"
] | null | null | null | wolframclient/serializers/__init__.py | krbarker/WolframClientForPython | f2198b15cad0f406b78ad40a4d1e3ca76125b408 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from wolframclient.serializers.serializable import WLSerializable
from wolframclient.serializers.encoder import wolfram_encoder
from wolframclient.utils.importutils import API
__all__ = ['export', 'WLSerializable', 'wolf... | 37.114286 | 120 | 0.683603 |
109cfb930fd0d4ebab2edef83b0575d5ab775bab | 405 | py | Python | tests/testproject/wsgi.py | matthiask/django-multilingual-search | 485c690d865da3267b19e073e28d3e2290f36611 | [
"MIT"
] | 24 | 2015-06-15T20:36:31.000Z | 2019-03-22T15:43:53.000Z | tests/testproject/wsgi.py | matthiask/django-multilingual-search | 485c690d865da3267b19e073e28d3e2290f36611 | [
"MIT"
] | 20 | 2015-08-29T14:09:04.000Z | 2022-03-11T23:12:24.000Z | tests/testproject/wsgi.py | matthiask/django-multilingual-search | 485c690d865da3267b19e073e28d3e2290f36611 | [
"MIT"
] | 13 | 2015-08-20T14:48:47.000Z | 2022-01-19T15:34:01.000Z | """
WSGI config for testproject project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.settings")
from djang... | 27 | 78 | 0.787654 |
9d9cf5dd270f94aee10165ede3074dd8d5615a97 | 1,006 | py | Python | extract_jazz_dataset.py | GuillaumeShrp/MIDI-VAE | 45d6477e09f889d277eeb9ce4b760650460aada2 | [
"MIT"
] | null | null | null | extract_jazz_dataset.py | GuillaumeShrp/MIDI-VAE | 45d6477e09f889d277eeb9ce4b760650460aada2 | [
"MIT"
] | null | null | null | extract_jazz_dataset.py | GuillaumeShrp/MIDI-VAE | 45d6477e09f889d277eeb9ce4b760650460aada2 | [
"MIT"
] | null | null | null | import requests, bs4
for i in range(1,14):
if (i < 10):
url = 'https://midkar.com/jazz/jazz_0' + str(i) + '.html'
else:
url = 'https://midkar.com/jazz/jazz_' + str(i) + '.html'
response = requests.get(url)
parsed = bs4.BeautifulSoup(response.text, 'html.parser')
musictab = parsed... | 38.692308 | 66 | 0.562624 |
b9988b8e68bbf442135e1e498479fb587a4b8948 | 45,896 | gyp | Python | chrome/chrome.gyp | MIPS/external-chromium_org | e31b3128a419654fd14003d6117caa8da32697e7 | [
"BSD-3-Clause"
] | 2 | 2018-11-24T07:58:44.000Z | 2019-02-22T21:02:46.000Z | chrome/chrome.gyp | carlosavignano/android_external_chromium_org | 2b5652f7889ccad0fbdb1d52b04bad4c23769547 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/chrome.gyp | carlosavignano/android_external_chromium_org | 2b5652f7889ccad0fbdb1d52b04bad4c23769547 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 3 | 2017-07-31T19:09:52.000Z | 2019-01-04T18:48:50.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
# Define the common dependencies that contain all the actual
# Chromium functionality. This list gets... | 37.961952 | 154 | 0.502506 |
558613c7c843c50c1be971b966b834591ccbc326 | 253,508 | py | Python | pysnmp/SFRAP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/SFRAP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/SFRAP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module SFRAP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SFRAP-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:53:50 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23... | 156.389883 | 14,357 | 0.773021 |
b4e4025f450bc02d48df751f4c805e8a8e0f9134 | 1,941 | py | Python | core/bot.py | Sreedeepta/Axley | c6287639589ea384c72ebae26e54c71db8f221bf | [
"MIT"
] | 2 | 2021-08-21T13:00:50.000Z | 2021-08-22T12:23:07.000Z | core/bot.py | Sreedeepta/Axley | c6287639589ea384c72ebae26e54c71db8f221bf | [
"MIT"
] | null | null | null | core/bot.py | Sreedeepta/Axley | c6287639589ea384c72ebae26e54c71db8f221bf | [
"MIT"
] | null | null | null | import discord
import os
import dotenv
from discord.ext import commands
from motor.motor_asyncio import AsyncIOMotorClient
from cogs.help import AxleyHelpCommand
dotenv.load_dotenv()
class Axley(commands.AutoShardedBot):
def __init__(self):
self.bot_cogs = os.listdir("./cogs")
self.cool_emojis =... | 27.728571 | 64 | 0.565688 |
16b7681842964e632766cd0674738aa716395ff2 | 2,865 | py | Python | tests/collections/nlp/test_entity_linking_model.py | hamjam/NeMo | b3484d32e1317666151f931bfa39867d88ed8658 | [
"Apache-2.0"
] | 4,145 | 2019-09-13T08:29:43.000Z | 2022-03-31T18:31:44.000Z | tests/collections/nlp/test_entity_linking_model.py | hamjam/NeMo | b3484d32e1317666151f931bfa39867d88ed8658 | [
"Apache-2.0"
] | 2,031 | 2019-09-17T16:51:39.000Z | 2022-03-31T23:52:41.000Z | tests/collections/nlp/test_entity_linking_model.py | hamjam/NeMo | b3484d32e1317666151f931bfa39867d88ed8658 | [
"Apache-2.0"
] | 1,041 | 2019-09-13T10:08:21.000Z | 2022-03-30T06:37:38.000Z | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 33.705882 | 115 | 0.672251 |
73ea45d2a266490833f8b04847ba974adfa26628 | 6,818 | py | Python | modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py | vdncloud-dev/webrtc-clone | d65ae4a8ba50a327e2aa84619fa19207bdc34e3f | [
"DOC",
"BSD-3-Clause"
] | 1 | 2020-07-29T09:13:41.000Z | 2020-07-29T09:13:41.000Z | modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py | vdncloud-dev/webrtc-clone | d65ae4a8ba50a327e2aa84619fa19207bdc34e3f | [
"DOC",
"BSD-3-Clause"
] | null | null | null | modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py | vdncloud-dev/webrtc-clone | d65ae4a8ba50a327e2aa84619fa19207bdc34e3f | [
"DOC",
"BSD-3-Clause"
] | 1 | 2020-07-29T09:13:46.000Z | 2020-07-29T09:13:46.000Z | # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project au... | 38.303371 | 80 | 0.741713 |
107d83116f15be3b34a6416a1946dd8f8c7599d0 | 3,031 | py | Python | 07_BaseEstimator.py | subramgo/Py4DS | 14b7a24c28fb22185c9e4b0a9d376a031cad3098 | [
"Apache-2.0"
] | null | null | null | 07_BaseEstimator.py | subramgo/Py4DS | 14b7a24c28fb22185c9e4b0a9d376a031cad3098 | [
"Apache-2.0"
] | null | null | null | 07_BaseEstimator.py | subramgo/Py4DS | 14b7a24c28fb22185c9e4b0a9d376a031cad3098 | [
"Apache-2.0"
] | null | null | null | """
Demonstrate how to build a quick and dirty
Base Line Model using scikit learn
"""
# Load Libraries
import numpy as np
from sklearn import datasets
from sklearn.metrics import accuracy_score, confusion_matrix
# Let us use Iris dataset
iris = datasets.load_iris()
x = iris.data
y = iris.target
from sklearn.dumm... | 27.0625 | 123 | 0.701089 |
d11578478f686430b13f38c1814bb3853eed774a | 70 | py | Python | mplsvds/mplsvds/__init__.py | NunoEdgarGFlowHub/svds-style | 3562e009ebe3a31c453e3d3337103ce0ff04b61a | [
"MIT"
] | null | null | null | mplsvds/mplsvds/__init__.py | NunoEdgarGFlowHub/svds-style | 3562e009ebe3a31c453e3d3337103ce0ff04b61a | [
"MIT"
] | null | null | null | mplsvds/mplsvds/__init__.py | NunoEdgarGFlowHub/svds-style | 3562e009ebe3a31c453e3d3337103ce0ff04b61a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .mplsvds import *
__version__ = "0.1.7"
| 14 | 23 | 0.585714 |
4055dbd291a36a163d0369607fc85de15df15305 | 2,702 | py | Python | app/core/tests/test_models.py | locspoc/recipe-app-api | 86a0e3893c27f4eee9f29c9ad68e4f8092b57b98 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | locspoc/recipe-app-api | 86a0e3893c27f4eee9f29c9ad68e4f8092b57b98 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | locspoc/recipe-app-api | 86a0e3893c27f4eee9f29c9ad68e4f8092b57b98 | [
"MIT"
] | null | null | null | from unittest.mock import patch
from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
def sample_user(email='test@test.com.au', password='testpass'):
"""Create a sample user"""
return get_user_model().objects.create_user(email, password)
class ModelTests(T... | 30.704545 | 70 | 0.636936 |
f8dfdb4ea67cc34bd3d34d90fe7704458503214b | 547 | py | Python | adventofcode/2020/day10/part1.py | chengzhycn/code-etudes | 606bc4960cacfc273b32aaaa1fabf054473a973f | [
"Apache-2.0"
] | null | null | null | adventofcode/2020/day10/part1.py | chengzhycn/code-etudes | 606bc4960cacfc273b32aaaa1fabf054473a973f | [
"Apache-2.0"
] | null | null | null | adventofcode/2020/day10/part1.py | chengzhycn/code-etudes | 606bc4960cacfc273b32aaaa1fabf054473a973f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
def day_1(file) -> int:
diff1 = diff3 = 0
input_list = []
with open(file, "r") as f:
for line in f:
line = line.strip("\n")
input_list.append(int(line))
input_list.sort()
previous = 0
for i in input_list:
if i - previous == 1:
... | 21.038462 | 41 | 0.511883 |
284dc8fdf914e56e4fced58ec6f77db203dbbaa8 | 125 | py | Python | fe/urls.py | theSundayProgrammer/veed | 772a086650272c99e2f95482b9784f3b6f5ea7a7 | [
"Apache-2.0"
] | null | null | null | fe/urls.py | theSundayProgrammer/veed | 772a086650272c99e2f95482b9784f3b6f5ea7a7 | [
"Apache-2.0"
] | null | null | null | fe/urls.py | theSundayProgrammer/veed | 772a086650272c99e2f95482b9784f3b6f5ea7a7 | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from . import views
app_name="fe"
urlpatterns = [
path("", views.index, name="index"),
]
| 12.5 | 40 | 0.664 |
43d85c1d41fd4ae50064e450d9467719d1671150 | 1,802 | py | Python | BeagleBone Python/SparkFun TB6612FNG breakout/BBB_BasicMotorControl.py | DocVaughan/CRAWLAB-Code-Snippets | 90c946bef0fbe37401f822d58ce5a6b3c5349616 | [
"BSD-3-Clause"
] | 12 | 2015-03-03T18:32:03.000Z | 2021-03-13T18:50:37.000Z | BeagleBone Python/SparkFun TB6612FNG breakout/BBB_BasicMotorControl.py | DocVaughan/CRAWLAB-Code-Snippets | 90c946bef0fbe37401f822d58ce5a6b3c5349616 | [
"BSD-3-Clause"
] | null | null | null | BeagleBone Python/SparkFun TB6612FNG breakout/BBB_BasicMotorControl.py | DocVaughan/CRAWLAB-Code-Snippets | 90c946bef0fbe37401f822d58ce5a6b3c5349616 | [
"BSD-3-Clause"
] | 7 | 2017-01-20T20:31:54.000Z | 2021-12-28T16:52:48.000Z | #! /usr/bin/env python
###############################################################################
# BBB_BasicMotorControl.py
#
# Basic test of motor control using the SparkFun TB6612FNG breakout board
# http://sfe.io/p9457
#
# Requires - Adafruit BeagleBone IO Python library
#
# NOTE: Any plotting is set up for... | 29.064516 | 79 | 0.648169 |
647fd46fed4a4c83c227ac55ef8881c1b686f1b0 | 3,594 | py | Python | action_plugins/dcos_connection.py | dirkjonker/ansible-dcos | 3b0d3cf625f70df96e8f7af59622c5416282597c | [
"Apache-2.0"
] | 3 | 2018-02-19T09:07:52.000Z | 2018-02-21T14:38:10.000Z | action_plugins/dcos_connection.py | dirkjonker/ansible-dcos | 3b0d3cf625f70df96e8f7af59622c5416282597c | [
"Apache-2.0"
] | 1 | 2018-06-14T13:15:37.000Z | 2022-03-08T22:16:10.000Z | action_plugins/dcos_connection.py | dirkjonker/ansible-dcos | 3b0d3cf625f70df96e8f7af59622c5416282597c | [
"Apache-2.0"
] | null | null | null | """
Action plugin to configure a DC/OS cluster.
Uses the Ansible host to connect directly to DC/OS.
"""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import base64
import json
import time
from six.moves.urllib.parse import urlparse
from ansible.plugins.action import ActionB... | 28.752 | 77 | 0.629661 |
ad28a98d3bc7ebd6d800b1b1d7578f75757ac1dd | 757 | py | Python | xlsxwriter/test/comparison/test_selection01.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-07-25T06:08:09.000Z | 2019-11-01T02:33:56.000Z | xlsxwriter/test/comparison/test_selection01.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 13 | 2019-07-14T00:29:05.000Z | 2019-11-26T06:16:46.000Z | xlsxwriter/test/comparison/test_selection01.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 22.264706 | 79 | 0.610304 |
aba8e74dfbf9dec567d57cb3ae5853ce9933de5e | 20,220 | py | Python | paddle_upgrade_tool/refactor.py | MingMingShangTian/paddle1to2 | 4a711ea310242d0a18e692ddebf3e02f90457b8f | [
"Apache-2.0"
] | 11 | 2021-07-14T12:51:58.000Z | 2022-03-10T09:05:32.000Z | paddle_upgrade_tool/refactor.py | MingMingShangTian/paddle1to2 | 4a711ea310242d0a18e692ddebf3e02f90457b8f | [
"Apache-2.0"
] | 3 | 2020-09-22T07:00:25.000Z | 2020-11-14T03:36:42.000Z | paddle_upgrade_tool/refactor.py | MingMingShangTian/paddle1to2 | 4a711ea310242d0a18e692ddebf3e02f90457b8f | [
"Apache-2.0"
] | 5 | 2021-01-06T05:58:46.000Z | 2022-02-14T01:42:59.000Z | from bowler import Query
from bowler.helpers import power_parts, quoted_parts, dotted_parts
from bowler.types import LN, Capture, Filename
from fissix.pytree import Leaf, Node, type_repr
from fissix.fixer_util import Attr, Comma, Dot, LParen, Name, Newline, RParen, KeywordArg, Number, ArgList
from fissix.fixer_util im... | 38.007519 | 206 | 0.568843 |
7aa1880e7c1b72d37e7831589202023cab19ee88 | 5,685 | py | Python | library/python/runtime_py3/import_test.py | Kim2212/catboost | b9ad3b0dac6269c2638e8ee4e7bb85662677a921 | [
"Apache-2.0"
] | null | null | null | library/python/runtime_py3/import_test.py | Kim2212/catboost | b9ad3b0dac6269c2638e8ee4e7bb85662677a921 | [
"Apache-2.0"
] | null | null | null | library/python/runtime_py3/import_test.py | Kim2212/catboost | b9ad3b0dac6269c2638e8ee4e7bb85662677a921 | [
"Apache-2.0"
] | null | null | null | import re
import sys
import traceback
from __res import importer
def check_imports(no_check=None, extra=[], skip_func=None):
"""
tests all bundled modules are importable
just add
"PEERDIR(library/python/import_test)" to your CMakeLists.txt and
"from import_test import test_imports" to your python... | 26.816038 | 88 | 0.569921 |
7ff967dacfc6fbb64b1ceda30c4cd6fe4ad797dd | 2,950 | py | Python | tests/unit/modules/test_rsync.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 5 | 2017-02-07T05:39:29.000Z | 2020-06-13T02:07:33.000Z | tests/unit/modules/test_rsync.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 86 | 2017-01-27T11:54:46.000Z | 2020-05-20T06:25:26.000Z | tests/unit/modules/test_rsync.py | byteskeptical/salt | 637fe0b04f38b2274191b005d73b3c6707d7f400 | [
"Apache-2.0"
] | 11 | 2017-01-26T19:36:29.000Z | 2021-12-11T07:54:16.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: Jayesh Kariya <jayeshk@saltstack.com>
'''
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import skipIf, TestCase
from tes... | 34.302326 | 94 | 0.577966 |
cb2cd5da5e2e63620181ae76ccb3e3975afaa6eb | 5,458 | py | Python | SampleScripts/tests/tests_random.py | kyspencer/GAMMA-PC-A-Greedy-Memetic-Algorithm-for-Storing-Cooling-Objects | 3462ff8cc555ad646b59909c661ca58b21294a7b | [
"MIT"
] | null | null | null | SampleScripts/tests/tests_random.py | kyspencer/GAMMA-PC-A-Greedy-Memetic-Algorithm-for-Storing-Cooling-Objects | 3462ff8cc555ad646b59909c661ca58b21294a7b | [
"MIT"
] | null | null | null | SampleScripts/tests/tests_random.py | kyspencer/GAMMA-PC-A-Greedy-Memetic-Algorithm-for-Storing-Cooling-Objects | 3462ff8cc555ad646b59909c661ca58b21294a7b | [
"MIT"
] | 1 | 2019-11-11T21:43:34.000Z | 2019-11-11T21:43:34.000Z | # tests_random.py
# This script trys to determine the cause of errors that don't seem to be
# contained in one module. It works with Python 3
import binpacking_dynamic as bp
import coolcookies
import mooproblem
import numpy as np
import unittest
import pickle
from binpacking_dynamic import coordarrays
from solutio... | 40.731343 | 84 | 0.664163 |
baab4c35594fca517985f6ca67b5b367a9ec6177 | 2,639 | py | Python | app/v1/views/votes.py | martinMutuma/def-politico | 8edec74e23d5e4a9fe0faf02843bbc89187008ce | [
"MIT"
] | null | null | null | app/v1/views/votes.py | martinMutuma/def-politico | 8edec74e23d5e4a9fe0faf02843bbc89187008ce | [
"MIT"
] | 9 | 2019-03-19T11:23:29.000Z | 2019-03-22T08:01:52.000Z | app/v1/views/votes.py | martinMutuma/def-politico | 8edec74e23d5e4a9fe0faf02843bbc89187008ce | [
"MIT"
] | 4 | 2019-03-19T09:58:53.000Z | 2019-03-21T19:35:35.000Z | from flask import Blueprint
from flask import request
from flask import jsonify
from flask import make_response
from app.v1.models.office_model import Office
from app.v1.models.user_model import User
from app.v1.models.vote_model import Vote
from app.v1.utils.validator import response, exists, response_error
from app.b... | 28.376344 | 80 | 0.635468 |
cf4a144d5f14bd6ca5b8578d8efced69eae6ee5c | 1,560 | py | Python | indexdigest/test/linters/test_0075_test_tables.py | macbre/index-digest | cb0c42f3905b608d58e1c214f461352b74aaa8df | [
"MIT"
] | 41 | 2017-10-25T11:52:50.000Z | 2022-02-10T07:18:06.000Z | indexdigest/test/linters/test_0075_test_tables.py | macbre/index-digest | cb0c42f3905b608d58e1c214f461352b74aaa8df | [
"MIT"
] | 120 | 2017-09-28T17:07:52.000Z | 2022-03-31T03:20:55.000Z | indexdigest/test/linters/test_0075_test_tables.py | macbre/index-digest | cb0c42f3905b608d58e1c214f461352b74aaa8df | [
"MIT"
] | 6 | 2017-11-09T19:52:44.000Z | 2022-03-15T09:44:18.000Z | from __future__ import print_function
from unittest import TestCase
from indexdigest.linters import check_test_tables
from indexdigest.linters.linter_0075_test_tables import is_test_table
from indexdigest.test import DatabaseTestMixin
class TestTables(TestCase, DatabaseTestMixin):
def test_is_test_table(self):... | 38.04878 | 105 | 0.710897 |
9109b1a221c43c78a72af77f0dd1f6b7e70730b9 | 67,175 | py | Python | lib/doconce/common.py | MartinHeroux/doconce | 616af0156acfa9f58b5319e9e34c1d62a8950007 | [
"BSD-3-Clause"
] | null | null | null | lib/doconce/common.py | MartinHeroux/doconce | 616af0156acfa9f58b5319e9e34c1d62a8950007 | [
"BSD-3-Clause"
] | null | null | null | lib/doconce/common.py | MartinHeroux/doconce | 616af0156acfa9f58b5319e9e34c1d62a8950007 | [
"BSD-3-Clause"
] | null | null | null | """
This module contains data structures used in translation of the
DocOnce format to other formats. Some convenience functions used in
translation modules (latex.py, html.py, etc.) are also included in
here.
"""
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliase... | 41.671836 | 473 | 0.541362 |
0dddfaaa277d76b5b6c0e205de7cab822acf18e1 | 3,395 | py | Python | examples/research_projects/movement-pruning/counts_parameters.py | liminghao1630/transformers | 207594be81b8e5a8589c8b11c3b236924555d806 | [
"Apache-2.0"
] | 50,404 | 2019-09-26T09:55:55.000Z | 2022-03-31T23:07:49.000Z | examples/research_projects/movement-pruning/counts_parameters.py | liminghao1630/transformers | 207594be81b8e5a8589c8b11c3b236924555d806 | [
"Apache-2.0"
] | 13,179 | 2019-09-26T10:10:57.000Z | 2022-03-31T23:17:08.000Z | examples/research_projects/movement-pruning/counts_parameters.py | liminghao1630/transformers | 207594be81b8e5a8589c8b11c3b236924555d806 | [
"Apache-2.0"
] | 13,337 | 2019-09-26T10:49:38.000Z | 2022-03-31T23:06:17.000Z | # Copyright 2020-present, the HuggingFace Inc. team.
#
# 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 o... | 36.505376 | 124 | 0.636524 |
06db40d615addd4c283028e11574b09d48e533ce | 1,108 | py | Python | configloader/png/tests/test_config.py | purnimapatel/dffml | 0607cb6f30bc1d9fd5348f7365f639759cb9d286 | [
"MIT"
] | 2 | 2020-02-21T00:03:54.000Z | 2020-04-08T17:38:47.000Z | configloader/png/tests/test_config.py | purnimapatel/dffml | 0607cb6f30bc1d9fd5348f7365f639759cb9d286 | [
"MIT"
] | null | null | null | configloader/png/tests/test_config.py | purnimapatel/dffml | 0607cb6f30bc1d9fd5348f7365f639759cb9d286 | [
"MIT"
] | 1 | 2021-10-01T18:37:19.000Z | 2021-10-01T18:37:19.000Z | import json
import pathlib
import hashlib
from dffml.util.asynctestcase import AsyncTestCase
from dffml_config_png.configloader import PNGConfigLoader
IMAGE1_HASH = "d8dd06cd1e9b9ed9f1e85ba2e91031faee142de66f8e02556d6590223038288c970d93bbc31fd6c655188632aa72b62c"
class TestConfig(AsyncTestCase):
async def test_... | 35.741935 | 112 | 0.5713 |
e6826f505fc71010b03b9c41f2f2d9675902e9cc | 2,405 | py | Python | bin/train_elmo.py | agemagician/bilm-tf | d357320ae8967e5613731612981e333c6dcef3e2 | [
"Apache-2.0"
] | null | null | null | bin/train_elmo.py | agemagician/bilm-tf | d357320ae8967e5613731612981e333c6dcef3e2 | [
"Apache-2.0"
] | null | null | null | bin/train_elmo.py | agemagician/bilm-tf | d357320ae8967e5613731612981e333c6dcef3e2 | [
"Apache-2.0"
] | null | null | null |
import argparse
# Change 1
import horovod.tensorflow as hvd
# Change 2
hvd.init()
import os
#os.environ['CUDA_VISIBLE_DEVICES'] = str(hvd.local_rank())
import numpy as np
from bilm.training import train, load_options_latest_checkpoint, load_vocab
from bilm.data import BidirectionalLMDataset
def main(args):
... | 24.292929 | 105 | 0.616632 |
af9ec8d1756c856d5356adf7cb05db3e1b12ee26 | 17,165 | py | Python | cc_attention/check3dby2d.py | Serge-weihao/CCNet-Pure-Pytorch | ff51a27bc5e111b2e7ddc9258266a2fea4637ac6 | [
"MIT"
] | 173 | 2019-12-26T15:39:11.000Z | 2022-03-21T12:15:53.000Z | cc_attention/check3dby2d.py | truman1211/CCNet-Pure-Pytorch | ff51a27bc5e111b2e7ddc9258266a2fea4637ac6 | [
"MIT"
] | 19 | 2020-01-10T07:16:21.000Z | 2021-08-24T03:41:11.000Z | cc_attention/check3dby2d.py | truman1211/CCNet-Pure-Pytorch | ff51a27bc5e111b2e7ddc9258266a2fea4637ac6 | [
"MIT"
] | 22 | 2020-01-27T14:24:40.000Z | 2022-03-30T07:16:45.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Softmax
import torch
import torch.nn as nn
import torch.autograd as autograd
import torch.cuda.comm as comm
import torch.nn.functional as F
from torch.autograd.function import once_differentiable
from torch.utils.cpp_extension impo... | 56.837748 | 218 | 0.65051 |
639a366be270e700e7ffc9b015cf349a48dae7b2 | 5,389 | py | Python | poattack.py | haiweiosu/Padding_Oracle_Attacks | 8548c4b932c94ddf9a8ebfe4a023df8c42613359 | [
"Apache-2.0"
] | null | null | null | poattack.py | haiweiosu/Padding_Oracle_Attacks | 8548c4b932c94ddf9a8ebfe4a023df8c42613359 | [
"Apache-2.0"
] | null | null | null | poattack.py | haiweiosu/Padding_Oracle_Attacks | 8548c4b932c94ddf9a8ebfe4a023df8c42613359 | [
"Apache-2.0"
] | null | null | null | """
CS-5830: Homework 2
Padding Oracle Attack
Daniel Speiser and Haiwei Su
"""
from paddingoracle import PaddingOracle, PaddingOracleServer, xor
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
import base64
import os
import binascii
... | 41.775194 | 119 | 0.602709 |
50805f29f0b3f491664fcc4c94530807b2db0785 | 9,401 | py | Python | libocpy.py | terryduong84/PyOC | be100345d62a6ff19d7f7e5f1a4b93be9f838a41 | [
"MIT"
] | null | null | null | libocpy.py | terryduong84/PyOC | be100345d62a6ff19d7f7e5f1a4b93be9f838a41 | [
"MIT"
] | 1 | 2019-11-10T10:06:06.000Z | 2019-11-10T10:06:06.000Z | libocpy.py | terryduong84/PyOC | be100345d62a6ff19d7f7e5f1a4b93be9f838a41 | [
"MIT"
] | null | null | null | # array in Fortran starts from 0, in python starts from 0
# To avoid confusion for Python user, the phase and element index will +1
#
import os
import numpy as np
# &&&& tq function &&&&
from liboctqpy import pytq as ptq
# ============= initialize
def tqini():
ptq('ini', 0, 1.0, ' ')
return None
# =======... | 29.378125 | 92 | 0.578981 |
459e20f6ccd9872b8de5031ce666395e17619953 | 32,851 | py | Python | hstphot.py | koconnor4/hstphot | 04ec83fc6dce056bd6153e407446e1be4dff3923 | [
"BSD-3-Clause"
] | null | null | null | hstphot.py | koconnor4/hstphot | 04ec83fc6dce056bd6153e407446e1be4dff3923 | [
"BSD-3-Clause"
] | null | null | null | hstphot.py | koconnor4/hstphot | 04ec83fc6dce056bd6153e407446e1be4dff3923 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
# 2014.06.29 S.Rodney
__author__ = 'rodney'
import hstzpt_apcorr
import astropyphot
from os import path
import sys
import numpy as np
if sys.version_info <= (3,0):
import exceptions
# Conversion table from full filter names to single-letter abbreviations
# used in STARDUST and other S.Rod... | 40.808696 | 81 | 0.582326 |
8b66c5d4af7fd833f56896b74bd882e917a10d89 | 680 | py | Python | read_from_inside.py | RoderickLi/python-snippet | 7cc672c455a768864cf38d6bbebdf8337b9c510c | [
"MIT"
] | 6 | 2019-11-06T02:11:43.000Z | 2021-03-21T02:48:10.000Z | read_from_inside.py | RoderickLi/python-snippet | 7cc672c455a768864cf38d6bbebdf8337b9c510c | [
"MIT"
] | null | null | null | read_from_inside.py | RoderickLi/python-snippet | 7cc672c455a768864cf38d6bbebdf8337b9c510c | [
"MIT"
] | 2 | 2019-11-06T02:11:44.000Z | 2019-11-06T02:46:00.000Z | class Read:
def __init__(self, test = True, s=None):
self.test = test
self.s = s
self.i = 0
if(s != None and test == True):
l = s.split('\n')
l = list(filter(lambda x:len(x)>0, l))
self.l = l
def read(self):
if(self.test == False):
... | 22.666667 | 50 | 0.454412 |
5c198530b133cfb22b526dd0a689b777af08e44d | 56 | py | Python | tmp/my_function.py | marjanin/G2P_mujoco_py | 319b53b9bb43913b53a606bb3bae1abb83baffbc | [
"MIT"
] | null | null | null | tmp/my_function.py | marjanin/G2P_mujoco_py | 319b53b9bb43913b53a606bb3bae1abb83baffbc | [
"MIT"
] | null | null | null | tmp/my_function.py | marjanin/G2P_mujoco_py | 319b53b9bb43913b53a606bb3bae1abb83baffbc | [
"MIT"
] | null | null | null | import numpy as np
def aa(a):
b=np.array(a)
return b; | 11.2 | 18 | 0.660714 |
bc8cbdb01250a9d39752be49ce889afacf53a26e | 777 | py | Python | lecture_08/723_output_digital.py | farzanehesk/COMPAS-II-FS2022 | 857eb40000f0532d0c04689331eadefd38dce6b7 | [
"MIT"
] | 11 | 2022-01-24T15:07:15.000Z | 2022-03-29T12:58:05.000Z | lecture_08/723_output_digital.py | farzanehesk/COMPAS-II-FS2022 | 857eb40000f0532d0c04689331eadefd38dce6b7 | [
"MIT"
] | 4 | 2022-03-16T06:06:45.000Z | 2022-03-29T22:59:11.000Z | lecture_08/723_output_digital.py | farzanehesk/COMPAS-II-FS2022 | 857eb40000f0532d0c04689331eadefd38dce6b7 | [
"MIT"
] | 20 | 2022-03-02T10:36:41.000Z | 2022-03-09T00:12:33.000Z | import compas_rrc as rrc
if __name__ == "__main__":
# Create Ros Client
ros = rrc.RosClient()
ros.run()
# Create ABB Client
abb = rrc.AbbClient(ros, "/rob1")
print("Connected.")
# Set digital output high
done = abb.send_and_wait(rrc.SetDigital("do_1", 1))
# Wait for a bit
do... | 21 | 66 | 0.625483 |
8aef6366a9ab26af25ad0862c4d5f26d62c8ab95 | 35,197 | py | Python | neurons/daemon/config/daemon.py | arskom/neurons | d969dbac6c10a5cc1da32031740883e450889414 | [
"BSD-3-Clause"
] | 1 | 2016-05-04T10:42:04.000Z | 2016-05-04T10:42:04.000Z | neurons/daemon/config/daemon.py | arskom/neurons | d969dbac6c10a5cc1da32031740883e450889414 | [
"BSD-3-Clause"
] | 3 | 2016-06-02T13:52:38.000Z | 2018-11-22T08:55:20.000Z | neurons/daemon/config/daemon.py | arskom/neurons | d969dbac6c10a5cc1da32031740883e450889414 | [
"BSD-3-Clause"
] | 1 | 2016-08-15T14:44:30.000Z | 2016-08-15T14:44:30.000Z | # encoding: utf8
#
# This file is part of the Neurons project.
# Copyright (c), Arskom Ltd. (arskom.com.tr),
# Burak Arslan <burak.arslan@arskom.com.tr>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following... | 34.171845 | 81 | 0.566952 |
fb517d5fb72fba0305de301afeffbee83b55a404 | 835 | py | Python | gapipy/models/__init__.py | gadventures/gapipy | bf92b79d2951a6cd32bd8bf31737e1d535a95434 | [
"MIT"
] | 4 | 2015-03-19T02:10:35.000Z | 2018-10-22T19:51:44.000Z | gapipy/models/__init__.py | gadventures/gapipy | bf92b79d2951a6cd32bd8bf31737e1d535a95434 | [
"MIT"
] | 69 | 2015-03-11T20:58:04.000Z | 2021-10-12T18:39:15.000Z | gapipy/models/__init__.py | gadventures/gapipy | bf92b79d2951a6cd32bd8bf31737e1d535a95434 | [
"MIT"
] | 1 | 2016-08-31T15:22:43.000Z | 2016-08-31T15:22:43.000Z | # flake8: noqa
from .addon import AddOn
from .address import Address
from .advertised_departure import AdvertisedDeparture
from .agency_document import AgencyDocument
from .arrival_flight_detail import ArrivalFlightDetail
from .associated_service import AssociatedService
from .departure_flight_detail import DepartureF... | 43.947368 | 70 | 0.887425 |
5ff1ba478e0b6cb524a590944b85a2d33f447328 | 416 | py | Python | gspread/ns.py | laike9m/gspread | 217b43073e1abe9ceb1d65d2d0719d56f0a14642 | [
"MIT"
] | 3 | 2021-06-15T15:05:33.000Z | 2022-01-31T22:56:19.000Z | gspread/ns.py | laike9m/gspread | 217b43073e1abe9ceb1d65d2d0719d56f0a14642 | [
"MIT"
] | 15 | 2015-01-06T13:41:52.000Z | 2022-03-30T10:37:25.000Z | gspread/ns.py | laike9m/gspread | 217b43073e1abe9ceb1d65d2d0719d56f0a14642 | [
"MIT"
] | 1 | 2021-01-07T09:25:49.000Z | 2021-01-07T09:25:49.000Z | # -*- coding: utf-8 -*-
"""
gspread.ns
~~~~~~~~~~
This module contains namespaces used across the project and related
helper functions.
"""
ATOM_NS = 'http://www.w3.org/2005/Atom'
SPREADSHEET_NS = 'http://schemas.google.com/spreadsheets/2006'
BATCH_NS = 'http://schemas.google.com/gdata/batch'
def _ns(name):
r... | 18.086957 | 67 | 0.65625 |
15c81a41a8af58886357745617bb056b53c86d93 | 9,180 | py | Python | airflow/cli/commands/task_command.py | rayalex/airflow | 4a344f13d26ecbb627bb9968895b290bfd86e4da | [
"Apache-2.0"
] | null | null | null | airflow/cli/commands/task_command.py | rayalex/airflow | 4a344f13d26ecbb627bb9968895b290bfd86e4da | [
"Apache-2.0"
] | null | null | null | airflow/cli/commands/task_command.py | rayalex/airflow | 4a344f13d26ecbb627bb9968895b290bfd86e4da | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 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
#... | 34.772727 | 93 | 0.651634 |
2baba2aa55865ec298a4c9e5af3952b56cb9a910 | 6,698 | py | Python | src/test/python/apache/aurora/client/cli/test_inspect.py | Ezetowers/aurora | 5e5bcbcbde90e7cb7cd9c79ccebfe56db063880f | [
"Apache-2.0"
] | null | null | null | src/test/python/apache/aurora/client/cli/test_inspect.py | Ezetowers/aurora | 5e5bcbcbde90e7cb7cd9c79ccebfe56db063880f | [
"Apache-2.0"
] | null | null | null | src/test/python/apache/aurora/client/cli/test_inspect.py | Ezetowers/aurora | 5e5bcbcbde90e7cb7cd9c79ccebfe56db063880f | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under ... | 35.818182 | 99 | 0.6063 |
5cccc9b0693de8ffd4330868e95151f7b51248fe | 188 | py | Python | boundaries/tests/definitions/no_features/definition.py | MinnPost/represent-boundaries | 17f65d34a6ed761e72dbdf13ea78b64fdeaa356d | [
"MIT"
] | 20 | 2015-03-17T09:10:39.000Z | 2020-06-30T06:08:08.000Z | boundaries/tests/definitions/no_features/definition.py | rhymeswithcycle/represent-boundaries | f487f9b18d6c1b8fe3e7f47171fc7741c14be4b3 | [
"MIT"
] | 14 | 2015-04-24T17:22:00.000Z | 2021-06-22T16:50:24.000Z | boundaries/tests/definitions/no_features/definition.py | rhymeswithcycle/represent-boundaries | f487f9b18d6c1b8fe3e7f47171fc7741c14be4b3 | [
"MIT"
] | 16 | 2015-04-27T23:32:46.000Z | 2020-07-05T11:18:04.000Z | from datetime import date
import boundaries
boundaries.register('Districts',
last_updated=date(2000, 1, 1),
name_func=boundaries.attr('id'),
file='../../fixtures/foo.shp',
)
| 18.8 | 36 | 0.691489 |
de1cfa4cb37fff15739b3fd660ffef28eea22c69 | 3,339 | py | Python | utils/swift_build_support/swift_build_support/products/benchmarks.py | lhames/swift | 81483cc050efa26f681462717d2c969aa5dec515 | [
"Apache-2.0"
] | null | null | null | utils/swift_build_support/swift_build_support/products/benchmarks.py | lhames/swift | 81483cc050efa26f681462717d2c969aa5dec515 | [
"Apache-2.0"
] | null | null | null | utils/swift_build_support/swift_build_support/products/benchmarks.py | lhames/swift | 81483cc050efa26f681462717d2c969aa5dec515 | [
"Apache-2.0"
] | null | null | null | # swift_build_support/products/benchmarks.py --------------------*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.tx... | 32.735294 | 79 | 0.631626 |
a1dd1b5ce88fc96a069d2f4e3aa8bf024d3ce376 | 4,103 | py | Python | data.py | rokkuran/pubg-analytics | 721593a1b1156ca741eb79b7ae7c475b96cccf92 | [
"MIT"
] | 4 | 2018-07-15T19:56:15.000Z | 2020-01-27T05:17:56.000Z | data.py | rokkuran/pubg-analytics | 721593a1b1156ca741eb79b7ae7c475b96cccf92 | [
"MIT"
] | null | null | null | data.py | rokkuran/pubg-analytics | 721593a1b1156ca741eb79b7ae7c475b96cccf92 | [
"MIT"
] | null | null | null | import csv
import yaml
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from pubg_python import PUBG, Shard
from datetime import datetime
config = yaml.safe_load(open('config.yml'))
API_KEY = config['API_KEY']
def convert_timestamp(s):
""""""
# return datetime.strptime(s, "%Y-%m-%dT%H:%... | 27.536913 | 113 | 0.681696 |
0f4b3b8ddfd7a6cf724ced9aa844ba4c0f314f89 | 119 | py | Python | packages/dila2sql/dila2sql/scripts/raise_on_purpose.py | SocialGouv/dila2sql | c9fa54bdb9483139218fab643fb5ab50ad9b114a | [
"CC0-1.0"
] | 4 | 2019-04-16T08:57:17.000Z | 2021-03-22T14:42:41.000Z | packages/dila2sql/dila2sql/scripts/raise_on_purpose.py | SocialGouv/dila2sql | c9fa54bdb9483139218fab643fb5ab50ad9b114a | [
"CC0-1.0"
] | 16 | 2019-03-27T08:49:38.000Z | 2020-08-11T06:34:44.000Z | packages/dila2sql/dila2sql/scripts/raise_on_purpose.py | SocialGouv/dila2sql | c9fa54bdb9483139218fab643fb5ab50ad9b114a | [
"CC0-1.0"
] | 2 | 2019-08-08T13:25:03.000Z | 2020-08-16T18:12:20.000Z | from dila2sql.monitoring import init_monitoring
init_monitoring()
raise Exception("test exception raised on purpose")
| 23.8 | 51 | 0.840336 |
42547d95ac4300f41afcf509b67d5c8c83e1b1bd | 183,254 | py | Python | steelpy/codes/aisc/June2010/AISC2010.py | svortega/steelpy | bef35eb8ab8728fc29f57b7070b5f3bac0b0e840 | [
"MIT"
] | 4 | 2021-09-28T12:52:01.000Z | 2022-02-24T22:30:22.000Z | steelpy/codes/aisc/June2010/AISC2010.py | svortega/steelpy | bef35eb8ab8728fc29f57b7070b5f3bac0b0e840 | [
"MIT"
] | null | null | null | steelpy/codes/aisc/June2010/AISC2010.py | svortega/steelpy | bef35eb8ab8728fc29f57b7070b5f3bac0b0e840 | [
"MIT"
] | null | null | null | # *******************************************
# Bug History
#
# Bug fixed on section (E4-3b) 18/07/10 - SVO
# Bug fixed on section (F4) 21/07/10 - SVO
# Mayor program upgrade to
# allow re-design of members 30/07/10 - SVO
#
#
# *******************************************
#
#
# from __future__ impor... | 41.696018 | 160 | 0.349651 |
2b4d227a6802efed4693909ac6227b8a54ab8341 | 10,171 | py | Python | src/config.py | ZeyuGaoAi/Composite_High_Resolution_Network | 1932476370a7609598cc57eeff590f8092f223b1 | [
"MIT"
] | 4 | 2021-06-24T02:24:49.000Z | 2021-12-21T15:28:02.000Z | src/config.py | ZeyuGaoAi/Composite_High_Resolution_Network | 1932476370a7609598cc57eeff590f8092f223b1 | [
"MIT"
] | null | null | null | src/config.py | ZeyuGaoAi/Composite_High_Resolution_Network | 1932476370a7609598cc57eeff590f8092f223b1 | [
"MIT"
] | null | null | null |
import importlib
import random
import cv2
import numpy as np
import tensorflow as tf
from tensorpack import imgaug
from loader.augs import (BinarizeLabel, GaussianBlur, GenInstanceDistance,
GenInstanceHV, MedianBlur, GenInstanceUnetMap,
GenInstanceContourMap, GenIns... | 43.280851 | 114 | 0.608101 |
d30448ec937ef30efd43deeaa3eec8cb08c300a8 | 36,879 | py | Python | Image Recognition/utils/BayesianDataParallel/module.py | EvenStrangest/PyTorch-BayesianCNN | 7cac422c7795d1c84d63a2cf0b13f8c4f86f194c | [
"MIT"
] | 1 | 2020-02-10T12:58:25.000Z | 2020-02-10T12:58:25.000Z | Image Recognition/utils/BayesianDataParallel/module.py | EvenStrangest/PyTorch-BayesianCNN | 7cac422c7795d1c84d63a2cf0b13f8c4f86f194c | [
"MIT"
] | 20 | 2020-01-28T22:18:55.000Z | 2021-09-08T01:21:52.000Z | Image Recognition/utils/BayesianDataParallel/module.py | EvenStrangest/PyTorch-BayesianCNN | 7cac422c7795d1c84d63a2cf0b13f8c4f86f194c | [
"MIT"
] | 2 | 2019-12-14T09:17:47.000Z | 2020-02-24T16:55:07.000Z | from collections import OrderedDict
import functools
import itertools
import torch
from .backends.thnn import backend as thnn_backend
from .parameter import Parameter
import torch.utils.hooks as hooks
def _addindent(s_, numSpaces):
s = s_.split('\n')
# don't do anything for single-line stuff
if len(s) == ... | 38.495825 | 117 | 0.56783 |
b728b19ed7a77b62cbb49c977615a7817a269671 | 17,131 | py | Python | qcodes/instrument_drivers/Keysight/Infiniium_DS08104A.py | nulinspiratie/Qcodes | d050d38ac83f532523a39549c3247dfa6096a36e | [
"MIT"
] | 2 | 2017-02-27T06:02:39.000Z | 2019-06-03T04:56:59.000Z | qcodes/instrument_drivers/Keysight/Infiniium_DS08104A.py | nulinspiratie/Qcodes | d050d38ac83f532523a39549c3247dfa6096a36e | [
"MIT"
] | 50 | 2017-04-12T04:03:15.000Z | 2022-03-09T00:41:43.000Z | qcodes/instrument_drivers/Keysight/Infiniium_DS08104A.py | nulinspiratie/Qcodes | d050d38ac83f532523a39549c3247dfa6096a36e | [
"MIT"
] | null | null | null | import logging
from typing import Dict, Callable
from functools import partial
import numpy as np
from qcodes import VisaInstrument, validators as vals
from qcodes import InstrumentChannel, ChannelList
from qcodes import ArrayParameter
from qcodes.utils.validators import Enum, Numbers
"""
NOTE (serwan): This is near... | 41.379227 | 88 | 0.478956 |
318194270f3d9dbe67aea39111ff53367bf2c4be | 6,015 | py | Python | test_autogalaxy/imaging/test_simulate_and_fit_imaging.py | Jammy2211/PyAutoModel | 02f54e71900de9ec12c9070dc00a4bd001b25afa | [
"MIT"
] | 4 | 2019-10-29T13:27:23.000Z | 2020-03-24T11:13:35.000Z | test_autogalaxy/imaging/test_simulate_and_fit_imaging.py | Jammy2211/PyAutoModel | 02f54e71900de9ec12c9070dc00a4bd001b25afa | [
"MIT"
] | null | null | null | test_autogalaxy/imaging/test_simulate_and_fit_imaging.py | Jammy2211/PyAutoModel | 02f54e71900de9ec12c9070dc00a4bd001b25afa | [
"MIT"
] | 3 | 2020-02-12T10:29:59.000Z | 2020-03-24T11:13:53.000Z | import os
from os import path
import shutil
import numpy as np
import pytest
import autogalaxy as ag
def test__perfect_fit__chi_squared_0():
grid = ag.Grid2D.uniform(shape_native=(11, 11), pixel_scales=0.2, sub_size=1)
psf = ag.Kernel2D.from_gaussian(
shape_native=(3, 3), pixel_scales... | 30.075 | 101 | 0.653367 |
a581be9751e46b484d722ec9a24a156134102d38 | 348 | py | Python | src/Neighbor/GridCellPlaneInst.cc.py | jmikeowen/Spheral | 3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 22 | 2018-07-31T21:38:22.000Z | 2020-06-29T08:58:33.000Z | src/Neighbor/GridCellPlaneInst.cc.py | jmikeowen/Spheral | 3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 41 | 2020-09-28T23:14:27.000Z | 2022-03-28T17:01:33.000Z | src/Neighbor/GridCellPlaneInst.cc.py | jmikeowen/Spheral | 3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 7 | 2019-12-01T07:00:06.000Z | 2020-09-15T21:12:39.000Z | text = """
//------------------------------------------------------------------------------
// Explicit instantiation.
//------------------------------------------------------------------------------
#include "Neighbor/GridCellPlane.cc"
#include "Geometry/Dimension.hh"
namespace Spheral {
template class GridCellPlan... | 29 | 80 | 0.376437 |
5686f4755fbcfc4a0ebf2797f5a90d14d3e28366 | 5,230 | py | Python | integration/helpers/client_provider.py | hawflau/serverless-application-model | d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2 | [
"Apache-2.0"
] | 1,279 | 2020-08-25T03:33:15.000Z | 2022-03-31T09:49:22.000Z | integration/helpers/client_provider.py | hawflau/serverless-application-model | d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2 | [
"Apache-2.0"
] | 797 | 2020-08-24T23:30:05.000Z | 2022-03-31T22:28:29.000Z | integration/helpers/client_provider.py | hawflau/serverless-application-model | d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2 | [
"Apache-2.0"
] | 431 | 2020-08-27T20:47:26.000Z | 2022-03-31T23:57:55.000Z | import boto3
from botocore.config import Config
from threading import Lock
class ClientProvider:
def __init__(self):
self._lock = Lock()
self._cloudformation_client = None
self._s3_client = None
self._api_client = None
self._lambda_client = None
self._iam_client = N... | 26.548223 | 91 | 0.564436 |
cee4b9f61a01a534b4c1066be01c1120fc2a8f61 | 1,389 | py | Python | chapter8/libtorch/load-cnn/cnnnet.py | ChengHan111/beginners-pytorch-deep-learning | b757dab824af87b4f69f72a51b5e16a3fce68802 | [
"MIT"
] | 335 | 2019-08-13T09:59:55.000Z | 2022-03-29T19:04:04.000Z | chapter8/libtorch/load-cnn/cnnnet.py | victorist/beginners-pytorch-deep-learning | 7736acb8e2f45a18f84dc6182bd09f91579870fb | [
"MIT"
] | 48 | 2019-10-07T18:40:26.000Z | 2022-03-12T14:45:54.000Z | chapter8/libtorch/load-cnn/cnnnet.py | victorist/beginners-pytorch-deep-learning | 7736acb8e2f45a18f84dc6182bd09f91579870fb | [
"MIT"
] | 208 | 2019-10-21T08:31:53.000Z | 2022-03-25T10:46:23.000Z | import torch
from torch import nn
class CNNNet(nn.Module):
def __init__(self, num_classes=2):
super(CNNNet, self).__init__()
self.features = nn.Sequential(
nn.Conv2d(3, 64, kernel_size=11, stride=4, padding=2),
nn.ReLU(),
nn.MaxPool2d(kernel_size=3, stride=2),
... | 30.195652 | 69 | 0.535637 |
06e2516633e5ab68adf407418eac831d4061112e | 4,035 | py | Python | homeassistant/generated/config_flows.py | rr326/core | 479ff92acbc9ec4db09b7a300d2beb67f00ab746 | [
"Apache-2.0"
] | null | null | null | homeassistant/generated/config_flows.py | rr326/core | 479ff92acbc9ec4db09b7a300d2beb67f00ab746 | [
"Apache-2.0"
] | null | null | null | homeassistant/generated/config_flows.py | rr326/core | 479ff92acbc9ec4db09b7a300d2beb67f00ab746 | [
"Apache-2.0"
] | null | null | null | """Automatically generated by hassfest.
To update, run python3 -m script.hassfest
"""
# fmt: off
FLOWS = [
"abode",
"accuweather",
"acmeda",
"adguard",
"advantage_air",
"agent_dvr",
"airly",
"airnow",
"airvisual",
"alarmdecoder",
"almond",
"ambiclimate",
"ambient_s... | 15.761719 | 41 | 0.503594 |
48b7be03972ad11bb8eda711c45ff4cef8b77b4c | 505 | py | Python | _unittests/ut_packaged/test_pypi_version.py | sdpython/pymyinstall | 72b3a56a29def0694e34ccae910bf288a95cf4a5 | [
"MIT"
] | 8 | 2015-08-24T21:01:49.000Z | 2018-01-04T06:34:51.000Z | _unittests/ut_packaged/test_pypi_version.py | sdpython/pymyinstall | 72b3a56a29def0694e34ccae910bf288a95cf4a5 | [
"MIT"
] | 66 | 2015-06-14T22:04:58.000Z | 2021-11-11T13:46:03.000Z | _unittests/ut_packaged/test_pypi_version.py | sdpython/pymyinstall | 72b3a56a29def0694e34ccae910bf288a95cf4a5 | [
"MIT"
] | 5 | 2016-09-13T18:14:46.000Z | 2021-08-23T12:03:28.000Z | """
@brief test log(time=2s)
"""
import unittest
from pyquickhelper.loghelper import fLOG
from pymyinstall.installhelper import get_pypi_version
class TestPypiVersion(unittest.TestCase):
def test_package_list(self):
fLOG(
__file__,
self._testMethodName,
OutputPrin... | 21.041667 | 54 | 0.641584 |
6cfdeb45a01c32a1cf4c50689ff7dd2b87a912b7 | 439 | py | Python | gym_minigrid/register.py | utnnproject/gym-minigrid | 9e8f9c12964dd36a3c940783d510be525a17e5a8 | [
"Apache-2.0"
] | null | null | null | gym_minigrid/register.py | utnnproject/gym-minigrid | 9e8f9c12964dd36a3c940783d510be525a17e5a8 | [
"Apache-2.0"
] | null | null | null | gym_minigrid/register.py | utnnproject/gym-minigrid | 9e8f9c12964dd36a3c940783d510be525a17e5a8 | [
"Apache-2.0"
] | null | null | null | from gym.envs.registration import register as gym_register
env_list = []
def register(
id,
entry_point,
reward_threshold=0.95
):
assert id.startswith("MiniGrid-")
assert id not in env_list
# Register the environment with OpenAI gym
gym_register(
id=id,
entry_point=entr... | 19.954545 | 58 | 0.671982 |
173bfc8a0a83a5bb4a7214f5a820711bed4f1384 | 10,239 | py | Python | pyloras/_prowras.py | vishalbelsare/pyloras | 5c446ab2782e88846abaccdf66289a5ec7d4ff06 | [
"BSD-3-Clause"
] | 2 | 2021-07-27T20:45:10.000Z | 2021-09-28T12:32:03.000Z | pyloras/_prowras.py | vishalbelsare/pyloras | 5c446ab2782e88846abaccdf66289a5ec7d4ff06 | [
"BSD-3-Clause"
] | 25 | 2021-07-13T13:12:33.000Z | 2021-09-23T11:32:16.000Z | pyloras/_prowras.py | vishalbelsare/pyloras | 5c446ab2782e88846abaccdf66289a5ec7d4ff06 | [
"BSD-3-Clause"
] | 3 | 2021-07-14T03:18:20.000Z | 2021-08-03T16:29:14.000Z | """
Copyright (c) 2021, Zolisa Bleki
SPDX-License-Identifier: BSD-3-Clause
"""
from collections import defaultdict
import math
from numbers import Number
from typing import NamedTuple
from imblearn.over_sampling.base import BaseOverSampler
from imblearn.utils import Substitution
from imblearn.utils._docstring import (... | 40.792829 | 85 | 0.622912 |
f6b4cdb99eaf3bed217b9865ec8ceae079cdc978 | 4,421 | py | Python | APIs/flask/model.py | itouchz/Jet-Presentation | 5c84ef4548be83ded1c6ee327769b2ccaac78314 | [
"MIT"
] | null | null | null | APIs/flask/model.py | itouchz/Jet-Presentation | 5c84ef4548be83ded1c6ee327769b2ccaac78314 | [
"MIT"
] | 1 | 2022-01-22T12:59:25.000Z | 2022-01-22T12:59:25.000Z | APIs/flask/model.py | itouchz/Jet-Presentation | 5c84ef4548be83ded1c6ee327769b2ccaac78314 | [
"MIT"
] | null | null | null | # This Model is orginal from https://github.com/ejcgt/eye-contact-cnn
# We simply modified it so that it can also work on CPU machine.
import torch.nn as nn
import torch
import math
def model_static(pretrained=False, is_gpu=False, **kwargs):
model = ResNet([3, 4, 6, 3], **kwargs)
if pretrained:
... | 35.087302 | 100 | 0.564126 |
abb4f8ecd5e711da4f90dad95be368207394f881 | 11,821 | py | Python | users/tests/test_payment.py | RaphaelPrevost/Back2Shops | 5f2d369e82fe2a7b9b3a6c55782319b23d142dfd | [
"CECILL-B"
] | null | null | null | users/tests/test_payment.py | RaphaelPrevost/Back2Shops | 5f2d369e82fe2a7b9b3a6c55782319b23d142dfd | [
"CECILL-B"
] | 6 | 2021-03-31T19:21:50.000Z | 2022-01-13T01:46:09.000Z | users/tests/test_payment.py | RaphaelPrevost/Back2Shops | 5f2d369e82fe2a7b9b3a6c55782319b23d142dfd | [
"CECILL-B"
] | null | null | null | # -*- coding: utf-8 -*-
#############################################################################
#
# Copyright © Dragon Dollar Limited
# contact: contact@dragondollar.com
#
# This software is a collection of webservices designed to provide a secure
# and scalable framework to build e-commerce websites.
#
# This s... | 40.34471 | 86 | 0.568395 |
9bb2ca4262072d8b54008e56c4c08dc650263ac8 | 3,284 | py | Python | learning_logs/views.py | leversonjr/learning_log | e444369573f5adcd2aa7a0e72ac5739a4f5b45eb | [
"Apache-2.0"
] | null | null | null | learning_logs/views.py | leversonjr/learning_log | e444369573f5adcd2aa7a0e72ac5739a4f5b45eb | [
"Apache-2.0"
] | null | null | null | learning_logs/views.py | leversonjr/learning_log | e444369573f5adcd2aa7a0e72ac5739a4f5b45eb | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponseRedirect, Http404
from django.urls import reverse
from django.contrib.auth.decorators import login_required
from .models import Topic, Entry
from .forms import TopicForm, EntryForm
# Create your views here.
def index(request):
""" A pagina i... | 35.311828 | 88 | 0.675396 |
31ed1de4186b09b4b77103aa3669789f7c92266e | 14,044 | py | Python | tests/pytests/conftest.py | ifraixedes/saltstack-salt | b54becb8b43cc9b7c00b2c0bc637ac534dc62896 | [
"Apache-2.0"
] | null | null | null | tests/pytests/conftest.py | ifraixedes/saltstack-salt | b54becb8b43cc9b7c00b2c0bc637ac534dc62896 | [
"Apache-2.0"
] | null | null | null | tests/pytests/conftest.py | ifraixedes/saltstack-salt | b54becb8b43cc9b7c00b2c0bc637ac534dc62896 | [
"Apache-2.0"
] | 1 | 2021-08-19T13:30:13.000Z | 2021-08-19T13:30:13.000Z | """
tests.pytests.conftest
~~~~~~~~~~~~~~~~~~~~~~
"""
import functools
import inspect
import logging
import os
import shutil
import stat
import attr
import pytest
import salt.ext.tornado.ioloop
import salt.utils.files
import salt.utils.platform
from salt.serializers import yaml
from saltfactories.utils import ... | 31.845805 | 118 | 0.65601 |
496290faf7135adc875402242eeddc2756236ec5 | 3,014 | py | Python | cogs/reactions.py | dashwav/nano-chan | 143287525b37a13f0ae4758c4175e897d7a61bb5 | [
"MIT"
] | 15 | 2017-11-28T12:00:13.000Z | 2020-09-10T06:23:29.000Z | cogs/reactions.py | dashwav/nano-chan | 143287525b37a13f0ae4758c4175e897d7a61bb5 | [
"MIT"
] | 25 | 2018-09-17T17:52:01.000Z | 2019-12-02T04:42:28.000Z | cogs/reactions.py | dashwav/nano-chan | 143287525b37a13f0ae4758c4175e897d7a61bb5 | [
"MIT"
] | 10 | 2017-11-28T11:55:55.000Z | 2019-12-23T19:04:55.000Z | """
Class for adding custom reactions
"""
import discord
from asyncio import get_event_loop
from discord.ext import commands
from .utils import checks
ALLOWED_CHANNELS = [
378684962934751239,
282640120388255744,
220762067739738113,
176429411443146752
]
class Reactions(commands.Cog):
... | 32.06383 | 92 | 0.576974 |
215cedb88223fef85e0b758aad565bf409a3004c | 1,636 | py | Python | tensorflow/contrib/learn/python/learn/__init__.py | c0g/tomserflow | f7b42f6ba58c3ff20ecd002535d2cca5d93bcf8e | [
"Apache-2.0"
] | 2 | 2016-05-25T19:30:35.000Z | 2016-05-25T20:48:08.000Z | tensorflow/contrib/learn/python/learn/__init__.py | c0g/tomserflow | f7b42f6ba58c3ff20ecd002535d2cca5d93bcf8e | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/learn/python/learn/__init__.py | c0g/tomserflow | f7b42f6ba58c3ff20ecd002535d2cca5d93bcf8e | [
"Apache-2.0"
] | null | null | null | """Main Scikit Flow module."""
# Copyright 2015-present The Scikit Flow 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/... | 45.444444 | 80 | 0.819071 |
cbb236dad80b4999e715ae4f69dfb639b4927ec2 | 5,077 | py | Python | authors/apps/notifications/tests/test_notifications.py | deferral/ah-django | b80ad485339dbb02b74d9b2093543bf8173d51de | [
"BSD-3-Clause"
] | 1 | 2019-04-12T08:34:10.000Z | 2019-04-12T08:34:10.000Z | authors/apps/notifications/tests/test_notifications.py | deferral/ah-django | b80ad485339dbb02b74d9b2093543bf8173d51de | [
"BSD-3-Clause"
] | 18 | 2019-03-26T02:17:38.000Z | 2019-04-26T08:57:47.000Z | authors/apps/notifications/tests/test_notifications.py | deferral/ah-django | b80ad485339dbb02b74d9b2093543bf8173d51de | [
"BSD-3-Clause"
] | 1 | 2019-11-22T11:52:32.000Z | 2019-11-22T11:52:32.000Z | import pytest
from django.urls import reverse
from rest_framework_jwt import utils
from rest_framework import status
from channels.testing import WebsocketCommunicator
from authors.apps.authentication.tests.base_test import BaseTestCase
from authors.routing import application
class NotificationTestCase(BaseTestCase)... | 36.007092 | 79 | 0.649005 |
e6683ed280a0c517685ef719c9ca79d3053fe427 | 7,176 | py | Python | tests/test_exceptions.py | Kyle-Verhoog/sanic | 42b1e7143e48b5a4042c42278eba15adf0bf2337 | [
"MIT"
] | null | null | null | tests/test_exceptions.py | Kyle-Verhoog/sanic | 42b1e7143e48b5a4042c42278eba15adf0bf2337 | [
"MIT"
] | null | null | null | tests/test_exceptions.py | Kyle-Verhoog/sanic | 42b1e7143e48b5a4042c42278eba15adf0bf2337 | [
"MIT"
] | null | null | null | import warnings
import pytest
from bs4 import BeautifulSoup
from sanic import Sanic
from sanic.exceptions import (
SanicException,
Forbidden,
InvalidUsage,
NotFound,
ServerError,
Unauthorized,
abort
)
from sanic.response import text
class SanicExceptionTestException(Exception):
pass... | 30.53617 | 76 | 0.694677 |
e14fc9a85342939ac6f3d26b656c4e2bedb0459c | 2,750 | py | Python | pysnap/tests/pysnap_tests.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 11 | 2015-12-16T04:00:41.000Z | 2021-10-31T12:14:54.000Z | pysnap/tests/pysnap_tests.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 3 | 2017-09-12T03:13:18.000Z | 2021-10-31T12:15:04.000Z | pysnap/tests/pysnap_tests.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 18 | 2017-10-08T17:21:38.000Z | 2022-01-30T19:39:55.000Z | #!/usr/bin/env python
import unittest
import responses
from requests.exceptions import HTTPError
from pysnap import is_image, is_video, Snapchat
from pysnap.utils import make_request_token, pkcs5_pad, URL
class ModuleTestCase(unittest.TestCase):
def test_is_image(self):
self.assertFalse(is_image(b'')... | 31.976744 | 79 | 0.603273 |
0b189f904b0de5d1905b4726c03a28cd7331bc2b | 1,131 | py | Python | Assignment-2/2_2.py | yashwanthguguloth24/Image-Processing | 2573cbc6bb43576f67d300694943fd83ab3a0aef | [
"MIT"
] | null | null | null | Assignment-2/2_2.py | yashwanthguguloth24/Image-Processing | 2573cbc6bb43576f67d300694943fd83ab3a0aef | [
"MIT"
] | null | null | null | Assignment-2/2_2.py | yashwanthguguloth24/Image-Processing | 2573cbc6bb43576f67d300694943fd83ab3a0aef | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
def linearoperation(P,L):
J=[]
for i in range(0,len(img)):
temp=[]
for j in range(0,len(img[i])):
a=int(P*img[i][j]+L)
if (a>255):
a=255
if (a<0):
... | 19.5 | 71 | 0.543767 |
41bf159f25d60d06cf10cc4d54c06bf210e0fc39 | 89 | py | Python | src/package2.py | rudyn2/sphinx-server-docker | 51a2a4b1bb3c05bf01c947d090964e4c61d55df4 | [
"MIT"
] | null | null | null | src/package2.py | rudyn2/sphinx-server-docker | 51a2a4b1bb3c05bf01c947d090964e4c61d55df4 | [
"MIT"
] | null | null | null | src/package2.py | rudyn2/sphinx-server-docker | 51a2a4b1bb3c05bf01c947d090964e4c61d55df4 | [
"MIT"
] | null | null | null | def faa():
"""
This method says faa().
:return:
faa
"""
pass | 11.125 | 27 | 0.404494 |
6e31423765a05dfca8fcba417e2418cbc84a0ef2 | 2,399 | py | Python | lib/pyasn1_modules/rfc2437.py | itielshwartz/BackendApi | bc21013f8d96bbf0fba7a99f1deb5486ad32b168 | [
"Apache-2.0"
] | null | null | null | lib/pyasn1_modules/rfc2437.py | itielshwartz/BackendApi | bc21013f8d96bbf0fba7a99f1deb5486ad32b168 | [
"Apache-2.0"
] | null | null | null | lib/pyasn1_modules/rfc2437.py | itielshwartz/BackendApi | bc21013f8d96bbf0fba7a99f1deb5486ad32b168 | [
"Apache-2.0"
] | null | null | null | #
# PKCS#1 syntax
#
# ASN.1 source from:
# ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2.asn
#
# Sample captures could be obtained with "openssl genrsa" command
#
from pyasn1.type import tag, namedtype, univ
from pyasn1_modules.rfc2459 import AlgorithmIdentifier
pkcs_1 = univ.ObjectIdentifier('1.2.840.113549.1.1'... | 39.327869 | 84 | 0.721134 |
80bdfb02331d0f608d807b3081d4daebf5880de1 | 1,046 | py | Python | python_programs/shortest_path_lengths.py | PatrickShaw/QuixBugs | 5a2eb2987fdac12860b526ffa92a57e5831fd639 | [
"MIT"
] | 22 | 2018-01-29T01:56:30.000Z | 2022-03-21T12:25:40.000Z | python_programs/shortest_path_lengths.py | zixifan/QuixBugs | 5a2eb2987fdac12860b526ffa92a57e5831fd639 | [
"MIT"
] | 31 | 2017-12-18T21:04:34.000Z | 2022-02-21T07:38:09.000Z | python_programs/shortest_path_lengths.py | zixifan/QuixBugs | 5a2eb2987fdac12860b526ffa92a57e5831fd639 | [
"MIT"
] | 19 | 2018-01-06T14:18:33.000Z | 2022-03-21T12:25:43.000Z | from collections import defaultdict
def shortest_path_lengths(n, length_by_edge):
length_by_path = defaultdict(lambda: float('inf'))
length_by_path.update({(i, i): 0 for i in range(n)})
length_by_path.update(length_by_edge)
for k in range(n):
for i in range(n):
for j in range(n):
... | 26.820513 | 102 | 0.675908 |
d8890be8e8371bef412aa300d9a6b22383a4b404 | 876 | py | Python | pyad/pyad.py | Docurated/pyad | 605486c13ac22f7af530902722c725d369991f5f | [
"Apache-2.0"
] | 1 | 2020-08-18T00:23:46.000Z | 2020-08-18T00:23:46.000Z | pyad/pyad.py | Docurated/pyad | 605486c13ac22f7af530902722c725d369991f5f | [
"Apache-2.0"
] | null | null | null | pyad/pyad.py | Docurated/pyad | 605486c13ac22f7af530902722c725d369991f5f | [
"Apache-2.0"
] | null | null | null | from adobject import *
from pyadexceptions import InvalidObjectException, invalidResults
import aduser, adcomputer, addomain, addomain, adgroup, adobject, pyadconstants, adcontainer
def from_cn(common_name, search_base=None, options={}):
try:
q = ADObject.from_cn(common_name, search_base, options)
... | 30.206897 | 93 | 0.66895 |
16563e961cacff91b2281e19170336bb33bc83f2 | 8,498 | py | Python | tests/devices/test_awow_th213_thermostat.py | pascaltippelt/tuya-local | 03f4a8135e085081b30e6e0abd3ba4d3e4ae491e | [
"MIT"
] | null | null | null | tests/devices/test_awow_th213_thermostat.py | pascaltippelt/tuya-local | 03f4a8135e085081b30e6e0abd3ba4d3e4ae491e | [
"MIT"
] | null | null | null | tests/devices/test_awow_th213_thermostat.py | pascaltippelt/tuya-local | 03f4a8135e085081b30e6e0abd3ba4d3e4ae491e | [
"MIT"
] | null | null | null | from homeassistant.components.climate.const import (
CURRENT_HVAC_HEAT,
CURRENT_HVAC_IDLE,
CURRENT_HVAC_OFF,
HVAC_MODE_HEAT,
HVAC_MODE_OFF,
SUPPORT_PRESET_MODE,
SUPPORT_TARGET_TEMPERATURE,
)
from homeassistant.components.lock import STATE_LOCKED, STATE_UNLOCKED
from homeassistant.c... | 35.261411 | 88 | 0.650388 |
ce9977ae3875e88e3927e450304479567ba1532f | 48,742 | py | Python | map_label_tool/py_proto/modules/canbus/proto/zhongyun_pb2.py | freeclouds/OpenHDMap | b61c159fbdf4f50ae1d1650421596b28863f39be | [
"Apache-2.0"
] | null | null | null | map_label_tool/py_proto/modules/canbus/proto/zhongyun_pb2.py | freeclouds/OpenHDMap | b61c159fbdf4f50ae1d1650421596b28863f39be | [
"Apache-2.0"
] | null | null | null | map_label_tool/py_proto/modules/canbus/proto/zhongyun_pb2.py | freeclouds/OpenHDMap | b61c159fbdf4f50ae1d1650421596b28863f39be | [
"Apache-2.0"
] | 1 | 2021-05-26T08:42:11.000Z | 2021-05-26T08:42:11.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: modules/canbus/proto/zhongyun.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.protobuf impor... | 43.096375 | 6,868 | 0.786016 |
de73b6144efc12d76df2e59f1d4f6225a1150f4e | 1,693 | py | Python | fn_apility/fn_apility/util/selftest.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 65 | 2017-12-04T13:58:32.000Z | 2022-03-24T18:33:17.000Z | fn_apility/fn_apility/util/selftest.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 48 | 2018-03-02T19:17:14.000Z | 2022-03-09T22:00:38.000Z | fn_apility/fn_apility/util/selftest.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 95 | 2018-01-11T16:23:39.000Z | 2022-03-21T11:34:29.000Z | # (c) Copyright IBM Corp. 2010, 2018. All Rights Reserved.
# -*- coding: utf-8 -*-
# pragma pylint: disable=unused-argument, no-self-use
"""Function implementation
test with: resilient-circuits selftest -l fn_apility
"""
import logging
import requests
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
lo... | 29.701754 | 134 | 0.66332 |
d479afc0cb77f9a69b29efe6e89ca6ecc7cad2fe | 32,022 | py | Python | sopel/coretasks.py | examknow/exambot | 3b7c3583880dfb98028c9911ffedfa96a66dae7f | [
"EFL-2.0"
] | 1 | 2019-11-27T16:56:50.000Z | 2019-11-27T16:56:50.000Z | sopel/coretasks.py | RhinosF1/Exambot-Source | b3cb307c6391b5954e711382811bf43632b7a996 | [
"EFL-2.0"
] | null | null | null | sopel/coretasks.py | RhinosF1/Exambot-Source | b3cb307c6391b5954e711382811bf43632b7a996 | [
"EFL-2.0"
] | null | null | null | # coding=utf-8
"""Tasks that allow the bot to run, but aren't user-facing functionality
This is written as a module to make it easier to extend to support more
responses to standard IRC codes without having to shove them all into the
dispatch function in bot.py and making it easier to maintain.
"""
# Copyright 2008-20... | 36.347333 | 94 | 0.625539 |
a717c7f24edb0d22b4ac36c9d65a618e6db6c584 | 2,379 | py | Python | homeassistant/components/sendgrid/notify.py | VirtualL/home-assistant | 301829d02be8d865ab46c8901ac046d060849320 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/sendgrid/notify.py | VirtualL/home-assistant | 301829d02be8d865ab46c8901ac046d060849320 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:34:57.000Z | 2022-03-12T00:59:48.000Z | homeassistant/components/sendgrid/notify.py | VirtualL/home-assistant | 301829d02be8d865ab46c8901ac046d060849320 | [
"Apache-2.0"
] | null | null | null | """SendGrid notification service."""
import logging
import voluptuous as vol
from homeassistant.const import (
CONF_API_KEY, CONF_RECIPIENT, CONF_SENDER, CONTENT_TYPE_TEXT_PLAIN)
import homeassistant.helpers.config_validation as cv
from homeassistant.components.notify import (
ATTR_TITLE, ATTR_TITLE_DEFAULT,... | 30.113924 | 77 | 0.612022 |
f898f4f97202793ad10a0ec145f1a014e2f24548 | 2,863 | bzl | Python | src/main/starlark/builtins_bzl/common/exports.bzl | philomathing/bazel | ac5b17ff5a51d4110e70fc7f89cb36c43be6dddd | [
"Apache-2.0"
] | null | null | null | src/main/starlark/builtins_bzl/common/exports.bzl | philomathing/bazel | ac5b17ff5a51d4110e70fc7f89cb36c43be6dddd | [
"Apache-2.0"
] | null | null | null | src/main/starlark/builtins_bzl/common/exports.bzl | philomathing/bazel | ac5b17ff5a51d4110e70fc7f89cb36c43be6dddd | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The Bazel 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 applicable la... | 46.177419 | 123 | 0.762487 |
e9a6ec31015299377087d90d499c432b91dab215 | 21,978 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/_local_network_gateways_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/_local_network_gateways_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/_local_network_gateways_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 47.468683 | 184 | 0.681454 |
10e9f25e6f1c4ae021d87301bbe423664770074b | 15,688 | py | Python | nova/virt/mesoscontainers/framework.py | bopopescu/nova-mesos-driver | fdb9c8468f6a8680c19095a81bf77884ae61e170 | [
"Apache-2.0"
] | null | null | null | nova/virt/mesoscontainers/framework.py | bopopescu/nova-mesos-driver | fdb9c8468f6a8680c19095a81bf77884ae61e170 | [
"Apache-2.0"
] | null | null | null | nova/virt/mesoscontainers/framework.py | bopopescu/nova-mesos-driver | fdb9c8468f6a8680c19095a81bf77884ae61e170 | [
"Apache-2.0"
] | 1 | 2020-07-24T01:00:25.000Z | 2020-07-24T01:00:25.000Z | #!/usr/bin/env python
# coding=utf-8
#
# Copyright 2016 Mirantis Inc.
# All Rights Reserved.
# Author: Georgy Okrokvertskhov
#
# 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
#
# ... | 34.707965 | 107 | 0.627104 |
74691fe72ffdb643bb79405719fb04b50aab98b3 | 379 | py | Python | formulaic/migrations/0002_add_default_to_field_enabled.py | Govexec/django-formulaic | b9516a963673cb21279a2ecdf62a199b9203d538 | [
"MIT"
] | 1 | 2021-08-20T04:21:20.000Z | 2021-08-20T04:21:20.000Z | formulaic/migrations/0002_add_default_to_field_enabled.py | Govexec/django-formulaic | b9516a963673cb21279a2ecdf62a199b9203d538 | [
"MIT"
] | 4 | 2020-12-05T00:31:40.000Z | 2021-09-22T20:06:53.000Z | formulaic/migrations/0002_add_default_to_field_enabled.py | Govexec/django-formulaic | b9516a963673cb21279a2ecdf62a199b9203d538 | [
"MIT"
] | 1 | 2020-12-04T19:16:36.000Z | 2020-12-04T19:16:36.000Z | # Generated by Django 3.1.3 on 2020-12-07 22:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('formulaic', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='field',
name='enabled',
... | 19.947368 | 52 | 0.591029 |
5fd52081acf0b475425948939be9ea945d2b2be3 | 699 | py | Python | parenthesis/sample.py | mamaz/learn-stuffs-with-python | 2677203717bb5ddc30b0a907b8e38a9c9c7f8015 | [
"MIT"
] | null | null | null | parenthesis/sample.py | mamaz/learn-stuffs-with-python | 2677203717bb5ddc30b0a907b8e38a9c9c7f8015 | [
"MIT"
] | null | null | null | parenthesis/sample.py | mamaz/learn-stuffs-with-python | 2677203717bb5ddc30b0a907b8e38a9c9c7f8015 | [
"MIT"
] | null | null | null | n = 1
["()"]
# combinations: 1
n = 2
["(())", "()()"]
# combinations: 2
n = 3
["((()))", "(()())", "(())()", "()(())", "()()()"]
# combinations: 5
n = 4
[
#
# 1
#
"(((())))",
"((()()))",
"(()()())",
#
# 2
#
"((())())",
#
# 3
#
"((()))()",
"(()())()",
"... | 9.077922 | 50 | 0.104435 |
4a7ba085604e13a81f6674083ab119018c341720 | 888 | py | Python | test/test.py | GoldenDawn369/calculator | 3ec49258d1b093c861abce448adafe949b3040f1 | [
"MIT"
] | null | null | null | test/test.py | GoldenDawn369/calculator | 3ec49258d1b093c861abce448adafe949b3040f1 | [
"MIT"
] | null | null | null | test/test.py | GoldenDawn369/calculator | 3ec49258d1b093c861abce448adafe949b3040f1 | [
"MIT"
] | 1 | 2021-06-02T06:21:06.000Z | 2021-06-02T06:21:06.000Z | import unittest
from calculator.calculator import Calculator
class MyTestCase(unittest.TestCase):
def test_add(self) -> None:
temp = Calculator()
self.assertEqual(temp.add(2), 2)
def test_subtract(self) -> None:
temp = Calculator()
self.assertEqual(temp.subtract(2), -2)
d... | 23.368421 | 46 | 0.597973 |
5354926b783f58ac304ffbaa331f907a58ac4231 | 1,341 | py | Python | enos/message/upstream/tsl/AttributeUpdateRequest.py | charleshuangcai/enos-device-sdk-python | bbbb31f4da7c4c4e6f457565faf0fb5cf15bb308 | [
"MIT"
] | 5 | 2020-05-09T09:21:22.000Z | 2021-05-31T02:42:56.000Z | enos/message/upstream/tsl/AttributeUpdateRequest.py | charleshuangcai/enos-device-sdk-python | bbbb31f4da7c4c4e6f457565faf0fb5cf15bb308 | [
"MIT"
] | 4 | 2020-04-18T03:28:09.000Z | 2021-05-28T09:41:05.000Z | enos/message/upstream/tsl/AttributeUpdateRequest.py | charleshuangcai/enos-device-sdk-python | bbbb31f4da7c4c4e6f457565faf0fb5cf15bb308 | [
"MIT"
] | 7 | 2020-01-19T07:58:28.000Z | 2021-12-22T06:53:43.000Z | from enos.core.constant.DeliveryTopicFormat import DeliveryTopicFormat
from enos.core.constant.MethodConstants import MethodConstants
from enos.core.message.BaseRequest import BaseRequest, BaseBuilder
from enos.message.upstream.tsl.AttributeUpdateResponse import AttributeUpdateResponse
class AttributeUpdateRequest(Ba... | 26.82 | 85 | 0.713647 |
b8c0e4a52916cfc90e100df203c2266ab0474480 | 4,023 | py | Python | AutomatedTesting/Gem/PythonTests/physics/collider/C14861502_PhysXCollider_AssetAutoAssigned.py | fromasmtodisasm/o3de | 0d728a76778cb0ca88caa5c07f17162fac668b2a | [
"Apache-2.0",
"MIT"
] | null | null | null | AutomatedTesting/Gem/PythonTests/physics/collider/C14861502_PhysXCollider_AssetAutoAssigned.py | fromasmtodisasm/o3de | 0d728a76778cb0ca88caa5c07f17162fac668b2a | [
"Apache-2.0",
"MIT"
] | null | null | null | AutomatedTesting/Gem/PythonTests/physics/collider/C14861502_PhysXCollider_AssetAutoAssigned.py | fromasmtodisasm/o3de | 0d728a76778cb0ca88caa5c07f17162fac668b2a | [
"Apache-2.0",
"MIT"
] | null | null | null | """
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
Test case ID : C14861502
Test Case Title : Verify PxMesh is auto-assigned in collider when Mesh is assigned in Rend... | 41.90625 | 117 | 0.745961 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.