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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a2458ec68258755a956a3e91c4387e3734d51c1 | 7,198 | py | Python | heat/tests/test_stack_lock.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"Apache-2.0"
] | 1 | 2015-02-26T03:23:23.000Z | 2015-02-26T03:23:23.000Z | heat/tests/test_stack_lock.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"Apache-2.0"
] | null | null | null | heat/tests/test_stack_lock.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"Apache-2.0"
] | null | null | null |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 39.333333 | 78 | 0.651153 |
4a245a64632cc880351e8f4cc1b5c88e99d742b6 | 830 | py | Python | analyse.py | Maz101/Bert | b3eb7a964205f3b2a9f718c1019e99ee9ee5794d | [
"Apache-2.0"
] | null | null | null | analyse.py | Maz101/Bert | b3eb7a964205f3b2a9f718c1019e99ee9ee5794d | [
"Apache-2.0"
] | null | null | null | analyse.py | Maz101/Bert | b3eb7a964205f3b2a9f718c1019e99ee9ee5794d | [
"Apache-2.0"
] | null | null | null | from sklearn.metrics import precision_score, accuracy_score, recall_score
import tensorflow as tf
flags = tf.flags
FLAGS = flags.FLAGS
flags.DEFINE_string("testpath", "None", "testpath dir")
flags.DEFINE_string("testpred", "None", "testpred dir")
testd = []
with open(FLAGS.testpath,'r') as testfile:
for n in test... | 25.151515 | 73 | 0.653012 |
4a245ac6516e207c81c722673457b00ad12a4fc7 | 5,723 | py | Python | nhentai/logger.py | claron-akatsuki/nhentai | b850a23d5a521de35567075f7497fc8caabf4d3d | [
"MIT"
] | null | null | null | nhentai/logger.py | claron-akatsuki/nhentai | b850a23d5a521de35567075f7497fc8caabf4d3d | [
"MIT"
] | null | null | null | nhentai/logger.py | claron-akatsuki/nhentai | b850a23d5a521de35567075f7497fc8caabf4d3d | [
"MIT"
] | null | null | null | #
# Copyright (C) 2010-2012 Vinay Sajip. All rights reserved. Licensed under the new BSD license.
#
from __future__ import print_function, unicode_literals
import logging
import re
import platform
import sys
if platform.system() == 'Windows':
import ctypes
import ctypes.wintypes
# Reference: https://gist... | 31.618785 | 108 | 0.510571 |
4a245b9872c93b0604570db213e9b631553a0299 | 582 | py | Python | retail-smoke/go_open_form.py | nemo0101/1C-Retail-smoke-tests | dddf3d5cd56b087c8c5cae2c7bf776407a39cb4d | [
"MIT"
] | null | null | null | retail-smoke/go_open_form.py | nemo0101/1C-Retail-smoke-tests | dddf3d5cd56b087c8c5cae2c7bf776407a39cb4d | [
"MIT"
] | 5 | 2021-03-18T22:23:05.000Z | 2022-03-11T23:40:48.000Z | retail-smoke/go_open_form.py | nemo0101/1C-Retail-smoke-tests | dddf3d5cd56b087c8c5cae2c7bf776407a39cb4d | [
"MIT"
] | 1 | 2020-03-11T20:58:19.000Z | 2020-03-11T20:58:19.000Z | # -*- coding: utf8 -*
from full_cycle import click_or_enter_text, push
'''
основная логика работы для режима open_form
'''
def click_main_and_section(main_elem, section_elem, main_data):
click_or_enter_text(main_elem, main_data)
click_or_enter_text(section_elem, main_data)
def open_forms(mai... | 25.304348 | 64 | 0.656357 |
4a245bba1f877df956cda97ac3dc2b64646373b7 | 4,994 | py | Python | okr/admin/youtube.py | wdr-data/wdr-okr | 71c9e6e8d3521b1bb67d30310a93584389de2127 | [
"MIT"
] | 2 | 2021-07-28T08:46:13.000Z | 2022-01-19T17:05:48.000Z | okr/admin/youtube.py | wdr-data/wdr-okr | 71c9e6e8d3521b1bb67d30310a93584389de2127 | [
"MIT"
] | 3 | 2020-11-10T23:34:17.000Z | 2021-03-31T16:19:21.000Z | okr/admin/youtube.py | wdr-data/wdr-okr | 71c9e6e8d3521b1bb67d30310a93584389de2127 | [
"MIT"
] | null | null | null | """Forms for managing YouTube data."""
from django.contrib import admin
from ..models import (
YouTube,
YouTubeAnalytics,
YouTubeDemographics,
YouTubeTrafficSource,
YouTubeVideo,
YouTubeVideoAnalytics,
YouTubeVideoDemographics,
YouTubeVideoTrafficSource,
YouTubeVideoSearchTerm,
... | 29.034884 | 82 | 0.684221 |
4a245bd27b3b61ab45eca2779ee1685d114feafd | 7,549 | py | Python | scripts/utilities.py | Angelina15638749981/HDI-Project | 9dfe5d9c883efc37d285c852fcc92a02c6cdd945 | [
"MIT"
] | 1 | 2018-06-09T13:38:08.000Z | 2018-06-09T13:38:08.000Z | scripts/utilities.py | HangJie720/ATM | 9dfe5d9c883efc37d285c852fcc92a02c6cdd945 | [
"MIT"
] | null | null | null | scripts/utilities.py | HangJie720/ATM | 9dfe5d9c883efc37d285c852fcc92a02c6cdd945 | [
"MIT"
] | 1 | 2021-01-07T13:24:15.000Z | 2021-01-07T13:24:15.000Z | from __future__ import print_function
import argparse
import numpy as np
import os
from collections import defaultdict
from multiprocessing import Process
from sklearn.metrics import auc
from atm.config import *
from atm.worker import work
from atm.database import db_session
from atm.utilities import download_file_ht... | 35.947619 | 104 | 0.621539 |
4a245cc90a968a3512613c30eae839f6d8932ce0 | 928 | py | Python | Solutions/Longest Substring Without Repeating Characters/longestSubstring.py | Crayzero/LeetCodeProgramming | b10ebe22c0de1501722f0f5c934c0c1902a26789 | [
"MIT"
] | 1 | 2015-04-13T10:58:30.000Z | 2015-04-13T10:58:30.000Z | Solutions/Longest Substring Without Repeating Characters/longestSubstring.py | Crayzero/LeetCodeProgramming | b10ebe22c0de1501722f0f5c934c0c1902a26789 | [
"MIT"
] | null | null | null | Solutions/Longest Substring Without Repeating Characters/longestSubstring.py | Crayzero/LeetCodeProgramming | b10ebe22c0de1501722f0f5c934c0c1902a26789 | [
"MIT"
] | null | null | null | class Solution:
# @return an integer
def lengthOfLongestSubstring(self, s):
s = s.strip()
if not s:
return 0
else:
a = []
max = 0
for i in s:
if i not in a:
a.append(i)
else:
... | 30.933333 | 124 | 0.520474 |
4a245dbbd72950bce1bbff5748286188e1028456 | 533 | py | Python | hipster/min_heap.py | soumasish/hipster | 1fe3f0526839a2a418a7e9e6a0557bfc4a5ef061 | [
"MIT"
] | null | null | null | hipster/min_heap.py | soumasish/hipster | 1fe3f0526839a2a418a7e9e6a0557bfc4a5ef061 | [
"MIT"
] | null | null | null | hipster/min_heap.py | soumasish/hipster | 1fe3f0526839a2a418a7e9e6a0557bfc4a5ef061 | [
"MIT"
] | null | null | null | import heapq
from hipster.error import HeapError
from hipster.heap import Heap
class MinHeap(Heap):
def __init__(self):
super().__init__()
def peek(self):
if len(self.heap) == 0:
raise HeapError("Peeking into an empty heap")
with self.read_lock:
return heapq.ns... | 20.5 | 57 | 0.604128 |
4a245e97efc9d2d92105987a2cf06d46fc0b3250 | 31,701 | py | Python | brook-web.py | Ccapton/brook-web | 67f145406bd3faf6b14642af3f05a4d87d669ba5 | [
"MIT"
] | 253 | 2018-10-30T01:57:30.000Z | 2022-01-13T01:47:33.000Z | brook-web.py | Ccapton/brook-web | 67f145406bd3faf6b14642af3f05a4d87d669ba5 | [
"MIT"
] | 16 | 2018-11-05T06:53:20.000Z | 2022-02-14T20:07:22.000Z | brook-web.py | Ccapton/brook-web | 67f145406bd3faf6b14642af3f05a4d87d669ba5 | [
"MIT"
] | 86 | 2018-10-31T06:06:04.000Z | 2022-02-25T12:51:49.000Z | # coding=utf-8
# 。——————————————————————————————————————————
# 。
# 。 brook-web.py
# 。
# 。 @Time : 18-10-27 下午4:09
# 。 @Author : capton
# 。 @Software: PyCharm
# 。 @Blog : http://ccapton.cn
# 。 @Github : https://github.com/ccapton
# 。 @Email : chenweibin1125@foxmail.com
# 。_____________________________________... | 31.9889 | 160 | 0.612378 |
4a245ece0b0cc50ab2bdcd2f0b48a6c23639e56f | 3,591 | py | Python | huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_message.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-dms/huaweicloudsdkdms/v2/model/consume_message.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-dms/huaweicloudsdkdms/v2/model/consume_message.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.utils.http_utils import sanitize_for_serialization
class ConsumeMessage:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is ... | 25.65 | 79 | 0.548315 |
4a245f06c8ea3054095eb0f4ce335dcea114a565 | 4,727 | py | Python | workflow/migrations/0002_auto_20190519_0023.py | tanmayagarwal/Activity-CE | a49c47053b191ffa5aee9a06e66a7c9644804434 | [
"Apache-2.0"
] | 1 | 2021-07-07T14:39:23.000Z | 2021-07-07T14:39:23.000Z | workflow/migrations/0002_auto_20190519_0023.py | michaelbukachi/Activity | f3d4f4da88ae9539c341ca73cc559b850693d669 | [
"Apache-2.0"
] | null | null | null | workflow/migrations/0002_auto_20190519_0023.py | michaelbukachi/Activity | f3d4f4da88ae9539c341ca73cc559b850693d669 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.1 on 2019-05-19 07:23
from decimal import Decimal
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('workflow', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 46.80198 | 335 | 0.625978 |
4a245f2e6a0f1995fed56ad68574da2d3a6a8f86 | 3,483 | py | Python | staffsplit/staff_split.py | hotkeysoft/staffsplit_py | 2ad528d2db706242c01f478cb47e68d71ba5711a | [
"MIT"
] | null | null | null | staffsplit/staff_split.py | hotkeysoft/staffsplit_py | 2ad528d2db706242c01f478cb47e68d71ba5711a | [
"MIT"
] | null | null | null | staffsplit/staff_split.py | hotkeysoft/staffsplit_py | 2ad528d2db706242c01f478cb47e68d71ba5711a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import logging
import os
import sys
from PIL import Image
from PIL import ImageOps
from PIL import UnidentifiedImageError
from .args import parse_args
from ._version import print_version_info
log = logging.getLogger()
class LogFormatter(logging.Formatter):
def format(self, record):
... | 31.098214 | 97 | 0.596612 |
4a245f78b603d76b70c358fa3235d4b3d426e67d | 6,168 | py | Python | autofit/database/migration/migration.py | rhayes777/PyAutoF | 87f56419348833b285b00da1a524e329588e0b01 | [
"MIT"
] | 39 | 2019-01-24T10:45:23.000Z | 2022-03-18T09:37:59.000Z | autofit/database/migration/migration.py | rhayes777/PyAutoF | 87f56419348833b285b00da1a524e329588e0b01 | [
"MIT"
] | 260 | 2018-11-27T12:56:33.000Z | 2022-03-31T16:08:59.000Z | autofit/database/migration/migration.py | rhayes777/PyAutoF | 87f56419348833b285b00da1a524e329588e0b01 | [
"MIT"
] | 13 | 2018-11-30T16:49:05.000Z | 2022-01-21T17:39:29.000Z | import logging
from abc import ABC, abstractmethod
from hashlib import md5
from typing import Union, Generator, Iterable, Optional
from sqlalchemy.exc import OperationalError
from sqlalchemy.orm import Session
from .session_wrapper import SessionWrapper
logger = logging.getLogger(
__name__
)
class Identifiable... | 25.073171 | 100 | 0.535019 |
4a245fc18ecb73448302edd12c141e74ef81d004 | 1,851 | py | Python | aliyun-python-sdk-aegis/aliyunsdkaegis/request/v20161111/DescribeSasAssetStatisticsRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-aegis/aliyunsdkaegis/request/v20161111/DescribeSasAssetStatisticsRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-aegis/aliyunsdkaegis/request/v20161111/DescribeSasAssetStatisticsRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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... | 34.277778 | 92 | 0.765532 |
4a24605171044a364966bf0de9ced9179c2dc519 | 24 | py | Python | profiling/startup.py | oaxiom/glbase3 | 9d3fc1efaad58ffb97e5b8126c2a96802daf9bac | [
"MIT"
] | 8 | 2019-06-11T02:13:20.000Z | 2022-02-22T09:27:23.000Z | profiling/startup.py | oaxiom/glbase3 | 9d3fc1efaad58ffb97e5b8126c2a96802daf9bac | [
"MIT"
] | 6 | 2020-12-18T15:08:14.000Z | 2021-05-22T00:31:57.000Z | profiling/startup.py | oaxiom/glbase3 | 9d3fc1efaad58ffb97e5b8126c2a96802daf9bac | [
"MIT"
] | 2 | 2020-05-06T04:27:03.000Z | 2022-02-22T09:28:25.000Z |
from glbase3 import *
| 6 | 21 | 0.708333 |
4a246152ef337f7f307cb48d83f8b1f50977e3f5 | 1,015 | py | Python | setup.py | rekcahkumar/mediafire-python-open-sdk | 8f1f23db1b16f16e026f5c6777aec32d00baa05f | [
"BSD-2-Clause"
] | 35 | 2015-01-18T22:38:35.000Z | 2021-10-10T04:07:32.000Z | setup.py | rekcahkumar/mediafire-python-open-sdk | 8f1f23db1b16f16e026f5c6777aec32d00baa05f | [
"BSD-2-Clause"
] | 32 | 2015-01-10T08:22:30.000Z | 2022-02-28T23:20:22.000Z | setup.py | rekcahkumar/mediafire-python-open-sdk | 8f1f23db1b16f16e026f5c6777aec32d00baa05f | [
"BSD-2-Clause"
] | 20 | 2015-01-10T08:34:03.000Z | 2022-03-30T22:50:13.000Z | from setuptools import setup
from pip.req import parse_requirements
import uuid
requirements = parse_requirements('requirements.txt', session=uuid.uuid1())
install_requires = [str(r.req) for r in requirements]
setup(
name='mediafire',
version='0.6.0',
author='Roman Yepishev',
author_email='rye@keypres... | 33.833333 | 75 | 0.669951 |
4a24620000e14037b9b25cec3a6362e36074e33d | 19,323 | py | Python | google/ads/google_ads/v4/proto/services/campaign_service_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | 1 | 2021-04-09T04:28:47.000Z | 2021-04-09T04:28:47.000Z | google/ads/google_ads/v4/proto/services/campaign_service_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v4/proto/services/campaign_service_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v4/proto/services/campaign_service.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf imp... | 46.900485 | 2,366 | 0.774776 |
4a24629988cc6570a7c45d5fec03ee8898181a60 | 2,303 | py | Python | ooobuild/lo/text/x_paragraph_cursor.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/text/x_paragraph_cursor.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/text/x_paragraph_cursor.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 33.376812 | 135 | 0.688667 |
4a24639d8c9c3eda34b894341a020e7a8d302953 | 304 | py | Python | Program's_Contributed_By_Contributors/Python_Programs/dice roller.py | alok2947/Hacktoberfest2021 | d7479b32312533e084745b4da1a96f1cf109bd4d | [
"MIT"
] | null | null | null | Program's_Contributed_By_Contributors/Python_Programs/dice roller.py | alok2947/Hacktoberfest2021 | d7479b32312533e084745b4da1a96f1cf109bd4d | [
"MIT"
] | null | null | null | Program's_Contributed_By_Contributors/Python_Programs/dice roller.py | alok2947/Hacktoberfest2021 | d7479b32312533e084745b4da1a96f1cf109bd4d | [
"MIT"
] | null | null | null | import random
while True:
start=input('Type ROLL to start rolling the dice:')
if start=='ROLL':
print('Rolling dice..')
print(f"The value is ", random.randint(1,6))
again=input("to close the program type CLOSE and to continue the program press anything:")
if again =='CLOSE':
break
| 27.636364 | 91 | 0.680921 |
4a2466fae8e7953c93bb79274e60a8f72f31cfaf | 760 | py | Python | tests/enclosed_leds.py | Vykstorm/mowaysim | c16bd0d0453e744a8920ef979f65600fd5775542 | [
"MIT"
] | null | null | null | tests/enclosed_leds.py | Vykstorm/mowaysim | c16bd0d0453e744a8920ef979f65600fd5775542 | [
"MIT"
] | null | null | null | tests/enclosed_leds.py | Vykstorm/mowaysim | c16bd0d0453e744a8920ef979f65600fd5775542 | [
"MIT"
] | null | null | null | import sys, atexit
from time import sleep
from mowaysim import *
print 'Executing ' + __name__ + ' test...'
if __name__ == '__main__':
atexit.register(exit_mow)
channel = 7
moway.usbinit_moway()
ret = moway.init_moway(channel)
if ret == 0:
print 'Moway RFUSB Connected'
else:
print 'Moway RFUSB not con... | 25.333333 | 54 | 0.752632 |
4a24691326aad8079c39c42a97f1d650ef49bc3f | 350 | py | Python | server/setup.py | DmitryTakmakov/Takmachat | b145fb0a95f86613da5a168031263a2227065736 | [
"MIT"
] | null | null | null | server/setup.py | DmitryTakmakov/Takmachat | b145fb0a95f86613da5a168031263a2227065736 | [
"MIT"
] | null | null | null | server/setup.py | DmitryTakmakov/Takmachat | b145fb0a95f86613da5a168031263a2227065736 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(name="takmachat_server",
version="0.0.1",
description="server for small messaging application",
author="Dmitry Takmakov",
author_email="dj-dat@yandex.ru",
packages=find_packages(),
install_requires=['PyQt5', 'sqlalchemy', 'pycryptodo... | 31.818182 | 79 | 0.685714 |
4a24697d9982782378e087f73adc491dcfcaa94d | 3,013 | py | Python | pyaedt/generic/filesystem.py | myoung301/pyaedt | e848dabbdd65aada3af1c5389947bb8a1bfe4a6f | [
"MIT"
] | 38 | 2021-10-01T23:15:26.000Z | 2022-03-30T18:14:41.000Z | pyaedt/generic/filesystem.py | myoung301/pyaedt | e848dabbdd65aada3af1c5389947bb8a1bfe4a6f | [
"MIT"
] | 362 | 2021-09-30T17:11:55.000Z | 2022-03-31T13:36:20.000Z | pyaedt/generic/filesystem.py | pyansys/pyaedt | c7b045fede6bc707fb20a8db7d5680c66d8263f6 | [
"MIT"
] | 15 | 2021-09-30T20:21:02.000Z | 2022-02-21T20:22:03.000Z | import os
import random
import shutil
import string
from glob import glob
from distutils.dir_util import copy_tree
def my_location():
""" """
return os.path.normpath(os.path.dirname(__file__))
def files_in_directory(path=".", ext=""):
"""
Parameters
----------
path :
(Default valu... | 22.154412 | 120 | 0.542649 |
4a246a5a806ca9def1d604e24029f76e6ff0f849 | 2,141 | py | Python | main.py | BadrBelkadi/Ultimate-Calculator | a5e28d3abdc77461a86c79e8f10a752869e40b6d | [
"MIT"
] | null | null | null | main.py | BadrBelkadi/Ultimate-Calculator | a5e28d3abdc77461a86c79e8f10a752869e40b6d | [
"MIT"
] | null | null | null | main.py | BadrBelkadi/Ultimate-Calculator | a5e28d3abdc77461a86c79e8f10a752869e40b6d | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# Made by Jordan Leich on 6/1/2021, all contributors via GitHub can be found at
# https://github.com/JordanLeich/Ultimate-Calculator/graphs/contributors
# Imports
from calculators import algebra, conversions, stocks, financial, calculator, randomization
import restart
import colors
import contribut... | 28.932432 | 98 | 0.671649 |
4a246b4cfa4fb982befcf8b06472ff64b43fd521 | 14,854 | py | Python | list3/task2/scrabble_genetic.py | KamilKrol5/metaheuristics-algorithms | 19270489fe54c7288429c6edbd7940bcb73bb481 | [
"MIT"
] | null | null | null | list3/task2/scrabble_genetic.py | KamilKrol5/metaheuristics-algorithms | 19270489fe54c7288429c6edbd7940bcb73bb481 | [
"MIT"
] | null | null | null | list3/task2/scrabble_genetic.py | KamilKrol5/metaheuristics-algorithms | 19270489fe54c7288429c6edbd7940bcb73bb481 | [
"MIT"
] | null | null | null | import fileinput
import random
import sys
import time
from collections import Counter
from itertools import chain, takewhile, count
from typing import Dict, Collection, List, Tuple, Generator, Optional, Union
import numpy as np
from scrabble import Scrabble, Word, Letter, WordUtils
from utils.utils import flatten, gr... | 45.704615 | 121 | 0.624209 |
4a246c380ba3e805fa0cc968ef5e9dc281d23404 | 17,626 | py | Python | detector/yolo/darknet_trt.py | oreo-lp/AlphaPose_TRT | ffb04455b9ff2a1da3c8e43c2b6acce7b4a9d082 | [
"Apache-2.0"
] | 36 | 2021-05-06T14:10:04.000Z | 2022-03-23T02:02:19.000Z | detector/yolo/darknet_trt.py | oreo-lp/AlphaPose_TRT | ffb04455b9ff2a1da3c8e43c2b6acce7b4a9d082 | [
"Apache-2.0"
] | 10 | 2021-05-11T11:36:10.000Z | 2022-03-28T13:41:59.000Z | detector/yolo/darknet_trt.py | oreo-lp/AlphaPose_TRT | ffb04455b9ff2a1da3c8e43c2b6acce7b4a9d082 | [
"Apache-2.0"
] | 11 | 2021-05-17T07:18:19.000Z | 2022-03-30T07:19:00.000Z | from __future__ import division
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import cv2
import matplotlib.pyplot as plt
try:
from util import count_parameters as count
from util import convert2cpu as cpu
from util import predict_... | 33.896154 | 119 | 0.525304 |
4a246c4af13b4746a6d0c0eb2bc8f39d277e7f9e | 5,300 | py | Python | pyFM/mesh/laplacian.py | Yang-L1/pyFM | bfc9cf58da81441c13dbfe0645872e82b6038521 | [
"MIT"
] | null | null | null | pyFM/mesh/laplacian.py | Yang-L1/pyFM | bfc9cf58da81441c13dbfe0645872e82b6038521 | [
"MIT"
] | null | null | null | pyFM/mesh/laplacian.py | Yang-L1/pyFM | bfc9cf58da81441c13dbfe0645872e82b6038521 | [
"MIT"
] | null | null | null | import numpy as np
import scipy.sparse as sparse
def dia_area_mat(vertices, faces, faces_areas=None):
"""
Compute the diagonal matrix of lumped vertex area for mesh laplacian.
Entry i on the diagonal is the area of vertex i, approximated as one third
of adjacent triangles
Parameters
---------... | 33.333333 | 93 | 0.559623 |
4a246dd38c527d8e599365bd17bd49722c3cf89a | 1,165 | py | Python | src/MisoDispenser.py | alim4/MisoDispenser | 137a5cb1b4a351ca6a13c312c9e0643b9d420f92 | [
"MIT"
] | null | null | null | src/MisoDispenser.py | alim4/MisoDispenser | 137a5cb1b4a351ca6a13c312c9e0643b9d420f92 | [
"MIT"
] | null | null | null | src/MisoDispenser.py | alim4/MisoDispenser | 137a5cb1b4a351ca6a13c312c9e0643b9d420f92 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import RPi.GPIO as GPIO
import time
import schedule
GPIO_PIN =17
FREQUENCY = 50
MIN_DUTY = 2.2
MAX_DUTY = 7.5
SLEEP_DURATION = 0.8
def feed(t):
print(t)
GPIO.setmode(GPIO.BCM)
GPIO.setup(GPIO_PIN, GPIO.OUT)
try:
servo = GPIO.PWM(GPIO_PIN, FREQUENCY)
servo.s... | 23.3 | 69 | 0.591416 |
4a246e054eaa2490307d2d9db60e4e19a8aeb6ea | 154 | py | Python | ghdl_old/ghdl/__init__.py | dtanay2004/ansible-role-helloworld2 | db257404708a3cd3ec595d66a78331fc0afb7d88 | [
"BSD-3-Clause"
] | null | null | null | ghdl_old/ghdl/__init__.py | dtanay2004/ansible-role-helloworld2 | db257404708a3cd3ec595d66a78331fc0afb7d88 | [
"BSD-3-Clause"
] | null | null | null | ghdl_old/ghdl/__init__.py | dtanay2004/ansible-role-helloworld2 | db257404708a3cd3ec595d66a78331fc0afb7d88 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for GitHub Downloader."""
__author__ = """Tanay"""
__email__ = 'audreyr@example.com'
__version__ = '0.1.0'
| 19.25 | 46 | 0.642857 |
4a246e0593fc0648829ef704d0d1bbab0a1dc0e3 | 211 | py | Python | setup.py | krouth17/mlops_main | ed21946d0696036006ccbf188c35846c9a0016e1 | [
"MIT"
] | null | null | null | setup.py | krouth17/mlops_main | ed21946d0696036006ccbf188c35846c9a0016e1 | [
"MIT"
] | null | null | null | setup.py | krouth17/mlops_main | ed21946d0696036006ccbf188c35846c9a0016e1 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='its a demo prj using mlops',
author='mlops_main',
license='MIT',
)
| 19.181818 | 45 | 0.658768 |
4a246e997abafb4016011f313979847b9142face | 66 | py | Python | podostemaceous/__init__.py | cfe316/podostemaceous | de464059c68ad3fda62a28ec1f6610382bc25b67 | [
"MIT"
] | 1 | 2020-01-10T13:23:31.000Z | 2020-01-10T13:23:31.000Z | podostemaceous/__init__.py | cfe316/podostemaceous | de464059c68ad3fda62a28ec1f6610382bc25b67 | [
"MIT"
] | null | null | null | podostemaceous/__init__.py | cfe316/podostemaceous | de464059c68ad3fda62a28ec1f6610382bc25b67 | [
"MIT"
] | null | null | null | # A really great package for calculations ancillary to DSMC codes
| 33 | 65 | 0.818182 |
4a246ec951205055d226b0a02e2045e2a168ff73 | 2,558 | py | Python | Lib/site-packages/django_notifications/management/commands/notifications.py | jiangyifan123/EngLearner | a54c205a6e6bf3b2af366b56a7b7f97344fa1466 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/django_notifications/management/commands/notifications.py | jiangyifan123/EngLearner | a54c205a6e6bf3b2af366b56a7b7f97344fa1466 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/django_notifications/management/commands/notifications.py | jiangyifan123/EngLearner | a54c205a6e6bf3b2af366b56a7b7f97344fa1466 | [
"bzip2-1.0.6"
] | null | null | null | """
Django notifications management commands.
Usage:
python manage.py notifications backends - displays all the available notification
backends
python manage.py notifications configured_backends - displays all the configured
notification backends
python manage.py notifications settings [backend_key] - disp... | 30.452381 | 82 | 0.704848 |
4a246edfc78f197d3205a158ee19893beb490230 | 2,134 | py | Python | dfirtrack_artifacts/migrations/0002_default_values.py | thomas-kropeit/dfirtrack | b1e0e659af7bc8085cfe2d269ddc651f9f4ba585 | [
"Apache-2.0"
] | 273 | 2018-04-18T22:09:15.000Z | 2021-06-04T09:15:48.000Z | dfirtrack_artifacts/migrations/0002_default_values.py | stuhli/dfirtrack | 9260c91e4367b36d4cb1ae7efe4e2d2452f58e6e | [
"Apache-2.0"
] | 75 | 2018-08-31T11:05:37.000Z | 2021-06-08T14:15:07.000Z | dfirtrack_artifacts/migrations/0002_default_values.py | thomas-kropeit/dfirtrack | b1e0e659af7bc8085cfe2d269ddc651f9f4ba585 | [
"Apache-2.0"
] | 61 | 2018-11-12T22:55:48.000Z | 2021-06-06T15:16:16.000Z | from django.db import migrations
from django.utils.text import slugify
def insert_artifactstatus(apps, schema_editor):
# We can't import the migrated model directly as it may be a newer
# version than this migration expects. We use the historical version.
Artifactstatus = apps.get_model('dfirtrack_artifac... | 33.34375 | 89 | 0.679007 |
4a246f259ca3f2a936a0a5ab1b22060aedd2dab4 | 2,733 | py | Python | ashierlib/test/utils_test.py | google/ashier | 76710289b2c459ed1ef8ca822cfa1d5fbad05b89 | [
"Apache-2.0"
] | 26 | 2015-01-20T06:22:45.000Z | 2021-04-20T20:38:09.000Z | ashierlib/test/utils_test.py | google/ashier | 76710289b2c459ed1ef8ca822cfa1d5fbad05b89 | [
"Apache-2.0"
] | null | null | null | ashierlib/test/utils_test.py | google/ashier | 76710289b2c459ed1ef8ca822cfa1d5fbad05b89 | [
"Apache-2.0"
] | 11 | 2015-01-25T18:35:01.000Z | 2021-10-12T00:49:54.000Z | #!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 27.887755 | 74 | 0.676546 |
4a246fbf82a2b998b9f9206d7fcf574f4be06136 | 4,162 | py | Python | src/mpy_device/serial_repl.py | stefanhoelzl/amp-fuse | 1ba23dc75499d1b6b8cb66401948a98dd3b35763 | [
"MIT"
] | 2 | 2017-12-06T14:14:06.000Z | 2022-02-16T14:03:31.000Z | src/mpy_device/serial_repl.py | stefanhoelzl/mpy-fuse | 1ba23dc75499d1b6b8cb66401948a98dd3b35763 | [
"MIT"
] | null | null | null | src/mpy_device/serial_repl.py | stefanhoelzl/mpy-fuse | 1ba23dc75499d1b6b8cb66401948a98dd3b35763 | [
"MIT"
] | 1 | 2018-04-08T11:57:39.000Z | 2018-04-08T11:57:39.000Z | import re
import serial
from .base_device import BaseDevice, MpyDeviceError
class SerialRepl(BaseDevice):
"""
micropython board interface
This module provides a MpyDevice class to communicate with a micropython
device. It allows to execute python code remote on the device.
.. code-block:: python
... | 30.379562 | 80 | 0.58025 |
4a24709a20a373ae5dd4a1d8c288e84f4087fc35 | 157 | py | Python | streamad/process/__init__.py | Fengrui-Liu/streamingTS | 1c5fcb9751c44a5fc69dcb237b48d93204b721e9 | [
"Apache-2.0"
] | 4 | 2020-12-06T03:05:25.000Z | 2020-12-09T12:39:51.000Z | streamad/process/__init__.py | Fengrui-Liu/streamingTS | 1c5fcb9751c44a5fc69dcb237b48d93204b721e9 | [
"Apache-2.0"
] | null | null | null | streamad/process/__init__.py | Fengrui-Liu/streamingTS | 1c5fcb9751c44a5fc69dcb237b48d93204b721e9 | [
"Apache-2.0"
] | null | null | null | from .zscore_Thresholder import ZScoreThresholder
from .tdigest_Thresholder import TDigestThresholder
__all__ = ["ZScoreThresholder", "TDigestThresholder"]
| 31.4 | 53 | 0.853503 |
4a247140162a37bb23c71366dc819ca6caa60df2 | 29,972 | py | Python | openstack/baremetal/v1/node.py | morganseznec/openstacksdk | 7b245c16556a04497ce701d959a889eca6f26a83 | [
"Apache-2.0"
] | null | null | null | openstack/baremetal/v1/node.py | morganseznec/openstacksdk | 7b245c16556a04497ce701d959a889eca6f26a83 | [
"Apache-2.0"
] | null | null | null | openstack/baremetal/v1/node.py | morganseznec/openstacksdk | 7b245c16556a04497ce701d959a889eca6f26a83 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 45.969325 | 79 | 0.640131 |
4a24739e446ea1c195153d63b6f3e364168025da | 3,335 | py | Python | monasca-log-api-2.9.0/monasca_log_api/app/base/model.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | monasca-log-api-2.9.0/monasca_log_api/app/base/model.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | monasca-log-api-2.9.0/monasca_log_api/app/base/model.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2016 FUJITSU LIMITED
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 27.791667 | 75 | 0.593703 |
4a2473a244fb625c2d1ab3afbc3eae31a419c9c2 | 2,640 | py | Python | utility/application/handlers/upload_handlers.py | vinthedark/snet-marketplace-service | 66ed9d093b00f09d3e28ef4d86c4e4c125037d06 | [
"MIT"
] | null | null | null | utility/application/handlers/upload_handlers.py | vinthedark/snet-marketplace-service | 66ed9d093b00f09d3e28ef4d86c4e4c125037d06 | [
"MIT"
] | null | null | null | utility/application/handlers/upload_handlers.py | vinthedark/snet-marketplace-service | 66ed9d093b00f09d3e28ef4d86c4e4c125037d06 | [
"MIT"
] | null | null | null | import base64
from uuid import uuid4
from common.constant import StatusCode
from common.exception_handler import exception_handler
from common.logger import get_logger
from common.utils import generate_lambda_response, validate_dict
from utility.application.upload_service import UploadService
from utility.config impor... | 42.580645 | 116 | 0.738258 |
4a2473b36c5bbacec64020f9b4bd5b7900239161 | 1,471 | py | Python | ingestion/src/metadata/ingestion/models/user.py | tomtor/OpenMetadata | c925168f6503c6db74742b87caf1a4011b89beea | [
"Apache-2.0"
] | 864 | 2021-08-13T23:48:45.000Z | 2022-03-31T18:36:30.000Z | ingestion/src/metadata/ingestion/models/user.py | tomtor/OpenMetadata | c925168f6503c6db74742b87caf1a4011b89beea | [
"Apache-2.0"
] | 2,701 | 2021-08-14T06:05:12.000Z | 2022-03-31T23:48:32.000Z | ingestion/src/metadata/ingestion/models/user.py | tomtor/OpenMetadata | c925168f6503c6db74742b87caf1a4011b89beea | [
"Apache-2.0"
] | 144 | 2021-08-16T20:44:08.000Z | 2022-03-29T14:12:30.000Z | # Copyright 2021 Collate
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software... | 27.754717 | 75 | 0.673012 |
4a2473ca54e31d9713e25beed218eb8641602cbd | 1,711 | py | Python | housemonitor/lib/pubsubaid.py | gary-pickens/HouseMonitor | 4b169bdbeed9013e1824d4bb929970ae0c27a6c9 | [
"MIT"
] | 1 | 2021-06-28T06:52:03.000Z | 2021-06-28T06:52:03.000Z | housemonitor/lib/pubsubaid.py | gary-pickens/HouseMonitor | 4b169bdbeed9013e1824d4bb929970ae0c27a6c9 | [
"MIT"
] | null | null | null | housemonitor/lib/pubsubaid.py | gary-pickens/HouseMonitor | 4b169bdbeed9013e1824d4bb929970ae0c27a6c9 | [
"MIT"
] | null | null | null | '''
Created on Nov 6, 2012
@author: Gary
'''
from pubsub import pub
from pubsub import utils
from base import Base
from pprint import pprint, pformat
from housemonitor.lib.constants import Constants
from pubsub.utils import printTreeDocs
class PubSubAid( Base ):
'''
PubSubAid provides subscriptions for some ... | 29 | 96 | 0.613092 |
4a2473cae505121968cdb6a73a2e80430063d779 | 42,489 | py | Python | tensorflow/python/ops/math_ops.py | Mr-Kumar-Abhishek/tensordrift | a9ca5173b2252b0de5dd754147b275e85298e522 | [
"Apache-2.0"
] | 2 | 2019-04-21T12:10:20.000Z | 2020-12-27T19:06:31.000Z | tensorflow/python/ops/math_ops.py | cleargraphinc/tensorflow | 21fac39c471dede0e4ae62dd60e2b0b85db48415 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/math_ops.py | cleargraphinc/tensorflow | 21fac39c471dede0e4ae62dd60e2b0b85db48415 | [
"Apache-2.0"
] | null | null | null | """## Arithmetic Operators
TensorFlow provides several operations that you can use to add basic arithmetic
operators to your graph.
@@add
@@sub
@@mul
@@div
@@mod
## Basic Math Functions
TensorFlow provides several operations that you can use to add basic
mathematical functions to your graph.
@@add_n
@@abs
@@neg
@@... | 32.434351 | 86 | 0.681776 |
4a24742792501df22eaa8fdd49779ad01d064afb | 2,640 | py | Python | manifest/generator.py | ebi-ait/ingest-exporter | 9fc9e1b92caa7816f4d5d312ac92e50907f30aed | [
"Apache-2.0"
] | null | null | null | manifest/generator.py | ebi-ait/ingest-exporter | 9fc9e1b92caa7816f4d5d312ac92e50907f30aed | [
"Apache-2.0"
] | 13 | 2020-06-08T08:18:02.000Z | 2022-02-15T00:13:11.000Z | manifest/generator.py | ebi-ait/ingest-exporter | 9fc9e1b92caa7816f4d5d312ac92e50907f30aed | [
"Apache-2.0"
] | null | null | null | from ingest.api.ingestapi import IngestApi
from manifest.manifests import AssayManifest
from exporter.graph.experiment_graph import ExperimentGraph
from exporter.graph.graph_crawler import GraphCrawler
from exporter.metadata import MetadataResource, DataFile
from typing import Dict, List
class ManifestGenerator:
... | 53.877551 | 138 | 0.781061 |
4a2474694210b8edf3d98daf28f58387042830de | 1,005 | py | Python | deepsoccer_jetson/scripts/deepsoccer_infrared.py | kimbring2/jetbot_gazebo | 385348a6bd451fb9d752bf0417138b2eacf91e48 | [
"Apache-1.1"
] | 19 | 2020-04-07T07:07:39.000Z | 2022-02-12T22:24:06.000Z | deepsoccer_jetson/scripts/deepsoccer_infrared.py | kimbring2/jetbot_gazebo | 385348a6bd451fb9d752bf0417138b2eacf91e48 | [
"Apache-1.1"
] | 5 | 2020-03-07T07:30:47.000Z | 2021-02-04T13:11:03.000Z | deepsoccer_jetson/scripts/deepsoccer_infrared.py | kimbring2/jetbot_gazebo | 385348a6bd451fb9d752bf0417138b2eacf91e48 | [
"Apache-1.1"
] | 16 | 2020-03-17T00:17:54.000Z | 2022-03-21T18:27:13.000Z | #!/usr/bin/env python
import rospy
import time
import RPi.GPIO as GPIO
from std_msgs.msg import String
# Pin Definitions
input_pin = 27 # BOARD pin 12, BCM pin 18
def getInfraredData():
value = GPIO.input(input_pin)
if value == GPIO.HIGH:
value_str = "False"
else:
value_str = "True"
... | 25.125 | 72 | 0.640796 |
4a2474ac99c728184abd5bd300435df3e4b5ec54 | 1,002 | py | Python | server/valid.py | jonadar/Final-project | 3712a78cf19cb6019093901b5e7c8fb9171da0ba | [
"MIT"
] | null | null | null | server/valid.py | jonadar/Final-project | 3712a78cf19cb6019093901b5e7c8fb9171da0ba | [
"MIT"
] | null | null | null | server/valid.py | jonadar/Final-project | 3712a78cf19cb6019093901b5e7c8fb9171da0ba | [
"MIT"
] | null | null | null | def CPass(pss):
err = ''
capital = 0
numbers = 0
if len(pss)<=6:
err+= "password must be longer then 6 letters\n"
if pss.find(' ')!=-1:
err += 'must not contain spaces\n'
for i in pss:
if i.isupper():
capital+=1
if capital==0:
err+='You... | 20.44898 | 58 | 0.492016 |
4a24755210a95166714fd196e142f305b505eba1 | 701 | py | Python | apps/solicitudes/urls.py | eduardoagreda/requisiciones | 34579f813db3f4f9631cdc14a40a9d3ffed35723 | [
"MIT"
] | null | null | null | apps/solicitudes/urls.py | eduardoagreda/requisiciones | 34579f813db3f4f9631cdc14a40a9d3ffed35723 | [
"MIT"
] | 5 | 2020-06-06T01:24:17.000Z | 2021-06-09T18:54:24.000Z | apps/solicitudes/urls.py | eduardoagreda/requisiciones | 34579f813db3f4f9631cdc14a40a9d3ffed35723 | [
"MIT"
] | null | null | null | from django.urls import path
from apps.solicitudes.views import add_solicitudes, delete_solicitudes, edit_solicitudes, lista_solicitudes, SolicitudesList, DetalleSolicitudes, DeleteSolicitudes
urlpatterns = [
path('solicitudes/crear/', add_solicitudes, name='add_solicitudes'),
path('solicitudes/<int:pk>/edita... | 53.923077 | 163 | 0.771755 |
4a24790d3a0494fc90c680c53aa6d4927a67fdf7 | 3,010 | py | Python | src/spagetti.py | takumihonda/BAIU2018_5.3.6 | 7d0768406aa44a0aeb03eacd5ab0a1141f5158e4 | [
"MIT"
] | null | null | null | src/spagetti.py | takumihonda/BAIU2018_5.3.6 | 7d0768406aa44a0aeb03eacd5ab0a1141f5158e4 | [
"MIT"
] | null | null | null | src/spagetti.py | takumihonda/BAIU2018_5.3.6 | 7d0768406aa44a0aeb03eacd5ab0a1141f5158e4 | [
"MIT"
] | null | null | null | import numpy as np
from netCDF4 import Dataset
from datetime import datetime
from datetime import timedelta
import os
import sys
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
from tools_BAIU import get_lonlat, get_var, prep_proj_multi, get_grads_JMA, def_cmap, ... | 23.700787 | 117 | 0.573754 |
4a24793f3947c3bfcda1817b3b5813e2bca10bb6 | 139 | py | Python | tests/regression/boston/ws_boston_DecisionTreeRegressor_postgresql_code_gen.py | antoinecarme/sklearn2sql_heroku | d680db10683daa419324461eeea851dd8b103ad5 | [
"BSD-3-Clause"
] | 1 | 2019-07-09T14:45:18.000Z | 2019-07-09T14:45:18.000Z | tests/regression/boston/ws_boston_DecisionTreeRegressor_postgresql_code_gen.py | antoinecarme/sklearn2sql_heroku | d680db10683daa419324461eeea851dd8b103ad5 | [
"BSD-3-Clause"
] | 5 | 2017-11-13T13:35:37.000Z | 2021-11-11T12:57:20.000Z | tests/regression/boston/ws_boston_DecisionTreeRegressor_postgresql_code_gen.py | antoinecarme/sklearn2sql_heroku | d680db10683daa419324461eeea851dd8b103ad5 | [
"BSD-3-Clause"
] | 1 | 2021-09-19T15:05:33.000Z | 2021-09-19T15:05:33.000Z | from sklearn2sql_heroku.tests.regression import generic as reg_gen
reg_gen.test_model("DecisionTreeRegressor" , "boston" , "postgresql")
| 27.8 | 69 | 0.81295 |
4a247b18b3558d6061f2d9f3bbdf55bd4af9c808 | 5,249 | py | Python | resume.py | mianyuwang/resume | dc702f4714cbaebb0935460122509196cfd893c5 | [
"MIT"
] | null | null | null | resume.py | mianyuwang/resume | dc702f4714cbaebb0935460122509196cfd893c5 | [
"MIT"
] | 2 | 2020-06-23T05:41:09.000Z | 2020-07-29T19:17:33.000Z | resume.py | mianyuwang/resume | dc702f4714cbaebb0935460122509196cfd893c5 | [
"MIT"
] | null | null | null | # encoding: utf-8
"""
resume.py is a pre-processor for Markdown resumes, targeting the pandoc
document processor.
Pandoc extended Markdown supports embedded HTML (like all compliant Markdown
parser) and a subset of LaTeX, but when outputting LaTeX any unrecognized
LaTeX commands will simply be passed through.
This me... | 30.166667 | 87 | 0.597638 |
4a247b523210677eb71da8f3bcd80a48ce021989 | 1,887 | bzl | Python | test/standard_cxx_flags_test/tests.bzl | dirac/rules_foreign_cc | 0423ac9810f0f992da6b47f3c6b6b9d925ffc6ca | [
"Apache-2.0"
] | null | null | null | test/standard_cxx_flags_test/tests.bzl | dirac/rules_foreign_cc | 0423ac9810f0f992da6b47f3c6b6b9d925ffc6ca | [
"Apache-2.0"
] | null | null | null | test/standard_cxx_flags_test/tests.bzl | dirac/rules_foreign_cc | 0423ac9810f0f992da6b47f3c6b6b9d925ffc6ca | [
"Apache-2.0"
] | 1 | 2019-12-18T07:27:00.000Z | 2019-12-18T07:27:00.000Z | """ TODO """
load("@rules_foreign_cc//tools/build_defs:cc_toolchain_util.bzl", "CxxFlagsInfo", "get_flags_info")
def _impl(ctx):
flags = get_flags_info(ctx)
assert_contains_once(flags.assemble, "-fblah0")
assert_contains_once(flags.assemble, "-fblah2")
assert_contains_once(flags.cc, "-fblah0")
a... | 29.952381 | 101 | 0.63275 |
4a247cc9752e2066a943b74fa3ae68dbb2c185bb | 121 | py | Python | refitt/core/__init__.py | refitt/ref | 3ccc398e7b95f77549ab77884b87f40abdd3effb | [
"Apache-2.0"
] | 4 | 2020-09-11T01:15:11.000Z | 2021-05-12T16:46:48.000Z | refitt/core/__init__.py | refitt/ref | 3ccc398e7b95f77549ab77884b87f40abdd3effb | [
"Apache-2.0"
] | 12 | 2021-03-20T03:24:53.000Z | 2022-02-19T03:20:43.000Z | refitt/core/__init__.py | refitt/ref | 3ccc398e7b95f77549ab77884b87f40abdd3effb | [
"Apache-2.0"
] | 2 | 2021-02-01T23:49:39.000Z | 2021-12-11T19:01:23.000Z | # SPDX-FileCopyrightText: 2019-2021 REFITT Team
# SPDX-License-Identifier: Apache-2.0
"""Core systems within REFITT."""
| 24.2 | 47 | 0.752066 |
4a247cdd4c252f2cd21cac01147082fabdab175d | 464 | py | Python | add-audio-to-video.py | suomiy/timelapse-to-video | 3bd369553afa1d323c3a974bd6554217bcb4d8d4 | [
"MIT"
] | null | null | null | add-audio-to-video.py | suomiy/timelapse-to-video | 3bd369553afa1d323c3a974bd6554217bcb4d8d4 | [
"MIT"
] | null | null | null | add-audio-to-video.py | suomiy/timelapse-to-video | 3bd369553afa1d323c3a974bd6554217bcb4d8d4 | [
"MIT"
] | 1 | 2021-05-04T00:06:23.000Z | 2021-05-04T00:06:23.000Z | #!/usr/bin/env python3
from argparse import ArgumentTypeError
from util.utils import eprint
from arg_parses.audio_parser import ArgParser
from operation.audio import add_audio
def run(settings):
add_audio(settings)
if __name__ == "__main__":
settings = None
try:
settings = ArgParser.require_arg... | 20.173913 | 45 | 0.6875 |
4a247d3bc1d8ea55e73bd304fe982dd31c408d4e | 7,201 | py | Python | opencood/models/voxel_net.py | CARLAlover/OpenCOOD | dd42cc7a31bc261ea2461b3068ed6111f13ff437 | [
"Apache-2.0"
] | null | null | null | opencood/models/voxel_net.py | CARLAlover/OpenCOOD | dd42cc7a31bc261ea2461b3068ed6111f13ff437 | [
"Apache-2.0"
] | null | null | null | opencood/models/voxel_net.py | CARLAlover/OpenCOOD | dd42cc7a31bc261ea2461b3068ed6111f13ff437 | [
"Apache-2.0"
] | null | null | null | import torch.nn as nn
import torch.nn.functional as F
import torch
from torch.autograd import Variable
from opencood.models.sub_modules.pillar_vfe import PillarVFE
from opencood.utils.common_utils import torch_tensor_to_numpy
# conv2d + bn + relu
class Conv2d(nn.Module):
def __init__(self, in_channels, out_chan... | 31.308696 | 76 | 0.558811 |
4a247d82e37d04e9bb548c13084e08c6db20f710 | 6,182 | py | Python | pyds8k/utils.py | 27149chen/pyds8k | e6e52af236330e4da4b08d749d835b7809ae2308 | [
"Apache-2.0"
] | 7 | 2020-04-16T11:20:02.000Z | 2021-04-21T13:39:14.000Z | pyds8k/utils.py | 27149chen/pyds8k | e6e52af236330e4da4b08d749d835b7809ae2308 | [
"Apache-2.0"
] | 1 | 2020-07-15T02:56:56.000Z | 2020-08-03T17:16:53.000Z | pyds8k/utils.py | 27149chen/pyds8k | e6e52af236330e4da4b08d749d835b7809ae2308 | [
"Apache-2.0"
] | 6 | 2020-01-03T05:54:26.000Z | 2022-03-31T09:42:27.000Z | ##############################################################################
# Copyright 2019 IBM Corp.
#
# 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/LI... | 27.353982 | 78 | 0.628276 |
4a24811b1ecd59a058668e18100b5c3fa3276460 | 69 | py | Python | src/gh_template_py/_constants.py | nuuuwan/gh_template_py | 5a3c4296eb41f7b68dc6bf6922167509b8e8f8ee | [
"MIT"
] | null | null | null | src/gh_template_py/_constants.py | nuuuwan/gh_template_py | 5a3c4296eb41f7b68dc6bf6922167509b8e8f8ee | [
"MIT"
] | null | null | null | src/gh_template_py/_constants.py | nuuuwan/gh_template_py | 5a3c4296eb41f7b68dc6bf6922167509b8e8f8ee | [
"MIT"
] | null | null | null | """Constants."""
CACHE_NAME = 'gh_template_py'
CACHE_TIMEOUT = 3600
| 13.8 | 29 | 0.724638 |
4a248197b49409f5cf40f1a84af7a9436f7fee76 | 705 | py | Python | softwarecollections/pages/views.py | pmkovar/softwarecollections | 11d7056ce8fd9b07c2a916c42f6eef7925249e38 | [
"BSD-3-Clause"
] | null | null | null | softwarecollections/pages/views.py | pmkovar/softwarecollections | 11d7056ce8fd9b07c2a916c42f6eef7925249e38 | [
"BSD-3-Clause"
] | null | null | null | softwarecollections/pages/views.py | pmkovar/softwarecollections | 11d7056ce8fd9b07c2a916c42f6eef7925249e38 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.http.response import Http404
from django.shortcuts import render
from django.template.base import TemplateDoesNotExist
def page(request, path, template_dir=None):
if template_dir:
parts = [template_dir, request.LANGUAGE_CODE]
else:
parts = [request.L... | 30.652174 | 93 | 0.652482 |
4a2481d3e6315b3e3e624b26cf16d3379b053fe7 | 1,104 | py | Python | test/test_resources.py | berkayyibis/Corridor-Detection | c08179518cce1fa9c31b1b324b95ce29a71e7b4f | [
"Apache-2.0"
] | 2 | 2021-01-07T06:50:18.000Z | 2021-01-07T07:51:10.000Z | test/test_resources.py | berkayyibis/Corridor-Detection | c08179518cce1fa9c31b1b324b95ce29a71e7b4f | [
"Apache-2.0"
] | 4 | 2020-12-10T20:31:54.000Z | 2022-03-18T15:07:19.000Z | test/test_resources.py | meteergen/Corridor-Detection | cf446a38c0d71dd85e93842606115567a4216b2f | [
"Apache-2.0"
] | 1 | 2021-01-08T06:46:44.000Z | 2021-01-08T06:46:44.000Z | # coding=utf-8
"""Resources test.
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
__author__ = '... | 24.533333 | 94 | 0.679348 |
4a2481e29e4dcf82a17d9e5e29764897d6c9746b | 1,023 | py | Python | cogs/help.py | CopyandPaste-png/stewie-discord-bot | f4cd4e6c0ce5ab3da2f59b2f94c2fc491eb68032 | [
"MIT"
] | null | null | null | cogs/help.py | CopyandPaste-png/stewie-discord-bot | f4cd4e6c0ce5ab3da2f59b2f94c2fc491eb68032 | [
"MIT"
] | null | null | null | cogs/help.py | CopyandPaste-png/stewie-discord-bot | f4cd4e6c0ce5ab3da2f59b2f94c2fc491eb68032 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
class HelpCommand(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.group(invoke_without_command=True)
async def help(self, ctx:commands.Context):
"""A custom help command
Parameters
_________
None
... | 31 | 96 | 0.645161 |
4a24820596eb641ed4a726e6ffe71bfaa1910460 | 1,249 | py | Python | autobahn/wamp/gen/wamp/proto/Abort.py | rapyuta-robotics/autobahn-python | c08e9e352d526a7fd0885bb94706366a432ada1a | [
"MIT"
] | 1,670 | 2015-10-12T15:46:22.000Z | 2022-03-30T22:12:53.000Z | autobahn/wamp/gen/wamp/proto/Abort.py | rapyuta-robotics/autobahn-python | c08e9e352d526a7fd0885bb94706366a432ada1a | [
"MIT"
] | 852 | 2015-10-16T22:11:03.000Z | 2022-03-27T07:57:01.000Z | autobahn/wamp/gen/wamp/proto/Abort.py | rapyuta-robotics/autobahn-python | c08e9e352d526a7fd0885bb94706366a432ada1a | [
"MIT"
] | 790 | 2015-10-15T08:46:12.000Z | 2022-03-30T12:22:13.000Z | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: proto
import flatbuffers
class Abort(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsAbort(cls, buf, offset):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Abort()
... | 32.025641 | 137 | 0.684548 |
4a2482134c900939eb6275f9a28c1305ed6d6428 | 13,343 | py | Python | dsub/commands/dstat.py | wnojopra/dsub | 8278b37848123be759f1c9f66788ad32457fead5 | [
"Apache-2.0"
] | 146 | 2018-05-22T17:31:31.000Z | 2022-03-31T18:24:55.000Z | dsub/commands/dstat.py | wnojopra/dsub | 8278b37848123be759f1c9f66788ad32457fead5 | [
"Apache-2.0"
] | 117 | 2018-06-04T22:38:05.000Z | 2022-02-23T17:49:19.000Z | dsub/commands/dstat.py | wnojopra/dsub | 8278b37848123be759f1c9f66788ad32457fead5 | [
"Apache-2.0"
] | 27 | 2018-06-06T16:21:52.000Z | 2022-01-03T18:29:17.000Z | # Lint as: python3
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 36.062162 | 80 | 0.657348 |
4a24836fc4537e4edfa4c0415c1ea79ce7aed75f | 4,738 | py | Python | DozukiPDFBackup.py | VIPQualityPost/DozukiPDFBackup | b7b5d69e5906ad17ca20d4902c810d59f369f39f | [
"Apache-2.0"
] | null | null | null | DozukiPDFBackup.py | VIPQualityPost/DozukiPDFBackup | b7b5d69e5906ad17ca20d4902c810d59f369f39f | [
"Apache-2.0"
] | null | null | null | DozukiPDFBackup.py | VIPQualityPost/DozukiPDFBackup | b7b5d69e5906ad17ca20d4902c810d59f369f39f | [
"Apache-2.0"
] | null | null | null | # Program for crawling Dozuki sites and exporting guides in PDF
# format while retaining online file-structure.
# Released 03/22/2020 Matei Jordache
#
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
import time, bs4, requests, os
#
windows = True
browser = webdriver.Firefox() #cho... | 46.910891 | 124 | 0.686154 |
4a2484c7abd4e247734f871030260a70fe89e43a | 3,239 | py | Python | profiles_project/settings.py | irot94/profiles-rest-api | 907bd4ffdb63e3d03899cbbfd69bd0373a331232 | [
"MIT"
] | null | null | null | profiles_project/settings.py | irot94/profiles-rest-api | 907bd4ffdb63e3d03899cbbfd69bd0373a331232 | [
"MIT"
] | null | null | null | profiles_project/settings.py | irot94/profiles-rest-api | 907bd4ffdb63e3d03899cbbfd69bd0373a331232 | [
"MIT"
] | null | null | null | """
Django settings for profiles_project project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
fro... | 25.706349 | 91 | 0.698364 |
4a248506c844140e02d31cf566212f387ba99f0f | 14,150 | py | Python | watcher/decision_engine/model/notification/cinder.py | ajaytikoo/watcher | 6dbac1f6ae7f3e10dfdcef5721fa4af7af54e159 | [
"Apache-2.0"
] | 64 | 2015-10-18T02:57:24.000Z | 2022-01-13T11:27:51.000Z | watcher/decision_engine/model/notification/cinder.py | ajaytikoo/watcher | 6dbac1f6ae7f3e10dfdcef5721fa4af7af54e159 | [
"Apache-2.0"
] | null | null | null | watcher/decision_engine/model/notification/cinder.py | ajaytikoo/watcher | 6dbac1f6ae7f3e10dfdcef5721fa4af7af54e159 | [
"Apache-2.0"
] | 35 | 2015-12-25T13:53:21.000Z | 2021-07-19T15:50:16.000Z | # -*- encoding: utf-8 -*-
# Copyright 2017 NEC Corporation
#
# 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... | 36.658031 | 75 | 0.609046 |
4a2486651c7eff97536490e216b258fef893cb6c | 804 | py | Python | 684.py | OmangRawat/Leetcode | 6fa696367ef9c5e6b08940b11e2202382d1afc07 | [
"MIT"
] | null | null | null | 684.py | OmangRawat/Leetcode | 6fa696367ef9c5e6b08940b11e2202382d1afc07 | [
"MIT"
] | null | null | null | 684.py | OmangRawat/Leetcode | 6fa696367ef9c5e6b08940b11e2202382d1afc07 | [
"MIT"
] | null | null | null | """
---> Redundant Connection
---> Medium
"""
class Solution:
def findRedundantConnection(self, edges):
n = len(edges)
root = {i: i for i in range(1, n + 1)}
def find_parent(comp):
if root[comp] == comp:
return comp
return find_parent(root[comp])
... | 20.615385 | 121 | 0.539801 |
4a248767097ef0b771cce3446dca098525a9ddc2 | 222 | py | Python | tests/samples/all_columns.py | spamegg1/snoop | 2d169d003de4382717f45592f5799983c26a8573 | [
"MIT"
] | 751 | 2019-07-03T13:40:38.000Z | 2022-03-30T02:28:00.000Z | tests/samples/all_columns.py | spamegg1/snoop | 2d169d003de4382717f45592f5799983c26a8573 | [
"MIT"
] | 42 | 2019-07-04T19:30:36.000Z | 2022-03-26T09:19:19.000Z | tests/samples/all_columns.py | spamegg1/snoop | 2d169d003de4382717f45592f5799983c26a8573 | [
"MIT"
] | 30 | 2019-07-14T15:55:27.000Z | 2022-03-19T16:38:12.000Z | from snoop.configuration import Config
snoop = Config(columns='time thread thread_ident file full_file function function_qualname').snoop
def main():
@snoop
def foo():
x = 1
y = x + 2
foo()
| 17.076923 | 98 | 0.644144 |
4a2487f5c8ccbd4c1980363ee7fceef12212d5af | 1,424 | py | Python | DailyProgrammer/DP20120730C.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | 2 | 2020-12-23T18:59:22.000Z | 2021-04-14T13:16:09.000Z | DailyProgrammer/DP20120730C.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | DailyProgrammer/DP20120730C.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | """
[7/30/2012] Challenge #83 [difficult] (Digits of the square-root of 2)
https://www.reddit.com/r/dailyprogrammer/comments/xdx8q/7302012_challenge_83_difficult_digits_of_the/
The square-root of 2 is, as [Hippasus of Metapontum](http://en.wikipedia.org/wiki/Hippasus) discovered to his sorrow,
irrational. Among other... | 52.740741 | 119 | 0.76264 |
4a2488d77a539a546584ec4625ff8e1d264a0d3c | 16,726 | py | Python | tools/reflection_generator/java_class.py | jondong/crosswalk | 2c25a329fe43480a3db2cfc4309279eda107d072 | [
"BSD-3-Clause"
] | null | null | null | tools/reflection_generator/java_class.py | jondong/crosswalk | 2c25a329fe43480a3db2cfc4309279eda107d072 | [
"BSD-3-Clause"
] | null | null | null | tools/reflection_generator/java_class.py | jondong/crosswalk | 2c25a329fe43480a3db2cfc4309279eda107d072 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2014 Intel Corporation. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import re
from string import Template
from java_class_component import Enum, Field
from java_method import Method
class ... | 35.587234 | 79 | 0.650424 |
4a2488da0c80bab005311df8ceb611fff9c76323 | 27,742 | py | Python | sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py | conniey/azure-sdk-for-python | f779de8e53dbec033f98f976284e6d9491fd60b3 | [
"MIT"
] | 2 | 2019-05-17T21:24:53.000Z | 2020-02-12T11:13:42.000Z | sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py | conniey/azure-sdk-for-python | f779de8e53dbec033f98f976284e6d9491fd60b3 | [
"MIT"
] | null | null | null | sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py | conniey/azure-sdk-for-python | f779de8e53dbec033f98f976284e6d9491fd60b3 | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.000Z | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import os
import pytest
import platform
import functools
from azure.core.exceptions import HttpResponseError, ClientAuthenticationError
from azure.core.c... | 43.41471 | 131 | 0.658676 |
4a24893fa9b700fcb076009b33e43592383c6ca8 | 76,132 | py | Python | edk2/IntelFsp2Pkg/Tools/GenCfgOpt.py | TheMindVirus/pftf-rpi4 | 6070b65a02e5ab3ad774d52620c1d136f17c5df3 | [
"BSD-2-Clause-Patent",
"MIT"
] | 1 | 2021-12-03T05:07:39.000Z | 2021-12-03T05:07:39.000Z | edk2/IntelFsp2Pkg/Tools/GenCfgOpt.py | TheMindVirus/pftf-rpi4 | 6070b65a02e5ab3ad774d52620c1d136f17c5df3 | [
"BSD-2-Clause-Patent",
"MIT"
] | null | null | null | edk2/IntelFsp2Pkg/Tools/GenCfgOpt.py | TheMindVirus/pftf-rpi4 | 6070b65a02e5ab3ad774d52620c1d136f17c5df3 | [
"BSD-2-Clause-Patent",
"MIT"
] | null | null | null | ## @ GenCfgOpt.py
#
# Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
import os
import re
import sys
import struct
from datetime import date
from functools import reduce
# Generated file copyright header
__copyright_txt__ = """## @file
#
# ... | 42.508096 | 170 | 0.461554 |
4a2489d999f6ea020a985ad463465b0c710e5946 | 10,201 | py | Python | tensorflow/contrib/learn/python/learn/estimators/rnn.py | larry-fuy/tensorflow_xeonphi | 787ab22d490e79ea8c06511d60d6cddf1b2dd2c2 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/learn/python/learn/estimators/rnn.py | larry-fuy/tensorflow_xeonphi | 787ab22d490e79ea8c06511d60d6cddf1b2dd2c2 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/learn/python/learn/estimators/rnn.py | larry-fuy/tensorflow_xeonphi | 787ab22d490e79ea8c06511d60d6cddf1b2dd2c2 | [
"Apache-2.0"
] | 1 | 2019-03-21T15:49:35.000Z | 2019-03-21T15:49:35.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.967871 | 85 | 0.657975 |
4a248a156c2674c64730d1a0b3db72fc0918097c | 6,867 | py | Python | ui/visualizations/VolumeVisualizationSimple.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 25 | 2015-11-08T16:36:54.000Z | 2022-01-20T16:03:28.000Z | ui/visualizations/VolumeVisualizationSimple.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 2 | 2016-12-01T23:13:08.000Z | 2017-07-25T02:40:49.000Z | ui/visualizations/VolumeVisualizationSimple.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 10 | 2016-07-05T14:39:16.000Z | 2022-01-01T02:05:55.000Z | """
VolumeVisualizationSimple
:Authors:
Berend Klein Haneveld
"""
from VolumeVisualization import VolumeVisualization
from VolumeVisualization import VisualizationTypeSimple
from vtk import vtkVolumeProperty
from vtk import vtkColorTransferFunction
from vtk import vtkPiecewiseFunction
from ui.widgets.SliderFloatWidge... | 34.164179 | 88 | 0.778797 |
4a248b9fe7f379c3dbede93bddf1909ef2f1d975 | 12,806 | py | Python | mypy/options.py | deeper-x/mypy | 0f76dfcb9720472f0d8145bff81c01314e1bef84 | [
"PSF-2.0"
] | null | null | null | mypy/options.py | deeper-x/mypy | 0f76dfcb9720472f0d8145bff81c01314e1bef84 | [
"PSF-2.0"
] | null | null | null | mypy/options.py | deeper-x/mypy | 0f76dfcb9720472f0d8145bff81c01314e1bef84 | [
"PSF-2.0"
] | 1 | 2020-02-27T15:22:03.000Z | 2020-02-27T15:22:03.000Z | from collections import OrderedDict
import re
import pprint
import sys
from typing import Dict, List, Mapping, Optional, Pattern, Set, Tuple
from mypy import defaults
class BuildType:
STANDARD = 0
MODULE = 1
PROGRAM_TEXT = 2
class Options:
"""Options collected from flags."""
PER_MODULE_OPTION... | 39.524691 | 95 | 0.634702 |
4a248c335fbd73344a65a5f9796954445480bbad | 8,396 | py | Python | tests/test_views.py | crazytruth/insanic | f9b61611317d873fe7688a5fd13eecb9a496ead5 | [
"MIT"
] | 4 | 2020-10-13T04:34:21.000Z | 2022-02-18T05:34:03.000Z | tests/test_views.py | crazytruth/insanic | f9b61611317d873fe7688a5fd13eecb9a496ead5 | [
"MIT"
] | 1 | 2020-09-29T06:59:36.000Z | 2020-09-29T06:59:36.000Z | tests/test_views.py | crazytruth/insanic | f9b61611317d873fe7688a5fd13eecb9a496ead5 | [
"MIT"
] | null | null | null | import pytest
from sanic.exceptions import _sanic_exceptions
from sanic.response import json
from insanic import Insanic, authentication, permissions, status
from insanic.choices import UserLevels
from insanic.errors import GlobalErrorCodes
from insanic.views import InsanicView
def test_view_allowed_methods():
c... | 28.65529 | 77 | 0.669485 |
4a248c8a8202bcfd03548f9e35a0e9b056e27d97 | 3,704 | py | Python | Keithley/Keithley6221_Control.py | bklebel/Cryostat-GUI | 2fd523b8358777d00a4ca6db655582e87796bc64 | [
"MIT"
] | null | null | null | Keithley/Keithley6221_Control.py | bklebel/Cryostat-GUI | 2fd523b8358777d00a4ca6db655582e87796bc64 | [
"MIT"
] | 1 | 2018-10-02T21:32:55.000Z | 2018-10-02T21:32:55.000Z | Keithley/Keithley6221_Control.py | bklebel/Cryostat-GUI | 2fd523b8358777d00a4ca6db655582e87796bc64 | [
"MIT"
] | 3 | 2018-08-27T12:50:48.000Z | 2018-09-28T09:08:42.000Z | # from PyQt5 import QtWidgets, QtGui
from PyQt5.QtCore import pyqtSignal, pyqtSlot
# from PyQt5.uic import loadUi
from Keithley.Keithley6221 import Keithley6221
from pyvisa.errors import VisaIOError
from copy import deepcopy
# from util import AbstractThread
from util import AbstractEventhandlingThread
from util im... | 31.65812 | 97 | 0.679806 |
4a248ee6b4f9becb760070ef1a8681cff766deb9 | 2,734 | py | Python | market-prices/market-prices.py | barrucadu/hledger-scripts | b9803e127e63da6a921015aca97d99050341a9b1 | [
"MIT"
] | 52 | 2018-06-05T16:14:50.000Z | 2022-03-25T16:00:49.000Z | market-prices/market-prices.py | barrucadu/hledger-scripts | b9803e127e63da6a921015aca97d99050341a9b1 | [
"MIT"
] | 4 | 2019-06-28T09:35:57.000Z | 2021-06-11T15:51:16.000Z | market-prices/market-prices.py | barrucadu/hledger-scripts | b9803e127e63da6a921015aca97d99050341a9b1 | [
"MIT"
] | 7 | 2019-09-07T23:31:02.000Z | 2021-08-08T18:58:15.000Z | #!/usr/bin/env python3
from html.parser import HTMLParser
import json
import sys
import time
import urllib.request
def get_coinbase(base, currency):
req = urllib.request.Request(
"https://api.coinbase.com/v2/prices/{}-{}/spot/".format(base, currency),
headers={"CB-VERSION": "2018-05-25"})
wit... | 30.719101 | 97 | 0.576079 |
4a2492248a0f84e1ed4c3375a8ba01f73e800853 | 579 | py | Python | sims-g2/recover-dg/a12/conv-rate.py | ammarhakim/ammar-simjournal | 85b64ddc9556f01a4fab37977864a7d878eac637 | [
"MIT",
"Unlicense"
] | 1 | 2019-12-19T16:21:13.000Z | 2019-12-19T16:21:13.000Z | sims-g2/recover-dg/a12/conv-rate.py | ammarhakim/ammar-simjournal | 85b64ddc9556f01a4fab37977864a7d878eac637 | [
"MIT",
"Unlicense"
] | null | null | null | sims-g2/recover-dg/a12/conv-rate.py | ammarhakim/ammar-simjournal | 85b64ddc9556f01a4fab37977864a7d878eac637 | [
"MIT",
"Unlicense"
] | 2 | 2020-01-08T06:23:33.000Z | 2020-01-08T07:06:50.000Z | from pylab import *
import math
style.use('../code/postgkyl.mplstyle')
dat = loadtxt("error-dx.txt")
N = dat[:,0]*1.0
err = dat[:,1]
err1 = err- err[-1] # this gets rid of dt errors assuming dx is very small
for i in range(1,N.shape[0]-1):
dxOrder = math.log(err1[i-1]/err1[i])/log(N[i]/N[i-1])
print("%g %g" ... | 23.16 | 74 | 0.644214 |
4a249402f086eb3815c54b54411804cae6d49689 | 6,003 | py | Python | openstack_dashboard/test/integration_tests/tests/test_flavors.py | Mirantis/mos-horizon | d2444220d959c8b921436bd75459c2face0e71d2 | [
"Apache-2.0"
] | 9 | 2016-06-03T03:53:24.000Z | 2017-05-20T16:53:23.000Z | openstack_dashboard/test/integration_tests/tests/test_flavors.py | Mirantis/mos-horizon | d2444220d959c8b921436bd75459c2face0e71d2 | [
"Apache-2.0"
] | 1 | 2016-09-08T10:57:46.000Z | 2016-09-08T10:59:06.000Z | openstack_dashboard/test/integration_tests/tests/test_flavors.py | Mirantis/mos-horizon | d2444220d959c8b921436bd75459c2face0e71d2 | [
"Apache-2.0"
] | 4 | 2016-08-01T10:50:15.000Z | 2017-02-22T12:11:19.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 44.139706 | 79 | 0.685157 |
4a24944d9c4d6221eed5b0efb9b18e315a7f06fa | 3,093 | py | Python | compareOldvNewTypeII.py | admar505/python-tools | 743c0e41e6700efa3817fdb09c451f8fffccd1b3 | [
"Apache-2.0"
] | null | null | null | compareOldvNewTypeII.py | admar505/python-tools | 743c0e41e6700efa3817fdb09c451f8fffccd1b3 | [
"Apache-2.0"
] | null | null | null | compareOldvNewTypeII.py | admar505/python-tools | 743c0e41e6700efa3817fdb09c451f8fffccd1b3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys,os,re,fileinput,argparse
import csv
parser = argparse.ArgumentParser(description="for TypeII RESULTS files, compare new with old. thanks")
parser.add_argument("--old",help="previous call file, bgzipped and tabixed as -p vcf",required=True)
parser.add_argument("--new",help="fresh call f... | 22.413043 | 102 | 0.539606 |
4a249450015a0b7cf4cfb027dd692805268c6e5b | 4,129 | py | Python | eventmanagement/events/migrations/0001_initial.py | AvanishCodes/manage-it | 9f70337a74be9713fea9dbb64e4d55ae0972956b | [
"MIT"
] | 1 | 2020-11-22T08:48:50.000Z | 2020-11-22T08:48:50.000Z | eventmanagement/events/migrations/0001_initial.py | AvanishCodes/manage-it | 9f70337a74be9713fea9dbb64e4d55ae0972956b | [
"MIT"
] | null | null | null | eventmanagement/events/migrations/0001_initial.py | AvanishCodes/manage-it | 9f70337a74be9713fea9dbb64e4d55ae0972956b | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-11-19 08:40
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Organization',
fields=[
... | 51.6125 | 147 | 0.584645 |
4a2494cb80e6f714e0a67bfa8ba0327142b3406c | 400 | py | Python | tests/create_exchanges.py | jthiltges/gracc-archive | 8c4dca1b1e563983852333d18570dee2a241b48a | [
"Apache-2.0"
] | null | null | null | tests/create_exchanges.py | jthiltges/gracc-archive | 8c4dca1b1e563983852333d18570dee2a241b48a | [
"Apache-2.0"
] | 5 | 2017-04-06T18:06:56.000Z | 2017-12-19T21:04:29.000Z | tests/create_exchanges.py | jthiltges/gracc-archive | 8c4dca1b1e563983852333d18570dee2a241b48a | [
"Apache-2.0"
] | 3 | 2017-03-21T18:37:10.000Z | 2019-12-02T19:07:22.000Z | import pika
credentials = pika.PlainCredentials("guest", "guest")
parameters = pika.ConnectionParameters("localhost",
5672, "/", credentials)
conn = pika.adapters.blocking_connection.BlockingConnection(parameters)
channel = conn.channel()
channel.exchange_declare(excha... | 30.769231 | 107 | 0.695 |
4a2495a218846d9f1f1a72f7686510909c00a853 | 7,747 | py | Python | cumulusci/core/tests/test_tasks.py | 1handclapping/CumulusCI | cb7b061d049c5f05503a4ef23ac198342496a949 | [
"BSD-3-Clause"
] | null | null | null | cumulusci/core/tests/test_tasks.py | 1handclapping/CumulusCI | cb7b061d049c5f05503a4ef23ac198342496a949 | [
"BSD-3-Clause"
] | null | null | null | cumulusci/core/tests/test_tasks.py | 1handclapping/CumulusCI | cb7b061d049c5f05503a4ef23ac198342496a949 | [
"BSD-3-Clause"
] | null | null | null | """ Tests for the CumulusCI task module """
import unittest
import logging
import collections
import mock
from cumulusci.core.tasks import BaseTask
from cumulusci.core.flows import BaseFlow
from cumulusci.core.config import BaseGlobalConfig
from cumulusci.core.config import BaseProjectConfig
from cumulusci.core.confi... | 35.374429 | 88 | 0.662966 |
4a2495f19d9a49b418cc8243070b7dfda11aca9c | 593 | py | Python | paxos/2pc/examples/bootstrap.py | Sean10/Algorithm_code | 46ff1cb5b81400cbcc324dabdf4298bf7a55e5eb | [
"BSD-3-Clause"
] | null | null | null | paxos/2pc/examples/bootstrap.py | Sean10/Algorithm_code | 46ff1cb5b81400cbcc324dabdf4298bf7a55e5eb | [
"BSD-3-Clause"
] | 7 | 2021-03-19T04:41:21.000Z | 2021-10-19T15:46:36.000Z | paxos/paxos/examples/bootstrap.py | Sean10/Algorithm_code | 46ff1cb5b81400cbcc324dabdf4298bf7a55e5eb | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2021/1/24 1:59 AM
# @Author : sean10
# @Site :
# @File : bootstrap.py
# @Software: PyCharm
"""
"""
import subprocess
import yaml
import signal
def main():
with open("nodes.yaml", "r") as f:
nodes = yaml.load(f, yaml.SafeLoader)
for ... | 21.962963 | 136 | 0.596965 |
4a2497a62346334654c7b89205b1983c08eee44d | 41,161 | py | Python | conda_build/render.py | DerThorsten/conda-build | 729c0cea03677dae0e2e15b7ec6d98619b5d4401 | [
"BSD-3-Clause"
] | null | null | null | conda_build/render.py | DerThorsten/conda-build | 729c0cea03677dae0e2e15b7ec6d98619b5d4401 | [
"BSD-3-Clause"
] | null | null | null | conda_build/render.py | DerThorsten/conda-build | 729c0cea03677dae0e2e15b7ec6d98619b5d4401 | [
"BSD-3-Clause"
] | null | null | null | # (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from collections import OrderedDict, defaultdict
from locale import getpreferredencoding
import json
i... | 44.5948 | 116 | 0.616287 |
4a2497a68950887344ae1b3b96494b533bb0b85a | 1,107 | py | Python | script/export.py | rwhogg/what-the-hex | d4753aed76dfc792f46a5f4438318d19bf135581 | [
"Apache-2.0"
] | 2 | 2021-01-02T16:31:39.000Z | 2021-01-22T14:42:53.000Z | script/export.py | rwhogg/what-the-hex | d4753aed76dfc792f46a5f4438318d19bf135581 | [
"Apache-2.0"
] | 16 | 2021-01-30T17:50:21.000Z | 2021-05-26T14:45:34.000Z | script/export.py | rwhogg/what-the-hex | d4753aed76dfc792f46a5f4438318d19bf135581 | [
"Apache-2.0"
] | null | null | null | # Run like this: python3 script/export.py [platforms...]
import os.path
import re
import sys
if sys.version_info < (3, 6):
print("Run with Python 3 please")
sys.exit(1)
from configparser import ConfigParser
from os import chdir, getenv, mkdir
from subprocess import Popen
chdir("project")
if len(sys.argv) >... | 28.384615 | 99 | 0.67299 |
4a2498206e673ae98df1677ea94aad18de2ce330 | 9,770 | py | Python | Deprecated/PythonClient/client_example.py | ruichen-v/carla | 387c448556c79d838ae0c2cb8a6caad3a78c3eba | [
"MIT"
] | 9 | 2019-05-20T05:17:25.000Z | 2021-10-31T08:31:32.000Z | Deprecated/PythonClient/client_example.py | ruichen-v/carla | 387c448556c79d838ae0c2cb8a6caad3a78c3eba | [
"MIT"
] | null | null | null | Deprecated/PythonClient/client_example.py | ruichen-v/carla | 387c448556c79d838ae0c2cb8a6caad3a78c3eba | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""Basic CARLA client example."""
from __future__ import print_function
im... | 38.616601 | 107 | 0.590993 |
4a2498fe7b1c53c1bc2be4f370e357a627d61516 | 3,943 | py | Python | examples/inheritance2.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | examples/inheritance2.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | examples/inheritance2.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | ##############################################################################
#
# Example of how to subclass the Workbook and Worksheet objects. See also the
# simpler inheritance1.py example.
#
# In this example we see an approach to implementing a simulated autofit in a
# user application. This works by overriding t... | 32.319672 | 78 | 0.66878 |
4a249c20481461864bb28969a121e6eed3e6cc58 | 1,524 | py | Python | pyxl/element.py | adamserafini/pyxl | 8278d222317e1ef2796899506ba37e357dff7c3c | [
"Apache-2.0"
] | 366 | 2015-01-02T06:20:07.000Z | 2022-01-10T01:57:10.000Z | pyxl/element.py | adamserafini/pyxl | 8278d222317e1ef2796899506ba37e357dff7c3c | [
"Apache-2.0"
] | 2 | 2016-07-08T09:28:44.000Z | 2017-10-05T04:47:12.000Z | pyxl/element.py | adamserafini/pyxl | 8278d222317e1ef2796899506ba37e357dff7c3c | [
"Apache-2.0"
] | 27 | 2015-01-10T00:32:05.000Z | 2021-06-05T05:38:23.000Z | #!/usr/bin/env python
from pyxl.base import x_base
class x_element(x_base):
_element = None # render() output cached by _rendered_element()
def _get_base_element(self):
# Adding classes costs ~10%
out = self._rendered_element()
# Note: get_class() may return multiple space-separated... | 27.709091 | 78 | 0.584646 |
4a249c8fd27d73bd3bac05ffa7be80d08d6b9cbe | 20,060 | py | Python | src/_pytest/pathlib.py | theanalyst2020/pytest | d9c4ecaf62573e36d3d835b7830e41095c101f50 | [
"MIT"
] | 1 | 2020-09-19T06:23:11.000Z | 2020-09-19T06:23:11.000Z | src/_pytest/pathlib.py | doerwalter/pytest | d426a79a90351dff0492fbd40404b1256b24f91f | [
"MIT"
] | null | null | null | src/_pytest/pathlib.py | doerwalter/pytest | d426a79a90351dff0492fbd40404b1256b24f91f | [
"MIT"
] | null | null | null | import atexit
import contextlib
import fnmatch
import importlib.util
import itertools
import os
import shutil
import sys
import uuid
import warnings
from enum import Enum
from functools import partial
from os.path import expanduser
from os.path import expandvars
from os.path import isabs
from os.path import sep
from po... | 32.724307 | 102 | 0.648554 |
4a249d6ea0ceeba1d2ef8344bdf4a5a1c0dff040 | 4,039 | py | Python | venv/Lib/site-packages/dataframe/pipeable_functions.py | kavanAdeshara/Expense_Tracker | b3e4810e858a7786e05cda6b91ba674b73b87981 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/dataframe/pipeable_functions.py | kavanAdeshara/Expense_Tracker | b3e4810e858a7786e05cda6b91ba674b73b87981 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/dataframe/pipeable_functions.py | kavanAdeshara/Expense_Tracker | b3e4810e858a7786e05cda6b91ba674b73b87981 | [
"Apache-2.0"
] | null | null | null | # dataframe: a data-frame implementation using method piping
#
# Copyright (C) 2016 Simon Dirmeier
#
# This file is part of dataframe.
#
# dataframe is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either versi... | 27.107383 | 72 | 0.673929 |
4a249dc6272c1389fe41b83cec0f9974b1b59a50 | 7,257 | py | Python | mindsdb/libs/data_types/light_metadata.py | Glitchfix/mindsdb | e6c33d7085898c223030334962596ae8afa3fbd5 | [
"MIT"
] | null | null | null | mindsdb/libs/data_types/light_metadata.py | Glitchfix/mindsdb | e6c33d7085898c223030334962596ae8afa3fbd5 | [
"MIT"
] | null | null | null | mindsdb/libs/data_types/light_metadata.py | Glitchfix/mindsdb | e6c33d7085898c223030334962596ae8afa3fbd5 | [
"MIT"
] | null | null | null | # UNDER CONSTRUCTION !
light_metadata = {
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"data_preparation": {
"type": "object",
"properties": {
"accepted_margin_of_error": {
"type": "number"
},
"total_row_count": {
"type": "nu... | 22.398148 | 96 | 0.309219 |
4a249e054a53c4f4fba189ea57fd8cd100495bbe | 6,463 | py | Python | src/daain/backbones/esp_dropout_net/trainer/data.py | merantix/mxlabs-daain | 0e87df5dd6e678939374dfadf44fc360d34425bb | [
"Apache-2.0"
] | 14 | 2021-06-01T08:34:09.000Z | 2022-02-01T15:45:27.000Z | src/daain/backbones/esp_dropout_net/trainer/data.py | merantix/mxlabs-daain | 0e87df5dd6e678939374dfadf44fc360d34425bb | [
"Apache-2.0"
] | null | null | null | src/daain/backbones/esp_dropout_net/trainer/data.py | merantix/mxlabs-daain | 0e87df5dd6e678939374dfadf44fc360d34425bb | [
"Apache-2.0"
] | 2 | 2021-07-31T01:58:40.000Z | 2022-01-24T14:04:26.000Z | import os
import pickle
from typing import List, Optional, Union
import pytorch_lightning as pl
from torch.utils.data import DataLoader, random_split
from daain.backbones.esp_dropout_net.trainer.data_statistics import DataStatistics
from daain.backbones.esp_dropout_net.trainer.dataset_collate import ConcatTupleDatase... | 39.895062 | 118 | 0.618753 |
4a249e8ba1b4469c47ce215736187d3f1657389d | 865 | py | Python | Policies/EmpericalMeans.py | setuc/multi-arm-bandit | e81603700f405beec47a1f03459bbdc4456635f6 | [
"MIT"
] | 2 | 2020-09-29T12:17:50.000Z | 2020-10-11T22:05:48.000Z | Policies/EmpericalMeans.py | setuc/multi-arm-bandit | e81603700f405beec47a1f03459bbdc4456635f6 | [
"MIT"
] | null | null | null | Policies/EmpericalMeans.py | setuc/multi-arm-bandit | e81603700f405beec47a1f03459bbdc4456635f6 | [
"MIT"
] | 1 | 2020-09-22T12:15:54.000Z | 2020-09-22T12:15:54.000Z | import numpy as np
try:
from .IndexPolicy import IndexPolicy
except ImportError:
from IndexPolicy import IndexPolicy
class EmpiricalMeans(IndexPolicy):
"""
The naive Empirical Means policy for bounded bandits: like UCB but without a bias correction term.
Note that it is equal to UCBalpha with a... | 29.827586 | 103 | 0.620809 |
4a249ee7fb6635802b50098d45d2113765510984 | 184 | py | Python | Beginner/Balsa For The Three (BFTT)/three.py | anishsingh42/CodeChef | 50f5c0438516210895e513bc4ee959b9d99ef647 | [
"Apache-2.0"
] | 127 | 2020-10-13T18:04:35.000Z | 2022-02-17T10:56:27.000Z | Beginner/Balsa For The Three (BFTT)/three.py | anishsingh42/CodeChef | 50f5c0438516210895e513bc4ee959b9d99ef647 | [
"Apache-2.0"
] | 132 | 2020-10-13T18:06:53.000Z | 2021-10-17T18:44:26.000Z | Beginner/Balsa For The Three (BFTT)/three.py | anishsingh42/CodeChef | 50f5c0438516210895e513bc4ee959b9d99ef647 | [
"Apache-2.0"
] | 364 | 2020-10-13T18:04:52.000Z | 2022-03-04T14:34:53.000Z | t = int(input())
for i in range(t):
N = int(input())
s = N+1
while(True):
c = str(s)
if c.count('3') >= 3:
break
s = s+1
print(s)
| 14.153846 | 29 | 0.38587 |
4a249fa7d1bbe9593c9df747293e9191d497d8db | 1,719 | py | Python | pyecharts/charts/bar.py | yangxuan0261/pyecharts | 31cbd4dcd8c77988d1678a05b7f3bd0d845160bd | [
"MIT"
] | null | null | null | pyecharts/charts/bar.py | yangxuan0261/pyecharts | 31cbd4dcd8c77988d1678a05b7f3bd0d845160bd | [
"MIT"
] | null | null | null | pyecharts/charts/bar.py | yangxuan0261/pyecharts | 31cbd4dcd8c77988d1678a05b7f3bd0d845160bd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
from pyecharts.base import Base
from pyecharts.option import get_all_options
class Bar(Base):
"""
<<< Bar chart >>>
Bar chart shows different data through the height of a bar,
which is used in rectangular coordinate with at least 1 category axis.
"""
def _... | 31.254545 | 81 | 0.572426 |
4a249faea8e0ebdcf653bead2d06a506edfe2455 | 1,303 | py | Python | python/doc/en/2.0/resources/plot_oat_tags.py | carlosduarteroa/smap | 5760631dfaf3e85da26ce68bf542bf254bb92c80 | [
"BSD-2-Clause"
] | 21 | 2015-02-06T21:55:59.000Z | 2021-04-29T11:23:18.000Z | python/doc/en/2.0/resources/plot_oat_tags.py | carlosduarteroa/smap | 5760631dfaf3e85da26ce68bf542bf254bb92c80 | [
"BSD-2-Clause"
] | 9 | 2015-02-03T10:41:35.000Z | 2020-02-18T12:46:10.000Z | python/doc/en/2.0/resources/plot_oat_tags.py | carlosduarteroa/smap | 5760631dfaf3e85da26ce68bf542bf254bb92c80 | [
"BSD-2-Clause"
] | 20 | 2015-02-06T00:09:19.000Z | 2020-01-10T13:27:06.000Z | """Example code plotting one day's worth of outside air time-series,
locating the streams using a metadata query.
@author Stephen Dawson-Haggerty <stevedh@eecs.berkeley.edu>
"""
from smap.archiver.client import SmapClient
from smap.contrib import dtutil
from matplotlib import pyplot
from matplotlib import dates
# m... | 32.575 | 68 | 0.688411 |
4a249fd12356546a3b634f2877453f87666ae3c3 | 2,433 | py | Python | test/client.py | davidhadas/Guard | 04ad14f5913ff30b53e32547944a1689c4042510 | [
"Apache-2.0"
] | null | null | null | test/client.py | davidhadas/Guard | 04ad14f5913ff30b53e32547944a1689c4042510 | [
"Apache-2.0"
] | null | null | null | test/client.py | davidhadas/Guard | 04ad14f5913ff30b53e32547944a1689c4042510 | [
"Apache-2.0"
] | null | null | null | import requests
import random
import string
defaults = {
"url": "sample-tests.sros-e621c7d733ece1fad737ff54a8912822-0000.us-south.containers.appdomain.cloud"
, "scheme": "http"
, "method": "GET"
, "path": "/"
, "data": ""
, "queryKeys": 2
, "queryVal": 2
, "headersKeys": 2
, "head... | 38.015625 | 147 | 0.635018 |
4a24a0a4a46f9129616bcbfcb68ca7dddbcc461a | 2,589 | py | Python | billiards/billiards/messages/assistant.py | zxkane/billiards | 809a37b111a0fdbf7a2b1176149256b93c43045f | [
"Apache-1.1"
] | null | null | null | billiards/billiards/messages/assistant.py | zxkane/billiards | 809a37b111a0fdbf7a2b1176149256b93c43045f | [
"Apache-1.1"
] | null | null | null | billiards/billiards/messages/assistant.py | zxkane/billiards | 809a37b111a0fdbf7a2b1176149256b93c43045f | [
"Apache-1.1"
] | 1 | 2021-02-08T13:19:34.000Z | 2021-02-08T13:19:34.000Z | # -*- coding: utf-8 -*-
# encoding: utf-8
'''
Created on 2015年2月21日
@author: kane
'''
from datetime import datetime
from billiards.models import DATETIME_FORMAT
from django.utils.timezone import localtime, utc
import pytz
from billiards.settings import TIME_ZONE
ORDER_CONFIRMATION=u'您的订单已确认,请您准时到场消费。\n\
预约助教:%s\n\
预约时... | 35.958333 | 154 | 0.719197 |
4a24a10ed7ba66c6488e8a6d5067a6f7f2595b8e | 1,063 | py | Python | setup.py | sanchopanca/address-book | 7e0da3f59840a6305d0a4093aec6efc78a99e53e | [
"MIT"
] | null | null | null | setup.py | sanchopanca/address-book | 7e0da3f59840a6305d0a4093aec6efc78a99e53e | [
"MIT"
] | null | null | null | setup.py | sanchopanca/address-book | 7e0da3f59840a6305d0a4093aec6efc78a99e53e | [
"MIT"
] | null | null | null | """
address_book
~~~~~~~~~~~~
address_book is a simple library for storing and querying data
about persons
"""
from setuptools import setup
setup(
name='address_book',
version='0.1.0',
url='https://github.com/sanchopanca/address-book',
license='MIT',
author='Aleksandr Kovalev',
author_email=... | 29.527778 | 79 | 0.629351 |
4a24a1af38a382efb64a62fe7fa98fc6fdf5e55b | 1,742 | py | Python | OOPS/class_object.py | venkateshtantravahi/Python-0-to-hero- | dd1c5cb8a9693f72adb7e25ffc54c0492becea4a | [
"MIT"
] | 6 | 2021-09-19T09:33:20.000Z | 2022-01-03T03:57:14.000Z | OOPS/class_object.py | venkateshtantravahi/Python-0-to-hero- | dd1c5cb8a9693f72adb7e25ffc54c0492becea4a | [
"MIT"
] | 1 | 2021-12-18T14:19:03.000Z | 2021-12-18T14:19:03.000Z | OOPS/class_object.py | venkateshtantravahi/Python-0-to-hero- | dd1c5cb8a9693f72adb7e25ffc54c0492becea4a | [
"MIT"
] | null | null | null | """
class is like a blueprint that we provide to get the final output
whereas object is collections of variables and methods that are
inherited from the class, to act on data to provide some output
"""
# We create a class using 'class' keyword
class myNewClass:
"""This is a docstring. Created a new class"""
pa... | 22.921053 | 112 | 0.703789 |
4a24a1ddbbabfdc22a95abdcc2a8e2c730991a32 | 1,725 | py | Python | setup.py | MDiesing/pandapipes | ba5bea706bcbdb003be325de78a181817539ee0f | [
"BSD-3-Clause"
] | null | null | null | setup.py | MDiesing/pandapipes | ba5bea706bcbdb003be325de78a181817539ee0f | [
"BSD-3-Clause"
] | null | null | null | setup.py | MDiesing/pandapipes | ba5bea706bcbdb003be325de78a181817539ee0f | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 by Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
import io
import os
import re
from setuptools import find_packages
from setuptools im... | 34.5 | 99 | 0.691014 |
4a24a2424f7f7d1c6b715a7fd75399a48cc6d080 | 559 | py | Python | tests/utils/test_lab.py | danielkelshaw/GPyBO | 39e331953ec831ad1aca954fa5c9d63da9ca9d7d | [
"MIT"
] | 1 | 2021-09-01T11:31:17.000Z | 2021-09-01T11:31:17.000Z | tests/utils/test_lab.py | danielkelshaw/GPyBO | 39e331953ec831ad1aca954fa5c9d63da9ca9d7d | [
"MIT"
] | 64 | 2020-05-11T19:16:24.000Z | 2020-08-17T22:55:20.000Z | tests/utils/test_lab.py | danielkelshaw/GPyBO | 39e331953ec831ad1aca954fa5c9d63da9ca9d7d | [
"MIT"
] | null | null | null | import pytest
from gpybo.kernel.kernels import SquaredExponentialKernel
from gpybo.utils.lab import *
def test_pd_jitter_ve_sm() -> None:
k = torch.ones(5, 3)
with pytest.raises(ValueError):
ret = pd_jitter(k)
def test_pd_jitter_ve_pd() -> None:
k = torch.zeros(10, 10)
with pytest.raise... | 17.46875 | 57 | 0.661896 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.