hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
745cee902a320e6286291587e66e5612850b4686 | 324 | py | Python | mlinspect/backends/all_backends.py | stefan-grafberger/mlinspect-cidr | 4a15068a1652c043021d04795bd89da32ec20992 | [
"Apache-2.0"
] | 5 | 2020-08-26T13:32:13.000Z | 2020-10-20T15:34:57.000Z | mlinspect/backends/all_backends.py | stefan-grafberger/mlinspect-cidr | 4a15068a1652c043021d04795bd89da32ec20992 | [
"Apache-2.0"
] | 1 | 2020-08-29T22:53:27.000Z | 2020-08-29T22:53:27.000Z | mlinspect/backends/all_backends.py | stefan-grafberger/mlinspect-cidr | 4a15068a1652c043021d04795bd89da32ec20992 | [
"Apache-2.0"
] | null | null | null | """
Get all available backends
"""
from typing import List
from .backend import Backend
from .pandas_backend import PandasBackend
from .sklearn_backend import SklearnBackend
def get_all_backends() -> List[Backend]:
"""Get the list of all currently available backends"""
return [PandasBackend(), SklearnBackend... | 23.142857 | 58 | 0.762346 |
745d0b41e1c4e5d15d16acaf1d2c213954acb8f2 | 1,322 | py | Python | vyperlogix/mixins/ioTimeAnalysis.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/mixins/ioTimeAnalysis.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/mixins/ioTimeAnalysis.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | __copyright__ = """\
(c). Copyright 2008-2020, Vyper Logix Corp., All Rights Reserved.
Published under Creative Commons License
(http://creativecommons.org/licenses/by-nc/3.0/)
restricted to non-commercial educational use only.,
http://www.VyperLogix.com for details
THE AUTHOR VYPER LOGIX CORP DISCLAIMS ALL WARRA... | 37.771429 | 70 | 0.713313 |
745d22c14e466f8e1bfbba0c4606bdd0ffe50862 | 1,738 | py | Python | Tools/scons/scons-local/SCons/Tool/packaging/src_tarxz.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Tools/scons/scons-local/SCons/Tool/packaging/src_tarxz.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Tools/scons/scons-local/SCons/Tool/packaging/src_tarxz.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | """SCons.Tool.Packaging.src_tarxz
The tarxz SRC packager.
"""
#
# Copyright (c) 2001 - 2017 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restrict... | 39.5 | 100 | 0.73878 |
745d456cf663bdde1b8540a0d7f0b7f8a85ef3f7 | 3,523 | py | Python | client/verta/verta/_swagger/_public/uac/api/UACServiceApi.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/uac/api/UACServiceApi.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/uac/api/UACServiceApi.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
class UACServiceApi:
def __init__(self, client, base_path = "/v1"):
self.client = client
self.base_path = base_path
def createUser(self, body=None):
__query = {
}
if body is None:
raise Exception("Missing required parameter \"body\"")
forma... | 29.605042 | 89 | 0.635538 |
745d461aa78cecb309662f3f80af4d02dde0746c | 4,791 | py | Python | MarkdownPP/main.py | klanec/markdown-pp | e1bdd0da22562a6e1c1f913ce0dd8a9f266ea730 | [
"MIT"
] | 1 | 2021-08-24T11:30:31.000Z | 2021-08-24T11:30:31.000Z | MarkdownPP/main.py | klanec/markdown-pp | e1bdd0da22562a6e1c1f913ce0dd8a9f266ea730 | [
"MIT"
] | null | null | null | MarkdownPP/main.py | klanec/markdown-pp | e1bdd0da22562a6e1c1f913ce0dd8a9f266ea730 | [
"MIT"
] | 1 | 2021-08-24T11:50:58.000Z | 2021-08-24T11:50:58.000Z | #!/usr/bin/env python
# Copyright (C) 2010 John Reese
# Modified in 2021 with love by Nicholas Harris
# Licensed under the MIT license
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import sys
import MarkdownPP
import click
import sys
import logg... | 39.595041 | 148 | 0.659987 |
745d637a7badd0367f2814cbd6d816d25224b3c6 | 4,877 | py | Python | prkng_process/test/test_filters.py | prkng/process | 74bcdcef6a1d4607e304e138739bb44c66195633 | [
"MIT"
] | 8 | 2018-02-13T15:30:50.000Z | 2021-01-26T19:15:30.000Z | prkng_process/test/test_filters.py | prkng/process | 74bcdcef6a1d4607e304e138739bb44c66195633 | [
"MIT"
] | null | null | null | prkng_process/test/test_filters.py | prkng/process | 74bcdcef6a1d4607e304e138739bb44c66195633 | [
"MIT"
] | 6 | 2018-08-16T14:56:57.000Z | 2020-02-24T17:58:36.000Z | # -*- coding: utf-8 -*-
from collections import namedtuple
import pytest
from ..filters import split_time_range, group_rules
@pytest.fixture(scope="module")
def rules():
rule = namedtuple('rule', (
'id', 'code', 'description', 'periods', 'time_max_parking',
'time_start', 'time_end', 'time_durati... | 27.398876 | 72 | 0.450072 |
745db4a2f17e50386e86697528ceafce2fe79c40 | 4,506 | py | Python | bot.py | CrashAndSideburns/Minecraft-Admin-o-matic-9000 | 5ea073c2e1b628823c4dca44872ce09af8cb825d | [
"MIT"
] | null | null | null | bot.py | CrashAndSideburns/Minecraft-Admin-o-matic-9000 | 5ea073c2e1b628823c4dca44872ce09af8cb825d | [
"MIT"
] | null | null | null | bot.py | CrashAndSideburns/Minecraft-Admin-o-matic-9000 | 5ea073c2e1b628823c4dca44872ce09af8cb825d | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from mcstatusFuncs import playerNames
from mcrconFuncs import executeCommand
import os
import sqlite3
BOT_TOKEN = os.getenv('BOT_TOKEN')
db = sqlite3.connect('data.db')
cursor = db.cursor()
def get_prefix(client, message):
cursor.execute(f'SELECT prefix FROM guild... | 28.1625 | 127 | 0.738349 |
745dd18a8e89088e0811529f22cdd5f195db4a1b | 35,332 | py | Python | packit/upstream.py | admdev8/packit | 11bf44e8b08a742664d8bfe0c38336efc1a7adf3 | [
"MIT"
] | 1 | 2020-12-28T18:00:22.000Z | 2020-12-28T18:00:22.000Z | packit/upstream.py | admdev8/packit | 11bf44e8b08a742664d8bfe0c38336efc1a7adf3 | [
"MIT"
] | 7 | 2020-12-28T19:57:35.000Z | 2021-04-17T14:43:15.000Z | packit/upstream.py | admdev8/packit | 11bf44e8b08a742664d8bfe0c38336efc1a7adf3 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2019 Red Hat, Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge,... | 38.238095 | 97 | 0.589805 |
745dd80fd7de88ae89c9dec25c61d163ef258e26 | 472 | py | Python | scalpel/call_graph/pycg.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | 1 | 2022-01-12T06:00:32.000Z | 2022-01-12T06:00:32.000Z | scalpel/call_graph/pycg.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | null | null | null | scalpel/call_graph/pycg.py | StarWatch27/Scalpel | 8853e6e84f318f3cfeda0e03d274748b2fbe30fa | [
"Apache-2.0"
] | null | null | null | #This file is a wrapper of the pycg, a practical python call graph generator. Please refer to:
# 1. https://github.com/vitsalis/PyCG
# 2. https://pypi.org/project/pycg/
# 3. Vitalis Salis, Thodoris Sotiropoulos, Panos Louridas, Diomidis Spinellis and Dimitris Mitropoulos. PyCG: Practical Call Graph Generation in Python... | 67.428571 | 236 | 0.792373 |
745dfe222be44455e8353b6b65d3c51ec3ec5eee | 985 | py | Python | userbot/modules/plane.py | PratyakshM/DirtyBlack_EXTENDED | d842013d969c9ca57c640a944fc3e8b23f1eb68a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-03-22T11:40:54.000Z | 2021-03-22T11:40:54.000Z | userbot/modules/plane.py | PratyakshM/DirtyBlack_EXTENDED | d842013d969c9ca57c640a944fc3e8b23f1eb68a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/plane.py | PratyakshM/DirtyBlack_EXTENDED | d842013d969c9ca57c640a944fc3e8b23f1eb68a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
from telethon import events
import asyncio
import os
import sys
from userbot.events import register
from userbot import CMD_HELP
@register(outgoing=True, pattern="^.plane(?: |$)(.*)")
async def _(event):
if event.fwd_from:
return
await event.edit("✈-------------")
await event.ed... | 25.25641 | 63 | 0.490355 |
745e36c250ee96f3e840cde480984ea689b8a85f | 239 | py | Python | setup.py | NYPD/Phodupe | 64ffb2cf0d299ad5d02cd0a4a006fee166dbf597 | [
"MIT"
] | null | null | null | setup.py | NYPD/Phodupe | 64ffb2cf0d299ad5d02cd0a4a006fee166dbf597 | [
"MIT"
] | 8 | 2019-09-24T03:04:28.000Z | 2021-04-01T20:27:43.000Z | setup.py | NYPD/phodupe | 64ffb2cf0d299ad5d02cd0a4a006fee166dbf597 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='phodupe',
version='v0.0.4',
packages=['phodupe'],
url='https://github.com/NYPD/phodupe',
license='MIT',
author='NYPD',
description='Duplicate file finder'
)
| 19.916667 | 43 | 0.606695 |
745e6ef23964a054d161babd0bbcc8620cc80950 | 1,961 | py | Python | 05-Mathematic-Implementation/DS-RegressrionTechniques/04-Regression/AbstractRegression.py | NguyenQuangBinh803/Python-Heritage | 7da72b2926cefc4903086a1cab7de3a64764d648 | [
"MIT"
] | 1 | 2021-01-10T12:06:26.000Z | 2021-01-10T12:06:26.000Z | 05-Mathematic-Implementation/DS-RegressrionTechniques/04-Regression/AbstractRegression.py | NguyenQuangBinh803/Python-Heritage | 7da72b2926cefc4903086a1cab7de3a64764d648 | [
"MIT"
] | null | null | null | 05-Mathematic-Implementation/DS-RegressrionTechniques/04-Regression/AbstractRegression.py | NguyenQuangBinh803/Python-Heritage | 7da72b2926cefc4903086a1cab7de3a64764d648 | [
"MIT"
] | null | null | null | import numpy as np
import math
import random
from GraphEngine import GraphEngine
class AbstractRegression:
def __init__(self, number_of_parameter):
self.regression_function_parameters = np.zeros((number_of_parameter, 1), dtype=float)
self.acceptable_range = 0.3
self.learning_rate = 0.1
... | 42.630435 | 140 | 0.72565 |
745e99b9e5c5022ba8a79ee567c08cab29c3221f | 10,233 | py | Python | leetcode_python/Recursion/populating-next-right-pointers-in-each-node.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Recursion/populating-next-right-pointers-in-each-node.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Recursion/populating-next-right-pointers-in-each-node.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
116. Populating Next Right Pointers in Each Node
Medium
You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following definition:
struct Node {
int val;
Node *left;
Node *right;
Node *next;
}
Populate each next pointer to ... | 29.921053 | 282 | 0.527118 |
745ecb29c2d2da3d9b1f0268cf4702a80011498f | 44,113 | py | Python | domainbed/algorithms.py | odb9402/DomainBed | c1b0ab0f9fb56eaadf22626e809d7914eb92f868 | [
"MIT"
] | null | null | null | domainbed/algorithms.py | odb9402/DomainBed | c1b0ab0f9fb56eaadf22626e809d7914eb92f868 | [
"MIT"
] | null | null | null | domainbed/algorithms.py | odb9402/DomainBed | c1b0ab0f9fb56eaadf22626e809d7914eb92f868 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.autograd as autograd
from torch.autograd import Variable
import copy
import numpy as np
from collections import defaultdict
from domainbed import networks
from domain... | 36.306996 | 112 | 0.591504 |
745edbb14fc6d901f88dd9fdc5e36ef1c6797ecb | 433 | py | Python | chirun/plastex/caption/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 5 | 2021-12-06T15:57:24.000Z | 2022-01-24T20:34:00.000Z | chirun/plastex/caption/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 38 | 2021-12-09T13:16:46.000Z | 2022-03-30T11:42:13.000Z | chirun/plastex/caption/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 1 | 2022-01-17T17:41:35.000Z | 2022-01-17T17:41:35.000Z | from plasTeX.PackageResource import (PackageTemplateDir)
from plasTeX.Base.LaTeX import Floats
def ProcessOptions(options, document):
tpl = PackageTemplateDir(renderers='html5', package='caption')
document.addPackageResource([tpl])
class Caption(Floats.Caption):
args = '* [ toc ] self'
class figure(Fl... | 24.055556 | 66 | 0.722864 |
745f0696a9313fc4a7d73ff9b47aa268ac61d18b | 25,563 | py | Python | papermerge/test/test_access_model.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | 1,586 | 2020-01-07T10:53:31.000Z | 2022-03-31T16:15:42.000Z | papermerge/test/test_access_model.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | 398 | 2020-01-29T16:31:44.000Z | 2022-03-11T21:22:10.000Z | papermerge/test/test_access_model.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | 196 | 2020-01-29T09:25:16.000Z | 2022-03-29T11:08:35.000Z | from django.contrib.auth.models import Group, Permission
from django.test import TestCase
from papermerge.core.auth import create_access, set_access_perms
from papermerge.core.models import Access, Diff, Folder, Document
from papermerge.test.utils import (
create_root_user,
create_margaret_user,
create_uplo... | 29.933255 | 77 | 0.545163 |
745f0fc8c0bb84f540f472a0eb535c25324eb3bf | 4,247 | py | Python | campy/graphics/gbufferedimage.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | 5 | 2018-12-03T19:18:50.000Z | 2021-05-31T07:17:06.000Z | campy/graphics/gbufferedimage.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | 1 | 2017-06-07T04:33:46.000Z | 2017-06-07T04:33:46.000Z | campy/graphics/gbufferedimage.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | 1 | 2017-06-06T07:29:07.000Z | 2017-06-06T07:29:07.000Z | """
"""
import campy.datastructures.grid as _grid
import campy.gui.ginteractors as _ginteractors
import campy.graphics.gcolor as _gcolor
import campy.graphics.gtypes as _gtypes
import campy.private.platform as _platform
import campy.io.base64helper as _base64helper
GBUFFEREDIMAGE_DEFAULT_DIFF_PIXEL_COLOR = 0xdd00dd
... | 29.493056 | 104 | 0.606781 |
745f1fff8095c32195069d3f5a5aba42087e91f5 | 47 | py | Python | dakotathon/plugins/__init__.py | csdms/dakotathon | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 8 | 2019-09-11T12:59:57.000Z | 2021-08-11T16:31:58.000Z | dakotathon/plugins/__init__.py | csdms/dakota | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 66 | 2015-04-06T17:11:21.000Z | 2019-02-03T18:09:52.000Z | dakotathon/plugins/__init__.py | csdms/dakota | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 5 | 2015-03-24T22:39:34.000Z | 2018-04-21T12:14:05.000Z | """Components that can be called by Dakota."""
| 23.5 | 46 | 0.702128 |
745f2ceac70d3be36e8bd6615de4ad3bf7a8f7ef | 6,317 | py | Python | alipay/aop/api/domain/AlipayCommerceTransportVehicleownerCampaignPublishModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayCommerceTransportVehicleownerCampaignPublishModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayCommerceTransportVehicleownerCampaignPublishModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayCommerceTransportVehicleownerCampaignPublishModel(object):
def __init__(self):
self._activity_icon = None
self._activity_record = None
self._activity_url = None
... | 33.073298 | 81 | 0.613424 |
745f2f40e4aa92bc4b22ff24cec2606c4c689ebd | 553 | py | Python | PeakInspector/run_peakinspector.py | MontpellierRessourcesImagerie/PeakInspector | 675ab99fe59c9dcec6a2428efcd1dbc029d90769 | [
"CC0-1.0"
] | 3 | 2017-07-03T11:59:17.000Z | 2021-10-31T07:09:00.000Z | PeakInspector/run_peakinspector.py | MontpellierRessourcesImagerie/PeakInspector | 675ab99fe59c9dcec6a2428efcd1dbc029d90769 | [
"CC0-1.0"
] | null | null | null | PeakInspector/run_peakinspector.py | MontpellierRessourcesImagerie/PeakInspector | 675ab99fe59c9dcec6a2428efcd1dbc029d90769 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
from PyQt5.QtWidgets import QApplication
from MainWindow import MainWindow
def run_peakinspector():
app = QApplication(sys.argv)
gui = MainWindow()
gui.showMaximized()
sys.exit(app.exec_())
if __name__ == '__main__':
run_peakinspector()
# TODO secondary tab in... | 25.136364 | 85 | 0.737794 |
745f333d31ce588206c023ae1da3f223d7d1dedd | 1,956 | py | Python | chaospy/basis.py | lblonk/chaospy | 1759a4307c6134b74ce63ff44973195f1e185f94 | [
"MIT"
] | 1 | 2021-02-28T07:53:32.000Z | 2021-02-28T07:53:32.000Z | chaospy/basis.py | lblonk/chaospy | 1759a4307c6134b74ce63ff44973195f1e185f94 | [
"MIT"
] | null | null | null | chaospy/basis.py | lblonk/chaospy | 1759a4307c6134b74ce63ff44973195f1e185f94 | [
"MIT"
] | null | null | null | """Create an N-dimensional unit polynomial basis."""
import logging
import numpy
import numpoly
def basis(start, stop=None, dim=1, cross_truncation=1., sort="G"):
"""
Create an N-dimensional unit polynomial basis.
Args:
start (int, numpy.ndarray):
the minimum polynomial to include. I... | 34.315789 | 79 | 0.595603 |
745f3ceeacf2dace3560801512d332e11145cff1 | 519 | py | Python | Earthquake_Source/hash_tut/DATA/2020004T230105/plot_section.py | zijinping/relocation | 7de003ee1ef8587e8fcbeba1edd967cdf4c00637 | [
"MIT"
] | null | null | null | Earthquake_Source/hash_tut/DATA/2020004T230105/plot_section.py | zijinping/relocation | 7de003ee1ef8587e8fcbeba1edd967cdf4c00637 | [
"MIT"
] | null | null | null | Earthquake_Source/hash_tut/DATA/2020004T230105/plot_section.py | zijinping/relocation | 7de003ee1ef8587e8fcbeba1edd967cdf4c00637 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Plot Section of the sac files
@auther: jw
"""
from obspy import read
import matplotlib;matplotlib.use('tkagg')
_sac_files="*HHZ*"
st = read(_sac_files)
st += read("*BHZ*")
print(st)
# convert sac.dist to tr.stats.distance
for tr in st:
tr.stats.distance = tr... | 18.535714 | 81 | 0.695568 |
745f4e8906519980d6a28f375a1ff0f1b3cd1c31 | 9,472 | py | Python | sunpy/io/fits.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/io/fits.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/io/fits.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | """
FITS File Reader
Notes
-----
FITS
[1] FITS files allow comments to be attached to every value in the header.
This is implemented in this module as a KEYCOMMENTS dictionary in the
sunpy header. To add a comment to the file on write, add a comment to this
dictionary with the same name as a key in the... | 32.549828 | 86 | 0.60019 |
745f5c76d01318098b391a6e8dd072e45d40fa62 | 9,776 | py | Python | graph_util/graph_data_util.py | WilsonWangTHU/neural_graph_evolution | 9142b7f1c32c476aa44c83da38d3f0bacc276d73 | [
"MIT"
] | 33 | 2019-06-06T13:59:51.000Z | 2022-03-07T10:36:42.000Z | graph_util/graph_data_util.py | WilsonWangTHU/neural_graph_evolution | 9142b7f1c32c476aa44c83da38d3f0bacc276d73 | [
"MIT"
] | 8 | 2019-07-09T16:58:28.000Z | 2022-02-10T00:27:39.000Z | graph_util/graph_data_util.py | WilsonWangTHU/neural_graph_evolution | 9142b7f1c32c476aa44c83da38d3f0bacc276d73 | [
"MIT"
] | 12 | 2019-06-07T10:43:12.000Z | 2022-03-09T13:47:01.000Z | #!/usr/bin/env python2
# -----------------------------------------------------------------------------
# @brief:
# In this function, we change the data from [batch_size, ob_dim] into
# [batch_size * num_node, hidden_dim]
# @author:
# Tingwu Wang, Jul. 13th, 2017
# ---------------------------------... | 36.890566 | 79 | 0.586334 |
745f7a0a7c300ff8e1ac54304e477d5da7349c81 | 7,311 | py | Python | iirc/lifelong_dataset/tensorflow_dataset.py | chandar-lab/IIRC | ae6ffcfc0a42274bcda66e2288e09118604620e4 | [
"MIT"
] | 23 | 2021-01-19T11:50:57.000Z | 2021-12-12T17:20:22.000Z | iirc/lifelong_dataset/tensorflow_dataset.py | chandar-lab/IIRC | ae6ffcfc0a42274bcda66e2288e09118604620e4 | [
"MIT"
] | 1 | 2021-04-06T14:35:03.000Z | 2021-06-20T08:56:15.000Z | iirc/lifelong_dataset/tensorflow_dataset.py | chandar-lab/IIRC | ae6ffcfc0a42274bcda66e2288e09118604620e4 | [
"MIT"
] | 8 | 2021-01-05T10:49:19.000Z | 2021-12-12T17:20:38.000Z | import numpy as np
from PIL import Image
import tensorflow as tf
from typing import Optional, Callable, List, Tuple, Union
from iirc.lifelong_dataset.base_dataset import BaseDataset
from iirc.definitions import IIRC_SETUP, DatasetStructType
class Dataset(BaseDataset):
"""
An Lifelong Learning dataset that re... | 71.676471 | 120 | 0.671454 |
745fca71039bbdb6b9c03d86cab63f919f602589 | 4,515 | py | Python | satella/coding/structures/heaps/base.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 12 | 2019-12-13T10:17:38.000Z | 2022-01-05T09:01:36.000Z | satella/coding/structures/heaps/base.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 26 | 2016-04-01T11:55:26.000Z | 2021-12-30T17:03:59.000Z | satella/coding/structures/heaps/base.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 1 | 2021-05-31T08:45:22.000Z | 2021-05-31T08:45:22.000Z | import collections
import copy
import heapq
import typing as tp
from satella.coding.decorators.decorators import wraps
from satella.coding.typing import T, Predicate
def _extras_to_one(fun):
@wraps(fun)
def inner(self, a, *args, **kwargs):
return fun(self, ((a,) + args) if len(args) > 0 else a, **kwa... | 27.87037 | 97 | 0.60155 |
745fd5ca0cce0d406df31fff05ab2a3e83c24b52 | 8,440 | py | Python | tfoptflow/visualize.py | mf-zhang/tfoptflow | d27b249fcbae2d1f4373ef4ba16cb0c89890058e | [
"MIT"
] | null | null | null | tfoptflow/visualize.py | mf-zhang/tfoptflow | d27b249fcbae2d1f4373ef4ba16cb0c89890058e | [
"MIT"
] | null | null | null | tfoptflow/visualize.py | mf-zhang/tfoptflow | d27b249fcbae2d1f4373ef4ba16cb0c89890058e | [
"MIT"
] | null | null | null | """
visualize.py
Visualization helpers.
Written by Phil Ferriere
Licensed under the MIT License (see LICENSE for details)
"""
from __future__ import absolute_import, division, print_function
import matplotlib.pyplot as plt
from utils import clean_dst_file
from optflow import *
import numpy as np
import matplotlib.... | 38.715596 | 114 | 0.631872 |
745fd82ce62ab2730c797bebd1dec7307747441a | 2,612 | py | Python | leviathan/__init__.py | scottywz/leviathan-player | 31e19efd0e88959455371dd605981d98bddd388b | [
"Apache-2.0"
] | null | null | null | leviathan/__init__.py | scottywz/leviathan-player | 31e19efd0e88959455371dd605981d98bddd388b | [
"Apache-2.0"
] | null | null | null | leviathan/__init__.py | scottywz/leviathan-player | 31e19efd0e88959455371dd605981d98bddd388b | [
"Apache-2.0"
] | null | null | null | # Leviathan Music Manager
# A command-line utility to manage your music collection.
#
# Copyright (C) 2010-2011, 2020 S. Zeid
# https://code.s.zeid.me/leviathan
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free... | 45.824561 | 80 | 0.765697 |
745fefd6464657ac6fa3c7c409cf488947c6d5b6 | 2,900 | py | Python | influxdb_client/domain/notification_rule_discriminator.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/domain/notification_rule_discriminator.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/notification_rule_discriminator.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class Noti... | 29.896907 | 124 | 0.593103 |
745fffdee342e9e9b55a1ad88cb1caccdb7fb81d | 2,410 | py | Python | tests/test_tfrecord_writer.py | openAGI/datum | 2dfc8c62ed1366fd8544b8b25d730d89dfb57d4e | [
"Apache-2.0"
] | 6 | 2020-05-17T10:03:24.000Z | 2021-07-05T18:38:06.000Z | tests/test_tfrecord_writer.py | openAGI/datum | 2dfc8c62ed1366fd8544b8b25d730d89dfb57d4e | [
"Apache-2.0"
] | 2 | 2021-07-26T03:22:47.000Z | 2022-02-09T23:33:33.000Z | tests/test_tfrecord_writer.py | openAGI/datum | 2dfc8c62ed1366fd8544b8b25d730d89dfb57d4e | [
"Apache-2.0"
] | 1 | 2021-06-14T14:49:38.000Z | 2021-06-14T14:49:38.000Z | # Copyright 2021 The OpenAGI Datum Authors.
#
# 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 ... | 37.65625 | 97 | 0.709129 |
74600f5da443a1ff8f561874ba316edaf8620792 | 2,623 | py | Python | gcrlm/core/exceptions/crlm.py | giussepi/gcrlm | 2c633eb681f536389cc0b63bb0d33ed933809b69 | [
"MIT"
] | null | null | null | gcrlm/core/exceptions/crlm.py | giussepi/gcrlm | 2c633eb681f536389cc0b63bb0d33ed933809b69 | [
"MIT"
] | null | null | null | gcrlm/core/exceptions/crlm.py | giussepi/gcrlm | 2c633eb681f536389cc0b63bb0d33ed933809b69 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" gcrlm/core/exceptions/crlm """
class NoRoiClusters(RuntimeError):
"""
Exception to be raised by
Data/Prepare_patches/CRLM.CRLM.extract_annotations_and_masks setting
inside_roi to True but not providing roi_clusters
"""
def __init__(self, message=''):
""" In... | 34.973333 | 98 | 0.651925 |
7460269d400520f7523bd27d2a9dd8182d5f69ac | 10,079 | py | Python | var/spack/repos/builtin/packages/mesa/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/mesa/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/mesa/package.py | joequant/spack | e028ee0d5903045e1cdeb57550cbff61f2ffb2fa | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import sys
from spack import *
class Mesa(MesonPackage):
"""Mesa is an open-source implementation of the OpenGL spe... | 37.890977 | 211 | 0.604723 |
7460282d442d44e5f478429b210b85bf42b9ef35 | 983 | py | Python | python/test/test_appointment_payload.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | python/test/test_appointment_payload.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | python/test/test_appointment_payload.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | # coding: utf-8
"""
Easy!Appointments API
These are the OpenAPI specs that describe the REST API of Easy!Appointments. # noqa: E501
OpenAPI spec version: 1.0.0
Contact: info@easyappointments.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute... | 24.575 | 94 | 0.723296 |
7461226bfdbff83bbba6f82f3c528318714c7e7a | 4,537 | py | Python | prereise/gather/solardata/nsrdb/sam.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | prereise/gather/solardata/nsrdb/sam.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | prereise/gather/solardata/nsrdb/sam.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import PySAM.Pvwattsv7 as PVWatts
import PySAM.PySSC as pssc
from powersimdata.network.usa_tamu.constants.zones import (
abv2interconnect,
id2abv,
interconnect2abv,
)
from tqdm import tqdm
from prereise.gather.solardata.helpers import get_plant_info_unique_location
fr... | 34.371212 | 86 | 0.564029 |
74613e0b7f831522e6d5333726de5722ff188417 | 5,761 | py | Python | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2021_07_02/_iot_hub_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2021_07_02/_iot_hub_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2021_07_02/_iot_hub_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 may ... | 50.095652 | 206 | 0.729734 |
74613e84beac8ac348244577ee12cfc42b91c4b1 | 9,202 | py | Python | datalad/__init__.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | 1 | 2021-06-11T19:54:19.000Z | 2021-06-11T19:54:19.000Z | datalad/__init__.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | 1 | 2019-08-30T14:45:33.000Z | 2019-08-30T14:45:33.000Z | datalad/__init__.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ##... | 37.104839 | 107 | 0.689089 |
746145f137d4e28ab0a9f987a02a325e8590a89d | 16,475 | py | Python | utest/controller/test_cellinfo.py | chandrapola/RIDE | 08e01b98026b618359e47689cb5e65a0a67795f5 | [
"ECL-2.0",
"Apache-2.0"
] | 84 | 2016-09-21T10:57:22.000Z | 2021-11-30T21:25:36.000Z | utest/controller/test_cellinfo.py | chandrapola/RIDE | 08e01b98026b618359e47689cb5e65a0a67795f5 | [
"ECL-2.0",
"Apache-2.0"
] | 124 | 2017-12-11T21:23:06.000Z | 2022-02-18T19:11:02.000Z | utest/controller/test_cellinfo.py | chandrapola/RIDE | 08e01b98026b618359e47689cb5e65a0a67795f5 | [
"ECL-2.0",
"Apache-2.0"
] | 38 | 2017-07-20T02:51:56.000Z | 2021-07-09T04:54:44.000Z | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... | 54.916667 | 115 | 0.715508 |
746158d21ee1175f9df833c46e08e37c8e4ace74 | 4,133 | py | Python | qcodes/tests/drivers/test_MercuryiPS.py | WilliamHPNielsen/Qcodes | 0d51cb3f8de87b792f86eb8ae7a8d752295062ef | [
"MIT"
] | null | null | null | qcodes/tests/drivers/test_MercuryiPS.py | WilliamHPNielsen/Qcodes | 0d51cb3f8de87b792f86eb8ae7a8d752295062ef | [
"MIT"
] | 2 | 2017-04-24T07:57:50.000Z | 2018-12-11T11:30:46.000Z | qcodes/tests/drivers/test_MercuryiPS.py | WilliamHPNielsen/Qcodes | 0d51cb3f8de87b792f86eb8ae7a8d752295062ef | [
"MIT"
] | null | null | null | import logging
import pytest
import numpy as np
import hypothesis as hst
from qcodes.instrument_drivers.oxford.MercuryiPS_VISA import MercuryiPS
import qcodes.instrument.sims as sims
visalib = sims.__file__.replace('__init__.py', 'MercuryiPS.yaml@sim')
@pytest.fixture(scope='function')
def driver():
mips = M... | 27.738255 | 82 | 0.628841 |
74615bf891e8ad18ba19b664708cf1785d7d8287 | 22,982 | py | Python | vilbert_beta/train_concap.py | WadeYin9712/GD-VCR | aa8138b55f5a9136dae10ceb99455d9f2beb6d75 | [
"MIT"
] | 19 | 2021-09-04T16:49:57.000Z | 2022-01-07T08:49:20.000Z | vilbert_beta/train_concap.py | WadeYin9712/GD-VCR | aa8138b55f5a9136dae10ceb99455d9f2beb6d75 | [
"MIT"
] | null | null | null | vilbert_beta/train_concap.py | WadeYin9712/GD-VCR | aa8138b55f5a9136dae10ceb99455d9f2beb6d75 | [
"MIT"
] | null | null | null | import argparse
import json
import logging
import os
import random
from io import open
import math
import sys
from time import gmtime, strftime
from timeit import default_timer as timer
import numpy as np
from tqdm import tqdm, trange
import torch
from torch.utils.data import DataLoader, Dataset, RandomSampler
from ... | 34.199405 | 146 | 0.586459 |
74617928a7168c9e7c5a22723b80e2f465685cbe | 3,509 | py | Python | tensorflow/contrib/slim/python/slim/model_analyzer.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/contrib/slim/python/slim/model_analyzer.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/slim/python/slim/model_analyzer.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 31.330357 | 80 | 0.671131 |
746181d66f3270c2986f64350320406803be1ff6 | 68,881 | py | Python | sample_mods/bfb/bfb_abs_cons7momdt_nmpc.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 2 | 2019-09-26T20:56:06.000Z | 2019-11-18T21:03:27.000Z | sample_mods/bfb/bfb_abs_cons7momdt_nmpc.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 6 | 2018-03-19T20:36:49.000Z | 2018-04-13T15:27:29.000Z | sample_mods/bfb/bfb_abs_cons7momdt_nmpc.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 5 | 2018-10-04T18:51:02.000Z | 2020-07-02T15:31:35.000Z | from __future__ import division
from pyomo.core.base import Constraint, sqrt, exp, Expression, log
from nmpc_mhe.aux.cpoinsc import collptsgen
from nmpc_mhe.aux.lagrange_f import lgr, lgry, lgrdot, lgrydot
"""
Version note implemented momentum balance and diffusive terms for the bubble region (gas)
have pressure give... | 36.387216 | 423 | 0.486636 |
7461935deffa6cb4e695a6ad64264104723d430d | 97 | py | Python | Common/IO/DirInfo/IDirInfo.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 2 | 2020-03-04T11:18:38.000Z | 2020-05-10T15:36:42.000Z | Common/IO/DirInfo/IDirInfo.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 6 | 2020-03-30T16:42:47.000Z | 2021-12-13T20:37:21.000Z | Common/IO/DirInfo/IDirInfo.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 1 | 2020-04-14T11:26:16.000Z | 2020-04-14T11:26:16.000Z | from Common.Objects.Interfaceable import Interfaceable
class IDirInfo(Interfaceable):
pass
| 16.166667 | 54 | 0.814433 |
7461af7b4968ee57bef075219ecc5868b99dba11 | 2,394 | py | Python | discount/migrations/0001_initial.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 19 | 2022-02-16T20:00:08.000Z | 2022-03-08T17:38:59.000Z | discount/migrations/0001_initial.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 3 | 2022-02-16T20:59:11.000Z | 2022-02-23T20:40:12.000Z | discount/migrations/0001_initial.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.9 on 2022-02-12 08:44
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),
('prod... | 47.88 | 180 | 0.612364 |
7461bbf6f2eb1303f332f7335b94360b4f64f5c4 | 18,669 | py | Python | IPython/kernel/zmq/kernelapp.py | damianavila/ipython | 4481c323e0d261685ad350fc6f437494b889ab12 | [
"BSD-3-Clause-Clear"
] | 2 | 2020-11-30T14:04:30.000Z | 2021-11-08T11:29:05.000Z | IPython/kernel/zmq/kernelapp.py | RuSHi2381/ipython | 4481c323e0d261685ad350fc6f437494b889ab12 | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/kernel/zmq/kernelapp.py | RuSHi2381/ipython | 4481c323e0d261685ad350fc6f437494b889ab12 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-11-19T05:18:41.000Z | 2020-11-19T05:18:41.000Z | """An Application for launching a kernel
Authors
-------
* MinRK
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING.txt, distributed as pa... | 39.386076 | 105 | 0.617548 |
7461be913d95d89c35dbce40bf491455799b1c80 | 792 | py | Python | src/compas_fab/ghpython/__init__.py | yijiangh/compas_fab | d4e8e630d4daeb8981200456f2ef6b6a09ac88a8 | [
"MIT"
] | 1 | 2019-08-15T17:34:43.000Z | 2019-08-15T17:34:43.000Z | src/compas_fab/ghpython/__init__.py | yijiangh/compas_fab | d4e8e630d4daeb8981200456f2ef6b6a09ac88a8 | [
"MIT"
] | 3 | 2019-07-30T13:50:51.000Z | 2019-07-30T14:27:27.000Z | src/compas_fab/ghpython/__init__.py | yijiangh/compas_fab | d4e8e630d4daeb8981200456f2ef6b6a09ac88a8 | [
"MIT"
] | null | null | null | """
********************************************************************************
compas_fab.ghpython
********************************************************************************
.. currentmodule:: compas_fab.ghpython
Artists
-------
In **COMPAS**, the `artists` are classes that assist with the visualization ... | 24.75 | 80 | 0.603535 |
7461c3f8a806346d443394d9b214fa3fc462b8c9 | 1,872 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/ssd1325_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/ssd1325_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/ssd1325_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
This test will initialize the display using displayio and draw a solid white
background, a smaller black rectangle, and some white text.
"""
import board
import displayio
import terminalio
from adafruit_display_text impo... | 25.643836 | 82 | 0.762821 |
7461d12ccfc4de960282d44a2585a0923ad77e15 | 9,689 | py | Python | sog/test/test_magic.py | jnewblanc/sog | ed1ae5bd409bc3e64f204ed3180a5f06f28db731 | [
"CC0-1.0"
] | 1 | 2022-02-03T05:44:57.000Z | 2022-02-03T05:44:57.000Z | sog/test/test_magic.py | jnewblanc/sog | ed1ae5bd409bc3e64f204ed3180a5f06f28db731 | [
"CC0-1.0"
] | 1 | 2020-10-17T01:14:33.000Z | 2020-10-17T01:14:33.000Z | sog/test/test_magic.py | jnewblanc/sog | ed1ae5bd409bc3e64f204ed3180a5f06f28db731 | [
"CC0-1.0"
] | null | null | null | """ test_magic """ # noqa
# import re
import unittest
# from common.general import logger
import character
from common.testLib import TestGameBase
import creature
import object
import room
import magic
class TestMagic(TestGameBase):
characterClasses = character.Character.classList
testCreatureNumber = 9999... | 34.978339 | 77 | 0.460006 |
74620bf65c57eab863be58db94679275362ec1cd | 2,423 | py | Python | src/devops_menu/entity/menu.py | rubelw/devops_menu | 38a8eadb26c5ac90a201fd3af0d09d5165ed8249 | [
"Apache-2.0"
] | null | null | null | src/devops_menu/entity/menu.py | rubelw/devops_menu | 38a8eadb26c5ac90a201fd3af0d09d5165ed8249 | [
"Apache-2.0"
] | null | null | null | src/devops_menu/entity/menu.py | rubelw/devops_menu | 38a8eadb26c5ac90a201fd3af0d09d5165ed8249 | [
"Apache-2.0"
] | null | null | null | from __future__ import division, print_function, absolute_import, unicode_literals
import six
from devops_menu.commons.string import to_unicode
from devops_menu.commons.collection import get_single_item
from devops_menu.commons.types import *
from devops_menu.entity import Meta, Item
import inspect
DEBUG=0
class M... | 32.743243 | 112 | 0.609575 |
74621d26852e556191171fb42fe2580709c5d171 | 3,279 | py | Python | visualization/analyze_variants.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | visualization/analyze_variants.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | visualization/analyze_variants.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | """
This script generates a bunch of plots that show
Final `ylabel` vs variant
Usage:
```
$ python analyze_variants.py path/to/data/folder --ylabel="AverageReturn"
```
"""
import argparse
from collections import defaultdict
import matplotlib.pyplot as plt
import numpy as np
from rlkit.misc.data_processing impor... | 29.540541 | 80 | 0.645624 |
7462362c25544d0136ce17745e3af2157065d8c7 | 12,351 | py | Python | pypeit/spectrographs/p200_tspec.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 107 | 2018-08-06T07:07:20.000Z | 2022-02-28T14:33:42.000Z | pypeit/spectrographs/p200_tspec.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 889 | 2018-07-26T12:14:33.000Z | 2022-03-18T22:49:42.000Z | pypeit/spectrographs/p200_tspec.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 74 | 2018-09-25T17:03:07.000Z | 2022-03-10T23:59:24.000Z | """
Module for P200/Triplespec specific methods.
.. include:: ../include/links.rst
"""
import os
from pkg_resources import resource_filename
import numpy as np
from astropy.time import Time
from pypeit import msgs
from pypeit import telescopes
from pypeit.core import framematch
from pypeit.spectrographs import spec... | 36.758929 | 97 | 0.576229 |
746260866e53f25b92767a1367b26d429578f9a3 | 14,805 | py | Python | tests/test_regressions.py | shh-dlce/python-nexus | 5e5ed8d53fe394f2685b3c87253e8f498c5a6191 | [
"BSD-2-Clause"
] | 1 | 2020-05-15T20:22:49.000Z | 2020-05-15T20:22:49.000Z | tests/test_regressions.py | shh-dlce/python-nexus | 5e5ed8d53fe394f2685b3c87253e8f498c5a6191 | [
"BSD-2-Clause"
] | 9 | 2020-02-19T08:35:28.000Z | 2020-05-11T11:30:13.000Z | tests/test_regressions.py | shh-dlce/python-nexus | 5e5ed8d53fe394f2685b3c87253e8f498c5a6191 | [
"BSD-2-Clause"
] | null | null | null | """Regression Tests"""
import os
import re
import warnings
import pytest
from nexus.reader import NexusReader
from nexus.handlers.data import DataHandler
from nexus.exceptions import TranslateTableException
@pytest.fixture
def bad_chars(regression):
return NexusReader(regression / 'bad_chars_in_taxaname.trees')
... | 31.702355 | 91 | 0.679433 |
746270655cdc524541d34c86c8ae9564245b0ae6 | 6,908 | py | Python | custom_components/homeconnect/switch.py | holnburger/homeassistant-homeconnect | f54fb17a1487e6cff086b1d4fad9de57ed5f4476 | [
"MIT"
] | null | null | null | custom_components/homeconnect/switch.py | holnburger/homeassistant-homeconnect | f54fb17a1487e6cff086b1d4fad9de57ed5f4476 | [
"MIT"
] | null | null | null | custom_components/homeconnect/switch.py | holnburger/homeassistant-homeconnect | f54fb17a1487e6cff086b1d4fad9de57ed5f4476 | [
"MIT"
] | null | null | null | """
Provides a binary sensor for Home Connect
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.homeconnect/
"""
import logging
import re
from homeassistant.components.switch import SwitchDevice
from homeconnect.api import HomeConnectError
f... | 36.167539 | 120 | 0.615518 |
74627dcb1b73e965b47ea897e181c15b42c1861d | 431 | py | Python | oscar/lib/python2.7/site-packages/pytest_django/django_compat.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pytest_django/django_compat.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pytest_django/django_compat.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Note that all functions here assume django is available. So ensure
# this is the case before you call them.
def is_django_unittest(request_or_item):
"""Returns True if the request_or_item is a Django test case, otherwise False"""
from django.test import SimpleTestCase
cls = getattr(request_or_... | 28.733333 | 85 | 0.705336 |
74627e5067d356a523e844831a42bde63cf60324 | 495 | py | Python | databaseInteractions/tabToSql.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | databaseInteractions/tabToSql.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | databaseInteractions/tabToSql.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | #!/usr/bin/python
'''
1. fname
2. table name
3. a random column name (for skipping duplicates)
'''
from sys import argv
try:
f = open(argv[1], 'r')
table = argv[2]
col = argv[3]
except:
exit(__doc__)
for l in f:
segs = l.rstrip().split("\t")
reformatted = '"' + '","'.join(segs) + '"'
r... | 19.8 | 73 | 0.577778 |
7462b21b5eab800d0df01db1e8c95ea7e8b2ba10 | 1,968 | py | Python | contrib/opencensus-ext-pyramid/setup.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | null | null | null | contrib/opencensus-ext-pyramid/setup.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | null | null | null | contrib/opencensus-ext-pyramid/setup.py | samn/opencensus-python | d8709f141b67f7f5ba011c440b8ba8fb9cbc419a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, OpenCensus Authors
#
# 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 w... | 37.846154 | 127 | 0.675813 |
7462b35056d0bfd029b7bdc7a86912bfbb3055a5 | 2,810 | py | Python | code/pyner/features/pos.py | jadielam/ontology-ner | 2382c7193fb448bd268965d7c94e14f596134a18 | [
"MIT"
] | null | null | null | code/pyner/features/pos.py | jadielam/ontology-ner | 2382c7193fb448bd268965d7c94e14f596134a18 | [
"MIT"
] | null | null | null | code/pyner/features/pos.py | jadielam/ontology-ner | 2382c7193fb448bd268965d7c94e14f596134a18 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Class that wraps the Stanford POS tagger."""
from __future__ import absolute_import, division, print_function, unicode_literals
import nltk
import shelve
import random
class PosTagger(object):
"""Class that wraps the Stanford POS tagger.
This class uses a shelve cache to store genera... | 39.027778 | 92 | 0.600712 |
7462c8b46acc4f75a8de6358afa377668d2813a1 | 496 | py | Python | calcpi/algorithms/regular_polygon/__init__.py | gnkm/calc-pi | 1614760e0b465ec6e35c34e03b71d7afe6266bb2 | [
"MIT"
] | null | null | null | calcpi/algorithms/regular_polygon/__init__.py | gnkm/calc-pi | 1614760e0b465ec6e35c34e03b71d7afe6266bb2 | [
"MIT"
] | 22 | 2021-05-09T02:08:21.000Z | 2021-06-26T13:12:46.000Z | calcpi/algorithms/regular_polygon/__init__.py | gnkm/calc-pi | 1614760e0b465ec6e35c34e03b71d7afe6266bb2 | [
"MIT"
] | null | null | null | """Find the pi using the perimeter of a regular polygon inscribed in a circle.
"""
import math
from mpmath import (
cos,
mp,
mpf,
sqrt,
radians,
)
def pi(accuracy: int) -> mpf: # pylint: disable=invalid-name
"""Return Pi gotten by Monte Carlo method.
Args:
accuracy (int): accurac... | 18.37037 | 78 | 0.582661 |
7462e08a4765a458b40bba79234c7176d5e04e21 | 5,757 | py | Python | experiments/steven/online-vae/reacher/reacher.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven/online-vae/reacher/reacher.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven/online-vae/reacher/reacher.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import init_sawyer_camera_v1, init_sawyer_camera_v3
from rlkit.envs.mujoco.sawyer_push_and_reach_env import (
SawyerPushAndReachXYEasyEnv
)
from rlkit.images.camera import (
sawyer_init_camera_zoomed_in_fixed,
sawyer_init_camera_zo... | 37.141935 | 157 | 0.56453 |
7462e35e3432c528acff45bd43f96ae9ed047591 | 9,771 | py | Python | mvqag/experiments/abnormality/sysu_baseline.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | mvqag/experiments/abnormality/sysu_baseline.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | mvqag/experiments/abnormality/sysu_baseline.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torchvision as tv
import torchvision.transforms as T
import pandas as pd
from PIL import Image
from pathlib import Path
from mvqag import CNF_PATH
from mvqag.utils import load_yaml, get_recent_githash, load_qa_file
from mvqag.data import VQADataset, DataLoaders
from mvqag.model... | 34.164336 | 81 | 0.556954 |
7462e6acf3f96a3eca0ec51faac411ba91483f07 | 1,126 | py | Python | post_processing/unused/word_2_ID.py | tuili/PAr142 | 8ccc538469350d99480a65664d8665d63aa97f27 | [
"Apache-2.0"
] | null | null | null | post_processing/unused/word_2_ID.py | tuili/PAr142 | 8ccc538469350d99480a65664d8665d63aa97f27 | [
"Apache-2.0"
] | null | null | null | post_processing/unused/word_2_ID.py | tuili/PAr142 | 8ccc538469350d99480a65664d8665d63aa97f27 | [
"Apache-2.0"
] | 1 | 2019-03-02T11:55:37.000Z | 2019-03-02T11:55:37.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 7 16:51:12 2017
@author: thomas
"""
from __future__ import print_function
import re
import operator
import pickle
import numpy as np
def initialize():
""" Return the list of words, whose indexes are their ID.
"""
# Read and find couples (word ID, word).
... | 22.979592 | 79 | 0.634103 |
7462f13f6b152236ebb4b4897986d5704a02a1c5 | 5,530 | py | Python | app.py | Riger73/SQL-parts-list-broker | 0885229dfa4cde2f7f762cd9b97a50700170f3b7 | [
"Apache-2.0"
] | null | null | null | app.py | Riger73/SQL-parts-list-broker | 0885229dfa4cde2f7f762cd9b97a50700170f3b7 | [
"Apache-2.0"
] | null | null | null | app.py | Riger73/SQL-parts-list-broker | 0885229dfa4cde2f7f762cd9b97a50700170f3b7 | [
"Apache-2.0"
] | null | null | null | import requests
import re
import os
import sys
import shutil
import time
import pyodbc
from os.path import basename
from zipfile import ZipFile
from flask import Flask
app = Flask(__name__)
''' Setup variables '''
''' Set up SQL connection String '''
details = {
'server' : '192.168.1.x... | 32.916667 | 127 | 0.620434 |
7462fb7bf64a8f4181ced6c4fb74cdd978a6d338 | 4,052 | py | Python | alipay/aop/api/request/AlipayPcreditHuabeiEnterpriseReimburseSyncRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayPcreditHuabeiEnterpriseReimburseSyncRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayPcreditHuabeiEnterpriseReimburseSyncRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayPcreditHuabeiEnterpriseReimburseSyncModel import AlipayPcreditHuabeiEnterpriseReimburseSyncModel
class AlipayPcreditHuabeiEnte... | 27.944828 | 148 | 0.65153 |
74631b4448a0f19d8618d4b4f9d11612e8ec3927 | 2,586 | py | Python | satisfactory_monitoring/__main__.py | samuel-flynn/satisfactory-monitoring | 53958e004d7b91cd8ab30475f1186753f2a41246 | [
"MIT"
] | null | null | null | satisfactory_monitoring/__main__.py | samuel-flynn/satisfactory-monitoring | 53958e004d7b91cd8ab30475f1186753f2a41246 | [
"MIT"
] | null | null | null | satisfactory_monitoring/__main__.py | samuel-flynn/satisfactory-monitoring | 53958e004d7b91cd8ab30475f1186753f2a41246 | [
"MIT"
] | null | null | null | import asyncio
import os
import re
from satisfactory_monitoring.alert_actions.discord_alert_action import \
discord_alert_action
from satisfactory_monitoring.alert_actions.log_alert_action import \
log_alert_action
from satisfactory_monitoring.alert_processors.default_alert_processor import \
default_alert... | 45.368421 | 199 | 0.797757 |
746327e5e0eeea469895271203634ec6e55c47d0 | 1,615 | py | Python | varnish/datadog_checks/varnish/config_models/instance.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | 1 | 2021-06-06T23:49:17.000Z | 2021-06-06T23:49:17.000Z | varnish/datadog_checks/varnish/config_models/instance.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | varnish/datadog_checks/varnish/config_models/instance.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from __future__ import annotations
from typing import Optional, Sequence
from pydantic import BaseModel, root_validator, validator
from datadog_checks.base.utils.functions import identity
from datadog_c... | 30.471698 | 110 | 0.718266 |
7463548996ae77a0322c7673602bca15f3a248d9 | 9,489 | py | Python | Experiments/all.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | Experiments/all.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | Experiments/all.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | import os
from collections import defaultdict
import torch.nn.functional
import numpy as np
import torch
from matplotlib import pyplot as plt
from torchvision import utils as vutils
from tqdm import tqdm
from GenerativeModels import models
from GenerativeModels.config import default_config
from GenerativeModels.model... | 43.728111 | 160 | 0.62799 |
74635f2dcacf3b98d7ae05b099e7290450066fde | 57,740 | py | Python | sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 44.449577 | 120 | 0.670956 |
746360e53c05a993e158f02aee1d862aebe910b3 | 2,059 | py | Python | b_cfn_twilio/cfn_workspace/source/main/index.py | Biomapas/B.CfnTwilio | a0849f940c34531d4af467ef56a5bd516a6e2540 | [
"Apache-2.0"
] | null | null | null | b_cfn_twilio/cfn_workspace/source/main/index.py | Biomapas/B.CfnTwilio | a0849f940c34531d4af467ef56a5bd516a6e2540 | [
"Apache-2.0"
] | null | null | null | b_cfn_twilio/cfn_workspace/source/main/index.py | Biomapas/B.CfnTwilio | a0849f940c34531d4af467ef56a5bd516a6e2540 | [
"Apache-2.0"
] | 1 | 2021-12-20T08:37:09.000Z | 2021-12-20T08:37:09.000Z | import json
import logging
from typing import Dict, Any, Tuple, Optional
import boto3
import botocore
import twilio
from b_aws_cf_response.cfresponse import CfResponse
from botocore.exceptions import ClientError
from .action import Action
logger = logging.getLogger()
logger.setLevel(logging.INFO)
logger.info(f'Vers... | 30.279412 | 97 | 0.704225 |
74639a2ba6284643f43d54af86f2fa882b898a05 | 25,861 | py | Python | qcodes/instrument_drivers/Keysight/Infiniium.py | liangosc/Qcodes | 0f0a59fa4953e3ef44031e94459d1ff661f26473 | [
"MIT"
] | null | null | null | qcodes/instrument_drivers/Keysight/Infiniium.py | liangosc/Qcodes | 0f0a59fa4953e3ef44031e94459d1ff661f26473 | [
"MIT"
] | 230 | 2020-08-17T06:08:33.000Z | 2022-03-29T12:06:58.000Z | qcodes/instrument_drivers/Keysight/Infiniium.py | liangosc/Qcodes | 0f0a59fa4953e3ef44031e94459d1ff661f26473 | [
"MIT"
] | null | null | null | import logging
from typing import Dict, Callable, Optional, Sequence, Any
from functools import partial
import numpy as np
from qcodes import VisaInstrument, validators as vals
from qcodes import InstrumentChannel, ChannelList, Instrument
from qcodes import ArrayParameter
from qcodes.utils.validators import Enum, Num... | 40.598116 | 88 | 0.47446 |
74639f854b5b2a370643880af0ecaebd5439f53e | 13,410 | py | Python | libs/stats/odc/stats/tasks.py | tahvane1/odc-tools | 1f11133dc243d8e47060add1c95a3719135895c3 | [
"Apache-2.0"
] | null | null | null | libs/stats/odc/stats/tasks.py | tahvane1/odc-tools | 1f11133dc243d8e47060add1c95a3719135895c3 | [
"Apache-2.0"
] | null | null | null | libs/stats/odc/stats/tasks.py | tahvane1/odc-tools | 1f11133dc243d8e47060add1c95a3719135895c3 | [
"Apache-2.0"
] | null | null | null | from typing import Optional, Tuple, Union, Callable, Any, Dict, List, Iterable, Iterator
from types import SimpleNamespace
from collections import namedtuple
from datetime import datetime
import pickle
import json
import os
from tqdm.auto import tqdm
from odc.dscache import DatasetCache
from datacube import Datacube
f... | 33.275434 | 105 | 0.597912 |
7463b9ac201f62cff70ccdf6e1dd608e056f7de8 | 35,508 | py | Python | mypy/fastparse.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | null | null | null | mypy/fastparse.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | null | null | null | mypy/fastparse.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | null | null | null | from functools import wraps
import sys
from typing import Tuple, Union, TypeVar, Callable, Sequence, Optional, Any, cast, List
from mypy.nodes import (
MypyFile, Node, ImportBase, Import, ImportAll, ImportFrom, FuncDef, OverloadedFuncDef,
ClassDef, Decorator, Block, Var, OperatorAssignmentStmt,
ExpressionS... | 38.428571 | 99 | 0.598429 |
74641fd994910a669b17a92fada3cc7b150f229b | 11,072 | py | Python | datasets/mmdet_tusimple/mmdet/core/bbox/assigners/min_dis_assigner.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 13 | 2021-10-15T15:14:45.000Z | 2022-03-09T00:22:55.000Z | datasets/mmdet_tusimple/mmdet/core/bbox/assigners/min_dis_assigner-Copy1.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 4 | 2021-10-17T09:04:20.000Z | 2022-03-25T06:43:00.000Z | datasets/mmdet_tusimple/mmdet/core/bbox/assigners/min_dis_assigner-Copy1.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 2 | 2021-11-17T11:31:35.000Z | 2021-11-29T06:50:35.000Z | import torch
from ..builder import BBOX_ASSIGNERS
from ..iou_calculators import build_iou_calculator
from .assign_result_min import AssignResultMin
from .base_assigner import BaseAssigner
@BBOX_ASSIGNERS.register_module()
class MinDisAssigner(BaseAssigner):
"""Assign a corresponding gt bbox or background to each... | 47.519313 | 113 | 0.606936 |
74647c49aa21ebf23e4c378bd1559776b1ce669a | 17,603 | py | Python | high_order_layers_torch/FunctionalConvolution.py | jloveric/functional-layers | 5ca4efbf842f290b62ad4cc2c0045438402f71b8 | [
"MIT"
] | null | null | null | high_order_layers_torch/FunctionalConvolution.py | jloveric/functional-layers | 5ca4efbf842f290b62ad4cc2c0045438402f71b8 | [
"MIT"
] | null | null | null | high_order_layers_torch/FunctionalConvolution.py | jloveric/functional-layers | 5ca4efbf842f290b62ad4cc2c0045438402f71b8 | [
"MIT"
] | null | null | null | from .LagrangePolynomial import LagrangeExpand
from pytorch_lightning import LightningModule, Trainer
from typing import Optional, Union, Any
from high_order_layers_torch.PolynomialLayers import *
from torch.nn import Conv1d, Conv2d, Conv3d
import torch.nn as nn
import torch
from .utils import *
from abc import ABC
imp... | 31.433929 | 134 | 0.583764 |
7464c868cd8fa5397f8b7d78d500f8b88f8fd863 | 316 | py | Python | moonrock/sites/py3us/pages/BasePage.py | ToyokoLabs/moonrock | abd5de575713796d9b19a48fa447cdd7cef520cc | [
"BSD-2-Clause"
] | null | null | null | moonrock/sites/py3us/pages/BasePage.py | ToyokoLabs/moonrock | abd5de575713796d9b19a48fa447cdd7cef520cc | [
"BSD-2-Clause"
] | null | null | null | moonrock/sites/py3us/pages/BasePage.py | ToyokoLabs/moonrock | abd5de575713796d9b19a48fa447cdd7cef520cc | [
"BSD-2-Clause"
] | null | null | null | import time
class LocatorMode:
ID = "id"
NAME = "name"
XPATH = "xpath"
CSS_SELECTOR = "cssSelector"
class BasePage:
def __init__(self, driver, url=None):
self.driver = driver
@property
def body_root(self):
return self.driver.find_element_by_tag_name('body')
| 15.8 | 59 | 0.620253 |
7464f9d7ba16a674a5cf1808053d0ff8e7aa881c | 697 | py | Python | tests/commands/clean_test.py | bukzor/pre-commit | 7d546c1f815a41f17af276e2f8d0636efdd87a6d | [
"MIT"
] | null | null | null | tests/commands/clean_test.py | bukzor/pre-commit | 7d546c1f815a41f17af276e2f8d0636efdd87a6d | [
"MIT"
] | null | null | null | tests/commands/clean_test.py | bukzor/pre-commit | 7d546c1f815a41f17af276e2f8d0636efdd87a6d | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import os.path
import shutil
from pre_commit.commands.clean import clean
def test_clean(runner_with_mocked_store):
assert os.path.exists(runner_with_mocked_store.store.directory)
clean(runner_with_mocked_store)
assert not os.path.exists(runner_with_mocked_store.st... | 33.190476 | 71 | 0.816356 |
7465167f8857c0a592537ee4c76e2f6cc8fc1921 | 604 | py | Python | var/spack/repos/builtin/packages/libbeato/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/libbeato/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/libbeato/package.py | joequant/spack | e028ee0d5903045e1cdeb57550cbff61f2ffb2fa | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Libbeato(AutotoolsPackage):
"""libbeato is a C library containing routines for various use... | 33.555556 | 80 | 0.731788 |
74651e7446cdf0d5f14eee18bb97d082200f7977 | 3,571 | py | Python | tensorflow/examples/get_started/regression/linear_regression.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/examples/get_started/regression/linear_regression.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/examples/get_started/regression/linear_regression.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.373832 | 80 | 0.688323 |
746529354995006590213408328cda5f181c805f | 1,800 | py | Python | launch_system_modes/launch_system_modes/events/change_mode.py | micro-ROS/system_modes | d62e24c2d27287bcd3996f553106eb5e9508c1ad | [
"Apache-2.0"
] | 19 | 2019-05-10T15:54:34.000Z | 2021-09-29T16:33:19.000Z | launch_system_modes/launch_system_modes/events/change_mode.py | micro-ROS/system_modes | d62e24c2d27287bcd3996f553106eb5e9508c1ad | [
"Apache-2.0"
] | 60 | 2019-05-06T13:24:47.000Z | 2022-03-10T08:05:52.000Z | launch_system_modes/launch_system_modes/events/change_mode.py | micro-ROS/system_modes | d62e24c2d27287bcd3996f553106eb5e9508c1ad | [
"Apache-2.0"
] | 6 | 2019-05-02T08:24:08.000Z | 2020-07-09T23:02:32.000Z | # Copyright 2021 Robert Bosch GmbH
#
# 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 wri... | 31.578947 | 84 | 0.688889 |
74653a0bb77aebd4169542a9e25935743b5e8f31 | 12,356 | py | Python | ProGED/equation_discoverer.py | smeznar/ProGED | 191cfd2b7b1fece819109a4b61e3f7533332fd74 | [
"BSD-3-Clause"
] | null | null | null | ProGED/equation_discoverer.py | smeznar/ProGED | 191cfd2b7b1fece819109a4b61e3f7533332fd74 | [
"BSD-3-Clause"
] | null | null | null | ProGED/equation_discoverer.py | smeznar/ProGED | 191cfd2b7b1fece819109a4b61e3f7533332fd74 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import numpy as np
from ProGED.generate import generate_models
from ProGED.parameter_estimation import fit_models
from ProGED.generators.base_generator import BaseExpressionGenerator
from ProGED.generators.grammar_construction import grammar_from_template
from ProGED.task import ED... | 50.639344 | 145 | 0.612982 |
7465451bee89175cafcc5d501f7a32ec02e62dc6 | 51,045 | py | Python | editortools/nbtexplorer.py | skinny121/MCEdit-TallWorlds | e43fe889fde0ce41652ab77d7887a2a680846312 | [
"0BSD"
] | 5 | 2015-05-18T06:22:54.000Z | 2020-08-04T08:27:02.000Z | editortools/nbtexplorer.py | skinny121/MCEdit-TallWorlds | e43fe889fde0ce41652ab77d7887a2a680846312 | [
"0BSD"
] | null | null | null | editortools/nbtexplorer.py | skinny121/MCEdit-TallWorlds | e43fe889fde0ce41652ab77d7887a2a680846312 | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
#
# nbtexplorer.py
#
# D.C.-G. (LaChal) 2014
#
# Display NBT structure
#
#
# TODO:
# * add local undo/redo for loaded NBT files
# * change/optimize the undo/redo when edit level NBT data
# * add a style editor and an image wrapper for the bullets
from pygame import key, draw, image, Rect, event,... | 40.479778 | 212 | 0.550534 |
746550e2756abf62b538788f064f34da03bb8b22 | 1,947 | py | Python | portal/apps/core/management/commands/sync_article_views.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | null | null | null | portal/apps/core/management/commands/sync_article_views.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | null | null | null | portal/apps/core/management/commands/sync_article_views.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# utopia-cms 2020,2021. Aníbal Pacheco.
from django.core.management import BaseCommand
from django.core.cache import cache
from django.db import connection
from apps import core_articlevisits_mdb
from core.models import Article
class Command(BaseCommand):
help = "Sync article views and re... | 39.734694 | 108 | 0.55624 |
7465524e7f1f0b846d156e0356948dd05576f1df | 5,336 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 may ... | 38.948905 | 133 | 0.659483 |
74655fb3a9d2219aac2a61daad34fdfeacf072d1 | 36,735 | py | Python | letsencrypt/storage.py | mrudtf/letsencrypt | 6a7b4a8e142eb392a8fe696d9536b52c0fc4b5e3 | [
"Apache-2.0"
] | null | null | null | letsencrypt/storage.py | mrudtf/letsencrypt | 6a7b4a8e142eb392a8fe696d9536b52c0fc4b5e3 | [
"Apache-2.0"
] | null | null | null | letsencrypt/storage.py | mrudtf/letsencrypt | 6a7b4a8e142eb392a8fe696d9536b52c0fc4b5e3 | [
"Apache-2.0"
] | null | null | null | """Renewable certificates storage."""
import datetime
import logging
import os
import re
import configobj
import parsedatetime
import pytz
from letsencrypt import constants
from letsencrypt import crypto_util
from letsencrypt import errors
from letsencrypt import error_handler
from letsencrypt import le_util
logger ... | 41.228956 | 91 | 0.632612 |
7465661a42ab2868c3a67987e6bc8af3f1e73ca9 | 13,666 | py | Python | deeppavlov/evolve.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-05-22T08:34:33.000Z | 2019-05-22T08:34:33.000Z | deeppavlov/evolve.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | null | null | null | deeppavlov/evolve.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-03-17T13:47:44.000Z | 2019-03-17T13:47:44.000Z | """
Copyright 2017 Neural Networks and Deep Learning lab, MIPT
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | 46.168919 | 115 | 0.620445 |
7465afabe6fc9edce1d951d4242ccd25899d116c | 1,503 | py | Python | pyOCD/flash/flash_cortex_m.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | 2 | 2019-07-18T06:51:27.000Z | 2021-06-30T00:36:12.000Z | pyOCD/flash/flash_cortex_m.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | null | null | null | pyOCD/flash/flash_cortex_m.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | 1 | 2017-07-20T20:47:18.000Z | 2017-07-20T20:47:18.000Z | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2013 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable ... | 33.4 | 74 | 0.737858 |
7465c9d5bf0864b49afabe0df9bd738db8d31bbb | 12,779 | py | Python | armi/reactor/assemblyParameters.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/reactor/assemblyParameters.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/reactor/assemblyParameters.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 TerraPower, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 33.717678 | 129 | 0.57391 |
7465e367101ee0a2a9cb2e28485505d28f4435ce | 1,041 | py | Python | setup.py | ikamensh/pennpaper | 82c8a7a55a2407ed44d095036ed4ae8f2d004b04 | [
"MIT"
] | 2 | 2019-10-11T16:15:20.000Z | 2019-10-18T18:36:00.000Z | setup.py | ikamensh/ilya_ezplot | 82c8a7a55a2407ed44d095036ed4ae8f2d004b04 | [
"MIT"
] | 4 | 2019-06-21T13:12:07.000Z | 2019-08-28T12:02:24.000Z | setup.py | ikamensh/ilya_ezplot | 82c8a7a55a2407ed44d095036ed4ae8f2d004b04 | [
"MIT"
] | 1 | 2020-04-16T08:04:32.000Z | 2020-04-16T08:04:32.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
def get_requirements():
with open("requirements.txt") as fp:
return fp.read()
setuptools.setup(
name="pennpaper",
version="0.15",
author="Ilya Kamenshchikov",
author_email="ikamenshchikov@gmail.com",
... | 31.545455 | 89 | 0.646494 |
7465f3719cd0506edec64ecd63227c262decf0b9 | 1,746 | py | Python | lambdata/lambdata_mherbert93.py | mherbert93/ds-unit-3-sprint-1 | 2840c08dbf94881926c46cdddbdcd972307344a7 | [
"MIT"
] | null | null | null | lambdata/lambdata_mherbert93.py | mherbert93/ds-unit-3-sprint-1 | 2840c08dbf94881926c46cdddbdcd972307344a7 | [
"MIT"
] | null | null | null | lambdata/lambdata_mherbert93.py | mherbert93/ds-unit-3-sprint-1 | 2840c08dbf94881926c46cdddbdcd972307344a7 | [
"MIT"
] | null | null | null | class Baseline:
"""
Base class which contains the methods mae() and accuracy()
Parameters
----------
dataframe: Expects pandas.DataFrame
target: Column of the target(y-variable)
"""
def __init__(self, dataframe, target):
self.dataframe = dataframe
self.target = target
def mae(self):
""... | 27.714286 | 89 | 0.605384 |
746605ee9fec72e248001d954c35e8d995086271 | 12,318 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/tests/16/train_0_0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/tests/16/train_0_0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/tests/16/train_0_0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="1"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa
from tqdm import tqdm
import PIL
from PIL import Image... | 36.770149 | 142 | 0.670888 |
74660d8f54af6dc2bf0a2e280ade50191a78f7dd | 969 | py | Python | Revisao2/Ex2pessoa.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | Revisao2/Ex2pessoa.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | Revisao2/Ex2pessoa.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | # Crie uma classe pessoa contem 3 atributos e 7 metodos
class Pessoa:
def __init__(self, nome:str, sobrenome:str, idade:int) -> None:
self.__nome = input('seu nome: ')
self.__sobrenome = input('seu sobrenome: ')
self.__idade = 0
if type(nome) == str:
self.__nome = nome
... | 24.846154 | 67 | 0.598555 |
74661586a7c2d2a46772afb2ae25dd8cca67e132 | 5,901 | py | Python | PythonProjects/99-CapstoneProject-202020b/labs/lab2_arm_and_claw.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/99-CapstoneProject-202020b/labs/lab2_arm_and_claw.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/99-CapstoneProject-202020b/labs/lab2_arm_and_claw.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | """
Capstone Team Project. Code to run on a ROBOT (NOT a laptop).
This module is for testing STAND-ALONE code running on the ROBOT
(WITHOUT having LAPTOP GUI code running on the LAPTOP at the same time).
Authors: Your professors (for the framework) and PUT_YOUR_NAME_HERE.
Winter term, 2019-2020.
"""
# TODO: 1. Put... | 39.604027 | 88 | 0.455685 |
746618e12cd233fd1b37df58732405bb0da8332c | 4,942 | py | Python | tests/test_numfoil/test_geometry/test_geom2d.py | skilkis/numfoil | d7f33fa36857775543ebe27db9a6cc81f18d1b0b | [
"Apache-2.0"
] | 1 | 2020-11-08T01:33:10.000Z | 2020-11-08T01:33:10.000Z | tests/test_numfoil/test_geometry/test_geom2d.py | skilkis/numfoil | d7f33fa36857775543ebe27db9a6cc81f18d1b0b | [
"Apache-2.0"
] | 10 | 2020-11-26T16:17:19.000Z | 2021-06-13T22:29:23.000Z | tests/test_numfoil/test_geometry/test_geom2d.py | skilkis/numfoil | d7f33fa36857775543ebe27db9a6cc81f18d1b0b | [
"Apache-2.0"
] | 1 | 2020-09-15T16:04:24.000Z | 2020-09-15T16:04:24.000Z | # Copyright 2020 Kilian Swannet, San Kilkis
# 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 ... | 32.728477 | 72 | 0.60259 |
746619a6a849adbe2d1882d78738cab276e7ead2 | 436 | py | Python | test/user/test_user_service.py | sotheara-leang/xFlask | b6899d4b6d1bdc4acfd812bfa8807e2cba7e8df0 | [
"MIT"
] | 2 | 2020-02-11T08:29:49.000Z | 2020-02-17T10:24:36.000Z | test/user/test_user_service.py | sotheara-leang/xFlask | b6899d4b6d1bdc4acfd812bfa8807e2cba7e8df0 | [
"MIT"
] | null | null | null | test/user/test_user_service.py | sotheara-leang/xFlask | b6899d4b6d1bdc4acfd812bfa8807e2cba7e8df0 | [
"MIT"
] | null | null | null | from main.service.user import UserService
from test.test_case import *
class TestServiceUser(TestCase):
def setUp(self):
super().setUp()
self.user_service = application.get_component(UserService)
def test_get(self):
user = self.user_service.get(43)
print('\n', user)
de... | 20.761905 | 66 | 0.658257 |
746648bd41effd846dbbbf9e3d15234eddc06ae1 | 1,784 | py | Python | source/waf/cadence_strmout.py | ahartel/brick | 9ad14f9d2912e70191f4711f359e3912c8cef837 | [
"BSD-3-Clause"
] | 1 | 2021-05-19T06:09:15.000Z | 2021-05-19T06:09:15.000Z | source/waf/cadence_strmout.py | ahartel/brick | 9ad14f9d2912e70191f4711f359e3912c8cef837 | [
"BSD-3-Clause"
] | null | null | null | source/waf/cadence_strmout.py | ahartel/brick | 9ad14f9d2912e70191f4711f359e3912c8cef837 | [
"BSD-3-Clause"
] | 1 | 2016-05-27T21:22:14.000Z | 2016-05-27T21:22:14.000Z | import os,re
from waflib import Task,Errors,Node,TaskGen,Configure,Node,Logs
from brick_general import ChattyBrickTask
def configure(conf):
conf.load('cadence_base')
"""This function gets called by waf upon loading of this module in a configure method"""
if not conf.env.BRICK_LOGFILES:
conf.env.BRICK_LOGFILES = ... | 34.307692 | 260 | 0.769619 |
74665358fe79499696ad6e5ad7faaf28e88cde69 | 2,244 | py | Python | owtf/api/jsend.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/api/jsend.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/api/jsend.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | import tornado.web
class JSendMixin(tornado.web.RequestHandler):
"""http://labs.omniti.com/labs/jsend
JSend is a specification that lays down some rules for how JSON
responses from web servers should be formatted.
JSend focuses on application-level (as opposed to protocol- or
transport-level) me... | 38.033898 | 79 | 0.632353 |
746664f0ac0e295a68f8164d80263dad08a3fe89 | 1,155 | py | Python | command_pod.py | povle/SP-SR2-converter | 7a675204e15b340deac2b98634805cdf75e6fd4a | [
"MIT"
] | 3 | 2021-01-09T20:11:31.000Z | 2022-03-31T02:05:52.000Z | command_pod.py | povle/SP-SR2-converter | 7a675204e15b340deac2b98634805cdf75e6fd4a | [
"MIT"
] | null | null | null | command_pod.py | povle/SP-SR2-converter | 7a675204e15b340deac2b98634805cdf75e6fd4a | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
command_pod = ET.Element('Part', {'id': '0', 'partType': 'CommandPod1', 'position': '0,0,0',
'rotation': '90,0,0', 'rootPart': 'true', 'commandPodId': '0', 'materials': '0,0,0,0,0'})
ET.SubElement(command_pod, 'Drag',
{
... | 48.125 | 123 | 0.520346 |
74666fdefb4887c39f93afa8000d5e9280837132 | 5,650 | py | Python | sketch/drawing/elements.py | shrredd/sketch | eebcd5077ae355f914bc77ac44d06410f9caa132 | [
"MIT",
"Unlicense"
] | 2 | 2018-10-22T12:43:51.000Z | 2018-12-02T02:41:55.000Z | sketch/drawing/elements.py | shrredd/sketch | eebcd5077ae355f914bc77ac44d06410f9caa132 | [
"MIT",
"Unlicense"
] | null | null | null | sketch/drawing/elements.py | shrredd/sketch | eebcd5077ae355f914bc77ac44d06410f9caa132 | [
"MIT",
"Unlicense"
] | null | null | null | from copy import (copy, deepcopy)
import cairocffi as cairo
import numpy as np
from sketch.drawing.geometry import (
rotation_matrix,
scaling_matrix,
translation_matrix
)
from sketch.drawing.surfaces import Surface
class Element:
"""
Base class for objects that can be transformed (rotated, trans... | 32.848837 | 80 | 0.609204 |
7466b40914ea49bfad04895f40ace895c263a691 | 52,089 | py | Python | unit_tests/payloads.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | null | null | null | unit_tests/payloads.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | null | null | null | unit_tests/payloads.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | 1 | 2021-04-11T05:24:47.000Z | 2021-04-11T05:24:47.000Z | simple_charge = {
"geometry": {
"type": "FeatureCollection",
"features": [
{
"geometry": {
"type": "Polygon",
"coordinates": [[[291267.338, 93516.097],
[291267.912, 93511.326],
... | 34.726 | 67 | 0.459924 |
7466c82376b34f29ce89d98f654a97fd4686a1b8 | 1,739 | py | Python | setup.py | nkrios/VMAttack | 67dcce6087163d85bbe7780e3f6e6e9e72e2212a | [
"MIT"
] | 724 | 2016-09-19T09:38:54.000Z | 2022-02-20T14:01:56.000Z | setup.py | 987432340/VMAttack | 23ba4614525d6f59c8f8fc6902c2c3ee1e05ee5d | [
"MIT"
] | 11 | 2016-10-21T02:05:42.000Z | 2021-06-20T09:35:41.000Z | setup.py | 987432340/VMAttack | 23ba4614525d6f59c8f8fc6902c2c3ee1e05ee5d | [
"MIT"
] | 173 | 2016-09-21T12:23:54.000Z | 2022-02-28T09:28:47.000Z | # coding=utf-8
__author__ = 'Anatoli Kalysch'
import pip
import sys
from os import getcwd, system, remove
from shutil import copyfile
def do(action, dependency):
return pip.main([action, dependency])
def usage():
print "Usage: python setup.py <install | uninstall>"
dependencies = ["distorm3", 'idacute']
... | 27.603175 | 101 | 0.588269 |
7466ccf6d6376529eaef47160b9ddb04565e2998 | 3,606 | py | Python | tests/test_widgetselector.py | TurboGears/sprox | 98bd4808d7fa8debe1cc5511db745cf55cb7d67a | [
"MIT"
] | 3 | 2015-07-03T16:31:22.000Z | 2018-04-19T04:26:02.000Z | tests/test_widgetselector.py | TurboGears/sprox | 98bd4808d7fa8debe1cc5511db745cf55cb7d67a | [
"MIT"
] | 8 | 2015-02-23T23:01:50.000Z | 2021-07-06T14:10:26.000Z | tests/test_widgetselector.py | TurboGears/sprox | 98bd4808d7fa8debe1cc5511db745cf55cb7d67a | [
"MIT"
] | 7 | 2015-06-14T04:07:53.000Z | 2020-04-28T13:50:50.000Z | from nose.tools import raises, eq_
from sqlalchemy import Column, Integer
from sqlalchemy.types import *
from sqlalchemy.orm import class_mapper
from sprox.widgetselector import WidgetSelector, EntityDefWidget, EntityDefWidgetSelector, RecordFieldWidget, RecordViewWidgetSelector
from sprox.sa.widgetselector import SAW... | 30.559322 | 134 | 0.650028 |
7466d7a1a87aa0ed21dc2eb6ca710a15617d555a | 30,536 | py | Python | pandaharvester/harvestercore/queue_config_mapper.py | pavlo-svirin/harvester | 8210666dd3ee0ba346b37b32175332e52a16be63 | [
"Apache-2.0"
] | null | null | null | pandaharvester/harvestercore/queue_config_mapper.py | pavlo-svirin/harvester | 8210666dd3ee0ba346b37b32175332e52a16be63 | [
"Apache-2.0"
] | null | null | null | pandaharvester/harvestercore/queue_config_mapper.py | pavlo-svirin/harvester | 8210666dd3ee0ba346b37b32175332e52a16be63 | [
"Apache-2.0"
] | null | null | null | import os
import json
import copy
import time
import datetime
import threading
import importlib
import six
from future.utils import iteritems
try:
from json.decoder import JSONDecodeError
except ImportError:
JSONDecodeError = ValueError
from pandaharvester.harvesterconfig import harvester_config
from pandahar... | 46.266667 | 126 | 0.564252 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.