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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7979b5261b8d2733b9bffcad819708aafadb9cb9 | 159 | py | Python | easy/521-longest-uncommon-subsequence-i.py | changmeng72/leecode_python3 | 8384f52f0dd74b06b1b6aefa277dde6a228ff5f3 | [
"MIT"
] | null | null | null | easy/521-longest-uncommon-subsequence-i.py | changmeng72/leecode_python3 | 8384f52f0dd74b06b1b6aefa277dde6a228ff5f3 | [
"MIT"
] | null | null | null | easy/521-longest-uncommon-subsequence-i.py | changmeng72/leecode_python3 | 8384f52f0dd74b06b1b6aefa277dde6a228ff5f3 | [
"MIT"
] | null | null | null | class Solution:
def findLUSlength(self, a: str, b: str) -> int:
return -1 if a==b else max(len(a),len(b)) if len(a)!=len(b) else len(a)
| 39.75 | 80 | 0.553459 |
7979b52d29f1b7de99ab45ae098f7bc22af1e27b | 2,582 | py | Python | python/GafferSceneUITest/__init__.py | RudyCortesPearl/gaffer | 4ae48fed676e5fc920154ce39a1a9dfa4dc1f0b4 | [
"BSD-3-Clause"
] | null | null | null | python/GafferSceneUITest/__init__.py | RudyCortesPearl/gaffer | 4ae48fed676e5fc920154ce39a1a9dfa4dc1f0b4 | [
"BSD-3-Clause"
] | null | null | null | python/GafferSceneUITest/__init__.py | RudyCortesPearl/gaffer | 4ae48fed676e5fc920154ce39a1a9dfa4dc1f0b4 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | 46.107143 | 77 | 0.746708 |
7979b6a6f44ec3de0926123a2ccbf3e85b1eb60b | 2,323 | py | Python | discover.py | abaire/xbdm_util | f717b75cf2ae9d06cebe93b2648f914a654f99b4 | [
"Unlicense"
] | null | null | null | discover.py | abaire/xbdm_util | f717b75cf2ae9d06cebe93b2648f914a654f99b4 | [
"Unlicense"
] | null | null | null | discover.py | abaire/xbdm_util | f717b75cf2ae9d06cebe93b2648f914a654f99b4 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
"""Runs NAP discovery and reports any devices on the network."""
import argparse
import logging
import sys
import time
from typing import Tuple
from xbdm import discoverer
XBDM_PORT = 731
logger = logging.getLogger(__name__)
def main(args):
log_level = logging.DEBUG if args.verbose else ... | 23.704082 | 87 | 0.624193 |
7979b6ced9562370d54be9a5f9def2876c4be80d | 5,696 | py | Python | resources/traffic_scripts/lisp/lispgpe_check.py | preym17/csit | 3151c98618c78e3782e48bbe4d9c8f906c126f69 | [
"Apache-2.0"
] | null | null | null | resources/traffic_scripts/lisp/lispgpe_check.py | preym17/csit | 3151c98618c78e3782e48bbe4d9c8f906c126f69 | [
"Apache-2.0"
] | null | null | null | resources/traffic_scripts/lisp/lispgpe_check.py | preym17/csit | 3151c98618c78e3782e48bbe4d9c8f906c126f69 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2017 Cisco and/or its affiliates.
# 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 b... | 30.459893 | 79 | 0.653617 |
7979b773fe9c29bd2859fea4feff62e47012c598 | 1,307 | py | Python | tests/setup/local_keycloak_config.py | oslokommune/okdata-permission-api | e12739794fb48437c1b39e1bffc9d632e76d2449 | [
"MIT"
] | null | null | null | tests/setup/local_keycloak_config.py | oslokommune/okdata-permission-api | e12739794fb48437c1b39e1bffc9d632e76d2449 | [
"MIT"
] | 1 | 2022-01-14T09:37:58.000Z | 2022-01-14T09:37:58.000Z | tests/setup/local_keycloak_config.py | oslokommune/okdata-permission-api | e12739794fb48437c1b39e1bffc9d632e76d2449 | [
"MIT"
] | null | null | null | from dataplatform_keycloak.groups import team_name_to_group_name
server_url = "http://localhost:35789"
server_auth_url = f"{server_url}/auth/"
realm_name = "localtest"
# Client id and secret for the resource server
resource_server_id = "resource-server"
resource_server_secret = "8acda364-eafa-4a03-8fa6-b019a48ddafe"... | 33.512821 | 96 | 0.775057 |
7979b8166920a3bc21334c53897dafd63f14d8e5 | 1,239 | py | Python | test/layers/constants/constant.py | chrisunice/onnx2keras-custom | c37fe43fe5dce274a5a351d3c328cf61daa5f364 | [
"MIT"
] | null | null | null | test/layers/constants/constant.py | chrisunice/onnx2keras-custom | c37fe43fe5dce274a5a351d3c328cf61daa5f364 | [
"MIT"
] | null | null | null | test/layers/constants/constant.py | chrisunice/onnx2keras-custom | c37fe43fe5dce274a5a351d3c328cf61daa5f364 | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
from onnx2keras_custom import onnx_to_keras, check_torch_keras_error
import onnx
class FTest(nn.Module):
def __init__(self):
super(FTest, self).__init__()
def forward(self, x):
return x + torch.FloatTens... | 30.219512 | 106 | 0.610977 |
7979b91abe160406d10181ab902a21e9a8352664 | 5,019 | py | Python | healthcareai/common/database_validators.py | vijayphugat/Practice | 7d8560d62a5d6bfa9488526da318973295a25255 | [
"MIT"
] | null | null | null | healthcareai/common/database_validators.py | vijayphugat/Practice | 7d8560d62a5d6bfa9488526da318973295a25255 | [
"MIT"
] | null | null | null | healthcareai/common/database_validators.py | vijayphugat/Practice | 7d8560d62a5d6bfa9488526da318973295a25255 | [
"MIT"
] | null | null | null | import datetime
import healthcareai.common.database_library_validators
try:
import pyodbc
pyodbc_is_loaded = True
except ImportError:
pyodbc_is_loaded = False
from healthcareai.common.healthcareai_error import HealthcareAIError
def validate_catalyst_prediction_sam_connection(server, dest... | 41.139344 | 121 | 0.651126 |
7979ba5f55fd3893470d1ace21903d456cec0815 | 2,071 | py | Python | alphabetsoup/common.py | joelb123/alphabetsoup | 19cba7094a8e5cb4db4a617f5334308f3abfe584 | [
"BSD-3-Clause"
] | null | null | null | alphabetsoup/common.py | joelb123/alphabetsoup | 19cba7094a8e5cb4db4a617f5334308f3abfe584 | [
"BSD-3-Clause"
] | 112 | 2020-02-06T12:14:11.000Z | 2021-07-29T12:18:58.000Z | alphabetsoup/common.py | joelb123/alphabetsoup | 19cba7094a8e5cb4db4a617f5334308f3abfe584 | [
"BSD-3-Clause"
] | 1 | 2021-06-24T02:40:50.000Z | 2021-06-24T02:40:50.000Z | # -*- coding: utf-8 -*-
# imports
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
# global variables
PROGRAM_NAME = 'alphabetsoup'
DUP_NAME = 'Dups'
SUBSTRING_NAME = 'Substr'
GRAPH_TYPES = [DUP_NAME, SUBSTRING_NAME]
AMBIG_NAME = 'Ambig%'
SHORT_NAME = 'Short'
FILESMAL... | 25.8875 | 76 | 0.507484 |
7979babf81c4ac481b5a32ff94cbf7fab547270a | 954 | py | Python | Chinese-OCR/chinese-ocr-master/ctpn/ctpn/model.py | xiaoshicae/Others | a5df75f1da527f94c1c79870a8f5ac7c9a7353c2 | [
"Apache-1.1"
] | 8 | 2018-09-18T08:09:47.000Z | 2020-04-03T04:51:26.000Z | Chinese-OCR/chinese-ocr-master/ctpn/ctpn/model.py | xiaoshicae/Others | a5df75f1da527f94c1c79870a8f5ac7c9a7353c2 | [
"Apache-1.1"
] | null | null | null | Chinese-OCR/chinese-ocr-master/ctpn/ctpn/model.py | xiaoshicae/Others | a5df75f1da527f94c1c79870a8f5ac7c9a7353c2 | [
"Apache-1.1"
] | 2 | 2018-04-17T16:05:18.000Z | 2020-02-18T12:48:30.000Z |
import tensorflow as tf
import sys
import os
from cfg import Config
from other import resize_im
sys.path.append('ctpn')
from lib.networks.factory import get_network
from lib.fast_rcnn.config import cfg
from lib.fast_rcnn.test import test_ctpn
def load_tf_model():
cfg.TEST.HAS_RPN = True # Use RPN for proposals
... | 26.5 | 58 | 0.719078 |
7979bb7fee4e81338b34bc3f45acbf85cf56a88e | 937 | py | Python | essentials/chapter9/basics_mongo.py | ecerami/fastapi_essentials | 9a978416646d2db4fcbeb8f4f41dd9f9d7671834 | [
"MIT"
] | null | null | null | essentials/chapter9/basics_mongo.py | ecerami/fastapi_essentials | 9a978416646d2db4fcbeb8f4f41dd9f9d7671834 | [
"MIT"
] | null | null | null | essentials/chapter9/basics_mongo.py | ecerami/fastapi_essentials | 9a978416646d2db4fcbeb8f4f41dd9f9d7671834 | [
"MIT"
] | null | null | null | # Illustrates the basics of using PyMongo
from pymongo import MongoClient
import pprint
# Pretty Print Config
pp = pprint.PrettyPrinter(indent=4)
# Connect to the default, local MongoDB server
client = MongoClient()
# Connect to the Slack Database
db = client["slack"]
msg_collection = db["messages"]
# Create a mess... | 25.324324 | 73 | 0.731057 |
7979bc7fce740c41df954e72bfb865eb5ef5c639 | 176 | py | Python | bot/utils/decorators.py | AEnterprise/kanelbulle | 1aecf49570d74d1412be07f6e4bcae42f3883b69 | [
"MIT"
] | 4 | 2018-09-23T10:13:16.000Z | 2018-10-31T19:07:53.000Z | bot/utils/decorators.py | AEnterprise/kanelbulle | 1aecf49570d74d1412be07f6e4bcae42f3883b69 | [
"MIT"
] | 5 | 2018-09-30T08:34:54.000Z | 2018-10-27T09:04:53.000Z | bot/utils/decorators.py | AEnterprise/kanelbulle | 1aecf49570d74d1412be07f6e4bcae42f3883b69 | [
"MIT"
] | 2 | 2018-09-29T22:32:43.000Z | 2019-07-18T15:15:51.000Z | from discord.ext import commands
import config
def is_admin():
def predicate(ctx):
return ctx.author.id in config.admins
return commands.check(predicate) | 25.142857 | 46 | 0.710227 |
7979bd690c4851c1455d972b3e3864072523b886 | 610 | py | Python | core-python/Core_Python/multithreading/BoundedSemaphoreDemo.py | theumang100/tutorials-1 | 497f54c2adb022c316530319a168fca1c007d4b1 | [
"MIT"
] | 9 | 2020-04-23T05:24:19.000Z | 2022-02-17T16:37:51.000Z | core-python/Core_Python/multithreading/BoundedSemaphoreDemo.py | theumang100/tutorials-1 | 497f54c2adb022c316530319a168fca1c007d4b1 | [
"MIT"
] | 5 | 2020-10-01T05:08:37.000Z | 2020-10-12T03:18:10.000Z | core-python/Core_Python/multithreading/BoundedSemaphoreDemo.py | theumang100/tutorials-1 | 497f54c2adb022c316530319a168fca1c007d4b1 | [
"MIT"
] | 9 | 2020-04-28T14:06:41.000Z | 2021-10-19T18:32:28.000Z | import threading
from time import sleep
th_names = []
def task(s):
global th_names
t_name = threading.current_thread().getName()
print("Waiting to start execution : ", t_name)
s.acquire()
print("Started execution : ", t_name)
th_names.append(t_name)
sleep(1)
print("Finished Execution ... | 22.592593 | 73 | 0.647541 |
7979be2ee6ba24008f8cbc5cc2cfd3f6fc26258a | 10,352 | py | Python | sdk/python/pulumi_azure_nextgen/customerinsights/v20170426/get_link.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/customerinsights/v20170426/get_link.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/customerinsights/v20170426/get_link.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 39.064151 | 357 | 0.668083 |
7979be4283b3eff0f4080ed13fcb9028f1ed9d1e | 6,239 | py | Python | openpyxl/worksheet/tests/test_table.py | peval/openpyxl_test | 93c6a6432594f309bb18b57c3fd3b2d9d1c1d15f | [
"MIT"
] | 6 | 2018-05-15T05:08:52.000Z | 2021-12-23T12:31:28.000Z | openpyxl/worksheet/tests/test_table.py | peval/openpyxl_test | 93c6a6432594f309bb18b57c3fd3b2d9d1c1d15f | [
"MIT"
] | 1 | 2019-08-27T15:27:48.000Z | 2019-08-27T15:27:48.000Z | openpyxl/worksheet/tests/test_table.py | peval/openpyxl_test | 93c6a6432594f309bb18b57c3fd3b2d9d1c1d15f | [
"MIT"
] | 6 | 2020-03-23T15:59:14.000Z | 2021-09-18T09:54:57.000Z | from __future__ import absolute_import
# Copyright (c) 2010-2018 openpyxl
import pytest
from io import BytesIO
from zipfile import ZipFile
from openpyxl.xml.functions import fromstring, tostring
from openpyxl.tests.helper import compare_xml
@pytest.fixture
def TableColumn():
from ..table import TableColumn
... | 28.230769 | 108 | 0.61388 |
7979be69750e72c57d5aff3e487c07851875c690 | 483 | py | Python | road situation analysis/research/vehicles/number plate recognition/my_detection_utils.py | MikhailKitikov/DrivingMonitor | 0b698d1ba644ce74e1c7d88c3e18a1ef997aabc0 | [
"MIT"
] | null | null | null | road situation analysis/research/vehicles/number plate recognition/my_detection_utils.py | MikhailKitikov/DrivingMonitor | 0b698d1ba644ce74e1c7d88c3e18a1ef997aabc0 | [
"MIT"
] | null | null | null | road situation analysis/research/vehicles/number plate recognition/my_detection_utils.py | MikhailKitikov/DrivingMonitor | 0b698d1ba644ce74e1c7d88c3e18a1ef997aabc0 | [
"MIT"
] | null | null | null | import os
import sys
import cv2
import numpy as np
from PIL import Image
from matplotlib import pyplot as plt
import tensorflow.compat.v1 as tf
import pytesseract
def preprocess_img(img):
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
img = cv2.GaussianBlur(img, (3, 3), 0)
return img
def verify_char(ch):
alphab... | 16.655172 | 50 | 0.751553 |
7979bed24649a6205a4aa33e61f556e3839b650f | 5,701 | py | Python | locust/test/testcases.py | kmels/locust | 959006524082e9d41904997ee0c9ef317f2b3f65 | [
"MIT"
] | 2 | 2020-10-06T04:03:19.000Z | 2020-11-17T07:05:04.000Z | locust/test/testcases.py | kmels/locust | 959006524082e9d41904997ee0c9ef317f2b3f65 | [
"MIT"
] | 1 | 2021-01-16T17:56:48.000Z | 2021-01-16T17:56:48.000Z | locust/test/testcases.py | kmels/locust | 959006524082e9d41904997ee0c9ef317f2b3f65 | [
"MIT"
] | 1 | 2019-10-18T20:36:13.000Z | 2019-10-18T20:36:13.000Z | import base64
import logging
import random
import sys
import unittest
import warnings
from copy import copy
from io import BytesIO
import gevent
import gevent.pywsgi
from flask import Flask, Response, make_response, redirect, request, send_file, stream_with_context
import locust
from locust import log
from locust.eve... | 28.083744 | 113 | 0.671987 |
7979bf775f7f4ffc1b0859e1b5dad3433a09804c | 267 | py | Python | ReverseInteger.py | kannan5/LeetCode | 2523f5aed7fd8f087004d711597a966088c12db7 | [
"MIT"
] | null | null | null | ReverseInteger.py | kannan5/LeetCode | 2523f5aed7fd8f087004d711597a966088c12db7 | [
"MIT"
] | null | null | null | ReverseInteger.py | kannan5/LeetCode | 2523f5aed7fd8f087004d711597a966088c12db7 | [
"MIT"
] | null | null | null |
x = -123
newInt = 0
retInt = 0
if(x>0):
new = (str(x)[::-1])
newInt = int(new.strip())
else:
new = str(str(abs(x))[::-1])
newInt = (-1*int(new.strip()))
if 2 ** 31 > newInt and newInt >= (-2 ** 31):
retInt = newInt
print(newInt)
| 16.6875 | 46 | 0.483146 |
7979c09667e4f46a37eb5fed9040e83e92bfa92b | 1,640 | py | Python | code/display_lidar_pi.py | dastels/adafruit_rplidar | 7d7f6adff1d078a682d93b654fc26012fcf08d2e | [
"MIT"
] | 1 | 2019-05-23T13:59:02.000Z | 2019-05-23T13:59:02.000Z | code/display_lidar_pi.py | dastels/adafruit_rplidar | 7d7f6adff1d078a682d93b654fc26012fcf08d2e | [
"MIT"
] | 2 | 2019-05-23T15:09:52.000Z | 2021-05-15T11:41:18.000Z | code/display_lidar_pi.py | dastels/adafruit_rplidar | 7d7f6adff1d078a682d93b654fc26012fcf08d2e | [
"MIT"
] | null | null | null | """
Consume LIDAR measurement file and create an image for display.
Adafruit invests time and resources providing this open source code.
Please support Adafruit and open source hardware by purchasing
products from Adafruit!
Written by Dave Astels for Adafruit Industries
Copyright (c) 2019 Adafruit Industries
Licensed... | 27.79661 | 98 | 0.62439 |
7979c178312fb69d4ed6139d0a28e08b242d8a61 | 1,190 | py | Python | day3/jnpr/ex3_jnpr_cfg.py | scottm121171/pynet-ons-dec21 | dad9490caac2c18430fa53019a61784e5ae7f497 | [
"Apache-2.0"
] | 1 | 2021-12-21T04:57:32.000Z | 2021-12-21T04:57:32.000Z | day3/jnpr/ex3_jnpr_cfg.py | scottm121171/pynet-ons-dec21 | dad9490caac2c18430fa53019a61784e5ae7f497 | [
"Apache-2.0"
] | null | null | null | day3/jnpr/ex3_jnpr_cfg.py | scottm121171/pynet-ons-dec21 | dad9490caac2c18430fa53019a61784e5ae7f497 | [
"Apache-2.0"
] | 11 | 2021-12-07T16:04:22.000Z | 2022-02-09T12:20:05.000Z | import os
from getpass import getpass
from jnpr.junos import Device
from jnpr.junos.exception import LockError
from jnpr.junos.utils.config import Config
password = os.getenv("JNPR_PASSWORD")
if password is None:
password = getpass("Enter vMX password: ")
# Create pyez Device object for vmx2
my_device = Device(ho... | 24.285714 | 78 | 0.757983 |
7979c2794e4213b1ca516f55f43df79c65d24c6a | 265 | py | Python | documents/views.py | jn-1/djangoJSFoodDeliveryWebApplication | 7093f91408ca630d541d5f44cbaa7d6427a0545f | [
"MIT"
] | null | null | null | documents/views.py | jn-1/djangoJSFoodDeliveryWebApplication | 7093f91408ca630d541d5f44cbaa7d6427a0545f | [
"MIT"
] | null | null | null | documents/views.py | jn-1/djangoJSFoodDeliveryWebApplication | 7093f91408ca630d541d5f44cbaa7d6427a0545f | [
"MIT"
] | null | null | null | from django.shortcuts import render
from documents.models import Document
def index(request):
documents = Document.objects.order_by('name')
documents_dict = {'documents': documents}
return render(request, 'documents/index.html', context=documents_dict) | 37.857143 | 74 | 0.773585 |
7979c3ace8b73d5e85c15509beac314148d0b723 | 3,929 | py | Python | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_validate_token_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_validate_token_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_validate_token_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class KeystoneValidateTokenResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
... | 28.471014 | 90 | 0.588445 |
7979c4bc7339c6f16203a3c89c82d879a073dc2c | 132 | py | Python | Ex6.py | zelfg/-infosatc-lp-avaliativo-02 | bff03305bf6d5d454b7ddc81c2c66da6f6cd9c27 | [
"MIT"
] | null | null | null | Ex6.py | zelfg/-infosatc-lp-avaliativo-02 | bff03305bf6d5d454b7ddc81c2c66da6f6cd9c27 | [
"MIT"
] | null | null | null | Ex6.py | zelfg/-infosatc-lp-avaliativo-02 | bff03305bf6d5d454b7ddc81c2c66da6f6cd9c27 | [
"MIT"
] | null | null | null | ListaPC = ["Gabinete Cooler Master", "RTX 2080 TI", "I9", "Asus Prime", "Fonte 500W"]
del ListaPC[0]
del ListaPC[0]
print(ListaPC) | 22 | 85 | 0.681818 |
7979c4ccd150cbafc735f8bbbd9b53b740b21910 | 390 | py | Python | packages/python/plotly/plotly/validators/box/_metasrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/box/_metasrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/box/_metasrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="metasrc", parent_name="box", **kwargs):
super(MetasrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_... | 32.5 | 75 | 0.666667 |
7979c543459894b2d0ea6376a5ee52a1d2bf0012 | 2,319 | py | Python | modules/rats/luxnet.py | nidsche/viper | d4e3b572fe772efc06e6879f7403b1c49e37f46f | [
"BSD-3-Clause"
] | 97 | 2017-12-18T15:19:28.000Z | 2022-03-25T07:10:00.000Z | modules/reversing/viper/rats/luxnet.py | robertdigital/CIRTKit | 58b8793ada69320ffdbdd4ecdc04a3bb2fa83c37 | [
"MIT"
] | 1 | 2019-01-29T16:29:27.000Z | 2019-01-29T16:29:27.000Z | modules/reversing/viper/rats/luxnet.py | robertdigital/CIRTKit | 58b8793ada69320ffdbdd4ecdc04a3bb2fa83c37 | [
"MIT"
] | 21 | 2018-04-04T18:12:13.000Z | 2021-06-12T09:40:58.000Z | # Originally written by Kevin Breen (@KevTheHermit):
# https://github.com/kevthehermit/RATDecoders/blob/master/Albertino.py
import re
import string
from struct import unpack
def calc_length(byteStr):
#try:
return unpack(">H", byteStr)[0]
#except:
#return None
def string_print(line):
retur... | 42.944444 | 876 | 0.676585 |
7979c660ce23028691fcf6f057353151ed6051e6 | 5,525 | py | Python | archives/presenters/currencyFilter.py | block1o1/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 4 | 2021-10-14T21:22:25.000Z | 2022-03-12T19:58:48.000Z | archives/presenters/currencyFilter.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | null | null | null | archives/presenters/currencyFilter.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 1 | 2022-03-15T22:52:53.000Z | 2022-03-15T22:52:53.000Z | import datetime
import pprint
import pymongo
import sys
import json
import time
import copy
from pymongo import MongoClient
import sys
sys.path.insert(0, '/home/nevolin/public_html/cryptoproto/')
from mysettings import dtNow
import DAL
def main(args = sys.argv):
client = DAL.openConnection()
db=client.crypto
if n... | 31.214689 | 144 | 0.608326 |
7979c6ad08be22e90e429fffafd533f11e08ad9c | 8,851 | py | Python | rasa_nlu_gao/models/elmo_cn/modules/classify_layer.py | 1073521013/rasa_nlu_gq | 6c8bea1b14390246b39770abc544986f4c7acf26 | [
"Apache-2.0"
] | 3 | 2020-08-03T00:21:04.000Z | 2021-09-01T06:20:00.000Z | rasa_nlu_gao/models/elmo_cn/modules/classify_layer.py | 1073521013/rasa_nlu_gq | 6c8bea1b14390246b39770abc544986f4c7acf26 | [
"Apache-2.0"
] | 1 | 2022-02-10T06:42:23.000Z | 2022-02-10T06:42:23.000Z | rasa_nlu_gao/models/elmo_cn/modules/classify_layer.py | 1073521013/rasa_nlu_gq | 6c8bea1b14390246b39770abc544986f4c7acf26 | [
"Apache-2.0"
] | 4 | 2019-06-06T08:05:22.000Z | 2020-08-07T08:07:22.000Z | import logging
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(levelname)s: %(message)s')
class SoftmaxLayer(nn.Module):
""" Naive softmax-layer """
def __init__(self, o... | 36.879167 | 160 | 0.62298 |
7979c7d4538102cdd16747cb8b7c30fadd49de72 | 4,072 | py | Python | iss/test/test_util.py | standage/InSilicoSeq | cd73724c65f2227ff90504f4367f9699840e09e9 | [
"MIT"
] | null | null | null | iss/test/test_util.py | standage/InSilicoSeq | cd73724c65f2227ff90504f4367f9699840e09e9 | [
"MIT"
] | null | null | null | iss/test/test_util.py | standage/InSilicoSeq | cd73724c65f2227ff90504f4367f9699840e09e9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from nose.tools import raises, with_setup
from iss import util
from Bio import SeqIO
import random
def setup_function():
output_file_prefix = 'data/.test'
def teardown_function():
util.cleanup(['data/test_concat.iss.tmp.genomes.fasta'])
def test_phred_conv... | 26.966887 | 76 | 0.66945 |
7979c7ea63f8461af2e52d75386c7b825056ae08 | 1,154 | py | Python | spacy/lang/ru/lex_attrs.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 22,040 | 2016-10-03T11:58:15.000Z | 2022-03-31T21:08:19.000Z | spacy/lang/ru/lex_attrs.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 6,927 | 2016-10-03T13:11:11.000Z | 2022-03-31T17:01:25.000Z | spacy/lang/ru/lex_attrs.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 4,403 | 2016-10-04T03:36:33.000Z | 2022-03-31T14:12:34.000Z | from ...attrs import LIKE_NUM
_num_words = [
"ноль",
"один",
"два",
"три",
"четыре",
"пять",
"шесть",
"семь",
"восемь",
"девять",
"десять",
"одиннадцать",
"двенадцать",
"тринадцать",
"четырнадцать",
"пятнадцать",
"шестнадцать",
"семнадцать",
... | 17.223881 | 49 | 0.507799 |
7979ca4fcf5dc14f4e1b739364b410ddb76c451b | 11,702 | py | Python | fixture/contact.py | annalatusek/qa_python_training | 8aece6c6f5d91a4000e4cbf19af975b48b7b5736 | [
"Apache-2.0"
] | null | null | null | fixture/contact.py | annalatusek/qa_python_training | 8aece6c6f5d91a4000e4cbf19af975b48b7b5736 | [
"Apache-2.0"
] | null | null | null | fixture/contact.py | annalatusek/qa_python_training | 8aece6c6f5d91a4000e4cbf19af975b48b7b5736 | [
"Apache-2.0"
] | null | null | null | from model.contact import Contact
import re
import random
from selenium.common.exceptions import NoSuchElementException
class ContactHelper:
def __init__(self, app):
self.app = app
def start_from_homepage(self):
wd = self.app.wd
# if not (wd.current_url.endswith("/addressbook/") and l... | 42.864469 | 115 | 0.647411 |
7979cc665960fdff3fe9d6157a82cd3fbc07897b | 1,666 | py | Python | migrations/0002_add_initial_data.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | null | null | null | migrations/0002_add_initial_data.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | null | null | null | migrations/0002_add_initial_data.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | 1 | 2020-10-03T22:13:54.000Z | 2020-10-03T22:13:54.000Z | import json
from typing import Generator, TextIO
def get_quotes(f: TextIO) -> Generator[dict, None, None]:
data = json.load(f)
for quote in data:
yield {
"author": quote["Author"],
"category": quote["Category"],
"content": quote["Quote"],
}
sources = {}
c... | 26.870968 | 84 | 0.590036 |
7979cd1cdb01251bc0dacf338ad59def2d6825c6 | 2,328 | py | Python | nmtpytorch/scripts/all_but_the_top.py | toshohirasawa/mmt-with-monolingual-data | 3f80f3a1807e1a837ef82d75917c1cf581270b84 | [
"MIT"
] | null | null | null | nmtpytorch/scripts/all_but_the_top.py | toshohirasawa/mmt-with-monolingual-data | 3f80f3a1807e1a837ef82d75917c1cf581270b84 | [
"MIT"
] | null | null | null | nmtpytorch/scripts/all_but_the_top.py | toshohirasawa/mmt-with-monolingual-data | 3f80f3a1807e1a837ef82d75917c1cf581270b84 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# original all-but-the-top code:
# https://gist.github.com/lgalke/febaaa1313d9c11f3bc8240defed8390
import sys, os
import logging
import argparse
logger = logging.getLogger(__name__)
import numpy as np
from sklearn.decomposition import PCA
from gensim.models import KeyedVectors
import torch
def ... | 31.04 | 86 | 0.67311 |
7979cd307715d53931c84ce3f93bbc172ef203e7 | 3,899 | py | Python | qakgc/retriever/tfidf_doc_ranker.py | pbmstrk/odqa | b5917237d5162eae208382e5d25b0c8c47018681 | [
"BSD-3-Clause"
] | 4 | 2020-09-04T16:58:52.000Z | 2021-06-23T03:37:18.000Z | qakgc/retriever/tfidf_doc_ranker.py | pbmstrk/QAKGC | b5917237d5162eae208382e5d25b0c8c47018681 | [
"BSD-3-Clause"
] | 3 | 2020-07-07T23:45:21.000Z | 2020-07-09T11:49:23.000Z | qakgc/retriever/tfidf_doc_ranker.py | pbmstrk/odqa | b5917237d5162eae208382e5d25b0c8c47018681 | [
"BSD-3-Clause"
] | null | null | null | # this code is adapted from original source code at
# https://github.com/facebookresearch/DrQA
# The License file in the root of the directory is the original
# license file
# code to retrieve documents
import logging
import numpy as np
import scipy.sparse as sp
from multiprocessing.pool import ThreadPool
from func... | 32.764706 | 79 | 0.609387 |
7979cd94a40a66975ce7815ca79170693ef5bb5d | 2,516 | py | Python | aliyun-python-sdk-vpc/aliyunsdkvpc/request/v20160428/DescribeVpcsRequest.py | xiaozhao1/aliyun-openapi-python-sdk | 7297b69619fbe18a053ce552df9ab378b7c5719f | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-vpc/aliyunsdkvpc/request/v20160428/DescribeVpcsRequest.py | xiaozhao1/aliyun-openapi-python-sdk | 7297b69619fbe18a053ce552df9ab378b7c5719f | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-vpc/aliyunsdkvpc/request/v20160428/DescribeVpcsRequest.py | xiaozhao1/aliyun-openapi-python-sdk | 7297b69619fbe18a053ce552df9ab378b7c5719f | [
"Apache-2.0"
] | 1 | 2021-01-26T05:01:42.000Z | 2021-01-26T05:01:42.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 file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.25641 | 71 | 0.760731 |
7979ce21d3d7b2abc621b4c585f41e665a583fdf | 1,899 | py | Python | vistrails/db/versions/v1_0_4/translate/__init__.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | 1 | 2020-03-13T20:56:21.000Z | 2020-03-13T20:56:21.000Z | vistrails/db/versions/v1_0_4/translate/__init__.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | null | null | null | vistrails/db/versions/v1_0_4/translate/__init__.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | null | null | null | ###############################################################################
##
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary for... | 51.324324 | 79 | 0.687204 |
7979ce8b33a632bace6769b02d805839f344f92c | 227 | py | Python | app/resources/sms/__init__.py | chinese-bbb/web-backend | 635d9021b5d375b782b71c947877cf461b982997 | [
"MIT"
] | 4 | 2019-06-16T21:14:14.000Z | 2019-08-30T09:29:25.000Z | app/resources/sms/__init__.py | chinese-bbb/web-backend | 635d9021b5d375b782b71c947877cf461b982997 | [
"MIT"
] | 8 | 2019-06-11T15:55:20.000Z | 2021-06-01T23:43:20.000Z | app/resources/sms/__init__.py | chinese-bbb/web-backend | 635d9021b5d375b782b71c947877cf461b982997 | [
"MIT"
] | 4 | 2019-04-23T08:54:54.000Z | 2019-07-31T02:47:12.000Z | """
Auth module
============
"""
def init_app(app, api, **kwargs):
# pylint: disable=unused-argument,unused-variable
# Touch underlying modules
from . import routes # noqa
api.register_blueprint(routes.bp)
| 16.214286 | 53 | 0.638767 |
7979cf204b46600dc474545727af4a03721f3ad4 | 22,801 | py | Python | src/ezdxf/entities/acis.py | hh-wu/ezdxf | 62509ba39b826ee9b36f19c0a5abad7f3518186a | [
"MIT"
] | 2 | 2021-07-28T03:52:02.000Z | 2021-07-31T05:08:11.000Z | src/ezdxf/entities/acis.py | hh-wu/ezdxf | 62509ba39b826ee9b36f19c0a5abad7f3518186a | [
"MIT"
] | 1 | 2020-04-28T17:52:26.000Z | 2020-10-07T01:28:56.000Z | src/ezdxf/entities/acis.py | hh-wu/ezdxf | 62509ba39b826ee9b36f19c0a5abad7f3518186a | [
"MIT"
] | 1 | 2021-07-31T05:08:12.000Z | 2021-07-31T05:08:12.000Z | # Copyright (c) 2019 Manfred Moitzi
# License: MIT License
# Created 2019-03-09
from typing import TYPE_CHECKING, Iterable, List, Union
from contextlib import contextmanager
from ezdxf.lldxf.attributes import DXFAttr, DXFAttributes, DefSubclass, XType
from ezdxf.lldxf.const import SUBCLASS_MARKER, DXF2000, DXFTypeError... | 42.302412 | 119 | 0.682953 |
7979cf57825bf4d14d7fabb63856331b1d01f167 | 600 | py | Python | examples/issues/issue458.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 666 | 2016-11-14T18:17:40.000Z | 2022-03-29T03:53:22.000Z | examples/issues/issue458.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 598 | 2016-10-20T21:04:09.000Z | 2022-03-15T22:44:49.000Z | examples/issues/issue458.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 95 | 2017-01-19T12:23:58.000Z | 2022-03-06T18:16:21.000Z | import sys
sys.path.append("../../")
from appJar import gui
def split(text):
newText = ""
pos = 0
for t in text:
if pos == 20:
pos == 0
newText += "\\n"
newText += t
return newText
with gui() as app:
app.label('hello world')
app.addTable("g1",
[... | 25 | 147 | 0.565 |
7979d11cfd604e966400d9904d1dd86ffb872ea4 | 1,133 | py | Python | quantumflow/config_test.py | BastianZim/quantumflow-dev | 319aabae7238d5a86d6c24fe5b6803a2f7e706cd | [
"Apache-2.0"
] | 2 | 2019-02-16T05:51:38.000Z | 2019-03-18T00:35:25.000Z | quantumflow/config_test.py | BastianZim/quantumflow-dev | 319aabae7238d5a86d6c24fe5b6803a2f7e706cd | [
"Apache-2.0"
] | null | null | null | quantumflow/config_test.py | BastianZim/quantumflow-dev | 319aabae7238d5a86d6c24fe5b6803a2f7e706cd | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-, Gavin E. Crooks and contributors
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
import glob
import io
import subprocess
import quantumflow as qf
REPS = 16
def test_version() -> None:
assert qf.... | 23.604167 | 77 | 0.61165 |
7979d1489d55470e7ec905a88327ed72df9ab585 | 760 | py | Python | setup.py | recrsn/pyinit | 3e1a42ed0dcefe6dab50e8fda8e3ddf3156e3052 | [
"MIT"
] | 2 | 2020-07-17T15:37:43.000Z | 2020-07-17T19:23:22.000Z | setup.py | recrsn/pyinit | 3e1a42ed0dcefe6dab50e8fda8e3ddf3156e3052 | [
"MIT"
] | 3 | 2020-07-19T13:34:51.000Z | 2020-07-23T11:43:15.000Z | setup.py | recrsn/pyinit | 3e1a42ed0dcefe6dab50e8fda8e3ddf3156e3052 | [
"MIT"
] | 1 | 2020-07-17T15:31:17.000Z | 2020-07-17T15:31:17.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="pyinit",
version="0.0.1",
author="Nancy Chauhan",
author_email="nancychn1@gmail.com",
description="Tool to create python project structure",
long_description=long_description,
long... | 27.142857 | 58 | 0.632895 |
7979d1b2cb31e9b2f5733f7c4487603c1653e12f | 3,417 | py | Python | personal_info.py | woctezuma/steam-market | 0ce25a0493b966ce30e134bd9b68cc1fd86ad59a | [
"MIT"
] | 46 | 2019-04-25T14:18:15.000Z | 2022-03-23T15:40:22.000Z | personal_info.py | woctezuma/steam-market | 0ce25a0493b966ce30e134bd9b68cc1fd86ad59a | [
"MIT"
] | 20 | 2019-04-25T14:33:54.000Z | 2021-12-31T13:52:06.000Z | personal_info.py | woctezuma/steam-market | 0ce25a0493b966ce30e134bd9b68cc1fd86ad59a | [
"MIT"
] | 7 | 2020-10-30T18:35:11.000Z | 2022-03-28T16:10:26.000Z | # Reference: https://www.blakeporterneuro.com/learning-python-project-3-scrapping-data-from-steams-community-market/
import json
def get_steam_cookie_file_name() -> str:
steam_cookie_file_name = 'personal_info.json'
return steam_cookie_file_name
def load_steam_cookie_from_disk(file_name_with_personal_info... | 33.5 | 116 | 0.626573 |
7979d1f327bacce2e0ca9024a6d33bd522d00f33 | 397 | py | Python | backend/django/campsignup/campsignup/wsgi.py | Ring-deutscher-PfadfinderInnenverbande/campsignup | 1e182322d31dc41083fa06138d709eddc4f448be | [
"MIT"
] | null | null | null | backend/django/campsignup/campsignup/wsgi.py | Ring-deutscher-PfadfinderInnenverbande/campsignup | 1e182322d31dc41083fa06138d709eddc4f448be | [
"MIT"
] | null | null | null | backend/django/campsignup/campsignup/wsgi.py | Ring-deutscher-PfadfinderInnenverbande/campsignup | 1e182322d31dc41083fa06138d709eddc4f448be | [
"MIT"
] | null | null | null | """
WSGI config for campsignup 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 |
7979d2317b4a02ba29ac78d56c0c3cce35b58f56 | 1,093 | py | Python | 4thjune18python/option.py | Solomon98/mypython | dda89738609e8d3ca213e985244b9c0f45ca269f | [
"Apache-2.0"
] | null | null | null | 4thjune18python/option.py | Solomon98/mypython | dda89738609e8d3ca213e985244b9c0f45ca269f | [
"Apache-2.0"
] | null | null | null | 4thjune18python/option.py | Solomon98/mypython | dda89738609e8d3ca213e985244b9c0f45ca269f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2
import time
import webbrowser
import os
x='''
Press 1 : To check current time and date
Press 2 : To create a file
Press 3 : To create a directory
Press 4 : To logout system
Press 5 : To search somehting on google
Press 6 : To reboot your OS
Press 7 : To check Internet connecti... | 25.418605 | 69 | 0.652333 |
7979d2871d8df9955bc543e092ac648e46d2fc05 | 317 | py | Python | client/test/numberGen.py | estcube/telemetry-forwarding-client | be659c8dd8e4bd26d1d1974d63f90acffd150e34 | [
"MIT"
] | 3 | 2020-06-11T12:34:25.000Z | 2020-09-16T12:06:32.000Z | client/test/numberGen.py | estcube/telemetry-forwarding-client | be659c8dd8e4bd26d1d1974d63f90acffd150e34 | [
"MIT"
] | 57 | 2020-09-16T09:11:04.000Z | 2022-02-28T01:32:13.000Z | client/test/numberGen.py | estcube/Telemetry-Forwarding-Client | be659c8dd8e4bd26d1d1974d63f90acffd150e34 | [
"MIT"
] | null | null | null | import random
def generate(default: int, a: int, b: int):
"""
Generates random integers for test packets in the given range, has a 30% chance to return a default integer.
"""
isDefault = random.random() <= 0.3
if isDefault:
return default
else:
return random.randint(a, b)
| 21.133333 | 112 | 0.630915 |
7979d3bc41d161760726e2ee5fcccfbe904dc75e | 38,946 | py | Python | model/monorec/monorec_model.py | ztmo520/MonoRec | 0e8ece0159bd82fb55791fbd2117396ecf1fbb0f | [
"MIT"
] | null | null | null | model/monorec/monorec_model.py | ztmo520/MonoRec | 0e8ece0159bd82fb55791fbd2117396ecf1fbb0f | [
"MIT"
] | null | null | null | model/monorec/monorec_model.py | ztmo520/MonoRec | 0e8ece0159bd82fb55791fbd2117396ecf1fbb0f | [
"MIT"
] | null | null | null | import time
import kornia.augmentation as K
import numpy as np
import torch
import torch.nn.functional as F
import torchvision
from torch import nn
from model.layers import point_projection, PadSameConv2d, ConvReLU2, ConvReLU, Upconv, Refine, SSIM, Backprojection
from utils import conditional_flip, filter_state_dict
... | 52.62973 | 181 | 0.632157 |
7979d67ec464a9f0338897309912b012f08408e2 | 4,615 | py | Python | testscripts/RDKB/component/CMHAL/TS_CMHAL_InitDS.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/CMHAL/TS_CMHAL_InitDS.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/CMHAL/TS_CMHAL_InitDS.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | ##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2018 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | 40.130435 | 120 | 0.714626 |
7979d69500b83f71edd64c827ee67dffb2e7eff1 | 3,174 | py | Python | malware/mybiubiubiu/mybiubiubiu-0.1.1/setup.py | rsc-dev/pypi_malware | 0502c84df508d2a84b5f50dc1d4c2b66191318fa | [
"Unlicense"
] | 35 | 2018-12-10T08:59:54.000Z | 2022-01-24T17:43:56.000Z | malware/mybiubiubiu/mybiubiubiu-0.1.1/setup.py | rsc-dev/pypi_malware | 0502c84df508d2a84b5f50dc1d4c2b66191318fa | [
"Unlicense"
] | null | null | null | malware/mybiubiubiu/mybiubiubiu-0.1.1/setup.py | rsc-dev/pypi_malware | 0502c84df508d2a84b5f50dc1d4c2b66191318fa | [
"Unlicense"
] | 8 | 2020-02-25T14:00:48.000Z | 2021-10-15T10:13:16.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import sys
import time
import json
import getpass
import hashlib
import platform
import tempfile
import webbrowser
import setuptools
from setuptools.command.install import install
def request(url, method='GET', data=Non... | 24.992126 | 113 | 0.57908 |
7979d786519302e2b917f610bac0632de1d5bcec | 1,994 | py | Python | Spider/Library/Connection.py | taha-korkmaz-2014400258/spider | 41d1be1f8ac7912df67137656beb2bffb79feabf | [
"Unlicense"
] | null | null | null | Spider/Library/Connection.py | taha-korkmaz-2014400258/spider | 41d1be1f8ac7912df67137656beb2bffb79feabf | [
"Unlicense"
] | null | null | null | Spider/Library/Connection.py | taha-korkmaz-2014400258/spider | 41d1be1f8ac7912df67137656beb2bffb79feabf | [
"Unlicense"
] | null | null | null | import urllib.request
'''
# This holds our URL so other methods in this
have access to this string to manipulate
# http://www.google.com
'''
URL_Link = str()
'''
# This will hold the html code
#
'''
HTML = str()
'''
# This user agent will trick ... | 24.024096 | 113 | 0.551655 |
7979d81d1fe87a611d8c2a82a9ae53f7d870c34f | 4,864 | py | Python | scripts/Base_Build_Systems/HVAC/co2_monitor.py | UrBudWalt/Active_Building_Model | 5e4c9a208c1ab6d93f658624448488c254e180f1 | [
"MIT"
] | null | null | null | scripts/Base_Build_Systems/HVAC/co2_monitor.py | UrBudWalt/Active_Building_Model | 5e4c9a208c1ab6d93f658624448488c254e180f1 | [
"MIT"
] | null | null | null | scripts/Base_Build_Systems/HVAC/co2_monitor.py | UrBudWalt/Active_Building_Model | 5e4c9a208c1ab6d93f658624448488c254e180f1 | [
"MIT"
] | null | null | null | import serial
import time
import datetime
subsystem_ID = "HVAC"
#############################-- Arduino connection --#################################
## This section tries for arduino connection on a specified port ##
################################################################################... | 42.295652 | 128 | 0.417146 |
7979d85b615c31857a79eda166129a1db090fc6f | 911 | py | Python | students/k3342/practical_works/Reybandt Alexandr/docker/backend/flight_board/service.py | Reybandt/ITMO_ICT_WebProgramming_2020 | 2cb30e9ca7e013d10f533f2ac32f1602f321b6a9 | [
"MIT"
] | null | null | null | students/k3342/practical_works/Reybandt Alexandr/docker/backend/flight_board/service.py | Reybandt/ITMO_ICT_WebProgramming_2020 | 2cb30e9ca7e013d10f533f2ac32f1602f321b6a9 | [
"MIT"
] | null | null | null | students/k3342/practical_works/Reybandt Alexandr/docker/backend/flight_board/service.py | Reybandt/ITMO_ICT_WebProgramming_2020 | 2cb30e9ca7e013d10f533f2ac32f1602f321b6a9 | [
"MIT"
] | null | null | null | from django_filters import rest_framework as filters
from flight_board.models import Flight
# def get_duration(duration):
# print('-------------------------------------------')
# print(duration)
# print('-------------------------------------------')
# seconds = duration.total_seconds()
# hours = s... | 35.038462 | 106 | 0.645445 |
7979d8e3d8116359d27b72d157bf3c545f6defc4 | 2,649 | py | Python | userbot/modules/hash.py | Emperorr153/ProjectBish | 1c376d4161ed7ff6ad0b087297bbb9fcb9cf7bfa | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/hash.py | Emperorr153/ProjectBish | 1c376d4161ed7ff6ad0b087297bbb9fcb9cf7bfa | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/hash.py | Emperorr153/ProjectBish | 1c376d4161ed7ff6ad0b087297bbb9fcb9cf7bfa | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
"""Userbot module containing hash and encode/decode commands"""
from subprocess import PIPE
from subprocess import run... | 30.802326 | 113 | 0.584371 |
7979daa2ba39ab6144f5f51fb6dd1488bab7cfbc | 15,500 | py | Python | utility/cog/character/character.py | RvstFyth/discordballz | ada6456f434df19c74a30ec8ae5b7de248d8f79c | [
"MIT"
] | null | null | null | utility/cog/character/character.py | RvstFyth/discordballz | ada6456f434df19c74a30ec8ae5b7de248d8f79c | [
"MIT"
] | null | null | null | utility/cog/character/character.py | RvstFyth/discordballz | ada6456f434df19c74a30ec8ae5b7de248d8f79c | [
"MIT"
] | null | null | null | """
Every character classes inherit from the :class:`Character()` defined below.
--
Author : DrLarck
Last update : 02/02/20 (DrLarck)
"""
# dependancies
import asyncio
from random import randint, choice
# attribute
from utility.cog.character.attribute.info import Character_info
from utility.cog.character.attribute... | 28.492647 | 159 | 0.554516 |
7979db8d007e5013e7710ee6014a8d6a92b2e6ab | 12,362 | py | Python | test.py | gato-sabio/streak-crm-python | a880845c4cb4041c8b8a4adb10b5aa3e3880ed3d | [
"MIT"
] | 8 | 2017-11-12T17:38:18.000Z | 2020-09-24T07:06:17.000Z | test.py | gato-sabio/streak-crm-python | a880845c4cb4041c8b8a4adb10b5aa3e3880ed3d | [
"MIT"
] | null | null | null | test.py | gato-sabio/streak-crm-python | a880845c4cb4041c8b8a4adb10b5aa3e3880ed3d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from streak_crm_python import *
from keys import TEST_API_KEY
import unittest
import random
import string
import datetime
alphanumeric_range = string.ascii_lowercase + '1234567890'
supposed_endpoint = 'https://www.streak.com/api/v1/'
my_email = 'robot@medperevod.com'
class TestStreakConnect... | 36.466077 | 116 | 0.640269 |
7979dc327795f59f276114680a32a3018ebb55f7 | 919 | py | Python | epymetheus/datasets/randomwalk.py | shishaboy/epymetheus | d8916b20c6b79e86e5aadb39c7c01a582659f03b | [
"BSD-3-Clause"
] | null | null | null | epymetheus/datasets/randomwalk.py | shishaboy/epymetheus | d8916b20c6b79e86e5aadb39c7c01a582659f03b | [
"BSD-3-Clause"
] | null | null | null | epymetheus/datasets/randomwalk.py | shishaboy/epymetheus | d8916b20c6b79e86e5aadb39c7c01a582659f03b | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pandas as pd
from epymetheus import Universe
def make_randomwalk(
n_bars=1000,
n_assets=10,
volatility=0.01,
name="RandomWalk",
bars=None,
assets=None,
seed=None,
):
"""
Return Universe whose prices are random-walks.
Daily returns follow log-normal di... | 20.422222 | 82 | 0.616975 |
7979dc9f52ca4a33368ea51a8930d3ea3ad3d22a | 507 | py | Python | tests/test_extension.py | pawelkondraciuk/mopidy-chomikuj | 4c90b05fceb4f74d9fe1fb76f0bb7b579f0e2904 | [
"Apache-2.0"
] | null | null | null | tests/test_extension.py | pawelkondraciuk/mopidy-chomikuj | 4c90b05fceb4f74d9fe1fb76f0bb7b579f0e2904 | [
"Apache-2.0"
] | null | null | null | tests/test_extension.py | pawelkondraciuk/mopidy-chomikuj | 4c90b05fceb4f74d9fe1fb76f0bb7b579f0e2904 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from mopidy_chomikuj import Extension, frontend as frontend_lib
def test_get_default_config():
ext = Extension()
config = ext.get_default_config()
assert '[chomikuj]' in config
assert 'enabled = true' in config
def test_get_config_schema():
ext = Extens... | 19.5 | 63 | 0.719921 |
7979dd7b894692097b7daa011a4afbffa5a4a391 | 435 | py | Python | Contest/ABC179/d/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | Contest/ABC179/d/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | Contest/ABC179/d/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# dp[i] = Σ[s∈S] dp[i-s]
# dp[i] = Σ[s = 1 to k] Σ[t = l to r] dp[t]
# dp[i] = Σ[s = 1 to k](adp[i - r + 1] - adp[i - l])
MOD = 998244353
(n, k), *S = [[*map(int, o.split())] for o in open(0)]
dp = [0] * -~n
dp[0] = 1
adp = [0] + [1] * n # 累積和
for i in range(1, n):
for l, r in S:
dp[i... | 31.071429 | 68 | 0.434483 |
7979ddb40bb708c1ef284c7029afa5c8d19bcf09 | 5,380 | py | Python | tos/tests/test_middleware.py | klowe0100/django-tos | 4ba54346100f2e8d16736eae162aba56fb5c6f94 | [
"BSD-3-Clause"
] | null | null | null | tos/tests/test_middleware.py | klowe0100/django-tos | 4ba54346100f2e8d16736eae162aba56fb5c6f94 | [
"BSD-3-Clause"
] | null | null | null | tos/tests/test_middleware.py | klowe0100/django-tos | 4ba54346100f2e8d16736eae162aba56fb5c6f94 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.test import TestCase
from django.test.utils import modify_settings
from tos.compat import get_cache, get_runtime_user_model, reverse
from tos.middleware import UserAgreementMiddleware
from tos.models import TermsOfService,... | 33.836478 | 108 | 0.660967 |
7979ddff21c606fe83cfdef7b218c09102bdcf06 | 1,556 | py | Python | numba/typing/operatordecl.py | gdementen/numba | 78486e86ff9fbd343cac3dadbc63ec3bc66c75aa | [
"BSD-2-Clause"
] | null | null | null | numba/typing/operatordecl.py | gdementen/numba | 78486e86ff9fbd343cac3dadbc63ec3bc66c75aa | [
"BSD-2-Clause"
] | null | null | null | numba/typing/operatordecl.py | gdementen/numba | 78486e86ff9fbd343cac3dadbc63ec3bc66c75aa | [
"BSD-2-Clause"
] | null | null | null | """
Typing declarations for the operator module.
"""
import operator
from numba import types
from numba import utils
from numba.typing.templates import (ConcreteTemplate, AbstractTemplate,
signature, Registry)
registry = Registry()
builtin_attr = registry.register_attr
builtin_glo... | 28.814815 | 76 | 0.658098 |
7979dfdc398f7fe80f2e7c336f3dc96ba02d91e2 | 3,409 | py | Python | unittests/test_dataset_creation/test_read_from_csv.py | imsb-uke/ecarenet | ffbf24e740d9154312d02b9f775816ed4b3d4691 | [
"MIT"
] | 1 | 2022-01-25T09:49:45.000Z | 2022-01-25T09:49:45.000Z | unittests/test_dataset_creation/test_read_from_csv.py | imsb-uke/ecarenet | ffbf24e740d9154312d02b9f775816ed4b3d4691 | [
"MIT"
] | null | null | null | unittests/test_dataset_creation/test_read_from_csv.py | imsb-uke/ecarenet | ffbf24e740d9154312d02b9f775816ed4b3d4691 | [
"MIT"
] | null | null | null | import pandas as pd
import unittest
import os
from dataset_creation.read_from_csv import create_img_and_label_series
def get_csv():
csv_file = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'unittest_data/train.csv'))
return csv_file
class TestReadFromCsv(unittest.TestCase):
def t... | 48.7 | 110 | 0.62335 |
7979e06d999b26e30cba8459a4acb91ee5bb414b | 5,843 | py | Python | docassemble_webapp/docassemble/webapp/users/models.py | knod/docassemble | bd052b557743d098138a5f2129a9d3c2f68090a6 | [
"MIT"
] | 1 | 2019-06-13T08:18:18.000Z | 2019-06-13T08:18:18.000Z | docassemble_webapp/docassemble/webapp/users/models.py | knod/docassemble | bd052b557743d098138a5f2129a9d3c2f68090a6 | [
"MIT"
] | 20 | 2020-03-24T18:20:54.000Z | 2022-03-12T00:19:20.000Z | docassemble_webapp/docassemble/webapp/users/models.py | knod/docassemble | bd052b557743d098138a5f2129a9d3c2f68090a6 | [
"MIT"
] | 2 | 2019-06-12T12:14:13.000Z | 2021-04-11T05:23:50.000Z | from docassemble.webapp.db_object import db, UserMixin
from docassemble.base.config import daconfig, dbtableprefix
class UserModel(db.Model, UserMixin):
__tablename__ = dbtableprefix + 'user'
id = db.Column(db.Integer, primary_key=True)
social_id = db.Column(db.String(255), nullable=False, unique=True)
... | 54.607477 | 136 | 0.710936 |
7979e0e8793c4dbd693b6e2eca4e3669062046e2 | 3,616 | py | Python | gmail.py | tow/appengine-mailer | a633edfb58bf955f09ad02c795b2dca255e168be | [
"MIT"
] | 1 | 2018-01-27T15:04:40.000Z | 2018-01-27T15:04:40.000Z | gmail.py | tow/appengine-mailer | a633edfb58bf955f09ad02c795b2dca255e168be | [
"MIT"
] | null | null | null | gmail.py | tow/appengine-mailer | a633edfb58bf955f09ad02c795b2dca255e168be | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import base64, email.message, email.mime, email.parser, email.utils, hashlib, hmac, optparse, os, sys, urllib
class MessageSendingFailure(Exception):
pass
class Signer(object):
def __init__(self, SECRET_KEYS=None):
if not SECRET_KEYS:
try:
SECRET_KEY... | 37.278351 | 111 | 0.626659 |
7979e154b2c52ab5ea7b3378bd29fc7647aa1d88 | 153 | py | Python | profile_api/apps.py | Yacine2675/profile-rest-api | 414c46fb17961356ba5fd2fb823d2811df28af38 | [
"MIT"
] | 5 | 2021-08-21T07:09:44.000Z | 2021-09-19T20:19:35.000Z | profile_api/apps.py | Yacine2675/profile-rest-api | 414c46fb17961356ba5fd2fb823d2811df28af38 | [
"MIT"
] | 1 | 2022-01-08T18:00:06.000Z | 2022-01-08T18:00:06.000Z | profile_api/apps.py | Yacine2675/profile-rest-api | 414c46fb17961356ba5fd2fb823d2811df28af38 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class ProfileApiConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'profile_api'
| 21.857143 | 56 | 0.771242 |
7979e221c293c6d8d10f8bda3d0074b376f5ae94 | 537 | py | Python | hardware/setup.py | PirateRoberts98/capstone-hygeine-managment | 0efb41324c47c78acf03bc506294d5a7d0891ea9 | [
"MIT"
] | 3 | 2020-03-25T19:44:21.000Z | 2020-03-28T19:45:13.000Z | hardware/setup.py | PirateRoberts98/capstone-hygeine-managment | 0efb41324c47c78acf03bc506294d5a7d0891ea9 | [
"MIT"
] | 6 | 2020-03-28T12:24:28.000Z | 2021-09-02T16:56:13.000Z | hardware/setup.py | PirateRoberts98/capstone-hygeine-managment | 0efb41324c47c78acf03bc506294d5a7d0891ea9 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="capstone-hygeine_tracker-team2", # Replace with your own username
version="0.0.1",
author="Robert ,Alanna ,Scott ,James ,Mike, Nitika",
author_email="rconr060@uottawa.ca",
description="Cap... | 29.833333 | 75 | 0.685289 |
7979e24240e7ef283c42189f3f040db42435448f | 113 | py | Python | papermerge/test/parts/app_max_p/apps.py | maxtruxa/papermerge | 444d7f966da359f53833dac65944347ac1917160 | [
"Apache-2.0"
] | 1,586 | 2020-01-07T10:53:31.000Z | 2022-03-31T16:15:42.000Z | papermerge/test/parts/app_max_p/apps.py | maxtruxa/papermerge | 444d7f966da359f53833dac65944347ac1917160 | [
"Apache-2.0"
] | 398 | 2020-01-29T16:31:44.000Z | 2022-03-11T21:22:10.000Z | papermerge/test/parts/app_max_p/apps.py | maxtruxa/papermerge | 444d7f966da359f53833dac65944347ac1917160 | [
"Apache-2.0"
] | 196 | 2020-01-29T09:25:16.000Z | 2022-03-29T11:08:35.000Z | from django.apps import AppConfig
class AppMaxPConfig(AppConfig):
name = 'papermerge.test.parts.app_max_p'
| 18.833333 | 44 | 0.778761 |
7979e2a1beee992da1e1c35e1ce378f790c07264 | 705 | py | Python | lfs/catalog/migrations/0006_auto_20210405_1803.py | michael-hahn/django-lfs | 26c3471a8f8d88269c84f714f507b952dfdb6397 | [
"BSD-3-Clause"
] | null | null | null | lfs/catalog/migrations/0006_auto_20210405_1803.py | michael-hahn/django-lfs | 26c3471a8f8d88269c84f714f507b952dfdb6397 | [
"BSD-3-Clause"
] | null | null | null | lfs/catalog/migrations/0006_auto_20210405_1803.py | michael-hahn/django-lfs | 26c3471a8f8d88269c84f714f507b952dfdb6397 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 3.1.2 on 2021-04-05 18:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('catalog', '0005_auto_20210326_1853'),
]
operations = [
migrations.AddField(
model_name='category',
name='synthesized... | 24.310345 | 53 | 0.567376 |
7979e3a1fce1d0bfa0ad5caee82d9bdd23fa217d | 1,709 | py | Python | setup.py | visiope/simpeg | 94295102afc664c001f77c88f902772e06a467c0 | [
"MIT"
] | 1 | 2019-01-18T08:59:50.000Z | 2019-01-18T08:59:50.000Z | setup.py | visiope/simpeg | 94295102afc664c001f77c88f902772e06a467c0 | [
"MIT"
] | null | null | null | setup.py | visiope/simpeg | 94295102afc664c001f77c88f902772e06a467c0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
"""SimPEG: Simulation and Parameter Estimation in Geophysics
SimPEG is a python package for simulation and gradient based
parameter estimation in the context of geophysical applications.
"""
from distutils.core import setup
from setuptools import find_packag... | 29.465517 | 76 | 0.657109 |
7979e5ad6acc25e8fc9466df78314051933af845 | 876 | py | Python | systemrl/agents/bbo_agent.py | aarsheem/safe-rl | 781cec96551d0cbeb049de7f9c09f069baeb66d6 | [
"MIT"
] | 2 | 2020-02-12T22:56:40.000Z | 2020-02-17T16:59:05.000Z | systemrl/agents/bbo_agent.py | aarsheem/safe-rl | 781cec96551d0cbeb049de7f9c09f069baeb66d6 | [
"MIT"
] | null | null | null | systemrl/agents/bbo_agent.py | aarsheem/safe-rl | 781cec96551d0cbeb049de7f9c09f069baeb66d6 | [
"MIT"
] | 2 | 2020-02-12T17:25:33.000Z | 2021-02-01T20:29:17.000Z | from abc import ABC, abstractmethod
from .skeleton import Agent
class BBOAgent(Agent):
"""
An Agent that employs black box optimization techniques.
"""
@property
@abstractmethod
def parameters(self):
"""
The best policy parameters the agent has found. This should be a 1D
... | 27.375 | 84 | 0.597032 |
7979e6745be03cbb5b7e3da62f3feb3960d7380d | 3,298 | py | Python | scripts/plotting/print_times.py | jonesholger/lbann | 3214f189a1438565d695542e076c4fa8e7332d34 | [
"Apache-2.0"
] | 194 | 2016-07-19T15:40:21.000Z | 2022-03-19T08:06:10.000Z | scripts/plotting/print_times.py | jonesholger/lbann | 3214f189a1438565d695542e076c4fa8e7332d34 | [
"Apache-2.0"
] | 1,021 | 2016-07-19T12:56:31.000Z | 2022-03-29T00:41:47.000Z | scripts/plotting/print_times.py | jonesholger/lbann | 3214f189a1438565d695542e076c4fa8e7332d34 | [
"Apache-2.0"
] | 74 | 2016-07-28T18:24:00.000Z | 2022-01-24T19:41:04.000Z | import sys
import numpy as np
import load_events
def print_layer_times(filename, only_model = -1):
"""Print a breakdown of runtimes for each layer in each model."""
results = load_events.load_values(
filename,
event_names=['minibatch_time', 'objective_evaluation_time', 'objective_differentiation_time'],
... | 48.5 | 128 | 0.646452 |
7979e7a11106bcd6d329e4e9782451491b5b193d | 1,131 | py | Python | challenges/multi_bracket_validation/multi_bracket_validation.py | arsummers/python-data-structures-and-algorithms | 30a488bd1100d8edac3b7fda73f7d7d999c61bfc | [
"MIT"
] | null | null | null | challenges/multi_bracket_validation/multi_bracket_validation.py | arsummers/python-data-structures-and-algorithms | 30a488bd1100d8edac3b7fda73f7d7d999c61bfc | [
"MIT"
] | 21 | 2019-07-08T22:01:38.000Z | 2019-08-29T05:36:26.000Z | challenges/multi_bracket_validation/multi_bracket_validation.py | arsummers/python-data-structures-and-algorithms | 30a488bd1100d8edac3b7fda73f7d7d999c61bfc | [
"MIT"
] | 1 | 2019-07-11T07:45:57.000Z | 2019-07-11T07:45:57.000Z | def multi_bracket_validation(string):
# viable inputs: {, }, [, ], (, )
# counters
open_counters = {
'paren_ct' : 0,
'sqr_ct' : 0,
'curly_ct' : 0,
}
close_counters = {
'paren_ct' : 0,
'sqr_ct' : 0,
'curly_ct' : 0,
}
for item in strin... | 23.5625 | 87 | 0.477454 |
7979e7c8c31c22e2919158ed0dc49b62f7f753e3 | 1,214 | py | Python | src/tox_ini_fmt/formatter/util.py | tox-dev/tox-ini-fmt | 0ad22b2ed0322a3479e36116cb3f424604c19794 | [
"MIT"
] | 20 | 2020-09-19T20:13:41.000Z | 2022-01-09T00:35:11.000Z | src/tox_ini_fmt/formatter/util.py | tox-dev/tox-ini-fmt | 0ad22b2ed0322a3479e36116cb3f424604c19794 | [
"MIT"
] | 63 | 2020-09-19T18:17:55.000Z | 2022-01-03T18:37:44.000Z | src/tox_ini_fmt/formatter/util.py | tox-dev/tox-ini-fmt | 0ad22b2ed0322a3479e36116cb3f424604c19794 | [
"MIT"
] | 8 | 2020-09-19T18:14:18.000Z | 2022-02-16T11:54:35.000Z | from __future__ import annotations
import re
from configparser import ConfigParser
from typing import Callable, Mapping
def to_boolean(payload: str) -> str:
return "true" if payload.lower() == "true" else "false"
def fix_and_reorder(parser: ConfigParser, name: str, fix_cfg: Mapping[str, Callable[[str], str]]) ... | 29.609756 | 106 | 0.614498 |
7979e9cbb707bede1719940efe2aee34d49a2dad | 3,872 | py | Python | src/generic/mail_manager.py | dubicube/tobrie | a60220806475ab9818e7978da2bcc03bb7eb2437 | [
"MIT"
] | 4 | 2020-04-05T16:05:33.000Z | 2020-06-28T09:31:08.000Z | src/generic/mail_manager.py | dubicube/tobrie | a60220806475ab9818e7978da2bcc03bb7eb2437 | [
"MIT"
] | 3 | 2021-01-09T11:06:40.000Z | 2021-01-09T12:55:08.000Z | src/generic/mail_manager.py | dubicube/tobrie | a60220806475ab9818e7978da2bcc03bb7eb2437 | [
"MIT"
] | 2 | 2020-07-14T21:07:09.000Z | 2021-01-09T10:21:13.000Z | import imaplib
import base64
import email
import smtplib, ssl
from urllib.parse import unquote
class MailManager:
email_user = ""
email_pass = ""
M = None
mail_ids = []
def __init__(self, a, p):
self.email_user = a
self.email_pass = p
def getAllMails(self):
self._fetch... | 36.528302 | 151 | 0.517304 |
7979ea142a14815de65c8cb0bf02470194a6079f | 12,998 | py | Python | bioinformatics/genbank_get_genomes_by_taxon.py | widdowquinn/scripts | 27354a3a3d14e5f15cb8c9b62a7a976c696b014e | [
"MIT"
] | 15 | 2015-01-30T11:39:52.000Z | 2021-10-13T00:20:39.000Z | bioinformatics/genbank_get_genomes_by_taxon.py | widdowquinn/scripts | 27354a3a3d14e5f15cb8c9b62a7a976c696b014e | [
"MIT"
] | 6 | 2015-06-05T16:03:13.000Z | 2016-04-06T17:18:07.000Z | bioinformatics/genbank_get_genomes_by_taxon.py | widdowquinn/scripts | 27354a3a3d14e5f15cb8c9b62a7a976c696b014e | [
"MIT"
] | 21 | 2015-02-24T17:48:23.000Z | 2022-03-14T20:47:10.000Z | #!/usr/bin/env python
#
# genbank_get_genomes_by_taxon.py
#
# A script that takes an NCBI taxonomy identifier (or string, though this is
# not reliable for taxonomy tree subgraphs...) and downloads all genomes it
# can find from NCBI in the corresponding taxon subgraph with the passed
# argument as root.
#
# (c) TheJa... | 40.61875 | 79 | 0.613017 |
7979ea20ef47796093b34cc33ff3cb1918cd727d | 389 | py | Python | setup.py | TestowanieAutomatyczneUG/projekt-i-VkomarV | cfa8f3191349c29640505ef647458d99183f1f9e | [
"MIT"
] | null | null | null | setup.py | TestowanieAutomatyczneUG/projekt-i-VkomarV | cfa8f3191349c29640505ef647458d99183f1f9e | [
"MIT"
] | null | null | null | setup.py | TestowanieAutomatyczneUG/projekt-i-VkomarV | cfa8f3191349c29640505ef647458d99183f1f9e | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
import pathlib
here = pathlib.Path(__file__).parent.resolve()
setup(
version='2.0.0',
author='Patryk Wawrzyniak',
packages=find_packages(),
python_requires='>=3.8, <4',
install_requires=['nose2', 'assertpy', 'pytest', 'setuptools', 'parameterized', 'pyha... | 24.3125 | 98 | 0.660668 |
7979ea219900ca9a0f3de51a0992767d176f43c3 | 7,862 | py | Python | benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/9-extending_bound_36.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/9-extending_bound_36.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/9-extending_bound_36.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import Tuple, FrozenSet
from collections import Iterable
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msat_make_not, msat_mak... | 36.567442 | 89 | 0.629102 |
7979eadd592e3d30af62dfc2a21295b589eef3fb | 36,283 | py | Python | lightautoml/automl/presets/tabular_presets.py | kobylkinks/LightAutoML | 4d62d2f52192aa3fb2d7841481339e35ef7f7f09 | [
"Apache-2.0"
] | 766 | 2020-12-03T08:57:21.000Z | 2022-03-31T14:06:53.000Z | lightautoml/automl/presets/tabular_presets.py | kobylkinks/LightAutoML | 4d62d2f52192aa3fb2d7841481339e35ef7f7f09 | [
"Apache-2.0"
] | 71 | 2020-12-07T09:53:59.000Z | 2022-03-31T09:31:26.000Z | lightautoml/automl/presets/tabular_presets.py | kobylkinks/LightAutoML | 4d62d2f52192aa3fb2d7841481339e35ef7f7f09 | [
"Apache-2.0"
] | 98 | 2020-12-04T22:00:28.000Z | 2022-03-23T15:52:07.000Z | """Tabular presets."""
import logging
import os
from collections import Counter
from copy import copy
from copy import deepcopy
from typing import Iterable
from typing import Optional
from typing import Sequence
from typing import cast
import numpy as np
import pandas as pd
import torch
from joblib import Parallel
... | 38.394709 | 130 | 0.586335 |
7979ebacccc3fdbf036a911030e2febd11383790 | 17,140 | py | Python | tests/test_xsd_indicators_group.py | vascohenriques/python-zeep | bf56414816b4c75f489d8185b9b71423a631b13a | [
"MIT"
] | 1,763 | 2016-02-28T19:28:54.000Z | 2022-03-31T14:51:19.000Z | tests/test_xsd_indicators_group.py | vascohenriques/python-zeep | bf56414816b4c75f489d8185b9b71423a631b13a | [
"MIT"
] | 1,239 | 2016-04-07T06:22:31.000Z | 2022-03-31T13:12:49.000Z | tests/test_xsd_indicators_group.py | vascohenriques/python-zeep | bf56414816b4c75f489d8185b9b71423a631b13a | [
"MIT"
] | 671 | 2016-04-04T16:54:51.000Z | 2022-03-30T09:12:27.000Z | import pytest
from lxml import etree
from tests.utils import assert_nodes_equal, load_xml, render_node
from zeep import xsd
def test_build_objects():
custom_type = xsd.Element(
etree.QName("http://tests.python-zeep.org/", "authentication"),
xsd.ComplexType(
xsd.Sequence(
... | 31.623616 | 85 | 0.46902 |
7979ec519d34cbe198c1a9ad24319b4484d5201d | 1,227 | py | Python | azure-mgmt-media/azure/mgmt/media/models/job_error_detail.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-media/azure/mgmt/media/models/job_error_detail.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-media/azure/mgmt/media/models/job_error_detail.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 29.926829 | 76 | 0.572127 |
7979ed7cf7ac9eabfff1ad2e828e7969f6eaadaf | 254 | py | Python | dvc/remote/__init__.py | alustenberg/dvc | 2e9fac5fb3f5882904f8005209feabe0dd3d5003 | [
"Apache-2.0"
] | null | null | null | dvc/remote/__init__.py | alustenberg/dvc | 2e9fac5fb3f5882904f8005209feabe0dd3d5003 | [
"Apache-2.0"
] | 2 | 2020-02-10T03:57:58.000Z | 2020-10-12T00:33:01.000Z | dvc/remote/__init__.py | alustenberg/dvc | 2e9fac5fb3f5882904f8005209feabe0dd3d5003 | [
"Apache-2.0"
] | 1 | 2021-02-06T12:48:24.000Z | 2021-02-06T12:48:24.000Z | from ..tree import get_cloud_tree
from .base import Remote
from .local import LocalRemote
def get_remote(repo, **kwargs):
tree = get_cloud_tree(repo, **kwargs)
if tree.scheme == "local":
return LocalRemote(tree)
return Remote(tree)
| 23.090909 | 41 | 0.704724 |
7979ee7f93db5a2e2aee3548a6a5402007948479 | 2,850 | py | Python | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/AddCustomLiveStreamTranscodeRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/AddCustomLiveStreamTranscodeRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/AddCustomLiveStreamTranscodeRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | # 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
# "License"); you may not u... | 29.6875 | 89 | 0.744561 |
7979ef67abdad1c498cf679ae8c247c7a45fe3cd | 4,156 | py | Python | models/vit.py | Lanping-Tech/Enhanced-VIT | 90a0516f3b6f926d758f1f72b09ab20b60f722ea | [
"Apache-2.0"
] | null | null | null | models/vit.py | Lanping-Tech/Enhanced-VIT | 90a0516f3b6f926d758f1f72b09ab20b60f722ea | [
"Apache-2.0"
] | null | null | null | models/vit.py | Lanping-Tech/Enhanced-VIT | 90a0516f3b6f926d758f1f72b09ab20b60f722ea | [
"Apache-2.0"
] | null | null | null | import torch
from torch import nn
from einops import rearrange, repeat
from einops.layers.torch import Rearrange
# helpers
def pair(t):
return t if isinstance(t, tuple) else (t, t)
# classes
class PreNorm(nn.Module):
def __init__(self, dim, fn):
super().__init__()
self.norm = nn.LayerNorm(d... | 33.516129 | 176 | 0.579163 |
7979efbd102c4f870d6b67db173c5e05dba8a7d0 | 39,508 | py | Python | torch/testing/_asserts.py | mh3kh/pytorch | c0e31d02d0fce2d99c09a8bef696acc431426718 | [
"Intel"
] | 7 | 2021-05-29T16:31:51.000Z | 2022-02-21T18:52:25.000Z | torch/testing/_asserts.py | mh3kh/pytorch | c0e31d02d0fce2d99c09a8bef696acc431426718 | [
"Intel"
] | 1 | 2021-03-25T13:42:15.000Z | 2021-03-25T13:42:15.000Z | torch/testing/_asserts.py | mh3kh/pytorch | c0e31d02d0fce2d99c09a8bef696acc431426718 | [
"Intel"
] | 1 | 2021-12-26T23:20:06.000Z | 2021-12-26T23:20:06.000Z | import collections.abc
import functools
import numbers
import sys
from typing import Any, Callable, Dict, List, NamedTuple, Optional, Tuple, Type, TypeVar, Union, cast
from types import SimpleNamespace
import torch
from torch import Tensor
from ._core import _unravel_index
__all__ = ["assert_equal", "assert_close"]
... | 43.897778 | 123 | 0.649033 |
7979f142084bb0b8a10c49d0de7967b29edd5e34 | 2,013 | py | Python | website/local.py | bopopescu/canvas | 2dfd6009eaecd8dac64ccc6125084e65305fb5d0 | [
"BSD-3-Clause"
] | 61 | 2015-11-10T17:13:46.000Z | 2021-08-06T17:58:30.000Z | website/local.py | bopopescu/canvas | 2dfd6009eaecd8dac64ccc6125084e65305fb5d0 | [
"BSD-3-Clause"
] | 13 | 2015-11-11T07:49:41.000Z | 2021-06-09T03:45:31.000Z | website/local.py | bopopescu/canvas | 2dfd6009eaecd8dac64ccc6125084e65305fb5d0 | [
"BSD-3-Clause"
] | 18 | 2015-11-11T04:50:04.000Z | 2021-08-20T00:57:11.000Z | #!/usr/bin/env python
import os
import signal
import subprocess
import time
from nginx import read_pid
from optparse import OptionParser
parser = OptionParser()
parser.add_option('--project', dest='project', default='canvas')
options, args = parser.parse_args()
def run(command, cwd='/var/canvas/website'):
return ... | 29.173913 | 106 | 0.623944 |
7979f18ea30ffd814ecfbbf4060b831a8cd36a10 | 1,177 | py | Python | posixusers/admin.py | edinburghhacklab/hackdb | 3ec7d66039705aa511dd6559196fa51a53b3a110 | [
"MIT"
] | null | null | null | posixusers/admin.py | edinburghhacklab/hackdb | 3ec7d66039705aa511dd6559196fa51a53b3a110 | [
"MIT"
] | null | null | null | posixusers/admin.py | edinburghhacklab/hackdb | 3ec7d66039705aa511dd6559196fa51a53b3a110 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2022 Tim Hawes <me@timhawes.com>
#
# SPDX-License-Identifier: MIT
from django.contrib import admin
from .models import PosixGroup, PosixUser, SSHKey
@admin.register(PosixUser)
class PosixUserAdmin(admin.ModelAdmin):
model = PosixUser
list_display = ("user", "uid", "shell")
list... | 22.207547 | 66 | 0.66695 |
7979f26e12a5ee11b62ed51c35e5e36061afd861 | 3,215 | py | Python | Python/HistogramColouringZoom.py | tomchaplin/Multithreaded_Mandelbrot | c2b814e802cbeebf1677daacc19598ca78c73edf | [
"MIT"
] | null | null | null | Python/HistogramColouringZoom.py | tomchaplin/Multithreaded_Mandelbrot | c2b814e802cbeebf1677daacc19598ca78c73edf | [
"MIT"
] | null | null | null | Python/HistogramColouringZoom.py | tomchaplin/Multithreaded_Mandelbrot | c2b814e802cbeebf1677daacc19598ca78c73edf | [
"MIT"
] | null | null | null | import Image
import ImageColor
import time
centerX = 0.28693186889504513
centerY = 0.014286693904085048
zoomIterations = 200
finalZoom = 10000000
width = 192
height = 108
startRangeY = 0.1
startRangeX = startRangeY * float(width) / float(height)
max_iteration = 2000
colour = [20, 125, 19]
img = Image... | 33.489583 | 102 | 0.535303 |
7979f2954e00ac14161a1fe39ffbbc9bbf9f5ec2 | 4,183 | py | Python | auditpool/run_audit.py | ramrod-project/database-brain | b024cb44f34cabb9d80af38271ddb65c25767083 | [
"MIT"
] | null | null | null | auditpool/run_audit.py | ramrod-project/database-brain | b024cb44f34cabb9d80af38271ddb65c25767083 | [
"MIT"
] | 13 | 2018-06-06T19:10:51.000Z | 2021-06-01T22:11:11.000Z | auditpool/run_audit.py | ramrod-project/database-brain | b024cb44f34cabb9d80af38271ddb65c25767083 | [
"MIT"
] | null | null | null | from json import dumps
from multiprocessing import Pool
from sys import argv, stderr
from time import asctime, gmtime, sleep, time
import rethinkdb as r
_AUDIT_DB = "AUDIT"
global _CONNECTION_STR
_CONNECTION_STR = "127.0.0.1:28015"
DEBUG = True
_CONTINUE = True
TS = "ts"
LOG_DIR = "/logs/"
LOG_KEY = "new_val"
DAY_ST... | 30.985185 | 89 | 0.56132 |
7979f2dffcfa88c85473cde72286c686743ca7af | 8,854 | py | Python | test/functional/wallet_abandonconflict.py | ocvcoin/ocvcoin | e816ac4a7dc57b00a5e085052a6bb3c94bf4959b | [
"MIT"
] | 2 | 2021-10-30T04:29:45.000Z | 2021-12-11T16:49:57.000Z | test/functional/wallet_abandonconflict.py | ocvcoin/ocvcoin | e816ac4a7dc57b00a5e085052a6bb3c94bf4959b | [
"MIT"
] | 2 | 2021-09-13T22:46:42.000Z | 2021-09-14T08:47:00.000Z | test/functional/wallet_abandonconflict.py | ocvcoin/ocvcoin | e816ac4a7dc57b00a5e085052a6bb3c94bf4959b | [
"MIT"
] | 2 | 2021-11-18T09:48:59.000Z | 2021-12-23T04:33:02.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2020 The Ocvcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the abandontransaction RPC.
The abandontransaction RPC marks a transaction and all its in-wallet... | 48.119565 | 138 | 0.669076 |
7979f362404f3e314890ea56b732f3c6d3896ff2 | 554 | py | Python | utils.py | macarthur-lab/gnomad-readviz | 2a839edbefa45e462205cbeea7cb478b53c27e57 | [
"MIT"
] | 1 | 2021-01-25T10:43:07.000Z | 2021-01-25T10:43:07.000Z | utils.py | broadinstitute/gnomad-readviz | abf2ad9399c3196c2678370f92b0290567fe5c6b | [
"MIT"
] | 9 | 2020-09-10T14:34:56.000Z | 2021-07-30T13:05:13.000Z | utils.py | macarthur-lab/gnomad-readviz | 2a839edbefa45e462205cbeea7cb478b53c27e57 | [
"MIT"
] | 1 | 2021-07-29T12:43:21.000Z | 2021-07-29T12:43:21.000Z | from typing import List
def get_sample_ids(ids_file: str, header: bool = False) -> List[str]:
"""
Open file with sample IDs and stores IDs in a list.
:param str ids_file: Path to file containing sample IDs.
:param bool header: Whether IDs file has a header line. Default is False.
:return: List of... | 27.7 | 77 | 0.628159 |
7979f362827b2137fba67b4ab1dc4d111cd07e50 | 18,562 | py | Python | h2o-bindings/bin/gen_python.py | Shysoong/air-3 | a850565231c79447ace246734f78b224d5b3c3d1 | [
"Apache-2.0"
] | null | null | null | h2o-bindings/bin/gen_python.py | Shysoong/air-3 | a850565231c79447ace246734f78b224d5b3c3d1 | [
"Apache-2.0"
] | null | null | null | h2o-bindings/bin/gen_python.py | Shysoong/air-3 | a850565231c79447ace246734f78b224d5b3c3d1 | [
"Apache-2.0"
] | 1 | 2020-04-17T13:06:26.000Z | 2020-04-17T13:06:26.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from copy import deepcopy
from functools import partial
from inspect import getsource
import sys
import bindings as bi
from custom import get_customizations_for, reformat_block
PY3 = sys.version_info[0] == 3
str_type = str if PY3 ... | 42.186364 | 156 | 0.594871 |
7979f3b1f1f93b43b533ad0cc88ea4c189c03aca | 12,888 | py | Python | selfdrive/car/hyundai/interface.py | ursubpar/openpilot | faba3d3f189ad4a94b0067b96123f59e28156d0a | [
"MIT"
] | 22 | 2020-12-29T13:00:40.000Z | 2021-12-04T12:09:01.000Z | selfdrive/car/hyundai/interface.py | ursubpar/openpilot | faba3d3f189ad4a94b0067b96123f59e28156d0a | [
"MIT"
] | null | null | null | selfdrive/car/hyundai/interface.py | ursubpar/openpilot | faba3d3f189ad4a94b0067b96123f59e28156d0a | [
"MIT"
] | 2 | 2021-06-06T18:12:40.000Z | 2021-06-14T03:38:29.000Z | #!/usr/bin/env python3
from cereal import car
from selfdrive.config import Conversions as CV
from selfdrive.car.hyundai.values import CAR, EV_CAR, HYBRID_CAR
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint
from selfdrive.car.interfaces import CarInterfaceBase
clas... | 46.028571 | 135 | 0.666822 |
7979f3ce7be64e480434ea027cd37231ab48a06b | 27,838 | py | Python | heartpy/heartpy.py | LZH970328/heartrate_analysis_python | 38692a1c974e31a1b982ffe3a3cfe8d8cfb74c10 | [
"MIT"
] | 596 | 2017-05-19T16:44:22.000Z | 2022-03-29T07:46:21.000Z | heartpy/heartpy.py | LZH970328/heartrate_analysis_python | 38692a1c974e31a1b982ffe3a3cfe8d8cfb74c10 | [
"MIT"
] | 82 | 2017-11-26T20:15:54.000Z | 2022-01-07T07:48:27.000Z | heartpy/heartpy.py | LZH970328/heartrate_analysis_python | 38692a1c974e31a1b982ffe3a3cfe8d8cfb74c10 | [
"MIT"
] | 242 | 2017-05-28T09:04:45.000Z | 2022-03-29T04:07:56.000Z | '''
main module for HeartPy.
'''
from datetime import datetime
import time
import os
import sys
import numpy as np
from scipy.interpolate import UnivariateSpline
from scipy.signal import butter, filtfilt, welch, periodogram, resample_poly, resample
from . import exceptions
from .datautils import get_data, get_sample... | 39.768571 | 119 | 0.651124 |
7979f53bd29d924da5c7e462c182a6466eee76ab | 4,985 | py | Python | sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/job.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/job.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/job.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 47.028302 | 102 | 0.638917 |
7979f594dcc09de683dcf7ec985ac9188fcd7ea3 | 290 | py | Python | lmctl/client/models/__init__.py | manojn97/lmctl | 844925cb414722351efac90cb97f10c1185eef7a | [
"Apache-2.0"
] | 3 | 2021-07-19T09:46:01.000Z | 2022-03-07T13:51:25.000Z | lmctl/client/models/__init__.py | manojn97/lmctl | 844925cb414722351efac90cb97f10c1185eef7a | [
"Apache-2.0"
] | 43 | 2019-08-27T12:36:29.000Z | 2020-08-27T14:50:40.000Z | lmctl/client/models/__init__.py | manojn97/lmctl | 844925cb414722351efac90cb97f10c1185eef7a | [
"Apache-2.0"
] | 7 | 2020-09-22T20:32:17.000Z | 2022-03-29T12:25:51.000Z | from .intents import (Intent, ExistingAssemblyIntent, CreateAssemblyIntent,
ChangeAssemblyStateIntent, DeleteAssemblyIntent, HealAssemblyIntent,
ScaleAssemblyIntent, UpgradeAssemblyIntent, CreateOrUpgradeAssemblyIntent, AdoptAssemblyIntent)
| 72.5 | 119 | 0.744828 |
7979f6826941427ef9075be95a9bf0f921955504 | 7,871 | py | Python | build/lib/mrgaze/report.py | jmtyszka/mrgaze | 29217eab9ea431686fd200f08bddd6615c45d0d3 | [
"MIT"
] | 18 | 2016-01-22T02:47:45.000Z | 2021-09-23T18:37:51.000Z | build/lib/mrgaze/report.py | jmtyszka/mrgaze | 29217eab9ea431686fd200f08bddd6615c45d0d3 | [
"MIT"
] | 7 | 2015-05-26T21:33:16.000Z | 2020-05-26T11:47:54.000Z | build/lib/mrgaze/report.py | jmtyszka/mrgaze | 29217eab9ea431686fd200f08bddd6615c45d0d3 | [
"MIT"
] | 7 | 2016-02-06T00:17:52.000Z | 2021-02-22T03:51:55.000Z | #!/usr/bin/env python
#
# Gaze tracking report generator
# - collects info from subject/session results directory
# - report placed in report subdirectory
#
# AUTHOR : Mike Tyszka
# PLACE : Caltech
# DATES : 2014-05-15 JMT From scratch
#
# This file is part of mrgaze.
#
# mrgaze is free software: you can redistrib... | 27.911348 | 94 | 0.652903 |
7979f70f1a8a1f533cadf60ecec71e17d4657bcd | 4,283 | py | Python | readux/books/management/commands/suppress_yearbook.py | jpkarlsberg/readux | 50a895dcf7d64b753a07808e9be218cab3682850 | [
"Apache-2.0"
] | null | null | null | readux/books/management/commands/suppress_yearbook.py | jpkarlsberg/readux | 50a895dcf7d64b753a07808e9be218cab3682850 | [
"Apache-2.0"
] | null | null | null | readux/books/management/commands/suppress_yearbook.py | jpkarlsberg/readux | 50a895dcf7d64b753a07808e9be218cab3682850 | [
"Apache-2.0"
] | null | null | null | import pdb, re
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from readux.utils import solr_interface
from django.conf import settings
from django.core.paginator import Paginator
class Command(BaseCommand):
'''Utility script to suppress Emory Yearbooks post 1922.... | 45.084211 | 130 | 0.516227 |
7979f87f33bfb5a7540fe70314603898a8458726 | 237 | py | Python | app.py | MkadirDev/async-aiogram-bot | 02c16941b1b57b8a2b9cf92bfd60316b224db961 | [
"MIT"
] | null | null | null | app.py | MkadirDev/async-aiogram-bot | 02c16941b1b57b8a2b9cf92bfd60316b224db961 | [
"MIT"
] | null | null | null | app.py | MkadirDev/async-aiogram-bot | 02c16941b1b57b8a2b9cf92bfd60316b224db961 | [
"MIT"
] | null | null | null | from aiogram import executor
from loader import dp, bot
async def on_shutdown(dp):
await bot.close()
if __name__ == "__main__":
from handlers import dp
executor.start_polling(dp, on_shutdown=on_shutdown) # start polling | 21.545455 | 72 | 0.738397 |
7979f893ef72ff9d7344204f2a557817cce153c4 | 1,171 | py | Python | setup.py | lunay001/txsocksx-backup | 110f71d11704e6f9811701fd28424f400f8510b2 | [
"0BSD"
] | 53 | 2015-01-04T19:36:47.000Z | 2022-01-06T05:37:33.000Z | setup.py | lunay001/txsocksx-backup | 110f71d11704e6f9811701fd28424f400f8510b2 | [
"0BSD"
] | 15 | 2015-02-03T11:16:43.000Z | 2022-02-03T18:26:11.000Z | setup.py | lunay001/txsocksx-backup | 110f71d11704e6f9811701fd28424f400f8510b2 | [
"0BSD"
] | 31 | 2015-02-23T18:29:53.000Z | 2021-04-13T17:05:44.000Z | # Copyright (c) Aaron Gallagher <_@habnab.it>
# See COPYING for details.
from setuptools import setup
with open('README.rst', 'rb') as infile:
long_description = infile.read()
with open('requirements.txt', 'rb') as infile:
install_requires = infile.read().split()
setup(
name='txsocksx',
description... | 29.275 | 61 | 0.632792 |
7979f8e1ab3be470527d84130958c33bd269946a | 917 | py | Python | examples/tornado/main.py | tell-k/uadetector | 62584b9f65858b482bb5959718906445dcdd472a | [
"MIT"
] | 5 | 2018-02-19T18:52:08.000Z | 2020-08-13T05:15:11.000Z | examples/tornado/main.py | tell-k/uadetector | 62584b9f65858b482bb5959718906445dcdd472a | [
"MIT"
] | 1 | 2018-02-20T11:13:46.000Z | 2018-02-20T11:13:46.000Z | examples/tornado/main.py | tell-k/uadetector | 62584b9f65858b482bb5959718906445dcdd472a | [
"MIT"
] | null | null | null | import json
import tornado.ioloop
import tornado.web
from uadetector.tornado.web import RequestHandler
# define(
# 'uadetector_request_property_name',
# default='ua',
# help='xxx'
# )
# define(
# 'uadetector_useragent_class',
# default='myuser.MyUserAgent',
# help='xxx'
# )
class IndexHandl... | 21.325581 | 55 | 0.613959 |
7979f97ea61e8ff261cd8c70796a7f1007cc99d4 | 55 | py | Python | descarteslabs/workflows/types/function/__init__.py | carderne/descarteslabs-python | 757b480efb8d58474a3bf07f1dbd90652b46ed64 | [
"Apache-2.0"
] | 167 | 2017-03-23T22:16:58.000Z | 2022-03-08T09:19:30.000Z | descarteslabs/workflows/types/function/__init__.py | carderne/descarteslabs-python | 757b480efb8d58474a3bf07f1dbd90652b46ed64 | [
"Apache-2.0"
] | 93 | 2017-03-23T22:11:40.000Z | 2021-12-13T18:38:53.000Z | descarteslabs/workflows/types/function/__init__.py | carderne/descarteslabs-python | 757b480efb8d58474a3bf07f1dbd90652b46ed64 | [
"Apache-2.0"
] | 46 | 2017-03-25T19:12:14.000Z | 2021-08-15T18:04:29.000Z | from .function import Function
__all__ = ["Function"]
| 13.75 | 30 | 0.745455 |
7979fa6f0b34d06ad611eafc7c67ad9129b0e8e0 | 4,300 | py | Python | cd4ml/webapp/model_cache.py | camila-contreras/CD4ML-Scenarios | 806f812990c7cf33b5f78456f0065012b5b4cd35 | [
"MIT"
] | 113 | 2020-03-31T20:36:39.000Z | 2022-01-11T15:06:58.000Z | cd4ml/webapp/model_cache.py | camila-contreras/CD4ML-Scenarios | 806f812990c7cf33b5f78456f0065012b5b4cd35 | [
"MIT"
] | 7 | 2020-06-10T05:11:35.000Z | 2022-01-06T02:55:21.000Z | cd4ml/webapp/model_cache.py | camila-contreras/CD4ML-Scenarios | 806f812990c7cf33b5f78456f0065012b5b4cd35 | [
"MIT"
] | 260 | 2020-03-21T19:42:26.000Z | 2022-01-25T22:08:36.000Z | import datetime
import logging
import os
from functools import lru_cache
from pathlib import Path
import mlflow
import requests
from cd4ml.model_utils import load_deployed_model_from_local_file
from cd4ml.problems import list_available_scenarios
class ModelCache:
def __init__(self, cache_location=Path("mlflow_ca... | 42.574257 | 120 | 0.663721 |
7979fb7d767b8d30b805ef446a5609320ec5b547 | 51,880 | py | Python | tofu/data/_spectrafit2d.py | lasofivec/tofu | dbb9f433290e3058dfd04d67fbca157761b0a105 | [
"MIT"
] | 1 | 2020-12-18T16:25:18.000Z | 2020-12-18T16:25:18.000Z | tofu/data/_spectrafit2d.py | lasofivec/tofu | dbb9f433290e3058dfd04d67fbca157761b0a105 | [
"MIT"
] | 1 | 2020-12-18T16:35:08.000Z | 2020-12-18T16:35:08.000Z | tofu/data/_spectrafit2d.py | lasofivec/tofu | dbb9f433290e3058dfd04d67fbca157761b0a105 | [
"MIT"
] | null | null | null |
# Built-in
import os
import warnings
# Common
import numpy as np
import scipy.optimize as scpopt
import scipy.constants as scpct
import scipy.sparse as sparse
from scipy.interpolate import BSpline
import matplotlib.pyplot as plt
# --------------
# TO BE MOVED TO tofu.data WHEN FINISHED !!!!
... | 34.936027 | 107 | 0.455802 |
7979fd38d4d3f62a8d8e5bf4a2e87ffa7a4a8447 | 1,935 | py | Python | flogger/blog/models.py | jcromerohdz/FlaskDev | 29539259cba3a0e18c205fb439ee916fb12e5318 | [
"MIT"
] | null | null | null | flogger/blog/models.py | jcromerohdz/FlaskDev | 29539259cba3a0e18c205fb439ee916fb12e5318 | [
"MIT"
] | null | null | null | flogger/blog/models.py | jcromerohdz/FlaskDev | 29539259cba3a0e18c205fb439ee916fb12e5318 | [
"MIT"
] | null | null | null | from datetime import datetime
from application import db
tag_x_post = db.Table('tag_x_post',
db.Column('tag_id', db.Integer, db.ForeingKey('tag.id'), primary_key=True),
db.Column('post_id', db.Integer, db.ForeignKey('post.id'), primary_key=True)
)
class Post(db.Model):
id = db.Column(db.Integer, primar... | 32.25 | 117 | 0.646512 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.