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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b8daa8e30f02efb3917dbb04c70651bffd2d319b | 1,848 | py | Python | add_reminders.py | eike-fokken/add_reminders_to_calendar | d0a6ddf0aeb7777811bfabdec9624f0b5ff80bbd | [
"Unlicense"
] | null | null | null | add_reminders.py | eike-fokken/add_reminders_to_calendar | d0a6ddf0aeb7777811bfabdec9624f0b5ff80bbd | [
"Unlicense"
] | null | null | null | add_reminders.py | eike-fokken/add_reminders_to_calendar | d0a6ddf0aeb7777811bfabdec9624f0b5ff80bbd | [
"Unlicense"
] | null | null | null | from icalendar import Calendar, Event, Alarm
from datetime import timedelta
calender_to_modify="calendar_without_reminders.ics"
calender_out="calendar_with_reminders.ics"
remind_before_start_one=timedelta(minutes=-390)
remind_before_start_two=timedelta(hours=-5)
cal=Calendar()
cal.add('calscale','GREGORIAN')
cal.add... | 33.6 | 86 | 0.664502 |
bf319fd2c41077e26df82abcccc4f2469f61073b | 4,491 | py | Python | examples/application/app_suite.py | robertour/kivy | f63f5f6fe8e387873ea3822507badbb51415e52a | [
"MIT"
] | null | null | null | examples/application/app_suite.py | robertour/kivy | f63f5f6fe8e387873ea3822507badbb51415e52a | [
"MIT"
] | null | null | null | examples/application/app_suite.py | robertour/kivy | f63f5f6fe8e387873ea3822507badbb51415e52a | [
"MIT"
] | null | null | null | '''
Application Suite
=================
Explore how applications start. Starts applications one after another, waiting for
each to be closed first.
'''
from __future__ import print_function
import sys
import re
from random import choice
import kivy
kivy.require('1.8.0') # Minimum API as 1.8 is when kv_directory be... | 33.514925 | 87 | 0.651303 |
141d2a53b577b8c9be9ac153a36c5b2fa51ded77 | 4,752 | py | Python | python/paddle/incubate/hapi/datasets/flowers.py | ZHUI/Paddle | 32ae8e81322ed380a89157fcb632c229e2c64979 | [
"Apache-2.0"
] | null | null | null | python/paddle/incubate/hapi/datasets/flowers.py | ZHUI/Paddle | 32ae8e81322ed380a89157fcb632c229e2c64979 | [
"Apache-2.0"
] | null | null | null | python/paddle/incubate/hapi/datasets/flowers.py | ZHUI/Paddle | 32ae8e81322ed380a89157fcb632c229e2c64979 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle 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 app... | 36.274809 | 94 | 0.652778 |
902892cc69679f4197b49f423302860631f3e159 | 2,371 | py | Python | pymecsim/utils.py | kiranvad/pyMECSim | 43b004cf9dc3a844d2db4a4ecd779385a895101d | [
"MIT"
] | 6 | 2020-12-01T14:46:07.000Z | 2022-01-27T15:10:01.000Z | pymecsim/utils.py | kiranvad/pyMECSim | 43b004cf9dc3a844d2db4a4ecd779385a895101d | [
"MIT"
] | 4 | 2020-08-29T21:17:59.000Z | 2021-05-25T16:48:44.000Z | pymecsim/utils.py | kiranvad/pyMECSim | 43b004cf9dc3a844d2db4a4ecd779385a895101d | [
"MIT"
] | null | null | null | """Change logs
Version 2:
----------
1. Add depreceated function as a utility
"""
import re
import pdb
def pysed(oldstr, newstr, infile, outfile):
"""
A utility function to modify a skeleton configuration file iteratively.
See examples for a sample usage.
Inputs:
--------
oldstr : s... | 34.867647 | 108 | 0.595529 |
b6c0f426aa8e96fcdcdaebb400a6cfa467ebf8f7 | 33,040 | py | Python | sdk/tables/azure-data-tables/tests/test_table_batch_async.py | eliagrady/azure-sdk-for-python | 64d0c78ce4a9b409dbc96864d7b65098891863f9 | [
"MIT"
] | 1 | 2021-09-07T18:43:20.000Z | 2021-09-07T18:43:20.000Z | sdk/tables/azure-data-tables/tests/test_table_batch_async.py | eliagrady/azure-sdk-for-python | 64d0c78ce4a9b409dbc96864d7b65098891863f9 | [
"MIT"
] | 2 | 2021-11-03T06:10:36.000Z | 2021-12-01T06:29:39.000Z | sdk/tables/azure-data-tables/tests/test_table_batch_async.py | msyyc/azure-sdk-for-python | e2dba75181f8b4336ae57e75aa391322c12c3123 | [
"MIT"
] | 1 | 2021-05-19T02:55:10.000Z | 2021-05-19T02:55:10.000Z | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | 41.094527 | 136 | 0.620702 |
3d8c07def60f89fbf60a53f7df7742b29fe064fb | 263 | py | Python | app/controllers/api/__init__.py | meongbego/whois-api | 148e5513b1b1cccf01c0fd5223e59cb39dfcd365 | [
"MIT"
] | null | null | null | app/controllers/api/__init__.py | meongbego/whois-api | 148e5513b1b1cccf01c0fd5223e59cb39dfcd365 | [
"MIT"
] | null | null | null | app/controllers/api/__init__.py | meongbego/whois-api | 148e5513b1b1cccf01c0fd5223e59cb39dfcd365 | [
"MIT"
] | null | null | null | from flask import Blueprint
from flask_restful import Api
from .whois import Whois
from .login import *
api_blueprint = Blueprint("api", __name__, url_prefix="/api")
api = Api(api_blueprint)
api.add_resource(Whois, "/whois")
api.add_resource(SignIn, "/login")
| 21.916667 | 61 | 0.764259 |
51991ac30560fccbb1e84768cc216cfde19ccd3b | 236 | py | Python | tests/doubles.py | cnord/pypiserver | 35fcdd0e061e783058634a54de135174e57f2771 | [
"MIT"
] | 1,257 | 2015-01-23T11:09:36.000Z | 2022-03-30T13:53:56.000Z | tests/doubles.py | cnord/pypiserver | 35fcdd0e061e783058634a54de135174e57f2771 | [
"MIT"
] | 296 | 2015-01-02T14:27:51.000Z | 2022-03-31T07:17:25.000Z | tests/doubles.py | cnord/pypiserver | 35fcdd0e061e783058634a54de135174e57f2771 | [
"MIT"
] | 287 | 2015-01-09T06:24:04.000Z | 2022-03-29T13:25:21.000Z | """Test doubles."""
class Namespace:
"""Simple namespace."""
def __init__(self, **kwargs):
"""Instantiate the namespace with the provided kwargs."""
for k, v in kwargs.items():
setattr(self, k, v)
| 21.454545 | 65 | 0.576271 |
c49a02b9f57d2d0a744101279b6cf5c51fd0b3b7 | 15,400 | py | Python | models/densenet.py | LegionChang/CoTNet | b1bc456c0b13b282b807d1082a1598b71014b4fe | [
"Apache-2.0"
] | 360 | 2021-07-26T07:23:29.000Z | 2022-03-16T03:03:25.000Z | python_developer_tools/cv/bases/conv/CoTNet/CoTNet-master/models/densenet.py | HonestyBrave/python_developer_tools | fc0dcf5c4ef088e2e535206dc82f09bbfd01f280 | [
"Apache-2.0"
] | 22 | 2021-07-29T15:05:00.000Z | 2022-03-17T04:28:14.000Z | python_developer_tools/cv/bases/conv/CoTNet/CoTNet-master/models/densenet.py | HonestyBrave/python_developer_tools | fc0dcf5c4ef088e2e535206dc82f09bbfd01f280 | [
"Apache-2.0"
] | 47 | 2021-07-27T02:14:21.000Z | 2022-02-25T09:15:12.000Z | import re
from collections import OrderedDict
from functools import partial
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.checkpoint as cp
from torch.jit.annotations import List
from config import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
from .helpers import build_model_with... | 40.419948 | 129 | 0.648571 |
895733c5f35a125464301f03faa72473f65abcc2 | 8,060 | py | Python | homeassistant/components/iaqualink/__init__.py | DavidDeSloovere/core | 909a20b36d4df6724c955c2ae28cb82fe6d50c2e | [
"Apache-2.0"
] | 1 | 2019-08-19T18:18:50.000Z | 2019-08-19T18:18:50.000Z | homeassistant/components/iaqualink/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 70 | 2020-08-05T07:20:00.000Z | 2022-03-31T06:01:46.000Z | homeassistant/components/iaqualink/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 1 | 2021-10-29T22:10:26.000Z | 2021-10-29T22:10:26.000Z | """Component to embed Aqualink devices."""
from __future__ import annotations
import asyncio
from functools import wraps
import logging
import aiohttp.client_exceptions
from iaqualink import (
AqualinkBinarySensor,
AqualinkClient,
AqualinkDevice,
AqualinkLight,
AqualinkLoginException,
Aqualink... | 32.897959 | 88 | 0.69206 |
cf46e7b7f8348c6d735dfc43fdf7c2297406c539 | 1,944 | py | Python | aerosandbox/library/power_human.py | msberk/AeroSandbox | 552a4f116655a2ba6ce6e44da0a78fec5519e35e | [
"MIT"
] | 322 | 2019-05-29T20:40:04.000Z | 2022-03-29T12:46:45.000Z | aerosandbox/library/power_human.py | msberk/AeroSandbox | 552a4f116655a2ba6ce6e44da0a78fec5519e35e | [
"MIT"
] | 55 | 2019-07-14T09:52:59.000Z | 2022-03-28T16:02:21.000Z | aerosandbox/library/power_human.py | msberk/AeroSandbox | 552a4f116655a2ba6ce6e44da0a78fec5519e35e | [
"MIT"
] | 68 | 2019-06-02T09:57:26.000Z | 2022-03-28T15:03:47.000Z | import aerosandbox.numpy as np
def power_human(
duration, # type: float
dataset="Healthy Men" # type: str
):
"""
Finds the power output that a human can sustain for a given duration.
Data was fit for durations in the range of 6 seconds to 60,000 seconds.
Fits are modeled at: AeroSand... | 32.4 | 165 | 0.608539 |
e2bb12199fc96cb863888678409a14d8b6895584 | 635 | py | Python | app.py | geekymeeky/AutoPy | 86ed0c28013b8d5c3b14c91e85b7be80152dc607 | [
"MIT"
] | null | null | null | app.py | geekymeeky/AutoPy | 86ed0c28013b8d5c3b14c91e85b7be80152dc607 | [
"MIT"
] | null | null | null | app.py | geekymeeky/AutoPy | 86ed0c28013b8d5c3b14c91e85b7be80152dc607 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, url_for, redirect
from werkzeug.exceptions import BadRequest
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/contribute', methods=['GET', 'POST'])
def contribute():
if request.method == 'POST':
t... | 21.896552 | 68 | 0.675591 |
ae83bf50ddf054111471b62d03edf9b7fe4f4945 | 4,303 | py | Python | salt/modules/gentoo_service.py | wikimedia/operations-debs-salt | be6342abc7401ff92f67ed59f7834f1359f35314 | [
"Apache-2.0"
] | null | null | null | salt/modules/gentoo_service.py | wikimedia/operations-debs-salt | be6342abc7401ff92f67ed59f7834f1359f35314 | [
"Apache-2.0"
] | null | null | null | salt/modules/gentoo_service.py | wikimedia/operations-debs-salt | be6342abc7401ff92f67ed59f7834f1359f35314 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Top level package command wrapper, used to translate the os detected by grains
to the correct service manager
'''
# Define the module's virtual name
__virtualname__ = 'service'
def __virtual__():
'''
Only work on systems which default to systemd
'''
if __grains__['os'] == ... | 20.013953 | 81 | 0.598884 |
15a7720e98fcbf09141d082a637a98c2410da1ea | 38,280 | py | Python | platform/gcutil/lib/google_compute_engine/gcutil_lib/move_cmds_test.py | bopopescu/google-cloud-sdk | b34e6a18f1e89673508166acce816111c3421e4b | [
"Apache-2.0"
] | null | null | null | platform/gcutil/lib/google_compute_engine/gcutil_lib/move_cmds_test.py | bopopescu/google-cloud-sdk | b34e6a18f1e89673508166acce816111c3421e4b | [
"Apache-2.0"
] | null | null | null | platform/gcutil/lib/google_compute_engine/gcutil_lib/move_cmds_test.py | bopopescu/google-cloud-sdk | b34e6a18f1e89673508166acce816111c3421e4b | [
"Apache-2.0"
] | 1 | 2020-07-24T20:04:47.000Z | 2020-07-24T20:04:47.000Z | #!/usr/bin/python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 34.831665 | 80 | 0.617973 |
3d39410e4d1f854d4311daea0212bc628cfad02f | 2,963 | py | Python | src/view/VSearch.py | maeddlae/kbase | 635e2b28a7661ffc02318ef29d1734f8aafd06b0 | [
"MIT"
] | null | null | null | src/view/VSearch.py | maeddlae/kbase | 635e2b28a7661ffc02318ef29d1734f8aafd06b0 | [
"MIT"
] | 4 | 2017-10-02T05:37:03.000Z | 2017-10-02T06:00:42.000Z | src/view/VSearch.py | maeddlae/kbase | 635e2b28a7661ffc02318ef29d1734f8aafd06b0 | [
"MIT"
] | null | null | null | '''
Created on 12 Aug 2017
@author: Mathias Bucher
'''
from Tkinter import Frame
from VStyles import rootColor, getLabel, getFrame, getButtonEntry
class VSearch(Frame):
'''
Shows search results
'''
name = "Search"
def __init__(self, parent, log, actions):
'''
Constructor
'... | 35.698795 | 108 | 0.595005 |
7f0ff561e206803371e8e4963162f5747376cf28 | 3,445 | py | Python | V2RaycSpider1125/BusinessLogicLayer/cluster/slavers/actions.py | chishayaohao/V2RayCloudSpider | b459a174be67f063f260e9295073d642e596ff53 | [
"MIT"
] | 3 | 2020-12-04T15:27:06.000Z | 2021-12-15T13:53:02.000Z | V2RaycSpider1125/BusinessLogicLayer/cluster/slavers/actions.py | chishayaohao/V2RayCloudSpider | b459a174be67f063f260e9295073d642e596ff53 | [
"MIT"
] | null | null | null | V2RaycSpider1125/BusinessLogicLayer/cluster/slavers/actions.py | chishayaohao/V2RayCloudSpider | b459a174be67f063f260e9295073d642e596ff53 | [
"MIT"
] | null | null | null | from BusinessLogicLayer.cluster.master import ActionMasterGeneral
__all__ = [
# 'ActionMxCloud',# protection of DDos
# 'ActionWgCloud',# 关闭注册
# 'ActionJfCloud',
'ActionN95Cloud',
'ActionTheSSR',
'ActionReCloud',
'ActionUfoCloud',
'ActionZuiSuCloud',
'ActionOhrCloud',
]
class Actio... | 42.012195 | 111 | 0.614224 |
67870664cec317c1aa8a396f439300f6fc3ac577 | 1,159 | py | Python | tests/unit/transformations/test_LogPoisson.py | gnafit/gna | c1a58dac11783342c97a2da1b19c97b85bce0394 | [
"MIT"
] | 5 | 2019-10-14T01:06:57.000Z | 2021-02-02T16:33:06.000Z | tests/unit/transformations/test_LogPoisson.py | gnafit/gna | c1a58dac11783342c97a2da1b19c97b85bce0394 | [
"MIT"
] | null | null | null | tests/unit/transformations/test_LogPoisson.py | gnafit/gna | c1a58dac11783342c97a2da1b19c97b85bce0394 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Check the WeightedSum transformation"""
import numpy as N
from load import ROOT as R
from gna import constructors as C
from gna.env import env
from gna.unittest import *
import numpy as N
from gna.unittest import allure_attach_file, savegraph
from scipy.special import gammaln
import pytest
g... | 26.340909 | 96 | 0.685936 |
1be2bb16aca1a3770cbb4668f10786667f95971a | 63 | py | Python | src/vilbert/datasets/__init__.py | NoOneUST/COMP5212 | 171b564f08841e426545f58e3b52870c0e090586 | [
"MIT"
] | 3 | 2020-04-05T06:50:46.000Z | 2020-04-05T08:20:33.000Z | src/vilbert/datasets/__init__.py | NoOneUST/COMP5212Project | 171b564f08841e426545f58e3b52870c0e090586 | [
"MIT"
] | 2 | 2021-05-21T16:24:54.000Z | 2022-02-10T01:21:54.000Z | src/vilbert/datasets/__init__.py | NoOneUST/COMP5212Project | 171b564f08841e426545f58e3b52870c0e090586 | [
"MIT"
] | 1 | 2020-06-15T16:22:20.000Z | 2020-06-15T16:22:20.000Z | from .visual_entailment_dataset import VisualEntailmentDataset
| 31.5 | 62 | 0.920635 |
2962a25c6900f1f87b8ec0606ac41a8232cbefc6 | 5,739 | py | Python | src/mpol/connectors.py | Jaye-yi/MPoL | eab782c275a48c5185de290cacdf12e68bbb66a5 | [
"MIT"
] | 18 | 2020-12-18T18:25:42.000Z | 2022-02-25T18:43:38.000Z | src/mpol/connectors.py | Jaye-yi/MPoL | eab782c275a48c5185de290cacdf12e68bbb66a5 | [
"MIT"
] | 49 | 2021-01-13T03:44:56.000Z | 2021-10-05T21:43:14.000Z | src/mpol/connectors.py | Jaye-yi/MPoL | eab782c275a48c5185de290cacdf12e68bbb66a5 | [
"MIT"
] | 6 | 2021-05-09T21:54:55.000Z | 2021-10-05T14:13:43.000Z | import torch
import torch.fft # to avoid conflicts with old torch.fft *function*
from torch import nn
from . import utils
def index_vis(vis, griddedDataset):
r"""
Index model visibilities to same locations as a :class:`~mpol.datasets.GriddedDataset`. Assumes that vis is "packed" just like the :class:`~mpol.... | 39.854167 | 240 | 0.67294 |
f68b05e26401d790cefbb65831e8560d745b1b76 | 476 | py | Python | morango/migrations/0006_instanceidmodel_system_id.py | indirectlylit/morango | 380cab228a72a0ac6a20926ae6963cb76054b9e1 | [
"MIT"
] | 9 | 2016-09-16T03:13:41.000Z | 2021-07-23T20:48:50.000Z | docker/alpine/kolibri/dist/morango/migrations/0006_instanceidmodel_system_id.py | sanmoy/kolibri-azure | 9becf1c167225e6cf20f25b379f3d7f27486e56d | [
"MIT"
] | 117 | 2016-09-13T22:21:12.000Z | 2022-03-09T16:31:12.000Z | docker/alpine/kolibri/dist/morango/migrations/0006_instanceidmodel_system_id.py | sanmoy/kolibri-azure | 9becf1c167225e6cf20f25b379f3d7f27486e56d | [
"MIT"
] | 11 | 2016-09-13T20:13:58.000Z | 2022-02-03T07:59:41.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-06-30 00:15
from __future__ import unicode_literals
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [("morango", "0005_auto_20170629_2139")]
operations = [
migrations.AddFie... | 23.8 | 63 | 0.659664 |
fb04511a75e17516aa8204f6f684a4b1ab1949ef | 1,188 | py | Python | setup.py | FayasNoushad/Check-Hashtag | 0e306c4e32b89141cac046fccb928cc583939e65 | [
"MIT"
] | 3 | 2021-11-08T01:24:13.000Z | 2022-01-13T09:02:31.000Z | setup.py | FayasNoushad/Check-Hashtag | 0e306c4e32b89141cac046fccb928cc583939e65 | [
"MIT"
] | null | null | null | setup.py | FayasNoushad/Check-Hashtag | 0e306c4e32b89141cac046fccb928cc583939e65 | [
"MIT"
] | null | null | null | import os
import setuptools
def requirements(file="requirements.txt"):
if os.path.isfile(file):
with open(file, encoding="utf-8") as r:
return [i.strip() for i in r]
else:
return []
def readme(file="README.md"):
if os.path.isfile(file):
with open(file, encoding="utf8"... | 25.826087 | 74 | 0.618687 |
b83a3545f443cc79837dbfe8bc12df970925b42a | 526 | py | Python | graph/graph.py | VojtechBartos/assignments | 327f9da175d7632d1b9b09185064bbf66e455896 | [
"MIT"
] | 1 | 2019-03-01T08:51:39.000Z | 2019-03-01T08:51:39.000Z | graph/graph.py | VojtechBartos/assignments | 327f9da175d7632d1b9b09185064bbf66e455896 | [
"MIT"
] | null | null | null | graph/graph.py | VojtechBartos/assignments | 327f9da175d7632d1b9b09185064bbf66e455896 | [
"MIT"
] | null | null | null | from random import randint
class Graph(object):
def __init__(self, nodes=None, edges=None):
self.nodes = nodes or []
self.edges = edges or []
def add_node(self, node):
"""Add node to the graph if node is not present.
:param node: {Node}
"""
if node not in self... | 19.481481 | 56 | 0.577947 |
c0198153a60c5befda9c3769738fd874bebbc3e1 | 14,564 | py | Python | taskflow/retry.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 299 | 2015-01-11T01:36:28.000Z | 2022-03-11T08:56:27.000Z | taskflow/retry.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 4 | 2015-02-06T11:12:58.000Z | 2018-10-19T18:55:58.000Z | taskflow/retry.py | jimbobhickville/taskflow | 6ea991ce94f5be46b7e4726b4c4f014e10407786 | [
"Apache-2.0"
] | 67 | 2015-01-11T14:34:24.000Z | 2022-01-14T02:57:03.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2013 Rackspace Hosting Inc. All Rights Reserved.
# Copyright (C) 2013 Yahoo! 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... | 38.125654 | 79 | 0.656688 |
6884a2e662fdeeaea0109ecb2ecbad17fd4f6cb9 | 2,882 | py | Python | tests/acceptance/test_dashboard.py | dpoirier/sentry | 19bdf8aff1cd230fb6f6b32f13340d49ae16f67c | [
"BSD-3-Clause"
] | null | null | null | tests/acceptance/test_dashboard.py | dpoirier/sentry | 19bdf8aff1cd230fb6f6b32f13340d49ae16f67c | [
"BSD-3-Clause"
] | null | null | null | tests/acceptance/test_dashboard.py | dpoirier/sentry | 19bdf8aff1cd230fb6f6b32f13340d49ae16f67c | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from django.utils import timezone
from sentry.testutils import AcceptanceTestCase
from sentry.models import GroupAssignee
from sentry.utils.samples import create_sample_event
from datetime import datetime
class DashboardTest(AcceptanceTestCase):
def setUp(self):
su... | 37.428571 | 81 | 0.636017 |
f7d712d57222658cddcd67c08e01638b140a4e34 | 221 | py | Python | tests/test_backend.py | sean512/pytoolkit | 59e83683cb01424816c24f464aa41bf257e015f8 | [
"MIT"
] | null | null | null | tests/test_backend.py | sean512/pytoolkit | 59e83683cb01424816c24f464aa41bf257e015f8 | [
"MIT"
] | 13 | 2019-09-30T17:49:57.000Z | 2020-04-10T07:01:30.000Z | tests/test_backend.py | sean512/pytoolkit | 59e83683cb01424816c24f464aa41bf257e015f8 | [
"MIT"
] | null | null | null | import pytest
import pytoolkit as tk
K = tk.K
def test_logit(session):
x = K.constant([0.0, 0.5, 1.0])
y = [-16.118095, 0, +16.118095]
assert session.run(tk.backend.logit(x)) == pytest.approx(y, abs=1e-6)
| 18.416667 | 73 | 0.628959 |
9ab397b735a8816eeeafcb962f3884fa14b7da07 | 2,265 | py | Python | google/ads/google_ads/v1/proto/services/payments_account_service_pb2_grpc.py | jwygoda/google-ads-python | 863892b533240cb45269d9c2cceec47e2c5a8b68 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v1/proto/services/payments_account_service_pb2_grpc.py | jwygoda/google-ads-python | 863892b533240cb45269d9c2cceec47e2c5a8b68 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v1/proto/services/payments_account_service_pb2_grpc.py | jwygoda/google-ads-python | 863892b533240cb45269d9c2cceec47e2c5a8b68 | [
"Apache-2.0"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from google.ads.google_ads.v1.proto.services import payments_account_service_pb2 as google_dot_ads_dot_googleads__v1_dot_proto_dot_services_dot_payments__account__service__pb2
class PaymentsAccountServiceStub(object):
"""Service to p... | 44.411765 | 175 | 0.812804 |
429658e8e55ba683f30901f93023cf6d6fddf1d6 | 8,603 | py | Python | sdk/storage/azure-storage-queue/tests/test_queue_encodings_async.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/storage/azure-storage-queue/tests/test_queue_encodings_async.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/storage/azure-storage-queue/tests/test_queue_encodings_async.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | 40.966667 | 142 | 0.662327 |
765c8797b56095ec0081df72596b4bc1f520645b | 6,361 | py | Python | genderbias/detector.py | glam-lab/gender-bias | dfff87438c51b9a85f0630d5376b0eef464c947e | [
"MIT"
] | 3 | 2020-07-30T22:19:57.000Z | 2021-05-21T04:27:45.000Z | genderbias/detector.py | glam-lab/gender-bias | dfff87438c51b9a85f0630d5376b0eef464c947e | [
"MIT"
] | null | null | null | genderbias/detector.py | glam-lab/gender-bias | dfff87438c51b9a85f0630d5376b0eef464c947e | [
"MIT"
] | 2 | 2020-06-30T22:27:20.000Z | 2020-06-30T22:52:10.000Z | from abc import abstractmethod
class BiasBoundsException(Exception):
pass
class Issue:
"""
An Issue is a call-out to a specific failure of a text.
Think of an Issue as a red squiggly, and optionally, a list of
autocorrect suggestions. For example,
Issue(
"Personal Life",
... | 25.649194 | 83 | 0.52869 |
f2f0ee41b6ff81be10d9a4fabd787f1aeece8945 | 22,601 | py | Python | BPt/main/tests/test_funcs.py | sahahn/BPt | 1a2967f4ca3fa070b7417a4f59a218ae171daadd | [
"MIT"
] | 6 | 2020-11-06T15:45:28.000Z | 2022-03-08T19:15:35.000Z | BPt/main/tests/test_funcs.py | sahahn/BPt | 1a2967f4ca3fa070b7417a4f59a218ae171daadd | [
"MIT"
] | 14 | 2020-10-20T13:55:23.000Z | 2022-01-25T17:36:07.000Z | BPt/main/tests/test_funcs.py | sahahn/BPt | 1a2967f4ca3fa070b7417a4f59a218ae171daadd | [
"MIT"
] | 2 | 2020-10-23T19:48:53.000Z | 2020-11-06T15:46:04.000Z | from ...pipeline.BPtPipeline import BPtPipeline
from ...pipeline.BPtSearchCV import NevergradSearchCV
from ...pipeline.ScopeObjs import ScopeTransformer
from ...pipeline.BPtModel import BPtModel
from ..input import (Model, ModelPipeline, Pipeline, CV, Scaler,
ProblemSpec, ParamSearch, Imputer, Tran... | 29.162581 | 78 | 0.65475 |
c375829d40159a12de4694e8971aaf1bc83e8abc | 228 | py | Python | src/test/python/testDataSetRepo/provider/library/a.py | ninjapapa/SMV2 | 42cf9f176c3ec0bed61f66fbf859c18d97027dd6 | [
"Apache-2.0"
] | null | null | null | src/test/python/testDataSetRepo/provider/library/a.py | ninjapapa/SMV2 | 42cf9f176c3ec0bed61f66fbf859c18d97027dd6 | [
"Apache-2.0"
] | 34 | 2022-02-26T04:27:34.000Z | 2022-03-29T23:05:47.000Z | src/test/python/testDataSetRepo/provider/library/a.py | ninjapapa/SMV2 | 42cf9f176c3ec0bed61f66fbf859c18d97027dd6 | [
"Apache-2.0"
] | null | null | null | from smv.provider import SmvProvider
class MyBaseProvider(SmvProvider):
@staticmethod
def provider_type(): return "aaa"
class MyConcreteProvider(MyBaseProvider):
@staticmethod
def provider_type(): return "bbb"
| 22.8 | 41 | 0.758772 |
fef15c86c9da9603996c2bd7ab18c074e2ac58e3 | 5,722 | py | Python | acDevLibs/acDev.py | sumpfgottheit/rpi_dashboard_data_provider | e43aca42948dd31a8fe94b16b9577ae6b97fb018 | [
"MIT"
] | 2 | 2018-01-08T01:15:30.000Z | 2021-01-17T06:49:13.000Z | acDevLibs/acDev.py | sumpfgottheit/rpi_dashboard_data_provider | e43aca42948dd31a8fe94b16b9577ae6b97fb018 | [
"MIT"
] | null | null | null | acDevLibs/acDev.py | sumpfgottheit/rpi_dashboard_data_provider | e43aca42948dd31a8fe94b16b9577ae6b97fb018 | [
"MIT"
] | 1 | 2020-04-22T22:53:39.000Z | 2020-04-22T22:53:39.000Z | # Use acDevLibs for PyCharm Development from WarriorOfAvalon
# https://github.com/WarriorOfAvalon/AssettoCorsaDevLibs
"""
Feel free to do what you want with this :)
It is essentially a transcription of all of the functions within the AC module to aid devs using IDE's
Methods with ??? above have incomplete declerations... | 20.29078 | 102 | 0.612024 |
cf8a1c5c82d6b08b56c4bc056ce6a2afb71ec3dc | 9,001 | py | Python | FDDB_Evaluation/evaluate.py | Levi0223/FaceBoxes | 8b4ac6c5e375a1ddf4711ebe1fbb513470735d00 | [
"MIT"
] | null | null | null | FDDB_Evaluation/evaluate.py | Levi0223/FaceBoxes | 8b4ac6c5e375a1ddf4711ebe1fbb513470735d00 | [
"MIT"
] | null | null | null | FDDB_Evaluation/evaluate.py | Levi0223/FaceBoxes | 8b4ac6c5e375a1ddf4711ebe1fbb513470735d00 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/3/8 3:52 下午
# @Author : RuisongZhou
# @Mail : rhyszhou99@gmail.com
import os
import tqdm
import pickle
import argparse
import numpy as np
import cv2
from bbox import bbox_overlaps
import pickle
def get_gt_boxes(gt_dir):
""" gt dir... | 33.966038 | 137 | 0.538051 |
6728f4551f65bdcc3e5fc092c75287140d1354ab | 626 | py | Python | var/spack/repos/builtin/packages/r-brew/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/r-brew/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin/packages/r-brew/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RBrew(RPackage):
"""Templating Framework for Report Generation.
Brew implemen... | 32.947368 | 95 | 0.757188 |
cf26a480ae52489502ca43c5a3cbda002aa37618 | 920 | py | Python | flatland/connector_subsystem/floating_stem.py | lelandstarr/flatland-model-diagram-editor | dfbd10d80542359c6951d7b039a5a4e3da2a0f50 | [
"MIT"
] | 10 | 2021-01-03T16:47:34.000Z | 2022-03-30T18:47:07.000Z | flatland/connector_subsystem/floating_stem.py | lelandstarr/flatland-model-diagram-editor | dfbd10d80542359c6951d7b039a5a4e3da2a0f50 | [
"MIT"
] | 91 | 2021-01-09T02:14:13.000Z | 2022-02-24T10:24:10.000Z | flatland/connector_subsystem/floating_stem.py | lelandstarr/flatland-model-diagram-editor | dfbd10d80542359c6951d7b039a5a4e3da2a0f50 | [
"MIT"
] | 1 | 2021-01-13T22:13:19.000Z | 2021-01-13T22:13:19.000Z | """
floating_stem.py
"""
from flatland.connector_subsystem.stem import Stem, StemName
from flatland.connector_subsystem.stem_type import StemType
from flatland.datatypes.connection_types import NodeFace
from flatland.datatypes.geometry_types import Position
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from ... | 30.666667 | 95 | 0.711957 |
ac5ebb8f538696192ad64706d3db6b1bbe868e9a | 4,000 | py | Python | chainerchem/dataset/preprocessors/weavenet_preprocessor.py | corochann/chainerchem | 8e918e557fe9bce865d9d543ea2864d027827941 | [
"MIT"
] | 2 | 2018-03-05T18:23:47.000Z | 2018-04-12T05:00:40.000Z | chainerchem/dataset/preprocessors/weavenet_preprocessor.py | corochann/chainerchem | 8e918e557fe9bce865d9d543ea2864d027827941 | [
"MIT"
] | null | null | null | chainerchem/dataset/preprocessors/weavenet_preprocessor.py | corochann/chainerchem | 8e918e557fe9bce865d9d543ea2864d027827941 | [
"MIT"
] | null | null | null | import numpy
from rdkit import Chem
from chainerchem.dataset.preprocessors.common \
import construct_atomic_number_array
from chainerchem.dataset.preprocessors.common import type_check_num_atoms
from chainerchem.dataset.preprocessors.mol_preprocessor import MolPreprocessor
MAX_DISTANCE = 7
# TODO(Nakago): Review... | 35.087719 | 78 | 0.6505 |
861a3b9d04167e0ea5495f881f256632f0561819 | 3,941 | py | Python | firefox/export_firefox_cookies.py | jabbalaci/Bash-Utils | c6fb115834a221c4aaba8eaa37f650beea45ef29 | [
"MIT"
] | 73 | 2015-03-31T01:12:26.000Z | 2021-07-10T19:45:04.000Z | firefox/export_firefox_cookies.py | doc22940/Bash-Utils | c6fb115834a221c4aaba8eaa37f650beea45ef29 | [
"MIT"
] | 2 | 2017-01-06T17:17:42.000Z | 2017-08-23T18:35:55.000Z | firefox/export_firefox_cookies.py | doc22940/Bash-Utils | c6fb115834a221c4aaba8eaa37f650beea45ef29 | [
"MIT"
] | 27 | 2015-01-03T18:51:23.000Z | 2020-11-15T11:49:51.000Z | #!/usr/bin/env python3
"""
Extract Firefox cookies
=======================
This script extracts cookies from Firefox's cookies.sqlite file
that are specific to a given host. The exported cookies are saved
in the file cookies.txt .
New! It also exports session cookies from Firefox's recovery.js file.
The exported coo... | 29.631579 | 112 | 0.601116 |
4ecfe8c186b9fecf430b0f1d5132d013e87c3e4b | 3,204 | py | Python | DSpace/teste_unesp.py | r-luis/Projeto-PUB | 7f1fad66614e7d5ba26a554aad6df6e65b0bc5d1 | [
"MIT"
] | null | null | null | DSpace/teste_unesp.py | r-luis/Projeto-PUB | 7f1fad66614e7d5ba26a554aad6df6e65b0bc5d1 | [
"MIT"
] | null | null | null | DSpace/teste_unesp.py | r-luis/Projeto-PUB | 7f1fad66614e7d5ba26a554aad6df6e65b0bc5d1 | [
"MIT"
] | null | null | null | from urllib.request import urlopen
from urllib.error import URLError
from urllib.error import HTTPError
from bs4 import BeautifulSoup
import requests
def abrirSite(s):
'''Função para abrir sites e já colocar dentro do BS
automaticamente, sem precisar repetir o mesmo código
s = url do link a ser definido n... | 35.6 | 114 | 0.629526 |
ef5bf369a4e0ec030338e688ec2473d8c7763281 | 7,857 | py | Python | qa/rpc-tests/listtransactions.py | jtoomim/BitcoinUnlimited | b7b9b59a8440f720c5e0c3d5aeb1bcc4e48f1b9c | [
"MIT"
] | 3 | 2019-11-28T13:45:44.000Z | 2021-05-22T07:18:15.000Z | qa/rpc-tests/listtransactions.py | jtoomim/BitcoinUnlimited | b7b9b59a8440f720c5e0c3d5aeb1bcc4e48f1b9c | [
"MIT"
] | null | null | null | qa/rpc-tests/listtransactions.py | jtoomim/BitcoinUnlimited | b7b9b59a8440f720c5e0c3d5aeb1bcc4e48f1b9c | [
"MIT"
] | 3 | 2019-10-26T03:34:45.000Z | 2021-08-17T15:35:30.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Copyright (c) 2015-2017 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import test_framework.loginit
# Exercise the li... | 43.65 | 113 | 0.552756 |
dd844082e7bfa9f8dc12cff4c94c91b390d9f12b | 2,735 | py | Python | src/gaussed/transforms/nonlinear.py | MatthewAlexanderFisher/GaussED | 492473991d47d4acc4155e34389b47cebf0eb664 | [
"MIT"
] | 2 | 2021-11-28T21:33:44.000Z | 2022-01-08T20:57:57.000Z | src/gaussed/transforms/nonlinear.py | MatthewAlexanderFisher/GaussED | 492473991d47d4acc4155e34389b47cebf0eb664 | [
"MIT"
] | null | null | null | src/gaussed/transforms/nonlinear.py | MatthewAlexanderFisher/GaussED | 492473991d47d4acc4155e34389b47cebf0eb664 | [
"MIT"
] | null | null | null | from gaussed.transforms.base import Transform
import gaussed.distribution.spectralGP as hgp
class NonLinear(Transform):
def __init__(self, distribution, method):
super().__init__(distribution)
self.linear = False
self.method = method
def __call__(self):
t_GP = hgp.TSpectralGP(... | 30.730337 | 87 | 0.6234 |
b4333e61682b5d51309c7433d2af26250a5f7f2a | 826 | py | Python | autogoal/contrib/transformers/__init__.py | lsuarez98/autogoal | 5c0210677de108238d30ed892beaf0801fb94bce | [
"MIT"
] | 157 | 2020-06-20T10:28:04.000Z | 2022-03-26T18:20:58.000Z | autogoal/contrib/transformers/__init__.py | lsuarez98/autogoal | 5c0210677de108238d30ed892beaf0801fb94bce | [
"MIT"
] | 110 | 2020-08-10T21:50:52.000Z | 2022-02-25T16:13:53.000Z | autogoal/contrib/transformers/__init__.py | lsuarez98/autogoal | 5c0210677de108238d30ed892beaf0801fb94bce | [
"MIT"
] | 62 | 2020-08-09T07:41:50.000Z | 2022-03-16T01:07:47.000Z | import os
from pathlib import Path
DATA_PATH = Path.home() / ".autogoal" / "contrib" / "transformers"
# Setting up download location
os.environ["TRANSFORMERS_CACHE"] = str(DATA_PATH)
try:
import torch
import transformers
# assert sklearn.__version__ == "0.22"
except:
print(
"(!) Code in `au... | 20.65 | 106 | 0.692494 |
78516a4ebac6209c024a21a7ba8d0220d6fe591c | 46,439 | py | Python | crypten/gradients.py | SamuelDAdams/CrypTen | 2cfecd3f12fa5ef7650b25d6de917a38e5294442 | [
"MIT"
] | 1 | 2021-06-08T22:13:07.000Z | 2021-06-08T22:13:07.000Z | crypten/gradients.py | SamuelDAdams/CrypTen | 2cfecd3f12fa5ef7650b25d6de917a38e5294442 | [
"MIT"
] | null | null | null | crypten/gradients.py | SamuelDAdams/CrypTen | 2cfecd3f12fa5ef7650b25d6de917a38e5294442 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from functools import reduce
import crypten
import torch
# registry that maps function names to AutogradFunctions:
... | 31.894918 | 108 | 0.636555 |
6d8edb4cc26ad7510d2df8649b45ae73411fa6ba | 1,496 | py | Python | src/01_haar_cascade_classifier/face_detector_haar.py | vikiworks-io/face_detector_opencv | 81399067b09deb07db22f5a3bcb3c65997e98957 | [
"MIT"
] | null | null | null | src/01_haar_cascade_classifier/face_detector_haar.py | vikiworks-io/face_detector_opencv | 81399067b09deb07db22f5a3bcb3c65997e98957 | [
"MIT"
] | null | null | null | src/01_haar_cascade_classifier/face_detector_haar.py | vikiworks-io/face_detector_opencv | 81399067b09deb07db22f5a3bcb3c65997e98957 | [
"MIT"
] | null | null | null | '''
Face Detector based on HAAR Classifier
Author : Viki (a) Vignesh Natarajan
Contact : vikiworks.io
'''
import cv2
def get_video_from_webcam():
return cv2.VideoCapture(0)
#fname = ex.mp4
def get_video_from_file(fname):
return cv2.VideoCapture(fname)
def detect_faces(gray_scale_image, algorit... | 24.129032 | 80 | 0.662433 |
a3a50e9672a855bfcf590e4ddd758d2b41058a9b | 3,146 | py | Python | Welearn/M4-AppEngine/GAE/Labs/FortuneTeller/main.py | AlexMeji158/MyCSSI2019lab | 1d203dde2201b3306c75c4f2e77b7c7bdcf824bb | [
"Apache-2.0"
] | null | null | null | Welearn/M4-AppEngine/GAE/Labs/FortuneTeller/main.py | AlexMeji158/MyCSSI2019lab | 1d203dde2201b3306c75c4f2e77b7c7bdcf824bb | [
"Apache-2.0"
] | null | null | null | Welearn/M4-AppEngine/GAE/Labs/FortuneTeller/main.py | AlexMeji158/MyCSSI2019lab | 1d203dde2201b3306c75c4f2e77b7c7bdcf824bb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018 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 ag... | 37.903614 | 94 | 0.707565 |
509399a74bc2bcaf3b5e7a12b95ad7f29b4d0eda | 33,489 | py | Python | CLUE_Rock_Paper_Scissors/advanced/rps_display.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | CLUE_Rock_Paper_Scissors/advanced/rps_display.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | CLUE_Rock_Paper_Scissors/advanced/rps_display.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2020 Kevin J Walters for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# MIT License
# Copyright (c) 2020 Kevin J. Walters
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# ... | 39.491745 | 92 | 0.539729 |
7eceddef13801c878c30f3c472cc75fd73ad78d6 | 1,794 | py | Python | fileUtils.py | Gaoyongxian666/Python-common | 5226f67960a2a6000ac06ba6d72ca9edd5dc1b7e | [
"MIT"
] | 1 | 2019-12-26T02:49:05.000Z | 2019-12-26T02:49:05.000Z | fileUtils.py | Gaoyongxian666/Python-common | 5226f67960a2a6000ac06ba6d72ca9edd5dc1b7e | [
"MIT"
] | null | null | null | fileUtils.py | Gaoyongxian666/Python-common | 5226f67960a2a6000ac06ba6d72ca9edd5dc1b7e | [
"MIT"
] | 2 | 2020-07-02T01:53:17.000Z | 2021-05-05T16:52:45.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@version: 1.0
@author: Jianzhang Zhang, <jianzhang.zhang@foxmail.com>
@file: synonymyprocess.py
@time: 2016-10-06
@function: 常用的文件操作方法
"""
import os
def getFileList(dir, fileList=[]):
"""
遍历一个目录,输出所有文件名
param dir: 待遍历的文件夹
param filrL... | 18.306122 | 58 | 0.640468 |
ea6ea19a23810c1fd1b67ad61ce5b87a94e9ff81 | 465 | py | Python | abc/abc170/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/abc170/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/abc170/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
import math
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
X, N = na()
P = na()
ans = 0
min_diff = INF
for i in range(-1, 102)... | 18.6 | 53 | 0.617204 |
c85851dec7272c4f9f6831b44525393674221daa | 1,594 | py | Python | yepes/contrib/datamigrations/importation_plans/update.py | samuelmaudo/yepes | 1ef9a42d4eaa70d9b3e6e7fa519396c1e1174fcb | [
"BSD-3-Clause"
] | null | null | null | yepes/contrib/datamigrations/importation_plans/update.py | samuelmaudo/yepes | 1ef9a42d4eaa70d9b3e6e7fa519396c1e1174fcb | [
"BSD-3-Clause"
] | null | null | null | yepes/contrib/datamigrations/importation_plans/update.py | samuelmaudo/yepes | 1ef9a42d4eaa70d9b3e6e7fa519396c1e1174fcb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding:utf-8 -*-
from __future__ import unicode_literals
import collections
from django.utils import six
from yepes.contrib.datamigrations.importation_plans import ModelImportationPlan
class UpdatePlan(ModelImportationPlan):
inserts_data = False
def import_batch(self, batch):
objs = self.g... | 34.652174 | 79 | 0.473651 |
acbcd68f960540c577a954cd881037826b1e6290 | 722 | py | Python | src/gc_test/__init__.py | me1kd/gc_test | ecb83dad52bfa567d6dde74553b5d0a8bef40289 | [
"MIT"
] | null | null | null | src/gc_test/__init__.py | me1kd/gc_test | ecb83dad52bfa567d6dde74553b5d0a8bef40289 | [
"MIT"
] | null | null | null | src/gc_test/__init__.py | me1kd/gc_test | ecb83dad52bfa567d6dde74553b5d0a8bef40289 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from pkg_resources import get_distribution, DistributionNotFound
import sqlite3
from gc_test.utils import create_db, populate_models, Product, data_source
from pathlib import Path
try:
# Change here if project is renamed and does not equal the package name
dist_name = __name__
__ver... | 26.740741 | 75 | 0.721607 |
702ccb6feb48bc1ee6f7cdc89950af7f15be0932 | 647 | py | Python | commands/main.py | isaac152/prometeoCLI | f2113aadad6d8d03f42f6ffc85204fb74bb24840 | [
"MIT"
] | null | null | null | commands/main.py | isaac152/prometeoCLI | f2113aadad6d8d03f42f6ffc85204fb74bb24840 | [
"MIT"
] | null | null | null | commands/main.py | isaac152/prometeoCLI | f2113aadad6d8d03f42f6ffc85204fb74bb24840 | [
"MIT"
] | null | null | null | #External libraries import
from typer import Typer, echo
#Local imports
from commands import accounts, api_key,providers,auth,start,reset,credit_cards
__version__='1.0.0'
#Start point of the app
app = Typer(add_completion=False)
app.add_typer(api_key.app,name ="api-key")
app.add_typer(providers.app, name = "provider... | 29.409091 | 78 | 0.760433 |
7f7eee4d0eb11adbc66e1fb175559e415892892a | 3,173 | py | Python | qiskit_metal/qlibrary/basic/circle_caterpillar.py | WiFisunset/qiskit-metal | f8155e5a695b0daf3af951c545b268b363dff536 | [
"Apache-2.0"
] | null | null | null | qiskit_metal/qlibrary/basic/circle_caterpillar.py | WiFisunset/qiskit-metal | f8155e5a695b0daf3af951c545b268b363dff536 | [
"Apache-2.0"
] | null | null | null | qiskit_metal/qlibrary/basic/circle_caterpillar.py | WiFisunset/qiskit-metal | f8155e5a695b0daf3af951c545b268b363dff536 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 34.48913 | 79 | 0.59376 |
81c0ff81b5d80a1f60a58286c4ece96cdf8afed3 | 37,680 | py | Python | src/training/language_specific.py | nagadomi/tesstrain | 0d972f86f4aaf88fde77e3445ff607e68866c882 | [
"Apache-2.0"
] | 244 | 2019-09-06T04:13:21.000Z | 2022-03-30T17:58:46.000Z | language_specific.py | Shreeshrii/tess5train-fonts | 3d98a340332b77b75a3ce96eae8caea69889b904 | [
"Apache-2.0"
] | 226 | 2019-09-02T15:06:36.000Z | 2022-03-13T11:31:29.000Z | language_specific.py | Shreeshrii/tess5train-fonts | 3d98a340332b77b75a3ce96eae8caea69889b904 | [
"Apache-2.0"
] | 116 | 2019-09-03T08:19:37.000Z | 2022-03-28T13:30:03.000Z | #!/usr/bin/env python3
# (C) Copyright 2014, Google Inc.
# (C) Copyright 2018, James R Barlow
# 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
# Unle... | 26.628975 | 88 | 0.586279 |
e61526e69e739b4e15e29a7e84a6ded980912eec | 27,226 | py | Python | google/cloud/compute_v1/services/licenses/transports/rest.py | auphofBSF/python-compute | c81bfa752c9db93edd0cd56fec3a79599704d792 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/licenses/transports/rest.py | auphofBSF/python-compute | c81bfa752c9db93edd0cd56fec3a79599704d792 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/licenses/transports/rest.py | auphofBSF/python-compute | c81bfa752c9db93edd0cd56fec3a79599704d792 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 42.673981 | 114 | 0.603577 |
48cfb1a8090cfbc73dd0e77d16d462ac0d262079 | 10,032 | py | Python | examples/classic_controllers/controllers/induction_motor_cascaded_foc.py | RaviPandey33/gym-electric-motor-1 | 999e18dceed709decf43d646fb29dc7602b9a89c | [
"MIT"
] | null | null | null | examples/classic_controllers/controllers/induction_motor_cascaded_foc.py | RaviPandey33/gym-electric-motor-1 | 999e18dceed709decf43d646fb29dc7602b9a89c | [
"MIT"
] | null | null | null | examples/classic_controllers/controllers/induction_motor_cascaded_foc.py | RaviPandey33/gym-electric-motor-1 | 999e18dceed709decf43d646fb29dc7602b9a89c | [
"MIT"
] | null | null | null | from .continuous_controller import ContinuousController
from .induction_motor_torque_to_current_conversion import InductionMotorTorqueToCurrentConversion
from .flux_observer import FluxObserver
from .plot_external_data import plot
from gym.spaces import Box
import numpy as np
class InductionMotorCascadedFieldOriented... | 49.176471 | 128 | 0.622707 |
578f13da122c848fc8ce1d448918e7ee92c34b2b | 1,396 | py | Python | azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/available_providers_list_state.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/available_providers_list_state.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/available_providers_list_state.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 36.736842 | 76 | 0.60745 |
c44f013a5e795eec6686a57aea2b4906032f872a | 2,147 | py | Python | seqan/util/py_lib/seqan/paths.py | gulsumgudukbay/diBELLA.2D | 1148e2dfa4765e68e79778eabf28e2f9ed913730 | [
"BSD-3-Clause-LBNL"
] | 16 | 2020-10-26T07:38:56.000Z | 2022-03-25T22:33:07.000Z | seqan/util/py_lib/seqan/paths.py | gulsumgudukbay/diBELLA.2D | 1148e2dfa4765e68e79778eabf28e2f9ed913730 | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-02-11T01:18:22.000Z | 2021-02-11T23:46:37.000Z | seqan/util/py_lib/seqan/paths.py | gulsumgudukbay/diBELLA.2D | 1148e2dfa4765e68e79778eabf28e2f9ed913730 | [
"BSD-3-Clause-LBNL"
] | 6 | 2020-10-23T18:05:58.000Z | 2021-12-09T17:32:57.000Z | #!/usr/bin/env python
"""SeqAn path utilities.
Code to get paths within the SeqAn repository; Useful for setting defaults in
options.
When called as a program, the paths are printed.
The main assumption is that this module lies in '/util/py_lib/seqan.'
Copyright: (c) 2010, Knut Reinert, FU Berlin
License: 3-claus... | 32.530303 | 83 | 0.704238 |
d48002e073c277be071f41ec8cf8de39b644701c | 95 | py | Python | twitmining/apps.py | nhlr21/socialmining | cc1ed19d1a3cae3228834bb51d4eae21b43cb8c3 | [
"MIT"
] | 4 | 2018-10-22T23:51:34.000Z | 2019-10-30T15:11:50.000Z | twitmining/apps.py | nhlr21/socialmining | cc1ed19d1a3cae3228834bb51d4eae21b43cb8c3 | [
"MIT"
] | null | null | null | twitmining/apps.py | nhlr21/socialmining | cc1ed19d1a3cae3228834bb51d4eae21b43cb8c3 | [
"MIT"
] | 1 | 2020-03-10T16:00:19.000Z | 2020-03-10T16:00:19.000Z | from django.apps import AppConfig
class TwitminingConfig(AppConfig):
name = 'twitmining'
| 15.833333 | 34 | 0.768421 |
21d1b7aa7c5691256e1b2e17efd294a74a36fe07 | 666 | py | Python | server/genanki/models/cloze.py | Mobilpadde/notion2anki | b2628bac2ffd751dacdff666ae1bc8a8e1fe6c8b | [
"MIT"
] | 27 | 2021-09-26T14:25:56.000Z | 2022-03-30T01:50:27.000Z | server/genanki/models/cloze.py | Mobilpadde/notion2anki | b2628bac2ffd751dacdff666ae1bc8a8e1fe6c8b | [
"MIT"
] | 132 | 2021-09-22T09:19:27.000Z | 2022-03-27T09:34:07.000Z | server/genanki/models/cloze.py | Mobilpadde/notion2anki | b2628bac2ffd751dacdff666ae1bc8a8e1fe6c8b | [
"MIT"
] | 8 | 2021-09-25T04:27:19.000Z | 2022-02-08T15:35:59.000Z | import os
import json
from genanki import Model
from fs_util import _read_template
DEFAULT_CLOZE = json.loads(_read_template(os.path.dirname(__file__)+"/../../templates/", "n2a-cloze.json", "", ""))
def cloze_model(id, name, css, qfmt, afmt):
if qfmt is None:
qfmt = DEFAULT_CLOZE.get('front')
if afmt ... | 25.615385 | 115 | 0.536036 |
a70d71c08caa628267aab71204366699590d8d01 | 859 | py | Python | cohesity_management_sdk/models/host_type_register_protection_source_parameters_enum.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | 1 | 2019-11-07T23:19:32.000Z | 2019-11-07T23:19:32.000Z | cohesity_management_sdk/models/host_type_register_protection_source_parameters_enum.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | null | null | null | cohesity_management_sdk/models/host_type_register_protection_source_parameters_enum.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
class HostTypeRegisterProtectionSourceParametersEnum(object):
"""Implementation of the 'HostType_RegisterProtectionSourceParameters' enum.
Specifies the optional OS type of the Protection Source (such as kWindows
or kLinux).
overrideDescription: ... | 26.84375 | 80 | 0.701979 |
d1f7a88ea28d06940dc4c008e8a783f76b85762a | 2,337 | py | Python | case/multistage_header.py | 1lo0/pexcel_openpyxl | 609fefb501b13cbc0904aae8e7b19a3d7c401148 | [
"Apache-2.0"
] | 6 | 2020-06-24T01:23:49.000Z | 2020-09-01T10:49:51.000Z | case/multistage_header.py | 1lo0/pexcel | 609fefb501b13cbc0904aae8e7b19a3d7c401148 | [
"Apache-2.0"
] | null | null | null | case/multistage_header.py | 1lo0/pexcel | 609fefb501b13cbc0904aae8e7b19a3d7c401148 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# author: donttouchkeyboard@gmail.com
# software: PyCharm
import openpyxl
from style.default import ExcelFontStyle
from core.base import TableCommon
if __name__ == '__main__':
"""
多级复杂表头绘制
merge_map:单元格合并
merge_cell_value_map:合并单元格赋值
"""
wb = openp... | 37.095238 | 100 | 0.440736 |
844e41193a9e37bb5b2586c5abafaefd0172894f | 26,126 | py | Python | ooni/nettests/manipulation/captiveportal.py | irl/ooni-probe | c21861c28ca6bd667715872d099006fab87222fd | [
"BSD-2-Clause"
] | 2 | 2016-12-20T11:44:43.000Z | 2016-12-20T11:44:49.000Z | ooni/nettests/manipulation/captiveportal.py | Acidburn0zzz/ooni-probe | 22720e383093c0d30fd1b6ca44794d3b29031f91 | [
"BSD-2-Clause"
] | null | null | null | ooni/nettests/manipulation/captiveportal.py | Acidburn0zzz/ooni-probe | 22720e383093c0d30fd1b6ca44794d3b29031f91 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# captiveportal
# *************
#
# This test is a collection of tests to detect the presence of a
# captive portal. Code is taken, in part, from the old ooni-probe,
# which was written by Jacob Appelbaum and Arturo Filastò.
#
# This module performs multiple tests that match specific vendor capt... | 40.009188 | 150 | 0.597987 |
ee1999fbad8597d64ab6c98547652ab25a9de3a3 | 434 | py | Python | verifica_extensoes/acha.py | robertoweller/python | b01939810f7eb388f4b79bfad00abc5fb293d8dd | [
"MIT"
] | null | null | null | verifica_extensoes/acha.py | robertoweller/python | b01939810f7eb388f4b79bfad00abc5fb293d8dd | [
"MIT"
] | null | null | null | verifica_extensoes/acha.py | robertoweller/python | b01939810f7eb388f4b79bfad00abc5fb293d8dd | [
"MIT"
] | null | null | null | import json
import os
# procura = input("Digite: ")
local = os.getcwd() + "/Programming_Languages_Extensions.json"
print(local, '\n')
arq_jso = open(local, "r")
# Carregar arquivos json
arq_jso = json.load(arq_jso)
while True:
procura = input("Digite: ")
for i in range(len(arq_jso)):
if "extensi... | 18.869565 | 62 | 0.624424 |
7dba97b0e58340d7bc045a049fa2275cfb17e6fc | 553 | py | Python | sync/rest/list-permissions/delete-permission/delete-permission.6.x.py | Tshisuaka/api-snippets | 52b50037d4af0f3b96adf76197964725a1501e96 | [
"MIT"
] | 234 | 2016-01-27T03:04:38.000Z | 2022-02-25T20:13:43.000Z | sync/rest/list-permissions/delete-permission/delete-permission.6.x.py | Tshisuaka/api-snippets | 52b50037d4af0f3b96adf76197964725a1501e96 | [
"MIT"
] | 351 | 2016-04-06T16:55:33.000Z | 2022-03-10T18:42:36.000Z | sync/rest/list-permissions/delete-permission/delete-permission.6.x.py | Tshisuaka/api-snippets | 52b50037d4af0f3b96adf76197964725a1501e96 | [
"MIT"
] | 494 | 2016-03-30T15:28:20.000Z | 2022-03-28T19:39:36.000Z | # Download the Python helper library from twilio.com/docs/python/install
import os
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
# To set up environmental variables, see http://twil.io/secure
account_sid = os.environ['TWILIO_ACCOUNT_SID']
auth_token = os.environ['TWILIO_AUTH_... | 30.722222 | 72 | 0.764919 |
c8b965ec4898a2c21116e989d750c0c766af1cac | 35,013 | py | Python | brainless/utils/model_traning/utils_model_training.py | ahmedhas32/Brainless | 39e4d8dc86cc34f31d4adad0479e3a7a50891030 | [
"MIT"
] | null | null | null | brainless/utils/model_traning/utils_model_training.py | ahmedhas32/Brainless | 39e4d8dc86cc34f31d4adad0479e3a7a50891030 | [
"MIT"
] | null | null | null | brainless/utils/model_traning/utils_model_training.py | ahmedhas32/Brainless | 39e4d8dc86cc34f31d4adad0479e3a7a50891030 | [
"MIT"
] | null | null | null | import datetime
import gc
import os
import random
import warnings
from collections import Iterable
from copy import deepcopy
import numpy as np
import pandas as pd
from scipy import sparse as scipy_sparse
from sklearn import __version__ as sklearn_version
from sklearn.base import BaseEstimator, TransformerMixin
from s... | 41.386525 | 100 | 0.563733 |
6eb2c7e3ed5f78aa3bdacb53d695c2bf45addd7e | 7,146 | py | Python | friendly-telegram/main.py | LunaticPython2003/friendly-telegram | c93d1d12ea9ef2c8ae961c1959e7aa6964ad7d00 | [
"WTFPL"
] | null | null | null | friendly-telegram/main.py | LunaticPython2003/friendly-telegram | c93d1d12ea9ef2c8ae961c1959e7aa6964ad7d00 | [
"WTFPL"
] | null | null | null | friendly-telegram/main.py | LunaticPython2003/friendly-telegram | c93d1d12ea9ef2c8ae961c1959e7aa6964ad7d00 | [
"WTFPL"
] | null | null | null | import logging
from . import utils
class MemoryHandler(logging.Handler):
"""Keeps 2 buffers. One for dispatched messages. One for unused messages.
When the length of the 2 together is > 100, truncate to make them 100 together, first trimming handled then unused."""
def __init__(self, target, capacity):
... | 39.263736 | 184 | 0.650294 |
081381eb1328dfee056e14d492baa301d0910bad | 7,282 | py | Python | tagopsdb/deploy/repo.py | ifwe/tagopsdb | 5455810cb9ccdd0803975a2513741c43313b1b7d | [
"Apache-2.0"
] | null | null | null | tagopsdb/deploy/repo.py | ifwe/tagopsdb | 5455810cb9ccdd0803975a2513741c43313b1b7d | [
"Apache-2.0"
] | 1 | 2021-03-25T21:57:08.000Z | 2021-03-25T21:57:08.000Z | tagopsdb/deploy/repo.py | ifwe/tagopsdb | 5455810cb9ccdd0803975a2513741c43313b1b7d | [
"Apache-2.0"
] | 1 | 2016-08-02T06:05:58.000Z | 2016-08-02T06:05:58.000Z | # Copyright 2016 Ifwe Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 31.52381 | 76 | 0.625652 |
60db6d54653eb12ed8b42ad11510142a662d3cfd | 271 | py | Python | core/config/__init__.py | ajmal017/amp | 8de7e3b88be87605ec3bad03c139ac64eb460e5c | [
"BSD-3-Clause"
] | 5 | 2021-08-10T23:16:44.000Z | 2022-03-17T17:27:00.000Z | core/config/__init__.py | ajmal017/amp | 8de7e3b88be87605ec3bad03c139ac64eb460e5c | [
"BSD-3-Clause"
] | 330 | 2021-06-10T17:28:22.000Z | 2022-03-31T00:55:48.000Z | core/config/__init__.py | ajmal017/amp | 8de7e3b88be87605ec3bad03c139ac64eb460e5c | [
"BSD-3-Clause"
] | 6 | 2021-06-10T17:20:32.000Z | 2022-03-28T08:08:03.000Z | """
Import as:
import core.config as cconfig
"""
from core.config.builder import * # pylint: disable=unused-import # NOQA
from core.config.config_ import * # pylint: disable=unused-import # NOQA
from core.config.utils import * # pylint: disable=unused-import # NOQA
| 27.1 | 73 | 0.734317 |
e9e7265f917bfe27c810074d013418677ce1f026 | 3,179 | py | Python | homeassistant/components/fibaro/sensor.py | inishchith/core | 90892d275c259088ed302bdaa8838303a6ef4094 | [
"Apache-2.0"
] | 6 | 2016-11-25T06:36:27.000Z | 2021-11-16T11:20:23.000Z | homeassistant/components/fibaro/sensor.py | SicAriuSx83/core | 162c39258e68ae42fe4e1560ae91ed54f5662409 | [
"Apache-2.0"
] | 45 | 2020-10-15T06:47:06.000Z | 2022-03-31T06:26:16.000Z | homeassistant/components/fibaro/sensor.py | SicAriuSx83/core | 162c39258e68ae42fe4e1560ae91ed54f5662409 | [
"Apache-2.0"
] | 2 | 2020-11-17T09:19:47.000Z | 2020-12-16T03:56:09.000Z | """Support for Fibaro sensors."""
import logging
from homeassistant.components.sensor import DOMAIN
from homeassistant.const import (
CONCENTRATION_PARTS_PER_MILLION,
DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_ILLUMINANCE,
DEVICE_CLASS_TEMPERATURE,
PERCENTAGE,
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
)
from... | 28.9 | 86 | 0.6134 |
cf581e5e76c161e144fc55a630974274cdcb497b | 2,925 | py | Python | Theorem Solver and Prolog/DeductionTheorem/Parser.py | Ayush-IITP/AI-Lab-Assignment | 4553ee71a512a8340d9cce6f30aaf58f5284cd71 | [
"MIT"
] | null | null | null | Theorem Solver and Prolog/DeductionTheorem/Parser.py | Ayush-IITP/AI-Lab-Assignment | 4553ee71a512a8340d9cce6f30aaf58f5284cd71 | [
"MIT"
] | null | null | null | Theorem Solver and Prolog/DeductionTheorem/Parser.py | Ayush-IITP/AI-Lab-Assignment | 4553ee71a512a8340d9cce6f30aaf58f5284cd71 | [
"MIT"
] | 2 | 2019-05-11T04:06:26.000Z | 2020-10-29T11:05:25.000Z | def replace_or(expr, or_pos):
itr = 0
for pos in or_pos:
pos += itr
expr = expr[:pos] + '->' + expr[pos + 1:]
if pos - 1 >= 0 and expr[pos - 1] != ')':
expr = expr[:pos - 1] + '~' + expr[pos - 1:]
else:
stack = [')']
n_pos = pos - 2
... | 31.451613 | 80 | 0.510427 |
ca40ab85bfffb1e1bb9471509262087915ef4121 | 85 | py | Python | wayland/__init__.py | aslpavel/wayland-py | 7132e5d0f713e2ca9368d738cb43faabd236c870 | [
"MIT"
] | 2 | 2022-01-23T22:55:46.000Z | 2022-03-30T12:56:49.000Z | wayland/__init__.py | aslpavel/wayland-py | 7132e5d0f713e2ca9368d738cb43faabd236c870 | [
"MIT"
] | null | null | null | wayland/__init__.py | aslpavel/wayland-py | 7132e5d0f713e2ca9368d738cb43faabd236c870 | [
"MIT"
] | null | null | null | from .base import Connection, SharedMemory
__all__ = ["Connection", "SharedMemory"]
| 21.25 | 42 | 0.764706 |
63e5f40a0535b8e61f27b28d729c3f7b55c40638 | 3,968 | py | Python | Geo_ellipzoid.py | dykuang/Mech-Geo-simulation | 3c4ba6d9c96064372031d55704e2c046ea9890ab | [
"MIT"
] | 1 | 2019-11-08T08:13:40.000Z | 2019-11-08T08:13:40.000Z | Geo_ellipzoid.py | dykuang/Mech-Geo-simulation | 3c4ba6d9c96064372031d55704e2c046ea9890ab | [
"MIT"
] | null | null | null | Geo_ellipzoid.py | dykuang/Mech-Geo-simulation | 3c4ba6d9c96064372031d55704e2c046ea9890ab | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 12 10:26:30 2017
@author: dykuang
This script calculates geodesics on ellipezoids with diffrent initial conditions
"""
import numpy as np
from scipy.integrate import odeint
from numpy.linalg import inv
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axe... | 28.546763 | 91 | 0.56124 |
79c3ec55e43bf63c7a1bbc982ace935f2a4d4919 | 161 | py | Python | venv/Scripts/django-admin.py | miaorunze1992/YGCbook | cb5253f631f3cd987dd18a295f52fbc48c31fa4a | [
"Apache-2.0"
] | null | null | null | venv/Scripts/django-admin.py | miaorunze1992/YGCbook | cb5253f631f3cd987dd18a295f52fbc48c31fa4a | [
"Apache-2.0"
] | null | null | null | venv/Scripts/django-admin.py | miaorunze1992/YGCbook | cb5253f631f3cd987dd18a295f52fbc48c31fa4a | [
"Apache-2.0"
] | null | null | null | #!e:\workspace_ygcbook\ygcbook\venv\scripts\python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 26.833333 | 54 | 0.795031 |
d394919dbdde8c07782c8d8c77b49a7704a21a28 | 81,451 | py | Python | xarray/tests/test_variable.py | eddienko/xarray | 5ecde3ce97b41febb8f98dda5b37122f378828da | [
"Apache-2.0"
] | null | null | null | xarray/tests/test_variable.py | eddienko/xarray | 5ecde3ce97b41febb8f98dda5b37122f378828da | [
"Apache-2.0"
] | null | null | null | xarray/tests/test_variable.py | eddienko/xarray | 5ecde3ce97b41febb8f98dda5b37122f378828da | [
"Apache-2.0"
] | null | null | null | import warnings
from copy import copy, deepcopy
from datetime import datetime, timedelta
from textwrap import dedent
import numpy as np
import pandas as pd
import pytest
import pytz
from xarray import Coordinate, Dataset, IndexVariable, Variable, set_options
from xarray.core import dtypes, indexing
from xarray.core.c... | 37.192237 | 88 | 0.549508 |
20cdfda86cc88f95c7160ad256957af685be85fb | 12,714 | py | Python | 30_Information_Retrieval/project/src/Web_Crawler/Test.py | Xinrihui/Data-Structure-and-Algrithms | fa3a455f64878e42d033c1fd8d612f108c71fb72 | [
"Apache-2.0"
] | 1 | 2021-08-13T10:55:33.000Z | 2021-08-13T10:55:33.000Z | 30_Information_Retrieval/project/src/Web_Crawler/Test.py | Xinrihui/Data-Structure-and-Algrithms | fa3a455f64878e42d033c1fd8d612f108c71fb72 | [
"Apache-2.0"
] | null | null | null | 30_Information_Retrieval/project/src/Web_Crawler/Test.py | Xinrihui/Data-Structure-and-Algrithms | fa3a455f64878e42d033c1fd8d612f108c71fb72 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
from ac_automata_xrh import AcTrie
from kmp_xrh import KMP
from bs4 import BeautifulSoup
import urllib.request
from collections import *
from numpy import *
import re
import requests
import chardet
import json
from Lib.HTMLParser import HTMLParser
from Lib.Doc_File im... | 30.343675 | 194 | 0.582036 |
862b1e50fb3e1964c75f5349214be7c0dbb0b9ee | 3,679 | py | Python | flyingpigeon/processes/wps_subset_bbox.py | Ouranosinc/flyingpigeon | 657c4023e128342f380c847103e5fd78edad17db | [
"Apache-2.0"
] | 1 | 2016-12-04T18:01:49.000Z | 2016-12-04T18:01:49.000Z | flyingpigeon/processes/wps_subset_bbox.py | Ouranosinc/flyingpigeon | 657c4023e128342f380c847103e5fd78edad17db | [
"Apache-2.0"
] | 13 | 2017-03-16T15:44:21.000Z | 2019-08-19T16:56:04.000Z | flyingpigeon/processes/wps_subset_bbox.py | Ouranosinc/flyingpigeon | 657c4023e128342f380c847103e5fd78edad17db | [
"Apache-2.0"
] | null | null | null | import logging
import traceback
from urlparse import urlparse
from pywps import Process, LiteralInput, ComplexOutput, get_format
from flyingpigeon.handler_common import wfs_common
from flyingpigeon.utils import CookieNetCDFTransfer
LOGGER = logging.getLogger("PYWPS")
json_format = get_format('JSON')
class SubsetB... | 39.55914 | 78 | 0.492253 |
6557d8d35d607d12749aa56a201fc88d30b03e32 | 548 | py | Python | Akeso/ServiceManager.py | tamuctf/Akeso | 05e6c284b45e1d1ec2d744a8508c9b03e3b5718e | [
"MIT"
] | 19 | 2018-02-26T00:19:17.000Z | 2019-12-18T04:26:45.000Z | Akeso/ServiceManager.py | tamuctf/Akeso | 05e6c284b45e1d1ec2d744a8508c9b03e3b5718e | [
"MIT"
] | 11 | 2018-05-07T15:11:30.000Z | 2018-11-13T16:40:41.000Z | Akeso/ServiceManager.py | tamuctf/Akeso | 05e6c284b45e1d1ec2d744a8508c9b03e3b5718e | [
"MIT"
] | 2 | 2019-12-11T07:28:48.000Z | 2021-05-30T07:41:57.000Z |
class ServiceInfo(object):
"""Object to hold information pertaining to each service"""
def __init__(self, info):
if 'serviceName' in info:
self.serviceName = info['serviceName']
else:
self.serviceName = None
self.imageName = info['imageName']
self.servic... | 34.25 | 63 | 0.633212 |
a0861eb639d698364a853e6aec3a070dbba20ad3 | 25 | py | Python | aima3/__init__.py | Calysto/aima3 | 4e6dc9b467d28015630274ff183b75b2ff4ab6eb | [
"MIT"
] | 28 | 2018-04-09T13:02:19.000Z | 2021-06-09T23:04:48.000Z | aima3/__init__.py | Devang-25/aima-python-code | 4e6dc9b467d28015630274ff183b75b2ff4ab6eb | [
"MIT"
] | 2 | 2018-06-24T09:41:07.000Z | 2019-02-05T12:45:19.000Z | aima3/__init__.py | Devang-25/aima-python-code | 4e6dc9b467d28015630274ff183b75b2ff4ab6eb | [
"MIT"
] | 25 | 2018-05-13T15:43:53.000Z | 2021-02-27T10:54:09.000Z |
__version__ = "1.0.11"
| 6.25 | 22 | 0.6 |
630e27ee273aff59c2f66485c3847d43f08d06fd | 3,467 | py | Python | apps/conf.py | zjjott/html | 68429832d8b022602915a267a62051f4869f430f | [
"MIT"
] | null | null | null | apps/conf.py | zjjott/html | 68429832d8b022602915a267a62051f4869f430f | [
"MIT"
] | null | null | null | apps/conf.py | zjjott/html | 68429832d8b022602915a267a62051f4869f430f | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals
from tornado.options import define, parse_config_file, options
from tornado.log import enable_pretty_logging
import logging
from pytz import timezone
import site
from os.path import dirname, join
from library.utils.encoding import ensure_utf8
application_path = dir... | 32.707547 | 79 | 0.647245 |
c1c048992b5da95fcebba01699330c64d64372bc | 239 | py | Python | tensorbay/opendataset/COVID_CT/__init__.py | machearn/tensorbay-python-sdk | 5c96a5f4c0028c7bec0764f2d0142b29597ec3a9 | [
"MIT"
] | 73 | 2021-02-24T12:23:26.000Z | 2022-03-12T13:00:31.000Z | tensorbay/opendataset/COVID_CT/__init__.py | machearn/tensorbay-python-sdk | 5c96a5f4c0028c7bec0764f2d0142b29597ec3a9 | [
"MIT"
] | 681 | 2021-02-25T07:34:17.000Z | 2022-03-25T07:08:23.000Z | tensorbay/opendataset/COVID_CT/__init__.py | machearn/tensorbay-python-sdk | 5c96a5f4c0028c7bec0764f2d0142b29597ec3a9 | [
"MIT"
] | 35 | 2021-02-24T12:00:45.000Z | 2022-03-30T06:43:13.000Z | #!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
# pylint: disable=invalid-name
"""Dataloader of the COVID_CT dataset."""
from tensorbay.opendataset.COVID_CT.loader import COVID_CT
__all__ = ["COVID_CT"]
| 19.916667 | 58 | 0.753138 |
07e3b7d9470899e94dc42a52cbe4f2f0632cfc50 | 6,200 | py | Python | tensorflow_hub/estimator_test.py | m0tchy/hub | 54494b4c8aa83dc20e3b1e94017b9a029cb92822 | [
"Apache-2.0"
] | 3,234 | 2018-03-30T15:58:33.000Z | 2022-03-31T16:24:25.000Z | tensorflow_hub/estimator_test.py | m0tchy/hub | 54494b4c8aa83dc20e3b1e94017b9a029cb92822 | [
"Apache-2.0"
] | 805 | 2018-03-31T23:10:34.000Z | 2022-03-18T13:39:31.000Z | tensorflow_hub/estimator_test.py | m0tchy/hub | 54494b4c8aa83dc20e3b1e94017b9a029cb92822 | [
"Apache-2.0"
] | 1,931 | 2018-03-30T19:17:50.000Z | 2022-03-27T02:39:44.000Z | # Copyright 2018 The TensorFlow Hub 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 app... | 37.804878 | 80 | 0.701774 |
e9731c218abe1f334895a355eeb0b71b228fb1f1 | 713 | py | Python | setup.py | JasonMWhite/privacy-taxonomy-python | 274ceb6796b2e964bfa107ce6121fabad39ba7af | [
"MIT"
] | null | null | null | setup.py | JasonMWhite/privacy-taxonomy-python | 274ceb6796b2e964bfa107ce6121fabad39ba7af | [
"MIT"
] | null | null | null | setup.py | JasonMWhite/privacy-taxonomy-python | 274ceb6796b2e964bfa107ce6121fabad39ba7af | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
VERSION = '0.0.1'
DESCRIPTION = 'Privacy Taxonomy'
LONG_DESCRIPTION = "Python interface to Ethyca's Privacy Taxonomy"
setup(
name="privacy_taxonmy",
version=VERSION,
author="Jason White",
author_email="actinolite.jw@gmail.com",
desc... | 28.52 | 66 | 0.591865 |
be39631df0545d47262143e81b9ab067d58ade44 | 6,369 | py | Python | sandbox/rocky/tf/envs/parallel_vec_env_executor.py | chi6/Model-based-meta-learning-rl | fda134dcbd87ef3e91f339ea2f836f28ec5f7784 | [
"MIT"
] | 2 | 2019-09-10T10:13:20.000Z | 2020-07-17T01:37:27.000Z | sandbox/rocky/tf/envs/parallel_vec_env_executor.py | chi6/Model-based-meta-learning-rl | fda134dcbd87ef3e91f339ea2f836f28ec5f7784 | [
"MIT"
] | null | null | null | sandbox/rocky/tf/envs/parallel_vec_env_executor.py | chi6/Model-based-meta-learning-rl | fda134dcbd87ef3e91f339ea2f836f28ec5f7784 | [
"MIT"
] | null | null | null |
import numpy as np
import pickle as pickle
from sandbox.rocky.tf.misc import tensor_utils
from rllab.misc import logger
from rllab.sampler.stateful_pool import singleton_pool
import uuid
def worker_init_envs(G, alloc, scope, env):
print(G)
logger.log("initializing environment on worker %d" % G.worker_id)
... | 34.427027 | 119 | 0.642801 |
cbefc8d5b1aac5b2058deff71df8503a15e4fb9d | 5,551 | py | Python | modules/wiki.py | MasterCruelty/my-tg-app | e50137ea43a9b6e78756cff5e6e6377a6ad6e9bc | [
"MIT"
] | 1 | 2021-09-16T19:03:34.000Z | 2021-09-16T19:03:34.000Z | modules/wiki.py | MasterCruelty/my-tg-app | e50137ea43a9b6e78756cff5e6e6377a6ad6e9bc | [
"MIT"
] | 8 | 2021-07-08T18:00:42.000Z | 2022-03-07T10:28:05.000Z | modules/wiki.py | MasterCruelty/my-tg-app | e50137ea43a9b6e78756cff5e6e6377a6ad6e9bc | [
"MIT"
] | null | null | null | import wikipedia
import re
from pyrogram import Client
import utils.get_config
import utils.utility
from bs4 import BeautifulSoup
#Restituisce il parametro lingua
def get_lang(query):
parole = query.split(" ")
lingua = parole[0]
return lingua
#restituisce le parole chiavi della ricerca eliminando la ling... | 39.935252 | 149 | 0.665286 |
a1588766b06a2d9146bfd79b3f2b8c642bce93b6 | 416 | py | Python | setup.py | tiborsimon/python-cmd-test | 8900f44a933f39b679684e1a4a64c7b66a9d69a7 | [
"MIT"
] | null | null | null | setup.py | tiborsimon/python-cmd-test | 8900f44a933f39b679684e1a4a64c7b66a9d69a7 | [
"MIT"
] | null | null | null | setup.py | tiborsimon/python-cmd-test | 8900f44a933f39b679684e1a4a64c7b66a9d69a7 | [
"MIT"
] | 1 | 2021-02-20T13:56:47.000Z | 2021-02-20T13:56:47.000Z | from setuptools import find_packages, setup
import os
from demo import __version__
setup(
name = 'Imre',
version = __version__,
author = 'Tibor Simon',
author_email = 'tibor@tiborsimon.io',
packages = find_packages(),
install_requires=[
'termcolor'
],
e... | 19.809524 | 43 | 0.564904 |
774b7558126f0431de79dabeefe2f7dff80bdbb9 | 6,002 | py | Python | python/exam/count_down_clock.py | walterfan/snippets | 62f87720c411093fcff888f25b338afd1d99a6f9 | [
"Apache-2.0"
] | 1 | 2021-06-18T09:31:59.000Z | 2021-06-18T09:31:59.000Z | python/exam/count_down_clock.py | walterfan/snippets | 62f87720c411093fcff888f25b338afd1d99a6f9 | [
"Apache-2.0"
] | 10 | 2020-12-12T08:12:06.000Z | 2022-03-02T06:54:10.000Z | python/exam/count_down_clock.py | walterfan/snippets | 62f87720c411093fcff888f25b338afd1d99a6f9 | [
"Apache-2.0"
] | null | null | null | # AnalogClock demo
# E. A. Tacao <e.a.tacao |at| estadao.com.br>
# http://j.domaindlx.com/elements28/wxpython/
# 12 Fev 2006, 22:00 GMT-03:00
# Distributed under the wxWidgets license.
import wx
import wx.lib.analogclock as ac
#----------------------------------------------------------------------
class TestPa... | 42.267606 | 82 | 0.480506 |
e110c135caf7c8d2e7a57864edea3da0d746b179 | 689 | py | Python | backend/api/models/vehicle_zev_type.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 3 | 2020-03-25T03:06:20.000Z | 2021-01-20T23:36:03.000Z | backend/api/models/vehicle_zev_type.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 740 | 2019-12-16T15:53:39.000Z | 2022-03-26T08:25:10.000Z | backend/api/models/vehicle_zev_type.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 11 | 2019-11-28T20:39:15.000Z | 2022-01-31T17:53:31.000Z | from django.db import models
from api.models.mixins.effective_dates import EffectiveDates
from auditable.models import Auditable
from .mixins.named import Description
class ZevType(Auditable, Description, EffectiveDates):
vehicle_zev_code = models.CharField(
blank=False,
db_comment="Zev type (e.g... | 26.5 | 60 | 0.656023 |
4a20a2c071537d9d5ab73ccdd46557dc90f0a2a6 | 241 | py | Python | helloworld_project/pages/views.py | helpthx/hello-jenkins | 7cac1b93a769a79bbe12be26e8de9a15ab13e4eb | [
"MIT"
] | null | null | null | helloworld_project/pages/views.py | helpthx/hello-jenkins | 7cac1b93a769a79bbe12be26e8de9a15ab13e4eb | [
"MIT"
] | 7 | 2020-06-06T01:08:55.000Z | 2022-02-10T12:48:39.000Z | helloworld_project/pages/views.py | helpthx/hello-jenkins | 7cac1b93a769a79bbe12be26e8de9a15ab13e4eb | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from helloworld_project.settings import SECRET_WORD
# Create your views here.
def home_page_view(request):
return HttpResponse('Hello, {0}!'.format(SECRET_WORD))
| 26.777778 | 58 | 0.804979 |
3f86a714eeba542c702af3e6483a6a7e682fac23 | 3,460 | py | Python | talks/api/services.py | davan690/talks.ox | a90b034b34600c06bc68cda0e48dd3c0663f4538 | [
"Apache-2.0"
] | null | null | null | talks/api/services.py | davan690/talks.ox | a90b034b34600c06bc68cda0e48dd3c0663f4538 | [
"Apache-2.0"
] | null | null | null | talks/api/services.py | davan690/talks.ox | a90b034b34600c06bc68cda0e48dd3c0663f4538 | [
"Apache-2.0"
] | null | null | null | from django.db.models.query_utils import Q
import operator
from rest_framework.exceptions import ParseError
from talks.core.utils import parse_date
from talks.events.datasources import DEPARTMENT_DESCENDANT_DATA_SOURCE
from talks.events.models import ROLES_SPEAKER, Event, EventGroup
from datetime import datetime, timed... | 35.670103 | 133 | 0.714451 |
6dc6f858517d781a660ac7a4255382c41300bf45 | 7,418 | gyp | Python | externals/skia/gyp/opts.gyp | terrajobst/linux-packaging-skiasharp | 47dbb2ff9ae01305b190f409ccea00b3b4f0bc79 | [
"MIT"
] | 1 | 2019-10-29T14:36:32.000Z | 2019-10-29T14:36:32.000Z | externals/skia/gyp/opts.gyp | terrajobst/linux-packaging-skiasharp | 47dbb2ff9ae01305b190f409ccea00b3b4f0bc79 | [
"MIT"
] | 1 | 2017-06-18T00:25:03.000Z | 2017-11-29T16:01:48.000Z | externals/skia/gyp/opts.gyp | terrajobst/linux-packaging-skiasharp | 47dbb2ff9ae01305b190f409ccea00b3b4f0bc79 | [
"MIT"
] | 5 | 2017-11-30T06:06:50.000Z | 2022-03-31T21:48:49.000Z | # Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Gyp file for building opts target.
{
# (To be honest, I'm not sure why we need to include common.gypi. I thought it was automatic.)
'variables': {
'includes': [ 'common.gypi' ]... | 32.112554 | 97 | 0.48598 |
2b9676cf732461c849b10e95ac5fb7a560da89f6 | 37,054 | py | Python | tests/test_stanza_element.py | silkworm3725/https-github.com-fritzy-SleekXMPP | e5582694c07236e6830c20361840360a1dde37f3 | [
"BSD-3-Clause"
] | 4 | 2015-03-25T19:12:05.000Z | 2020-10-21T12:27:00.000Z | tests/test_stanza_element.py | silkworm3725/https-github.com-fritzy-SleekXMPP | e5582694c07236e6830c20361840360a1dde37f3 | [
"BSD-3-Clause"
] | null | null | null | tests/test_stanza_element.py | silkworm3725/https-github.com-fritzy-SleekXMPP | e5582694c07236e6830c20361840360a1dde37f3 | [
"BSD-3-Clause"
] | 5 | 2015-03-09T18:09:45.000Z | 2018-10-08T09:00:09.000Z | import unittest
from sleekxmpp.test import SleekTest
from sleekxmpp.xmlstream.stanzabase import ElementBase, register_stanza_plugin, ET
from sleekxmpp.thirdparty import OrderedDict
class TestElementBase(SleekTest):
def testFixNs(self):
"""Test fixing namespaces in an XPath expression."""
e = Ele... | 29.572227 | 82 | 0.496573 |
394c129aff9225c56cda94462b8256b5b2e551a9 | 1,530 | py | Python | tools/profiling/python/profile2h5.py | therault/parsec-tesseorg | 68ca8d78b905460a16b7c81b545986c5d9b454d8 | [
"BSD-3-Clause-Open-MPI"
] | 4 | 2022-02-24T23:28:10.000Z | 2022-03-05T06:45:07.000Z | tools/profiling/python/profile2h5.py | therault/parsec-tesseorg | 68ca8d78b905460a16b7c81b545986c5d9b454d8 | [
"BSD-3-Clause-Open-MPI"
] | 48 | 2022-02-17T03:37:32.000Z | 2022-03-31T19:03:35.000Z | tools/profiling/python/profile2h5.py | therault/parsec-tesseorg | 68ca8d78b905460a16b7c81b545986c5d9b454d8 | [
"BSD-3-Clause-Open-MPI"
] | 9 | 2022-02-17T19:58:59.000Z | 2022-03-29T14:15:31.000Z | #!/usr/bin/env python
from __future__ import print_function
import sys
import ptt_utils
import pbt2ptt
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Convert a set of PaRSEC Binary Profile files into an HDF5 file")
parser.add_argument('--output', dest='output', help='O... | 45 | 114 | 0.637908 |
9b871f43ca1435cfe817b46bfa3a823a33a7c757 | 345 | py | Python | src/kucoin_keys.py | StephanAkkerman/KuCoin_Stop_Loss_Alert | cde592eb6ed7c7bca2edae4289419a0de3c863d2 | [
"MIT"
] | 1 | 2021-12-17T21:15:48.000Z | 2021-12-17T21:15:48.000Z | src/kucoin_keys.py | StephanAkkerman/KuCoin_Stop_Loss_Alert | cde592eb6ed7c7bca2edae4289419a0de3c863d2 | [
"MIT"
] | 1 | 2021-12-21T10:04:57.000Z | 2021-12-21T10:04:57.000Z | src/kucoin_keys.py | StephanAkkerman/KuCoin_Stop_Loss_Alert | cde592eb6ed7c7bca2edae4289419a0de3c863d2 | [
"MIT"
] | null | null | null | # Get your keys at https://kucoin.com/account/api
api_key = "<api_key>"
api_secret = "<api_secret>"
api_passphrase = "<api_passphrase>"
# TELEGRAM KEYS, follow these steps https://medium.com/@ManHay_Hong/how-to-create-a-telegram-bot-and-send-messages-with-python-4cf314d9fa3e
bot_token = "bot_token"
# Your telegram id... | 31.363636 | 139 | 0.75942 |
384a9a043c783fa29615c5c7f126867c7f6c3771 | 4,351 | py | Python | example/server.py | HyperionGray/trio-jsonrpc | dbc084c8144ec057048d5e69ca2d4fd61831975d | [
"MIT"
] | 5 | 2020-06-01T19:10:52.000Z | 2021-07-16T14:04:07.000Z | example/server.py | HyperionGray/trio-jsonrpc | dbc084c8144ec057048d5e69ca2d4fd61831975d | [
"MIT"
] | 2 | 2020-04-14T18:20:19.000Z | 2021-06-02T03:29:06.000Z | example/server.py | HyperionGray/trio-jsonrpc | dbc084c8144ec057048d5e69ca2d4fd61831975d | [
"MIT"
] | 1 | 2021-04-15T00:03:54.000Z | 2021-04-15T00:03:54.000Z | from __future__ import annotations
import argparse
from copy import copy
from dataclasses import dataclass
import logging
import typing
import trio
from trio_jsonrpc import (
Dispatch,
JsonRpcApplicationError,
JsonRpcConnection,
JsonRpcConnectionType,
JsonRpcException,
)
from trio_jsonrpc.transport... | 29.80137 | 85 | 0.676626 |
bd8705b2f9ffb4a1d384696fdfbe95210095728c | 2,330 | py | Python | pecarve/pecarve/pecarve.py | chemberger/stoq-plugins-public | 41cc8718610d4dc4b428510eba866f94aa64e85c | [
"Apache-2.0"
] | 1 | 2019-05-01T11:07:34.000Z | 2019-05-01T11:07:34.000Z | pecarve/pecarve/pecarve.py | chemberger/stoq-plugins-public | 41cc8718610d4dc4b428510eba866f94aa64e85c | [
"Apache-2.0"
] | null | null | null | pecarve/pecarve/pecarve.py | chemberger/stoq-plugins-public | 41cc8718610d4dc4b428510eba866f94aa64e85c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2014-2018 PUNCH Cyber Analytics Group
#
# 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
#
# Un... | 31.066667 | 84 | 0.659227 |
7a9d9088c551d26c440a77333f65e0e7ea5bbb9f | 2,774 | py | Python | spectral-clustering.py | DODdarcy/UBI-of-car-data | 6eb7faa2587456df035cfed05d809a3f6030f798 | [
"MIT"
] | 1 | 2019-07-19T07:46:28.000Z | 2019-07-19T07:46:28.000Z | spectral-clustering.py | DODdarcy/UBI-of-car-data | 6eb7faa2587456df035cfed05d809a3f6030f798 | [
"MIT"
] | null | null | null | spectral-clustering.py | DODdarcy/UBI-of-car-data | 6eb7faa2587456df035cfed05d809a3f6030f798 | [
"MIT"
] | null | null | null | from sklearn.cluster import KMeans
import numpy as np
import pylab as pl
import pandas as pd
from sklearn.decomposition import PCA
def normal_X(X):
"""
:param X:二维矩阵,N*D,N个D维的数据
:return: 将X归一化的结果
"""
N, D = X.shape
for i in range(N):
temp = np.sum(np.multiply(X[i], X[i]))
... | 31.168539 | 125 | 0.631579 |
70584387c2512926c3dfc0a58888027c96787bdb | 1,076 | py | Python | test/python/functional_tests/test_exit_code.py | nihalshetty-boop/hyperstyle | 9a6d53cd1ca220d97d296c0087056b5885b26281 | [
"Apache-2.0"
] | null | null | null | test/python/functional_tests/test_exit_code.py | nihalshetty-boop/hyperstyle | 9a6d53cd1ca220d97d296c0087056b5885b26281 | [
"Apache-2.0"
] | null | null | null | test/python/functional_tests/test_exit_code.py | nihalshetty-boop/hyperstyle | 9a6d53cd1ca220d97d296c0087056b5885b26281 | [
"Apache-2.0"
] | null | null | null | import subprocess
from pathlib import Path
from test.python.functional_tests.conftest import DATA_PATH, LocalCommandBuilder
def test_exit_code_zero(local_command: LocalCommandBuilder):
file_path = DATA_PATH / 'exit_codes' / 'no_issues.py'
local_command.path = file_path
process = subprocess.run(
... | 24.454545 | 80 | 0.70632 |
1157c796d499d8ab50aa032a98706bf1bf152e06 | 1,062 | py | Python | src/tensorforce/tensorforce/core/networks/__init__.py | linus87/drl_shape_optimization | 39e6b66bd5b70dfce07e145aafe815071bc1b6fe | [
"MIT"
] | 17 | 2020-12-28T16:25:47.000Z | 2022-03-27T18:28:44.000Z | src/tensorforce/tensorforce/core/networks/__init__.py | linus87/drl_shape_optimization | 39e6b66bd5b70dfce07e145aafe815071bc1b6fe | [
"MIT"
] | 2 | 2021-04-18T03:40:02.000Z | 2022-01-24T08:40:10.000Z | src/tensorforce/tensorforce/core/networks/__init__.py | linus87/drl_shape_optimization | 39e6b66bd5b70dfce07e145aafe815071bc1b6fe | [
"MIT"
] | 8 | 2020-12-23T05:59:52.000Z | 2022-03-28T12:06:35.000Z | # Copyright 2018 Tensorforce Team. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 40.846154 | 94 | 0.728814 |
a4b59cf9c2e5b2a350d8145fc204047194c40090 | 18,463 | py | Python | test/new_tests/test_scan_apply.py | Hirni-Meshram2/aerospike-client-python | 4516a50c3978e4e47702b4f035ecbbbbbdaa3131 | [
"Apache-2.0"
] | null | null | null | test/new_tests/test_scan_apply.py | Hirni-Meshram2/aerospike-client-python | 4516a50c3978e4e47702b4f035ecbbbbbdaa3131 | [
"Apache-2.0"
] | null | null | null | test/new_tests/test_scan_apply.py | Hirni-Meshram2/aerospike-client-python | 4516a50c3978e4e47702b4f035ecbbbbbdaa3131 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
import time
import sys
from .as_status_codes import AerospikeStatus
from aerospike_helpers import expressions as exp
from aerospike import exception as e
aerospike = pytest.importorskip("aerospike")
try:
import aerospike
except:
print("Please install aerospike python clien... | 36.201961 | 91 | 0.538266 |
ae0cc7a86e3f2a25978e427b26d17d0d45cf59b1 | 391 | py | Python | app/bookapi/asgi.py | adamkielar/book_api_stx | 5cdd148057ffab4b62db15412035b10342a0c61f | [
"MIT"
] | null | null | null | app/bookapi/asgi.py | adamkielar/book_api_stx | 5cdd148057ffab4b62db15412035b10342a0c61f | [
"MIT"
] | null | null | null | app/bookapi/asgi.py | adamkielar/book_api_stx | 5cdd148057ffab4b62db15412035b10342a0c61f | [
"MIT"
] | null | null | null | """
ASGI config for bookapi project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTI... | 23 | 78 | 0.785166 |
7dce58d821183e7ded92180c2f4d0715de453de8 | 2,833 | py | Python | yolo_predict.py | sankeerthpeters/Optical-localization-of-objects | 5b2941ff762778f64da3bef2da4d521330a164bd | [
"MIT"
] | null | null | null | yolo_predict.py | sankeerthpeters/Optical-localization-of-objects | 5b2941ff762778f64da3bef2da4d521330a164bd | [
"MIT"
] | null | null | null | yolo_predict.py | sankeerthpeters/Optical-localization-of-objects | 5b2941ff762778f64da3bef2da4d521330a164bd | [
"MIT"
] | null | null | null |
import argparse
import os
import cv2
import numpy as np
#from tqdm import tqdm
from yolo_preprocessing import read_annotations
from yolo_utils import draw_kpp
from yolo_frontend import SpecialYOLO
import json
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
argparser = argparse.Ar... | 28.33 | 91 | 0.624426 |
0d8a8999dc53fd41f0ec14a3ea2a1ce526948929 | 1,208 | py | Python | setup.py | zyheal/dev-tools | 828f28cb46c77d660d6fd38248fb25a01abbbd3c | [
"MIT"
] | null | null | null | setup.py | zyheal/dev-tools | 828f28cb46c77d660d6fd38248fb25a01abbbd3c | [
"MIT"
] | null | null | null | setup.py | zyheal/dev-tools | 828f28cb46c77d660d6fd38248fb25a01abbbd3c | [
"MIT"
] | null | null | null | import setuptools
with open('README.md', 'r', encoding='utf-8') as fh:
long_description = fh.read()
setuptools.setup(
name='dev_tools',
version='0.0.2', # 本版本可以不进行更新
author='Daryl.Xu',
author_email='ziqiang_xu@qq.com',
description='General dev_tools written in Python',
long_description=lo... | 32.648649 | 76 | 0.634934 |
f8c4b3bd460508be437f9cc7cc53ec98895773d3 | 691 | py | Python | tests/plugins/private_key_test.py | Sohail216/detect-secrets-test | c8500e27718167b95801b55e15cfbdf9b31f0201 | [
"Apache-2.0"
] | null | null | null | tests/plugins/private_key_test.py | Sohail216/detect-secrets-test | c8500e27718167b95801b55e15cfbdf9b31f0201 | [
"Apache-2.0"
] | null | null | null | tests/plugins/private_key_test.py | Sohail216/detect-secrets-test | c8500e27718167b95801b55e15cfbdf9b31f0201 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from detect_secrets.plugins.private_key import PrivateKeyDetector
from tests.util.file_util import create_file_object_from_string
class TestPrivateKeyDetector(object):
def test_analyze(self):
logic = PrivateKeyDetector()
file_content = (
'-----... | 30.043478 | 65 | 0.665702 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.