hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8fe41e532494a01d940f2785a24f1f0333f1aa5e | 2,110 | py | Python | docs/source/conf.py | JeremieHornus/ufoLib2 | 084dac404c2e84d0945e26ebb93eb699b260e743 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | JeremieHornus/ufoLib2 | 084dac404c2e84d0945e26ebb93eb699b260e743 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | JeremieHornus/ufoLib2 | 084dac404c2e84d0945e26ebb93eb699b260e743 | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 32.461538 | 79 | 0.663033 |
97a34141ddb6da281c5baca69b4da056e8c6bb95 | 433 | py | Python | python/project_kine/temp.py | OthmanEmpire/misc_code | 4d487db518167b62969ad65abaffbc9e01777d91 | [
"MIT"
] | null | null | null | python/project_kine/temp.py | OthmanEmpire/misc_code | 4d487db518167b62969ad65abaffbc9e01777d91 | [
"MIT"
] | null | null | null | python/project_kine/temp.py | OthmanEmpire/misc_code | 4d487db518167b62969ad65abaffbc9e01777d91 | [
"MIT"
] | null | null | null | __author__ = 'Ozkh'
def get_text(name):
return "lorem ipsum, {0} dolor sit amet".format(name)
def p_decorate(func):
def func_wrapper(name):
return "<p>{0}</p>".format(func(name))
return func_wrapper
my_get_text = p_decorate(get_text)
print(my_get_text("John"))
# <p>Outputs lorem ipsum, John dolor ... | 17.32 | 56 | 0.69746 |
6967414250bd3a4e9e9317ecf1cdb87ee0801abf | 2,207 | py | Python | mortgage_calculator.py | IanMadlenya/investable | 2e0101158c7331119f62a3e07cff8349ea52b0e0 | [
"MIT"
] | 18 | 2017-02-08T20:29:08.000Z | 2021-08-07T20:14:35.000Z | mortgage_calculator.py | IanMadlenya/investable | 2e0101158c7331119f62a3e07cff8349ea52b0e0 | [
"MIT"
] | 1 | 2021-08-11T19:12:18.000Z | 2021-08-11T19:12:18.000Z | mortgage_calculator.py | jttyeung/investable | 2e0101158c7331119f62a3e07cff8349ea52b0e0 | [
"MIT"
] | 10 | 2017-02-22T02:55:47.000Z | 2022-03-14T06:58:42.000Z | import re
def calculate_mortgage(mortgage_details):
"""
Calculates mortgage monthly payment rate.
Tests:
>>> calculate_mortgage({'price': '$1,000,000', 'rate': '5.25', 'downpayment': '200000', 'loan': '30'})
('$4,418', '$1,590,347')
>>> calculate_mortgage({'price': '$650,000', 'ra... | 36.783333 | 122 | 0.654735 |
c2b71509c1e46f082585b6cea0a0528f3c2f5b9b | 30 | py | Python | web3_multicall/_utils/__init__.py | BrunoMazorra/web3_multicall_blocknumber | 2f12f6b6bb9853b10db90b968f5b0b75a9b1a7b4 | [
"MIT"
] | 1 | 2021-12-15T04:07:25.000Z | 2021-12-15T04:07:25.000Z | web3_multicall/_utils/__init__.py | BrunoMazorra/web3_multicall_blocknumber | 2f12f6b6bb9853b10db90b968f5b0b75a9b1a7b4 | [
"MIT"
] | null | null | null | web3_multicall/_utils/__init__.py | BrunoMazorra/web3_multicall_blocknumber | 2f12f6b6bb9853b10db90b968f5b0b75a9b1a7b4 | [
"MIT"
] | 3 | 2021-12-15T04:07:45.000Z | 2022-03-04T03:35:28.000Z | from .function import Function | 30 | 30 | 0.866667 |
5cbd69f7d158fd9b9882b43ff96a7fa08ec90c95 | 148 | py | Python | py_placeroute.py | kiba09/unicostfortraveling | ce49ea3fca82d2013f47a2735e1c317526b67195 | [
"Apache-2.0"
] | null | null | null | py_placeroute.py | kiba09/unicostfortraveling | ce49ea3fca82d2013f47a2735e1c317526b67195 | [
"Apache-2.0"
] | null | null | null | py_placeroute.py | kiba09/unicostfortraveling | ce49ea3fca82d2013f47a2735e1c317526b67195 | [
"Apache-2.0"
] | null | null | null | import googlemaps as GoogleMaps
from pygeocoder import Geocoder
results = Geocoder.geocode("Tian'anmen,Beijing")
print(results[0].coordinates)
| 14.8 | 48 | 0.797297 |
9594d65ded58f5cb4edc3f262f7ba340cb6c2d6a | 8,793 | py | Python | BND-DDQN/GazeboWorld.py | KerryWu16/BND-DDQN | 30bc2bf7a29415c453746fe472ac2d558c481197 | [
"MIT"
] | 6 | 2019-07-18T14:22:23.000Z | 2022-03-06T09:42:18.000Z | BND-DDQN/GazeboWorld.py | KerryWu16/BND-DDQN | 30bc2bf7a29415c453746fe472ac2d558c481197 | [
"MIT"
] | 1 | 2020-01-18T07:47:50.000Z | 2020-02-11T02:33:51.000Z | BND-DDQN/GazeboWorld.py | KerryWu16/BND-DDQN | 30bc2bf7a29415c453746fe472ac2d558c481197 | [
"MIT"
] | 2 | 2019-07-18T14:22:33.000Z | 2022-01-18T07:41:22.000Z | import rospy
import numpy as np
import cv2
import copy
import tf
from geometry_msgs.msg import Twist
from gazebo_msgs.msg import ModelStates
from gazebo_msgs.msg import ModelState
from gazebo_msgs.msg import ContactsState
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
from nav_msgs.msg import Odometr... | 32.327206 | 114 | 0.717844 |
47c2995d0a65ef5dbf9948db78ab9709b678b10a | 4,246 | py | Python | main.py | Saeko22/Discord-Bot | bc2ddfbde978441383af09a6e5b06d3ef649b477 | [
"Unlicense"
] | null | null | null | main.py | Saeko22/Discord-Bot | bc2ddfbde978441383af09a6e5b06d3ef649b477 | [
"Unlicense"
] | null | null | null | main.py | Saeko22/Discord-Bot | bc2ddfbde978441383af09a6e5b06d3ef649b477 | [
"Unlicense"
] | null | null | null | import discord
from discord.ext import commands
import pytz
from datetime import datetime
bot = commands.Bot(intents=discord.Intents.all(), command_prefix='&')
bot.remove_command('help')
@bot.event
async def on_ready():
await bot.change_presence(status=discord.Status.online, activity=discord.Activity(
typ... | 31.686567 | 117 | 0.689119 |
b18b781c389ea140233f507cf22012762ca15c5f | 437 | py | Python | PyWorkSpace/helloworld/venv/Scripts/easy_install-script.py | FTTL/GitWorkSpace | 86c38f792ad8743179716cf9ef86e02f15143ab0 | [
"MIT"
] | null | null | null | PyWorkSpace/helloworld/venv/Scripts/easy_install-script.py | FTTL/GitWorkSpace | 86c38f792ad8743179716cf9ef86e02f15143ab0 | [
"MIT"
] | 1 | 2021-01-05T07:53:12.000Z | 2021-01-05T07:53:12.000Z | PyWorkSpace/helloworld/venv/Scripts/easy_install-script.py | FTTL/GitWorkSpace | 86c38f792ad8743179716cf9ef86e02f15143ab0 | [
"MIT"
] | null | null | null | #!E:\PyWorkSpace\helloworld\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', ... | 33.615385 | 83 | 0.693364 |
d9bce8f172fe787bb92d9d0b4ef9323ef0e0e4ef | 36 | py | Python | pylearn2/sandbox/rnn/utils/__init__.py | BouchardLab/pylearn2 | 4cab785b870d22cd9e85a5f536d4cac234b6bf60 | [
"BSD-3-Clause"
] | 2,045 | 2015-01-01T14:07:52.000Z | 2022-03-08T08:56:41.000Z | pylearn2/sandbox/rnn/utils/__init__.py | BouchardLab/pylearn2 | 4cab785b870d22cd9e85a5f536d4cac234b6bf60 | [
"BSD-3-Clause"
] | 305 | 2015-01-02T13:18:24.000Z | 2021-08-20T18:03:28.000Z | pylearn2/sandbox/rnn/utils/__init__.py | BouchardLab/pylearn2 | 4cab785b870d22cd9e85a5f536d4cac234b6bf60 | [
"BSD-3-Clause"
] | 976 | 2015-01-01T17:08:51.000Z | 2022-03-25T19:53:17.000Z | """
Utilities for RNN framework
"""
| 9 | 27 | 0.666667 |
5a14b48d67578053cb00ebd113feb48f1d93caed | 520 | py | Python | mtdnn/common/linear_pooler.py | microsoft/mt-dnn | e5c3e07f3a8e55067433714ce261a6d28ba73d22 | [
"MIT"
] | 113 | 2020-05-08T08:02:51.000Z | 2022-03-27T06:43:56.000Z | mtdnn/common/linear_pooler.py | microsoft/mt-dnn | e5c3e07f3a8e55067433714ce261a6d28ba73d22 | [
"MIT"
] | 4 | 2020-06-03T12:00:10.000Z | 2021-03-15T07:36:44.000Z | mtdnn/common/linear_pooler.py | microsoft/mt-dnn | e5c3e07f3a8e55067433714ce261a6d28ba73d22 | [
"MIT"
] | 24 | 2020-05-11T13:13:22.000Z | 2022-03-25T05:49:51.000Z | # coding=utf-8
# Copyright (c) Microsoft. All rights reserved.
from torch import nn
class LinearPooler(nn.Module):
def __init__(self, hidden_size):
super(LinearPooler, self).__init__()
self.dense = nn.Linear(hidden_size, hidden_size)
self.activation = nn.Tanh()
def forward(self, hidd... | 28.888889 | 56 | 0.692308 |
ce3dabbb0207d9d87e2f4219c43d583ea2c294a6 | 2,421 | py | Python | src/csnVisualStudio2008.py | xplanes/CSnake | 3cd7a2f5c23787262c42fe3c2763201afa1bdef4 | [
"BSD-4-Clause"
] | 4 | 2016-02-16T06:45:24.000Z | 2021-08-09T14:59:12.000Z | src/csnVisualStudio2008.py | xplanes/CSnake | 3cd7a2f5c23787262c42fe3c2763201afa1bdef4 | [
"BSD-4-Clause"
] | 5 | 2015-08-04T14:42:35.000Z | 2016-03-18T09:08:01.000Z | src/csnVisualStudio2008.py | xplanes/CSnake | 3cd7a2f5c23787262c42fe3c2763201afa1bdef4 | [
"BSD-4-Clause"
] | 5 | 2015-10-15T10:12:52.000Z | 2021-11-08T15:20:46.000Z | ## @package csnVisualStudio2008
# Definition of the csnVisualStudio2008 compilers.
# \ingroup compiler
import csnCompiler
import os
class Compiler(csnCompiler.Compiler):
""" Abstract Visual Studio 2008 compiler. """
def __init__(self):
csnCompiler.Compiler.__init__(self)
self.postProcessor = P... | 27.827586 | 101 | 0.633622 |
59c63f58a2da87bb0b0b0d15e7addf7e1eb18c75 | 6,877 | py | Python | shoptimizer_api/optimizers_builtin/condition_optimizer.py | alex-berish/shoptimizer | 3d8837352c0ae52dee2ac804750866a2b93809f1 | [
"Apache-2.0"
] | 27 | 2020-08-21T05:59:29.000Z | 2022-03-30T17:26:44.000Z | shoptimizer_api/optimizers_builtin/condition_optimizer.py | alex-berish/shoptimizer | 3d8837352c0ae52dee2ac804750866a2b93809f1 | [
"Apache-2.0"
] | null | null | null | shoptimizer_api/optimizers_builtin/condition_optimizer.py | alex-berish/shoptimizer | 3d8837352c0ae52dee2ac804750866a2b93809f1 | [
"Apache-2.0"
] | 20 | 2020-09-14T08:38:11.000Z | 2022-03-13T22:37:40.000Z | # coding=utf-8
# Copyright 2021 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 40.692308 | 84 | 0.717464 |
32201cb8ace9921ff839504714ede379b3dd9c20 | 1,130 | py | Python | bika/lims/browser/analysisprofile.py | hocinebendou/bika.gsoc | 85bc0c587de7f52073ae0e89bddbc77bf875f295 | [
"MIT"
] | null | null | null | bika/lims/browser/analysisprofile.py | hocinebendou/bika.gsoc | 85bc0c587de7f52073ae0e89bddbc77bf875f295 | [
"MIT"
] | null | null | null | bika/lims/browser/analysisprofile.py | hocinebendou/bika.gsoc | 85bc0c587de7f52073ae0e89bddbc77bf875f295 | [
"MIT"
] | null | null | null | from bika.lims.jsonapi import load_field_values
from bika.lims.interfaces import IJSONReadExtender, IAnalysisProfile
from zope.component import adapts
from zope.interface import implements
class JSONReadExtender(object):
"""- Place additional information about profile services
into the returned records.
U... | 35.3125 | 75 | 0.607965 |
9058e8f2eaed6e030aaadb0d42703b92bcf39c83 | 10,473 | py | Python | elevenclock/lang/lang_el.py | wanderleihuttel/ElevenClock | de4272a650111233acf36c909c7e269c8dc810d2 | [
"Apache-2.0"
] | null | null | null | elevenclock/lang/lang_el.py | wanderleihuttel/ElevenClock | de4272a650111233acf36c909c7e269c8dc810d2 | [
"Apache-2.0"
] | null | null | null | elevenclock/lang/lang_el.py | wanderleihuttel/ElevenClock | de4272a650111233acf36c909c7e269c8dc810d2 | [
"Apache-2.0"
] | null | null | null | # INSTRUCTIONS
# Translate the text and write it between the "
# EXAMPLE: original -> "This text is in english: value {0}"
# translation -> "Aquest text està en anglès: valor {0}"
# If you see sth like {0}, {1}, maintain it on the translated sentence
# Meke special attention to elements like "... | 50.110048 | 180 | 0.5835 |
d1fd8b73c4920fae582426473920c41effe5c00f | 500 | py | Python | jupyterurlparams/__init__.py | manics/jupyter-urlparams | 2e40927e6bf2e1b780e37d440cc7a463415da91d | [
"BSD-3-Clause"
] | 2 | 2020-03-12T18:21:19.000Z | 2020-03-13T22:27:39.000Z | jupyterurlparams/__init__.py | manics/jupyter-urlparams | 2e40927e6bf2e1b780e37d440cc7a463415da91d | [
"BSD-3-Clause"
] | null | null | null | jupyterurlparams/__init__.py | manics/jupyter-urlparams | 2e40927e6bf2e1b780e37d440cc7a463415da91d | [
"BSD-3-Clause"
] | null | null | null | from .version import __version__ # noqa
from .handlers import (
UIHandler,
)
from notebook.utils import url_path_join
def _jupyter_server_extension_paths():
return [{
'module': 'jupyterurlparams',
}]
def load_jupyter_server_extension(nbapp):
web_app = nbapp.web_app
base_url = url_path_j... | 22.727273 | 71 | 0.686 |
59818180ada892159244b8e7ca3cf197cf849760 | 6,864 | py | Python | server/database/models.py | FemiBlack/flask-vue-building-spa | a275da149ee60242170440fba0fd0dc0ecefe659 | [
"MIT"
] | null | null | null | server/database/models.py | FemiBlack/flask-vue-building-spa | a275da149ee60242170440fba0fd0dc0ecefe659 | [
"MIT"
] | null | null | null | server/database/models.py | FemiBlack/flask-vue-building-spa | a275da149ee60242170440fba0fd0dc0ecefe659 | [
"MIT"
] | null | null | null | from .db import db
from flask_bcrypt import generate_password_hash,check_password_hash
# class RemCol(db.Document):
# remark = db.StringField()
# response = db.StringField()
class BuildingExtEnv(db.EmbeddedDocument):
drv_rain = db.DictField()
drainage_issue = db.DictField()
water_log... | 41.101796 | 86 | 0.688228 |
be9979bb3af15007831026978a63090be003432a | 147 | py | Python | happy/fun/urls.py | 0xRumple/happy | bc4be2ae6320281887125d9a19cfa62a58a83331 | [
"Apache-2.0"
] | 7 | 2018-06-05T13:50:10.000Z | 2021-08-04T12:13:53.000Z | happy/fun/urls.py | 0xRumple/happy | bc4be2ae6320281887125d9a19cfa62a58a83331 | [
"Apache-2.0"
] | 67 | 2018-06-13T15:49:35.000Z | 2021-06-10T20:32:08.000Z | happy/fun/urls.py | 0xRumple/happy | bc4be2ae6320281887125d9a19cfa62a58a83331 | [
"Apache-2.0"
] | 7 | 2018-06-05T13:50:25.000Z | 2019-04-01T08:28:24.000Z | # from django.urls import path, include
# from rest_framework.urlpatterns import format_suffix_patterns
# from . import views
urlpatterns = [
]
| 16.333333 | 63 | 0.77551 |
672f707120b9c828f99f25790702b47d2efc0e95 | 383 | py | Python | Yeps/Yeps/wsgi.py | hezuoguang/Yeps-Server | 04c9bc9674fc93f583a46fb4b4197ea1855e5fb7 | [
"MIT"
] | 1 | 2017-06-08T03:15:53.000Z | 2017-06-08T03:15:53.000Z | Yeps/Yeps/wsgi.py | hezuoguang/Yeps-Server | 04c9bc9674fc93f583a46fb4b4197ea1855e5fb7 | [
"MIT"
] | null | null | null | Yeps/Yeps/wsgi.py | hezuoguang/Yeps-Server | 04c9bc9674fc93f583a46fb4b4197ea1855e5fb7 | [
"MIT"
] | null | null | null | """
WSGI config for Yeps project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Yeps.settings")
from django.core.wsgi im... | 25.533333 | 78 | 0.785901 |
7d09ff9e14923067e653ca7b7a251c840fd6789c | 316,766 | py | Python | theano/tensor/tests/test_basic.py | gundun/theano | 09d17fff10487dca7149e34601b8c6efdc572a19 | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/tests/test_basic.py | gundun/theano | 09d17fff10487dca7149e34601b8c6efdc572a19 | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/tests/test_basic.py | gundun/theano | 09d17fff10487dca7149e34601b8c6efdc572a19 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, print_function, division
import itertools
import logging
import operator
import os
import sys
from tempfile import mkstemp
import unittest
import warnings
from copy import copy, deepcopy
# Import builtin min to be able to use it after importing the tensor version.
from theano.com... | 38.564159 | 274 | 0.544323 |
fa447e2b35fde4753e31b63c558c07e8914c853f | 1,517 | py | Python | oop 1-1.py | johndaguio/OOP---1-1 | ea94f38412aac5f8d0ee99a16bf252af97546c8b | [
"Apache-2.0"
] | null | null | null | oop 1-1.py | johndaguio/OOP---1-1 | ea94f38412aac5f8d0ee99a16bf252af97546c8b | [
"Apache-2.0"
] | null | null | null | oop 1-1.py | johndaguio/OOP---1-1 | ea94f38412aac5f8d0ee99a16bf252af97546c8b | [
"Apache-2.0"
] | null | null | null | from tkinter import *
window = Tk()
window.geometry("600x500+30+20")
window.title("Welcome to Python Programming")
#add Button widget
btn = Button(window, text = "Click to add name", fg="blue")
btn.place(x= 80, y = 100)
#Add label widget
lbl = Label(window, text = "Student Personal Information", fg = ... | 24.868852 | 87 | 0.651945 |
f33d08632137524aa64828c5ac39b2885b92195f | 93 | py | Python | bmstocker/apps.py | hchockarprasad/bmdjango | a978e4bca264eaa5a1f21df332f7da06f9f69ee5 | [
"MIT"
] | 3 | 2017-10-29T13:37:58.000Z | 2017-11-06T15:31:35.000Z | bmstocker/apps.py | hchockarprasad/bmdjango | a978e4bca264eaa5a1f21df332f7da06f9f69ee5 | [
"MIT"
] | null | null | null | bmstocker/apps.py | hchockarprasad/bmdjango | a978e4bca264eaa5a1f21df332f7da06f9f69ee5 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class BmstockerConfig(AppConfig):
name = 'bmstocker'
| 15.5 | 33 | 0.763441 |
ade4dc093d58dece6985550d71244e96ecc0c484 | 1,075 | py | Python | misc/python/setup.py | rsignavong/materialize | 1a3be2b7b73919d59274e45d100592813c186d44 | [
"MIT"
] | 3,840 | 2020-02-13T18:28:21.000Z | 2022-03-31T17:25:04.000Z | misc/python/setup.py | rsignavong/materialize | 1a3be2b7b73919d59274e45d100592813c186d44 | [
"MIT"
] | 5,802 | 2020-02-13T18:59:27.000Z | 2022-03-31T21:50:24.000Z | misc/python/setup.py | morsapaes/materialize | 9f70c024869d681dbd8a2644b6d368b5f7e9707e | [
"MIT"
] | 295 | 2020-02-13T18:49:32.000Z | 2022-03-30T10:55:12.000Z | # Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software... | 29.054054 | 83 | 0.705116 |
c15d972c2dec4b9d93aefecc31bb25dda99bca9f | 507 | py | Python | plotly/validators/layout/scene/xaxis/tickformatstop/_enabled.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/layout/scene/xaxis/tickformatstop/_enabled.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/layout/scene/xaxis/tickformatstop/_enabled.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self,
plotly_name='enabled',
parent_name='layout.scene.xaxis.tickformatstop',
**kwargs
):
super(EnabledValidator, self).__init__(
plotly... | 26.684211 | 70 | 0.615385 |
0692f27bed5be0b33f5b0d2ac143fadf6063eaac | 3,372 | py | Python | metaci/repository/models.py | sfdc-qbranch/MetaCI | 78ac0d2bccd2db381998321ebd71029dd5d9ab39 | [
"BSD-3-Clause"
] | 48 | 2018-10-24T14:52:06.000Z | 2022-03-25T21:14:50.000Z | metaci/repository/models.py | sfdc-qbranch/MetaCI | 78ac0d2bccd2db381998321ebd71029dd5d9ab39 | [
"BSD-3-Clause"
] | 2,034 | 2018-10-31T20:59:16.000Z | 2022-03-22T21:38:03.000Z | metaci/repository/models.py | sfdc-qbranch/MetaCI | 78ac0d2bccd2db381998321ebd71029dd5d9ab39 | [
"BSD-3-Clause"
] | 27 | 2018-12-24T18:16:23.000Z | 2021-12-15T17:57:27.000Z | import github3.exceptions
from cumulusci.core.exceptions import GithubException
from cumulusci.core.github import get_github_api_for_repo
from django.apps import apps
from django.db import models
from django.http import Http404
from django.urls import reverse
from model_utils.managers import SoftDeletableManager
from m... | 31.811321 | 88 | 0.668743 |
77f574bc3dc735abe684c9910e4b6ccda9523230 | 1,850 | py | Python | mvp/mvp/views/main_view.py | 2110521-2563-1-Software-Architecture/TBD-Assignment-3 | d78e849a50c6367e1e01c1271753301d3d8e4dd8 | [
"MIT"
] | null | null | null | mvp/mvp/views/main_view.py | 2110521-2563-1-Software-Architecture/TBD-Assignment-3 | d78e849a50c6367e1e01c1271753301d3d8e4dd8 | [
"MIT"
] | null | null | null | mvp/mvp/views/main_view.py | 2110521-2563-1-Software-Architecture/TBD-Assignment-3 | d78e849a50c6367e1e01c1271753301d3d8e4dd8 | [
"MIT"
] | null | null | null | import wx
from typing import List
from mvp.contracts.main_contract import MainContract
from mvp.models.entities.note import Note
class MainView(MainContract.View):
def __init__(self):
MainContract.View.__init__(self, "MVP Note Application")
def init_ui(self):
panel = wx.Panel(self)
v... | 31.355932 | 101 | 0.651351 |
356b0230101a01dba88c99eaee5135d4b3aaa1e1 | 1,554 | py | Python | samples/justcount.py | rodrigoacastro/seacow | 17b89951bbb8d7f765d9cdbd330ef70e4bfcc2fa | [
"BSD-2-Clause"
] | null | null | null | samples/justcount.py | rodrigoacastro/seacow | 17b89951bbb8d7f765d9cdbd330ef70e4bfcc2fa | [
"BSD-2-Clause"
] | null | null | null | samples/justcount.py | rodrigoacastro/seacow | 17b89951bbb8d7f765d9cdbd330ef70e4bfcc2fa | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from SeaCOW import Query, Nonprocessor
# Create a Query object and set whatever needs to be set.
q = Query()
q.corpus = 'decow16a-nano' # Lower-case name of the corpusto use.
q.string = '[word="Chuzpe"]' # A normal CQL string as used in NoSketchEngine.
q.max_hit... | 51.8 | 105 | 0.597812 |
05ee83a43ca22e64bab376d5cc1e218397af96b7 | 32,722 | py | Python | ion_networks/ms_utils.py | swillems/ion_networks | 5304a92248ec007ac2253f246a3d44bdb58ae110 | [
"MIT"
] | 2 | 2020-10-28T16:11:56.000Z | 2020-12-03T13:19:18.000Z | ion_networks/ms_utils.py | swillems/ion_networks | 5304a92248ec007ac2253f246a3d44bdb58ae110 | [
"MIT"
] | null | null | null | ion_networks/ms_utils.py | swillems/ion_networks | 5304a92248ec007ac2253f246a3d44bdb58ae110 | [
"MIT"
] | null | null | null | #!python
# builtin
import os
import sys
import logging
import json
import time
import contextlib
import multiprocessing
import urllib
import csv
# external
import numpy as np
import pandas as pd
import h5py
import pyteomics.mgf
# local
from ion_networks._version import __version__ as VERSION
from ion_networks import n... | 32.080392 | 111 | 0.606503 |
30450f2ad0e5ebd695a8166de46746c3932be80c | 4,102 | py | Python | python/simple-linked-list/simple_linked_list_test.py | tamireinhorn/exercism | 3ca78b262ad590b67c75c5d1cd83db02bc2d1e6e | [
"MIT"
] | null | null | null | python/simple-linked-list/simple_linked_list_test.py | tamireinhorn/exercism | 3ca78b262ad590b67c75c5d1cd83db02bc2d1e6e | [
"MIT"
] | 2 | 2021-12-18T16:31:51.000Z | 2021-12-18T16:33:33.000Z | python/simple-linked-list/simple_linked_list_test.py | tamireinhorn/Exercism | 3a3d5744e88ab4457df4e6ac20d772d8c50c43da | [
"MIT"
] | null | null | null | import unittest
from simple_linked_list import LinkedList, EmptyListException
# No canonical data available for this exercise
class SimpleLinkedListTest(unittest.TestCase):
def test_empty_list_has_len_zero(self):
sut = LinkedList()
self.assertEqual(len(sut), 0)
def test_singleton_list_has_l... | 34.183333 | 93 | 0.641638 |
5811021a3bf72605de259a0722fc305d8c0e5a8f | 734 | py | Python | retirement/migrations/0010_auto_20190515_1732.py | Jerome-Celle/Blitz-API | 7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0 | [
"MIT"
] | 3 | 2019-10-22T00:16:49.000Z | 2021-07-15T07:44:43.000Z | retirement/migrations/0010_auto_20190515_1732.py | Jerome-Celle/Blitz-API | 7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0 | [
"MIT"
] | 1,183 | 2018-04-19T18:40:30.000Z | 2022-03-31T21:05:05.000Z | retirement/migrations/0010_auto_20190515_1732.py | Jerome-Celle/Blitz-API | 7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0 | [
"MIT"
] | 12 | 2018-04-17T19:16:42.000Z | 2022-01-27T00:19:59.000Z | # Generated by Django 2.0.8 on 2019-05-15 21:32
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('retirement', '0009_reservation_orderline_allow_null'),
]
operations = [
mi... | 26.214286 | 64 | 0.632153 |
efbb1d5ef2574c6c57d58e5ebcebeab836c610eb | 152 | py | Python | Automate the boring stuff/Chapter_6/Regular_Expression.py | maainul/Paython | c72d7fff3b00bc4f379ca6f9dbef0678f01b55f9 | [
"DOC"
] | null | null | null | Automate the boring stuff/Chapter_6/Regular_Expression.py | maainul/Paython | c72d7fff3b00bc4f379ca6f9dbef0678f01b55f9 | [
"DOC"
] | null | null | null | Automate the boring stuff/Chapter_6/Regular_Expression.py | maainul/Paython | c72d7fff3b00bc4f379ca6f9dbef0678f01b55f9 | [
"DOC"
] | null | null | null | import re
phone=re.compile(r'\d\d\d-\d\d\d-\d\d\d\d')
mo=phone.search('My phone number is 412-444-9870')
print(mo.group())
"""
OUTPUT:
412-444-9870
"""
| 16.888889 | 50 | 0.651316 |
aee928c1a0bf28567fb0747743e8556660fa9507 | 1,015 | py | Python | abstractBaseUser/abstract_base_user/admin.py | amateur-dev/Django_CustomUser | 6bb7a8676c48d80c0817a164ca801a1008e874dc | [
"BSD-3-Clause"
] | null | null | null | abstractBaseUser/abstract_base_user/admin.py | amateur-dev/Django_CustomUser | 6bb7a8676c48d80c0817a164ca801a1008e874dc | [
"BSD-3-Clause"
] | null | null | null | abstractBaseUser/abstract_base_user/admin.py | amateur-dev/Django_CustomUser | 6bb7a8676c48d80c0817a164ca801a1008e874dc | [
"BSD-3-Clause"
] | null | null | null | # from django.contrib import admin
# Register your models here.
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .forms import CustomUserCreationForm, CustomUserChangeForm
from .models import CustomUser
class CustomUserAdmin(UserAdmin):
add_form = CustomUserCreationForm
... | 30.757576 | 137 | 0.653202 |
fa916a8d925503a3882ae31069e8c47191115590 | 3,785 | py | Python | tools/gen.py | ikrivosheev/aiohttp | 42ffdfc7bd70aedec57c5f44a6b1fc84ae565625 | [
"Apache-2.0"
] | 1 | 2021-11-11T04:05:06.000Z | 2021-11-11T04:05:06.000Z | tools/gen.py | ikrivosheev/aiohttp | 42ffdfc7bd70aedec57c5f44a6b1fc84ae565625 | [
"Apache-2.0"
] | 199 | 2020-11-01T08:02:46.000Z | 2022-03-31T07:05:31.000Z | tools/gen.py | ikrivosheev/aiohttp | 42ffdfc7bd70aedec57c5f44a6b1fc84ae565625 | [
"Apache-2.0"
] | 1 | 2021-11-11T04:04:59.000Z | 2021-11-11T04:04:59.000Z | #!/usr/bin/env python
import io
import pathlib
from collections import defaultdict
import multidict
ROOT = pathlib.Path.cwd()
while ROOT.parent != ROOT and not (ROOT / ".git").exists():
ROOT = ROOT.parent
def calc_headers(root):
hdrs_file = root / "aiohttp/hdrs.py"
code = compile(hdrs_file.read_text(),... | 21.628571 | 80 | 0.567239 |
cef06c01bf66f3405274c3dec0e9c75b0cbe287a | 2,074 | py | Python | task-library/veeam/VeeamGetHierarchyRoots.py | vNugget/blueprints | 17183beebf8bc3da1d9d3ed4b8260dd18fdc1516 | [
"MIT"
] | null | null | null | task-library/veeam/VeeamGetHierarchyRoots.py | vNugget/blueprints | 17183beebf8bc3da1d9d3ed4b8260dd18fdc1516 | [
"MIT"
] | null | null | null | task-library/veeam/VeeamGetHierarchyRoots.py | vNugget/blueprints | 17183beebf8bc3da1d9d3ed4b8260dd18fdc1516 | [
"MIT"
] | null | null | null | # region headers
# * author: igor.zecevic@nutanix.com
# * version: v1.0 - initial version
# * date: 11/03/2020
# task_name: VeeamGetHierarchyRoots
# description: Get the hierarchyRoot UID
# The script retreives the hierarchyRoots UID
# input vars: veeam_session_cookie, vc_server, api_se... | 34.566667 | 120 | 0.66972 |
ddeff27a1f0c4531bd84ecb842b4950d10175b55 | 1,869 | py | Python | watchman/test/async/test_dead_socket.py | 47-studio-org/watchman | c50631dcf9a9e7d27b2bc05cd32649546add836e | [
"MIT"
] | 3 | 2022-02-10T10:48:36.000Z | 2022-02-21T23:18:10.000Z | watchman/test/async/test_dead_socket.py | 47-studio-org/watchman | c50631dcf9a9e7d27b2bc05cd32649546add836e | [
"MIT"
] | null | null | null | watchman/test/async/test_dead_socket.py | 47-studio-org/watchman | c50631dcf9a9e7d27b2bc05cd32649546add836e | [
"MIT"
] | 1 | 2022-02-06T10:29:46.000Z | 2022-02-06T10:29:46.000Z | #!/usr/bin/env python3
# vim:ts=4:sw=4:et:
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import asyncio
import os
import unittest
import pywatchman_aio
import WatchmanInstance
# Note ... | 34.611111 | 88 | 0.635099 |
4f2601b4cc671dc9d5e402d735f8cd71a8ec14ff | 21,054 | py | Python | libs/models/detectors/scrdet/build_whole_network.py | PauliKarl/RotationDetection | 84bbfe5b1a3ee36e8ad66fd0f36a5ef7b9b0019e | [
"Apache-2.0"
] | 850 | 2020-10-27T08:51:54.000Z | 2022-03-30T15:12:06.000Z | libs/models/detectors/scrdet/build_whole_network.py | PauliKarl/RotationDetection | 84bbfe5b1a3ee36e8ad66fd0f36a5ef7b9b0019e | [
"Apache-2.0"
] | 94 | 2020-12-01T02:18:47.000Z | 2022-03-30T08:14:27.000Z | libs/models/detectors/scrdet/build_whole_network.py | PauliKarl/RotationDetection | 84bbfe5b1a3ee36e8ad66fd0f36a5ef7b9b0019e | [
"Apache-2.0"
] | 149 | 2020-10-29T03:30:32.000Z | 2022-03-29T09:53:23.000Z | # -*-coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import numpy as np
import tensorflow as tf
import tensorflow.contrib.slim as slim
from libs.models.detectors.two_stage_base_network import DetectionNetworkBase
from libs.models.losses.losses import Loss
from libs.utils import bbo... | 53.572519 | 121 | 0.544125 |
c29a2b2b3f3cce6d71365a0fa58861d1769fd702 | 433 | py | Python | setup.py | majkrzak/kot | 1ef7ee448d460bb46613c8400743b7c4185a2ed2 | [
"MIT"
] | 1 | 2019-10-06T12:00:41.000Z | 2019-10-06T12:00:41.000Z | setup.py | majkrzak/kot | 1ef7ee448d460bb46613c8400743b7c4185a2ed2 | [
"MIT"
] | 14 | 2019-10-06T12:31:11.000Z | 2019-10-16T08:05:33.000Z | setup.py | majkrzak/kot | 1ef7ee448d460bb46613c8400743b7c4185a2ed2 | [
"MIT"
] | 4 | 2019-10-06T12:41:18.000Z | 2019-10-08T01:57:21.000Z | import setuptools
setuptools.setup(
name='kot',
author='Piotr Majrzak',
author_email='piotr@majkrzak.dev',
license='MIT',
data_files = [("", ["LICENSE"])],
classifiers=[
'License :: OSI Approved :: MIT License',
],
packages=[
'kot',
],
package_dir={'kot': './src'... | 18.041667 | 49 | 0.51963 |
b4c2cbdf4813415960364a715dba4fb618d7ce93 | 7,138 | py | Python | aim/web/api/runs/utils.py | gorarakelyan/aim | eed0ac76f4bdcc81277cef4a4de1dfc3dd690644 | [
"Apache-2.0"
] | null | null | null | aim/web/api/runs/utils.py | gorarakelyan/aim | eed0ac76f4bdcc81277cef4a4de1dfc3dd690644 | [
"Apache-2.0"
] | null | null | null | aim/web/api/runs/utils.py | gorarakelyan/aim | eed0ac76f4bdcc81277cef4a4de1dfc3dd690644 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import struct
from typing import Iterator, Tuple, Optional, List
from aim.storage.context import Context
from aim.sdk.run import Run
from aim.sdk.metric import Metric
from aim.sdk.metric import MetricCollection
from aim.web.api.runs.pydantic_models import AlignedRunIn, TraceBase
from aim.storage.tr... | 34.990196 | 110 | 0.609414 |
7c7d26701cee124b0f80e46d6a66642c9a44b347 | 126 | py | Python | discoursesimplification/utils/ID_generator.py | kkatsamaktsis/PyDiscourseSimplification | 18d247894355b4b51f5abcced86e7a7292b17ac0 | [
"MIT"
] | null | null | null | discoursesimplification/utils/ID_generator.py | kkatsamaktsis/PyDiscourseSimplification | 18d247894355b4b51f5abcced86e7a7292b17ac0 | [
"MIT"
] | null | null | null | discoursesimplification/utils/ID_generator.py | kkatsamaktsis/PyDiscourseSimplification | 18d247894355b4b51f5abcced86e7a7292b17ac0 | [
"MIT"
] | null | null | null | import uuid
class IDGenerator:
@staticmethod
def generate_uuid():
return str(uuid.uuid4()).replace("-", "")
| 15.75 | 49 | 0.626984 |
795a60daa3fea4af0f505d9ce73f9436f32951c8 | 2,618 | py | Python | tests/rules/test_git_push_pull.py | WorkInProgress-Development/theplease | 9b9a2dcee3efa0e1b4f197fc55904c9327dc13ba | [
"MIT"
] | null | null | null | tests/rules/test_git_push_pull.py | WorkInProgress-Development/theplease | 9b9a2dcee3efa0e1b4f197fc55904c9327dc13ba | [
"MIT"
] | null | null | null | tests/rules/test_git_push_pull.py | WorkInProgress-Development/theplease | 9b9a2dcee3efa0e1b4f197fc55904c9327dc13ba | [
"MIT"
] | null | null | null | import pytest
from theplease.rules.git_push_pull import match, get_new_command
from theplease.types import Command
git_err = '''
To /tmp/foo
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '/tmp/bar'
hint: Updates were rejected because the tip of your current branch is be... | 35.378378 | 77 | 0.689076 |
0830e8d5aeea10e0c2437007c6d9fbaf7b16ac1c | 986 | py | Python | tests/test_deprecations.py | MattToast/SmartSim | 4bd5e231445abd9b888561930db859062708678a | [
"BSD-2-Clause"
] | null | null | null | tests/test_deprecations.py | MattToast/SmartSim | 4bd5e231445abd9b888561930db859062708678a | [
"BSD-2-Clause"
] | null | null | null | tests/test_deprecations.py | MattToast/SmartSim | 4bd5e231445abd9b888561930db859062708678a | [
"BSD-2-Clause"
] | null | null | null | import pytest
from smartsim.database import (
CobaltOrchestrator,
LSFOrchestrator,
PBSOrchestrator,
SlurmOrchestrator,
)
tf_available = True
try:
import tensorflow
except ImportError:
tf_available = False
def test_deprecated_orchestrators(wlmutils):
with pytest.deprecated_call():
... | 24.65 | 71 | 0.741379 |
32ee58937d90dd04aec0da61c72555dc6b062f04 | 1,501 | py | Python | sources_oop.py | Joefdez/gravitaionalLensing1 | 213e1e62b4f2d3881f3e2df64ea8d09998eb7189 | [
"MIT"
] | null | null | null | sources_oop.py | Joefdez/gravitaionalLensing1 | 213e1e62b4f2d3881f3e2df64ea8d09998eb7189 | [
"MIT"
] | null | null | null | sources_oop.py | Joefdez/gravitaionalLensing1 | 213e1e62b4f2d3881f3e2df64ea8d09998eb7189 | [
"MIT"
] | null | null | null | from source_generators import * # includes numpy import, np
import matplotlib.pylab as plt
class modelSource ():
'Source class to represent objects to be lensed'
def __init__(self, name, stype, side, radius=0.0, aspectRatio = 1.0, maxLum = 1.0):
""" Constructor method """
self.name = name
... | 30.632653 | 87 | 0.593604 |
6ec6852d793e6bb34994bd1cceab2494ed84c024 | 1,737 | py | Python | src/condor_tests/test_htcondor_dags/writer/test_subdag_edges.py | shamoya/htcondor | c3bbc0eb8f72b863eda2d6d0a2e92594f7346b02 | [
"Apache-2.0"
] | null | null | null | src/condor_tests/test_htcondor_dags/writer/test_subdag_edges.py | shamoya/htcondor | c3bbc0eb8f72b863eda2d6d0a2e92594f7346b02 | [
"Apache-2.0"
] | null | null | null | src/condor_tests/test_htcondor_dags/writer/test_subdag_edges.py | shamoya/htcondor | c3bbc0eb8f72b863eda2d6d0a2e92594f7346b02 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 HTCondor Team, Computer Sciences Department,
# University of Wisconsin-Madison, WI.
#
# 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/LICE... | 36.957447 | 74 | 0.743811 |
41ded2cad2689c283588b8cc60a59360703cfd05 | 4,527 | py | Python | goldcoin/pools/pool_wallet_info.py | DevMau5x/goldcoin-blockchain-2 | ed223dd16fa290ea710db7202d6c52a056242cfa | [
"Apache-2.0"
] | 17 | 2021-09-08T17:07:54.000Z | 2022-03-30T04:11:58.000Z | goldcoin/pools/pool_wallet_info.py | DevMau5x/goldcoin-blockchain-2 | ed223dd16fa290ea710db7202d6c52a056242cfa | [
"Apache-2.0"
] | 15 | 2021-09-28T21:09:49.000Z | 2022-03-22T21:13:23.000Z | goldcoin/pools/pool_wallet_info.py | Pierre21dd/gold2 | 4a35f207ed4c8a7745bfbc73fd3c190bd8b60a3f | [
"Apache-2.0"
] | 9 | 2021-09-12T10:03:23.000Z | 2022-03-15T08:35:11.000Z | from dataclasses import dataclass
from enum import IntEnum
from typing import Optional, Dict
from blspy import G1Element
from goldcoin.protocols.pool_protocol import POOL_PROTOCOL_VERSION
from goldcoin.types.blockchain_format.coin import Coin
from goldcoin.types.blockchain_format.program import Program
from goldcoin.... | 39.025862 | 117 | 0.759222 |
cb34afdbeb2d437767063fef7996f3093f16732c | 8,179 | py | Python | sdk/python/pulumi_azure_native/securityandcompliance/latest/private_endpoint_connections_adt_api.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/securityandcompliance/latest/private_endpoint_connections_adt_api.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/securityandcompliance/latest/private_endpoint_connections_adt_api.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 50.487654 | 538 | 0.697885 |
b2ed2c41e875080089f3e3aa514f5454512e494a | 2,653 | py | Python | setup.py | Neradoc/discotool | b242be28f490eabcbd115b6ca90f4c14e3b9184b | [
"MIT"
] | 16 | 2021-07-15T20:09:51.000Z | 2022-03-20T04:32:38.000Z | setup.py | Neradoc/discotool | b242be28f490eabcbd115b6ca90f4c14e3b9184b | [
"MIT"
] | 5 | 2021-04-03T06:34:48.000Z | 2022-02-16T18:01:28.000Z | setup.py | Neradoc/discotool | b242be28f490eabcbd115b6ca90f4c14e3b9184b | [
"MIT"
] | 1 | 2022-01-25T07:15:18.000Z | 2022-01-25T07:15:18.000Z | import os
import re
import setuptools
import subprocess
import sys
here = os.path.abspath(os.path.dirname(__file__))
repository_name = "Neradoc/discotool"
current_tag = subprocess.run("git describe --tags --abbrev=0",
capture_output = True,
encoding = "utf-8",
shell = True,
).stdout.strip()
with open(os.path.join... | 33.1625 | 80 | 0.643423 |
110d4d3ef5a6d86a9c343a64fedadc4f1c685d0c | 1,128 | py | Python | kruiser_palace/users/tests/test_forms.py | nickblitz/kruisers_palace | bee4a14d3cdbc9501ec02d371199d648776065ee | [
"MIT"
] | null | null | null | kruiser_palace/users/tests/test_forms.py | nickblitz/kruisers_palace | bee4a14d3cdbc9501ec02d371199d648776065ee | [
"MIT"
] | null | null | null | kruiser_palace/users/tests/test_forms.py | nickblitz/kruisers_palace | bee4a14d3cdbc9501ec02d371199d648776065ee | [
"MIT"
] | null | null | null | import pytest
from kruiser_palace.users.forms import UserCreationForm
from kruiser_palace.users.tests.factories import UserFactory
pytestmark = pytest.mark.django_db
class TestUserCreationForm:
def test_clean_username(self):
# A user with proto_user params does not exist yet.
proto_user = UserF... | 26.857143 | 60 | 0.597518 |
4af08ca9147157b907bffd27adc2bdb19c5cdfe1 | 3,827 | py | Python | src/prefect/engine/__init__.py | skyline-ai/prefect | 92430f2f91215d6c27d92ad67df67ccd639e587c | [
"Apache-2.0"
] | null | null | null | src/prefect/engine/__init__.py | skyline-ai/prefect | 92430f2f91215d6c27d92ad67df67ccd639e587c | [
"Apache-2.0"
] | null | null | null | src/prefect/engine/__init__.py | skyline-ai/prefect | 92430f2f91215d6c27d92ad67df67ccd639e587c | [
"Apache-2.0"
] | null | null | null | from warnings import warn
from prefect import config
import prefect.engine.executors
import prefect.engine.state
import prefect.engine.signals
import prefect.engine.result
import prefect.engine.result_handlers
from prefect.engine.flow_runner import FlowRunner
from prefect.engine.task_runner import TaskRunner
import pre... | 37.15534 | 110 | 0.686438 |
dd092c5dc8b1449a7fbac1f6ed5820fefb4bab83 | 851 | py | Python | email_split/test/test.py | underdogio/python-email-split | a5fa8a657ee90db68740cfe5d028b8c92afae00d | [
"MIT"
] | 5 | 2016-02-04T01:37:51.000Z | 2019-01-28T12:11:47.000Z | email_split/test/test.py | underdogio/python-email-split | a5fa8a657ee90db68740cfe5d028b8c92afae00d | [
"MIT"
] | 2 | 2016-02-04T13:00:29.000Z | 2016-12-30T20:45:15.000Z | email_split/test/test.py | underdogio/python-email-split | a5fa8a657ee90db68740cfe5d028b8c92afae00d | [
"MIT"
] | 3 | 2019-12-12T16:30:27.000Z | 2022-01-19T08:36:19.000Z | # Load in our dependencies
from unittest import TestCase
from email_split import email_split
# Define our tests
class TestEmailSplitFunction(TestCase):
def test_top_level_domain(self):
"""
email-split splitting an email with a top-level domain
returns the local part
returns... | 31.518519 | 62 | 0.643948 |
16fb78c0ef273b23bd6665eb29fe0e213baa47af | 16,713 | py | Python | ppdet/modeling/backbones/ghostnet.py | cristicmf/PaddleDetection | 818533bb299d49f114d36b60b1bff199d0231055 | [
"Apache-2.0"
] | 2 | 2021-07-06T09:09:12.000Z | 2021-07-08T08:06:40.000Z | ppdet/modeling/backbones/ghostnet.py | cristicmf/PaddleDetection | 818533bb299d49f114d36b60b1bff199d0231055 | [
"Apache-2.0"
] | null | null | null | ppdet/modeling/backbones/ghostnet.py | cristicmf/PaddleDetection | 818533bb299d49f114d36b60b1bff199d0231055 | [
"Apache-2.0"
] | 3 | 2021-09-30T02:50:21.000Z | 2021-11-16T12:38:15.000Z | # copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
#
# 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... | 35.037736 | 105 | 0.520074 |
dedd5492d697c0bfb2a1d4e8a1d0cc2649cea10a | 1,015 | py | Python | setup.py | wazizian/torch_spspmm_out | b97297cec7263ec9a34e4230d867a59bf01b3a4b | [
"MIT"
] | null | null | null | setup.py | wazizian/torch_spspmm_out | b97297cec7263ec9a34e4230d867a59bf01b3a4b | [
"MIT"
] | null | null | null | setup.py | wazizian/torch_spspmm_out | b97297cec7263ec9a34e4230d867a59bf01b3a4b | [
"MIT"
] | null | null | null | from setuptools import setup
import os
import torch
from torch.utils.cpp_extension import BuildExtension, CppExtension, CUDAExtension
cuda_support = torch.cuda.is_available()
def get_extensions():
extra_link_args = []
extension_dir = os.path.join(os.path.dirname(__file__), "csrc")
if cuda_support:
... | 29.852941 | 103 | 0.6 |
d262781e2f1ae6d216bcc38a963b29a8b3531299 | 631 | py | Python | ArubaOS-Sw_API_Scripts/python_and_rest_api_vid_scripts/get_cookie_create_vlan.py | smallfount/scriptsonly | cabdfc301da4e1653705d713b306f3fbf7f6934d | [
"Apache-2.0"
] | 32 | 2016-05-24T23:32:02.000Z | 2021-11-17T07:53:50.000Z | ArubaOS-Sw_API_Scripts/python_and_rest_api_vid_scripts/get_cookie_create_vlan.py | posai8701/scriptsonly | cabdfc301da4e1653705d713b306f3fbf7f6934d | [
"Apache-2.0"
] | 5 | 2016-09-25T15:55:02.000Z | 2018-09-06T10:54:45.000Z | ArubaOS-Sw_API_Scripts/python_and_rest_api_vid_scripts/get_cookie_create_vlan.py | posai8701/scriptsonly | cabdfc301da4e1653705d713b306f3fbf7f6934d | [
"Apache-2.0"
] | 34 | 2016-03-02T17:37:07.000Z | 2021-11-17T07:54:04.000Z | import requests
vlan_number = input('Enter VLAN number:')
vlan_name = input('Enter VLAN name:')
url_login = "http://192.168.1.29/rest/v1/login-sessions"
url_vlans = "http://192.168.1.29/rest/v1/vlans"
payload_login = "{\"userName\": \"joe\", \"password\": \"x\"}"
get_cookie = requests.request("POST", url_login, dat... | 23.37037 | 85 | 0.698891 |
21a75d48ee5d30d0bbc8bd951cda3ac93a14af4b | 4,576 | py | Python | tests/bhive/test_block.py | TheCrazyGM/bhive | 1494e90a99123ecfc5efbd927258f9ba59443e2e | [
"MIT"
] | 2 | 2020-03-21T23:50:22.000Z | 2020-03-25T19:10:48.000Z | tests/bhive/test_block.py | TheCrazyGM/bhive | 1494e90a99123ecfc5efbd927258f9ba59443e2e | [
"MIT"
] | null | null | null | tests/bhive/test_block.py | TheCrazyGM/bhive | 1494e90a99123ecfc5efbd927258f9ba59443e2e | [
"MIT"
] | 1 | 2020-03-21T23:50:25.000Z | 2020-03-21T23:50:25.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import super
import unittest
from parameterized import parameterized
from pprint import pprint
from bhive import Hive, exceptions
from bhive.block import Blo... | 36.608 | 113 | 0.641827 |
6e1fffc0dc7165bf31e251806efb26ae83f9d194 | 3,017 | py | Python | UMLRT2Kiltera_MM/graph_MT_post__Trigger_S.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 3 | 2017-06-02T19:26:27.000Z | 2021-06-14T04:25:45.000Z | UMLRT2Kiltera_MM/graph_MT_post__Trigger_S.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 8 | 2016-08-24T07:04:07.000Z | 2017-05-26T16:22:47.000Z | UMLRT2Kiltera_MM/graph_MT_post__Trigger_S.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 1 | 2019-10-31T06:00:23.000Z | 2019-10-31T06:00:23.000Z | """
__graph_MT_post__Trigger_S.py___________________________________________________________
Automatically generated graphical appearance ---> MODIFY DIRECTLY WITH CAUTION
_____________________________________________________________________________
"""
import tkFont
from graphEntity import *
from GraphicalForm ... | 43.724638 | 203 | 0.639045 |
cb896d37c24a13ca79091ec139a8c83b9a297798 | 6,337 | py | Python | test/rpc_spentindex.py | odavila466/Kron-Project | 8a915e6287ac6d21ac0a32ff69f6f04e260bd1f5 | [
"MIT"
] | 3 | 2021-05-18T05:11:56.000Z | 2021-12-05T11:25:38.000Z | test/rpc_spentindex.py | BaymaxValero/Kron-Project | e56e596ee36e4b6949ebb75a01867c08481139e2 | [
"MIT"
] | 1 | 2021-05-13T19:01:05.000Z | 2021-05-13T19:01:57.000Z | test/rpc_spentindex.py | BaymaxValero/Kron-Project | e56e596ee36e4b6949ebb75a01867c08481139e2 | [
"MIT"
] | 1 | 2021-05-18T05:11:58.000Z | 2021-05-18T05:11:58.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Copyright (c) 2017-2020 The Kron Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPC addressindex generation and fetching"""
i... | 44.626761 | 120 | 0.648887 |
7d4b1b7ef34660509d17409582e068d17d33c3a0 | 20,598 | py | Python | accounts/migrations/0002_auto_20211112_0737.py | shakori999/Django_CRM | 82789878b679e68e993295fde0040b16a1c56767 | [
"Apache-2.0"
] | null | null | null | accounts/migrations/0002_auto_20211112_0737.py | shakori999/Django_CRM | 82789878b679e68e993295fde0040b16a1c56767 | [
"Apache-2.0"
] | 2 | 2022-03-21T08:48:46.000Z | 2022-03-21T08:49:57.000Z | accounts/migrations/0002_auto_20211112_0737.py | shakori999/Django_CRM | 82789878b679e68e993295fde0040b16a1c56767 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-12 04:37
from django.db import migrations, models
import djmoney.models.fields
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='customer',
... | 514.95 | 9,762 | 0.613312 |
aab312bbb68dba1597d1ea79afa0ecdbd4110f03 | 6,902 | py | Python | wsme/tests/test_restxml.py | Kjir/wsme | 0135b7dac67668815bf34f15894f05beb0c94faa | [
"MIT"
] | null | null | null | wsme/tests/test_restxml.py | Kjir/wsme | 0135b7dac67668815bf34f15894f05beb0c94faa | [
"MIT"
] | null | null | null | wsme/tests/test_restxml.py | Kjir/wsme | 0135b7dac67668815bf34f15894f05beb0c94faa | [
"MIT"
] | null | null | null | import decimal
import datetime
import base64
from six import u, b
import six
import wsme.tests.protocol
from wsme.utils import parse_isodatetime, parse_isodate, parse_isotime
from wsme.types import isarray, isdict, isusertype, register_type
from wsme.rest.xml import fromxml, toxml
try:
import xml.etree.ElementT... | 32.556604 | 79 | 0.565923 |
4ca1af9c0083b4402e666ef57d901e82af7e7de1 | 2,544 | py | Python | main_app/migrations/0001_initial.py | SUMEKAGARWAL/Rescue | 98972f782846a2e82804dd35d371fb9799b8471d | [
"MIT"
] | null | null | null | main_app/migrations/0001_initial.py | SUMEKAGARWAL/Rescue | 98972f782846a2e82804dd35d371fb9799b8471d | [
"MIT"
] | null | null | null | main_app/migrations/0001_initial.py | SUMEKAGARWAL/Rescue | 98972f782846a2e82804dd35d371fb9799b8471d | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-11-07 06:21
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 39.138462 | 271 | 0.434748 |
151b6df07659af4118256ba996e4e21df3b97605 | 1,349 | py | Python | 100-199/180-189/189.py | dcragusa/LeetCode | 01c30de0832b378a1b054d80d1ea1d3f09a2abd3 | [
"MIT"
] | null | null | null | 100-199/180-189/189.py | dcragusa/LeetCode | 01c30de0832b378a1b054d80d1ea1d3f09a2abd3 | [
"MIT"
] | null | null | null | 100-199/180-189/189.py | dcragusa/LeetCode | 01c30de0832b378a1b054d80d1ea1d3f09a2abd3 | [
"MIT"
] | null | null | null | """
Given an array, rotate the array to the right by k steps, where k is non-negative.
Example 1:
Input: nums = [1, 2, 3, 4, 5, 6, 7], k = 3, Output: [5, 6, 7, 1, 2, 3, 4]
Explanation:
rotate 1 steps to the right: [7, 1, 2, 3, 4, 5, 6]
rotate 2 steps to the right: [6, 7, 1, 2, 3, 4, 5]
rotate 3 steps to the right: [... | 27.530612 | 119 | 0.611564 |
b5061e6a58c17ca56e2671e8968df93b49ebdc93 | 16,791 | py | Python | site/flask/lib/python2.7/site-packages/whoosh/lang/isri.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 319 | 2016-09-22T15:54:48.000Z | 2022-03-18T02:36:58.000Z | site/flask/lib/python2.7/site-packages/whoosh/lang/isri.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 27 | 2017-04-01T15:06:36.000Z | 2021-02-08T20:19:58.000Z | site/flask/lib/python2.7/site-packages/whoosh/lang/isri.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 27 | 2016-10-06T16:05:32.000Z | 2022-03-18T02:37:00.000Z | # -*- coding: utf-8 -*-
#
# Natural Language Toolkit: The ISRI Arabic Stemmer
#
# Copyright (C) 2001-2012 NLTK Proejct
# Algorithm: Kazem Taghva, Rania Elkhoury, and Jeffrey Coombs (2005)
# Author: Hosam Algasaier <hosam_hme@yahoo.com>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
"""
ISRI A... | 43.840731 | 131 | 0.494968 |
30decdb588b901c970be0003cf8e42d9c9212676 | 230 | py | Python | sensu_plugin/compat.py | sufiyanghori/sensu-plugin-python | 6682163a2a2219e8132b4c9e1dd53663fa477ae5 | [
"MIT"
] | 35 | 2015-01-11T13:34:32.000Z | 2017-04-28T11:20:02.000Z | sensu_plugin/compat.py | sufiyanghori/sensu-plugin-python | 6682163a2a2219e8132b4c9e1dd53663fa477ae5 | [
"MIT"
] | 42 | 2017-10-02T12:05:15.000Z | 2021-03-22T21:20:54.000Z | sensu_plugin/compat.py | sufiyanghori/sensu-plugin-python | 6682163a2a2219e8132b4c9e1dd53663fa477ae5 | [
"MIT"
] | 14 | 2017-10-02T08:51:44.000Z | 2022-02-12T16:36:55.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=undefined-variable
"""
Python 2/3 compatibility code.
"""
try:
compat_basestring = basestring
except NameError: # Python 3
compat_basestring = (bytes, str)
| 19.166667 | 36 | 0.682609 |
041a341237c0f511dd15454bf4c1ef6c4e98d05c | 2,400 | py | Python | one_crm/users/tests/test_views.py | lianzhanshu/one_crm | 7320c38416dd05fa95400ef4f5d50b0a35125c33 | [
"MIT"
] | 4 | 2020-08-09T08:47:35.000Z | 2021-12-16T01:27:56.000Z | one_crm/users/tests/test_views.py | flingjie/one_crm | 7320c38416dd05fa95400ef4f5d50b0a35125c33 | [
"MIT"
] | null | null | null | one_crm/users/tests/test_views.py | flingjie/one_crm | 7320c38416dd05fa95400ef4f5d50b0a35125c33 | [
"MIT"
] | 4 | 2020-08-09T08:43:01.000Z | 2021-09-29T11:45:33.000Z | import pytest
from django.contrib.auth.models import AnonymousUser
from django.http.response import Http404
from django.test import RequestFactory
from one_crm.users.models import User
from one_crm.users.tests.factories import UserFactory
from one_crm.users.views import ( # isort:skip
UserRedirectView,
UserU... | 29.62963 | 74 | 0.6725 |
0d1c9e41c2abba66cecc17ba27fb2a124ac892cf | 3,923 | py | Python | app.py | striker43/storjWidget-exporter | e4bb98580b3d547ed4e0f7c6523e20ee584c7b41 | [
"Apache-2.0"
] | 4 | 2020-11-25T15:14:56.000Z | 2021-09-20T07:20:41.000Z | app.py | striker43/storjWidget-exporter | e4bb98580b3d547ed4e0f7c6523e20ee584c7b41 | [
"Apache-2.0"
] | null | null | null | app.py | striker43/storjWidget-exporter | e4bb98580b3d547ed4e0f7c6523e20ee584c7b41 | [
"Apache-2.0"
] | 1 | 2020-11-25T03:43:21.000Z | 2020-11-25T03:43:21.000Z | from flask import Flask
import requests
import os
import time
import datetime
import json
from datetime import date
from requests.adapters import HTTPAdapter
app = Flask(__name__)
persistencePath = '/var/www/storjWidgetVolume/payoutData.txt'
nodes = os.environ.get('NODES_LIST', '').split(',')
payoutData = {}
payout... | 33.818966 | 232 | 0.714249 |
d4aafb7f5cb6a5981703c8eabc8dde0dceba0586 | 414 | py | Python | cwl_airflow/wes/server.py | silviu001/cwl-airflow | df45fc173ada83d94df94bc861777d9f6687b99a | [
"Apache-2.0"
] | null | null | null | cwl_airflow/wes/server.py | silviu001/cwl-airflow | df45fc173ada83d94df94bc861777d9f6687b99a | [
"Apache-2.0"
] | null | null | null | cwl_airflow/wes/server.py | silviu001/cwl-airflow | df45fc173ada83d94df94bc861777d9f6687b99a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import connexion
from connexion.resolver import Resolver
from cwl_airflow.wes.backend import CWLAirflowBackend
def run_wes_server(args):
app = connexion.App(__name__)
backend = CWLAirflowBackend()
def rs(x):
return getattr(backend, x.split('.')[-1])
app.add_api('openapi/s... | 31.846154 | 76 | 0.7343 |
cb153eb4c99e876cf184d972e1033f9a7f098956 | 745 | py | Python | Encryption/Encryption.py | saurav0001kumar/HackerRank | 38daaaf1e3f7b230ca70005480fa2f3e2c7a12be | [
"MIT"
] | 1 | 2020-07-03T02:07:30.000Z | 2020-07-03T02:07:30.000Z | Encryption/Encryption.py | saurav0001kumar/HackerRank | 38daaaf1e3f7b230ca70005480fa2f3e2c7a12be | [
"MIT"
] | null | null | null | Encryption/Encryption.py | saurav0001kumar/HackerRank | 38daaaf1e3f7b230ca70005480fa2f3e2c7a12be | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the encryption function below.
def encryption(s):
res=[]
l=list(s)
l=list(filter(lambda x: x!=" " ,l))
s=''.join(l)
le=len(s)
row=math.sqrt(le)
row=int(row)
if row**2 == le:
row... | 18.170732 | 48 | 0.500671 |
fe6e235a19e18ce11287af6f2b7e4213dd073f8e | 4,303 | py | Python | schemas/parquet_output_cluster_info_test.py | epapbak/insights-data-schemas | 00eb5eba786a21fa82693633d3c9d1eee32130d8 | [
"Apache-2.0"
] | null | null | null | schemas/parquet_output_cluster_info_test.py | epapbak/insights-data-schemas | 00eb5eba786a21fa82693633d3c9d1eee32130d8 | [
"Apache-2.0"
] | null | null | null | schemas/parquet_output_cluster_info_test.py | epapbak/insights-data-schemas | 00eb5eba786a21fa82693633d3c9d1eee32130d8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# vim: set fileencoding=utf-8
# Copyright © 2021 Pavel Tisnovsky
#
# 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
#
#... | 30.956835 | 100 | 0.69928 |
5eb7d024eaca9e157b0e84b7d1b36c50c36ad9af | 4,029 | py | Python | tests/terminal.py | randy3k/ride | 8a052daebaa8f03a9fff95eb38d45a32ac43bed9 | [
"MIT"
] | 1,051 | 2018-12-20T19:35:43.000Z | 2022-03-31T19:44:35.000Z | tests/terminal.py | randy3k/ride | 8a052daebaa8f03a9fff95eb38d45a32ac43bed9 | [
"MIT"
] | 255 | 2018-12-19T13:51:01.000Z | 2022-03-31T09:33:43.000Z | tests/terminal.py | randy3k/ride | 8a052daebaa8f03a9fff95eb38d45a32ac43bed9 | [
"MIT"
] | 54 | 2019-03-13T02:25:31.000Z | 2022-03-15T16:21:50.000Z | import sys
import pyte
import operator
import threading
from contextlib import contextmanager
import time
import os
if sys.platform.startswith("win"):
import winpty
else:
import ptyprocess
__all__ = ["PtyProcess", "Screen", "ByteStream", "Terminal"]
if sys.platform.startswith("win"):
ParentPtyProcess =... | 26.682119 | 77 | 0.607099 |
e699c97c0b37da3099acfdc7d66113cacbc9976c | 24,425 | py | Python | dependencies.py | Plinius-Audio/ohdevtools | 1a094d5ae918394f1307617fa6594d0bcc3005c2 | [
"BSD-2-Clause-FreeBSD"
] | 9 | 2015-12-30T10:53:51.000Z | 2021-11-11T00:10:02.000Z | dependencies.py | Plinius-Audio/ohdevtools | 1a094d5ae918394f1307617fa6594d0bcc3005c2 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2018-05-31T10:46:58.000Z | 2022-02-13T22:43:28.000Z | dependencies.py | Plinius-Audio/ohdevtools | 1a094d5ae918394f1307617fa6594d0bcc3005c2 | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2020-09-25T22:39:22.000Z | 2021-11-08T21:11:16.000Z | import os
import tarfile
import zipfile
import re
import requests
import platform
import subprocess
import json
import shutil
import io
import tempfile
from default_platform import default_platform
import deps_cross_checker
import aws
# Master table of dependency types.
# A dependency definition can specify 'type' to... | 37.233232 | 166 | 0.590829 |
5b5f4d0da457327f84ba17ab73ca81baf0b9d8ed | 244 | py | Python | 2a.py | znuxor/adventofcode2017 | 79d0df07f24ea8d2793df3b1c853a85b760791c1 | [
"BSD-3-Clause"
] | null | null | null | 2a.py | znuxor/adventofcode2017 | 79d0df07f24ea8d2793df3b1c853a85b760791c1 | [
"BSD-3-Clause"
] | null | null | null | 2a.py | znuxor/adventofcode2017 | 79d0df07f24ea8d2793df3b1c853a85b760791c1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
data_input = np.loadtxt('2a_data.txt')
mysum = 0
minimums = np.min(data_input, axis=1)
maximums = np.max(data_input, axis=1)
diffs = maximums - minimums
print(np.sum(diffs))
| 17.428571 | 38 | 0.688525 |
6ebb8f194bd9625cf0e55656f6b226c6c6453097 | 428 | py | Python | python_stock/4/Python4-4.py | hollo08/stockstrategy | 09ece2457d653439a8ace80a6ac7dd4da9813846 | [
"MIT"
] | 1 | 2020-09-18T15:08:46.000Z | 2020-09-18T15:08:46.000Z | python_stock/4/Python4-4.py | hollo08/stockstrategy | 09ece2457d653439a8ace80a6ac7dd4da9813846 | [
"MIT"
] | null | null | null | python_stock/4/Python4-4.py | hollo08/stockstrategy | 09ece2457d653439a8ace80a6ac7dd4da9813846 | [
"MIT"
] | 2 | 2022-01-23T03:26:22.000Z | 2022-03-28T16:21:01.000Z | import random #导入random标准库
mymin =200 #定义变量,存放随机数中的最小数
i = 1 #定义变量,用于统计循环次数
while i <= 15 :
r = random.randint(50,150) #在50~150之间随机产生一个数
i += 1 #循环次数加1
print("第 %d 随机数是: %s "%(i-1,r)) #显示第几个随机数是几
if r < mymin: ... | 35.666667 | 62 | 0.448598 |
53e3ffd4ac72b5ca13c1799d35991a28a5e0e78c | 2,596 | py | Python | plugins/trendmicro_deepsecurity/icon_trendmicro_deepsecurity/actions/list_rules/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/trendmicro_deepsecurity/icon_trendmicro_deepsecurity/actions/list_rules/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/trendmicro_deepsecurity/icon_trendmicro_deepsecurity/actions/list_rules/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | import komand
from .schema import ListRulesInput, ListRulesOutput, Input, Output, Component
# Custom imports below
from icon_trendmicro_deepsecurity.util.shared import tryJSON
from icon_trendmicro_deepsecurity.util.shared import checkResponse
import requests
class ListRules(komand.Action):
def __init__(self):
... | 34.157895 | 108 | 0.609399 |
04a6bf57031b07c8ce399db8dfd5c10266bcf5ac | 4,162 | py | Python | zdata.py | manimaul/mxmcc | 923458b759c8daa74dd969e968bc72b17fdffe02 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2016-08-24T21:30:45.000Z | 2016-08-24T21:30:45.000Z | zdata.py | manimaul/mxmcc | 923458b759c8daa74dd969e968bc72b17fdffe02 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 5 | 2021-03-18T23:25:15.000Z | 2022-03-11T23:44:20.000Z | zdata.py | manimaul/mxmcc | 923458b759c8daa74dd969e968bc72b17fdffe02 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
__author__ = 'Will Kamp'
__copyright__ = 'Copyright 2013, Matrix Mariner Inc.'
__license__ = 'BSD'
__email__ = 'will@mxmariner.com'
__status__ = 'Development' # 'Prototype', 'Development', or 'Production'
'''MX Mariner zdata generator for regions / catalogs'''
import codecs
import os.path
impo... | 34.97479 | 117 | 0.637434 |
013df6455e514ab341995e60c2b29691d795cfc3 | 557 | py | Python | apps/run_yolo_video.py | wenxingliu/smoke_detector_yolo3 | 2e67a4347256ad8378eddf5b4efdc3782b3fb8e2 | [
"MIT"
] | null | null | null | apps/run_yolo_video.py | wenxingliu/smoke_detector_yolo3 | 2e67a4347256ad8378eddf5b4efdc3782b3fb8e2 | [
"MIT"
] | null | null | null | apps/run_yolo_video.py | wenxingliu/smoke_detector_yolo3 | 2e67a4347256ad8378eddf5b4efdc3782b3fb8e2 | [
"MIT"
] | 1 | 2020-10-10T04:03:30.000Z | 2020-10-10T04:03:30.000Z | import os
current_path = os.path.dirname(os.path.abspath(__file__))
path_suffix = 'apps'
if current_path.endswith(path_suffix):
parent_path = current_path.rsplit(path_suffix, 1)[0]
os.chdir(parent_path)
from yolo_detect.yolo import YOLO
from yolo_detect.detect_video import detect_video
__author__ = 'sliu'
if... | 32.764706 | 66 | 0.761221 |
29cc46030fd01b7fda5165b4f9e50553d78e9b7f | 895 | py | Python | share/qt/clean_mac_info_plist.py | aptcoin/aptcoin | bcdea0990837ea8c22017fe2e34548c5375cd476 | [
"MIT"
] | null | null | null | share/qt/clean_mac_info_plist.py | aptcoin/aptcoin | bcdea0990837ea8c22017fe2e34548c5375cd476 | [
"MIT"
] | null | null | null | share/qt/clean_mac_info_plist.py | aptcoin/aptcoin | bcdea0990837ea8c22017fe2e34548c5375cd476 | [
"MIT"
] | 2 | 2015-09-01T07:03:13.000Z | 2019-07-10T13:28:51.000Z | #!/usr/bin/env python
# Jonas Schnelli, 2013
# make sure the Aptcoin-Qt.app contains the right plist (including the right version)
# fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267)
from string import Template
from datetime import date
bitcoinDir = "./";
inF... | 29.833333 | 109 | 0.72514 |
aa522183125fcf7395f4d7d9dfe47ffda2096f50 | 1,467 | py | Python | pychron/lasers/laser_managers/ilaser_manager.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 31 | 2016-03-07T02:38:17.000Z | 2022-02-14T18:23:43.000Z | pychron/lasers/laser_managers/ilaser_manager.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 1,626 | 2015-01-07T04:52:35.000Z | 2022-03-25T19:15:59.000Z | pychron/lasers/laser_managers/ilaser_manager.py | UIllinoisHALPychron/pychron | f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc | [
"Apache-2.0"
] | 26 | 2015-05-23T00:10:06.000Z | 2022-03-07T16:51:57.000Z | # ===============================================================================
# Copyright 2012 Jake Ross
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licens... | 33.340909 | 81 | 0.542604 |
89329de5a7947e343c7794b1fc2dd2a0635f5ab9 | 2,489 | py | Python | image/resnet_train.py | riejohnson/gulf | a7cf688e263921e008b0117a274add011380c1c8 | [
"MIT"
] | 2 | 2020-11-13T21:42:45.000Z | 2021-04-09T04:25:05.000Z | image/resnet_train.py | riejohnson/gulf | a7cf688e263921e008b0117a274add011380c1c8 | [
"MIT"
] | null | null | null | image/resnet_train.py | riejohnson/gulf | a7cf688e263921e008b0117a274add011380c1c8 | [
"MIT"
] | 1 | 2021-09-23T12:12:48.000Z | 2021-09-23T12:12:48.000Z | import sys
import os
import numpy as np
import torch
import torch.nn.functional as F
from utils.utils import cast, data_parallel
from torch.backends import cudnn
from .resnet import resnet
from utils.utils0 import logging, reset_logging, timeLog, raise_if_absent, add_if_absent_
from .data import dataset_attr, create_i... | 34.569444 | 101 | 0.671354 |
ab9d205cd781ed1c7a79734139d735a55ab9b1e4 | 1,582 | py | Python | pytelpoint/stats.py | MMTObservatory/pypoint | 644caf325192d9a3516f3e650078fe3b576b57d8 | [
"BSD-3-Clause"
] | 1 | 2021-11-12T00:05:57.000Z | 2021-11-12T00:05:57.000Z | pytelpoint/stats.py | MMTObservatory/pytpoint | 644caf325192d9a3516f3e650078fe3b576b57d8 | [
"BSD-3-Clause"
] | null | null | null | pytelpoint/stats.py | MMTObservatory/pytpoint | 644caf325192d9a3516f3e650078fe3b576b57d8 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
import astropy.units as u
__all__ = ["skyrms", "psd"]
def skyrms(coo_ref, coo_meas):
"""
Calculate sky RMS of the offsets between reference and measured coordinates in the same way as TPOINT(tm).
Return the result in arc... | 29.849057 | 111 | 0.666245 |
00a55436b607691af95e1d7b58243295b8c5508f | 1,753 | py | Python | app/api/v2/models/products.py | calebrotich10/store-manager-api-v2 | 16dff84823e77218f1135c99f0592f113fddee84 | [
"MIT"
] | null | null | null | app/api/v2/models/products.py | calebrotich10/store-manager-api-v2 | 16dff84823e77218f1135c99f0592f113fddee84 | [
"MIT"
] | null | null | null | app/api/v2/models/products.py | calebrotich10/store-manager-api-v2 | 16dff84823e77218f1135c99f0592f113fddee84 | [
"MIT"
] | 1 | 2018-11-04T18:09:38.000Z | 2018-11-04T18:09:38.000Z | """This module contains the data store
and data logic of the store's products
"""
from .. import database
class Products():
def __init__(self, product_id=None, product_name=None, product_price=None,
category=None, min_quantity=None, inventory=None, added_by=None):
self.product_name = product_name
... | 37.297872 | 122 | 0.642898 |
86ba3abde145f8a464ab64a502bcff4100865c72 | 465 | py | Python | IFR/configs/_base_/schedules/schedule_semi.py | jfzhuang/IFR | d6ffdd0c0810d7bb244f102ba8cc19c12f61e102 | [
"MIT"
] | 3 | 2022-03-09T13:15:15.000Z | 2022-03-21T06:59:10.000Z | IFR/configs/_base_/schedules/schedule_semi.py | jfzhuang/IFR | d6ffdd0c0810d7bb244f102ba8cc19c12f61e102 | [
"MIT"
] | null | null | null | IFR/configs/_base_/schedules/schedule_semi.py | jfzhuang/IFR | d6ffdd0c0810d7bb244f102ba8cc19c12f61e102 | [
"MIT"
] | null | null | null | # optimizer
optimizer = dict(
type='SGD',
lr=0.001,
momentum=0.9,
weight_decay=0.0001,
paramwise_cfg=dict(custom_keys={'decode_head': dict(lr_mult=10.0)}),
)
optimizer_config = dict()
# learning policy
lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False)
# runtime settings
runner ... | 29.0625 | 72 | 0.716129 |
bccf3fe52a70ba15c775e369519724564fb59807 | 7,213 | py | Python | USB2SERIAL_RS485_Write/PC_Transmitter/Python 2.7.x/RS485_Write_2.7.py | xanthium-enterprises/Cross-Platform-RS485-Programming-Python | 8640be8fc6df9cefb80757a7ad5fe7e5b0c05c95 | [
"Apache-2.0"
] | 16 | 2016-07-15T00:34:06.000Z | 2021-12-11T13:49:41.000Z | USB2SERIAL_RS485_Write/PC_Transmitter/Python 2.7.x/RS485_Write_2.7.py | WikiBabu/Cross-Platform-RS485-Programming-Python | 8640be8fc6df9cefb80757a7ad5fe7e5b0c05c95 | [
"Apache-2.0"
] | null | null | null | USB2SERIAL_RS485_Write/PC_Transmitter/Python 2.7.x/RS485_Write_2.7.py | WikiBabu/Cross-Platform-RS485-Programming-Python | 8640be8fc6df9cefb80757a7ad5fe7e5b0c05c95 | [
"Apache-2.0"
] | 8 | 2018-02-23T09:27:28.000Z | 2020-01-04T13:22:19.000Z | #----------------------------------------------------------------------------------------------------#
# RS485 Communication using Python (Write) (hardware = USB2SERIAL) (Python 2.7.x) #
#----------------------------------------------------------------------------------------------------#
#Program ru... | 65.572727 | 203 | 0.289477 |
509b32fb801516ac48803ee7c6a90164deca2ef0 | 234 | py | Python | setup.py | CousinoMath/mnist-dataset | 4043851e305d27c119b2abaf5896e0ced0968294 | [
"MIT"
] | null | null | null | setup.py | CousinoMath/mnist-dataset | 4043851e305d27c119b2abaf5896e0ced0968294 | [
"MIT"
] | null | null | null | setup.py | CousinoMath/mnist-dataset | 4043851e305d27c119b2abaf5896e0ced0968294 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(name="mnist",
version='0.0',
packages=find_packages(),
install_requires=('docutils', 'numpy', 'theano'),
package_data={
'': ['*.txt', '*.rst', '*.gz']
},
) | 23.4 | 53 | 0.58547 |
fac0d0274bfd8190a666e4fc77dcc8dba697b8a5 | 122 | py | Python | 20210912/docs/source/code/aiohttp/aiohttp_gs_misc.py | fin-py/events | a41ba1ce9e6212b5cc1cb24c5b82a2178ab544ed | [
"MIT"
] | 2 | 2021-09-12T04:22:27.000Z | 2021-11-27T14:21:44.000Z | 20210912/docs/source/code/aiohttp/aiohttp_gs_misc.py | fin-py/events | a41ba1ce9e6212b5cc1cb24c5b82a2178ab544ed | [
"MIT"
] | 13 | 2021-07-18T22:28:20.000Z | 2021-07-30T23:57:30.000Z | 20210912/docs/source/code/aiohttp/aiohttp_gs_misc.py | fin-py/events | a41ba1ce9e6212b5cc1cb24c5b82a2178ab544ed | [
"MIT"
] | 2 | 2021-03-31T06:03:16.000Z | 2021-09-02T13:16:55.000Z | from yarl import URL
url = URL('https://connpass.com/')
print(url / 'explore')
print(url / 'search' % {'q': 'aiohttp'}) | 20.333333 | 40 | 0.622951 |
7360f9cbe4c0fdb2b213d58b0f1e55c620a119c0 | 35 | py | Python | cgn/translator/__init__.py | FabianKP/cgn | 9963e60c4a4bf4f3869e43d1dfbe11da74887ba5 | [
"MIT"
] | 1 | 2022-03-21T00:40:23.000Z | 2022-03-21T00:40:23.000Z | cgn/translator/__init__.py | FabianKP/cgn | 9963e60c4a4bf4f3869e43d1dfbe11da74887ba5 | [
"MIT"
] | null | null | null | cgn/translator/__init__.py | FabianKP/cgn | 9963e60c4a4bf4f3869e43d1dfbe11da74887ba5 | [
"MIT"
] | null | null | null |
from .translator import Translator | 17.5 | 34 | 0.857143 |
5b691128a09dc0f1ce9e87ee50a2d4b532f3224b | 2,403 | py | Python | channel/tests/test_SenderChannel.py | lindhe/datx05-code | 988b53f7466c935728190336286fdf5d30838d76 | [
"MIT"
] | null | null | null | channel/tests/test_SenderChannel.py | lindhe/datx05-code | 988b53f7466c935728190336286fdf5d30838d76 | [
"MIT"
] | null | null | null | channel/tests/test_SenderChannel.py | lindhe/datx05-code | 988b53f7466c935728190336286fdf5d30838d76 | [
"MIT"
] | null | null | null | #!/bin/python3.6
# -*- coding: utf-8 -*-
#
# MIT License
#
# Copyright (c) 2018 Robert Gustafsson
# Copyright (c) 2018 Andreas Lindhé
#
# 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... | 38.758065 | 91 | 0.744486 |
cb605effd7e3b71c767f84da9b39cf3527d825d6 | 2,720 | py | Python | src/stactools/sentinel1_grd/properties.py | stactools-packages/sentinel1-grd | e58c906ce2014215c74f37592ac5ce3f1c5b28f8 | [
"Apache-2.0"
] | null | null | null | src/stactools/sentinel1_grd/properties.py | stactools-packages/sentinel1-grd | e58c906ce2014215c74f37592ac5ce3f1c5b28f8 | [
"Apache-2.0"
] | 1 | 2021-08-31T14:12:31.000Z | 2021-09-06T12:47:14.000Z | src/stactools/sentinel1_grd/properties.py | stactools-packages/sentinel1-grd | e58c906ce2014215c74f37592ac5ce3f1c5b28f8 | [
"Apache-2.0"
] | null | null | null | from stactools.core.io.xml import XmlElement
from pystac.extensions.sar import FrequencyBand, Polarization
from pystac.extensions.sat import OrbitState
def fill_sar_properties(sar_ext, href):
"""Fills the properties for SAR.
Based on the sar Extension.py
Args:
input_ext (pystac.extensions.sar.Sa... | 30.222222 | 86 | 0.690441 |
64500baba878f966281d8a0d7e103fa17c159bc0 | 3,223 | py | Python | app.py | dmdhrumilmistry/IOT-Cloud-API | ed8514afb0c1640a0f8a307ad53198098223e817 | [
"MIT"
] | null | null | null | app.py | dmdhrumilmistry/IOT-Cloud-API | ed8514afb0c1640a0f8a307ad53198098223e817 | [
"MIT"
] | null | null | null | app.py | dmdhrumilmistry/IOT-Cloud-API | ed8514afb0c1640a0f8a307ad53198098223e817 | [
"MIT"
] | 1 | 2022-03-23T14:35:45.000Z | 2022-03-23T14:35:45.000Z | '''
module: app
description:
-------------------------
API for IOT cloud
-------------------------
Accepts data from the node in form of json data and stores it in local icdb file
Stored Data Format in icdb file:
{
KEY : pus
t
{
NODE :
{
SENSOR : [(data,... | 24.416667 | 98 | 0.568415 |
c241f394f4b0ad94299737ea42fc20c2bc75e34f | 7,720 | py | Python | polyA/_options.py | TravisWheelerLab/polyA | cbab7f2416066fd24340913fbf5328fb36432131 | [
"BSD-3-Clause"
] | 3 | 2021-01-15T11:39:30.000Z | 2021-01-26T07:28:32.000Z | polyA/_options.py | TravisWheelerLab/polyA | cbab7f2416066fd24340913fbf5328fb36432131 | [
"BSD-3-Clause"
] | 21 | 2020-12-09T23:07:43.000Z | 2021-09-23T03:05:35.000Z | polyA/_options.py | TravisWheelerLab/polyA | cbab7f2416066fd24340913fbf5328fb36432131 | [
"BSD-3-Clause"
] | null | null | null | from argparse import ArgumentParser, Namespace
from typing import List, Optional
from . import __version__
from .constants import (
DEFAULT_CHUNK_SIZE,
DEFAULT_SHARD_GAP,
DEFAULT_TRANS_PENALTY,
)
class Options:
"""
A typed container to hold program options and parameters.
>>> o = Options()
... | 29.922481 | 93 | 0.549352 |
571436ce5f119b8ce88f6292acfaef7b33fb0092 | 549 | py | Python | angr/exploration_techniques/lengthlimiter.py | delia0204/angr | 0fd71a73d36b8a6e441634d21bad947c7e5a7def | [
"BSD-2-Clause"
] | null | null | null | angr/exploration_techniques/lengthlimiter.py | delia0204/angr | 0fd71a73d36b8a6e441634d21bad947c7e5a7def | [
"BSD-2-Clause"
] | null | null | null | angr/exploration_techniques/lengthlimiter.py | delia0204/angr | 0fd71a73d36b8a6e441634d21bad947c7e5a7def | [
"BSD-2-Clause"
] | 1 | 2019-08-07T01:42:01.000Z | 2019-08-07T01:42:01.000Z | from . import ExplorationTechnique
class LengthLimiter(ExplorationTechnique):
"""
Length limiter on paths.
"""
def __init__(self, max_length, drop=False):
super(LengthLimiter, self).__init__()
self._max_length = max_length
self._drop = drop
def _filter(self, s):
re... | 27.45 | 73 | 0.641166 |
d31dc92175cc9d4141735541b2c3a4569c6303ad | 121 | py | Python | computer_science/big_o/example7.py | LeandroTk/Algorithms | 569ed68eba3eeff902f8078992099c28ce4d7cd6 | [
"MIT"
] | 205 | 2018-12-01T17:49:49.000Z | 2021-12-22T07:02:27.000Z | computer_science/big_o/example7.py | LeandroTk/Algorithms | 569ed68eba3eeff902f8078992099c28ce4d7cd6 | [
"MIT"
] | 2 | 2020-01-01T16:34:29.000Z | 2020-04-26T19:11:13.000Z | computer_science/big_o/example7.py | LeandroTk/Algorithms | 569ed68eba3eeff902f8078992099c28ce4d7cd6 | [
"MIT"
] | 50 | 2018-11-28T20:51:36.000Z | 2021-11-29T04:08:25.000Z | # O(N + P), if P < N / 2 --> O(N)
# O(2N) --> O(N)
# O(N + logN) --> O(N)
# O(N + M), if N > M then O(N), otherwise O(M)
| 24.2 | 46 | 0.38843 |
baba6f0fd5675ebdfcf541e9f71eaba73584f8d7 | 78 | py | Python | PYSTUDY/jsonlib.py | shi-cong/review | c8da7128ea18ecaa5849f2066d321e70d6f97f70 | [
"Apache-2.0"
] | 8 | 2017-10-22T00:24:42.000Z | 2017-11-24T01:23:52.000Z | PYSTUDY/jsonlib.py | shi-cong/review | c8da7128ea18ecaa5849f2066d321e70d6f97f70 | [
"Apache-2.0"
] | 2 | 2017-10-12T22:04:25.000Z | 2017-10-12T23:43:48.000Z | PYSTUDY/jsonlib.py | shi-cong/review | c8da7128ea18ecaa5849f2066d321e70d6f97f70 | [
"Apache-2.0"
] | null | null | null | """
json模块
"""
import json
loads = json.loads # 从字符
dumps = json.dumps # 从字典
| 9.75 | 24 | 0.641026 |
af279bd6db21259a8d36e9fa01c85c6618d88bc7 | 383 | py | Python | pynasl/exceptions.py | kafti/pynasl | e0e9a7834a03139b39ee10e33b9316cc22844efb | [
"MIT"
] | 6 | 2015-05-06T14:28:46.000Z | 2022-01-21T14:37:47.000Z | pynasl/exceptions.py | kafti/pynasl | e0e9a7834a03139b39ee10e33b9316cc22844efb | [
"MIT"
] | null | null | null | pynasl/exceptions.py | kafti/pynasl | e0e9a7834a03139b39ee10e33b9316cc22844efb | [
"MIT"
] | 4 | 2015-06-18T07:32:18.000Z | 2019-09-30T11:58:04.000Z | #-------------------------------------------------------------------------------
# Copyright (c) 2011, Kafti team
#
# Released under the MIT license. See the LICENSE file for details.
#-------------------------------------------------------------------------------
class LexicalError(Exception):
"""
An Excepti... | 29.461538 | 80 | 0.386423 |
76dc75cbb8164176479edd1f4ce37ff50941aba0 | 4,959 | py | Python | shaman_project/bbo/heuristics/genetic_algorithm/genetic_algorithm.py | ValentinGaut/shaman | 754e9eef3c097f3e58b0f06e7c08716bc1b11edd | [
"Apache-2.0"
] | null | null | null | shaman_project/bbo/heuristics/genetic_algorithm/genetic_algorithm.py | ValentinGaut/shaman | 754e9eef3c097f3e58b0f06e7c08716bc1b11edd | [
"Apache-2.0"
] | null | null | null | shaman_project/bbo/heuristics/genetic_algorithm/genetic_algorithm.py | ValentinGaut/shaman | 754e9eef3c097f3e58b0f06e7c08716bc1b11edd | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 BULL SAS All rights reserved
"""Implementation of the genetic algorithm as an heuristic for black-box
optimization."""
# Ignore unused argument kwargs
# pylint: disable=unused-argument
import numpy as np
from bbo.heuristics.heuristics import Heuristic
class GeneticAlgorithm(Heuristic):
"""Obje... | 38.146154 | 77 | 0.616052 |
8e8e53521f3157287dff652c6fd9d2c0a5f3e425 | 21,268 | py | Python | returns/context/requires_context_result.py | nurumaik/returns | 7e2058162192b532cdf0243a3463bdd508077bde | [
"BSD-2-Clause"
] | null | null | null | returns/context/requires_context_result.py | nurumaik/returns | 7e2058162192b532cdf0243a3463bdd508077bde | [
"BSD-2-Clause"
] | null | null | null | returns/context/requires_context_result.py | nurumaik/returns | 7e2058162192b532cdf0243a3463bdd508077bde | [
"BSD-2-Clause"
] | null | null | null | from typing import (
TYPE_CHECKING,
Any,
Callable,
ClassVar,
Iterable,
Sequence,
TypeVar,
)
from typing_extensions import final
from returns._generated.iterable import iterable_kind
from returns.context import NoDeps
from returns.interfaces import iterable
from returns.interfaces.specific ... | 33.23125 | 80 | 0.591781 |
ba26069bf439820986a841df4e9fba10364c2283 | 583 | py | Python | python/API_test/test.py | GG-yuki/bugs | aabd576e9e57012a3390007af890b7c6ab6cdda8 | [
"MIT"
] | null | null | null | python/API_test/test.py | GG-yuki/bugs | aabd576e9e57012a3390007af890b7c6ab6cdda8 | [
"MIT"
] | null | null | null | python/API_test/test.py | GG-yuki/bugs | aabd576e9e57012a3390007af890b7c6ab6cdda8 | [
"MIT"
] | null | null | null | # import numpy as np
# import matplotlib.pyplot as plt
#
# def f(t):
# return np.exp(-t) * np.cos(2*np.pi*t)
#
# t1 = np.arange(0.0, 5.0, 0.1)
# t2 = np.arange(0.0, 5.0, 0.02)
#
# plt.figure("2suplot")
# plt.subplot(211)
# plt.plot(t1, f(t1), 'bo', t2, f(t2), 'k')
#
# plt.subplot(212)
# plt.plot(t2, np.cos(2*np.pi*... | 21.592593 | 43 | 0.572899 |
0f39f7c1fb1495d797daa94ba4ab0c135d5992ab | 15,568 | py | Python | cbuild_config.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 189 | 2015-01-07T18:34:31.000Z | 2022-03-21T17:41:56.000Z | cbuild_config.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 24 | 2015-05-19T14:00:16.000Z | 2022-03-16T22:01:30.000Z | cbuild_config.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 60 | 2015-03-10T22:12:50.000Z | 2022-03-07T21:57:40.000Z | #
# Copyright 2019, Couchbase, 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 l... | 38.534653 | 128 | 0.611254 |
6f6b8aff31251244be971248c18cbe5d5afd56bc | 4,898 | py | Python | Camera GUI/Scaled-Yolo/tk_utils.py | nishantg96/my-scripts | a53708935a57c4cd4a46d4a315cf24b614f20fcb | [
"Apache-2.0"
] | null | null | null | Camera GUI/Scaled-Yolo/tk_utils.py | nishantg96/my-scripts | a53708935a57c4cd4a46d4a315cf24b614f20fcb | [
"Apache-2.0"
] | null | null | null | Camera GUI/Scaled-Yolo/tk_utils.py | nishantg96/my-scripts | a53708935a57c4cd4a46d4a315cf24b614f20fcb | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from PIL import Image,ImageTk
import tkinter as tki
import threading
import cv2,os,sys
from common_utils import *
import pandas as pd
from openpyxl import load_workbook
def rounded(input_list):
return [round(x,1) for x in input_list]
class camera_gui:
def __init__(self,... | 41.159664 | 127 | 0.558187 |
6b08291f4dbd47fc0057b71a8524e6cbb2cfd7ea | 288 | py | Python | c12/p224_readCensusExcel_test.py | pkingpeng/-python- | f7c3269b6c13edf31449a3f21c3314c27095c984 | [
"Apache-2.0"
] | null | null | null | c12/p224_readCensusExcel_test.py | pkingpeng/-python- | f7c3269b6c13edf31449a3f21c3314c27095c984 | [
"Apache-2.0"
] | null | null | null | c12/p224_readCensusExcel_test.py | pkingpeng/-python- | f7c3269b6c13edf31449a3f21c3314c27095c984 | [
"Apache-2.0"
] | null | null | null | from gererate_python_file.census2010 import allDate as data
print(data['AK']['Anchorage'])
anchoragePoe = data['AK']['Anchorage']['pop']
print('The 2010 population of Anchorage was %s.' % anchoragePoe)
"""
{'pop': 291826, 'tracts': 55}
The 2010 population of Anchorage was 291826.
"""
| 24 | 64 | 0.715278 |
19bb663a42660e5231c354fd058283feba22ce46 | 1,714 | py | Python | task_1/solution_test.py | kristyanYochev/python-course | 52d136179de210bd7edefe3085e50550e3862f62 | [
"MIT"
] | 2 | 2019-12-30T13:26:55.000Z | 2020-01-18T14:03:25.000Z | task_1/solution_test.py | kristyanYochev/python-course | 52d136179de210bd7edefe3085e50550e3862f62 | [
"MIT"
] | 3 | 2019-11-05T16:47:54.000Z | 2020-10-31T18:50:31.000Z | task_1/solution_test.py | kristyanYochev/python-course | 52d136179de210bd7edefe3085e50550e3862f62 | [
"MIT"
] | 24 | 2019-10-10T19:17:40.000Z | 2020-10-25T10:42:00.000Z | import unittest
import solution
class SolutionTest(unittest.TestCase):
def test_accumulate_left(self):
res = solution.accumulate_left(lambda a, b: a / b, 64, [2, 4, 8])
self.assertEqual(1.0, res)
def test_accumulate_left_over_tuple(self):
res = solution.accumulate_left(lambda a, b: a... | 33.607843 | 81 | 0.623104 |
5c9b8a15733efdb446cb67a949dcc4732500de5c | 2,336 | py | Python | spatial-hash/spatial_hash.py | Sopheria/tools | 45cf766553ade086419df884e8259605f5fdef81 | [
"Unlicense"
] | null | null | null | spatial-hash/spatial_hash.py | Sopheria/tools | 45cf766553ade086419df884e8259605f5fdef81 | [
"Unlicense"
] | null | null | null | spatial-hash/spatial_hash.py | Sopheria/tools | 45cf766553ade086419df884e8259605f5fdef81 | [
"Unlicense"
] | null | null | null | # simple script that reads a file containing a set of points and determines how tiles at those points would be sorted into a 2D spatial hash.
# The file it reads from is tiles.txt, and must contain a set of newline-delimited 2D points in (x,y) format. The output is written to tile_hash.txt.
# This file will be overwrit... | 28.144578 | 149 | 0.743579 |
fbd40893504f2db1d999a39b3850830bcee2bc45 | 1,930 | py | Python | examples/rasterio_polygonize.py | rouault/rasterio | 0b101b0414a575b263dcebefb0775b672f07cdeb | [
"BSD-3-Clause"
] | null | null | null | examples/rasterio_polygonize.py | rouault/rasterio | 0b101b0414a575b263dcebefb0775b672f07cdeb | [
"BSD-3-Clause"
] | null | null | null | examples/rasterio_polygonize.py | rouault/rasterio | 0b101b0414a575b263dcebefb0775b672f07cdeb | [
"BSD-3-Clause"
] | 1 | 2017-10-16T12:50:16.000Z | 2017-10-16T12:50:16.000Z | # Emulates GDAL's gdal_polygonize.py
import argparse
import logging
import subprocess
import sys
import fiona
import numpy as np
import rasterio
from rasterio.features import shapes
logging.basicConfig(stream=sys.stderr, level=logging.INFO)
logger = logging.getLogger('rasterio_polygonize')
def main(raster_file, v... | 25.733333 | 77 | 0.57513 |
b441e308c9c0fc3b17c2ea24a3d2a2f9c1941d20 | 6,320 | py | Python | tunnelling/tunnelling.py | gry/tunnelling | b3234284ac952d0c3b131ae884c4e8f82cc6d9aa | [
"MIT"
] | null | null | null | tunnelling/tunnelling.py | gry/tunnelling | b3234284ac952d0c3b131ae884c4e8f82cc6d9aa | [
"MIT"
] | null | null | null | tunnelling/tunnelling.py | gry/tunnelling | b3234284ac952d0c3b131ae884c4e8f82cc6d9aa | [
"MIT"
] | 2 | 2017-02-11T17:10:18.000Z | 2021-01-29T22:45:56.000Z | #!/usr/bin/env python
"""
Tunnelling is a SSH tunnelling library (useful when you need to do tunnels inside other python programs)
"""
import select
import SocketServer
import paramiko
from threading import Thread, Event
class ForwardServer(SocketServer.ThreadingTCPServer):
daemon_threads = True
allow_reus... | 34.162162 | 143 | 0.541614 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.