hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
492cd1b28c554751c45fd1e5cbf22b48084d928c | 362 | py | Python | morseus/app.py | cmin764/morseus | 8754d2e27e710fb556667ddccb064c11ab9d0372 | [
"MIT"
] | 23 | 2018-07-03T19:16:00.000Z | 2021-09-14T11:28:54.000Z | morseus/app.py | cmin764/morseus | 8754d2e27e710fb556667ddccb064c11ab9d0372 | [
"MIT"
] | null | null | null | morseus/app.py | cmin764/morseus | 8754d2e27e710fb556667ddccb064c11ab9d0372 | [
"MIT"
] | 2 | 2018-07-07T15:31:12.000Z | 2019-07-31T12:58:48.000Z | """Morseus application controller."""
from kivy.app import App
from morseus import settings
from morseus.nui import MorseusLayout
class Morseus(App):
def build(self):
self.icon = settings.ICON
return MorseusLayout()
def on_stop(self):
# Stop sending Morse signals in case we're doi... | 19.052632 | 62 | 0.685083 |
94b40a0888d41111ecce0dc9891cfa7f836f9fcc | 1,865 | py | Python | apiuser/reward/serializers.py | ngelrojas/cotizate-back | ba732137778e5a64037b09d564da6a6e4a88393e | [
"MIT"
] | null | null | null | apiuser/reward/serializers.py | ngelrojas/cotizate-back | ba732137778e5a64037b09d564da6a6e4a88393e | [
"MIT"
] | 16 | 2019-12-18T23:38:07.000Z | 2021-06-25T15:35:21.000Z | apiuser/reward/serializers.py | ngelrojas/cotizate-back | ba732137778e5a64037b09d564da6a6e4a88393e | [
"MIT"
] | null | null | null | from rest_framework import serializers
from core.models import Reward
class RewardSerializer(serializers.ModelSerializer):
"""serializer for rewards object"""
title = serializers.CharField(max_length=255)
price = serializers.DecimalField(
max_digits=9,
decimal_places=2,
... | 29.603175 | 58 | 0.536193 |
4e973562317a2955363bbb02201da769750adb96 | 200 | py | Python | vpn-node-docker/sentinel/config.py | 14avengers/sentinel | 825768d2242ad28896c41684bc08e8527cdf2f30 | [
"MIT"
] | 342 | 2017-08-21T20:12:56.000Z | 2022-03-19T17:58:25.000Z | vpn-node-docker/sentinel/config.py | 14avengers/sentinel | 825768d2242ad28896c41684bc08e8527cdf2f30 | [
"MIT"
] | 57 | 2017-11-13T11:16:47.000Z | 2022-03-01T13:54:31.000Z | vpn-node-docker/sentinel/config.py | 14avengers/sentinel | 825768d2242ad28896c41684bc08e8527cdf2f30 | [
"MIT"
] | 72 | 2017-11-23T05:13:24.000Z | 2022-02-25T14:18:33.000Z | # coding=utf-8
MASTER_NODE_URL = 'https://api.sentinelgroup.io'
KEYSTORE_FILE_PATH = '/root/.sentinel/keystore'
CONFIG_DATA_PATH = '/root/.sentinel/config.data'
LIMIT_1GB = (1.0 * 1024 * 1024 * 1024)
| 33.333333 | 48 | 0.735 |
f36799f1677b03971d983f116780879e66b530dc | 909 | py | Python | selectByAttributes.py | albert-decatur/gis-utils | a65d2ed4447c57e7275c5b7d599b305fe976b5f4 | [
"MIT"
] | 1 | 2015-09-28T19:58:31.000Z | 2015-09-28T19:58:31.000Z | selectByAttributes.py | albert-decatur/gis-utils | a65d2ed4447c57e7275c5b7d599b305fe976b5f4 | [
"MIT"
] | null | null | null | selectByAttributes.py | albert-decatur/gis-utils | a65d2ed4447c57e7275c5b7d599b305fe976b5f4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# use ogr to make a new shapefile with select by attributes
# note that 'ogr2ogr -sql' is way awesomer
# this script was nearly written by http://gis.stackexchange.com/ user Luke: http://gis.stackexchange.com/questions/68650/ogr-how-to-save-layer-from-attributefilter-to-a-shape-filter
# example use: ... | 37.875 | 182 | 0.765677 |
6b9f9fa2639740e18980b1aacbae0a4966d5dec9 | 1,290 | py | Python | app_logger/logger.py | TnLCommunity/app-logger | 3617bd056cb665eebf4d53fa1a05cd76f8a3cf9d | [
"Apache-2.0"
] | null | null | null | app_logger/logger.py | TnLCommunity/app-logger | 3617bd056cb665eebf4d53fa1a05cd76f8a3cf9d | [
"Apache-2.0"
] | null | null | null | app_logger/logger.py | TnLCommunity/app-logger | 3617bd056cb665eebf4d53fa1a05cd76f8a3cf9d | [
"Apache-2.0"
] | null | null | null | import os
import sys
from logging import getLogger, StreamHandler, DEBUG, INFO, WARNING
from pythonjsonlogger import jsonlogger
logger_name = os.getenv('LOGGER_NAME', 'root')
log_levels = os.getenv('LOG_LEVELS', 'root=INFO').split(',')
format_str = os.getenv('LOG_FORMAT', '%(levelname)%(name)%(asctime)%(module)%(func... | 33.947368 | 108 | 0.710078 |
a4c8c683da0e373441088d2fb0e871b815d2a9dc | 6,957 | py | Python | orders/views.py | kbilak/Django-E-Commerce | 599def5a916a9234045a07a02e45714f1c4107e7 | [
"MIT"
] | null | null | null | orders/views.py | kbilak/Django-E-Commerce | 599def5a916a9234045a07a02e45714f1c4107e7 | [
"MIT"
] | null | null | null | orders/views.py | kbilak/Django-E-Commerce | 599def5a916a9234045a07a02e45714f1c4107e7 | [
"MIT"
] | null | null | null | import weasyprint
from django.contrib.admin.views.decorators import staff_member_required
from django.shortcuts import render, redirect, get_object_or_404
from django.template.loader import render_to_string
from django.http import HttpResponse, response
from django.utils import translation
from django.conf import setti... | 47.97931 | 151 | 0.520195 |
2dccd03f902aedb4c80adceb0e560393c1ec2980 | 1,302 | py | Python | setup.py | arushkharbanda/aioice | 9b8f5972491b3dc05f4e723a7c9c6f563aa02d87 | [
"BSD-3-Clause"
] | 20 | 2018-03-07T12:07:26.000Z | 2022-01-31T12:58:26.000Z | setup.py | arushkharbanda/aioice | 9b8f5972491b3dc05f4e723a7c9c6f563aa02d87 | [
"BSD-3-Clause"
] | 11 | 2018-03-13T19:36:12.000Z | 2019-01-28T13:58:24.000Z | setup.py | arushkharbanda/aioice | 9b8f5972491b3dc05f4e723a7c9c6f563aa02d87 | [
"BSD-3-Clause"
] | 11 | 2018-02-27T02:12:13.000Z | 2021-11-29T02:14:08.000Z | import os.path
import sys
import setuptools
root_dir = os.path.abspath(os.path.dirname(__file__))
about = {}
about_file = os.path.join(root_dir, "src", "aioice", "about.py")
with open(about_file, encoding="utf-8") as fp:
exec(fp.read(), about)
readme_file = os.path.join(root_dir, "README.rst")
with open(readme_... | 30.27907 | 64 | 0.639017 |
5c27cab19dc52f2a71d65ff85eb2b2bdf713798f | 506 | py | Python | runtests.py | mikegreen7892003/PythonToy | e9218cdee4a38835fdbebad0e429ddf52bb444b4 | [
"MIT"
] | null | null | null | runtests.py | mikegreen7892003/PythonToy | e9218cdee4a38835fdbebad0e429ddf52bb444b4 | [
"MIT"
] | null | null | null | runtests.py | mikegreen7892003/PythonToy | e9218cdee4a38835fdbebad0e429ddf52bb444b4 | [
"MIT"
] | null | null | null | #coding=utf-8
import unittest
import test
doctests = [
'toys.rewrite_module.doctests',
'toys.exec_example.doctests',
'toys.get_function_defaults.doctests',
'toys.magic_super.doctests',
'toys.magic_class.doctests',
]
if __name__ == "__main__":
suite = unittest.TestSuite()
for case in unitte... | 26.631579 | 70 | 0.719368 |
d8579c635a85eda4c0eaf39da846934105702ff6 | 2,666 | py | Python | insertFrontMatter.py | LindsayHill/sensu-docs | 25db17add1b0f99e61306dc5916e99cdce676be7 | [
"MIT"
] | 69 | 2015-01-14T20:11:56.000Z | 2022-01-24T10:44:03.000Z | insertFrontMatter.py | LindsayHill/sensu-docs | 25db17add1b0f99e61306dc5916e99cdce676be7 | [
"MIT"
] | 2,119 | 2015-01-08T20:00:16.000Z | 2022-03-31T15:26:31.000Z | insertFrontMatter.py | LindsayHill/sensu-docs | 25db17add1b0f99e61306dc5916e99cdce676be7 | [
"MIT"
] | 217 | 2015-01-08T09:44:23.000Z | 2022-03-24T01:52:59.000Z | #!/usr/bin/python
import sys, os, frontmatter, errno
def main(folder, project):
executingDir = os.getcwd()
os.chdir(folder)
projectReadable = project
project = project.lower()
project = project.replace(" ", "-")
# get only the files and not sub-directories
files = (file for file in os.listdir(folder)
... | 36.027027 | 137 | 0.646662 |
f890daa67ade55584584db3c786df8b83c04677c | 703 | py | Python | torpido/tools/filelogger.py | AP-Atul/Torpido | a646b4d6de7f2e2c96de4c64ce3113f53e3931c2 | [
"Unlicense"
] | 21 | 2020-12-23T07:13:10.000Z | 2022-01-12T10:32:22.000Z | torpido/tools/filelogger.py | AP-Atul/Torpido | a646b4d6de7f2e2c96de4c64ce3113f53e3931c2 | [
"Unlicense"
] | 2 | 2020-12-30T10:45:42.000Z | 2021-09-25T09:52:00.000Z | torpido/tools/filelogger.py | AP-Atul/Torpido | a646b4d6de7f2e2c96de4c64ce3113f53e3931c2 | [
"Unlicense"
] | 1 | 2021-02-06T21:39:41.000Z | 2021-02-06T21:39:41.000Z | from time import time
from os import mkdir, path
class FileLogger:
DIRNAME = "ffmpeg_logs"
def __init__(self):
if not path.isdir(FileLogger.DIRNAME):
mkdir(FileLogger.DIRNAME)
self._filename, self._file = (str(time()) + "_error.log"), None
def open(self):
self._file =... | 23.433333 | 77 | 0.57468 |
9d0f2e8540418c572f3c2ab5fee9042a1d73f9de | 4,535 | py | Python | training/serverSimple.py | InnerWar01/Projet-NAO | c9bed8399cbeae4df99a9de890bcdbd0cef309b8 | [
"MIT"
] | null | null | null | training/serverSimple.py | InnerWar01/Projet-NAO | c9bed8399cbeae4df99a9de890bcdbd0cef309b8 | [
"MIT"
] | null | null | null | training/serverSimple.py | InnerWar01/Projet-NAO | c9bed8399cbeae4df99a9de890bcdbd0cef309b8 | [
"MIT"
] | null | null | null | import socket
import sys
import mysql.connector
HOST = '127.0.0.1' # Symbolic name, meaning all available interfaces
PORT = 2000 # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print 'Socket created'
#Bind socket to local host and port
try:
s.bind((HOST, PORT))
except... | 29.070513 | 115 | 0.464829 |
c9f3601e8b2668d83aa5c1b477dbe50dd2ee6659 | 3,647 | py | Python | msgraph-cli-extensions/v1_0/identitydirmgt_v1_0/azext_identitydirmgt_v1_0/vendored_sdks/identitydirmgt/_configuration.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/identitydirmgt_v1_0/azext_identitydirmgt_v1_0/vendored_sdks/identitydirmgt/_configuration.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | 22 | 2022-03-29T22:54:37.000Z | 2022-03-29T22:55:27.000Z | msgraph-cli-extensions/v1_0/identitydirmgt_v1_0/azext_identitydirmgt_v1_0/vendored_sdks/identitydirmgt/_configuration.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | # 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 ... | 43.416667 | 129 | 0.672333 |
2d176ea4a2ede1c7e7b68d3717fde2761fb67888 | 1,835 | py | Python | dev/tools/leveleditor/python/Lib/test/test_fcntl.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 11 | 2016-07-21T11:39:51.000Z | 2022-01-06T10:35:12.000Z | dev/tools/leveleditor/python/Lib/test/test_fcntl.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | ToolKit/cmds/python/Lib/test/skipped/test_fcntl.py | kontais/EFI-MIPS | c4de746e6a926fc9df71231a539e2c0a170bcc90 | [
"BSD-3-Clause"
] | 3 | 2019-09-04T02:59:01.000Z | 2021-08-23T06:07:28.000Z | #! /usr/bin/env python
"""Test program for the fcntl C module.
OS/2+EMX doesn't support the file locking operations.
Roger E. Masse
"""
import struct
import fcntl
import os, sys
from test.test_support import verbose, TESTFN
filename = TESTFN
try:
os.O_LARGEFILE
except AttributeError:
start_len = "ll"
el... | 26.985294 | 79 | 0.632153 |
b114a78eaef0176e4d2740dfa8dc187f875f5866 | 7,582 | py | Python | homeassistant/components/multimatic/sensor.py | thomasgermain/home-assistant | 69a8ba678e0276bc1bfde0f3d9e9d3682209f962 | [
"Apache-2.0"
] | 7 | 2019-08-15T13:36:58.000Z | 2020-03-18T10:46:29.000Z | homeassistant/components/multimatic/sensor.py | thomasgermain/home-assistant | 69a8ba678e0276bc1bfde0f3d9e9d3682209f962 | [
"Apache-2.0"
] | 73 | 2020-10-01T06:39:39.000Z | 2022-03-31T06:16:15.000Z | homeassistant/components/multimatic/sensor.py | thomasgermain/home-assistant | 69a8ba678e0276bc1bfde0f3d9e9d3682209f962 | [
"Apache-2.0"
] | 4 | 2019-10-26T14:25:13.000Z | 2020-11-10T11:00:18.000Z | """Interfaces with multimatic sensors."""
from __future__ import annotations
import datetime
import logging
from pymultimatic.model import EmfReport, Report
from homeassistant.components.sensor import (
DEVICE_CLASS_ENERGY,
DEVICE_CLASS_PRESSURE,
DEVICE_CLASS_TEMPERATURE,
DOMAIN,
STATE_CLASS_MEA... | 30.328 | 88 | 0.647982 |
57f9e55e05dcc2808e70885115ccf109463a98ca | 43,752 | py | Python | google/appengine/api/blobstore/blobstore_service_pb.py | MiCHiLU/google_appengine_sdk | 3da9f20d7e65e26c4938d2c4054bc4f39cbc5522 | [
"Apache-2.0"
] | 1,463 | 2015-04-07T09:41:28.000Z | 2022-03-30T02:05:19.000Z | google/appengine/api/blobstore/blobstore_service_pb.py | MiCHiLU/google_appengine_sdk | 3da9f20d7e65e26c4938d2c4054bc4f39cbc5522 | [
"Apache-2.0"
] | 73 | 2015-04-08T05:08:52.000Z | 2019-06-05T06:38:21.000Z | google/appengine/api/blobstore/blobstore_service_pb.py | MiCHiLU/google_appengine_sdk | 3da9f20d7e65e26c4938d2c4054bc4f39cbc5522 | [
"Apache-2.0"
] | 698 | 2015-04-28T12:02:00.000Z | 2022-03-19T23:53:55.000Z | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | 27.867516 | 310 | 0.689957 |
59180525aed2fbf9fc54d7a343872867594c048f | 1,383 | py | Python | prototyping/auto-segmentation/images_storage_scu.py | ethanio12345/pymedphys | cb34c992de8d442eced3385018a194364060092d | [
"Apache-2.0"
] | 2 | 2020-02-04T03:21:20.000Z | 2020-04-11T14:17:53.000Z | prototyping/auto-segmentation/images_storage_scu.py | ethanio12345/pymedphys | cb34c992de8d442eced3385018a194364060092d | [
"Apache-2.0"
] | null | null | null | prototyping/auto-segmentation/images_storage_scu.py | ethanio12345/pymedphys | cb34c992de8d442eced3385018a194364060092d | [
"Apache-2.0"
] | null | null | null | import glob
import config
import dicom_helpers
from pynetdicom import AE, debug_logger
from pynetdicom.sop_class import CTImageStorage
debug_logger()
def main(data_path):
dicom_paths = glob.glob(data_path + "/*.dcm")
print("dicom_paths", len(dicom_paths))
dicom_files = dicom_helpers.read_dicom_paths(di... | 29.425532 | 87 | 0.67462 |
77decae97981ab0b86682f410d35af008cb35162 | 23,569 | py | Python | test/functional/test_framework/mininode.py | Matthelonianxl/bitcoin-abc | 3020365bf5b55ec9b7881eeaae0bc8d2491a84c9 | [
"MIT"
] | 1 | 2020-06-25T07:42:54.000Z | 2020-06-25T07:42:54.000Z | test/functional/test_framework/mininode.py | rkalis/bitcoin-abc-benchin | 0a8d2f69b15b1201aeee299e456213f0ffb3255f | [
"MIT"
] | null | null | null | test/functional/test_framework/mininode.py | rkalis/bitcoin-abc-benchin | 0a8d2f69b15b1201aeee299e456213f0ffb3255f | [
"MIT"
] | 2 | 2020-05-12T13:35:00.000Z | 2020-06-24T10:54:29.000Z | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Bitcoin P2P ... | 36.769111 | 143 | 0.630235 |
1a919fe6cdff345c138d5d7e16255d1c486e19e5 | 4,026 | py | Python | configs/ttfnet/ttfnet_d53_aug_hat.py | XinYangDong/ttfnet-master2 | 92a6a0ecc918d57375c35178c83af92746d829ec | [
"Apache-2.0"
] | null | null | null | configs/ttfnet/ttfnet_d53_aug_hat.py | XinYangDong/ttfnet-master2 | 92a6a0ecc918d57375c35178c83af92746d829ec | [
"Apache-2.0"
] | null | null | null | configs/ttfnet/ttfnet_d53_aug_hat.py | XinYangDong/ttfnet-master2 | 92a6a0ecc918d57375c35178c83af92746d829ec | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='TTFNet',
pretrained='../../drive/My Drive/checkpoints/darknet53.pth',
backbone=dict(
type='DarknetV3',
layers=[1, 2, 8, 8, 4],
inplanes=[3, 32, 64, 128, 256, 512],
planes=[32, 64, 128, 256, 512, 1024],
norm_cfg=dict(type='BN'),
... | 29.386861 | 77 | 0.598361 |
f9b359820aea18cb7afbdff73e93a4e15b54dda4 | 13,941 | py | Python | tests/utils/test_dag_processing.py | plcstpierre/airflow | 577f8936727454eb4ff54588cd525c5244ef6d52 | [
"Apache-2.0"
] | null | null | null | tests/utils/test_dag_processing.py | plcstpierre/airflow | 577f8936727454eb4ff54588cd525c5244ef6d52 | [
"Apache-2.0"
] | 1 | 2020-07-01T18:16:43.000Z | 2020-07-01T18:16:43.000Z | tests/utils/test_dag_processing.py | plcstpierre/airflow | 577f8936727454eb4ff54588cd525c5244ef6d52 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 38.404959 | 98 | 0.578653 |
b0f1062417c36a7379c369aecc80c03424cadba1 | 339 | py | Python | snacks/models.py | abdu-zeyad/django-models | 3856c7669bbd2c1a05c2fde3d7f44c8bffcc054a | [
"MIT"
] | null | null | null | snacks/models.py | abdu-zeyad/django-models | 3856c7669bbd2c1a05c2fde3d7f44c8bffcc054a | [
"MIT"
] | null | null | null | snacks/models.py | abdu-zeyad/django-models | 3856c7669bbd2c1a05c2fde3d7f44c8bffcc054a | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth import get_user_model
# Create your models here.
class Snack(models.Model):
name = models.CharField(max_length=256)
description = models.TextField()
purchaser = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
def __str__(self):
... | 28.25 | 77 | 0.746313 |
c8a4f84f1ce3fddfda088f4d71140ee5e4d9a4e5 | 24,554 | py | Python | tests/test_sampler.py | sunset3000/jaeger-client-python | 6a10175d2fdb0c72fb804b9252ff4b40e3ebf104 | [
"Apache-2.0"
] | null | null | null | tests/test_sampler.py | sunset3000/jaeger-client-python | 6a10175d2fdb0c72fb804b9252ff4b40e3ebf104 | [
"Apache-2.0"
] | 1 | 2021-11-04T04:36:24.000Z | 2021-11-04T04:42:16.000Z | tests/test_sampler.py | sunset3000/jaeger-client-python | 6a10175d2fdb0c72fb804b9252ff4b40e3ebf104 | [
"Apache-2.0"
] | 4 | 2019-03-11T14:39:04.000Z | 2021-03-15T18:23:43.000Z | # Modified by SignalFx
# Copyright (c) 2016-2018 Uber Technologies, 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 ... | 34.102778 | 100 | 0.635986 |
95123cb46407702e0b1f21251f8db96b603f2a2a | 865 | py | Python | SDKs/Aspose.Storage_Cloud_SDK_For_Python/asposestoragecloud/models/ResponseMessage.py | imranwar/AsposeStoragePHP | 3795bbfd1ca6d2aa58974bd9133ab4794b3f23d0 | [
"MIT"
] | null | null | null | SDKs/Aspose.Storage_Cloud_SDK_For_Python/asposestoragecloud/models/ResponseMessage.py | imranwar/AsposeStoragePHP | 3795bbfd1ca6d2aa58974bd9133ab4794b3f23d0 | [
"MIT"
] | null | null | null | SDKs/Aspose.Storage_Cloud_SDK_For_Python/asposestoragecloud/models/ResponseMessage.py | imranwar/AsposeStoragePHP | 3795bbfd1ca6d2aa58974bd9133ab4794b3f23d0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
class ResponseMessage(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually."""
def __init__(self):
"""
Attributes:
swaggerTypes (dict): The key is attribute name and the value is attribute type... | 28.833333 | 97 | 0.558382 |
aa9374f7caebc0d79987e341dbc73ac5da69d4ff | 58,610 | py | Python | pypureclient/flasharray/FA_2_4/api/administrators_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_4/api/administrators_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_4/api/administrators_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re
# pyth... | 47.883987 | 671 | 0.64158 |
6da4ae3550b18342fb32dee292a1f68f295783b4 | 7,323 | py | Python | corehq/pillows/mappings/user_mapping.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T23:26:39.000Z | 2015-02-10T23:26:39.000Z | corehq/pillows/mappings/user_mapping.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | corehq/pillows/mappings/user_mapping.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | USER_INDEX="hqusers_31n2pdyzqix4hd023lv6h67771c7wer"
USER_MAPPING={'_all': {'analyzer': 'standard'},
'_meta': {'comment': 'Yedi modified on 2013-01-27',
'created': None},
'date_detection': False,
'date_formats': ['yyyy-MM-dd',
"yyyy-MM-dd'T'HH:mm:ssZZ",
"yyyy-MM-dd'T'HH... | 77.904255 | 365 | 0.352861 |
6118f492e217bc954ba0475c1d66b11cd0ee9ffa | 7,395 | py | Python | rlpyt/samplers/buffer.py | DavidSlayback/rlpyt | 445adbd3917842caae0cae0d06e4b2866c8f1258 | [
"MIT"
] | null | null | null | rlpyt/samplers/buffer.py | DavidSlayback/rlpyt | 445adbd3917842caae0cae0d06e4b2866c8f1258 | [
"MIT"
] | null | null | null | rlpyt/samplers/buffer.py | DavidSlayback/rlpyt | 445adbd3917842caae0cae0d06e4b2866c8f1258 | [
"MIT"
] | null | null | null |
import multiprocessing as mp
import numpy as np
from rlpyt.utils.buffer import buffer_from_example, torchify_buffer
from rlpyt.agents.base import AgentInputs
from rlpyt.samplers.collections import (Samples, AgentSamples, AgentSamplesBsv,
EnvSamples)
def build_samples_buffer(agent, env, batch_spec, bootstrap_val... | 43.757396 | 91 | 0.67735 |
340c7766e9aa2121c1bbec953a4e895654b2aa94 | 205 | py | Python | zvt/app.py | markqiu/zvt | 1bcfb71279f2652c3600f0f8e45d941f98ceaa10 | [
"MIT"
] | 6 | 2020-09-03T10:02:00.000Z | 2021-02-04T02:51:47.000Z | zvt/app.py | wlwd13303/zvt | 23105a5bfdc3a5080c6c22d11e9e53d216688dea | [
"MIT"
] | null | null | null | zvt/app.py | wlwd13303/zvt | 23105a5bfdc3a5080c6c22d11e9e53d216688dea | [
"MIT"
] | 2 | 2020-07-08T04:15:40.000Z | 2021-06-08T08:51:31.000Z | # -*- coding: utf-8 -*-
import dash
app = dash.Dash(
__name__, serve_locally=False, meta_tags=[{"name": "viewport", "content": "width=device-width"}]
)
app.config.suppress_callback_exceptions = True
| 22.777778 | 100 | 0.692683 |
485abb73cfd400c057201613d992e871e37fbe1e | 5,163 | py | Python | vyper/ast/natspec.py | ryan-rozario/vyper | 9d235e6e7e85ee0dbfaf54a6efd5fb6334c2d00f | [
"Apache-2.0"
] | null | null | null | vyper/ast/natspec.py | ryan-rozario/vyper | 9d235e6e7e85ee0dbfaf54a6efd5fb6334c2d00f | [
"Apache-2.0"
] | null | null | null | vyper/ast/natspec.py | ryan-rozario/vyper | 9d235e6e7e85ee0dbfaf54a6efd5fb6334c2d00f | [
"Apache-2.0"
] | null | null | null | import re
from typing import (
Optional,
Tuple,
Union,
)
from asttokens import (
LineNumbers,
)
from vyper.ast import (
nodes as vy_ast,
)
from vyper.exceptions import (
NatSpecSyntaxException,
)
from vyper.parser.global_context import (
GlobalContext,
)
from vyper.signatures import (
... | 29.672414 | 93 | 0.583769 |
fa438d14e142b2f06ab8568cfca493f7b61f7357 | 10,249 | py | Python | build_lexicon.py | brawer/SursilvanLexiconBot | 95e47885462150462bb70592e1e9f4bead18a328 | [
"MIT-0"
] | null | null | null | build_lexicon.py | brawer/SursilvanLexiconBot | 95e47885462150462bb70592e1e9f4bead18a328 | [
"MIT-0"
] | null | null | null | build_lexicon.py | brawer/SursilvanLexiconBot | 95e47885462150462bb70592e1e9f4bead18a328 | [
"MIT-0"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2018 Sascha Brawer <sascha@brawer.ch>
# SPDX-License-Identifier: MIT-0
import codecs
from xml.sax.saxutils import escape
def main():
with codecs.open('rm-sursilv.xml', 'w', 'utf-8') as out:
out.write('<?xml version="1.0" encoding="UTF-8"?>\n')
out.write('<L... | 40.832669 | 91 | 0.443068 |
80f934df5616c7f84eba8abd7210998c4d3587f0 | 30,680 | py | Python | zmon_slr/main.py | zalando-zmon/zmon-slo-metrics | f2e823b861af2f449d1fd72cced74cf26b3aee94 | [
"Apache-2.0"
] | 8 | 2017-02-21T09:45:01.000Z | 2020-09-18T00:09:42.000Z | zmon_slr/main.py | zalando-zmon/service-level-reporting | f2e823b861af2f449d1fd72cced74cf26b3aee94 | [
"Apache-2.0"
] | 148 | 2017-02-20T08:52:32.000Z | 2020-03-10T09:43:40.000Z | zmon_slr/main.py | zalando-zmon/service-level-reporting | f2e823b861af2f449d1fd72cced74cf26b3aee94 | [
"Apache-2.0"
] | 12 | 2017-02-20T07:24:21.000Z | 2019-09-27T12:32:33.000Z | #!/usr/bin/env python3
import json
import numbers
import os
import subprocess
import click
import requests
import zign.api
from clickclick import Action, AliasedGroup, error, fatal_error, warning
from zmon_cli.client import Zmon
from zmon_slr.client import Client, SLRClientError
from zmon_slr.generate_slr import gen... | 30.927419 | 120 | 0.615613 |
6d0dbbcad0eefad519b57a5c772f34a5c727c430 | 16,385 | py | Python | sandbox/rocky/tf/core/network.py | prosello/rllab | 8677356874d41eb9354785500b554eaf635ece2e | [
"MIT"
] | 10 | 2017-09-05T17:57:26.000Z | 2021-11-10T20:54:09.000Z | sandbox/rocky/tf/core/network.py | prosello/rllab | 8677356874d41eb9354785500b554eaf635ece2e | [
"MIT"
] | null | null | null | sandbox/rocky/tf/core/network.py | prosello/rllab | 8677356874d41eb9354785500b554eaf635ece2e | [
"MIT"
] | 18 | 2017-04-11T22:29:39.000Z | 2021-01-11T13:45:50.000Z | from __future__ import print_function
from __future__ import absolute_import
import sandbox.rocky.tf.core.layers as L
import tensorflow as tf
import numpy as np
import itertools
from rllab.core.serializable import Serializable
from sandbox.rocky.tf.core.parameterized import Parameterized
from sandbox.rocky.tf.core.lay... | 36.169978 | 116 | 0.566067 |
153280d22aea78f701afa398cfc7fdb5f329d099 | 3,579 | py | Python | tests/test_schedules.py | semigodking/redbeat | c1eea0eaff013f94d05eb4f73411d619359f99a7 | [
"Apache-2.0"
] | null | null | null | tests/test_schedules.py | semigodking/redbeat | c1eea0eaff013f94d05eb4f73411d619359f99a7 | [
"Apache-2.0"
] | null | null | null | tests/test_schedules.py | semigodking/redbeat | c1eea0eaff013f94d05eb4f73411d619359f99a7 | [
"Apache-2.0"
] | 1 | 2019-03-05T09:28:25.000Z | 2019-03-05T09:28:25.000Z | from datetime import datetime, timedelta
from unittest import TestCase
from mock import patch
from celery.utils.time import timezone
from redbeat.schedules import rrule
@patch.object(rrule, 'now', datetime.utcnow)
@patch.object(rrule, 'utc_enabled', True)
@patch.object(rrule, 'tz', timezone.utc)
class test_rrule_rem... | 44.7375 | 94 | 0.687622 |
b3e88eab7fca1fa32ba38c8f02a532c3b8b60850 | 7,549 | py | Python | isodist/DartmouthIsochrone.py | jobovy/isodist | 1f04716cda6a6427f6ca70a0d9740dcbd07cc1e7 | [
"BSD-3-Clause"
] | null | null | null | isodist/DartmouthIsochrone.py | jobovy/isodist | 1f04716cda6a6427f6ca70a0d9740dcbd07cc1e7 | [
"BSD-3-Clause"
] | 2 | 2017-11-17T05:02:01.000Z | 2021-04-15T13:42:50.000Z | isodist/DartmouthIsochrone.py | jobovy/isodist | 1f04716cda6a6427f6ca70a0d9740dcbd07cc1e7 | [
"BSD-3-Clause"
] | 2 | 2017-05-25T20:30:58.000Z | 2018-07-04T10:08:54.000Z | ###############################################################################
# DartmouthIsochrone: Module that represents isochrones calculated by the
# Dartmouth group
#
# Quick start guide (NEEDS TO BE EDITED FOR DARTMOUTH)
# -----------------
#
# - Initialization: >>>p= PadovaIsochr... | 36.468599 | 121 | 0.473705 |
7af07fa63b4cfd5a764840dc07bdc1edfac248ef | 10,001 | py | Python | docs/tutorial_images.py | Giridharsalana/gdstk | 3f60be2439922eba919350d5f566fa5e98a4acd6 | [
"BSL-1.0"
] | 1 | 2021-04-12T17:05:45.000Z | 2021-04-12T17:05:45.000Z | docs/tutorial_images.py | Giridharsalana/gdstk | 3f60be2439922eba919350d5f566fa5e98a4acd6 | [
"BSL-1.0"
] | null | null | null | docs/tutorial_images.py | Giridharsalana/gdstk | 3f60be2439922eba919350d5f566fa5e98a4acd6 | [
"BSL-1.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2020-2020 Lucas Heitzmann Gabrielli.
# This file is part of gdstk, distributed under the terms of the
# Boost Software License - Version 1.0. See the accompanying
# LICENSE file or <http://www.boost.org/LICENSE_1_0.txt>
import pathlib
import numpy
import gdst... | 33.225914 | 88 | 0.565443 |
7efe9e831e71de10de06a2ebe1a8c710885076c6 | 52,094 | py | Python | sgtpy/gammamie_pure/saftgammamie_pure.py | gustavochm/sgtpy | ab7a5e3a5406e6353ea7eca603629ab0c92769b9 | [
"MIT"
] | 5 | 2021-11-22T22:54:39.000Z | 2022-03-08T11:30:55.000Z | sgtpy/gammamie_pure/saftgammamie_pure.py | gustavochm/sgtpy | ab7a5e3a5406e6353ea7eca603629ab0c92769b9 | [
"MIT"
] | 1 | 2021-11-14T23:00:23.000Z | 2021-11-19T21:14:27.000Z | sgtpy/gammamie_pure/saftgammamie_pure.py | gustavochm/sgtpy | ab7a5e3a5406e6353ea7eca603629ab0c92769b9 | [
"MIT"
] | 2 | 2021-08-24T18:22:19.000Z | 2021-11-16T11:16:46.000Z | from __future__ import division, print_function, absolute_import
import numpy as np
from ..constants import kb, Na
from ..math import gauss
from .a1sB_monomer import x0lambda_evalm, x0lambda_evalc
from .monomer_aux import I_lam, J_lam
from .ares import ares, dares_drho, d2ares_drho
from .ideal import aideal, daideal_dr... | 32.376631 | 79 | 0.56997 |
fe2f7e3059ace46fb977677482132fcb4605eb19 | 564 | py | Python | test/strings_test.py | tatianaportsova/Lambdata_12 | 4cab1dc4f65d479b8f2919155c4bb6b58243d8db | [
"MIT"
] | null | null | null | test/strings_test.py | tatianaportsova/Lambdata_12 | 4cab1dc4f65d479b8f2919155c4bb6b58243d8db | [
"MIT"
] | null | null | null | test/strings_test.py | tatianaportsova/Lambdata_12 | 4cab1dc4f65d479b8f2919155c4bb6b58243d8db | [
"MIT"
] | null | null | null |
# test/strings_test.py
import unittest
class TestStringMethods(unittest.TestCase):
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')
def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
def test_split(self):
s = 'hello wo... | 24.521739 | 69 | 0.62766 |
b9f53defc8c955e0d41cff042bb2fab0b94aa784 | 28,232 | py | Python | Bio/KEGG/KGML/KGML_pathway.py | lennax/biopython | db56e6917ef750df31e952472ebf63cd496f9ce9 | [
"BSD-3-Clause"
] | 2 | 2016-04-15T22:39:55.000Z | 2020-12-11T16:11:33.000Z | Bio/KEGG/KGML/KGML_pathway.py | lennax/biopython | db56e6917ef750df31e952472ebf63cd496f9ce9 | [
"BSD-3-Clause"
] | null | null | null | Bio/KEGG/KGML/KGML_pathway.py | lennax/biopython | db56e6917ef750df31e952472ebf63cd496f9ce9 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2013 by Leighton Pritchard. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""This module provides classes to represent a KGML Pathway Map.
The KGML definition is ... | 35.158157 | 79 | 0.57495 |
a3db2cd62286c5af7db672fa2b0a4da8e05b8d2d | 4,987 | py | Python | tests/test_parallel_tasks.py | j-davies-astro/tangos | ae15578820087765e5180e69310e274c237d3912 | [
"BSD-3-Clause"
] | null | null | null | tests/test_parallel_tasks.py | j-davies-astro/tangos | ae15578820087765e5180e69310e274c237d3912 | [
"BSD-3-Clause"
] | null | null | null | tests/test_parallel_tasks.py | j-davies-astro/tangos | ae15578820087765e5180e69310e274c237d3912 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import tangos.testing.simulation_generator
from tangos import parallel_tasks as pt
from tangos import testing
import tangos
import sys
import time
from six.moves import range
from nose.plugins.skip import SkipTest
def setup():
pt.use("multiprocessing")
testing.init_blan... | 31.16875 | 113 | 0.675957 |
4094f49543542158efb1c2e186ce0bc3f5dd2914 | 328 | py | Python | AutoDuck/fixHelpCompression.py | huanyin88/Mod-Pywin32-For-Python3.x-DDE | 992931aa534357d54aaac34077f0128d3a740e5e | [
"Apache-2.0"
] | 3 | 2020-06-18T16:57:44.000Z | 2020-07-21T17:52:06.000Z | AutoDuck/fixHelpCompression.py | huanyin88/Mod-Pywin32-For-Python3.x-DDE | 992931aa534357d54aaac34077f0128d3a740e5e | [
"Apache-2.0"
] | null | null | null | AutoDuck/fixHelpCompression.py | huanyin88/Mod-Pywin32-For-Python3.x-DDE | 992931aa534357d54aaac34077f0128d3a740e5e | [
"Apache-2.0"
] | null | null | null | # fixHelpCompression.py
# Add a compression option to the generated help project file.
import sys, os, win32api
fname = sys.argv[1]
try:
os.stat(fname)
except os.error:
sys.stderr.write("The project file '%s' was not found\n" % (fname))
sys.exit(1)
win32api.WriteProfileVal("options","COMPRESS","12 Hall Zeck", fn... | 19.294118 | 68 | 0.719512 |
541acc79523936ac28b2672edd88b52d80e70417 | 1,008 | py | Python | tests/test_virus101.py | dummman/game_virus101 | fdfd923dfbc4ab0b853b46fecbb0ae9f7fcfb0e8 | [
"MIT"
] | null | null | null | tests/test_virus101.py | dummman/game_virus101 | fdfd923dfbc4ab0b853b46fecbb0ae9f7fcfb0e8 | [
"MIT"
] | null | null | null | tests/test_virus101.py | dummman/game_virus101 | fdfd923dfbc4ab0b853b46fecbb0ae9f7fcfb0e8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Tests for `virus101` package."""
# pylint: disable=redefined-outer-name
import pytest
from click.testing import CliRunner
from virus101 import cli
@pytest.fixture
def response():
"""Sample pytest fixture.
See more at: http://doc.pytest.org/en/latest/fixture.html
"""
# impor... | 27.243243 | 78 | 0.705357 |
6e8492fb9a34ff052145d4667db7ad6b54f7c8dc | 8,415 | py | Python | kubernetes/client/models/v1_ceph_fs_volume_source.py | TomasTomecek/kubernetes-python | c37c074303a13c72662b9201ccc023fb0ca45755 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_ceph_fs_volume_source.py | TomasTomecek/kubernetes-python | c37c074303a13c72662b9201ccc023fb0ca45755 | [
"Apache-2.0"
] | 1 | 2021-04-30T20:41:19.000Z | 2021-04-30T20:41:19.000Z | venv/lib/python2.7/site-packages/kubernetes/client/models/v1_ceph_fs_volume_source.py | 784134748/kubernetes-install | 5df59632c2619632e422948b667fb68eab9ff5be | [
"MIT"
] | 1 | 2020-05-09T07:16:55.000Z | 2020-05-09T07:16:55.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.12.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 31.399254 | 200 | 0.609031 |
992d10a981c27994f975f6be3a0b538d68cc7af6 | 5,366 | py | Python | algorithm/train_hole_robust.py | SamsungLabs/hole-robust-wf | a9ad8be012b8389b40096c010b43e51cd435635d | [
"BSD-3-Clause"
] | 1 | 2022-01-19T04:53:43.000Z | 2022-01-19T04:53:43.000Z | algorithm/train_hole_robust.py | SamsungLabs/hole-robust-wf | a9ad8be012b8389b40096c010b43e51cd435635d | [
"BSD-3-Clause"
] | null | null | null | algorithm/train_hole_robust.py | SamsungLabs/hole-robust-wf | a9ad8be012b8389b40096c010b43e51cd435635d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Train L-CNN
Usage:
train_hole_robust.py [options] <yaml-config>
train_hole_robust.py (-h | --help )
Arguments:
<yaml-config> Path to the yaml hyper-parameter file
Options:
-h --help Show this screen.
-d --devices <devices> Com... | 28.542553 | 85 | 0.629333 |
260c11b37ca0f5a211fd4291ad4e8a2a93dbd3d4 | 83 | py | Python | pybktreespellchecker/__init__.py | tomasrasymas/pybktree-spell-checker | e1f7547957a4257a9b6ce470ebc8bcc95767c5d4 | [
"MIT"
] | 3 | 2019-01-07T21:34:29.000Z | 2020-07-20T23:43:01.000Z | pybktreespellchecker/__init__.py | tomasrasymas/pybktree-spell-checker | e1f7547957a4257a9b6ce470ebc8bcc95767c5d4 | [
"MIT"
] | null | null | null | pybktreespellchecker/__init__.py | tomasrasymas/pybktree-spell-checker | e1f7547957a4257a9b6ce470ebc8bcc95767c5d4 | [
"MIT"
] | null | null | null | from .levenshtein_distance import levenshtein_distance
from .bk_tree import BKTree
| 27.666667 | 54 | 0.879518 |
599b05e8386b68043ce6fa339e4ade8eee5960d6 | 5,039 | py | Python | wikihow/wikidata/wiki_how_last_from_server.py | rakibulislam01/wikihow-py | 899779299bb7d522bdf3ff94b6f3c1b2aed48840 | [
"MIT"
] | null | null | null | wikihow/wikidata/wiki_how_last_from_server.py | rakibulislam01/wikihow-py | 899779299bb7d522bdf3ff94b6f3c1b2aed48840 | [
"MIT"
] | null | null | null | wikihow/wikidata/wiki_how_last_from_server.py | rakibulislam01/wikihow-py | 899779299bb7d522bdf3ff94b6f3c1b2aed48840 | [
"MIT"
] | null | null | null | import datetime
import json
import os
import re
import urllib.request
from bs4 import BeautifulSoup
from contribute.models import Content
def get_text_wiki(lil):
"""
Get content from wikihow_skill page and format it.
:param lil: html tag content.
:return: format content.
"""
global ordinal
... | 30.91411 | 159 | 0.583251 |
d7d00532ce722690dbe34d0793d27b624aeef9bd | 6,952 | py | Python | buildscripts/resmokelib/config.py | puppyofkosh/mongo | ed601dd01169b8c1fad9fb8d388da0523a1b48f5 | [
"Apache-2.0"
] | 1 | 2015-11-08T17:16:08.000Z | 2015-11-08T17:16:08.000Z | buildscripts/resmokelib/config.py | puppyofkosh/mongo | ed601dd01169b8c1fad9fb8d388da0523a1b48f5 | [
"Apache-2.0"
] | null | null | null | buildscripts/resmokelib/config.py | puppyofkosh/mongo | ed601dd01169b8c1fad9fb8d388da0523a1b48f5 | [
"Apache-2.0"
] | 1 | 2021-06-18T05:00:06.000Z | 2021-06-18T05:00:06.000Z | """
Configuration options for resmoke.py.
"""
from __future__ import absolute_import
import os
import os.path
import time
##
# Default values.
##
# Default path for where to look for executables.
DEFAULT_DBTEST_EXECUTABLE = os.path.join(os.curdir, "dbtest")
DEFAULT_MONGO_EXECUTABLE = os.path.join(os.curdir, "mongo... | 32.947867 | 100 | 0.753021 |
4341d6de0026884d72c1c5e66483b634f481f5c5 | 1,512 | py | Python | kervi_cli/templates/system_sensors_tmpl.py | kervi/kervi-cli | 7ef036b4adb0ce3b5e9d2b53965193da82cde3c5 | [
"MIT"
] | null | null | null | kervi_cli/templates/system_sensors_tmpl.py | kervi/kervi-cli | 7ef036b4adb0ce3b5e9d2b53965193da82cde3c5 | [
"MIT"
] | null | null | null | kervi_cli/templates/system_sensors_tmpl.py | kervi/kervi-cli | 7ef036b4adb0ce3b5e9d2b53965193da82cde3c5 | [
"MIT"
] | null | null | null | # Copyright (c) 2016, Tim Wentzlau
# Licensed under MIT
""" Module that defines core cpu sensors """
from kervi.sensors.sensor import Sensor
from kervi.devices.platforms.common.sensors.cpu_use import CPULoadSensorDeviceDriver
from kervi.devices.platforms.common.sensors.memory_use import MemUseSensorDeviceDrive... | 48.774194 | 87 | 0.792328 |
a1c8d5eceeef4465169ceddd265df60c12be33f1 | 1,979 | py | Python | homeassistant/components/shelly/logbook.py | tafehe/ha-core | 2478ec887aba87842bf52969b7ab1137826f7b98 | [
"Apache-2.0"
] | 5 | 2020-10-08T12:59:44.000Z | 2021-12-28T06:46:25.000Z | homeassistant/components/shelly/logbook.py | tafehe/ha-core | 2478ec887aba87842bf52969b7ab1137826f7b98 | [
"Apache-2.0"
] | 75 | 2020-08-05T07:22:42.000Z | 2022-03-23T21:54:57.000Z | homeassistant/components/shelly/logbook.py | tafehe/ha-core | 2478ec887aba87842bf52969b7ab1137826f7b98 | [
"Apache-2.0"
] | 1 | 2020-10-02T06:09:25.000Z | 2020-10-02T06:09:25.000Z | """Describe Shelly logbook events."""
from __future__ import annotations
from typing import Callable
from homeassistant.const import ATTR_DEVICE_ID
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.typing import EventType
from . import get_block_device_wrapper, get_rpc_device_wrapper
... | 35.339286 | 87 | 0.707933 |
abe017d00c5a702921332e44835e463606a4486d | 1,192 | py | Python | naive_bayes_resource.py | wehouse/movie-reviews-sentiment-analyzer | 4fed8636607653aa6e5b4b99e82d68ba37f60f88 | [
"Apache-2.0"
] | null | null | null | naive_bayes_resource.py | wehouse/movie-reviews-sentiment-analyzer | 4fed8636607653aa6e5b4b99e82d68ba37f60f88 | [
"Apache-2.0"
] | 4 | 2020-03-24T15:33:23.000Z | 2021-02-02T21:42:03.000Z | naive_bayes_resource.py | wehouse/movie-reviews-sentiment-analyzer | 4fed8636607653aa6e5b4b99e82d68ba37f60f88 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pickle
import nltk
class NaiveBayesResource:
classifier={}
cv={}
def __init__(self):
self.classifier = pickle.load( open( "naive_bayes_model.p", "rb" ) )
self.cv = pickle.load(open('count_vectorizer.p', 'rb'))
nltk.download('stopwords')
def o... | 30.564103 | 98 | 0.551174 |
696309227d30a023add07d4f749f68f1d8d7162c | 14,295 | py | Python | bids/analysis/tests/test_transformations.py | ltirrell/pybids | a2fae71c39d15fa958e49e7438dc05d7d1332fcd | [
"MIT"
] | null | null | null | bids/analysis/tests/test_transformations.py | ltirrell/pybids | a2fae71c39d15fa958e49e7438dc05d7d1332fcd | [
"MIT"
] | null | null | null | bids/analysis/tests/test_transformations.py | ltirrell/pybids | a2fae71c39d15fa958e49e7438dc05d7d1332fcd | [
"MIT"
] | null | null | null | # from bids.analysis.variables import load_variables
from bids.analysis import transformations as transform
from bids.grabbids import BIDSLayout
import pytest
from os.path import join
from bids.tests import get_test_data_path
import numpy as np
import pandas as pd
@pytest.fixture
def collection():
layout_path = j... | 41.315029 | 79 | 0.660721 |
4d8cd387a7ff0e400c22f4f9239b590b6863d005 | 6,143 | py | Python | electrum_dash/gui/qt/locktimeedit.py | PanderMusubi/electrum-dash | 02cd655c57adba276bc17084bd4d1a105fb10bfe | [
"MIT"
] | 51 | 2018-01-09T01:44:49.000Z | 2022-02-22T13:28:43.000Z | electrum_dash/gui/qt/locktimeedit.py | PanderMusubi/electrum-dash | 02cd655c57adba276bc17084bd4d1a105fb10bfe | [
"MIT"
] | 152 | 2017-07-11T16:24:56.000Z | 2022-03-21T13:29:39.000Z | electrum_dash/gui/qt/locktimeedit.py | PanderMusubi/electrum-dash | 02cd655c57adba276bc17084bd4d1a105fb10bfe | [
"MIT"
] | 67 | 2018-01-11T23:54:50.000Z | 2022-03-29T21:59:23.000Z | # Copyright (C) 2020 The Electrum developers
# Distributed under the MIT software license, see the accompanying
# file LICENCE or http://www.opensource.org/licenses/mit-license.php
import time
from datetime import datetime
from typing import Optional, Any
from PyQt5.QtCore import Qt, QDateTime
from PyQt5.QtGui import... | 33.026882 | 92 | 0.652124 |
5ea6a0299446c4dc9f466016fb7812168448c2f4 | 4,255 | py | Python | cbm/sklearn.py | microsoft/CBM | 64bc1261112d4bb64eeb60ea420e45ef99c5cb94 | [
"MIT"
] | 8 | 2021-09-30T00:14:24.000Z | 2022-03-17T14:50:09.000Z | cbm/sklearn.py | microsoft/CBM | 64bc1261112d4bb64eeb60ea420e45ef99c5cb94 | [
"MIT"
] | 4 | 2021-09-17T16:18:36.000Z | 2021-11-29T09:01:26.000Z | cbm/sklearn.py | microsoft/CBM | 64bc1261112d4bb64eeb60ea420e45ef99c5cb94 | [
"MIT"
] | 3 | 2021-11-30T13:03:05.000Z | 2022-03-23T13:06:41.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import calendar
import numpy as np
from sklearn.model_selection import TimeSeriesSplit
from sklearn.utils import indexable
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.utils.validation import _check_feature_names_in
fro... | 38.333333 | 142 | 0.60658 |
29a8d412fdfd89b1119d1b6c5c57204a8c4ae816 | 1,625 | py | Python | examples/tangent_pca_so3.py | oesteban/geomstats | e0b53777cc27cf446d55eeac1533f4c3bc0ae681 | [
"MIT"
] | 1 | 2018-05-23T20:18:23.000Z | 2018-05-23T20:18:23.000Z | examples/tangent_pca_so3.py | leslie-chu/geomstats | fbed39b47b16eab4a48179106e8d0c1a5891243d | [
"MIT"
] | null | null | null | examples/tangent_pca_so3.py | leslie-chu/geomstats | fbed39b47b16eab4a48179106e8d0c1a5891243d | [
"MIT"
] | null | null | null | """
Compute the mean of a data set of 3D rotations.
Performs tangent PCA at the mean.
"""
import matplotlib.pyplot as plt
import numpy as np
from geomstats.special_orthogonal_group import SpecialOrthogonalGroup
import geomstats.visualization as visualization
SO3_GROUP = SpecialOrthogonalGroup(n=3)
METRIC = SO3_GROUP... | 29.017857 | 78 | 0.712615 |
543327aeb19d138247c9c0ee6bdf46d7e9a1d0a1 | 182 | py | Python | ddtrace/ext/consul.py | SzySteve/dd-trace-py | 90d1d5981c72ea312c21ac04e5be47521d0f0f2e | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ddtrace/ext/consul.py | SzySteve/dd-trace-py | 90d1d5981c72ea312c21ac04e5be47521d0f0f2e | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ddtrace/ext/consul.py | SzySteve/dd-trace-py | 90d1d5981c72ea312c21ac04e5be47521d0f0f2e | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | from . import SpanTypes
APP = "consul"
# [TODO] Deprecated, remove when we remove AppTypes
APP_TYPE = SpanTypes.CACHE
SERVICE = "consul"
CMD = "consul.command"
KEY = "consul.key"
| 16.545455 | 51 | 0.71978 |
a55f3662ff7ce11db974037fdecb54865b2fe2c6 | 1,098 | py | Python | kubernetes_asyncio/test/test_extensions_v1beta1_ingress_backend.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_extensions_v1beta1_ingress_backend.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_extensions_v1beta1_ingress_backend.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.14.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import kube... | 27.45 | 133 | 0.758652 |
b0eab2b3d8a2a0227980c7f3460138e4b691069d | 959 | py | Python | business_register/models/ruo_models.py | Anntroy/Data_converter | 82e8fcb6a2b4611ad39e122e2730d6656b43b062 | [
"MIT"
] | null | null | null | business_register/models/ruo_models.py | Anntroy/Data_converter | 82e8fcb6a2b4611ad39e122e2730d6656b43b062 | [
"MIT"
] | null | null | null | business_register/models/ruo_models.py | Anntroy/Data_converter | 82e8fcb6a2b4611ad39e122e2730d6656b43b062 | [
"MIT"
] | null | null | null | from django.db import models
from business_register.models.kved_models import Kved
from data_ocean.models import DataOceanModel
class State(DataOceanModel):
EMPTY_FIELD = 'empty field'
name = models.CharField(max_length=100, unique=True, null=True)
def __str__(self):
return self.name
class Ruo... | 31.966667 | 87 | 0.744526 |
883810de65e574425a0b6e17724fe1f67aac7ec5 | 233 | py | Python | boards/bearpi/PWM/BreathLamp1.py | micropython-Chinese-Community/micropython-examples | 5d87a901b41f351b5e2f7b96a99eb8dcbe68164a | [
"CC0-1.0"
] | 1 | 2020-11-22T02:56:20.000Z | 2020-11-22T02:56:20.000Z | boards/bearpi/PWM/BreathLamp1.py | micropython-Chinese-Community/micropython-examples | 5d87a901b41f351b5e2f7b96a99eb8dcbe68164a | [
"CC0-1.0"
] | null | null | null | boards/bearpi/PWM/BreathLamp1.py | micropython-Chinese-Community/micropython-examples | 5d87a901b41f351b5e2f7b96a99eb8dcbe68164a | [
"CC0-1.0"
] | 1 | 2022-01-21T07:57:58.000Z | 2022-01-21T07:57:58.000Z | '''
BEARPI Breathing Lamp QuecPython demo1
'''
from misc import PWM
from utime import sleep_ms
pwm = PWM(PWM.PWM0, 1, 20)
pwm.open()
while 1:
for i in range(20):
pwm = PWM(PWM.PWM0, i+1, 20)
sleep_ms(50)
| 13.705882 | 42 | 0.613734 |
1336b9ec5fd4336b800fe50c520eadda98b008bd | 227 | py | Python | rms/stock/doctype/item/test_item.py | Awab-Abdoun/RMS | 158004c8be41a8a0348cb493d25ef39b18a05875 | [
"MIT"
] | null | null | null | rms/stock/doctype/item/test_item.py | Awab-Abdoun/RMS | 158004c8be41a8a0348cb493d25ef39b18a05875 | [
"MIT"
] | null | null | null | rms/stock/doctype/item/test_item.py | Awab-Abdoun/RMS | 158004c8be41a8a0348cb493d25ef39b18a05875 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Awab Abdoun and Mohammed Elamged and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestItem(unittest.TestCase):
pass
| 20.636364 | 71 | 0.770925 |
ff2f72728e2a4b0aeee0f39133df8b7682aecd40 | 574 | py | Python | groceries/migrations/0002_auto_20160918_0049.py | benawad/django_menu_monkey | 9b183615ec62263b1fe1b7b58a0a4924cfd008e6 | [
"MIT"
] | 2 | 2021-04-20T21:10:51.000Z | 2021-04-25T10:06:42.000Z | groceries/migrations/0002_auto_20160918_0049.py | benawad/django_menu_monkey | 9b183615ec62263b1fe1b7b58a0a4924cfd008e6 | [
"MIT"
] | null | null | null | groceries/migrations/0002_auto_20160918_0049.py | benawad/django_menu_monkey | 9b183615ec62263b1fe1b7b58a0a4924cfd008e6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('recipes', '0005_auto_20160914_2302'),
('groceries', '0001_initial'),
]
operations = [
migrations.RemoveField(
... | 22.96 | 66 | 0.58885 |
37d9149ecba7e49cc007fb890012d31f18de0a3f | 944 | py | Python | training/gan/simclr_only.py | HappyBelief/ContraD | abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f | [
"MIT"
] | 168 | 2021-03-01T04:56:27.000Z | 2022-03-22T09:37:50.000Z | training/gan/simclr_only.py | HappyBelief/ContraD | abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f | [
"MIT"
] | 3 | 2021-03-02T20:10:10.000Z | 2021-08-10T06:09:52.000Z | training/gan/simclr_only.py | HappyBelief/ContraD | abb72562ddac8d8ab37fe9af6ac4c44c61e8ea0f | [
"MIT"
] | 21 | 2021-03-18T01:03:39.000Z | 2022-01-18T00:33:35.000Z | import torch
import torch.nn.functional as F
from penalty import compute_penalty
from training.criterion import nt_xent
from models.gan.base import projection
def loss_D_fn(P, D, options, images, gen_images):
real_images = torch.cat([images, images], dim=0)
views = projection(D, P.augment_fn(real_images))
... | 28.606061 | 86 | 0.648305 |
4ee34f912764fc1df1c953cbbc422838d1a2c360 | 1,710 | py | Python | _unittests/ut_dnotebooks/test_LONG_1A_notebook_12_enonce.py | Jerome-maker/ensae_teaching_cs | 43ea044361ee60c00c85aea354a7b25c21c0fd07 | [
"MIT"
] | 73 | 2015-05-12T13:12:11.000Z | 2021-12-21T11:44:29.000Z | _unittests/ut_dnotebooks/test_LONG_1A_notebook_12_enonce.py | Jerome-maker/ensae_teaching_cs | 43ea044361ee60c00c85aea354a7b25c21c0fd07 | [
"MIT"
] | 90 | 2015-06-23T11:11:35.000Z | 2021-03-31T22:09:15.000Z | _unittests/ut_dnotebooks/test_LONG_1A_notebook_12_enonce.py | Jerome-maker/ensae_teaching_cs | 43ea044361ee60c00c85aea354a7b25c21c0fd07 | [
"MIT"
] | 65 | 2015-01-13T08:23:55.000Z | 2022-02-11T22:42:07.000Z | # -*- coding: utf-8 -*-
"""
@brief test log(time=50s)
"""
import unittest
from pyquickhelper.loghelper import fLOG, noLOG
from pyquickhelper.pycode import get_temp_folder, skipif_travis, add_missing_development_version
import ensae_teaching_cs
class TestNotebookRunner1a_enonce_12(unittest.TestCase):
def set... | 34.2 | 101 | 0.607018 |
175fb18ba87809d2fc1dad07c97600ddff7ec2c2 | 3,227 | py | Python | examples/idr/evaluate.py | pfnet/pynif3d | da3680cce7e8fc4c194f13a1528cddbad9a18ab0 | [
"MIT"
] | 66 | 2021-08-18T01:30:17.000Z | 2022-02-19T10:35:52.000Z | examples/idr/evaluate.py | pfnet/pynif3d | da3680cce7e8fc4c194f13a1528cddbad9a18ab0 | [
"MIT"
] | 6 | 2021-08-18T01:36:31.000Z | 2021-09-02T11:18:01.000Z | examples/idr/evaluate.py | pfnet/pynif3d | da3680cce7e8fc4c194f13a1528cddbad9a18ab0 | [
"MIT"
] | 3 | 2021-11-22T23:06:20.000Z | 2022-02-10T06:24:40.000Z | import argparse
import json
import torch
from torch.utils.data import DataLoader
from tqdm import tqdm
from pynif3d.common.verification import check_path_exists
from pynif3d.datasets import DTUMVSIDR
from pynif3d.loss.conversions import mse_to_psnr
from pynif3d.pipeline import IDR
def parse_arguments():
parser ... | 27.818966 | 86 | 0.657887 |
cc9e7cf1963d97ce8111512173cbc0f052ff6aee | 3,699 | py | Python | flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/example/TPCHQuery10.py | ajaybhat/flink | dcf86c27b91170f99c4d575950c72db8d14617dc | [
"BSD-3-Clause"
] | null | null | null | flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/example/TPCHQuery10.py | ajaybhat/flink | dcf86c27b91170f99c4d575950c72db8d14617dc | [
"BSD-3-Clause"
] | null | null | null | flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/example/TPCHQuery10.py | ajaybhat/flink | dcf86c27b91170f99c4d575950c72db8d14617dc | [
"BSD-3-Clause"
] | 3 | 2016-01-09T18:48:42.000Z | 2019-07-12T13:26:47.000Z | ################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this... | 32.165217 | 122 | 0.629089 |
a155a765a90d0e683c94312023dc42a81e073c88 | 2,050 | py | Python | API/migrations/0004_auto_20170719_2356.py | jsteerv/Test_TicketSystem | c666ac1ed8ee75bba66aaff51dec38d74e73b5f3 | [
"MIT"
] | null | null | null | API/migrations/0004_auto_20170719_2356.py | jsteerv/Test_TicketSystem | c666ac1ed8ee75bba66aaff51dec38d74e73b5f3 | [
"MIT"
] | 2 | 2020-02-11T23:46:26.000Z | 2020-06-05T17:40:24.000Z | API/migrations/0004_auto_20170719_2356.py | jsteerv/Test_TicketSystem | c666ac1ed8ee75bba66aaff51dec38d74e73b5f3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-19 23:56
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('API', '0003_auto_20170719_... | 38.679245 | 184 | 0.639024 |
3b4c5481bb3c42efae57428aab1c9b3df3172473 | 3,964 | py | Python | frontends/relay-futil/pretty_print.py | tedbauer/futil | a5cbb2554d0ecb1b18de0393d8c5897110abe3ac | [
"MIT"
] | 1 | 2021-06-07T09:55:24.000Z | 2021-06-07T09:55:24.000Z | frontends/relay-futil/pretty_print.py | Dahca/futil | 7a5a1f40d40dc7d31f5a189428b378623046abdf | [
"MIT"
] | null | null | null | frontends/relay-futil/pretty_print.py | Dahca/futil | 7a5a1f40d40dc7d31f5a189428b378623046abdf | [
"MIT"
] | null | null | null | from futil_ast import *
def mk_block(decl, contents, indent=2):
"""Format a block like this:
decl {
contents
}
where `decl` is one line but contents can be multiple lines.
"""
return decl + ' {\n' + textwrap.indent(contents, indent * ' ') + '\n}'
def pp_component_signature(... | 36.036364 | 112 | 0.601917 |
d3dd759947b67e18b27fed5388eb2d3a2b44e72c | 221 | py | Python | therightfood/wsgi.py | StfBlanchet/DansMonPanier_App | 73685ed0317916fd59893daa48d305691a9bedb8 | [
"Fair",
"MIT"
] | 2 | 2020-01-21T11:46:14.000Z | 2020-01-26T10:47:49.000Z | therightfood/wsgi.py | StfBlanchet/DansMonPanier_App | 73685ed0317916fd59893daa48d305691a9bedb8 | [
"Fair",
"MIT"
] | 8 | 2020-06-06T01:13:56.000Z | 2021-12-13T20:31:23.000Z | therightfood/wsgi.py | StfBlanchet/DansMonPanier_App | 73685ed0317916fd59893daa48d305691a9bedb8 | [
"Fair",
"MIT"
] | null | null | null | """
WSGI config for
therightfood project.
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'therightfood.settings')
application = get_wsgi_application()
| 15.785714 | 72 | 0.79638 |
af27e662e2b9a1bdd0409c52dd0a4836d843b021 | 9,508 | py | Python | care/facility/api/viewsets/patient.py | agzuniverse/care | 952babf5b394921fcdb4fd4b1405cb571261f322 | [
"MIT"
] | null | null | null | care/facility/api/viewsets/patient.py | agzuniverse/care | 952babf5b394921fcdb4fd4b1405cb571261f322 | [
"MIT"
] | null | null | null | care/facility/api/viewsets/patient.py | agzuniverse/care | 952babf5b394921fcdb4fd4b1405cb571261f322 | [
"MIT"
] | null | null | null | import datetime
import json
from json import JSONDecodeError
from django.contrib.postgres.search import TrigramSimilarity
from django.db.models.query_utils import Q
from django_filters import rest_framework as filters
from dry_rest_permissions.generics import DRYPermissionFiltersBase, DRYPermissions
from rest_framewor... | 37.880478 | 112 | 0.67743 |
16fb4c132a99deae4a721eb89d6526b10b19a702 | 29,678 | py | Python | app/tools/satellites.py | tzyy1970/DemonEditor | 9a8b1e871d943b7c99ba453ee3eefd45fbf6ce49 | [
"MIT"
] | 1 | 2022-02-11T19:28:02.000Z | 2022-02-11T19:28:02.000Z | app/tools/satellites.py | tzyy1970/DemonEditor | 9a8b1e871d943b7c99ba453ee3eefd45fbf6ce49 | [
"MIT"
] | null | null | null | app/tools/satellites.py | tzyy1970/DemonEditor | 9a8b1e871d943b7c99ba453ee3eefd45fbf6ce49 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2018-2022 Dmitriy Yefremov
#
# 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 limitat... | 39.153034 | 119 | 0.528978 |
a8edc125c9cc152d5ef9c1ab0438b2ebcce78822 | 2,486 | py | Python | zk_grpc/lbs.py | laiyongtao/zk_grpc | 170ae16464ddbfb3cf65256d7df980684c80200c | [
"MIT"
] | 3 | 2020-08-20T02:10:42.000Z | 2020-10-11T04:49:02.000Z | zk_grpc/lbs.py | fengdwx/zk_grpc | 170ae16464ddbfb3cf65256d7df980684c80200c | [
"MIT"
] | null | null | null | zk_grpc/lbs.py | fengdwx/zk_grpc | 170ae16464ddbfb3cf65256d7df980684c80200c | [
"MIT"
] | 1 | 2021-12-21T02:04:02.000Z | 2021-12-21T02:04:02.000Z | # coding=utf-8
import random
import typing
from typing import Union, Callable
import grpc.experimental.aio
from .definition import NoServerAvailable, LBS, UnregisteredLBSError
try:
if typing.TYPE_CHECKING:
from .aio import AIOZKGrpc
from .basic import ZKGrpc
except AttributeError:
pass
LBSFu... | 35.014085 | 111 | 0.701126 |
ef1a597cd08af46acced47a996946c28660fb787 | 10,717 | py | Python | lib/googlecloudsdk/third_party/apis/serviceregistry/v1alpha/serviceregistry_v1alpha_client.py | eyalev/gcloud | 421ee63a0a6d90a097e8530d53a6df5b905a0205 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/third_party/apis/serviceregistry/v1alpha/serviceregistry_v1alpha_client.py | eyalev/gcloud | 421ee63a0a6d90a097e8530d53a6df5b905a0205 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/third_party/apis/serviceregistry/v1alpha/serviceregistry_v1alpha_client.py | eyalev/gcloud | 421ee63a0a6d90a097e8530d53a6df5b905a0205 | [
"Apache-2.0"
] | 2 | 2020-11-04T03:08:21.000Z | 2020-11-05T08:14:41.000Z | """Generated client library for serviceregistry version v1alpha."""
# NOTE: This file is autogenerated and should not be edited by hand.
from googlecloudsdk.third_party.apitools.base.py import base_api
from googlecloudsdk.third_party.apis.serviceregistry.v1alpha import serviceregistry_v1alpha_messages as messages
cla... | 40.441509 | 233 | 0.647943 |
da9a387cd766ca4ff5edede5dac320f263829e7a | 1,410 | py | Python | 2020/18/math_2.py | lvaughn/advent | ff3f727b8db1fd9b2a04aad5dcda9a6c8d1c271e | [
"CC0-1.0"
] | null | null | null | 2020/18/math_2.py | lvaughn/advent | ff3f727b8db1fd9b2a04aad5dcda9a6c8d1c271e | [
"CC0-1.0"
] | null | null | null | 2020/18/math_2.py | lvaughn/advent | ff3f727b8db1fd9b2a04aad5dcda9a6c8d1c271e | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
import ply.lex as lex
import ply.yacc as yacc
# Note: Basics of lex/yacc cribbed from David Beazly (https://www.dabeaz.com/ply/ply.html)
tokens = (
'NUMBER',
'PLUS',
'TIMES',
'LPAREN',
'RPAREN',
)
# Regular expression rules for simple tokens
t_PLUS = r'\+'
t_TIMES = r'\*'
t_... | 16.206897 | 90 | 0.585106 |
bdabc268a9114ba8a77e4c3fbcf11aaebd3f5d03 | 1,009 | py | Python | tests/integration/test_redis.py | meggiman/requests-cache | 3d5b77e78013d9c08146b94cbbaa5c9a321b9f75 | [
"BSD-2-Clause"
] | 846 | 2015-01-05T19:19:35.000Z | 2022-03-31T07:11:25.000Z | tests/integration/test_redis.py | meggiman/requests-cache | 3d5b77e78013d9c08146b94cbbaa5c9a321b9f75 | [
"BSD-2-Clause"
] | 495 | 2015-01-16T09:28:34.000Z | 2022-03-28T21:59:13.000Z | tests/integration/test_redis.py | meggiman/requests-cache | 3d5b77e78013d9c08146b94cbbaa5c9a321b9f75 | [
"BSD-2-Clause"
] | 134 | 2015-01-16T14:01:47.000Z | 2022-03-28T18:18:17.000Z | from unittest.mock import patch
import pytest
from requests_cache.backends.redis import RedisCache, RedisDict
from tests.conftest import fail_if_no_connection
from tests.integration.base_cache_test import BaseCacheTest
from tests.integration.base_storage_test import BaseStorageTest
@pytest.fixture(scope='module', a... | 30.575758 | 91 | 0.765114 |
552ad8a2db654e0ea41ed63ddfd09bdb7793a7b6 | 1,047 | py | Python | packages/pyre/records/__init__.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/records/__init__.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/records/__init__.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2022 all rights reserved
#
# externals
from .. import descriptors
# access to the descriptor parts
field = descriptors.stem
measure = field.variable
derivation = field.operator
literal = field.literal
# access to the typed field declarators
# b... | 21.367347 | 45 | 0.780325 |
11dbac77d05d47492024f49223a60f5700b91a41 | 1,726 | py | Python | vocabs/tables.py | acdh-oeaw/4dpuzzle | 7856bbd82c7dfa8da1d5f1ad40593219a35b3cfe | [
"MIT"
] | null | null | null | vocabs/tables.py | acdh-oeaw/4dpuzzle | 7856bbd82c7dfa8da1d5f1ad40593219a35b3cfe | [
"MIT"
] | 6 | 2020-06-05T18:32:02.000Z | 2022-02-10T07:22:24.000Z | vocabs/tables.py | acdh-oeaw/4dpuzzle | 7856bbd82c7dfa8da1d5f1ad40593219a35b3cfe | [
"MIT"
] | 1 | 2020-06-30T13:52:41.000Z | 2020-06-30T13:52:41.000Z | import django_tables2 as tables
from django_tables2.utils import A
from browsing.browsing_utils import MergeColumn
from vocabs.models import *
class SkosLabelTable(tables.Table):
name = tables.LinkColumn('vocabs:skoslabel_detail', args=[A('pk')])
merge = MergeColumn(verbose_name='keep | remove', accessor='pk... | 35.958333 | 83 | 0.690614 |
4d5b40e2c644331e9f6b2de76e58b31c956a47f3 | 514 | py | Python | setup.py | tangzhoutz/YaH3C | c0d873c6ca998aa6d04fa89d3034c4d18981d26b | [
"MIT"
] | 166 | 2015-01-23T05:14:02.000Z | 2021-12-30T07:12:41.000Z | setup.py | tangzhoutz/YaH3C | c0d873c6ca998aa6d04fa89d3034c4d18981d26b | [
"MIT"
] | 14 | 2015-07-01T11:13:51.000Z | 2018-04-06T13:41:18.000Z | setup.py | tangzhoutz/YaH3C | c0d873c6ca998aa6d04fa89d3034c4d18981d26b | [
"MIT"
] | 49 | 2015-03-05T13:35:44.000Z | 2021-11-07T13:29:07.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
import yah3c.yah3c
setup(name='yah3c',
version=yah3c.yah3c.__version__,
description='A program for h3c authentication in SYSU east campus.',
author='maple',
author_email='maplevalley8@gmail.com',
url='https://... | 28.555556 | 74 | 0.655642 |
ab9cf4e0b31bc9044146d5ebfb414e8f4887a462 | 846 | py | Python | ding/framework/message_queue/tests/test_nng.py | jayyoung0802/DI-engine | efbb35ddaf184d1009291e6842fbbae09f193492 | [
"Apache-2.0"
] | 1 | 2022-03-21T16:15:39.000Z | 2022-03-21T16:15:39.000Z | ding/framework/message_queue/tests/test_nng.py | jayyoung0802/DI-engine | efbb35ddaf184d1009291e6842fbbae09f193492 | [
"Apache-2.0"
] | null | null | null | ding/framework/message_queue/tests/test_nng.py | jayyoung0802/DI-engine | efbb35ddaf184d1009291e6842fbbae09f193492 | [
"Apache-2.0"
] | null | null | null | from time import sleep
import pytest
import multiprocessing as mp
from ding.framework.message_queue.nng import NNGMQ
def nng_main(i):
if i == 0:
listen_to = "tcp://127.0.0.1:50515"
attach_to = None
mq = NNGMQ(listen_to=listen_to, attach_to=attach_to)
mq.listen()
for _ in r... | 25.636364 | 60 | 0.598109 |
cb77cda58d36aaf72191454be715456f6b2ff0d8 | 5,409 | py | Python | run_distributed_inference.py | Hanyu-Li/ffn | a41b31abf66deca76a30e978b0a4bb5ac5c15fca | [
"Apache-2.0"
] | 1 | 2020-10-23T15:48:30.000Z | 2020-10-23T15:48:30.000Z | run_distributed_inference.py | Hanyu-Li/ffn | a41b31abf66deca76a30e978b0a4bb5ac5c15fca | [
"Apache-2.0"
] | 1 | 2020-10-30T04:25:25.000Z | 2020-10-30T19:38:41.000Z | run_distributed_inference.py | Hanyu-Li/ffn | a41b31abf66deca76a30e978b0a4bb5ac5c15fca | [
"Apache-2.0"
] | 3 | 2020-04-01T00:18:09.000Z | 2022-01-03T21:21:15.000Z | #!/usr/bin/env python
# Copyright 2017 Google 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 34.234177 | 99 | 0.723609 |
5c2fcaeccef66b994807a0a68b7b274a55e8d0cf | 976 | py | Python | api/models.py | Alok-Blueocean/InstructorChat | 63fb31340b111fa99cfbb747b15a91fea3d94fe8 | [
"MIT"
] | null | null | null | api/models.py | Alok-Blueocean/InstructorChat | 63fb31340b111fa99cfbb747b15a91fea3d94fe8 | [
"MIT"
] | null | null | null | api/models.py | Alok-Blueocean/InstructorChat | 63fb31340b111fa99cfbb747b15a91fea3d94fe8 | [
"MIT"
] | null | null | null | from django.db import models
from users.models import Student,Teacher
class Question(models.Model):
question = models.CharField(max_length=200,blank=False,null=False)
def __str__(self):
return self.question
class Answer(models.Model):
answer = models.TextField()
question = models.ForeignKey(Question,on_delete=... | 29.575758 | 67 | 0.80123 |
c2e3a95b901416561aa1f3d71ad0a00de0ad652b | 9,234 | py | Python | plugins/User/test.py | mogad0n/Limnoria | f31e5c4b9a77e30918d6b93f69d69f3b8f910e3c | [
"BSD-3-Clause"
] | 476 | 2015-01-04T17:42:59.000Z | 2021-08-13T07:40:54.000Z | plugins/User/test.py | mogad0n/Limnoria | f31e5c4b9a77e30918d6b93f69d69f3b8f910e3c | [
"BSD-3-Clause"
] | 491 | 2015-01-01T04:12:23.000Z | 2021-08-12T19:24:47.000Z | plugins/User/test.py | mogad0n/Limnoria | f31e5c4b9a77e30918d6b93f69d69f3b8f910e3c | [
"BSD-3-Clause"
] | 203 | 2015-01-02T18:29:43.000Z | 2021-08-15T12:52:22.000Z | ###
# Copyright (c) 2002-2005, Jeremiah Fincher
# Copyright (c) 2010-2021, The Limnoria Contributors
# All rights reserved.
#
# 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 ret... | 44.394231 | 79 | 0.677929 |
e6797ef959fe3909f82585ea9e05f2a0aad24003 | 5,363 | py | Python | Airbnb_DB/data_manipulation/table_creation_script.py | lmkennedy/DataBases | 706b232b4fc621ce24059926e5083504e3d631f0 | [
"MIT"
] | null | null | null | Airbnb_DB/data_manipulation/table_creation_script.py | lmkennedy/DataBases | 706b232b4fc621ce24059926e5083504e3d631f0 | [
"MIT"
] | null | null | null | Airbnb_DB/data_manipulation/table_creation_script.py | lmkennedy/DataBases | 706b232b4fc621ce24059926e5083504e3d631f0 | [
"MIT"
] | 2 | 2021-11-30T17:40:19.000Z | 2021-11-30T18:15:46.000Z | # -*- coding: utf-8 -*-
"""
Spyder Editor
"""
# =============================================================================
# # imports and prep
# =============================================================================
# imports
from pathlib import Path
import pandas as pd
import numpy as np
# set path | ... | 29.306011 | 79 | 0.541861 |
fd101857709422c506fa96d0358abe0616a6ed15 | 145 | py | Python | Exercicios/01_EstruturaSequencial/exercicio-09.py | gutoffline/curso-python-2021 | 4a9a5f11188ad734402d1dafa7ea627179e7079b | [
"MIT"
] | null | null | null | Exercicios/01_EstruturaSequencial/exercicio-09.py | gutoffline/curso-python-2021 | 4a9a5f11188ad734402d1dafa7ea627179e7079b | [
"MIT"
] | null | null | null | Exercicios/01_EstruturaSequencial/exercicio-09.py | gutoffline/curso-python-2021 | 4a9a5f11188ad734402d1dafa7ea627179e7079b | [
"MIT"
] | null | null | null | farenheit = int(input('Informe a temperatura em Farenheit: '))
celsius = 5 * (farenheit - 32) / 9.0
print("A temperatura em Celsius é", celsius)
| 36.25 | 62 | 0.703448 |
39125a94e4ddfef936e69d090373d235724f3638 | 3,194 | py | Python | app/recipe/views.py | dulvinw/recipe-api | f132345987a5962134755e5425e88dde4c56d5fe | [
"Apache-2.0"
] | 1 | 2021-07-08T05:15:38.000Z | 2021-07-08T05:15:38.000Z | app/recipe/views.py | TMEU/recipe-api | f132345987a5962134755e5425e88dde4c56d5fe | [
"Apache-2.0"
] | null | null | null | app/recipe/views.py | TMEU/recipe-api | f132345987a5962134755e5425e88dde4c56d5fe | [
"Apache-2.0"
] | 1 | 2021-07-08T05:15:42.000Z | 2021-07-08T05:15:42.000Z | from rest_framework import viewsets, mixins, status
from rest_framework.authentication import TokenAuthentication
from rest_framework.decorators import action
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from core.models import Tag, Ingredient, Recipe
from recipe... | 29.036364 | 77 | 0.676268 |
7195c95c0dcd23c572647fe7013386649dce875f | 3,133 | py | Python | reamber/osu/OsuSv.py | Eve-ning/reamber_base_py | 6d19c84f2c110b60e633b82b73e0516396466f56 | [
"MIT"
] | 10 | 2020-06-28T11:16:36.000Z | 2021-08-09T21:41:43.000Z | reamber/osu/OsuSv.py | Eve-ning/reamberPy | 6d19c84f2c110b60e633b82b73e0516396466f56 | [
"MIT"
] | 35 | 2020-06-18T13:05:50.000Z | 2022-02-18T10:13:35.000Z | reamber/osu/OsuSv.py | Eve-ning/reamber_base_py | 6d19c84f2c110b60e633b82b73e0516396466f56 | [
"MIT"
] | 2 | 2021-05-26T17:05:06.000Z | 2021-06-12T18:42:13.000Z | from __future__ import annotations
from dataclasses import dataclass
from typing import Dict, Union
from reamber.base import item_props
from reamber.base.Timed import Timed
from reamber.osu.OsuSampleSet import OsuSampleSet
from reamber.osu.OsuTimingPointMeta import OsuTimingPointMeta
MIN_SV = 0.01
MAX_SV = 10.0
@it... | 35.202247 | 102 | 0.573252 |
36965cd4a62fbb2765160c3f38a298eba801746f | 3,680 | py | Python | src/cloudcopy.py | davidsteinar/structural-uncertainty | 8cb29a7b25a203e7acce528d63b1a0733cfa89b2 | [
"MIT"
] | 1 | 2019-04-10T22:06:33.000Z | 2019-04-10T22:06:33.000Z | src/cloudcopy.py | davidsteinar/structural-uncertainty | 8cb29a7b25a203e7acce528d63b1a0733cfa89b2 | [
"MIT"
] | null | null | null | src/cloudcopy.py | davidsteinar/structural-uncertainty | 8cb29a7b25a203e7acce528d63b1a0733cfa89b2 | [
"MIT"
] | 3 | 2018-01-01T14:59:16.000Z | 2020-03-24T12:00:51.000Z | import os
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.init as init
import torch.nn.functional as F
from torch.utils.data import Dataset, DataLoader
from shallow_model import Model
import numpy as np
class z24Dataset_sequence(Dataset):
def __init__(self, filename = '40C07', wind... | 38.333333 | 107 | 0.686685 |
368875cbcb5e751b67746db6fc383ef15629bd84 | 21,760 | py | Python | data-structures/trees/bst/bst_functions.py | ericpko/CSC148 | fc650c76ac775a6cdaedae6b4b56d2ef90576b59 | [
"MIT"
] | 1 | 2020-11-13T23:07:38.000Z | 2020-11-13T23:07:38.000Z | data-structures/trees/bst/bst_functions.py | ericpko/CSC148 | fc650c76ac775a6cdaedae6b4b56d2ef90576b59 | [
"MIT"
] | null | null | null | data-structures/trees/bst/bst_functions.py | ericpko/CSC148 | fc650c76ac775a6cdaedae6b4b56d2ef90576b59 | [
"MIT"
] | null | null | null | """BST functions
=== CSC148 Winter 2018 ===
Department of Computer Science,
University of Toronto
__author__ = 'Eric K'
=== Module Description ===
This module contains some functions for the bst2.py implementation. Note that
some of these could be modified into methods.
"""
from bst2 import *
from typing import Optio... | 28.593955 | 80 | 0.563649 |
e1d0754945b931205b2e3c5741bee62af3765885 | 63 | py | Python | ipyexperiments/__init__.py | rahulraj80/ipyexperiments | 08a91ef6d7480dae90951e55754a2712de9c335b | [
"Apache-2.0"
] | null | null | null | ipyexperiments/__init__.py | rahulraj80/ipyexperiments | 08a91ef6d7480dae90951e55754a2712de9c335b | [
"Apache-2.0"
] | null | null | null | ipyexperiments/__init__.py | rahulraj80/ipyexperiments | 08a91ef6d7480dae90951e55754a2712de9c335b | [
"Apache-2.0"
] | null | null | null | from .ipyexperiments import *
from .version import __version__
| 21 | 32 | 0.825397 |
2beafd7b43121f0b849d57365b915284fbb31508 | 1,301 | py | Python | services/web/server/src/simcore_service_webserver/tracing.py | elisabettai/osparc-simcore | ad7b6e05111b50fe95e49306a992170490a7247f | [
"MIT"
] | null | null | null | services/web/server/src/simcore_service_webserver/tracing.py | elisabettai/osparc-simcore | ad7b6e05111b50fe95e49306a992170490a7247f | [
"MIT"
] | 1 | 2021-11-29T13:38:09.000Z | 2021-11-29T13:38:09.000Z | services/web/server/src/simcore_service_webserver/tracing.py | mrnicegyu11/osparc-simcore | b6fa6c245dbfbc18cc74a387111a52de9b05d1f4 | [
"MIT"
] | null | null | null | import logging
from aiohttp import web
from servicelib.aiohttp.application_setup import ModuleCategory, app_module_setup
from servicelib.aiohttp.tracing import setup_tracing
from settings_library.tracing import UNDEFINED_CLIENT_NAME, TracingSettings
from ._constants import APP_SETTINGS_KEY
log = logging.getLogger(__... | 32.525 | 81 | 0.769408 |
6b538f4e801fb37e7ae5ea51aed211ab023c520e | 8,232 | py | Python | backend/tests/baserow/contrib/database/field/test_created_on_field_type.py | ashishdhngr/baserow | b098678d2165eb7c42930ee24dc6753a3cb520c3 | [
"MIT"
] | null | null | null | backend/tests/baserow/contrib/database/field/test_created_on_field_type.py | ashishdhngr/baserow | b098678d2165eb7c42930ee24dc6753a3cb520c3 | [
"MIT"
] | null | null | null | backend/tests/baserow/contrib/database/field/test_created_on_field_type.py | ashishdhngr/baserow | b098678d2165eb7c42930ee24dc6753a3cb520c3 | [
"MIT"
] | null | null | null | import pytest
from pytz import timezone
from datetime import datetime
from freezegun import freeze_time
from io import BytesIO
from django.core.exceptions import ValidationError
from baserow.core.handler import CoreHandler
from baserow.contrib.database.fields.models import CreatedOnField
from baserow.contrib.database.... | 34.157676 | 86 | 0.69242 |
6798f10598b359294e848ab725df78fe9f8ef3dd | 58,576 | py | Python | pytype/abstract_test.py | jjedele/pytype | 3c5d920d26ac583bdfd68080e7db454ecb1dc900 | [
"Apache-2.0"
] | null | null | null | pytype/abstract_test.py | jjedele/pytype | 3c5d920d26ac583bdfd68080e7db454ecb1dc900 | [
"Apache-2.0"
] | null | null | null | pytype/abstract_test.py | jjedele/pytype | 3c5d920d26ac583bdfd68080e7db454ecb1dc900 | [
"Apache-2.0"
] | null | null | null | """Tests for abstract.py."""
from pytype import abstract
from pytype import abstract_utils
from pytype import annotations_util
from pytype import config
from pytype import errors
from pytype import function
from pytype import load_pytd
from pytype import special_builtins
from pytype import state as frame_state
from py... | 40.990903 | 80 | 0.677359 |
51826c973dc733f09ba697deb621b5d9ed7fba9e | 130 | py | Python | comparator.py | Daler9999/school_card_game | 46fbaef941e8096653f367758d0009fc50b02c35 | [
"MIT"
] | null | null | null | comparator.py | Daler9999/school_card_game | 46fbaef941e8096653f367758d0009fc50b02c35 | [
"MIT"
] | null | null | null | comparator.py | Daler9999/school_card_game | 46fbaef941e8096653f367758d0009fc50b02c35 | [
"MIT"
] | null | null | null | from random import choice
class Comparator:
def compare(self, clients, table):
return [choice(list(clients.keys()))]
| 21.666667 | 45 | 0.692308 |
b0f800a081c758617a6c00182efd95be798cd9dc | 6,313 | py | Python | scintilla/scripts/LexGen.py | daansystems/lispide | fbd73565842eaad7e5d599ef8d3926792a100d25 | [
"MS-PL"
] | 19 | 2019-01-15T12:11:31.000Z | 2021-11-29T22:24:14.000Z | scintilla/scripts/LexGen.py | daansystems/lispide | fbd73565842eaad7e5d599ef8d3926792a100d25 | [
"MS-PL"
] | 5 | 2018-09-13T15:40:00.000Z | 2021-05-16T15:13:53.000Z | scintilla/scripts/LexGen.py | daansystems/lispide | fbd73565842eaad7e5d599ef8d3926792a100d25 | [
"MS-PL"
] | 4 | 2018-12-04T08:06:41.000Z | 2022-03-26T19:39:56.000Z | #!/usr/bin/env python3
# LexGen.py - implemented 2002 by Neil Hodgson neilh@scintilla.org
# Released to the public domain.
# Regenerate the Scintilla source files that list all the lexers.
# Should be run whenever a new lexer is added or removed.
# Requires Python 3.6 or later
# Files are regenerated in place w... | 43.840278 | 250 | 0.665452 |
daeea95ddaba2255a7d61bb3831b0e4497d70307 | 8,813 | py | Python | tensorflow_datasets/audio/groove.py | SiegeLordEx/datasets | 8e903c178eff14108a8b539ee88c6483669dbac1 | [
"Apache-2.0"
] | 2 | 2019-11-23T18:41:58.000Z | 2020-08-12T21:00:39.000Z | tensorflow_datasets/audio/groove.py | SiegeLordEx/datasets | 8e903c178eff14108a8b539ee88c6483669dbac1 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/audio/groove.py | SiegeLordEx/datasets | 8e903c178eff14108a8b539ee88c6483669dbac1 | [
"Apache-2.0"
] | 1 | 2019-12-14T00:32:08.000Z | 2019-12-14T00:32:08.000Z | # coding=utf-8
# Copyright 2019 The TensorFlow Datasets 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 appl... | 35.252 | 113 | 0.639169 |
1123ac5abbc7730c483dd63975393bf0dbf3e44f | 66,188 | py | Python | python/ccxt/async_support/bitmex.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 2 | 2019-10-08T09:44:58.000Z | 2019-10-10T05:32:18.000Z | python/ccxt/async_support/bitmex.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 1 | 2021-08-23T16:27:34.000Z | 2021-08-23T16:27:34.000Z | python/ccxt/async_support/bitmex.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 2 | 2020-09-08T01:41:24.000Z | 2021-04-30T00:07:59.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Authenticatio... | 42.238673 | 233 | 0.459464 |
f2ee1f017890c3afa2eef17a4308c823fa2d2c44 | 2,377 | py | Python | tests/test_clients.py | LuckyWayn3/memyself-and-eye | 9246d7ce37f0decb67797f5b49744b906f29920e | [
"MIT"
] | 1 | 2020-12-30T14:47:17.000Z | 2020-12-30T14:47:17.000Z | tests/test_clients.py | LuckyWayn3/python-hydra-sdk | 60d4eb193377f9eddc52993283ae9dff7833e113 | [
"MIT"
] | null | null | null | tests/test_clients.py | LuckyWayn3/python-hydra-sdk | 60d4eb193377f9eddc52993283ae9dff7833e113 | [
"MIT"
] | null | null | null | # Copyright (C) 2017 O.S. Systems Software LTDA.
# This software is released under the MIT License
import unittest
from hydra import Hydra, Client
class ClientsTestCase(unittest.TestCase):
def setUp(self):
self.hydra = Hydra('http://localhost:4444', 'http://localhost:4445',
'... | 40.288136 | 77 | 0.671014 |
6c1c6ce2b4a40988d4ba0cee8fafbd7ae1adc39e | 9,562 | py | Python | Python/cartesianToLengths.py | fcorthay/FSSP_lander | 6bb1cdb0cb9040abe0ed0592910d51fbf7362676 | [
"MIT"
] | null | null | null | Python/cartesianToLengths.py | fcorthay/FSSP_lander | 6bb1cdb0cb9040abe0ed0592910d51fbf7362676 | [
"MIT"
] | null | null | null | Python/cartesianToLengths.py | fcorthay/FSSP_lander | 6bb1cdb0cb9040abe0ed0592910d51fbf7362676 | [
"MIT"
] | null | null | null | import re
import numpy as np
import time
pipes_Location = '/tmp/lander'
pipe_from_controller = pipes_Location + '/controlToCalculator'
pipe_to_controller = pipes_Location + '/calculatorToControl'
pipe_to_axes = pipes_Location + '/calculatorToAxes'
pipe_from_axes = pipes_Location + '/calculatorFromAxes'
relative_movem... | 37.206226 | 80 | 0.416963 |
cb987a112b7d095b98dd2912cd715326cc8c6137 | 1,660 | py | Python | var/spack/repos/builtin.mock/packages/patch-several-dependencies/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin.mock/packages/patch-several-dependencies/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin.mock/packages/patch-several-dependencies/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PatchSeveralDependencies(Package):
"""Package that requries multiple patches on a ... | 38.604651 | 96 | 0.692169 |
584cd71a7292e8a8b76e50e023fd82baf33f125c | 1,341 | py | Python | src/adventofcode/year_2020/day_10_2020.py | marcelblijleven/adventofcode | 94def5ec340fbb58eaa56e82b54b9495903eb9d9 | [
"MIT"
] | 13 | 2021-12-01T03:50:04.000Z | 2022-03-23T14:16:29.000Z | src/adventofcode/year_2020/day_10_2020.py | marcelblijleven/adventofcode | 94def5ec340fbb58eaa56e82b54b9495903eb9d9 | [
"MIT"
] | 7 | 2021-11-30T19:52:21.000Z | 2021-12-20T07:46:00.000Z | src/adventofcode/year_2020/day_10_2020.py | marcelblijleven/adventofcode | 94def5ec340fbb58eaa56e82b54b9495903eb9d9 | [
"MIT"
] | 6 | 2021-11-30T20:15:35.000Z | 2021-12-20T17:14:19.000Z | from collections import defaultdict
from typing import List
from adventofcode.util.exceptions import SolutionNotFoundException
from adventofcode.util.helpers import solution_timer
from adventofcode.util.input_helpers import get_input_for_day
def find_differences(input_data: List[int]) -> List[int]:
working_list ... | 27.367347 | 78 | 0.687547 |
de824591d7243935c50a063ad58e5d18cda7a3a6 | 1,097 | py | Python | src/the_tale/the_tale/game/abilities/views.py | devapromix/the-tale | 2a10efd3270734f8cf482b4cfbc5353ef8f0494c | [
"BSD-3-Clause"
] | 1 | 2020-04-02T11:51:20.000Z | 2020-04-02T11:51:20.000Z | src/the_tale/the_tale/game/abilities/views.py | devapromix/the-tale | 2a10efd3270734f8cf482b4cfbc5353ef8f0494c | [
"BSD-3-Clause"
] | null | null | null | src/the_tale/the_tale/game/abilities/views.py | devapromix/the-tale | 2a10efd3270734f8cf482b4cfbc5353ef8f0494c | [
"BSD-3-Clause"
] | null | null | null |
import smart_imports
smart_imports.all()
def argument_to_ability(ability_type): return deck.ABILITIES.get(relations.ABILITY_TYPE(ability_type))
class AbilitiesResource(utils_resources.Resource):
@utils_decorators.login_required
@dext_old_views.validate_argument('ability', argument_to_ability, 'abilities'... | 37.827586 | 120 | 0.707384 |
fb9c28ea58bd3c47f55c065f8a72d2336e64d122 | 838 | py | Python | config.py | stevemustafa/susecon_arch1 | 8416735007e176215b4ccd4cbc91bc327823ac3d | [
"MIT"
] | null | null | null | config.py | stevemustafa/susecon_arch1 | 8416735007e176215b4ccd4cbc91bc327823ac3d | [
"MIT"
] | null | null | null | config.py | stevemustafa/susecon_arch1 | 8416735007e176215b4ccd4cbc91bc327823ac3d | [
"MIT"
] | null | null | null | import os
class Config(object):
"""Parent configuration class."""
DEBUG = False
CSRF_ENABLED = True
SECRET = os.getenv('SECRET')
# SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')
class DevelopmentConfig(Config):
"""Configurations for Development."""
DEBUG = True
class TestingConfig(Co... | 23.942857 | 68 | 0.684964 |
e924fa1bd1e03b1f8da7c449114ce3d38acba08c | 619 | py | Python | setup.py | ywu94/python-text-distance | e96b68144a9df0ff78b635245e2ee8201473d6bc | [
"MIT"
] | 5 | 2020-03-18T18:07:16.000Z | 2022-02-16T11:37:36.000Z | setup.py | ywu94/python-text-distance | e96b68144a9df0ff78b635245e2ee8201473d6bc | [
"MIT"
] | 1 | 2020-03-12T00:58:19.000Z | 2020-03-18T05:37:37.000Z | setup.py | ywu94/python-text-distance | e96b68144a9df0ff78b635245e2ee8201473d6bc | [
"MIT"
] | 3 | 2020-03-12T00:44:07.000Z | 2021-01-22T07:56:38.000Z | import setuptools
with open("README.md", "r") as f:
readme_description = f.read()
setuptools.setup(
name="pytextdist",
version="0.1.6",
author="Yifan Wu",
author_email="yw693@cornell.edu",
description="A python implementation of a variety of text distance and similarity metrics.",
long_description=readme_descr... | 26.913043 | 93 | 0.694669 |
61ca2f35ba051692d4c75779f6fe1872d8fa130a | 16,509 | py | Python | nemo/collections/nlp/modules/common/megatron/token_level_encoder_decoder.py | itzsimpl/NeMo | c03f87d47fc57abc89c0ebf859fccba397dd0f8e | [
"Apache-2.0"
] | null | null | null | nemo/collections/nlp/modules/common/megatron/token_level_encoder_decoder.py | itzsimpl/NeMo | c03f87d47fc57abc89c0ebf859fccba397dd0f8e | [
"Apache-2.0"
] | null | null | null | nemo/collections/nlp/modules/common/megatron/token_level_encoder_decoder.py | itzsimpl/NeMo | c03f87d47fc57abc89c0ebf859fccba397dd0f8e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022, NVIDIA CORPORATION. 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 appli... | 42.992188 | 127 | 0.649525 |
989bd9dd8a7ecef32f42be8cac3175351842daec | 214 | py | Python | chempy/util/__init__.py | matecsaj/chempy | 2c93f185e4547739331193c06d77282206621517 | [
"BSD-2-Clause"
] | null | null | null | chempy/util/__init__.py | matecsaj/chempy | 2c93f185e4547739331193c06d77282206621517 | [
"BSD-2-Clause"
] | null | null | null | chempy/util/__init__.py | matecsaj/chempy | 2c93f185e4547739331193c06d77282206621517 | [
"BSD-2-Clause"
] | 1 | 2022-03-21T09:01:48.000Z | 2022-03-21T09:01:48.000Z | # -*- coding: utf-8 -*-
"""
This package collects utility functions used throughout the ``ChemPy`` package.
"""
from __future__ import (absolute_import, division, print_function)
from .pyutil import NoConvergence
| 26.75 | 79 | 0.752336 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.