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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1b741be39e1f7212ec19b42652116e1072e5e2 | 6,694 | py | Python | dmb/modeling/stereo/losses/stereo_focal_loss.py | jiaw-z/DenseMatchingBenchmark | 177c56ca1952f54d28e6073afa2c16981113a2af | [
"MIT"
] | 160 | 2019-11-16T13:59:21.000Z | 2022-03-28T07:52:59.000Z | dmb/modeling/stereo/losses/stereo_focal_loss.py | jiaw-z/DenseMatchingBenchmark | 177c56ca1952f54d28e6073afa2c16981113a2af | [
"MIT"
] | 22 | 2019-11-22T02:14:18.000Z | 2022-01-24T10:16:14.000Z | dmb/modeling/stereo/losses/stereo_focal_loss.py | jiaw-z/DenseMatchingBenchmark | 177c56ca1952f54d28e6073afa2c16981113a2af | [
"MIT"
] | 38 | 2019-12-27T14:01:01.000Z | 2022-03-12T11:40:11.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from dmb.modeling.stereo.losses.utils import LaplaceDisp2Prob, GaussianDisp2Prob, OneHotDisp2Prob
class StereoFocalLoss(object):
"""
Under the same start disparity and maximum disparity, calculating all estimated cost volum... | 43.467532 | 106 | 0.617867 |
4a1b749194ddbad9d7ee4d0e131d2b82149d3d7c | 208 | py | Python | does_my_number_look_big_in_this.py | Kunalpod/codewars | 8dc1af2f3c70e209471045118fd88b3ea1e627e5 | [
"MIT"
] | null | null | null | does_my_number_look_big_in_this.py | Kunalpod/codewars | 8dc1af2f3c70e209471045118fd88b3ea1e627e5 | [
"MIT"
] | null | null | null | does_my_number_look_big_in_this.py | Kunalpod/codewars | 8dc1af2f3c70e209471045118fd88b3ea1e627e5 | [
"MIT"
] | null | null | null | #Kunal Gautam
#Codewars : @Kunalpod
#Problem name: Does my number look big in this?
#Problem level: 6 kyu
def narcissistic( value ):
return value==int(sum([int(x)**len(str(value)) for x in str(value)]))
| 26 | 73 | 0.697115 |
4a1b754e95f3d98a2944416cf559a599fcf4565a | 2,523 | py | Python | examples/networking/tc_perf_event.py | Birch-san/bcc | b374be886b555ead8feaad9ec2d86ccd39d748dd | [
"Apache-2.0"
] | 4 | 2018-01-29T13:38:50.000Z | 2021-06-30T07:28:47.000Z | examples/networking/tc_perf_event.py | Birch-san/bcc | b374be886b555ead8feaad9ec2d86ccd39d748dd | [
"Apache-2.0"
] | 13 | 2018-02-09T22:24:29.000Z | 2018-06-18T22:33:29.000Z | examples/networking/tc_perf_event.py | Birch-san/bcc | b374be886b555ead8feaad9ec2d86ccd39d748dd | [
"Apache-2.0"
] | 5 | 2018-01-31T05:04:19.000Z | 2018-06-12T00:45:21.000Z | #!/usr/bin/python
#
# tc_perf_event.py Output skb and meta data through perf event
#
# Copyright (c) 2016-present, Facebook, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
from bcc import BPF
import ctypes as ct
import pyroute2
import socket
bpf_txt = """
#include <uapi/linux/if_ether.h>
#incl... | 29.337209 | 77 | 0.637337 |
4a1b761debd1f6d2085801af94d1ae58ec0a77d0 | 1,011 | py | Python | test_project/many_to_one/alchemy.py | pctSW1/django-url-filter | 42fc1c3aa71f51081cafdb5fcf39f082538eea1a | [
"MIT"
] | null | null | null | test_project/many_to_one/alchemy.py | pctSW1/django-url-filter | 42fc1c3aa71f51081cafdb5fcf39f082538eea1a | [
"MIT"
] | null | null | null | test_project/many_to_one/alchemy.py | pctSW1/django-url-filter | 42fc1c3aa71f51081cafdb5fcf39f082538eea1a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from sqlalchemy import Column, Date, Integer, String
from sqlalchemy.orm import backref, relationship
from ..alchemy import Base
class Reporter(Base):
__tablename__ = 'many_to_one_reporter'
id = Column(Integer, ... | 25.275 | 90 | 0.686449 |
4a1b775180c681879ce94636b12e1198b252f79a | 4,698 | py | Python | tests/sn3218.py | cscashby/pi-showcontrol | 2cc9b2b34ec8eeebede7609535b3c1e937b700cb | [
"MIT"
] | 3 | 2017-05-07T18:13:09.000Z | 2017-08-25T09:35:26.000Z | tests/sn3218.py | cscashby/pi-showcontrol | 2cc9b2b34ec8eeebede7609535b3c1e937b700cb | [
"MIT"
] | 6 | 2017-05-07T11:36:45.000Z | 2017-07-31T15:30:20.000Z | tests/sn3218.py | cscashby/pi-showcontrol | 2cc9b2b34ec8eeebede7609535b3c1e937b700cb | [
"MIT"
] | null | null | null | import sys
try:
from smbus import SMBus
except ImportError:
if sys.version_info[0] < 3:
sys.exit("This library requires python-smbus\nInstall with: sudo apt-get install python-smbus")
elif sys.version_info[0] == 3:
sys.exit("This library requires python3-smbus\nInstall with: sudo apt-get in... | 28.131737 | 117 | 0.650915 |
4a1b7994d6d8eed53ab543ddfcf74b1e16aa3032 | 12,015 | py | Python | networks/generator.py | Puneet-G/Impersonator-NNProject | 980cfc260feebbc873b4150326791340f6526c42 | [
"MIT"
] | 1 | 2020-05-11T19:10:27.000Z | 2020-05-11T19:10:27.000Z | networks/generator.py | Puneet-G/Impersonator-NNProject | 980cfc260feebbc873b4150326791340f6526c42 | [
"MIT"
] | 4 | 2020-05-11T19:12:18.000Z | 2021-10-12T22:52:12.000Z | networks/generator.py | Puneet-G/Impersonator-NNProject | 980cfc260feebbc873b4150326791340f6526c42 | [
"MIT"
] | 1 | 2020-05-27T01:59:41.000Z | 2020-05-27T01:59:41.000Z | import torch.nn as nn
import torch.nn.functional as F
from .networks import NetworkBase
from utils.util import Swish
import torch
import ipdb
class ResidualBlock(nn.Module):
"""Residual Block."""
def __init__(self, dim_in, dim_out):
super(ResidualBlock, self).__init__()
self.main = nn.Sequenti... | 35.758929 | 129 | 0.612318 |
4a1b79ba6bbbe35d7b76127bdea690a6c98b8443 | 32,210 | py | Python | effmass/inputs.py | musicmrman99/effmass | 77e75e0cb5688bdcd2e3cb170d47300ef04cec06 | [
"MIT"
] | 34 | 2018-10-05T14:52:42.000Z | 2022-03-29T14:23:11.000Z | effmass/inputs.py | musicmrman99/effmass | 77e75e0cb5688bdcd2e3cb170d47300ef04cec06 | [
"MIT"
] | 43 | 2018-07-06T16:31:27.000Z | 2022-03-29T11:00:31.000Z | effmass/inputs.py | musicmrman99/effmass | 77e75e0cb5688bdcd2e3cb170d47300ef04cec06 | [
"MIT"
] | 31 | 2018-06-26T12:10:00.000Z | 2022-03-29T14:23:12.000Z | #! /usr/bin/env python3
"""
A module for storing electronic structure data and user settings. Currently supported codes are VASP and FHI-Aims (with limited functionality).
The module contains a :class:`Data` class which parses OUTCAR and PROCAR files using the `vasppy <https://github.com/bjmorgan/vasppy>`_ package.
... | 45.238764 | 251 | 0.620863 |
4a1b79d601680ac93f9dbf8a0d0049c576ea0c96 | 520 | py | Python | saleor/lib/python3.7/site-packages/measurement/measures/__init__.py | cxsper/saleor | 5566ddcdaf8f72ba872eca869798e66eb9cdae44 | [
"BSD-3-Clause"
] | 1 | 2019-07-18T13:16:09.000Z | 2019-07-18T13:16:09.000Z | saleor/lib/python3.7/site-packages/measurement/measures/__init__.py | cxsper/saleor | 5566ddcdaf8f72ba872eca869798e66eb9cdae44 | [
"BSD-3-Clause"
] | 13 | 2020-03-24T17:53:51.000Z | 2022-02-10T20:01:14.000Z | saleor/lib/python3.7/site-packages/measurement/measures/__init__.py | cxsper/saleor | 5566ddcdaf8f72ba872eca869798e66eb9cdae44 | [
"BSD-3-Clause"
] | 1 | 2019-01-21T10:30:30.000Z | 2019-01-21T10:30:30.000Z | from measurement.measures.distance import *
from measurement.measures.energy import *
from measurement.measures.temperature import *
from measurement.measures.volume import *
from measurement.measures.mass import *
from measurement.measures.speed import *
from measurement.measures.time import *
from measurement.measure... | 40 | 46 | 0.838462 |
4a1b7a5043849bab051e9613aeb0af2df05218cb | 335 | py | Python | chat/views.py | tilcara/ChatProject | 61ad0fcf38601c063ff7cb714f8f11ec671dae21 | [
"MIT",
"Unlicense"
] | null | null | null | chat/views.py | tilcara/ChatProject | 61ad0fcf38601c063ff7cb714f8f11ec671dae21 | [
"MIT",
"Unlicense"
] | 6 | 2021-03-19T01:12:03.000Z | 2021-09-22T18:48:05.000Z | chat/views.py | tilcara/ChatProject | 61ad0fcf38601c063ff7cb714f8f11ec671dae21 | [
"MIT",
"Unlicense"
] | null | null | null | from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from .models import Message
@login_required()
def room(request):
messages = list(Message.objects.values().order_by('-timestamp')[:10])
context = {
'messages': messages
}
return render(request, 'chat/room.... | 30.454545 | 73 | 0.731343 |
4a1b7a597efc83d0b419e7fa388c5b28f77cfac4 | 989 | py | Python | solutions/03.py | brocki/adventofcode2021 | d54acdd1a25fd78211f4a45cdb7f96009c7faa4f | [
"MIT"
] | null | null | null | solutions/03.py | brocki/adventofcode2021 | d54acdd1a25fd78211f4a45cdb7f96009c7faa4f | [
"MIT"
] | null | null | null | solutions/03.py | brocki/adventofcode2021 | d54acdd1a25fd78211f4a45cdb7f96009c7faa4f | [
"MIT"
] | null | null | null | def evaluate(inputs: list) -> int:
tmp = find_most_common(inputs)
output = ""
for char in tmp:
if char > 0:
output += "1"
else:
output += "0"
bitmask = int("".ljust(len(tmp), "1"), 2)
gamma = int(output, 2)
epsilon = int(format(~gamma & bitmask, "0"+str(len(tmp))+"b"), 2)
power = g... | 21.042553 | 146 | 0.548028 |
4a1b7a657eed48003bbc8a2a9529f61006932e72 | 1,519 | py | Python | setup.py | caserec2018/CaseRecommender | 1b63fe79aa26786c99f35e6b8f0a0dd9e591811b | [
"MIT"
] | 16 | 2018-09-19T07:29:24.000Z | 2022-03-30T07:32:36.000Z | setup.py | caserec2018/CaseRecommender | 1b63fe79aa26786c99f35e6b8f0a0dd9e591811b | [
"MIT"
] | 1 | 2018-09-10T17:43:56.000Z | 2018-09-10T17:43:56.000Z | setup.py | caserec2018/CaseRecommender | 1b63fe79aa26786c99f35e6b8f0a0dd9e591811b | [
"MIT"
] | 2 | 2019-07-11T10:13:24.000Z | 2020-03-12T10:09:39.000Z | """"
Setup for Case Recommender
"""
# © 2018. Case Recommender (MIT License)
from distutils.core import setup
from setuptools import find_packages
from os import path
here = path.abspath(path.dirname(__file__))
__author__ = 'removed for double blind review'
# Get the long description from the README file
with... | 29.211538 | 103 | 0.669519 |
4a1b7bf4cdb2745aa22cff35f2a58bdf417a83de | 3,340 | py | Python | test/annotation_ontology_api_server_test.py | kbaseapps/annotation_ontology_api | 4b3b268524c31446926aa276ff2b09cc9cf99625 | [
"MIT"
] | null | null | null | test/annotation_ontology_api_server_test.py | kbaseapps/annotation_ontology_api | 4b3b268524c31446926aa276ff2b09cc9cf99625 | [
"MIT"
] | 1 | 2022-03-14T22:28:16.000Z | 2022-03-15T02:34:19.000Z | test/annotation_ontology_api_server_test.py | kbaseapps/annotation_ontology_api | 4b3b268524c31446926aa276ff2b09cc9cf99625 | [
"MIT"
] | 2 | 2021-02-18T02:08:53.000Z | 2022-03-09T17:37:18.000Z | # -*- coding: utf-8 -*-
import unittest
import os # noqa: F401
import json # noqa: F401
import time
import requests
from os import environ
try:
from ConfigParser import ConfigParser # py2
except:
from configparser import ConfigParser # py3
from pprint import pprint # noqa: F401
from biokbase.workspace.c... | 37.111111 | 104 | 0.631138 |
4a1b7c78cc48bd29a567cdc35ed1232fdd8396a5 | 17,624 | py | Python | lite/pylite/megenginelite/tensor.py | kagome1007/MegEngine | 6814cf1cd7bfae05f1ca22a5b79a09244028c7fd | [
"Apache-2.0"
] | null | null | null | lite/pylite/megenginelite/tensor.py | kagome1007/MegEngine | 6814cf1cd7bfae05f1ca22a5b79a09244028c7fd | [
"Apache-2.0"
] | null | null | null | lite/pylite/megenginelite/tensor.py | kagome1007/MegEngine | 6814cf1cd7bfae05f1ca22a5b79a09244028c7fd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... | 33.25283 | 88 | 0.622617 |
4a1b7ca9ab3b4befe5bdbb8377688bc9d72d1002 | 4,490 | py | Python | ephypype/interfaces/mne/LF_computation.py | EtienneCmb/ephypype | fdc13efb79545f072585d1e180d03702efd9e326 | [
"BSD-3-Clause"
] | null | null | null | ephypype/interfaces/mne/LF_computation.py | EtienneCmb/ephypype | fdc13efb79545f072585d1e180d03702efd9e326 | [
"BSD-3-Clause"
] | 1 | 2018-09-03T20:08:46.000Z | 2018-09-03T21:00:55.000Z | ephypype/interfaces/mne/LF_computation.py | EtienneCmb/ephypype | fdc13efb79545f072585d1e180d03702efd9e326 | [
"BSD-3-Clause"
] | null | null | null | """LF computation.
Created on Mon May 2 17:24:00 2016
@author: pasca
"""
import os.path as op
from nipype.utils.filemanip import split_filename as split_f
from nipype.interfaces.base import BaseInterface, BaseInterfaceInputSpec
from nipype.interfaces.base import traits, File, TraitedSpec
from ephypype.compute_fwd_... | 33.507463 | 79 | 0.630067 |
4a1b7cea9bb43bdeda90f0fca320aa7b47abece3 | 1,805 | py | Python | tf_quant_finance/math/__init__.py | cottrell/tf-quant-finance | e05664ed13933812446e95f8a05fccab86b8909c | [
"Apache-2.0"
] | 1 | 2019-11-19T00:10:07.000Z | 2019-11-19T00:10:07.000Z | tf_quant_finance/math/__init__.py | SeptumCapital/tf-quant-finance | 5aba5ddab3a4dd1efa87d5a12fec403315d2ac98 | [
"Apache-2.0"
] | null | null | null | tf_quant_finance/math/__init__.py | SeptumCapital/tf-quant-finance | 5aba5ddab3a4dd1efa87d5a12fec403315d2ac98 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 34.711538 | 109 | 0.798892 |
4a1b7dad03ea5755d0807172989f83010f07a8df | 9,423 | py | Python | utility/Upload.py | wuye999/Y2B | 6441ff0d9a9e67ae58a2845d4da0c783d91904e1 | [
"MIT"
] | 29 | 2020-02-24T00:00:09.000Z | 2021-12-13T07:56:56.000Z | utility/Upload.py | ghc7046/Y2B | 6441ff0d9a9e67ae58a2845d4da0c783d91904e1 | [
"MIT"
] | 6 | 2021-06-13T05:53:08.000Z | 2022-01-13T03:12:48.000Z | utility/Upload.py | ghc7046/Y2B | 6441ff0d9a9e67ae58a2845d4da0c783d91904e1 | [
"MIT"
] | 10 | 2020-05-17T05:37:04.000Z | 2022-01-24T10:45:11.000Z | import json
import os
import math
import base64
import time
from utility import tool
import threading
import re
def uploadFile(cookie: dict, videoPath: str, enableParallel=False) -> str:
logger = tool.getLogger()
logger.info(f"start {videoPath}")
file_size = os.path.getsize(videoPath)
s = tool.Session... | 35.693182 | 85 | 0.537621 |
4a1b7db7c79b0df13ab1f5965c32e3e2ca8f100b | 15,416 | py | Python | rep/metaml/folding.py | vkuznet/rep | 71939da79b45c28aa130680a11c13ede08f48a0e | [
"Apache-2.0"
] | null | null | null | rep/metaml/folding.py | vkuznet/rep | 71939da79b45c28aa130680a11c13ede08f48a0e | [
"Apache-2.0"
] | null | null | null | rep/metaml/folding.py | vkuznet/rep | 71939da79b45c28aa130680a11c13ede08f48a0e | [
"Apache-2.0"
] | null | null | null | """
This is specific meta-algorithm based on the idea of cross-validation.
"""
from __future__ import division, print_function, absolute_import
import numpy
from sklearn import clone
from six.moves import zip
from . import utils
from sklearn.cross_validation import KFold
from sklearn.utils.validation import check_ran... | 44.813953 | 118 | 0.659639 |
4a1b8142d6513fa2b1dbe4aba1485dae793082e6 | 6,643 | py | Python | accelbyte_py_sdk/api/social/models/bulk_user_stat_item_update.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/social/models/bulk_user_stat_item_update.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/social/models/bulk_user_stat_item_update.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | # Auto-generated at 2021-09-27T17:12:34.256874+08:00
# from: Justice Social Service (1.17.1)
# Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
# pylint: disable=duplicate-code
# pyli... | 36.5 | 109 | 0.59732 |
4a1b8173d80b00b2a0a2a9f60b007879c7ad459f | 2,139 | py | Python | sis/terms.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | sis/terms.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | sis/terms.py | ryanlovett/sis-cli | 5efe5b9344b547c3f1365ef63a0ad33ec013fcca | [
"Apache-2.0"
] | null | null | null | # vim:set et sw=4 ts=4:
import logging
import sys
from . import sis
# logging
logging.basicConfig(stream=sys.stdout, level=logging.WARNING)
logger = logging.getLogger(__name__)
# SIS endpoint
terms_uri = "https://apis.berkeley.edu/sis/v1/terms"
async def get_term_name(app_id, app_key, term_id):
'''Given a term ... | 31.455882 | 80 | 0.635344 |
4a1b81854597a10ae125307527d20961311fee42 | 960 | py | Python | isi_sdk_8_2_0/test/test_groupnet_subnet_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_0/test/test_groupnet_subnet_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_0/test/test_groupnet_subnet_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 7
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_0
from i... | 23.414634 | 102 | 0.722917 |
4a1b81f0e2e61e39548eb91722cdc593e4c9e1f4 | 1,395 | py | Python | folio/urls.py | KieranSweeden/fol.io | a6f231e3f9fb96841387b04d72131470c5fc3239 | [
"OLDAP-2.5",
"OLDAP-2.4",
"OLDAP-2.3"
] | null | null | null | folio/urls.py | KieranSweeden/fol.io | a6f231e3f9fb96841387b04d72131470c5fc3239 | [
"OLDAP-2.5",
"OLDAP-2.4",
"OLDAP-2.3"
] | null | null | null | folio/urls.py | KieranSweeden/fol.io | a6f231e3f9fb96841387b04d72131470c5fc3239 | [
"OLDAP-2.5",
"OLDAP-2.4",
"OLDAP-2.3"
] | null | null | null | """folio URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based v... | 36.710526 | 77 | 0.711828 |
4a1b822d02b7891aabc174ef83fe38a5ec6ba4ec | 3,322 | py | Python | KNN/mnistparser.py | ab3llini/MachineLearning | 2ca8529782ed800a6463e35509e646d094dc42a1 | [
"MIT"
] | null | null | null | KNN/mnistparser.py | ab3llini/MachineLearning | 2ca8529782ed800a6463e35509e646d094dc42a1 | [
"MIT"
] | null | null | null | KNN/mnistparser.py | ab3llini/MachineLearning | 2ca8529782ed800a6463e35509e646d094dc42a1 | [
"MIT"
] | null | null | null | from scipy.io import loadmat
import random
import sys
import math
import numpy as np
# This class parses the mnist dataset and returns x and y vectors for training
class MnistParser:
def __init__(self, target=0):
# Load the matlab file
self.df = loadmat('mnist.mat')['mnist'][0][0]
# Con... | 28.152542 | 105 | 0.562914 |
4a1b830a324209f7abbb9bebca002c79d2c0da4e | 5,803 | py | Python | homeassistant/components/opencv/image_processing.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 23 | 2017-11-15T21:03:53.000Z | 2021-03-29T21:33:48.000Z | homeassistant/components/opencv/image_processing.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 9 | 2022-01-27T06:32:10.000Z | 2022-03-31T07:07:51.000Z | homeassistant/components/opencv/image_processing.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 10 | 2018-01-01T00:12:51.000Z | 2021-12-21T23:08:05.000Z | """Support for OpenCV classification on images."""
from datetime import timedelta
import logging
import numpy
import requests
import voluptuous as vol
from homeassistant.components.image_processing import (
CONF_ENTITY_ID,
CONF_NAME,
CONF_SOURCE,
PLATFORM_SCHEMA,
ImageProcessingEntity,
)
from home... | 29.912371 | 86 | 0.619335 |
4a1b830fc255c9c999aec0f224cbc85e4e04ebe7 | 397 | py | Python | venv/Scripts/pip-script.py | libingluan/UI-test | 3deba2931203aa8bfc564f6a162e82b6649e6606 | [
"MIT"
] | null | null | null | venv/Scripts/pip-script.py | libingluan/UI-test | 3deba2931203aa8bfc564f6a162e82b6649e6606 | [
"MIT"
] | null | null | null | venv/Scripts/pip-script.py | libingluan/UI-test | 3deba2931203aa8bfc564f6a162e82b6649e6606 | [
"MIT"
] | null | null | null | #!F:\Python\engage-ui-test\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exi... | 30.538462 | 69 | 0.657431 |
4a1b83baef9aae8296c8a804e89e74606272081c | 562 | py | Python | manage.py | bartongroup/slivka-bio | 049aee943503963ce5c9b14267fe001edd8e0125 | [
"Apache-2.0"
] | null | null | null | manage.py | bartongroup/slivka-bio | 049aee943503963ce5c9b14267fe001edd8e0125 | [
"Apache-2.0"
] | 3 | 2021-09-01T16:47:02.000Z | 2022-02-09T09:01:31.000Z | manage.py | bartongroup/slivka-bio | 049aee943503963ce5c9b14267fe001edd8e0125 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
home = os.path.dirname(os.path.abspath(__file__))
if __name__ == "__main__":
home = os.environ.get('SLIVKA_HOME', home)
os.environ.setdefault('SLIVKA_HOME', home)
sys.path.append(home)
try:
import slivka.cli
except ImportError:
raise Imp... | 26.761905 | 72 | 0.649466 |
4a1b847094437e89e761dd4222f6ccc6a83dca94 | 1,795 | py | Python | fortnite.py | laynebergstrom5505/TechnoAyanBOT | 684901d2754ecf187cd7b419f7409c469f84ea66 | [
"MIT"
] | 3 | 2020-06-05T21:21:55.000Z | 2020-06-06T19:45:17.000Z | fortnite.py | laynebergstrom5505/TechnoAyanBOT | 684901d2754ecf187cd7b419f7409c469f84ea66 | [
"MIT"
] | null | null | null | fortnite.py | laynebergstrom5505/TechnoAyanBOT | 684901d2754ecf187cd7b419f7409c469f84ea66 | [
"MIT"
] | 1 | 2021-01-09T11:32:05.000Z | 2021-01-09T11:32:05.000Z | """Emoji
Available Commands:
.isro
built by @r4v4n4 , isse bhi loot lo betichod"""
from telethon import events
import asyncio
from uniborg.util import admin_cmd
@borg.on(admin_cmd(pattern=r"fortnite"))
async def _(event):
if event.fwd_from:
return
animation_interval = 1
animation_ttl ... | 13.496241 | 48 | 0.22507 |
4a1b85e0ae71dd959553748c119218db7fc5350a | 6,622 | py | Python | src/gerenciador_de_trajetos.py | denielfer/Malha-aeria---pbl-conectvidade-problema3 | 55fe417e797b2ecadb6dcf971191d328aaf9582a | [
"MIT"
] | null | null | null | src/gerenciador_de_trajetos.py | denielfer/Malha-aeria---pbl-conectvidade-problema3 | 55fe417e797b2ecadb6dcf971191d328aaf9582a | [
"MIT"
] | null | null | null | src/gerenciador_de_trajetos.py | denielfer/Malha-aeria---pbl-conectvidade-problema3 | 55fe417e797b2ecadb6dcf971191d328aaf9582a | [
"MIT"
] | null | null | null | from trecho import Trecho
class Gerenciador_de_trajetos():
def __init__(self, trechos:list[Trecho]):
self.trechos = trechos
self.trajetos = {trecho.saida:{} for trecho in trechos}
for i, trecho in enumerate(trechos):
if(trecho.destino not in self.trajetos[trecho.saida]):
... | 50.938462 | 345 | 0.561915 |
4a1b86a97e14ddaa5b69880886592f618d3b3342 | 8,707 | py | Python | seleniumwire/proxy/client.py | nck/selenium-wire | be2cca0dc556ebf84daac84a3a0315378f871f48 | [
"MIT"
] | 5 | 2020-03-11T06:08:08.000Z | 2021-09-22T02:46:51.000Z | seleniumwire/proxy/client.py | nck/selenium-wire | be2cca0dc556ebf84daac84a3a0315378f871f48 | [
"MIT"
] | 3 | 2020-08-18T09:35:55.000Z | 2021-11-15T17:49:55.000Z | seleniumwire/proxy/client.py | nck/selenium-wire | be2cca0dc556ebf84daac84a3a0315378f871f48 | [
"MIT"
] | 1 | 2021-03-04T08:39:21.000Z | 2021-03-04T08:39:21.000Z | import http.client
import json
import logging
import threading
from urllib.parse import quote_plus
from .handler import ADMIN_PATH, CaptureRequestHandler, create_custom_capture_request_handler
from .server import ProxyHTTPServer
log = logging.getLogger(__name__)
class AdminClient:
"""Provides an API for sending... | 36.279167 | 106 | 0.618008 |
4a1b88ce65de32150bf2e8ceef8c499e16db5c81 | 14,246 | py | Python | mutations/__init__.py | jkobject/JKBio | b25c0e3fb28a5088aacfa487b7500b786762dd7d | [
"Apache-2.0"
] | 1 | 2021-04-06T18:04:51.000Z | 2021-04-06T18:04:51.000Z | mutations/__init__.py | jkobject/JKBio | b25c0e3fb28a5088aacfa487b7500b786762dd7d | [
"Apache-2.0"
] | 3 | 2021-01-08T15:09:32.000Z | 2021-02-02T13:23:37.000Z | mutations/__init__.py | jkobject/JKBio | b25c0e3fb28a5088aacfa487b7500b786762dd7d | [
"Apache-2.0"
] | 2 | 2021-01-08T15:01:45.000Z | 2021-11-12T18:30:22.000Z | # Jeremie Kalfon
# for BroadInsitute
# in 2019
from __future__ import print_function
import pandas as pd
import numpy as np
from JKBio.utils import helper as h
import gzip
import seaborn as sns
from taigapy import TaigaClient
tc = TaigaClient()
def vcf_to_df(path, hasfilter=False, samples=['sample'], additional_col... | 37.989333 | 170 | 0.616945 |
4a1b89915f976f58166ac5862ff5ebe43c44a19d | 3,365 | py | Python | word_clustering.py | brannondorsey/GloVe-experiments | 8dafbeaa20784282f8b339ce80b8fd4c81d3431c | [
"MIT"
] | 59 | 2017-10-29T23:12:07.000Z | 2022-03-11T04:21:28.000Z | word_clustering.py | brannondorsey/GloVe-experiments | 8dafbeaa20784282f8b339ce80b8fd4c81d3431c | [
"MIT"
] | 2 | 2018-07-06T12:47:59.000Z | 2020-05-27T13:38:27.000Z | word_clustering.py | brannondorsey/GloVe-experiments | 8dafbeaa20784282f8b339ce80b8fd4c81d3431c | [
"MIT"
] | 20 | 2017-10-30T22:16:57.000Z | 2022-02-19T03:18:20.000Z | # Notes for extension of script:
# - User readline() to interactively search for word groups
# - On a word miss, use L2 or cosine distance to select the nearest word vector
# - This would require all 6B tokens to loaded in ram (but not clustered)
# - Or use levenshtein distance assuming the word is spelled the sam... | 37.388889 | 102 | 0.692422 |
4a1b89fcd318a738f02a055985aa241526fe3abb | 2,115 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/SNMPv2_TC.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 177 | 2016-03-15T17:03:51.000Z | 2022-03-18T16:48:44.000Z | cisco-ios-xr/ydk/models/cisco_ios_xr/SNMPv2_TC.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2016-03-30T10:45:22.000Z | 2020-07-14T16:28:13.000Z | cisco-ios-xr/ydk/models/cisco_ios_xr/SNMPv2_TC.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 85 | 2016-03-16T20:38:57.000Z | 2022-02-22T04:26:02.000Z | """ SNMPv2_TC
"""
import sys
from collections import OrderedDict
from ydk.types import Entity as _Entity_
from ydk.types import EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64
from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, L... | 19.40367 | 126 | 0.644917 |
4a1b8aa00e01755ab622116bb0978e9ffeeef1f2 | 9,548 | py | Python | gitops_server/workers/deployer/deploy.py | uptick/gitops | f65057ef337a6fe34f3510c889c2284c1fdb7218 | [
"BSD-2-Clause"
] | 6 | 2020-05-12T14:58:20.000Z | 2022-02-01T09:40:55.000Z | gitops_server/workers/deployer/deploy.py | uptick/gitops | f65057ef337a6fe34f3510c889c2284c1fdb7218 | [
"BSD-2-Clause"
] | 22 | 2019-09-04T13:33:12.000Z | 2022-03-17T06:05:16.000Z | gitops_server/workers/deployer/deploy.py | uptick/gitops | f65057ef337a6fe34f3510c889c2284c1fdb7218 | [
"BSD-2-Clause"
] | null | null | null | import asyncio
import json
import logging
import os
import tempfile
import uuid
from typing import List, Optional
from gitops.common.app import App
from gitops_server import settings
from gitops_server.types import AppDefinitions, UpdateAppResult
from gitops_server.utils import get_repo_name_from_url, github, run, sla... | 41.513043 | 99 | 0.593632 |
4a1b8ced5d17906823e74441ca4fa96f1e9b02f0 | 4,344 | py | Python | 2020-02/three_way/train.py | kimwooglae/keraspp | 0c052c0e1cd693c852122bdeee743c841c369f85 | [
"MIT"
] | null | null | null | 2020-02/three_way/train.py | kimwooglae/keraspp | 0c052c0e1cd693c852122bdeee743c841c369f85 | [
"MIT"
] | null | null | null | 2020-02/three_way/train.py | kimwooglae/keraspp | 0c052c0e1cd693c852122bdeee743c841c369f85 | [
"MIT"
] | null | null | null | # USAGE
# python train.py --model sequential --plot output/sequential.png
# python train.py --model functional --plot output/functional.png
# python train.py --model class --plot output/class.png
# set the matplotlib backend so figures can be saved in the background
import matplotlib
matplotlib.use("Agg")
# there see... | 35.317073 | 70 | 0.755525 |
4a1b8d3c9b87305626c844701a94d02473bf4082 | 1,653 | py | Python | scripts/interf.py | mkarim2017/insarzd | e7d05f836e7ca044166e38bad549629ed00d71f1 | [
"ECL-2.0",
"Apache-2.0"
] | 28 | 2019-10-04T01:18:29.000Z | 2022-02-15T11:18:18.000Z | scripts/interf.py | mkarim2017/insarzd | e7d05f836e7ca044166e38bad549629ed00d71f1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | scripts/interf.py | mkarim2017/insarzd | e7d05f836e7ca044166e38bad549629ed00d71f1 | [
"ECL-2.0",
"Apache-2.0"
] | 11 | 2019-10-04T08:36:54.000Z | 2021-06-21T08:47:28.000Z | #!/usr/bin/env python3
import os
import sys
import shutil
import argparse
import isce
import isceobj
from crlpac import getWidth
from crlpac import getLength
from crlpac import runCmd
from crlpac import create_xml
def cmdLineParse():
'''
Command line parser.
'''
parser = argparse.ArgumentParser( d... | 25.828125 | 118 | 0.646098 |
4a1b8e3ee29b5aa7eee417fe30560a6ac7150289 | 13,324 | py | Python | manager/test/test_workers.py | mrandrey228/Naumachia | 93cacfd44eea0f004c630fb37de2f4529f9699ad | [
"MIT"
] | 79 | 2017-07-10T16:19:53.000Z | 2022-03-19T17:57:40.000Z | manager/test/test_workers.py | mrandrey228/Naumachia | 93cacfd44eea0f004c630fb37de2f4529f9699ad | [
"MIT"
] | 33 | 2018-01-11T06:18:02.000Z | 2022-02-26T05:22:48.000Z | manager/test/test_workers.py | mrandrey228/Naumachia | 93cacfd44eea0f004c630fb37de2f4529f9699ad | [
"MIT"
] | 11 | 2018-02-10T12:20:55.000Z | 2021-12-04T23:46:41.000Z | from .common import ensure_redis_is_online
from app.db import DB, Address
from functools import wraps
from os import path
from redis import Redis
import app.manager as sut
import unittest
import weakref
test_dir = path.dirname(path.realpath(__file__))
sut.CHALLENGE_FODLER = test_dir
class Shim:
"""A simple shim ... | 33.062035 | 131 | 0.561693 |
4a1b8e7ed603d50aa125e307dacad440773900f8 | 2,226 | py | Python | clitool/_unicodecsv.py | skitazaki/python-clitool | 4971f8d093d51c6fd0e6cc536bbb597f78b570ab | [
"Apache-2.0"
] | 1 | 2016-10-24T14:19:40.000Z | 2016-10-24T14:19:40.000Z | clitool/_unicodecsv.py | skitazaki/python-clitool | 4971f8d093d51c6fd0e6cc536bbb597f78b570ab | [
"Apache-2.0"
] | null | null | null | clitool/_unicodecsv.py | skitazaki/python-clitool | 4971f8d093d51c6fd0e6cc536bbb597f78b570ab | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This file is for Python 2.7.
And all classes are from `Python Official Document`_.
.. _`Python Official Document`: http://docs.python.org/library/csv.html
More sophisticated implementation is available on "csvkit_" module.
.. _csvkit: http://pypi.python.org/pypi/csvkit
"""
import codecs... | 25.883721 | 74 | 0.62938 |
4a1b8edb8e85ba2d17d692f0bbeae2cde32aae2c | 12 | py | Python | python/testData/console/ipython/psi/shell2.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/console/ipython/psi/shell2.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/console/ipython/psi/shell2.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | !cd /var/etc | 12 | 12 | 0.666667 |
4a1b908f38eb338741885ed85eb1dc51241590d5 | 22,293 | py | Python | jdma_control/backends/ElasticTapeBackend.py | cedadev/django-jdma_control | 9223aa2f8773e78c6f78197ae89289452d1285c9 | [
"BSD-3-Clause"
] | null | null | null | jdma_control/backends/ElasticTapeBackend.py | cedadev/django-jdma_control | 9223aa2f8773e78c6f78197ae89289452d1285c9 | [
"BSD-3-Clause"
] | 23 | 2018-03-21T14:36:24.000Z | 2020-04-17T07:58:33.000Z | jdma_control/backends/ElasticTapeBackend.py | cedadev/django-jdma_control | 9223aa2f8773e78c6f78197ae89289452d1285c9 | [
"BSD-3-Clause"
] | null | null | null | """Class for a JASMIN Data Migration App backend which targets Elastic Tape.
Note that this is the simplified version, which (simply) uses functions from
the Elastic Tape client to GET and PUT the data.
Transport is handled by the script ET_transfer_mp, which is a version of the
et_transfer_mp script which runs on et1.... | 36.666118 | 101 | 0.619656 |
4a1b90919674baf22f530bd53a63514f1f8244f6 | 9,009 | py | Python | code/model.py | Salingo/CTF-Net | 39c87b271ea0d263c31e43439997cc4f5f8602b3 | [
"MIT"
] | 9 | 2021-05-21T13:38:09.000Z | 2022-03-11T09:56:11.000Z | code/model.py | Salingo/CTF-Net | 39c87b271ea0d263c31e43439997cc4f5f8602b3 | [
"MIT"
] | null | null | null | code/model.py | Salingo/CTF-Net | 39c87b271ea0d263c31e43439997cc4f5f8602b3 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import trans
from pointnet_util import PointNetEncoder
class Convlayer(nn.Module):
def __init__(self, point_scales, nchannel=3):
super(Convlayer, self).__init__()
self.point_scales = point_scales
self.conv1 = torch.nn.Conv2d(1... | 43.3125 | 169 | 0.70807 |
4a1b90968192a4c4a3fd3cf3dbe8f335c3118f39 | 2,506 | py | Python | tempest/services/compute/json/quotas_client.py | KiranPawar72/tempest | 1fef3dd92b083055793065dd0693454735ec2c01 | [
"Apache-2.0"
] | null | null | null | tempest/services/compute/json/quotas_client.py | KiranPawar72/tempest | 1fef3dd92b083055793065dd0693454735ec2c01 | [
"Apache-2.0"
] | null | null | null | tempest/services/compute/json/quotas_client.py | KiranPawar72/tempest | 1fef3dd92b083055793065dd0693454735ec2c01 | [
"Apache-2.0"
] | 1 | 2020-07-21T02:18:23.000Z | 2020-07-21T02:18:23.000Z | # Copyright 2012 NTT Data
# 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 appl... | 37.969697 | 78 | 0.654828 |
4a1b91c599f0023ee5ae0c23c87fe71617b0ec03 | 9,210 | py | Python | tasks/utils.py | hostcc/datadog-agent | 34cbcd79040936169b445fb579898e292c0c8198 | [
"Apache-2.0"
] | null | null | null | tasks/utils.py | hostcc/datadog-agent | 34cbcd79040936169b445fb579898e292c0c8198 | [
"Apache-2.0"
] | null | null | null | tasks/utils.py | hostcc/datadog-agent | 34cbcd79040936169b445fb579898e292c0c8198 | [
"Apache-2.0"
] | null | null | null | """
Miscellaneous functions, no tasks here
"""
from __future__ import print_function
import os
import platform
import re
import sys
import json
from subprocess import check_output
import invoke
# constants
ORG_PATH = "github.com/DataDog"
REPO_PATH = "{}/datadog-agent".format(ORG_PATH)
def bin_name(name, android=Fa... | 37.137097 | 120 | 0.631813 |
4a1b925ca99b2beb2fe047d327fc0dbda79bacf3 | 5,938 | py | Python | pymongo/server_api.py | ldennis/mongo-python-driver | cc029a1e6208863eaab453777363d3935b927f32 | [
"Apache-2.0"
] | 2,593 | 2015-01-02T10:53:55.000Z | 2022-03-28T15:42:47.000Z | pymongo/server_api.py | ldennis/mongo-python-driver | cc029a1e6208863eaab453777363d3935b927f32 | [
"Apache-2.0"
] | 356 | 2015-02-05T15:57:18.000Z | 2022-03-31T19:12:30.000Z | pymongo/server_api.py | ldennis/mongo-python-driver | cc029a1e6208863eaab453777363d3935b927f32 | [
"Apache-2.0"
] | 774 | 2015-01-05T09:30:07.000Z | 2022-03-30T03:36:25.000Z | # Copyright 2020-present MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You
# may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 35.136095 | 258 | 0.675648 |
4a1b95b5a8bcf3c8fa27bc2724ccfed28ab72513 | 880 | py | Python | calculadora.py | MarceloPorfirio/Calculadora_Pintura | abd3d72f9742db31592ecb460daf056d3b10d0a8 | [
"MIT"
] | null | null | null | calculadora.py | MarceloPorfirio/Calculadora_Pintura | abd3d72f9742db31592ecb460daf056d3b10d0a8 | [
"MIT"
] | null | null | null | calculadora.py | MarceloPorfirio/Calculadora_Pintura | abd3d72f9742db31592ecb460daf056d3b10d0a8 | [
"MIT"
] | null | null | null | class Calculadora:
__area_paredes: float ## __UNDERSCORE X2 deixa seu acesso limitado , só pode ser acessado por atributos e métodos dentro da sua propria classe.
__area_teto: float ## são declarados como privados
def calcular_area_paredes(self, comodo):
self.__area_paredes = 2*(comodo.largura + co... | 51.764706 | 147 | 0.706818 |
4a1b95c63a53367ada44e69b6e851e31b78b835c | 3,037 | py | Python | contrib/linearize/linearize-hashes.py | MNOSIO/mnos-wallet | 07bf0b6d1477daa895319be4b6a69a42aa2110ac | [
"MIT"
] | null | null | null | contrib/linearize/linearize-hashes.py | MNOSIO/mnos-wallet | 07bf0b6d1477daa895319be4b6a69a42aa2110ac | [
"MIT"
] | null | null | null | contrib/linearize/linearize-hashes.py | MNOSIO/mnos-wallet | 07bf0b6d1477daa895319be4b6a69a42aa2110ac | [
"MIT"
] | 4 | 2018-07-17T13:48:13.000Z | 2018-08-20T04:32:42.000Z | #!/usr/bin/python
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import pr... | 26.640351 | 90 | 0.682581 |
4a1b9677bd6d2e51564c0529961043a0396a6bff | 979 | py | Python | conj1.py | kishlaya/random_graph | 076e002b9a44ad554bd161c72d781fd66e3a89e2 | [
"MIT"
] | null | null | null | conj1.py | kishlaya/random_graph | 076e002b9a44ad554bd161c72d781fd66e3a89e2 | [
"MIT"
] | null | null | null | conj1.py | kishlaya/random_graph | 076e002b9a44ad554bd161c72d781fd66e3a89e2 | [
"MIT"
] | null | null | null | import main as graph
def check(adjacency_matrix):
global fail_count
mu, phi = graph.eigen(adjacency_matrix)
n = len(mu)
max_index = 0
for i in range(0,n):
if mu[i] > mu[max_index]:
max_index = i
mu_1 = mu[max_index]
phi_1 = phi[:, max_index]
test = []
for i in ... | 21.282609 | 50 | 0.531154 |
4a1b969ebe2890f32a98df6c81d72242d236a93a | 4,683 | py | Python | einsum_function.py | ronekko/capsnet | 28dc11945ecf2d65f45834f7bc52cb9c5f079af4 | [
"MIT"
] | null | null | null | einsum_function.py | ronekko/capsnet | 28dc11945ecf2d65f45834f7bc52cb9c5f079af4 | [
"MIT"
] | null | null | null | einsum_function.py | ronekko/capsnet | 28dc11945ecf2d65f45834f7bc52cb9c5f079af4 | [
"MIT"
] | null | null | null | from collections import OrderedDict
import chainer.functions as F
def _parse_subscripts(subscripts):
if '->' in subscripts:
has_arrow = True
else:
subscripts = subscripts + '->'
has_arrow = False
in_subs, out_sub = subscripts.split('->')
in_subs = in_subs.split(',')
out_s... | 31.013245 | 76 | 0.592569 |
4a1b9707b924c8fea9e04a043d626d7f2f5014f8 | 189 | py | Python | Core/Null_Factory.py | BernardoB95/Extrator_SPEDFiscal | 10b4697833c561d24654251da5f22d044f03fc16 | [
"MIT"
] | 1 | 2021-04-25T13:53:20.000Z | 2021-04-25T13:53:20.000Z | Core/Null_Factory.py | BernardoB95/Extrator_SPEDFiscal | 10b4697833c561d24654251da5f22d044f03fc16 | [
"MIT"
] | null | null | null | Core/Null_Factory.py | BernardoB95/Extrator_SPEDFiscal | 10b4697833c561d24654251da5f22d044f03fc16 | [
"MIT"
] | null | null | null | from .IFactory import IFactory
from Regs import NullReg
class Null_Factory(IFactory):
def create_block_object(self, line):
self.null = _null = NullReg()
return _null
| 18.9 | 40 | 0.703704 |
4a1b97b62fc3394d7f87f867bbd8e5b86a1d0a9e | 11,550 | py | Python | py/p4/v1/p4runtime_pb2_grpc.py | kishanps/p4runtime | 235fbd62cc9e806f4d3e1b8ef448bab4ad91f031 | [
"Apache-2.0"
] | null | null | null | py/p4/v1/p4runtime_pb2_grpc.py | kishanps/p4runtime | 235fbd62cc9e806f4d3e1b8ef448bab4ad91f031 | [
"Apache-2.0"
] | null | null | null | py/p4/v1/p4runtime_pb2_grpc.py | kishanps/p4runtime | 235fbd62cc9e806f4d3e1b8ef448bab4ad91f031 | [
"Apache-2.0"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from p4.v1 import p4runtime_pb2 as p4_dot_v1_dot_p4runtime__pb2
class P4RuntimeStub(object):
"""Missing associated documentation comment in .proto file."""... | 46.95122 | 123 | 0.68 |
4a1b97f9467bf7a99a0b32a14bd0850c7c0ec253 | 3,069 | py | Python | mmaction/datasets/audio_visual_dataset.py | Naoki-Wake/mmaction2 | a2032605db82509744a18d993c94a06feb1efd15 | [
"Apache-2.0"
] | 47 | 2021-09-02T10:42:29.000Z | 2022-03-31T01:37:49.000Z | mmaction/datasets/audio_visual_dataset.py | xumingze0308/mmaction2 | 777546f27f8f5a3c83e10d966e2149be2fc9fa31 | [
"Apache-2.0"
] | 2 | 2021-12-05T02:28:42.000Z | 2022-01-05T06:46:10.000Z | mmaction/datasets/audio_visual_dataset.py | xumingze0308/mmaction2 | 777546f27f8f5a3c83e10d966e2149be2fc9fa31 | [
"Apache-2.0"
] | 6 | 2021-09-19T16:31:32.000Z | 2022-03-03T06:57:34.000Z | import os.path as osp
from .rawframe_dataset import RawframeDataset
from .registry import DATASETS
@DATASETS.register_module()
class AudioVisualDataset(RawframeDataset):
"""Dataset that reads both audio and visual data, supporting both rawframes
and videos. The annotation file is same as that of the rawframe... | 39.857143 | 79 | 0.539264 |
4a1b980d338f6f43158e458ec3cf43a49a62e188 | 89 | py | Python | exercicios/ex024.py | Matheus1199/python | c87859d4bf63ba0edea43d864fcbce4915da7e6a | [
"MIT"
] | null | null | null | exercicios/ex024.py | Matheus1199/python | c87859d4bf63ba0edea43d864fcbce4915da7e6a | [
"MIT"
] | null | null | null | exercicios/ex024.py | Matheus1199/python | c87859d4bf63ba0edea43d864fcbce4915da7e6a | [
"MIT"
] | null | null | null | cidade = input('Em qual cidade você nasceu? ').strip()
print(cidade[:5].upper == 'SANTO') | 44.5 | 54 | 0.674157 |
4a1b99127012512bde3b1a15ffa974c55820beb4 | 10,409 | py | Python | src/genie/libs/parser/ios/tests/test_show_spanning_tree.py | Drey/genieparser | f16649efabf1f3c892bcaad340ae24ce5403ba6b | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/ios/tests/test_show_spanning_tree.py | Drey/genieparser | f16649efabf1f3c892bcaad340ae24ce5403ba6b | [
"Apache-2.0"
] | 1 | 2019-04-02T16:51:56.000Z | 2019-04-02T16:51:56.000Z | src/genie/libs/parser/ios/tests/test_show_spanning_tree.py | Drey/genieparser | f16649efabf1f3c892bcaad340ae24ce5403ba6b | [
"Apache-2.0"
] | 1 | 2021-01-29T17:31:33.000Z | 2021-01-29T17:31:33.000Z | #!/bin/env python
import unittest
from unittest.mock import Mock
from ats.topology import Device
from genie.metaparser.util.exceptions import SchemaEmptyParserError,\
SchemaMissingKeyError
from genie.libs.parser.ios.show_spanning_tree import ShowSpanningTreeDetail, \
... | 39.42803 | 98 | 0.591603 |
4a1b9961f1aa3acb809d7813feee8332b87add36 | 17,390 | py | Python | ryu/base/app_manager.py | hiArvin/ryu | b568088f8fe1d2334d9773f6ddaac8674f2a0f61 | [
"Apache-2.0"
] | 269 | 2015-03-08T11:32:45.000Z | 2022-03-30T11:18:16.000Z | ryu/base/app_manager.py | hiArvin/ryu | b568088f8fe1d2334d9773f6ddaac8674f2a0f61 | [
"Apache-2.0"
] | null | null | null | ryu/base/app_manager.py | hiArvin/ryu | b568088f8fe1d2334d9773f6ddaac8674f2a0f61 | [
"Apache-2.0"
] | 205 | 2015-01-13T04:52:25.000Z | 2022-03-30T13:37:33.000Z | # Copyright (C) 2011-2014 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp>
#
# 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
#
# ht... | 33.442308 | 79 | 0.608166 |
4a1b9987fbab6e4449e88811a6e14ba2c29acc01 | 3,043 | py | Python | tpdatasrc/co8infra/scr/Spell432 - Shout.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 69 | 2015-05-05T14:09:25.000Z | 2022-02-15T06:13:04.000Z | tpdatasrc/co8infra/scr/Spell432 - Shout.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 457 | 2015-05-01T22:07:45.000Z | 2022-03-31T02:19:10.000Z | tpdatasrc/co8infra/scr/Spell432 - Shout.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 25 | 2016-02-04T21:19:53.000Z | 2021-11-15T23:14:51.000Z | from toee import *
def OnBeginSpellCast( spell ):
print "Shout OnBeginSpellCast"
print "spell.target_list=", spell.target_list
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
game.particles( "sp-evocation-conjure", spell.caster )
def OnSpellEffect( spell ):
print "Shout OnSpellEffect"
... | 40.039474 | 159 | 0.734473 |
4a1b99e7edeaaddd9feabf3859830c9bcaab5ca1 | 1,032 | py | Python | jp.atcoder/abc111/arc103_b/9362830.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc111/arc103_b/9362830.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc111/arc103_b/9362830.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import sys
n = int(sys.stdin.readline().rstrip())
xy = list(zip(*[map(int, sys.stdin.read().split())] * 2))
mask = (1 << 31) - 1
def solve(x, y, mode):
u = x + y
v = x - y
if mode == 0:
u -= 1
v -= 1
s = (u + mask) >> 1
t = (v + mask) >> 1
l = (~(s | t)) & mas... | 19.846154 | 58 | 0.351744 |
4a1b99f4b9bc9adbb608c4a914229d206f5f1be5 | 1,877 | py | Python | homeassistant/components/binary_sensor/verisure.py | veresspeter/home-assistant | a3c22c6eec2c77a28a8fa859e899984269708666 | [
"Apache-2.0"
] | 37 | 2018-05-22T07:17:26.000Z | 2022-03-03T13:14:46.000Z | homeassistant/components/binary_sensor/verisure.py | veresspeter/home-assistant | a3c22c6eec2c77a28a8fa859e899984269708666 | [
"Apache-2.0"
] | 125 | 2018-12-11T07:31:20.000Z | 2021-07-27T08:20:03.000Z | homeassistant/components/binary_sensor/verisure.py | y1ngyang/home-assistant | 7e39a5c4d50cf5754f5f32a84870ca57a5778b02 | [
"Apache-2.0"
] | 8 | 2018-05-30T20:05:26.000Z | 2021-02-19T14:17:05.000Z | """
Interfaces with Verisure sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.verisure/
"""
import logging
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.components.verisure import CONF_DOOR... | 31.283333 | 74 | 0.667022 |
4a1b9a7ed076a140db7cc0775024fc8634e48c2c | 28 | py | Python | tlbpy/rl_algos/__init__.py | Guitheg/tlbpy | 67f87012bbca67142a9810bbeb0e5ba413993d41 | [
"MIT"
] | null | null | null | tlbpy/rl_algos/__init__.py | Guitheg/tlbpy | 67f87012bbca67142a9810bbeb0e5ba413993d41 | [
"MIT"
] | null | null | null | tlbpy/rl_algos/__init__.py | Guitheg/tlbpy | 67f87012bbca67142a9810bbeb0e5ba413993d41 | [
"MIT"
] | null | null | null | from .rl_algo import Rl_algo | 28 | 28 | 0.857143 |
4a1b9c399dd2f094c9c86f1571a16dd8f9da4fe5 | 1,715 | py | Python | Tools/ProjectGenerator/CreateProject.py | uberpixel/Rayne | 94f601561aedfc3200e67ff9522f64fbc5ca4d8c | [
"MIT"
] | 13 | 2020-08-08T11:57:05.000Z | 2022-03-10T17:29:19.000Z | Tools/ProjectGenerator/CreateProject.py | uberpixel/Rayne | 94f601561aedfc3200e67ff9522f64fbc5ca4d8c | [
"MIT"
] | 1 | 2022-03-10T17:35:28.000Z | 2022-03-10T18:21:57.000Z | Tools/ProjectGenerator/CreateProject.py | uberpixel/Rayne | 94f601561aedfc3200e67ff9522f64fbc5ca4d8c | [
"MIT"
] | 3 | 2020-08-08T14:22:34.000Z | 2021-05-15T21:12:17.000Z | import os
import sys
import datetime
def main():
templateName = input("Template name? ")
projectNameString = input("Project name? ")
projectName = projectNameString.encode()
projectTarget = projectNameString.replace(" ", "").encode()
prefixString = input("Project prefix? ")
prefix = prefixString.encode()
compan... | 35 | 91 | 0.724781 |
4a1b9f76326f96b5e172977b7e2c29700d0ab015 | 2,654 | py | Python | tests/test_unasync.py | nsidnev/unasyncer | e48f9104b123707f621adce87721f1028912094d | [
"MIT"
] | null | null | null | tests/test_unasync.py | nsidnev/unasyncer | e48f9104b123707f621adce87721f1028912094d | [
"MIT"
] | null | null | null | tests/test_unasync.py | nsidnev/unasyncer | e48f9104b123707f621adce87721f1028912094d | [
"MIT"
] | null | null | null | import os
import pathlib
import pytest
from unasyncer.unasync import unasync_path
@pytest.fixture
def expected_unasynced_code(sources: pathlib.Path) -> str:
with open(sources / "right_sync.py") as right_sync_file:
return right_sync_file.read()
def test_create_right_sync_structure_for_dir(sources: path... | 28.234043 | 80 | 0.712509 |
4a1b9fce96b9c9acdff3098e6234608f93bcd4a1 | 27,024 | py | Python | src/pretix/base/signals.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/base/signals.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/base/signals.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import warnings
from typing import Any, Callable, List, Tuple
import django.dispatch
from django.apps import apps
from django.conf import settings
from django.dispatch.dispatcher import NO_RECEIVERS
from .models import Event
app_cache = {}
def _populate_app_cache():
global app_cache
apps.check_apps_ready()... | 38.061972 | 120 | 0.729315 |
4a1b9ff8969405142293748d3e19d2f62807d220 | 7,168 | py | Python | packages/python/plotly/plotly/graph_objs/scattergl/_line.py | eranws/plotly.py | 5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/scattergl/_line.py | eranws/plotly.py | 5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/scattergl/_line.py | eranws/plotly.py | 5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Line(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scattergl"
_path_str = "scattergl.line"
_valid_props = {"color", "dash", "shape", "width"}
... | 31.165217 | 82 | 0.527623 |
4a1ba0697069f81bec8ee3fd2f3e7ae3c9e8051e | 4,943 | py | Python | cirq-core/cirq/interop/quirk/cells/control_cells_test.py | dabacon/Cirq | 54286063f679d67501ff1b905cd16b879feaae27 | [
"Apache-2.0"
] | 1 | 2021-04-29T15:30:32.000Z | 2021-04-29T15:30:32.000Z | cirq-core/cirq/interop/quirk/cells/control_cells_test.py | bradyb/Cirq | 610b0d4ea3a7862169610797266734c844ddcc1f | [
"Apache-2.0"
] | 1 | 2020-04-03T20:23:20.000Z | 2020-04-03T20:23:20.000Z | cirq-core/cirq/interop/quirk/cells/control_cells_test.py | bradyb/Cirq | 610b0d4ea3a7862169610797266734c844ddcc1f | [
"Apache-2.0"
] | 2 | 2021-09-22T11:16:46.000Z | 2021-09-23T12:55:22.000Z | # Copyright 2019 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 30.325153 | 95 | 0.500303 |
4a1ba0b5463d6f10801673a6153e02189f5026f9 | 4,573 | py | Python | src/analyzeScenario.py | shinshio/AC2C | 3d7d5ce33a6d2e77a8ae2cd697bd6db4518b0bf8 | [
"OLDAP-2.2.1"
] | null | null | null | src/analyzeScenario.py | shinshio/AC2C | 3d7d5ce33a6d2e77a8ae2cd697bd6db4518b0bf8 | [
"OLDAP-2.2.1"
] | null | null | null | src/analyzeScenario.py | shinshio/AC2C | 3d7d5ce33a6d2e77a8ae2cd697bd6db4518b0bf8 | [
"OLDAP-2.2.1"
] | null | null | null | # coding: utf-8
'''
Analyze scenario and, extract each items.
items:cover, scenario, CAN, Relay information ...
TODO:
No Item.
'''
# import from std
import sys
# import from pypi
import pandas as pd
def takeInCover(filename: str) -> list:
"""
Take in cover information from scenario file
Parame... | 23.572165 | 97 | 0.563306 |
4a1ba38fbd883569b92f720b0c94418d8328c3cf | 4,615 | bzl | Python | tensorflow/core/platform/build_config.bzl | jraman/tensorflow | 41c6bf7c6215bea9bfb9bf0a9b63f2084e6f3058 | [
"Apache-2.0"
] | 1 | 2020-02-15T14:00:01.000Z | 2020-02-15T14:00:01.000Z | tensorflow/core/platform/build_config.bzl | rakeshacharya-d/tensorflow | 9028828d3b8a2a622f7203a317002cc749531695 | [
"Apache-2.0"
] | 1 | 2022-02-10T01:08:48.000Z | 2022-02-10T01:08:48.000Z | tensorflow/core/platform/build_config.bzl | rakeshacharya-d/tensorflow | 9028828d3b8a2a622f7203a317002cc749531695 | [
"Apache-2.0"
] | null | null | null | """Provides a redirection point for platform specific implementations of starlark utilities."""
load(
"//tensorflow/core/platform/default:build_config.bzl",
_if_llvm_aarch64_available = "if_llvm_aarch64_available",
_pyx_library = "pyx_library",
_tf_additional_all_protos = "tf_additional_all_protos",
... | 50.714286 | 95 | 0.855038 |
4a1ba5d3141bc005f7093dc1de3b73f0218e0f47 | 274 | py | Python | ex_08_05/ex_08_05.py | rovelee/py4e | 32125f5d62b6c7b6a56c8e1a250c1d81c6d54006 | [
"MIT"
] | null | null | null | ex_08_05/ex_08_05.py | rovelee/py4e | 32125f5d62b6c7b6a56c8e1a250c1d81c6d54006 | [
"MIT"
] | null | null | null | ex_08_05/ex_08_05.py | rovelee/py4e | 32125f5d62b6c7b6a56c8e1a250c1d81c6d54006 | [
"MIT"
] | null | null | null | fname = 'mbox-short.txt'
fh = open(fname)
count = 0
for line in fh:
if not line.startswith('From:'):
continue
lsl = line.split()
eml = lsl[1]
print(eml)
count = count + 1
print('There were %d lines in the file with From as the first word'%count)
| 22.833333 | 74 | 0.620438 |
4a1ba72bc45ec4c707293b985e89da042358b4f0 | 23,478 | py | Python | Fill.py | ThreePendants/OoT-Randomizer | 001d7823281bc8e9684058203df339aac1263062 | [
"MIT"
] | null | null | null | Fill.py | ThreePendants/OoT-Randomizer | 001d7823281bc8e9684058203df339aac1263062 | [
"MIT"
] | null | null | null | Fill.py | ThreePendants/OoT-Randomizer | 001d7823281bc8e9684058203df339aac1263062 | [
"MIT"
] | null | null | null | import random
import logging
from State import State
from Rules import set_shop_rules
from Location import DisableType
from LocationList import location_groups
from ItemPool import songlist, get_junk_item, item_groups, remove_junk_items
from ItemList import item_table
from Item import ItemFactory
from Search import Sea... | 48.810811 | 278 | 0.683534 |
4a1ba830c98d6428367b858c1f35638a26e76c1e | 84,150 | py | Python | Lib/test/test_math.py | gerph/cpython | 98813cb03c2371789669c3d8debf8fca2a344de9 | [
"CNRI-Python-GPL-Compatible"
] | 2,441 | 2020-07-31T06:45:53.000Z | 2022-03-30T15:56:49.000Z | Lib/test/test_math.py | gerph/cpython | 98813cb03c2371789669c3d8debf8fca2a344de9 | [
"CNRI-Python-GPL-Compatible"
] | 238 | 2020-10-21T04:54:00.000Z | 2022-03-31T21:49:03.000Z | Lib/test/test_math.py | gerph/cpython | 98813cb03c2371789669c3d8debf8fca2a344de9 | [
"CNRI-Python-GPL-Compatible"
] | 93 | 2020-08-09T12:00:17.000Z | 2022-03-25T07:57:24.000Z | # Python test set -- math module
# XXXX Should not do tests around zero only
from test.support import run_unittest, verbose, requires_IEEE_754
from test import support
import unittest
import itertools
import decimal
import math
import os
import platform
import random
import struct
import sys
eps = 1E-05
NAN = float(... | 41.310751 | 98 | 0.56574 |
4a1ba9e317be7c16062368d40d123f917b95afb4 | 929 | py | Python | object_detection/parser.py | tugot17/Pytorch-Lightning-Templates- | 36ec7ac8f1699e4e266f0d4f08df67a2873ba0f8 | [
"MIT"
] | 2 | 2020-11-04T19:14:51.000Z | 2021-03-04T13:14:17.000Z | object_detection/parser.py | tugot17/Pytorch-Lightning-Templates- | 36ec7ac8f1699e4e266f0d4f08df67a2873ba0f8 | [
"MIT"
] | null | null | null | object_detection/parser.py | tugot17/Pytorch-Lightning-Templates- | 36ec7ac8f1699e4e266f0d4f08df67a2873ba0f8 | [
"MIT"
] | null | null | null | import json
from pathlib import Path
from typing import List, Union
from icevision.all import parsers, IDMap, ClassMap, BBox
class ArtifactParser(parsers.FasterRCNN, parsers.FilepathMixin, parsers.SizeMixin):
def __init__(self, df):
self.df = df
self.imageid_map = IDMap()
self.class_map = ... | 25.805556 | 83 | 0.630786 |
4a1baa6eccd0dd667225fbec048fbb7ac6a19eac | 577 | py | Python | tests/rst/__init__.py | LudditeLabs/autodoc-tool | b4ae7e3b61907e7e9c3a1b534fce055e5860ffab | [
"Apache-2.0"
] | null | null | null | tests/rst/__init__.py | LudditeLabs/autodoc-tool | b4ae7e3b61907e7e9c3a1b534fce055e5860ffab | [
"Apache-2.0"
] | null | null | null | tests/rst/__init__.py | LudditeLabs/autodoc-tool | b4ae7e3b61907e7e9c3a1b534fce055e5860ffab | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Luddite Labs Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 41.214286 | 74 | 0.767764 |
4a1baaf2b4f6eb30b14993dc570d8d4c542fecc9 | 1,386 | py | Python | templates/drawDifferentialMissingnessPlot.py | sickle-in-africa/h3agwas | b0d7eccc48f4a2c70f9d606ca9f9589a32e27924 | [
"MIT"
] | null | null | null | templates/drawDifferentialMissingnessPlot.py | sickle-in-africa/h3agwas | b0d7eccc48f4a2c70f9d606ca9f9589a32e27924 | [
"MIT"
] | null | null | null | templates/drawDifferentialMissingnessPlot.py | sickle-in-africa/h3agwas | b0d7eccc48f4a2c70f9d606ca9f9589a32e27924 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.ticker import MaxNLocator
import pandas as pd
import numpy as np
import argparse
import sys
import math
import bisect
from scipy.stats import gaussian_kde
def parseArgum... | 29.489362 | 84 | 0.715007 |
4a1babca2ca0a07d11c138954674dd72309b2d9e | 24,651 | py | Python | Packs/CrowdStrikeFalconSandbox/Integrations/CrowdstrikeFalconSandboxV2/CrowdStrikeFalconSandboxV2.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/CrowdStrikeFalconSandbox/Integrations/CrowdstrikeFalconSandboxV2/CrowdStrikeFalconSandboxV2.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/CrowdStrikeFalconSandbox/Integrations/CrowdstrikeFalconSandboxV2/CrowdStrikeFalconSandboxV2.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | from requests import Response
import demistomock as demisto
from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
import requests
import traceback
from typing import Dict, Any, Callable
# Disable insecure warnings
requests.packages.urllib3.disable_warnings() # pylint: disable=no-member
SE... | 47.043893 | 118 | 0.626465 |
4a1bac05e34ecef21220e3dbcf0d3da83dd5cc40 | 2,149 | py | Python | aiconf/model.py | mmoran0032/aiconf-allennlp-tutorial | f3e68ce6b7de0a2e470a2cc3e5ec8daf557fe3b7 | [
"Apache-2.0"
] | null | null | null | aiconf/model.py | mmoran0032/aiconf-allennlp-tutorial | f3e68ce6b7de0a2e470a2cc3e5ec8daf557fe3b7 | [
"Apache-2.0"
] | null | null | null | aiconf/model.py | mmoran0032/aiconf-allennlp-tutorial | f3e68ce6b7de0a2e470a2cc3e5ec8daf557fe3b7 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, Optional
from allennlp.data.vocabulary import Vocabulary
from allennlp.models import Model
from allennlp.modules.text_field_embedders import TextFieldEmbedder
from allennlp.modules.seq2vec_encoders import Seq2VecEncoder
from allennlp.nn.util import get_text_field_mask
from allennlp.training.me... | 33.578125 | 88 | 0.655654 |
4a1bac824dea14375f9cd2820282646c5dcf3365 | 8,262 | py | Python | apps/psystem_2d/psystem.py | arashb/pyclaw | dbe0bc28ed801b16c501bdff58012c30f7a90b9f | [
"BSD-3-Clause"
] | 1 | 2018-03-26T11:51:17.000Z | 2018-03-26T11:51:17.000Z | apps/psystem_2d/psystem.py | arashb/pyclaw | dbe0bc28ed801b16c501bdff58012c30f7a90b9f | [
"BSD-3-Clause"
] | null | null | null | apps/psystem_2d/psystem.py | arashb/pyclaw | dbe0bc28ed801b16c501bdff58012c30f7a90b9f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import numpy as np
# material parameters
E1=1.; p1=1.
E2=4.; p2=4.
# interface parameters
alphax=0.5; deltax=1.
alphay=0.5; deltay=1.
# Linearity parameters
linearity_mat1=2; linearity_mat2=2
# heterogeneity type
het_type='checkerboard'
#het_type='sinusoidal'
#het_type='smo... | 34.860759 | 131 | 0.614984 |
4a1bac8e5e106e21b89b5e6cc96941427993f0bd | 3,879 | py | Python | tensorflow/python/distribute/one_device_strategy_test.py | satsumas/tensorflow | 6a286bfcfeebcfa2b91b95334d83d9f0edf735b9 | [
"Apache-2.0"
] | 2 | 2019-06-26T14:51:16.000Z | 2021-08-07T08:40:01.000Z | tensorflow/python/distribute/one_device_strategy_test.py | jensfreudenau/tensorflow | 3fe3f2b1984aab6f159b89aa3ab0069988925689 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/distribute/one_device_strategy_test.py | jensfreudenau/tensorflow | 3fe3f2b1984aab6f159b89aa3ab0069988925689 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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... | 36.59434 | 80 | 0.760505 |
4a1bacdbce80f66eeb70c948ce0467249a536ad3 | 14,161 | py | Python | ec2api/tests/unit/test_ec2utils.py | JioCloudVPC/compute-ec2-api-vagrant | 9e7cf7b566f86aee4a0c73316533e1c410d1a897 | [
"Apache-2.0"
] | null | null | null | ec2api/tests/unit/test_ec2utils.py | JioCloudVPC/compute-ec2-api-vagrant | 9e7cf7b566f86aee4a0c73316533e1c410d1a897 | [
"Apache-2.0"
] | null | null | null | ec2api/tests/unit/test_ec2utils.py | JioCloudVPC/compute-ec2-api-vagrant | 9e7cf7b566f86aee4a0c73316533e1c410d1a897 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014
# The Cloudscaling Group, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 45.533762 | 77 | 0.648401 |
4a1bad3442b25b8e45c6a7bbdcec2d1ee4973064 | 12,968 | py | Python | Lib/test/test_pulldom.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 5,926 | 2015-01-01T07:45:08.000Z | 2022-03-31T12:34:38.000Z | Lib/test/test_pulldom.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 1,728 | 2015-01-01T01:09:12.000Z | 2022-03-30T23:25:22.000Z | Lib/test/test_pulldom.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 574 | 2015-01-02T01:36:10.000Z | 2022-03-26T10:18:48.000Z | import io
import unittest
import xml.sax
from xml.sax.xmlreader import AttributesImpl
from xml.sax.handler import feature_external_ges
from xml.dom import pulldom
from test.support import findfile
tstfile = findfile("test.xml", subdir="xmltestdata")
# A handy XML snippet, containing attributes, a namespace prefix,... | 36.32493 | 98 | 0.628933 |
4a1badc0b506761ac81209545641a14aedb0ab7f | 284 | py | Python | src/main.py | aaaaaaaalesha/stack_machine | ca54f59ffb315338d2b196a627feacc45842d50e | [
"MIT"
] | null | null | null | src/main.py | aaaaaaaalesha/stack_machine | ca54f59ffb315338d2b196a627feacc45842d50e | [
"MIT"
] | null | null | null | src/main.py | aaaaaaaalesha/stack_machine | ca54f59ffb315338d2b196a627feacc45842d50e | [
"MIT"
] | null | null | null | # Copyright 2021 aaaaaaaalesha <sks2311211@mail.ru>
from src.stack_machine import StackMachine
if __name__ == '__main__':
"""Example from the task."""
with open('../binomial.txt', 'r') as f:
source_code = f.read()
sm = StackMachine(source_code)
sm.launch()
| 23.666667 | 51 | 0.661972 |
4a1bae765e76caf87fcdf1c2148949164d164b9a | 11,324 | py | Python | train.py | heavenbean/tacotron2 | 361abdcb3130601726c770bce929e443c9009d9e | [
"BSD-3-Clause"
] | null | null | null | train.py | heavenbean/tacotron2 | 361abdcb3130601726c770bce929e443c9009d9e | [
"BSD-3-Clause"
] | null | null | null | train.py | heavenbean/tacotron2 | 361abdcb3130601726c770bce929e443c9009d9e | [
"BSD-3-Clause"
] | null | null | null | import os
import time
import argparse
import math
from numpy import finfo
import torch
from distributed import apply_gradient_allreduce
import torch.distributed as dist
from torch.utils.data.distributed import DistributedSampler
from torch.utils.data import DataLoader
from model import Tacotron2
from data_utils impor... | 38.256757 | 94 | 0.648534 |
4a1bb0c6ee559c920e315a41c8daf3dd88aa4c53 | 3,351 | py | Python | recipes/g2o/master/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | null | null | null | recipes/g2o/master/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | 3 | 2021-02-15T08:48:16.000Z | 2021-02-24T16:35:54.000Z | recipes/g2o/master/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | null | null | null | import os
from conans import ConanFile, CMake, tools
class Libg2oConan(ConanFile):
name = "g2o"
upstream_version = "master"
package_revision = ""
version = "{0}{1}".format(upstream_version, package_revision)
generators = "cmake"
settings = "os", "arch", "compiler", "build_type"
options = ... | 36.423913 | 116 | 0.623993 |
4a1bb1d8ad1b77be1b6b226fd465f8b1453aaffd | 15,822 | py | Python | alba/AA-Jacob-Heyblocq/reuse/scripts/bijdragersAAJH-WerkenInEuropeana.py | KBNLwikimedia/Alba-Amicorum | e41e10518830ec83a2a43d292b8c73b940f912a9 | [
"CC0-1.0"
] | null | null | null | alba/AA-Jacob-Heyblocq/reuse/scripts/bijdragersAAJH-WerkenInEuropeana.py | KBNLwikimedia/Alba-Amicorum | e41e10518830ec83a2a43d292b8c73b940f912a9 | [
"CC0-1.0"
] | null | null | null | alba/AA-Jacob-Heyblocq/reuse/scripts/bijdragersAAJH-WerkenInEuropeana.py | KBNLwikimedia/Alba-Amicorum | e41e10518830ec83a2a43d292b8c73b940f912a9 | [
"CC0-1.0"
] | null | null | null | # Aim: Find works in Europeana by/from/about/related to the contributors to the Album amicorum Jacob Heyblocq
# Output of this script: https://github.com/KBNLwikimedia/Alba-Amicorum/blob/main/alba/AA-Jacob-Heyblocq/reuse/excels/AAJH-contributors-works-Europeana.xlsx
# Script is not fully finished and/or 100% reli... | 51.203883 | 498 | 0.601315 |
4a1bb31a4f0b7f37f1f98f1fa6d5c3a0d3868217 | 1,284 | py | Python | Lib/idlelib/MultiStatusBar.py | sireliah/polish-python | 605df4944c2d3bc25f8bf6964b274c0a0d297cc3 | [
"PSF-2.0"
] | 1 | 2018-06-21T18:21:24.000Z | 2018-06-21T18:21:24.000Z | Lib/idlelib/MultiStatusBar.py | sireliah/polish-python | 605df4944c2d3bc25f8bf6964b274c0a0d297cc3 | [
"PSF-2.0"
] | null | null | null | Lib/idlelib/MultiStatusBar.py | sireliah/polish-python | 605df4944c2d3bc25f8bf6964b274c0a0d297cc3 | [
"PSF-2.0"
] | null | null | null | z tkinter zaimportuj *
klasa MultiStatusBar(Frame):
def __init__(self, master=Nic, **kw):
jeżeli master jest Nic:
master = Tk()
Frame.__init__(self, master, **kw)
self.labels = {}
def set_label(self, name, text='', side=LEFT):
jeżeli name nie w self.labels:
... | 27.913043 | 77 | 0.595016 |
4a1bb399f2d63bd74cd98642f8e4f22438213b7d | 1,516 | py | Python | summary.py | bubbliiiing/mobilenet-yolov4-pytorch | ae3dd3bf307b1f3061765722a23b0b3e1037eaa0 | [
"MIT"
] | 55 | 2021-12-09T06:57:33.000Z | 2022-03-29T05:35:44.000Z | summary.py | bubbliiiing/mobilenet-yolov4-pytorch | ae3dd3bf307b1f3061765722a23b0b3e1037eaa0 | [
"MIT"
] | 8 | 2021-12-21T00:57:34.000Z | 2022-03-22T15:49:07.000Z | summary.py | bubbliiiing/mobilenet-yolov4-pytorch | ae3dd3bf307b1f3061765722a23b0b3e1037eaa0 | [
"MIT"
] | 28 | 2021-12-10T08:38:24.000Z | 2022-03-29T06:47:26.000Z | #--------------------------------------------#
# 该部分代码用于看网络结构
#--------------------------------------------#
import torch
from thop import clever_format, profile
from torchsummary import summary
from nets.yolo import YoloBody
if __name__ == "__main__":
input_shape = [416, 416]
anchors_mask ... | 37.9 | 83 | 0.537599 |
4a1bb4ee00c382294ce10b617298df0b11dfdbf5 | 5,465 | py | Python | docs/source/conf.py | leoleoasd/dgl-ke | 3a6f7635421a10f6276936b63c56738ba0fcd044 | [
"Apache-2.0"
] | 1 | 2022-03-27T07:19:35.000Z | 2022-03-27T07:19:35.000Z | docs/source/conf.py | leoleoasd/dgl-ke | 3a6f7635421a10f6276936b63c56738ba0fcd044 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | leoleoasd/dgl-ke | 3a6f7635421a10f6276936b63c56738ba0fcd044 | [
"Apache-2.0"
] | 1 | 2022-03-27T15:26:36.000Z | 2022-03-27T15:26:36.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 29.540541 | 79 | 0.643916 |
4a1bb5371f6fbeff1afff233141bfd3fd2514d8d | 1,013 | py | Python | plaso/formatters/bsm.py | Defense-Cyber-Crime-Center/plaso | 4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47 | [
"Apache-2.0"
] | 2 | 2016-02-18T12:46:29.000Z | 2022-03-13T03:04:59.000Z | plaso/formatters/bsm.py | CNR-ITTIG/plasodfaxp | 923797fc00664fa9e3277781b0334d6eed5664fd | [
"Apache-2.0"
] | null | null | null | plaso/formatters/bsm.py | CNR-ITTIG/plasodfaxp | 923797fc00664fa9e3277781b0334d6eed5664fd | [
"Apache-2.0"
] | 6 | 2016-12-18T08:05:36.000Z | 2021-04-06T14:19:11.000Z | # -*- coding: utf-8 -*-
"""The Basic Security Module (BSM) binary files event formatter."""
from plaso.formatters import interface
from plaso.formatters import manager
class BSMFormatter(interface.ConditionalEventFormatter):
"""Formatter for an BSM log entry."""
DATA_TYPE = u'bsm:event'
FORMAT_STRING_PIECES ... | 23.022727 | 67 | 0.694965 |
4a1bb6648bf8a2fafa5125e79b74decf4086260e | 4,031 | py | Python | rubin_changelog/repository.py | womullan/lsst_git_changelog | 63d27f6540146ec78071fac555a45494e7ed31f6 | [
"BSD-2-Clause"
] | 2 | 2017-02-27T17:34:17.000Z | 2020-06-01T06:07:44.000Z | rubin_changelog/repository.py | womullan/lsst_git_changelog | 63d27f6540146ec78071fac555a45494e7ed31f6 | [
"BSD-2-Clause"
] | 3 | 2020-07-15T03:38:48.000Z | 2021-09-22T20:03:44.000Z | rubin_changelog/repository.py | womullan/lsst_git_changelog | 63d27f6540146ec78071fac555a45494e7ed31f6 | [
"BSD-2-Clause"
] | 4 | 2021-07-22T22:56:14.000Z | 2022-01-26T01:10:02.000Z | import logging
import os
import re
import shutil
import subprocess
from datetime import datetime
from typing import List, Set, Optional
def call_git(*args: str, cwd: str, git_exec: str = "/usr/bin/git") -> str:
to_exec = [git_exec] + list(args)
logging.debug(to_exec)
logging.debug(cwd)
return subpro... | 32.248 | 104 | 0.573059 |
4a1bb809b47bc6c5e01f998daf103fe39d51d9bf | 734 | py | Python | CountMillionCharacters-Variations/variation1.py | thiru15/Python-1 | f276f34a77579e552ca2adb3b5a3a1b0f3ebddee | [
"MIT"
] | 12 | 2019-12-27T07:32:35.000Z | 2022-02-20T20:15:08.000Z | CountMillionCharacters-Variations/variation1.py | DiasNikita/Python | f276f34a77579e552ca2adb3b5a3a1b0f3ebddee | [
"MIT"
] | 1 | 2020-10-01T14:14:31.000Z | 2020-10-01T14:14:58.000Z | CountMillionCharacters-Variations/variation1.py | DiasNikita/Python | f276f34a77579e552ca2adb3b5a3a1b0f3ebddee | [
"MIT"
] | 22 | 2019-10-06T20:30:25.000Z | 2022-01-11T16:31:14.000Z | try:
input = raw_input
except NameError:
pass
def count_chars(filename):
count = {}
with open(filename) as info: # inputFile Replaced with filename
readfile = info.read()
for character in readfile.upper():
count[character] = count.get(character, 0) + 1
return count
... | 22.9375 | 68 | 0.584469 |
4a1bb87547952d4c4b7386524b075668da1c21bb | 5,703 | py | Python | roblox/bases/baseuniverse.py | Boegie19/ro.py | 68b8acb506ab3057670168434fbf90ea0d05943f | [
"MIT"
] | null | null | null | roblox/bases/baseuniverse.py | Boegie19/ro.py | 68b8acb506ab3057670168434fbf90ea0d05943f | [
"MIT"
] | null | null | null | roblox/bases/baseuniverse.py | Boegie19/ro.py | 68b8acb506ab3057670168434fbf90ea0d05943f | [
"MIT"
] | 1 | 2021-06-28T14:57:39.000Z | 2021-06-28T14:57:39.000Z | """
This file contains the BaseUniverse object, which represents a Roblox universe ID.
It also contains the UniverseLiveStats object, which represents a universe's live stats.
"""
from __future__ import annotations
from typing import TYPE_CHECKING, Dict, List
if TYPE_CHECKING:
from ..badges import Badge
from ... | 34.98773 | 116 | 0.649833 |
4a1bb92180789809a2104b418ab394c7c5d123c3 | 110 | py | Python | examples/compare.py | tebzzz/archon | 5276e06ccc2e08e034473108a4dd8e36b6ba6078 | [
"MIT"
] | 78 | 2018-09-20T12:50:42.000Z | 2021-12-17T11:44:03.000Z | examples/compare.py | tebzzz/archon | 5276e06ccc2e08e034473108a4dd8e36b6ba6078 | [
"MIT"
] | 49 | 2018-11-18T16:58:27.000Z | 2019-09-29T18:41:51.000Z | examples/compare.py | tebzzz/archon | 5276e06ccc2e08e034473108a4dd8e36b6ba6078 | [
"MIT"
] | 21 | 2018-09-20T11:31:50.000Z | 2021-10-19T17:01:47.000Z | import archon.feeds.cryptocompare as cryptocompare
e = "Kucoin"
h = cryptocompare.get_hist("LTC","BTC",e)
| 18.333333 | 50 | 0.736364 |
4a1bb92ba321da397a256c3423be0478285ba832 | 15,216 | py | Python | sympy/physics/vector/point.py | Corwinpro/sympy | a2efa19333fa0b3b18db872efabbb46248cde63b | [
"BSD-3-Clause"
] | 15 | 2020-06-29T08:33:39.000Z | 2022-02-12T00:28:51.000Z | sympy/physics/vector/point.py | Corwinpro/sympy | a2efa19333fa0b3b18db872efabbb46248cde63b | [
"BSD-3-Clause"
] | 13 | 2020-03-24T17:53:51.000Z | 2022-02-10T20:01:14.000Z | sympy/physics/vector/point.py | Corwinpro/sympy | a2efa19333fa0b3b18db872efabbb46248cde63b | [
"BSD-3-Clause"
] | 11 | 2020-06-29T08:40:24.000Z | 2022-02-24T17:39:16.000Z | from __future__ import print_function, division
from sympy.core.compatibility import range, string_types
from .vector import Vector, _check_vector
from .frame import _check_frame
__all__ = ['Point']
class Point(object):
"""This object represents a point in a dynamic system.
It stores the: position, velocity... | 30.492986 | 82 | 0.541732 |
4a1bbb894ac6a047c11cb8ce7e34177f1bef1449 | 615 | py | Python | setup.py | TravisJRCain/lambdata-zmurray | 61a906c896ec629e2cd486b300b04921159840da | [
"MIT"
] | null | null | null | setup.py | TravisJRCain/lambdata-zmurray | 61a906c896ec629e2cd486b300b04921159840da | [
"MIT"
] | null | null | null | setup.py | TravisJRCain/lambdata-zmurray | 61a906c896ec629e2cd486b300b04921159840da | [
"MIT"
] | null | null | null | # setup.py file
from setuptools import find_packages, setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="lambdata-zmurray", # the name that you will install via pip
version="1.2",
author="Zack Murray",
author_email="zachery.murray@gmail.com",
description="A sho... | 30.75 | 94 | 0.700813 |
4a1bbc0956f7996313736d93816db3f8f5b0f092 | 1,787 | py | Python | tests/bugs/core_2067_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2022-02-05T11:37:13.000Z | 2022-02-05T11:37:13.000Z | tests/bugs/core_2067_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-09-03T11:47:00.000Z | 2021-09-03T12:42:10.000Z | tests/bugs/core_2067_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-06-30T14:14:16.000Z | 2021-06-30T14:14:16.000Z | #coding:utf-8
#
# id: bugs.core_2067
# title: GROUP by and RDB$DB_KEY problems
# decription:
# tracker_id: CORE-2067
# min_versions: []
# versions: 2.5.0
# qmid: None
import pytest
from firebird.qa import db_factory, isql_act, Action
# version: 2.5.0
# resources: None
substitutions_... | 25.898551 | 109 | 0.672636 |
4a1bbc1d002785f3c7bbae4630b128546892f67d | 405 | py | Python | blog/serializers.py | canokay/coblog-backend | 51854ed2d69f8484877bc9dcc95c19e3aa7d4107 | [
"MIT"
] | 1 | 2020-12-19T15:55:47.000Z | 2020-12-19T15:55:47.000Z | blog/serializers.py | canokay/coblog-backend | 51854ed2d69f8484877bc9dcc95c19e3aa7d4107 | [
"MIT"
] | null | null | null | blog/serializers.py | canokay/coblog-backend | 51854ed2d69f8484877bc9dcc95c19e3aa7d4107 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from rest_framework.serializers import ModelSerializer
from blog.models import Blog
class BlogListSerializer(ModelSerializer):
class Meta:
model = Blog
fields = ['id','title','slug','content','is_active']
class BlogDetailSerializer(ModelSerializer):
clas... | 27 | 60 | 0.708642 |
4a1bbc2fe91a78228e6b27d66123adad72d4eb6b | 3,435 | py | Python | sdk/communication/azure-mgmt-communication/azure/mgmt/communication/_configuration.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/communication/azure-mgmt-communication/azure/mgmt/communication/_configuration.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 2 | 2021-11-03T06:10:36.000Z | 2021-12-01T06:29:39.000Z | sdk/communication/azure-mgmt-communication/azure/mgmt/communication/_configuration.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 1 | 2021-05-19T02:55:10.000Z | 2021-05-19T02:55:10.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 47.708333 | 174 | 0.695488 |
4a1bbcb45603daa705d1b49be50128d8ff576329 | 4,115 | py | Python | benchmark/startCirq1544.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startCirq1544.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startCirq1544.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=5
# total number=56
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | 39.190476 | 77 | 0.64593 |
4a1bbed8bb2565d4ad0b36fa8cb795ab82feadcb | 1,074 | py | Python | mac/google-cloud-sdk/lib/third_party/requests_oauthlib/compliance_fixes/facebook.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | mac/google-cloud-sdk/lib/third_party/requests_oauthlib/compliance_fixes/facebook.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 11 | 2020-02-29T02:51:12.000Z | 2022-03-30T23:20:08.000Z | mac/google-cloud-sdk/lib/third_party/requests_oauthlib/compliance_fixes/facebook.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 1 | 2020-07-25T18:17:57.000Z | 2020-07-25T18:17:57.000Z | from json import dumps
try:
from urlparse import parse_qsl
except ImportError:
from urllib.parse import parse_qsl
from oauthlib.common import to_unicode
def facebook_compliance_fix(session):
def _compliance_fix(r):
# if Facebook claims to be sending us json, let's trust them.
if 'application/json' in ... | 30.685714 | 76 | 0.681564 |
4a1bc02ab810db3e56985f69ba800508c8f8e9c0 | 9,370 | py | Python | dragonchain/lib/interfaces/storage_utest.py | cheeseandcereal/dragonchain | 34d34e344b887c2a0eeb591ede2015cc2506a323 | [
"Apache-2.0"
] | null | null | null | dragonchain/lib/interfaces/storage_utest.py | cheeseandcereal/dragonchain | 34d34e344b887c2a0eeb591ede2015cc2506a323 | [
"Apache-2.0"
] | null | null | null | dragonchain/lib/interfaces/storage_utest.py | cheeseandcereal/dragonchain | 34d34e344b887c2a0eeb591ede2015cc2506a323 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Dragonchain, Inc.
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
# 6. Tr... | 48.051282 | 105 | 0.746638 |
4a1bc0a80e692edd597794f82d1a51f5584a99fa | 2,869 | py | Python | google/cloud/devtools/containeranalysis_v1/types/containeranalysis.py | LaudateCorpus1/python-containeranalysis | 72c88b3f38cf4fde60d8fae7462869857719782b | [
"Apache-2.0"
] | null | null | null | google/cloud/devtools/containeranalysis_v1/types/containeranalysis.py | LaudateCorpus1/python-containeranalysis | 72c88b3f38cf4fde60d8fae7462869857719782b | [
"Apache-2.0"
] | null | null | null | google/cloud/devtools/containeranalysis_v1/types/containeranalysis.py | LaudateCorpus1/python-containeranalysis | 72c88b3f38cf4fde60d8fae7462869857719782b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 34.566265 | 129 | 0.682468 |
4a1bc0e9c2d4a0bf97e27e9bc50d7e615ad0613c | 511 | py | Python | aio-server.py | menecio/aiohttp-django-example | b7c4142a5bf6dddc7d49224cc160204159f002fc | [
"Apache-2.0"
] | 4 | 2020-04-05T10:33:01.000Z | 2020-07-16T17:27:39.000Z | aio-server.py | menecio/aiohttp-django-example | b7c4142a5bf6dddc7d49224cc160204159f002fc | [
"Apache-2.0"
] | null | null | null | aio-server.py | menecio/aiohttp-django-example | b7c4142a5bf6dddc7d49224cc160204159f002fc | [
"Apache-2.0"
] | 2 | 2020-06-14T20:36:27.000Z | 2020-11-24T03:39:11.000Z | from aiohttp import web
from django import setup
from django.conf import settings
from mymoviedb import settings as my_settings # not the same as django.conf.settings
from movies.routes import movies_app
async def setup_django(app):
settings.configure(
INSTALLED_APPS=my_settings.INSTALLED_APPS,
... | 24.333333 | 85 | 0.761252 |
4a1bc2f49e44556ecf9eb7f68ba624eb41d85b4b | 3,542 | py | Python | openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gs_ctl/Opengauss_Function_Tools_gs_ctl_Case0094.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gs_ctl/Opengauss_Function_Tools_gs_ctl_Case0094.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gs_ctl/Opengauss_Function_Tools_gs_ctl_Case0094.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 34.72549 | 84 | 0.618577 |
4a1bc331bc96a2041b2715b487b1aa526e30a932 | 5,573 | py | Python | section3.py | csivitu/TechEx-Flappy-Bird | 6f8d45d4f098c94aac122944f2e0ba9314dbda8c | [
"MIT"
] | null | null | null | section3.py | csivitu/TechEx-Flappy-Bird | 6f8d45d4f098c94aac122944f2e0ba9314dbda8c | [
"MIT"
] | null | null | null | section3.py | csivitu/TechEx-Flappy-Bird | 6f8d45d4f098c94aac122944f2e0ba9314dbda8c | [
"MIT"
] | null | null | null | import random # For generating random numbers
import sys # We will use sys.exit to exit the program
import pygame
from pygame.locals import * # Basic pygame imports
# Global Variables for the game
FPS = 40 # number of times the frame will be rendered in 1 sec
SCREENWIDTH = 289 # defining width
SCREENHEIGH... | 34.83125 | 90 | 0.594653 |
4a1bc3a36525c87113d2378e5927a9dbbbf9ee93 | 1,043 | py | Python | manage.py | Echie/MealTracker | 117fcfdfeee76af8829aca558a08675b22097c96 | [
"MIT"
] | null | null | null | manage.py | Echie/MealTracker | 117fcfdfeee76af8829aca558a08675b22097c96 | [
"MIT"
] | null | null | null | manage.py | Echie/MealTracker | 117fcfdfeee76af8829aca558a08675b22097c96 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
from pathlib import Path
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some... | 32.59375 | 77 | 0.659636 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.