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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79801ff0acf7a7fd1502d41653d93c5fa3df9f95 | 7,296 | py | Python | var/spack/repos/builtin/packages/py-scipy/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-04-03T07:23:12.000Z | 2021-04-03T07:23:12.000Z | var/spack/repos/builtin/packages/py-scipy/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 23 | 2021-01-25T15:13:45.000Z | 2022-03-28T20:19:04.000Z | var/spack/repos/builtin/packages/py-scipy/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-12-03T04:25:46.000Z | 2021-12-03T04:25:46.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import platform
class PyScipy(PythonPackage):
"""SciPy (pronounced "Sigh Pie") is a Scientific Library for Python.
... | 60.297521 | 140 | 0.694353 |
798020dc6895357445611b8cf2ac16d808626d5f | 1,953 | py | Python | contrib/devtools/check-doc.py | r0otChiXor/happymeals | 04189092641849b120a5ddb2cf913b54722fcbc1 | [
"MIT"
] | null | null | null | contrib/devtools/check-doc.py | r0otChiXor/happymeals | 04189092641849b120a5ddb2cf913b54722fcbc1 | [
"MIT"
] | null | null | null | contrib/devtools/check-doc.py | r0otChiXor/happymeals | 04189092641849b120a5ddb2cf913b54722fcbc1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Copyright (c) 2018 The Axiom developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
This checks if all command line args are documented.
Return ... | 42.456522 | 300 | 0.691756 |
798020ec508205604974f03cfdcee125e1fbf509 | 303 | py | Python | oo/account_saving.py | learning-foundation/python-oo-ds | 58c212da4562f65f99c8df24bff7667744ea552b | [
"MIT"
] | null | null | null | oo/account_saving.py | learning-foundation/python-oo-ds | 58c212da4562f65f99c8df24bff7667744ea552b | [
"MIT"
] | null | null | null | oo/account_saving.py | learning-foundation/python-oo-ds | 58c212da4562f65f99c8df24bff7667744ea552b | [
"MIT"
] | null | null | null | from account import Account
class AccountSaving(Account):
def __init__(self, number, customer, balance, limit=1000.0):
super().__init__(number, customer, balance, 'Saving', limit)
def update(self, tax):
self._balance += self._balance * tax * 3
return self._balance | 30.3 | 68 | 0.666667 |
798021995dba2df1bffb0cd63a35d9d5a46680fb | 407 | py | Python | banana/banana.py | aniket091/modmail-plugins-1 | 4360ff885f27e5c9488ea5cf9431aff20435209b | [
"MIT"
] | 8 | 2020-01-03T19:01:59.000Z | 2021-04-14T13:30:49.000Z | banana/banana.py | aniket091/modmail-plugins-1 | 4360ff885f27e5c9488ea5cf9431aff20435209b | [
"MIT"
] | 4 | 2020-12-22T12:51:03.000Z | 2022-01-05T20:17:00.000Z | banana/banana.py | aniket091/modmail-plugins-1 | 4360ff885f27e5c9488ea5cf9431aff20435209b | [
"MIT"
] | 27 | 2020-01-17T18:05:29.000Z | 2022-02-04T07:38:52.000Z | import discord
from discord.ext import commands
class Banana(commands.Cog):
"""Reacts with a banana emoji if someone says banana."""
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
async def on_message(self, message):
if 'BANANA' in message.content.upper():
... | 27.133333 | 60 | 0.663391 |
798021fe52a74c06e7526b2b71a48c548132332e | 51,315 | py | Python | numpyro/infer/autoguide.py | dirmeier/numpyro | d155669c36247bf0055105d036869eff09a9651f | [
"Apache-2.0"
] | null | null | null | numpyro/infer/autoguide.py | dirmeier/numpyro | d155669c36247bf0055105d036869eff09a9651f | [
"Apache-2.0"
] | null | null | null | numpyro/infer/autoguide.py | dirmeier/numpyro | d155669c36247bf0055105d036869eff09a9651f | [
"Apache-2.0"
] | null | null | null | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
# Adapted from pyro.infer.autoguide
from abc import ABC, abstractmethod
from contextlib import ExitStack
from functools import partial
import warnings
import numpy as np
import jax
from jax import grad, hessian, lax, random, tree_map... | 38.011111 | 113 | 0.612355 |
798022020d99ce0587bb6b96055a3a383d177f1c | 5,167 | py | Python | demo/migrations/0006_auto_20210312_2150.py | mfatgg/oscar-wagtail-demo | 6772999466c5175f3b611c1d05884aceb176d294 | [
"MIT"
] | null | null | null | demo/migrations/0006_auto_20210312_2150.py | mfatgg/oscar-wagtail-demo | 6772999466c5175f3b611c1d05884aceb176d294 | [
"MIT"
] | null | null | null | demo/migrations/0006_auto_20210312_2150.py | mfatgg/oscar-wagtail-demo | 6772999466c5175f3b611c1d05884aceb176d294 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.19 on 2021-03-12 21:50
import demo.blocks
import demo.models
from django.db import migrations, models
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.documents.blocks
import wagtail.images.blocks
class Migration(migrations.Migration):
dependencies = [
('off... | 83.33871 | 1,406 | 0.675247 |
798022274a3845030ed855d52ed0c397e848b2a9 | 65,123 | py | Python | tencentcloud/monitor/v20180724/monitor_client.py | HS-Gray/tencentcloud-sdk-python | b28b19c4beebc9f361aa3221afa36ad1ee047ccc | [
"Apache-2.0"
] | null | null | null | tencentcloud/monitor/v20180724/monitor_client.py | HS-Gray/tencentcloud-sdk-python | b28b19c4beebc9f361aa3221afa36ad1ee047ccc | [
"Apache-2.0"
] | null | null | null | tencentcloud/monitor/v20180724/monitor_client.py | HS-Gray/tencentcloud-sdk-python | b28b19c4beebc9f361aa3221afa36ad1ee047ccc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... | 42.342653 | 219 | 0.602045 |
798023559d92a6f622a393e55b5e6dd8da6c47d0 | 1,135 | py | Python | eppic_downloader.py | Nata8/INSPiRE_BC | e8b8c421fc4973844265afecc2c7b1252b776ea0 | [
"Apache-2.0"
] | null | null | null | eppic_downloader.py | Nata8/INSPiRE_BC | e8b8c421fc4973844265afecc2c7b1252b776ea0 | [
"Apache-2.0"
] | null | null | null | eppic_downloader.py | Nata8/INSPiRE_BC | e8b8c421fc4973844265afecc2c7b1252b776ea0 | [
"Apache-2.0"
] | null | null | null | import requests
import os
def get_assembly_id():
return input("Enter assembly id >>> ")
def get_ids():
ids_string = input("Enter destination directory to save assemblies >>> ")
return [protein_id.lower() for protein_id in ids_string.split()]
def get_download_dir():
while True:
path = inp... | 21.415094 | 132 | 0.622026 |
798023d288ed2b6807c1a1598dd76edee329779e | 4,511 | py | Python | lab1/mnist.py | yvr1037/hello-dian.ai | de932cc1546d14d8e3415d664aa7d0b0ce27a113 | [
"MIT"
] | null | null | null | lab1/mnist.py | yvr1037/hello-dian.ai | de932cc1546d14d8e3415d664aa7d0b0ce27a113 | [
"MIT"
] | null | null | null | lab1/mnist.py | yvr1037/hello-dian.ai | de932cc1546d14d8e3415d664aa7d0b0ce27a113 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot as plt
from tqdm import tqdm
from nn.modules import Linear,BatchNorm1d,Conv2d,MaxPool
from nn.functional import ReLU,Sigmoid
# from typing import OrderedDict
import nn
import nn.functional as F
n_features = 28 * 28
n_classes = 10
n_epochs = 10
bs = 1000
lr = 1e-3
leng... | 33.169118 | 121 | 0.571049 |
7980256b8d4c61bc0833313aaabcd630eccc7faa | 1,108 | py | Python | Coral-Dev/python-tflite-source/edgetpu/utils/image_processing.py | alexandergg/Coral-Edge-TPU | 7d56ec9a611035632cc877f49404eabc8ff73304 | [
"MIT"
] | null | null | null | Coral-Dev/python-tflite-source/edgetpu/utils/image_processing.py | alexandergg/Coral-Edge-TPU | 7d56ec9a611035632cc877f49404eabc8ff73304 | [
"MIT"
] | null | null | null | Coral-Dev/python-tflite-source/edgetpu/utils/image_processing.py | alexandergg/Coral-Edge-TPU | 7d56ec9a611035632cc877f49404eabc8ff73304 | [
"MIT"
] | null | null | null | """Utils for image pre-processing before inference."""
from PIL import ImageOps
def ResamplingWithOriginalRatio(img, required_size, sample):
"""Resamples the image with original ratio.
Args:
img: PIL image object.
required_size: (width, height), required image size.
sample: Resampling filter on image... | 31.657143 | 76 | 0.694946 |
79802588365bc6958b47aba66e3011b4260f445d | 3,046 | py | Python | klayout_dot_config/tech/EBeam/pymacros/pcells_EBeam_Beta/cavity_hole.py | YixuanWUSTL/SiEPIC_EBeam_PDK | 38cc7ef2af17e418eaa4757a43ec240f1f5c4b17 | [
"MIT"
] | 95 | 2015-11-15T10:23:13.000Z | 2022-03-10T22:00:44.000Z | klayout_dot_config/tech/EBeam/pymacros/pcells_EBeam_Beta/cavity_hole.py | YixuanWUSTL/SiEPIC_EBeam_PDK | 38cc7ef2af17e418eaa4757a43ec240f1f5c4b17 | [
"MIT"
] | 155 | 2015-11-14T12:08:09.000Z | 2020-05-17T01:37:23.000Z | klayout_dot_config/tech/EBeam/pymacros/pcells_EBeam_Beta/cavity_hole.py | YixuanWUSTL/SiEPIC_EBeam_PDK | 38cc7ef2af17e418eaa4757a43ec240f1f5c4b17 | [
"MIT"
] | 87 | 2015-11-16T12:23:22.000Z | 2022-03-31T19:01:59.000Z | from . import *
from pya import *
class cavity_hole(pya.PCellDeclarationHelper):
"""
The PCell declaration for the cavity hole.
This is an example of how to perform inversion operations
by Jaspreet, Jingda, and Lukas
"""
def __init__(self):
# Important: initialize the super class
super(cavity_hol... | 30.46 | 106 | 0.64084 |
798026066948f92133bc9e5abe7ee95f2af75687 | 375 | py | Python | custom/ilsgateway/tests/handlers/not_recognized.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | custom/ilsgateway/tests/handlers/not_recognized.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | 1 | 2022-03-12T01:03:25.000Z | 2022-03-12T01:03:25.000Z | custom/ilsgateway/tests/handlers/not_recognized.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | from custom.ilsgateway.tanzania.reminders import CONTACT_SUPERVISOR
from custom.ilsgateway.tests import ILSTestScript
class ILSNotRecognized(ILSTestScript):
def test_not_recognized_keyword(self):
self.run_script(
"""
5551234 > asdsdasdassd
5551234 < {0}
... | 26.785714 | 67 | 0.653333 |
79802625b1655b8149edeb5d7caaf7e9302fae3e | 22,905 | py | Python | tests/slack_sdk/models/test_views.py | ggml1/python-slack-sdk | 1fddbffecb55abf4841ed03b1c59f8879148be9f | [
"MIT"
] | 492 | 2020-10-29T02:09:04.000Z | 2022-03-31T19:28:01.000Z | tests/slack_sdk/models/test_views.py | ggml1/python-slack-sdk | 1fddbffecb55abf4841ed03b1c59f8879148be9f | [
"MIT"
] | 387 | 2020-10-27T06:36:37.000Z | 2022-03-29T08:46:52.000Z | tests/slack_sdk/models/test_views.py | ggml1/python-slack-sdk | 1fddbffecb55abf4841ed03b1c59f8879148be9f | [
"MIT"
] | 165 | 2020-10-28T22:05:04.000Z | 2022-03-28T08:03:00.000Z | import json
import logging
import unittest
from slack_sdk.errors import SlackObjectFormationError
from slack_sdk.models.blocks import (
InputBlock,
SectionBlock,
DividerBlock,
ActionsBlock,
ContextBlock,
PlainTextInputElement,
RadioButtonsElement,
CheckboxesElement,
ButtonElement,
... | 42.893258 | 2,439 | 0.432264 |
79802651180420477cec0f8991b92f7636eb2ba5 | 6,711 | py | Python | train.py | Mehbangg/MRI_CT | 6a2cae5510017c5f0ba4684799cab31490d16837 | [
"Apache-2.0"
] | 6 | 2019-10-03T21:44:52.000Z | 2019-11-17T02:49:12.000Z | train.py | Mehbangg/MRI_CT | 6a2cae5510017c5f0ba4684799cab31490d16837 | [
"Apache-2.0"
] | null | null | null | train.py | Mehbangg/MRI_CT | 6a2cae5510017c5f0ba4684799cab31490d16837 | [
"Apache-2.0"
] | 2 | 2020-04-21T02:55:28.000Z | 2020-05-03T21:11:14.000Z | import dataset
import tensorflow as tf
import time
from datetime import timedelta
import math
import random
import numpy as np
import os
#Adding Seed so that random initialization is consistent
from numpy.random import seed
seed(1)
from tensorflow import set_random_seed
set_random_seed(2)
batch_size = 32
#Prepare i... | 32.42029 | 125 | 0.679332 |
79802707e27e17e04bf4d229120e776879625d92 | 1,234 | py | Python | server/flask/app/controller/__init__.py | JeanExtreme002/Keylogger | bcb568818ca2c71f9cc1663d3858906ac660e778 | [
"BSD-3-Clause"
] | 4 | 2020-02-09T20:29:43.000Z | 2021-11-08T08:48:05.000Z | server/flask/app/controller/__init__.py | JeanExtreme002/Keylogger | bcb568818ca2c71f9cc1663d3858906ac660e778 | [
"BSD-3-Clause"
] | null | null | null | server/flask/app/controller/__init__.py | JeanExtreme002/Keylogger | bcb568818ca2c71f9cc1663d3858906ac660e778 | [
"BSD-3-Clause"
] | null | null | null | from app import server
from app.model.database import Database
from flask import request
database = Database()
@server.route("/<user>/input", methods = ["GET", "POST"])
def input(user):
if not user in database: database.createUser(user)
if request.json: database.setInput(user, request.json.get("text", "")... | 23.730769 | 78 | 0.654781 |
7980276d769f09c612b7ced93fce87a17c909077 | 1,525 | py | Python | mailtorpedo/sender.py | abm-saeid/torpedo | 3cfb571bfbc7b991312e04354d5773d7dc3b19a2 | [
"MIT"
] | 1 | 2021-09-01T05:55:44.000Z | 2021-09-01T05:55:44.000Z | mailtorpedo/sender.py | abm-saeid/torpedo | 3cfb571bfbc7b991312e04354d5773d7dc3b19a2 | [
"MIT"
] | null | null | null | mailtorpedo/sender.py | abm-saeid/torpedo | 3cfb571bfbc7b991312e04354d5773d7dc3b19a2 | [
"MIT"
] | null | null | null | from os.path import exists
import json
import smtplib
from .binder import Binder
class Sender():
def __init__(self, creds, reader, template):
if not exists(creds):
raise FileNotFoundError("Credential file not found.")
else:
with open(creds, 'r', encoding='utf-8') as credfile... | 31.122449 | 76 | 0.56 |
798027a13f35345912d4d23154853eb310c1a50f | 13,579 | py | Python | XibGAN/Augments.py | Xibanya/VQGAN-CLIP | 24510ef372df3131dedf289397818217e1fd3df0 | [
"MIT"
] | null | null | null | XibGAN/Augments.py | Xibanya/VQGAN-CLIP | 24510ef372df3131dedf289397818217e1fd3df0 | [
"MIT"
] | null | null | null | XibGAN/Augments.py | Xibanya/VQGAN-CLIP | 24510ef372df3131dedf289397818217e1fd3df0 | [
"MIT"
] | null | null | null | import kornia.augmentation as K
import yaml
import torch
from .Utils import resample, clamp_with_grad
from torch import nn
CONFIG_DIRECTORY = 'Config'
AUGMENT_CONFIG = 'augment_config.yaml'
DEFAULT_AUGMENTS = [['Af', 'Pe', 'Ji', 'Er']]
with open(f"{CONFIG_DIRECTORY}/{AUGMENT_CONFIG}", "r") as f:
afg = ... | 37.824513 | 97 | 0.586494 |
7980285517367bed45a84995875c8822a294bad8 | 7,494 | py | Python | tests/trainer/logging/test_eval_loop_logging_1_0.py | sshleifer/pytorch-lightning | 575e01be82c4adbc69970f801bd925e545bb1ccb | [
"Apache-2.0"
] | null | null | null | tests/trainer/logging/test_eval_loop_logging_1_0.py | sshleifer/pytorch-lightning | 575e01be82c4adbc69970f801bd925e545bb1ccb | [
"Apache-2.0"
] | null | null | null | tests/trainer/logging/test_eval_loop_logging_1_0.py | sshleifer/pytorch-lightning | 575e01be82c4adbc69970f801bd925e545bb1ccb | [
"Apache-2.0"
] | null | null | null | """
Tests to ensure that the training loop works with a dict (1.0)
"""
from pytorch_lightning import Trainer
from pytorch_lightning import callbacks
from tests.base.deterministic_model import DeterministicModel
from tests.base import SimpleModule, BoringModel
import os
import torch
import pytest
def test__validation_... | 30.839506 | 104 | 0.644115 |
798028d1c032c158d9bf1957c079f4c72c0e8ed0 | 1,537 | py | Python | phpipam/1.0.0/src/app.py | tournade/Shuffle-apps | 7ab263d87b083ed40b4275dc07f8d0bd992db508 | [
"MIT"
] | null | null | null | phpipam/1.0.0/src/app.py | tournade/Shuffle-apps | 7ab263d87b083ed40b4275dc07f8d0bd992db508 | [
"MIT"
] | null | null | null | phpipam/1.0.0/src/app.py | tournade/Shuffle-apps | 7ab263d87b083ed40b4275dc07f8d0bd992db508 | [
"MIT"
] | null | null | null | import socket
import asyncio
import time
import random
import json
from walkoff_app_sdk.app_base import AppBase
class PhpIpam(AppBase):
__version__ = "1.0.0"
app_name = "PhpIpam" # this needs to match "name" in api.yaml
def __init__(self, redis, logger, console_logger=None):
"""
Each app... | 26.964912 | 118 | 0.576448 |
79802922ca1b59789069a0249cee163cdd3f607a | 50,349 | py | Python | tensorflow/contrib/boosted_trees/python/kernel_tests/prediction_ops_test.py | ryorda/tensorflow-viennacl | 054b515feec0a3fca4cfb1f29adbf423c9027c3a | [
"Apache-2.0"
] | 3 | 2018-04-27T06:03:15.000Z | 2018-05-02T11:59:39.000Z | tensorflow/contrib/boosted_trees/python/kernel_tests/prediction_ops_test.py | ryorda/tensorflow-viennacl | 054b515feec0a3fca4cfb1f29adbf423c9027c3a | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/boosted_trees/python/kernel_tests/prediction_ops_test.py | ryorda/tensorflow-viennacl | 054b515feec0a3fca4cfb1f29adbf423c9027c3a | [
"Apache-2.0"
] | 3 | 2019-03-31T07:08:04.000Z | 2021-07-01T07:44:57.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.0677 | 80 | 0.68478 |
798029399b5176044bae3f40170e9f1db85540e3 | 198 | py | Python | solutions_automation/vdc/dashboard/gitea.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | solutions_automation/vdc/dashboard/gitea.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | solutions_automation/vdc/dashboard/gitea.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from solutions_automation.vdc.dashboard.common import CommonChatBot
from jumpscale.packages.vdc_dashboard.chats.gitea import GiteaDeploy
class GiteaAutomated(CommonChatBot, GiteaDeploy):
pass
| 28.285714 | 68 | 0.853535 |
7980295516e82cc583260f8684403ded6dcd23f5 | 2,646 | py | Python | tests/unit/dataactvalidator/test_b12_object_class_program_activity_1.py | dael-victoria-reyes/data-act-broker-backend | f83c7cad29cac24d95f45a262710dc1564de7dc1 | [
"CC0-1.0"
] | 1 | 2019-06-22T21:53:16.000Z | 2019-06-22T21:53:16.000Z | tests/unit/dataactvalidator/test_b12_object_class_program_activity_1.py | dael-victoria-reyes/data-act-broker-backend | f83c7cad29cac24d95f45a262710dc1564de7dc1 | [
"CC0-1.0"
] | null | null | null | tests/unit/dataactvalidator/test_b12_object_class_program_activity_1.py | dael-victoria-reyes/data-act-broker-backend | f83c7cad29cac24d95f45a262710dc1564de7dc1 | [
"CC0-1.0"
] | null | null | null | from tests.unit.dataactcore.factories.staging import ObjectClassProgramActivityFactory
from tests.unit.dataactvalidator.utils import number_of_errors, query_columns
import copy
_FILE = 'b12_object_class_program_activity_1'
def test_column_headers(database):
expected_subset = {'row_number', 'by_direct_reimbursabl... | 49.924528 | 111 | 0.74452 |
7980296aa2d883a768a17e8a2e4c72138b90c681 | 3,618 | py | Python | task0_bayesian_inference/solution.py | Zador-Pataki/Probabilistic-Artificial-Intelligence-Projects | 914612effc92a9ee2b8ef74dbdbacddc9222fbac | [
"BSD-3-Clause"
] | null | null | null | task0_bayesian_inference/solution.py | Zador-Pataki/Probabilistic-Artificial-Intelligence-Projects | 914612effc92a9ee2b8ef74dbdbacddc9222fbac | [
"BSD-3-Clause"
] | null | null | null | task0_bayesian_inference/solution.py | Zador-Pataki/Probabilistic-Artificial-Intelligence-Projects | 914612effc92a9ee2b8ef74dbdbacddc9222fbac | [
"BSD-3-Clause"
] | null | null | null | # log_posterior_probs function was implemented in October 2021 by
# Pascal Lieberherr, Zador Pataki, Timo Schönegg
import numpy
from scipy.stats import laplace, norm, t
import scipy
import math
import numpy as np
from scipy.special import logsumexp
VARIANCE = 2.0
normal_scale = math.sqrt(VARIANCE)
student_t_df = (2 ... | 32.594595 | 164 | 0.65948 |
798029b9f3bf0cc3840fc16dcda14f8f85e24b99 | 642 | py | Python | examples/get_cloud.py | jack-w-shaw/python-libjuju | 8c938c91f729bf86aeb25d1b27e47735f81e88d9 | [
"Apache-2.0"
] | 50 | 2016-11-01T18:19:24.000Z | 2022-03-17T08:29:57.000Z | examples/get_cloud.py | jack-w-shaw/python-libjuju | 8c938c91f729bf86aeb25d1b27e47735f81e88d9 | [
"Apache-2.0"
] | 577 | 2016-11-16T19:46:34.000Z | 2022-03-30T20:08:33.000Z | examples/get_cloud.py | jack-w-shaw/python-libjuju | 8c938c91f729bf86aeb25d1b27e47735f81e88d9 | [
"Apache-2.0"
] | 74 | 2016-11-01T14:34:16.000Z | 2022-03-17T19:31:44.000Z | """
This example:
1. Connects to current controller.
2. Gets the cloud name in which the controller lives on
3. Disconnects from the controller
"""
import logging
from juju import jasyncio
from juju.controller import Controller
async def main():
controller = Controller()
# connect to current controller wit... | 21.4 | 67 | 0.738318 |
79802a0c853bf436af5ca4150a15dd4536c2c4ef | 9,782 | py | Python | python/taichi/core/util.py | Detavern/taichi | 1599050e42e1a1927a54d6e7aced5d158af77340 | [
"MIT"
] | null | null | null | python/taichi/core/util.py | Detavern/taichi | 1599050e42e1a1927a54d6e7aced5d158af77340 | [
"MIT"
] | null | null | null | python/taichi/core/util.py | Detavern/taichi | 1599050e42e1a1927a54d6e7aced5d158af77340 | [
"MIT"
] | null | null | null | import os
import shutil
import sys
import ctypes
from pathlib import Path
if sys.version_info[0] < 3 or sys.version_info[1] <= 5:
print("\nPlease restart with Python 3.6+\n")
print("Current Python version:", sys.version_info)
exit(-1)
tc_core = None
def in_docker():
if os.environ.get("TI_IN_DOCKER", "") == ... | 27.948571 | 194 | 0.657841 |
79802ab5e91e9e1f3872afaf91f10cc63300ec61 | 2,431 | py | Python | python/primary_account_unlink_adwords_account.py | enterstudio/googleads-shopping-samples | ee282d2b9933bab94e216e87449b38da5b6c11f4 | [
"Apache-2.0"
] | null | null | null | python/primary_account_unlink_adwords_account.py | enterstudio/googleads-shopping-samples | ee282d2b9933bab94e216e87449b38da5b6c11f4 | [
"Apache-2.0"
] | null | null | null | python/primary_account_unlink_adwords_account.py | enterstudio/googleads-shopping-samples | ee282d2b9933bab94e216e87449b38da5b6c11f4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 35.75 | 80 | 0.661456 |
79802c3d7f768f0c350b6610089e72cb886045b3 | 5,961 | py | Python | Allura/allura/tests/unit/spam/test_akismet.py | lym/allura-git | b2b53d0c1ba8b1e48f176ad75cf64675b3545d69 | [
"Apache-2.0"
] | 1 | 2017-07-31T23:13:58.000Z | 2017-07-31T23:13:58.000Z | Allura/allura/tests/unit/spam/test_akismet.py | lym/allura-git | b2b53d0c1ba8b1e48f176ad75cf64675b3545d69 | [
"Apache-2.0"
] | null | null | null | Allura/allura/tests/unit/spam/test_akismet.py | lym/allura-git | b2b53d0c1ba8b1e48f176ad75cf64675b3545d69 | [
"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 Apach... | 43.195652 | 79 | 0.669015 |
79802ea64f8f86fa2b8dcb65e8c457494bf85561 | 6,364 | py | Python | squirrel/GaussianProcess/trend.py | zacheberhart-kd/Squirrel-Optimizer-BBO-NeurIPS20-automlorg | 1ae6afdeb6c2f3313a374c4a0ea9bc8421b55dde | [
"Apache-2.0"
] | 10 | 2020-12-16T07:45:01.000Z | 2022-01-18T06:03:07.000Z | squirrel/GaussianProcess/trend.py | zacheberhart-kd/Squirrel-Optimizer-BBO-NeurIPS20-automlorg | 1ae6afdeb6c2f3313a374c4a0ea9bc8421b55dde | [
"Apache-2.0"
] | null | null | null | squirrel/GaussianProcess/trend.py | zacheberhart-kd/Squirrel-Optimizer-BBO-NeurIPS20-automlorg | 1ae6afdeb6c2f3313a374c4a0ea9bc8421b55dde | [
"Apache-2.0"
] | 1 | 2021-02-16T10:34:52.000Z | 2021-02-16T10:34:52.000Z | """
Created on Wed Aug 23 16:48:47 2017
@author: Hao Wang
@email: wangronin@gmail.com
"""
from pdb import set_trace
import numpy as np
from abc import abstractmethod, ABC
from numpy import newaxis, zeros, tile, eye, r_, c_, ones, array, atleast_2d
from sklearn.ensemble import RandomForestRegressor
class Trend(ABC):... | 27.080851 | 87 | 0.574953 |
79802f0b41f5263a8fe60e343c7771d0c4321545 | 11,779 | py | Python | rllib/tf2_examples/custom_keras_model_fc_vs_rnn.py | tmorgan4/ray | bc9f040aa002a5223cd86d647a13bd9135a892a8 | [
"Apache-2.0"
] | null | null | null | rllib/tf2_examples/custom_keras_model_fc_vs_rnn.py | tmorgan4/ray | bc9f040aa002a5223cd86d647a13bd9135a892a8 | [
"Apache-2.0"
] | null | null | null | rllib/tf2_examples/custom_keras_model_fc_vs_rnn.py | tmorgan4/ray | bc9f040aa002a5223cd86d647a13bd9135a892a8 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import ray
from ray import tune
from ray.rllib.models.lstm import add_time_dimension
from ray.rllib.models import ModelCatalog
from ray.rllib.models.misc import normc_initializer
from ray.rllib.model... | 48.077551 | 156 | 0.668563 |
79802f2263632b5784491648401b051cf2dc9715 | 600 | py | Python | python/example/fluidic_force_density_2d.py | mit-gfx/diff_stokes_flow | 55eb7c0f3a9d58a50c1a09c2231177b81e0da84e | [
"MIT"
] | 40 | 2020-11-07T06:27:40.000Z | 2021-11-09T07:09:48.000Z | python/example/fluidic_force_density_2d.py | mit-gfx/diff_stokes_flow | 55eb7c0f3a9d58a50c1a09c2231177b81e0da84e | [
"MIT"
] | null | null | null | python/example/fluidic_force_density_2d.py | mit-gfx/diff_stokes_flow | 55eb7c0f3a9d58a50c1a09c2231177b81e0da84e | [
"MIT"
] | 6 | 2020-10-09T05:24:22.000Z | 2021-10-04T06:35:22.000Z | import sys
sys.path.append('../')
import numpy as np
from pathlib import Path
from py_diff_stokes_flow.env.fluidic_force_density_env_2d import FluidicForceDensityEnv2d
from py_diff_stokes_flow.common.common import ndarray, print_error
from py_diff_stokes_flow.common.grad_check import check_gradients
def main():
... | 27.272727 | 89 | 0.731667 |
79802f3860c6fee8dac29af461d565a8e307aa63 | 4,798 | py | Python | notify.py | arnaudmorin/weechat-extra | c5d0f5c7bb7092e781115534e410a5531b7f5d6e | [
"Apache-2.0"
] | null | null | null | notify.py | arnaudmorin/weechat-extra | c5d0f5c7bb7092e781115534e410a5531b7f5d6e | [
"Apache-2.0"
] | null | null | null | notify.py | arnaudmorin/weechat-extra | c5d0f5c7bb7092e781115534e410a5531b7f5d6e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# vim:set shiftwidth=4 tabstop=4 softtabstop=4 expandtab textwidth=250:
import requests
import weechat
# script variables
SCRIPT_NAME = "notify"
SCRIPT_AUTHOR = "Arnaud Morin <arnaud.morin@gmail.com>"
SCRIPT_VERSION = "0.0.1"
SCRIPT_LICENSE = "APACHE2"
SCRIPT_DESC = "Send notifications from we... | 34.028369 | 121 | 0.644227 |
798030192296b59bcab4b84c5a1700581af2afff | 2,424 | py | Python | Chapter10/pong-update.py | PacktPublishing/Learning-Python-by-building-games | 0713e6fc141b2cd201128560ae0c3b689b7d2116 | [
"MIT"
] | 25 | 2019-09-01T16:19:16.000Z | 2021-12-20T07:08:35.000Z | Chapter10/pong-update.py | PacktPublishing/Learning-Python-by-building-games. | 0713e6fc141b2cd201128560ae0c3b689b7d2116 | [
"MIT"
] | 4 | 2019-08-27T19:45:48.000Z | 2020-07-24T12:29:56.000Z | Chapter10/pong-update.py | PacktPublishing/Learning-Python-by-building-games | 0713e6fc141b2cd201128560ae0c3b689b7d2116 | [
"MIT"
] | 24 | 2019-06-01T18:31:07.000Z | 2022-03-15T19:24:34.000Z | import turtle
wn = turtle.Screen()
wn.title('Pong')
wn.bgcolor('black')
wn.setup(width=800, height=600)
wn.tracer(0)
# Paddle A
paddle_a = turtle.Turtle()
paddle_a.speed(0)
paddle_a.shape('square')
paddle_a.color('white')
paddle_a.penup()
paddle_a.goto(-350, 0)
paddle_a.shapesize(5, 1)
# Paddle B
paddle_b = turtle.T... | 20.717949 | 130 | 0.596122 |
798030395f09de9acc73ff24dea523464f8bc1da | 1,211 | py | Python | examples/warm_start.py | tvquynh/tune-sklearn | 298709319ae856230e1287dd59bbaeabe3e66bf9 | [
"Apache-2.0"
] | 356 | 2019-12-27T09:00:52.000Z | 2022-03-24T08:19:16.000Z | examples/warm_start.py | tvquynh/tune-sklearn | 298709319ae856230e1287dd59bbaeabe3e66bf9 | [
"Apache-2.0"
] | 161 | 2020-03-06T18:57:15.000Z | 2022-03-25T13:52:18.000Z | examples/warm_start.py | tvquynh/tune-sklearn | 298709319ae856230e1287dd59bbaeabe3e66bf9 | [
"Apache-2.0"
] | 38 | 2020-03-27T04:39:24.000Z | 2022-03-24T21:29:29.000Z | """
An example training a LogisticRegression model, performing grid search
using TuneGridSearchCV.
This example uses early stopping to further improve runtimes
by eliminating worse hyperparameter choices early based off
of its average test score from cross validation. Usually
this will require the estimator to have `p... | 31.868421 | 75 | 0.784476 |
798031c126c988d430d95079cc2d2b0bce82752a | 2,709 | py | Python | build/scripts/build_java_with_error_prone2.py | gwjknvwjn/catboost | a5644bf80e2e37985012fb3bdd285fc6d798c61c | [
"Apache-2.0"
] | 4 | 2020-06-24T06:07:52.000Z | 2021-04-16T22:58:09.000Z | build/scripts/build_java_with_error_prone2.py | birichie/catboost | de75c6af12cf490700e76c22072fbdc15b35d679 | [
"Apache-2.0"
] | 1 | 2021-12-09T23:08:25.000Z | 2021-12-09T23:08:25.000Z | build/scripts/build_java_with_error_prone2.py | birichie/catboost | de75c6af12cf490700e76c22072fbdc15b35d679 | [
"Apache-2.0"
] | 1 | 2020-10-17T09:28:08.000Z | 2020-10-17T09:28:08.000Z | import sys
import os
import re
import subprocess
import platform
ERROR_PRONE_FLAGS = [
'-Xep:FunctionalInterfaceMethodChanged:WARN',
'-Xep:ReturnValueIgnored:WARN',
]
JAVA10_EXPORTS = [
'--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.u... | 34.291139 | 176 | 0.610557 |
798031f5f4e1b24f85bded484a069f6074e89eb3 | 3,361 | py | Python | otrans/model/transformer.py | baozixifan/TransformerAndLm | b349320ce397b2ef31b2ab5b590a9e2e3ad5d298 | [
"MIT"
] | null | null | null | otrans/model/transformer.py | baozixifan/TransformerAndLm | b349320ce397b2ef31b2ab5b590a9e2e3ad5d298 | [
"MIT"
] | null | null | null | otrans/model/transformer.py | baozixifan/TransformerAndLm | b349320ce397b2ef31b2ab5b590a9e2e3ad5d298 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from otrans.encoder import TransformerEncoder
from otrans.decoder import TransformerDecoder
from otrans.metrics import LabelSmoothingLoss
from otrans.utils import initialize
class Transformer(nn.Module):
def __init__(self, params):
super(Transformer, self).__init__()
... | 52.515625 | 96 | 0.498364 |
79803299661709cd7e756fb89678d4a7cbf2fd45 | 9,661 | py | Python | data/dialogs/dialogs.py | HansGR/WorldsCollide | af227be553e120ee004b130598360c61daf7df59 | [
"MIT"
] | 7 | 2022-01-15T02:53:53.000Z | 2022-02-17T00:51:32.000Z | data/dialogs/dialogs.py | HansGR/WorldsCollide | af227be553e120ee004b130598360c61daf7df59 | [
"MIT"
] | 8 | 2022-01-16T02:45:24.000Z | 2022-03-21T02:08:27.000Z | data/dialogs/dialogs.py | HansGR/WorldsCollide | af227be553e120ee004b130598360c61daf7df59 | [
"MIT"
] | 5 | 2022-01-15T02:53:38.000Z | 2022-01-19T17:42:10.000Z | from data.dialogs.dialog import Dialog
from data.structures import DataList
from memory.space import Space
from data.fonts import widths
import data.text
class Dialogs():
DIALOG_PTRS_START = 0xce602
DIALOG_PTRS_END = 0xcffff
DIALOGS_START = 0xd0000
DIALOGS_END = 0xef0ff
# the address of the first ... | 45.570755 | 116 | 0.654694 |
79803322a0ebaa610628b0cab82133bce918df7e | 3,761 | py | Python | contrib/macdeploy/custom_dsstore.py | torus-core/torus | 5ba56d47d070133f7c06f1e788050a56a7fbe789 | [
"MIT"
] | 1 | 2021-07-19T13:16:38.000Z | 2021-07-19T13:16:38.000Z | contrib/macdeploy/custom_dsstore.py | torus-core/torus | 5ba56d47d070133f7c06f1e788050a56a7fbe789 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | torus-core/torus | 5ba56d47d070133f7c06f1e788050a56a7fbe789 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2013-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __future__ import division,print_function,unicode_literals
import biplist
from ds_store import DSStor... | 61.655738 | 1,817 | 0.726403 |
798033517c0d30030b3876943c726e729d43e53d | 1,520 | py | Python | tensorflow/examples/saved_model/integration_tests/use_rnn_cell.py | datanonymous/TFandroid | 89927e863b1ad96184ab09188f62b7e391c896d9 | [
"Apache-2.0"
] | 3 | 2019-02-04T10:10:19.000Z | 2019-12-29T08:09:37.000Z | tensorflow/examples/saved_model/integration_tests/use_rnn_cell.py | shekharpalit/tensorflow | 6aa83398ab03bfae822f36772757097bcb98b6ed | [
"Apache-2.0"
] | 1 | 2019-02-22T00:50:13.000Z | 2019-02-22T00:50:13.000Z | tensorflow/examples/saved_model/integration_tests/use_rnn_cell.py | shekharpalit/tensorflow | 6aa83398ab03bfae822f36772757097bcb98b6ed | [
"Apache-2.0"
] | 6 | 2018-11-29T20:52:00.000Z | 2021-02-19T22:43:32.000Z | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 30.4 | 80 | 0.716447 |
798033b10ff7b8ab8c115455c4b8245059f16756 | 10,371 | py | Python | xlsxwriter/test/worksheet/test_write_auto_filter.py | totdiao/XlsxWriter | 3d65858d8933bddb8262d500bcc2005f28fde645 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/worksheet/test_write_auto_filter.py | totdiao/XlsxWriter | 3d65858d8933bddb8262d500bcc2005f28fde645 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/worksheet/test_write_auto_filter.py | totdiao/XlsxWriter | 3d65858d8933bddb8262d500bcc2005f28fde645 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org
#
import unittest
from ...compatibility import StringIO
from ...worksheet import Worksheet
class TestWriteAutoFilter(unittest.TestCase):
"""
... | 35.155932 | 241 | 0.649021 |
79803570c298e1960b64dd92606eecd8fdbbb6a4 | 300 | py | Python | .eggs/pynion-0.0.4-py2.7.egg/pynion/metaclass/__init__.py | sadeghiafshin/rgCrawler | 2fc50966afc1d837e9c67cb0086d66c417dab7d1 | [
"MIT"
] | null | null | null | .eggs/pynion-0.0.4-py2.7.egg/pynion/metaclass/__init__.py | sadeghiafshin/rgCrawler | 2fc50966afc1d837e9c67cb0086d66c417dab7d1 | [
"MIT"
] | null | null | null | .eggs/pynion-0.0.4-py2.7.egg/pynion/metaclass/__init__.py | sadeghiafshin/rgCrawler | 2fc50966afc1d837e9c67cb0086d66c417dab7d1 | [
"MIT"
] | 1 | 2019-01-09T20:16:46.000Z | 2019-01-09T20:16:46.000Z | """Metaclasses in **pynion** are designed in order to help users develop
their classes by adding a certain build behavior to the derived classes.
.. moduleauthor:: Jaume Bonet <jaume.bonet@gmail.com>
"""
from .tones import Singleton
from .tones import Multiton
__all__ = ["Singleton", "Multiton"]
| 27.272727 | 72 | 0.753333 |
798038b49028308bad855be7fe016acca7f0189a | 2,582 | py | Python | terrapower/physics/neutronics/dragon/tests/test_dragonInterface.py | ntouran/dragon-armi-plugin | c43e39891f9c99b87ff8ff82bd2424acbe6afec0 | [
"Apache-2.0"
] | null | null | null | terrapower/physics/neutronics/dragon/tests/test_dragonInterface.py | ntouran/dragon-armi-plugin | c43e39891f9c99b87ff8ff82bd2424acbe6afec0 | [
"Apache-2.0"
] | 9 | 2019-11-16T01:17:41.000Z | 2021-11-22T15:47:19.000Z | terrapower/physics/neutronics/dragon/tests/test_dragonInterface.py | ntouran/dragon-armi-plugin | c43e39891f9c99b87ff8ff82bd2424acbe6afec0 | [
"Apache-2.0"
] | 2 | 2019-11-18T15:13:46.000Z | 2021-07-30T18:01:40.000Z | # Copyright 2019 TerraPower, 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 writi... | 34.891892 | 87 | 0.711851 |
798038e95ccbc09b80115f870f6475aa915649c4 | 11,612 | py | Python | A_MIA_R3_Core/faceproc/Facemod.py | FukukouSSJouhou/A_MIA_R3 | 970e80f6b71ba3c6eab013470b52f1e76fb04d3c | [
"MIT"
] | null | null | null | A_MIA_R3_Core/faceproc/Facemod.py | FukukouSSJouhou/A_MIA_R3 | 970e80f6b71ba3c6eab013470b52f1e76fb04d3c | [
"MIT"
] | null | null | null | A_MIA_R3_Core/faceproc/Facemod.py | FukukouSSJouhou/A_MIA_R3 | 970e80f6b71ba3c6eab013470b52f1e76fb04d3c | [
"MIT"
] | 1 | 2022-03-29T03:30:36.000Z | 2022-03-29T03:30:36.000Z | import json
import math
import os
import shutil
import subprocess
import sys
import wave
from tkinter import Image, ttk
from typing import ClassVar
import numpy as np
import cv2
import tkinter as tk
from PIL import Image, ImageTk
from PySide2 import QtCore, QtGui
from keras_preprocessing import image
from tensorflow.... | 36.401254 | 176 | 0.578195 |
79803912181af39e58babb273baa9e39c2fdca4c | 3,054 | py | Python | homepose/libs/networking.py | KamilRybacki/Homepose | 7f82b9720e2f7a8bf4d07ebebb819bf17a1c1336 | [
"MIT"
] | null | null | null | homepose/libs/networking.py | KamilRybacki/Homepose | 7f82b9720e2f7a8bf4d07ebebb819bf17a1c1336 | [
"MIT"
] | null | null | null | homepose/libs/networking.py | KamilRybacki/Homepose | 7f82b9720e2f7a8bf4d07ebebb819bf17a1c1336 | [
"MIT"
] | null | null | null | import dataclasses
import docker
import logging
import os
import shutil
import homepose.libs.enviroment
import homepose.libs.utils
class DNSMasqInstallError(Exception):
default_message = 'DNSMasq installation failed!'
def __init__(self, msg=default_message, *args, **kwargs):
super().__init__(msg, *a... | 45.58209 | 164 | 0.703012 |
798039641dff76fe1252f5b2e0e35c1b6630ac27 | 4,679 | py | Python | volatility/volatility/plugins/mac/netconns.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | 2 | 2018-07-16T13:30:40.000Z | 2018-07-17T12:02:05.000Z | volatility/volatility/plugins/mac/netconns.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | null | null | null | volatility/volatility/plugins/mac/netconns.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | null | null | null | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility 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, or
# (at your o... | 36.84252 | 153 | 0.556102 |
798039d29906e37b12e4c3e6aedaaebb181a06e9 | 227 | py | Python | opencv/opencv-image-bilateral.py | avijitmondal/tutorial | 3d85b432f0f7225941d9b12a6474ba28b00ac08b | [
"MIT"
] | null | null | null | opencv/opencv-image-bilateral.py | avijitmondal/tutorial | 3d85b432f0f7225941d9b12a6474ba28b00ac08b | [
"MIT"
] | null | null | null | opencv/opencv-image-bilateral.py | avijitmondal/tutorial | 3d85b432f0f7225941d9b12a6474ba28b00ac08b | [
"MIT"
] | null | null | null | import cv2, numpy
img = cv2.imread('taj-rgb-noise.jpg')
weight = 2
color = 100
space = 100
blur_image = cv2.bilateralFilter(img, weight, color, space)
cv2.imshow('Bilateral Image', img)
cv2.waitKey(0)
cv2.destroyAllWindows() | 18.916667 | 59 | 0.735683 |
79803a32bc1d32e5f326c96db8e3040ee84e65f8 | 6,198 | py | Python | anki/anki/tags.py | nadvornix/ankifier | 2b75ef8e85e3e6fadd7184e47d647b0b8c0013a1 | [
"MIT"
] | null | null | null | anki/anki/tags.py | nadvornix/ankifier | 2b75ef8e85e3e6fadd7184e47d647b0b8c0013a1 | [
"MIT"
] | null | null | null | anki/anki/tags.py | nadvornix/ankifier | 2b75ef8e85e3e6fadd7184e47d647b0b8c0013a1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright: Damien Elmes <anki@ichi2.net>
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
from anki.utils import intTime, ids2str, json
from anki.hooks import runHook
import re
"""
Anki maintains a cache of used tags so it can quickly present a list of tags
for ... | 33.684783 | 80 | 0.504679 |
79803af28b89cb60aff173329ab2cd3300625514 | 4,328 | py | Python | contrib/seeds/generate-seeds.py | happyleaf-money/happyleaf | dc6526057cd16ec14a8d55b8023281d9622c26a5 | [
"MIT"
] | 1 | 2020-09-24T12:27:43.000Z | 2020-09-24T12:27:43.000Z | contrib/seeds/generate-seeds.py | happyleaf-money/happyleaf | dc6526057cd16ec14a8d55b8023281d9622c26a5 | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | happyleaf-money/happyleaf | dc6526057cd16ec14a8d55b8023281d9622c26a5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... | 31.362319 | 98 | 0.581562 |
79803b20267fd77155a834f2bc57eec4f6e9ff37 | 7,037 | py | Python | karesansui/lib/parser/base/sh_conf_parser.py | Kairiw/karesansui | d5a3acfe40b3953fb4f8d6f51e30d0307309a6ee | [
"MIT"
] | null | null | null | karesansui/lib/parser/base/sh_conf_parser.py | Kairiw/karesansui | d5a3acfe40b3953fb4f8d6f51e30d0307309a6ee | [
"MIT"
] | null | null | null | karesansui/lib/parser/base/sh_conf_parser.py | Kairiw/karesansui | d5a3acfe40b3953fb4f8d6f51e30d0307309a6ee | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of Karesansui Core.
#
# Copyright (C) 2009-2012 HDE, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restric... | 32.13242 | 136 | 0.501492 |
79803c9ccd356a4a73ce805425a7915edc6e95a2 | 14,153 | py | Python | kc_diagnostics/processor.py | fawad1985/kc-diagnostics | 25abd9abcc8f129bfe790a7a927466384b708227 | [
"MIT"
] | null | null | null | kc_diagnostics/processor.py | fawad1985/kc-diagnostics | 25abd9abcc8f129bfe790a7a927466384b708227 | [
"MIT"
] | null | null | null | kc_diagnostics/processor.py | fawad1985/kc-diagnostics | 25abd9abcc8f129bfe790a7a927466384b708227 | [
"MIT"
] | null | null | null | from __future__ import print_function
import xml.etree.ElementTree as ET
import os, re, json
from datetime import datetime, timedelta
CONFIG_FILENAME = "diagnostics-service-config.xml"
# XMLMQTTParser is used to listen to mqtt messages and parse them using config file
class Processor:
''' __init__ Takes config fi... | 45.802589 | 173 | 0.588356 |
79803d236e213e934ca1c12052ce75ec0bf3547b | 179 | py | Python | Functions/Base64Decode/base64Decode.py | geodaftw/Fun-with-Python | 53bcc6f341806de185e205df5ce0d94a9c1ebb82 | [
"MIT"
] | null | null | null | Functions/Base64Decode/base64Decode.py | geodaftw/Fun-with-Python | 53bcc6f341806de185e205df5ce0d94a9c1ebb82 | [
"MIT"
] | null | null | null | Functions/Base64Decode/base64Decode.py | geodaftw/Fun-with-Python | 53bcc6f341806de185e205df5ce0d94a9c1ebb82 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import base64
f = open('screenshot1.bmp', 'r').read()
decoded = base64.b64decode(f)
g = open('finalScreenshot.bmp', 'w')
g.write(decoded)
#f.close()
g.close()
| 16.272727 | 39 | 0.670391 |
79803dd5241e2b99cb7dbb4cf36f27a984c84dcb | 525 | py | Python | students/k3343/laboratory_works/Lukina_Anastasia/laboratiry_work_1/lab1/main_interface/migrations/0009_comment_user.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 10 | 2020-03-20T09:06:12.000Z | 2021-07-27T13:06:02.000Z | students/k3343/laboratory_works/Lukina_Anastasia/laboratiry_work_1/lab1/main_interface/migrations/0009_comment_user.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 134 | 2020-03-23T09:47:48.000Z | 2022-03-12T01:05:19.000Z | students/k3343/laboratory_works/Lukina_Anastasia/laboratiry_work_1/lab1/main_interface/migrations/0009_comment_user.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 71 | 2020-03-20T12:45:56.000Z | 2021-10-31T19:22:25.000Z | # Generated by Django 2.1.5 on 2020-04-12 10:01
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('main_interface', '0008_conference_promo'),
]
operations = [
migrations.AddField(
model_name='co... | 25 | 118 | 0.641905 |
79803e465e3efbf05a5087caf38580706acb2367 | 208 | py | Python | curso/PY1/condicao/ex5.py | smrsassa/Studying-Python | a5acbce42b85bdd6aea8058ca323fbbd12ce5c22 | [
"MIT"
] | 1 | 2019-10-21T18:19:13.000Z | 2019-10-21T18:19:13.000Z | curso/PY1/condicao/ex5.py | smrsassa/Studying-python | a5acbce42b85bdd6aea8058ca323fbbd12ce5c22 | [
"MIT"
] | null | null | null | curso/PY1/condicao/ex5.py | smrsassa/Studying-python | a5acbce42b85bdd6aea8058ca323fbbd12ce5c22 | [
"MIT"
] | null | null | null | d = int(input('Qual a distancia da sua viagem? '))
if d<=200:
p = d*0.5
print ('O preço da sua viagem é de R${}'.format(p))
else:
p = d*0.45
print ('O preço da sua viagem é de R${}'.format(p)) | 29.714286 | 55 | 0.572115 |
79803f43be8da2047bcecc43e836ee507b8ea0da | 895 | py | Python | examples/BasicExample.py | quiqua/pandas-qt | f1911e43fc4a77b6a5237dd25f3b31a4ac305a1b | [
"MIT"
] | null | null | null | examples/BasicExample.py | quiqua/pandas-qt | f1911e43fc4a77b6a5237dd25f3b31a4ac305a1b | [
"MIT"
] | null | null | null | examples/BasicExample.py | quiqua/pandas-qt | f1911e43fc4a77b6a5237dd25f3b31a4ac305a1b | [
"MIT"
] | null | null | null | """set the sip version, cause pandas-qt uses version 2 by default"""
import sip
sip.setapi('QString', 2)
sip.setapi('QVariant', 2)
from PyQt4 import QtGui
import pandas
import pandasqt
import numpy
"""setup a new empty model"""
model = pandasqt.DataFrameModel()
"""setup an application and create a table view widget"... | 25.571429 | 80 | 0.726257 |
79803f98b114f19888b66300ed449855539a3771 | 1,153 | py | Python | custom_components/virtual/switch.py | janiversen/ha_config | 98d7d4eed3a136220133724a044b9358896efbb7 | [
"Apache-2.0"
] | null | null | null | custom_components/virtual/switch.py | janiversen/ha_config | 98d7d4eed3a136220133724a044b9358896efbb7 | [
"Apache-2.0"
] | null | null | null | custom_components/virtual/switch.py | janiversen/ha_config | 98d7d4eed3a136220133724a044b9358896efbb7 | [
"Apache-2.0"
] | null | null | null | """Implementation of entity: virtual switch."""
from __future__ import annotations
import logging
from homeassistant.components.switch import SwitchEntity
from homeassistant.const import STATE_ON
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from ho... | 27.452381 | 70 | 0.751951 |
7980409ffbad452542dc62ff4bbb8434717a9dbe | 6,205 | py | Python | weather.py | steventfan/SQL-Weather-Report | 6941c61ff47b8904512b2067176c1e942212376a | [
"BSD-3-Clause"
] | null | null | null | weather.py | steventfan/SQL-Weather-Report | 6941c61ff47b8904512b2067176c1e942212376a | [
"BSD-3-Clause"
] | null | null | null | weather.py | steventfan/SQL-Weather-Report | 6941c61ff47b8904512b2067176c1e942212376a | [
"BSD-3-Clause"
] | null | null | null | import os
import pyspark
import sys
import time
from csv import reader as Reader
####################################################################################################
# loadDataset(directory, files, sqlContext)
#
# Loads and parses the dataset into a PySpark dataframe
#
# parameters:
# locationsDi... | 37.155689 | 173 | 0.564706 |
7980414dafbc7fd271422c3923fab8ecfae2e5a6 | 4,022 | py | Python | src/problem_3.py | azarrias/udacity-data-structures | 976da40afa860ee5c61be51fb3785d29ba418986 | [
"MIT"
] | null | null | null | src/problem_3.py | azarrias/udacity-data-structures | 976da40afa860ee5c61be51fb3785d29ba418986 | [
"MIT"
] | null | null | null | src/problem_3.py | azarrias/udacity-data-structures | 976da40afa860ee5c61be51fb3785d29ba418986 | [
"MIT"
] | null | null | null | import sys
from collections import Counter
import heapq
class HuffmanNode(object):
def __init__(self, left=None, right=None, root=None):
self.left = left
self.right = right
self.root = root
def __lt__(self,other):
return False
__gt__ = __lt__
def build_huffman_tree(string):... | 34.084746 | 174 | 0.681999 |
7980417bcddd3e19cff6cad98d6989dbc9ff04eb | 683 | py | Python | manage.py | TripSage/TripSage | e69bb6e195cc60b7f072bbe1d496ad6f894caa43 | [
"Apache-2.0"
] | 1 | 2020-10-04T04:25:57.000Z | 2020-10-04T04:25:57.000Z | manage.py | akashsrikanth2310/TripSage | 999e4cf5019930567b3ecd893529984d8c577669 | [
"Apache-2.0"
] | 46 | 2020-09-30T01:34:37.000Z | 2020-10-25T22:36:24.000Z | manage.py | Amoghrd/TripSage | 7b0c1ad1485581f689078a8f4f566b89f4d5b364 | [
"Apache-2.0"
] | 9 | 2020-09-19T02:30:07.000Z | 2020-12-04T06:56:40.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
# pylint: skip-file
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'TripSage.settings')
try:
from django.core.management import execute_from_command_... | 29.695652 | 73 | 0.68082 |
7980422bfa9caa337b98bb28aac5e269fa6a6258 | 317 | py | Python | dataset/__init__.py | pventrella20/elliot | 0515e90902a61f94953df430ed22b9efe892f962 | [
"Apache-2.0"
] | null | null | null | dataset/__init__.py | pventrella20/elliot | 0515e90902a61f94953df430ed22b9efe892f962 | [
"Apache-2.0"
] | null | null | null | dataset/__init__.py | pventrella20/elliot | 0515e90902a61f94953df430ed22b9efe892f962 | [
"Apache-2.0"
] | null | null | null | """
Module description:
"""
__version__ = '0.1'
__author__ = 'Vito Walter Anelli, Claudio Pomo'
__email__ = 'vitowalter.anelli@poliba.it, claudio.pomo@poliba.it'
from elliot.dataset.dataloader.knowledge_aware_chains import KnowledgeChainsLoader
from elliot.dataset.dataloader.visual_dataloader import VisualLoader
| 26.416667 | 82 | 0.810726 |
7980429a0d4ecd0ebf6a25f2e2a58ccfc568cebb | 7,578 | py | Python | steam/channel.py | InsDev/steam.py | 089618989c09f4692660b40df1304ea7ccf964f4 | [
"MIT"
] | 1 | 2020-09-01T12:32:09.000Z | 2020-09-01T12:32:09.000Z | steam/channel.py | InsDev/steam.py | 089618989c09f4692660b40df1304ea7ccf964f4 | [
"MIT"
] | null | null | null | steam/channel.py | InsDev/steam.py | 089618989c09f4692660b40df1304ea7ccf964f4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2020 James
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, co... | 31.185185 | 118 | 0.663895 |
798042e649e10a2a36c8299442ec6823efdeabc0 | 408 | py | Python | siliconcompiler/tools/echo/echo.py | siliconcompiler/siliconcompiler | 6aa2b53441608f228bd520b68c0324fc9cf96377 | [
"Apache-2.0"
] | 424 | 2021-12-04T15:45:12.000Z | 2022-03-31T20:27:55.000Z | siliconcompiler/tools/echo/echo.py | siliconcompiler/siliconcompiler | 6aa2b53441608f228bd520b68c0324fc9cf96377 | [
"Apache-2.0"
] | 105 | 2021-12-03T21:25:29.000Z | 2022-03-31T22:36:59.000Z | siliconcompiler/tools/echo/echo.py | siliconcompiler/siliconcompiler | 6aa2b53441608f228bd520b68c0324fc9cf96377 | [
"Apache-2.0"
] | 38 | 2021-12-04T21:26:20.000Z | 2022-03-21T02:39:29.000Z | def setup(chip):
tool = 'echo'
step = chip.get('arg','step')
index = chip.get('arg','index')
chip.set('tool', tool, 'exe', tool, clobber=False)
chip.set('tool', tool, 'option', step, index, step + index, clobber=False)
def parse_version(stdout):
'''
Version check based on stdout
Depen... | 22.666667 | 79 | 0.612745 |
798043238e664b9034567b6a085dc399bf29d362 | 7,893 | py | Python | Resources/doc/conf.py | ahmetakbn/SonataMediaBundle | 866072af66d9d17be07096f03364fdbc3a6add6e | [
"MIT"
] | 4 | 2015-05-07T16:13:02.000Z | 2017-11-10T00:23:59.000Z | Resources/doc/conf.py | ahmetakbn/SonataMediaBundle | 866072af66d9d17be07096f03364fdbc3a6add6e | [
"MIT"
] | 14 | 2015-01-04T19:18:36.000Z | 2021-06-07T14:30:37.000Z | Resources/doc/conf.py | ahmetakbn/SonataMediaBundle | 866072af66d9d17be07096f03364fdbc3a6add6e | [
"MIT"
] | 15 | 2015-02-26T09:26:13.000Z | 2021-09-15T16:37:06.000Z | # -*- coding: utf-8 -*-
#
# IoC documentation build configuration file, created by
# sphinx-quickstart on Fri Mar 29 01:43:00 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All con... | 32.348361 | 102 | 0.714937 |
798043af3f889bc57a4db2a2da17103db42fcdae | 7,894 | py | Python | tools/third_party/attrs/src/attr/_funcs.py | ziransun/wpt | ab8f451eb39eb198584d547f5d965ef54df2a86a | [
"BSD-3-Clause"
] | 2,479 | 2018-05-28T14:51:29.000Z | 2022-03-30T14:41:18.000Z | tools/third_party/attrs/src/attr/_funcs.py | ziransun/wpt | ab8f451eb39eb198584d547f5d965ef54df2a86a | [
"BSD-3-Clause"
] | 7,642 | 2018-05-28T09:38:03.000Z | 2022-03-31T20:55:48.000Z | tools/third_party/attrs/src/attr/_funcs.py | ziransun/wpt | ab8f451eb39eb198584d547f5d965ef54df2a86a | [
"BSD-3-Clause"
] | 1,303 | 2018-05-29T14:50:02.000Z | 2022-03-30T17:30:42.000Z | from __future__ import absolute_import, division, print_function
import copy
from ._compat import iteritems
from ._make import NOTHING, _obj_setattr, fields
from .exceptions import AttrsAttributeNotFoundError
def asdict(inst, recurse=True, filter=None, dict_factory=dict,
retain_collection_types=False):
... | 37.061033 | 79 | 0.573854 |
7980446b9233b3207136b612e1f7d779a0e73e2e | 33,476 | py | Python | mmdet3d/core/evaluation/kitti_utils/eval.py | BB88Lee/mmdetection3d | 62aeeadf70ac1229c595e3a4fe09d8a49df808f1 | [
"Apache-2.0"
] | 136 | 2021-06-03T06:37:56.000Z | 2022-03-29T13:29:03.000Z | mmdet3d/core/evaluation/kitti_utils/eval.py | BB88Lee/mmdetection3d | 62aeeadf70ac1229c595e3a4fe09d8a49df808f1 | [
"Apache-2.0"
] | 38 | 2021-06-05T12:41:30.000Z | 2022-03-23T07:31:28.000Z | mmdet3d/core/evaluation/kitti_utils/eval.py | BB88Lee/mmdetection3d | 62aeeadf70ac1229c595e3a4fe09d8a49df808f1 | [
"Apache-2.0"
] | 15 | 2021-04-23T01:13:28.000Z | 2022-03-27T11:15:25.000Z | import gc
import io as sysio
import numba
import numpy as np
@numba.jit
def get_thresholds(scores: np.ndarray, num_gt, num_sample_pts=41):
scores.sort()
scores = scores[::-1]
current_recall = 0
thresholds = []
for i, score in enumerate(scores):
l_recall = (i + 1) / num_gt
if i < (l... | 39.56974 | 79 | 0.516191 |
7980457d5e37f85363b711f81c09f1f9af1e7074 | 1,321 | py | Python | snips_nlu/slot_filler/features_utils.py | ddorian/snips-nlu | 0934d386bb138ebb34764446416856cfac664e65 | [
"Apache-2.0"
] | 1 | 2019-01-07T05:50:06.000Z | 2019-01-07T05:50:06.000Z | snips_nlu/slot_filler/features_utils.py | ddorian/snips-nlu | 0934d386bb138ebb34764446416856cfac664e65 | [
"Apache-2.0"
] | null | null | null | snips_nlu/slot_filler/features_utils.py | ddorian/snips-nlu | 0934d386bb138ebb34764446416856cfac664e65 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from copy import deepcopy
from snips_nlu_utils import compute_all_ngrams
from snips_nlu.constants import (END, RES_MATCH_RANGE, START)
from snips_nlu.utils import LimitedSizeDict
_NGRAMS_CACHE = LimitedSizeDict(size_limit=1000)
def get_all_ngrams(tokens):
if not tokens:... | 27.520833 | 65 | 0.694171 |
7980458a7dc250dafa254e02daed085db742956e | 1,899 | py | Python | TensorFlowBasic/tensorBoard.py | moondaiy/TensorFlowTutorials | c7f0255e3704c5a40f72ac0707684fb201123c1c | [
"MIT"
] | 3 | 2018-10-16T10:51:04.000Z | 2019-01-03T02:15:03.000Z | TensorFlowBasic/tensorBoard.py | moondaiy/TensorFlowTutorials | c7f0255e3704c5a40f72ac0707684fb201123c1c | [
"MIT"
] | null | null | null | TensorFlowBasic/tensorBoard.py | moondaiy/TensorFlowTutorials | c7f0255e3704c5a40f72ac0707684fb201123c1c | [
"MIT"
] | null | null | null | import tensorflow as tf
#add_layer 函数里面所有的with都是为了tensorboard添加上去的
def add_layer(inputs, in_size, out_size, activation_function=None,nameScope="layer"):
# add one more layer and return the output of this layer
with tf.name_scope(nameScope):
with tf.name_scope('weights'):
Weights = tf.Var... | 33.910714 | 117 | 0.69247 |
7980473e155b50dc7c0bd5650204ee51d28b81f5 | 1,836 | py | Python | custom_components/afvalwijzer/const/const.py | kcleong/homeassistant-config | 15b7bc75f5d1055d8620ced87eed9d563475296d | [
"MIT"
] | null | null | null | custom_components/afvalwijzer/const/const.py | kcleong/homeassistant-config | 15b7bc75f5d1055d8620ced87eed9d563475296d | [
"MIT"
] | null | null | null | custom_components/afvalwijzer/const/const.py | kcleong/homeassistant-config | 15b7bc75f5d1055d8620ced87eed9d563475296d | [
"MIT"
] | null | null | null | import logging
from datetime import timedelta
API = "api"
NAME = "afvalwijzer"
VERSION = "2021.05.01"
ISSUE_URL = "https://github.com/xirixiz/homeassistant-afvalwijzer/issues"
SENSOR_PROVIDER_TO_URL = {
"afvalwijzer_data_default": [
"https://api.{0}.nl/webservices/appsinput/?apikey=5ef443e778f41c4f75c6945... | 34 | 255 | 0.754357 |
79804855d7e7dd1b946bc478355f3868b3e49833 | 1,686 | py | Python | src/util/create_log.py | Mahas1/OCSysInfo | f6179f0b6b37c6ea02e9cdbc8e5514f9c339edf7 | [
"MIT"
] | null | null | null | src/util/create_log.py | Mahas1/OCSysInfo | f6179f0b6b37c6ea02e9cdbc8e5514f9c339edf7 | [
"MIT"
] | null | null | null | src/util/create_log.py | Mahas1/OCSysInfo | f6179f0b6b37c6ea02e9cdbc8e5514f9c339edf7 | [
"MIT"
] | null | null | null | import os
from sys import exit
def create_log(create_dump=None):
paths = [None, None]
bundle_id = "OCSysInfo"
lib_logs = os.path.join(
os.path.expanduser("~"),
"Library",
"Logs"
)
lib_app = os.path.join(
os.path.expanduser("~"),
"Library",
"Applicat... | 25.545455 | 120 | 0.527877 |
7980488f7ce9a3d8cf33ef96d8651f27dd960707 | 2,169 | py | Python | kiel/protocol/request.py | denissmirnov/kiel | fa80aa1ccd790c0fbbd8cc46a72162195e1aed69 | [
"Apache-2.0"
] | 47 | 2016-02-23T18:32:55.000Z | 2021-12-03T00:50:52.000Z | kiel/protocol/request.py | denissmirnov/kiel | fa80aa1ccd790c0fbbd8cc46a72162195e1aed69 | [
"Apache-2.0"
] | 21 | 2016-02-23T01:41:18.000Z | 2020-10-27T21:09:32.000Z | kiel/protocol/request.py | denissmirnov/kiel | fa80aa1ccd790c0fbbd8cc46a72162195e1aed69 | [
"Apache-2.0"
] | 13 | 2016-05-18T06:16:48.000Z | 2019-10-31T19:35:25.000Z | import binascii
import hashlib
import os
import socket
import struct
from six import BytesIO
from kiel.constants import CLIENT_ID, API_VERSION, API_KEYS
from .part import Part
from .primitives import Int16, Int32, String
machine_hash = hashlib.md5()
machine_hash.update(socket.gethostname().encode("UTF-8"))
machine... | 24.931034 | 77 | 0.64592 |
798048c0aff90685e3ed2d85ad801a45eaa9dc30 | 5,298 | py | Python | tests/cases/search_test.py | ecohealthalliance/girder | 7638feab8e36da59f3d211e5a62e625551841230 | [
"Apache-2.0"
] | null | null | null | tests/cases/search_test.py | ecohealthalliance/girder | 7638feab8e36da59f3d211e5a62e625551841230 | [
"Apache-2.0"
] | null | null | null | tests/cases/search_test.py | ecohealthalliance/girder | 7638feab8e36da59f3d211e5a62e625551841230 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 Kitware 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 cop... | 31.164706 | 79 | 0.482446 |
79804957cf1d6b6581b7876d648e6f1bdf5d1fc7 | 35,934 | py | Python | deepy/core/dummy_loop_utils.py | uaca/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 260 | 2015-05-16T07:58:29.000Z | 2016-01-07T09:10:47.000Z | deepy/core/dummy_loop_utils.py | uaca/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 20 | 2015-04-21T01:46:46.000Z | 2015-12-20T00:04:23.000Z | deepy/core/dummy_loop_utils.py | zomux/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 50 | 2016-01-27T03:45:25.000Z | 2020-12-16T07:02:57.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The code in this file is from the scan function in theano.
Never modify this file directly.
"""
import logging
import numpy
import warnings
from theano.compat import ifilter, izip
from six import iteritems, integer_types
from six.moves import xrange
from theano.com... | 41.783721 | 87 | 0.578115 |
79804a6a13dcab6544906c6f57f10edfd41c1326 | 1,136 | py | Python | app/user/views.py | mer-salem/recipe-app-api | 52e51c1fc812c19d727463a081719cd3cc423e0f | [
"MIT"
] | null | null | null | app/user/views.py | mer-salem/recipe-app-api | 52e51c1fc812c19d727463a081719cd3cc423e0f | [
"MIT"
] | null | null | null | app/user/views.py | mer-salem/recipe-app-api | 52e51c1fc812c19d727463a081719cd3cc423e0f | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework.authtoken.views import ObtainAuthToken
from .serializers import SerializerUser, AuthTokenSerializer
from rest_framework import generics, mixins, viewsets
from rest_framework.settings import api_settings
from django.contrib.auth import get_user_model
from rest_fram... | 35.5 | 81 | 0.822183 |
79804aabd5d847c53b0e698a3cef682730b44c33 | 35,136 | py | Python | netbox/ipam/views.py | kkthxbye-code/netbox | 39a9ebaeee982dc787de5df3b42f66ac9fbe39d4 | [
"Apache-2.0"
] | null | null | null | netbox/ipam/views.py | kkthxbye-code/netbox | 39a9ebaeee982dc787de5df3b42f66ac9fbe39d4 | [
"Apache-2.0"
] | null | null | null | netbox/ipam/views.py | kkthxbye-code/netbox | 39a9ebaeee982dc787de5df3b42f66ac9fbe39d4 | [
"Apache-2.0"
] | null | null | null | from django.contrib.contenttypes.models import ContentType
from django.db.models import Prefetch
from django.db.models.expressions import RawSQL
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from circuits.models import Provider
from circuits.tables import ProviderTabl... | 31.011474 | 121 | 0.704946 |
79804b6c7931d0d4e9962df6cd80816cd54bc581 | 7,671 | py | Python | tests/manage/z_cluster/cluster_expansion/test_delete_pod.py | ramkiperiy/ocs-ci | 128f408a9b6efe211cb2f51e742392de12807a3b | [
"MIT"
] | null | null | null | tests/manage/z_cluster/cluster_expansion/test_delete_pod.py | ramkiperiy/ocs-ci | 128f408a9b6efe211cb2f51e742392de12807a3b | [
"MIT"
] | null | null | null | tests/manage/z_cluster/cluster_expansion/test_delete_pod.py | ramkiperiy/ocs-ci | 128f408a9b6efe211cb2f51e742392de12807a3b | [
"MIT"
] | null | null | null | import pytest
import logging
from concurrent.futures import ThreadPoolExecutor
from ocs_ci.framework.testlib import ignore_leftovers, tier4c, skipif_managed_service
from ocs_ci.framework import config
from ocs_ci.ocs import constants
from ocs_ci.ocs.ocp import OCP
from ocs_ci.ocs.resources import pod as pod_helpers
f... | 38.939086 | 108 | 0.650111 |
79804d5576d1d4d8f112dcfcc5bb47ac209479fa | 6,633 | py | Python | src/rlai/runners/agent_in_environment.py | MatthewGerber/rlai | f390433c3adc285e1e9cc113deed7009b2e6dd5a | [
"MIT"
] | 9 | 2021-05-09T22:30:42.000Z | 2021-12-27T19:42:56.000Z | src/rlai/runners/agent_in_environment.py | MatthewGerber/rlai | f390433c3adc285e1e9cc113deed7009b2e6dd5a | [
"MIT"
] | 13 | 2020-11-18T03:30:39.000Z | 2021-12-12T04:19:16.000Z | src/rlai/runners/agent_in_environment.py | MatthewGerber/rlai | f390433c3adc285e1e9cc113deed7009b2e6dd5a | [
"MIT"
] | 1 | 2021-06-24T16:48:59.000Z | 2021-06-24T16:48:59.000Z | import logging
import math
import os
import pickle
import sys
import warnings
from argparse import ArgumentParser
from typing import List
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
from numpy.random import RandomState
from rlai.meta import rl_text
from rlai.policies.parameter... | 30.15 | 165 | 0.644656 |
79804d68eaadec1802690dc6078955b23b88e085 | 32,952 | py | Python | voicegain_speech/models/aivr_callback_response.py | voicegain/python-sdk | 988fdbc4f0a462fbb55fcc8dde20cc2a8f962040 | [
"Apache-2.0"
] | 2 | 2020-08-07T01:17:18.000Z | 2021-11-29T12:42:52.000Z | voicegain_speech/models/aivr_callback_response.py | voicegain/python-sdk | 988fdbc4f0a462fbb55fcc8dde20cc2a8f962040 | [
"Apache-2.0"
] | null | null | null | voicegain_speech/models/aivr_callback_response.py | voicegain/python-sdk | 988fdbc4f0a462fbb55fcc8dde20cc2a8f962040 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Voicegain API v1
# New [Telephony Bot API](#tag/aivr-callback) for building interactive speech-enabled phone applications (IVR, Voicebots, etc.). # Intro to Voicegain APIs The APIs are provided by [Voicegain](https://www.voicegain.ai) to its registered customers. </br> The core APIs a... | 104.278481 | 23,524 | 0.722718 |
79804ddd985f56bc74a1f42be9de586f46a9a1fb | 956 | bzl | Python | third_party/rules_rust/crate_universe_defaults.bzl | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | 1 | 2022-01-06T04:50:09.000Z | 2022-01-06T04:50:09.000Z | third_party/rules_rust/crate_universe_defaults.bzl | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | 1 | 2022-01-23T06:09:21.000Z | 2022-01-23T06:14:17.000Z | third_party/rules_rust/crate_universe_defaults.bzl | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | null | null | null | """A helper module defining generated information about crate_universe dependencies"""
# This global should match the current release of `crate_unvierse`.
DEFAULT_URL_TEMPLATE = "https://github.com/bazelbuild/rules_rust/releases/download/crate_universe-13/crate_universe_resolver-{host_triple}{extension}"
# Note that ... | 63.733333 | 150 | 0.833682 |
79804df0b48679fe94e28d49114b3c7d4db8e8fd | 701 | py | Python | hackerrank/Algorithms/Big Sorting/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | 4 | 2020-07-24T01:59:50.000Z | 2021-07-24T15:14:08.000Z | hackerrank/Algorithms/Big Sorting/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | hackerrank/Algorithms/Big Sorting/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | import unittest
import solution
class TestQ(unittest.TestCase):
def test_case_0(self):
self.assertEqual(
solution.bigSorting(['31415926535897932384626433832795', '1', '3', '10', '3', '5']),
['1', '3', '3', '5', '10', '31415926535897932384626433832795']
)
def test_case... | 29.208333 | 120 | 0.579173 |
79804e1679749776a09d21b867a0c1936b8c593d | 1,858 | py | Python | city_scrapers/pipelines/migration.py | mattpair/city-scrapers | 3734cdcae41a295ccf35d8a957c09023fcaa041d | [
"MIT"
] | null | null | null | city_scrapers/pipelines/migration.py | mattpair/city-scrapers | 3734cdcae41a295ccf35d8a957c09023fcaa041d | [
"MIT"
] | null | null | null | city_scrapers/pipelines/migration.py | mattpair/city-scrapers | 3734cdcae41a295ccf35d8a957c09023fcaa041d | [
"MIT"
] | null | null | null | from datetime import datetime, time
from city_scrapers_core.decorators import ignore_jscalendar
from city_scrapers_core.items import Meeting
class MigrationPipeline:
"""Migrates to city_scrapers_core Meeting object instead of dictionaries"""
@ignore_jscalendar
def process_item(self, item, spider):
... | 33.781818 | 79 | 0.574812 |
79804fcf665ec27a9adfc7916de1b9f5f7874d17 | 2,999 | py | Python | LeetCoding/leetcoding.py | Freedomisgood/When_Coding_in_ZJU | 2e6181cc5ef10004e8c190e3e981d95d80c8d2a7 | [
"MIT"
] | 10 | 2021-09-15T02:18:54.000Z | 2022-03-26T15:10:33.000Z | LeetCoding/leetcoding.py | Freedomisgood/When_Coding_in_ZJU | 2e6181cc5ef10004e8c190e3e981d95d80c8d2a7 | [
"MIT"
] | null | null | null | LeetCoding/leetcoding.py | Freedomisgood/When_Coding_in_ZJU | 2e6181cc5ef10004e8c190e3e981d95d80c8d2a7 | [
"MIT"
] | 13 | 2022-01-11T04:34:53.000Z | 2022-03-31T13:58:36.000Z | import json
import os
import requests
def getQuestion():
base_url = 'https://leetcode-cn.com'
# 获取今日每日一题的题名(英文)
response = requests.post(base_url + "/graphql", json={
"operationName": "questionOfToday",
"variables": {},
"query": "query questionOfToday { todayRecord { question {... | 53.553571 | 1,087 | 0.613871 |
7980510f13bd782efc0123d85bc7df48fa97d5ed | 3,280 | py | Python | anaf/account/cron.py | tovmeod/anaf | 80e4a00532ce6f4ce76c5ffc858ff90c759a9879 | [
"BSD-3-Clause"
] | 2 | 2016-03-15T13:17:26.000Z | 2017-03-22T15:39:01.000Z | anaf/account/cron.py | tovmeod/anaf | 80e4a00532ce6f4ce76c5ffc858ff90c759a9879 | [
"BSD-3-Clause"
] | 4 | 2021-03-19T21:42:58.000Z | 2022-03-11T23:13:07.000Z | anaf/account/cron.py | tovmeod/anaf | 80e4a00532ce6f4ce76c5ffc858ff90c759a9879 | [
"BSD-3-Clause"
] | 4 | 2016-08-31T16:55:41.000Z | 2020-04-22T18:48:54.000Z | """
Account cron jobs
"""
import codecs
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.db.models import Q
from django.utils.html import strip_tags
from django.contrib.sites.models import Site
from datetime import datetime, timedelta
from anaf.core.mail impo... | 40 | 150 | 0.577134 |
798051ef90cd708be73785134695c5e8eb2e6cf9 | 686 | py | Python | tests/testing_config/custom_components/light/test.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 4 | 2019-07-03T22:36:57.000Z | 2019-08-10T15:33:25.000Z | tests/testing_config/custom_components/light/test.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 7 | 2019-08-23T05:26:02.000Z | 2022-03-11T23:57:18.000Z | tests/testing_config/custom_components/light/test.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 3 | 2019-04-28T16:35:45.000Z | 2020-05-28T15:21:59.000Z | """
Provide a mock light platform.
Call init before using it in your tests to ensure clean test data.
"""
from homeassistant.const import STATE_ON, STATE_OFF
from tests.common import MockToggleDevice
DEVICES = []
def init(empty=False):
"""Initialize the platform with devices."""
global DEVICES
DEVICES... | 24.5 | 73 | 0.689504 |
7980525d6442c672284be2b1f74c4fec9b2c308b | 9,579 | py | Python | crawler/LD.py | VictorXianwu/Spider | 9f80e9efe24e37af7a8a07c586c04b851b7d3d59 | [
"MIT"
] | 3 | 2016-01-11T05:39:42.000Z | 2018-01-08T10:58:43.000Z | crawler/LD.py | XianwuLin/Spider | 9f80e9efe24e37af7a8a07c586c04b851b7d3d59 | [
"MIT"
] | null | null | null | crawler/LD.py | XianwuLin/Spider | 9f80e9efe24e37af7a8a07c586c04b851b7d3d59 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author : 'Victor'
# E-mail : linxianwusx@gmail.com
# Date : '2015/10/11'
# Version : 0.3
#
import Queue
import ConfigParser
import os
import requests
import threading
import cchardet
import re
import sqlite3 as sq
import time
import jsonpickle
NUM = 0
mutex... | 32.252525 | 149 | 0.544107 |
79805358e726f5eccca4c8cdb1992042eadaba86 | 11,224 | py | Python | venv/Lib/site-packages/IPython/external/qt_loaders.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | venv/Lib/site-packages/IPython/external/qt_loaders.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | venv/Lib/site-packages/IPython/external/qt_loaders.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | """
This module contains factory functions that attempt
to return Qt submodules from the various python Qt bindings.
It also protects against double-importing Qt with different
bindings, which is unstable and likely to crash
This is used primarily by qt and qt_for_kernel, and shouldn't
be accessed directly from the o... | 27.920398 | 87 | 0.646561 |
798054cc4c7b0675c9c3e106ce7f1d741dd07954 | 673 | py | Python | server/sections/migrations/0001_initial.py | ShahriarDhruvo/HackTheVerse_SUST_NOOBs | e884e47e5e987eac45f86faacc78be7db6e588ac | [
"MIT"
] | 3 | 2020-11-18T15:09:50.000Z | 2021-08-03T16:56:10.000Z | server/sections/migrations/0001_initial.py | ShahriarDhruvo/HackTheVerse_SUST_NOOBs | e884e47e5e987eac45f86faacc78be7db6e588ac | [
"MIT"
] | null | null | null | server/sections/migrations/0001_initial.py | ShahriarDhruvo/HackTheVerse_SUST_NOOBs | e884e47e5e987eac45f86faacc78be7db6e588ac | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-11-14 14:11
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('rooms', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Sec... | 26.92 | 117 | 0.597325 |
798054f3506291f27090e7ae688486e9d5e7dadb | 493 | py | Python | pepdb/core/migrations/0069_declaration_relatives_populated.py | dchaplinsky/pep.org.ua | 8633a65fb657d7f04dbdb12eb8ae705fa6be67e3 | [
"MIT"
] | 7 | 2015-12-21T03:52:46.000Z | 2020-07-24T19:17:23.000Z | pepdb/core/migrations/0069_declaration_relatives_populated.py | dchaplinsky/pep.org.ua | 8633a65fb657d7f04dbdb12eb8ae705fa6be67e3 | [
"MIT"
] | 12 | 2016-03-05T18:11:05.000Z | 2021-06-17T20:20:03.000Z | pepdb/core/migrations/0069_declaration_relatives_populated.py | dchaplinsky/pep.org.ua | 8633a65fb657d7f04dbdb12eb8ae705fa6be67e3 | [
"MIT"
] | 4 | 2016-07-17T20:19:38.000Z | 2021-03-23T12:47:20.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0068_person2person_declaration'),
]
operations = [
migrations.AddField(
model_name='declaration',
... | 24.65 | 121 | 0.649087 |
7980563e748f3d14437f6afa930e6e88f0351793 | 1,936 | py | Python | full face.py | h4ck1337/Snapchat-filter | 72ac1cc243ccfa143c61f84b4b53e5b9883c4cab | [
"MIT"
] | 1 | 2019-08-16T18:47:17.000Z | 2019-08-16T18:47:17.000Z | full face.py | h4ck1337/Snapchat-filter | 72ac1cc243ccfa143c61f84b4b53e5b9883c4cab | [
"MIT"
] | null | null | null | full face.py | h4ck1337/Snapchat-filter | 72ac1cc243ccfa143c61f84b4b53e5b9883c4cab | [
"MIT"
] | null | null | null | import cv2
import numpy as np
cap=cv2.VideoCapture(0)
face_detect=cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
eye_detect=cv2.CascadeClassifier('frontalEyes35x16.xml')
noise_detect=cv2.CascadeClassifier('Nose18x15.xml')
mustache=cv2.imread('mustache.png',-1)
glasses=cv2.imread('glasses.png',-1)... | 32.266667 | 73 | 0.695248 |
79805679470d3155f2dfb0d6d9ff3191a82d6d61 | 74,468 | py | Python | snakebite/protobuf/hdfs_pb2.py | cglewis/snakebite | 98bb423d5fed9803e94782e93a3a7b8ca8d46fc8 | [
"Apache-2.0"
] | 1 | 2020-09-06T09:30:01.000Z | 2020-09-06T09:30:01.000Z | snakebite/protobuf/hdfs_pb2.py | cglewis/snakebite | 98bb423d5fed9803e94782e93a3a7b8ca8d46fc8 | [
"Apache-2.0"
] | null | null | null | snakebite/protobuf/hdfs_pb2.py | cglewis/snakebite | 98bb423d5fed9803e94782e93a3a7b8ca8d46fc8 | [
"Apache-2.0"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
from google.protobuf import descriptor
from google.protobuf import message
from google.protobuf import reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
DESCRIPTOR = descriptor.FileDescriptor(
name='hdfs.proto',
p... | 39.070304 | 7,608 | 0.744615 |
7980569104f2ca32eee33f0d806ee287df987257 | 6,812 | py | Python | nox.py | fernhtls/python-docs-samples | a1f2903d2144ee2981acc89a9668d9289e1aa248 | [
"Apache-2.0"
] | null | null | null | nox.py | fernhtls/python-docs-samples | a1f2903d2144ee2981acc89a9668d9289e1aa248 | [
"Apache-2.0"
] | 2 | 2021-06-10T23:54:32.000Z | 2021-06-10T23:54:33.000Z | nox.py | fernhtls/python-docs-samples | a1f2903d2144ee2981acc89a9668d9289e1aa248 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 33.55665 | 79 | 0.650323 |
79805726aa5e7c96ed78d4dc160463683412db45 | 2,116 | py | Python | slashtags/context.py | P4RZ1V4L-93/Cogs | 8b2b2bf3bcb2c961efd2f70a2cae0ff1f622c019 | [
"MIT"
] | null | null | null | slashtags/context.py | P4RZ1V4L-93/Cogs | 8b2b2bf3bcb2c961efd2f70a2cae0ff1f622c019 | [
"MIT"
] | null | null | null | slashtags/context.py | P4RZ1V4L-93/Cogs | 8b2b2bf3bcb2c961efd2f70a2cae0ff1f622c019 | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020-2021 phenom4n4n
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publis... | 35.864407 | 98 | 0.715974 |
7980584fe8f2828f176925864144496756be9a27 | 8,699 | py | Python | tests/beemgraphene/test_base58.py | morphene/morphene-python | 7c6144c7337330490229ce69b8c3fb5dc2e3d08e | [
"MIT"
] | 118 | 2018-03-06T07:26:19.000Z | 2022-03-21T20:16:04.000Z | tests/beemgraphene/test_base58.py | morphene/morphene-python | 7c6144c7337330490229ce69b8c3fb5dc2e3d08e | [
"MIT"
] | 248 | 2018-03-20T18:03:39.000Z | 2022-03-28T16:38:09.000Z | tests/beemgraphene/test_base58.py | morphene/morphene-python | 7c6144c7337330490229ce69b8c3fb5dc2e3d08e | [
"MIT"
] | 81 | 2018-04-27T15:27:52.000Z | 2021-10-31T06:14:25.000Z | # This Python file uses the following encoding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
from beemgraphenebase.base58 import (
Base58,
base58decode,
base58encode,
ripemd160,
... | 76.307018 | 140 | 0.712381 |
7980591223467733dfa370e4f8a4e599420b896f | 5,653 | py | Python | prettyexc/core.py | youknowone/prettyexc | 03894a86c72d3196c3326a5a8bce2a961c87f60d | [
"BSD-2-Clause-FreeBSD"
] | 6 | 2015-10-28T13:40:50.000Z | 2020-03-24T06:05:30.000Z | prettyexc/core.py | youknowone/prettyexc | 03894a86c72d3196c3326a5a8bce2a961c87f60d | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | prettyexc/core.py | youknowone/prettyexc | 03894a86c72d3196c3326a5a8bce2a961c87f60d | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2015-08-31T16:32:00.000Z | 2017-05-31T08:32:42.000Z |
from six import PY3, text_type
from .environment import (
default_unicode_environment, default_repr_environment, args_environment)
def _arg_to_unicode(arg, env):
if not PY3 and isinstance(arg, str):
arg = arg.decode(env.DEFAULT_CHARSET)
targ = text_type(arg)
if targ == arg:
targ = u''... | 30.89071 | 77 | 0.574031 |
7980595d4600e1efb7374b482179ffcfdab98a68 | 16,731 | py | Python | test/apps/minermedic/resources/mining_pools/f2pool.py | holitics/minermedic | 39dd03e58d665bea23f1e9c9ab134a794d092cb1 | [
"Apache-2.0"
] | 2 | 2020-02-13T15:32:43.000Z | 2020-04-08T04:10:10.000Z | test/apps/minermedic/resources/mining_pools/f2pool.py | alimogh/minermedic | 39dd03e58d665bea23f1e9c9ab134a794d092cb1 | [
"Apache-2.0"
] | 11 | 2019-11-23T00:20:23.000Z | 2020-01-02T02:17:55.000Z | test/apps/minermedic/resources/mining_pools/f2pool.py | alimogh/minermedic | 39dd03e58d665bea23f1e9c9ab134a794d092cb1 | [
"Apache-2.0"
] | 2 | 2020-06-15T22:32:43.000Z | 2020-07-17T18:40:58.000Z | routes = {
'/data/price?fsym=BTC&tsyms=USD': {'USD': 7500.22},
'/data/price?fsym=LTC&tsyms=USD' : {'USD': 46.80},
'/litecoin/holitics/001' : {"hashrate_history": {"2019-11-30T18:30:00Z": 171798692, "2019-11-30T18:40:00Z": 264856317, "2019-11-30T18:50:00Z": 193273528, "2019-11-30T19:00:00Z": 300647711, "2019-11-30... | 2,788.5 | 8,515 | 0.642101 |
798059f37011d5bbc6d1e335fa2316881b1af3bf | 367 | py | Python | root/raspberrypi/RaspberryPiPrj/MLX90614/ir_sensor.py | ChyiYaqing/chyidlTutorial | 77e7f6f84f21537a58a8a8a42e31cf2e3dd31996 | [
"MIT"
] | 5 | 2018-10-17T05:57:39.000Z | 2021-07-05T15:38:24.000Z | root/raspberrypi/RaspberryPiPrj/MLX90614/ir_sensor.py | ChyiYaqing/chyidlTutorial | 77e7f6f84f21537a58a8a8a42e31cf2e3dd31996 | [
"MIT"
] | 2 | 2021-04-14T00:48:43.000Z | 2021-04-14T02:20:50.000Z | root/raspberrypi/RaspberryPiPrj/MLX90614/ir_sensor.py | ChyiYaqing/chyidlTutorial | 77e7f6f84f21537a58a8a8a42e31cf2e3dd31996 | [
"MIT"
] | 3 | 2019-03-02T14:36:19.000Z | 2022-03-18T10:12:09.000Z | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
import smbus
import time
port = 1
bus = smbus.SMBus(port)
device_address = 0x5a
while True:
try:
reading = bus.read_word_data(device_address, 0x07)
temp = reading * 0.02 - 273.15
print("temp: {} ⁰C".format(round(temp,2)))
except IOError:
... | 18.35 | 58 | 0.60218 |
79805adb224ff77e61447910f6a8a2f0799de073 | 8,882 | py | Python | cobra_sbml_validator.py | aebrahim/cobra_sbml_validator | b041d2cd10e48faac508f6cbf785ab7624d7a3c8 | [
"MIT"
] | 4 | 2017-01-11T00:05:33.000Z | 2020-02-15T01:05:51.000Z | cobra_sbml_validator.py | aebrahim/cobra_sbml_validator | b041d2cd10e48faac508f6cbf785ab7624d7a3c8 | [
"MIT"
] | 6 | 2016-05-11T15:13:54.000Z | 2021-03-25T20:59:20.000Z | cobra_sbml_validator.py | aebrahim/cobra_sbml_validator | b041d2cd10e48faac508f6cbf785ab7624d7a3c8 | [
"MIT"
] | 7 | 2016-04-11T07:17:35.000Z | 2018-05-22T10:29:31.000Z | # -*- coding: utf-8 -*-
from gzip import GzipFile
from bz2 import decompress as bz2_decompress
from tempfile import NamedTemporaryFile
from json import dumps
import re
from warnings import catch_warnings
from os import unlink, path
from codecs import getreader
from six import BytesIO, StringIO, iteritems
import jsonsc... | 35.959514 | 105 | 0.622382 |
79805ba6a085a8f2f79472d69e893921245a525c | 26,717 | py | Python | scripts/android/build_apk.py | xjtuhu/VK-GL-CTS | fd68124a565ef6f0a6e3fee6d9d29493ed875be9 | [
"Apache-2.0"
] | null | null | null | scripts/android/build_apk.py | xjtuhu/VK-GL-CTS | fd68124a565ef6f0a6e3fee6d9d29493ed875be9 | [
"Apache-2.0"
] | null | null | null | scripts/android/build_apk.py | xjtuhu/VK-GL-CTS | fd68124a565ef6f0a6e3fee6d9d29493ed875be9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# drawElements Quality Program utilities
# --------------------------------------
#
# Copyright 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use t... | 28.301907 | 168 | 0.701463 |
79805bec85af036ac880280d4c9fb586cf0a5a78 | 378,976 | py | Python | pandas/core/generic.py | pedrooa/pandas | fc41f92cab49050b74cdd3dae37a8186b923c502 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/generic.py | pedrooa/pandas | fc41f92cab49050b74cdd3dae37a8186b923c502 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/generic.py | pedrooa/pandas | fc41f92cab49050b74cdd3dae37a8186b923c502 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | import collections
from datetime import timedelta
import functools
import gc
import json
import operator
import pickle
import re
from textwrap import dedent
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
FrozenSet,
Hashable,
List,
Mapping,
Optional,
Sequence,
Set,
... | 33.240593 | 104 | 0.528361 |
79805c7b88078cb6032fda191d280dee108fdc94 | 207 | py | Python | data/events/panel_event_handler.py | keremAtaman/TensorflowExporter | 1d7b61d39ee7184d34b0293ac460548c85911fc1 | [
"MIT"
] | null | null | null | data/events/panel_event_handler.py | keremAtaman/TensorflowExporter | 1d7b61d39ee7184d34b0293ac460548c85911fc1 | [
"MIT"
] | 44 | 2021-07-19T17:44:45.000Z | 2021-08-10T12:23:08.000Z | data/events/panel_event_handler.py | keremAtaman/TensorflowExporter | 1d7b61d39ee7184d34b0293ac460548c85911fc1 | [
"MIT"
] | null | null | null | class PanelEventHandler:
# TODO LATER: this was empty in db, so this is ignored for now
def __init__(self):
pass
def handle_event(self):
pass
def send_data(self):
pass | 25.875 | 66 | 0.628019 |
79805da1d190f801da554c567df0a081820e3ee6 | 1,316 | py | Python | cards/urls.py | vugutsa/Flashcards | a16253b855c7345e14e00cf1091748a1119bc782 | [
"RSA-MD"
] | null | null | null | cards/urls.py | vugutsa/Flashcards | a16253b855c7345e14e00cf1091748a1119bc782 | [
"RSA-MD"
] | null | null | null | cards/urls.py | vugutsa/Flashcards | a16253b855c7345e14e00cf1091748a1119bc782 | [
"RSA-MD"
] | null | null | null | from django.urls import path, include
from django.contrib.auth import views as auth_views
from django.conf import settings
from django.conf.urls.static import static
from . import views
from django.contrib.auth.views import LoginView, LogoutView
urlpatterns = [
path('',views.home,name='home'),
path('accounts/... | 52.64 | 113 | 0.737082 |
79805db3bf17e61dacfa34f594d258ca3184ff38 | 5,037 | py | Python | hdlogger/serializers/tracers/DELETE.py | incognitoRepo/hdlogger | c738161ef3144469ba0f47caf89770613031e96e | [
"BSD-2-Clause"
] | null | null | null | hdlogger/serializers/tracers/DELETE.py | incognitoRepo/hdlogger | c738161ef3144469ba0f47caf89770613031e96e | [
"BSD-2-Clause"
] | null | null | null | hdlogger/serializers/tracers/DELETE.py | incognitoRepo/hdlogger | c738161ef3144469ba0f47caf89770613031e96e | [
"BSD-2-Clause"
] | null | null | null | from prettyprinter import pformat
import inspect
from functools import cached_property
class PickleableState:
def __init__(self, kwds):
self.attrs = list(kwds.keys())
self.filename: str = kwds['format_filename']
self.frame: PickleableFrame = kwds['frame']
self.event: str = kwds['event']
self.arg: ... | 28.948276 | 95 | 0.638078 |
79805dbaab042ed76b1cf751bed384f445b0ac30 | 13,097 | py | Python | pyscf/pbc/gto/test/test_cell.py | azag0/pyscf | 1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b | [
"Apache-2.0"
] | 2 | 2021-09-17T06:10:17.000Z | 2022-01-22T23:37:22.000Z | pyscf/pbc/gto/test/test_cell.py | azag0/pyscf | 1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b | [
"Apache-2.0"
] | null | null | null | pyscf/pbc/gto/test/test_cell.py | azag0/pyscf | 1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b | [
"Apache-2.0"
] | 2 | 2020-06-01T05:31:38.000Z | 2022-02-08T02:38:33.000Z | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... | 36.481894 | 88 | 0.553562 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.