hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0877e1fd7a500be9f6150267c79dfbe85d355a97 | 7,653 | py | Python | chroma/g4daenode/daeextra.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | chroma/g4daenode/daeextra.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | chroma/g4daenode/daeextra.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | import collada
from collada.common import DaeObject
from tools import tag
import sys, os, logging, hashlib, copy, re
log = logging.getLogger(__name__)
class DAEExtra(DaeObject):
"""
Non-distributed extra nodes are conventrated at
::
<library_nodes>
<node.../>
... | 42.516667 | 195 | 0.59493 |
08780676d17d141ab166ad4e79eb5dd84a6e866e | 4,598 | py | Python | capnpy/testing/segment/test_base.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 1 | 2019-05-29T19:47:53.000Z | 2019-05-29T19:47:53.000Z | capnpy/testing/segment/test_base.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | null | null | null | capnpy/testing/segment/test_base.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 4 | 2018-01-28T23:44:41.000Z | 2019-09-28T17:50:14.000Z | import pytest
import sys
import struct
import math
from pypytools import IS_PYPY
from six import b, PY3
from capnpy import ptr
from capnpy.printer import print_buffer
from capnpy.segment.base import BaseSegmentForTests as BaseSegment, unpack_uint32
def test_unpack_uint32():
a = 12
b = 2**31 + 1
buf = stru... | 34.059259 | 81 | 0.560026 |
0878076dae3fc35b6ccedeee8970fc7f63bcb2eb | 44,601 | py | Python | tests/test_commands.py | jhershberg/redis-py | 6f760cc5d14915496dc0fd8becb57eb052c396e8 | [
"MIT"
] | 5 | 2015-11-04T13:40:16.000Z | 2020-06-22T12:21:05.000Z | tests/test_commands.py | jhershberg/redis-py | 6f760cc5d14915496dc0fd8becb57eb052c396e8 | [
"MIT"
] | 1 | 2019-03-11T12:14:08.000Z | 2019-03-11T12:14:32.000Z | tests/test_commands.py | jhershberg/redis-py | 6f760cc5d14915496dc0fd8becb57eb052c396e8 | [
"MIT"
] | 3 | 2016-01-20T03:54:18.000Z | 2019-03-11T11:39:38.000Z | from __future__ import with_statement
import binascii
import datetime
import pytest
import redis
import time
from redis._compat import (unichr, u, b, ascii_letters, iteritems, iterkeys,
itervalues)
from redis.client import parse_info
from redis import exceptions
from .conftest import skip_i... | 34.981176 | 79 | 0.476402 |
0878131d5ae134b74fdc69d8794a14fb453e4f71 | 658 | py | Python | chapter8/exercises/guests_party.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | chapter8/exercises/guests_party.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | chapter8/exercises/guests_party.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | # guests_at_party
#fetch the input functions
from BTCInput import *
#create an empty guests list
guests=[]
number_guests=read_int('How many guests do you expect? ')
# read in 10 sales figures
for count in range(1,number_guests+1):
# assemble a prompt string
prompt='Enter the names of the guests: '
# ... | 23.5 | 57 | 0.702128 |
087829ad052b61e94aadc4bb09aa54928fceb34b | 3,787 | py | Python | dp_conceptual_search/ml/spelling/spell_checker.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 3 | 2018-05-10T16:49:27.000Z | 2022-03-29T15:23:04.000Z | dp_conceptual_search/ml/spelling/spell_checker.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 2 | 2018-09-20T06:37:27.000Z | 2018-11-12T12:05:08.000Z | dp_conceptual_search/ml/spelling/spell_checker.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 3 | 2018-06-25T10:48:43.000Z | 2021-04-11T08:01:27.000Z | """
Implementation of a spellchecker using word embedding models
"""
from typing import Generator, List
from sortedcontainers import SortedSet
from dp_conceptual_search.ml.word_embedding.fastText.unsupervised import UnsupervisedModel
# Constant
LETTERS = 'abcdefghijklmnopqrstuvwxyz'
class SpellCheckSuggestion(objec... | 37.49505 | 105 | 0.637708 |
08782f221aa4bb67d404831f0f41a0826414af89 | 7,897 | py | Python | radiotools/estimator.py | jrs65/radiotools | de8153824d2c394a4ddb850b630028e75ba1afb0 | [
"MIT"
] | null | null | null | radiotools/estimator.py | jrs65/radiotools | de8153824d2c394a4ddb850b630028e75ba1afb0 | [
"MIT"
] | null | null | null | radiotools/estimator.py | jrs65/radiotools | de8153824d2c394a4ddb850b630028e75ba1afb0 | [
"MIT"
] | null | null | null | # === Start Python 2/3 compatibility
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from future.builtins import * # noqa pylint: disable=W0401, W0614
from future.builtins.disabled import * # noqa pylint: disable=W0401, W0614
# === End Python 2/3 compatib... | 24.833333 | 134 | 0.572116 |
08786842f56ed7de9fb9afeb769d358482d1d760 | 683 | py | Python | auditor/auditor/sql/audit.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | 2 | 2022-03-17T04:50:20.000Z | 2022-03-17T04:51:31.000Z | auditor/auditor/sql/audit.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | auditor/auditor/sql/audit.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | from common.constants import Currency
from common.sql.enum import Enum
from common.sql.protobuf import Protobuf
from protobufs.audit_pb2 import ExchangeRates
from sqlalchemy import Boolean, Column, DateTime, Integer
from auditor.sql.base import Base
class Audit(Base):
__tablename__ = "Audit"
version_number =... | 35.947368 | 68 | 0.778917 |
08786d2c3a464e9c7b3f2c68da9a67e2489e67ee | 359 | py | Python | subt/tools/startfile.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 12 | 2017-02-16T10:22:59.000Z | 2022-03-20T05:48:06.000Z | subt/tools/startfile.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 618 | 2016-08-30T04:46:12.000Z | 2022-03-25T16:03:10.000Z | subt/tools/startfile.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 11 | 2016-08-27T20:02:55.000Z | 2022-03-07T08:53:53.000Z | import os
import os.path
import subprocess
import sys
if sys.platform[:3] == "win":
def main(filepath):
normpath = os.path.normpath(filepath)
os.startfile(normpath)
else:
def main(filepath):
subprocess.Popen(['xdg-open', filepath], close_fds=True, start_new_session=True)
if __name_... | 17.95 | 88 | 0.665738 |
087874c12e8f0aa5bbbb6deb48db0710cc4ec9e7 | 2,705 | py | Python | Flask/cancer_classification.py | Vishal-V/Hack-Submission | 4527d97d584532cbab43076c44cf9d8d76a450a0 | [
"MIT"
] | 92 | 2018-09-19T15:58:30.000Z | 2022-03-05T05:19:40.000Z | Flask/cancer_classification.py | Vishal-V/Hack-Submission | 4527d97d584532cbab43076c44cf9d8d76a450a0 | [
"MIT"
] | 4 | 2018-09-10T15:08:24.000Z | 2021-02-02T21:51:03.000Z | Disease Detection/cancer_classification.py | Vishal-V/100-Days-of-ML-Code | 677d8d6a19ae63d3aa2ddd74e9ce8ae7a06b71df | [
"MIT"
] | 59 | 2018-11-29T20:07:15.000Z | 2022-03-31T12:34:57.000Z | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# In[2]:
from sklearn.datasets import load_breast_cancer
# In[3]:
data = load_breast_cancer()
# In[4]:
data
# In[5]:
data.keys()
# In[6]:
print(data['featur... | 12.581395 | 113 | 0.686137 |
08787fe658706ee5cc9b156642108ddb61ef819d | 1,102 | py | Python | tests/test_httpcache.py | jmcarp/requests-middleware | b899f79af2053f39268ddb76d9a1951e405a34cf | [
"MIT"
] | 20 | 2015-01-16T07:51:59.000Z | 2021-07-21T21:25:21.000Z | tests/test_httpcache.py | jmcarp/requests-middleware | b899f79af2053f39268ddb76d9a1951e405a34cf | [
"MIT"
] | 1 | 2015-09-14T16:48:19.000Z | 2015-11-08T05:55:03.000Z | tests/test_httpcache.py | jmcarp/requests-middleware | b899f79af2053f39268ddb76d9a1951e405a34cf | [
"MIT"
] | 5 | 2015-01-16T08:04:20.000Z | 2019-03-13T04:50:38.000Z | # -*- coding: utf-8 -*-
import pytest
import requests
from requests_middleware.middleware import MiddlewareHTTPAdapter
try:
from requests_middleware.contrib import httpcacheware
has_httpcache = True
except ImportError:
has_httpcache = False
pytestmark = pytest.mark.skipif(
not has_httpcache,
re... | 24.488889 | 64 | 0.732305 |
0878a64ec40e94724d1e3c35fcc515bb88c00c10 | 32,206 | py | Python | 0900-hp/hplip-3.21.12/fax/fax.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | 0900-hp/hplip-3.21.12/fax/fax.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | 0900-hp/hplip-3.21.12/fax/fax.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# (c) Copyright 2015 HP Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later ver... | 32.93047 | 135 | 0.526641 |
0878a81e26d6a97062ad3b22002bbc31cb358887 | 1,601 | py | Python | topological-sort/0207-course-schedule(使用队列的拓扑排序).py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | 1 | 2021-01-10T17:03:21.000Z | 2021-01-10T17:03:21.000Z | topological-sort/0207-course-schedule(使用队列的拓扑排序).py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | null | null | null | topological-sort/0207-course-schedule(使用队列的拓扑排序).py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | 1 | 2021-07-25T07:53:14.000Z | 2021-07-25T07:53:14.000Z | from typing import List
class Solution:
# 思想:该方法的每一步总是输出当前无前趋(即入度为零)的顶点
def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -> bool:
"""
:type numCourses: int 课程门数
:type prerequisites: List[List[int]] 课程与课程之间的关系
:rtype: bool
"""
# 课程的长度
... | 27.135593 | 81 | 0.547783 |
0878cdf36bcb1edf36b92e00c2a7a43b5b3d4d2f | 5,869 | py | Python | marked_card_detector/card.py | guilhermesilveira/marked_card_detector | 03a81171b7625cbef0c3968ad881c09c4b384d08 | [
"MIT"
] | null | null | null | marked_card_detector/card.py | guilhermesilveira/marked_card_detector | 03a81171b7625cbef0c3968ad881c09c4b384d08 | [
"MIT"
] | null | null | null | marked_card_detector/card.py | guilhermesilveira/marked_card_detector | 03a81171b7625cbef0c3968ad881c09c4b384d08 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from marked_card_detector.graphics import flattener
font = cv2.FONT_HERSHEY_SIMPLEX
# based on https://github.com/EdjeElectronics/OpenCV-Playing-Card-Detector/blob/master/Cards.py
# Width and height of card corner, where rank and suit are
CORNER_WIDTH = 32
CORNER_HEIGHT = 84
class Car... | 43.474074 | 107 | 0.620208 |
0878fb736f0617a35000b68661878a6dc62d8b4c | 52,691 | py | Python | dallinger/experiment_server/experiment_server.py | mensch72/Dallinger | 56899d231e2f2fc9f84879f100bf998797249d3e | [
"MIT"
] | 1 | 2020-11-29T02:25:13.000Z | 2020-11-29T02:25:13.000Z | dallinger/experiment_server/experiment_server.py | mensch72/Dallinger | 56899d231e2f2fc9f84879f100bf998797249d3e | [
"MIT"
] | null | null | null | dallinger/experiment_server/experiment_server.py | mensch72/Dallinger | 56899d231e2f2fc9f84879f100bf998797249d3e | [
"MIT"
] | 1 | 2020-11-28T16:22:48.000Z | 2020-11-28T16:22:48.000Z | """ This module provides the backend Flask server that serves an experiment. """
from datetime import datetime
import gevent
from json import dumps
from json import loads
import os
import re
from flask import (
abort,
Flask,
render_template,
request,
Response,
send_from_directory,
url_for,... | 32.405289 | 88 | 0.653584 |
08791c61748e08433cbf10c5a1f098dddcc39623 | 22,710 | py | Python | core/_clustering.py | venkatrajun/qlikds | 2833c0d611f22da79f1008f2333da97dcd5da5ad | [
"MIT"
] | 163 | 2018-09-05T07:45:41.000Z | 2022-03-28T17:27:31.000Z | core/_clustering.py | venkatrajun/qlikds | 2833c0d611f22da79f1008f2333da97dcd5da5ad | [
"MIT"
] | 109 | 2018-09-04T07:39:33.000Z | 2021-09-01T09:16:44.000Z | core/_clustering.py | venkatrajun/qlikds | 2833c0d611f22da79f1008f2333da97dcd5da5ad | [
"MIT"
] | 81 | 2018-09-05T12:39:01.000Z | 2022-01-01T13:36:20.000Z | import os
import sys
import time
import string
import locale
import warnings
import numpy as np
import pandas as pd
import _utils as utils
import ServerSideExtension_pb2 as SSE
# Suppress warnings
if not sys.warnoptions:
warnings.simplefilter("ignore")
import hdbscan
# Add Generated folder to module path
PARENT_... | 48.012685 | 130 | 0.592602 |
087940aee2f31eb3a002f28ecd7fc39a7dc59e9e | 583 | py | Python | tests/utils/http_utils.py | cardpay/python-sdk-v3 | 35e7c42ca3e9a1ea6222fe2150f92ede64c70248 | [
"MIT"
] | 6 | 2019-07-16T06:27:25.000Z | 2021-03-04T14:24:05.000Z | tests/utils/http_utils.py | cardpay/python-sdk-v3 | 35e7c42ca3e9a1ea6222fe2150f92ede64c70248 | [
"MIT"
] | 5 | 2019-11-18T09:07:51.000Z | 2021-02-12T13:59:55.000Z | tests/utils/http_utils.py | cardpay/python-sdk-v3 | 35e7c42ca3e9a1ea6222fe2150f92ede64c70248 | [
"MIT"
] | 5 | 2019-07-18T13:42:15.000Z | 2021-11-18T12:40:32.000Z | # coding: utf-8
import os
import urllib3
from cardpay.api_client import is_no_proxy_case
from config import create_logger
logger = create_logger(__name__)
proxy = os.getenv('HTTPS_PROXY', os.getenv('HTTP_PROXY'))
if proxy:
http = urllib3.ProxyManager(proxy)
no_proxy_http = urllib3.PoolManager()
else:
ht... | 21.592593 | 57 | 0.701544 |
087952b73ba472170e10ccc0b8d3787bfa6b58d2 | 162 | py | Python | src/Python3/41078/classfy01.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | src/Python3/41078/classfy01.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | src/Python3/41078/classfy01.py | umyuu/Sample | 66e8cd725b682db4c9bf93fb80786eea8cbad19d | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*
def imread(str):
print('imread')
input_data2(str)
return None
def input_data2(str):
print('input_data2')
return str
| 13.5 | 24 | 0.611111 |
0879623d89ed0f3bf034075ee7044310808e110e | 7,164 | py | Python | python/cuXfilter/assets/numba_kernels/gpu_histogram.py | AjayThorve/cuxfilter | 537ff67de80439a43e0bad7373558f5e25dcb112 | [
"Apache-2.0"
] | 2 | 2019-03-06T02:10:05.000Z | 2020-05-06T06:33:02.000Z | python/cuXfilter/assets/numba_kernels/gpu_histogram.py | AjayThorve/cuxfilter | 537ff67de80439a43e0bad7373558f5e25dcb112 | [
"Apache-2.0"
] | null | null | null | python/cuXfilter/assets/numba_kernels/gpu_histogram.py | AjayThorve/cuxfilter | 537ff67de80439a43e0bad7373558f5e25dcb112 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from numba import cuda
import cudf
import numba
import pyarrow as pa
import pandas as pd
import io
import gc
from typing import Type
from ...charts.core.core_chart import BaseChart
@numba.jit(nopython=True,parallel=True)
def compute_bin(x, n, xmin, xmax):
'''
description:
compute ac... | 31.559471 | 121 | 0.644891 |
087967d508dbf2823ae25062f77eac6a4d09fb02 | 69,675 | py | Python | premade_modules/2.79/2.79b/freestyle/types.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.79/2.79b/freestyle/types.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.79/2.79b/freestyle/types.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | class AdjacencyIterator:
'''Class for representing adjacency iterators used in the chaining process. An AdjacencyIterator is created in the increment() and decrement() methods of a ChainingIterator and passed to the traverse() method of the ChainingIterator. '''
is_incoming = None
'''True if the current Vi... | 28.140145 | 672 | 0.63103 |
08796e58f041fe84e5198c27d6a5c9b25f9bfeb7 | 5,483 | py | Python | HEMnet/train.py | BiomedicalMachineLearning/HEMnet | e9b49f09055f8af8f1a46e6645585eb42d296631 | [
"MIT"
] | 9 | 2021-04-12T12:46:05.000Z | 2022-03-08T08:04:23.000Z | HEMnet/train.py | BiomedicalMachineLearning/HEMnet | e9b49f09055f8af8f1a46e6645585eb42d296631 | [
"MIT"
] | null | null | null | HEMnet/train.py | BiomedicalMachineLearning/HEMnet | e9b49f09055f8af8f1a46e6645585eb42d296631 | [
"MIT"
] | 3 | 2021-03-23T08:48:24.000Z | 2022-03-14T02:44:31.000Z | # Example command:
# python /scratch/imb/Xiao/HEMnet/HEMnet/train.py -b /scratch/imb/Xiao/HE_test/10x/ -t train_dataset_10x_19_12_19_strict_Reinhard/tiles_10x/ -l valid_Reinhard/tiles_10x -o HEMnet_14_01_2020 -g 2 -e 10 -s -m vgg16 -a 64 -v
import argparse
import numpy as np
import os
import time
from pathlib import Pa... | 44.942623 | 221 | 0.566296 |
08797f4ffa066f106a776e73f0976ab60ff0348b | 2,112 | py | Python | repos/system_upgrade/el7toel8/actors/checkosrelease/libraries/library.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/checkosrelease/libraries/library.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/checkosrelease/libraries/library.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | import os
from leapp.exceptions import StopActorExecution, StopActorExecutionError
from leapp.libraries.common import reporting
from leapp.libraries.stdlib import api
from leapp.models import OSReleaseFacts
def skip_check():
""" Check if an environment variable was used to skip this actor """
if os.getenv('L... | 36.413793 | 99 | 0.66714 |
0879813e5aaeb689fc8f4f3c7a603e19e603f743 | 50 | py | Python | development/models/layers/mesh_prepare.py | atomicsulfate/meshcnn-4-cadseg | c0d91ec593293cb58eec422556d1322a3b4f6183 | [
"MIT"
] | 7 | 2021-04-07T06:31:58.000Z | 2022-01-27T09:49:51.000Z | development/models/layers/mesh_prepare.py | atomicsulfate/meshcnn-4-cadseg | c0d91ec593293cb58eec422556d1322a3b4f6183 | [
"MIT"
] | null | null | null | development/models/layers/mesh_prepare.py | atomicsulfate/meshcnn-4-cadseg | c0d91ec593293cb58eec422556d1322a3b4f6183 | [
"MIT"
] | 2 | 2021-05-19T03:39:04.000Z | 2021-08-12T08:20:19.000Z | from meshcnn.models.layers.mesh_prepare import *
| 16.666667 | 48 | 0.82 |
0879831691c5ec5c8e6fefa951a841bfdd2c0f0c | 514 | py | Python | doc/python_study_code/for.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | doc/python_study_code/for.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | doc/python_study_code/for.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
# Measure some strings:
a = ['cat', 'window', 'defenestrate']
for x in a:
print x, len(x)
for x in a[:]:
if len(x) > 6: a.insert(2,x)
print a
b = ['Mary','had','a','little','lamb']
for i in range(len(b)):
print i,b[i]
print b
import sys
sys.stdout.softspace=0
for n ... | 17.724138 | 39 | 0.531128 |
08798ae20b8a15a46f29018109306eb1f424f09e | 3,150 | py | Python | waterbutler/core/exceptions.py | laurenrevere/waterbutler | 4f358d94376997cd9592b18b67d13a7482c7aa2a | [
"Apache-2.0"
] | null | null | null | waterbutler/core/exceptions.py | laurenrevere/waterbutler | 4f358d94376997cd9592b18b67d13a7482c7aa2a | [
"Apache-2.0"
] | null | null | null | waterbutler/core/exceptions.py | laurenrevere/waterbutler | 4f358d94376997cd9592b18b67d13a7482c7aa2a | [
"Apache-2.0"
] | null | null | null | import os
import http
import json
import asyncio
DEFAULT_ERROR_MSG = 'An error occurred while making a {response.method} request to {response.url}'
class PluginError(Exception):
"""The WaterButler related errors raised
from a plugins should inherit from PluginError
"""
def __init__(self, message, c... | 24.80315 | 108 | 0.670159 |
0879b776d2636b667bd93dd383cb9e68c11f9ce9 | 171 | py | Python | src/onevision/datasets/cubepp/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/datasets/cubepp/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/datasets/cubepp/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from __future__ import annotations
from .cubepp import *
from .fusioncubepp import *
from .simplecubepp import *
| 13.153846 | 34 | 0.678363 |
0879b902a4379b65146638b92dfcbe258a1c8532 | 4,856 | py | Python | tests/unit/commands/pipeline/bootstrap/test_guided_context.py | elbayaaa/aws-sam-cli | f8f65f8601116e0c8d2570ed75359be57e86b207 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | tests/unit/commands/pipeline/bootstrap/test_guided_context.py | elbayaaa/aws-sam-cli | f8f65f8601116e0c8d2570ed75359be57e86b207 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | tests/unit/commands/pipeline/bootstrap/test_guided_context.py | elbayaaa/aws-sam-cli | f8f65f8601116e0c8d2570ed75359be57e86b207 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | from unittest import TestCase
from unittest.mock import patch
from samcli.commands.pipeline.bootstrap.guided_context import GuidedContext
ANY_ENVIRONMENT_NAME = "ANY_ENVIRONMENT_NAME"
ANY_PIPELINE_USER_ARN = "ANY_PIPELINE_USER_ARN"
ANY_PIPELINE_EXECUTION_ROLE_ARN = "ANY_PIPELINE_EXECUTION_ROLE_ARN"
ANY_CLOUDFORMATION... | 51.115789 | 117 | 0.743616 |
0879f296c25a9d7d3b2b8608d1f75a3b8001d9a8 | 11,882 | py | Python | openapi_client/models/trip_resource_attributes.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/trip_resource_attributes.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/trip_resource_attributes.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
MBTA
MBTA service API. https://www.mbta.com Source code: https://github.com/mbta/api # noqa: E501
The version of the OpenAPI document: 3.0
Contact: developer@mbta.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from op... | 45.007576 | 708 | 0.598805 |
0879fcc81d978eac80ccdb97c1d00d0fd4c97723 | 13,387 | py | Python | stellarlab/kinetics/orbit.py | wangleon/stella | 3942f8e687065bb96760140596747cbbe6dad04b | [
"Apache-2.0"
] | null | null | null | stellarlab/kinetics/orbit.py | wangleon/stella | 3942f8e687065bb96760140596747cbbe6dad04b | [
"Apache-2.0"
] | null | null | null | stellarlab/kinetics/orbit.py | wangleon/stella | 3942f8e687065bb96760140596747cbbe6dad04b | [
"Apache-2.0"
] | 1 | 2021-10-02T02:18:28.000Z | 2021-10-02T02:18:28.000Z | import math
import numpy as np
from astropy.coordinates import SkyCoord
from ..constant import ALPHA_NGP, DELTA_NGP, L_NCP, AU, tropical_year
def parse_pairwise(arg):
"""Parse value with error"""
if (isinstance(arg, list) or isinstance(arg, tuple)) and \
len(arg)==2:
return arg
else:
... | 34.502577 | 99 | 0.530739 |
0879feefb740882c4d5f6ed9e5b5434af7fa6b20 | 13,597 | py | Python | src/WidgetFactory/scripts/rebuild_WidgetFactory.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | 3 | 2019-11-26T05:33:47.000Z | 2020-05-18T06:49:41.000Z | src/WidgetFactory/scripts/rebuild_WidgetFactory.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | null | null | null | src/WidgetFactory/scripts/rebuild_WidgetFactory.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | null | null | null | #!python3
# -*- coding:utf-8 -*-
import os
import sys
import time
import ctypes
import shutil
import subprocess
IsPy3 = sys.version_info[0] >= 3
if IsPy3:
import winreg
else:
import codecs
import _winreg as winreg
BuildType = 'Release'
IsRebuild = True
Build = 'Rebuild'
Update = False
Copy = False
CleanAl... | 38.19382 | 195 | 0.596161 |
087a249b1c4d3fc15b4451b6411a44019c870ad2 | 3,344 | py | Python | examples/pylab_examples/contour_image.py | yuvallanger/matplotlib | e0020d318a9a9685594c6bff4631f74599321459 | [
"MIT",
"BSD-3-Clause"
] | 8 | 2017-04-11T08:55:30.000Z | 2022-03-25T04:31:26.000Z | examples/pylab_examples/contour_image.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | null | null | null | examples/pylab_examples/contour_image.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | 14 | 2015-10-05T04:15:46.000Z | 2020-06-11T18:06:02.000Z | #!/usr/bin/env python
'''
Test combinations of contouring, filled contouring, and image plotting.
For contour labelling, see contour_demo.py.
The emphasis in this demo is on showing how to make contours register
correctly on images, and on how to get both of them oriented as
desired. In particular, note the usage of ... | 31.252336 | 78 | 0.662679 |
087a310c4fa6f298f4e80b65abcaf7f0935a3aeb | 2,997 | py | Python | AE/train_complex.py | Ali-Sahili/Background-Subtraction-Unsupervised-Learning | 445b2cf8736a4a28cff2b074a32afe8fe6986d53 | [
"MIT"
] | 5 | 2021-05-17T06:52:28.000Z | 2022-02-20T15:35:51.000Z | AE/train_complex.py | WN1695173791/Background-Subtraction-Unsupervised-Learning | 445b2cf8736a4a28cff2b074a32afe8fe6986d53 | [
"MIT"
] | null | null | null | AE/train_complex.py | WN1695173791/Background-Subtraction-Unsupervised-Learning | 445b2cf8736a4a28cff2b074a32afe8fe6986d53 | [
"MIT"
] | 1 | 2021-05-17T06:52:33.000Z | 2021-05-17T06:52:33.000Z | import torch
from torch import nn
import torchvision.utils as vutils
import pytorch_ssim
import numpy as np
from AE.Complex_Attention import *
from Param import *
from utils import weights_init
from Losses import *
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
def train(dataloader, print_epo... | 27 | 110 | 0.58959 |
087a4b82751d8cf3d156e971e1e9ab634eda8458 | 1,033 | py | Python | run_me.py | tmetsch/smart_home | 1d7dc743ce17363e3a08e40e5d87859f2312b320 | [
"MIT"
] | null | null | null | run_me.py | tmetsch/smart_home | 1d7dc743ce17363e3a08e40e5d87859f2312b320 | [
"MIT"
] | null | null | null | run_me.py | tmetsch/smart_home | 1d7dc743ce17363e3a08e40e5d87859f2312b320 | [
"MIT"
] | null | null | null | """
Main routines :)
"""
import logging
try:
import ConfigParser as configparser
except ImportError:
import configparser
from web import bottle_ssl
from web import wsgi_app
CFG = configparser.ConfigParser()
CFG.readfp(open('defaults.cfg'))
FORMAT = "%(asctime)s - %(filename)s - %(lineno)s - " \
"... | 24.023256 | 73 | 0.549855 |
087a568c31ac3ac31c01f7d2233002b77b743ee5 | 116 | py | Python | python/ray/rllib/agents/impala/__init__.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 29 | 2019-05-18T12:18:34.000Z | 2022-03-30T01:46:48.000Z | python/ray/rllib/agents/impala/__init__.py | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | 8 | 2019-08-15T05:42:10.000Z | 2021-05-21T09:41:15.000Z | python/ray/rllib/agents/impala/__init__.py | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | 8 | 2019-07-15T22:36:20.000Z | 2020-08-09T07:03:26.000Z | from ray.rllib.agents.impala.impala import ImpalaAgent, DEFAULT_CONFIG
__all__ = ["ImpalaAgent", "DEFAULT_CONFIG"]
| 29 | 70 | 0.801724 |
087a5716acd16829da8c76541b95eb9a26530aeb | 18,282 | py | Python | tests/test_utils_docs.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | 1 | 2020-04-15T16:10:27.000Z | 2020-04-15T16:10:27.000Z | tests/test_utils_docs.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | null | null | null | tests/test_utils_docs.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | null | null | null | """
Test utility functions from :module:`datacube.utils`
"""
import os
from pathlib import Path
from collections import OrderedDict
from types import SimpleNamespace
from typing import Tuple, Iterable
import numpy as np
import pytest
import toolz
from datacube.model import MetadataType
from datacube.model.utils imp... | 31.251282 | 115 | 0.593371 |
087a69a6403c33fd621d97bd065114f8380b9817 | 6,246 | py | Python | sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_stream_analytics_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_stream_analytics_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/streamanalytics/azure-mgmt-streamanalytics/azure/mgmt/streamanalytics/aio/_stream_analytics_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 52.487395 | 217 | 0.743036 |
087a93b4e583b8a63326169e5051e59345c475aa | 5,824 | py | Python | evaluation/runMain-One.py | kipronokoech/Mask-R-CNN-for-Fruit-Detection | 8604dc0c617711be336cb67b1b929b310d785942 | [
"MIT"
] | 1 | 2021-05-19T07:42:42.000Z | 2021-05-19T07:42:42.000Z | evaluation/runMain-One.py | kipronokoech/Mask-R-CNN-for-Fruit-Detection | 8604dc0c617711be336cb67b1b929b310d785942 | [
"MIT"
] | null | null | null | evaluation/runMain-One.py | kipronokoech/Mask-R-CNN-for-Fruit-Detection | 8604dc0c617711be336cb67b1b929b310d785942 | [
"MIT"
] | 1 | 2021-07-16T15:43:04.000Z | 2021-07-16T15:43:04.000Z | import os
import numpy as np
from matplotlib import pyplot as plt
import cv2 as cv
from MaskReconstruction import MaskConstruction
from Evaluation import MaskRCNN_Evaluation
import random
import json
import pandas as pd
# changing the font size in matplotlib
import matplotlib
font = {'weight' : 'normal',
'size... | 32.536313 | 106 | 0.721154 |
087ae1e81cf8ba274db82720b23a1270ee91fd2c | 2,620 | py | Python | tests/test_odeint_integrate_const.py | volpatto/pysodes | 48add3ce16ee48e2f3af7a928935f9b22d74d908 | [
"MIT"
] | 2 | 2020-11-16T08:28:51.000Z | 2021-03-09T07:29:11.000Z | tests/test_odeint_integrate_const.py | volpatto/pysodes | 48add3ce16ee48e2f3af7a928935f9b22d74d908 | [
"MIT"
] | null | null | null | tests/test_odeint_integrate_const.py | volpatto/pysodes | 48add3ce16ee48e2f3af7a928935f9b22d74d908 | [
"MIT"
] | 1 | 2021-03-09T07:29:15.000Z | 2021-03-09T07:29:15.000Z | import pytest
from pytest import approx
import numpy as np
from scipy.integrate import solve_ivp
from pysodes.odeint import integrate_const
def lotka_volterra(z, dzdt, t):
x, y = z
a = 1.5
b = 1.0
c = 3.0
d = 1.0
dzdt[0] = a*x - b*x*y
dzdt[1] = -c*y + d*x*y
return dzdt
def lotka_... | 24.259259 | 94 | 0.612214 |
087b1dfb8df9fb2f68d8bc85e2464f571eaaf291 | 5,287 | py | Python | scripts/run/gce/logger_daemon.py | karthiganesh/juliabox | 761d39c7f8f481bdb5bf1dc4011d4e267158e551 | [
"MIT"
] | 50 | 2016-09-09T02:17:09.000Z | 2022-03-15T17:16:20.000Z | scripts/run/gce/logger_daemon.py | wsshin/JuliaBox | 395df7654834f9671ab132cd29c02fb05ce42c27 | [
"MIT"
] | 58 | 2016-08-29T19:19:28.000Z | 2018-11-14T01:49:16.000Z | scripts/run/gce/logger_daemon.py | wsshin/JuliaBox | 395df7654834f9671ab132cd29c02fb05ce42c27 | [
"MIT"
] | 24 | 2016-09-27T18:20:54.000Z | 2022-01-02T09:37:44.000Z | #!/usr/bin/python
# Add the following to jbox.user
# 'cloud_host' : {
# ...,
# 'log-interval': 5, # seconds
# }
from time import sleep, time
import os
from os import stat
from sys import argv
import httplib
from socket import gethostname
from oauth2client.client import GoogleCredentials
from googleapiclient.... | 26.70202 | 83 | 0.575563 |
087b26197e8fb29da4935055651474026c85e31b | 9,770 | py | Python | src/indriya_msgs/python/heightmapgeom_pb2.py | praveenv4k/Indriya | a74a4b8bb9f04b5e858305769e892edfcab32df5 | [
"MIT"
] | 1 | 2017-07-12T15:30:58.000Z | 2017-07-12T15:30:58.000Z | src/indriya_msgs/python/heightmapgeom_pb2.py | praveenv4k/Indriya | a74a4b8bb9f04b5e858305769e892edfcab32df5 | [
"MIT"
] | null | null | null | src/indriya_msgs/python/heightmapgeom_pb2.py | praveenv4k/Indriya | a74a4b8bb9f04b5e858305769e892edfcab32df5 | [
"MIT"
] | 1 | 2016-03-09T12:34:19.000Z | 2016-03-09T12:34:19.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: heightmapgeom.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as ... | 40.708333 | 942 | 0.740942 |
087b41c52ebbbbbc74ff8c6284b7e358708b6aff | 8,923 | py | Python | test/test_bookmark.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 18 | 2018-04-19T08:30:48.000Z | 2022-02-14T11:00:27.000Z | test/test_bookmark.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 15 | 2018-04-22T00:52:41.000Z | 2021-07-05T10:16:38.000Z | test/test_bookmark.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 6 | 2018-04-22T00:14:12.000Z | 2021-12-06T01:42:07.000Z | #!/usr/bin/env python
# Copyright 2018 Jérôme Dumonteil
# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
#
# 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.apach... | 38.461207 | 81 | 0.61504 |
087b426e79fd5c0d0502931a000a43295ffa2c50 | 1,547 | py | Python | deepracing_py/plot_frame_rate.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 11 | 2020-06-29T15:21:37.000Z | 2021-04-12T00:42:26.000Z | deepracing_py/plot_frame_rate.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | null | null | null | deepracing_py/plot_frame_rate.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 4 | 2019-01-23T23:36:57.000Z | 2021-07-02T00:18:37.000Z | import numpy as np
import numpy.linalg as la
import scipy
import scipy.stats
import skimage
import PIL
from PIL import Image as PILImage
import TimestampedPacketMotionData_pb2
import PoseSequenceLabel_pb2
import TimestampedImage_pb2
import Vector3dStamped_pb2
import argparse
import os
import google.protobuf.json_format... | 34.377778 | 122 | 0.809955 |
087b43b364d66c350348ab74e14cd1227133d575 | 1,727 | py | Python | lightly/loss/barlow_twins_loss.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | 1 | 2021-06-23T07:31:26.000Z | 2021-06-23T07:31:26.000Z | lightly/loss/barlow_twins_loss.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | null | null | null | lightly/loss/barlow_twins_loss.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | null | null | null | import torch
class BarlowTwinsLoss(torch.nn.Module):
"""Implementation of the Barlow Twins Loss from Barlow Twins[0] paper.
This code specifically implements the Figure Algorithm 1 from [0].
[0] Zbontar,J. et.al, 2021, Barlow Twins... https://arxiv.org/abs/2103.03230
Examples:
>>> # initi... | 30.839286 | 80 | 0.572669 |
087b4ba9d0509572781799392a41edac71688f3b | 6,350 | py | Python | apis/routes/groupme_bot.py | ericsotack/beachballbot | 38e9d9af47d25613e91a5a0422673f0c404e651a | [
"Apache-2.0"
] | 1 | 2020-07-16T11:53:04.000Z | 2020-07-16T11:53:04.000Z | apis/routes/groupme_bot.py | ericsotack/beachballbot | 38e9d9af47d25613e91a5a0422673f0c404e651a | [
"Apache-2.0"
] | 2 | 2020-08-10T23:01:32.000Z | 2020-08-12T01:33:01.000Z | apis/routes/groupme_bot.py | ericsotack/beachballbot | 38e9d9af47d25613e91a5a0422673f0c404e651a | [
"Apache-2.0"
] | null | null | null | import json
import os
import requests
from flask import Flask, g, request
from flask_restx import Namespace, Resource
from apis.routes import db
from questions_core import util
from questions_core import bot_helper as bh
""" URL to post message sends back to """
POST_URL = "https://api.groupme.com/v3/bots/post"
"""... | 35.47486 | 115 | 0.700472 |
087b6de5296bae58880c596f5eefb2064f03b2ad | 7,229 | py | Python | retrobiocat_web/analysis/queue_auto_jobs.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 9 | 2020-12-01T16:33:02.000Z | 2022-01-19T20:02:42.000Z | retrobiocat_web/analysis/queue_auto_jobs.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 4 | 2020-10-02T14:38:32.000Z | 2021-08-02T09:23:58.000Z | retrobiocat_web/analysis/queue_auto_jobs.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 6 | 2021-01-14T07:48:36.000Z | 2022-03-20T17:34:27.000Z | from retrobiocat_web.mongo.models.biocatdb_models import EnzymeType, SSN_record, UniRef50, Sequence
from retrobiocat_web.analysis import embl_restfull
from flask import current_app
from retrobiocat_web.analysis import ssn_tasks
from redis import Redis
from rq import Queue
from rq.registry import ScheduledJobRegistry
fr... | 46.339744 | 141 | 0.689169 |
087b7192a6d5860962eb55e8ff8ade589de3fed4 | 3,969 | py | Python | src/sardana/test/testsuite.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/test/testsuite.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/test/testsuite.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... | 31.5 | 80 | 0.64903 |
087b8b21729ed2ccecb01e20d96cb2d910a096a5 | 4,782 | py | Python | txriakdb/bucket.py | lunay001/txriakdb | 9e935aef32020de684dcd415bce24888bdcf9c59 | [
"Unlicense"
] | null | null | null | txriakdb/bucket.py | lunay001/txriakdb | 9e935aef32020de684dcd415bce24888bdcf9c59 | [
"Unlicense"
] | null | null | null | txriakdb/bucket.py | lunay001/txriakdb | 9e935aef32020de684dcd415bce24888bdcf9c59 | [
"Unlicense"
] | null | null | null | '''
Created on 2013-04-03
@author: Noobie
This module allows you to run commands based on the riak-recommended operation
documentation.
@todo: Implement BSON for optimization of JSON.
@see: http://docs.basho.com/riak/1.2.1/tutorials/querying/Riak-Search/
@see: http://docs.basho.com/riak/1.2.1/tutorials/querying/S... | 27.802326 | 86 | 0.624634 |
087bb76398114834477828046b3bc5b7dff2a725 | 92 | py | Python | web/user/__init__.py | syqu22/flask_pastebin_sample | a6456b0e679cf9872395ba68ac2c341de20fcc52 | [
"MIT"
] | 1 | 2022-01-22T00:27:27.000Z | 2022-01-22T00:27:27.000Z | web/user/__init__.py | syqu22/flask_pastebin_sample | a6456b0e679cf9872395ba68ac2c341de20fcc52 | [
"MIT"
] | null | null | null | web/user/__init__.py | syqu22/flask_pastebin_sample | a6456b0e679cf9872395ba68ac2c341de20fcc52 | [
"MIT"
] | null | null | null | from flask import Blueprint
bp = Blueprint("users", __name__)
from web.user import routes
| 15.333333 | 33 | 0.771739 |
087bc1b01190bd1e36ca41b1fc77196b21ef9367 | 2,816 | py | Python | src/backoffice/views/backoffice.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 7 | 2017-04-14T15:28:29.000Z | 2021-09-10T09:45:38.000Z | src/backoffice/views/backoffice.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 799 | 2016-04-28T09:31:50.000Z | 2022-03-29T09:05:02.000Z | src/backoffice/views/backoffice.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 35 | 2016-04-28T09:23:53.000Z | 2021-05-02T12:36:01.000Z | import logging
import requests
from django.conf import settings
from django.http import Http404, HttpResponse
from django.views.generic import TemplateView
from camps.mixins import CampViewMixin
from facilities.models import FacilityFeedback
from teams.models import Team
from utils.models import OutgoingEmail
from .... | 35.64557 | 119 | 0.677202 |
087bd404199f25fc7c4cc437a940a6820d935861 | 320 | py | Python | examples/models/template_model_with_feedback/ModelWithFeedback.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | 1 | 2021-06-14T12:58:38.000Z | 2021-06-14T12:58:38.000Z | examples/models/template_model_with_feedback/ModelWithFeedback.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | 22 | 2020-02-20T15:27:01.000Z | 2022-02-10T01:26:52.000Z | examples/models/template_model_with_feedback/ModelWithFeedback.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | null | null | null |
class ModelWithFeedback(object):
def __init__(self):
print("Initialising")
def predict(self,X,features_names):
print("Predict called")
return X
def send_feedback(self,features,feature_names,reward,truth,routing=None):
print("Send feedback called")
return []
| 20 | 77 | 0.64375 |
087be9760697e4f6c3a4fcd6062f9694c7fbe564 | 4,244 | py | Python | tests/smoke/test_issues_general.py | yandex/yandex_tracker_clien | 2d241197b5832e10e7c9a4d3ee0af7b737a613ba | [
"BSD-3-Clause"
] | 17 | 2019-07-25T10:45:33.000Z | 2022-03-11T22:11:53.000Z | tests/smoke/test_issues_general.py | yandex/yandex_tracker_clien | 2d241197b5832e10e7c9a4d3ee0af7b737a613ba | [
"BSD-3-Clause"
] | 4 | 2019-11-04T09:10:15.000Z | 2022-01-04T23:20:00.000Z | tests/smoke/test_issues_general.py | yandex/yandex_tracker_clien | 2d241197b5832e10e7c9a4d3ee0af7b737a613ba | [
"BSD-3-Clause"
] | 8 | 2019-10-23T03:28:07.000Z | 2021-04-15T13:52:00.000Z | # coding: utf-8
import pytest
from yandex_tracker_client import exceptions
from common.url import api_url
@pytest.mark.parametrize('issue_field', ['key', 'version', 'summary',
'description', 'queue', 'status',
'type', 'createdAt', 'up... | 32.899225 | 85 | 0.662582 |
087bedde4e5ae5d95a61f4710fdbd3062f78d361 | 33,898 | py | Python | supriya/realtime/servers.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/realtime/servers.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/realtime/servers.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import asyncio
import logging
import re
import threading
from typing import Set
from uqbar.objects import new
import supriya.exceptions
from supriya import scsynth
from supriya.commands import ( # type: ignore
FailResponse,
GroupNewRequest,
GroupQueryTreeRequest,
NotifyRequest,
QuitRequest,
S... | 31.070577 | 88 | 0.57496 |
087bfc2b7e76a9966031ef86fbc3b61eb4c335eb | 425 | py | Python | setup.py | PyUnchained/kdr_server | 7485d6a549b0458438c5c9aa882de87084c43c76 | [
"MIT"
] | null | null | null | setup.py | PyUnchained/kdr_server | 7485d6a549b0458438c5c9aa882de87084c43c76 | [
"MIT"
] | null | null | null | setup.py | PyUnchained/kdr_server | 7485d6a549b0458438c5c9aa882de87084c43c76 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
setup(name='kivy-django-restful-server',
version='0.0.1',
description='Django-side Restful API Utilities for Kivy',
author='Tatenda Tambo',
author_email='tatendatambo@gmail.com',
packages=['kivy_django_restful'],
install_requir... | 32.692308 | 92 | 0.68 |
087c195a70fe5a17e0708bd42a72009c6fc5a470 | 8,603 | py | Python | osgar/drivers/lora.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 12 | 2017-02-16T10:22:59.000Z | 2022-03-20T05:48:06.000Z | osgar/drivers/lora.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 618 | 2016-08-30T04:46:12.000Z | 2022-03-25T16:03:10.000Z | osgar/drivers/lora.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 11 | 2016-08-27T20:02:55.000Z | 2022-03-07T08:53:53.000Z | """
LoRa - Long Range Radio
This module handles communication with LoRa devices and automatic re-transmission
of received messages so that all robots work as re-transmission stations.
The messages have limited size 40 bytes.
At the moment driver supports only transmission of "pose2d" messages so the control... | 39.283105 | 121 | 0.591654 |
087c2ac9331347588c5e5d8d51a4223bc9950f66 | 4,470 | py | Python | temboardagent/plugins/pgconf/filemgmt.py | tilkow/temboard-agent | b8bf296454db68a85996f49fb6c684d57efa028a | [
"PostgreSQL"
] | null | null | null | temboardagent/plugins/pgconf/filemgmt.py | tilkow/temboard-agent | b8bf296454db68a85996f49fb6c684d57efa028a | [
"PostgreSQL"
] | null | null | null | temboardagent/plugins/pgconf/filemgmt.py | tilkow/temboard-agent | b8bf296454db68a85996f49fb6c684d57efa028a | [
"PostgreSQL"
] | null | null | null | import os.path
from os import listdir
import datetime
from ...errors import HTTPError
class ConfigurationFileManager:
@classmethod
def get_file_content(self, filepath, version=None):
return read_file_content(filepath, version)
@classmethod
def save_file_content(self, filepath, filecontent, ... | 33.111111 | 78 | 0.611409 |
087c382640a538ba99e0706e5a6206e352e639d9 | 6,404 | py | Python | det/maskrcnn_benchmark/modeling/roi_heads/mask_head/roi_mask_feature_extractors.py | megvii-model/MABN | db1ef7bc396c8aa6f4eec9e3c5875d73f74da3de | [
"MIT"
] | 182 | 2020-01-18T17:00:48.000Z | 2022-01-17T09:18:22.000Z | det/maskrcnn_benchmark/modeling/roi_heads/mask_head/roi_mask_feature_extractors.py | megvii-model/MABN | db1ef7bc396c8aa6f4eec9e3c5875d73f74da3de | [
"MIT"
] | 5 | 2020-01-24T09:12:14.000Z | 2020-05-12T07:56:28.000Z | det/maskrcnn_benchmark/modeling/roi_heads/mask_head/roi_mask_feature_extractors.py | megvii-model/MABN | db1ef7bc396c8aa6f4eec9e3c5875d73f74da3de | [
"MIT"
] | 25 | 2020-01-19T10:27:48.000Z | 2021-08-09T03:12:31.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from torch import nn
from torch.nn import functional as F
from ..box_head.roi_box_feature_extractors import ResNet50Conv5ROIFeatureExtractor
from maskrcnn_benchmark.modeling import registry
from maskrcnn_benchmark.modeling.poolers import Pooler
fr... | 35.381215 | 83 | 0.668176 |
087c4fa90f72197eccfa418bcc83353fc39ae7c2 | 111,592 | py | Python | calendarserver/tools/calverify.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | calendarserver/tools/calverify.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | calendarserver/tools/calverify.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- test-case-name: calendarserver.tools.test.test_calverify -*-
##
# Copyright (c) 2011-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Lice... | 40.831321 | 184 | 0.57807 |
087c7517284077484c85de0f003b0db9c0c6a75e | 521 | py | Python | routes1846/tokens.py | Auzzy/1846-routes | 6d3112738996a3a1955fe6749168e4cf04c106e1 | [
"MIT"
] | 5 | 2018-11-23T14:03:32.000Z | 2020-07-08T15:26:39.000Z | routes1846/tokens.py | Auzzy/1846-routes | 6d3112738996a3a1955fe6749168e4cf04c106e1 | [
"MIT"
] | null | null | null | routes1846/tokens.py | Auzzy/1846-routes | 6d3112738996a3a1955fe6749168e4cf04c106e1 | [
"MIT"
] | null | null | null | class Token(object):
def __init__(self, cell, railroad):
self.cell = cell
self.railroad = railroad
class Station(Token):
pass
class PrivateCompanyToken(Token):
def __init__(self, cell, railroad):
if railroad.is_removed:
raise ValueError("A removed railroad cannot place ... | 26.05 | 115 | 0.694818 |
087c7a99e2ab1d4207209ebfae8b9bc0fb6fdb05 | 3,158 | py | Python | test_filters.py | ignaciodsimon/optimised_biquad_filter | 0d85dc42033e767eeb55107e72dba98417377686 | [
"MIT"
] | null | null | null | test_filters.py | ignaciodsimon/optimised_biquad_filter | 0d85dc42033e767eeb55107e72dba98417377686 | [
"MIT"
] | null | null | null | test_filters.py | ignaciodsimon/optimised_biquad_filter | 0d85dc42033e767eeb55107e72dba98417377686 | [
"MIT"
] | null | null | null | """
This script is used to test both implementations of
the biquad filter and measure their time performance.
Joe Simon 2018.
"""
import biquad_filter_optimised
import biquad_filter_original
import numpy
import matplotlib.pyplot as plot
import time
if __name__ == '__main__':
_sampleRate = 48000.0
... | 43.861111 | 174 | 0.708676 |
087cd03f5754b573cfd1817bd2f94ea68ab56441 | 705 | py | Python | pili/entrypoints/celery.py | pilosus/pili | 8eb51e79420b7a2e4148f3b819e787cf6711e8cd | [
"MIT"
] | 2 | 2019-12-22T13:05:08.000Z | 2020-02-02T13:05:31.000Z | pili/entrypoints/celery.py | pilosus/pili | 8eb51e79420b7a2e4148f3b819e787cf6711e8cd | [
"MIT"
] | 71 | 2016-10-31T15:41:10.000Z | 2022-03-21T14:26:22.000Z | pili/entrypoints/celery.py | pilosus/pili | 8eb51e79420b7a2e4148f3b819e787cf6711e8cd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Celery worker to be run as follows:
(venv) $ celery worker -A pili.entrypoints.celery.celery --loglevel=info
Environment variables (such as MAIL_SERVER, MAIL_USERNAME, etc.)
should be set using export:
(venv) $ export MAIL_SERVER=smtp.youserver.com
'export' keyword in bash sets a variable t... | 27.115385 | 72 | 0.77305 |
087ce5216fde7756f04c26000369c877d356d8c4 | 4,232 | py | Python | alipay/aop/api/domain/AlipayMarketingVoucherSendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayMarketingVoucherSendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayMarketingVoucherSendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayMarketingVoucherSendModel(object):
def __init__(self):
self._amount = None
self._extend_info = None
self._login_id = None
self._memo = None
self._out... | 28.986301 | 73 | 0.570416 |
087ce76be948a775c5df6b0258db231f369c2d2b | 14,345 | py | Python | gaphor/storage/storage.py | Xander982/gaphor | b5c55fa18b79b80d9c14ee0cb0ce8a9963e90f86 | [
"Apache-2.0"
] | null | null | null | gaphor/storage/storage.py | Xander982/gaphor | b5c55fa18b79b80d9c14ee0cb0ce8a9963e90f86 | [
"Apache-2.0"
] | null | null | null | gaphor/storage/storage.py | Xander982/gaphor | b5c55fa18b79b80d9c14ee0cb0ce8a9963e90f86 | [
"Apache-2.0"
] | null | null | null | """
Load and save Gaphor models to Gaphors own XML format.
Three functions are exported:
load(filename)
load a model from a file
save(filename)
store the current model in a file
"""
__all__ = ["load", "save"]
import gc
import io
import logging
import os.path
import uuid
import gaphas
from gaphor import app... | 33.91253 | 96 | 0.609759 |
087cfac226b850557e4a1f47dcb530ef48ba24c8 | 2,502 | py | Python | operative/models/__init__.py | buzzfeed/python-operative | ec9eb0943fbc3911ee7bda22688e56116bc04521 | [
"MIT"
] | null | null | null | operative/models/__init__.py | buzzfeed/python-operative | ec9eb0943fbc3911ee7bda22688e56116bc04521 | [
"MIT"
] | null | null | null | operative/models/__init__.py | buzzfeed/python-operative | ec9eb0943fbc3911ee7bda22688e56116bc04521 | [
"MIT"
] | null | null | null | import datetime
from pprint import pformat
ATTR_AS_INT = lambda x: int(x)
ATTR_AS_FLOAT = lambda x: float(x)
ATTR_AS_DATETIME = lambda x: datetime.datetime.strptime(x, '%Y-%m-%d')
class OperativeModel(object):
"""
Parent class for all operative models
"""
def __init__(self, report_row):
at... | 28.431818 | 106 | 0.526779 |
087d4bab8368a20867dfa87c4ca41190728a3796 | 274 | py | Python | mlab_api/app.py | m-lab/mlab-vis-api | 2368d88223148bf73d83c62d285fb458558619e0 | [
"MIT"
] | 1 | 2017-09-05T14:52:11.000Z | 2017-09-05T14:52:11.000Z | mlab_api/app.py | m-lab/mlab-vis-api | 2368d88223148bf73d83c62d285fb458558619e0 | [
"MIT"
] | 9 | 2017-09-14T15:30:02.000Z | 2019-03-05T18:35:20.000Z | mlab_api/app.py | m-lab/mlab-vis-api | 2368d88223148bf73d83c62d285fb458558619e0 | [
"MIT"
] | 3 | 2017-06-01T16:01:37.000Z | 2017-10-24T22:44:47.000Z | # -*- coding: utf-8 -*-
'''
App Entry Point
'''
from __future__ import print_function
from flask import Flask
app = Flask(__name__) #pylint: disable=C0103
app.config.from_object('config')
app.config.SWAGGER_UI_DOC_EXPANSION = 'list'
app.config['RESTPLUS_VALIDATE'] = True
| 21.076923 | 44 | 0.744526 |
087d5aec02f216d1a7f1d6744f31a4eb02906f44 | 3,821 | py | Python | nixstatsagent/plugins/system.py | darthShadow/nixstatsagent | fda601f0e2cad52db4cf36dd055285d6549aacfa | [
"BSD-3-Clause"
] | null | null | null | nixstatsagent/plugins/system.py | darthShadow/nixstatsagent | fda601f0e2cad52db4cf36dd055285d6549aacfa | [
"BSD-3-Clause"
] | null | null | null | nixstatsagent/plugins/system.py | darthShadow/nixstatsagent | fda601f0e2cad52db4cf36dd055285d6549aacfa | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
import netifaces
except ImportError:
netifaces = None
import os
import platform
from subprocess import Popen, PIPE
import sys
import time
import psutil
import plugins
def systemCommand(Command, newlines=True):
Output = ""
Error = ""
try:
#... | 35.37963 | 105 | 0.542266 |
087d5c7cfcbb894f7852fdd8ff155443d83b8d28 | 12,752 | py | Python | mtr/sync/migrations/0001_initial.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | mtr/sync/migrations/0001_initial.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | mtr/sync/migrations/0001_initial.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-20 13:16
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import mtr.sync.lib.exceptions
import mtr.sync.settings
class Migration(migrations.Migration):
in... | 76.819277 | 333 | 0.642017 |
087d71147915d334554d52b81185c8923fdb2946 | 1,239 | py | Python | scripts/fb/cloneGraph.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/fb/cloneGraph.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/fb/cloneGraph.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | """
# Definition for a Node.
class Node(object):
def __init__(self, val, neighbors):
self.val = val
self.neighbors = neighbors
"""
class Solution(object):
def __init__(self):
# Dictionary to save the visited node and it's respective clone
# as key and value respectively. This he... | 30.975 | 80 | 0.610169 |
087d728b3c62a4ca9e75111033b977e8416a8130 | 885 | py | Python | plan2explore/__init__.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 189 | 2020-05-13T01:12:03.000Z | 2022-03-23T01:38:56.000Z | plan2explore/__init__.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 13 | 2020-05-12T22:51:07.000Z | 2022-03-12T00:28:47.000Z | plan2explore/__init__.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 24 | 2020-05-14T03:47:50.000Z | 2021-09-26T04:20:36.000Z | # Copyright 2019 The Dreamer Authors. Copyright 2020 Plan2Explore 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... | 35.4 | 95 | 0.783051 |
087d790871450afcba5b1731a6dd4502db715051 | 2,860 | py | Python | tests/test_services.py | Birjot-Bala/poe-helper | 7a03fe2fd99648bd8b2e9d7155d68fdd025bff5d | [
"MIT"
] | 1 | 2020-10-20T10:18:24.000Z | 2020-10-20T10:18:24.000Z | tests/test_services.py | Birjot-Bala/poe-helper | 7a03fe2fd99648bd8b2e9d7155d68fdd025bff5d | [
"MIT"
] | 2 | 2020-08-01T22:51:00.000Z | 2020-10-18T02:41:57.000Z | tests/test_services.py | Birjot-Bala/poe-helper | 7a03fe2fd99648bd8b2e9d7155d68fdd025bff5d | [
"MIT"
] | null | null | null | # test_services.py
import requests
import json
from pathlib import Path
import pytest
import poe_helper.services as se
data_folder = Path("tests/data/")
# mock response class
class MockResponse():
def __init__(self, json_path):
self.path = json_path
@staticmethod
def status_code():
re... | 27.5 | 80 | 0.61049 |
087d800b50b500244ceb3247be549518e7938f33 | 25,363 | py | Python | covsirphy/cleaning/pcr_data.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | null | null | null | covsirphy/cleaning/pcr_data.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | null | null | null | covsirphy/cleaning/pcr_data.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pathlib import Path
import numpy as np
import pandas as pd
from dask import dataframe as dd
from covsirphy.util.plotting import line_plot
from covsirphy.util.error import PCRIncorrectPreconditionError, SubsetNotFoundError
from covsirphy.cleaning.cbase import CleaningB... | 42.06136 | 123 | 0.596302 |
087da0400c9d30370bb20814ea7c359fbdd31ad2 | 5,599 | py | Python | leetcode_python/Tree/k-empty-slots.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Tree/k-empty-slots.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Tree/k-empty-slots.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
# http://bookshadow.com/weblog/2017/09/24/leetcode-k-empty-slots/
LeetCode 683. K Empty Slots
There is a garden with N slots. In each slot, there is a flower. The N flowers will bloom one by one in N days. In each day, there will be exactly one flower blooming and it will be in the status of blooming since then.... | 29.781915 | 219 | 0.515271 |
087da6d8589e6c13bd02b881043a6d87e0b74266 | 37 | py | Python | dask_kubernetes/helm/__init__.py | ddelange/dask-kubernetes | 42bcf9817ea963bf048f9dd06caec1622656302a | [
"BSD-3-Clause"
] | 12 | 2018-02-13T16:45:21.000Z | 2018-03-05T08:18:55.000Z | dask_kubernetes/helm/__init__.py | ddelange/dask-kubernetes | 42bcf9817ea963bf048f9dd06caec1622656302a | [
"BSD-3-Clause"
] | 22 | 2018-01-03T03:31:43.000Z | 2018-02-05T20:24:49.000Z | dask_kubernetes/helm/__init__.py | ddelange/dask-kubernetes | 42bcf9817ea963bf048f9dd06caec1622656302a | [
"BSD-3-Clause"
] | 2 | 2018-01-03T03:28:18.000Z | 2018-01-15T11:30:25.000Z | from .helmcluster import HelmCluster
| 18.5 | 36 | 0.864865 |
087db014de5b3253e2f099d10d856750e5bb8e0d | 179,846 | py | Python | pandas/core/indexes/base.py | chrisdonlan/pandas | af4e2ce19c9c0b89db4bc06d7730b68068c6aeae | [
"BSD-3-Clause"
] | null | null | null | pandas/core/indexes/base.py | chrisdonlan/pandas | af4e2ce19c9c0b89db4bc06d7730b68068c6aeae | [
"BSD-3-Clause"
] | null | null | null | pandas/core/indexes/base.py | chrisdonlan/pandas | af4e2ce19c9c0b89db4bc06d7730b68068c6aeae | [
"BSD-3-Clause"
] | null | null | null | from datetime import datetime
import operator
from textwrap import dedent
from typing import Dict, FrozenSet, Hashable, Optional, Union
import warnings
import numpy as np
from pandas._libs import algos as libalgos, index as libindex, lib
import pandas._libs.join as libjoin
from pandas._libs.lib import is_datetime_arr... | 32.317341 | 88 | 0.559823 |
087de526d114e3aeb3c58a265146d1c24969510c | 1,037 | py | Python | piwik/setup.py | mic4ael/indico-plugins | d96f5fa6b76beba77e4dd02a90548f6a012324f2 | [
"MIT"
] | null | null | null | piwik/setup.py | mic4ael/indico-plugins | d96f5fa6b76beba77e4dd02a90548f6a012324f2 | [
"MIT"
] | null | null | null | piwik/setup.py | mic4ael/indico-plugins | d96f5fa6b76beba77e4dd02a90548f6a012324f2 | [
"MIT"
] | null | null | null | # This file is part of the Indico plugins.
# Copyright (C) 2002 - 2020 CERN
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from __future__ import unicode_literals
from setuptools import find_packages... | 29.628571 | 87 | 0.681774 |
087e00fdda11d3f8b0b1c632535b2dced4015cc4 | 894 | py | Python | seamo/preproc/convert_dynamodb_driver.py | amandalynne/Seattle-Mobility-Index | f21d2fa6913ce9474aedc298e9e4a6e7c9390e64 | [
"MIT"
] | 3 | 2018-08-20T18:34:03.000Z | 2018-10-02T23:41:52.000Z | seamo/preproc/convert_dynamodb_driver.py | amandalynne/Seattle-Mobility-Index | f21d2fa6913ce9474aedc298e9e4a6e7c9390e64 | [
"MIT"
] | null | null | null | seamo/preproc/convert_dynamodb_driver.py | amandalynne/Seattle-Mobility-Index | f21d2fa6913ce9474aedc298e9e4a6e7c9390e64 | [
"MIT"
] | 1 | 2018-10-02T23:42:24.000Z | 2018-10-02T23:42:24.000Z | import init
import pandas as pd
import convert_dynamodb
import data_accessor as daq
import constants as cn
driving = convert_dynamodb.ConvertDynamodbDriving()
car = driving.dataframe
driving.write_to_csv(car, cn.GOOGLE_DIST_MATRIX_OUT + '_driving')
print('driving done')
transit = convert_dynamodb.ConvertDynamodbTrans... | 29.8 | 67 | 0.802013 |
087e0d7412d0baa11d50af1c665c5767c32b1ed6 | 544 | py | Python | neural_network_model/neural_predict.py | 3ANov/salary_predict_trudohack | 634d962e8a318741ec8570954c7ca3531749dde4 | [
"MIT"
] | null | null | null | neural_network_model/neural_predict.py | 3ANov/salary_predict_trudohack | 634d962e8a318741ec8570954c7ca3531749dde4 | [
"MIT"
] | 1 | 2020-07-05T17:47:49.000Z | 2020-07-05T17:47:49.000Z | neural_network_model/neural_predict.py | 3ANov/salary_predict_trudohack | 634d962e8a318741ec8570954c7ca3531749dde4 | [
"MIT"
] | null | null | null | import pickle
import re
from neural_network_model.neural_model import NeuralModel
TOKEN_RE = re.compile(r'[\w\d]+')
def tokenize_text_simple_regex(txt, min_token_size=4):
""" This func tokenize text with TOKEN_RE applied ealier """
txt = txt.lower()
all_tokens = TOKEN_RE.findall(txt)
return [token f... | 30.222222 | 96 | 0.75 |
087e4ef27cfd1a0d9663cd302349076576e0815e | 2,699 | py | Python | functioning_implementations/original ppo1/mlp_policy.py | DDTR/learning_task2 | 3a235edb6515d1c83dee996d90df7da11661fb61 | [
"CNRI-Python"
] | null | null | null | functioning_implementations/original ppo1/mlp_policy.py | DDTR/learning_task2 | 3a235edb6515d1c83dee996d90df7da11661fb61 | [
"CNRI-Python"
] | null | null | null | functioning_implementations/original ppo1/mlp_policy.py | DDTR/learning_task2 | 3a235edb6515d1c83dee996d90df7da11661fb61 | [
"CNRI-Python"
] | null | null | null | # Copyright (c) 2020 Max Planck Gesellschaft
from baselines.common.mpi_running_mean_std import RunningMeanStd
import baselines.common.tf_util as U
import tensorflow as tf
import gym
from baselines.common.distributions import make_pdtype
class MlpPolicy(object):
recurrent = False
def __init__(self, name, *args... | 43.532258 | 126 | 0.653946 |
087e7c10c7bb6b15fbdde8b18057dbc868075116 | 11,390 | py | Python | ibis/tests/all/test_vectorized_udf.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | null | null | null | ibis/tests/all/test_vectorized_udf.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | null | null | null | ibis/tests/all/test_vectorized_udf.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | null | null | null | import pytest
import ibis
import ibis.common.exceptions as com
import ibis.expr.datatypes as dt
from ibis.expr.window import window
from ibis.tests.backends import Dask, Pandas, PySpark
from ibis.udf.vectorized import analytic, elementwise, reduction
pytestmark = pytest.mark.udf
@elementwise(input_type=[dt.double],... | 30.951087 | 79 | 0.671993 |
087ea8895a7dc9c3e321e532f6326568e184f443 | 2,026 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/channel_messages_filter_empty.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/channel_messages_filter_empty.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/channel_messages_filter_empty.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 31.65625 | 103 | 0.639191 |
087eba18e29ba973aac44dec4a9496eae7c78ead | 364 | py | Python | src/pandas_profiling_study/report/presentation/core/table.py | lucasiscoviciMoon/pandas-profiling-study | 142d3b0f5e3139cdb531819f637a407682fa5684 | [
"MIT"
] | null | null | null | src/pandas_profiling_study/report/presentation/core/table.py | lucasiscoviciMoon/pandas-profiling-study | 142d3b0f5e3139cdb531819f637a407682fa5684 | [
"MIT"
] | null | null | null | src/pandas_profiling_study/report/presentation/core/table.py | lucasiscoviciMoon/pandas-profiling-study | 142d3b0f5e3139cdb531819f637a407682fa5684 | [
"MIT"
] | 1 | 2020-04-25T15:20:39.000Z | 2020-04-25T15:20:39.000Z | from typing import Any
from ....report.presentation.abstract.item_renderer import ItemRenderer
class Table(ItemRenderer):
def __init__(self, rows, name=None, **kwargs):
super().__init__("table", {"rows": rows, "name": name}, **kwargs)
def __repr__(self):
return "Table"
def render(self) ... | 24.266667 | 73 | 0.662088 |
087ec14fcc37587abb5314681a1819d9b8255ba9 | 3,217 | py | Python | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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 ... | 48.014925 | 130 | 0.702829 |
087ec2424fbb9c980a44d4645cb4659f3bfb0d3e | 733 | py | Python | tests/conftest.py | chrispyles/fica | 7c1739d0d5dae0e2f847b901b0968f484d6b097b | [
"MIT"
] | null | null | null | tests/conftest.py | chrispyles/fica | 7c1739d0d5dae0e2f847b901b0968f484d6b097b | [
"MIT"
] | null | null | null | tests/conftest.py | chrispyles/fica | 7c1739d0d5dae0e2f847b901b0968f484d6b097b | [
"MIT"
] | null | null | null | """pytest configurations for fica's tests"""
import pytest
from typing import List
from fica import Config, Key
@pytest.fixture
def sample_keys() -> List[Key]:
"""
A pytest fixture for generating a list of sample ``Key`` objects.
"""
return [
Key("foo"),
Key("bar", subkeys=[Key("baz... | 24.433333 | 70 | 0.620737 |
087ecd5e7c49347ca82f60f73a23234679642b00 | 24,026 | py | Python | lib/tests/streamlit/data_frame_proto_test.py | deepchatterjeevns/streamlit | 631d42877bd16bdec14ee124c936917b430f6ce4 | [
"Apache-2.0"
] | 4 | 2019-11-10T13:50:56.000Z | 2020-01-07T21:02:29.000Z | lib/tests/streamlit/data_frame_proto_test.py | IliaLarchenko/streamlit | 9cdf4851148a43e4e0431d7633c5a5d729e5b1e3 | [
"Apache-2.0"
] | 4 | 2021-05-09T11:42:18.000Z | 2022-02-27T10:59:36.000Z | lib/tests/streamlit/data_frame_proto_test.py | IliaLarchenko/streamlit | 9cdf4851148a43e4e0431d7633c5a5d729e5b1e3 | [
"Apache-2.0"
] | 1 | 2019-11-26T09:37:57.000Z | 2019-11-26T09:37:57.000Z | # -*- coding: utf-8 -*-
# Copyright 2018-2019 Streamlit 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 applicabl... | 34.322857 | 87 | 0.638766 |
087edc7f1774685a5f3e0ca3fdcd505b6d34f58b | 567 | py | Python | tests/urls.py | mohabusama/django-arakoon-cache | 281c07fb83a079c7ea0d4d71d97ce9b32d55b940 | [
"MIT"
] | null | null | null | tests/urls.py | mohabusama/django-arakoon-cache | 281c07fb83a079c7ea0d4d71d97ce9b32d55b940 | [
"MIT"
] | 3 | 2020-02-11T21:59:39.000Z | 2021-06-10T17:36:56.000Z | tests/urls.py | mohabusama/django-arakoon-cache | 281c07fb83a079c7ea0d4d71d97ce9b32d55b940 | [
"MIT"
] | null | null | null | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns(
'',
# Examples:
# url(r'^$', 'tests.views.home', name='home'),
# url(r'^tests/', include('tests.foo.urls'))... | 29.842105 | 71 | 0.671958 |
087f326544d204e8f434a8f0ad7c0a8ae7c7bd2b | 62 | py | Python | modules/rapids_modules/dataloader/stockMap.py | goosen78/gQuant | cc0bff4ac524ccfbe8097acd647a8b3fad5fe578 | [
"Apache-2.0"
] | 1 | 2021-12-24T06:24:21.000Z | 2021-12-24T06:24:21.000Z | modules/rapids_modules/dataloader/stockMap.py | goosen78/gQuant | cc0bff4ac524ccfbe8097acd647a8b3fad5fe578 | [
"Apache-2.0"
] | null | null | null | modules/rapids_modules/dataloader/stockMap.py | goosen78/gQuant | cc0bff4ac524ccfbe8097acd647a8b3fad5fe578 | [
"Apache-2.0"
] | 2 | 2021-11-02T09:14:59.000Z | 2022-01-05T21:43:47.000Z | class StockMap(object):
def __init__(self):
pass
| 12.4 | 23 | 0.612903 |
087f39c33dcb65fadcc37c53196ee196a6d68524 | 2,326 | py | Python | examples/drag_points.py | silky/mpld3 | 12151b57d8f245c3538f3c19e34d71caf8e65a59 | [
"BSD-3-Clause"
] | 1 | 2019-06-27T11:33:38.000Z | 2019-06-27T11:33:38.000Z | examples/drag_points.py | silky/mpld3 | 12151b57d8f245c3538f3c19e34d71caf8e65a59 | [
"BSD-3-Clause"
] | null | null | null | examples/drag_points.py | silky/mpld3 | 12151b57d8f245c3538f3c19e34d71caf8e65a59 | [
"BSD-3-Clause"
] | null | null | null | """
Draggable Points Example
========================
This example shows how a D3 plugin can be created to make plot elements
draggable. A stopPropagation command is used to allow the drag behavior
and pan/zoom behavior to work in tandem.
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
... | 28.365854 | 77 | 0.55288 |
087f6611551fed75263f9da2c7307d9529c70d8f | 8,637 | py | Python | src/hi_getter/events.py | Cubicpath/HaloInfiniteGetter | 5c1e0c77e1e56d1679dce3835e432fea40239135 | [
"MIT"
] | null | null | null | src/hi_getter/events.py | Cubicpath/HaloInfiniteGetter | 5c1e0c77e1e56d1679dce3835e432fea40239135 | [
"MIT"
] | 6 | 2022-02-14T16:11:09.000Z | 2022-03-30T22:33:39.000Z | src/hi_getter/events.py | Cubicpath/HaloInfiniteGetter | 5c1e0c77e1e56d1679dce3835e432fea40239135 | [
"MIT"
] | null | null | null | ###################################################################################################
# MIT Licence (C) 2022 Cubicpath@Github #
###################################################################################################
"""Module used for E... | 38.048458 | 136 | 0.608429 |
087f6df7a1c6a5eb36e46f60372b4b7ceb228818 | 2,832 | py | Python | pytorch_lightning/accelerators/tpu.py | EdwardJB/pytorch-lightning | 3baac7125283b94134572549580071e313288016 | [
"Apache-2.0"
] | 1 | 2021-11-17T01:35:13.000Z | 2021-11-17T01:35:13.000Z | pytorch_lightning/accelerators/tpu.py | EdwardJB/pytorch-lightning | 3baac7125283b94134572549580071e313288016 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/accelerators/tpu.py | EdwardJB/pytorch-lightning | 3baac7125283b94134572549580071e313288016 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# 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 i... | 39.887324 | 106 | 0.738701 |
087f7857b704ff846bf3ad2c5f0dde63625a446b | 2,937 | py | Python | estampes/base/types.py | jbloino/estampes | 39d248cba3541f684c4684661a1664fc42157bdb | [
"MIT"
] | null | null | null | estampes/base/types.py | jbloino/estampes | 39d248cba3541f684c4684661a1664fc42157bdb | [
"MIT"
] | 2 | 2021-06-07T12:51:35.000Z | 2021-07-14T17:14:24.000Z | estampes/base/types.py | jbloino/estampes | 39d248cba3541f684c4684661a1664fc42157bdb | [
"MIT"
] | null | null | null | """Module providing basic types classes
A basic module providing types specifications and new types for ESTAMPES.
Attributes
----------
TypeQTag : :obj:`typing.TypeVar`
Static type for quantity tag.
TypeQOpt : :obj:`typing.Optional`
Static type for quantity option.
TypeDOrd : :obj:`typing.Optional`
Static... | 29.37 | 79 | 0.677903 |
087f8776980814dace1fe9a9ea792570eeec0d39 | 703 | py | Python | src/ggrc_risks/migrations/versions/20170719165534_55f583313670_remove_request_relationships.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc_risks/migrations/versions/20170719165534_55f583313670_remove_request_relationships.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc_risks/migrations/versions/20170719165534_55f583313670_remove_request_relationships.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Remove Request relationships."""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
from alembic import op
from ggrc.migrations.utils.cleanup ... | 26.037037 | 79 | 0.746799 |
087fca516ffbd6bc64f4b44fd685e313e7c96856 | 1,335 | py | Python | python/examples/misc files/jsontest.py | RedEyeDragon/hapBack | 6db262f185fa1d8027c4c6cc04a6f45edbcbf12c | [
"BSD-2-Clause"
] | 1 | 2019-09-09T22:07:16.000Z | 2019-09-09T22:07:16.000Z | python/examples/misc files/jsontest.py | RedEyeDragon/hapBack | 6db262f185fa1d8027c4c6cc04a6f45edbcbf12c | [
"BSD-2-Clause"
] | 1 | 2018-05-25T02:07:29.000Z | 2018-05-25T02:07:29.000Z | python/examples/misc files/jsontest.py | RedEyeDragon/hapBack | 6db262f185fa1d8027c4c6cc04a6f45edbcbf12c | [
"BSD-2-Clause"
] | 3 | 2018-05-25T02:05:11.000Z | 2019-06-03T19:39:39.000Z | #!/usr/bin/python3
import json
testDict = {
'name' : ['Bryan', 'Sana', 'Bijan', 'Troy', 'Meredith', 'Arash', 'Ramesh', 'Ramin', 'Hemanth'],
'gender' : ['male', 'female', 'male', 'male', 'female', 'male', 'female', 'male', 'male'],
'age' : [0, 0, 24, 0, 25, 0, 24, 0, 0]
}
# json = json.dumps(testDict, sort_key... | 29.021739 | 97 | 0.631461 |
087fca80ff39717b4d438626e1c61685d03b36ed | 2,045 | py | Python | HDRMould/HDRlib/HDRMouldTest.py | PerkLab/SlicerSkinMouldGenerator | 0d521d860c00ac0533f28b3fcffdf0220a060eec | [
"BSD-3-Clause"
] | 1 | 2021-01-10T04:13:11.000Z | 2021-01-10T04:13:11.000Z | HDRMould/HDRlib/HDRMouldTest.py | PerkLab/SlicerSkinMouldGenerator | 0d521d860c00ac0533f28b3fcffdf0220a060eec | [
"BSD-3-Clause"
] | 1 | 2021-03-19T11:28:55.000Z | 2021-03-19T11:28:55.000Z | HDRMould/HDRlib/HDRMouldTest.py | PerkLab/SlicerSkinMouldGenerator | 0d521d860c00ac0533f28b3fcffdf0220a060eec | [
"BSD-3-Clause"
] | null | null | null | from __main__ import slicer, vtk , qt
class HDRMouldTest():
"""ScriptedLoadableModuleTemplateTest is a subclass of a standard python
unittest TestCase. Note that this class responds specially to methods
whose names start with the string "test", so follow the pattern of the
template when adding test funct... | 46.477273 | 82 | 0.709535 |
0880024f57d74219be90c23fd62ea9baed742761 | 4,414 | py | Python | GANs/gan/gan.py | shreyansh26/DL-Code-Repository | f1974eedc1fef54b2d274703390a22721e46f502 | [
"MIT"
] | null | null | null | GANs/gan/gan.py | shreyansh26/DL-Code-Repository | f1974eedc1fef54b2d274703390a22721e46f502 | [
"MIT"
] | null | null | null | GANs/gan/gan.py | shreyansh26/DL-Code-Repository | f1974eedc1fef54b2d274703390a22721e46f502 | [
"MIT"
] | null | null | null | import argparse
import os
import torch
import torch.functional as F
import torch.nn as nn
import torchvision.transforms as transforms
from torch.autograd import Variable
from torchvision import datasets
from torchvision.utils import save_image
from model import Discriminator, Generator
CUDA_AVAILABLE = torch.cuda.is... | 35.596774 | 131 | 0.684413 |
08800818413a03e5383d7a4dbac126b892d27ade | 2,246 | py | Python | src/infi/instruct/buffer/reference/contexts.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 2 | 2015-01-12T21:16:06.000Z | 2019-12-12T05:59:56.000Z | src/infi/instruct/buffer/reference/contexts.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 4 | 2015-02-24T09:18:00.000Z | 2021-06-16T12:55:19.000Z | src/infi/instruct/buffer/reference/contexts.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 4 | 2015-01-07T12:37:54.000Z | 2018-02-08T15:07:17.000Z | from infi.instruct.buffer.io_buffer import InputBuffer, OutputBuffer
from .reference import Reference, Context
from .builtins import GetAttrReference
class BufferContext(Context):
"""Base class for buffer context. Contains the object we're packing/unpacking and the list of fields."""
def __init__(self, obj,... | 31.194444 | 108 | 0.711487 |
08800f591202a62f121057169a9c6e31cfa9cd44 | 27,103 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 32.614922 | 165 | 0.621961 |
08803a0279e77fdfa245b48195d9f64af000a9c5 | 32 | py | Python | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Coop/CoopQuickMatchScreen/coop_quick_match_screen.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Coop/CoopQuickMatchScreen/coop_quick_match_screen.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Coop/CoopQuickMatchScreen/coop_quick_match_screen.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class CoopQuickMatchScreen: pass | 32 | 32 | 0.90625 |
088048ca81f87fc7e4621a26a76eeca0815551ca | 20,168 | py | Python | src/onevision/models/enhancement/ffa/configs/ffa_nhhaze.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/models/enhancement/ffa/configs/ffa_nhhaze.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/models/enhancement/ffa/configs/ffa_nhhaze.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""FFA-Net Dehaze variant trained on NH-Haze dataset.
"""
from __future__ import annotations
import os
from onevision.cv import VisionBackend
from onevision.utils import pretrained_dir
__all__ = [
"config",
"model_fullname",
]
# MARK: - Basic Info
model_name = "ff... | 39.936634 | 91 | 0.69645 |
08806721e0770ac35a72390145f79e07d3dd7ac5 | 423 | py | Python | oscar/lib/python2.7/site-packages/django/core/wsgi.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/core/wsgi.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/core/wsgi.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | import django
from django.core.handlers.wsgi import WSGIHandler
def get_wsgi_application():
"""
The public interface to Django's WSGI support. Should return a WSGI
callable.
Allows us to avoid making django.core.handlers.WSGIHandler public API, in
case the internal WSGI implementation c... | 28.2 | 78 | 0.716312 |
088098c9c7181fbe9b337d093b6afa319ba029a5 | 1,687 | py | Python | chirun/markdownRenderer/codemirror/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 5 | 2021-12-06T15:57:24.000Z | 2022-01-24T20:34:00.000Z | chirun/markdownRenderer/codemirror/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 38 | 2021-12-09T13:16:46.000Z | 2022-03-30T11:42:13.000Z | chirun/markdownRenderer/codemirror/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 1 | 2022-01-17T17:41:35.000Z | 2022-01-17T17:41:35.000Z | from pymdownx.superfences import fence_code_format
from bs4 import BeautifulSoup
import uuid
def codemirror_formatter(source, language, css_class, options, md):
"""Formatter for codemirror blocks."""
if 'lang' in options:
language = options['lang'].lower()
html = fence_code_format(source, languag... | 27.209677 | 75 | 0.68524 |
0880aef07c2baa5f522aff20f3fb93edd30a2e0b | 2,440 | py | Python | Code/sets_test.py | alexbarksdale/CS-1.3-Core-Data-Structures | 43e9d71d90dce5d3fa06fd00c3e174bfcfdbe5af | [
"MIT"
] | null | null | null | Code/sets_test.py | alexbarksdale/CS-1.3-Core-Data-Structures | 43e9d71d90dce5d3fa06fd00c3e174bfcfdbe5af | [
"MIT"
] | 6 | 2020-02-15T17:40:00.000Z | 2020-03-09T22:32:05.000Z | Code/sets_test.py | alexbarksdale/CS-1.3-Core-Data-Structures | 43e9d71d90dce5d3fa06fd00c3e174bfcfdbe5af | [
"MIT"
] | null | null | null | from sets import Set
import unittest
class SetTest(unittest.TestCase):
def test_init(self):
el = ['A', 'K', 'B']
s = Set(el)
assert s.ht.length() == 3
assert s.size() == 3
def test_add(self):
s = Set()
s.add('A')
assert s.size() == 1
s.add('A')... | 25.416667 | 55 | 0.466803 |
0880b615000085828000f453b8202605f1306790 | 826 | py | Python | libra_client/lbrtypes/account_state_blob.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | libra_client/lbrtypes/account_state_blob.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | libra_client/lbrtypes/account_state_blob.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | 1 | 2022-01-05T06:49:42.000Z | 2022-01-05T06:49:42.000Z | from libra_client.canoser import Struct, RustOptional
from libra_client.lbrtypes.transaction import Version
from libra_client.lbrtypes.proof.definition import AccountStateProof
from libra_client.lbrtypes.account_state import AccountState
class AccountStateBlob(Struct):
_fields = [
("blob", AccountState)
... | 24.294118 | 68 | 0.661017 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.