hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
acfdf1b07a4c2d38b9a7262a8c7774fc21e0d31e | 3,370 | py | Python | src/btengine/simulationfunctions.py | wthamisupposedtowritethere/Simple-Backtest-Environment | 4a17fda4e4206a1cfc5f65a4a710a1b8a2578260 | [
"MIT"
] | null | null | null | src/btengine/simulationfunctions.py | wthamisupposedtowritethere/Simple-Backtest-Environment | 4a17fda4e4206a1cfc5f65a4a710a1b8a2578260 | [
"MIT"
] | null | null | null | src/btengine/simulationfunctions.py | wthamisupposedtowritethere/Simple-Backtest-Environment | 4a17fda4e4206a1cfc5f65a4a710a1b8a2578260 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun May 30 20:10:11 2021
This script contains functions used to perform the simulation.
@author: Anthony
@project: Systematic strategies in the context of cryptocurrencies trading.
@subproject: Backtesting Engine
@version: 1.0.0
CHANGELOG:
1.0.0
... | 30.36036 | 155 | 0.626113 |
acfdf270c9b2d6ea3c9c284708cf77a60e968634 | 7,737 | py | Python | testscripts/RDKB/component/WIFIHAL/TS_WIFIHAL_SetApMacAddressControlMode_WhitelistFilter.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/WIFIHAL/TS_WIFIHAL_SetApMacAddressControlMode_WhitelistFilter.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/WIFIHAL/TS_WIFIHAL_SetApMacAddressControlMode_WhitelistFilter.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | ##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2018 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | 46.608434 | 157 | 0.669381 |
acfdf2d5560d3ad221f524f04b7522504b29381e | 91,706 | py | Python | venv/Lib/site-packages/astropy/table/tests/test_table.py | KwanYu/Airbnb-Backend | 61b4c89f891378181447fc251fa0d1c2c5f435de | [
"MIT"
] | 2 | 2020-08-25T13:55:00.000Z | 2020-08-25T16:36:03.000Z | downloadable-site-packages/astropy/table/tests/test_table.py | ProjectZeroDays/Pyto | d5d77f3541f329bbb28142d18606b22f115b7df6 | [
"MIT"
] | null | null | null | downloadable-site-packages/astropy/table/tests/test_table.py | ProjectZeroDays/Pyto | d5d77f3541f329bbb28142d18606b22f115b7df6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import gc
import sys
import copy
from io import StringIO
from collections import OrderedDict
import pytest
import numpy as np
from numpy.testing import assert_allclose, assert_array_equal
from astropy.io import fits
from astropy.... | 35.572537 | 119 | 0.539594 |
acfdf2f73e42d2977838f7e88b4ad906723ddf52 | 3,666 | py | Python | utils/server_utils/server.py | havesupper/DeepPavlov | 142f9ff05d53e78bae77f6392613eccea0aa57f7 | [
"Apache-2.0"
] | 1 | 2018-07-18T11:50:45.000Z | 2018-07-18T11:50:45.000Z | utils/server_utils/server.py | havesupper/DeepPavlov | 142f9ff05d53e78bae77f6392613eccea0aa57f7 | [
"Apache-2.0"
] | null | null | null | utils/server_utils/server.py | havesupper/DeepPavlov | 142f9ff05d53e78bae77f6392613eccea0aa57f7 | [
"Apache-2.0"
] | null | null | null | import sys
from pathlib import Path
from flask import Flask, request, jsonify, redirect
from flasgger import Swagger
from flask_cors import CORS
from deeppavlov.core.common.file import read_json
from deeppavlov.core.commands.infer import build_model_from_config
from deeppavlov.core.data.utils import check_nested_dict... | 31.333333 | 113 | 0.681942 |
acfdf379d6091082f2857a16118c0d492b42b7a8 | 10,867 | py | Python | models/ghostnet.py | JIABI/GhostShiftAddNet | 870c38248fa1df23ec1262b6690e20c437d1d5d4 | [
"MIT"
] | 2 | 2021-08-23T08:43:35.000Z | 2021-11-28T17:22:29.000Z | models/ghostnet.py | selkerdawy/GhostShiftAddNet | 870c38248fa1df23ec1262b6690e20c437d1d5d4 | [
"MIT"
] | 1 | 2021-11-01T08:35:07.000Z | 2021-11-01T08:35:07.000Z | models/ghostnet.py | selkerdawy/GhostShiftAddNet | 870c38248fa1df23ec1262b6690e20c437d1d5d4 | [
"MIT"
] | 3 | 2021-11-10T08:37:50.000Z | 2022-02-08T13:28:16.000Z | # 2020.06.09-Changed for building GhostNet
# Huawei Technologies Co., Ltd. <foss@huawei.com>
"""
Creates a GhostNet Model as defined in:
GhostNet: More Features from Cheap Operations By Kai Han, Yunhe Wang, Qi Tian, Jianyuan Guo, Chunjing Xu, Chang Xu.
https://arxiv.org/abs/1911.11907
Modified from https://g... | 37.864111 | 199 | 0.607343 |
acfdf3f0870a3bf0f85e4ffc4d4cbbb7100d6f87 | 13,881 | py | Python | arweave/arweave_lib.py | xiaojay/arweave-python-client | 1ac5afd9a56540012a8a22943ba562729d776912 | [
"MIT"
] | null | null | null | arweave/arweave_lib.py | xiaojay/arweave-python-client | 1ac5afd9a56540012a8a22943ba562729d776912 | [
"MIT"
] | null | null | null | arweave/arweave_lib.py | xiaojay/arweave-python-client | 1ac5afd9a56540012a8a22943ba562729d776912 | [
"MIT"
] | null | null | null | import json
import os
import io
import requests
import logging
import hashlib
import psutil
import arrow
import nacl.bindings
from jose import jwk
from jose.utils import base64url_encode, base64url_decode, base64
from jose.backends.cryptography_backend import CryptographyRSAKey
from Crypto.PublicKey import RSA
from Cry... | 28.979123 | 115 | 0.561991 |
acfdf534c3fd74af524fcc9ec9dfcf3c68453118 | 587 | py | Python | src/main_client_dotenv.py | ConnectionMaster/sp22-discord-bot | 1d749ed6a2d59d8c668badc1a30e27d0a39bf483 | [
"Apache-2.0"
] | null | null | null | src/main_client_dotenv.py | ConnectionMaster/sp22-discord-bot | 1d749ed6a2d59d8c668badc1a30e27d0a39bf483 | [
"Apache-2.0"
] | null | null | null | src/main_client_dotenv.py | ConnectionMaster/sp22-discord-bot | 1d749ed6a2d59d8c668badc1a30e27d0a39bf483 | [
"Apache-2.0"
] | 3 | 2022-01-25T02:09:50.000Z | 2022-01-28T17:45:41.000Z | import os
import dotenv
import nextcord
# Needed for us to tell Discord what information our bot will want to access
myIntents = nextcord.Intents.default()
# Specifically note that we want access to member information
myIntents.members = True
# Create a Client object, the actual connection to Discord
client = nextco... | 29.35 | 94 | 0.785349 |
acfdf733a1e94bc8bbfb7781b9eea7705e0815a3 | 334 | py | Python | client/fmcmds/app_list.py | AlexRogalskiy/caastle | bb832c6828c6e97ac18d58ac0f23d8f61ff7bec3 | [
"Apache-2.0"
] | 19 | 2017-09-01T03:42:00.000Z | 2018-01-25T09:53:59.000Z | client/fmcmds/app_list.py | mrhm-dev/caastle | bb832c6828c6e97ac18d58ac0f23d8f61ff7bec3 | [
"Apache-2.0"
] | 34 | 2017-08-30T14:11:16.000Z | 2017-12-16T01:52:44.000Z | client/fmcmds/app_list.py | AlexRogalskiy/caastle | bb832c6828c6e97ac18d58ac0f23d8f61ff7bec3 | [
"Apache-2.0"
] | 4 | 2019-01-20T22:04:59.000Z | 2022-01-09T02:25:35.000Z | from cliff.command import Command
import call_server as server
class AppList(Command):
def get_parser(self, prog_name):
parser = super(AppList, self).get_parser(prog_name)
return parser
def take_action(self, parsed_args):
response = server.TakeAction().get_app_list()
pr... | 20.875 | 59 | 0.688623 |
acfdf7829cdbf2c5a191fd213ee9d036f4af29ff | 4,927 | py | Python | connvitals/collector.py | fossabot/connvitals | 0a185ee34fe872bab7188bc4b201dd8b6a80fe4d | [
"Apache-2.0"
] | null | null | null | connvitals/collector.py | fossabot/connvitals | 0a185ee34fe872bab7188bc4b201dd8b6a80fe4d | [
"Apache-2.0"
] | 1 | 2018-08-21T18:11:26.000Z | 2018-08-21T18:11:26.000Z | connvitals/collector.py | fossabot/connvitals | 0a185ee34fe872bab7188bc4b201dd8b6a80fe4d | [
"Apache-2.0"
] | 1 | 2018-08-21T18:04:40.000Z | 2018-08-21T18:04:40.000Z | # Copyright 2018 Comcast Cable Communications Management, LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law... | 26.777174 | 98 | 0.654759 |
acfdf7a4d5056c4f69b5bbef62c56f9374fafa52 | 1,330 | py | Python | src/Placeable.py | benedicteb/outcast | 0fe16e0bafdbf4bb02d63e93cae208c42d2d7824 | [
"Apache-2.0"
] | null | null | null | src/Placeable.py | benedicteb/outcast | 0fe16e0bafdbf4bb02d63e93cae208c42d2d7824 | [
"Apache-2.0"
] | 8 | 2015-10-25T16:02:17.000Z | 2015-11-06T09:47:43.000Z | src/Placeable.py | benedicteb/outcast | 0fe16e0bafdbf4bb02d63e93cae208c42d2d7824 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Contains placeable classes.
Things that goes on top of the landscape.
"""
import numpy as np
import os
import pygame
import logging
import Game
class Placeable(object):
"""
Base class for Persons and Items.
"""
def __init__(self, position, sprite):
"""
Defaul... | 26.6 | 77 | 0.596992 |
acfdf8924b69a24c1654bbab889f076de1a50df1 | 1,229 | py | Python | autoscalingsim/scaling/policiesbuilder/adjustmentplacement/desired_adjustment_calculator/scoring/score/score_impl/price_score.py | Remit/autoscaling-simulator | 091943c0e9eedf9543e9305682a067ab60f56def | [
"MIT"
] | 6 | 2021-03-10T16:23:10.000Z | 2022-01-14T04:57:46.000Z | autoscalingsim/scaling/policiesbuilder/adjustmentplacement/desired_adjustment_calculator/scoring/score/score_impl/price_score.py | Remit/autoscaling-simulator | 091943c0e9eedf9543e9305682a067ab60f56def | [
"MIT"
] | null | null | null | autoscalingsim/scaling/policiesbuilder/adjustmentplacement/desired_adjustment_calculator/scoring/score/score_impl/price_score.py | Remit/autoscaling-simulator | 091943c0e9eedf9543e9305682a067ab60f56def | [
"MIT"
] | 1 | 2022-01-14T04:57:55.000Z | 2022-01-14T04:57:55.000Z | import numbers
from autoscalingsim.utils.functions import InvertingFunction
from autoscalingsim.scaling.policiesbuilder.adjustmentplacement.desired_adjustment_calculator.scoring.score.score import Score
@Score.register('PriceScoreCalculator')
class PriceScore(Score):
def __init__(self, price_in : float = float('... | 27.311111 | 126 | 0.688365 |
acfdf90a83b4c14be733966aded6f97c8d1da47e | 830 | py | Python | setup.py | Quantum56/AlphaZero-AI | 504522feb4e67211d5fb592f4b14a2cb8271d015 | [
"MIT"
] | 1 | 2019-11-12T01:55:36.000Z | 2019-11-12T01:55:36.000Z | setup.py | Quantum56/AlphaZero-AI | 504522feb4e67211d5fb592f4b14a2cb8271d015 | [
"MIT"
] | 14 | 2019-11-12T00:09:26.000Z | 2022-02-10T00:46:30.000Z | setup.py | Quantum56/AlphaZero-AI | 504522feb4e67211d5fb592f4b14a2cb8271d015 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='AlphaZero-AI',
version='1.0',
description='Modular AI using AlphaZero neural networking',
author='Quantum56',
packages=['AlphaZero-AI'], #same as name
package_dir={'AlphaZero-AI': 'src\\DeepReinforcementLearning'},
install_requires=['absl-py','appnope','a... | 63.846154 | 193 | 0.712048 |
acfdf9cf9c72af7d9c92d35c8112cf2501f64e07 | 663 | py | Python | exercises/ja/exc_03_11.py | YanaPalacheva/spacy-course | 59975f7348a601532303be91474d75d02d0540ef | [
"MIT"
] | 1 | 2021-12-30T06:40:11.000Z | 2021-12-30T06:40:11.000Z | exercises/ja/exc_03_11.py | YanaPalacheva/spacy-course | 59975f7348a601532303be91474d75d02d0540ef | [
"MIT"
] | null | null | null | exercises/ja/exc_03_11.py | YanaPalacheva/spacy-course | 59975f7348a601532303be91474d75d02d0540ef | [
"MIT"
] | 1 | 2020-06-08T13:26:06.000Z | 2020-06-08T13:26:06.000Z | import spacy
from spacy.tokens import Span
nlp = spacy.load("en_core_web_sm")
def get_wikipedia_url(span):
# もしスパンにいずれかのラベルがついているなら、WikipediaのURLを返す
if ____ in ("PERSON", "ORG", "GPE", "LOCATION"):
entity_text = span.text.replace(" ", "_")
return "https://en.wikipedia.org/w/index.php?search="... | 27.625 | 78 | 0.717949 |
acfdf9fbc9fab805aa2a8c345b03d458e9e8d3f8 | 2,203 | py | Python | std_number_validation/tests/validators/boolean_validator_test.py | lgrabowski/std-number-validation | b27a66ed3bd7c7ac25b64b99b462f1c3e3380f20 | [
"MIT"
] | null | null | null | std_number_validation/tests/validators/boolean_validator_test.py | lgrabowski/std-number-validation | b27a66ed3bd7c7ac25b64b99b462f1c3e3380f20 | [
"MIT"
] | null | null | null | std_number_validation/tests/validators/boolean_validator_test.py | lgrabowski/std-number-validation | b27a66ed3bd7c7ac25b64b99b462f1c3e3380f20 | [
"MIT"
] | null | null | null | import unittest
from std_number_validation import validators
from std_number_validation import algorithms
from std_number_validation import exceptions
class LuhnAlgorithmTestCase(unittest.TestCase):
BOOLEAN_VALIDATOR_CLASS = validators.BooleanValidator
LUHN_ALGORITHM = algorithms.LuhnAlgorithm
... | 35.532258 | 109 | 0.650477 |
acfdfb843ca5ea34a47df42eb7b8d3623a4bf8a2 | 2,744 | py | Python | pychron/spectrometer/tasks/mass_cal/mass_calibration_task.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 31 | 2016-03-07T02:38:17.000Z | 2022-02-14T18:23:43.000Z | pychron/spectrometer/tasks/mass_cal/mass_calibration_task.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 1,626 | 2015-01-07T04:52:35.000Z | 2022-03-25T19:15:59.000Z | pychron/spectrometer/tasks/mass_cal/mass_calibration_task.py | UIllinoisHALPychron/pychron | f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc | [
"Apache-2.0"
] | 26 | 2015-05-23T00:10:06.000Z | 2022-03-07T16:51:57.000Z | # ===============================================================================
# Copyright 2013 Jake Ross
#
# 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/licens... | 35.636364 | 81 | 0.636297 |
acfdfb90494e87a07425bc0995669f55d5c52aa4 | 3,072 | py | Python | utils/stitch/stitch.py | VladPerish/keras_segmentation | 851771ff2b8d02879574f37e86a3acba12a4d299 | [
"MIT"
] | 1 | 2020-09-09T12:42:39.000Z | 2020-09-09T12:42:39.000Z | utils/stitch/stitch.py | nayemabs/keras_segmentation | 851771ff2b8d02879574f37e86a3acba12a4d299 | [
"MIT"
] | null | null | null | utils/stitch/stitch.py | nayemabs/keras_segmentation | 851771ff2b8d02879574f37e86a3acba12a4d299 | [
"MIT"
] | null | null | null | import numpy as np
from PIL import Image
from PIL import ImageFilter
import os
from shutil import rmtree
import matplotlib.pyplot as plt
import pandas as pd
from scipy.misc import toimage
# to remove zeropadding
from zeropad_remove import zeropad_remove
# 2014-12-05_0000718813_1.png
def stitch(input_dir, output_di... | 42.082192 | 144 | 0.630859 |
acfdfba658cfa6bcadd34b708928f3e00f5b2dd7 | 8,788 | py | Python | models/frustum_pointnets_v1.py | huy-ha/frustum-pointnets | 0c5b8040707e4497ee2fe7bc3445462cf31ac9e0 | [
"Apache-2.0"
] | null | null | null | models/frustum_pointnets_v1.py | huy-ha/frustum-pointnets | 0c5b8040707e4497ee2fe7bc3445462cf31ac9e0 | [
"Apache-2.0"
] | null | null | null | models/frustum_pointnets_v1.py | huy-ha/frustum-pointnets | 0c5b8040707e4497ee2fe7bc3445462cf31ac9e0 | [
"Apache-2.0"
] | null | null | null | ''' Frsutum PointNets v1 Model.
'''
from __future__ import print_function
import sys
import os
import tensorflow.compat.v1 as tf
import numpy as np
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(BASE_DIR)
sys.path.append(BASE_DIR)
sys.path.append(os.path.join(ROOT_DIR, 'utils'))
impor... | 44.160804 | 101 | 0.607988 |
acfdfd1d347dcbaa5a8afb2211058267b4f00614 | 951 | py | Python | main.py | GuyBarros/python-webp-convert | 5f39b63b6afd8d259dfaf15edd8a02e7db35a9c7 | [
"Apache-2.0"
] | null | null | null | main.py | GuyBarros/python-webp-convert | 5f39b63b6afd8d259dfaf15edd8a02e7db35a9c7 | [
"Apache-2.0"
] | 4 | 2021-06-08T21:51:50.000Z | 2022-03-12T00:36:55.000Z | main.py | GuyBarros/python-webp-convert | 5f39b63b6afd8d259dfaf15edd8a02e7db35a9c7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#this application
import json
import os
import sys
import pprint
import argparse
from PIL import Image
pp = pprint.PrettyPrinter()
# VAULT_ADDR = os.environ.get('VAULT_ADDR', 'http://localhost:8200')
def crawlDirectories(inputPath):
for dirpath, dirnames, files in os.walk(inputPath):
... | 26.416667 | 69 | 0.644585 |
acfdfe5a435e779dc8ed17a72661204e365bf634 | 7,051 | py | Python | arbitrage/private_markets/mtgox.py | samrocketman/bitcoin-arbitrage | a740d445c19e0c2acff2fb83fdec00caa74999e6 | [
"Unlicense"
] | 2 | 2017-09-14T21:48:16.000Z | 2017-10-05T07:23:15.000Z | arbitrage/private_markets/mtgox.py | ascjones/bitcoin-arbitrage | a740d445c19e0c2acff2fb83fdec00caa74999e6 | [
"Unlicense"
] | null | null | null | arbitrage/private_markets/mtgox.py | ascjones/bitcoin-arbitrage | a740d445c19e0c2acff2fb83fdec00caa74999e6 | [
"Unlicense"
] | 18 | 2017-01-12T11:20:57.000Z | 2019-04-19T10:14:34.000Z | # Copyright (C) 2013, Maxime Biais <maxime@biais.org>
from .market import Market
import time
import base64
import hmac
import urllib.request
import urllib.parse
import urllib.error
import urllib.request
import urllib.error
import urllib.parse
import hashlib
import sys
import json
import re
import logging
import config... | 38.741758 | 81 | 0.565735 |
acfdff453180cb952e42c91e1a0077d5b6da2afc | 9,654 | py | Python | Graph/Graph.py | RickyL-2000/cs225sp20_env | d38c48b72580ba7fa172f0cc7e34b3157c13a515 | [
"MIT"
] | 9 | 2020-04-26T06:49:06.000Z | 2020-06-03T09:01:10.000Z | Graph/Graph.py | Xiwei-Wang/cs225sp20_env | d38c48b72580ba7fa172f0cc7e34b3157c13a515 | [
"MIT"
] | null | null | null | Graph/Graph.py | Xiwei-Wang/cs225sp20_env | d38c48b72580ba7fa172f0cc7e34b3157c13a515 | [
"MIT"
] | 3 | 2020-04-26T07:21:22.000Z | 2020-08-04T03:37:50.000Z | '''
MIT License
Name cs225sp20_env Python Package
URL https://github.com/Xiwei-Wang/cs225sp20_env
Version 1.0
Creation Date 26 April 2020
Copyright(c) 2020 Instructors, TAs and Some Students of UIUC CS 225 SP20 ZJUI Course
Instructorts: Prof. Dr. Klaus-Dieter Schewe
TAs: Tingou Liang, Run Zhang, Enyi Jiang, Xiang Li... | 34.851986 | 120 | 0.587321 |
acfdff7ed75ae8f1836d623cb0d32794531d167a | 4,551 | py | Python | graphing/32_fftPitchShifting.py | jaakjensen/PythonDSP | d4f5850a5379c14d531e6f9c6d43e03f53fb888d | [
"MIT"
] | 1 | 2022-01-19T10:40:41.000Z | 2022-01-19T10:40:41.000Z | graphing/32_fftPitchShifting.py | jaakjensen/PythonDSP | d4f5850a5379c14d531e6f9c6d43e03f53fb888d | [
"MIT"
] | null | null | null | graphing/32_fftPitchShifting.py | jaakjensen/PythonDSP | d4f5850a5379c14d531e6f9c6d43e03f53fb888d | [
"MIT"
] | null | null | null | # Use this code to pitch shift an audio signal
# using the STFT.
from scipy.fft import fft, ifft, fftfreq
import numpy as np
from scipy import signal
import matplotlib.pyplot as plt
from scipy.signal import hann
from scipy.signal import sawtooth
import sys
#suppress the sometimes-annoying sci-notation
np.set_printoptio... | 33.463235 | 109 | 0.642936 |
acfe0031fa599ce1064b559473ab9e0cbad86ef5 | 13,598 | py | Python | api/assignment_utilities.py | janelia-flyem/assignment-manager | 3b303a1da7d5db6fcab4f91a7d99beabe9710ee3 | [
"BSD-3-Clause"
] | null | null | null | api/assignment_utilities.py | janelia-flyem/assignment-manager | 3b303a1da7d5db6fcab4f91a7d99beabe9710ee3 | [
"BSD-3-Clause"
] | null | null | null | api/assignment_utilities.py | janelia-flyem/assignment-manager | 3b303a1da7d5db6fcab4f91a7d99beabe9710ee3 | [
"BSD-3-Clause"
] | null | null | null | ''' assignment_utilities.py
Assignment manager utilities
'''
import datetime
import json
import random
import re
import string
import time
from urllib.parse import parse_qs
from flask import g
import requests
import holidays as pyholidays
import pandas as pd
from business_duration import businessDuration
BEARER =... | 31.845433 | 95 | 0.564348 |
acfe00449b6241b0865e5dddbdeabb904f3ec947 | 776 | py | Python | Examples/put_worksheet_custom_filter.py | aspose-cells-cloud/aspose-cells-cloud-python | 0189236d38053dc67f7edc754b5101f17262cee8 | [
"MIT"
] | 3 | 2018-05-23T03:16:26.000Z | 2020-11-07T11:42:41.000Z | Examples/put_worksheet_custom_filter.py | aspose-cells-cloud/aspose-cells-cloud-python | 0189236d38053dc67f7edc754b5101f17262cee8 | [
"MIT"
] | null | null | null | Examples/put_worksheet_custom_filter.py | aspose-cells-cloud/aspose-cells-cloud-python | 0189236d38053dc67f7edc754b5101f17262cee8 | [
"MIT"
] | 4 | 2018-08-29T18:45:05.000Z | 2021-03-25T07:59:56.000Z |
"""
Test case for cells_auto_filter_put_worksheet_custom_filter
Filters a list with a custom criteria.
"""
name ='Book1.xlsx'
sheet_name ='Sheet1'
range ='A1:C10'
fieldIndex = 0
operatorType1 = "LessOrEqual"
criteria1 = "tes... | 40.842105 | 256 | 0.635309 |
acfe0075fe46598be309515cbf2a85c8a207bc34 | 13,172 | py | Python | originstamp_client/rest.py | OriginStampTimestamping/originstamp-python-client | a13c3d51eac6dd3a920b7b74e079531fe7ab17a2 | [
"MIT"
] | 9 | 2018-11-06T06:43:46.000Z | 2020-09-26T03:29:41.000Z | originstamp_client/rest.py | OriginStampTimestamping/originstamp-python-client | a13c3d51eac6dd3a920b7b74e079531fe7ab17a2 | [
"MIT"
] | 1 | 2019-05-06T10:49:23.000Z | 2019-05-13T09:30:01.000Z | originstamp_client/rest.py | OriginStampTimestamping/originstamp-python-client | a13c3d51eac6dd3a920b7b74e079531fe7ab17a2 | [
"MIT"
] | 1 | 2020-10-02T17:31:47.000Z | 2020-10-02T17:31:47.000Z | # coding: utf-8
"""
OriginStamp Client
OpenAPI spec version: 3.0
OriginStamp Documentation: https://docs.originstamp.com
Contact: mail@originstamp.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import io
import json
import logging... | 40.780186 | 134 | 0.541527 |
acfe00bf5e0cd91bb4dfdd85d44188f173336958 | 465 | py | Python | fabfile/text.py | nprapps/play-quiz | a3a09d473fc7a420bb6f4e0931dc3b5c54712d08 | [
"FSFAP"
] | 1 | 2015-10-14T13:00:08.000Z | 2015-10-14T13:00:08.000Z | fabfile/text.py | nprapps/play-quiz | a3a09d473fc7a420bb6f4e0931dc3b5c54712d08 | [
"FSFAP"
] | null | null | null | fabfile/text.py | nprapps/play-quiz | a3a09d473fc7a420bb6f4e0931dc3b5c54712d08 | [
"FSFAP"
] | 1 | 2021-02-18T11:31:47.000Z | 2021-02-18T11:31:47.000Z | #!/usr/bin/env python
"""
Commands related to syncing copytext from Google Docs.
"""
from fabric.api import task
import app_config
from etc.gdocs import GoogleDoc
@task(default=True)
def update():
"""
Downloads a Google Doc as an Excel file.
"""
doc = {}
url = app_config.COPY_GOOGLE_DOC_URL
... | 17.222222 | 54 | 0.630108 |
acfe0128d085819ac084de31cd0d2aff0de03f0a | 1,437 | py | Python | utils/extra/htmhtm.py | luis-guilherme/mitra | 18bd935b11dc8fcf594255a96809c05abc324e87 | [
"MIT"
] | 864 | 2020-09-22T18:52:27.000Z | 2022-03-28T19:57:25.000Z | utils/extra/htmhtm.py | luis-guilherme/mitra | 18bd935b11dc8fcf594255a96809c05abc324e87 | [
"MIT"
] | 13 | 2020-09-24T10:42:21.000Z | 2021-12-20T14:44:36.000Z | utils/extra/htmhtm.py | luis-guilherme/mitra | 18bd935b11dc8fcf594255a96809c05abc324e87 | [
"MIT"
] | 55 | 2020-09-22T19:01:19.000Z | 2022-03-20T09:15:45.000Z | # an ambiguous HTML generator
# (will not work as polyglot without encryption)
# Ange Albertini 2021
# To avoid garbage characters in the 1st payload
# (due from encryption of the first '<!--' characters)
# break out of content in the html page via a script like:
# <div id='mypage'>
# [your code here]
# </div>
# <s... | 24.775862 | 85 | 0.653445 |
acfe013dafbe4f8ce8e0e0b16130c72e06db9f25 | 2,371 | py | Python | vehicle/OVMS.V3/components/wolfssl/wrapper/python/wolfssl/src/wolfssl/build_ffi.py | qtwre/Open-Vehicle-Monitoring-System-3 | 0ebd21bdff06190c0909c29b215ab63f5792e7d6 | [
"MIT"
] | 322 | 2017-06-12T16:56:49.000Z | 2022-03-27T15:46:38.000Z | vehicle/OVMS.V3/components/wolfssl/wrapper/python/wolfssl/src/wolfssl/build_ffi.py | qtwre/Open-Vehicle-Monitoring-System-3 | 0ebd21bdff06190c0909c29b215ab63f5792e7d6 | [
"MIT"
] | 426 | 2017-08-30T04:47:34.000Z | 2022-03-25T21:01:11.000Z | vehicle/OVMS.V3/components/wolfssl/wrapper/python/wolfssl/src/wolfssl/build_ffi.py | qtwre/Open-Vehicle-Monitoring-System-3 | 0ebd21bdff06190c0909c29b215ab63f5792e7d6 | [
"MIT"
] | 194 | 2017-07-03T23:34:08.000Z | 2022-03-16T09:09:22.000Z | # -*- coding: utf-8 -*-
#
# build_ffi.py
#
# Copyright (C) 2006-2020 wolfSSL Inc.
#
# This file is part of wolfSSL.
#
# wolfSSL is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, ... | 29.271605 | 80 | 0.704766 |
acfe0149119dc15a4e0b0e5a3f9e704f4f9c3c92 | 7,872 | py | Python | discor_algo/discor/algorithm/sac.py | fgitmichael/SelfSupevisedSkillDiscovery | 60eee11cfd67046190dd2784bf40e97bdbed9d40 | [
"MIT"
] | 27 | 2020-06-09T06:33:14.000Z | 2022-03-27T05:36:27.000Z | discor_algo/discor/algorithm/sac.py | fgitmichael/SelfSupevisedSkillDiscovery | 60eee11cfd67046190dd2784bf40e97bdbed9d40 | [
"MIT"
] | 6 | 2021-02-02T23:00:02.000Z | 2022-01-13T03:13:51.000Z | discor_algo/discor/algorithm/sac.py | fgitmichael/SelfSupevisedSkillDiscovery | 60eee11cfd67046190dd2784bf40e97bdbed9d40 | [
"MIT"
] | 3 | 2020-06-15T15:17:36.000Z | 2021-03-25T11:52:07.000Z | import os
import torch
from torch.optim import Adam
from .base import Algorithm
from discor.network import TwinnedStateActionFunction, GaussianPolicy
from discor.utils import disable_gradients, soft_update, update_params, \
assert_action
class SAC(Algorithm):
def __init__(self, state_dim, action_dim, device... | 39.164179 | 78 | 0.639355 |
acfe0164bb952545d9ea85adcad69f14c3bff58a | 41,641 | py | Python | jenkins_jobs/modules/parameters.py | wsoula/jenkins-job-builder | 2bff652b03bfcf0ab272e5cd0b5092472c201f7e | [
"Apache-2.0"
] | null | null | null | jenkins_jobs/modules/parameters.py | wsoula/jenkins-job-builder | 2bff652b03bfcf0ab272e5cd0b5092472c201f7e | [
"Apache-2.0"
] | null | null | null | jenkins_jobs/modules/parameters.py | wsoula/jenkins-job-builder | 2bff652b03bfcf0ab272e5cd0b5092472c201f7e | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# 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... | 38.771881 | 79 | 0.639898 |
acfe017ee84fb34e1e4e8b92c62ee6faa6323232 | 199 | py | Python | raspy/devices/picamera/__init__.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | raspy/devices/picamera/__init__.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | raspy/devices/picamera/__init__.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | """This package contains modules for working with the PiCamera device."""
__all__ = (
"capture_utils",
"events",
"image_encoding",
"picamera_device",
"still_capture_settings"
)
| 18.090909 | 73 | 0.673367 |
acfe01f4de19cb857a33b7c855a79b35390114fb | 2,938 | py | Python | aligner/helper.py | zhouyangnk/Montreal-Forced-Aligner | 4f8733409e79a50744616921a04fccf115e8af6f | [
"MIT"
] | null | null | null | aligner/helper.py | zhouyangnk/Montreal-Forced-Aligner | 4f8733409e79a50744616921a04fccf115e8af6f | [
"MIT"
] | null | null | null | aligner/helper.py | zhouyangnk/Montreal-Forced-Aligner | 4f8733409e79a50744616921a04fccf115e8af6f | [
"MIT"
] | null | null | null | import os
import shutil
def thirdparty_binary(binary_name):
return shutil.which(binary_name)
def make_path_safe(path):
return '"{}"'.format(path)
def load_text(path):
with open(path, 'r', encoding='utf8') as f:
text = f.read().strip().lower()
return text
def make_safe(element):
if i... | 26 | 98 | 0.564329 |
acfe020e336689278c5c9ab7e248ffd87360c8d8 | 6,688 | py | Python | tests/objects/test_link.py | malached/caldera | b622b0b8d0a04bcd0328040cbf53a01b93505afc | [
"Apache-2.0"
] | 3,385 | 2017-11-29T02:08:31.000Z | 2022-03-31T13:38:11.000Z | tests/objects/test_link.py | malached/caldera | b622b0b8d0a04bcd0328040cbf53a01b93505afc | [
"Apache-2.0"
] | 1,283 | 2017-11-29T16:45:31.000Z | 2022-03-31T20:10:04.000Z | tests/objects/test_link.py | malached/caldera | b622b0b8d0a04bcd0328040cbf53a01b93505afc | [
"Apache-2.0"
] | 800 | 2017-11-29T17:48:43.000Z | 2022-03-30T22:39:40.000Z | from unittest import mock
import pytest
from app.objects.secondclass.c_link import Link
from app.objects.secondclass.c_fact import Fact
from app.objects.secondclass.c_relationship import Relationship
from app.service.interfaces.i_event_svc import EventServiceInterface
from app.utility.base_service import BaseService
... | 48.817518 | 119 | 0.691388 |
acfe026b11f2efb7d1e652ec6a4ed43697ff8678 | 3,788 | py | Python | suites/API/DatabaseApi/BlocksTransactions/GetBlockTxNumber.py | echoprotocol/pytests | 5dce698558c2ba703aea03aab79906af1437da5d | [
"MIT"
] | 1 | 2021-03-12T05:17:02.000Z | 2021-03-12T05:17:02.000Z | suites/API/DatabaseApi/BlocksTransactions/GetBlockTxNumber.py | echoprotocol/pytests | 5dce698558c2ba703aea03aab79906af1437da5d | [
"MIT"
] | 1 | 2019-11-19T12:10:59.000Z | 2019-11-19T12:10:59.000Z | suites/API/DatabaseApi/BlocksTransactions/GetBlockTxNumber.py | echoprotocol/pytests | 5dce698558c2ba703aea03aab79906af1437da5d | [
"MIT"
] | 2 | 2019-04-29T10:46:48.000Z | 2019-10-29T10:01:03.000Z | # -*- coding: utf-8 -*-
from common.base_test import BaseTest
import lemoncheesecake.api as lcc
from lemoncheesecake.matching import check_that, equal_to
SUITE = {
"description": "Method 'get_block_tx_number'"
}
@lcc.prop("main", "type")
@lcc.prop("positive", "type")
@lcc.tags("api", "database_api", "database_a... | 43.045455 | 119 | 0.689282 |
acfe028f783142e500f7907affdd6584b7df8dee | 2,743 | py | Python | scripts/retimestamp_rosbag.py | KopanevPavel/Kimera-VIO-ROS | 774ab62fac78f9a4c5aa08b76ed8f9d0dafa64d8 | [
"BSD-2-Clause"
] | 1 | 2022-01-05T06:42:02.000Z | 2022-01-05T06:42:02.000Z | scripts/retimestamp_rosbag.py | KopanevPavel/Kimera-VIO-ROS | 774ab62fac78f9a4c5aa08b76ed8f9d0dafa64d8 | [
"BSD-2-Clause"
] | null | null | null | scripts/retimestamp_rosbag.py | KopanevPavel/Kimera-VIO-ROS | 774ab62fac78f9a4c5aa08b76ed8f9d0dafa64d8 | [
"BSD-2-Clause"
] | 1 | 2020-08-05T15:41:30.000Z | 2020-08-05T15:41:30.000Z | #!/usr/bin/env python
# ------------------------------------------------------------------------------
# Function : restamp ros bagfile (using header timestamps)
# Project : IJRR MAV Datasets
# Author : www.asl.ethz.ch
# Version : V01 21JAN2016 Initial version.
# Comment :
# Status : under review
#
# Usage ... | 29.180851 | 84 | 0.533358 |
acfe03f79a54a7786e6aaeaaa8251345b5de8dc8 | 3,424 | py | Python | observable/manage.py | lycantropos/admin | 906b206cdecad65aff55a67114350f8332837947 | [
"MIT"
] | null | null | null | observable/manage.py | lycantropos/admin | 906b206cdecad65aff55a67114350f8332837947 | [
"MIT"
] | null | null | null | observable/manage.py | lycantropos/admin | 906b206cdecad65aff55a67114350f8332837947 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.6
import logging.config
import logging.handlers
import os
import sys
from asyncio import (get_event_loop,
ensure_future)
import click
from aiohttp import ClientSession
from aiohttp.web import run_app
from observable.app import create_app
from observable.config import PACKAG... | 32 | 79 | 0.557827 |
acfe04621f039fe643ece6b17d9356e48ba5e091 | 153 | py | Python | sample/WRS2018/SP-DoubleArmV7S-ROS.py | jun0/choreonoid | 37167e52bfa054088272e1924d2062604104ac08 | [
"MIT"
] | null | null | null | sample/WRS2018/SP-DoubleArmV7S-ROS.py | jun0/choreonoid | 37167e52bfa054088272e1924d2062604104ac08 | [
"MIT"
] | null | null | null | sample/WRS2018/SP-DoubleArmV7S-ROS.py | jun0/choreonoid | 37167e52bfa054088272e1924d2062604104ac08 | [
"MIT"
] | null | null | null | import WRSUtil
WRSUtil.loadProject(
"SingleSceneView", "SP", "AISTSimulator", "DoubleArmV7S",
enableVisionSimulation = True, remoteType = "ROS")
| 30.6 | 61 | 0.732026 |
acfe04bcd3f30a63f37abe76e0596609c11fc930 | 5,481 | py | Python | compressed_communication/aggregators/comparison_methods/qsgd.py | lamylio/federated | 3f79e71344016ae5e5ec550557af25e5c169a934 | [
"Apache-2.0"
] | 1 | 2022-03-16T02:13:39.000Z | 2022-03-16T02:13:39.000Z | compressed_communication/aggregators/comparison_methods/qsgd.py | notminusone/federated | 6a709f5598450232b918c046cfeba849f479d5cb | [
"Apache-2.0"
] | null | null | null | compressed_communication/aggregators/comparison_methods/qsgd.py | notminusone/federated | 6a709f5598450232b918c046cfeba849f479d5cb | [
"Apache-2.0"
] | null | null | null | # Copyright 2022, Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 37.285714 | 80 | 0.691662 |
acfe0534070ce796af9f7526601c908942f05d46 | 5,115 | py | Python | bindings/python/src/cloudsmith_api/models/packages_validateupload_luarocks.py | cloudsmith-io/cloudsmith-api | bc747fa6ee1d86485e334b08f65687630b3fd87c | [
"Apache-2.0"
] | 9 | 2018-07-02T15:21:40.000Z | 2021-11-24T03:44:39.000Z | bindings/python/src/cloudsmith_api/models/packages_validateupload_luarocks.py | cloudsmith-io/cloudsmith-api | bc747fa6ee1d86485e334b08f65687630b3fd87c | [
"Apache-2.0"
] | 8 | 2019-01-08T22:06:12.000Z | 2022-03-16T15:02:37.000Z | bindings/python/src/cloudsmith_api/models/packages_validateupload_luarocks.py | cloudsmith-io/cloudsmith-api | bc747fa6ee1d86485e334b08f65687630b3fd87c | [
"Apache-2.0"
] | 1 | 2021-12-06T19:08:05.000Z | 2021-12-06T19:08:05.000Z | # coding: utf-8
"""
Cloudsmith API
The API to the Cloudsmith Service
OpenAPI spec version: v1
Contact: support@cloudsmith.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class PackagesValidateuploadLuarocks... | 27.95082 | 155 | 0.587488 |
acfe05977e8ddf58d422bc9b999988a715e540c9 | 2,169 | py | Python | murano/packages/versions/mpl_v1.py | OndrejVojta/murano | cf995586e0d11233694ce097bd9754a60149d9cd | [
"Apache-2.0"
] | 1 | 2015-02-14T16:21:07.000Z | 2015-02-14T16:21:07.000Z | murano/packages/versions/mpl_v1.py | OndrejVojta/murano | cf995586e0d11233694ce097bd9754a60149d9cd | [
"Apache-2.0"
] | null | null | null | murano/packages/versions/mpl_v1.py | OndrejVojta/murano | cf995586e0d11233694ce097bd9754a60149d9cd | [
"Apache-2.0"
] | 1 | 2016-04-30T07:27:52.000Z | 2016-04-30T07:27:52.000Z | # Copyright (c) 2014 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 35.557377 | 72 | 0.723375 |
acfe076376b28ccc42dbb11d91f8003131f269ce | 8,759 | py | Python | django-rgd/rgd/migrations/0001_initial.py | ResonantGeoData/ResonantGeoData | 72b3d4085cc5700d0ad5556f31b7eb96ed2d3b8a | [
"Apache-2.0"
] | 40 | 2020-05-07T17:15:26.000Z | 2022-02-27T14:45:04.000Z | django-rgd/rgd/migrations/0001_initial.py | ResonantGeoData/ResonantGeoData | 72b3d4085cc5700d0ad5556f31b7eb96ed2d3b8a | [
"Apache-2.0"
] | 408 | 2020-05-07T15:10:35.000Z | 2022-03-30T03:08:47.000Z | django-rgd/rgd/migrations/0001_initial.py | ResonantGeoData/ResonantGeoData | 72b3d4085cc5700d0ad5556f31b7eb96ed2d3b8a | [
"Apache-2.0"
] | 3 | 2021-04-12T20:16:22.000Z | 2021-06-22T14:03:46.000Z | # Generated by Django 3.2.4 on 2021-06-24 22:52
from django.conf import settings
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
import rgd.models.mixins
import rgd.utility
import s3_file_field.fields
class Migrat... | 38.416667 | 209 | 0.433611 |
acfe0849b6b17c38d5299279d774630236c02911 | 186 | py | Python | third_party/django_summernote/__init__.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 39 | 2015-06-10T23:18:07.000Z | 2021-10-21T04:29:06.000Z | third_party/django_summernote/__init__.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 2 | 2016-08-22T12:38:10.000Z | 2017-01-26T18:37:33.000Z | third_party/django_summernote/__init__.py | asysc2020/contentbox | 5c155976e0ce7ea308d62293ab89624d97b21d09 | [
"Apache-2.0"
] | 26 | 2015-06-10T22:09:15.000Z | 2021-06-27T15:45:15.000Z | version_info = (0, 5, 8)
__version__ = version = '.'.join(map(str, version_info))
__project__ = PROJECT = 'django-summernote'
__author__ = AUTHOR = "Park Hyunwoo <ez.amiryo@gmail.com>"
| 31 | 58 | 0.709677 |
acfe08ddec13c5b69fe8ea9d4d277a5db9ae8609 | 1,098 | py | Python | src/openpersonen/api/data_classes/persoon.py | maykinmedia/open-personen | ddcf083ccd4eb864c5305bcd8bc75c6c64108272 | [
"RSA-MD"
] | 2 | 2020-08-26T11:24:43.000Z | 2021-07-28T09:46:40.000Z | src/openpersonen/api/data_classes/persoon.py | maykinmedia/open-personen | ddcf083ccd4eb864c5305bcd8bc75c6c64108272 | [
"RSA-MD"
] | 153 | 2020-08-26T10:45:35.000Z | 2021-12-10T17:33:16.000Z | src/openpersonen/api/data_classes/persoon.py | maykinmedia/open-personen | ddcf083ccd4eb864c5305bcd8bc75c6c64108272 | [
"RSA-MD"
] | null | null | null | from dataclasses import dataclass
from openpersonen.backends import backend
from .geboorte import Geboorte
from .naam import Naam
@dataclass
class Persoon:
burgerservicenummer: str
geheimhoudingPersoonsgegevens: bool
naam: Naam
geboorte: Geboorte
backend_function_name = None
@classmethod
... | 24.954545 | 88 | 0.676685 |
acfe0945d0deb294e4aafa9ec020e776d5bcefc1 | 413 | py | Python | appmap/test/data/trial/test/test_deferred.py | calvinsomething/appmap-python | 7234f7cdb240eadfa74a1e6021bc8695ceb60179 | [
"MIT"
] | 34 | 2020-12-08T20:57:11.000Z | 2022-01-31T09:45:03.000Z | appmap/test/data/trial/test/test_deferred.py | calvinsomething/appmap-python | 7234f7cdb240eadfa74a1e6021bc8695ceb60179 | [
"MIT"
] | 105 | 2020-12-02T14:29:43.000Z | 2022-02-02T10:00:04.000Z | appmap/test/data/trial/test/test_deferred.py | calvinsomething/appmap-python | 7234f7cdb240eadfa74a1e6021bc8695ceb60179 | [
"MIT"
] | 5 | 2020-11-30T01:18:17.000Z | 2021-08-04T10:30:36.000Z | import time
from twisted.internet import defer
from twisted.internet import reactor
from twisted.trial import unittest
class TestDeferred(unittest.TestCase):
def test_hello_world(self):
d = defer.Deferred()
def cb(_):
self.assertTrue(False)
d.addCallback(cb)
reactor... | 19.666667 | 46 | 0.670702 |
acfe0959d1b4c8d8b2dfedcc1082ac091e6c75f4 | 1,249 | py | Python | app.py | ikii123/ikii | 9be4c076af83b0d7213852753656818847e09a07 | [
"BSD-3-Clause"
] | null | null | null | app.py | ikii123/ikii | 9be4c076af83b0d7213852753656818847e09a07 | [
"BSD-3-Clause"
] | null | null | null | app.py | ikii123/ikii | 9be4c076af83b0d7213852753656818847e09a07 | [
"BSD-3-Clause"
] | null | null | null | import os
from flask import Flask, request, abort
from linebot import (
LineBotApi, WebhookHandler
)
from linebot.exceptions import (
InvalidSignatureError
)
from linebot.models import (
MessageEvent, TextMessage, TextSendMessage,
)
app = Flask(__name__)
line_bot_api = LineBotApi('MTn2latTZ4NmBnuah67007i... | 26.020833 | 201 | 0.738991 |
acfe09902c56f709286e8141ebb48598e49e7599 | 484 | py | Python | extractor/fulltext/launch_single.py | arXiv/arxiv-fulltext | 36008457022cde245d78b3ad91e0a95aa21bc420 | [
"MIT"
] | 18 | 2019-03-01T02:51:45.000Z | 2021-11-05T12:26:12.000Z | extractor/fulltext/launch_single.py | arXiv/arxiv-fulltext | 36008457022cde245d78b3ad91e0a95aa21bc420 | [
"MIT"
] | 6 | 2019-05-06T15:25:16.000Z | 2019-07-31T20:11:36.000Z | extractor/fulltext/launch_single.py | arXiv/arxiv-fulltext | 36008457022cde245d78b3ad91e0a95aa21bc420 | [
"MIT"
] | 8 | 2019-01-10T22:01:58.000Z | 2021-11-05T12:26:01.000Z | import os
import sys
# sys.path.append(".")
import logging
from fulltext import convert
log = logging.getLogger('fulltext')
if __name__ == '__main__':
if len(sys.argv) <= 1:
sys.exit('No file path specified')
path = sys.argv[1].strip()
try:
log.info('Path: %s\n' % path)
log.info('... | 23.047619 | 65 | 0.613636 |
acfe0af524df69ba956e8f867c1600c3a6c7932a | 1,929 | py | Python | qiskit/providers/ibmq/job/circuitjob.py | Sahar2/qiskit-ibmq-provider | a7fa886f5b34123bf7bb903840e32b1bf4cc30b5 | [
"Apache-2.0"
] | 1 | 2020-07-14T20:09:52.000Z | 2020-07-14T20:09:52.000Z | qiskit/providers/ibmq/job/circuitjob.py | Sahar2/qiskit-ibmq-provider | a7fa886f5b34123bf7bb903840e32b1bf4cc30b5 | [
"Apache-2.0"
] | null | null | null | qiskit/providers/ibmq/job/circuitjob.py | Sahar2/qiskit-ibmq-provider | a7fa886f5b34123bf7bb903840e32b1bf4cc30b5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019.
#
# 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... | 31.112903 | 78 | 0.685329 |
acfe0b20400133a3ddd26cd4b58228709709f9ad | 1,353 | py | Python | postprocessing.py | philippbeer/m4_clustering | 18cf1b9111f4236f0be152d2419c470840645acb | [
"MIT"
] | null | null | null | postprocessing.py | philippbeer/m4_clustering | 18cf1b9111f4236f0be152d2419c470840645acb | [
"MIT"
] | null | null | null | postprocessing.py | philippbeer/m4_clustering | 18cf1b9111f4236f0be152d2419c470840645acb | [
"MIT"
] | null | null | null | """
This module provides the methods for the processing of y_hat
"""
from typing import Dict
import numpy as np
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
import config as cnf
def postprocess(y_test: np.ndarray,
y_hat: np.ndarray,
standardizers: Dict[int,MinMaxScaler],
ts_order: p... | 24.160714 | 71 | 0.71323 |
acfe0bb1abbefc09b121c2544adc3aeee1e5e93e | 7,691 | py | Python | myems-api/core/menu.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | myems-api/core/menu.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | myems-api/core/menu.py | 18600575648/myems | 38ab7d509b5ab275a4df0333e6256c586abdfbf9 | [
"MIT"
] | null | null | null | import falcon
import simplejson as json
import mysql.connector
import config
from core.useractivity import user_logger, access_control
class MenuCollection:
@staticmethod
def __init__():
""""Initializes MenuCollection"""
pass
@staticmethod
def on_options(req, resp):
resp.statu... | 32.315126 | 90 | 0.532961 |
acfe0bbb77df52198318856e16a75e7d93262f9d | 2,881 | py | Python | paragen/generators/abstract_generator.py | godweiyang/ParaGen | 9665d1244ea38a41fc06b4e0a7f6411985e2221f | [
"Apache-2.0"
] | 50 | 2022-01-18T07:25:46.000Z | 2022-03-14T13:06:18.000Z | paragen/generators/abstract_generator.py | JiangtaoFeng/ParaGen | 509334bf16e3674e009bb9dc37ecc38ae3b5c977 | [
"Apache-2.0"
] | 2 | 2022-01-19T09:36:42.000Z | 2022-02-23T07:16:02.000Z | paragen/generators/abstract_generator.py | JiangtaoFeng/ParaGen | 509334bf16e3674e009bb9dc37ecc38ae3b5c977 | [
"Apache-2.0"
] | 6 | 2022-01-19T09:28:53.000Z | 2022-03-10T10:20:08.000Z | import logging
logger = logging.getLogger(__name__)
import torch
import torch.nn as nn
from paragen.utils.ops import inspect_fn
from paragen.utils.runtime import Environment
from paragen.utils.io import UniIO, mkdir
class AbstractGenerator(nn.Module):
"""
AbstractGenerator wrap a model with inference algori... | 28.245098 | 109 | 0.58799 |
acfe0c0ae868dab08e3ae88fe9c10b19b55dbc01 | 2,640 | py | Python | web scraping/flipcartCrawling/flipcartCrawling/spiders/flipcartClothing.py | NirmalSilwal/Python- | 6d23112db8366360f0b79bdbf21252575e8eab3e | [
"MIT"
] | 32 | 2020-04-05T08:29:40.000Z | 2022-01-08T03:10:00.000Z | web scraping/flipcartCrawling/flipcartCrawling/spiders/flipcartClothing.py | NirmalSilwal/Python- | 6d23112db8366360f0b79bdbf21252575e8eab3e | [
"MIT"
] | 3 | 2021-06-02T04:09:11.000Z | 2022-03-02T14:55:03.000Z | web scraping/flipcartCrawling/flipcartCrawling/spiders/flipcartClothing.py | NirmalSilwal/Python- | 6d23112db8366360f0b79bdbf21252575e8eab3e | [
"MIT"
] | 3 | 2020-07-13T05:44:04.000Z | 2021-03-03T07:07:58.000Z | import scrapy
from ..items import FlipcartcrawlingItem
class FlipcartclothingSpider(scrapy.Spider):
name = 'flipcartClothing'
page_number = 2
# TODO handle for multiple url at same time
start_urls = [
# 'https://www.flipkart.com/clothing-and-accessories/topwear/pr?sid=clo%2Cash&otracker=categ... | 38.26087 | 209 | 0.637879 |
acfe0eab2145a7a8e989e3f1d3e03dba482388e3 | 3,761 | py | Python | tests/core/test_acceptor.py | fisabiliyusri/proxy | 29934503251b704813ef3e7ed8c2a5ae69448c8a | [
"BSD-3-Clause"
] | null | null | null | tests/core/test_acceptor.py | fisabiliyusri/proxy | 29934503251b704813ef3e7ed8c2a5ae69448c8a | [
"BSD-3-Clause"
] | 8 | 2022-01-23T10:51:59.000Z | 2022-03-29T22:11:57.000Z | tests/core/test_acceptor.py | fisabiliyusri/proxy | 29934503251b704813ef3e7ed8c2a5ae69448c8a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE... | 31.605042 | 86 | 0.634938 |
acfe0ff812b5b3dde0750f5a6653707ecd724916 | 1,747 | py | Python | peering_manager/urls.py | amtypaldos/peering-manager | a5a90f108849874e9acaa6827552535fa250a60e | [
"Apache-2.0"
] | null | null | null | peering_manager/urls.py | amtypaldos/peering-manager | a5a90f108849874e9acaa6827552535fa250a60e | [
"Apache-2.0"
] | null | null | null | peering_manager/urls.py | amtypaldos/peering-manager | a5a90f108849874e9acaa6827552535fa250a60e | [
"Apache-2.0"
] | null | null | null | """peering_manager URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
... | 30.12069 | 82 | 0.683457 |
acfe1060807119a56dd48c29ca3dbdf40dc2890e | 3,120 | py | Python | app/app/settings.py | chemscobra/recipe-app-api | 4bbec7b12d345783c6a3222971b6743281e27198 | [
"MIT"
] | null | null | null | app/app/settings.py | chemscobra/recipe-app-api | 4bbec7b12d345783c6a3222971b6743281e27198 | [
"MIT"
] | null | null | null | app/app/settings.py | chemscobra/recipe-app-api | 4bbec7b12d345783c6a3222971b6743281e27198 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
# Bui... | 25.365854 | 91 | 0.695192 |
acfe11af5503fd9893d7f5f457c67bdc837283e0 | 40,160 | py | Python | plnn_bounds/model.py | oval-group/decomposition-plnn-bounds | 1f2548bf422a5c6ac235cfde2b6f467f850f65a1 | [
"MIT"
] | 2 | 2021-02-15T13:59:40.000Z | 2022-03-10T21:18:17.000Z | plnn_bounds/model.py | oval-group/decomposition-plnn-bounds | 1f2548bf422a5c6ac235cfde2b6f467f850f65a1 | [
"MIT"
] | null | null | null | plnn_bounds/model.py | oval-group/decomposition-plnn-bounds | 1f2548bf422a5c6ac235cfde2b6f467f850f65a1 | [
"MIT"
] | 1 | 2021-03-22T01:20:31.000Z | 2021-03-22T01:20:31.000Z | import math
import scipy.io
import torch
from collections import Counter, defaultdict
from plnn_bounds.modules import View, Flatten
from plnn_bounds.naive_approximation import NaiveNetwork
from torch import nn
def no_grad(mod):
for param in mod.parameters():
param.requires_grad = False
def cifar_model_la... | 40.483871 | 138 | 0.588894 |
acfe1285b62dc33d6791a737787462bddadb481e | 4,154 | py | Python | private/templates/default/menus.py | andygimma/eden | 716d5e11ec0030493b582fa67d6f1c35de0af50d | [
"MIT"
] | 1 | 2019-08-20T16:32:33.000Z | 2019-08-20T16:32:33.000Z | private/templates/default/menus.py | andygimma/eden | 716d5e11ec0030493b582fa67d6f1c35de0af50d | [
"MIT"
] | null | null | null | private/templates/default/menus.py | andygimma/eden | 716d5e11ec0030493b582fa67d6f1c35de0af50d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from gluon import *
from s3 import *
from eden.layouts import *
try:
from .layouts import *
except ImportError:
pass
import eden.menus as default
# Below is an example which you can base your own template's menus.py on
# - there are also other examples in the other templates folders
#... | 35.504274 | 80 | 0.508907 |
acfe13d9a581b54b7a8c619bc799efc1defa3f05 | 12,996 | py | Python | tests/unit/states/test_saltmod.py | yutiansut/salt | e96c0fa13a3d977f6bfa9ccb56b7e45534f78666 | [
"Apache-2.0"
] | null | null | null | tests/unit/states/test_saltmod.py | yutiansut/salt | e96c0fa13a3d977f6bfa9ccb56b7e45534f78666 | [
"Apache-2.0"
] | 1 | 2021-08-16T13:42:35.000Z | 2021-08-16T13:42:35.000Z | tests/unit/states/test_saltmod.py | yutiansut/salt | e96c0fa13a3d977f6bfa9ccb56b7e45534f78666 | [
"Apache-2.0"
] | 2 | 2021-05-21T06:31:03.000Z | 2021-05-24T04:14:59.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: Jayesh Kariya <jayeshk@saltstack.com>
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
import os
import time
import tempfile
# Import Salt Testing Libs
from tests.support.runtests import RUNTIME_VARS
from tests.support.mixins... | 36.711864 | 380 | 0.490074 |
acfe1441faccdf3dfc1b9e9ff9813d9742f8b18d | 1,261 | py | Python | net/text_detector.py | lithium0003/Image2UTF8-Transformer | 2620af2a8bdaf332e25b39ce05d610e21e6492fc | [
"MIT"
] | null | null | null | net/text_detector.py | lithium0003/Image2UTF8-Transformer | 2620af2a8bdaf332e25b39ce05d610e21e6492fc | [
"MIT"
] | null | null | null | net/text_detector.py | lithium0003/Image2UTF8-Transformer | 2620af2a8bdaf332e25b39ce05d610e21e6492fc | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
width = 128
height = 128
def hard_swish(x):
return x * tf.nn.relu6(x+3) / 6
from keras.utils.generic_utils import get_custom_objects
get_custom_objects().update({'hard_swish': hard_swish})
def FeatureBlock():
inputs = {
'image': tf.keras.Input(shape=(heigh... | 26.270833 | 115 | 0.663759 |
acfe1484486a990cdab1be34ec009bf4f96731ba | 25,442 | py | Python | 3.7.0/lldb-3.7.0.src/test/tools/lldb-mi/stack/TestMiStack.py | androm3da/clang_sles | 2ba6d0711546ad681883c42dfb8661b842806695 | [
"MIT"
] | 3 | 2016-02-10T14:18:40.000Z | 2018-02-05T03:15:56.000Z | 3.7.0/lldb-3.7.0.src/test/tools/lldb-mi/stack/TestMiStack.py | androm3da/clang_sles | 2ba6d0711546ad681883c42dfb8661b842806695 | [
"MIT"
] | 1 | 2016-02-10T15:40:03.000Z | 2016-02-10T15:40:03.000Z | 3.7.0/lldb-3.7.0.src/test/tools/lldb-mi/stack/TestMiStack.py | androm3da/clang_sles | 2ba6d0711546ad681883c42dfb8661b842806695 | [
"MIT"
] | null | null | null | """
Test lldb-mi -stack-xxx commands.
"""
import lldbmi_testcase
from lldbtest import *
import unittest2
class MiStackTestCase(lldbmi_testcase.MiTestCaseBase):
mydir = TestBase.compute_mydir(__file__)
@lldbmi_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@s... | 52.2423 | 334 | 0.577352 |
acfe14ad3c7f9e47eacc80d7f7c65c14a9d810d8 | 4,077 | py | Python | rubin_sim/maf/web/mafTracking.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | rubin_sim/maf/web/mafTracking.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | rubin_sim/maf/web/mafTracking.py | RileyWClarke/flarubin | eb7b1ee21c828523f8a5374fe4510fe6e5ec2a2a | [
"MIT"
] | null | null | null | from builtins import object
import os
from collections import OrderedDict
import numpy as np
import rubin_sim.maf.db as db
from .mafRunResults import MafRunResults
__all__ = ['MafTracking']
class MafTracking(object):
"""
Class to read MAF's tracking SQLite database (tracking a set of MAF runs)
and handle ... | 35.763158 | 98 | 0.595536 |
acfe14f4e909268a30eea0877bae104ba47ac3aa | 1,526 | py | Python | tests/utils/cgroup_tests.py | shareablee/apm-agent-python | 29f12ceb410b3c1a7f933b29dcecccf628dbbb6c | [
"BSD-3-Clause"
] | null | null | null | tests/utils/cgroup_tests.py | shareablee/apm-agent-python | 29f12ceb410b3c1a7f933b29dcecccf628dbbb6c | [
"BSD-3-Clause"
] | null | null | null | tests/utils/cgroup_tests.py | shareablee/apm-agent-python | 29f12ceb410b3c1a7f933b29dcecccf628dbbb6c | [
"BSD-3-Clause"
] | null | null | null | import mock
import pytest
from elasticapm.utils import cgroup, compat
@pytest.mark.parametrize(
"test_input,expected",
[
(
"12:devices:/docker/051e2ee0bce99116029a13df4a9e943137f19f957f38ac02d6bad96f9b700f76",
{"container": {"id": "051e2ee0bce99116029a13df4a9e943137f19f957f38a... | 40.157895 | 211 | 0.663172 |
acfe152ca87830bfb13de195af2b019b2b70d379 | 370 | py | Python | python-binance/unit10/03.py | sharebook-kr/learningspoons-bootcamp-finance | 0288f3f3b39f54420e4e9987f1de12892dc680ea | [
"MIT"
] | 9 | 2020-10-25T15:13:32.000Z | 2022-03-26T11:27:21.000Z | python-binance/unit10/03.py | sharebook-kr/learningspoons-bootcamp-finance | 0288f3f3b39f54420e4e9987f1de12892dc680ea | [
"MIT"
] | null | null | null | python-binance/unit10/03.py | sharebook-kr/learningspoons-bootcamp-finance | 0288f3f3b39f54420e4e9987f1de12892dc680ea | [
"MIT"
] | 7 | 2021-03-01T11:06:45.000Z | 2022-03-14T07:06:04.000Z | import ccxt
import pprint
with open("../api.txt") as f:
lines = f.readlines()
api_key = lines[0].strip()
secret = lines[1].strip()
binance = ccxt.binance(config={
'apiKey': api_key,
'secret': secret,
'enableRateLimit': True,
'options': {
'defaultType': 'future'
}
})
btc = b... | 19.473684 | 38 | 0.608108 |
acfe1565b38b39e0bca223feb621bcb7e6128a7c | 490 | py | Python | py/tests/testHouseRobber/test_HouseRobber.py | zcemycl/algoTest | 9518fb2b60fd83c85aeb2ab809ff647aaf643f0a | [
"MIT"
] | 1 | 2022-01-26T16:33:45.000Z | 2022-01-26T16:33:45.000Z | py/tests/testHouseRobber/test_HouseRobber.py | zcemycl/algoTest | 9518fb2b60fd83c85aeb2ab809ff647aaf643f0a | [
"MIT"
] | null | null | null | py/tests/testHouseRobber/test_HouseRobber.py | zcemycl/algoTest | 9518fb2b60fd83c85aeb2ab809ff647aaf643f0a | [
"MIT"
] | 1 | 2022-01-26T16:35:44.000Z | 2022-01-26T16:35:44.000Z | import unittest
from parameterized import parameterized as p
from solns.houseRobber.houseRobber import *
class UnitTest_HouseRobber(unittest.TestCase):
@p.expand([
[[1,2,3,1],4],[[2,7,9,3,1],12],[[1,2],2]
])
def test_naive(self,nums,expected):
self.assertEqual(Solution.naive(nums), expected... | 32.666667 | 57 | 0.638776 |
acfe1586681dcde2695f27a98cfef945220c0742 | 3,278 | py | Python | test/test_TCCNet.py | EmbeddedML-EDAGroup/PIT | 02897f6977b481d3072e9aa915aec0fe43faeb02 | [
"Apache-2.0"
] | 2 | 2021-12-18T21:04:29.000Z | 2022-01-04T14:14:27.000Z | test/test_TCCNet.py | EmbeddedML-EDAGroup/PIT | 02897f6977b481d3072e9aa915aec0fe43faeb02 | [
"Apache-2.0"
] | null | null | null | test/test_TCCNet.py | EmbeddedML-EDAGroup/PIT | 02897f6977b481d3072e9aa915aec0fe43faeb02 | [
"Apache-2.0"
] | null | null | null | #*----------------------------------------------------------------------------*
#* Copyright (C) 2021 Politecnico di Torino, Italy *
#* SPDX-License-Identifier: Apache-2.0 *
#* *
... | 48.925373 | 100 | 0.480476 |
acfe15c1121082f8c69cce3b3f09607f77297a92 | 12,901 | py | Python | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/customer_extension_setting_service/transports/grpc.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/customer_extension_setting_service/transports/grpc.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/customer_extension_setting_service/transports/grpc.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 46.574007 | 125 | 0.644679 |
acfe160a9ac125caa8a5eff1a96c40381886cfdd | 819 | py | Python | benchmarks.py | HumanCompatibleAI/population-irl | c0881829adb750a9e43e90ce632851eed3e3a5e5 | [
"MIT"
] | 18 | 2018-07-26T05:36:24.000Z | 2022-02-25T11:45:31.000Z | benchmarks.py | HumanCompatibleAI/population-irl | c0881829adb750a9e43e90ce632851eed3e3a5e5 | [
"MIT"
] | 9 | 2018-04-22T22:05:22.000Z | 2022-01-17T02:39:35.000Z | benchmarks.py | HumanCompatibleAI/population-irl | c0881829adb750a9e43e90ce632851eed3e3a5e5 | [
"MIT"
] | 2 | 2019-04-20T01:09:41.000Z | 2020-04-01T09:39:04.000Z | from contextlib import contextmanager
from joblib import Memory
import hermes.backend.redis
import time
import numpy as np
jcache = Memory('/tmp/foo-cache').cache
hcache = hermes.Hermes(hermes.backend.redis.Backend, ttl=None, port='6380', db=0)
@jcache
def f(n):
return np.random.randn(n, n)
@hcache
def g(n):
... | 18.2 | 81 | 0.6337 |
acfe16b3d0d0c29b4d62b804d53bd839c871bbaa | 334 | py | Python | 1221. Split a String in Balanced Strings.py | sonalsrivas/Leetcode-Solutions-Oct2020 | 32ae8fba6aaf3e6ce47f7b3de13907f4d30a92ab | [
"MIT"
] | null | null | null | 1221. Split a String in Balanced Strings.py | sonalsrivas/Leetcode-Solutions-Oct2020 | 32ae8fba6aaf3e6ce47f7b3de13907f4d30a92ab | [
"MIT"
] | null | null | null | 1221. Split a String in Balanced Strings.py | sonalsrivas/Leetcode-Solutions-Oct2020 | 32ae8fba6aaf3e6ce47f7b3de13907f4d30a92ab | [
"MIT"
] | null | null | null | class Solution:
def balancedStringSplit(self, s: str) -> int:
# Using Greedy Approach
R=0; L=0
sol=0
for i in s:
if i=='L':
L+=1
else:
R+=1
if L==R:
sol+=1
L=0; R=0
... | 22.266667 | 50 | 0.338323 |
acfe16bca499ca8386ca3ad5dac423b7ceccb8f8 | 3,966 | py | Python | kolibri/core/content/management/commands/exportcontent.py | techZM/kolibri | 617e4c382e446b16a968e8add7f1766f8cd7c54a | [
"MIT"
] | null | null | null | kolibri/core/content/management/commands/exportcontent.py | techZM/kolibri | 617e4c382e446b16a968e8add7f1766f8cd7c54a | [
"MIT"
] | null | null | null | kolibri/core/content/management/commands/exportcontent.py | techZM/kolibri | 617e4c382e446b16a968e8add7f1766f8cd7c54a | [
"MIT"
] | 1 | 2021-07-26T11:38:29.000Z | 2021-07-26T11:38:29.000Z | import logging
import os
from ...utils import import_export_content
from ...utils import paths
from ...utils import transfer
from kolibri.core.content.errors import InvalidStorageFilenameError
from kolibri.core.tasks.management.commands.base import AsyncCommand
logger = logging.getLogger(__name__)
class Command(Asy... | 36.385321 | 109 | 0.577156 |
acfe1718fc564218c658dc2e635a252ef7bbd619 | 4,604 | py | Python | electrumx/lib/server_base.py | cyppper/electrumx-wayf | 376e545ddc36635a99f4c6db6e427efa02993e2f | [
"MIT"
] | null | null | null | electrumx/lib/server_base.py | cyppper/electrumx-wayf | 376e545ddc36635a99f4c6db6e427efa02993e2f | [
"MIT"
] | null | null | null | electrumx/lib/server_base.py | cyppper/electrumx-wayf | 376e545ddc36635a99f4c6db6e427efa02993e2f | [
"MIT"
] | 1 | 2021-12-14T16:29:01.000Z | 2021-12-14T16:29:01.000Z | # Copyright (c) 2017, Neil Booth
#
# All rights reserved.
#
# See the file "LICENCE" for information about the copyright
# and warranty status of this software.
'''Base class of servers'''
import asyncio
import os
import platform
import re
import signal
import sys
import time
from contextlib import suppress
from func... | 34.878788 | 83 | 0.624674 |
acfe1747e5b1d4a06ef0d4a731a54864d5ccd72f | 3,498 | py | Python | fastestimator/op/tensorop/meta/fuse.py | Phillistan16/fastestimator | 54c9254098aee89520814ed54b6e6016b821424f | [
"Apache-2.0"
] | null | null | null | fastestimator/op/tensorop/meta/fuse.py | Phillistan16/fastestimator | 54c9254098aee89520814ed54b6e6016b821424f | [
"Apache-2.0"
] | null | null | null | fastestimator/op/tensorop/meta/fuse.py | Phillistan16/fastestimator | 54c9254098aee89520814ed54b6e6016b821424f | [
"Apache-2.0"
] | 1 | 2020-04-28T12:16:10.000Z | 2020-04-28T12:16:10.000Z | # Copyright 2019 The FastEstimator 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 appl... | 40.674419 | 120 | 0.641795 |
acfe182f820564d5789e2bba482a4d054167270d | 24,157 | py | Python | tests/sagemaker/mock/test_sagemaker_service_mock.py | brucebcampbell/mlflow | 9aca8e27198f16ce4fa1e7a0a502554f2f81068b | [
"Apache-2.0"
] | 10,351 | 2018-07-31T02:52:49.000Z | 2022-03-31T23:33:13.000Z | tests/sagemaker/mock/test_sagemaker_service_mock.py | brucebcampbell/mlflow | 9aca8e27198f16ce4fa1e7a0a502554f2f81068b | [
"Apache-2.0"
] | 3,733 | 2018-07-31T01:38:51.000Z | 2022-03-31T23:56:25.000Z | tests/sagemaker/mock/test_sagemaker_service_mock.py | brucebcampbell/mlflow | 9aca8e27198f16ce4fa1e7a0a502554f2f81068b | [
"Apache-2.0"
] | 2,596 | 2018-07-31T06:38:39.000Z | 2022-03-31T23:56:32.000Z | import boto3
import pytest
from tests.helper_functions import set_boto_credentials # pylint: disable=unused-import
from tests.sagemaker.mock import mock_sagemaker
@pytest.fixture
def sagemaker_client():
return boto3.client("sagemaker", region_name="us-west-2")
def create_sagemaker_model(sagemaker_client, mode... | 36.109118 | 99 | 0.754729 |
acfe186166ae756c23073434c5dc7207b0905a2a | 7,815 | py | Python | examples/dockpot/hpfeeds/hpfeeds.py | connectthefuture/docker-hacks | d7ea13522188233d5e8a97179d2b0a872239f58d | [
"MIT"
] | null | null | null | examples/dockpot/hpfeeds/hpfeeds.py | connectthefuture/docker-hacks | d7ea13522188233d5e8a97179d2b0a872239f58d | [
"MIT"
] | 1 | 2021-03-20T04:49:20.000Z | 2021-03-20T04:49:20.000Z | examples/dockpot/hpfeeds/hpfeeds.py | connectthefuture/docker-hacks | d7ea13522188233d5e8a97179d2b0a872239f58d | [
"MIT"
] | null | null | null | from twisted.python import log
from twisted.internet import threads
import os
import struct
import hashlib
import json
import socket
import uuid
import datetime
BUFSIZ = 16384
OP_ERROR = 0
OP_INFO = 1
OP_AUTH = 2
OP_PUBLISH = 3
OP_SUBSCRIBE = 4
MAXBUF = 1024**2
SIZES = {
OP_ERROR: 5+... | 31.135458 | 145 | 0.656174 |
acfe1892bec2764dc6fc618080257041386e1545 | 13,734 | py | Python | signbank/registration/forms.py | codev/bslsignbank | 5c8f48c4aa14f48483b38f922f4bc4a4d4eda33e | [
"BSD-3-Clause"
] | 4 | 2018-01-27T17:28:59.000Z | 2019-11-06T17:59:33.000Z | signbank/registration/forms.py | codev/bslsignbank | 5c8f48c4aa14f48483b38f922f4bc4a4d4eda33e | [
"BSD-3-Clause"
] | 2 | 2020-02-12T00:09:31.000Z | 2020-06-05T17:51:51.000Z | signbank/registration/forms.py | codev/bslsignbank | 5c8f48c4aa14f48483b38f922f4bc4a4d4eda33e | [
"BSD-3-Clause"
] | null | null | null | """
Forms and validation code for user registration.
"""
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from django.conf import settings
from models import RegistrationProfile, UserProfile
import re
alnum_re = re.compile(r'^\w+$')
# I ... | 41.36747 | 357 | 0.612567 |
acfe1a62d91c8939cc602b13dfc188765a31c4ff | 11,234 | py | Python | futu/quote/quote_response_handler.py | zhuzhenping/py-futu-api | 540cf951738e387fd001064a76ceef6284c75d41 | [
"Apache-2.0"
] | 1 | 2021-01-10T00:54:39.000Z | 2021-01-10T00:54:39.000Z | futu/quote/quote_response_handler.py | GOGOYAO/py-futu-api | 540cf951738e387fd001064a76ceef6284c75d41 | [
"Apache-2.0"
] | null | null | null | futu/quote/quote_response_handler.py | GOGOYAO/py-futu-api | 540cf951738e387fd001064a76ceef6284c75d41 | [
"Apache-2.0"
] | 1 | 2021-02-17T17:46:36.000Z | 2021-02-17T17:46:36.000Z | # -*- coding: utf-8 -*-
import pandas as pd
from futu.common import RspHandlerBase
from futu.quote.quote_query import *
class StockQuoteHandlerBase(RspHandlerBase):
"""
异步处理推送的订阅股票的报价。
.. code:: python
class StockQuoteTest(StockQuoteHandlerBase):
def on_recv_rsp(self, rsp_str):
... | 30.610354 | 121 | 0.591953 |
acfe1ac011231b65faec0b61444184297866b0e1 | 848 | py | Python | mysite/blog/migrations/0007_auto_20190520_1318.py | Kiraeraser/My_Blog | 0e47fd2bf72ccfea12a0220ef780779543c33f03 | [
"MIT"
] | null | null | null | mysite/blog/migrations/0007_auto_20190520_1318.py | Kiraeraser/My_Blog | 0e47fd2bf72ccfea12a0220ef780779543c33f03 | [
"MIT"
] | null | null | null | mysite/blog/migrations/0007_auto_20190520_1318.py | Kiraeraser/My_Blog | 0e47fd2bf72ccfea12a0220ef780779543c33f03 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.1 on 2019-05-20 07:48
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('blog', '0006_blogpost_user'),
]
operations = [
migrations.AddField(
model_name='blogp... | 27.354839 | 94 | 0.571934 |
acfe1bfa5eaf00a4ef0a10bfaf8cd68cd79cb9e9 | 6,695 | bzl | Python | build/container.bzl | vass-engineering/cert-manager | 7fbdd6487646e812fe74c0c05503805b5d9d4751 | [
"Apache-2.0"
] | null | null | null | build/container.bzl | vass-engineering/cert-manager | 7fbdd6487646e812fe74c0c05503805b5d9d4751 | [
"Apache-2.0"
] | null | null | null | build/container.bzl | vass-engineering/cert-manager | 7fbdd6487646e812fe74c0c05503805b5d9d4751 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The Jetstack cert-manager 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
#
# Unless required by applicable l... | 37.61236 | 111 | 0.634205 |
acfe1cd211f19de8f5215bacb7a2f174c4d3c686 | 995 | py | Python | test/test_host.py | jlk/qualys-cs-python-client | e2e39fd64d41fd6671d45343843ef36fa3ab59a4 | [
"Apache-2.0"
] | null | null | null | test/test_host.py | jlk/qualys-cs-python-client | e2e39fd64d41fd6671d45343843ef36fa3ab59a4 | [
"Apache-2.0"
] | null | null | null | test/test_host.py | jlk/qualys-cs-python-client | e2e39fd64d41fd6671d45343843ef36fa3ab59a4 | [
"Apache-2.0"
] | 1 | 2020-05-15T04:20:48.000Z | 2020-05-15T04:20:48.000Z | # coding: utf-8
"""
Container Security APIs
All features of the Container Security are available through REST APIs.<br/>Access support information at www.qualys.com/support/<br/><br/><b>Permissions:</b><br/>User must have the Container module enabled<br/>User must have API ACCESS permission # noqa: E501
... | 24.875 | 265 | 0.697487 |
acfe1cfbce688f3925797a8217f487b78cc7fc30 | 6,101 | py | Python | nuplan/planning/metrics/evaluation_metrics/common/ego_safety_performance.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 128 | 2021-12-06T15:41:14.000Z | 2022-03-29T13:16:32.000Z | nuplan/planning/metrics/evaluation_metrics/common/ego_safety_performance.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 28 | 2021-12-11T08:11:31.000Z | 2022-03-25T02:35:43.000Z | nuplan/planning/metrics/evaluation_metrics/common/ego_safety_performance.py | motional/nuplan-devkit | e39029e788b17f47f2fcadb774098ef8fbdd0d67 | [
"Apache-2.0"
] | 14 | 2021-12-11T04:12:26.000Z | 2022-03-24T06:38:30.000Z | from typing import Dict, List, Optional
from nuplan.planning.metrics.evaluation_metrics.base.metric_base import MetricBase
from nuplan.planning.metrics.evaluation_metrics.common.drivable_area_violation import DrivableAreaViolationStatistics
from nuplan.planning.metrics.evaluation_metrics.common.ego_at_fault_collisions... | 47.294574 | 118 | 0.726602 |
acfe1db0fcf76b7589f61cd623217e422adc45ed | 2,512 | py | Python | numba/tests/test_remove_dead.py | ehsantn/numba | 4749ef7ccc630b7f649ec972497bc5b7fca79303 | [
"BSD-2-Clause",
"MIT"
] | 1 | 2021-08-14T13:48:12.000Z | 2021-08-14T13:48:12.000Z | numba/tests/test_remove_dead.py | ehsantn/numba | 4749ef7ccc630b7f649ec972497bc5b7fca79303 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | numba/tests/test_remove_dead.py | ehsantn/numba | 4749ef7ccc630b7f649ec972497bc5b7fca79303 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | #
# Copyright (c) 2017 Intel Corporation
# SPDX-License-Identifier: BSD-2-Clause
#
from numba import compiler, typing
from numba.targets import cpu
from numba import types
from numba.targets.registry import cpu_target
from numba import config
from numba.annotations import type_annotations
from numba.ir_utils import co... | 34.410959 | 129 | 0.631369 |
acfe1e308bea257178661cadf8068ca29ab1bb30 | 5,444 | py | Python | Question_41_50/answers/answer_44.py | OverHall27/Gasyori100knock | 341c528eb4c0789034898ee1f7d0a4b2f8b23eff | [
"MIT"
] | 1 | 2019-09-02T11:02:44.000Z | 2019-09-02T11:02:44.000Z | Question_41_50/answers/answer_44.py | OverHall27/Gasyori100knock | 341c528eb4c0789034898ee1f7d0a4b2f8b23eff | [
"MIT"
] | 7 | 2020-08-31T18:15:30.000Z | 2021-06-25T15:42:29.000Z | Question_41_50/answers/answer_44.py | OverHall27/Gasyori100knock | 341c528eb4c0789034898ee1f7d0a4b2f8b23eff | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import matplotlib.pyplot as plt
def Canny(img):
# Gray scale
def BGR2GRAY(img):
b = img[:, :, 0].copy()
g = img[:, :, 1].copy()
r = img[:, :, 2].copy()
# Gray scale
out = 0.2126 * r + 0.7152 * g + 0.0722 * b
out = out.astype(np.uint8)
return out
# Gaussian filter for... | 22.220408 | 89 | 0.555474 |
acfe1edac0cb4e117407d423c9cb7b9a86addff6 | 2,997 | py | Python | payloader.py | pyrat3/nyan-payload | b1e6ee3b8a421864dd4b3fc695874dad403c4675 | [
"MIT"
] | 2 | 2021-02-11T02:59:47.000Z | 2021-02-20T09:36:36.000Z | payloader.py | pyrat3/nyan-payload | b1e6ee3b8a421864dd4b3fc695874dad403c4675 | [
"MIT"
] | null | null | null | payloader.py | pyrat3/nyan-payload | b1e6ee3b8a421864dd4b3fc695874dad403c4675 | [
"MIT"
] | 2 | 2021-03-24T02:06:19.000Z | 2021-04-06T07:33:57.000Z | import base64
import inspect
import os
import stager
class Payloader:
def __init__(self, nyan_cat_folder="nyan-cat-code", add_exec_wrapper=True, add_python_bash_wrapper=True,
write_to_file=True, payload_file_name="python_nyan_cat_payload.txt"):
self.nyan_cat_folder = nyan_cat_folder
... | 36.54878 | 108 | 0.674675 |
acfe1efda29ae03097b9abc03fef93594190a70f | 9,253 | py | Python | solo/methods/simsiam.py | pantheon5100/simsimpp | 147d5cdaa986d1da1608efb6cf663826bfd57053 | [
"MIT"
] | 3 | 2021-08-23T12:47:50.000Z | 2022-01-16T02:06:34.000Z | solo/methods/simsiam.py | pantheon5100/simsimpp | 147d5cdaa986d1da1608efb6cf663826bfd57053 | [
"MIT"
] | null | null | null | solo/methods/simsiam.py | pantheon5100/simsimpp | 147d5cdaa986d1da1608efb6cf663826bfd57053 | [
"MIT"
] | null | null | null | import argparse
from typing import Any, Dict, List, Sequence
import torch
import torch.nn as nn
import torch.nn.functional as F
from solo.losses.simsiam import simsiam_loss_func
from solo.methods.base import BaseModel
from solo.losses.vicreg import covariance_loss
def value_constrain(x, type=None):
if type == "s... | 36.573123 | 142 | 0.596779 |
acfe21012e83c9ede1d90e01718b177313a43182 | 13,370 | py | Python | chemdataextractor_batteries/chemdataextractor/doc/table.py | MB9991/test_demo- | ca3df4ecf20f7a26a621f68caf668f2e726a737d | [
"MIT"
] | 199 | 2016-10-07T06:55:23.000Z | 2022-03-29T09:50:03.000Z | chemdataextractor/doc/table.py | qingtong00/ChemDataExtractor | 349a3bea965f2073141d62043b89319222e46af1 | [
"MIT"
] | 29 | 2016-10-04T08:56:05.000Z | 2022-03-06T19:36:55.000Z | chemdataextractor/doc/table.py | qingtong00/ChemDataExtractor | 349a3bea965f2073141d62043b89319222e46af1 | [
"MIT"
] | 95 | 2016-10-10T14:24:27.000Z | 2022-03-16T18:30:00.000Z | # -*- coding: utf-8 -*-
"""
chemdataextractor.doc.table
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Table document elements.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from collections import defaultdict
fro... | 50.836502 | 169 | 0.599402 |
acfe212df01b352350e2422679b6e0679de7a04f | 4,017 | py | Python | test/programytest/parser/pattern/nodes_tests/test_iset.py | whackur/chatbot | bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7 | [
"MIT"
] | 2 | 2018-06-16T09:32:22.000Z | 2019-07-21T13:16:00.000Z | test/programytest/parser/pattern/nodes_tests/test_iset.py | whackur/chatbot | bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7 | [
"MIT"
] | 3 | 2020-07-16T04:00:42.000Z | 2021-03-31T18:52:22.000Z | test/programytest/parser/pattern/nodes_tests/test_iset.py | whackur/chatbot | bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7 | [
"MIT"
] | 4 | 2018-06-29T23:50:44.000Z | 2020-11-05T08:13:47.000Z | from programytest.parser.base import ParserTestsBaseClass
from programy.parser.pattern.nodes.iset import PatternISetNode
from programy.dialog.dialog import Sentence
from programy.parser.exceptions import ParserException
class PatternSetNodeTests(ParserTestsBaseClass):
def test_init_with_text(self):
node ... | 41.412371 | 118 | 0.665671 |
acfe217226f8a1c787404aa7352a5ec6cd100e03 | 5,798 | py | Python | tests/io/test_memory_data_set.py | yhzqb/kedro | 619d7f0ccb51895d3bb43d30e3dee9d4d0cebcab | [
"Apache-2.0"
] | 1 | 2021-08-24T14:23:18.000Z | 2021-08-24T14:23:18.000Z | tests/io/test_memory_data_set.py | yhzqb/kedro | 619d7f0ccb51895d3bb43d30e3dee9d4d0cebcab | [
"Apache-2.0"
] | null | null | null | tests/io/test_memory_data_set.py | yhzqb/kedro | 619d7f0ccb51895d3bb43d30e3dee9d4d0cebcab | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2019 QuantumBlack Visual Analytics Limited
#
# 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
#
# THE SOFTWARE IS PROVIDED "AS IS"... | 37.166667 | 85 | 0.697482 |
acfe21775b10bae82db509de40df1053a975586b | 6,124 | py | Python | pytorch_toolkit/face_recognition/evaluate_landmarks.py | JinYAnGHe/openvino_training_extensions | a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee | [
"Apache-2.0"
] | null | null | null | pytorch_toolkit/face_recognition/evaluate_landmarks.py | JinYAnGHe/openvino_training_extensions | a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee | [
"Apache-2.0"
] | null | null | null | pytorch_toolkit/face_recognition/evaluate_landmarks.py | JinYAnGHe/openvino_training_extensions | a0b4456a3c9fe6c1b7eabc9d5eb4e74d01453dee | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2018 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... | 41.100671 | 122 | 0.687786 |
acfe220b48f3bfc8886094ad0f50f4bf7cf2bf6e | 24,964 | py | Python | ema_workbench/analysis/plotting_util.py | sid-marain/EMAworkbench | 49b6d963170fbd15b0fb5adba773b5cc3d86b5b6 | [
"BSD-3-Clause"
] | null | null | null | ema_workbench/analysis/plotting_util.py | sid-marain/EMAworkbench | 49b6d963170fbd15b0fb5adba773b5cc3d86b5b6 | [
"BSD-3-Clause"
] | null | null | null | ema_workbench/analysis/plotting_util.py | sid-marain/EMAworkbench | 49b6d963170fbd15b0fb5adba773b5cc3d86b5b6 | [
"BSD-3-Clause"
] | 1 | 2020-02-18T23:11:14.000Z | 2020-02-18T23:11:14.000Z | '''
Plotting utility functions
'''
from __future__ import (absolute_import, print_function, division,
unicode_literals)
import copy
import matplotlib as mpl
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats.kde as kde
import seaborn ... | 29.473436 | 98 | 0.562851 |
acfe22a396fc75af8f7bc847917ebbb3d5246d06 | 13,551 | py | Python | Lib/test/test_userdict.py | jimmyyu2004/jython | 5b4dc2d54d01a6fda8c55d07b2608167e7a40769 | [
"CNRI-Jython"
] | 332 | 2015-08-22T12:43:56.000Z | 2022-03-17T01:05:43.000Z | Lib/test/test_userdict.py | Pandinosaurus/jython3 | def4f8ec47cb7a9c799ea4c745f12badf92c5769 | [
"CNRI-Jython"
] | 36 | 2015-05-30T08:39:19.000Z | 2022-03-04T20:42:33.000Z | Lib/test/test_userdict.py | Pandinosaurus/jython3 | def4f8ec47cb7a9c799ea4c745f12badf92c5769 | [
"CNRI-Jython"
] | 74 | 2015-05-29T17:18:53.000Z | 2022-01-15T14:06:44.000Z | # Check every path through every method of UserDict
import test.support, unittest
from sets import Set
import UserDict
class TestMappingProtocol(unittest.TestCase):
# This base class can be used to check that an object conforms to the
# mapping protocol
# Functions that can be useful to override to adap... | 32.41866 | 94 | 0.569404 |
acfe22ebd520349224b38b91fecd5c843d71eaa5 | 1,457 | py | Python | pytorchtrain.py | sebftw/PyTorch | b42bb7987020ed5b7c095ee1bd18ebbcc63e9e8a | [
"MIT"
] | null | null | null | pytorchtrain.py | sebftw/PyTorch | b42bb7987020ed5b7c095ee1bd18ebbcc63e9e8a | [
"MIT"
] | null | null | null | pytorchtrain.py | sebftw/PyTorch | b42bb7987020ed5b7c095ee1bd18ebbcc63e9e8a | [
"MIT"
] | null | null | null | import torch, torchvision
import torch.nn as nn
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
import numpy as np
import torch.optim as optim
transform = transforms.ToTensor()
trainset = torchvision.datasets.MNIST('mnist', download = True, transform=transform)
trainloader = torch.utils.da... | 24.694915 | 98 | 0.697323 |
acfe23a6427f152c5d8d1f977998c5bf2809c508 | 2,425 | py | Python | profiles_api/models.py | maze76/profiles-rest-api | 684829ca064873bd5318a85717bd641c735683b5 | [
"MIT"
] | null | null | null | profiles_api/models.py | maze76/profiles-rest-api | 684829ca064873bd5318a85717bd641c735683b5 | [
"MIT"
] | null | null | null | profiles_api/models.py | maze76/profiles-rest-api | 684829ca064873bd5318a85717bd641c735683b5 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
from django.conf import settings
class UserProfileManager(BaseUserManager):
"""Manager for user profiles"""
def c... | 33.219178 | 128 | 0.696495 |
acfe241d4612118c944c1e45a2eabae8b20389d7 | 1,812 | py | Python | moltres/power_mesh.py | khurrumsaleem/msr-nts-benchmark | d742ce84fc8ef2730f55d27b55104e7ea696d23f | [
"CC0-1.0"
] | null | null | null | moltres/power_mesh.py | khurrumsaleem/msr-nts-benchmark | d742ce84fc8ef2730f55d27b55104e7ea696d23f | [
"CC0-1.0"
] | null | null | null | moltres/power_mesh.py | khurrumsaleem/msr-nts-benchmark | d742ce84fc8ef2730f55d27b55104e7ea696d23f | [
"CC0-1.0"
] | 1 | 2021-11-09T10:42:06.000Z | 2021-11-09T10:42:06.000Z | with open("power_mesh.i", "w") as f:
f.write("[Mesh]\n")
f.write(" [./file_mesh]\n")
f.write(" type = FileMeshGenerator\n")
f.write(" file = full_mesh.e\n")
f.write(" []\n")
input = "file_mesh"
blk_id = 3
for i in range(1,9):
for j in range(1,9):
if j < i:
... | 35.529412 | 71 | 0.419426 |
acfe2656352c61dc20b2932c55d282ebd779659c | 74 | py | Python | .history/py/UserInput_20201230123600.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | .history/py/UserInput_20201230123600.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | .history/py/UserInput_20201230123600.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | person = input("Enter your name: ")
print("Hello ", person)
richnesscarl
| 14.8 | 35 | 0.702703 |
acfe26573e2ec597c7c9d38533b84cc311d48622 | 25,553 | py | Python | docxcompose/composer.py | antonio-quarta/docxcompose | 042e15d24d456d51092e55155a1381c0f1021a69 | [
"MIT"
] | null | null | null | docxcompose/composer.py | antonio-quarta/docxcompose | 042e15d24d456d51092e55155a1381c0f1021a69 | [
"MIT"
] | null | null | null | docxcompose/composer.py | antonio-quarta/docxcompose | 042e15d24d456d51092e55155a1381c0f1021a69 | [
"MIT"
] | null | null | null | from collections import OrderedDict
from copy import deepcopy
from docx.opc.constants import CONTENT_TYPE as CT
from docx.opc.constants import RELATIONSHIP_TYPE as RT
from docx.opc.oxml import serialize_part_xml
from docx.opc.packuri import PackURI
from docx.opc.part import Part
from docx.oxml import parse_xml
from doc... | 40.624801 | 102 | 0.584628 |
acfe28bc0525b439dce26134f5db9a693351fdeb | 11,369 | py | Python | benchmarks/mceditlib/time_relight_manmade.py | elcarrion06/mcedit2 | 4bb98da521447b6cf43d923cea9f00acf2f427e9 | [
"BSD-3-Clause"
] | 673 | 2015-01-02T02:08:13.000Z | 2022-03-24T19:38:14.000Z | benchmarks/mceditlib/time_relight_manmade.py | ozzhates/mcedit2 | 4bb98da521447b6cf43d923cea9f00acf2f427e9 | [
"BSD-3-Clause"
] | 526 | 2015-01-01T02:10:53.000Z | 2022-02-06T16:24:21.000Z | benchmarks/mceditlib/time_relight_manmade.py | ozzhates/mcedit2 | 4bb98da521447b6cf43d923cea9f00acf2f427e9 | [
"BSD-3-Clause"
] | 231 | 2015-01-01T16:47:30.000Z | 2022-03-31T21:51:55.000Z |
import numpy
import sys
import time
from benchmarks import bench_temp_level
from mceditlib.selection import BoundingBox
from mceditlib.worldeditor import WorldEditor
from mceditlib import relight
def do_copy(dim, station, relight):
times = 1
boxes = []
for x in range(times):
for z in range(time... | 42.901887 | 145 | 0.647814 |
acfe298332f1340b7bf9aa2e8a743742181cd5be | 17,096 | py | Python | paddlenlp/transformers/skep/tokenizer.py | haohongxiang/PaddleNLP | c862e9c3a4d49caf00f4de81bdfae36aba9b636e | [
"Apache-2.0"
] | 1 | 2021-10-14T05:35:00.000Z | 2021-10-14T05:35:00.000Z | paddlenlp/transformers/skep/tokenizer.py | haohongxiang/PaddleNLP | c862e9c3a4d49caf00f4de81bdfae36aba9b636e | [
"Apache-2.0"
] | null | null | null | paddlenlp/transformers/skep/tokenizer.py | haohongxiang/PaddleNLP | c862e9c3a4d49caf00f4de81bdfae36aba9b636e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
# Copyright 2018 The Google AI Language Team Authors and 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... | 36.765591 | 121 | 0.573117 |
acfe298b41bb34f45c7c31913bea74fc33ae90d5 | 5,600 | py | Python | Assignment 2/Code/main.py | Palak-Dhanadia/Artificial-Intelligence | a6acf9c2bccab3f6b0ce71b485b8b9d1e575e2ed | [
"MIT"
] | null | null | null | Assignment 2/Code/main.py | Palak-Dhanadia/Artificial-Intelligence | a6acf9c2bccab3f6b0ce71b485b8b9d1e575e2ed | [
"MIT"
] | null | null | null | Assignment 2/Code/main.py | Palak-Dhanadia/Artificial-Intelligence | a6acf9c2bccab3f6b0ce71b485b8b9d1e575e2ed | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.autograd import Variable
import torch.optim as optim
import torchvision
import torchvision.transforms as transforms
import torchvision.datasets as dsets
import torch.nn.functional as F
import matplotlib.pyplot as plt
train_set = torchvision.datasets.FashionMNIST(... | 35.897436 | 94 | 0.631786 |
acfe29e1035c3997f2a2ae8a465d19b99c5497d9 | 177 | py | Python | problem0233.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0233.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0233.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | ###########################
#
# #233 Lattice points on a circle - Project Euler
# https://projecteuler.net/problem=233
#
# Code by Kevin Marciniak
#
###########################
| 19.666667 | 49 | 0.491525 |
acfe2ac94af4287c9eea02da6e36771b0e7aa4cc | 3,128 | py | Python | sc2/common/utils.py | srsohn/msgi | e665861f2d08f41b7dad16588447203e5010145a | [
"MIT"
] | 10 | 2020-04-14T01:56:43.000Z | 2022-03-25T12:55:30.000Z | sc2/common/utils.py | srsohn/msgi | e665861f2d08f41b7dad16588447203e5010145a | [
"MIT"
] | null | null | null | sc2/common/utils.py | srsohn/msgi | e665861f2d08f41b7dad16588447203e5010145a | [
"MIT"
] | 1 | 2020-11-02T18:07:59.000Z | 2020-11-02T18:07:59.000Z | import torch
import numpy as np
class dotdict(dict):
"""dot.notation access to dictionary attributes"""
__getattr__ = dict.get
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
def _sample_int_layer_wise(nbatch, high, low):
assert(high.dim()==1 and low.dim()==1)
ndim = len(high)
... | 34 | 131 | 0.61445 |
acfe2be19e644b99973038225182474c17a7594c | 14,197 | py | Python | lasagne/networks/lenet.py | kzhai/Lasagne | 67b0cd4ea4920f0339892e979b62413605e9fb71 | [
"MIT"
] | null | null | null | lasagne/networks/lenet.py | kzhai/Lasagne | 67b0cd4ea4920f0339892e979b62413605e9fb71 | [
"MIT"
] | null | null | null | lasagne/networks/lenet.py | kzhai/Lasagne | 67b0cd4ea4920f0339892e979b62413605e9fb71 | [
"MIT"
] | null | null | null | import logging
import numpy
from lasagne import Xinit
from lasagne import init
from lasagne import layers
logger = logging.getLogger(__name__)
__all__ = [
"LeNetFromSpecifications",
"LeNetFromPretrainedModel",
#
"AdaptiveLeNetFromSpecifications",
"AdaptiveLeNetFromPretrainedModel",
]
def LeNetFromSpecificati... | 49.295139 | 126 | 0.599775 |
acfe2c290cacc543b8927e74e725cb4c219469d2 | 13,473 | py | Python | jsonpickle/util.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | jsonpickle/util.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | jsonpickle/util.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2008 John Paulett (john -at- paulett.org)
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
"""Helper functions for pickling and unpickling. Most functions assist in
determinin... | 25.859885 | 92 | 0.634083 |
acfe2c63a73aa50afc31d572fed61d762d5c3c23 | 4,330 | py | Python | benchmark/startQiskit3288.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit3288.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit3288.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=44
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2
import numpy as np
import networkx as nx
def bitwise_... | 35.203252 | 140 | 0.652425 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.