hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797257727bf5c6084e8d083135818f5355f8cc4a | 2,949 | py | Python | wobbles/sampling/prior_manager.py | dangilman/wobbles | 6719bfaabbbe475e4213fd5272375e381083c0b9 | [
"BSD-3-Clause"
] | null | null | null | wobbles/sampling/prior_manager.py | dangilman/wobbles | 6719bfaabbbe475e4213fd5272375e381083c0b9 | [
"BSD-3-Clause"
] | 2 | 2020-10-30T06:40:54.000Z | 2020-11-19T00:15:41.000Z | wobbles/sampling/prior_manager.py | dangilman/wobbles | 6719bfaabbbe475e4213fd5272375e381083c0b9 | [
"BSD-3-Clause"
] | 1 | 2020-09-14T15:03:52.000Z | 2020-09-14T15:03:52.000Z | from scipy.stats import multivariate_normal
import numpy as np
class PriorBase(object):
def __init__(self, param_prior):
"""
Format ['param_name', 'prior_type', [arg1, arg2], positive_definite_bool, under_hood_bool]
"""
self.param_prior = param_prior
def draw(self, param_p... | 29.19802 | 99 | 0.595456 |
7972579c3e0f9ee86f6bb090e13d0a4f8af30e67 | 21,540 | py | Python | cogs/music.py | Dakskihedron/snakebot | 5770aed8663df47a3182bdf56c4202b2874c056f | [
"MIT"
] | null | null | null | cogs/music.py | Dakskihedron/snakebot | 5770aed8663df47a3182bdf56c4202b2874c056f | [
"MIT"
] | null | null | null | cogs/music.py | Dakskihedron/snakebot | 5770aed8663df47a3182bdf56c4202b2874c056f | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
import asyncio
import functools
import itertools
import random
import youtube_dl
import async_timeout
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
class VoiceError(Exception):
... | 33.65625 | 140 | 0.547911 |
7972584cff814f666580e18cf851c56a4dffa778 | 132 | py | Python | conftest.py | jaraco/jaraco.video | a3195d42ee887fe276683dbea668a9e1365a5167 | [
"MIT"
] | 14 | 2019-02-18T18:10:54.000Z | 2022-02-03T00:51:12.000Z | conftest.py | jaraco/jaraco.video | a3195d42ee887fe276683dbea668a9e1365a5167 | [
"MIT"
] | 5 | 2016-01-13T03:53:03.000Z | 2021-03-15T01:25:21.000Z | conftest.py | jaraco/jaraco.video | a3195d42ee887fe276683dbea668a9e1365a5167 | [
"MIT"
] | 2 | 2019-10-20T21:18:52.000Z | 2020-09-01T06:46:36.000Z | import platform
collect_ignore_glob = (
[
'jaraco/video/*',
]
if platform.system() != 'Windows'
else []
)
| 12 | 37 | 0.537879 |
797258a0462cdb42ca24ed327bf9c7f27e19c606 | 3,093 | py | Python | custom_components/best_bottrop_garbage_collection/__init__.py | Nazze/ha_best_bottrop_garbage_collection | aa89f2bdf781d9702f208824d08195257a7a8198 | [
"MIT"
] | null | null | null | custom_components/best_bottrop_garbage_collection/__init__.py | Nazze/ha_best_bottrop_garbage_collection | aa89f2bdf781d9702f208824d08195257a7a8198 | [
"MIT"
] | null | null | null | custom_components/best_bottrop_garbage_collection/__init__.py | Nazze/ha_best_bottrop_garbage_collection | aa89f2bdf781d9702f208824d08195257a7a8198 | [
"MIT"
] | null | null | null | from homeassistant.const import Platform
import logging
from datetime import timedelta, date
from homeassistant import config_entries
from homeassistant.core import HomeAssistant
from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers.update_coordinator import (
DataUpdateCoordinator,
Co... | 31.242424 | 113 | 0.682509 |
7972597a29656fa61cc214674125af9ce1407a47 | 2,606 | py | Python | test/unit/models/test_resnet.py | megvii-research/basecls | 6b395a0a888370b4523764afb78a5a7634a3f6cd | [
"Apache-2.0"
] | 23 | 2021-12-08T02:35:01.000Z | 2022-03-16T02:23:19.000Z | test/unit/models/test_resnet.py | megvii-research/basecls | 6b395a0a888370b4523764afb78a5a7634a3f6cd | [
"Apache-2.0"
] | 4 | 2021-12-23T11:31:17.000Z | 2022-02-28T01:35:31.000Z | test/unit/models/test_resnet.py | megvii-research/basecls | 6b395a0a888370b4523764afb78a5a7634a3f6cd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
import megengine as mge
import megengine.module as M
import pytest
from basecls.models.regnet import RegBottleneckBlock
from basecls.models.resnet import (
AnyStage,
ResBasicBlock,
ResBottleneckBlock,
ResDeepStem,
Res... | 27.145833 | 95 | 0.654643 |
79725a0bf495b9b4c8f3e03553de7fca5ca41906 | 2,724 | py | Python | setup.py | sshleifer/TextBrewer | cdb8d123274efca2f7053e88b55c0fe73904423f | [
"Apache-2.0"
] | 1 | 2020-07-10T09:34:33.000Z | 2020-07-10T09:34:33.000Z | setup.py | huifengshiwu/TextBrewer | 153be24cf51ab07c9f09ca740ed92bbc552d1d68 | [
"Apache-2.0"
] | null | null | null | setup.py | huifengshiwu/TextBrewer | 153be24cf51ab07c9f09ca740ed92bbc552d1d68 | [
"Apache-2.0"
] | 1 | 2022-02-28T18:10:44.000Z | 2022-02-28T18:10:44.000Z | """
Simple check list from AllenNLP repo: https://github.com/allenai/allennlp/blob/master/setup.py
To create the package for pypi.
1. Change the version in __init__.py, setup.py as well as docs/source/conf.py.
2. Commit these changes with the message: "Release: VERSION"
3. Add a tag in git to mark the release: "git tag... | 41.907692 | 101 | 0.698972 |
79725a4b102bc07b2d1cacdd6f47941a4a2c9232 | 780 | py | Python | bot/rules/mentions.py | atmishra/bot | ad1a33e80152343a81eeeabf0117ced76b83e273 | [
"MIT"
] | 2 | 2021-08-03T20:23:01.000Z | 2021-08-04T14:43:39.000Z | bot/rules/mentions.py | Ezamey/bot | 0b7a1be1dd57a464fc79fcb235b79d75bec43f99 | [
"MIT",
"BSD-3-Clause"
] | 106 | 2020-06-07T21:16:17.000Z | 2021-03-13T12:46:44.000Z | bot/rules/mentions.py | Ezamey/bot | 0b7a1be1dd57a464fc79fcb235b79d75bec43f99 | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-04-15T17:29:49.000Z | 2021-04-15T17:29:49.000Z | from typing import Dict, Iterable, List, Optional, Tuple
from discord import Member, Message
async def apply(
last_message: Message, recent_messages: List[Message], config: Dict[str, int]
) -> Optional[Tuple[str, Iterable[Member], Iterable[Message]]]:
"""Detects total mentions exceeding the limit sent by a s... | 31.2 | 81 | 0.669231 |
79725b2f14069e5ed84990d066e65d61dcec7650 | 3,791 | py | Python | quick_start.py | zqthu/gnss-ftp-downloader | 8a91b1520fdfa71020353983876af97209be3d17 | [
"MIT"
] | 2 | 2020-10-21T11:44:31.000Z | 2021-03-16T04:41:03.000Z | quick_start.py | zqthu/gnss-ftp-downloader | 8a91b1520fdfa71020353983876af97209be3d17 | [
"MIT"
] | null | null | null | quick_start.py | zqthu/gnss-ftp-downloader | 8a91b1520fdfa71020353983876af97209be3d17 | [
"MIT"
] | 1 | 2021-06-06T02:31:49.000Z | 2021-06-06T02:31:49.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from ftp_downloader import downloader
from gtime import GTime, GT_list
def example_1():
"""
Example 1:A simple download
Result: cddis.gsfc.nasa.gov
/pub/gps/products/2086/igs20864.sp3.Z -> ./igs/igs20864.sp3.Z
/pub/gps/products/2086/igs20863.sp3.... | 36.104762 | 156 | 0.609865 |
79725c2509be805a5b4e0b2509e903a423ec3543 | 3,723 | py | Python | intersight/models/firmwareimc_wait_for_download_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/firmwareimc_wait_for_download_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/firmwareimc_wait_for_download_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class FirmwareimcWaitForDownloadRef(object):
"""
NO... | 24.82 | 82 | 0.555466 |
79725df1ff37fc147bb85f9d4fe1120ec97ae7f7 | 763 | py | Python | .gitbook/assets/prims.py | Bryan-Guner-Backup/Web-Dev-Hub-Docs-backup | 6c2daacb996a0424487af1ad2ebaa69f2200ea4b | [
"Apache-2.0"
] | 42 | 2021-04-29T13:54:43.000Z | 2022-02-04T22:55:02.000Z | algorithms/prims.py | travisjungroth/algo-drills | a365dc0c23361e4cc6e0bac27c8c84e2aae4fb47 | [
"MIT"
] | 14 | 2021-09-04T13:28:28.000Z | 2021-09-22T04:06:35.000Z | .gitbook/assets/prims.py | Bryan-Guner-Backup/Web-Dev-Hub-Docs-backup | 6c2daacb996a0424487af1ad2ebaa69f2200ea4b | [
"Apache-2.0"
] | 5 | 2021-04-29T15:57:25.000Z | 2021-09-08T10:53:06.000Z | """
ID: c3f603f7-26a5-44d3-9295-15dab653187d
Python Algorithms, Page 153
https://en.wikipedia.org/wiki/Prim%27s_algorithm
"""
from collections.abc import Mapping
from heapq import heappop, heappush
from typing import Optional
from src.typehints import Node
def prims(graph: Mapping[Node, Mapping[Node, int]], start: ... | 29.346154 | 95 | 0.68021 |
79725f8786a8b62582b813ce4d81483bf9617f2d | 2,397 | py | Python | test_problems/python/frac.py | VishalKandala/Cantera-1.7 | 750786f9b845a56fc177a9f1d5a9c5bb6ebd87cc | [
"BSD-3-Clause"
] | null | null | null | test_problems/python/frac.py | VishalKandala/Cantera-1.7 | 750786f9b845a56fc177a9f1d5a9c5bb6ebd87cc | [
"BSD-3-Clause"
] | null | null | null | test_problems/python/frac.py | VishalKandala/Cantera-1.7 | 750786f9b845a56fc177a9f1d5a9c5bb6ebd87cc | [
"BSD-3-Clause"
] | null | null | null | # This script is used to test handling of non-integral product
# stoichiometric coefficients. See file frac.cti for more information.
print 'testing handling of non-integral stoichiometric coefficients...'
from Cantera import *
gas = importPhase('frac.cti')
gas.set(T = 2000, P = OneAtm, X = 'H2O:1.0, OH:0.1, H... | 31.96 | 80 | 0.646224 |
79725fda326c1e2240768eb63583d12a97b45f1b | 3,220 | py | Python | api/controller.py | thevickypedia/Jarvis | 63e15bd6c3d5db3c45bb549cd33ec06fe4a521d9 | [
"MIT"
] | 59 | 2020-09-08T17:42:09.000Z | 2022-03-09T07:28:25.000Z | api/controller.py | thevickypedia/Jarvis | 63e15bd6c3d5db3c45bb549cd33ec06fe4a521d9 | [
"MIT"
] | 20 | 2020-10-26T16:10:43.000Z | 2022-03-23T17:38:38.000Z | api/controller.py | thevickypedia/Jarvis | 63e15bd6c3d5db3c45bb549cd33ec06fe4a521d9 | [
"MIT"
] | 20 | 2020-10-18T00:43:25.000Z | 2022-03-20T21:04:22.000Z | from hashlib import sha1
from sys import path
from uuid import UUID, uuid4
def offline_compatible() -> list:
"""Calls ``Keywords`` and ``Conversation`` classes to get the variables that are compatible.
See Also:
- ``offline_communicator`` cannot process commands that require an interaction with the u... | 35.777778 | 111 | 0.538199 |
7972607df875056d91eabf99c854785840e41c98 | 655 | py | Python | answers/Khushi/Day 30/Question 2.py | vishaljha2121/30-DaysOfCode-March-2021 | 27922819b4e0a3c1072822f8df22b7a0873fe72c | [
"MIT"
] | 22 | 2021-03-16T14:07:47.000Z | 2021-08-13T08:52:50.000Z | answers/Khushi/Day 30/Question 2.py | vishaljha2121/30-DaysOfCode-March-2021 | 27922819b4e0a3c1072822f8df22b7a0873fe72c | [
"MIT"
] | 174 | 2021-03-16T21:16:40.000Z | 2021-06-12T05:19:51.000Z | answers/Khushi/Day 30/Question 2.py | vishaljha2121/30-DaysOfCode-March-2021 | 27922819b4e0a3c1072822f8df22b7a0873fe72c | [
"MIT"
] | 135 | 2021-03-16T16:47:12.000Z | 2021-06-27T14:22:38.000Z | def findStr(s):
s=str(s)
subS=[s[i:j] for i in range(len(s)) for j in range(i+1,len(s)+1)]
subStr=[]
mCount=0
condition=True
for num in subS:
for digit in num:
if(digit=="4" or digit=="7"):
continue
else:
return -1
if(not n... | 22.586207 | 69 | 0.487023 |
7972612cd7d4af8c7f00acf820d4cce289742097 | 866 | py | Python | clients/client/python/test/test_plugin_device.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"Apache-2.0"
] | null | null | null | clients/client/python/test/test_plugin_device.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"Apache-2.0"
] | null | null | null | clients/client/python/test/test_plugin_device.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"Apache-2.0"
] | null | null | null | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.3
Contact: support@ory.sh
Generated by: http... | 23.405405 | 194 | 0.692841 |
7972615dc54cf91ef0481a51cf009971f5b1958f | 10,616 | py | Python | lib/room.py | MuffinAmor/nellie | eace65ac7d7d1730c131345e6e5e5b7d39b078ef | [
"MIT"
] | 1 | 2022-03-12T17:34:05.000Z | 2022-03-12T17:34:05.000Z | lib/room.py | MuffinAmor/nellie | eace65ac7d7d1730c131345e6e5e5b7d39b078ef | [
"MIT"
] | null | null | null | lib/room.py | MuffinAmor/nellie | eace65ac7d7d1730c131345e6e5e5b7d39b078ef | [
"MIT"
] | null | null | null | '''MIT License
Copyright (c) 2021 MightyNiko
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, publi... | 35.505017 | 121 | 0.522042 |
7972616ac8d8d419706035abb4871ff11ac06957 | 995 | py | Python | adapter/src/wot/adapter/schema/tplink.py | danmharris/WoT-Servient | 2f4ec188653135af3ad6055f78ca0e6f00d9e9cf | [
"MIT"
] | 2 | 2020-11-11T11:39:12.000Z | 2021-02-20T15:03:13.000Z | adapter/src/wot/adapter/schema/tplink.py | danmharris/WoT-Servient | 2f4ec188653135af3ad6055f78ca0e6f00d9e9cf | [
"MIT"
] | 9 | 2019-06-11T10:07:10.000Z | 2022-02-27T11:15:48.000Z | adapter/src/wot/adapter/schema/tplink.py | danmharris/WoT-Servient | 2f4ec188653135af3ad6055f78ca0e6f00d9e9cf | [
"MIT"
] | null | null | null | HS100 = {
'@context': 'https://iot.schema.org',
'description': 'TP Link HS100 Smart Plug',
'properties': {
'state': {
'title': 'State',
'description': 'Whether the plug is on',
'readOnly': False,
'type': 'boolean',
'forms': [
... | 27.638889 | 58 | 0.354774 |
797261e1b007043d898e22aa104e9cb5767b04a5 | 562 | py | Python | accounts/tests/factories.py | eyobofficial/COVID-19-Mutual-Aid | 42d30ce95b0e9c717c5eda3ecaafea2812ec34f7 | [
"MIT"
] | 3 | 2019-08-27T11:40:17.000Z | 2021-04-13T17:51:48.000Z | accounts/tests/factories.py | eyobofficial/Gebeya-Schedule-Bot | 8c757fa8c26cf5dda6f917997c521d0f37b28aa9 | [
"MIT"
] | 17 | 2019-08-26T23:55:32.000Z | 2021-06-09T18:25:32.000Z | accounts/tests/factories.py | eyobofficial/COVID-19-Mutual-Aid | 42d30ce95b0e9c717c5eda3ecaafea2812ec34f7 | [
"MIT"
] | 2 | 2019-08-30T07:15:15.000Z | 2019-08-30T14:23:36.000Z | import factory
from django.contrib.auth import get_user_model
User = get_user_model()
class BaseUserFactory(factory.django.DjangoModelFactory):
first_name = factory.Faker('first_name')
email = factory.LazyAttribute(lambda o: '{}.{}@test.mail'.format(
o.first_name, o.last_name))
username = facto... | 21.615385 | 69 | 0.702847 |
797262e57b63e493c91d23eac6aa164f5f0de1f6 | 550 | py | Python | tests/test_routing.py | fakegit/aspider | b2f23d2553d49d18f9b549a59f4431c00731067a | [
"BSD-3-Clause"
] | 48 | 2019-09-09T03:48:43.000Z | 2022-03-07T07:02:01.000Z | tests/test_routing.py | fakegit/aspider | b2f23d2553d49d18f9b549a59f4431c00731067a | [
"BSD-3-Clause"
] | 1 | 2019-11-26T11:09:11.000Z | 2019-11-26T11:09:11.000Z | tests/test_routing.py | fakegit/aspider | b2f23d2553d49d18f9b549a59f4431c00731067a | [
"BSD-3-Clause"
] | 17 | 2019-09-09T08:18:26.000Z | 2021-09-23T16:21:14.000Z | from aspider import aspider
from aspider.routeing import get_router
router = get_router()
def test_routing1():
'''
pass roots to aspider
'''
@router.route('/page/\d+')
def parse_page(text, path):
print(path)
@router.route('/[A-Z]+-[0-9]+', no_parse_links=True)
def parse_item(text... | 21.153846 | 58 | 0.612727 |
797263145558b4aa9ebd7b8dbf3f5156f85a27db | 10,034 | py | Python | sugarpy/SugarCubeParserListener.py | Braza/sugarpy | 4c3ba3351387f36c2644d109f65307227ade129d | [
"MIT"
] | null | null | null | sugarpy/SugarCubeParserListener.py | Braza/sugarpy | 4c3ba3351387f36c2644d109f65307227ade129d | [
"MIT"
] | 1 | 2021-03-10T11:07:13.000Z | 2021-03-10T11:07:13.000Z | sugarpy/SugarCubeParserListener.py | Braza/sugarpy | 4c3ba3351387f36c2644d109f65307227ade129d | [
"MIT"
] | null | null | null | # Generated from SugarCubeParser.g4 by ANTLR 4.7.1
from antlr4 import *
if __name__ is not None and "." in __name__:
from .SugarCubeParser import SugarCubeParser
else:
from SugarCubeParser import SugarCubeParser
# This class defines a complete listener for a parse tree produced by SugarCubeParser.
class SugarC... | 32.577922 | 86 | 0.739685 |
79726319405fe64a2b853bdd0190f7eb906c29f7 | 282 | py | Python | tests/notebooks/mirror/ipynb_to_percent/jupyter_with_raw_cell_on_top.py | st--/jupytext | f8e8352859cc22e17b11154d0770fd946c4a430a | [
"MIT"
] | 5,378 | 2018-09-01T22:03:43.000Z | 2022-03-31T06:51:42.000Z | tests/notebooks/mirror/ipynb_to_percent/jupyter_with_raw_cell_on_top.py | st--/jupytext | f8e8352859cc22e17b11154d0770fd946c4a430a | [
"MIT"
] | 812 | 2018-08-31T08:26:13.000Z | 2022-03-30T18:12:11.000Z | tests/notebooks/mirror/ipynb_to_percent/jupyter_with_raw_cell_on_top.py | st--/jupytext | f8e8352859cc22e17b11154d0770fd946c4a430a | [
"MIT"
] | 380 | 2018-09-02T01:40:07.000Z | 2022-03-25T13:57:23.000Z | # ---
# title: "Quick test"
# output:
# ioslides_presentation:
# widescreen: true
# smaller: true
# editor_options:
# chunk_output_type console
# jupyter:
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# %%
1+2+3
# %%
| 14.1 | 32 | 0.595745 |
797263fda68829f489aa9441075f907671fdac2c | 13,792 | py | Python | built-in/PyTorch/Official/cv/semantic_segmentation/AttU_Net_for_PyTorch/solver.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 12 | 2020-12-13T08:34:24.000Z | 2022-03-20T15:17:17.000Z | built-in/PyTorch/Official/cv/semantic_segmentation/AttU_Net_for_PyTorch/solver.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 1 | 2022-01-20T03:11:05.000Z | 2022-01-20T06:53:39.000Z | built-in/PyTorch/Official/cv/semantic_segmentation/AttU_Net_for_PyTorch/solver.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 2 | 2021-07-10T12:40:46.000Z | 2021-12-17T07:55:15.000Z | # BSD 3-Clause License
#
# Copyright (c) 2017 xxxx
# All rights reserved.
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain th... | 38.633053 | 177 | 0.523927 |
797264c87e2644094524f0d35138aa0a3fa04566 | 1,406 | py | Python | api.py | Piko-Piko-Pon-Taro/navict-recommender | 7eeaf0f77e500c1c0ecb15f9613aa08c2ef5c83c | [
"MIT"
] | null | null | null | api.py | Piko-Piko-Pon-Taro/navict-recommender | 7eeaf0f77e500c1c0ecb15f9613aa08c2ef5c83c | [
"MIT"
] | 9 | 2021-05-03T01:38:46.000Z | 2021-07-14T13:13:25.000Z | api.py | Piko-Piko-Pon-Taro/navict-recommender | 7eeaf0f77e500c1c0ecb15f9613aa08c2ef5c83c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Flask API
Endpoints:
/suggestions (List[int], POST): Estimates and returns the library_ids following the three library_id sequence.
request example: curl -X POST -H "Content-Type: application/json" -d '{"library_ids": [2,3,4]}' localhost:8888/suggestions
"""
import os
from fl... | 29.291667 | 130 | 0.682077 |
79726564532400d1050a535664c672168d83106c | 8,003 | py | Python | clients/python/generated/pyaemcloudmanagerapi/models/hal_link.py | shinesolutions/cloudmanager-api-clients | d73a25878f6cc57af954362ba8dccc90d54e6131 | [
"Apache-2.0"
] | 3 | 2020-06-23T05:31:52.000Z | 2020-11-26T05:34:57.000Z | clients/python/generated/pyaemcloudmanagerapi/models/hal_link.py | shinesolutions/cloudmanager-api-clients | d73a25878f6cc57af954362ba8dccc90d54e6131 | [
"Apache-2.0"
] | 2 | 2021-01-21T01:19:54.000Z | 2021-12-09T22:30:22.000Z | clients/python/generated/pyaemcloudmanagerapi/models/hal_link.py | shinesolutions/cloudmanager-api-clients | d73a25878f6cc57af954362ba8dccc90d54e6131 | [
"Apache-2.0"
] | 1 | 2020-11-18T11:48:13.000Z | 2020-11-18T11:48:13.000Z | # coding: utf-8
"""
Cloud Manager API
This API allows access to Cloud Manager programs, pipelines, and environments by an authorized technical account created through the Adobe I/O Console. The base url for this API is https://cloudmanager.adobe.io, e.g. to get the list of programs for an organization, you wo... | 26.325658 | 550 | 0.566787 |
79726591a2cf5b4455af8918b927f3bc4dbce8da | 2,299 | py | Python | src/garage/tf/baselines/gaussian_mlp_baseline.py | Maltimore/garage | a3f44b37eeddca37d157766a9a72e8772f104bcd | [
"MIT"
] | null | null | null | src/garage/tf/baselines/gaussian_mlp_baseline.py | Maltimore/garage | a3f44b37eeddca37d157766a9a72e8772f104bcd | [
"MIT"
] | null | null | null | src/garage/tf/baselines/gaussian_mlp_baseline.py | Maltimore/garage | a3f44b37eeddca37d157766a9a72e8772f104bcd | [
"MIT"
] | null | null | null | """A value function (baseline) based on a GaussianMLP model."""
import numpy as np
from garage.np.baselines import Baseline
from garage.tf.regressors import GaussianMLPRegressor
class GaussianMLPBaseline(Baseline):
"""A value function using Gaussian MLP network."""
def __init__(
self,
... | 34.833333 | 79 | 0.620705 |
797265db908b154740dbbbb5d5aa19f98a4e38fe | 679 | py | Python | log.py | OpenNLPhub/SynSetMineOnBert | 58853363557a2397fd8b04c8e68061f9df159d6a | [
"MIT"
] | 1 | 2021-04-25T04:48:16.000Z | 2021-04-25T04:48:16.000Z | log.py | OpenNLPhub/SynSetMineOnBert | 58853363557a2397fd8b04c8e68061f9df159d6a | [
"MIT"
] | null | null | null | log.py | OpenNLPhub/SynSetMineOnBert | 58853363557a2397fd8b04c8e68061f9df159d6a | [
"MIT"
] | 1 | 2021-01-11T03:21:34.000Z | 2021-01-11T03:21:34.000Z | import logging
from datetime import datetime
import os
logger = logging.getLogger('SynSetMine_Attention')
logger.setLevel(logging.INFO)
fmt = '[%(asctime)s]-[%(levelname)s]-%(message)s'
formatter=logging.Formatter(fmt)
handle_stream = logging.StreamHandler()
handle_stream.setFormatter(formatter)
handle_stream.set... | 25.148148 | 84 | 0.764359 |
797266731f8abf49c516d09caae133cf3b0d107e | 839 | py | Python | stock_market_insights/daily_analysis.py | AlbertRtk/stock_market | b0f15fe90858f651e72c0520d38becbf7531b1ac | [
"MIT"
] | 1 | 2022-03-29T12:23:46.000Z | 2022-03-29T12:23:46.000Z | stock_market_insights/daily_analysis.py | AlbertRtk/stock_market | b0f15fe90858f651e72c0520d38becbf7531b1ac | [
"MIT"
] | null | null | null | stock_market_insights/daily_analysis.py | AlbertRtk/stock_market | b0f15fe90858f651e72c0520d38becbf7531b1ac | [
"MIT"
] | null | null | null | import sys
sys.path.append("marketools")
from marketools import Stock, Wallet, store_data
from stock_index import wig20_2019, mwig40
from strategies import EmaVolStrategy
from tqdm import tqdm
from datetime import date
store_data()
if __name__ == '__main__':
MY_WALLET = Wallet(commission_rate=0.0038, min_commiss... | 24.676471 | 66 | 0.691299 |
797266cd4227c7f9f7b5dfd3e90a10a2556498b6 | 196 | py | Python | office365/runtime/auth/base_token_provider.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | office365/runtime/auth/base_token_provider.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | office365/runtime/auth/base_token_provider.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2018-03-23T14:49:04.000Z | 2018-03-23T14:49:04.000Z | from abc import abstractmethod, ABCMeta
class BaseTokenProvider(object):
""" Base Token provide"""
__metaclass__ = ABCMeta
@abstractmethod
def acquire_token(self):
pass
| 17.818182 | 39 | 0.693878 |
79726852fea6503cbd23a150d84bb0c95ca60bf1 | 962 | py | Python | supernodes/models.py | ockibagusp/cloud-platform | a9fd369c51d8e2aa1b2fd51d11f2cb16b018bf66 | [
"MIT"
] | 1 | 2019-09-29T06:24:19.000Z | 2019-09-29T06:24:19.000Z | supernodes/models.py | ockibagusp/cloud-platform | a9fd369c51d8e2aa1b2fd51d11f2cb16b018bf66 | [
"MIT"
] | 1 | 2020-11-23T10:03:46.000Z | 2020-11-23T10:03:46.000Z | supernodes/models.py | OckiFals/cloud-platform | c62eba7fcc08b06485b845089e79b3ce236ec1ec | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from mongoengine.document import Document, EmbeddedDocument
from mongoengine import StringField, FloatField, ReferenceField, EmbeddedDocumentField, \
EmbeddedDocumentListField, CASCADE
from sensors.models import Sensors
from users.models import User
class Coordinates(Embed... | 34.357143 | 93 | 0.778586 |
7972687aef9711215c6a4f9a6e8f81c64a226a56 | 11,196 | py | Python | core/storage/file/gae_models_test.py | steve7158/oppia | e2cae72fa5d3503c64d195f09d3460507697730c | [
"Apache-2.0"
] | 2 | 2018-12-14T05:46:31.000Z | 2019-01-04T21:52:44.000Z | core/storage/file/gae_models_test.py | steve7158/oppia | e2cae72fa5d3503c64d195f09d3460507697730c | [
"Apache-2.0"
] | 5 | 2018-06-09T02:05:45.000Z | 2018-09-20T13:53:42.000Z | core/storage/file/gae_models_test.py | steve7158/oppia | e2cae72fa5d3503c64d195f09d3460507697730c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2018 The Oppia 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 requi... | 44.605578 | 119 | 0.704359 |
79726aafabd0653e3453c858cd26381a43933bd8 | 36,359 | py | Python | venv/lib/python2.7/site-packages/docker/client.py | emilykimhuynh/recyclatory | 97c0d0f4c61c4614ac2c77535d0d6b930c847ac4 | [
"Unlicense"
] | null | null | null | venv/lib/python2.7/site-packages/docker/client.py | emilykimhuynh/recyclatory | 97c0d0f4c61c4614ac2c77535d0d6b930c847ac4 | [
"Unlicense"
] | null | null | null | venv/lib/python2.7/site-packages/docker/client.py | emilykimhuynh/recyclatory | 97c0d0f4c61c4614ac2c77535d0d6b930c847ac4 | [
"Unlicense"
] | null | null | null | # Copyright 2013 dotCloud 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 t... | 37.406379 | 79 | 0.565775 |
79726b4c106ea35e0a8a0f1e540fa5df6202363e | 11,570 | py | Python | tests/unit/controllers/test_skills_category_controller.py | Maxcutex/pm_api | de1e1a07feecd1be7bb86a87b4ffed012a05aec0 | [
"MIT"
] | null | null | null | tests/unit/controllers/test_skills_category_controller.py | Maxcutex/pm_api | de1e1a07feecd1be7bb86a87b4ffed012a05aec0 | [
"MIT"
] | null | null | null | tests/unit/controllers/test_skills_category_controller.py | Maxcutex/pm_api | de1e1a07feecd1be7bb86a87b4ffed012a05aec0 | [
"MIT"
] | null | null | null | """Unit tests for the skills category controller.
"""
from datetime import datetime
from unittest.mock import patch, MagicMock
from app.controllers.skill_category_controller import SkillCategoryController
from app.models import User
from app.models.permission import Permission
from app.models.skill_category import Ski... | 37.810458 | 86 | 0.646845 |
79726b7aad55eaf7796cab4615e87bcf93e2547f | 1,242 | py | Python | ActOnChanged.py | jayvdb/gitMC | 06de7f1e1fcb882df7e36de0b8203ee065137bb5 | [
"MIT"
] | null | null | null | ActOnChanged.py | jayvdb/gitMC | 06de7f1e1fcb882df7e36de0b8203ee065137bb5 | [
"MIT"
] | null | null | null | ActOnChanged.py | jayvdb/gitMC | 06de7f1e1fcb882df7e36de0b8203ee065137bb5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
list changed files and run program on them.
Optionally chop off (fixed width) first part of filename--useful for previewing
all changed files in a static rendered web preview (Jekyll, Hugo)
"""
import webbrowser
from pathlib import Path
from gitutils.git import listchanged
from argparse import... | 30.292683 | 116 | 0.632045 |
79726bef8819c087145b4c93791143dffa1512c7 | 645 | py | Python | tests/mocker/upgrade_workers/normal_worker.py | baweiji/python-openimu | 72de35d6d597631acabc46b3b841b8a97a97c8f9 | [
"Apache-2.0"
] | null | null | null | tests/mocker/upgrade_workers/normal_worker.py | baweiji/python-openimu | 72de35d6d597631acabc46b3b841b8a97a97c8f9 | [
"Apache-2.0"
] | null | null | null | tests/mocker/upgrade_workers/normal_worker.py | baweiji/python-openimu | 72de35d6d597631acabc46b3b841b8a97a97c8f9 | [
"Apache-2.0"
] | null | null | null | from aceinna.devices.base import UpgradeWorkerBase
class NormalWorker(UpgradeWorkerBase):
def __init__(self):
super(NormalWorker, self).__init__()
self._total = 1024*1024 # 1M size
def get_upgrade_content_size(self):
return self._total
def work(self):
current = 0
... | 24.807692 | 66 | 0.592248 |
79726c712f3e64cd2fdf31294743ba2eb862e02a | 4,066 | py | Python | resources/usr/local/lib/python2.7/dist-packages/bx/cookbook/attribute.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | 2 | 2019-07-29T04:12:46.000Z | 2020-06-01T00:35:51.000Z | resources/usr/local/lib/python2.7/dist-packages/bx/cookbook/attribute.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | resources/usr/local/lib/python2.7/dist-packages/bx/cookbook/attribute.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | """
Provides functions for creating simple properties.
If, inside a class definition, you write:
attribute(foo=1, bar=2)
simple properties named 'foo' and 'bar' are created for this class.
Also, private instance variables '__foo' and '__bar' will be added
to instances of this class.
USEAGE:
#... | 33.327869 | 79 | 0.621495 |
79726dc4f38e4bd2514a9a0a3e831675855211c2 | 65,326 | py | Python | pyes/es.py | akabos/pyes | 89d9087ddbc0c6a5ddd5c022a1c7b68da2468eb4 | [
"BSD-3-Clause"
] | 1 | 2018-05-07T15:56:42.000Z | 2018-05-07T15:56:42.000Z | pyes/es.py | sendwithus/pyes | 1a803e525bbe36c4fba2bf614a59f720f984139f | [
"BSD-3-Clause"
] | null | null | null | pyes/es.py | sendwithus/pyes | 1a803e525bbe36c4fba2bf614a59f720f984139f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import six
from datetime import date, datetime
from decimal import Decimal
if six.PY2:
from six.moves.urllib.parse import urlencode, urlunsplit, urlparse
else:
from urllib.parse import urlencode, urlunsplit, urlparse
# import urllib.request, urllib.parse, urllib.error
import base64
... | 35.814693 | 150 | 0.566482 |
79726e1fcbca41542be09637f3fefb837ed0c9b6 | 5,879 | py | Python | Design/PythonMpi/repo/src/mpi4py/bench.py | PascalSun/MIT-year2 | a48dd89f592941efd09c1d251a3ef113e95a6af3 | [
"MIT"
] | null | null | null | Design/PythonMpi/repo/src/mpi4py/bench.py | PascalSun/MIT-year2 | a48dd89f592941efd09c1d251a3ef113e95a6af3 | [
"MIT"
] | null | null | null | Design/PythonMpi/repo/src/mpi4py/bench.py | PascalSun/MIT-year2 | a48dd89f592941efd09c1d251a3ef113e95a6af3 | [
"MIT"
] | null | null | null | # Author: Lisandro Dalcin
# Contact: dalcinl@gmail.com
"""Run MPI benchmarks and tests."""
import sys as _sys
def helloworld(comm, args=None, verbose=True):
"""Hello, World! using MPI."""
from argparse import ArgumentParser
parser = ArgumentParser(prog=__package__ + ".bench helloworld")
parser.add_ar... | 36.74375 | 78 | 0.541078 |
79726f2515c4f8640577e4ca4cf40f128409cdb4 | 2,659 | py | Python | wagtail_storages/signal_handlers.py | PetrDlouhy/wagtail-storages | 71122600d64b656d920364c26e1bc4ff9e32cf5d | [
"BSD-2-Clause"
] | 26 | 2019-12-04T09:45:26.000Z | 2021-12-02T17:17:31.000Z | wagtail_storages/signal_handlers.py | PetrDlouhy/wagtail-storages | 71122600d64b656d920364c26e1bc4ff9e32cf5d | [
"BSD-2-Clause"
] | 20 | 2019-12-05T10:45:35.000Z | 2022-02-21T16:03:49.000Z | wagtail_storages/signal_handlers.py | PetrDlouhy/wagtail-storages | 71122600d64b656d920364c26e1bc4ff9e32cf5d | [
"BSD-2-Clause"
] | 5 | 2019-12-04T14:35:45.000Z | 2021-12-16T07:48:37.000Z | import functools
import logging
from django.db.models.signals import post_save, pre_delete
from wagtail import VERSION as WAGTAIL_VERSION
from wagtail.core.models import Collection
if WAGTAIL_VERSION < (2, 8):
from wagtail.documents.models import get_document_model
else:
from wagtail.documents import get_doc... | 28.902174 | 88 | 0.77736 |
79726f67846fc0044a6a3dd7f96ec99ef6a14509 | 3,174 | py | Python | examples/models/file/daylight.py | Suicoleiro/bokeh | a212acdf091a7a4df639fa9d443be6ade0018039 | [
"BSD-3-Clause"
] | 15,193 | 2015-01-01T05:11:45.000Z | 2022-03-31T19:30:20.000Z | examples/models/file/daylight.py | Suicoleiro/bokeh | a212acdf091a7a4df639fa9d443be6ade0018039 | [
"BSD-3-Clause"
] | 9,554 | 2015-01-01T03:16:54.000Z | 2022-03-31T22:59:39.000Z | examples/models/file/daylight.py | Suicoleiro/bokeh | a212acdf091a7a4df639fa9d443be6ade0018039 | [
"BSD-3-Clause"
] | 4,829 | 2015-01-02T03:35:32.000Z | 2022-03-30T16:40:26.000Z | import datetime as dt
from time import mktime
import numpy as np
from bokeh.core.properties import value
from bokeh.document import Document
from bokeh.embed import file_html
from bokeh.models import (ColumnDataSource, DatetimeAxis, DatetimeTickFormatter,
FixedTicker, Legend, LegendItem, Lin... | 31.117647 | 87 | 0.717391 |
7972701063ae45895193c262007a16c835fecd90 | 2,213 | py | Python | 400_logreg_perma_user_images.py | rushkock/insta | 6465b6164d5bce1f6cab5b4b44ac3f612e2f70d2 | [
"MIT"
] | null | null | null | 400_logreg_perma_user_images.py | rushkock/insta | 6465b6164d5bce1f6cab5b4b44ac3f612e2f70d2 | [
"MIT"
] | null | null | null | 400_logreg_perma_user_images.py | rushkock/insta | 6465b6164d5bce1f6cab5b4b44ac3f612e2f70d2 | [
"MIT"
] | 1 | 2019-10-01T10:32:35.000Z | 2019-10-01T10:32:35.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 10 19:51:52 2019
@author: hduser
"""
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error, r2_score
from math import sqrt
df = pd... | 36.278689 | 199 | 0.728875 |
79727055e2026ff95b3f7563904d8bc92b4650e6 | 15,880 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/manifest.py | tylerbenson/integrations-core | e1193b8e860a65337c37924e10f07ff2271af058 | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/manifest.py | tylerbenson/integrations-core | e1193b8e860a65337c37924e10f07ff2271af058 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/manifest.py | tylerbenson/integrations-core | e1193b8e860a65337c37924e10f07ff2271af058 | [
"BSD-3-Clause"
] | 1 | 2021-06-21T19:21:51.000Z | 2021-06-21T19:21:51.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import json
import uuid
from collections import OrderedDict
import click
from six import string_types
from ..console import CONTEXT_SETTINGS, abort, echo_failure, echo_info, echo_success, echo_warning
... | 41.246753 | 113 | 0.524937 |
7972706e59e25121496d9fe031ee1457a3ca4486 | 1,534 | py | Python | llama/abstract_base.py | tzaffi/alpactor | 7fa30a9a164f31de0a5d516cdd4a6370421665f4 | [
"MIT"
] | null | null | null | llama/abstract_base.py | tzaffi/alpactor | 7fa30a9a164f31de0a5d516cdd4a6370421665f4 | [
"MIT"
] | null | null | null | llama/abstract_base.py | tzaffi/alpactor | 7fa30a9a164f31de0a5d516cdd4a6370421665f4 | [
"MIT"
] | 1 | 2021-09-26T12:14:24.000Z | 2021-09-26T12:14:24.000Z | from abc import abstractmethod, abstractclassmethod, ABCMeta as NativeABCMeta
import uuid
class DummyAttribute:
pass
def abstract_attribute(obj=None):
if obj is None:
obj = DummyAttribute()
obj.__is_abstract_attribute__ = True
return obj
class ABCMeta(NativeABCMeta):
"""
copied fro... | 23.96875 | 102 | 0.633638 |
797270c14d0bb0bca9e66498187f4b506d76c3bf | 1,654 | py | Python | openodia/_translate.py | JanviRaina/openodia | f33d095afcb2e87108986ecf16a5ee0f59568502 | [
"MIT"
] | 2 | 2021-10-04T05:40:16.000Z | 2021-10-14T09:10:33.000Z | openodia/_translate.py | JanviRaina/openodia | f33d095afcb2e87108986ecf16a5ee0f59568502 | [
"MIT"
] | 19 | 2021-09-25T18:08:01.000Z | 2021-12-12T01:50:10.000Z | openodia/_translate.py | JanviRaina/openodia | f33d095afcb2e87108986ecf16a5ee0f59568502 | [
"MIT"
] | 3 | 2021-09-25T17:49:28.000Z | 2022-01-21T03:52:28.000Z | """
License: MIT
Author: Soumendra Kumar Sahoo
Google wrapper for odia language
"""
from functools import lru_cache
from googletrans import Translator
from openodia.corpus.dictionary import get_dictionary
def _search_offline_dictionary(text: str) -> str:
"""Search the text from offline dictionary"""
offline... | 33.08 | 99 | 0.73821 |
797270f3e143e407afdc4d23837574a137bbc0db | 16,817 | py | Python | tensorflow/python/ops/distributions/special_math.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 190,993 | 2015-11-09T13:17:30.000Z | 2022-03-31T23:05:27.000Z | tensorflow/python/ops/distributions/special_math.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 48,461 | 2015-11-09T14:21:11.000Z | 2022-03-31T23:17:33.000Z | tensorflow/python/ops/distributions/special_math.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 104,981 | 2015-11-09T13:40:17.000Z | 2022-03-31T19:51:54.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... | 35.704883 | 91 | 0.665636 |
797270fe091b98fd8db5da80d4e32f79944309d9 | 17,926 | py | Python | welly/defaults.py | discover-volve/welly | 056c1ad6f89363a4c520865af9dbbfb089c6bed2 | [
"Apache-2.0"
] | 1 | 2020-08-02T03:39:25.000Z | 2020-08-02T03:39:25.000Z | welly/defaults.py | st4tic0/welly | df6943a8419f6ec7ebf2a0b4df3a1b5d056ebeba | [
"Apache-2.0"
] | 1 | 2020-03-02T04:31:26.000Z | 2020-03-02T04:31:26.000Z | welly/defaults.py | st4tic0/welly | df6943a8419f6ec7ebf2a0b4df3a1b5d056ebeba | [
"Apache-2.0"
] | 1 | 2020-07-07T19:36:06.000Z | 2020-07-07T19:36:06.000Z | # -*- coding: utf-8 -*-
"""
Defines some default values.
:copyright: 2016 Agile Geoscience
:license: Apache 2.0
"""
# From E Ross Crain's website:
# https://www.spec2000.net/05-logaliastable.htm
# Some additions by Thomas Martin
ALIAS = {'CAL': [ 'HHCA',
'SA',
'HCALX',
... | 26.557037 | 90 | 0.173547 |
797271a8e0ae3b376864a1425599ed7b8a1b5073 | 9,864 | py | Python | src/harness/reference_models/propagation/wf_itm.py | NSF-Swift/Spectrum-Access-System | 02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf | [
"Apache-2.0"
] | 58 | 2015-07-22T14:16:52.000Z | 2022-03-10T09:09:33.000Z | src/harness/reference_models/propagation/wf_itm.py | NSF-Swift/Spectrum-Access-System | 02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf | [
"Apache-2.0"
] | 537 | 2015-07-30T16:28:20.000Z | 2021-09-30T17:12:15.000Z | src/harness/reference_models/propagation/wf_itm.py | NSF-Swift/Spectrum-Access-System | 02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf | [
"Apache-2.0"
] | 51 | 2015-06-30T00:25:15.000Z | 2022-01-21T00:09:22.000Z | # Copyright 2017 SAS Project 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 requ... | 38.682353 | 95 | 0.666261 |
797271fb9954581aea91e0fa118973cdf492d4c4 | 811 | py | Python | webapp/app/route.py | georg3tom/matching-handwritten-document-images | a86d197b0f84bf6c0733bc75d5aff3d1b2263d60 | [
"MIT"
] | 1 | 2020-12-24T07:13:39.000Z | 2020-12-24T07:13:39.000Z | webapp/app/route.py | georg3tom/matching-handwritten-document-images | a86d197b0f84bf6c0733bc75d5aff3d1b2263d60 | [
"MIT"
] | null | null | null | webapp/app/route.py | georg3tom/matching-handwritten-document-images | a86d197b0f84bf6c0733bc75d5aff3d1b2263d60 | [
"MIT"
] | null | null | null | from flask import jsonify, render_template, request, Blueprint, send_from_directory
from hwmatcher.search import stringQuery
routes = Blueprint("routes", __name__)
IMG_DIR = './static/images/'
@routes.route("/")
def root():
"""
Main page
"""
return render_template("main.html")
@routes.route("/searc... | 23.171429 | 83 | 0.667078 |
7972722947981f18cba99bca07fadf1e60209b3c | 1,064 | py | Python | src/wordperil/interface/solvebar.py | mousepawmedia/wordperil | d2506c2402b18b827e72b78d3968059df98ef7b7 | [
"BSD-3-Clause"
] | 1 | 2020-07-16T15:33:52.000Z | 2020-07-16T15:33:52.000Z | src/wordperil/interface/solvebar.py | mousepawmedia/wordperil | d2506c2402b18b827e72b78d3968059df98ef7b7 | [
"BSD-3-Clause"
] | 3 | 2020-07-24T14:35:24.000Z | 2021-03-24T22:05:45.000Z | src/wordperil/interface/solvebar.py | mousepawmedia/wordperil | d2506c2402b18b827e72b78d3968059df98ef7b7 | [
"BSD-3-Clause"
] | 3 | 2020-07-23T20:22:34.000Z | 2021-07-17T05:28:00.000Z | from PySide2.QtWidgets import QLineEdit
from PySide2.QtGui import QFont
from PySide2.QtCore import Qt
class SolveBar(QLineEdit):
style = """
background-color: black;
color: green;
"""
font = QFont("mono", 18)
def __init__(self, parent, **kwargs):
super().__init__(parent, **k... | 22.638298 | 50 | 0.62594 |
79727246c33034083103ceb902bda4efcc9537ab | 2,699 | py | Python | tests/settings.py | TDT-AG/openwisp-utils | 6107fcd4fc552971fe3e363e64d70b48b2892db2 | [
"BSD-3-Clause"
] | null | null | null | tests/settings.py | TDT-AG/openwisp-utils | 6107fcd4fc552971fe3e363e64d70b48b2892db2 | [
"BSD-3-Clause"
] | null | null | null | tests/settings.py | TDT-AG/openwisp-utils | 6107fcd4fc552971fe3e363e64d70b48b2892db2 | [
"BSD-3-Clause"
] | null | null | null | import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '@s8$swhj9du^aglt5+@ut^)wepr+un1m7r*+ixcq(-5i^st=y^'
DEBUG = True
ALLOWED_HOSTS = []
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.mess... | 29.021505 | 85 | 0.692108 |
79727355f277c77c7463c679cca2518e79bf8414 | 6,574 | py | Python | src/mask_detection/detect_mask.py | CircuitLaunch/colab-reachy-ros | f54414ae181beb60a0435611227d77b3a549339e | [
"MIT"
] | null | null | null | src/mask_detection/detect_mask.py | CircuitLaunch/colab-reachy-ros | f54414ae181beb60a0435611227d77b3a549339e | [
"MIT"
] | 3 | 2021-02-28T06:37:51.000Z | 2021-05-09T05:18:21.000Z | src/mask_detection/detect_mask.py | CircuitLaunch/colab_reachy_ros | f54414ae181beb60a0435611227d77b3a549339e | [
"MIT"
] | null | null | null | # Adapted from
# https://www.pyimagesearch.com/2020/05/04/covid-19-face-mask-detector-with-opencv-keras-tensorflow-and-deep-learning/
# Copyright (c) 2020 PyImageSearch.com
#
# SIMPLE VERSION
# Feel free to use this code for your own projects, whether they are
# purely educational, for fun, or for profit. THE EXCEPTIO... | 47.637681 | 118 | 0.673258 |
797274916ff3650d91d8519c2ebe09e92fbdd915 | 715 | py | Python | scielomanager/scielomanager/utils/migrations.py | patymori/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 8 | 2015-07-07T03:09:16.000Z | 2019-03-16T04:46:32.000Z | scielomanager/scielomanager/utils/migrations.py | DalavanCloud/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 245 | 2015-01-14T13:29:58.000Z | 2022-01-13T00:48:44.000Z | scielomanager/scielomanager/utils/migrations.py | DalavanCloud/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 5 | 2016-02-19T15:47:08.000Z | 2019-03-16T04:46:20.000Z | from django.db.models import DateTimeField
def safe_autodatetime(modelname):
"""
Decorator to be used in migrations. This decorator monkeypatch a given
model to avoid the datetimefield to override the current dates
priviously registered in the database.
"""
def rewrapper(func):
def wr... | 24.655172 | 74 | 0.618182 |
79727573f6879f4d2b2545ed5bec77aa7412c79d | 4,116 | py | Python | transform/transformers/image_transformer.py | uk-gov-mirror/ONSdigital.sdx-transform-cs | bc2b46cb14d1ec9d746ad71db7eaab4ebfbc5b0d | [
"MIT"
] | 1 | 2017-11-10T02:20:54.000Z | 2017-11-10T02:20:54.000Z | transform/transformers/image_transformer.py | uk-gov-mirror/ONSdigital.sdx-transform-cs | bc2b46cb14d1ec9d746ad71db7eaab4ebfbc5b0d | [
"MIT"
] | 228 | 2016-06-21T11:39:10.000Z | 2021-09-07T23:56:07.000Z | transform/transformers/image_transformer.py | uk-gov-mirror/ONSdigital.sdx-transform-cs | bc2b46cb14d1ec9d746ad71db7eaab4ebfbc5b0d | [
"MIT"
] | 1 | 2021-04-11T07:49:48.000Z | 2021-04-11T07:49:48.000Z | import datetime
import os.path
import requests
import subprocess
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
from transform.transformers.in_memory_zip import InMemoryZip
from transform.transformers.index_file import IndexFile
from .pdf_transformer import PDFTransfo... | 36.424779 | 126 | 0.651603 |
797275b1103213d0c54df06f01810719cc4a0bd3 | 3,270 | py | Python | apteco_api/models/build_definition.py | Apteco/apteco-api | 7440c98ab10ea6d8a5997187f6fc739ce1c75d2b | [
"Apache-2.0"
] | 2 | 2020-05-21T14:24:16.000Z | 2020-12-03T19:56:34.000Z | apteco_api/models/build_definition.py | Apteco/apteco-api | 7440c98ab10ea6d8a5997187f6fc739ce1c75d2b | [
"Apache-2.0"
] | null | null | null | apteco_api/models/build_definition.py | Apteco/apteco-api | 7440c98ab10ea6d8a5997187f6fc739ce1c75d2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Apteco API
An API to allow access to Apteco Marketing Suite resources # noqa: E501
The version of the OpenAPI document: v2
Contact: support@apteco.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class BuildDefinition(... | 28.189655 | 90 | 0.582875 |
797275e4726bb43f243bd2204324ad58dcef1a2a | 2,120 | py | Python | libs/html5lib/treewalkers/pulldom.py | bbondy/brianbondy.gae | 5c189e5d8f1ee0fdc77ab48c21f3da2c9e3f246c | [
"MIT"
] | null | null | null | libs/html5lib/treewalkers/pulldom.py | bbondy/brianbondy.gae | 5c189e5d8f1ee0fdc77ab48c21f3da2c9e3f246c | [
"MIT"
] | null | null | null | libs/html5lib/treewalkers/pulldom.py | bbondy/brianbondy.gae | 5c189e5d8f1ee0fdc77ab48c21f3da2c9e3f246c | [
"MIT"
] | null | null | null | from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \
COMMENT, IGNORABLE_WHITESPACE, CHARACTERS
import _base
from html5lib.constants import voidElements
class TreeWalker(_base.TreeWalker):
def __iter__(self):
ignore_until = None
previous = None
for event in self.tree:
... | 37.192982 | 93 | 0.528774 |
797276432fde1e0e39f6e725b0268c929574dc90 | 19,233 | py | Python | locust/argument_parser.py | KevinHoi128/locust | 7bff126884bc0a53e3b0785bf8c9ffcd26a254ca | [
"MIT"
] | null | null | null | locust/argument_parser.py | KevinHoi128/locust | 7bff126884bc0a53e3b0785bf8c9ffcd26a254ca | [
"MIT"
] | null | null | null | locust/argument_parser.py | KevinHoi128/locust | 7bff126884bc0a53e3b0785bf8c9ffcd26a254ca | [
"MIT"
] | null | null | null | import argparse
import os
import sys
import textwrap
from typing import Dict
import configargparse
import locust
version = locust.__version__
DEFAULT_CONFIG_FILES = ["~/.locust.conf", "locust.conf"]
class LocustArgumentParser(configargparse.ArgumentParser):
"""Drop-in replacement for `configargparse.Argument... | 36.426136 | 244 | 0.647741 |
797276979e6c859791c07fd5d2d38272897029da | 97,492 | py | Python | isaacgymenvs/tasks/dual_franka.py | wzqwwq/IsaacGymEnvs | 0b94bb249a079e7c02a77188faea97e5fc30191d | [
"BSD-3-Clause"
] | 1 | 2022-03-26T12:55:04.000Z | 2022-03-26T12:55:04.000Z | isaacgymenvs/tasks/dual_franka.py | wzqwwq/IsaacGymEnvs | 0b94bb249a079e7c02a77188faea97e5fc30191d | [
"BSD-3-Clause"
] | null | null | null | isaacgymenvs/tasks/dual_franka.py | wzqwwq/IsaacGymEnvs | 0b94bb249a079e7c02a77188faea97e5fc30191d | [
"BSD-3-Clause"
] | 2 | 2022-03-19T13:45:54.000Z | 2022-03-23T07:23:19.000Z | import math
import numpy as np
import os
import torch
from torch import Tensor
import random
from isaacgym import gymutil, gymtorch, gymapi
from isaacgym.torch_utils import *
from tasks.base.vec_task import VecTask
from typing import Dict, List, Tuple, Union
shelf_as_box = False
spoon_as_box = False
turn_spoon = False... | 58.030952 | 211 | 0.592397 |
797276991963a4af0be59400900ad0fb0b36a084 | 3,023 | py | Python | nilearn/input_data/tests/test_masker_validation.py | darya-chyzhyk/nilearn | c2a597586314ee1fe9da260d7d7ee00ef8b4eef5 | [
"BSD-2-Clause"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | nilearn/input_data/tests/test_masker_validation.py | lauratomaz/nilearn | 7e413a51676fea8bdcbab12e20482da6c417567c | [
"BSD-2-Clause"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | nilearn/input_data/tests/test_masker_validation.py | lauratomaz/nilearn | 7e413a51676fea8bdcbab12e20482da6c417567c | [
"BSD-2-Clause"
] | 3 | 2017-01-06T09:54:00.000Z | 2020-02-17T12:57:35.000Z | from nose.tools import assert_true, assert_equal
import nibabel
import numpy as np
from sklearn.base import BaseEstimator
from sklearn.externals.joblib import Memory
from nilearn._utils.testing import assert_warns
from nilearn.input_data.masker_validation import check_embedded_nifti_masker
from nilearn.input_data imp... | 35.988095 | 76 | 0.641747 |
797276e531c209cab7a71e9779608a81ca212e52 | 2,517 | py | Python | setup.py | Keitakann/Riskfolio-Lib | 9ca84baafd8c0b0861bb747d5fe15a8b724c4b2c | [
"BSD-3-Clause"
] | 1 | 2021-06-07T06:38:31.000Z | 2021-06-07T06:38:31.000Z | setup.py | Keitakann/Riskfolio-Lib | 9ca84baafd8c0b0861bb747d5fe15a8b724c4b2c | [
"BSD-3-Clause"
] | null | null | null | setup.py | Keitakann/Riskfolio-Lib | 9ca84baafd8c0b0861bb747d5fe15a8b724c4b2c | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2020-2021 Dany Cajas
DESCRIPTION = "Portfolio Optimization and Quantitative Strategic Asset Allocation in Python"
with open("README.md", encoding='UTF-8') as fh:
LONG_DESCRIPTION = fh.read()
DISTNAME = 'Riskfolio-Lib'
MAINTAINER = 'Dany Cajas'
MAINTAINER_EMAIL = 'dany.cajas.n@uni.pe'
URL = 'https... | 31.074074 | 92 | 0.645213 |
797277c950586352770a09015105a5f790e96807 | 354 | py | Python | splash/kernel/__main__.py | Youwotma/splash | f985f542a09f5298db5353602f8826e82b31332d | [
"BSD-3-Clause"
] | null | null | null | splash/kernel/__main__.py | Youwotma/splash | f985f542a09f5298db5353602f8826e82b31332d | [
"BSD-3-Clause"
] | null | null | null | splash/kernel/__main__.py | Youwotma/splash | f985f542a09f5298db5353602f8826e82b31332d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
To install the kernel type
$ python -m splash.kernel install
To start the kernel, use IPython web interface or run
$ python -m splash.kernel
"""
from __future__ import absolute_import
import sys
from .kernel import start, install
if len(sys.argv) > 1 and sys.argv[1] == 'install'... | 17.7 | 53 | 0.675141 |
7972781397f5bab387cbe262d4b2f79a09e6b7d1 | 73 | py | Python | e2e/resources/python-code/count-memory.py | all-of-us/research | f84663918a98a53ddc626811262650d99f6c7c63 | [
"BSD-3-Clause"
] | 33 | 2017-10-11T18:32:03.000Z | 2022-03-18T17:11:54.000Z | e2e/resources/python-code/count-memory.py | all-of-us/research | f84663918a98a53ddc626811262650d99f6c7c63 | [
"BSD-3-Clause"
] | 1,667 | 2017-07-06T21:41:50.000Z | 2022-03-31T22:02:55.000Z | e2e/resources/python-code/count-memory.py | all-of-us/research | f84663918a98a53ddc626811262650d99f6c7c63 | [
"BSD-3-Clause"
] | 10 | 2017-09-06T14:14:45.000Z | 2021-07-20T16:45:42.000Z | import psutil
# Convert to GiB.
psutil.virtual_memory().total / (1<<30)
| 14.6 | 39 | 0.712329 |
7972783ebdd1047d5b6c3b96a4d5333b4ccf610c | 1,754 | py | Python | lierre/sending.py | hydrargyrum/lierre | 5759d4d4138be94c2a75d8932a2f1d41fc55e513 | [
"WTFPL"
] | 2 | 2019-08-20T07:08:10.000Z | 2020-08-16T01:15:21.000Z | lierre/sending.py | hydrargyrum/lierre | 5759d4d4138be94c2a75d8932a2f1d41fc55e513 | [
"WTFPL"
] | 10 | 2019-11-02T15:39:48.000Z | 2020-10-05T11:36:43.000Z | lierre/sending.py | hydrargyrum/lierre | 5759d4d4138be94c2a75d8932a2f1d41fc55e513 | [
"WTFPL"
] | null | null | null | # this project is licensed under the WTFPLv2, see COPYING.wtfpl for details
from email.message import EmailMessage
import logging
from lierre.utils.db_ops import open_db_rw
from lierre.utils.maildir_ops import MaildirPP
from lierre.change_watcher import WATCHER
from .plugin_manager import PLUGINS
from .config import... | 26.575758 | 100 | 0.689852 |
797278a5e5db7edc671e746936651a4f7fcd4cab | 135,370 | py | Python | tensorflow/python/keras/layers/recurrent.py | handongke/tensorflow | c6bb5cd0447a0af2764c195fb14d218df8ae6471 | [
"Apache-2.0"
] | 5 | 2019-01-13T16:15:25.000Z | 2019-07-07T16:17:32.000Z | tensorflow/python/keras/layers/recurrent.py | handongke/tensorflow | c6bb5cd0447a0af2764c195fb14d218df8ae6471 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/layers/recurrent.py | handongke/tensorflow | c6bb5cd0447a0af2764c195fb14d218df8ae6471 | [
"Apache-2.0"
] | 2 | 2019-12-17T09:27:07.000Z | 2020-05-24T13:09:49.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.570301 | 118 | 0.664283 |
797278bdf610bb615839bea8e619f8b670a0abda | 246 | py | Python | ExerciciosdePython/ex052.py | aleksandromelo/Exercicios | 782ff539efa1286180eaf8df8c25c4eca7a5e669 | [
"MIT"
] | null | null | null | ExerciciosdePython/ex052.py | aleksandromelo/Exercicios | 782ff539efa1286180eaf8df8c25c4eca7a5e669 | [
"MIT"
] | null | null | null | ExerciciosdePython/ex052.py | aleksandromelo/Exercicios | 782ff539efa1286180eaf8df8c25c4eca7a5e669 | [
"MIT"
] | null | null | null | n = int(input('Digite um número: '))
cont = 0
for i in range(1, n+1):
div = n % i
if div == 0:
cont += 1
if cont == 2:
print('{} é um número primo.'.format(n))
else:
print('{} não é um número primo.'.format(n))
print(cont) | 22.363636 | 48 | 0.54065 |
79727b1126e666c6813a459717d505734251a37e | 13,102 | py | Python | mkt/stats/views.py | clouserw/zamboni | c4a568b69c1613f27da41d46328b2975cbdc1c07 | [
"BSD-3-Clause"
] | null | null | null | mkt/stats/views.py | clouserw/zamboni | c4a568b69c1613f27da41d46328b2975cbdc1c07 | [
"BSD-3-Clause"
] | null | null | null | mkt/stats/views.py | clouserw/zamboni | c4a568b69c1613f27da41d46328b2975cbdc1c07 | [
"BSD-3-Clause"
] | null | null | null | from django import http
import commonware
import requests
from rest_framework.exceptions import ParseError
from rest_framework.generics import ListAPIView
from rest_framework.permissions import AllowAny, BasePermission
from rest_framework.response import Response
from rest_framework.views import APIView
import mkt
fr... | 32.59204 | 79 | 0.579225 |
79727b126473c3897131a3a54999e6e0e7fe6ff9 | 1,873 | py | Python | python/ray/util/client/options.py | Rid039/ray | eb9330df07150adbb9a4e334ace6b1a3ba6602a2 | [
"Apache-2.0"
] | 1 | 2021-01-29T12:24:02.000Z | 2021-01-29T12:24:02.000Z | python/ray/experimental/client/options.py | mfitton/ray | fece8db70d703da1aad192178bd50923e83cc99a | [
"Apache-2.0"
] | 22 | 2021-06-05T07:12:33.000Z | 2022-03-19T07:16:25.000Z | python/ray/experimental/client/options.py | mfitton/ray | fece8db70d703da1aad192178bd50923e83cc99a | [
"Apache-2.0"
] | 2 | 2020-05-22T15:36:27.000Z | 2020-05-22T15:52:03.000Z | from typing import Any
from typing import Dict
from typing import Optional
options = {
"num_returns": (int, lambda x: x >= 0,
"The keyword 'num_returns' only accepts 0 "
"or a positive integer"),
"num_cpus": (),
"num_gpus": (),
"resources": (),
"accelerator_t... | 34.054545 | 77 | 0.533903 |
79727b3da6fe1fe919bd47cb1a4853f90d330f7a | 14,347 | py | Python | tasks/libs/common/gitlab.py | Jeremyyang920/datadog-agent | 11e65147e366cbff7a0ae9f5feb8db9930173911 | [
"Apache-2.0"
] | 35 | 2021-05-17T08:53:24.000Z | 2022-02-07T11:30:53.000Z | tasks/libs/common/gitlab.py | Jeremyyang920/datadog-agent | 11e65147e366cbff7a0ae9f5feb8db9930173911 | [
"Apache-2.0"
] | 30 | 2021-09-02T17:19:21.000Z | 2022-03-21T04:13:45.000Z | tasks/libs/common/gitlab.py | Jeremyyang920/datadog-agent | 11e65147e366cbff7a0ae9f5feb8db9930173911 | [
"Apache-2.0"
] | 11 | 2021-07-07T03:55:41.000Z | 2021-11-07T03:44:13.000Z | import errno
import json
import os
import platform
import re
import subprocess
from urllib.parse import quote
from invoke.exceptions import Exit
errno_regex = re.compile(r".*\[Errno (\d+)\] (.*)")
__all__ = ["Gitlab"]
class Gitlab(object):
BASE_URL = "https://gitlab.ddbuild.io/api/v4"
def __init__(self, a... | 40.528249 | 122 | 0.60368 |
79727b60a906231b50103ab51bfadf9a6ad72052 | 982 | py | Python | glut_example3d.py | TimSC/py-modern-opengl | 0e20eac40e6686ae8ffde22a578b1b3f03bd43b5 | [
"Unlicense"
] | 11 | 2015-10-12T06:09:00.000Z | 2021-02-28T07:55:52.000Z | glut_example3d.py | TimSC/py-modern-opengl | 0e20eac40e6686ae8ffde22a578b1b3f03bd43b5 | [
"Unlicense"
] | null | null | null | glut_example3d.py | TimSC/py-modern-opengl | 0e20eac40e6686ae8ffde22a578b1b3f03bd43b5 | [
"Unlicense"
] | 1 | 2017-06-07T13:56:33.000Z | 2017-06-07T13:56:33.000Z | #Based on https://github.com/Habitats/uni/blob/master/img_processing/project/graphics_modern2.py
from OpenGL.GLUT import *
from OpenGL.GLUT.freeglut import *
import common3d
import OpenGL.GL as gl
aspect = 1.
params = None
width, height = None, None
def draw():
common3d.draw(params, aspect)
glutSwapBuffers()
def ... | 21.347826 | 96 | 0.752546 |
79727d971f1551f7d3c619f09e9c43a5ceb7f3e9 | 4,375 | py | Python | test/task_running_resources_test.py | stratasan/luigi | 00a5e458c3f1320139005624039fc205671b3bbe | [
"Apache-2.0"
] | null | null | null | test/task_running_resources_test.py | stratasan/luigi | 00a5e458c3f1320139005624039fc205671b3bbe | [
"Apache-2.0"
] | null | null | null | test/task_running_resources_test.py | stratasan/luigi | 00a5e458c3f1320139005624039fc205671b3bbe | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | 31.47482 | 99 | 0.665143 |
79727e30a4d804c4d306239a8eec2a1471042409 | 32,916 | py | Python | flaskeralegis/libri.py | tiagocordeiro/flask-eralegis | 674f7acc19c5a70e7a2b4018e3694fd0fbe68a05 | [
"MIT"
] | 1 | 2018-05-02T12:46:20.000Z | 2018-05-02T12:46:20.000Z | flaskeralegis/libri.py | tiagocordeiro/flask-eralegis | 674f7acc19c5a70e7a2b4018e3694fd0fbe68a05 | [
"MIT"
] | 40 | 2018-05-02T13:28:57.000Z | 2022-03-31T03:23:33.000Z | flaskeralegis/libri.py | tiagocordeiro/flask-eralegis | 674f7acc19c5a70e7a2b4018e3694fd0fbe68a05 | [
"MIT"
] | null | null | null | liber_al_c_i = """
1. Had! A manifestação de Nuit.
2. O desvelar da companhia do céu.
3. Todo homem e toda mulher é uma estrela.
4. Todo número é infinito; não há diferença.
5. Ajuda-me, ó senhor guerreiro de Tebas, no meu desvelar perante os Filhos dos homens!
6. Sede tu Hadit, meu centro secreto, meu coração e l... | 67.038697 | 904 | 0.76917 |
79727ea6bea04bb19fd21c9f87e3618788bff520 | 2,192 | py | Python | typo/wsgi.py | SmartTeleMax/typod | 1f559929535cdc104221f531b9921ad58a010dc3 | [
"MIT"
] | 3 | 2016-01-24T11:59:34.000Z | 2018-07-04T06:00:18.000Z | typo/wsgi.py | SmartTeleMax/typod | 1f559929535cdc104221f531b9921ad58a010dc3 | [
"MIT"
] | null | null | null | typo/wsgi.py | SmartTeleMax/typod | 1f559929535cdc104221f531b9921ad58a010dc3 | [
"MIT"
] | 1 | 2021-04-12T21:17:51.000Z | 2021-04-12T21:17:51.000Z | # -*- coding: utf-8 -*-
import cgi
import sys
import json
from itertools import product
import click
from correctors import TYPO_CLASSES
def make_app(corrector, format, limit=10):
def application(env, start_response):
method = env['REQUEST_METHOD']
if method == 'GET':
qs = cgi.parse_... | 33.212121 | 81 | 0.573449 |
79727eb05ebbbb82579220d9d6bab5b3c44091d5 | 11,884 | py | Python | intersight/model/storage_physical_disk_extension_response.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/storage_physical_disk_extension_response.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/storage_physical_disk_extension_response.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 47.536 | 1,678 | 0.641198 |
79727fab1d0b8d7ef4f197c7a4d5831c314c1c86 | 3,298 | py | Python | tests/test_search.py | adm-github/libtvdb | 1a686ed98b7ee02b39415c20e3652a00b69df4d8 | [
"MIT"
] | null | null | null | tests/test_search.py | adm-github/libtvdb | 1a686ed98b7ee02b39415c20e3652a00b69df4d8 | [
"MIT"
] | null | null | null | tests/test_search.py | adm-github/libtvdb | 1a686ed98b7ee02b39415c20e3652a00b69df4d8 | [
"MIT"
] | null | null | null | """Test searching for shows."""
import datetime
from tests.context import BaseTVDBTest
from tests.context import libtvdb
from libtvdb.model.enums import ShowStatus
class SearchTestSuite(BaseTVDBTest):
"""Show search test cases."""
expected_shows = [
"The Flash",
"Doctor Who",
"Myth... | 34.354167 | 119 | 0.589448 |
79728004c78d7f0e5b7c0544d0fd898ff5ea6db5 | 10,979 | py | Python | libs/JoyMapper/joy.py | CleitonLC/GamesRetro-Web | 40c671d52c148087df6780c5fc5a6200086cc215 | [
"MIT"
] | null | null | null | libs/JoyMapper/joy.py | CleitonLC/GamesRetro-Web | 40c671d52c148087df6780c5fc5a6200086cc215 | [
"MIT"
] | null | null | null | libs/JoyMapper/joy.py | CleitonLC/GamesRetro-Web | 40c671d52c148087df6780c5fc5a6200086cc215 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import logging
#logging.basicConfig(level=logging.DEBUG)
logging.basicConfig()
log = logging.getLogger(__name__)
import sys
from subprocess import *
import time
import configparser
import pygame.joystick
import pygame
from libs.JoyMapper.events import *
from libs.JoyMapper.inputs import *
class... | 38.795053 | 179 | 0.61308 |
797280ca657f63c7b03ffbc06af06d4076991c67 | 2,361 | py | Python | tests/table/test_case_study_metrics_table.py | Kaufi-Jonas/VaRA-Tool-Suite | 31563896ad7dd1c1a147202b0c5c9fffe772b803 | [
"BSD-2-Clause"
] | null | null | null | tests/table/test_case_study_metrics_table.py | Kaufi-Jonas/VaRA-Tool-Suite | 31563896ad7dd1c1a147202b0c5c9fffe772b803 | [
"BSD-2-Clause"
] | null | null | null | tests/table/test_case_study_metrics_table.py | Kaufi-Jonas/VaRA-Tool-Suite | 31563896ad7dd1c1a147202b0c5c9fffe772b803 | [
"BSD-2-Clause"
] | null | null | null | """Test bug overview table."""
import unittest
from tests.test_utils import run_in_test_environment, UnitTestFixtures
from varats.paper_mgmt.paper_config import load_paper_config
from varats.projects.discover_projects import initialize_projects
from varats.tables.case_study_metrics_table import CaseStudyMetricsTable
f... | 35.238806 | 88 | 0.653537 |
797280f9e643738cbb74bfbac15aec239701abfa | 153 | py | Python | src/attrbench/metrics/sensitivity_n/__init__.py | zoeparman/benchmark | 96331b7fa0db84f5f422b52cae2211b41bbd15ce | [
"MIT"
] | null | null | null | src/attrbench/metrics/sensitivity_n/__init__.py | zoeparman/benchmark | 96331b7fa0db84f5f422b52cae2211b41bbd15ce | [
"MIT"
] | 7 | 2020-03-02T13:03:50.000Z | 2022-03-12T00:16:20.000Z | src/attrbench/metrics/sensitivity_n/__init__.py | zoeparman/benchmark | 96331b7fa0db84f5f422b52cae2211b41bbd15ce | [
"MIT"
] | null | null | null | from .sensitivity_n import sensitivity_n, seg_sensitivity_n, SensitivityN, SegSensitivityN
from .result import SegSensitivityNResult, SensitivityNResult
| 51 | 90 | 0.882353 |
797281758eb6bb35c2fe05c83b6160cbb45756d6 | 405,992 | py | Python | msl/equipment/resources/thorlabs/kinesis/api_functions.py | SwiftyMorgan/msl-equipment | 56bc467e97a2a0a60aa6f031dd30bf1d98ebda5c | [
"MIT"
] | 9 | 2019-07-26T05:07:58.000Z | 2022-03-09T08:45:23.000Z | msl/equipment/resources/thorlabs/kinesis/api_functions.py | SwiftyMorgan/msl-equipment | 56bc467e97a2a0a60aa6f031dd30bf1d98ebda5c | [
"MIT"
] | 7 | 2018-06-24T09:14:51.000Z | 2022-01-16T20:16:33.000Z | msl/equipment/resources/thorlabs/kinesis/api_functions.py | SwiftyMorgan/msl-equipment | 56bc467e97a2a0a60aa6f031dd30bf1d98ebda5c | [
"MIT"
] | 7 | 2019-02-07T22:08:37.000Z | 2022-03-09T08:54:04.000Z | """
C Functions defined in Thorlabs Kinesis v1.14.10
"""
from ctypes import c_char, c_byte, c_bool, c_short, c_ushort, c_int16, c_uint16, \
c_int, c_uint, c_int32, c_int64, c_double, c_long, c_float, c_char_p, POINTER
from msl.equipment.resources.utils import BYTE, WORD, DWORD
from .callbacks import MotionControl... | 40.066318 | 86 | 0.623143 |
797281e314e9f692151299fceddba2253c4b4e7a | 56 | py | Python | ex001a.py | emerfelippini/Curso_em_video-Aulas_Python | 5b1d78b259732bb9bbad27cd30ce91bba77c5ef0 | [
"MIT"
] | null | null | null | ex001a.py | emerfelippini/Curso_em_video-Aulas_Python | 5b1d78b259732bb9bbad27cd30ce91bba77c5ef0 | [
"MIT"
] | null | null | null | ex001a.py | emerfelippini/Curso_em_video-Aulas_Python | 5b1d78b259732bb9bbad27cd30ce91bba77c5ef0 | [
"MIT"
] | null | null | null | # msg = 'Olá, Mundo!'
# print(msg)
print('Olá, Mundo!')
| 14 | 21 | 0.571429 |
7972835866c896d2eeb73db2692338e5c1499f68 | 6,294 | py | Python | src/rating_operator/api/schema.py | alterway/rating-operator-api | ef0dbd68c0be794c3397669e42bc839456fc7d7f | [
"Apache-2.0"
] | 12 | 2021-02-16T17:11:33.000Z | 2021-06-03T13:57:48.000Z | src/rating_operator/api/schema.py | alterway/rating-operator-api | ef0dbd68c0be794c3397669e42bc839456fc7d7f | [
"Apache-2.0"
] | null | null | null | src/rating_operator/api/schema.py | alterway/rating-operator-api | ef0dbd68c0be794c3397669e42bc839456fc7d7f | [
"Apache-2.0"
] | null | null | null | from typing import AnyStr, Dict, List, Union
class ValidationError(Exception):
"""Simple class to handle Rules and Metrics validation error."""
pass
class Rules:
"""
Validate a Rules object.
:content (Dict) A dictionary containing the 'rules' key
This class is only meant to be instanciate... | 33.657754 | 90 | 0.569431 |
79728663fedbcf75b9abafd36245f24388323b42 | 34,817 | py | Python | esrally/track/loader.py | danielmitterdorfer/rally | d662198c96063b31b18dab171d3772ca9cb26be1 | [
"Apache-2.0"
] | null | null | null | esrally/track/loader.py | danielmitterdorfer/rally | d662198c96063b31b18dab171d3772ca9cb26be1 | [
"Apache-2.0"
] | null | null | null | esrally/track/loader.py | danielmitterdorfer/rally | d662198c96063b31b18dab171d3772ca9cb26be1 | [
"Apache-2.0"
] | null | null | null | import json
import logging
import os
import glob
import urllib.error
import jinja2
import jinja2.exceptions
import jsonschema
import tabulate
from esrally import exceptions, time, PROGRAM_NAME
from esrally.track import params, track
from esrally.utils import io, convert, net, console, modules, repo
logger = logging.g... | 50.386397 | 142 | 0.623661 |
79728785ab2f42405c81365ccca8cd8e58a0a6e0 | 218 | py | Python | map-app/server/server/urls.py | bocchifrancescog/map-app | 857ffce9e9558aeb1f92ec922cd7c5a076bce334 | [
"MIT"
] | null | null | null | map-app/server/server/urls.py | bocchifrancescog/map-app | 857ffce9e9558aeb1f92ec922cd7c5a076bce334 | [
"MIT"
] | null | null | null | map-app/server/server/urls.py | bocchifrancescog/map-app | 857ffce9e9558aeb1f92ec922cd7c5a076bce334 | [
"MIT"
] | null | null | null | """server URL Configuration """
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^api/map/', include('map.urls')),
url(r'^admin/', include(admin.site.urls)),
] | 21.8 | 46 | 0.678899 |
797287c774d6a2d1573ed5b5a02e696b2809a9f6 | 12,062 | py | Python | Transfer_Region/py_analysis/analysis/anim_svg_edges.py | furkankurtoglu/whole-well | cbafce776256f1a78ca52141a365f4690601c339 | [
"BSD-3-Clause"
] | null | null | null | Transfer_Region/py_analysis/analysis/anim_svg_edges.py | furkankurtoglu/whole-well | cbafce776256f1a78ca52141a365f4690601c339 | [
"BSD-3-Clause"
] | null | null | null | Transfer_Region/py_analysis/analysis/anim_svg_edges.py | furkankurtoglu/whole-well | cbafce776256f1a78ca52141a365f4690601c339 | [
"BSD-3-Clause"
] | null | null | null | #
# anim_svg.py: render/animate PhysiCell .svg files, using left/right arrows on keyboard
#
# Usage:
# python anim_svg.py <show_nucleus start_index axes_min axes_max>
# i.e., the arguments <...> are optional and have defaults.
#
# Keyboard arrows: right/left arrows will single step forward/backward; up/down will ... | 30.536709 | 149 | 0.625601 |
797287db7156aab9373957bddff71c901a0309b1 | 2,496 | py | Python | venv/lib/python3.8/site-packages/anyio/_core/_typedattr.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 749 | 2018-10-08T13:12:22.000Z | 2022-03-28T17:43:16.000Z | venv/lib/python3.8/site-packages/anyio/_core/_typedattr.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 357 | 2018-10-07T18:12:40.000Z | 2022-03-30T20:38:29.000Z | venv/lib/python3.8/site-packages/anyio/_core/_typedattr.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 66 | 2018-10-09T05:18:54.000Z | 2022-03-21T08:37:14.000Z | import sys
from typing import Any, Callable, Dict, Mapping, TypeVar, Union, overload
from ._exceptions import TypedAttributeLookupError
if sys.version_info >= (3, 8):
from typing import final
else:
from typing_extensions import final
T_Attr = TypeVar('T_Attr')
T_Default = TypeVar('T_Default')
undefined = obj... | 31.2 | 96 | 0.661058 |
797288427f84f0438176bdd44134549bac594481 | 20,309 | py | Python | hw2/train_pg.deprecated.py | zyxue/berkeley-cs294-hw | 30d50c7c46c106dbfd12d78e561eb2410be1e6d1 | [
"MIT"
] | 1 | 2019-09-20T00:49:04.000Z | 2019-09-20T00:49:04.000Z | hw2/train_pg.deprecated.py | zyxue/berkeley-cs294-hw | 30d50c7c46c106dbfd12d78e561eb2410be1e6d1 | [
"MIT"
] | null | null | null | hw2/train_pg.deprecated.py | zyxue/berkeley-cs294-hw | 30d50c7c46c106dbfd12d78e561eb2410be1e6d1 | [
"MIT"
] | 2 | 2018-09-11T19:19:47.000Z | 2020-01-17T16:55:40.000Z | import numpy as np
import tensorflow as tf
import gym, roboschool
import logz
import os
import time
import inspect
from multiprocessing import Process
import utils as U
##################################################
# Utilities
##################################################
def build_mlp(
input_place... | 36.658845 | 146 | 0.510463 |
7972885747189a1878baa57c9ec0a796e26366a5 | 8,184 | py | Python | venv/lib/python2.7/site-packages/ansible/modules/cloud/amazon/ec2_snapshot_facts.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 1 | 2021-04-02T08:08:39.000Z | 2021-04-02T08:08:39.000Z | venv/lib/python2.7/site-packages/ansible/modules/cloud/amazon/ec2_snapshot_facts.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 5 | 2020-02-26T20:10:50.000Z | 2021-09-23T23:23:18.000Z | venv/lib/python2.7/site-packages/ansible/modules/cloud/amazon/ec2_snapshot_facts.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 1 | 2020-05-03T01:13:16.000Z | 2020-05-03T01:13:16.000Z | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | 32.86747 | 156 | 0.693671 |
79728a61fec22df161bd6030d059a837cbcdaeb6 | 3,192 | py | Python | transformer_model.py | tsteternlieb/CV | e149767a5c131b0f78f7390f42eff204ff649815 | [
"MIT"
] | null | null | null | transformer_model.py | tsteternlieb/CV | e149767a5c131b0f78f7390f42eff204ff649815 | [
"MIT"
] | null | null | null | transformer_model.py | tsteternlieb/CV | e149767a5c131b0f78f7390f42eff204ff649815 | [
"MIT"
] | null | null | null | """
My Transformer implementations
"""
import torch
from torch import nn
import math
class DotProdAttention(nn.Module):
"""calculating dot product self attention"""
def __init__(self, in_dim, out_dim):
super(DotProdAttention, self).__init__()
self.key = nn.Linear(in_dim, out_dim)
se... | 26.6 | 79 | 0.597431 |
79728a884f28257381002a46ab9d4fa200a36af2 | 15,591 | py | Python | jishaku/paginators.py | edazpotato/usefull-discord-bot | 81b35e73b135afc887033510a635738899793264 | [
"MIT"
] | 2 | 2020-10-16T10:01:18.000Z | 2021-11-15T09:43:34.000Z | jishaku/paginators.py | edazpotato/usefull-discord-bot | 81b35e73b135afc887033510a635738899793264 | [
"MIT"
] | null | null | null | jishaku/paginators.py | edazpotato/usefull-discord-bot | 81b35e73b135afc887033510a635738899793264 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
jishaku.paginators
~~~~~~~~~~~~~~~~~~
Paginator-related tools and interfaces for Jishaku.
:copyright: (c) 2020 Devon (Gorialis) R
:license: MIT, see LICENSE for more details.
"""
import asyncio
import collections
import re
import discord
from discord.ext import commands
from jishaku.h... | 32.617155 | 118 | 0.595343 |
79728aa0df63c7dc6bf91a7a015cd177a81dd43c | 2,534 | py | Python | paas-ce/paas/esb/components/bk/apisv2/cc/transfer_host_to_resourcemodule.py | renmcc/bk-PaaS | 1c9e4e9cfb40fc3375cd6b5f08af8c84203de246 | [
"Apache-2.0"
] | 767 | 2019-03-25T06:35:43.000Z | 2022-03-30T08:57:51.000Z | paas-ce/paas/esb/components/bk/apisv2/cc/transfer_host_to_resourcemodule.py | renmcc/bk-PaaS | 1c9e4e9cfb40fc3375cd6b5f08af8c84203de246 | [
"Apache-2.0"
] | 194 | 2019-03-29T07:16:41.000Z | 2022-03-30T06:17:49.000Z | paas-ce/paas/esb/components/bk/apisv2/cc/transfer_host_to_resourcemodule.py | renmcc/bk-PaaS | 1c9e4e9cfb40fc3375cd6b5f08af8c84203de246 | [
"Apache-2.0"
] | 381 | 2019-03-25T07:19:54.000Z | 2022-03-29T03:22:42.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 30.166667 | 305 | 0.573007 |
79728ab5141b897d60363c374b8d4d6c1cd8ba89 | 1,178 | py | Python | fdk_client/application/models/CartCheckoutDetailRequest.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/application/models/CartCheckoutDetailRequest.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/application/models/CartCheckoutDetailRequest.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | """Application Models."""
from marshmallow import fields, Schema
from marshmallow.validate import OneOf
from ..enums import *
from ..models.BaseSchema import BaseSchema
from .StaffCheckout import StaffCheckout
class CartCheckoutDetailRequest(BaseSchema):
# Cart swagger.json
... | 15.102564 | 57 | 0.687606 |
79728b1bd2b8d167db6d863ca8bf706c2b12c956 | 9,578 | py | Python | examples/ale/train_dqn_ale.py | WhenTheyCry96/chainerrl | 0f32aae2855dbb6288ae628be6271739ced6c42c | [
"MIT"
] | 2 | 2020-05-20T06:15:20.000Z | 2020-05-20T06:15:27.000Z | examples/ale/train_dqn_ale.py | WhenTheyCry96/chainerrl | 0f32aae2855dbb6288ae628be6271739ced6c42c | [
"MIT"
] | null | null | null | examples/ale/train_dqn_ale.py | WhenTheyCry96/chainerrl | 0f32aae2855dbb6288ae628be6271739ced6c42c | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import argparse
import os
import chainer
from chainer import... | 39.254098 | 78 | 0.620902 |
79728c4881595e18300ffe22f4fc8c430e8bfcdc | 1,981 | py | Python | scattertext/test/test_WhitespaceNLP.py | shettyprithvi/scattertext | a15613b6feef3ddc56c03aadb8e1e629d28a427d | [
"Apache-2.0"
] | 1,823 | 2016-07-28T00:25:56.000Z | 2022-03-30T12:33:57.000Z | scattertext/test/test_WhitespaceNLP.py | shettyprithvi/scattertext | a15613b6feef3ddc56c03aadb8e1e629d28a427d | [
"Apache-2.0"
] | 92 | 2016-07-28T23:13:20.000Z | 2022-01-24T03:53:38.000Z | scattertext/test/test_WhitespaceNLP.py | shettyprithvi/scattertext | a15613b6feef3ddc56c03aadb8e1e629d28a427d | [
"Apache-2.0"
] | 271 | 2016-12-26T12:56:08.000Z | 2022-03-24T19:35:13.000Z | from unittest import TestCase
from scattertext.WhitespaceNLP import whitespace_nlp_with_sentences, whitespace_nlp, Tok, Doc
class TestWhitespaceNLP(TestCase):
def test_whitespace_nlp(self):
raw = '''Hi! My name
is Jason. You can call me
Mr. J. Is that your name too?
Ha. Ha ha.
'''
doc = whitespace_nlp... | 37.377358 | 93 | 0.636042 |
79728c90a63bd1ead638fa4946627f6893c17ebb | 6,581 | py | Python | software/python/simple_pendulum/model/pendulum_plant.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 15 | 2021-10-16T04:50:34.000Z | 2022-03-26T23:54:19.000Z | software/python/simple_pendulum/model/pendulum_plant.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 17 | 2021-11-30T22:17:28.000Z | 2022-03-21T12:28:45.000Z | software/python/simple_pendulum/model/pendulum_plant.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 13 | 2021-10-18T07:45:29.000Z | 2022-03-22T12:56:33.000Z | """
Pendulum Plant
==============
"""
import numpy as np
import yaml
class PendulumPlant:
def __init__(self, mass=1.0, length=0.5, damping=0.1, gravity=9.81,
coulomb_fric=0.0, inertia=None, torque_limit=np.inf):
"""
The PendulumPlant class contains the kinematics and dynamics
... | 28.613043 | 78 | 0.532594 |
79728fc6c47f049dfdf1c207026a0017762d8901 | 30,977 | py | Python | tensorboard/program.py | hfiller/tensorboard | 1597e6d39b89717b43b35c7871f62e30b1d0ade4 | [
"Apache-2.0"
] | null | null | null | tensorboard/program.py | hfiller/tensorboard | 1597e6d39b89717b43b35c7871f62e30b1d0ade4 | [
"Apache-2.0"
] | null | null | null | tensorboard/program.py | hfiller/tensorboard | 1597e6d39b89717b43b35c7871f62e30b1d0ade4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.672909 | 108 | 0.620815 |
7972900a2bdd1efd3566e781c6c68826ebb2d7b3 | 708 | py | Python | b3/composites/mempriority.py | richshaw2015/behavior3py | bbb1aaef7698b776fe3ba87914ccede3b0b0dd52 | [
"MIT"
] | null | null | null | b3/composites/mempriority.py | richshaw2015/behavior3py | bbb1aaef7698b776fe3ba87914ccede3b0b0dd52 | [
"MIT"
] | null | null | null | b3/composites/mempriority.py | richshaw2015/behavior3py | bbb1aaef7698b776fe3ba87914ccede3b0b0dd52 | [
"MIT"
] | null | null | null | import b3
__all__ = ['MemPriority']
class MemPriority(b3.Composite):
def __init__(self, children=None):
super(MemPriority, self).__init__(children)
def open(self, tick):
tick.blackboard.set('running_child', 0, tick.tree.id, self.id)
def tick(self, tick):
idx = tick.blackboard.ge... | 27.230769 | 82 | 0.590395 |
7972906654116934ada36b49d20a928f43966c17 | 397 | py | Python | application/tradiction/wsgi.py | dipendrabharati/csc648-SoftwareEngineeringProject | e011fd327e924af92c7ec481d0b33de9315bf7c1 | [
"MIT"
] | null | null | null | application/tradiction/wsgi.py | dipendrabharati/csc648-SoftwareEngineeringProject | e011fd327e924af92c7ec481d0b33de9315bf7c1 | [
"MIT"
] | null | null | null | application/tradiction/wsgi.py | dipendrabharati/csc648-SoftwareEngineeringProject | e011fd327e924af92c7ec481d0b33de9315bf7c1 | [
"MIT"
] | null | null | null | """
WSGI config for tradiction project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
7972909e56d961b8b4612e6cbefeb379e737479d | 5,438 | py | Python | bot.py | SunilBoopalan/pokebot-discord-bot | b84a03b5db9b58292f5c313fbe56e8918fd22405 | [
"MIT"
] | null | null | null | bot.py | SunilBoopalan/pokebot-discord-bot | b84a03b5db9b58292f5c313fbe56e8918fd22405 | [
"MIT"
] | null | null | null | bot.py | SunilBoopalan/pokebot-discord-bot | b84a03b5db9b58292f5c313fbe56e8918fd22405 | [
"MIT"
] | null | null | null | import discord
import random
from discord.ext import commands
TOKEN = open("token.txt", "r").readline()
client = commands.Bot(command_prefix = '~')
client.remove_command('help')
@client.command()
async def wholesome(ctx):
responses = open('./text files/quotes.txt').read().splitlines()
random.seed... | 39.693431 | 136 | 0.65833 |
797292531b0138beedfa8216a18e1c9cb6aa817e | 38,240 | py | Python | pychron/git_archive/repo_manager.py | WiscAr/pychron | 8d335d53ba7a5fc70760d9a7cb60540ad169ae84 | [
"Apache-2.0"
] | null | null | null | pychron/git_archive/repo_manager.py | WiscAr/pychron | 8d335d53ba7a5fc70760d9a7cb60540ad169ae84 | [
"Apache-2.0"
] | 80 | 2018-07-17T20:10:20.000Z | 2021-08-17T15:38:24.000Z | pychron/git_archive/repo_manager.py | UManPychron/pychron | b84c9fd70072f9cbda30abe2c471e64fe3dd75d8 | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2013 Jake Ross
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | 32.795883 | 123 | 0.519535 |
7972927406dd4855f3742aff96877803a2d52704 | 66,718 | py | Python | src/sage/modules/with_basis/morphism.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 1,742 | 2015-01-04T07:06:13.000Z | 2022-03-30T11:32:52.000Z | src/sage/modules/with_basis/morphism.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 66 | 2015-03-19T19:17:24.000Z | 2022-03-16T11:59:30.000Z | src/sage/modules/with_basis/morphism.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 495 | 2015-01-10T10:23:18.000Z | 2022-03-24T22:06:11.000Z | # -*- coding: utf-8 -*-
r"""
Module with basis morphisms
This module contains a hierarchy of classes for morphisms of modules
with a basis (category :class:`Modules.WithBasis`):
- :class:`ModuleMorphism`
- :class:`ModuleMorphismByLinearity`
- :class:`ModuleMorphismFromMatrix`
- :class:`ModuleMorphismFromFunction`
- :... | 40.856093 | 220 | 0.576021 |
797292e603d797821aa2380fb654f48eb33c6359 | 160 | py | Python | CodeCoverage/code_coverage.py | TheStarTiger/Simplii | 36274414976f63e6c61fef443f9ed74597f603f9 | [
"MIT"
] | null | null | null | CodeCoverage/code_coverage.py | TheStarTiger/Simplii | 36274414976f63e6c61fef443f9ed74597f603f9 | [
"MIT"
] | 5 | 2021-11-28T18:55:26.000Z | 2021-12-02T15:43:11.000Z | CodeCoverage/code_coverage.py | TheStarTiger/Simplii | 36274414976f63e6c61fef443f9ed74597f603f9 | [
"MIT"
] | 1 | 2021-12-01T02:33:43.000Z | 2021-12-01T02:33:43.000Z | import coverage
import os
cov = coverage.Coverage()
cov.load()
with open(os.devnull, "w") as f:
total = cov.report(file=f)
print("{0:.0f}%".format(total)) | 17.777778 | 32 | 0.66875 |
7972938d30f8f58fdbf2704767b469140238cb89 | 1,186 | py | Python | Functions/Check_Armstrong.py | jarvis-1805/DSAwithPYTHON | 872073d1b8d0001ea8b1a54b5e327dd0c1c406f2 | [
"Apache-2.0"
] | 1 | 2021-03-21T18:54:34.000Z | 2021-03-21T18:54:34.000Z | Functions/Check_Armstrong.py | jarvis-1805/DSAwithPYTHON | 872073d1b8d0001ea8b1a54b5e327dd0c1c406f2 | [
"Apache-2.0"
] | null | null | null | Functions/Check_Armstrong.py | jarvis-1805/DSAwithPYTHON | 872073d1b8d0001ea8b1a54b5e327dd0c1c406f2 | [
"Apache-2.0"
] | null | null | null | '''
Check Armstrong
Write a Program to determine if the given number is Armstrong number or not. Print true if number is armstrong, otherwise print false.
An Armstrong number is a number (with digits n) such that the sum of its digits raised to nth power is equal to the number itself.
For example,
371, as 3^3 + 7^3 +... | 18.246154 | 134 | 0.568297 |
797294a6f209e82927bc0b674a896d200652c19d | 19,075 | py | Python | caiss_MAD.py | SoftDevX/MJDB | 386bbb464fbd24c02f0d87da30e0dd11da65b764 | [
"MIT"
] | null | null | null | caiss_MAD.py | SoftDevX/MJDB | 386bbb464fbd24c02f0d87da30e0dd11da65b764 | [
"MIT"
] | null | null | null | caiss_MAD.py | SoftDevX/MJDB | 386bbb464fbd24c02f0d87da30e0dd11da65b764 | [
"MIT"
] | null | null | null | from PyQt5 import QtWidgets, QtCore, QtPrintSupport
from PyQt5.QtCore import QDate, QTime, Qt, QTimer
from PyQt5.QtGui import *
from PyQt5.QtPrintSupport import QPrinter
from PyQt5.QtWidgets import *
from database import MyCursor
from PyQt5 import QtGui
from datetime import datetime
from PyQt5.QtGui import QIntValidato... | 44.672131 | 160 | 0.605085 |
797294d54f9c02cebe5efd83812e6801c4631803 | 1,090 | py | Python | eureka/lib/models_c/__init__.py | iancrossfield/Eureka | 88b178d1b830c16915045b6387cf91955e0071e2 | [
"MIT"
] | null | null | null | eureka/lib/models_c/__init__.py | iancrossfield/Eureka | 88b178d1b830c16915045b6387cf91955e0071e2 | [
"MIT"
] | null | null | null | eureka/lib/models_c/__init__.py | iancrossfield/Eureka | 88b178d1b830c16915045b6387cf91955e0071e2 | [
"MIT"
] | null | null | null | import os
import re
import sys
temp = str(__import__("models_c"))
dir = re.findall('.+\'(.+)__init',temp)[0]
sys.path.append(dir+'ext_func/')
sys.path.append(dir+'py_func/')
ext = os.listdir(dir+'ext_func/')
namespace = {}
for mod in ext:
if mod.endswith('.so'):
try:
#Python 2
e... | 28.684211 | 71 | 0.543119 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.