hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a522e9a12bc7c4dbb25eb2263a0c78b7c949de6b | 1,155 | py | Python | noos_viewer/tokens.py | rbins-swap-team/NoosDrift | 3aafa6002567f71ad42dc685fa4e5dd0b74007b2 | [
"MIT"
] | null | null | null | noos_viewer/tokens.py | rbins-swap-team/NoosDrift | 3aafa6002567f71ad42dc685fa4e5dd0b74007b2 | [
"MIT"
] | 12 | 2020-03-13T14:12:48.000Z | 2022-03-12T00:13:46.000Z | noos_viewer/tokens.py | rbins-swap-team/NoosDrift | 3aafa6002567f71ad42dc685fa4e5dd0b74007b2 | [
"MIT"
] | null | null | null | from noos_viewer.models import UserProfile
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.utils import six
class AccountActivationTokenGenerator(PasswordResetTokenGenerator):
# def _make_hash_value(self, profile, timestamp):
def _make_hash_value(self, user, timestamp):
... | 38.5 | 77 | 0.664935 |
adcf80492ed80c423173c12c9fac9d028fe68342 | 9,708 | py | Python | angrmanagement/ui/views/data_dep_view.py | DennyDai/angr-management | 8a4ba5dafbf2f4d2ba558528a0d1ae099a199a04 | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/ui/views/data_dep_view.py | DennyDai/angr-management | 8a4ba5dafbf2f4d2ba558528a0d1ae099a199a04 | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/ui/views/data_dep_view.py | DennyDai/angr-management | 8a4ba5dafbf2f4d2ba558528a0d1ae099a199a04 | [
"BSD-2-Clause"
] | null | null | null | import logging
from typing import Optional, Dict, List, TYPE_CHECKING, Set
# noinspection PyPackageRequirements
from PySide2 import QtCore, QtWidgets, QtGui
# noinspection PyPackageRequirements
from networkx import DiGraph
from angr.analyses.data_dep import MemDepNode, RegDepNode, TmpDepNode
from .view import BaseVie... | 34.920863 | 108 | 0.649052 |
5d5fe2af14f2c09007f951ab42412797ce250ac1 | 3,720 | py | Python | python/nvidia_deepops/docker/client/dockerpy.py | samcmill/ngc-container-replicator | b5502076c78bb2904f2e57681c8b5a86285b4c45 | [
"BSD-3-Clause"
] | 20 | 2019-02-01T18:22:47.000Z | 2022-02-09T07:35:48.000Z | python/nvidia_deepops/docker/client/dockerpy.py | samcmill/ngc-container-replicator | b5502076c78bb2904f2e57681c8b5a86285b4c45 | [
"BSD-3-Clause"
] | 10 | 2019-06-03T19:25:17.000Z | 2022-01-11T03:56:38.000Z | python/nvidia_deepops/docker/client/dockerpy.py | samcmill/ngc-container-replicator | b5502076c78bb2904f2e57681c8b5a86285b4c45 | [
"BSD-3-Clause"
] | 8 | 2019-05-10T14:43:26.000Z | 2021-06-28T20:53:19.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | 36.470588 | 73 | 0.674462 |
87a99a3cde8e0dd1e46d641da481783211ec5197 | 6,076 | py | Python | profiles/views.py | magbanum/octoprofile | 07457a7273201c4009a402f6f1b818f1bb94b4e1 | [
"MIT"
] | 8 | 2021-07-03T12:59:29.000Z | 2022-01-20T13:51:05.000Z | profiles/views.py | magbanum/octoprofile | 07457a7273201c4009a402f6f1b818f1bb94b4e1 | [
"MIT"
] | null | null | null | profiles/views.py | magbanum/octoprofile | 07457a7273201c4009a402f6f1b818f1bb94b4e1 | [
"MIT"
] | 1 | 2022-02-07T17:49:37.000Z | 2022-02-07T17:49:37.000Z | from django.http.response import JsonResponse
from django.shortcuts import render
from requests.api import request
from rest_framework.views import APIView
from rest_framework.response import Response
from .forms import UsernameForm
import requests
import json
import os
def home(request):
form = UsernameForm()
... | 34.522727 | 128 | 0.612739 |
fccbefa73a76f757e43c909ac3bd97c43ede9cdf | 2,047 | py | Python | lib/googlecloudsdk/third_party/apis/pubsub/v1/resources.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/googlecloudsdk/third_party/apis/pubsub/v1/resources.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/third_party/apis/pubsub/v1/resources.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2015 Google LLC. 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 requir... | 24.963415 | 74 | 0.60723 |
b659370eb294cb3c965fe596994d80dd666be395 | 1,544 | py | Python | src/hub/dataload/sources/dbnsfp/dbnsfp_upload.py | erikyao/myvariant.info | a4eaaca7ab6c069199f8942d5afae2dece908147 | [
"Apache-2.0"
] | 39 | 2017-07-01T22:34:39.000Z | 2022-03-15T22:25:59.000Z | src/hub/dataload/sources/dbnsfp/dbnsfp_upload.py | erikyao/myvariant.info | a4eaaca7ab6c069199f8942d5afae2dece908147 | [
"Apache-2.0"
] | 105 | 2017-06-28T17:26:06.000Z | 2022-03-17T17:49:53.000Z | src/hub/dataload/sources/dbnsfp/dbnsfp_upload.py | erikyao/myvariant.info | a4eaaca7ab6c069199f8942d5afae2dece908147 | [
"Apache-2.0"
] | 14 | 2017-06-12T18:29:36.000Z | 2021-03-18T15:51:27.000Z | import os
import glob
from .dbnsfp_mapping import mapping
from .dbnsfp_parser import load_data_file as load_common
import biothings.hub.dataload.uploader as uploader
from hub.dataload.uploader import SnpeffPostUpdateUploader
from hub.dataload.storage import MyVariantIgnoreDuplicatedStorage
SRC_META = {
"url": "h... | 28.592593 | 90 | 0.698187 |
53a97d0092c399a8bd2fc40d2c55f130b7ed16d0 | 15,168 | py | Python | tronx/helpers/utilities.py | JayPatel1314/Tron | d8f2d799eea344c0d76f0fe758ce385c7ceceea7 | [
"MIT"
] | null | null | null | tronx/helpers/utilities.py | JayPatel1314/Tron | d8f2d799eea344c0d76f0fe758ce385c7ceceea7 | [
"MIT"
] | null | null | null | tronx/helpers/utilities.py | JayPatel1314/Tron | d8f2d799eea344c0d76f0fe758ce385c7ceceea7 | [
"MIT"
] | null | null | null | import re
import os
import time
import html
import math
import json
import shlex
import random
import asyncio
import aiohttp
from hachoir.metadata import extractMetadata
from hachoir.parser import createParser
from PIL import Image
from typing import List
from re import escape, sub
from pyrogram.types import Messag... | 25.664975 | 97 | 0.653481 |
cd0680c8e8001e04bf7fce86066358e6cf24e0ce | 13,576 | py | Python | custom_components/afvalwijzer/provider/afvalwijzer.py | ByKaj/homeassistant-config | 6ce207f763ba13346bdf5c463a8c3d77f45d175c | [
"MIT"
] | 1 | 2020-10-10T13:17:35.000Z | 2020-10-10T13:17:35.000Z | custom_components/afvalwijzer/provider/afvalwijzer.py | ByKaj/homeassistant-config | 6ce207f763ba13346bdf5c463a8c3d77f45d175c | [
"MIT"
] | null | null | null | custom_components/afvalwijzer/provider/afvalwijzer.py | ByKaj/homeassistant-config | 6ce207f763ba13346bdf5c463a8c3d77f45d175c | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
import json
import requests
from ..const.const import _LOGGER, SENSOR_PROVIDER_TO_URL
class AfvalWijzer(object):
##########################################################################
# INIT
##################################################################... | 40.284866 | 87 | 0.507366 |
d3e18201ed56da9208c98a4ead1b4723927e52ff | 6,056 | py | Python | simulation_scripts/msp_fiji_fluctuate.py | g33k5p34k/PleistoDistR | b02b24b16995078c68a4e2b70f5f41e8bac68da2 | [
"MIT"
] | null | null | null | simulation_scripts/msp_fiji_fluctuate.py | g33k5p34k/PleistoDistR | b02b24b16995078c68a4e2b70f5f41e8bac68da2 | [
"MIT"
] | null | null | null | simulation_scripts/msp_fiji_fluctuate.py | g33k5p34k/PleistoDistR | b02b24b16995078c68a4e2b70f5f41e8bac68da2 | [
"MIT"
] | null | null | null | '''
Made by Ethan Gyllenhaal (egyllenhaal@unm.edu)
Last updated 12 April 2022
Script for running a single msprime simulation for dynamic divergence between two islands (designed for parallel)
Takes in parameters for infile path, output path, alpha (# propagules per unit^2), and mean dispersal distance
Infile is comma ... | 48.063492 | 135 | 0.694518 |
66478b79444d18de093fdc5e02effa1a6db2c612 | 257 | py | Python | word-count/word_count.py | ederst/exercism-python | 8791f145ff4ce1a3b78ac3566fbe428ce3a3bd7b | [
"Unlicense"
] | 1 | 2021-06-25T16:09:02.000Z | 2021-06-25T16:09:02.000Z | word-count/word_count.py | ederst/exercism-python | 8791f145ff4ce1a3b78ac3566fbe428ce3a3bd7b | [
"Unlicense"
] | 1 | 2021-05-17T23:45:29.000Z | 2021-05-17T23:46:01.000Z | word-count/word_count.py | ederst/exercism-python | 8791f145ff4ce1a3b78ac3566fbe428ce3a3bd7b | [
"Unlicense"
] | null | null | null | from collections import Counter
from typing import Dict
import re
def count_words(sentence: str) -> Dict[str, int]:
# this exact solution was suggestec by the mentor (bobahop)
return Counter(re.findall(r"[a-z0-9]+(?:'[a-z]+)?", sentence.lower()))
| 28.555556 | 74 | 0.700389 |
18307df30e11f5cfd2680aedc54632202ffdea48 | 5,314 | py | Python | docs/conf.py | qqgg231/Adafruit_CircuitPython_SHT31D | bf53996fee22fa13ccb26c90e84ed7449474cab9 | [
"MIT"
] | null | null | null | docs/conf.py | qqgg231/Adafruit_CircuitPython_SHT31D | bf53996fee22fa13ccb26c90e84ed7449474cab9 | [
"MIT"
] | null | null | null | docs/conf.py | qqgg231/Adafruit_CircuitPython_SHT31D | bf53996fee22fa13ccb26c90e84ed7449474cab9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
# -- General configuration ------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extens... | 33.847134 | 324 | 0.687053 |
d83179aef51d4daa236fd403e3d9926e126d3825 | 6,000 | py | Python | network/modeling.py | nvoliver/DeepLabV3Plus-Pytorch | b9f18f7849da062aa68c4417944ba910863210dc | [
"MIT"
] | null | null | null | network/modeling.py | nvoliver/DeepLabV3Plus-Pytorch | b9f18f7849da062aa68c4417944ba910863210dc | [
"MIT"
] | null | null | null | network/modeling.py | nvoliver/DeepLabV3Plus-Pytorch | b9f18f7849da062aa68c4417944ba910863210dc | [
"MIT"
] | null | null | null | from .utils import IntermediateLayerGetter
from ._deeplab import DeepLabHead, DeepLabHeadV3Plus, DeepLabV3
from .backbone import resnet
from .backbone import mobilenetv2
def _segm_resnet(name, backbone_name, num_classes, output_stride, pretrained_backbone):
# Modifcation: Option to override dilation
override_... | 40.540541 | 137 | 0.736333 |
2f9328eff5ba9eecd4ee4d5cef8d43bf8cbb4848 | 1,075 | py | Python | mkt/prices/tests/test_utils.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | mkt/prices/tests/test_utils.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | mkt/prices/tests/test_utils.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | from StringIO import StringIO
from nose.tools import eq_
import amo.tests
from mkt.prices.models import Price, PriceCurrency
from mkt.prices.utils import update, update_from_csv
tiers = [
{'USD': '0.99', 'BRL': '1.99'},
# This row should be ignored, no tier of value 3.
{'USD': '3.00'},
# This row sh... | 28.289474 | 79 | 0.654884 |
e134b4db1803380cbd4f9909d307d3ba012eee67 | 1,935 | py | Python | fastapi/reportapi.py | fahadysf/fy-az-func-test | 60cfd5dc2899a3ea0f960075f953dcc5f95f39c9 | [
"MIT"
] | null | null | null | fastapi/reportapi.py | fahadysf/fy-az-func-test | 60cfd5dc2899a3ea0f960075f953dcc5f95f39c9 | [
"MIT"
] | null | null | null | fastapi/reportapi.py | fahadysf/fy-az-func-test | 60cfd5dc2899a3ea0f960075f953dcc5f95f39c9 | [
"MIT"
] | null | null | null | import azure.functions as func
import fastapi
from fastapi.templating import Jinja2Templates
from .http_asgi import AsgiMiddleware
from .reports import gen_data
import xmltodict
import json
app = fastapi.FastAPI()
templates = Jinja2Templates(directory="./templates")
@app.get("/api/report/")
async def get_report_dat... | 31.209677 | 76 | 0.636693 |
962ada4dd58c8d3fc911d6834cdf9620f56983aa | 621 | py | Python | torch_em/util/__init__.py | JonasHell/torch-em | 2e008e0cd2f0ea6681581374fce4f9f47b986d55 | [
"MIT"
] | 13 | 2021-03-09T21:31:09.000Z | 2022-03-21T05:24:26.000Z | torch_em/util/__init__.py | JonasHell/torch-em | 2e008e0cd2f0ea6681581374fce4f9f47b986d55 | [
"MIT"
] | 16 | 2021-03-02T23:19:34.000Z | 2022-03-25T19:43:41.000Z | torch_em/util/__init__.py | JonasHell/torch-em | 2e008e0cd2f0ea6681581374fce4f9f47b986d55 | [
"MIT"
] | 4 | 2021-05-18T08:29:33.000Z | 2022-02-11T12:16:20.000Z | from .image import load_image, supports_memmap
from .modelzoo import (add_weight_formats,
convert_to_onnx,
convert_to_torchscript,
export_bioimageio_model,
export_parser_helper,
get_default_citations,
... | 44.357143 | 62 | 0.63124 |
017f59f5abbad366d108989ca80a6aed2d6c4cd4 | 8,594 | py | Python | malt/models/regressor.py | uli-ai/malt | ad8120056a35ec306c7f3058310ca2034f18faa3 | [
"MIT"
] | null | null | null | malt/models/regressor.py | uli-ai/malt | ad8120056a35ec306c7f3058310ca2034f18faa3 | [
"MIT"
] | null | null | null | malt/models/regressor.py | uli-ai/malt | ad8120056a35ec306c7f3058310ca2034f18faa3 | [
"MIT"
] | 1 | 2021-03-21T03:12:51.000Z | 2021-03-21T03:12:51.000Z | # =============================================================================
# IMPORTS
# =============================================================================
import abc
import torch
# =============================================================================
# BASE CLASSES
# ============================... | 29.431507 | 82 | 0.520363 |
7cd063e2786c7e403985ccca5f3856155102aba4 | 7,367 | py | Python | demos/python/sdk_wireless_camera_control/open_gopro/constants.py | matteo-pupa/OpenGoPro | bdb47b0451c394f0ae07023c4f342c75317d73d4 | [
"MIT"
] | null | null | null | demos/python/sdk_wireless_camera_control/open_gopro/constants.py | matteo-pupa/OpenGoPro | bdb47b0451c394f0ae07023c4f342c75317d73d4 | [
"MIT"
] | null | null | null | demos/python/sdk_wireless_camera_control/open_gopro/constants.py | matteo-pupa/OpenGoPro | bdb47b0451c394f0ae07023c4f342c75317d73d4 | [
"MIT"
] | null | null | null | # constants.py/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro).
# This copyright was auto-generated on Wed, Sep 1, 2021 5:05:44 PM
"""Constant numbers shared across the GoPro module. These do not change across Open GoPro Versions"""
from enum import Enum, EnumMeta
from typing imp... | 24.313531 | 122 | 0.674223 |
a812c1e18b4dd190c316c467d60571cf515a8e65 | 5,360 | py | Python | nnlib/utils/batching.py | huzecong/nnlib | fd68abc51028444ce7c789642e2a7b8ed1853255 | [
"MIT"
] | 1 | 2019-01-08T03:55:23.000Z | 2019-01-08T03:55:23.000Z | nnlib/utils/batching.py | huzecong/nnlib | fd68abc51028444ce7c789642e2a7b8ed1853255 | [
"MIT"
] | null | null | null | nnlib/utils/batching.py | huzecong/nnlib | fd68abc51028444ce7c789642e2a7b8ed1853255 | [
"MIT"
] | null | null | null | from typing import List, Sequence, Tuple, TypeVar, overload, Iterator
import numpy as np
from nnlib.torch import *
from nnlib.utils.iterable import MeasurableGenerator
from nnlib.utils.math import ceil_div
__all__ = ['minibatches_from', 'pad_sequences', 'batch_sequences', 'shift_packed_seq', 'mask_dropout_embeddings... | 42.204724 | 118 | 0.678545 |
ba43d63725b77c82c530e41f1a378c77b39ed222 | 16,608 | py | Python | kibom/preferences.py | n0dyjeff/KiBoM | 0ce83c2549eb303405c63a1f9538d42ebd75dbb5 | [
"MIT"
] | null | null | null | kibom/preferences.py | n0dyjeff/KiBoM | 0ce83c2549eb303405c63a1f9538d42ebd75dbb5 | [
"MIT"
] | null | null | null | kibom/preferences.py | n0dyjeff/KiBoM | 0ce83c2549eb303405c63a1f9538d42ebd75dbb5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sys
import re
import os
from .columns import ColumnList
from . import debug
# Check python version to determine which version of ConfirParser to import
if sys.version_info.major >= 3:
import configparser as ConfigParser
else:
import Confi... | 48.703812 | 306 | 0.665041 |
83424c6a0ad0ced45a554cebe6a40be9044a3fd0 | 19,934 | py | Python | generate_corpus.py | lasigeBioTM/ICRel | 1a66d51763d6ced42a798dba07234617f9a25783 | [
"MIT"
] | 7 | 2017-12-19T22:03:43.000Z | 2019-06-20T09:22:46.000Z | generate_corpus.py | lasigeBioTM/ICRel | 1a66d51763d6ced42a798dba07234617f9a25783 | [
"MIT"
] | null | null | null | generate_corpus.py | lasigeBioTM/ICRel | 1a66d51763d6ced42a798dba07234617f9a25783 | [
"MIT"
] | 2 | 2018-04-19T13:52:47.000Z | 2018-09-08T01:47:39.000Z | import requests
import logging
import xml.etree.ElementTree as ET
import codecs
import os
import sys
import time
import json
import pickle
from time import sleep
import subprocess
import multiprocessing as mp
from sqlalchemy.orm.exc import NoResultFound
from sqlalchemy import create_engine
from sqlalche... | 44.997743 | 153 | 0.57565 |
31a5287cf6697005fa43a6beb286cea7276a1800 | 3,184 | py | Python | rlkit/core/batch_rl_algorithm.py | JieRen98/rlkit-pmoe | 5ef4e056764d2c4a8d6e4c6da89295304b1fec3f | [
"MIT"
] | 3 | 2021-06-15T03:03:52.000Z | 2021-12-20T03:08:03.000Z | rlkit/core/batch_rl_algorithm.py | JieRen98/rlkit-pmoe | 5ef4e056764d2c4a8d6e4c6da89295304b1fec3f | [
"MIT"
] | null | null | null | rlkit/core/batch_rl_algorithm.py | JieRen98/rlkit-pmoe | 5ef4e056764d2c4a8d6e4c6da89295304b1fec3f | [
"MIT"
] | null | null | null | import abc
import gtimer as gt
from rlkit.core.rl_algorithm import BaseRLAlgorithm
from rlkit.data_management.replay_buffer import ReplayBuffer
from rlkit.samplers.data_collector import PathCollector
class BatchRLAlgorithm(BaseRLAlgorithm, metaclass=abc.ABCMeta):
def __init__(
self,
trai... | 37.023256 | 76 | 0.624372 |
55d13f21e0ae3c167e4da17a45fa2a93c5184dae | 4,700 | py | Python | test/testcases/pyrad/test_lcompare.py | Lilith5th/Radiance | 3aff252e57e6d2ca9205cf7caf20aaa1a897aaf2 | [
"BSD-3-Clause-LBNL"
] | 154 | 2015-01-27T15:02:36.000Z | 2022-01-06T18:14:18.000Z | test/testcases/pyrad/test_lcompare.py | Lilith5th/Radiance | 3aff252e57e6d2ca9205cf7caf20aaa1a897aaf2 | [
"BSD-3-Clause-LBNL"
] | 35 | 2015-05-11T21:41:31.000Z | 2021-12-17T13:23:57.000Z | test/testcases/pyrad/test_lcompare.py | Lilith5th/Radiance | 3aff252e57e6d2ca9205cf7caf20aaa1a897aaf2 | [
"BSD-3-Clause-LBNL"
] | 64 | 2015-01-21T00:52:40.000Z | 2022-02-07T12:15:09.000Z | # -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals
import struct
import operator
import unittest
from functools import reduce
import testsupport as ts
from pyradlib import lcompare
from pyradlib.pyrad_proc import PIPE, Error, ProcMixin
class LcompareTestCase(unittest.TestCase,... | 31.333333 | 73 | 0.450638 |
70c84394ce0fb828ae315bf04dbf7e8a6038aa89 | 316 | py | Python | rest_action_permissions/__version__.py | apirobot/django-rest-action-permissions | 79d25a19dc5a8b3b0047d3f5d3ef185cac7ba09b | [
"MIT"
] | 8 | 2018-05-30T09:43:05.000Z | 2021-07-10T12:55:47.000Z | rest_action_permissions/__version__.py | apirobot/django-rest-action-permissions | 79d25a19dc5a8b3b0047d3f5d3ef185cac7ba09b | [
"MIT"
] | 2 | 2018-05-30T09:43:34.000Z | 2019-05-28T05:47:35.000Z | rest_action_permissions/__version__.py | apirobot/django-rest-action-permissions | 79d25a19dc5a8b3b0047d3f5d3ef185cac7ba09b | [
"MIT"
] | 2 | 2019-04-21T12:51:15.000Z | 2020-04-11T12:16:08.000Z | __version__ = '2.0.0'
__title__ = 'django-rest-action-permissions'
__description__ = 'Action based permissions for Django REST Framework.'
__url__ = 'https://github.com/apirobot/django-rest-action-permissions'
__author__ = 'Denis Orehovsky'
__author_email__ = 'denis.orehovsky@gmail.com'
__license__ = 'MIT License'
| 39.5 | 71 | 0.78481 |
cf5fe6b92130053a403b188075dc9566883dd02a | 702 | py | Python | examples/demo.py | doctorfree/pyroon | 0b00a44aa2bfb28fa26c8345bcdf6fb79e497fa3 | [
"Apache-2.0"
] | 10 | 2018-09-03T14:30:02.000Z | 2020-03-04T16:53:46.000Z | examples/demo.py | doctorfree/pyroon | 0b00a44aa2bfb28fa26c8345bcdf6fb79e497fa3 | [
"Apache-2.0"
] | 2 | 2019-02-19T20:17:35.000Z | 2019-03-10T18:56:53.000Z | examples/demo.py | doctorfree/pyroon | 0b00a44aa2bfb28fa26c8345bcdf6fb79e497fa3 | [
"Apache-2.0"
] | 5 | 2019-03-03T11:54:37.000Z | 2020-07-04T15:11:25.000Z | from roonapi import RoonApi, RoonDiscovery
appinfo = {
"extension_id": "python_roon_test",
"display_name": "Python library for Roon",
"display_version": "1.0.0",
"publisher": "gregd",
"email": "mygreat@emailaddress.com",
}
# Can be None if you don't yet have a token
try:
core_id = open("my_cor... | 23.4 | 61 | 0.692308 |
0b480abbd0929859dbfc8bd712ac67f8f4643abf | 642 | py | Python | python/crawler/hello_urllib2_proxyhandler.py | fendoudebb/learnin | e9bdfcaa028b6a41fd7bebfbbc2037f50f2112e1 | [
"Apache-2.0"
] | 1 | 2021-03-30T06:02:07.000Z | 2021-03-30T06:02:07.000Z | python/crawler/hello_urllib2_proxyhandler.py | fendoudebb/learnin | e9bdfcaa028b6a41fd7bebfbbc2037f50f2112e1 | [
"Apache-2.0"
] | 4 | 2021-03-08T12:58:36.000Z | 2021-11-16T05:43:20.000Z | python/crawler/hello_urllib2_proxyhandler.py | fendoudebb/learnin | e9bdfcaa028b6a41fd7bebfbbc2037f50f2112e1 | [
"Apache-2.0"
] | 2 | 2021-04-22T02:39:11.000Z | 2021-07-30T01:44:04.000Z | # -*- coding:utf-8 -*-
from http.client import HTTPResponse
from urllib import request
# 构建代理HTTP处理对象
proxy_handler = request.ProxyHandler({'http': '127.0.0.1:8080'})
opener = request.build_opener(proxy_handler)
# 构建全局opener,之后所有请求都可以用urlopen(),否则必须使用opener.open(),不然不走代理
request.install_opener(opener)
headers = {
... | 25.68 | 120 | 0.721184 |
467ed9f4fb6c1f9497d230e555279b11edb159a6 | 3,449 | py | Python | tests/test_multi_query_errors.py | jfunez/fastapi | 7372f6ba11abb515a7f11814dba52a1d1c0925f0 | [
"MIT"
] | 2 | 2020-04-09T07:11:28.000Z | 2020-12-12T14:04:35.000Z | tests/test_multi_query_errors.py | jfunez/fastapi | 7372f6ba11abb515a7f11814dba52a1d1c0925f0 | [
"MIT"
] | 1 | 2021-03-27T18:37:32.000Z | 2021-05-25T15:08:24.000Z | tests/test_multi_query_errors.py | jfunez/fastapi | 7372f6ba11abb515a7f11814dba52a1d1c0925f0 | [
"MIT"
] | 1 | 2021-02-03T00:43:04.000Z | 2021-02-03T00:43:04.000Z | from typing import List
from fastapi import FastAPI, Query
from fastapi.testclient import TestClient
app = FastAPI()
@app.get("/items/")
def read_items(q: List[int] = Query(None)):
return {"q": q}
client = TestClient(app)
openapi_schema = {
"openapi": "3.0.2",
"info": {"title": "FastAPI", "version":... | 28.983193 | 86 | 0.372282 |
633f5c84cf41bc3d9e488b416f173abe3a17c0ab | 1,932 | py | Python | read_pot.py | 94KeyboardsSmashed/MWR_PlasmaPot | 8ed21c9ea324b5107ac67a5272c044ce08bd81a5 | [
"MIT"
] | null | null | null | read_pot.py | 94KeyboardsSmashed/MWR_PlasmaPot | 8ed21c9ea324b5107ac67a5272c044ce08bd81a5 | [
"MIT"
] | null | null | null | read_pot.py | 94KeyboardsSmashed/MWR_PlasmaPot | 8ed21c9ea324b5107ac67a5272c044ce08bd81a5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import serial
from sys import stdout
import time
import threading
import raspi_neopixel_lib
import Adafruit_CharLCD as LCD
# Raspberry Pi pin configuration:
lcd_rs = 26
lcd_en = 19
lcd_d4 = 13
lcd_d5 = 6
lcd_d6 = 5
lcd_d7 = 11
lcd_backlight = 9
#Neopix... | 28 | 95 | 0.556936 |
4752fa7796305a4518e93f16878f63f4aa63dda7 | 44,985 | py | Python | sympy/utilities/tests/test_lambdify.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 2 | 2021-08-25T13:51:41.000Z | 2022-01-06T07:12:47.000Z | sympy/utilities/tests/test_lambdify.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 2 | 2021-06-02T17:18:28.000Z | 2021-06-02T17:38:57.000Z | sympy/utilities/tests/test_lambdify.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 1 | 2021-02-20T14:12:19.000Z | 2021-02-20T14:12:19.000Z | from itertools import product
import math
import inspect
import mpmath
from sympy.testing.pytest import raises
from sympy import (
symbols, lambdify, sqrt, sin, cos, tan, pi, acos, acosh, Rational,
Float, Lambda, Piecewise, exp, E, Integral, oo, I, Abs, Function,
true, false, And, Or, Not, ITE, Min, Max, f... | 31.926899 | 130 | 0.588063 |
de4888d07625e7a318f4bb439819f8c978f615c6 | 12,530 | py | Python | research/nlp/albert/src/create_squad_data.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/albert/src/create_squad_data.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/albert/src/create_squad_data.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 40.160256 | 103 | 0.600878 |
1208615e7f48308c5d7649e79fa6d0e78606a5ad | 2,427 | py | Python | dudley/test/python/linearElastic.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | dudley/test/python/linearElastic.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | 1 | 2019-01-14T03:07:43.000Z | 2019-01-14T03:07:43.000Z | dudley/test/python/linearElastic.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null |
##############################################################################
#
# Copyright (c) 2003-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unt... | 32.36 | 90 | 0.691389 |
0e6f81df1f9f78d88c4e102dad94e94a29ac4e76 | 5,283 | py | Python | tensorflow/python/distribute/one_device_strategy_test.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 78 | 2020-08-04T12:36:25.000Z | 2022-03-25T04:23:40.000Z | tensorflow/python/distribute/one_device_strategy_test.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 203 | 2019-06-14T23:53:10.000Z | 2022-02-10T02:27:23.000Z | tensorflow/python/distribute/one_device_strategy_test.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 28 | 2020-02-10T07:03:06.000Z | 2022-01-12T11:19:20.000Z | # 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... | 37.735714 | 80 | 0.765474 |
360dbedb2d31808c31c0eb2d2114b6d543e4f46f | 1,920 | py | Python | localflavor/au/forms.py | ifanrx/django-localflavor | 38328bbb127a33cb06eaea82288cd70821b2bad6 | [
"BSD-3-Clause"
] | null | null | null | localflavor/au/forms.py | ifanrx/django-localflavor | 38328bbb127a33cb06eaea82288cd70821b2bad6 | [
"BSD-3-Clause"
] | null | null | null | localflavor/au/forms.py | ifanrx/django-localflavor | 38328bbb127a33cb06eaea82288cd70821b2bad6 | [
"BSD-3-Clause"
] | null | null | null | """
Australian-specific Form helpers
"""
from __future__ import absolute_import, unicode_literals
import re
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import CharField, RegexField, Select
from django.utils.encoding import smart_text
from django.u... | 29.090909 | 86 | 0.665104 |
50611c0f84ac3e8a5c3d2e811566ef36578654e5 | 398 | py | Python | service/config.py | gmarciani/flasky | f97c5c7201c2789834a422cf90bde09cf4b78cc8 | [
"MIT"
] | 2 | 2021-03-06T11:05:43.000Z | 2021-05-23T14:55:53.000Z | service/config.py | gmarciani/flasky | f97c5c7201c2789834a422cf90bde09cf4b78cc8 | [
"MIT"
] | null | null | null | service/config.py | gmarciani/flasky | f97c5c7201c2789834a422cf90bde09cf4b78cc8 | [
"MIT"
] | null | null | null | """
Configurations for the service 'Latency'.
"""
class Default:
"""
Default configuration.
"""
DEBUG = True
LOG_LEVEL = "INFO"
APP_HOST = "localhost"
APP_PORT = 8000
class Debug(Default):
"""
Debug configuration.
"""
DEBUG = True
LOG_LEVEL = "DEBUG"
class Produc... | 12.83871 | 41 | 0.577889 |
78e852d5705c1df2d4f0ced019694cf6dc1a496b | 1,059 | py | Python | lib/nms/py_cpu_nms.py | huan123/py-fatser-rcnn | b0c02e004bcd480a01671603578fe18740b85ac0 | [
"MIT"
] | null | null | null | lib/nms/py_cpu_nms.py | huan123/py-fatser-rcnn | b0c02e004bcd480a01671603578fe18740b85ac0 | [
"MIT"
] | null | null | null | lib/nms/py_cpu_nms.py | huan123/py-fatser-rcnn | b0c02e004bcd480a01671603578fe18740b85ac0 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
#是非极大值抑制
import numpy as np
def py_cpu_nms(dets, thresh):
"""Pure P... | 27.153846 | 59 | 0.459868 |
6f2cca215a10937a4bd949ee968a9936782ba77b | 1,401 | py | Python | Test.py | AleksiusK/Market-efficiency | 10d802f56c6e61a8c8b1eff116b7633cc9f32fdc | [
"MIT"
] | null | null | null | Test.py | AleksiusK/Market-efficiency | 10d802f56c6e61a8c8b1eff116b7633cc9f32fdc | [
"MIT"
] | null | null | null | Test.py | AleksiusK/Market-efficiency | 10d802f56c6e61a8c8b1eff116b7633cc9f32fdc | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import Calculations as Ca
from pprint import pprint
# Variance ratio test for market efficiency by Lo MacKinlay (1988)
# Aleksius Kurkela
# kurkela.aleksius@gmail.com
def estimate(data, lags):
"""
:param data: Data frame of prices [p1, p2, p3 ... pt] with the label "P... | 25.472727 | 116 | 0.596717 |
5e8babe9b9c59e60ab90dc88932328eb9f5347ed | 16,649 | py | Python | subcommands/store_in_neo4j.py | brunomateus/open_source_android_apps | 143deea78ff125b4dd5e88b89f48dc3a9e8bcdfa | [
"MIT"
] | 2 | 2019-11-18T18:01:27.000Z | 2021-05-13T18:16:17.000Z | subcommands/store_in_neo4j.py | brunomateus/open_source_android_apps | 143deea78ff125b4dd5e88b89f48dc3a9e8bcdfa | [
"MIT"
] | null | null | null | subcommands/store_in_neo4j.py | brunomateus/open_source_android_apps | 143deea78ff125b4dd5e88b89f48dc3a9e8bcdfa | [
"MIT"
] | 3 | 2019-07-18T19:33:04.000Z | 2021-01-13T21:13:29.000Z | """Store information in Neo4j graph database.
Use -h or --help for more information.
"""
import argparse
import csv
import logging
import os
from typing import Dict, IO, List
from util.neo4j import Neo4j, Node
from util.parse import \
parse_google_play_info, \
parse_iso8601
__log__ = logging.getLogger(__nam... | 37.080178 | 79 | 0.628026 |
d9b85cf5fad368c6fe56781b521ae8b78ab70966 | 31,119 | py | Python | bigquery/unit_tests/test_dataset.py | omaray/gcloud-python | 87a13aaa140842111df2f76529a1b9ce4b6d28a6 | [
"Apache-2.0"
] | null | null | null | bigquery/unit_tests/test_dataset.py | omaray/gcloud-python | 87a13aaa140842111df2f76529a1b9ce4b6d28a6 | [
"Apache-2.0"
] | null | null | null | bigquery/unit_tests/test_dataset.py | omaray/gcloud-python | 87a13aaa140842111df2f76529a1b9ce4b6d28a6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 39.541296 | 79 | 0.619107 |
aef3b62ef9c04b3a695f887af68d3c3f2f6e7b0c | 19,772 | py | Python | appgate/appgate.py | appgate/sdp-operator | 289927e07eca84003aa4bd4631b57dc9955eee23 | [
"MIT"
] | 6 | 2020-09-22T13:21:05.000Z | 2022-01-06T01:49:22.000Z | appgate/appgate.py | appgate/sdp-operator | 289927e07eca84003aa4bd4631b57dc9955eee23 | [
"MIT"
] | 36 | 2020-09-23T06:38:51.000Z | 2022-02-09T13:53:32.000Z | appgate/appgate.py | appgate/sdp-operator | 289927e07eca84003aa4bd4631b57dc9955eee23 | [
"MIT"
] | 3 | 2021-07-27T18:16:52.000Z | 2022-03-01T22:18:15.000Z | import asyncio
import base64
import binascii
import logging
import os
import sys
import tempfile
from asyncio import Queue
from contextlib import AsyncExitStack
from copy import deepcopy
from pathlib import Path
from typing import Optional, Type, Dict, Callable, Any, FrozenSet, Tuple, Iterable, List, Set
import threadi... | 48.342298 | 124 | 0.624671 |
5f4bbbdba6a262ea1be61f528fac8cd9dd11baf0 | 3,051 | py | Python | test/test_client_aio.py | tsangpozheng/asyncgrpc | 79ba732ab74d15ad02ef94763259298554198899 | [
"MIT"
] | 2 | 2018-11-06T04:43:06.000Z | 2018-12-05T09:20:02.000Z | test/test_client_aio.py | tsangpozheng/asyncgrpc | 79ba732ab74d15ad02ef94763259298554198899 | [
"MIT"
] | null | null | null | test/test_client_aio.py | tsangpozheng/asyncgrpc | 79ba732ab74d15ad02ef94763259298554198899 | [
"MIT"
] | null | null | null | import sys
sys.path.append('.')
sys.path.append('../pybase/')
import logging
import asyncio
from aiogrpc import Channel
from protos import benchmark_pb2
from protos import benchmark_pb2_grpc
messages = [
benchmark_pb2.HelloRequest(name='First'),
benchmark_pb2.HelloRequest(name='Second'),
benchmark_pb2.He... | 27.736364 | 79 | 0.678466 |
899a539a5233a4feb2e6c981ea34962902f225de | 20,820 | py | Python | cirq/sim/sparse_simulator.py | aditya-giri/Cirq | e5af689f184c8c5ccd9c076b2907a444b2479629 | [
"Apache-2.0"
] | null | null | null | cirq/sim/sparse_simulator.py | aditya-giri/Cirq | e5af689f184c8c5ccd9c076b2907a444b2479629 | [
"Apache-2.0"
] | null | null | null | cirq/sim/sparse_simulator.py | aditya-giri/Cirq | e5af689f184c8c5ccd9c076b2907a444b2479629 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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 ... | 45.657895 | 80 | 0.604131 |
f4263c819d6af239aa4e65d1b1fdc01963728454 | 379 | py | Python | bokeh/models/widgets/panels.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 445 | 2019-01-26T13:50:26.000Z | 2022-03-18T05:17:38.000Z | bokeh/models/widgets/panels.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 242 | 2019-01-29T15:48:27.000Z | 2022-03-31T22:09:21.000Z | bokeh/models/widgets/panels.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 31 | 2019-03-10T09:51:27.000Z | 2022-02-14T23:11:12.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 42.111111 | 78 | 0.430079 |
3bc099ce47b7d45f221636fb4d8f41d2d640b48c | 3,192 | py | Python | model_zoo/official/nlp/cpm/src/config.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | 1 | 2021-07-03T06:52:20.000Z | 2021-07-03T06:52:20.000Z | model_zoo/official/nlp/cpm/src/config.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | null | null | null | model_zoo/official/nlp/cpm/src/config.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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 a... | 24 | 79 | 0.572055 |
34052b82e1eb2b65ed6e360048332319e5ef6be7 | 1,080 | py | Python | public/public/TypDe/training/models/random_forest_classifier.py | jsperezsalazar2001/TypDe_GUI | 4b6e2d3de14d79888d0baf91c57bb5a874e3e28e | [
"MIT"
] | null | null | null | public/public/TypDe/training/models/random_forest_classifier.py | jsperezsalazar2001/TypDe_GUI | 4b6e2d3de14d79888d0baf91c57bb5a874e3e28e | [
"MIT"
] | null | null | null | public/public/TypDe/training/models/random_forest_classifier.py | jsperezsalazar2001/TypDe_GUI | 4b6e2d3de14d79888d0baf91c57bb5a874e3e28e | [
"MIT"
] | null | null | null | from sklearn.ensemble import RandomForestClassifier
from sklearn.base import clone
import numpy as np
import matplotlib.pyplot as plt
def createModel(n_estimators, random_state):
random_forest = RandomForestClassifier(n_estimators=n_estimators, random_state=random_state)
return random_forest
def fit(model, x_... | 31.764706 | 99 | 0.72037 |
fb1d5eb496a43a294b7114972bb0dfa5256e5bdf | 122 | py | Python | leo/test/external_files/at-auto-section-ref-test.py | thomasbuttler/leo-editor | c1bddc31313b7788f0d6583dcb4ab75db73e9a09 | [
"MIT"
] | 1,550 | 2015-01-14T16:30:37.000Z | 2022-03-31T08:55:58.000Z | leo/test/external_files/at-auto-section-ref-test.py | thomasbuttler/leo-editor | c1bddc31313b7788f0d6583dcb4ab75db73e9a09 | [
"MIT"
] | 2,009 | 2015-01-13T16:28:52.000Z | 2022-03-31T18:21:48.000Z | leo/test/external_files/at-auto-section-ref-test.py | thomasbuttler/leo-editor | c1bddc31313b7788f0d6583dcb4ab75db73e9a09 | [
"MIT"
] | 200 | 2015-01-05T15:07:41.000Z | 2022-03-07T17:05:01.000Z | # ~/at-auto-test.py
# This is valid Python, but it looks like a section reference.
c = b = d = 0
a = b << c >> d
# end.
| 15.25 | 62 | 0.581967 |
46cc2346cbf3f766ef5f5f18c8184f3dd9a562f2 | 917 | py | Python | huobi/model/mbpevent.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | 1 | 2020-12-28T07:04:45.000Z | 2020-12-28T07:04:45.000Z | huobi/model/mbpevent.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | null | null | null | huobi/model/mbpevent.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | 1 | 2022-03-27T10:36:04.000Z | 2022-03-27T10:36:04.000Z | from huobi.constant.result import OutputKey
from huobi.impl.utils.channelparser import ChannelParser
from huobi.model import *
class MbpEvent:
"""
increasement of price depth.
:member
symbol: The symbol you subscribed.
timestamp: The UNIX formatted timestamp generated by server in UTC.
... | 26.2 | 75 | 0.636859 |
8f2d1bf6e2ef3e083385bead5bda6904b9fb5364 | 39,392 | py | Python | tests/runtests.py | johnj/salt | b23656fa5ee24047c43ac702d6796a700570f749 | [
"Apache-2.0"
] | 5 | 2017-02-07T05:39:29.000Z | 2020-06-13T02:07:33.000Z | tests/runtests.py | johnj/salt | b23656fa5ee24047c43ac702d6796a700570f749 | [
"Apache-2.0"
] | 86 | 2017-01-27T11:54:46.000Z | 2020-05-20T06:25:26.000Z | tests/runtests.py | johnj/salt | b23656fa5ee24047c43ac702d6796a700570f749 | [
"Apache-2.0"
] | 11 | 2017-01-26T19:36:29.000Z | 2021-12-11T07:54:16.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Discover all instances of unittest.TestCase in this directory.
'''
# pylint: disable=file-perms
# Import python libs
from __future__ import absolute_import, print_function
import os
import sys
import time
import warnings
import collections
TESTS_DIR = os.path.dirname(... | 37.022556 | 117 | 0.533255 |
3ff6cd87cb9e80b3f94ee84a92f89bf46287c92b | 4,912 | py | Python | troposphere/appmesh.py | sivakarthick169/troposphere | ddf147e9a7d62b9d43ac98c4c5926cf8ccd66cf1 | [
"BSD-2-Clause"
] | null | null | null | troposphere/appmesh.py | sivakarthick169/troposphere | ddf147e9a7d62b9d43ac98c4c5926cf8ccd66cf1 | [
"BSD-2-Clause"
] | null | null | null | troposphere/appmesh.py | sivakarthick169/troposphere | ddf147e9a7d62b9d43ac98c4c5926cf8ccd66cf1 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2012-2019, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSObject, AWSProperty, Tags
from .validators import integer
class VirtualNodeServiceProvider(AWSProperty):
props = {
'VirtualNodeName': (basestring, True),
}
class Virtu... | 20.381743 | 63 | 0.597109 |
315b518a1e2280f713dcc780d7d4b341f77ab3c4 | 10,118 | py | Python | archiv/migrations/0001_initial.py | acdh-oeaw/mmp | 7ef8f33eafd3a7985328d374130f1cbe31f77df0 | [
"MIT"
] | 2 | 2021-06-02T11:27:54.000Z | 2021-08-25T10:29:04.000Z | archiv/migrations/0001_initial.py | acdh-oeaw/mmp | 7ef8f33eafd3a7985328d374130f1cbe31f77df0 | [
"MIT"
] | 86 | 2021-01-29T12:31:34.000Z | 2022-03-28T11:41:04.000Z | archiv/migrations/0001_initial.py | acdh-oeaw/mmp | 7ef8f33eafd3a7985328d374130f1cbe31f77df0 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-29 10:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('vocabs', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Au... | 72.791367 | 258 | 0.622752 |
b076165febf01a27a3eafa5fac980daea882bf7f | 397 | py | Python | hazelcast/protocol/codec/atomic_long_message_type.py | buraksezer/hazelcast-python-client | 4cc593ef7de994bd84fdac8331b81b309cce30a0 | [
"Apache-2.0"
] | 3 | 2020-05-01T15:01:54.000Z | 2021-01-27T14:51:45.000Z | hazelcast/protocol/codec/atomic_long_message_type.py | buraksezer/hazelcast-python-client | 4cc593ef7de994bd84fdac8331b81b309cce30a0 | [
"Apache-2.0"
] | null | null | null | hazelcast/protocol/codec/atomic_long_message_type.py | buraksezer/hazelcast-python-client | 4cc593ef7de994bd84fdac8331b81b309cce30a0 | [
"Apache-2.0"
] | 1 | 2020-12-01T20:00:35.000Z | 2020-12-01T20:00:35.000Z |
ATOMICLONG_APPLY = 0x0a01
ATOMICLONG_ALTER = 0x0a02
ATOMICLONG_ALTERANDGET = 0x0a03
ATOMICLONG_GETANDALTER = 0x0a04
ATOMICLONG_ADDANDGET = 0x0a05
ATOMICLONG_COMPAREANDSET = 0x0a06
ATOMICLONG_DECREMENTANDGET = 0x0a07
ATOMICLONG_GET = 0x0a08
ATOMICLONG_GETANDADD = 0x0a09
ATOMICLONG_GETANDSET = 0x0a0a
ATOMICLONG_INCREMEN... | 26.466667 | 35 | 0.866499 |
7925f8c6eaecdffbabcbfd6eae03c9fb3d087d5f | 9,167 | py | Python | src/healthcareapis/azext_healthcareapis/vendored_sdks/healthcareapis/aio/operations/_workspace_private_link_resources_operations.py | Caoxuyang/azure-cli-extensions | d2011261f29033cb31a1064256727d87049ab423 | [
"MIT"
] | null | null | null | src/healthcareapis/azext_healthcareapis/vendored_sdks/healthcareapis/aio/operations/_workspace_private_link_resources_operations.py | Caoxuyang/azure-cli-extensions | d2011261f29033cb31a1064256727d87049ab423 | [
"MIT"
] | null | null | null | src/healthcareapis/azext_healthcareapis/vendored_sdks/healthcareapis/aio/operations/_workspace_private_link_resources_operations.py | Caoxuyang/azure-cli-extensions | d2011261f29033cb31a1064256727d87049ab423 | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.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 ... | 50.646409 | 209 | 0.675794 |
c887863553b4a2162ebf12ed95324870669453d7 | 482 | py | Python | touroute/tourouteapp/models.py | oscarlamasrios/toroute | 5b00c0f606f438229e7857f25a23c4d51ff34293 | [
"Apache-2.0"
] | null | null | null | touroute/tourouteapp/models.py | oscarlamasrios/toroute | 5b00c0f606f438229e7857f25a23c4d51ff34293 | [
"Apache-2.0"
] | null | null | null | touroute/tourouteapp/models.py | oscarlamasrios/toroute | 5b00c0f606f438229e7857f25a23c4d51ff34293 | [
"Apache-2.0"
] | null | null | null | from django.db import models
# Create your models here.
class Route(models.Model):
date = models.DateField(auto_now=False, auto_now_add=True,editable=False)
class Place(models.Model):
name = models.CharField(max_length=30)
lat = models.FloatField()
lon = models.FloatField()
identifier = models.CharField(ma... | 30.125 | 75 | 0.773859 |
9114c8347cee48ea6ff0dba61b406d77bf3e6759 | 2,930 | py | Python | third_part/alipay_dual/alipay_api.py | wangdiwen/Alipay_Python_API | b5821ffc9f99b8fb4b22c2bf956ac704571524d5 | [
"MIT"
] | 15 | 2015-01-13T13:55:32.000Z | 2021-05-16T03:01:50.000Z | third_part/alipay_dual/alipay_api.py | wangdiwen/Alipay_Python_API | b5821ffc9f99b8fb4b22c2bf956ac704571524d5 | [
"MIT"
] | null | null | null | third_part/alipay_dual/alipay_api.py | wangdiwen/Alipay_Python_API | b5821ffc9f99b8fb4b22c2bf956ac704571524d5 | [
"MIT"
] | 2 | 2015-04-15T16:48:21.000Z | 2015-08-23T03:24:37.000Z | #!/usr/bin/env python
#coding=utf-8
# Note:
# 支付宝 双功能 API
from alipay_config import *
from alipay_submit import *
from alipay_notify import *
class Alipay_API:
payment_type = "1" # 支付类型
return_url = "http://192.168.1.199:8000/dual/return" # 页面跳转同步通知页面路径
notify_url = "http://192.168.1.19... | 34.069767 | 103 | 0.606826 |
6428d9379d8adf54673630e85f9714cca0aa2eee | 1,014 | py | Python | rlberry/agents/tests/test_torch_models.py | antoine-moulin/rlberry | 676af9d1bb9094a6790a9aa3ff7e67b13584a183 | [
"MIT"
] | null | null | null | rlberry/agents/tests/test_torch_models.py | antoine-moulin/rlberry | 676af9d1bb9094a6790a9aa3ff7e67b13584a183 | [
"MIT"
] | null | null | null | rlberry/agents/tests/test_torch_models.py | antoine-moulin/rlberry | 676af9d1bb9094a6790a9aa3ff7e67b13584a183 | [
"MIT"
] | null | null | null | """
TODO: Test attention modules
"""
import torch
from rlberry.agents.utils.torch_models import MultiLayerPerceptron
from rlberry.agents.utils.torch_models import ConvolutionalNetwork
from rlberry.agents.utils.torch_attention_models import EgoAttention
from rlberry.agents.utils.torch_attention_models import SelfAttent... | 26.684211 | 69 | 0.591716 |
af77dfc9880587e24d4a58108ecae5b3ca7b9a3a | 3,134 | py | Python | 爬蟲/cpe_crawler/cpe_crawler/settings.py | LuckyPigeon/CPE_Previous_Questions | 14005407c52922dea28e861e8f591d74da3c3df5 | [
"MIT"
] | 26 | 2020-10-08T02:44:20.000Z | 2022-03-25T09:59:31.000Z | 爬蟲/cpe_crawler/cpe_crawler/settings.py | LuckyPigeon/CPE_Previous_Questions | 14005407c52922dea28e861e8f591d74da3c3df5 | [
"MIT"
] | 61 | 2020-10-08T17:03:53.000Z | 2021-06-17T01:05:51.000Z | 爬蟲/cpe_crawler/cpe_crawler/settings.py | LuckyPigeon/CPE_Previous_Questions | 14005407c52922dea28e861e8f591d74da3c3df5 | [
"MIT"
] | 27 | 2020-10-04T05:30:23.000Z | 2021-08-21T15:39:58.000Z | # -*- coding: utf-8 -*-
# Scrapy settings for cpe_crawler project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest... | 34.43956 | 103 | 0.776962 |
3597b51de07f524891d592950ce7c131ef6a7588 | 72 | py | Python | cheeta_jwt/exception/__init__.py | mory0tiki/CG-falcon-jwt | 1117a031fa0809f0e18c9bf64915c49c133f78b3 | [
"MIT"
] | 1 | 2019-08-19T06:40:29.000Z | 2019-08-19T06:40:29.000Z | cheeta_jwt/exception/__init__.py | mory0tiki/CG-falcon-jwt | 1117a031fa0809f0e18c9bf64915c49c133f78b3 | [
"MIT"
] | null | null | null | cheeta_jwt/exception/__init__.py | mory0tiki/CG-falcon-jwt | 1117a031fa0809f0e18c9bf64915c49c133f78b3 | [
"MIT"
] | 1 | 2019-08-15T09:45:40.000Z | 2019-08-15T09:45:40.000Z | from cheeta_jwt.exception.validator_exception import ValidatorException
| 36 | 71 | 0.916667 |
a86944fa32a1615a80a079d7c549ddbe68217445 | 3,788 | py | Python | mars/tensor/operands.py | HarshCasper/mars | 4c12c968414d666c7a10f497bc22de90376b1932 | [
"Apache-2.0"
] | 2 | 2019-03-29T04:11:10.000Z | 2020-07-08T10:19:54.000Z | mars/tensor/operands.py | HarshCasper/mars | 4c12c968414d666c7a10f497bc22de90376b1932 | [
"Apache-2.0"
] | null | null | null | mars/tensor/operands.py | HarshCasper/mars | 4c12c968414d666c7a10f497bc22de90376b1932 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# 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 a... | 32.93913 | 101 | 0.67661 |
dc4e2504328cd3f20a74b188d8a5f12a9485453d | 24,170 | py | Python | src/pretix/plugins/reports/exporters.py | fridtjof/pretix | b9474675896d5eb6da57fdecc886c287ee4bd27f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/plugins/reports/exporters.py | fridtjof/pretix | b9474675896d5eb6da57fdecc886c287ee4bd27f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/plugins/reports/exporters.py | fridtjof/pretix | b9474675896d5eb6da57fdecc886c287ee4bd27f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import tempfile
from collections import OrderedDict, defaultdict
from decimal import Decimal
import pytz
from dateutil.parser import parse
from django import forms
from django.conf import settings
from django.contrib.staticfiles import finders
from django.db import models
from django.db.models import Max, OuterRef, Su... | 39.818781 | 126 | 0.525983 |
3f4ded892f044dd2e8cee91c380489c8cfd8ff0c | 19,127 | py | Python | src/scenic/core/object_types.py | ArenBabikian/Scenic | 5687d9a70c0e6588ee0cda81b4a4a6731bcd2d91 | [
"BSD-3-Clause"
] | null | null | null | src/scenic/core/object_types.py | ArenBabikian/Scenic | 5687d9a70c0e6588ee0cda81b4a4a6731bcd2d91 | [
"BSD-3-Clause"
] | null | null | null | src/scenic/core/object_types.py | ArenBabikian/Scenic | 5687d9a70c0e6588ee0cda81b4a4a6731bcd2d91 | [
"BSD-3-Clause"
] | null | null | null | """Implementations of the built-in Scenic classes."""
import collections
import math
import random
from scenic.core.distributions import Samplable, needsSampling
from scenic.core.specifiers import Specifier, PropertyDefault
from scenic.core.vectors import Vector
from scenic.core.geometry import (_RotatedRectangle, av... | 31.100813 | 136 | 0.71935 |
4c1285b1344a85d5d8d85d224f5331988b499350 | 6,458 | py | Python | mavsdk/gimbal_pb2_grpc.py | deodates-dev/UAV-MAVSDK-Python | 4743657304ec9c3cac83b290b80b563fea595a8d | [
"BSD-3-Clause"
] | 1 | 2020-07-11T10:02:28.000Z | 2020-07-11T10:02:28.000Z | mavsdk/gimbal_pb2_grpc.py | deodates-dev/UAV-MAVSDK-Python | 4743657304ec9c3cac83b290b80b563fea595a8d | [
"BSD-3-Clause"
] | null | null | null | mavsdk/gimbal_pb2_grpc.py | deodates-dev/UAV-MAVSDK-Python | 4743657304ec9c3cac83b290b80b563fea595a8d | [
"BSD-3-Clause"
] | 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 . import gimbal_pb2 as gimbal_dot_gimbal__pb2
class GimbalServiceStub(object):
"""Provide control over a gimbal.
"""
def __init__(self, chann... | 41.133758 | 112 | 0.665841 |
376f436412356e63b906a1f862b5f88c30d8c840 | 6,394 | py | Python | tests/jinja_context_addons_tests.py | CybercentreCanada/superset | 1d812a860b0741c1a408eac299e10183f11a03c8 | [
"Apache-2.0"
] | 2 | 2021-03-17T18:41:18.000Z | 2021-05-27T16:45:12.000Z | tests/jinja_context_addons_tests.py | CybercentreCanada/superset | 1d812a860b0741c1a408eac299e10183f11a03c8 | [
"Apache-2.0"
] | 17 | 2021-03-18T21:17:31.000Z | 2021-12-06T13:54:03.000Z | tests/jinja_context_addons_tests.py | CybercentreCanada/superset | 1d812a860b0741c1a408eac299e10183f11a03c8 | [
"Apache-2.0"
] | 1 | 2022-01-10T13:31:22.000Z | 2022-01-10T13:31:22.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... | 43.202703 | 205 | 0.613075 |
ee9df0c05c3d8290b5d9d17b3791ec79657b6605 | 1,429 | py | Python | fbad/runner.py | bennr01/fbad | a872aa6e077931743a8cbce3328ce4cbc509745c | [
"MIT"
] | 1 | 2018-05-01T13:58:48.000Z | 2018-05-01T13:58:48.000Z | fbad/runner.py | bennr01/fbad | a872aa6e077931743a8cbce3328ce4cbc509745c | [
"MIT"
] | null | null | null | fbad/runner.py | bennr01/fbad | a872aa6e077931743a8cbce3328ce4cbc509745c | [
"MIT"
] | null | null | null | """runner functions for entry points"""
import argparse
import sys
from twisted.internet import reactor
from twisted.python import log
from twisted.internet.endpoints import TCP4ServerEndpoint
from fbad import constants
from fbad.server import FBADServerFactory
def server_main():
"""entry point for the server""... | 37.605263 | 123 | 0.706088 |
942d14f2d1381fa2aef13df0c78dd672db0aeb12 | 10,502 | py | Python | requests_cache/backends/base.py | harvey251/requests-cache | 559f9607ed7be26ece0acf00df7b8f09120bf973 | [
"BSD-2-Clause"
] | null | null | null | requests_cache/backends/base.py | harvey251/requests-cache | 559f9607ed7be26ece0acf00df7b8f09120bf973 | [
"BSD-2-Clause"
] | null | null | null | requests_cache/backends/base.py | harvey251/requests-cache | 559f9607ed7be26ece0acf00df7b8f09120bf973 | [
"BSD-2-Clause"
] | null | null | null | import pickle
import warnings
from abc import ABC
from collections.abc import MutableMapping
from datetime import datetime
from logging import DEBUG, WARNING, getLogger
from typing import Iterable, Iterator, Tuple, Union
import requests
from requests.models import PreparedRequest
from ..cache_control import Expiratio... | 40.083969 | 113 | 0.654637 |
2b6abd879fc939deacc88302d883dcfd6d20e699 | 40,821 | py | Python | python3-alpha/python3-src/Lib/collections.py | stormtheh4ck3r/python-for-android | b9ea9161392f60566b81482b1e25cd77004d5c45 | [
"Apache-2.0"
] | 4 | 2016-05-04T07:05:22.000Z | 2020-09-24T00:21:05.000Z | python3-alpha/python3-src/Lib/collections.py | stormtheh4ck3r/python-for-android | b9ea9161392f60566b81482b1e25cd77004d5c45 | [
"Apache-2.0"
] | 11 | 2017-02-27T22:35:32.000Z | 2021-12-24T08:07:40.000Z | python3-alpha/python3-src/Lib/collections.py | stormtheh4ck3r/python-for-android | b9ea9161392f60566b81482b1e25cd77004d5c45 | [
"Apache-2.0"
] | 1 | 2020-11-27T10:36:50.000Z | 2020-11-27T10:36:50.000Z | __all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList',
'UserString', 'Counter', 'OrderedDict']
# For bootstrapping reasons, the collection ABCs are defined in _abcoll.py.
# They should however be considered an integral part of collections.py.
from _abcoll import *
import _abcoll
__all__ +=... | 37.657749 | 126 | 0.57686 |
69c02a2ceea34fb3af0df57496542fe495ec0aea | 103 | py | Python | FootageOverview/FootageManager/apps.py | nylser/FootageOverview | 921e003550ba445d5a3308dee231a2d92e642b01 | [
"Unlicense"
] | null | null | null | FootageOverview/FootageManager/apps.py | nylser/FootageOverview | 921e003550ba445d5a3308dee231a2d92e642b01 | [
"Unlicense"
] | null | null | null | FootageOverview/FootageManager/apps.py | nylser/FootageOverview | 921e003550ba445d5a3308dee231a2d92e642b01 | [
"Unlicense"
] | null | null | null | from django.apps import AppConfig
class FootagemanagerConfig(AppConfig):
name = 'FootageManager'
| 17.166667 | 38 | 0.786408 |
f3ce0e8f16f3e546ab85fe7dd2e233278f72333b | 1,062 | py | Python | Missions_to_Mars/app.py | alienor1/web-scraping-challenge | ddef4f42f74d72793796ca96d532e4f8c49f4525 | [
"ADSL"
] | null | null | null | Missions_to_Mars/app.py | alienor1/web-scraping-challenge | ddef4f42f74d72793796ca96d532e4f8c49f4525 | [
"ADSL"
] | null | null | null | Missions_to_Mars/app.py | alienor1/web-scraping-challenge | ddef4f42f74d72793796ca96d532e4f8c49f4525 | [
"ADSL"
] | null | null | null | from flask import Flask, render_template, redirect
from flask_pymongo import PyMongo
import scrape_mars
app = Flask(__name__)
mongo = PyMongo(app, uri="mongodb://localhost:27017/mars_application")
@app.route("/")
def home():
# Find one record of data from the mongo database
mars_data = mongo.db.collection.... | 27.230769 | 132 | 0.694915 |
5f343bb1889f1dc7e0c5bf1349650ef913c53e47 | 9,524 | py | Python | pychron/lasers/laser_managers/ablation_laser_manager.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | null | null | null | pychron/lasers/laser_managers/ablation_laser_manager.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | 27 | 2019-10-07T17:43:35.000Z | 2021-12-05T21:25:07.000Z | pychron/lasers/laser_managers/ablation_laser_manager.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2015 Jake Ross
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | 32.728522 | 109 | 0.526564 |
9746c1e1dd3382fc89bad8d20d4fce321defbf2c | 11,941 | py | Python | test/mitmproxy/net/http/http1/test_read.py | cifred98/mitmproxy | 59fd15ef12c7eba4f44c5ad91171ccc8eb12e50b | [
"MIT"
] | 3 | 2021-12-25T02:29:24.000Z | 2022-02-22T02:12:30.000Z | test/mitmproxy/net/http/http1/test_read.py | cifred98/mitmproxy | 59fd15ef12c7eba4f44c5ad91171ccc8eb12e50b | [
"MIT"
] | null | null | null | test/mitmproxy/net/http/http1/test_read.py | cifred98/mitmproxy | 59fd15ef12c7eba4f44c5ad91171ccc8eb12e50b | [
"MIT"
] | 1 | 2022-02-01T07:12:57.000Z | 2022-02-01T07:12:57.000Z | from io import BytesIO
from unittest.mock import Mock
import pytest
from mitmproxy import exceptions
from mitmproxy.net.http import Headers
from mitmproxy.net.http.http1.read import (
read_request, read_response, read_request_head,
read_response_head, read_body, connection_close, expected_http_body_size, _get_... | 31.259162 | 99 | 0.621891 |
0127bac68bf223b1e5be6bd1bf11a7358abb9f96 | 138 | py | Python | code2/day09/demo02.py | picktsh/python | 0f758dcdf9eee3580d8f6e2241ef557b6320ef54 | [
"MIT"
] | 1 | 2019-12-31T16:44:06.000Z | 2019-12-31T16:44:06.000Z | code2/day09/demo02.py | picktsh/python | 0f758dcdf9eee3580d8f6e2241ef557b6320ef54 | [
"MIT"
] | null | null | null | code2/day09/demo02.py | picktsh/python | 0f758dcdf9eee3580d8f6e2241ef557b6320ef54 | [
"MIT"
] | 1 | 2022-01-13T10:32:22.000Z | 2022-01-13T10:32:22.000Z | # 本地Chrome浏览器设置方法
from selenium import webdriver # 从selenium库中调用webdriver模块
driver = webdriver.Chrome() # 设置引擎为Chrome,真实地打开一个Chrome浏览器
| 27.6 | 59 | 0.826087 |
f333190780725382970e6c630284406a7c286879 | 749 | py | Python | solution/4963(섬의 개수).py | OMEGA-Y/Baekjoon-sol | 9eaa441e482a0967fb60a9ea1d1373be00272c34 | [
"Apache-2.0"
] | null | null | null | solution/4963(섬의 개수).py | OMEGA-Y/Baekjoon-sol | 9eaa441e482a0967fb60a9ea1d1373be00272c34 | [
"Apache-2.0"
] | null | null | null | solution/4963(섬의 개수).py | OMEGA-Y/Baekjoon-sol | 9eaa441e482a0967fb60a9ea1d1373be00272c34 | [
"Apache-2.0"
] | null | null | null | import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
def dfs(matrix, n, m, count, x, y):
matrix[x][y] = 0
dx = [-1,1,0,0,-1,-1,1,1]
dy = [0,0,-1,1,-1,1,-1,1]
for i in range(8):
nx = x+dx[i]
ny = y+dy[i]
if nx >= 0 and nx < m and ny >= 0 and ny < n:
if... | 22.69697 | 72 | 0.460614 |
d4b8aabd6c6ffe4d18bf15321ab26ad80f1e4da0 | 39,041 | py | Python | maro/cli/maro.py | yangboz/maro | 0973783e55ca07bf8e177910c9d47854117a4ea8 | [
"MIT"
] | 598 | 2020-09-23T00:50:22.000Z | 2022-03-31T08:12:54.000Z | maro/cli/maro.py | gx9702/maro | 38c796f0a7ed1e0f64c299d96c6e0df032401fa9 | [
"MIT"
] | 235 | 2020-09-22T10:20:48.000Z | 2022-03-31T02:10:03.000Z | maro/cli/maro.py | gx9702/maro | 38c796f0a7ed1e0f64c299d96c6e0df032401fa9 | [
"MIT"
] | 116 | 2020-09-22T09:19:04.000Z | 2022-02-12T05:04:07.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import logging
import traceback
from argparse import Namespace
from copy import deepcopy
import maro.cli.utils.examples as CliExamples
from maro import __version__
from maro.cli.utils.params import GlobalParams
from maro.cli.utils.parser import... | 35.267389 | 117 | 0.698983 |
063e12309080ed2776f217a532fde48b49a1c930 | 5,154 | py | Python | tensorflow/python/data/experimental/kernel_tests/rejection_resample_test.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 36 | 2016-12-17T15:25:25.000Z | 2022-01-29T21:50:53.000Z | tensorflow/python/data/experimental/kernel_tests/rejection_resample_test.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 59 | 2019-06-17T09:37:49.000Z | 2022-01-19T01:21:34.000Z | tensorflow/python/data/experimental/kernel_tests/rejection_resample_test.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 36 | 2017-07-27T21:12:40.000Z | 2022-02-03T16:45:56.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.553191 | 80 | 0.697711 |
9be2d4efd921d8909122c6e3ac2881c38ebeed12 | 4,354 | py | Python | optimizer/AEO.py | thieu1995/IFCB | 4a5936f93e4e317915dfcd12682829cf20a39552 | [
"MIT"
] | 4 | 2021-02-05T13:45:23.000Z | 2022-03-09T05:44:58.000Z | optimizer/AEO.py | bkc-group/IFCB | 1ada1151eb057510c16b0ed66b980b736603a0e5 | [
"MIT"
] | null | null | null | optimizer/AEO.py | bkc-group/IFCB | 1ada1151eb057510c16b0ed66b980b736603a0e5 | [
"MIT"
] | 2 | 2021-02-15T14:55:22.000Z | 2021-03-13T08:48:17.000Z | #!/usr/bin/env python
# ------------------------------------------------------------------------------------------------------%
# Created by "Thieu" at 12:27, 15/01/2021 %
# ... | 46.319149 | 161 | 0.469453 |
48e3bc3121eaed2a85e0fe947aae515ff3c24c25 | 17,528 | py | Python | code/Andre/py/refit_unet_d8g_222_swrap_03.py | astoc/kaggle_dsb2017 | 2421442cb220518d9ad70b0f3f7611ccf6303af4 | [
"MIT"
] | 9 | 2017-08-08T16:38:54.000Z | 2019-07-20T07:50:16.000Z | code/Andre/py/refit_unet_d8g_222_swrap_03.py | astoc/kaggle_dsb2017 | 2421442cb220518d9ad70b0f3f7611ccf6303af4 | [
"MIT"
] | 1 | 2018-06-09T15:45:13.000Z | 2018-06-09T15:45:13.000Z | code/Andre/py/refit_unet_d8g_222_swrap_03.py | astoc/kaggle_dsb2017 | 2421442cb220518d9ad70b0f3f7611ccf6303af4 | [
"MIT"
] | 9 | 2017-07-18T11:42:25.000Z | 2019-11-20T23:32:38.000Z | """
Created on Thu Jan 26 17:04:11 2017
@author: Andre Stochniol, andre@stochniol.com
Fit unet style nodule identifier on Luna databaset using 8-grid scheme
Physical resolution 2x2x2mm
Data aggregated, shuffled; wrap augmentation used (swrap)
"""
import numpy as np
from keras.models import load_model,Model
from k... | 41.933014 | 421 | 0.63293 |
129b7622967975dfed73c61a77036c9955cecc2d | 274 | py | Python | Exercícios/1987 - Divisibilidade por 3.py | NycoleRibeiro/Exercicios-URI | 6db585fade12e487b64775f063b7a85dcdf22137 | [
"MIT"
] | null | null | null | Exercícios/1987 - Divisibilidade por 3.py | NycoleRibeiro/Exercicios-URI | 6db585fade12e487b64775f063b7a85dcdf22137 | [
"MIT"
] | null | null | null | Exercícios/1987 - Divisibilidade por 3.py | NycoleRibeiro/Exercicios-URI | 6db585fade12e487b64775f063b7a85dcdf22137 | [
"MIT"
] | null | null | null | while True:
try:
n, m = input().split(" ")
soma = 0
for i in m:
soma += int(i)
print(soma, end=' ')
if soma % 3 == 0:
print("sim")
else:
print("nao")
except EOFError:
break | 18.266667 | 33 | 0.375912 |
88a49ed30e9f4ada5aa1b14a326e15faeae9e98c | 12,576 | py | Python | kubernetes_asyncio/client/models/v1_stateful_set_status.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_stateful_set_status.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_stateful_set_status.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.14.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Stateful... | 36.988235 | 235 | 0.664202 |
6893957cd3831d9a67709f381b84cc421eeb15d4 | 86 | py | Python | code/arc094_a_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | 3 | 2019-08-16T16:55:48.000Z | 2021-04-11T10:21:40.000Z | code/arc094_a_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | code/arc094_a_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | l=sorted(map(int,input().split()))
a=2*l[2]-l[1]-l[0]
print((a+3)//2 if a%2 else a//2) | 28.666667 | 34 | 0.569767 |
78a28749c9d67da44143fc999db6da4ee140d967 | 1,914 | py | Python | aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20141111/PushObjectCacheRequest.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-cdn/aliyunsdkcdn/request/v20141111/PushObjectCacheRequest.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-cdn/aliyunsdkcdn/request/v20141111/PushObjectCacheRequest.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.178571 | 74 | 0.761233 |
ac37b0baf014e515f4baa39f82035855da566d6a | 1,732 | py | Python | quilt3_local/quilt3_local/api.py | admariner/quilt | e8ff056f6c58b2e54028f45a0b4a14e255df857c | [
"Apache-2.0"
] | null | null | null | quilt3_local/quilt3_local/api.py | admariner/quilt | e8ff056f6c58b2e54028f45a0b4a14e255df857c | [
"Apache-2.0"
] | 32 | 2021-10-06T20:06:16.000Z | 2021-12-27T13:22:19.000Z | quilt3_local/quilt3_local/api.py | admariner/quilt | e8ff056f6c58b2e54028f45a0b4a14e255df857c | [
"Apache-2.0"
] | null | null | null | import logging
import sys
import ariadne.asgi
import boto3
import fastapi
from botocore.exceptions import ClientError
from .context import QuiltContext
from .graphql import schema as graphql_schema
logger = logging.getLogger(__name__)
sts_client = boto3.client("sts")
session_cred = boto3._get_default_session().get_... | 30.385965 | 115 | 0.704388 |
307a63d23cff1b18e2d90a35a92c8459525e02d9 | 637 | py | Python | scripts/run_bbtrim.py | marykthompson/ribopop_rnaseq | 6125bc15657491f14d99fd192a711110884e8c11 | [
"MIT"
] | null | null | null | scripts/run_bbtrim.py | marykthompson/ribopop_rnaseq | 6125bc15657491f14d99fd192a711110884e8c11 | [
"MIT"
] | null | null | null | scripts/run_bbtrim.py | marykthompson/ribopop_rnaseq | 6125bc15657491f14d99fd192a711110884e8c11 | [
"MIT"
] | null | null | null | '''
run_bbtrim.py
Use bbduk to trim adapters and poly(A) from Quant-Seq reads as recommended by Lexogen.
'''
import os
from snakemake.shell import shell
extra = snakemake.params.get('extra', '')
log = snakemake.log_fmt_shell(stdout=True, stderr=True)
sample = [snakemake.input] if isinstance(snakemake.input, str) els... | 26.541667 | 93 | 0.692308 |
e536912bc7085cab167479d11cf3aaea5c4071ac | 1,741 | py | Python | recipe_parser/recipes/justbento.py | tyler-a-cox/recipe-parsing | fa883f66a39063cf72912527628b082cda455e76 | [
"MIT"
] | null | null | null | recipe_parser/recipes/justbento.py | tyler-a-cox/recipe-parsing | fa883f66a39063cf72912527628b082cda455e76 | [
"MIT"
] | null | null | null | recipe_parser/recipes/justbento.py | tyler-a-cox/recipe-parsing | fa883f66a39063cf72912527628b082cda455e76 | [
"MIT"
] | null | null | null | from ._schema import DefaultSchema
from ._utils import get_minutes, normalize_string
class JustBento(DefaultSchema):
@classmethod
def host(cls):
return "justbento.com"
def title(self):
expected_prefix = "Recipe: "
title = self.soup.find("meta", {"property": "og:title", "content": ... | 31.654545 | 88 | 0.572085 |
371d8cd2e29beb9f7a218bd487e4de4f17a9a695 | 215 | py | Python | 01 Fundamental/Session 04/homework/shape2.py | culee/c4e | 775c53fa92a31696431760f58a79a52889bfb46f | [
"MIT"
] | null | null | null | 01 Fundamental/Session 04/homework/shape2.py | culee/c4e | 775c53fa92a31696431760f58a79a52889bfb46f | [
"MIT"
] | null | null | null | 01 Fundamental/Session 04/homework/shape2.py | culee/c4e | 775c53fa92a31696431760f58a79a52889bfb46f | [
"MIT"
] | null | null | null | from turtle import *
hideturtle()
color("blue")
speed(-1)
length = 110
setheading(-140)
while length > 0:
for j in range(4):
forward(length)
right(90)
right(10)
length -= 2
mainloop()
| 12.647059 | 23 | 0.6 |
8f7b2de9491044e1a7c776f548957763158b2774 | 6,405 | py | Python | container/util.py | adracus/cc-utils | dcd1ff544d8b18a391188903789d1cac929f50f9 | [
"Apache-2.0"
] | null | null | null | container/util.py | adracus/cc-utils | dcd1ff544d8b18a391188903789d1cac929f50f9 | [
"Apache-2.0"
] | null | null | null | container/util.py | adracus/cc-utils | dcd1ff544d8b18a391188903789d1cac929f50f9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed
# under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licens... | 32.348485 | 99 | 0.645433 |
c6cdf3f92c71644f0a872fbc8f463c117c85de2a | 362 | py | Python | MLStripper.py | trovdimi/wikilinks | 835feb3a982d9a77afc88b6787b4b84c411442db | [
"MIT"
] | 6 | 2016-03-11T08:31:02.000Z | 2020-06-25T14:12:47.000Z | MLStripper.py | trovdimi/wikilinks | 835feb3a982d9a77afc88b6787b4b84c411442db | [
"MIT"
] | null | null | null | MLStripper.py | trovdimi/wikilinks | 835feb3a982d9a77afc88b6787b4b84c411442db | [
"MIT"
] | 1 | 2018-03-24T13:06:25.000Z | 2018-03-24T13:06:25.000Z | from HTMLParser import HTMLParser
__author__ = 'dimitrovdr'
#taken from http://stackoverflow.com/questions/753052/strip-html-from-strings-in-python
class MLStripper(HTMLParser):
def __init__(self):
self.reset()
self.fed = []
def handle_data(self, d):
self.fed.append(d)
def get_data... | 25.857143 | 88 | 0.671271 |
cc029f2dd3c284677dee407de840aff596c425ed | 16,746 | py | Python | Wordpress/CVE-2021-24160/exploit.py | Hacker5preme/Exploits | 4360551dd8ac194768e8be32ad709ecaf421480f | [
"MIT"
] | 26 | 2021-06-02T06:53:18.000Z | 2022-03-24T07:06:00.000Z | Wordpress/CVE-2021-24160/exploit.py | Hacker5preme/Exploits | 4360551dd8ac194768e8be32ad709ecaf421480f | [
"MIT"
] | 4 | 2021-07-17T05:39:35.000Z | 2022-03-24T08:24:10.000Z | Wordpress/CVE-2021-24160/exploit.py | Hacker5preme/Exploits | 4360551dd8ac194768e8be32ad709ecaf421480f | [
"MIT"
] | 6 | 2021-07-26T04:29:31.000Z | 2022-03-21T17:34:44.000Z | # Exploit Title: Wordpress Plugin Backup Guard < 1.6.0 - Remote Code Execution (Authenticated)
# Date 05.07.2021
# Exploit Author: Ron Jost (Hacker5preme)
# Vendor Homepage: https://responsive.menu/
# Software Link: https://downloads.wordpress.org/plugin/responsive-menu.4.0.2.zip
# Version: 4.0.0 - 4.0.3
# Tested on: U... | 133.968 | 12,564 | 0.706736 |
cd08e79491fedb650897d395314a27aacf3f1bcf | 12,002 | py | Python | sdk/python/pulumi_azure_native/synapse/v20210501/private_endpoint_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/synapse/v20210501/private_endpoint_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/synapse/v20210501/private_endpoint_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 52.640351 | 1,283 | 0.707549 |
af19bcae59618400bbb5873efaf8ea86b76a5ac8 | 628 | py | Python | src/boot/sign.py | Sinap/PotatOS | 479e16ebaa826e709960e48dd2fb5812b90c7bc1 | [
"MIT"
] | null | null | null | src/boot/sign.py | Sinap/PotatOS | 479e16ebaa826e709960e48dd2fb5812b90c7bc1 | [
"MIT"
] | null | null | null | src/boot/sign.py | Sinap/PotatOS | 479e16ebaa826e709960e48dd2fb5812b90c7bc1 | [
"MIT"
] | null | null | null | #!/usr/env python
from __future__ import print_function
import os
import sys
def main():
boot = sys.argv[1]
if not os.path.exists(boot):
print('File %s does not exist' % boot, file=sys.stderr)
exit(1)
with open(boot, 'rb') as f:
buff = f.read()
buff_len = len(buff)
... | 22.428571 | 71 | 0.533439 |
f07f43f67fb324e85689c9998c32b0dbc5983882 | 843 | py | Python | config/deep_bidir_lstm_2x128.py | dheeraj091/sememtic | 8aa526c12dd96e900414f90f1d78d034ffdf531e | [
"MIT"
] | 459 | 2016-02-29T22:23:05.000Z | 2022-03-21T20:14:08.000Z | config/deep_bidir_lstm_2x128.py | yifan/DeepMind-Teaching-Machines-to-Read-and-Comprehend | 8ad50e9f2562b1fd055939e8582f07e46f54b1ef | [
"MIT"
] | 11 | 2016-03-11T14:15:01.000Z | 2018-12-05T15:17:23.000Z | config/deep_bidir_lstm_2x128.py | yifan/DeepMind-Teaching-Machines-to-Read-and-Comprehend | 8ad50e9f2562b1fd055939e8582f07e46f54b1ef | [
"MIT"
] | 130 | 2016-03-02T15:51:32.000Z | 2022-03-21T20:13:59.000Z | from blocks.algorithms import BasicMomentum, AdaDelta, RMSProp, Adam, CompositeRule, StepClipping
from blocks.initialization import IsotropicGaussian, Constant
from blocks.bricks import Tanh
from model.deep_bidir_lstm import Model
batch_size = 32
sort_batch_count = 20
shuffle_questions = True
shuffle_entities = Tru... | 22.184211 | 97 | 0.768683 |
bb7127404cfd6a0ee628556a0730e10a5ce8ab97 | 10,716 | py | Python | assignment3/test_retina.py | dbirman/cs375 | 7aeac1ed57eff74cbecb3e1091b01f00d34629a8 | [
"MIT"
] | null | null | null | assignment3/test_retina.py | dbirman/cs375 | 7aeac1ed57eff74cbecb3e1091b01f00d34629a8 | [
"MIT"
] | null | null | null | assignment3/test_retina.py | dbirman/cs375 | 7aeac1ed57eff74cbecb3e1091b01f00d34629a8 | [
"MIT"
] | 2 | 2017-12-02T01:46:28.000Z | 2018-01-08T21:36:58.000Z | from __future__ import division, print_function, absolute_import
import os, sys
from collections import OrderedDict
import numpy as np
import pymongo as pm
import tensorflow as tf
from tfutils import base, data, model, optimizer, utils
import copy
NUM_GPUS = 1
if not isinstance(NUM_GPUS, list):
DEVICES = ['/gpu... | 35.483444 | 118 | 0.587346 |
d1eaa762ec6081cf1c844c36c7ccbf0b4a46b22c | 3,125 | py | Python | cmongo2csv.py | stpettersens/cmongo2csv | 0b15a3f375a3e84322e96ac070d469ed6ffdd827 | [
"MIT"
] | null | null | null | cmongo2csv.py | stpettersens/cmongo2csv | 0b15a3f375a3e84322e96ac070d469ed6ffdd827 | [
"MIT"
] | null | null | null | cmongo2csv.py | stpettersens/cmongo2csv | 0b15a3f375a3e84322e96ac070d469ed6ffdd827 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
cmongo2csv
Utility to convert a MongoDB JSON dump to a CSV file.
Copyright 2015 Sam Saint-Pettersen.
Licensed under the MIT/X11 License.
Use -h switch for usage information.
"""
import sys
import re
import json
import argparse
signature = 'cmongo2csv 1.0.1 (https://github.com/stpettersens/c... | 26.041667 | 101 | 0.6304 |
0f9ec0084e77fcdc23449679ce4618bdd7e314e8 | 924 | py | Python | Maverick/Metadata.py | loftwah/Maverick | d0d3da922d0ee6fe2383301d16731890aef4e8ee | [
"MIT"
] | null | null | null | Maverick/Metadata.py | loftwah/Maverick | d0d3da922d0ee6fe2383301d16731890aef4e8ee | [
"MIT"
] | null | null | null | Maverick/Metadata.py | loftwah/Maverick | d0d3da922d0ee6fe2383301d16731890aef4e8ee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import moment
class Metadata(dict):
"""Metadata
文章以及页面的元数据
"""
def __init__(self, fr):
dict.__init__({})
self["title"] = str(fr.get("title", ""))
self["slug"] = str(fr.get("slug", self["title"]))
self["date"] = moment.date(str(fr.get... | 28.875 | 83 | 0.506494 |
9b9a17fe44a5d339a116381449f5d3aa618c65d1 | 2,303 | py | Python | burlap/manifest.py | tutordelphia/burlap | 38e5cef10a480cd9931bee3e88d91cb58482bf41 | [
"MIT"
] | null | null | null | burlap/manifest.py | tutordelphia/burlap | 38e5cef10a480cd9931bee3e88d91cb58482bf41 | [
"MIT"
] | null | null | null | burlap/manifest.py | tutordelphia/burlap | 38e5cef10a480cd9931bee3e88d91cb58482bf41 | [
"MIT"
] | null | null | null | """
Tracks changes between deployments.
"""
from __future__ import print_function
from pprint import pprint
#TODO: remove? largely deprecated, use the deploy module instead
from burlap import common
from burlap.decorators import task, runs_once
from burlap import Satchel
class ManifestSatchel(Satchel):
name = '... | 30.302632 | 87 | 0.603995 |
138669b132da9dea08d56de2d0715d72e59419e9 | 365 | py | Python | apphv/mainUser/migrations/0025_auto_20190624_1503.py | FerneyMoreno20/Portfolio | 59eaa4f4f6762386fe84450f65f508be1414f857 | [
"bzip2-1.0.6"
] | null | null | null | apphv/mainUser/migrations/0025_auto_20190624_1503.py | FerneyMoreno20/Portfolio | 59eaa4f4f6762386fe84450f65f508be1414f857 | [
"bzip2-1.0.6"
] | 6 | 2019-12-04T23:34:47.000Z | 2021-06-09T18:01:16.000Z | apphv/mainUser/migrations/0025_auto_20190624_1503.py | FerneyMoreno20/Portfolio | 59eaa4f4f6762386fe84450f65f508be1414f857 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.2 on 2019-06-24 15:03
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('mainUser', '0024_auto_20190624_1458'),
]
operations = [
migrations.RenameField(
model_name='usuarios',
old_name='IdUsuario',... | 19.210526 | 48 | 0.586301 |
ed4b3e7585648338bb412b171701a067776a65ae | 3,681 | py | Python | Contents/Code/parser.py | balesz/SuperSubtitles.bundle | 6df8346afea88c030c59ac7c22980575d835be4b | [
"Apache-2.0"
] | 9 | 2015-12-30T12:59:55.000Z | 2022-01-09T19:57:37.000Z | Contents/Code/parser.py | balesz/SuperSubtitles.bundle | 6df8346afea88c030c59ac7c22980575d835be4b | [
"Apache-2.0"
] | 1 | 2016-11-14T12:15:14.000Z | 2016-11-14T12:15:14.000Z | Contents/Code/parser.py | balesz/SuperSubtitles.bundle | 6df8346afea88c030c59ac7c22980575d835be4b | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import re
from HTMLParser import HTMLParser
def clear_html(value):
start_pattern = "<!--Az eredménytáblázat ELEJE-->"
end_pattern = "<!--Az eredménytáblázat VÉGE-->"
if value.find(start_pattern) > 0 and value.find(end_pattern) > 0:
return value[value.find(start_pattern):value.find(e... | 32.008696 | 90 | 0.556642 |
80ead79911eac3d83aa6f65a4a17cfcf78003efc | 14,694 | py | Python | sdk/python/pulumi_aws/iam/outputs.py | wgarcia79/pulumi-aws | c63c224734f1d72ba84986a33f36413c9f9cbe27 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-11-10T16:33:40.000Z | 2021-11-10T16:33:40.000Z | sdk/python/pulumi_aws/iam/outputs.py | wgarcia79/pulumi-aws | c63c224734f1d72ba84986a33f36413c9f9cbe27 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/iam/outputs.py | wgarcia79/pulumi-aws | c63c224734f1d72ba84986a33f36413c9f9cbe27 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 46.353312 | 660 | 0.658704 |
242494bfe92849b6fd51c6d6787900e6cbeb36c8 | 429 | py | Python | examples/phend-fring.py | LBJ-Wade/phenom_gw_waveform | 2c705e6ba85510c573d23dca8be4456665d29edf | [
"MIT"
] | 1 | 2020-05-12T00:55:53.000Z | 2020-05-12T00:55:53.000Z | examples/phend-fring.py | LBJ-Wade/phenom_gw_waveform | 2c705e6ba85510c573d23dca8be4456665d29edf | [
"MIT"
] | null | null | null | examples/phend-fring.py | LBJ-Wade/phenom_gw_waveform | 2c705e6ba85510c573d23dca8be4456665d29edf | [
"MIT"
] | 1 | 2021-04-10T22:31:49.000Z | 2021-04-10T22:31:49.000Z |
import phenom
eta, chi1z, chi2z = 0.25, 0., 0.
fin_spin = phenom.remnant.FinalSpin0815(eta, chi1z, chi2z)
fring = phenom.remnant.fring(eta, chi1z, chi2z, fin_spin)
fdamp = phenom.remnant.fdamp(eta, chi1z, chi2z, fin_spin)
print "ringdown frequency in geometric units = ", fring
print "imaginary part of the ringdown... | 21.45 | 63 | 0.724942 |
699085dae58f034ac76954056534702bf3e8b741 | 543 | py | Python | manage.py | AlishaOne/onestop4you2 | 1d75ce3af56adfe884fd1953292dc070c7c4f23c | [
"MIT"
] | 1 | 2018-04-20T07:03:20.000Z | 2018-04-20T07:03:20.000Z | manage.py | AlishaOne/onestop4you2 | 1d75ce3af56adfe884fd1953292dc070c7c4f23c | [
"MIT"
] | null | null | null | manage.py | AlishaOne/onestop4you2 | 1d75ce3af56adfe884fd1953292dc070c7c4f23c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "onestop4you.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. ... | 33.9375 | 75 | 0.688766 |
14cea8165c7c5ddfaf30384a9707b29b37016d05 | 483 | py | Python | parrot/model/model_piv.py | wayne-batman/Parrot | d93c5132e3803917ccdd69dd3160253d1b6b3536 | [
"Apache-2.0"
] | 14 | 2019-07-21T16:39:43.000Z | 2021-06-21T09:13:28.000Z | parrot/model/model_piv.py | wayne-batman/Parrot | d93c5132e3803917ccdd69dd3160253d1b6b3536 | [
"Apache-2.0"
] | null | null | null | parrot/model/model_piv.py | wayne-batman/Parrot | d93c5132e3803917ccdd69dd3160253d1b6b3536 | [
"Apache-2.0"
] | 1 | 2019-09-08T13:13:27.000Z | 2019-09-08T13:13:27.000Z | import math
from parrot.core import *
class PIVModel(Model):
def __init__(self, s=0.25):
self.s = s
def score_term(self, tf: float, dtn: float, dl: float, ql: float, ctf: float,
df: float, qtf: float, ctn: float, C: float, N: float):
s = self.s
avdl = C / N
p... | 30.1875 | 81 | 0.519669 |
7ea626f89da5922daed66095e0b6646226c8b315 | 40,554 | py | Python | src/you_get/extractors/bilibili.py | TL-Yao/you-get | bf218bb27d81e27783680a6acb2d7ce8305cb880 | [
"MIT"
] | null | null | null | src/you_get/extractors/bilibili.py | TL-Yao/you-get | bf218bb27d81e27783680a6acb2d7ce8305cb880 | [
"MIT"
] | null | null | null | src/you_get/extractors/bilibili.py | TL-Yao/you-get | bf218bb27d81e27783680a6acb2d7ce8305cb880 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from ..common import *
from ..extractor import VideoExtractor
import hashlib
class Bilibili(VideoExtractor):
name = "Bilibili"
# Bilibili media encoding options, in descending quality order.
stream_types = [
{'id': 'hdflv2_4k', 'quality': 120, 'audio_quality': 30280,
... | 52.599222 | 237 | 0.54658 |
c4eb360e23f4bb43e91824560fef84d985d7cea2 | 12,473 | py | Python | mission/missions/old/2017/torpedoes.py | cuauv/software | 5ad4d52d603f81a7f254f365d9b0fe636d03a260 | [
"BSD-3-Clause"
] | 70 | 2015-11-16T18:04:01.000Z | 2022-03-05T09:04:02.000Z | mission/missions/old/2017/torpedoes.py | cuauv/software | 5ad4d52d603f81a7f254f365d9b0fe636d03a260 | [
"BSD-3-Clause"
] | 1 | 2016-08-03T05:13:19.000Z | 2016-08-03T06:19:39.000Z | mission/missions/old/2017/torpedoes.py | cuauv/software | 5ad4d52d603f81a7f254f365d9b0fe636d03a260 | [
"BSD-3-Clause"
] | 34 | 2015-12-15T17:29:23.000Z | 2021-11-18T14:15:12.000Z | from collections import namedtuple
import copy
import shm
from shm.watchers import watcher
from mission.framework.task import Task
from mission.framework.targeting import PIDLoop, ForwardTarget
from mission.framework.combinators import (
Sequential,
Concurrent,
MasterConcurrent,
Retry,
Conditional,
... | 30.421951 | 105 | 0.570833 |
c4934d3dff4073a9d9c15e6c4f3428702f360f94 | 735 | py | Python | migrations/versions/bc7876f81064_.py | hkjayakumar/ghost-server | 5ecbf57e4c02fba2517161e36b0fb51410e5969b | [
"MIT"
] | 1 | 2020-10-17T23:42:32.000Z | 2020-10-17T23:42:32.000Z | migrations/versions/bc7876f81064_.py | hkjayakumar/ghost-server | 5ecbf57e4c02fba2517161e36b0fb51410e5969b | [
"MIT"
] | null | null | null | migrations/versions/bc7876f81064_.py | hkjayakumar/ghost-server | 5ecbf57e4c02fba2517161e36b0fb51410e5969b | [
"MIT"
] | null | null | null | """empty message
Revision ID: bc7876f81064
Revises: 891fd177041d
Create Date: 2017-08-08 00:21:23.137849
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'bc7876f81064'
down_revision = '891fd177041d'
branch_labels = None... | 25.344828 | 113 | 0.715646 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.