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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a0f0feb0ef3cd24b28f28e8a3c9051151900b19 | 28,185 | py | Python | imapbackup.py | lpirl/imapbackup | 167c927d4683487132388db53c6bbaaad258b863 | [
"MIT"
] | null | null | null | imapbackup.py | lpirl/imapbackup | 167c927d4683487132388db53c6bbaaad258b863 | [
"MIT"
] | null | null | null | imapbackup.py | lpirl/imapbackup | 167c927d4683487132388db53c6bbaaad258b863 | [
"MIT"
] | null | null | null | #!/usr/bin/env python -u
"""IMAP Incremental Backup Script"""
__version__ = "1.4h"
__author__ = "Rui Carmo (http://taoofmac.com)"
__copyright__ = "(C) 2006-2018 Rui Carmo. Code under MIT License.(C)"
__contributors__ = "jwagnerhki, Bob Ippolito, Michael Leonhard, Giuseppe Scrivano <gscrivano@gnu.org>, Ronan Sheth, Bra... | 35.542245 | 169 | 0.577009 |
4a0f1011ffbf099c237c4d1374a363f31b3751e6 | 7,267 | py | Python | nuitka/build/SconsSpawn.py | ronnymajani/Nuitka | 0083a931e0bd085e4ac9991074b3b8bc05be52b1 | [
"Apache-2.0"
] | null | null | null | nuitka/build/SconsSpawn.py | ronnymajani/Nuitka | 0083a931e0bd085e4ac9991074b3b8bc05be52b1 | [
"Apache-2.0"
] | 1 | 2021-01-05T09:01:31.000Z | 2021-01-05T09:01:31.000Z | nuitka/build/SconsSpawn.py | ronnymajani/Nuitka | 0083a931e0bd085e4ac9991074b3b8bc05be52b1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | 29.661224 | 103 | 0.584698 |
4a0f10ab6a03dc53468e295de2b2593e300c70e3 | 4,620 | py | Python | alphapose/datasets/coco_wholebody_det.py | phamtrongthang123/AlphaPose_infer_folder_video | 5bb9560a2982c3f6ba4ec6ae5b6d000f9a7b3c64 | [
"Apache-2.0"
] | 5 | 2020-09-11T09:06:17.000Z | 2021-12-22T15:46:57.000Z | alphapose/datasets/coco_wholebody_det.py | phamtrongthang123/AlphaPose_infer_folder_video | 5bb9560a2982c3f6ba4ec6ae5b6d000f9a7b3c64 | [
"Apache-2.0"
] | null | null | null | alphapose/datasets/coco_wholebody_det.py | phamtrongthang123/AlphaPose_infer_folder_video | 5bb9560a2982c3f6ba4ec6ae5b6d000f9a7b3c64 | [
"Apache-2.0"
] | 2 | 2020-09-11T09:06:20.000Z | 2021-12-23T15:21:30.000Z | # -----------------------------------------------------
# Copyright (c) Shanghai Jiao Tong University. All rights reserved.
# Written by Haoyi Zhu
# -----------------------------------------------------
"""Coco WholeBody Human Detection Box dataset."""
import json
import os
import cv2
import torch
import t... | 40.173913 | 192 | 0.541991 |
4a0f10aebbd38b6bf719adbe5e4819aba98c4c05 | 8,489 | py | Python | networkx/readwrite/pajek.py | tombeek111/networkx | 0770b228e0aab5acf8842981947857fdf85205ab | [
"BSD-3-Clause"
] | 1 | 2019-12-03T14:58:04.000Z | 2019-12-03T14:58:04.000Z | networkx/readwrite/pajek.py | tombeek111/networkx | 0770b228e0aab5acf8842981947857fdf85205ab | [
"BSD-3-Clause"
] | 1 | 2019-12-19T16:49:00.000Z | 2019-12-20T06:22:46.000Z | networkx/readwrite/pajek.py | tombeek111/networkx | 0770b228e0aab5acf8842981947857fdf85205ab | [
"BSD-3-Clause"
] | 2 | 2020-02-13T10:33:34.000Z | 2020-08-09T07:59:26.000Z | """
*****
Pajek
*****
Read graphs in Pajek format.
This implementation handles directed and undirected graphs including
those with self loops and parallel edges.
Format
------
See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm
for format information.
"""
import warnings
import networkx as nx
from ne... | 31.095238 | 78 | 0.508658 |
4a0f10c57ead0b675bc0aa1040d61a1377f7cc70 | 5,522 | py | Python | solution/operators/sdi_pandas_0.0.30/content/files/vflow/subengines/com/sap/python36/operators/sdi_pandas/cleanse/drop_1valuecolumn/drop_1valuecolumns.py | thhapke/DI_Pandas | 7a9108007459260a30ea7ee404a76b42861c81c5 | [
"MIT"
] | 2 | 2020-01-02T19:54:46.000Z | 2020-03-09T08:49:33.000Z | solution/operators/sdi_pandas_0.0.30/content/files/vflow/subengines/com/sap/python36/operators/sdi_pandas/cleanse/drop_1valuecolumn/drop_1valuecolumns.py | thhapke/DI_Pandas | 7a9108007459260a30ea7ee404a76b42861c81c5 | [
"MIT"
] | null | null | null | solution/operators/sdi_pandas_0.0.30/content/files/vflow/subengines/com/sap/python36/operators/sdi_pandas/cleanse/drop_1valuecolumn/drop_1valuecolumns.py | thhapke/DI_Pandas | 7a9108007459260a30ea7ee404a76b42861c81c5 | [
"MIT"
] | 1 | 2020-03-28T22:53:16.000Z | 2020-03-28T22:53:16.000Z |
import os
import pandas as pd
import sdi_utils.gensolution as gs
import sdi_utils.set_logging as slog
import sdi_utils.tprogress as tp
import sdi_utils.textfield_parser as tfp
try:
api
except NameError:
class api:
class config:
## Meta data
tags = {'python36': '','sdi_utils':... | 39.163121 | 138 | 0.576965 |
4a0f10d743a48909a1c04f779b9e1688cd8b1147 | 4,954 | py | Python | examples/python/tsp.py | prezaei85/or-tools | 8ae61b6feb64c6193b4706535f8d06ee6e4e7270 | [
"Apache-2.0"
] | 3 | 2021-12-11T12:30:09.000Z | 2021-12-30T09:49:45.000Z | examples/python/tsp.py | kamyu104/or-tools | 8ae61b6feb64c6193b4706535f8d06ee6e4e7270 | [
"Apache-2.0"
] | null | null | null | examples/python/tsp.py | kamyu104/or-tools | 8ae61b6feb64c6193b4706535f8d06ee6e4e7270 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010-2017 Google
# 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, so... | 36.426471 | 80 | 0.700646 |
4a0f12b1bca59554bd78e74460f1c1fb54337c0f | 61 | py | Python | Graph/Graph/blog/tests.py | MGijon/TheGraph.es | 34fc54e8d14625eb033f7506f12a615e3078c98b | [
"MIT"
] | null | null | null | Graph/Graph/blog/tests.py | MGijon/TheGraph.es | 34fc54e8d14625eb033f7506f12a615e3078c98b | [
"MIT"
] | 30 | 2020-01-10T21:20:52.000Z | 2022-03-12T00:25:41.000Z | Graph/Graph/blog/tests.py | MGijon/TheGraph.es | 34fc54e8d14625eb033f7506f12a615e3078c98b | [
"MIT"
] | null | null | null | """Blog tests."""
# Django
from django.test import TestCase
| 12.2 | 32 | 0.704918 |
4a0f12e4ed7cbbd6a8a5275896e9870e61a4aae0 | 146 | py | Python | huobi/constant/__init__.py | xujunhuii/huobi_Python | 958df8b22ce774329c7e15a1ecf2f52eea5f6af8 | [
"Apache-2.0"
] | null | null | null | huobi/constant/__init__.py | xujunhuii/huobi_Python | 958df8b22ce774329c7e15a1ecf2f52eea5f6af8 | [
"Apache-2.0"
] | null | null | null | huobi/constant/__init__.py | xujunhuii/huobi_Python | 958df8b22ce774329c7e15a1ecf2f52eea5f6af8 | [
"Apache-2.0"
] | null | null | null | from huobi.constant.definition import *
from huobi.constant.result import *
from huobi.constant.system import *
from huobi.constant.test import *
| 29.2 | 39 | 0.808219 |
4a0f137446af2599aeb98c92a3ad09cf7ec3bd55 | 2,317 | py | Python | magnum/tests/functional/api/v1/models/baypatch_model.py | mail2nsrajesh/magnum | 2e7e5a77967028c961337177ce577eb936c3845c | [
"Apache-2.0"
] | null | null | null | magnum/tests/functional/api/v1/models/baypatch_model.py | mail2nsrajesh/magnum | 2e7e5a77967028c961337177ce577eb936c3845c | [
"Apache-2.0"
] | null | null | null | magnum/tests/functional/api/v1/models/baypatch_model.py | mail2nsrajesh/magnum | 2e7e5a77967028c961337177ce577eb936c3845c | [
"Apache-2.0"
] | 1 | 2020-09-09T14:35:08.000Z | 2020-09-09T14:35:08.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 30.090909 | 79 | 0.667242 |
4a0f14554b46d464f95e7a64d1a1063eea95e280 | 661 | py | Python | Codes/gracekoo/interview_33.py | ghoslation/algorithm | 5708bf89e59a80cd0f50f2e6138f069b4f9bc96e | [
"Apache-2.0"
] | 256 | 2017-10-25T13:02:15.000Z | 2022-02-25T13:47:59.000Z | Codes/gracekoo/interview_33.py | IYoreI/Algorithm | 0addf0cda0ec9e3f46c480eeda3a8ecb64c94121 | [
"Apache-2.0"
] | 56 | 2017-10-27T01:34:20.000Z | 2022-03-01T00:20:55.000Z | Codes/gracekoo/interview_33.py | IYoreI/Algorithm | 0addf0cda0ec9e3f46c480eeda3a8ecb64c94121 | [
"Apache-2.0"
] | 83 | 2017-10-25T12:51:53.000Z | 2022-02-15T08:27:03.000Z | # -*- coding: utf-8 -*-
# @Time: 2020/7/3 10:21
# @Author: GraceKoo
# @File: interview_33.py
# @Desc: https://leetcode-cn.com/problems/chou-shu-lcof/
class Solution:
def nthUglyNumber(self, n: int) -> int:
if n <= 0:
return 0
dp, a, b, c = [1] * n, 0, 0, 0
for i in range(1, n):... | 24.481481 | 59 | 0.444781 |
4a0f15d5405b6d9f46b85e848a3241dc407faf16 | 1,288 | py | Python | tracker/01-tank-and-leds.py | obo/lego | 7c24ed157610ced2461c460ddb5276dfb2adaa72 | [
"MIT"
] | null | null | null | tracker/01-tank-and-leds.py | obo/lego | 7c24ed157610ced2461c460ddb5276dfb2adaa72 | [
"MIT"
] | null | null | null | tracker/01-tank-and-leds.py | obo/lego | 7c24ed157610ced2461c460ddb5276dfb2adaa72 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import logging
from TRACK3R import TRACK3RWithClaw
import threading
import signal
import ev3dev.ev3 as ev3
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(levelname)5s: %(message)s')
log = logging.getLogger(__name__)
log.info("Starting TRACK3RWithClaw")
def... | 25.254902 | 85 | 0.725932 |
4a0f16c7e008cde5441ab1c82f5d2550f089d555 | 8,195 | py | Python | docs/conf.py | yliharma/django-maat | 6aa0ee72bb21658513021506dfd0dde2ee9bd2f1 | [
"MIT"
] | null | null | null | docs/conf.py | yliharma/django-maat | 6aa0ee72bb21658513021506dfd0dde2ee9bd2f1 | [
"MIT"
] | null | null | null | docs/conf.py | yliharma/django-maat | 6aa0ee72bb21658513021506dfd0dde2ee9bd2f1 | [
"MIT"
] | 1 | 2020-06-19T13:40:47.000Z | 2020-06-19T13:40:47.000Z | # -*- coding: utf-8 -*-
#
# Django-maat documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 5 11:53:38 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#... | 31.640927 | 79 | 0.718121 |
4a0f16d9e14d6eb4716eab018414b76fe30b9723 | 1,221 | py | Python | mailchimp3/entities/member.py | multiplay/python-mailchimp | b810821b9a792e820e21eabf124d467799f82a4e | [
"MIT"
] | null | null | null | mailchimp3/entities/member.py | multiplay/python-mailchimp | b810821b9a792e820e21eabf124d467799f82a4e | [
"MIT"
] | null | null | null | mailchimp3/entities/member.py | multiplay/python-mailchimp | b810821b9a792e820e21eabf124d467799f82a4e | [
"MIT"
] | 1 | 2022-02-12T11:32:46.000Z | 2022-02-12T11:32:46.000Z | from mailchimp3.baseapi import BaseApi
class Member(BaseApi):
def __init__(self, *args, **kwargs):
super(Member, self).__init__(*args, **kwargs)
self.endpoint = 'lists'
def all(self, list_id):
"""
returns the first 10 members for a specific list.
"""
return se... | 31.307692 | 101 | 0.622441 |
4a0f17f9ed80eae094f5c320634aeec09cd27be1 | 10,171 | py | Python | bolinette/web/docs.py | TheCaptainCat/flasque | d42deb57572084f513202a32c460186700ce8e0b | [
"MIT"
] | 3 | 2019-10-25T12:21:28.000Z | 2020-09-11T13:43:32.000Z | bolinette/web/docs.py | TheCaptainCat/bolinette | d42deb57572084f513202a32c460186700ce8e0b | [
"MIT"
] | null | null | null | bolinette/web/docs.py | TheCaptainCat/bolinette | d42deb57572084f513202a32c460186700ce8e0b | [
"MIT"
] | null | null | null | import re
from typing import Any, Literal
import yaml
from aiohttp import web as aio_web
from aiohttp_swagger import setup_swagger
from bolinette import types
from bolinette.core import abc, BolinetteContext
from bolinette.data import DataContext, WithDataContext, mapping
from bolinette.web import (
ext,
WebC... | 40.043307 | 113 | 0.530135 |
4a0f1938cb075880aadfd70a2bed774ec09b3550 | 8,650 | py | Python | luna/gateware/platform/daisho.py | pimdegroot/luna | 16110a59c72279e7272310e81ca4656da11fb1da | [
"BSD-3-Clause"
] | null | null | null | luna/gateware/platform/daisho.py | pimdegroot/luna | 16110a59c72279e7272310e81ca4656da11fb1da | [
"BSD-3-Clause"
] | null | null | null | luna/gateware/platform/daisho.py | pimdegroot/luna | 16110a59c72279e7272310e81ca4656da11fb1da | [
"BSD-3-Clause"
] | null | null | null | #
# This file is part of LUNA.
#
# Copyright (c) 2020 Great Scott Gadgets <info@greatscottgadgets.com>
# SPDX-License-Identifier: BSD-3-Clause
from nmigen.build import Resource, Subsignal, Pins, PinsN, Attrs, Clock, DiffPairs, Connector
from nmigen.vendor.intel import IntelPlatform
__all__ = ["DaishoPlatform"]
def... | 37.445887 | 97 | 0.594798 |
4a0f19555db352f34e86bac86f2a04e349d7da48 | 16,262 | py | Python | keyboard/action_code.py | tywtyw2002/python-keyboard | 534d1cb56099569993bc9296524392eaee94cbce | [
"MIT"
] | 439 | 2020-05-02T03:47:55.000Z | 2022-03-27T14:42:54.000Z | keyboard/action_code.py | tywtyw2002/python-keyboard | 534d1cb56099569993bc9296524392eaee94cbce | [
"MIT"
] | 34 | 2020-07-12T15:53:06.000Z | 2022-03-18T08:38:18.000Z | keyboard/action_code.py | tywtyw2002/python-keyboard | 534d1cb56099569993bc9296524392eaee94cbce | [
"MIT"
] | 48 | 2020-05-18T15:41:22.000Z | 2022-03-12T06:44:48.000Z | # -*- coding: utf-8 -*-
#
# reference:
# + https://gist.github.com/MightyPork/6da26e382a7ad91b5496ee55fdc73db2
#
# fmt: off
NO = '\x00'
TRANSPARENT = '\x01'
# NONE = 0x00 # No key pressed
# Keyboard Error Roll Over - used for all slots if too many keys are pressed ("Phantom key")
# ROLLOVER = 0x01
# 0x02 # Keyboa... | 25.409375 | 102 | 0.610319 |
4a0f197fa1bb5bc946bb63577c729952a1240772 | 10,911 | py | Python | code/python/IRNCustomSymbols/v1/fds/sdk/IRNCustomSymbols/model/standard_symbol_dto.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/IRNCustomSymbols/v1/fds/sdk/IRNCustomSymbols/model/standard_symbol_dto.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/IRNCustomSymbols/v1/fds/sdk/IRNCustomSymbols/model/standard_symbol_dto.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
IRN API v1
Allows users to extract, create, update and configure IRN data. # noqa: E501
The version of the OpenAPI document: 1
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from fds.sdk.IRNCustomSymbols.model_utils import ( # noqa: F401
... | 42.621094 | 121 | 0.570983 |
4a0f1baf4760e8af92bee70d9df29bc85e4a16a6 | 2,790 | py | Python | Python/rotated-digits.py | ShuaiWangGit/LeetCode | d85a4cb23f8f85059691994e7ad89001c6e4f3f6 | [
"MIT"
] | 4 | 2019-08-06T01:55:23.000Z | 2021-12-12T21:04:01.000Z | Python/rotated-digits.py | ShuaiWangGit/LeetCode | d85a4cb23f8f85059691994e7ad89001c6e4f3f6 | [
"MIT"
] | null | null | null | Python/rotated-digits.py | ShuaiWangGit/LeetCode | d85a4cb23f8f85059691994e7ad89001c6e4f3f6 | [
"MIT"
] | 8 | 2020-02-20T08:21:12.000Z | 2022-02-17T05:53:21.000Z | # Time: O(logn)
# Space: O(logn)
# X is a good number if after rotating each digit individually by 180 degrees,
# we get a valid number that is different from X.
# A number is valid if each digit remains a digit after rotation.
# 0, 1, and 8 rotate to themselves; 2 and 5 rotate to each other;
# 6 and 9 rotate to each... | 31.348315 | 94 | 0.491756 |
4a0f1c50055fa8812453d8fc05f485d8c7513f88 | 3,134 | py | Python | Lib/test/test_normalization.py | legacy-buildtools/python-2.6.7 | 3be140725590f1a43f7ab8c9fd99f876c3f81536 | [
"PSF-2.0"
] | 1 | 2015-01-05T10:24:11.000Z | 2015-01-05T10:24:11.000Z | Lib/test/test_normalization.py | legacy-buildtools/python-2.6.7 | 3be140725590f1a43f7ab8c9fd99f876c3f81536 | [
"PSF-2.0"
] | null | null | null | Lib/test/test_normalization.py | legacy-buildtools/python-2.6.7 | 3be140725590f1a43f7ab8c9fd99f876c3f81536 | [
"PSF-2.0"
] | null | null | null | from test.test_support import run_unittest, open_urlresource, TestSkipped
import unittest
import sys
import os
from unicodedata import normalize, unidata_version
TESTDATAFILE = "NormalizationTest" + os.extsep + "txt"
TESTDATAURL = "http://www.unicode.org/Public/" + unidata_version + "/ucd/" + TESTDATAFILE
if os.path... | 30.134615 | 89 | 0.516911 |
4a0f1c9308edf9393351d385c4e0bfaabc3bf707 | 690 | py | Python | location.py | scastillosanchez/HACKRPI | ece78dc821f65c2d7d85d695a6de3aa3ab60634d | [
"MIT"
] | null | null | null | location.py | scastillosanchez/HACKRPI | ece78dc821f65c2d7d85d695a6de3aa3ab60634d | [
"MIT"
] | null | null | null | location.py | scastillosanchez/HACKRPI | ece78dc821f65c2d7d85d695a6de3aa3ab60634d | [
"MIT"
] | null | null | null | # location.py
from uszipcode import SearchEngine
import requests
API_KEY = 'dc5ea0e10f11465f9ea0e10f11e65fa6'
def get_location_coords(zipcode):
search = SearchEngine(simple_zipcode=True)
data = search.by_zipcode(zipcode)
data = data.to_json()
coords = [data["lat"], data["long"]]
return coords
de... | 26.538462 | 82 | 0.715942 |
4a0f1db93709b87eae9b770087528fa84e5bd811 | 595 | py | Python | myfirstpjt.py | helloworldtang/python-spider-study | b65bc646e716bd3cd421aa9c395507fded7aff06 | [
"Apache-2.0"
] | null | null | null | myfirstpjt.py | helloworldtang/python-spider-study | b65bc646e716bd3cd421aa9c395507fded7aff06 | [
"Apache-2.0"
] | null | null | null | myfirstpjt.py | helloworldtang/python-spider-study | b65bc646e716bd3cd421aa9c395507fded7aff06 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = ''
__author__ = 'tangcheng'
__mtime__ = '12/12/2017'
"""
from urllib import request
from urllib import parse
from urllib.request import urlopen
# http://dujia.qunar.com/pq/list_%E5%AE%9C%E6%98%8C?
# searchfrom=around&arounddep=%E6%AD%A6%E6%B1%89&tf=Ihot_01... | 18.59375 | 71 | 0.672269 |
4a0f1f46974f276982ee76b99d4bc0f29eb6b8cb | 25,882 | py | Python | tensorflow/python/data/kernel_tests/dataset_test.py | mkuchnik/TF_PCR | c3cc6a9bad115925cd398d01cedd85af68aa1be2 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/data/kernel_tests/dataset_test.py | mkuchnik/TF_PCR | c3cc6a9bad115925cd398d01cedd85af68aa1be2 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/data/kernel_tests/dataset_test.py | mkuchnik/TF_PCR | c3cc6a9bad115925cd398d01cedd85af68aa1be2 | [
"Apache-2.0"
] | null | null | null | # 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... | 40.127132 | 80 | 0.708021 |
4a0f1fa5e1a100700f33f4591394ab80c0fe9bc2 | 15,517 | py | Python | sispo/reconstruction/reconstruction.py | oknuutti/sispo | c54019fca4e941a83cc78eda1356b8441bd04d17 | [
"BSD-2-Clause"
] | null | null | null | sispo/reconstruction/reconstruction.py | oknuutti/sispo | c54019fca4e941a83cc78eda1356b8441bd04d17 | [
"BSD-2-Clause"
] | null | null | null | sispo/reconstruction/reconstruction.py | oknuutti/sispo | c54019fca4e941a83cc78eda1356b8441bd04d17 | [
"BSD-2-Clause"
] | null | null | null | """
Reconstruction module to create 3D models from images.
Currently this module uses openMVG and openMVS.
"""
from datetime import datetime
import logging
from pathlib import Path
from . import openmvg
from . import openmvs
class Reconstructor():
"""Reconstruction of a 3D object from images."""
def __ini... | 40.199482 | 78 | 0.451311 |
4a0f1faf73a5ee0b459b8a9123e7299c462af03f | 3,167 | py | Python | dev/tools/leveleditor/direct/p3d/ppatcher.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | dev/tools/leveleditor/direct/p3d/ppatcher.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | dev/tools/leveleditor/direct/p3d/ppatcher.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | #! /usr/bin/env python
usageText = """
This script generates the patches required to support incremental
download of Panda3D packages. It can be run as a post-process on a
directory hierarchy created by ppackage; it will examine the directory
hierarchy, and create any patches that appear to be missing.
You may run ... | 31.356436 | 77 | 0.7455 |
4a0f2017bc030676028a0e9dc220b799e40e3c24 | 1,409 | py | Python | gcloud/contrib/appmaker/urls.py | SHUN-YI/bk-sops | a4a841bdc44a18518c6c53c04a02996ddc7da2be | [
"Apache-2.0"
] | 2 | 2019-08-15T10:06:26.000Z | 2019-09-17T11:49:20.000Z | gcloud/contrib/appmaker/urls.py | SHUN-YI/bk-sops | a4a841bdc44a18518c6c53c04a02996ddc7da2be | [
"Apache-2.0"
] | null | null | null | gcloud/contrib/appmaker/urls.py | SHUN-YI/bk-sops | a4a841bdc44a18518c6c53c04a02996ddc7da2be | [
"Apache-2.0"
] | 1 | 2020-07-03T06:45:07.000Z | 2020-07-03T06:45:07.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 48.586207 | 305 | 0.715401 |
4a0f20414cd8cd57f9d96dc89344cbb46591288d | 273 | py | Python | launcher/SrcDemo2-debug.py | TiagoFilippi/srcdemo2 | 53bf581bc6fd8efc7b8f9c22b9278a682fdf5365 | [
"BSD-2-Clause"
] | 17 | 2015-07-13T14:36:29.000Z | 2021-03-18T00:56:04.000Z | launcher/SrcDemo2-debug.py | TiagoFilippi/srcdemo2 | 53bf581bc6fd8efc7b8f9c22b9278a682fdf5365 | [
"BSD-2-Clause"
] | 3 | 2015-04-21T23:23:44.000Z | 2017-03-19T16:49:39.000Z | launcher/SrcDemo2-debug.py | TiagoFilippi/srcdemo2 | 53bf581bc6fd8efc7b8f9c22b9278a682fdf5365 | [
"BSD-2-Clause"
] | 8 | 2015-07-13T13:37:52.000Z | 2020-09-18T01:16:48.000Z | import traceback
try:
import SrcDemo2Launcher
SrcDemo2Launcher.launch(True)
except:
traceback.print_exc()
try:
from SrcDemo2Launcher import is_windows
if is_windows():
raw_input('Press Enter to close this window...')
except:
raw_input('Press Enter to continue.')
| 18.2 | 50 | 0.776557 |
4a0f2077a96067016076159817dd5e8a7d7cd598 | 817 | py | Python | desktop/core/ext-py/celery-4.2.1/examples/app/myapp.py | maulikjs/hue | 59ac879b55bb6fb26ecb4e85f4c70836fc21173f | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | desktop/core/ext-py/celery-4.2.1/examples/app/myapp.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | desktop/core/ext-py/celery-4.2.1/examples/app/myapp.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | """myapp.py
Usage::
(window1)$ python myapp.py worker -l info
(window2)$ python
>>> from myapp import add
>>> add.delay(16, 16).get()
32
You can also specify the app to use with the `celery` command,
using the `-A` / `--app` option::
$ celery -A myapp worker -l info
With the `-A myproj` argume... | 19 | 68 | 0.656059 |
4a0f2077db7d23cf2ee18132f53da6530d07623a | 23,927 | py | Python | cupcake/tofu/counting/combine_abundance_across_samples.py | ArthurDondi/cDNA_Cupcake | 528b9593b0ad166ac720be7c5c07a968730a2ce2 | [
"BSD-3-Clause-Clear"
] | 205 | 2016-07-13T06:26:20.000Z | 2022-03-03T06:29:43.000Z | cupcake/tofu/counting/combine_abundance_across_samples.py | ArthurDondi/cDNA_Cupcake | 528b9593b0ad166ac720be7c5c07a968730a2ce2 | [
"BSD-3-Clause-Clear"
] | 186 | 2017-02-22T22:46:46.000Z | 2022-03-23T16:16:15.000Z | cupcake/tofu/counting/combine_abundance_across_samples.py | ArthurDondi/cDNA_Cupcake | 528b9593b0ad166ac720be7c5c07a968730a2ce2 | [
"BSD-3-Clause-Clear"
] | 93 | 2016-08-31T02:24:52.000Z | 2022-02-24T14:01:27.000Z | __author__ = 'etseng@pacb.com'
import os, sys, re, time
import pdb
from csv import DictWriter
from Bio import SeqIO
from collections import defaultdict, namedtuple
from cupcake.tofu import compare_junctions
from cupcake.io import GFF
from bx.intervals import IntervalTree
from bx.intervals.cluster import ClusterTree
... | 49.641079 | 156 | 0.579178 |
4a0f2142226ee708fafc387fae09ebd34ce5f505 | 1,133 | py | Python | {{cookiecutter.project_name}}/template_minimal/app/models.py | rafsaf/respo-fastapi-template | 1225637fe9301b76670fa84ebe96263e7e7676a7 | [
"MIT"
] | 75 | 2021-11-11T14:38:22.000Z | 2022-03-31T14:25:40.000Z | {{cookiecutter.project_name}}/template_minimal/app/models.py | rafsaf/respo-fastapi-template | 1225637fe9301b76670fa84ebe96263e7e7676a7 | [
"MIT"
] | 2 | 2021-11-24T16:45:42.000Z | 2022-01-30T14:20:38.000Z | {{cookiecutter.project_name}}/template_minimal/app/models.py | rafsaf/respo-fastapi-template | 1225637fe9301b76670fa84ebe96263e7e7676a7 | [
"MIT"
] | 9 | 2021-11-11T14:38:27.000Z | 2022-03-04T01:47:38.000Z | """
SQL Alchemy models declaration.
https://docs.sqlalchemy.org/en/14/orm/declarative_styles.html#example-two-dataclasses-with-declarative-table
Dataclass style for powerful autocompletion support.
https://alembic.sqlalchemy.org/en/latest/tutorial.html
Note, it is used by alembic migrations logic, see `alembic/env.py`... | 26.97619 | 108 | 0.740512 |
4a0f21e2840fc629fc51548b07c467137a56018e | 28,349 | py | Python | tensorflow/python/layers/normalization.py | drothlis/tensorflow | 04c318b69c5b565436cfeeaab1cb7fd5419dde27 | [
"Apache-2.0"
] | 1 | 2017-09-08T04:32:21.000Z | 2017-09-08T04:32:21.000Z | tensorflow/python/layers/normalization.py | drothlis/tensorflow | 04c318b69c5b565436cfeeaab1cb7fd5419dde27 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/layers/normalization.py | drothlis/tensorflow | 04c318b69c5b565436cfeeaab1cb7fd5419dde27 | [
"Apache-2.0"
] | 1 | 2017-09-12T19:41:26.000Z | 2017-09-12T19:41:26.000Z | # Copyright 2015 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... | 45.14172 | 80 | 0.660164 |
4a0f21e5a9a84c62da0796c0c2c45d7aa67d8f7f | 190 | py | Python | Lab 07/Lab07.01-quiz-b.py | eoinlees/Labsheets2020 | 8c4df8cb10d17978602cea8bafec21e89fca3cb9 | [
"MIT"
] | null | null | null | Lab 07/Lab07.01-quiz-b.py | eoinlees/Labsheets2020 | 8c4df8cb10d17978602cea8bafec21e89fca3cb9 | [
"MIT"
] | null | null | null | Lab 07/Lab07.01-quiz-b.py | eoinlees/Labsheets2020 | 8c4df8cb10d17978602cea8bafec21e89fca3cb9 | [
"MIT"
] | null | null | null | #Eoin Lees
with open("test b.txt", "w") as f:
data = f.write("test b\n")
print (data)
with open("test b.txt", "w") as f2:
data = f2.write("another line 8\n")
print (data)
| 17.272727 | 39 | 0.563158 |
4a0f2231e97995291bf7da0ac5102cd1f20c9670 | 26,991 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/manifest.py | lindleywhite/integrations-core | 97021c770a5a9661596a0f19265d1828f54d9717 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/manifest.py | lindleywhite/integrations-core | 97021c770a5a9661596a0f19265d1828f54d9717 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/manifest.py | lindleywhite/integrations-core | 97021c770a5a9661596a0f19265d1828f54d9717 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import json
import os
import uuid
import click
import jsonschema
from ....fs import file_exists, read_file, write_file
from ...constants import get_root
from ...git import content_changed
from ...utils i... | 46.697232 | 120 | 0.437961 |
4a0f22dd6009e06d952e7ae241f06dee88b5e406 | 3,661 | py | Python | bin/pycomfoconnect/const.py | blacksun80/LoxBerry-Plugin-Comfoconnect | 96d27074b297f6d8540fc28b7f14d68618b36f61 | [
"Apache-2.0"
] | 2 | 2021-07-13T07:33:14.000Z | 2021-07-23T20:15:48.000Z | bin/pycomfoconnect/const.py | blacksun80/LoxBerry-Plugin-Comfoconnect | 96d27074b297f6d8540fc28b7f14d68618b36f61 | [
"Apache-2.0"
] | 2 | 2021-07-23T20:12:14.000Z | 2021-07-23T20:13:44.000Z | bin/pycomfoconnect/const.py | blacksun80/LoxBerry-Plugin-Comfoconnect | 96d27074b297f6d8540fc28b7f14d68618b36f61 | [
"Apache-2.0"
] | 1 | 2021-07-23T18:23:56.000Z | 2021-07-23T18:23:56.000Z | # API contants
FAN_MODE_AWAY = 'away'
FAN_MODE_LOW = 'low'
FAN_MODE_MEDIUM = 'medium'
FAN_MODE_HIGH = 'high'
# Commands
CMD_FAN_MODE_AWAY = b'\x84\x15\x01\x01\x00\x00\x00\x00\x01\x00\x00\x00\x00'
CMD_FAN_MODE_LOW = b'\x84\x15\x01\x01\x00\x00\x00\x00\x01\x00\x00\x00\x01'
CMD_FAN_MO... | 42.08046 | 108 | 0.696531 |
4a0f23f95b337eb31165efdf48d018b00ec43353 | 10,956 | py | Python | src/lib_dcnh/dcn_neg_share_params.py | Allen517/dcnh | 45eb1b6acd4353e082983772c3a357a01e9ff7f8 | [
"BSD-4-Clause"
] | null | null | null | src/lib_dcnh/dcn_neg_share_params.py | Allen517/dcnh | 45eb1b6acd4353e082983772c3a357a01e9ff7f8 | [
"BSD-4-Clause"
] | null | null | null | src/lib_dcnh/dcn_neg_share_params.py | Allen517/dcnh | 45eb1b6acd4353e082983772c3a357a01e9ff7f8 | [
"BSD-4-Clause"
] | null | null | null | # -*- coding:utf8 -*-
import random
import tensorflow as tf
import numpy as np
import os,sys
from utils.LogHandler import LogHandler
from utils.utils import load_train_valid_labels, batch_iter, valid_iter, read_embeddings
class DCN_SP(object):
def __init__(self, learning_rate, batch_size, neg_ratio, n_input, n_out... | 39.268817 | 125 | 0.704728 |
4a0f2575441d7b78c283d2ee592c1a37766b8c9f | 3,261 | py | Python | slideshare/spiders/arasaac.py | lmorillas/recursoscaa | bac2ff39d67028ca8d4969d23f5061f09be59a0e | [
"Apache-2.0"
] | null | null | null | slideshare/spiders/arasaac.py | lmorillas/recursoscaa | bac2ff39d67028ca8d4969d23f5061f09be59a0e | [
"Apache-2.0"
] | null | null | null | slideshare/spiders/arasaac.py | lmorillas/recursoscaa | bac2ff39d67028ca8d4969d23f5061f09be59a0e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
from urlparse import urljoin, urlparse
from slideshare.items import SlideshareItem
import json
BASE = 'http://es.slideshare.net/'
historico = json.load(open('historico.json'))
urls = [h.get('url') for h in historico]
class ArasaacSpider(scrapy.Spider):
name = "arasaac"
... | 41.807692 | 169 | 0.579577 |
4a0f25aa30af5f56aabcff2ccb280fadb885d36f | 2,031 | py | Python | awx_collection/test/awx/test_credential_type.py | DamoR25/awxnew | 03ed6e97558ae090ea52703caf6ed1b196557981 | [
"Apache-2.0"
] | 11,396 | 2017-09-07T04:56:02.000Z | 2022-03-31T13:56:17.000Z | awx_collection/test/awx/test_credential_type.py | DamoR25/awxnew | 03ed6e97558ae090ea52703caf6ed1b196557981 | [
"Apache-2.0"
] | 11,046 | 2017-09-07T09:30:46.000Z | 2022-03-31T20:28:01.000Z | awx_collection/test/awx/test_credential_type.py | DamoR25/awxnew | 03ed6e97558ae090ea52703caf6ed1b196557981 | [
"Apache-2.0"
] | 3,592 | 2017-09-07T04:14:31.000Z | 2022-03-31T23:53:09.000Z | from __future__ import absolute_import, division, print_function
__metaclass__ = type
import pytest
from awx.main.models import CredentialType
@pytest.mark.django_db
def test_create_custom_credential_type(run_module, admin_user, silence_deprecation):
# Example from docs
result = run_module(
'creden... | 32.238095 | 116 | 0.579025 |
4a0f26276caebec326dfb89fccd3026a49facde8 | 6,925 | py | Python | North Atlantic/Particle Tracking/NorthAtlanticStokeTotalTracking.py | OceanParcels/SKIM-garbagepatchlocations | 3c028e3ceba902ff79f52e31b83bed811bde1133 | [
"MIT"
] | 1 | 2021-07-13T12:55:20.000Z | 2021-07-13T12:55:20.000Z | North Atlantic/Particle Tracking/NorthAtlanticStokeTotalTracking.py | OceanParcels/SKIM-garbagepatchlocations | 3c028e3ceba902ff79f52e31b83bed811bde1133 | [
"MIT"
] | null | null | null | North Atlantic/Particle Tracking/NorthAtlanticStokeTotalTracking.py | OceanParcels/SKIM-garbagepatchlocations | 3c028e3ceba902ff79f52e31b83bed811bde1133 | [
"MIT"
] | 1 | 2022-02-28T14:03:13.000Z | 2022-02-28T14:03:13.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 14 14:43:49 2018
@author: Victor Onink
"""
from parcels import FieldSet, ParticleSet, JITParticle, AdvectionRK4,ErrorCode, plotTrajectoriesFile,Variable,Geographic,GeographicPolar
from datetime import timedelta, datetime
import numpy as np
from operator import attrgetter... | 49.113475 | 289 | 0.707004 |
4a0f2677afe2715ce479e1870bf3a0624ff73bdb | 7,557 | py | Python | tensorflow/contrib/metrics/__init__.py | yxiong/tensorflow | f71cc62282bf2e066f9ebd08cf3f605fc98c6e41 | [
"Apache-2.0"
] | 6 | 2016-09-07T18:38:41.000Z | 2020-01-12T23:01:03.000Z | tensorflow/contrib/metrics/__init__.py | yxiong/tensorflow | f71cc62282bf2e066f9ebd08cf3f605fc98c6e41 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/metrics/__init__.py | yxiong/tensorflow | f71cc62282bf2e066f9ebd08cf3f605fc98c6e41 | [
"Apache-2.0"
] | 8 | 2017-06-08T09:46:06.000Z | 2021-06-20T14:03:19.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 42.694915 | 97 | 0.818711 |
4a0f28823cd0b8bb48beedcb19d78be6a6416aff | 746 | py | Python | rest_framework_swagger/__init__.py | kaitlin/django-rest-swagger | 06a067cbb7d863ce1d9f6341ed4e96a14840f288 | [
"BSD-2-Clause"
] | null | null | null | rest_framework_swagger/__init__.py | kaitlin/django-rest-swagger | 06a067cbb7d863ce1d9f6341ed4e96a14840f288 | [
"BSD-2-Clause"
] | null | null | null | rest_framework_swagger/__init__.py | kaitlin/django-rest-swagger | 06a067cbb7d863ce1d9f6341ed4e96a14840f288 | [
"BSD-2-Clause"
] | 1 | 2021-02-18T11:05:55.000Z | 2021-02-18T11:05:55.000Z | VERSION = '0.2.8'
DEFAULT_SWAGGER_SETTINGS = {
'exclude_namespaces': [],
'api_version': '',
'api_path': '/',
'api_key': '',
'token_type': 'Token',
'enabled_methods': ['get', 'post', 'put', 'patch', 'delete'],
'is_authenticated': False,
'is_superuser': False,
'permission_denied_handl... | 27.62963 | 86 | 0.66622 |
4a0f28b3220c37092148bea29a82c2f8e8bda5ce | 14,378 | py | Python | code/tutorials/exp_domb/pre_tomos_seg.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 12 | 2020-01-08T01:33:02.000Z | 2022-03-16T00:25:34.000Z | code/tutorials/exp_domb/pre_tomos_seg.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 8 | 2019-12-19T19:34:56.000Z | 2022-03-10T10:11:28.000Z | code/tutorials/exp_domb/pre_tomos_seg.py | anmartinezs/pyseg_system | 5bb07c7901062452a34b73f376057cabc15a13c3 | [
"Apache-2.0"
] | 2 | 2022-03-30T13:12:22.000Z | 2022-03-30T18:12:10.000Z | """
Pre-processing for mb_graph_batch.py of double oriented membranes from a lumen labeled segmentation
Input: - STAR file with 3 columns:
+ _rlnMicrographName: tomogram original (denisity map)
+ _psSegImage: labelled tomogram with the segmentations
+ _mtMtubes... | 44.513932 | 138 | 0.612463 |
4a0f2945c4bb35e2e6109d3cfe3a4df686c62ca0 | 805 | py | Python | pjproject_android/tests/pjsua/scripts-sendto/312_srtp1_recv_savp.py | WachterJud/qaul.net_legacy | 9c2be0a38ad6e90fadc0d1150340e37d220997ae | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 4 | 2016-09-29T00:04:31.000Z | 2021-12-02T08:39:51.000Z | pjproject_android/tests/pjsua/scripts-sendto/312_srtp1_recv_savp.py | WachterJud/qaul.net_legacy | 9c2be0a38ad6e90fadc0d1150340e37d220997ae | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2020-02-20T06:58:16.000Z | 2020-02-20T07:08:07.000Z | my_softphone/pjproject-2.9/tests/pjsua/scripts-sendto/312_srtp1_recv_savp.py | sashkaseltsov1/reposCpp | 3ff5ce2a14a368a36b1758099ce4f3e8c4cdf11d | [
"Unlicense"
] | 5 | 2019-07-02T02:03:24.000Z | 2022-03-30T09:58:52.000Z | # $Id: 312_srtp1_recv_savp.py 2036 2008-06-20 17:43:55Z nanang $
import inc_sip as sip
import inc_sdp as sdp
sdp = \
"""
v=0
o=- 0 0 IN IP4 127.0.0.1
s=tester
c=IN IP4 127.0.0.1
t=0 0
m=audio 4000 RTP/SAVP 0 101
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=crypto:1 AES_CM_128_HMA... | 27.758621 | 101 | 0.735404 |
4a0f29e7b4d4b0d87220729cdf6e8cbb7e41aa32 | 8,589 | py | Python | webStorm-APICloud/python_tools/Lib/test/test_importhooks.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | webStorm-APICloud/python_tools/Lib/test/test_importhooks.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | webStorm-APICloud/python_tools/Lib/test/test_importhooks.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | import sys
import imp
import os
import unittest
from test import test_support
test_src = """\
def get_name():
return __name__
def get_file():
return __file__
"""
absimp = "import sub\n"
relimp = "from . import sub\n"
deeprelimp = "from .... import sub\n"
futimp = "from __future__ import abso... | 33.034615 | 78 | 0.600768 |
4a0f2a23eb163e4a363a24e969c5cd41f35ae2b0 | 3,488 | py | Python | Training.py | naveenmg143/Leaf-Disease-Detection | 1ec248e74ef56e80edaf6831e09ef41d5d8cfdd5 | [
"Apache-2.0"
] | null | null | null | Training.py | naveenmg143/Leaf-Disease-Detection | 1ec248e74ef56e80edaf6831e09ef41d5d8cfdd5 | [
"Apache-2.0"
] | null | null | null | Training.py | naveenmg143/Leaf-Disease-Detection | 1ec248e74ef56e80edaf6831e09ef41d5d8cfdd5 | [
"Apache-2.0"
] | null | null | null | from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.lay... | 33.538462 | 189 | 0.696674 |
4a0f2a2ac835550fa12181e5b660f5a249319269 | 1,859 | py | Python | bot_rps.py | yunastrian/bot-rps-game | c29c6d88b086dd18be51d6a0bb38c2aa6190134b | [
"MIT"
] | 5 | 2021-03-21T15:18:39.000Z | 2021-04-30T16:48:10.000Z | bot_rps.py | yunastrian/bot-rps-game | c29c6d88b086dd18be51d6a0bb38c2aa6190134b | [
"MIT"
] | 3 | 2021-03-21T17:42:07.000Z | 2021-03-31T07:12:18.000Z | bot_rps.py | yunastrian/bot-rps-game | c29c6d88b086dd18be51d6a0bb38c2aa6190134b | [
"MIT"
] | 3 | 2021-03-21T16:12:25.000Z | 2021-03-31T06:13:42.000Z | import getopt
import sys
from typing import Dict
import yaml
moves_lang2en: Dict = dict()
moves_en2lang: Dict = dict()
# default value
variables_filename = 'variables.yml'
lang = 'en'
variables_file = open(variables_filename, 'r')
variable_dict: Dict = yaml.safe_load(variables_file)
variables_file.close()
supported... | 27.338235 | 75 | 0.628295 |
4a0f2aa074555df2c9c89b630235e449be0fddfc | 1,226 | py | Python | examples/ifft/ex_phpv3.py | LBJ-Wade/phenom | 8f0fdc14099dac09cb2eef36d825e577340a8421 | [
"MIT"
] | null | null | null | examples/ifft/ex_phpv3.py | LBJ-Wade/phenom | 8f0fdc14099dac09cb2eef36d825e577340a8421 | [
"MIT"
] | null | null | null | examples/ifft/ex_phpv3.py | LBJ-Wade/phenom | 8f0fdc14099dac09cb2eef36d825e577340a8421 | [
"MIT"
] | null | null | null | import phenom
import matplotlib
# matplotlib.use('MacOSX')
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
from phenom.utils.utils import Constants, HztoMf
import phenom
m1 = 35.
m2 = 30.
chi1x = 0.9
chi1y = 0.
chi1z = 0.
chi2x = 0.
chi2y = 0.
chi2z = 0.
delta_f = 1./8.
f_min = 30.
fRef = ... | 21.892857 | 79 | 0.771615 |
4a0f2ab81b084e9a134f01f2f4557ab624188c8b | 389 | py | Python | Codes/pgportfolio/nnagent/rollingtrainer.py | Reself-C/COMAP-MCM-ICM-2022 | 30fe1de5b58de99878bc1358662f3ae7d7689b20 | [
"MIT"
] | 1 | 2022-03-13T20:15:41.000Z | 2022-03-13T20:15:41.000Z | Codes/pgportfolio/nnagent/rollingtrainer.py | Reself-C/COMAP-MCM-ICM-2022 | 30fe1de5b58de99878bc1358662f3ae7d7689b20 | [
"MIT"
] | null | null | null | Codes/pgportfolio/nnagent/rollingtrainer.py | Reself-C/COMAP-MCM-ICM-2022 | 30fe1de5b58de99878bc1358662f3ae7d7689b20 | [
"MIT"
] | 1 | 2022-03-04T16:07:51.000Z | 2022-03-04T16:07:51.000Z | from pgportfolio.nnagent.tradertrainer import TraderTrainer
class RollingTrainer(TraderTrainer):
def __init__(self, config, **kwargs):
config = config.copy()
config["training"]["buffer_biased"] = config["trading"]["buffer_biased"]
config["training"]["learning_rate"] = config["trading"]["le... | 38.9 | 80 | 0.699229 |
4a0f2b992475d900716dc5633e891c46b7566a82 | 1,262 | py | Python | subreview_lib/subsassignmentpage.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | null | null | null | subreview_lib/subsassignmentpage.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | 1 | 2020-02-05T13:00:29.000Z | 2020-02-05T13:00:29.000Z | subreview_lib/subsassignmentpage.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | null | null | null | #-----------------------------------------------------
# Mimas: conference submission and review system
# (c) Allan Kelly 2016-2020 http://www.allankelly.net
# Licensed under MIT License, see LICENSE file
# -----------------------------------------------------
# System imports
# Google imports
# Local imports
import... | 36.057143 | 105 | 0.656101 |
4a0f2c088ad2cfeca82aedd9e45cf77f1967209a | 1,129 | py | Python | remote/44555.py | malos17713/Android-Exploits | 2736ece957f9174ba2f063ed34d66f8f58f65e95 | [
"CC-BY-4.0"
] | 446 | 2018-08-21T09:33:28.000Z | 2022-03-30T02:53:47.000Z | remote/44555.py | AngelsDemon/Android-Exploits | 2736ece957f9174ba2f063ed34d66f8f58f65e95 | [
"CC-BY-4.0"
] | null | null | null | remote/44555.py | AngelsDemon/Android-Exploits | 2736ece957f9174ba2f063ed34d66f8f58f65e95 | [
"CC-BY-4.0"
] | 105 | 2018-08-21T09:33:40.000Z | 2022-02-09T14:01:37.000Z | from pwn import *
import bluetooth
if not 'TARGET' in args:
log.info("Usage: CVE-2017-0785.py TARGET=XX:XX:XX:XX:XX:XX")
exit()
target = args['TARGET']
service_long = 0x0100
service_short = 0x0001
mtu = 50
n = 30
def packet(service, continuation_state):
pkt = '\x02\x00\x00'
pkt += p16(... | 21.711538 | 65 | 0.635075 |
4a0f2c0a6b7c6f3af60e7b6bb1cbca539e4bb38f | 31,740 | py | Python | electricitylci/eia_io_trading.py | bl-young/ElectricityLCI | 091be051a60c15f762b150dd0e2b7cfd6adbed1a | [
"CC0-1.0"
] | 17 | 2018-10-26T14:58:10.000Z | 2022-02-01T00:17:27.000Z | electricitylci/eia_io_trading.py | hottleta/ElectricityLCI | 45f292ed8ebcdf7acfe17ee609862fa072b75ea0 | [
"CC0-1.0"
] | 129 | 2018-07-16T22:02:32.000Z | 2022-03-16T19:11:35.000Z | electricitylci/eia_io_trading.py | hottleta/ElectricityLCI | 45f292ed8ebcdf7acfe17ee609862fa072b75ea0 | [
"CC0-1.0"
] | 8 | 2018-08-29T11:27:52.000Z | 2021-03-05T06:36:22.000Z | import numpy as np
import os
import pandas as pd
# import eia
from datetime import datetime
import pytz
import json
from os.path import join
import zipfile
import requests
import logging
from electricitylci.globals import data_dir, output_dir
from electricitylci.bulk_eia_data import download_EBA, row_to_df, ba_exchan... | 49.516381 | 176 | 0.689351 |
4a0f2c0d62da25f1e7c20bee66da1d49a63e78a4 | 3,278 | py | Python | pg/settings.py | KONAPAVANKUMAR/paying-guest-django | 8646550b7c764728fa68a9fcdea2dab77851d36a | [
"MIT"
] | null | null | null | pg/settings.py | KONAPAVANKUMAR/paying-guest-django | 8646550b7c764728fa68a9fcdea2dab77851d36a | [
"MIT"
] | null | null | null | pg/settings.py | KONAPAVANKUMAR/paying-guest-django | 8646550b7c764728fa68a9fcdea2dab77851d36a | [
"MIT"
] | null | null | null | """
Django settings for pg project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib import... | 25.811024 | 91 | 0.699512 |
4a0f2c58283cd7b006a3fd5f4480099fd0a27773 | 1,184 | py | Python | setup.py | urschrei/Circles | 5aab401b470935e816a28d7ba817eb72f9344672 | [
"MIT"
] | 6 | 2017-08-25T04:30:10.000Z | 2021-11-22T13:31:41.000Z | setup.py | urschrei/Circles | 5aab401b470935e816a28d7ba817eb72f9344672 | [
"MIT"
] | null | null | null | setup.py | urschrei/Circles | 5aab401b470935e816a28d7ba817eb72f9344672 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
setup.py
Created by Stephan Hügel on 2011-03-04
"""
from setuptools import setup, find_packages
setup(
name='Circles',
version='0.1',
description='Draw correctly-projected circles on a Basemap plot',
author='Stephan Hügel',
author_email='urschrei@... | 31.157895 | 89 | 0.657939 |
4a0f2cc76bf96dc6b93f336c10bf608ca5513547 | 2,085 | py | Python | app/tempBerry/smarthome/rest/serializers.py | ChristianKreuzberger/tempBerry | d4a9fe543df57ebdb82d6ebf398607ccf9e6c0bf | [
"MIT"
] | 2 | 2019-07-16T19:09:50.000Z | 2020-01-03T09:06:46.000Z | app/tempBerry/smarthome/rest/serializers.py | ChristianKreuzberger/tempBerry | d4a9fe543df57ebdb82d6ebf398607ccf9e6c0bf | [
"MIT"
] | null | null | null | app/tempBerry/smarthome/rest/serializers.py | ChristianKreuzberger/tempBerry | d4a9fe543df57ebdb82d6ebf398607ccf9e6c0bf | [
"MIT"
] | 1 | 2020-02-09T22:46:05.000Z | 2020-02-09T22:46:05.000Z | from rest_framework import serializers
from tempBerry.smarthome.models import Room, SmartHome, Sensor, AbstractDataEntry
class AbstractDataEntrySerializer(serializers.Serializer):
id = serializers.IntegerField()
source = serializers.CharField()
created_at = serializers.DateTimeField()
class SensorSerial... | 33.629032 | 100 | 0.703118 |
4a0f2d3956b2832281f8e133240d0d6c0da59a59 | 1,196 | py | Python | secret_santa.py | codeocelot/secret-santa | 57b5a43293f1d8e49e7516c73508ee50cc95ea7f | [
"Apache-2.0"
] | 1 | 2017-12-19T09:47:17.000Z | 2017-12-19T09:47:17.000Z | secret_santa.py | codeocelot/secret-santa | 57b5a43293f1d8e49e7516c73508ee50cc95ea7f | [
"Apache-2.0"
] | null | null | null | secret_santa.py | codeocelot/secret-santa | 57b5a43293f1d8e49e7516c73508ee50cc95ea7f | [
"Apache-2.0"
] | null | null | null | from random import shuffle
class Person:
receive_from = None
send_to = None
def __init__(self, name):
self.name = name
def __repr__(self):
return "{}\n- giving to {}\n- receiving from {}\n".format(
self.name, self.send_to.name, self.receive_from.name)
def secret_santa(n... | 25.446809 | 78 | 0.60786 |
4a0f2da1e368a00c1f07f6b76d1ea60dfb9dff5c | 1,048 | py | Python | QVS_spaceManager/06_enableSpaces.py | yangjunren/QVS-API-demo | 9d8cd1d12baefdbef57c479e02110a8540e6552c | [
"Apache-2.0"
] | null | null | null | QVS_spaceManager/06_enableSpaces.py | yangjunren/QVS-API-demo | 9d8cd1d12baefdbef57c479e02110a8540e6552c | [
"Apache-2.0"
] | null | null | null | QVS_spaceManager/06_enableSpaces.py | yangjunren/QVS-API-demo | 9d8cd1d12baefdbef57c479e02110a8540e6552c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from qiniu import QiniuMacAuth, http
import json
def disableNamespaces(access_key, secret_key, namespaceId):
"""
启用空间
https://developer.qiniu.com/qvs/api/6760/enable-the-space
:param access_key: 公钥
:param secret_key: 私钥
:param namespaceId: 空间ID
:return:
... | 24.372093 | 79 | 0.660305 |
4a0f2dd8872e6eac1068a7967bc8e34f650143e4 | 2,091 | py | Python | strips_sat_x_1_10.py | connorescajeda/sat | b121c8fba702f09204864f9aade1e813a10397d2 | [
"Apache-2.0"
] | null | null | null | strips_sat_x_1_10.py | connorescajeda/sat | b121c8fba702f09204864f9aade1e813a10397d2 | [
"Apache-2.0"
] | null | null | null | strips_sat_x_1_10.py | connorescajeda/sat | b121c8fba702f09204864f9aade1e813a10397d2 | [
"Apache-2.0"
] | null | null | null | from pyhop_anytime import *
global state, goals
state = State('state')
state.calibration_target = Oset([('instrument0','star1'),('instrument1','groundstation3'),('instrument10','star0'),('instrument2','groundstation3'),('instrument3','star4'),('instrument4','star2'),('instrument5','star0'),('instrument6','groundstation... | 123 | 662 | 0.705882 |
4a0f2df2fe0888b48ba7a886e73b1d1d7832f07d | 197 | py | Python | src/djangoreactredux/djangoreactreduxenv/bin/django-admin.py | m2jobe/tafseer | 8f7d4bddbcd8a73c607f39a2b1d27c78aef86a15 | [
"MIT"
] | null | null | null | src/djangoreactredux/djangoreactreduxenv/bin/django-admin.py | m2jobe/tafseer | 8f7d4bddbcd8a73c607f39a2b1d27c78aef86a15 | [
"MIT"
] | null | null | null | src/djangoreactredux/djangoreactreduxenv/bin/django-admin.py | m2jobe/tafseer | 8f7d4bddbcd8a73c607f39a2b1d27c78aef86a15 | [
"MIT"
] | null | null | null | #!/home/muhammed/Documents/tm/tafseer/src/djangoreactredux/djangoreactreduxenv/bin/python2
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 32.833333 | 90 | 0.817259 |
4a0f2f0ee72ca7514e6950d49503068107c0d649 | 150 | py | Python | vetstore/vetstore/doctype/purchase_invoices/test_purchase_invoices.py | UsamaNaveed9/vetstore | cea6d44e405549b37fc8da20311836a8513c0af8 | [
"MIT"
] | null | null | null | vetstore/vetstore/doctype/purchase_invoices/test_purchase_invoices.py | UsamaNaveed9/vetstore | cea6d44e405549b37fc8da20311836a8513c0af8 | [
"MIT"
] | null | null | null | vetstore/vetstore/doctype/purchase_invoices/test_purchase_invoices.py | UsamaNaveed9/vetstore | cea6d44e405549b37fc8da20311836a8513c0af8 | [
"MIT"
] | null | null | null | # Copyright (c) 2021, Usama and Contributors
# See license.txt
# import frappe
import unittest
class TestPurchaseInvoices(unittest.TestCase):
pass
| 16.666667 | 46 | 0.786667 |
4a0f2fa405ee9923f9035119da40d6f4b2e26506 | 397 | py | Python | thanosback/wsgi.py | ashik4715/thanosback | 08db204dbda2672dd5a53c577c12899f39e73af0 | [
"Apache-2.0"
] | null | null | null | thanosback/wsgi.py | ashik4715/thanosback | 08db204dbda2672dd5a53c577c12899f39e73af0 | [
"Apache-2.0"
] | null | null | null | thanosback/wsgi.py | ashik4715/thanosback | 08db204dbda2672dd5a53c577c12899f39e73af0 | [
"Apache-2.0"
] | null | null | null | """
WSGI config for thanosback project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
4a0f307a701cb59bb2126716cab28fe4ef295583 | 24,157 | py | Python | python/ccxt/btcturk.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 2 | 2021-04-15T22:12:33.000Z | 2021-09-04T05:29:32.000Z | python/ccxt/btcturk.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 1 | 2021-08-23T16:27:34.000Z | 2021-08-23T16:27:34.000Z | python/ccxt/btcturk.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 2 | 2020-09-08T01:41:24.000Z | 2021-04-30T00:07:59.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import ... | 36.601515 | 127 | 0.459867 |
4a0f30fb8a0921c36f784de2a75a6cd9faeac1e2 | 3,509 | py | Python | azure-servicefabric/azure/servicefabric/models/stateful_service_info_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-servicefabric/azure/servicefabric/models/stateful_service_info_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-servicefabric/azure/servicefabric/models/stateful_service_info_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-10-16T13:08:23.000Z | 2018-10-16T13:08:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 49.422535 | 226 | 0.665147 |
4a0f317bc830ca25461e2b8b5a07535336a3a9f7 | 1,645 | py | Python | tarbell/oauth.py | write-this-way/flask-tarbell | 0e23e8d90ba66fde1a961ea530c99d94357ff664 | [
"BSD-3-Clause"
] | 1 | 2016-03-12T21:16:46.000Z | 2016-03-12T21:16:46.000Z | tarbell/oauth.py | write-this-way/flask-tarbell | 0e23e8d90ba66fde1a961ea530c99d94357ff664 | [
"BSD-3-Clause"
] | null | null | null | tarbell/oauth.py | write-this-way/flask-tarbell | 0e23e8d90ba66fde1a961ea530c99d94357ff664 | [
"BSD-3-Clause"
] | null | null | null | from argparse import ArgumentParser, RawDescriptionHelpFormatter
from oauth2client import client
from oauth2client import keyring_storage
from oauth2client import tools
from apiclient import discovery
import getpass
import httplib2
import os
OAUTH_SCOPE = 'https://www.googleapis.com/auth/drive'
# Force the noauth_loc... | 39.166667 | 76 | 0.691793 |
4a0f334b1f7a14f89c533516cdd5bb36c97ed430 | 818 | gyp | Python | binding.gyp | jkozera/zest-travis-testing | 9dd106d53ae1e720e4a75eb2ceaaf77ed0d989b1 | [
"MIT"
] | 268 | 2016-01-13T00:44:54.000Z | 2022-03-20T12:09:15.000Z | binding.gyp | jkozera/zest-travis-testing | 9dd106d53ae1e720e4a75eb2ceaaf77ed0d989b1 | [
"MIT"
] | 12 | 2016-02-06T11:15:17.000Z | 2016-04-28T14:33:37.000Z | binding.gyp | jkozera/zest-travis-testing | 9dd106d53ae1e720e4a75eb2ceaaf77ed0d989b1 | [
"MIT"
] | 27 | 2016-02-08T17:43:45.000Z | 2022-02-22T17:43:50.000Z | {
"targets": [
{
"target_name": "nodelucene",
"sources": [ "nodelucene/LuceneIndex.cc" ],
"libraries": [
"-llucene++",
"-llucene++-contrib",
"-L/usr/local/lib",
# for Circle CI:
"-L/home/ubuntu/installprefix/lib/x86_64-linux-gnu",
"-Wl,... | 27.266667 | 85 | 0.48533 |
4a0f33b3a790da4f74a87c6d9d052cd65eca411b | 3,049 | py | Python | 5-Image_Segmentation/Unet/train.py | haigh1510/TensorFlow2.0-Examples | f99fcef22caa2758b5eefce10ee789384345506d | [
"MIT"
] | 1,775 | 2019-03-10T02:47:42.000Z | 2022-03-30T07:22:08.000Z | 5-Image_Segmentation/Unet/train.py | haigh1510/TensorFlow2.0-Examples | f99fcef22caa2758b5eefce10ee789384345506d | [
"MIT"
] | 128 | 2019-05-07T05:44:10.000Z | 2022-03-22T11:07:30.000Z | 5-Image_Segmentation/Unet/train.py | haigh1510/TensorFlow2.0-Examples | f99fcef22caa2758b5eefce10ee789384345506d | [
"MIT"
] | 752 | 2019-03-20T14:14:46.000Z | 2022-03-22T08:38:36.000Z | #! /usr/bin/env python
# coding=utf-8
#================================================================
# Copyright (C) 2019 * Ltd. All rights reserved.
#
# Editor : VIM
# File name : train.py
# Author : YunYang1994
# Created date: 2019-09-19 15:25:10
# Description :
#
#=========================... | 32.784946 | 81 | 0.581174 |
4a0f33b608fd8e17b7dedef87faa3fe377ea72f5 | 9,122 | py | Python | poetry/masonry/builders/editable.py | HarryPeach/poetry | 70ac497a81f3ac59ee890c6a7bee0ffc3cae6c6e | [
"MIT"
] | null | null | null | poetry/masonry/builders/editable.py | HarryPeach/poetry | 70ac497a81f3ac59ee890c6a7bee0ffc3cae6c6e | [
"MIT"
] | null | null | null | poetry/masonry/builders/editable.py | HarryPeach/poetry | 70ac497a81f3ac59ee890c6a7bee0ffc3cae6c6e | [
"MIT"
] | null | null | null | import hashlib
import os
import shutil
from base64 import urlsafe_b64encode
from pathlib import Path
from typing import TYPE_CHECKING
from typing import List
from poetry.core.masonry.builders.builder import Builder
from poetry.core.masonry.builders.sdist import SdistBuilder
from poetry.core.masonry.utils.package_incl... | 33.536765 | 92 | 0.539465 |
4a0f3474c5c1d023581cf515d8ab5d1051e221f6 | 23,088 | py | Python | composer/utils/checkpoint.py | growlix/composer | 27418a3c65dca26d90ac09c6ae67cbd5d0202ccf | [
"Apache-2.0"
] | null | null | null | composer/utils/checkpoint.py | growlix/composer | 27418a3c65dca26d90ac09c6ae67cbd5d0202ccf | [
"Apache-2.0"
] | null | null | null | composer/utils/checkpoint.py | growlix/composer | 27418a3c65dca26d90ac09c6ae67cbd5d0202ccf | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 MosaicML Composer authors
# SPDX-License-Identifier: Apache-2.0
"""Utilities for working with training checkpoints."""
from __future__ import annotations
import contextlib
import fnmatch
import logging
import os
import pathlib
import shutil
import tarfile
import tempfile
import textwrap
import warni... | 44.744186 | 127 | 0.635005 |
4a0f3500d6451c3e1d2032ed67ccd67497bdc331 | 4,354 | py | Python | examples/atari/collect_demos_ale.py | pratyushpal/chainerrl | fec001305e9b552ba9c69be01aa92b774dbc69c4 | [
"MIT"
] | 1 | 2019-08-19T15:23:54.000Z | 2019-08-19T15:23:54.000Z | examples/atari/collect_demos_ale.py | pratyushpal/chainerrl | fec001305e9b552ba9c69be01aa92b774dbc69c4 | [
"MIT"
] | null | null | null | examples/atari/collect_demos_ale.py | pratyushpal/chainerrl | fec001305e9b552ba9c69be01aa92b774dbc69c4 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import argparse
import os
from chainer import links as L
fro... | 36.283333 | 77 | 0.618282 |
4a0f35631dd37618e8a2d68a6b1828b8b5484692 | 3,633 | py | Python | robot-server/robot_server/service/legacy/routers/deck_calibration.py | fakela/opentrons | 676f1296a515fd5db15777e732bc77cf74364ac4 | [
"Apache-2.0"
] | null | null | null | robot-server/robot_server/service/legacy/routers/deck_calibration.py | fakela/opentrons | 676f1296a515fd5db15777e732bc77cf74364ac4 | [
"Apache-2.0"
] | null | null | null | robot-server/robot_server/service/legacy/routers/deck_calibration.py | fakela/opentrons | 676f1296a515fd5db15777e732bc77cf74364ac4 | [
"Apache-2.0"
] | null | null | null | from uuid import UUID
from opentrons.config import robot_configs
from starlette import status
from fastapi import APIRouter, Depends
from opentrons.hardware_control import ThreadManager
import opentrons.deck_calibration.endpoints as dc
from robot_server.service.dependencies import get_hardware
from robot_server.servi... | 39.923077 | 79 | 0.676301 |
4a0f370e6b97448be4b7d1b8a1f1ede21c38228e | 314 | py | Python | [Kaleido-subs]/Completed/Higurashi no Naku Koro ni [BD]/ac_Higurashi1BD_20.py | tuilakhanh/Encoding-Projects | 8b254913457cb28e7d0890ad6b974d0d8f0cbecc | [
"MIT"
] | 57 | 2019-01-31T17:32:46.000Z | 2022-03-23T05:46:51.000Z | [Kaleido-subs]/Completed/Higurashi no Naku Koro ni [BD]/ac_Higurashi1BD_20.py | tuilakhanh/Encoding-Projects | 8b254913457cb28e7d0890ad6b974d0d8f0cbecc | [
"MIT"
] | null | null | null | [Kaleido-subs]/Completed/Higurashi no Naku Koro ni [BD]/ac_Higurashi1BD_20.py | tuilakhanh/Encoding-Projects | 8b254913457cb28e7d0890ad6b974d0d8f0cbecc | [
"MIT"
] | 12 | 2019-04-30T06:16:13.000Z | 2022-03-14T16:15:07.000Z | #!/usr/bin/env python3
import vapoursynth as vs
import acsuite
import lvsfunc as lvf
ac = acsuite.AC()
core = vs.core
path = r'BDMV/HIGURASHI_BD/00021.m2ts'
src = lvf.src(path)
src = core.vivtc.VDecimate(src)
if __name__ == "__main__":
ac.eztrim(src, [(0, -24)], path[:-4]+"wav", "Higurashi1BD_20_cut.wav")
| 20.933333 | 74 | 0.694268 |
4a0f38b9f7e6a6b2eaeab23afa7e8fcdef99c1ec | 5,445 | py | Python | sourdough/project/converters.py | WithPrecedent/sourdough | 52d99ca056cda93fb3e913fbca3d9a5947ec3513 | [
"Apache-2.0"
] | null | null | null | sourdough/project/converters.py | WithPrecedent/sourdough | 52d99ca056cda93fb3e913fbca3d9a5947ec3513 | [
"Apache-2.0"
] | null | null | null | sourdough/project/converters.py | WithPrecedent/sourdough | 52d99ca056cda93fb3e913fbca3d9a5947ec3513 | [
"Apache-2.0"
] | null | null | null | """
converters: type converters specific to the project subpackage
Corey Rayburn Yung <coreyrayburnyung@gmail.com>
Copyright 2020-2021, Corey Rayburn Yung
License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
Contents:
"""
from __future__ import annotations
import dataclasses
import pathlib
from typing ... | 26.82266 | 76 | 0.583655 |
4a0f392d5da81f6fc506db611d28ee6f4881758f | 2,491 | py | Python | jina/jaml/parsers/flow/legacy.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 1 | 2021-02-25T19:28:50.000Z | 2021-02-25T19:28:50.000Z | jina/jaml/parsers/flow/legacy.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 1 | 2021-02-27T05:56:45.000Z | 2021-02-27T05:57:03.000Z | jina/jaml/parsers/flow/legacy.py | deepampatel/jina | 97f9e97a4a678a28bdeacbc7346eaf7bbd2aeb89 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, Any, Type
from ..base import VersionedYAMLParser
from ....enums import PodRoleType
from ....flow.base import BaseFlow
from ....helper import expand_env_var, ArgNamespace
from ....parsers import set_gateway_parser, set_pod_parser
class LegacyParser(VersionedYAMLParser):
version = 'legacy'... | 33.662162 | 91 | 0.571658 |
4a0f3a2dfc5fa5124278f15de09106c4d17e915e | 2,395 | py | Python | Classification/bins/parse_cifar_to_png.py | ttthomaschan/DeepcvLib | 18f7728559136a3c5c8ad54666788ea771e95b16 | [
"MIT"
] | null | null | null | Classification/bins/parse_cifar_to_png.py | ttthomaschan/DeepcvLib | 18f7728559136a3c5c8ad54666788ea771e95b16 | [
"MIT"
] | null | null | null | Classification/bins/parse_cifar_to_png.py | ttthomaschan/DeepcvLib | 18f7728559136a3c5c8ad54666788ea771e95b16 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
# @file name : parse_cifar10_to_png.py
# @author : Junlin Chen
# @date : 2021-06
# @brief : 将cifar10数据pickle形式解析成png格式
"""
import numpy as np
import os
import sys
import pickle
from imageio import imwrite
def unpickle(file):
fo = open(file, 'rb')
if sys.version_info... | 28.855422 | 87 | 0.598747 |
4a0f3ac0bb26f645cb1b9e2d08a44d8572f220e4 | 10,725 | py | Python | humblebee/importer.py | steinitzu/humblebee | 7c6e9434669640b38953bacf9fd167ce82a3cbba | [
"MIT"
] | 9 | 2019-10-25T19:05:19.000Z | 2021-11-27T08:36:00.000Z | humblebee/importer.py | steinitzu/humblebee | 7c6e9434669640b38953bacf9fd167ce82a3cbba | [
"MIT"
] | null | null | null | humblebee/importer.py | steinitzu/humblebee | 7c6e9434669640b38953bacf9fd167ce82a3cbba | [
"MIT"
] | 34 | 2017-10-22T21:50:24.000Z | 2022-03-28T01:34:30.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging, os, time, shelve
from glob import glob
from datetime import datetime
from send2trash import send2trash
from .dbguy import TVDatabase
from .renaming import Renamer, SymlinkRenamer, make_unknown_dir
from .parser import reverse_parse_episode
from .texception... | 33.939873 | 96 | 0.549091 |
4a0f3b195e7140acd5097269a6100ac49223480c | 6,151 | py | Python | avoviirscollector/task_broker.py | tparker-usgs/rsCollectors | 28c3f2ee43c58f3edf2e4ffcf54cce3d912ef72b | [
"CC0-1.0"
] | null | null | null | avoviirscollector/task_broker.py | tparker-usgs/rsCollectors | 28c3f2ee43c58f3edf2e4ffcf54cce3d912ef72b | [
"CC0-1.0"
] | 1 | 2019-05-03T00:19:15.000Z | 2019-05-03T00:19:15.000Z | avoviirscollector/task_broker.py | tparker-usgs/rsCollectors | 28c3f2ee43c58f3edf2e4ffcf54cce3d912ef72b | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# I waive copyright and related rights in the this work worldwide
# through the CC0 1.0 Universal public domain dedication.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
# Author(s):
# Tom Parker <tparker@usgs.gov>
""" Present a consolodated event stre... | 32.204188 | 79 | 0.577142 |
4a0f3c21aa80c62ce97077ed3717d9b5a9f3cdcf | 1,442 | py | Python | examples/shout-and-echo.py | AnotherKamila/distributed-algorithms-emulator | 0abbe91108551651ffee712c93499bc89a3adc27 | [
"MIT"
] | null | null | null | examples/shout-and-echo.py | AnotherKamila/distributed-algorithms-emulator | 0abbe91108551651ffee712c93499bc89a3adc27 | [
"MIT"
] | null | null | null | examples/shout-and-echo.py | AnotherKamila/distributed-algorithms-emulator | 0abbe91108551651ffee712c93499bc89a3adc27 | [
"MIT"
] | null | null | null | """Implements a shout-and-echo algorithm on any topology."""
from da import Node, Network
import topo
class ShoutAndEcho(Node):
def run(self):
marked_edges = [ False for e in range(self.deg) ]
first_from = None
if 'shout' in self.data:
self.data['msg'] = self.data['shout']
... | 30.680851 | 79 | 0.476422 |
4a0f3f5bac36bae8a389282decc2f03f0155d202 | 5,148 | py | Python | colour/graph/tests/test_conversion.py | soma2000-lang/colour | bb7ee23ac65e09613af78bd18dd98dffb1a2904a | [
"BSD-3-Clause"
] | 1 | 2022-02-12T06:28:15.000Z | 2022-02-12T06:28:15.000Z | colour/graph/tests/test_conversion.py | soma2000-lang/colour | bb7ee23ac65e09613af78bd18dd98dffb1a2904a | [
"BSD-3-Clause"
] | null | null | null | colour/graph/tests/test_conversion.py | soma2000-lang/colour | bb7ee23ac65e09613af78bd18dd98dffb1a2904a | [
"BSD-3-Clause"
] | null | null | null | """
Defines the unit tests for the :mod:`colour.graph.conversion` module.
"""
import numpy as np
import unittest
from colour.characterisation import SDS_COLOURCHECKERS
from colour.colorimetry import CCS_ILLUMINANTS, SDS_ILLUMINANTS
from colour.models import COLOURSPACE_MODELS, RGB_COLOURSPACE_ACES2065_1
from colour.g... | 31.012048 | 79 | 0.577894 |
4a0f3fccd57866228fd8e5e02091d330846f318e | 366 | py | Python | Array/Leetcode 220. Contains Duplicate III.py | kaizhengny/LeetCode | 67d64536ab80f4966699fe7460d165f2a98d6a82 | [
"MIT"
] | 31 | 2020-06-23T00:40:04.000Z | 2022-01-08T11:06:24.000Z | Array/Leetcode 220. Contains Duplicate III.py | kaizhengny/LeetCode | 67d64536ab80f4966699fe7460d165f2a98d6a82 | [
"MIT"
] | null | null | null | Array/Leetcode 220. Contains Duplicate III.py | kaizhengny/LeetCode | 67d64536ab80f4966699fe7460d165f2a98d6a82 | [
"MIT"
] | 7 | 2020-04-30T08:46:03.000Z | 2021-08-28T16:25:54.000Z | class Solution:
def containsNearbyAlmostDuplicate(self, nums: List[int], k: int, t: int) -> bool:
if t == 0 and len(set(nums)) == len(nums):
return False
for i in range(len(nums)):
for j in range(i+1,min(i+k+1,len(nums))):
if abs(nums[j] - nums[i]) <=t:
... | 40.666667 | 85 | 0.513661 |
4a0f4091907d85c906edd6ea1fbb2f107a6db65b | 1,197 | py | Python | python/Chapter3/Solutions/Exercise3_2.py | wboswall/academia | 1571e8f9aceb21564f601cb79120ae56068fe3dd | [
"MIT"
] | null | null | null | python/Chapter3/Solutions/Exercise3_2.py | wboswall/academia | 1571e8f9aceb21564f601cb79120ae56068fe3dd | [
"MIT"
] | null | null | null | python/Chapter3/Solutions/Exercise3_2.py | wboswall/academia | 1571e8f9aceb21564f601cb79120ae56068fe3dd | [
"MIT"
] | null | null | null | import shelve
#'ID', 'Name', 'HireDate', 'Grade', 'ManagerID'
employees = [
['1','John Brown', '2006-02-23', 'Foreman', ''],
['2','Fred Smith', '2014-04-03', 'Laborer', '1'],
['3','Anne Jones', '2009-06-17', 'Laborer', '1'],
]
#'Grade','Amount'
salaries = [
['Foreman', 60000],
['Laborer', 30000]
]
def createDB(data,... | 23.94 | 78 | 0.597327 |
4a0f40d03c594c93d1243115f4f226428c9840e0 | 1,693 | py | Python | gamestonk_terminal/options/volume_helper.py | khuang110/GamestonkTerminal | 98ac22eef1b61de73b4056debc128b66f520ffb9 | [
"MIT"
] | 1 | 2021-12-17T19:25:12.000Z | 2021-12-17T19:25:12.000Z | gamestonk_terminal/options/volume_helper.py | lolrenx/GamestonkTerminal | eb2b0d766bf1b6bb8656d6733083962efb152fe2 | [
"MIT"
] | null | null | null | gamestonk_terminal/options/volume_helper.py | lolrenx/GamestonkTerminal | eb2b0d766bf1b6bb8656d6733083962efb152fe2 | [
"MIT"
] | null | null | null | """Functions for analyzing options data"""
__docformat__ = "numpy"
from typing import Union
import pandas as pd
import numpy as np
def get_loss_at_strike(
strike: Union[int, float], chain: pd.DataFrame
) -> Union[int, float]:
"""
Function to get the loss at the given expiry
Parameters
----------
... | 26.453125 | 75 | 0.632605 |
4a0f42724b780ddeed157440d9a10f316ff1d39f | 3,019 | py | Python | credentials_test.py | Chebichii-Lab/password-locker | 4ec057acb4f1255ac8855462799e38108d463e60 | [
"MIT"
] | null | null | null | credentials_test.py | Chebichii-Lab/password-locker | 4ec057acb4f1255ac8855462799e38108d463e60 | [
"MIT"
] | null | null | null | credentials_test.py | Chebichii-Lab/password-locker | 4ec057acb4f1255ac8855462799e38108d463e60 | [
"MIT"
] | null | null | null | import unittest
from credentials import Credentials # importing the credentials class
class TestCredentials(unittest.TestCase):
'''
test class defines test cases for the credentials
'''
def setUp(self):
'''
set up method runs before other cases
'''
self.new_credential... | 35.940476 | 89 | 0.675389 |
4a0f42cbbd28b92347e0d415783d14bf591cab42 | 15,172 | py | Python | detect_secrets/plugins/high_entropy_strings.py | digjanaik/detect-secrets | 624024ad5fd8a608e09ed719e5edab6ca95ef47e | [
"Apache-2.0"
] | null | null | null | detect_secrets/plugins/high_entropy_strings.py | digjanaik/detect-secrets | 624024ad5fd8a608e09ed719e5edab6ca95ef47e | [
"Apache-2.0"
] | 1 | 2020-08-12T21:57:16.000Z | 2020-08-12T21:57:16.000Z | detect_secrets/plugins/high_entropy_strings.py | digjanaik/detect-secrets | 624024ad5fd8a608e09ed719e5edab6ca95ef47e | [
"Apache-2.0"
] | null | null | null | import base64
import configparser
import math
import re
import string
from abc import ABCMeta
from abc import abstractmethod
from contextlib import contextmanager
import yaml
from detect_secrets.core.potential_secret import PotentialSecret
from detect_secrets.plugins.base import BasePlugin
from detect_secrets.plugins... | 33.941834 | 94 | 0.588782 |
4a0f438a1cc0c8534fedc3bef50bd2c00a4a439f | 1,809 | py | Python | examples/qcpi/heatRate/compare_plot.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | 1 | 2019-03-26T03:00:03.000Z | 2019-03-26T03:00:03.000Z | examples/qcpi/heatRate/compare_plot.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | null | null | null | examples/qcpi/heatRate/compare_plot.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | 1 | 2019-07-14T22:53:52.000Z | 2019-07-14T22:53:52.000Z | from beluga.visualization import BelugaPlot
from beluga.visualization.datasources import Dill
# plots = BelugaPlot('./data.dill',default_sol=-1,default_step=0)
mpbvp_ds = Dill('../../mpbvp/planarHypersonicWithHeatRate/data_1200.dill')
plots = BelugaPlot('./data_1200_2deg15km_ep4.dill',default_sol=-1,default_step=-1, re... | 58.354839 | 128 | 0.566611 |
4a0f44623979aa4cda917fef5a11a2ca457bad0c | 809 | py | Python | firebase_admin/__about__.py | kushal12345/firebase-admin-python | 14e5dc4721f9908e132f137c87bf0dc6b8709f63 | [
"Apache-2.0"
] | 4 | 2019-02-17T17:52:55.000Z | 2020-05-06T06:45:56.000Z | firebase_admin/__about__.py | kushal12345/firebase-admin-python | 14e5dc4721f9908e132f137c87bf0dc6b8709f63 | [
"Apache-2.0"
] | null | null | null | firebase_admin/__about__.py | kushal12345/firebase-admin-python | 14e5dc4721f9908e132f137c87bf0dc6b8709f63 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.772727 | 74 | 0.751545 |
4a0f44a288ce93138794c349bb1c8681911e53d9 | 326 | py | Python | apps/accounts/migrations/0005_merge.py | dtisza1/bluebutton-web-server | 6322f28d75bd9e00f8dc4b5988a0cd5f7c6c80cb | [
"Apache-2.0"
] | 25 | 2017-12-10T00:48:31.000Z | 2022-03-25T01:29:13.000Z | apps/accounts/migrations/0005_merge.py | dtisza1/bluebutton-web-server | 6322f28d75bd9e00f8dc4b5988a0cd5f7c6c80cb | [
"Apache-2.0"
] | 298 | 2017-12-05T05:53:32.000Z | 2022-03-21T19:29:03.000Z | apps/accounts/migrations/0005_merge.py | dtisza1/bluebutton-web-server | 6322f28d75bd9e00f8dc4b5988a0cd5f7c6c80cb | [
"Apache-2.0"
] | 31 | 2017-12-04T16:01:12.000Z | 2021-09-26T22:34:55.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-26 20:31
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0004_merge'),
('accounts', '0004_auto_20160720_1816'),
]
operations = [
... | 19.176471 | 48 | 0.650307 |
4a0f45a3cb2b9692ae1b99252dc8591edc461d17 | 5,877 | py | Python | SdA.py | yanshengli/DBN_Learning | a9d2dc337b079cccdc172d1957a14a20c146b9b3 | [
"Apache-2.0"
] | 15 | 2015-07-30T12:45:38.000Z | 2022-03-24T06:01:29.000Z | example/DeepLearning/python/SdA.py | yulongfan/tryEverything | 2f66a8d33c3539e46d91527186bc52515ce5b14f | [
"Apache-2.0"
] | null | null | null | example/DeepLearning/python/SdA.py | yulongfan/tryEverything | 2f66a8d33c3539e46d91527186bc52515ce5b14f | [
"Apache-2.0"
] | 11 | 2016-08-01T02:30:33.000Z | 2020-11-24T08:43:40.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Stacked Denoising Autoencoders (SdA)
References :
- P. Vincent, H. Larochelle, Y. Bengio, P.A. Manzagol: Extracting and
Composing Robust Features with Denoising Autoencoders, ICML' 08, 1096-1103,
2008
- DeepLearningTutorials
https://github.com/lisa-... | 33.392045 | 94 | 0.481538 |
4a0f47108813f77dfad1a1c9f17d98169332c515 | 41,160 | bzl | Python | third_party/gpus/cuda_configure.bzl | tianhm/tensorflow | e55574f28257bdacd744dcdba86c839e661b1b2a | [
"Apache-2.0"
] | 47 | 2017-03-08T20:58:54.000Z | 2021-06-24T07:07:49.000Z | third_party/gpus/cuda_configure.bzl | genSud/tensorflow | ec8216568d8cd9810004067558041c11a8356685 | [
"Apache-2.0"
] | 1 | 2019-07-11T16:29:54.000Z | 2019-07-11T16:29:54.000Z | third_party/gpus/cuda_configure.bzl | genSud/tensorflow | ec8216568d8cd9810004067558041c11a8356685 | [
"Apache-2.0"
] | 19 | 2017-04-17T01:28:40.000Z | 2020-08-15T13:01:33.000Z | # -*- Python -*-
"""Repository rule for CUDA autoconfiguration.
`cuda_configure` depends on the following environment variables:
* `TF_NEED_CUDA`: Whether to enable building with CUDA.
* `GCC_HOST_COMPILER_PATH`: The GCC host compiler path
* `TF_CUDA_CLANG`: Whether to use clang as a cuda compiler.
* `CLANG_C... | 38.503274 | 102 | 0.684451 |
4a0f485d2544a0aec8d690e7248a3b5b0548047b | 2,411 | py | Python | package/kedro_viz/data_access/repositories/catalog.py | deepyaman/kedro-viz | 3aef612b6dd405baac0bde68ef37c1f39eb6fa34 | [
"BSD-3-Clause-Clear",
"Apache-2.0"
] | null | null | null | package/kedro_viz/data_access/repositories/catalog.py | deepyaman/kedro-viz | 3aef612b6dd405baac0bde68ef37c1f39eb6fa34 | [
"BSD-3-Clause-Clear",
"Apache-2.0"
] | null | null | null | package/kedro_viz/data_access/repositories/catalog.py | deepyaman/kedro-viz | 3aef612b6dd405baac0bde68ef37c1f39eb6fa34 | [
"BSD-3-Clause-Clear",
"Apache-2.0"
] | null | null | null | """`kedro_viz.data_access.repositories.catalog` defines interface to
centralise access to Kedro data catalog."""
# pylint: disable=missing-class-docstring,missing-function-docstring,protected-access
from typing import Optional
from kedro.io import AbstractDataSet, DataCatalog, DataSetNotFoundError
from kedro_viz.cons... | 34.942029 | 91 | 0.641228 |
4a0f4a43e98a7b731ead7e1fceb0bd7f6a42564c | 3,021 | py | Python | tests/test_learners_bruteforce.py | owahltinez/coconuts | 20aa29580c0114e88da70ba1e806becd2243e57b | [
"MIT"
] | 1 | 2021-09-10T01:56:01.000Z | 2021-09-10T01:56:01.000Z | tests/test_learners_bruteforce.py | owahltinez/coconuts | 20aa29580c0114e88da70ba1e806becd2243e57b | [
"MIT"
] | null | null | null | tests/test_learners_bruteforce.py | owahltinez/coconuts | 20aa29580c0114e88da70ba1e806becd2243e57b | [
"MIT"
] | null | null | null | """ Test Convolution Module """
import sys
import cProfile
import warnings
from pstats import Stats
from unittest import TestCase, main
from bananas.sampledata.local import load_boston, load_titanic
from bananas.sampledata.synthetic import new_labels, new_line, new_3x3, new_poly, new_trig
from bananas.hyperparameters... | 41.383562 | 93 | 0.703078 |
4a0f4a52fe3460cbbb04e9ddce257bbf689aaeab | 910 | py | Python | tackle/providers/system/hooks/strings.py | geometry-labs/tackle-box | 83424a10416955ba983f0c14ec89bd79673a4282 | [
"BSD-3-Clause"
] | 1 | 2021-04-13T23:10:11.000Z | 2021-04-13T23:10:11.000Z | tackle/providers/system/hooks/strings.py | geometry-labs/tackle-box | 83424a10416955ba983f0c14ec89bd79673a4282 | [
"BSD-3-Clause"
] | 4 | 2021-01-27T00:06:12.000Z | 2021-02-12T01:20:32.000Z | tackle/providers/system/hooks/strings.py | geometry-labs/tackle-box | 83424a10416955ba983f0c14ec89bd79673a4282 | [
"BSD-3-Clause"
] | 1 | 2021-05-07T05:07:29.000Z | 2021-05-07T05:07:29.000Z | """String hooks."""
import logging
from typing import List
from tackle.models import BaseHook, Field
logger = logging.getLogger(__name__)
class SplitHook(BaseHook):
"""Hook for splitting a string into as list based on a separator."""
hook_type: str = 'split'
input: str = Field(..., description="A list... | 25.277778 | 85 | 0.659341 |
4a0f4a838168457f5e478cc830fedc5a84789ff6 | 3,852 | py | Python | Post-Exploitation/LaZagne/Linux/lazagne/softwares/sysadmin/cli.py | FOGSEC/TID3xploits | b57d8bae454081a3883a5684679e2a329e72d6e5 | [
"MIT"
] | 5 | 2018-01-15T13:58:40.000Z | 2022-02-17T02:38:58.000Z | Post-Exploitation/LaZagne/Linux/lazagne/softwares/sysadmin/cli.py | bhattsameer/TID3xploits | b57d8bae454081a3883a5684679e2a329e72d6e5 | [
"MIT"
] | null | null | null | Post-Exploitation/LaZagne/Linux/lazagne/softwares/sysadmin/cli.py | bhattsameer/TID3xploits | b57d8bae454081a3883a5684679e2a329e72d6e5 | [
"MIT"
] | 4 | 2019-06-21T07:51:11.000Z | 2020-11-04T05:20:09.000Z | from lazagne.config.constant import *
from lazagne.config.write_output import print_debug
from lazagne.config.moduleInfo import ModuleInfo
from lazagne.config import homes
from ConfigParser import ConfigParser
import psutil
import os
import pwd
class Cli(ModuleInfo):
def __init__(self):
options = {'comman... | 30.816 | 106 | 0.438474 |
4a0f4aa8bf0510d95032cd3be17a7d6082405463 | 67,168 | py | Python | nautobot/extras/tests/test_api.py | psmware-ltd/nautobot | ac516287fb8edcc3482bd011839de837c6bbf0df | [
"Apache-2.0"
] | 384 | 2021-02-24T01:40:40.000Z | 2022-03-30T10:30:59.000Z | nautobot/extras/tests/test_api.py | psmware-ltd/nautobot | ac516287fb8edcc3482bd011839de837c6bbf0df | [
"Apache-2.0"
] | 1,067 | 2021-02-24T00:58:08.000Z | 2022-03-31T23:38:23.000Z | nautobot/extras/tests/test_api.py | psmware-ltd/nautobot | ac516287fb8edcc3482bd011839de837c6bbf0df | [
"Apache-2.0"
] | 128 | 2021-02-24T02:45:16.000Z | 2022-03-20T18:48:36.000Z | from datetime import datetime, timedelta
import os.path
import uuid
from unittest import mock, skipIf
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from django.http import Http404
from django.test import override_settings
from... | 35.976433 | 120 | 0.58912 |
4a0f4c13e4d1479ae2cb5ca657706ade8173fe51 | 650 | py | Python | Lib/encodings/unicode_internal.py | M-Spencer-94/configNOW | 56828587253202089e77cfdfcf5329f2a7f09b3f | [
"PSF-2.0",
"Apache-2.0",
"MIT"
] | 8 | 2016-11-24T09:38:31.000Z | 2021-04-23T13:04:48.000Z | core/Lib/encodings/unicode_internal.py | tuankien2601/python222 | 205414c33fba8166167fd8a6a03eda1a68f16316 | [
"Apache-2.0"
] | 6 | 2020-11-18T15:48:14.000Z | 2021-05-03T21:20:50.000Z | core/Lib/encodings/unicode_internal.py | tuankien2601/python222 | 205414c33fba8166167fd8a6a03eda1a68f16316 | [
"Apache-2.0"
] | 4 | 2015-09-09T11:54:37.000Z | 2018-05-26T05:08:14.000Z | """ Python 'unicode-internal' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
# Note: Binding these as C functions will result in the class not
# converting them to methods. This is in... | 20.967742 | 69 | 0.733846 |
4a0f4df4a720560a00cbe68ec6c2c66329bf14d0 | 1,555 | py | Python | time series regression/ARIMA/ARMA.py | Diyago/ML-DL-scripts | 40718a9d4318d6d6531bcea5998c0a18afcd9cb3 | [
"Apache-2.0"
] | 142 | 2018-09-02T08:59:45.000Z | 2022-03-30T17:08:24.000Z | time series regression/ARIMA/ARMA.py | jerinka/ML-DL-scripts | eeb5c3c7c5841eb4cdb272690e14d6718f3685b2 | [
"Apache-2.0"
] | 4 | 2019-09-08T07:27:11.000Z | 2021-10-19T05:50:24.000Z | time series regression/ARIMA/ARMA.py | jerinka/ML-DL-scripts | eeb5c3c7c5841eb4cdb272690e14d6718f3685b2 | [
"Apache-2.0"
] | 75 | 2018-10-04T17:08:40.000Z | 2022-03-08T18:50:52.000Z | # Load modules
from __future__ import print_function
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
from statsmodels.graphics.tsaplots import plot_acf, plot_pacf
import statsmodels.tsa.api as smtsa
from statsmodels.tsa import arima_process
# Function to plot signal, ACF and PACF
def plotds... | 25.491803 | 74 | 0.6791 |
4a0f4ed9d17911771d64219727c7b860e772bd21 | 2,439 | py | Python | alerta/models/customer.py | sauber/alerta | 312abf1cd02aebbcb7db972f3e0cdaaf62bbbb8a | [
"Apache-2.0"
] | null | null | null | alerta/models/customer.py | sauber/alerta | 312abf1cd02aebbcb7db972f3e0cdaaf62bbbb8a | [
"Apache-2.0"
] | null | null | null | alerta/models/customer.py | sauber/alerta | 312abf1cd02aebbcb7db972f3e0cdaaf62bbbb8a | [
"Apache-2.0"
] | 1 | 2021-03-11T18:19:22.000Z | 2021-03-11T18:19:22.000Z | from typing import Any, Dict, List, Optional, Tuple, Union
from uuid import uuid4
from alerta.app import db
from alerta.database.base import Query
from alerta.utils.response import absolute_url
JSON = Dict[str, Any]
class Customer:
def __init__(self, match: str, customer: str, **kwargs) -> None:
self.... | 29.385542 | 83 | 0.595326 |
4a0f4f802dd6c6ca83d97d153d111d4e6a9850be | 3,750 | py | Python | pi4home-core/travis/run-clang-format.py | khzd/pi4home | 937bcdcf77bab111cca10af1fe45c63a55c29aae | [
"MIT"
] | 1 | 2019-05-16T02:52:12.000Z | 2019-05-16T02:52:12.000Z | pi4home-core/travis/run-clang-format.py | khzd/pi4home | 937bcdcf77bab111cca10af1fe45c63a55c29aae | [
"MIT"
] | null | null | null | pi4home-core/travis/run-clang-format.py | khzd/pi4home | 937bcdcf77bab111cca10af1fe45c63a55c29aae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import argparse
import click
import glob
import json
import multiprocessing
import os
import fnmatch
import re
import shutil
import subprocess
import sys
import tempfile
import threading
import traceback
is_py2 = sys.version[0] == '2'
if is_py2:
impor... | 29.296875 | 85 | 0.598133 |
4a0f5088a3701f0051f90974198ab358b66e9db8 | 730 | py | Python | test_project/streamblocks/models.py | HtmlMak/django-streamfield | d40a3128e531386b1bccbaeb7d6b7529a9650fd8 | [
"BSD-2-Clause"
] | null | null | null | test_project/streamblocks/models.py | HtmlMak/django-streamfield | d40a3128e531386b1bccbaeb7d6b7529a9650fd8 | [
"BSD-2-Clause"
] | null | null | null | test_project/streamblocks/models.py | HtmlMak/django-streamfield | d40a3128e531386b1bccbaeb7d6b7529a9650fd8 | [
"BSD-2-Clause"
] | 1 | 2021-03-19T16:13:52.000Z | 2021-03-19T16:13:52.000Z | from django.db import models
class RichText(models.Model):
text = models.TextField(blank=True, null=True)
options = {
"gray_bgr": {
"label": "Block on gray background",
"type": "checkbox",
"default": False
}
}
class Meta:
# This will use ... | 21.470588 | 53 | 0.613699 |
4a0f508961280f4d1f83a18c31814503994f1a7b | 4,663 | py | Python | plenum/test/node_request/test_different_ledger_request_interleave.py | steptan/indy-plenum | 488bf63c82753a74a92ac6952da784825ffd4a3d | [
"Apache-2.0"
] | null | null | null | plenum/test/node_request/test_different_ledger_request_interleave.py | steptan/indy-plenum | 488bf63c82753a74a92ac6952da784825ffd4a3d | [
"Apache-2.0"
] | null | null | null | plenum/test/node_request/test_different_ledger_request_interleave.py | steptan/indy-plenum | 488bf63c82753a74a92ac6952da784825ffd4a3d | [
"Apache-2.0"
] | null | null | null | from plenum.test.node_request.helper import sdk_ensure_pool_functional
from plenum.test.helper import sdk_send_random_and_check, sdk_send_random_requests, \
sdk_eval_timeout, sdk_get_and_check_replies
from plenum.test.node_catchup.helper import ensure_all_nodes_have_same_data
from plenum.test.pool_transactions.hel... | 49.606383 | 85 | 0.610337 |
4a0f518bb8372855210207d52b453c9e6aa3b55c | 24,996 | py | Python | oggm/tests/test_shop.py | skachuck/oggm | b391e6923fb0c5269e10ea260f5199a26d5e1082 | [
"BSD-3-Clause"
] | 156 | 2015-10-11T16:38:43.000Z | 2022-03-24T04:19:16.000Z | oggm/tests/test_shop.py | skachuck/oggm | b391e6923fb0c5269e10ea260f5199a26d5e1082 | [
"BSD-3-Clause"
] | 953 | 2015-10-11T16:26:14.000Z | 2022-03-27T23:19:19.000Z | oggm/tests/test_shop.py | skachuck/oggm | b391e6923fb0c5269e10ea260f5199a26d5e1082 | [
"BSD-3-Clause"
] | 92 | 2015-10-19T08:53:23.000Z | 2022-03-28T08:00:17.000Z | import os
import warnings
import pytest
salem = pytest.importorskip('salem')
gpd = pytest.importorskip('geopandas')
import oggm
import xarray as xr
import numpy as np
import pandas as pd
from oggm import utils
from oggm.utils import get_demo_file
from oggm.shop import its_live, rgitopo, bedtopo
from oggm.core import ... | 41.799331 | 82 | 0.550248 |
4a0f53cfedf7b8170d1524d5b3f7a08375958a1d | 74 | py | Python | src/video_dl/sites/pornhub/__init__.py | Jamesliyuan/video-dl | 5369a8a4204787473891f959fd3fa57086a01862 | [
"Apache-2.0"
] | 2 | 2022-01-22T18:11:33.000Z | 2022-01-22T18:11:36.000Z | src/video_dl/sites/pornhub/__init__.py | Jamesliyuan/video-dl | 5369a8a4204787473891f959fd3fa57086a01862 | [
"Apache-2.0"
] | null | null | null | src/video_dl/sites/pornhub/__init__.py | Jamesliyuan/video-dl | 5369a8a4204787473891f959fd3fa57086a01862 | [
"Apache-2.0"
] | 2 | 2021-08-19T15:56:15.000Z | 2022-01-22T18:11:24.000Z | from .spider import PornhubSpider
from .extractor import PornhubExtractor
| 24.666667 | 39 | 0.864865 |
4a0f53dbf20f7772ede5c536aba74670f3d86c99 | 3,074 | py | Python | music_experiments/multyexp_launcher.py | fosfrancesco/InvertibleCE | c972dc55040da085fc43e4128bc1955bc8e2114b | [
"Apache-2.0"
] | null | null | null | music_experiments/multyexp_launcher.py | fosfrancesco/InvertibleCE | c972dc55040da085fc43e4128bc1955bc8e2114b | [
"Apache-2.0"
] | null | null | null | music_experiments/multyexp_launcher.py | fosfrancesco/InvertibleCE | c972dc55040da085fc43e4128bc1955bc8e2114b | [
"Apache-2.0"
] | null | null | null | from experiments_script import start_experiment_noclick
gpu_number = 0
layer = "layer4"
batch_size = 10
max_iter = 500
reducers = ["NMF", "NTD"]
nmf_ranks = ["1", "2", "3", "4", "5", "6", "10", "8", "12"]
ntd3_ranks = [
"[3,20,100]",
"[6,20,100]",
"[10,20,100]",
"[3,20,25]",
"[6,20,25]",
"[10... | 21.957143 | 62 | 0.386792 |
4a0f547aa0f50557b974e3303b6dd75d51830e32 | 171 | py | Python | Modulo_1/semana2/variables_contantes/variables-afectando-alcance-variables.py | rubens233/cocid_python | 492ebdf21817e693e5eb330ee006397272f2e0cc | [
"MIT"
] | null | null | null | Modulo_1/semana2/variables_contantes/variables-afectando-alcance-variables.py | rubens233/cocid_python | 492ebdf21817e693e5eb330ee006397272f2e0cc | [
"MIT"
] | null | null | null | Modulo_1/semana2/variables_contantes/variables-afectando-alcance-variables.py | rubens233/cocid_python | 492ebdf21817e693e5eb330ee006397272f2e0cc | [
"MIT"
] | 1 | 2022-03-04T00:57:18.000Z | 2022-03-04T00:57:18.000Z | global texto
texto = "variable global" #variables globales
def funcion():
global texto
texto= "variable local" #variables locales
funcion()
print(texto)
| 21.375 | 54 | 0.695906 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.