hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
03736ce865becfd2933f31fb139629cd1e53096b | 26,090 | py | Python | loop_step/loop.py | MolSSI/loop_step | 87a1ef834388468a29e4a689d2c12df638136206 | [
"BSD-3-Clause"
] | null | null | null | loop_step/loop.py | MolSSI/loop_step | 87a1ef834388468a29e4a689d2c12df638136206 | [
"BSD-3-Clause"
] | null | null | null | loop_step/loop.py | MolSSI/loop_step | 87a1ef834388468a29e4a689d2c12df638136206 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Non-graphical part of the Loop step in a SEAMM flowchart"""
import logging
from pathlib import Path
import re
import sys
import traceback
import psutil
import pprint
import loop_step
import seamm
import seamm_util
import seamm_util.printing as printing
from seamm_util.printing import Form... | 39.530303 | 88 | 0.463933 |
46d6339d5cc13d1ab178c3a9051b10852b5c5738 | 5,038 | py | Python | adaptmesh/tri/voronoi.py | arturs-berzins/adaptmesh | 8ce257d85b5943d2bca578ca67490e6b85ea8bec | [
"MIT"
] | 11 | 2020-09-01T23:14:52.000Z | 2022-03-01T00:35:14.000Z | adaptmesh/tri/voronoi.py | arturs-berzins/adaptmesh | 8ce257d85b5943d2bca578ca67490e6b85ea8bec | [
"MIT"
] | 6 | 2021-01-16T20:21:51.000Z | 2022-02-04T14:29:20.000Z | adaptmesh/tri/voronoi.py | arturs-berzins/adaptmesh | 8ce257d85b5943d2bca578ca67490e6b85ea8bec | [
"MIT"
] | 2 | 2021-01-20T03:16:13.000Z | 2022-02-04T09:30:01.000Z | from simplegeom.geometry import LineString
from topomap.loopfactory import find_loops
from topomap.topomap import TopoMap
from . import ToPointsAndSegments, triangulate
from .delaunay import TriangleIterator, ccw, output_triangles
# from splitarea.flagging import MidpointHarvester
# from splitarea.densify import dens... | 32.928105 | 84 | 0.509726 |
7c8b091c9cdac422cb9a198de2612ae03469cd56 | 2,562 | py | Python | src/app/smb.py | mtnmunuklu/SMB | 646d51097d1f31be33c163fd88a36492036b298e | [
"MIT"
] | null | null | null | src/app/smb.py | mtnmunuklu/SMB | 646d51097d1f31be33c163fd88a36492036b298e | [
"MIT"
] | null | null | null | src/app/smb.py | mtnmunuklu/SMB | 646d51097d1f31be33c163fd88a36492036b298e | [
"MIT"
] | null | null | null | from src.config import Config
from smb.SMBConnection import SMBConnection
from smb import smb_structs
import logging
from src.app.logger import Logger
class SMBClient:
def __init__(self):
self.username = Config.USERNAME
self.password = Config.PASSWORD
self.domain = Config.DOMAIN
se... | 38.818182 | 154 | 0.654176 |
92ec1a79aa56994e71f763b1fea1ca3f88478806 | 1,278 | py | Python | pix2pix/Discriminator.py | yubin1219/GAN | 8345095f9816e548c968492efbe92b427b0e06a3 | [
"MIT"
] | null | null | null | pix2pix/Discriminator.py | yubin1219/GAN | 8345095f9816e548c968492efbe92b427b0e06a3 | [
"MIT"
] | null | null | null | pix2pix/Discriminator.py | yubin1219/GAN | 8345095f9816e548c968492efbe92b427b0e06a3 | [
"MIT"
] | 1 | 2021-09-17T01:28:50.000Z | 2021-09-17T01:28:50.000Z | import torch
import torch.nn as nn
class Discriminator(nn.Module):
def __init__(self, input_nc, ndf=64, norm_layer=nn.BatchNorm2d, use_sigmoid=False) :
super(Discriminator, self).__init__()
self.conv1 = nn.Sequential(
nn.Conv2d(input_nc, ndf, kernel_size=4, stride=2, padding=1),
nn.LeakyReLU(0.2,... | 29.045455 | 86 | 0.58216 |
514e5acea9d6edc194bc88039e005defb73b8634 | 11,987 | py | Python | usaspending_api/awards/v2/data_layer/orm_mappers.py | Violet26/usaspending-api | 3e2b54662bb27217f4af223d429b09c112a01a5a | [
"CC0-1.0"
] | null | null | null | usaspending_api/awards/v2/data_layer/orm_mappers.py | Violet26/usaspending-api | 3e2b54662bb27217f4af223d429b09c112a01a5a | [
"CC0-1.0"
] | null | null | null | usaspending_api/awards/v2/data_layer/orm_mappers.py | Violet26/usaspending-api | 3e2b54662bb27217f4af223d429b09c112a01a5a | [
"CC0-1.0"
] | null | null | null | from collections import OrderedDict
# For all *_FIELDS ordered dictionaries:
# Key:Value => (DB field, API response field)
OFFICER_FIELDS = OrderedDict(
[
("officer_1_name", "_officer_1_name"),
("officer_1_amount", "_officer_1_amount"),
("officer_2_name", "_officer_2_name"),
("offi... | 51.226496 | 102 | 0.689497 |
3cc1ceeab2776ad282df7df22b6090bff4edb9b7 | 2,343 | py | Python | Proyecto/arduino/SistemaRiego/LecturaArduino.py | milkdoes/LaLluvia | 209d07aad3d0dfe9a2f17568c0c94eab8afb4346 | [
"MIT"
] | 1 | 2017-06-01T02:58:31.000Z | 2017-06-01T02:58:31.000Z | Proyecto/arduino/SistemaRiego/LecturaArduino.py | milkdoes/LaLluvia | 209d07aad3d0dfe9a2f17568c0c94eab8afb4346 | [
"MIT"
] | null | null | null | Proyecto/arduino/SistemaRiego/LecturaArduino.py | milkdoes/LaLluvia | 209d07aad3d0dfe9a2f17568c0c94eab8afb4346 | [
"MIT"
] | 2 | 2017-05-21T20:03:09.000Z | 2018-06-08T05:56:20.000Z | #!/usr/bin/python
# LIBRERIAS.
import serial
import MySQLdb
import json
# CLASES.
class ValorArduino(object):
def __init__(self, luz, temperatura, ph, humedad, regando):
self.luz = float(luz)
self.temperatura = float(temperatura)
self.ph = float(ph)
self.humedad = float(humedad)
... | 29.2875 | 80 | 0.672642 |
0e57835f306a72128fb6e1765bbbe5d83f78556b | 12,608 | py | Python | emission/src/EmissionDetailview.py | Mariusz1970/enigma2-plugins-1 | 126d31d075c156f32b09d4321ebe1a17f93a5bd6 | [
"OLDAP-2.3"
] | 2 | 2020-09-02T18:25:39.000Z | 2020-09-02T18:39:07.000Z | emission/src/EmissionDetailview.py | Mariusz1970/enigma2-plugins-1 | 126d31d075c156f32b09d4321ebe1a17f93a5bd6 | [
"OLDAP-2.3"
] | null | null | null | emission/src/EmissionDetailview.py | Mariusz1970/enigma2-plugins-1 | 126d31d075c156f32b09d4321ebe1a17f93a5bd6 | [
"OLDAP-2.3"
] | 11 | 2015-02-26T20:59:14.000Z | 2021-09-20T08:23:03.000Z | # -*- coding: utf-8 -*-
# GUI (Screens)
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox
from Screens.HelpMenu import HelpableScreen
# GUI (Components)
from Components.ActionMap import HelpableActionMap
from Components.Sources.List import List
from Co... | 39.15528 | 223 | 0.667751 |
fb30135f3dbfb9ac2c15c087e9bfcc4815137417 | 2,325 | py | Python | cogs/twitter.py | Drowrin/Weeabot | c919e9cd928bbb22f79a130bb3e8279c20b9a577 | [
"MIT"
] | 5 | 2017-02-05T06:28:03.000Z | 2021-04-23T13:19:54.000Z | cogs/twitter.py | Drowrin/Weeabot | c919e9cd928bbb22f79a130bb3e8279c20b9a577 | [
"MIT"
] | 7 | 2016-08-11T15:19:22.000Z | 2018-09-17T14:36:01.000Z | cogs/twitter.py | Drowrin/Weeabot | c919e9cd928bbb22f79a130bb3e8279c20b9a577 | [
"MIT"
] | 1 | 2016-06-06T00:05:07.000Z | 2016-06-06T00:05:07.000Z | import asyncio
import datetime
import discord
from discord.ext import commands
import utils
import checks
from twitter import Api
def get_shitpost_channel(b: discord.ext.commands.Bot, server: discord.Server):
return b.server_configs.get(server.id, {}).get('shitpost_channel', None)
class Twitter(utils.Session... | 36.328125 | 96 | 0.592258 |
aa46ac901d0109ec5fe3dafffb50ae72a30cf792 | 7,210 | py | Python | src/evolution_strategy.py | alexandredias3d/evolutionary-algorithms | 84b9e7b93d88b434638d01f8c37944c4ff7764db | [
"MIT"
] | null | null | null | src/evolution_strategy.py | alexandredias3d/evolutionary-algorithms | 84b9e7b93d88b434638d01f8c37944c4ff7764db | [
"MIT"
] | null | null | null | src/evolution_strategy.py | alexandredias3d/evolutionary-algorithms | 84b9e7b93d88b434638d01f8c37944c4ff7764db | [
"MIT"
] | null | null | null | import random
import sys
import yaml
from individual import Individual
from logger import get_logger
class EvolutionStrategy:
'''
Class containing attributes and methods regarding the ES(mu + lambda)
'''
def __init__(self, es_yaml='in/es.yaml', ind_yaml='in/individual.yaml'):
'''
... | 35.870647 | 121 | 0.601526 |
409c510ee4487985f3f7a0cfbcbab3b3761c3d9e | 43,467 | py | Python | plugins/modules/oci_devops_build_pipeline_stage.py | slmjy/oci-ansible-collection | 349c91e2868bf4706a6e3d6fb3b47fc622bfe11b | [
"Apache-2.0"
] | 108 | 2020-05-19T20:46:10.000Z | 2022-03-25T14:10:01.000Z | plugins/modules/oci_devops_build_pipeline_stage.py | slmjy/oci-ansible-collection | 349c91e2868bf4706a6e3d6fb3b47fc622bfe11b | [
"Apache-2.0"
] | 90 | 2020-06-14T22:07:11.000Z | 2022-03-07T05:40:29.000Z | plugins/modules/oci_devops_build_pipeline_stage.py | slmjy/oci-ansible-collection | 349c91e2868bf4706a6e3d6fb3b47fc622bfe11b | [
"Apache-2.0"
] | 42 | 2020-08-30T23:09:12.000Z | 2022-03-25T16:58:01.000Z | #!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 40.209991 | 160 | 0.595394 |
d9e9898e3470dd720baef07129cccfb8c60661ef | 3,102 | py | Python | api/insert_customers_postgres.py | edgallojr/igti-edc-mod2 | 8e126d1955d0389195b13be802a171c5273f978c | [
"MIT"
] | null | null | null | api/insert_customers_postgres.py | edgallojr/igti-edc-mod2 | 8e126d1955d0389195b13be802a171c5273f978c | [
"MIT"
] | null | null | null | api/insert_customers_postgres.py | edgallojr/igti-edc-mod2 | 8e126d1955d0389195b13be802a171c5273f978c | [
"MIT"
] | 1 | 2022-03-19T13:48:08.000Z | 2022-03-19T13:48:08.000Z | import os
import time
import argparse
import pandas as pd
import numpy as np
from faker import Faker
from sqlalchemy import create_engine
from datetime import datetime
from dotenv import load_dotenv
load_dotenv()
username = os.environ.get("POSTGRES_DATABASE_USER")
password = os.environ.get("POSTGRES_P... | 34.087912 | 105 | 0.578659 |
52e62edd06a3b46005c63f52f40236d7e96e75f9 | 2,270 | py | Python | socialdistribution/bettersocial/tests/models/test_like.py | CMPUT404-F21T0/CMPUT404-Project-BetterSocial | 04a621915108a434d50e900165cefdb0d4cca45c | [
"Apache-2.0"
] | null | null | null | socialdistribution/bettersocial/tests/models/test_like.py | CMPUT404-F21T0/CMPUT404-Project-BetterSocial | 04a621915108a434d50e900165cefdb0d4cca45c | [
"Apache-2.0"
] | 2 | 2021-10-29T20:18:57.000Z | 2021-12-04T14:57:34.000Z | socialdistribution/bettersocial/tests/models/test_like.py | CMPUT404-F21T0/CMPUT404-Project-BetterSocial | 04a621915108a434d50e900165cefdb0d4cca45c | [
"Apache-2.0"
] | null | null | null | from django.test import TestCase
from bettersocial.models import Like, Author, Post, Comment
from bettersocial.tests import utils
class LikeModelTests(TestCase):
def setUp(self) -> None:
super().setUp()
self.author: Author = utils.create_test_user().author
self.post: Post = utils.create... | 48.297872 | 134 | 0.715859 |
3a37229486ae7cca86ce9e7fe1da3b83b391ece4 | 1,059 | py | Python | src/wanderbot/scripts/keys_to_twist.py | kaiodt/kaio_ros_ws | d9ee0edb97d16cf2a0a6074fecd049db7367a032 | [
"BSD-2-Clause"
] | null | null | null | src/wanderbot/scripts/keys_to_twist.py | kaiodt/kaio_ros_ws | d9ee0edb97d16cf2a0a6074fecd049db7367a032 | [
"BSD-2-Clause"
] | null | null | null | src/wanderbot/scripts/keys_to_twist.py | kaiodt/kaio_ros_ws | d9ee0edb97d16cf2a0a6074fecd049db7367a032 | [
"BSD-2-Clause"
] | null | null | null | #! /usr/bin/env python
import rospy
from std_msgs.msg import String
from geometry_msgs.msg import Twist
# Define desired linear and angular velocities
lin_vel = 0.5
ang_vel = 0.5
# Dictionary with the key mapping:
# key:[rot_vel,lin_vel]
key_mapping = {'w':[0,lin_vel], 'x':[0,-lin_vel],
'a':[ang_vel,... | 23.021739 | 63 | 0.681775 |
fba08da9ff1ac0835cf187a339f325eef6d59d87 | 1,332 | py | Python | src/waveletFun.py | Gibbsdavidl/GeneSignalProc | 9710b495b969b1b16b43228fb6d2ff7004d819be | [
"MIT"
] | 1 | 2021-05-12T03:09:28.000Z | 2021-05-12T03:09:28.000Z | src/waveletFun.py | Gibbsdavidl/GeneSignalProc | 9710b495b969b1b16b43228fb6d2ff7004d819be | [
"MIT"
] | null | null | null | src/waveletFun.py | Gibbsdavidl/GeneSignalProc | 9710b495b969b1b16b43228fb6d2ff7004d819be | [
"MIT"
] | null | null | null |
import numpy as np
import pygsp as g
#g <- graph.tree(n=40, mode="undirected")
#mat <- as_adj(g, type="both", names=F, sparse=F)
#write.table(mat, file="test2_graph.txt", sep="\t", row.names=F, col.names=F, quote=F)
# made the network in Gephi
def loadNet(netfile):
mat = np.loadtxt(netfile, delimiter='\t')
... | 26.64 | 86 | 0.61036 |
bb901ba0a4f9b407174acb97f8408f12df9b8072 | 58,041 | py | Python | c7n/mu.py | nebed/cloud-custodian | ac3feeedb85458bb11836ed01e18289983ea00fb | [
"Apache-2.0"
] | 1 | 2020-04-22T02:30:14.000Z | 2020-04-22T02:30:14.000Z | c7n/mu.py | zavab/cloud-custodian | 63efdc1dc7938f29440b1635668a0fa074f86b67 | [
"Apache-2.0"
] | null | null | null | c7n/mu.py | zavab/cloud-custodian | 63efdc1dc7938f29440b1635668a0fa074f86b67 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015-2017 Capital One Services, 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 ... | 34.548214 | 126 | 0.581141 |
9fd5f75b15f23c95d44770a85ade0b8d8e62fc2e | 1,401 | py | Python | statistical_modeling/distributions/exponential.py | fedorpashin/statistical-modeling | 2630e6811afca29cf8a616bab130ae7f9547a043 | [
"MIT"
] | 2 | 2021-05-21T15:29:05.000Z | 2021-08-11T14:08:31.000Z | statistical_modeling/distributions/exponential.py | fedorpashin/statistical-modeling | 2630e6811afca29cf8a616bab130ae7f9547a043 | [
"MIT"
] | 59 | 2021-08-11T14:08:36.000Z | 2021-09-30T11:15:33.000Z | statistical_modeling/distributions/exponential.py | fedorpashin/statistical-modeling | 2630e6811afca29cf8a616bab130ae7f9547a043 | [
"MIT"
] | null | null | null | from .base import (
ContinuousDistribution,
ContinuousDistributionAlgorithm,
DistributionMean,
DistributionVariance,
)
from dataclasses import dataclass
from final_class import final
from overrides import overrides
from math import log
from numpy import random
@final
@dataclass(frozen=True)
class Dis... | 22.238095 | 63 | 0.720914 |
15183ba87d35418d1fd633807b0732b2b0bb9fc0 | 80,120 | py | Python | dimod/binary/binary_quadratic_model.py | odidev/dimod | 96928a68637ec1d2af5e19e0678417b164ef237d | [
"Apache-2.0"
] | null | null | null | dimod/binary/binary_quadratic_model.py | odidev/dimod | 96928a68637ec1d2af5e19e0678417b164ef237d | [
"Apache-2.0"
] | null | null | null | dimod/binary/binary_quadratic_model.py | odidev/dimod | 96928a68637ec1d2af5e19e0678417b164ef237d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 D-Wave Systems 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... | 36.836782 | 146 | 0.58013 |
e5f1980adadd27bfd56d733efb2d2eb5139b69b9 | 3,896 | py | Python | applications/SolidMechanicsApplication/python_scripts/assign_torque_to_conditions_process.py | AndreaVoltan/MyKratos7.0 | e977752722e8ef1b606f25618c4bf8fd04c434cc | [
"BSD-4-Clause"
] | 2 | 2020-04-30T19:13:08.000Z | 2021-04-14T19:40:47.000Z | applications/SolidMechanicsApplication/python_scripts/assign_torque_to_conditions_process.py | Jacklwln/Kratos | 12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de | [
"BSD-4-Clause"
] | 1 | 2020-04-30T19:19:09.000Z | 2020-05-02T14:22:36.000Z | applications/SolidMechanicsApplication/python_scripts/assign_torque_to_conditions_process.py | Jacklwln/Kratos | 12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de | [
"BSD-4-Clause"
] | 1 | 2020-06-12T08:51:24.000Z | 2020-06-12T08:51:24.000Z | from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7
#import kratos core and applications
import KratosMultiphysics
import KratosMultiphysics.SolidMechanicsApplication as KratosSolid
## This proces sets the value of a scalar variable t... | 46.380952 | 191 | 0.706366 |
b0e846c2ab920469e88f05a074d5f0c27bddb171 | 385 | py | Python | campaign/migrations/0004_campaign_description.py | tomas1207/BackendArmaGTI | 16274eb761e7f55900b1e6585dfb4b21abf25377 | [
"MIT"
] | null | null | null | campaign/migrations/0004_campaign_description.py | tomas1207/BackendArmaGTI | 16274eb761e7f55900b1e6585dfb4b21abf25377 | [
"MIT"
] | null | null | null | campaign/migrations/0004_campaign_description.py | tomas1207/BackendArmaGTI | 16274eb761e7f55900b1e6585dfb4b21abf25377 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-06-08 10:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('campaign', '0003_campaign_image'),
]
operations = [
migrations.AddField(
model_name='campaign',
name='description',
... | 20.263158 | 47 | 0.597403 |
06efe8e1b2a9a1792e7f33b02ac415491bc7368a | 9,345 | py | Python | tests/test_write.py | tubular/pyavroc | 1b54ca0203b76b5f111537e2862437619310bd7c | [
"Apache-2.0"
] | 51 | 2015-01-14T17:33:02.000Z | 2019-12-13T05:40:03.000Z | tests/test_write.py | tubular/pyavroc | 1b54ca0203b76b5f111537e2862437619310bd7c | [
"Apache-2.0"
] | 27 | 2015-03-06T06:44:48.000Z | 2021-08-25T07:09:26.000Z | tests/test_write.py | tubular/pyavroc | 1b54ca0203b76b5f111537e2862437619310bd7c | [
"Apache-2.0"
] | 21 | 2015-01-15T22:12:24.000Z | 2019-12-12T22:02:08.000Z | #!/usr/bin/env python
# Copyright 2015 Byhiras (Europe) 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
#
# Unless required by appl... | 30.340909 | 90 | 0.615195 |
e3d52a0592ab40dc9f769142d10289f6f8956999 | 17,408 | py | Python | tests/test_framework_metrics.py | rexfury-of-oath/panoptes | 35bbd87e9b6ca4f2f823b6f3837dc0ef123b130a | [
"Apache-2.0"
] | 1 | 2020-07-14T20:43:32.000Z | 2020-07-14T20:43:32.000Z | tests/test_framework_metrics.py | nghia-tran/panoptes | f91d6cd5e2afa3e1ecd9976bdfd13be3a10f0c00 | [
"Apache-2.0"
] | null | null | null | tests/test_framework_metrics.py | nghia-tran/panoptes | f91d6cd5e2afa3e1ecd9976bdfd13be3a10f0c00 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2018, Oath Inc.
Licensed under the terms of the Apache 2.0 license. See LICENSE file in project root for terms.
"""
import json
import time
import unittest
from mock import *
from test_helpers import ordered
from yahoo_panoptes.framework.metrics import PanoptesMetricsGroup, PanoptesMetricDimension, \
... | 51.2 | 119 | 0.641314 |
4deb75f2a5e9766c01edbcabf03770da3e57013b | 2,485 | py | Python | pyqtgraph/flowchart/FlowchartTemplate_pyqt6.py | secantsquared/pyqtgraph | 3ef7f5b91639543e43bcd66a84290fb9bc18fc5c | [
"MIT"
] | null | null | null | pyqtgraph/flowchart/FlowchartTemplate_pyqt6.py | secantsquared/pyqtgraph | 3ef7f5b91639543e43bcd66a84290fb9bc18fc5c | [
"MIT"
] | null | null | null | pyqtgraph/flowchart/FlowchartTemplate_pyqt6.py | secantsquared/pyqtgraph | 3ef7f5b91639543e43bcd66a84290fb9bc18fc5c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '../pyqtgraph/flowchart/FlowchartTemplate.ui'
#
# Created by: PyQt6 UI code generator 6.1.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
... | 45.181818 | 143 | 0.709054 |
54eaeefd8aaeb75549bbe036278a705fd430ec0c | 711 | py | Python | setup.py | niborus/toornament.py | e4267746ec1274e8158a10fc4f6357ae0928b03b | [
"MIT"
] | 1 | 2021-04-22T00:06:54.000Z | 2021-04-22T00:06:54.000Z | setup.py | niborus/toornament | e4267746ec1274e8158a10fc4f6357ae0928b03b | [
"MIT"
] | null | null | null | setup.py | niborus/toornament | e4267746ec1274e8158a10fc4f6357ae0928b03b | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="toornament",
version="0.1.0-pre",
author="niborus",
author_email="niborus.management@gmail.com",
description="A Python wrapper for the Toornament API.",
long_description... | 30.913043 | 71 | 0.66948 |
dbff7323620988369c7a262646c194ba28a4d222 | 2,337 | py | Python | app/pingbot.py | thesingleboard/pingbot | 6ecf8ba6302c9cc93bfb9e9ff540f1bae1ecc9a4 | [
"MIT"
] | null | null | null | app/pingbot.py | thesingleboard/pingbot | 6ecf8ba6302c9cc93bfb9e9ff540f1bae1ecc9a4 | [
"MIT"
] | null | null | null | app/pingbot.py | thesingleboard/pingbot | 6ecf8ba6302c9cc93bfb9e9ff540f1bae1ecc9a4 | [
"MIT"
] | null | null | null | import os
import logging
import settings
import time
import multiprocessing
from pingbot_lib import Operations as op
from pingbot_lib import Prometheus as prom
#Instantiate prom
pr = prom()
o = op()
def pinghost(input_list):
for host in input_list:
success = o.ping(host['ip'])
if ... | 29.582278 | 104 | 0.545571 |
1280e7c0ba43ee3eab75dbd885a386dffa3c41b2 | 320,386 | py | Python | venv/Lib/site-packages/tensorflow/python/ops/gen_array_ops.py | ishatserka/MachineLearningAndDataAnalysisCoursera | e82e772df2f4aec162cb34ac6127df10d14a625a | [
"MIT"
] | null | null | null | venv/Lib/site-packages/tensorflow/python/ops/gen_array_ops.py | ishatserka/MachineLearningAndDataAnalysisCoursera | e82e772df2f4aec162cb34ac6127df10d14a625a | [
"MIT"
] | null | null | null | venv/Lib/site-packages/tensorflow/python/ops/gen_array_ops.py | ishatserka/MachineLearningAndDataAnalysisCoursera | e82e772df2f4aec162cb34ac6127df10d14a625a | [
"MIT"
] | 1 | 2019-11-29T12:28:33.000Z | 2019-11-29T12:28:33.000Z | """Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
"""
import collections as _collections
from tensorflow.python.eager import execute as _execute
from tensorflow.python.eager import context as _context
from tensorflow.python.eager import core as _core
from tensorflow.pyt... | 33.982393 | 21,259 | 0.585425 |
e844905d23239610a66090feaddc3e0616eba3bf | 329 | py | Python | FreeTAKServer/model/Enumerations/serviceTypes.py | Tapawingo/FreeTakServer | 30259fa0fb5a69bbf6606f06d9cd40a63d2aa4fd | [
"MIT"
] | 27 | 2020-05-01T01:45:59.000Z | 2020-07-03T00:17:13.000Z | FreeTAKServer/model/Enumerations/serviceTypes.py | Tapawingo/FreeTakServer | 30259fa0fb5a69bbf6606f06d9cd40a63d2aa4fd | [
"MIT"
] | 34 | 2020-04-26T11:25:52.000Z | 2020-07-03T21:06:34.000Z | FreeTAKServer/model/Enumerations/serviceTypes.py | Tapawingo/FreeTakServer | 30259fa0fb5a69bbf6606f06d9cd40a63d2aa4fd | [
"MIT"
] | 15 | 2020-05-01T01:46:07.000Z | 2020-07-03T12:14:04.000Z | from enum import Enum
class ServiceTypes(Enum):
TCPCOTSERVICE = "TCP-CoT-Service"
SSLCOTSERVICE = "SSL-CoT-Service"
TCPDPSERVICE = "TCP-DP-Service"
SSLDPSERVICE = "TCP-DP-Service"
APISERVICE = "API-Service"
FEDSERVERSERVICE = "Federation-Server-Service"
FEDCLIENTSERVICE = "Federation-Client... | 32.9 | 50 | 0.720365 |
821674cfe336ca447e614f56d2dc70aaf6b701fe | 3,410 | py | Python | mars/services/subtask/api.py | chaokunyang/mars | f8d06b833603525133a62f099af159cec3ff5570 | [
"Apache-2.0"
] | 1 | 2021-09-03T18:52:06.000Z | 2021-09-03T18:52:06.000Z | mars/services/subtask/api.py | chaokunyang/mars | f8d06b833603525133a62f099af159cec3ff5570 | [
"Apache-2.0"
] | null | null | null | mars/services/subtask/api.py | chaokunyang/mars | f8d06b833603525133a62f099af159cec3ff5570 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# 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 a... | 34.795918 | 82 | 0.637243 |
2cdb30848648177087b2616768ab1059b18874f1 | 3,327 | py | Python | usearch_python/fastq.py | spacocha/SmileTrain | 2a1d38317abddaf0c9f769b847ff69543d63e96d | [
"MIT"
] | 30 | 2017-08-05T00:43:52.000Z | 2021-06-12T03:42:39.000Z | usearch_python/fastq.py | spacocha/SmileTrain | 2a1d38317abddaf0c9f769b847ff69543d63e96d | [
"MIT"
] | 3 | 2017-12-29T08:25:49.000Z | 2019-09-24T02:48:34.000Z | usearch_python/fastq.py | spacocha/SmileTrain | 2a1d38317abddaf0c9f769b847ff69543d63e96d | [
"MIT"
] | 19 | 2016-08-02T19:31:01.000Z | 2022-02-02T13:51:52.000Z | import sys
import math
# WARNING
# FASTQ formats differ:
# http://en.wikipedia.org/wiki/FASTQ_format
# The constants below must be hard-coded to match the
# format because the format cannot be reliably detected.
ASCII_Offset = 33
Q_Min = 0
Q_Max = 41
def SetSanger():
global ASCII_Offset, Q_Min, Q_Max
ASCII_Offset ... | 17.603175 | 87 | 0.628194 |
f5e2d55f453b3a893c3fad51a1e4ff7e1411de7d | 125 | py | Python | solutions/04_09_df_girado.py | caperutxa/PyConES2018_Introduccion_a_data_science_en_Python | 450ed2d0588d4bed7293cd5fe3a7fde4625bf687 | [
"MIT"
] | 15 | 2018-09-03T16:45:42.000Z | 2020-02-16T13:50:06.000Z | solutions/04_09_df_girado.py | NachoAG76/PyConES2018_Introduccion_a_data_science_en_Python | 71d0c6f86afdc992e3b2ba1d6862eb34dead5698 | [
"MIT"
] | null | null | null | solutions/04_09_df_girado.py | NachoAG76/PyConES2018_Introduccion_a_data_science_en_Python | 71d0c6f86afdc992e3b2ba1d6862eb34dead5698 | [
"MIT"
] | 9 | 2018-09-08T10:06:00.000Z | 2020-05-09T05:09:38.000Z | df_girado = pd.DataFrame() # Creamos un DataFrame vacío
for row in df.index:
df_girado[row] = df.loc[row, :]
df_girado | 20.833333 | 55 | 0.696 |
ce9bbb5996cf1099b3757a4a35e3552c6d3cf22a | 4,192 | py | Python | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spinnman/messages/scp/impl/scp_iptag_get_response.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | 2 | 2020-11-01T13:22:11.000Z | 2020-11-01T13:22:20.000Z | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spinnman/messages/scp/impl/scp_iptag_get_response.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spinnman/messages/scp/impl/scp_iptag_get_response.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null | from spinnman.messages.scp.abstract_messages.abstract_scp_response\
import AbstractSCPResponse
from spinnman.messages.scp.scp_result import SCPResult
from spinnman.exceptions import SpinnmanUnexpectedResponseCodeException
import struct
class SCPIPTagGetResponse(AbstractSCPResponse):
""" An SCP response to a r... | 24.372093 | 107 | 0.580391 |
9748077bcede977e34e851b42b9d650f61fddd39 | 915 | py | Python | accounts/tests/test_models.py | danrneal/superlists | d8e956720429915eaee732020a2c51b884a3d143 | [
"MIT"
] | null | null | null | accounts/tests/test_models.py | danrneal/superlists | d8e956720429915eaee732020a2c51b884a3d143 | [
"MIT"
] | null | null | null | accounts/tests/test_models.py | danrneal/superlists | d8e956720429915eaee732020a2c51b884a3d143 | [
"MIT"
] | null | null | null | from django.contrib import auth
from django.test import TestCase
from accounts.models import Token
User = auth.get_user_model()
class UserModelTest(TestCase):
def test_user_is_valid_with_email_only(self):
user = User(email='a@b.com')
user.full_clean() # should not raise
def test_email_is_p... | 29.516129 | 61 | 0.69071 |
4840122f761b1b264e2438dece35a620988b6d23 | 2,588 | py | Python | acispy/cosmo.py | sjtuzyk/chandra-acis-analysis | 8d194c8107ba2e91b35eba95c044ac238ce03229 | [
"MIT"
] | 3 | 2016-05-28T00:32:55.000Z | 2022-02-28T13:36:04.000Z | acispy/cosmo.py | sjtuzyk/chandra-acis-analysis | 8d194c8107ba2e91b35eba95c044ac238ce03229 | [
"MIT"
] | null | null | null | acispy/cosmo.py | sjtuzyk/chandra-acis-analysis | 8d194c8107ba2e91b35eba95c044ac238ce03229 | [
"MIT"
] | 1 | 2018-10-09T16:42:18.000Z | 2018-10-09T16:42:18.000Z | # Copyright (c) 2017 Weitian LI <weitian@aaronly.me>
# MIT license
"""
Cosmology calculator with Chandra ACIS-specific quantities support.
"""
import math
from astropy.cosmology import FlatLambdaCDM
import astropy.units as au
from .acis import ACIS
class Calculator:
"""
Calculate various quantities under ... | 31.180723 | 81 | 0.61051 |
9e2c344bdd287695638d9251f6d0e55b39baa8b2 | 82,601 | py | Python | extendedmodlog/eventmixin.py | mickykuna/Trusty-cogs_poki | 35b2b9982f6ca571d6457c3e793938efc0aca27d | [
"MIT"
] | null | null | null | extendedmodlog/eventmixin.py | mickykuna/Trusty-cogs_poki | 35b2b9982f6ca571d6457c3e793938efc0aca27d | [
"MIT"
] | null | null | null | extendedmodlog/eventmixin.py | mickykuna/Trusty-cogs_poki | 35b2b9982f6ca571d6457c3e793938efc0aca27d | [
"MIT"
] | null | null | null | import asyncio
import datetime
import logging
from typing import Sequence, Union, cast, Optional, Tuple, Dict, List, Any
import discord
from discord.ext.commands.converter import Converter
from discord.ext.commands.errors import BadArgument
from redbot.core import Config, VersionInfo, commands, modlog, version_info
f... | 42.577835 | 115 | 0.54319 |
392519929fa4d57a05ddd055a88b41647177d81d | 578 | py | Python | mlist/backdrop.py | zcmander/mlist | 851f7775ecd765673e50722491fdf3fab5b060fb | [
"MIT"
] | null | null | null | mlist/backdrop.py | zcmander/mlist | 851f7775ecd765673e50722491fdf3fab5b060fb | [
"MIT"
] | 5 | 2018-10-13T06:54:15.000Z | 2019-08-31T14:15:18.000Z | mlist/backdrop.py | zcmander/mlist | 851f7775ecd765673e50722491fdf3fab5b060fb | [
"MIT"
] | null | null | null | from django.apps import apps
from mlist.apps import MListAppConfig
app_config = apps.get_app_config(MListAppConfig.name)
def _get_tmdb_backdrop_url(movie):
# size = "w780"
size = "original"
backdrop_path = movie.get_attribute("tmdb.backdrop_path")
if not backdrop_path:
return
TMDB_CONFI... | 24.083333 | 61 | 0.740484 |
b253b270d3f354b4bc3d9313cce3ae47177eb18f | 1,160 | py | Python | utils/libtest.py | cheeeeee/rs485-moist-sensor | 6bc4947f385b5dd4cc75266e2c948ae950f28cb6 | [
"Apache-2.0"
] | 46 | 2015-05-14T17:10:25.000Z | 2022-03-07T13:17:14.000Z | utils/libtest.py | cheeeeee/rs485-moist-sensor | 6bc4947f385b5dd4cc75266e2c948ae950f28cb6 | [
"Apache-2.0"
] | 10 | 2017-04-18T09:35:12.000Z | 2021-04-23T09:47:42.000Z | utils/libtest.py | cheeeeee/rs485-moist-sensor | 6bc4947f385b5dd4cc75266e2c948ae950f28cb6 | [
"Apache-2.0"
] | 18 | 2017-04-18T06:08:44.000Z | 2021-08-13T14:42:31.000Z | #!/usr/bin/python
"""Waits for the sensor to appear on /dev/ttyUSB5, then reads moisture and temperature from it continuously"""
import sys
from time import sleep
from chirp_modbus import SoilMoistureSensor
SERIAL_PORT = '/dev/ttyUSB5'
print("Looking for sensors... this might take a while")
found = SoilMoistureSenso... | 24.680851 | 110 | 0.70431 |
3fc82caf52b5307c0560b8373e1c2294273b11a4 | 7,270 | py | Python | airsenal/tests/test_optimization.py | barbourians/AIrsenal | a251c8fa53cadbb65c78f14176da0e1dddef7b5a | [
"MIT"
] | null | null | null | airsenal/tests/test_optimization.py | barbourians/AIrsenal | a251c8fa53cadbb65c78f14176da0e1dddef7b5a | [
"MIT"
] | null | null | null | airsenal/tests/test_optimization.py | barbourians/AIrsenal | a251c8fa53cadbb65c78f14176da0e1dddef7b5a | [
"MIT"
] | null | null | null | """
Test the optimization of transfers, generating a few simplified scenarios
and checking that the optimizer finds the expected outcome.
"""
import pytest
from unittest import mock
from operator import itemgetter
#from ..utils import get_predicted_points
from ..framework.optimization_utils import Team, make_optimum_... | 37.668394 | 122 | 0.546492 |
b10b5a18a36f2b020891b4eeff7f146cf680d957 | 4,493 | py | Python | SCRAPE/Lib/site-packages/twisted/protocols/haproxy/_v1parser.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/protocols/haproxy/_v1parser.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/protocols/haproxy/_v1parser.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # -*- test-case-name: twisted.protocols.haproxy.test.test_v1parser -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
IProxyParser implementation for version one of the PROXY protocol.
"""
from typing import Tuple, Union
from zope.interface import implementer
from twisted.internet impor... | 30.986207 | 81 | 0.62742 |
28b87078c60c299dcd1307dc029ef49111c9d2b7 | 735 | py | Python | cursoemvideo/python/exercicio/ex115DoCurso/lib/interface/__init__.py | mateusjustino/cursos | 10927bf62f89b5847bb0acd998e9e9191472d0f4 | [
"MIT"
] | null | null | null | cursoemvideo/python/exercicio/ex115DoCurso/lib/interface/__init__.py | mateusjustino/cursos | 10927bf62f89b5847bb0acd998e9e9191472d0f4 | [
"MIT"
] | null | null | null | cursoemvideo/python/exercicio/ex115DoCurso/lib/interface/__init__.py | mateusjustino/cursos | 10927bf62f89b5847bb0acd998e9e9191472d0f4 | [
"MIT"
] | null | null | null | def leiaInt(msg):
while True:
try:
n = int(input(msg))
except (ValueError, TypeError):
print('\033[31mErro: Digite um número inteiro válido\033[m')
continue
except (KeyboardInterrupt):
print('\n\033[31mUsuário preferiu não digitar esse número\0... | 22.272727 | 77 | 0.545578 |
a6ef6a456d7229c00b2e637acef05ea01479d6b6 | 4,841 | py | Python | businesslogic/placeholders.py | 3Peso/mosk | 24eccf2f2898f2508f32b52f55de30815475cddb | [
"CC0-1.0"
] | 3 | 2021-05-22T11:14:10.000Z | 2022-02-18T00:32:10.000Z | businesslogic/placeholders.py | 3Peso/mosk | 24eccf2f2898f2508f32b52f55de30815475cddb | [
"CC0-1.0"
] | 1 | 2021-06-20T07:18:58.000Z | 2021-09-19T12:24:03.000Z | businesslogic/placeholders.py | 3Peso/mosk | 24eccf2f2898f2508f32b52f55de30815475cddb | [
"CC0-1.0"
] | 1 | 2021-06-09T07:43:03.000Z | 2021-06-09T07:43:03.000Z | """
placeholders module
"""
__author__ = '3Peso'
__all__ = ['Placeholder']
import functools
import json
import logging
import re
from os import path
from logging import Logger
from collections import UserDict
from businesslogic.errors import GlobalPlaceholderFileError
class Placeholder:
"""
The Placeholder... | 4,841 | 4,841 | 0.698823 |
4506cf97be8758300b418b690d56cff981f9c46b | 119 | py | Python | snippets/python/debug/loglevel.py | c6401/Snippets | a88d97005658eeda99f1a2766e3d069a64e142cb | [
"MIT"
] | null | null | null | snippets/python/debug/loglevel.py | c6401/Snippets | a88d97005658eeda99f1a2766e3d069a64e142cb | [
"MIT"
] | null | null | null | snippets/python/debug/loglevel.py | c6401/Snippets | a88d97005658eeda99f1a2766e3d069a64e142cb | [
"MIT"
] | null | null | null | import os
import logging
LOGLEVEL = os.environ.get('LOGLEVEL', 'WARNING').upper()
logging.basicConfig(level=LOGLEVEL)
| 19.833333 | 56 | 0.773109 |
9f0476c4e8419a28c9d0beb71bc2ccc1b12acb74 | 4,829 | py | Python | analysisstore/client/local_commands.py | JunAishima/analysisstore | d38d17a1ad9dff15b51740893d811b61312609b7 | [
"BSD-3-Clause"
] | 1 | 2016-05-18T22:04:26.000Z | 2016-05-18T22:04:26.000Z | analysisstore/client/local_commands.py | JunAishima/analysisstore | d38d17a1ad9dff15b51740893d811b61312609b7 | [
"BSD-3-Clause"
] | 15 | 2015-10-16T19:50:34.000Z | 2022-01-27T23:19:28.000Z | analysisstore/client/local_commands.py | JunAishima/analysisstore | d38d17a1ad9dff15b51740893d811b61312609b7 | [
"BSD-3-Clause"
] | 7 | 2015-10-28T18:48:33.000Z | 2021-11-24T23:20:08.000Z | from doct import Document
import time as ttime
import uuid
from analysisstore.client.conf import top_dir
from analysisstore.client.asutils import doc_or_uid_to_uid, read_from_json, write_to_json
from os.path import expanduser
import mongoquery
import json
class LocalAnalysisClient:
def __init__(self, top_dir=to... | 34.492857 | 89 | 0.604266 |
3ea7405a186f6904b48be6927fa9cda14bb70798 | 23,775 | py | Python | src/python/turicreate/test/test_object_detector.py | lukereichold/turicreate | 8b4b56b54e5f232caf3ba85cab9d24ab43c9ce48 | [
"BSD-3-Clause"
] | 1 | 2021-10-05T18:57:19.000Z | 2021-10-05T18:57:19.000Z | src/python/turicreate/test/test_object_detector.py | lukereichold/turicreate | 8b4b56b54e5f232caf3ba85cab9d24ab43c9ce48 | [
"BSD-3-Clause"
] | null | null | null | src/python/turicreate/test/test_object_detector.py | lukereichold/turicreate | 8b4b56b54e5f232caf3ba85cab9d24ab43c9ce48 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2017 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
from __future__ import print_function as _
from __future__ import division as _
from... | 37.85828 | 87 | 0.593943 |
1da69f9565fd8ad51cfac0b44a7257d970d37796 | 1,258 | py | Python | tests/test_user.py | Wenslaus-Makumba/pitch-app | c08caf931313e342974951c6c7bbf23e2a63383e | [
"MIT"
] | null | null | null | tests/test_user.py | Wenslaus-Makumba/pitch-app | c08caf931313e342974951c6c7bbf23e2a63383e | [
"MIT"
] | null | null | null | tests/test_user.py | Wenslaus-Makumba/pitch-app | c08caf931313e342974951c6c7bbf23e2a63383e | [
"MIT"
] | null | null | null | import unittest
from app.models import User
from app import db
class UserModelTest(unittest.TestCase):
def setUp(self):
self.new_user = User(username = "makumba", email ="makumbaw@gmail.com", bio = "Slowly advancing", profile_pic_path = "image_url", password = 'makumba')
db.session.add(self.new_use... | 35.942857 | 159 | 0.697138 |
cc963c24a97f1c889b9ea915cb46aad3a84ef493 | 1,288 | py | Python | setup.py | zhangzhikuan/hmsclient | 7090fa0a6c612b61abb5e210b16f8163e14a1587 | [
"Apache-2.0"
] | 16 | 2018-05-14T07:54:05.000Z | 2022-02-24T15:15:08.000Z | setup.py | zhangzhikuan/hmsclient | 7090fa0a6c612b61abb5e210b16f8163e14a1587 | [
"Apache-2.0"
] | 3 | 2018-05-31T06:15:17.000Z | 2022-03-16T11:47:30.000Z | setup.py | zhangzhikuan/hmsclient | 7090fa0a6c612b61abb5e210b16f8163e14a1587 | [
"Apache-2.0"
] | 12 | 2018-04-12T09:24:47.000Z | 2020-12-28T15:46:12.000Z | from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='hmsclient',
version... | 26.833333 | 85 | 0.643634 |
0d16ce0f011bfc56fafdc77e0af99860407e3fc7 | 2,329 | py | Python | tests/test_attach.py | Mic92/vmsh | 296a09102abece5df0135afb9678261d5a7b6c20 | [
"MIT"
] | 39 | 2021-02-15T17:31:32.000Z | 2022-03-26T14:31:56.000Z | tests/test_attach.py | Mic92/vmsh | 296a09102abece5df0135afb9678261d5a7b6c20 | [
"MIT"
] | 82 | 2021-02-27T09:16:48.000Z | 2022-03-21T07:06:59.000Z | tests/test_attach.py | Mic92/vmsh | 296a09102abece5df0135afb9678261d5a7b6c20 | [
"MIT"
] | 4 | 2021-04-02T14:37:32.000Z | 2021-10-05T14:14:10.000Z | import conftest
import os
def test_attach(
helpers: conftest.Helpers,
attach_repetitions: int = 1,
vcpus: int = 1,
mmio: str = "wrap_syscall",
) -> None:
with helpers.busybox_image() as img, helpers.spawn_qemu(
helpers.notos_image(), extra_args=["-smp", str(vcpus)]
) as vm:
vm... | 31.472973 | 104 | 0.442679 |
0ef2430e3591c1bc99ca8c34f9439338b0289c76 | 2,693 | py | Python | tools/classify-hangul.py | Yutori-Team/Yutori-Data-Android | 7f6a982f09834d9be4c06eddb3ea93d6b0e2926b | [
"Apache-2.0"
] | null | null | null | tools/classify-hangul.py | Yutori-Team/Yutori-Data-Android | 7f6a982f09834d9be4c06eddb3ea93d6b0e2926b | [
"Apache-2.0"
] | null | null | null | tools/classify-hangul.py | Yutori-Team/Yutori-Data-Android | 7f6a982f09834d9be4c06eddb3ea93d6b0e2926b | [
"Apache-2.0"
] | null | null | null | import argparse
import io
import os
import sys
import tensorflow as tf
import numpy
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
DEFAULT_LABEL_FILE = os.path.join(
SCRIPT_PATH, '../labels/2350-common-hangul.txt'
)
DEFAULT_GRAPH_FILE = os.path.join(
SCRIPT_PATH, '../saved-model/optimized_hangul_te... | 32.841463 | 82 | 0.621983 |
f0eb1dc836efac886c5a799ccbe345ad355926a4 | 3,286 | py | Python | third_party/django_pjax/djpjax.py | lisagorewitdecker/immaculater | fe46d282ae1d6325d67ebcf8f2b3d3b95580d5e7 | [
"Apache-2.0"
] | null | null | null | third_party/django_pjax/djpjax.py | lisagorewitdecker/immaculater | fe46d282ae1d6325d67ebcf8f2b3d3b95580d5e7 | [
"Apache-2.0"
] | null | null | null | third_party/django_pjax/djpjax.py | lisagorewitdecker/immaculater | fe46d282ae1d6325d67ebcf8f2b3d3b95580d5e7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import functools
import sys
from django.http import HttpResponse, HttpResponseRedirect
from django.views.generic.base import TemplateResponseMixin
if sys.version_info[0] > 2:
basestring = str
class PJAXResponseRedirect(HttpResponse):
def __init__(self, redirect_to, *args, **kwargs)... | 34.957447 | 120 | 0.624163 |
41feb21a38d0d47b705daca4c42c4d6dffeb8382 | 10,438 | py | Python | Chapter11/Ch11_Code/GUI_Complexity_end_tab3.py | mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition | 18e4632106169991e9b75680bdd7250c9d77c3be | [
"MIT"
] | 2 | 2021-01-12T03:13:29.000Z | 2021-01-12T03:13:31.000Z | Chapter11/Ch11_Code/GUI_Complexity_end_tab3.py | mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition | 18e4632106169991e9b75680bdd7250c9d77c3be | [
"MIT"
] | null | null | null | Chapter11/Ch11_Code/GUI_Complexity_end_tab3.py | mr4dsd43/Python-GUI-Programming-Cookbook-Second-Edition | 18e4632106169991e9b75680bdd7250c9d77c3be | [
"MIT"
] | 1 | 2022-02-22T02:06:32.000Z | 2022-02-22T02:06:32.000Z | '''
May 2017
@author: Burkhard
'''
#======================
# imports
#======================
import tkinter as tk
from tkinter import ttk
from tkinter import scrolledtext
from tkinter import Menu
from tkinter import Spinbox
import Ch11_Code.ToolTip as tt
GLOBAL_CONST = 42
#============================================... | 37.956364 | 121 | 0.517628 |
ed2541bc4fd832e927337f4d71c939f3e8e9c871 | 84,393 | py | Python | otp/launcher/LauncherBase.py | theclashingfritz/ToontownOnline-2009-FR-sv1.5.26.8-Code | 8d8ac6093eaec215cb2e842948461194e298f537 | [
"Apache-2.0"
] | 2 | 2019-07-23T09:03:53.000Z | 2021-03-10T11:44:57.000Z | otp/launcher/LauncherBase.py | theclashingfritz/ToontownOnline-2009-FR-sv1.5.26.8-Code | 8d8ac6093eaec215cb2e842948461194e298f537 | [
"Apache-2.0"
] | null | null | null | otp/launcher/LauncherBase.py | theclashingfritz/ToontownOnline-2009-FR-sv1.5.26.8-Code | 8d8ac6093eaec215cb2e842948461194e298f537 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.3.2
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: otp.launcher.LauncherBase
import sys, os, time, string, __builtin__
from pandac.libpandaexpressModules import *
from direct.showbase.Mes... | 49.065698 | 719 | 0.622078 |
4439f110cc0d8631c759f8c45a2319a9fe06cfb9 | 3,269 | py | Python | provers/cryptominisat-5.0.1/scripts/aws/add_lemma_ind.py | aristk/static-analyser | 6e3973b79c1e9bd6c9e7281ba9a9c75b348e42c6 | [
"MIT"
] | 1 | 2018-08-25T07:11:59.000Z | 2018-08-25T07:11:59.000Z | provers/cryptominisat-5.0.1/scripts/aws/add_lemma_ind.py | aristk/static-analyser | 6e3973b79c1e9bd6c9e7281ba9a9c75b348e42c6 | [
"MIT"
] | null | null | null | provers/cryptominisat-5.0.1/scripts/aws/add_lemma_ind.py | aristk/static-analyser | 6e3973b79c1e9bd6c9e7281ba9a9c75b348e42c6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import sqlite3
import optparse
class Data:
def __init__(self, used_for_time=-1, num_used=0):
self.used_for_time = used_for_time
self.num_used = num_used
def parse_lemmas(lemmafname):
ret = {}
with open(l... | 28.181034 | 91 | 0.540838 |
040377976e6115731ba5825c3aced1919e64e432 | 417 | py | Python | setup.py | damilare/mitiri | df71abc492b09745ca487ef1952b10066f806781 | [
"MIT"
] | 1 | 2016-04-02T12:45:52.000Z | 2016-04-02T12:45:52.000Z | setup.py | damilare/mitiri | df71abc492b09745ca487ef1952b10066f806781 | [
"MIT"
] | null | null | null | setup.py | damilare/mitiri | df71abc492b09745ca487ef1952b10066f806781 | [
"MIT"
] | null | null | null | import os
import pymongo
from flask import Flask
def setup():
app = Flask(__name__)
app.config.from_object('settings')
config = app.config
conn = pymongo.connection.Connection(config['MONGODB_HOST'],
config['MONGODB_PORT'])
db = conn[config['MONGODB_DB']]
... | 21.947368 | 64 | 0.633094 |
eb28b79828df706219782a1e9f5419c00c0190ed | 10,816 | py | Python | make.py | Dominik-97/latex-template | 10a384aa75bb30c11816655e8b29d8a4c64c52ba | [
"MIT"
] | null | null | null | make.py | Dominik-97/latex-template | 10a384aa75bb30c11816655e8b29d8a4c64c52ba | [
"MIT"
] | null | null | null | make.py | Dominik-97/latex-template | 10a384aa75bb30c11816655e8b29d8a4c64c52ba | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import re
import sys
import shutil
import zipfile
import unicodedata
import subprocess
import xml.etree.ElementTree as ET
class Variables:
def __init__(self, title="", author="", supervisor="",
institution="", faculty="", department="",
loca... | 31.533528 | 102 | 0.544194 |
723016272b8bbd58c0a0e523f7fff6380cfae7d7 | 2,526 | py | Python | keras/layers/reshaping/up_sampling1d.py | tsheaff/keras | ee227dda766d769b7499a5549e8ed77b5e88105b | [
"Apache-2.0"
] | 1 | 2020-02-02T04:43:33.000Z | 2020-02-02T04:43:33.000Z | keras/layers/reshaping/up_sampling1d.py | tsheaff/keras | ee227dda766d769b7499a5549e8ed77b5e88105b | [
"Apache-2.0"
] | 1 | 2022-02-03T12:41:50.000Z | 2022-02-03T12:47:45.000Z | keras/layers/reshaping/up_sampling1d.py | tsheaff/keras | ee227dda766d769b7499a5549e8ed77b5e88105b | [
"Apache-2.0"
] | 1 | 2020-12-13T22:14:48.000Z | 2020-12-13T22:14:48.000Z | # Copyright 2015 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... | 31.185185 | 80 | 0.659937 |
63f6d2b05b2c8c511bea0c310deae6cbb2522d03 | 1,245 | py | Python | app/core/tests/test_models.py | vshinde727/recipe-backend | 2ff320e83c7bbf62fd6c8e9f87f2db3195d322df | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | vshinde727/recipe-backend | 2ff320e83c7bbf62fd6c8e9f87f2db3195d322df | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | vshinde727/recipe-backend | 2ff320e83c7bbf62fd6c8e9f87f2db3195d322df | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
class ModelTests(TestCase):
def test_create_user_with_email_successfully(self):
"""Test creating new user with email successfully"""
email = 'vivek@vivek.com'
password = 'Changepass123'
user = get_user_... | 37.727273 | 104 | 0.674699 |
78837051688c93a8f95953e9f41fad876378114a | 4,956 | py | Python | fhir-hl7-transform/lambda/lib/hl7_message_parser.py | aws-samples/fhir-hl7v2-integration-transform | a34d9c406b031aff362ee18bea36aacddbb74e32 | [
"MIT-0"
] | 13 | 2020-11-03T04:19:12.000Z | 2022-02-12T15:57:33.000Z | fhir-hl7-transform/lambda/lib/hl7_message_parser.py | a4anish/fhir-hl7v2-integration-transform | a34d9c406b031aff362ee18bea36aacddbb74e32 | [
"MIT-0"
] | null | null | null | fhir-hl7-transform/lambda/lib/hl7_message_parser.py | a4anish/fhir-hl7v2-integration-transform | a34d9c406b031aff362ee18bea36aacddbb74e32 | [
"MIT-0"
] | 9 | 2021-02-01T09:10:08.000Z | 2022-02-17T17:14:03.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
from hl7apy.core import Field
from hl7apy.parser import parse_message
def parse_oru_message(hl7msg: str, r: dict) -> dict:
# This function will be implemented in the next release
return r
def parse_adt_mes... | 32.392157 | 75 | 0.62268 |
6b3c94770aed0f95c812be666bdc64bcef65f7a5 | 12,169 | py | Python | src/ddqn.py | r7vme/sdsandbox | 701646f542ae1f55fa68198b8600e872e7497810 | [
"BSD-3-Clause"
] | 2 | 2020-03-30T14:46:11.000Z | 2020-03-30T15:50:21.000Z | src/ddqn.py | r7vme/sdsandbox | 701646f542ae1f55fa68198b8600e872e7497810 | [
"BSD-3-Clause"
] | null | null | null | src/ddqn.py | r7vme/sdsandbox | 701646f542ae1f55fa68198b8600e872e7497810 | [
"BSD-3-Clause"
] | 1 | 2019-01-31T13:53:42.000Z | 2019-01-31T13:53:42.000Z | '''
file: ddqn.py
author: Felix Yu
date: 2018-09-12
original: https://github.com/flyyufelix/donkey_rl/blob/master/donkey_rl/src/ddqn.py
'''
import os
import sys
import random
import argparse
import signal
import numpy as np
import gym
import cv2
import skimage as skimage
from skimage import transform, color, exposure... | 33.339726 | 165 | 0.606623 |
3377a60c45b010fa5b7c2a3520fabe288efd3044 | 2,367 | py | Python | tests/auth_providers/test_insecure_example.py | kariudo/home-assistant | 6f582dcf24978a5288bbf583450070bb63b7c234 | [
"Apache-2.0"
] | 1 | 2021-03-16T18:41:48.000Z | 2021-03-16T18:41:48.000Z | tests/auth_providers/test_insecure_example.py | kariudo/home-assistant | 6f582dcf24978a5288bbf583450070bb63b7c234 | [
"Apache-2.0"
] | null | null | null | tests/auth_providers/test_insecure_example.py | kariudo/home-assistant | 6f582dcf24978a5288bbf583450070bb63b7c234 | [
"Apache-2.0"
] | null | null | null | """Tests for the insecure example auth provider."""
from unittest.mock import Mock
import uuid
import pytest
from homeassistant import auth
from homeassistant.auth_providers import insecure_example
from tests.common import mock_coro
@pytest.fixture
def store(hass):
"""Mock store."""
return auth.AuthStore(h... | 27.523256 | 77 | 0.643431 |
f7d66aaef5b16026e23898196c4b79dafb6ad9b9 | 211 | py | Python | onadata/libs/utils/string.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/utils/string.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/utils/string.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
def str2bool(v):
return v.lower() in (
'yes', 'true', 't', '1') if isinstance(v, basestring) else v
| 35.166667 | 82 | 0.691943 |
a28a17a7f8b18616e96d9eedbad00df9bce97b14 | 1,658 | py | Python | tests/test_patch.py | texierp/kas | 71b9c43472acefd7b516899e1da78a5c6853681b | [
"MIT"
] | null | null | null | tests/test_patch.py | texierp/kas | 71b9c43472acefd7b516899e1da78a5c6853681b | [
"MIT"
] | null | null | null | tests/test_patch.py | texierp/kas | 71b9c43472acefd7b516899e1da78a5c6853681b | [
"MIT"
] | null | null | null | # kas - setup tool for bitbake based projects
#
# Copyright (c) Siemens AG, 2019
#
# 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... | 41.45 | 79 | 0.740048 |
037b9c812e421691bf5e77d1285bc94337097929 | 4,066 | py | Python | pycqed/instrument_drivers/physical_instruments/QuTechCC_core.py | oschusler/PycQED_py3 | a24c81684ff22f11a62dfe191817029749115e10 | [
"MIT"
] | null | null | null | pycqed/instrument_drivers/physical_instruments/QuTechCC_core.py | oschusler/PycQED_py3 | a24c81684ff22f11a62dfe191817029749115e10 | [
"MIT"
] | null | null | null | pycqed/instrument_drivers/physical_instruments/QuTechCC_core.py | oschusler/PycQED_py3 | a24c81684ff22f11a62dfe191817029749115e10 | [
"MIT"
] | null | null | null | """
File: QuTechCC_core.py
Author: Wouter Vlothuizen, QuTech
Purpose: Python control of Qutech Central Controller. Core driver independent of QCoDeS
Notes: here, we follow the SCPI convention of NOT checking parameter values but leaving that to
... | 36.303571 | 112 | 0.643384 |
e98bca2fb970d5aaf6b425613742e2f6dbddc2e2 | 5,324 | py | Python | examples/run_experiments.py | connorlee77/keras-retinanet | dd3ecbe14ec85894eb678707566a97f27963920b | [
"Apache-2.0"
] | null | null | null | examples/run_experiments.py | connorlee77/keras-retinanet | dd3ecbe14ec85894eb678707566a97f27963920b | [
"Apache-2.0"
] | null | null | null | examples/run_experiments.py | connorlee77/keras-retinanet | dd3ecbe14ec85894eb678707566a97f27963920b | [
"Apache-2.0"
] | null | null | null | import keras
from keras import backend as K
from keras_retinanet import models
from keras_retinanet.utils.image import read_image_bgr, preprocess_image, resize_image
from keras_retinanet.utils.visualization import draw_box, draw_caption
from keras_retinanet.utils.colors import label_color
import results
impo... | 47.115044 | 1,194 | 0.652141 |
7144f049051ef600bb12eeb6d5efe2c9cdfff8f9 | 876 | py | Python | textstructure/scripts/kiva_normalize_topic.py | hatmn/XDATA | 4f571cea29e9f7411979b53cd298816ffdaadba5 | [
"Apache-2.0"
] | 40 | 2015-01-29T03:28:50.000Z | 2021-04-04T12:20:04.000Z | textstructure/scripts/kiva_normalize_topic.py | hatmn/XDATA | 4f571cea29e9f7411979b53cd298816ffdaadba5 | [
"Apache-2.0"
] | 1 | 2015-12-16T22:06:39.000Z | 2015-12-16T22:06:39.000Z | textstructure/scripts/kiva_normalize_topic.py | hatmn/XDATA | 4f571cea29e9f7411979b53cd298816ffdaadba5 | [
"Apache-2.0"
] | 27 | 2015-02-26T16:09:17.000Z | 2018-11-09T14:14:38.000Z | #!/usr/bin/env python
#
# Copyright (c) 2013
# Massachusetts Institute of Technology
#
# All Rights Reserved
#
# Normalize message for topic id in the Kiva data set
#
# BC, 4/19/13
import re
import msg_tools as mt
def normalize_msg (xact, rewrite_hash, debug):
msg = xact['msg_norm']
if (debug > 0):
... | 22.461538 | 65 | 0.635845 |
63bc772c316da6ba1ddb8e3188055dcf8dd2d021 | 5,241 | py | Python | IXI/Baseline_registration_methods/VoxelMorph/infer.py | qscgy/TransMorph_Transformer_for_Medical_Image_Registration | 9abfc4387e51667e1c8860d4ce37658325e75b5a | [
"MIT"
] | 82 | 2021-11-23T03:49:21.000Z | 2022-03-31T12:28:08.000Z | IXI/Baseline_registration_methods/VoxelMorph/infer.py | qscgy/TransMorph_Transformer_for_Medical_Image_Registration | 9abfc4387e51667e1c8860d4ce37658325e75b5a | [
"MIT"
] | 11 | 2021-12-01T07:58:20.000Z | 2022-03-31T07:18:30.000Z | IXI/Baseline_registration_methods/VoxelMorph/infer.py | qscgy/TransMorph_Transformer_for_Medical_Image_Registration | 9abfc4387e51667e1c8860d4ce37658325e75b5a | [
"MIT"
] | 9 | 2021-12-02T05:31:16.000Z | 2022-03-27T05:18:22.000Z | import glob
import os, losses, utils
from torch.utils.data import DataLoader
from data import datasets, trans
import numpy as np
import torch
from torchvision import transforms
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
from natsort import natsorted
from models import VxmDense_1... | 40.627907 | 116 | 0.559435 |
fbb09376c24010c7b405bfc2322a279da49e2608 | 1,171 | py | Python | MAK_GreyAtom/code.py | MAKul4/greyatom-python-for-data-science | 457303e61b59cdfc092f9fe1846c0d7d5365617b | [
"MIT"
] | null | null | null | MAK_GreyAtom/code.py | MAKul4/greyatom-python-for-data-science | 457303e61b59cdfc092f9fe1846c0d7d5365617b | [
"MIT"
] | null | null | null | MAK_GreyAtom/code.py | MAKul4/greyatom-python-for-data-science | 457303e61b59cdfc092f9fe1846c0d7d5365617b | [
"MIT"
] | null | null | null | # --------------
# Code starts here
class_1 = ['Geoffrey Hinton','Andrew Ng','Sebastian Raschka','Yoshua Bengio']
class_2 = ['Hilary Mason','Carla Gentry','Corinna Cortes']
new_class = class_1+class_2
print(new_class)
class_3 = ['Peter Warden']
new_class = new_class+class_3
print(new_class)
new_class.remove('Carla Gent... | 18.296875 | 157 | 0.670367 |
64f6919f8d35402ea0c9315960fd13af243c2d6a | 90 | py | Python | djsr/djsr/__init__.py | Mikkow-acc/Generator-Spradzianow | 85750c61652d7d6d6b6cf29343a1f2875bead1a0 | [
"MIT"
] | null | null | null | djsr/djsr/__init__.py | Mikkow-acc/Generator-Spradzianow | 85750c61652d7d6d6b6cf29343a1f2875bead1a0 | [
"MIT"
] | null | null | null | djsr/djsr/__init__.py | Mikkow-acc/Generator-Spradzianow | 85750c61652d7d6d6b6cf29343a1f2875bead1a0 | [
"MIT"
] | null | null | null | import pymysql
pymysql.version_info = (1, 4, 2, "final", 0)
pymysql.install_as_MySQLdb()
| 18 | 44 | 0.733333 |
e1fe49e6d27c1ed9c075e2c47bb2194c0eb4dd25 | 4,297 | py | Python | conans/client/generators/cmake.py | ytimenkov/conan | 89eb275b9696b308aaaa1fbfaa0f8cdab284a764 | [
"MIT"
] | null | null | null | conans/client/generators/cmake.py | ytimenkov/conan | 89eb275b9696b308aaaa1fbfaa0f8cdab284a764 | [
"MIT"
] | null | null | null | conans/client/generators/cmake.py | ytimenkov/conan | 89eb275b9696b308aaaa1fbfaa0f8cdab284a764 | [
"MIT"
] | null | null | null | from conans.model import Generator
from conans.paths import BUILD_INFO_CMAKE
from conans.client.generators.cmake_common import cmake_dependency_vars,\
cmake_macros, generate_targets_section, cmake_dependencies, cmake_package_info,\
cmake_global_vars, cmake_user_info_vars, cmake_settings_info
class DepsCppCmak... | 43.40404 | 104 | 0.633698 |
c2af704466f4b42ff640aa5c77b28eadad7e34f6 | 325 | py | Python | 9_mcinteg/setupA.py | jakobmoss/numeric | f2b45fca74c155e93474a485cb2d061c0759cd8e | [
"MIT"
] | null | null | null | 9_mcinteg/setupA.py | jakobmoss/numeric | f2b45fca74c155e93474a485cb2d061c0759cd8e | [
"MIT"
] | null | null | null | 9_mcinteg/setupA.py | jakobmoss/numeric | f2b45fca74c155e93474a485cb2d061c0759cd8e | [
"MIT"
] | null | null | null | # Needed to build Cython
from distutils.core import setup
from Cython.Build import cythonize
# Change to newest gcc on Darwin
import os
from sys import platform
if platform.lower() == 'darwin':
os.environ['CC'] = 'gcc-5'
# Do the build
setup(ext_modules=cythonize('auxA.pyx'))
setup(ext_modules=cythonize('mainA.py... | 23.214286 | 41 | 0.744615 |
9b97d9fbc31c9805987dcacf98fb5fff5278a073 | 675 | py | Python | tests/test_cli.py | PyBites-Open-Source/biteme | 00f1028812747f3e06a40ffe579d205e06a133e9 | [
"MIT"
] | 7 | 2021-04-06T19:56:57.000Z | 2022-01-26T19:57:49.000Z | tests/test_cli.py | PyBites-Open-Source/biteme | 00f1028812747f3e06a40ffe579d205e06a133e9 | [
"MIT"
] | 4 | 2021-09-29T10:38:42.000Z | 2021-10-06T07:34:26.000Z | tests/test_cli.py | PyBites-Open-Source/biteme | 00f1028812747f3e06a40ffe579d205e06a133e9 | [
"MIT"
] | 3 | 2021-09-27T21:18:19.000Z | 2022-01-17T23:06:11.000Z | from pathlib import Path
from typer.testing import CliRunner
from biteme.cli import cli
runner = CliRunner()
def test_cli_download():
# TODO: provide default api token for free Bites
result = runner.invoke(cli, ["download", "123", "101"])
assert result.exit_code == 0
download_dir = result.stdout.st... | 27 | 61 | 0.711111 |
dc5df66b32cffc3c73f3a4f432a1260b33f3b4ab | 902 | py | Python | CodeHS/Functions and Exceptions/ExtendedGreeting.py | Kev-in123/ICS2O7 | 425c59975d4ce6aa0937fd8715b51d04487e4fa9 | [
"MIT"
] | 2 | 2021-08-10T18:16:08.000Z | 2021-09-26T19:49:26.000Z | CodeHS/Functions and Exceptions/ExtendedGreeting.py | Kev-in123/ICS2O7 | 425c59975d4ce6aa0937fd8715b51d04487e4fa9 | [
"MIT"
] | null | null | null | CodeHS/Functions and Exceptions/ExtendedGreeting.py | Kev-in123/ICS2O7 | 425c59975d4ce6aa0937fd8715b51d04487e4fa9 | [
"MIT"
] | null | null | null | """
This code will print out a greeting based on the time of day.
"""
# This function will print a greeting for the morning
def morning_greeting():
print("Good morning! It will be a lovely day!")
# This function will print a greeting for the afternoon
def afternoon_greeting():
print("Good aftern... | 31.103448 | 79 | 0.691796 |
bff38cb1bfc14cdda3d25d55314d77d9dd058dc7 | 348 | py | Python | setup.py | TRG-BUILD/pylidarlib | 58fd22bb0f36c5f04ac628f31245c5138b8841cb | [
"MIT"
] | null | null | null | setup.py | TRG-BUILD/pylidarlib | 58fd22bb0f36c5f04ac628f31245c5138b8841cb | [
"MIT"
] | 1 | 2021-04-12T11:55:53.000Z | 2021-05-22T09:11:25.000Z | setup.py | TRG-BUILD/pylidarlib | 58fd22bb0f36c5f04ac628f31245c5138b8841cb | [
"MIT"
] | null | null | null | from distutils.core import setup
from setuptools import find_packages
setup(
name="pylidarlib",
packages=find_packages(),
version="0.0.1",
license="MIT",
description="Python library for simple lidar data operations",
author="Mihhail Samusev",
url="https://github.com/mihsamusev",
keyword... | 24.857143 | 66 | 0.698276 |
6a42eea3ce1fe46dafa2e56bacd1ea892b13f16d | 1,772 | py | Python | nodes/xy2gcs_node.py | anqixu/sightedturtlesim | 35712504679a477d0021a8cec3d22cb087ebc545 | [
"BSD-2-Clause"
] | 1 | 2017-06-16T22:31:24.000Z | 2017-06-16T22:31:24.000Z | nodes/xy2gcs_node.py | anqixu/sightedturtlesim | 35712504679a477d0021a8cec3d22cb087ebc545 | [
"BSD-2-Clause"
] | null | null | null | nodes/xy2gcs_node.py | anqixu/sightedturtlesim | 35712504679a477d0021a8cec3d22cb087ebc545 | [
"BSD-2-Clause"
] | null | null | null | #! /usr/bin/env python
import sys
import rospy
from GCSTools import *
from sensor_msgs.msg import NavSatFix
from sightedturtlesim.msg import PoseXYZ
class XY2GCSNode:
def __init__(self):
self.home_lat = 45.504824264187214
self.home_lon = -73.57661962509155
home_lat = rospy.get_param('~home_lat', se... | 32.814815 | 107 | 0.693567 |
d2497929e26d901dd815c33d8dd588c5c55c9825 | 7,514 | py | Python | ckan/plugins/core.py | mabah-mst/ckan | 105f613272c2e31daa0081ead24c678bf1b55c22 | [
"Apache-2.0"
] | 58 | 2015-01-11T09:05:15.000Z | 2022-03-17T23:44:07.000Z | ckan/plugins/core.py | mabah-mst/ckan | 105f613272c2e31daa0081ead24c678bf1b55c22 | [
"Apache-2.0"
] | 1,467 | 2015-01-01T16:47:44.000Z | 2022-02-28T16:51:20.000Z | ckan/plugins/core.py | mabah-mst/ckan | 105f613272c2e31daa0081ead24c678bf1b55c22 | [
"Apache-2.0"
] | 17 | 2015-05-06T14:04:21.000Z | 2021-11-11T19:58:16.000Z | # encoding: utf-8
'''
Provides plugin services to the CKAN
'''
from contextlib import contextmanager
import logging
from pkg_resources import iter_entry_points
from pyutilib.component.core import PluginGlobals, implements
from pyutilib.component.core import ExtensionPoint
from pyutilib.component.core import Singleton... | 27.323636 | 76 | 0.683524 |
bbab8cab8f6271ffff70af8c30dff9ab03f0dd00 | 3,035 | py | Python | test/QT/moc-from-cpp.py | jcassagnol-public/scons | 8eaf585a893757e68c9e4a6e25d375021fa5eab7 | [
"MIT"
] | null | null | null | test/QT/moc-from-cpp.py | jcassagnol-public/scons | 8eaf585a893757e68c9e4a6e25d375021fa5eab7 | [
"MIT"
] | null | null | null | test/QT/moc-from-cpp.py | jcassagnol-public/scons | 8eaf585a893757e68c9e4a6e25d375021fa5eab7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# MIT License
#
# Copyright The SCons Foundation
#
# 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 us... | 26.391304 | 78 | 0.699506 |
6d94b15df52073f315f21ee4449a1c40ad360b52 | 4,085 | py | Python | source/manage.py | Jackhjy/xb | dd9c55a6108d7d5dd56f7edadb9562b69748c3e6 | [
"Apache-2.0"
] | null | null | null | source/manage.py | Jackhjy/xb | dd9c55a6108d7d5dd56f7edadb9562b69748c3e6 | [
"Apache-2.0"
] | null | null | null | source/manage.py | Jackhjy/xb | dd9c55a6108d7d5dd56f7edadb9562b69748c3e6 | [
"Apache-2.0"
] | null | null | null | #-*- coding:utf-8 -*-
import time
import socket
import threading
import SocketServer
import logging
import logging.config
import ConfigParser#读取配置文件的库
import os.path
import struct
from handler import Handler
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
def handle(self):
#得到log
... | 33.211382 | 137 | 0.578213 |
b2a6930bf4e0438d0f498c0c80945ea5893d8d61 | 2,457 | py | Python | example/irregularity-acl19/count-wiki.py | nala-cub/g2p-pgt | 3c4e90b26f8415776ccbad7c9b96a2d3e0a62426 | [
"MIT"
] | 2 | 2020-12-17T03:45:33.000Z | 2021-01-03T03:06:31.000Z | example/irregularity-acl19/count-wiki.py | nala-cub/g2p-pgt | 3c4e90b26f8415776ccbad7c9b96a2d3e0a62426 | [
"MIT"
] | null | null | null | example/irregularity-acl19/count-wiki.py | nala-cub/g2p-pgt | 3c4e90b26f8415776ccbad7c9b96a2d3e0a62426 | [
"MIT"
] | null | null | null | import argparse
import json
import os
import re
import string
from collections import Counter
from functools import partial
from tqdm import tqdm
import langcodes
from nltk.tokenize import word_tokenize, wordpunct_tokenize
from smart_open import smart_open
def get_args():
parser = argparse.ArgumentParser()
... | 27.606742 | 71 | 0.59707 |
9dba7edf9cd34f5cc881fee9b08c674d2999c3da | 2,131 | py | Python | virtual/lib/python3.8/site-packages/pip/_internal/network/cache.py | Jamesmwangi245/flask-3 | fb5bdb44cc55a45a27a206d08cb811bedfc6b21e | [
"MIT"
] | 7 | 2022-03-10T07:03:14.000Z | 2022-03-24T09:42:46.000Z | virtual/lib/python3.8/site-packages/pip/_internal/network/cache.py | Jamesmwangi245/flask-3 | fb5bdb44cc55a45a27a206d08cb811bedfc6b21e | [
"MIT"
] | 9 | 2022-02-21T11:44:01.000Z | 2022-03-14T15:36:08.000Z | virtual/lib/python3.8/site-packages/pip/_internal/network/cache.py | Jamesmwangi245/flask-3 | fb5bdb44cc55a45a27a206d08cb811bedfc6b21e | [
"MIT"
] | 4 | 2022-03-12T10:17:00.000Z | 2022-03-26T08:40:43.000Z | """HTTP cache implementation.
"""
import os
from contextlib import contextmanager
from typing import Iterator, Optional
from pip._vendor.cachecontrol.cache import BaseCache
from pip._vendor.cachecontrol.caches import FileCache
from pip._vendor.requests.models import Response
from pip._internal.utils.filesystem impor... | 30.442857 | 81 | 0.664477 |
18210176009ebf89f4cac87657e704515bef55d0 | 2,159 | py | Python | scrape_holdings.py | jmaslek/etf_scraper | e4eb4eda035541340e0abd18cb267cd715b76727 | [
"Apache-2.0"
] | 1 | 2021-07-11T10:44:48.000Z | 2021-07-11T10:44:48.000Z | scrape_holdings.py | jmaslek/etf_scraper | e4eb4eda035541340e0abd18cb267cd715b76727 | [
"Apache-2.0"
] | null | null | null | scrape_holdings.py | jmaslek/etf_scraper | e4eb4eda035541340e0abd18cb267cd715b76727 | [
"Apache-2.0"
] | null | null | null | import requests
import pandas as pd
from bs4 import BeautifulSoup as bs
from bs4 import BeautifulSoup
import datetime
import os
import random
import json
r = requests.get("https://stockanalysis.com/etf/", headers={"User-Agent":"Mozilla/5.0"})
soup2 = BeautifulSoup(r.text,"html.parser")
script = soup2.find("script",{"i... | 33.734375 | 95 | 0.606762 |
97193abf93aeeb2f6a4c0f6f68d96a36ef175dd8 | 1,447 | py | Python | booking_microservice/migrations/versions/069d53cf594f_refactor_model.py | 7552-2020C2-grupo5/bookings-microservice | 92fd3c8c5e4c8462aa0e7f00e50f3c60680ab161 | [
"Apache-2.0"
] | null | null | null | booking_microservice/migrations/versions/069d53cf594f_refactor_model.py | 7552-2020C2-grupo5/bookings-microservice | 92fd3c8c5e4c8462aa0e7f00e50f3c60680ab161 | [
"Apache-2.0"
] | null | null | null | booking_microservice/migrations/versions/069d53cf594f_refactor_model.py | 7552-2020C2-grupo5/bookings-microservice | 92fd3c8c5e4c8462aa0e7f00e50f3c60680ab161 | [
"Apache-2.0"
] | null | null | null | """refactor model
Revision ID: 069d53cf594f
Revises: a96132adcf5f
Create Date: 2020-12-13 12:11:47.388482
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '069d53cf594f'
down_revision = 'a96132adcf5f'
branch_labels = None
depends_on = None
def upgrade():
#... | 32.155556 | 71 | 0.697996 |
eb840b5924885483734d1822a37c4d65bc0d7127 | 11,026 | py | Python | extcode/fixingmodel_params.py | primasanjaya/muat-github | 4603c6c960188643fb38d8dba82e0dcc1ba00b40 | [
"Apache-2.0"
] | null | null | null | extcode/fixingmodel_params.py | primasanjaya/muat-github | 4603c6c960188643fb38d8dba82e0dcc1ba00b40 | [
"Apache-2.0"
] | null | null | null | extcode/fixingmodel_params.py | primasanjaya/muat-github | 4603c6c960188643fb38d8dba82e0dcc1ba00b40 | [
"Apache-2.0"
] | 1 | 2022-03-22T15:35:57.000Z | 2022-03-22T15:35:57.000Z | import numpy as np
import torch
import os
import pdb
import argparse
#fixing nonF model
'''
weight type:
1: refixing from plain model.pthx (from full training in puhti)
2: training from new code (including args and type)
'''
def get_args():
parser = argparse.ArgumentParser(description='PCAWG... | 45.374486 | 176 | 0.580809 |
1cbcc24971e5094fcfc6151701b4d90d9232ffb4 | 7,960 | py | Python | research/object_detection/models/ssd_mobilenet_v2_fpn_feature_extractor.py | matsavage/models | 634309ac537bbfc5198197b92096a59b52b0bb45 | [
"Apache-2.0"
] | 3 | 2018-10-31T02:16:47.000Z | 2018-11-06T09:11:37.000Z | research/object_detection/models/ssd_mobilenet_v2_fpn_feature_extractor.py | John618/models | 42f98218d7b0ee54077d4e07658442bc7ae0e661 | [
"Apache-2.0"
] | 1 | 2018-10-11T16:48:21.000Z | 2018-10-11T16:48:21.000Z | research/object_detection/models/ssd_mobilenet_v2_fpn_feature_extractor.py | John618/models | 42f98218d7b0ee54077d4e07658442bc7ae0e661 | [
"Apache-2.0"
] | 1 | 2019-02-11T17:13:13.000Z | 2019-02-11T17:13:13.000Z | # Copyright 2018 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... | 43.26087 | 80 | 0.688317 |
42967266a5b6358f565f1e4abeacfbee07a02504 | 5,466 | py | Python | examples/torch/common/models/classification/vgg11_bn_cifar10.py | vuiseng9/nncf_pytorch | c2b1f069c867327203629201aecae3b7815e7895 | [
"Apache-2.0"
] | 136 | 2020-06-01T14:03:31.000Z | 2020-10-28T06:10:50.000Z | examples/torch/common/models/classification/vgg11_bn_cifar10.py | vuiseng9/nncf_pytorch | c2b1f069c867327203629201aecae3b7815e7895 | [
"Apache-2.0"
] | 133 | 2020-05-26T13:48:04.000Z | 2020-10-28T05:25:55.000Z | examples/torch/common/models/classification/vgg11_bn_cifar10.py | vuiseng9/nncf_pytorch | c2b1f069c867327203629201aecae3b7815e7895 | [
"Apache-2.0"
] | 36 | 2020-05-28T08:18:39.000Z | 2020-10-27T14:46:58.000Z | """
Copyright (c) 2022 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... | 29.387097 | 86 | 0.572631 |
d9265459bb7a6dd24922dbba8a628b965416d7fe | 1,374 | py | Python | src/__init__.py | suprigan/eduneuronet | 073891cdb4c12d852f2f98582f337022dd83b0b1 | [
"Apache-2.0"
] | null | null | null | src/__init__.py | suprigan/eduneuronet | 073891cdb4c12d852f2f98582f337022dd83b0b1 | [
"Apache-2.0"
] | null | null | null | src/__init__.py | suprigan/eduneuronet | 073891cdb4c12d852f2f98582f337022dd83b0b1 | [
"Apache-2.0"
] | null | null | null | import socket
import sys
class AbstractHTTPServer:
def __init__(self, host, port, server_name):
self._host = host
self._port = port
self._server_name = server_name
def serve_forever(self):
serv_sock = socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
proto=0)
try:
ser... | 21.46875 | 46 | 0.635371 |
c062502c697723a8c53e32e4a9e718cbe8c181fa | 4,169 | py | Python | tests/dataset/test_update_dataset_attributes.py | ErinCompaan/tamr-toolbox | b28d7f8b981a8068a1230ec33ebfa890060b20de | [
"Apache-2.0"
] | 1 | 2021-11-27T00:28:05.000Z | 2021-11-27T00:28:05.000Z | tests/dataset/test_update_dataset_attributes.py | ErinCompaan/tamr-toolbox | b28d7f8b981a8068a1230ec33ebfa890060b20de | [
"Apache-2.0"
] | null | null | null | tests/dataset/test_update_dataset_attributes.py | ErinCompaan/tamr-toolbox | b28d7f8b981a8068a1230ec33ebfa890060b20de | [
"Apache-2.0"
] | null | null | null | """Tests for tasks related creating and updating datasets in Tamr"""
import tamr_toolbox as tbox
from tamr_toolbox import utils
from tamr_toolbox.utils.testing import mock_api
from tamr_toolbox.models.attribute_type import Array, STRING, DOUBLE, INT
from tests._common import get_toolbox_root_dir
# A valid password is... | 33.620968 | 88 | 0.705205 |
8b6d2ff679ca32b1e891dea88a17e8f4fb5af060 | 18,018 | py | Python | dags/dataTransfers.py | Pardhu448/BocwDataPipeline | 107a1f660880879917c0634a799a00693be333e7 | [
"MIT"
] | null | null | null | dags/dataTransfers.py | Pardhu448/BocwDataPipeline | 107a1f660880879917c0634a799a00693be333e7 | [
"MIT"
] | null | null | null | dags/dataTransfers.py | Pardhu448/BocwDataPipeline | 107a1f660880879917c0634a799a00693be333e7 | [
"MIT"
] | null | null | null | import pandas
import json
from google.cloud import bigquery
from airflow.operators.bash_operator import BashOperator
from airflow.operators.python import PythonOperator
import gspread
from constants import BaseDailyDumpPath, BqCentralStorageDataSet, BqProjectLocation
from dataFormatting import parseJsonFile
from ... | 47.920213 | 157 | 0.667333 |
7934495011110b6bd7e2669dc440a19f51e4a3c4 | 23 | py | Python | metadamageprofiler/__version__.py | ChristianMichelsen/metadamageprofiler | f563ea5674e75cfa4a33a8d7ad17b12cd093f26e | [
"MIT"
] | null | null | null | metadamageprofiler/__version__.py | ChristianMichelsen/metadamageprofiler | f563ea5674e75cfa4a33a8d7ad17b12cd093f26e | [
"MIT"
] | null | null | null | metadamageprofiler/__version__.py | ChristianMichelsen/metadamageprofiler | f563ea5674e75cfa4a33a8d7ad17b12cd093f26e | [
"MIT"
] | null | null | null | __version__ = "21.6.1"
| 11.5 | 22 | 0.652174 |
934099d69cf81274af4600fcb855e8960387bb70 | 12,549 | py | Python | pyserial_bluetooth.py | Flames-LLC/Bella1.0 | b92951533bac827ea02821cd2788a7c6b5b43b94 | [
"MIT"
] | null | null | null | pyserial_bluetooth.py | Flames-LLC/Bella1.0 | b92951533bac827ea02821cd2788a7c6b5b43b94 | [
"MIT"
] | 1 | 2021-06-11T02:24:47.000Z | 2021-06-11T02:27:30.000Z | pyserial_bluetooth.py | Flames-LLC/Bella1.0 | b92951533bac827ea02821cd2788a7c6b5b43b94 | [
"MIT"
] | null | null | null | import argparse
import pandas as pd
import numpy as np
import serial
import time
from scipy import signal
from scipy.integrate import simps
from scipy.io.wavfile import write
import matplotlib.pyplot as plt
# Byte codes
CONNECT = 0xc0
SYNC = 0xaa
EXCODE = 0x55
POOR_SIGNAL = 0x02
ATTENTION = 0x04
MEDITATION = 0x05
BLIN... | 41.55298 | 122 | 0.53582 |
1df2c6187fb295a8a84f5461b0573359edf4be9f | 566 | py | Python | DeviceInput/Gamepad/__init__.py | HelloWorld-py/PseudoEngine | 11f5bc21c4399c095d928ea698ecc1728cbf56b0 | [
"MIT"
] | null | null | null | DeviceInput/Gamepad/__init__.py | HelloWorld-py/PseudoEngine | 11f5bc21c4399c095d928ea698ecc1728cbf56b0 | [
"MIT"
] | null | null | null | DeviceInput/Gamepad/__init__.py | HelloWorld-py/PseudoEngine | 11f5bc21c4399c095d928ea698ecc1728cbf56b0 | [
"MIT"
] | null | null | null | from ._base import DeviceManager, UnpluggedError
devices = DeviceManager() # pylint: disable=invalid-name
def get_gamepad(index=0):
"""Get a single action from a gamepad. DOES NOT CHECK ERRORS ENSURE TO check_gamepad BEFORE USING"""
gamepad = devices.gamepads[index]
return gamepad.read()
def check_gam... | 22.64 | 104 | 0.657244 |
3cc33951e4cec77339626049d6c5c012cda179af | 2,309 | py | Python | test/python-version.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 1 | 2017-01-28T15:39:07.000Z | 2017-01-28T15:39:07.000Z | test/python-version.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 4 | 2019-04-11T16:27:45.000Z | 2019-04-11T23:56:30.000Z | test/python-version.py | moroten/scons | 20927b42ed4f0cb87f51287fa3b4b6cf915afcf8 | [
"MIT"
] | 2 | 2018-01-16T11:29:16.000Z | 2020-05-13T16:48:26.000Z | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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, publish,
... | 30.786667 | 83 | 0.735816 |
c5861c14463714b539d37c48b852bf876d270a61 | 1,120 | py | Python | modules/terminal.py | italoalanw3/yt-playlist-download | e410af419c865da8d502856a8190572dfb705fef | [
"MIT"
] | null | null | null | modules/terminal.py | italoalanw3/yt-playlist-download | e410af419c865da8d502856a8190572dfb705fef | [
"MIT"
] | null | null | null | modules/terminal.py | italoalanw3/yt-playlist-download | e410af419c865da8d502856a8190572dfb705fef | [
"MIT"
] | null | null | null | import sys, colorama
colorama.init(autoreset=True)
def get_argument_count():
return len(sys.argv)
def get_argument(index):
return sys.argv[index]
def print_green(str):
try:
print(colorama.Fore.GREEN + str)
except:
print(colorama.Fore.GREEN + 'Não foi possível exibir string')
def pr... | 29.473684 | 153 | 0.673214 |
56ceda5d2a985ffabc6bf604017c5bbd5a29b6ff | 50,502 | py | Python | electroncash_gui/qt/transaction_dialog.py | lekhanhbf121/Electron-Cash-SLP | f2fb4b3ba8bcf2a5b8f888584a98b3e40eae9296 | [
"MIT"
] | 53 | 2019-01-14T17:49:47.000Z | 2022-03-29T13:51:43.000Z | electroncash_gui/qt/transaction_dialog.py | lekhanhbf121/Electron-Cash-SLP | f2fb4b3ba8bcf2a5b8f888584a98b3e40eae9296 | [
"MIT"
] | 186 | 2019-01-10T17:33:15.000Z | 2022-02-01T02:14:41.000Z | electroncash_gui/qt/transaction_dialog.py | lekhanhbf121/Electron-Cash-SLP | f2fb4b3ba8bcf2a5b8f888584a98b3e40eae9296 | [
"MIT"
] | 54 | 2019-01-23T21:47:10.000Z | 2022-01-31T20:44:53.000Z | #!/usr/bin/env python3
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@gitorious
#
# 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 with... | 48.188931 | 190 | 0.608629 |
9a3de426fbf59a81d92a965427429f8b712dc64f | 151 | py | Python | externalvars/environment.py | cmu-sei/usersim | 0a90e1c2f32ce27bbb564c7196050c50409989dd | [
"BSL-1.0"
] | 10 | 2018-05-07T07:52:51.000Z | 2021-09-04T05:34:46.000Z | externalvars/environment.py | cmu-sei/usersim | 0a90e1c2f32ce27bbb564c7196050c50409989dd | [
"BSL-1.0"
] | null | null | null | externalvars/environment.py | cmu-sei/usersim | 0a90e1c2f32ce27bbb564c7196050c50409989dd | [
"BSL-1.0"
] | 4 | 2018-04-09T17:59:13.000Z | 2019-11-17T01:33:35.000Z | # Copyright 2017 Carnegie Mellon University. See LICENSE.md file for terms.
import os
def lookup(var_name):
return os.environ.get(var_name, '')
| 18.875 | 75 | 0.741722 |
8b8053e3119c825c4ff4df4210ff92ca5af3b961 | 4,655 | py | Python | ciphey/basemods/Crackers/xorcrypt.py | Cyclic3/Ciphey | 8c0f7e713f8b55da408a9655e5addc7d05d84889 | [
"MIT"
] | 1 | 2021-08-19T17:40:10.000Z | 2021-08-19T17:40:10.000Z | ciphey/basemods/Crackers/xorcrypt.py | Cyclic3/Ciphey | 8c0f7e713f8b55da408a9655e5addc7d05d84889 | [
"MIT"
] | 7 | 2021-08-02T01:05:40.000Z | 2022-03-18T00:22:21.000Z | ciphey/basemods/Crackers/xorcrypt.py | Cyclic3/Ciphey | 8c0f7e713f8b55da408a9655e5addc7d05d84889 | [
"MIT"
] | null | null | null | """
██████╗██╗██████╗ ██╗ ██╗███████╗██╗ ██╗
██╔════╝██║██╔══██╗██║ ██║██╔════╝╚██╗ ██╔╝
██║ ██║██████╔╝███████║█████╗ ╚████╔╝
██║ ██║██╔═══╝ ██╔══██║██╔══╝ ╚██╔╝
╚██████╗██║██║ ██║ ██║███████╗ ██║
© Brandon Skerritt
Github: brandonskerritt
"""
import base64
from typing import Dict, List, Optio... | 32.103448 | 101 | 0.519012 |
2c9719be0afd9ebfb302e9714f88f13357e89b18 | 3,008 | py | Python | symbols.py | ViliamVadocz/RLBotLeaguePlayLeaderboard | de0017604f13d75d4a1c7cc7fc10ea7fb6406d8d | [
"MIT"
] | null | null | null | symbols.py | ViliamVadocz/RLBotLeaguePlayLeaderboard | de0017604f13d75d4a1c7cc7fc10ea7fb6406d8d | [
"MIT"
] | null | null | null | symbols.py | ViliamVadocz/RLBotLeaguePlayLeaderboard | de0017604f13d75d4a1c7cc7fc10ea7fb6406d8d | [
"MIT"
] | null | null | null | '''Creates the images used to construct the leaderboard.'''
from PIL import Image, ImageDraw, ImageFont
import numpy as np
# Getting symbol shapes.
symbols = {
# Symbol: (Image, description)
'new': (Image.open('templates/new.png'), 'New bot'),
'up': (Image.open('templates/up.png'), 'Rank up'),
... | 36.240964 | 97 | 0.558843 |
f8ec114ee1c6e8fb99a63b7ace7925ca1104420a | 5,232 | py | Python | src/ebay_rest/api/sell_account/models/time_duration.py | craiga/ebay_rest | a0be2677c65a787e9566df848ffa3ad0c309a9d9 | [
"MIT"
] | null | null | null | src/ebay_rest/api/sell_account/models/time_duration.py | craiga/ebay_rest | a0be2677c65a787e9566df848ffa3ad0c309a9d9 | [
"MIT"
] | null | null | null | src/ebay_rest/api/sell_account/models/time_duration.py | craiga/ebay_rest | a0be2677c65a787e9566df848ffa3ad0c309a9d9 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Account API
The <b>Account API</b> gives sellers the ability to configure their eBay seller accounts, including the seller's policies (the Fulfillment Policy, Payment Policy, and Return Policy), opt in and out of eBay seller programs, configure sales tax tables, and get account information... | 37.106383 | 490 | 0.615061 |
ca660b6371b75c587a24268cc5ae89c40cd3be69 | 229,326 | py | Python | Tests/test_SeqIO.py | bugra-emanet/biopython-bugra-emanet | d9f5cfd011232532b1e23802ea20f1b0523fc933 | [
"BSD-3-Clause"
] | null | null | null | Tests/test_SeqIO.py | bugra-emanet/biopython-bugra-emanet | d9f5cfd011232532b1e23802ea20f1b0523fc933 | [
"BSD-3-Clause"
] | null | null | null | Tests/test_SeqIO.py | bugra-emanet/biopython-bugra-emanet | d9f5cfd011232532b1e23802ea20f1b0523fc933 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2007-2016,2020 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for SeqIO module."""
import copy
import gzip
import sys
import unittest
impo... | 39.655196 | 219 | 0.553971 |
5950e8ebed07044a4cc5128f0f71ef8e059a70e3 | 1,253 | py | Python | begin/utils.py | jamezpolley/begins | 7dfac6f7c9f5cb04ee1f44993709895a4ea60d31 | [
"Apache-2.0"
] | 120 | 2015-03-11T19:36:57.000Z | 2021-03-28T05:02:34.000Z | begin/utils.py | jamezpolley/begins | 7dfac6f7c9f5cb04ee1f44993709895a4ea60d31 | [
"Apache-2.0"
] | 22 | 2015-02-24T22:41:18.000Z | 2020-06-10T06:27:49.000Z | begin/utils.py | jamezpolley/begins | 7dfac6f7c9f5cb04ee1f44993709895a4ea60d31 | [
"Apache-2.0"
] | 23 | 2015-05-22T12:56:24.000Z | 2020-05-29T01:34:03.000Z | """Utility functions for begins"""
from distutils.util import strtobool as _tobool
from argparse import FileType as tofile
def tobool(value):
"""Convert a string representation of truth to True or False.
True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
are 'n', 'no', 'f', 'false', 'off... | 36.852941 | 79 | 0.670391 |
15f585f67329cdac34d163e33529664c3ccf5fd9 | 2,412 | py | Python | odoo-13.0/addons/hr_attendance/tests/test_hr_attendance_constraints.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/hr_attendance/tests/test_hr_attendance_constraints.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/hr_attendance/tests/test_hr_attendance_constraints.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import time
from odoo.tests.common import TransactionCase
class TestHrAttendance(TransactionCase):
"""Tests for attendance date ranges validity"""
def setUp(self):
super(TestHrAttendance, self).setUp()
self.attendance = self.env['hr.attendance']
self.test_emp... | 38.285714 | 85 | 0.586235 |
4063bf9047ee74d7e22e750b569db22a0eccdc09 | 30,366 | py | Python | skfuzzy/control/controlsystem.py | simensol/scikit-fuzzy | fd28afdca0a205285c7ff30927cba64491e04417 | [
"BSD-3-Clause"
] | null | null | null | skfuzzy/control/controlsystem.py | simensol/scikit-fuzzy | fd28afdca0a205285c7ff30927cba64491e04417 | [
"BSD-3-Clause"
] | null | null | null | skfuzzy/control/controlsystem.py | simensol/scikit-fuzzy | fd28afdca0a205285c7ff30927cba64491e04417 | [
"BSD-3-Clause"
] | null | null | null | """
controlsystem.py : Framework for the new fuzzy logic control system API.
"""
from __future__ import print_function, division
import numpy as np
import networkx as nx
from warnings import warn
from ..fuzzymath.fuzzy_ops import _interp_universe_fast
from skfuzzy import interp_membership, defuzz
from .fuzzyvariable ... | 37.213235 | 83 | 0.580979 |
09832e782ffcba0d5f2fc2545a1ff7cedaae1335 | 2,168 | py | Python | resources/lib/kodiutils.py | FraserChapman/plugin.video.ntsv | c97a525c8d8965c17608656425687bb486ff388c | [
"MIT"
] | null | null | null | resources/lib/kodiutils.py | FraserChapman/plugin.video.ntsv | c97a525c8d8965c17608656425687bb486ff388c | [
"MIT"
] | null | null | null | resources/lib/kodiutils.py | FraserChapman/plugin.video.ntsv | c97a525c8d8965c17608656425687bb486ff388c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Kodi gui and settings helpers"""
__author__ = "fraser"
import os
import xbmc
import xbmcaddon
import xbmcgui
ADDON = xbmcaddon.Addon()
ADDON_NAME = ADDON.getAddonInfo("name")
ADDON_PATH = ADDON.getAddonInfo("path")
MEDIA_URI = os.path.join(ADDON_PATH, "resources", "media")
def art(imag... | 23.311828 | 91 | 0.642528 |
7e440dc1a1c8cad25b00ac86fb4529d597fd6f13 | 129 | py | Python | Documentation/GuidesFromPlosCompBioPaper/ExampleCaseC/ReadyToUseFiles/RestingCondition/LVventricularPressureReceiver.py | carthurs/CRIMSONGUI | 1464df9c4d04cf3ba131ca90b91988a06845c68e | [
"BSD-3-Clause"
] | 10 | 2020-09-17T18:55:31.000Z | 2022-02-23T02:52:38.000Z | Documentation/GuidesFromPlosCompBioPaper/ExampleCaseC/ReadyToUseFiles/RestingCondition/LVventricularPressureReceiver.py | carthurs/CRIMSONGUI | 1464df9c4d04cf3ba131ca90b91988a06845c68e | [
"BSD-3-Clause"
] | null | null | null | Documentation/GuidesFromPlosCompBioPaper/ExampleCaseC/ReadyToUseFiles/RestingCondition/LVventricularPressureReceiver.py | carthurs/CRIMSONGUI | 1464df9c4d04cf3ba131ca90b91988a06845c68e | [
"BSD-3-Clause"
] | 3 | 2021-05-19T09:02:21.000Z | 2021-07-26T17:39:57.000Z | version https://git-lfs.github.com/spec/v1
oid sha256:8d5ef66bb6efcdd47ae1fb5c07b83d503b512a984289c52d78bc3c02e55f2a05
size 1277
| 32.25 | 75 | 0.883721 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.