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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794af37ff41a93fd2e440895579a235dc7cb31d7 | 163,404 | py | Python | Alignment/MuonAlignmentAlgorithms/scripts/plotscripts.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | Alignment/MuonAlignmentAlgorithms/scripts/plotscripts.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | Alignment/MuonAlignmentAlgorithms/scripts/plotscripts.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | import ROOT, array, os, re, random
from math import *
import time
import pickle
# python 2.6 has json modue; <2.6 could use simplejson
try:
import json
except ImportError:
import simplejson as json
# sign conventions and some dimensions
from signConventions import *
# common muon types structures
from mutypes im... | 43.389272 | 186 | 0.597403 |
794af3a243e810510df3eb27651da685b22f971a | 2,739 | py | Python | example/project/settings.py | unityoxb/django-tailwind | 770f537fc5f5ed56186d3e1dd40a8003adc1b543 | [
"MIT"
] | null | null | null | example/project/settings.py | unityoxb/django-tailwind | 770f537fc5f5ed56186d3e1dd40a8003adc1b543 | [
"MIT"
] | null | null | null | example/project/settings.py | unityoxb/django-tailwind | 770f537fc5f5ed56186d3e1dd40a8003adc1b543 | [
"MIT"
] | 1 | 2021-05-18T11:39:51.000Z | 2021-05-18T11:39:51.000Z | """
Django settings for project project.
Generated by 'django-admin startproject' using Django 3.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import socket... | 25.361111 | 91 | 0.705732 |
794af414e8614b53793bd3625ec3cdbe17d77dea | 446 | py | Python | controller/config.py | RegadorAutomaticoConsciente/RACAP | 2d097eb4671eeef311169ce3cb1ab77226f37b4d | [
"Apache-2.0"
] | null | null | null | controller/config.py | RegadorAutomaticoConsciente/RACAP | 2d097eb4671eeef311169ce3cb1ab77226f37b4d | [
"Apache-2.0"
] | 4 | 2019-11-05T19:36:30.000Z | 2019-11-19T19:48:08.000Z | controller/config.py | RegadorAutomaticoConsciente/RACAP | 2d097eb4671eeef311169ce3cb1ab77226f37b4d | [
"Apache-2.0"
] | null | null | null | import os
API_ENDPOINT = "https://racweb.herokuapp.com/raspberry/1/arduino"
DEVICES_ENDPOINT = "{}/".format(API_ENDPOINT)
SLOTS_ENDPOINT = "{}/{{}}/slots/".format(API_ENDPOINT)
PLANTS_ENDPOINT = "https://docs.google.com/spreadsheets/d/e/2PACX-1vT-KbxCsv32_6xZfwCi-KQEUeVskm4cAomqczfHPWIYL-3Nj3D9aawaH6yPFohSzvkJaaU9VSji... | 44.6 | 188 | 0.780269 |
794af416809ea9adb51da62a9dae441380de3f08 | 79 | py | Python | D02/list/sort.py | shdx8/dtwrhs | 108decb8056931fc7601ed455a72ef0d65983ab0 | [
"MIT"
] | null | null | null | D02/list/sort.py | shdx8/dtwrhs | 108decb8056931fc7601ed455a72ef0d65983ab0 | [
"MIT"
] | null | null | null | D02/list/sort.py | shdx8/dtwrhs | 108decb8056931fc7601ed455a72ef0d65983ab0 | [
"MIT"
] | null | null | null | list1=[2,1,5,8,6,7,4]
#list1=['anak','cantik','baik']
list1.sort()
print(list1) | 19.75 | 31 | 0.632911 |
794af44fe42f71d32e49e1e79f2dd0684a694cf7 | 3,636 | py | Python | covid.py | jizizr/PagerMaid_Plugins | 4805ecfd5035cb6b423894c140acbefc4d61136c | [
"MIT"
] | null | null | null | covid.py | jizizr/PagerMaid_Plugins | 4805ecfd5035cb6b423894c140acbefc4d61136c | [
"MIT"
] | null | null | null | covid.py | jizizr/PagerMaid_Plugins | 4805ecfd5035cb6b423894c140acbefc4d61136c | [
"MIT"
] | null | null | null | """ https://github.com/Zeta-qixi/nonebot-plugin-covid19-news """
import json
from typing import Dict
from pagermaid.listener import listener
from pagermaid.utils import alias_command, obtain_message, get
POLICY_ID = {}
class Area:
def __init__(self, data):
self.name = data['name']
self.today = ... | 25.787234 | 85 | 0.561606 |
794af5133b3b32f453701b69f894e34471ee6a15 | 3,039 | py | Python | mpi/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 140 | 2017-02-21T22:49:04.000Z | 2022-03-22T17:51:58.000Z | mpi/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 5 | 2017-12-02T19:55:00.000Z | 2021-09-22T23:18:39.000Z | mpi/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 79 | 2017-01-25T10:53:33.000Z | 2022-03-11T16:13:57.000Z | #!/usr/bin/env python2
#
# https://pythonhosted.org/mpi4py/usrman/tutorial.html
#
# mpiexec -n 5 python test-mpi.py
#
import requests
from mpi4py import MPI
# --- functions ---
def build_ranges(value, numsplits, rank):
print '[RANK: %d ] build_ranges: %s/%s' % (rank, value, numsplits)
ranges = []
... | 23.742188 | 156 | 0.59921 |
794af688c647cb59d5333110d5d2f8b0eb9b6295 | 7,715 | py | Python | research/object_detection/builders/image_resizer_builder.py | pdharma01/models | 063091d2a9fb2071f15b0921bed888d86833c4f1 | [
"Apache-2.0"
] | 153 | 2020-10-25T13:58:04.000Z | 2022-03-07T06:01:54.000Z | object_detection_api/builders/image_resizer_builder.py | HuaxingXu/marine_debris_ML | 9b7317c0ad881849ce5688aeb1eb368dfb85d39f | [
"Apache-2.0"
] | 11 | 2020-07-13T08:29:00.000Z | 2022-03-24T07:21:09.000Z | object_detection_api/builders/image_resizer_builder.py | HuaxingXu/marine_debris_ML | 9b7317c0ad881849ce5688aeb1eb368dfb85d39f | [
"Apache-2.0"
] | 23 | 2020-10-25T14:44:47.000Z | 2021-03-31T02:12:13.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.037234 | 80 | 0.735839 |
794af79dde66fe9fd5d5c968f0c767073d4014a9 | 11,265 | py | Python | armi/tests/test_mpiFeatures.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | armi/tests/test_mpiFeatures.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | armi/tests/test_mpiFeatures.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 TerraPower, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 37.178218 | 84 | 0.663826 |
794af7f9a08a43e569f28436735af484f5d91926 | 1,341 | py | Python | main.py | Mackan444/Quiz-app | ea57daea0bdca1f4b10b970874aa250cc4664056 | [
"MIT"
] | null | null | null | main.py | Mackan444/Quiz-app | ea57daea0bdca1f4b10b970874aa250cc4664056 | [
"MIT"
] | null | null | null | main.py | Mackan444/Quiz-app | ea57daea0bdca1f4b10b970874aa250cc4664056 | [
"MIT"
] | null | null | null | # Marcus Lycke
# Teinf-20
# Quiz
# 16-03-2022
from Quiz_questions import question_data
from Quiz import Question
from Quiz import Quiz
#Classes
question_bank = []
for q in question_data:
question_text = q["question"]
question_answer = q["answer"]
new_question = Question(question_text, question_answer)
... | 20.953125 | 88 | 0.677107 |
794af8f3bd58327853b7178ec3e5aef2eab044aa | 2,282 | py | Python | sa/profiles/Eltex/LTP/get_inventory.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | null | null | null | sa/profiles/Eltex/LTP/get_inventory.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | null | null | null | sa/profiles/Eltex/LTP/get_inventory.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Eltex.LTP.get_inventory
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# --------------------------------------------------------... | 33.072464 | 87 | 0.463628 |
794af8ffb664dc856d1e768575d69406960af2c7 | 4,639 | py | Python | code/functions/pl_recalib.py | behinger/etcomp | f30389da49c3416c7a723d44951d197d6e89d40e | [
"MIT"
] | 20 | 2018-08-08T07:08:46.000Z | 2022-03-07T14:49:06.000Z | code/functions/pl_recalib.py | Tsehao/etcomp | 69485f751649090f3df589e40fb515e874be207b | [
"MIT"
] | 32 | 2017-12-05T14:05:48.000Z | 2020-10-20T10:29:43.000Z | code/functions/pl_recalib.py | Tsehao/etcomp | 69485f751649090f3df589e40fb515e874be207b | [
"MIT"
] | 7 | 2018-12-09T22:53:10.000Z | 2021-11-10T09:13:04.000Z | # -*- coding: utf-8 -*-
import numpy as np
# Pretty serious workaround. Ignores errors in imports :S
import builtins
from types import ModuleType
import logging
logger = logging.getLogger(__name__)
class DummyModule(ModuleType):
def __getattr__(self, key):
return None
__all__ = [] # support wildcar... | 32.900709 | 175 | 0.639577 |
794afae89f7158603c786fc473c9f1604778cba0 | 8,703 | py | Python | wbia_cnn/models/background.py | WildMeOrg/wbia-plugin-cnn | c31ff09e77b731be4dffc348a1c40303e8c05994 | [
"Apache-2.0"
] | null | null | null | wbia_cnn/models/background.py | WildMeOrg/wbia-plugin-cnn | c31ff09e77b731be4dffc348a1c40303e8c05994 | [
"Apache-2.0"
] | null | null | null | wbia_cnn/models/background.py | WildMeOrg/wbia-plugin-cnn | c31ff09e77b731be4dffc348a1c40303e8c05994 | [
"Apache-2.0"
] | 1 | 2021-05-27T15:33:26.000Z | 2021-05-27T15:33:26.000Z | # -*- coding: utf-8 -*-
import logging
import functools
import six
import numpy as np
import utool as ut
from wbia_cnn import ingest_data
import lasagne
from lasagne import layers, nonlinearities
from theano import tensor as T # NOQA
from wbia_cnn.models import abstract_models
print, rrr, profile = ut.inject2(__name_... | 33.732558 | 90 | 0.600712 |
794afb6f3d50f01a6fc7fc77c4171bda43ba0fe8 | 136,212 | py | Python | workbench_utils.py | DonRichards/islandora_workbench | 292a9f72a62eecad31217c4eae1115323e7f3d8a | [
"Unlicense"
] | null | null | null | workbench_utils.py | DonRichards/islandora_workbench | 292a9f72a62eecad31217c4eae1115323e7f3d8a | [
"Unlicense"
] | null | null | null | workbench_utils.py | DonRichards/islandora_workbench | 292a9f72a62eecad31217c4eae1115323e7f3d8a | [
"Unlicense"
] | null | null | null | import os
import sys
import json
import csv
import openpyxl
import time
import string
import re
import copy
import logging
import datetime
import requests
import subprocess
import hashlib
import mimetypes
import collections
import urllib.parse
import magic
from pathlib import Path
from ruamel.yaml import YAML, YAMLErro... | 46.033119 | 181 | 0.602179 |
794afd12abf4f7a2582e47379c1258a41a0f9429 | 418 | py | Python | src/dcmagick/dump/terminal.py | ar90n/dcmagick | c6816c7cb415da627992da871c8c5b7cfd8b7e93 | [
"MIT"
] | 1 | 2020-09-29T15:11:25.000Z | 2020-09-29T15:11:25.000Z | src/dcmagick/dump/terminal.py | ar90n/dcmagick | c6816c7cb415da627992da871c8c5b7cfd8b7e93 | [
"MIT"
] | 2 | 2020-02-06T20:00:13.000Z | 2020-02-11T17:58:14.000Z | src/dcmagick/dump/terminal.py | ar90n/dcmagick | c6816c7cb415da627992da871c8c5b7cfd8b7e93 | [
"MIT"
] | null | null | null | import numpy as np
from teimpy import Mode, get_drawer
from ..common.window import apply as apply_window
def _dump(mode, proxy):
drawer = get_drawer(mode)
return drawer.draw(apply_window(proxy))
def dump_braille(proxy):
return _dump(Mode.BRAILLE, proxy)
def dump_halfblock(proxy):
return _dump(Mo... | 18.173913 | 49 | 0.748804 |
794afd26ae5284adb569d6b3bc0b5f48116df809 | 2,439 | py | Python | src/streamlink/plugins/cdnbg.py | eleeeeeee/abc | 5d81d68c7a47e931f050632ae7cddb3b044971b4 | [
"BSD-2-Clause"
] | 1 | 2019-11-25T01:37:21.000Z | 2019-11-25T01:37:21.000Z | src/streamlink/plugins/cdnbg.py | eleeeeeee/abc | 5d81d68c7a47e931f050632ae7cddb3b044971b4 | [
"BSD-2-Clause"
] | 3 | 2018-06-22T23:33:46.000Z | 2018-06-25T00:14:35.000Z | src/streamlink/plugins/cdnbg.py | eleeeeeee/abc | 5d81d68c7a47e931f050632ae7cddb3b044971b4 | [
"BSD-2-Clause"
] | 1 | 2020-08-12T08:27:22.000Z | 2020-08-12T08:27:22.000Z | from __future__ import print_function
import re
from streamlink.compat import urlparse
from streamlink.plugin import Plugin
from streamlink.plugin.api import http
from streamlink.plugin.api import useragents
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream
from streamlink.utils impor... | 36.402985 | 103 | 0.574006 |
794afdb6eb0640f6ad750056f9a489a6c2768e03 | 140 | py | Python | tutorial/06_RangeImages/02_range_image_border_extraction.py | maguangyan/pclpy_tutorial | 9ce54d1f1a70cf379b5954ad4d8bed3210e06a4c | [
"BSD-3-Clause"
] | 17 | 2021-10-04T08:00:50.000Z | 2022-03-31T07:23:52.000Z | tutorial/06_RangeImages/02_range_image_border_extraction.py | maguangyan/pclpy_tutorial | 9ce54d1f1a70cf379b5954ad4d8bed3210e06a4c | [
"BSD-3-Clause"
] | 3 | 2021-12-17T07:42:04.000Z | 2022-03-30T02:17:15.000Z | tutorial/06_RangeImages/02_range_image_border_extraction.py | maguangyan/pclpy_tutorial | 9ce54d1f1a70cf379b5954ad4d8bed3210e06a4c | [
"BSD-3-Clause"
] | 2 | 2022-03-18T07:19:19.000Z | 2022-03-29T14:25:01.000Z | # -*- coding: utf-8 -*-
# @Time : DATE:2021/9/23
# @Author : yan
# @Email : 1792659158@qq.com
# @File : 02_range_image_border_extraction.py
| 23.333333 | 45 | 0.657143 |
794afdf53ce9f987102f1f752ac0355d9fef0985 | 5,451 | py | Python | neodroidvision/detection/single_stage/ssd/ssd_evaluation.py | aivclab/vision | 6c644dd72f68bca608a2900e5d9461e90fe841eb | [
"Apache-2.0"
] | 1 | 2019-07-03T04:33:51.000Z | 2019-07-03T04:33:51.000Z | neodroidvision/detection/single_stage/ssd/ssd_evaluation.py | aivclab/vision | 6c644dd72f68bca608a2900e5d9461e90fe841eb | [
"Apache-2.0"
] | 5 | 2019-07-03T04:38:07.000Z | 2021-09-10T15:40:44.000Z | neodroidvision/detection/single_stage/ssd/ssd_evaluation.py | aivclab/vision | 6c644dd72f68bca608a2900e5d9461e90fe841eb | [
"Apache-2.0"
] | 3 | 2019-10-03T06:14:40.000Z | 2021-01-31T14:31:39.000Z | import logging
import torch
import torch.utils.data
from pathlib import Path
from torch.nn import Module
from torch.utils.data import DataLoader
from tqdm import tqdm
from typing import Any, List
from warg import NOD
from neodroidvision import PROJECT_APP_PATH
from neodroidvision.data.detection.coco import COCODataset... | 28.097938 | 104 | 0.63548 |
794afe494d648a6c55c1ccd2785e3255ed6cc45f | 716 | py | Python | playground/segmentation/coco/tensormask/tensormask.res50.fpn.coco.800size.1x/net.py | reinforcementdriving/cvpods | 32d98b74745020be035a0e20337ad934201615c4 | [
"Apache-2.0"
] | 1 | 2021-04-24T17:01:29.000Z | 2021-04-24T17:01:29.000Z | playground/segmentation/coco/tensormask/tensormask.res50.fpn.coco.800size.1x/net.py | wondervictor/cvpods | 614a975e5425bbaeb66bbd1ffca552d633ba89ca | [
"Apache-2.0"
] | null | null | null | playground/segmentation/coco/tensormask/tensormask.res50.fpn.coco.800size.1x/net.py | wondervictor/cvpods | 614a975e5425bbaeb66bbd1ffca552d633ba89ca | [
"Apache-2.0"
] | null | null | null | from cvpods.layers import ShapeSpec
from cvpods.modeling.meta_arch import TensorMask
from cvpods.modeling.backbone import Backbone
from cvpods.modeling.backbone.fpn import build_retinanet_resnet_fpn_backbone
def build_backbone(cfg, input_shape=None):
"""
Build a backbone from `cfg.MODEL.BACKBONE.NAME`.
R... | 25.571429 | 76 | 0.75 |
794afe84ebbcdfbc5c1fcc7d863e2b103a1eab7c | 6,644 | py | Python | src/midi/MidiFileParser.py | Adilmar/DancePython | 846a4abc9ef1969da2e84e985b834abcf5db03c0 | [
"BSD-3-Clause"
] | null | null | null | src/midi/MidiFileParser.py | Adilmar/DancePython | 846a4abc9ef1969da2e84e985b834abcf5db03c0 | [
"BSD-3-Clause"
] | null | null | null | src/midi/MidiFileParser.py | Adilmar/DancePython | 846a4abc9ef1969da2e84e985b834abcf5db03c0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: ISO-8859-1 -*-
# std library
from struct import unpack
# uhh I don't really like this, but there are so many constants to
# import otherwise
from constants import *
from EventDispatcher import EventDispatcher
class MidiFileParser:
"""
The MidiFileParser is the lowest level parser that s... | 33.22 | 82 | 0.573299 |
794affc090c98441b5096c9e3a8adadef160e581 | 74 | py | Python | ner_anonymizer/__init__.py | kelvnt/DataAnonymizer | 0d81972b4e4521a4db746ddd8788bf98087a48d2 | [
"MIT"
] | 2 | 2020-09-07T13:34:30.000Z | 2020-09-07T13:35:52.000Z | ner_anonymizer/__init__.py | kelvnt/DataAnonymizer | 0d81972b4e4521a4db746ddd8788bf98087a48d2 | [
"MIT"
] | 1 | 2021-06-30T06:27:34.000Z | 2021-06-30T08:24:25.000Z | ner_anonymizer/__init__.py | kelvnt/ner-anonymizer | de8df3186cbae5efc316887f40f12e14e0d0e298 | [
"MIT"
] | null | null | null | from .ner_anonymizer import (
DataAnonymizer,
de_anonymize_data
)
| 14.8 | 29 | 0.743243 |
794b012749a8a7eb9768b6bd7e210d9249de03ea | 6,997 | py | Python | tensorflow/python/kernel_tests/template_test.py | matsuyama/tensorflow | a27d844e05447e65aa279ae5269a2d75590f46f6 | [
"Apache-2.0"
] | 23 | 2016-02-04T21:08:43.000Z | 2022-01-14T13:22:33.000Z | tensorflow/python/kernel_tests/template_test.py | matsuyama/tensorflow | a27d844e05447e65aa279ae5269a2d75590f46f6 | [
"Apache-2.0"
] | 2 | 2016-05-31T16:38:55.000Z | 2018-12-30T20:17:05.000Z | tensorflow/python/kernel_tests/template_test.py | matsuyama/tensorflow | a27d844e05447e65aa279ae5269a2d75590f46f6 | [
"Apache-2.0"
] | 20 | 2016-02-15T17:31:02.000Z | 2020-01-12T08:18:48.000Z | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 32.696262 | 80 | 0.677719 |
794b019e71623e77a66a2bf0253968dc7aa0dabc | 2,452 | py | Python | beastling/models/binaryctmc.py | tresoldi/BEASTling | 9deaf8a18bfd5516169a124ac439d3bfa0eab506 | [
"BSD-2-Clause"
] | 12 | 2015-10-30T09:25:09.000Z | 2021-12-09T17:06:50.000Z | beastling/models/binaryctmc.py | tresoldi/BEASTling | 9deaf8a18bfd5516169a124ac439d3bfa0eab506 | [
"BSD-2-Clause"
] | 254 | 2015-11-03T10:37:05.000Z | 2021-07-23T19:57:35.000Z | beastling/models/binaryctmc.py | tresoldi/BEASTling | 9deaf8a18bfd5516169a124ac439d3bfa0eab506 | [
"BSD-2-Clause"
] | 9 | 2015-11-02T09:57:31.000Z | 2021-05-12T00:48:03.000Z | from .binary import BinaryModelWithShareParams as BinaryModel
from beastling.util import xml
class BinaryCTMCModel(BinaryModel):
def __init__(self, model_config, global_config):
BinaryModel.__init__(self, model_config, global_config)
self.subst_model_id = None
def get_userdatatype(self, featu... | 40.866667 | 102 | 0.591354 |
794b01c5a93ca8c5fa2e3f04f835820d4d8d2fdf | 4,005 | py | Python | 29dec/HaIndusIOcard.py | sethiyark/be-project | e74f3aae0caa8d4796cb47cdc51547b77d3cb1f1 | [
"MIT"
] | null | null | null | 29dec/HaIndusIOcard.py | sethiyark/be-project | e74f3aae0caa8d4796cb47cdc51547b77d3cb1f1 | [
"MIT"
] | null | null | null | 29dec/HaIndusIOcard.py | sethiyark/be-project | e74f3aae0caa8d4796cb47cdc51547b77d3cb1f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# File pportbits.py
# http://www.bristolwatch.com/pport/index.htm
# By Lewis Loflin - lewis@bvu.net
# Example code to turn ON-OFF individual bits on PC
# printer port Db25 pins 2-9.
# Must use my version of pyparallel on website for self.p.getData().
# Bitwise AND is used to clear a bit while bit... | 32.298387 | 76 | 0.588514 |
794b03274bbe5f0ad9cd422a9daa76dc00692286 | 1,388 | py | Python | bespin/test_backend.py | Duke-GCB/bespin-api | cea5c20fb2ff592adabe6ebb7ca934939aa11a34 | [
"MIT"
] | null | null | null | bespin/test_backend.py | Duke-GCB/bespin-api | cea5c20fb2ff592adabe6ebb7ca934939aa11a34 | [
"MIT"
] | 137 | 2016-12-09T18:59:45.000Z | 2021-06-10T18:55:47.000Z | bespin/test_backend.py | Duke-GCB/bespin-api | cea5c20fb2ff592adabe6ebb7ca934939aa11a34 | [
"MIT"
] | 3 | 2017-11-14T16:05:58.000Z | 2018-12-28T18:07:43.000Z | from django.test.utils import override_settings
from django.test import TestCase
from unittest.mock import patch
from bespin.backend import BespinOAuth2Backend
class BespinOAuth2BackendTestCase(TestCase):
def setUp(self):
self.details = {'dukeUniqueID': 'abc123'}
@override_settings(REQUIRED_GROUP_MA... | 42.060606 | 77 | 0.778818 |
794b04630f0a967a036d1a62029bdbcb1da914b3 | 1,216 | py | Python | model-optimizer/extensions/front/mxnet/softmax_ext.py | undeadinu/dldt | fbc7a4a710c24def8ab199926a7da90a0394b87d | [
"Apache-2.0"
] | 1 | 2019-03-22T06:35:55.000Z | 2019-03-22T06:35:55.000Z | model-optimizer/extensions/front/mxnet/softmax_ext.py | undeadinu/dldt | fbc7a4a710c24def8ab199926a7da90a0394b87d | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/front/mxnet/softmax_ext.py | undeadinu/dldt | fbc7a4a710c24def8ab199926a7da90a0394b87d | [
"Apache-2.0"
] | 1 | 2019-06-11T06:20:42.000Z | 2019-06-11T06:20:42.000Z | """
Copyright (c) 2018 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 31.179487 | 73 | 0.712993 |
794b050a2422a685fa8f209a28414b6b11a20d05 | 2,052 | py | Python | keyed_urls/__init__.py | matthiask/django-keyed-urls | b195ffd24c1c259485744cc0c1b824f4dd867ac0 | [
"BSD-3-Clause"
] | null | null | null | keyed_urls/__init__.py | matthiask/django-keyed-urls | b195ffd24c1c259485744cc0c1b824f4dd867ac0 | [
"BSD-3-Clause"
] | null | null | null | keyed_urls/__init__.py | matthiask/django-keyed-urls | b195ffd24c1c259485744cc0c1b824f4dd867ac0 | [
"BSD-3-Clause"
] | null | null | null | VERSION = (0, 4, 1)
__version__ = '.'.join(map(str, VERSION))
_none_type = 0xc0ffee
_available_languages = None
class KeyDoesNotExist(Exception):
pass
def get_url(key, language=None, fail_silently=False):
global _available_languages
from django.conf import settings
from django.core.cache import c... | 28.901408 | 73 | 0.64961 |
794b052cd2fb4177cfdce8ce966300d6e262c4d0 | 1,808 | py | Python | main.py | NCPlayz/EnterShikariBot | 8a3a958c821bff175eaaf7194d39c8efd2f9da7a | [
"MIT"
] | null | null | null | main.py | NCPlayz/EnterShikariBot | 8a3a958c821bff175eaaf7194d39c8efd2f9da7a | [
"MIT"
] | null | null | null | main.py | NCPlayz/EnterShikariBot | 8a3a958c821bff175eaaf7194d39c8efd2f9da7a | [
"MIT"
] | null | null | null | from pathlib import Path
from discord.ext import commands
import discord
import os
import asyncio
class Bot(commands.Bot):
"""This is the class that initializes the bot."""
def __init__(self):
self.presence = discord.Game(name='The Spark | -help'
, url="... | 33.481481 | 110 | 0.534845 |
794b055c33f0f4eaba2651d6b28baee4f0cec43f | 620 | py | Python | ginrex/ui/plot_exafs.py | San-WierPa/ginRex | 25af3356e22af033f30b0a8a73139635466e4f44 | [
"MIT"
] | 2 | 2021-11-22T22:00:05.000Z | 2021-12-09T18:57:48.000Z | ginrex/ui/plot_exafs.py | San-WierPa/ginrex | 25af3356e22af033f30b0a8a73139635466e4f44 | [
"MIT"
] | null | null | null | ginrex/ui/plot_exafs.py | San-WierPa/ginrex | 25af3356e22af033f30b0a8a73139635466e4f44 | [
"MIT"
] | null | null | null | """
The :mod:`~ginrex.plot_exafs` module gives the following utility functions:
* - :func:`absorption`
- Returns Matplotlib.pyplot figure.
"""
import matplotlib.pyplot as plt
import numpy as np
from numpy import log
def absorption(filename):
"""
Calculates the absorption according to PetraIII column... | 20.666667 | 75 | 0.643548 |
794b05c140f77c80a59ac829e5fadd7bc183dedd | 23,165 | py | Python | test/test_db.py | dataware-tools/pydtk | 1da61fb8ca90de6c39a371a9b2b65f4473932991 | [
"Apache-2.0"
] | 11 | 2020-10-09T01:29:18.000Z | 2022-01-21T13:21:40.000Z | test/test_db.py | dataware-tools/pydtk | 1da61fb8ca90de6c39a371a9b2b65f4473932991 | [
"Apache-2.0"
] | 64 | 2020-10-20T04:55:22.000Z | 2022-01-24T15:52:32.000Z | test/test_db.py | dataware-tools/pydtk | 1da61fb8ca90de6c39a371a9b2b65f4473932991 | [
"Apache-2.0"
] | 1 | 2021-07-30T04:52:38.000Z | 2021-07-30T04:52:38.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright Toolkit Authors
from typing import Optional
from pydtk.db import V4DBHandler, V4MetaDBHandler, V4DatabaseIDDBHandler
import pytest
db_args = 'db_engine,db_host,db_username,db_password'
db_list = [
('tinydb', 'test/test_v4.json', None, None),
('tinymo... | 27.093567 | 100 | 0.618347 |
794b06e54025ab6e2d05c25eb7a26179f5454026 | 1,783 | py | Python | python/itypes/log/trace_logger.py | eddy-ilg/itypes | eaf1c4a86576c77caa34148c0fdc6b2e012119ff | [
"MIT"
] | null | null | null | python/itypes/log/trace_logger.py | eddy-ilg/itypes | eaf1c4a86576c77caa34148c0fdc6b2e012119ff | [
"MIT"
] | null | null | null | python/itypes/log/trace_logger.py | eddy-ilg/itypes | eaf1c4a86576c77caa34148c0fdc6b2e012119ff | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import inspect
from itypes import addr
TRACE = -1
DEBUG = 0
INFO = 1
WARNING = 2
ERROR = 3
log_level = INFO
def set_trace_level(level):
global log_level
if isinstance(level, str):
level = str_to_level(level)
log_level = level
def str_to_level(str):
if str =... | 24.094595 | 147 | 0.614694 |
794b07dbb77fee62e63f2d12b108154ddc1a8fda | 1,742 | py | Python | test/1.1.0/08/test_1_1_0__08_ris_object.py | zmoon/cff-converter-python | ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d | [
"Apache-2.0"
] | 40 | 2018-06-13T21:38:35.000Z | 2022-03-19T18:34:37.000Z | test/1.1.0/08/test_1_1_0__08_ris_object.py | zmoon/cff-converter-python | ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d | [
"Apache-2.0"
] | 135 | 2018-03-20T09:35:39.000Z | 2022-03-16T14:57:08.000Z | test/1.1.0/08/test_1_1_0__08_ris_object.py | zmoon/cff-converter-python | ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d | [
"Apache-2.0"
] | 14 | 2018-06-12T20:17:25.000Z | 2022-02-02T13:58:58.000Z | import os
import pytest
from test.contracts.ris_object import Contract
from cffconvert.behavior_1_1_x.ris_object import RisObject
from cffconvert import Citation
@pytest.fixture(scope="module")
def ris_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encodin... | 32.867925 | 101 | 0.680827 |
794b082fb05e1f17061f33978e6746f059f48226 | 8,930 | py | Python | slot/a/all.py | pfleg/dl | 0566bd5cac32feea7dfd082b199a44b05e8e1e04 | [
"Apache-2.0"
] | null | null | null | slot/a/all.py | pfleg/dl | 0566bd5cac32feea7dfd082b199a44b05e8e1e04 | [
"Apache-2.0"
] | null | null | null | slot/a/all.py | pfleg/dl | 0566bd5cac32feea7dfd082b199a44b05e8e1e04 | [
"Apache-2.0"
] | null | null | null | from slot.a import Amulet, Conf
class Plunder_Pals(Amulet): #Plunder Pals or Hitting the Books
att = 54
a = [('s',0.30)]
PP = Plunder_Pals
class Resounding_Rendition(Amulet):
att = 64
a = [('s',0.30),
('cc',0.08,'hp70')]
RR = Resounding_Rendition
class Crystalian_Envoy(Amulet):
att = ... | 19.287257 | 62 | 0.568085 |
794b08bd43b98762ba6562865cd0c6ec0fa51309 | 5,882 | py | Python | src/surfclass/rasterize.py | plimkilde/surfclass | 0534d6400f0e3636150079ac3bb2cf676f472233 | [
"MIT"
] | 3 | 2019-10-30T10:05:58.000Z | 2019-11-08T12:41:33.000Z | src/surfclass/rasterize.py | plimkilde/surfclass | 0534d6400f0e3636150079ac3bb2cf676f472233 | [
"MIT"
] | 17 | 2019-10-25T12:57:34.000Z | 2019-12-17T08:12:36.000Z | src/surfclass/rasterize.py | plimkilde/surfclass | 0534d6400f0e3636150079ac3bb2cf676f472233 | [
"MIT"
] | 2 | 2019-12-18T15:22:09.000Z | 2019-12-18T15:39:27.000Z | """Tools for rasterization of LiDAR files."""
import json
import logging
from pathlib import Path
import pdal
from surfclass import lidar, rasterio, Bbox
logger = logging.getLogger(__name__)
dimension_nodata = {
"Z": -999,
"Intensity": 0,
"ReturnNumber": 0,
"NumberOfReturns": 0,
"Classification": ... | 33.804598 | 123 | 0.577355 |
794b0a475094ca12714e0bbe39a682e0449cad3d | 2,327 | py | Python | lib/i18n.py | BTCPrivate/electrum-bitcoinprivate | d18dbd83353d006136bc986e143e19dbb954c36a | [
"MIT"
] | 1 | 2021-04-02T20:35:15.000Z | 2021-04-02T20:35:15.000Z | lib/i18n.py | ArdeshirV/electrum-bitcoinprivate | d18dbd83353d006136bc986e143e19dbb954c36a | [
"MIT"
] | null | null | null | lib/i18n.py | ArdeshirV/electrum-bitcoinprivate | d18dbd83353d006136bc986e143e19dbb954c36a | [
"MIT"
] | 1 | 2021-04-06T18:34:31.000Z | 2021-04-06T18:34:31.000Z | #!/usr/bin/env python
#
# Electrum - lightweight bitcoinprivate client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# includin... | 32.774648 | 96 | 0.672969 |
794b0b35918b4e5d4f1e8539762032034ed4a539 | 3,545 | py | Python | escnn/gspaces/utils.py | QUVA-Lab/escnn | 59ed6b96f61f8616f87b3f25aa2f8abdb6f1a882 | [
"BSD-3-Clause"
] | 4 | 2022-03-16T22:51:39.000Z | 2022-03-18T18:45:49.000Z | escnn/gspaces/utils.py | QUVA-Lab/escnn | 59ed6b96f61f8616f87b3f25aa2f8abdb6f1a882 | [
"BSD-3-Clause"
] | null | null | null | escnn/gspaces/utils.py | QUVA-Lab/escnn | 59ed6b96f61f8616f87b3f25aa2f8abdb6f1a882 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from scipy.ndimage import rotate
from scipy.ndimage import affine_transform
def rotate_array_2d(x, angle):
k = 2 * angle / np.pi
if k.is_integer():
# Rotations by 180 and 270 degrees seem to be not perfect using `ndimage.rotate` and can therefore
# make some tests fail.
... | 33.443396 | 114 | 0.56756 |
794b0b711ed618c2169ef3d94b0beddbfce9a024 | 1,349 | py | Python | retrobiocat_web/app/biocatdb/model_forms.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 9 | 2020-12-01T16:33:02.000Z | 2022-01-19T20:02:42.000Z | retrobiocat_web/app/biocatdb/model_forms.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 4 | 2020-10-02T14:38:32.000Z | 2021-08-02T09:23:58.000Z | retrobiocat_web/app/biocatdb/model_forms.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 6 | 2021-01-14T07:48:36.000Z | 2022-03-20T17:34:27.000Z | from flask_wtf import FlaskForm
from wtforms import StringField, SelectField, TextAreaField, SubmitField, BooleanField, DateField
from wtforms.validators import DataRequired, NumberRange, ValidationError, Length
from retrobiocat_web.mongo.models.biocatdb_models import EnzymeType, Sequence, Paper
def is_doi_taken(form,... | 40.878788 | 97 | 0.733877 |
794b0c29f51a2da6fe2ef871768027ca7da18c0b | 11,980 | py | Python | ros/src/tl_detector/tl_detector.py | mjanddy/CarND-Capstone-master | d25dcfee64387b187c7c407a5ca6b3003808ffde | [
"MIT"
] | null | null | null | ros/src/tl_detector/tl_detector.py | mjanddy/CarND-Capstone-master | d25dcfee64387b187c7c407a5ca6b3003808ffde | [
"MIT"
] | 1 | 2018-07-27T13:34:39.000Z | 2018-07-27T13:34:39.000Z | ros/src/tl_detector/tl_detector.py | wzyanqi/CarND-Capstone | 92827cd8bc28c53c9d778b23ffa84199885d98cb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
import numpy as np
from std_msgs.msg import Int32
from geometry_msgs.msg import PoseStamped, Pose
from styx_msgs.msg import TrafficLightArray, TrafficLight
from styx_msgs.msg import Lane
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
from light_classification.tl_clas... | 36.413374 | 132 | 0.586978 |
794b0cad715b1e543eed3097b92290d9b6fac996 | 1,874 | py | Python | src/Utils/sad.py | ChrisChV/Binance-Manager | 840e83e5e5586022ed2b9a181342d32e1e973ab7 | [
"MIT"
] | null | null | null | src/Utils/sad.py | ChrisChV/Binance-Manager | 840e83e5e5586022ed2b9a181342d32e1e973ab7 | [
"MIT"
] | null | null | null | src/Utils/sad.py | ChrisChV/Binance-Manager | 840e83e5e5586022ed2b9a181342d32e1e973ab7 | [
"MIT"
] | null | null | null | from decimal import *
_DF_ = "/"
_BINANCE_MODULE_DIR_NAME_ = "Binance"
_KEYS_FILE_NAME_ = ".keys"
_KEYS_FILE_PATH_ = _BINANCE_MODULE_DIR_NAME_ + _DF_ + _KEYS_FILE_NAME_
_CONFIG_FILE_NAME_ = "bm.conf"
_ENTRY_TYPE_ = 0
_LOSE_TYPE_ = 1
_PROFIT_TYPE_ = 2
_INIT_STATE_ = 0
_WAITING_STATE_ = 1
_OPEN_STATE_ = 2
_FILLED_ST... | 24.337662 | 88 | 0.785486 |
794b0cf30cd329bdb77be49a089f66cc60264ede | 101 | py | Python | hnn/src/utils/__init__.py | anlewy/mt-dnn | eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 | [
"MIT"
] | 2,075 | 2019-02-25T08:54:38.000Z | 2022-03-31T10:44:50.000Z | hnn/src/utils/__init__.py | anlewy/mt-dnn | eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 | [
"MIT"
] | 176 | 2019-03-12T02:58:42.000Z | 2022-03-22T20:17:23.000Z | hnn/src/utils/__init__.py | anlewy/mt-dnn | eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 | [
"MIT"
] | 437 | 2019-03-11T21:36:21.000Z | 2022-03-29T02:40:53.000Z | """
utils
@Author: penhe@microsoft.com
"""
from .logger_util import *
from .argument_types import *
| 12.625 | 29 | 0.722772 |
794b0dd605a6f08b3d22fa7b8a0b1245605c6964 | 207 | py | Python | instrument/instrument/doctype/purchasing_package_table/purchasing_package_table.py | pradyotraina/rushabhinstruments_V13 | 18c4646ea2171e946c2ca1403d0ed2e32a9dd144 | [
"MIT"
] | 1 | 2021-07-14T12:34:14.000Z | 2021-07-14T12:34:14.000Z | instrument/instrument/doctype/purchasing_package_table/purchasing_package_table.py | pradyotraina/rushabhinstruments_V13 | 18c4646ea2171e946c2ca1403d0ed2e32a9dd144 | [
"MIT"
] | null | null | null | instrument/instrument/doctype/purchasing_package_table/purchasing_package_table.py | pradyotraina/rushabhinstruments_V13 | 18c4646ea2171e946c2ca1403d0ed2e32a9dd144 | [
"MIT"
] | 4 | 2021-07-06T10:01:11.000Z | 2021-12-28T20:40:30.000Z | # Copyright (c) 2021, instrument and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PurchasingPackageTable(Document):
pass
| 23 | 49 | 0.806763 |
794b0e34290954a6e19b28b996c18efdad1707d8 | 32,559 | py | Python | hydrus/client/metadata/ClientTagsHandling.py | bbappserver/hydrus-build-test | de7868c2f549faaf4a189b120cddcb39d16a64ba | [
"WTFPL"
] | null | null | null | hydrus/client/metadata/ClientTagsHandling.py | bbappserver/hydrus-build-test | de7868c2f549faaf4a189b120cddcb39d16a64ba | [
"WTFPL"
] | null | null | null | hydrus/client/metadata/ClientTagsHandling.py | bbappserver/hydrus-build-test | de7868c2f549faaf4a189b120cddcb39d16a64ba | [
"WTFPL"
] | null | null | null | import collections
import random
import threading
import time
import typing
from hydrus.core import HydrusConstants as HC
from hydrus.core import HydrusData
from hydrus.core import HydrusExceptions
from hydrus.core import HydrusGlobals as HG
from hydrus.core import HydrusSerialisable
from hydrus.core import HydrusTags... | 33.325486 | 252 | 0.581682 |
794b0eee657db516c725d2d35f15819da5d490ca | 17,648 | py | Python | functions_for_AirBnB.py | dalpengholic/Udacity_Boston-AirBNB-Data | ef918f4ddf8041a9f646e6fe786730f191746c2b | [
"MIT"
] | null | null | null | functions_for_AirBnB.py | dalpengholic/Udacity_Boston-AirBNB-Data | ef918f4ddf8041a9f646e6fe786730f191746c2b | [
"MIT"
] | null | null | null | functions_for_AirBnB.py | dalpengholic/Udacity_Boston-AirBNB-Data | ef918f4ddf8041a9f646e6fe786730f191746c2b | [
"MIT"
] | null | null | null | # The collection of functions for the Boston AirBnB dataset
# import necessary libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from pandas.tseries.holiday import USFederalHolidayCalendar as calendar #To check holidays in the U.S
import time
import copy
def load_b... | 54.807453 | 501 | 0.716228 |
794b0f111f9a82f3baf57c7340021a301e1077e4 | 1,535 | py | Python | servicex_storage/__init__.py | ssl-hep/servicex_storage_lib | 43078bc9ce0dbad29cf152b0f2328f290a3d449f | [
"BSD-3-Clause"
] | null | null | null | servicex_storage/__init__.py | ssl-hep/servicex_storage_lib | 43078bc9ce0dbad29cf152b0f2328f290a3d449f | [
"BSD-3-Clause"
] | 15 | 2021-05-21T00:26:59.000Z | 2022-03-19T16:10:27.000Z | tests/servicex_did_finder_lib/__init__.py | ssl-hep/ServiceX_DID_Finder_lib | 15328b22a48f8bf30907c0240ce93f692ca85077 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, IRIS-HEP
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the foll... | 54.821429 | 80 | 0.785016 |
794b0f18e47168339b9d5b0032432d2436445874 | 382 | py | Python | app/app/tests.py | OsamaDaghestani/recipe-app-api | f8963b1b899503d2802ddc6a5c91ada704b1352a | [
"MIT"
] | null | null | null | app/app/tests.py | OsamaDaghestani/recipe-app-api | f8963b1b899503d2802ddc6a5c91ada704b1352a | [
"MIT"
] | null | null | null | app/app/tests.py | OsamaDaghestani/recipe-app-api | f8963b1b899503d2802ddc6a5c91ada704b1352a | [
"MIT"
] | null | null | null | from django.test import TestCase
from app.calc import add, subtract
class CalcTests(TestCase):
"""docstring for ."""
def test_add_numbers(self):
"""Test that two numbers are added together"""
self.assertEqual(add(3, 8), 11)
def test_subtract_numbers(self):
"""Test that numbers a... | 23.875 | 54 | 0.659686 |
794b101e57ce4b3a37df2b17a4b1f5e5ad406109 | 11,801 | py | Python | src/m5_more_sequences.py | mahne/12-MoreSequences | 9a3a01897e12bae58fd86c421b387fc0204ac62e | [
"MIT"
] | null | null | null | src/m5_more_sequences.py | mahne/12-MoreSequences | 9a3a01897e12bae58fd86c421b387fc0204ac62e | [
"MIT"
] | null | null | null | src/m5_more_sequences.py | mahne/12-MoreSequences | 9a3a01897e12bae58fd86c421b387fc0204ac62e | [
"MIT"
] | null | null | null | """
This module lets you practice various patterns
for ITERATING through SEQUENCES, including:
-- Beginning to end
-- Other ranges (e.g., backwards and every-3rd-item)
-- The COUNT/SUM/etc pattern
-- The FIND pattern (via LINEAR SEARCH)
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
... | 36.42284 | 79 | 0.518854 |
794b1090a86d5488b72caa60d61a191d9d338a87 | 5,516 | py | Python | tests/settings14.py | 0x07Ltd/django-condition-chain | b00d2efbdba6df1c0b3e167b961a9205664633b1 | [
"Unlicense"
] | null | null | null | tests/settings14.py | 0x07Ltd/django-condition-chain | b00d2efbdba6df1c0b3e167b961a9205664633b1 | [
"Unlicense"
] | null | null | null | tests/settings14.py | 0x07Ltd/django-condition-chain | b00d2efbdba6df1c0b3e167b961a9205664633b1 | [
"Unlicense"
] | null | null | null | # Django settings for Django Condition Chain project.
import os
from tempfile import gettempdir
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.jo... | 33.840491 | 100 | 0.69797 |
794b11792dadf4144bdf1dce08fdd6c718226e24 | 3,255 | py | Python | data_preprocess.py | LinMaris/JDD_PigImageClassification | 2b84ba524265191ea7fc1ea5dc5ba32588e6b135 | [
"MIT"
] | null | null | null | data_preprocess.py | LinMaris/JDD_PigImageClassification | 2b84ba524265191ea7fc1ea5dc5ba32588e6b135 | [
"MIT"
] | null | null | null | data_preprocess.py | LinMaris/JDD_PigImageClassification | 2b84ba524265191ea7fc1ea5dc5ba32588e6b135 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import os
import tensorflow as tf
rootDir = './save/1/'
def makeData():
train_writer = tf.python_io.TFRecordWriter('train.tfrecords')
valid_writer = tf.python_io.TFRecordWriter('valid.tfrecords')
# test_writer = tf.python_io.TFRecordWriter('test.tfrecords')
i... | 36.988636 | 112 | 0.515822 |
794b13b0d5296972d6986702e6a6ce6e32898f91 | 22,773 | py | Python | gazoo_device/tests/unit_tests/fire_manager_test.py | google/gazoo-device | f333b386f5993c8d4c9e12c89ebb620a0c4f5506 | [
"Apache-2.0"
] | 14 | 2020-11-05T23:23:32.000Z | 2022-03-01T18:59:29.000Z | gazoo_device/tests/unit_tests/fire_manager_test.py | google/gazoo-device | f333b386f5993c8d4c9e12c89ebb620a0c4f5506 | [
"Apache-2.0"
] | null | null | null | gazoo_device/tests/unit_tests/fire_manager_test.py | google/gazoo-device | f333b386f5993c8d4c9e12c89ebb620a0c4f5506 | [
"Apache-2.0"
] | 5 | 2021-05-20T22:52:51.000Z | 2022-02-21T08:46:21.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 45.913306 | 80 | 0.711676 |
794b145a5ff16868ef1d08c0fdac9b845ce66259 | 20,645 | py | Python | tests/test_timestamp.py | bbc/rd-apmm-python-lib-mediatimestamp | fbf44b11984fa6d45ff29f97093a7e907b140e13 | [
"Apache-2.0"
] | 3 | 2018-09-07T01:26:08.000Z | 2019-09-13T12:37:50.000Z | tests/test_timestamp.py | bbc/rd-apmm-python-lib-mediatimestamp | fbf44b11984fa6d45ff29f97093a7e907b140e13 | [
"Apache-2.0"
] | 16 | 2018-08-17T09:27:43.000Z | 2022-02-04T17:26:21.000Z | tests/test_timestamp.py | bbc/rd-apmm-python-lib-mediatimestamp | fbf44b11984fa6d45ff29f97093a7e907b140e13 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 British Broadcasting Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 41.539235 | 120 | 0.531751 |
794b14bf5062e91e106ecbadae916020e74b701d | 5,142 | py | Python | official/vision/beta/modeling/decoders/aspp.py | e10101/models | 5c3e08b7697f0035b8731607277dc4e47e18317c | [
"Apache-2.0"
] | 2 | 2017-10-26T06:23:51.000Z | 2020-09-11T21:09:41.000Z | official/vision/beta/modeling/decoders/aspp.py | e10101/models | 5c3e08b7697f0035b8731607277dc4e47e18317c | [
"Apache-2.0"
] | 2 | 2018-06-18T17:08:12.000Z | 2021-04-12T05:39:04.000Z | official/vision/beta/modeling/decoders/aspp.py | e10101/models | 5c3e08b7697f0035b8731607277dc4e47e18317c | [
"Apache-2.0"
] | 2 | 2020-04-11T19:31:17.000Z | 2021-04-07T12:53:28.000Z | # Copyright 2021 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... | 39.860465 | 80 | 0.673668 |
794b14c7dbfa7f61b0c62b98f102325562f10495 | 12,173 | py | Python | create_data.py | daib13/second.pytorch | 31cd538c99e658d44aa97bb51b30d21d8ea8d438 | [
"MIT"
] | null | null | null | create_data.py | daib13/second.pytorch | 31cd538c99e658d44aa97bb51b30d21d8ea8d438 | [
"MIT"
] | null | null | null | create_data.py | daib13/second.pytorch | 31cd538c99e658d44aa97bb51b30d21d8ea8d438 | [
"MIT"
] | null | null | null | import copy
import pathlib
import pickle
import os
import fire
import numpy as np
from skimage import io as imgio
from second.core import box_np_ops
from second.core.point_cloud.point_cloud_ops import bound_points_jit
from second.data import kitti_common as kitti
from second.utils.progress_bar import list_bar as pro... | 39.911475 | 102 | 0.592787 |
794b153ddf01c74ae99c09cb5f5d75dc61825e21 | 1,732 | py | Python | quipuswap/handlers/on_fa12_invest_liquidity.py | xsfunc/tezik-dipdup | 5fc50b0b2e3eadb53b267fed85e72bb30bd8ec61 | [
"MIT"
] | null | null | null | quipuswap/handlers/on_fa12_invest_liquidity.py | xsfunc/tezik-dipdup | 5fc50b0b2e3eadb53b267fed85e72bb30bd8ec61 | [
"MIT"
] | null | null | null | quipuswap/handlers/on_fa12_invest_liquidity.py | xsfunc/tezik-dipdup | 5fc50b0b2e3eadb53b267fed85e72bb30bd8ec61 | [
"MIT"
] | null | null | null | from decimal import Decimal
import quipuswap.models as models
from quipuswap.types.fa12_token.parameter.transfer import TransferParameter
from quipuswap.types.fa12_token.storage import Fa12TokenStorage
from quipuswap.types.quipu_fa12.parameter.invest_liquidity import (
InvestLiquidityParameter,
)
from quipuswap.ty... | 38.488889 | 133 | 0.762702 |
794b153e3c8ddb7fc6d2539cdbd8fd94fe60ccdd | 1,926 | py | Python | datasette/blob_renderer.py | Quentinchampenois/datasette | 13d1228d80c91d382a05b1a9549ed02c300ef851 | [
"Apache-2.0"
] | 1 | 2020-11-03T17:40:11.000Z | 2020-11-03T17:40:11.000Z | datasette/blob_renderer.py | Quentinchampenois/datasette | 13d1228d80c91d382a05b1a9549ed02c300ef851 | [
"Apache-2.0"
] | null | null | null | datasette/blob_renderer.py | Quentinchampenois/datasette | 13d1228d80c91d382a05b1a9549ed02c300ef851 | [
"Apache-2.0"
] | null | null | null | from datasette import hookimpl
from datasette.utils.asgi import Response, BadRequest
from datasette.utils import to_css_class
import hashlib
_BLOB_COLUMN = "_blob_column"
_BLOB_HASH = "_blob_hash"
async def render_blob(datasette, database, rows, columns, request, table, view_name):
if _BLOB_COLUMN not in request... | 31.064516 | 100 | 0.641745 |
794b15b0e7149528568a3fb643c35c8f477c9fe5 | 13,761 | py | Python | gslib/utils/parallelism_framework_util.py | zakrywilson/gsutil | e13bdb44341361a67e43828aabd00999dc74d05d | [
"Apache-2.0"
] | null | null | null | gslib/utils/parallelism_framework_util.py | zakrywilson/gsutil | e13bdb44341361a67e43828aabd00999dc74d05d | [
"Apache-2.0"
] | null | null | null | gslib/utils/parallelism_framework_util.py | zakrywilson/gsutil | e13bdb44341361a67e43828aabd00999dc74d05d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 34.488722 | 80 | 0.729598 |
794b15b9b98f303ae93321d6d0dcf4190dbefd07 | 870 | py | Python | communism.py | mdbecker/python_communism | 23598b3be9461b1ecd1e1e05dab4a5f7bd24d433 | [
"Unlicense"
] | null | null | null | communism.py | mdbecker/python_communism | 23598b3be9461b1ecd1e1e05dab4a5f7bd24d433 | [
"Unlicense"
] | null | null | null | communism.py | mdbecker/python_communism | 23598b3be9461b1ecd1e1e05dab4a5f7bd24d433 | [
"Unlicense"
] | null | null | null | from typing import Iterable, Union
def revolution(to_convert: Union[dict, Iterable]):
import inspect, builtins
__PythonIntrinsicGlobalStructures__ = dir(builtins)
def convert(c):
from types import MethodType
# We must protect the builtin elite to not be affected by the revolution
... | 32.222222 | 88 | 0.62069 |
794b17f4b986639cea5572a09373c7c5d66c3046 | 153 | py | Python | src/virtualenvrunner/_version.py | petrieh/virtualenvrunner | 5764a789e492479812261fbe4982ac0d50c5212f | [
"BSD-3-Clause"
] | null | null | null | src/virtualenvrunner/_version.py | petrieh/virtualenvrunner | 5764a789e492479812261fbe4982ac0d50c5212f | [
"BSD-3-Clause"
] | null | null | null | src/virtualenvrunner/_version.py | petrieh/virtualenvrunner | 5764a789e492479812261fbe4982ac0d50c5212f | [
"BSD-3-Clause"
] | null | null | null | __copyright__ = 'Copyright (C) 2019, Nokia'
VERSION = '1.1'
GITHASH = ''
def get_version():
return VERSION
def get_githash():
return GITHASH
| 12.75 | 43 | 0.666667 |
794b180a5aab333cc9910ae838d4fa2e1e559dcd | 4,540 | py | Python | infer_parser.py | RuiNascimento/infer_parser | 973da3a8dfe5018b5953d41d2ecfdd364f1b80e8 | [
"MIT"
] | null | null | null | infer_parser.py | RuiNascimento/infer_parser | 973da3a8dfe5018b5953d41d2ecfdd364f1b80e8 | [
"MIT"
] | null | null | null | infer_parser.py | RuiNascimento/infer_parser | 973da3a8dfe5018b5953d41d2ecfdd364f1b80e8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
A simple script to automate the use of infer_experiment.py provided in the REsQC package.
Output of infer_experiment.py can be pipep into infer_parser or used as an argument.
Example usage:
infer_experiment -i aligment.sam -r reference.bed | ./infer_parser.py
or
./infer_parser.py infer_expe... | 36.031746 | 212 | 0.648899 |
794b18480b943544f18b789cfe627b267ce66824 | 2,483 | py | Python | release.py | ownrecipes/OwnRecipes | 733e60d4abae59481a33f5663b902a32dda7afdc | [
"MIT"
] | 1 | 2022-03-12T12:23:49.000Z | 2022-03-12T12:23:49.000Z | release.py | ownrecipes/OwnRecipes | 733e60d4abae59481a33f5663b902a32dda7afdc | [
"MIT"
] | 4 | 2022-02-18T15:27:06.000Z | 2022-03-31T10:39:30.000Z | release.py | ownrecipes/OwnRecipes | 733e60d4abae59481a33f5663b902a32dda7afdc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import json
import requests
from requests.auth import HTTPBasicAuth
from secrets.secrets import username, password
def release(_repo, _tag, _name, _target, _body, _draft, _prerelease):
"""
Send a post request to github to log a release.
Then print out the response ... | 25.080808 | 70 | 0.573097 |
794b18b92a2bf24f04f197842bc90711af9b974f | 5,001 | py | Python | tests/test_counter.py | Heiss/py-datatype-redis | db75b94c22a3c5fecb202e9138892c674a62d47f | [
"MIT"
] | null | null | null | tests/test_counter.py | Heiss/py-datatype-redis | db75b94c22a3c5fecb202e9138892c674a62d47f | [
"MIT"
] | 2 | 2020-07-22T08:01:42.000Z | 2020-08-17T11:11:07.000Z | tests/test_counter.py | Heiss/py-datatype-redis | db75b94c22a3c5fecb202e9138892c674a62d47f | [
"MIT"
] | null | null | null | from tests.prepare import BaseTestCase, datatype_redis, unittest
import collections
class CounterTests(BaseTestCase):
def test_value(self):
a = "wagwaan"
b = {"hot": 420, "skull": -9000}
c = collections.Counter(a)
d = datatype_redis.MultiSet(a)
e = collections.Counter(**b)
... | 32.686275 | 74 | 0.570686 |
794b192ae0f0dd6f573334d1884ec9e2cfd331ec | 747 | py | Python | Python/remove-duplicates-from-sorted-array-ii.py | bssrdf/LeetCode-5 | 746df5cff523361145a74d9d429dc541a7b99910 | [
"MIT"
] | 68 | 2018-01-13T07:15:37.000Z | 2022-02-20T12:58:24.000Z | Python/remove-duplicates-from-sorted-array-ii.py | ambershen/LeetCode | 0c53580697b05fadb3981d97bd25f1d9da65fd2f | [
"MIT"
] | 2 | 2021-12-10T01:43:37.000Z | 2021-12-14T21:48:53.000Z | Python/remove-duplicates-from-sorted-array-ii.py | ambershen/LeetCode | 0c53580697b05fadb3981d97bd25f1d9da65fd2f | [
"MIT"
] | 63 | 2017-04-10T03:38:25.000Z | 2022-03-17T23:24:51.000Z | # Time: O(n)
# Space: O(1)
#
# Follow up for "Remove Duplicates":
# What if duplicates are allowed at most twice?
#
# For example,
# Given sorted array A = [1,1,1,2,2,3],
#
# Your function should return length = 5, and A is now [1,1,2,2,3].
#
class Solution:
# @param a list of integers
# @return an integer
... | 23.34375 | 67 | 0.499331 |
794b194c4d5d126c47e8fbb8739f05a11b63d189 | 6,678 | py | Python | tensorflow/python/tpu/tpu_test_wrapper_test.py | kartikburmee25/tensorflow-upstream | 1aecc51dfb26a61cbf32291cfa47e88bc02e4c04 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/tpu/tpu_test_wrapper_test.py | kartikburmee25/tensorflow-upstream | 1aecc51dfb26a61cbf32291cfa47e88bc02e4c04 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/tpu/tpu_test_wrapper_test.py | kartikburmee25/tensorflow-upstream | 1aecc51dfb26a61cbf32291cfa47e88bc02e4c04 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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... | 31.205607 | 145 | 0.742288 |
794b1bb8e4d87704861028b82f6d0f655a6aa6c4 | 845 | py | Python | setup.py | aced-differentiate/dft-input-gen | 14bee323517714c433682bad2dcb897b223dd5ec | [
"Apache-2.0"
] | 1 | 2021-04-15T09:54:52.000Z | 2021-04-15T09:54:52.000Z | setup.py | CitrineInformatics/dft-input-gen | 14bee323517714c433682bad2dcb897b223dd5ec | [
"Apache-2.0"
] | 1 | 2021-01-28T22:12:07.000Z | 2021-01-28T22:12:07.000Z | setup.py | aced-differentiate/dft-input-gen | 14bee323517714c433682bad2dcb897b223dd5ec | [
"Apache-2.0"
] | 2 | 2020-12-08T18:14:13.000Z | 2020-12-18T19:01:11.000Z | import os
from setuptools import setup
from setuptools import find_packages
with open(
os.path.join(
os.path.dirname(__file__), "src", "dftinputgen", "VERSION.txt"
)
) as fr:
version = fr.read().strip()
setup(
name="dftinputgen",
version=version,
description="Unopinionated library to... | 27.258065 | 79 | 0.657988 |
794b1bea3a9df2094b8b5a3e0f65233c8aca150e | 9,428 | py | Python | tutorials/image/imagenet/classify_image.py | JennieYuanChang/object_detection | 289d68d309a6afabc5119600fdb5942509ca9fe8 | [
"Apache-2.0"
] | null | null | null | tutorials/image/imagenet/classify_image.py | JennieYuanChang/object_detection | 289d68d309a6afabc5119600fdb5942509ca9fe8 | [
"Apache-2.0"
] | null | null | null | tutorials/image/imagenet/classify_image.py | JennieYuanChang/object_detection | 289d68d309a6afabc5119600fdb5942509ca9fe8 | [
"Apache-2.0"
] | null | null | null | # 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... | 33.671429 | 90 | 0.700891 |
794b1e34ef6bcc5cf87a180e19b42e89714d9cfc | 22,812 | py | Python | tests/contenttypes_tests/tests.py | kkoralsky/django | 924af638e4d4fb8eb46a19ac0cafcb2e83480cf3 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/contenttypes_tests/tests.py | kkoralsky/django | 924af638e4d4fb8eb46a19ac0cafcb2e83480cf3 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/contenttypes_tests/tests.py | kkoralsky/django | 924af638e4d4fb8eb46a19ac0cafcb2e83480cf3 | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2020-02-06T10:31:51.000Z | 2020-02-06T10:31:51.000Z | import datetime
from unittest import mock
from django.apps.registry import Apps, apps
from django.conf import settings
from django.contrib.contenttypes import management as contenttypes_management
from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.contrib.contenttype... | 42.960452 | 118 | 0.654392 |
794b1e6457a3dc6107c09a9441b4a2f56be9e62a | 2,741 | py | Python | bin/job_log.py | SlavomirMazurPantheon/sdo_analysis | 777fed89dcc098fed5c539c37e5f44c2bfa80c0a | [
"Apache-2.0"
] | null | null | null | bin/job_log.py | SlavomirMazurPantheon/sdo_analysis | 777fed89dcc098fed5c539c37e5f44c2bfa80c0a | [
"Apache-2.0"
] | null | null | null | bin/job_log.py | SlavomirMazurPantheon/sdo_analysis | 777fed89dcc098fed5c539c37e5f44c2bfa80c0a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright The IETF Trust 2020, All Rights Reserved
# This software is licensed to you under the terms of the Apache License, Version 2.0 (the 'License").
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# The code, technical concepts, and all information cont... | 40.910448 | 113 | 0.707406 |
794b1ed353428ceaa551b4f159e11448a0f4c4ad | 2,151 | py | Python | server_guardian/tests/test_settings.py | bitmazk/django-server-guardian | 1b6f642b8aa9abd03ef86f9879432cb0d0260375 | [
"MIT"
] | null | null | null | server_guardian/tests/test_settings.py | bitmazk/django-server-guardian | 1b6f642b8aa9abd03ef86f9879432cb0d0260375 | [
"MIT"
] | null | null | null | server_guardian/tests/test_settings.py | bitmazk/django-server-guardian | 1b6f642b8aa9abd03ef86f9879432cb0d0260375 | [
"MIT"
] | null | null | null | """Settings that need to be set in order to run the tests."""
import os
DEBUG = True
SITE_ID = 1
APP_ROOT = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
DJANGO_PROJECT_ROOT = os.path.join(APP_ROOT, '..')
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'... | 25.305882 | 69 | 0.69549 |
794b1f3af04769f5d19955cd302cb3af26a28a57 | 5,220 | py | Python | tests/test_minihist_title.py | andrzejnovak/boost-histogram | cdbfabb1c22f5545bf3900be01f2025411e699f1 | [
"BSD-3-Clause"
] | 105 | 2019-03-08T14:59:37.000Z | 2022-03-11T12:46:17.000Z | tests/test_minihist_title.py | andrzejnovak/boost-histogram | cdbfabb1c22f5545bf3900be01f2025411e699f1 | [
"BSD-3-Clause"
] | 400 | 2019-03-11T23:10:18.000Z | 2022-03-25T14:02:06.000Z | tests/test_minihist_title.py | andrzejnovak/boost-histogram | cdbfabb1c22f5545bf3900be01f2025411e699f1 | [
"BSD-3-Clause"
] | 25 | 2019-03-11T18:02:31.000Z | 2022-03-10T20:14:22.000Z | # The point of this test is to make sure that the infrastructure for supporting
# custom attributes, like title in Hist, is working.
import pytest
import boost_histogram as bh
# First, make a new family to identify your library
CUSTOM_FAMILY = object()
# Add named axes
class NamedAxesTuple(bh.axis.AxesTuple):
... | 29.162011 | 81 | 0.61705 |
794b1f77e3d869b0a0e4610732fdf537233ff493 | 3,829 | py | Python | tests/conftest.py | pmrowla/scmrepo | 4f33b3558d802bfb0f33992f83e5d72cccf50c5b | [
"Apache-2.0"
] | 8 | 2021-11-26T05:45:20.000Z | 2022-03-04T09:27:28.000Z | tests/conftest.py | pmrowla/scmrepo | 4f33b3558d802bfb0f33992f83e5d72cccf50c5b | [
"Apache-2.0"
] | 24 | 2021-11-26T03:40:26.000Z | 2022-03-29T04:11:09.000Z | tests/conftest.py | pmrowla/scmrepo | 4f33b3558d802bfb0f33992f83e5d72cccf50c5b | [
"Apache-2.0"
] | 5 | 2021-12-06T02:50:57.000Z | 2021-12-27T12:02:37.000Z | import asyncio
import os
import subprocess
import sys
from typing import Any, AsyncIterator, Dict, Iterator
import asyncssh
import pygit2
import pytest
from pytest_test_utils import TempDirFactory, TmpDir
from scmrepo.git import Git
TEST_SSH_USER = "user"
TEST_SSH_KEY_PATH = os.path.join(
os.path.abspath(os.path... | 27.35 | 79 | 0.662575 |
794b1fc41d299cc1fb99325307ba687caf8a73c2 | 18,441 | py | Python | apifetch/jsonc/Canonicalize.py | matrey/apifetch | c32e6b00dd18e8b00948f4b7eef390bdb621e62d | [
"Apache-2.0"
] | null | null | null | apifetch/jsonc/Canonicalize.py | matrey/apifetch | c32e6b00dd18e8b00948f4b7eef390bdb621e62d | [
"Apache-2.0"
] | null | null | null | apifetch/jsonc/Canonicalize.py | matrey/apifetch | c32e6b00dd18e8b00948f4b7eef390bdb621e62d | [
"Apache-2.0"
] | null | null | null | # From https://raw.githubusercontent.com/cyberphone/json-canonicalization/472e9e142de304b5b7c4be0fec6016fbe3531098/python3/src/org/webpki/json/Canonicalize.py
##############################################################################
# #
# ... | 35.327586 | 158 | 0.527737 |
794b202049eb7db557e22ec2af28478e1271df92 | 5,195 | py | Python | totkn/test/test_totkn.py | powellquiring/pycli | ecc5beec84833b978dfa41259ab3ac306617fc55 | [
"Apache-2.0"
] | null | null | null | totkn/test/test_totkn.py | powellquiring/pycli | ecc5beec84833b978dfa41259ab3ac306617fc55 | [
"Apache-2.0"
] | 2 | 2021-04-06T18:19:56.000Z | 2021-06-02T03:28:55.000Z | totkn/test/test_totkn.py | powellquiring/pycli | ecc5beec84833b978dfa41259ab3ac306617fc55 | [
"Apache-2.0"
] | null | null | null | from totkn import *
import totkn
import pytest
import click
import yaml
import attr
def test_syntax() -> None:
p = Pipeline(name="pl")
s = p.to_yaml()
click.echo(s)
def verify(expected, tekton_obj) -> None:
if type(expected) == str:
expected = yaml.load(expected, Loader=yaml.SafeLoader)
... | 21.032389 | 78 | 0.621944 |
794b2104592feb626c66a9e626caf3f468464b2a | 5,572 | py | Python | huaweicloud-sdk-sms/huaweicloudsdksms/v3/model/volume_groups.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-sms/huaweicloudsdksms/v3/model/volume_groups.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-sms/huaweicloudsdksms/v3/model/volume_groups.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class VolumeGroups:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is at... | 24.986547 | 100 | 0.554738 |
794b223a5f6cbcf3524333c7a298307f5527ee8f | 664 | py | Python | estore_project/users/tests/test_urls.py | Jawayria/estore_project | ad0c2f30b9a4d8a02b37ea29dfb2259635c55517 | [
"MIT"
] | null | null | null | estore_project/users/tests/test_urls.py | Jawayria/estore_project | ad0c2f30b9a4d8a02b37ea29dfb2259635c55517 | [
"MIT"
] | 1 | 2021-05-19T06:41:50.000Z | 2021-05-19T06:41:50.000Z | estore_project/users/tests/test_urls.py | Jawayria/estore_project | ad0c2f30b9a4d8a02b37ea29dfb2259635c55517 | [
"MIT"
] | null | null | null | import pytest
from django.urls import resolve, reverse
from estore_project.users.models import User
pytestmark = pytest.mark.django_db
def test_detail(user: User):
assert (
reverse("users:detail", kwargs={"username": user.username})
== f"/users/{user.username}/"
)
assert resolve(f"/users... | 26.56 | 74 | 0.679217 |
794b2268f3c910fddebc9c4d3e9f66fe1d1fa7ba | 772 | py | Python | backend/Backendapi/bookdata/migrations/0020_notecomment.py | f0rdream/SkyRead | 798b4dd35b7e6be41e5fed4537d3f6034d20494e | [
"MIT"
] | null | null | null | backend/Backendapi/bookdata/migrations/0020_notecomment.py | f0rdream/SkyRead | 798b4dd35b7e6be41e5fed4537d3f6034d20494e | [
"MIT"
] | null | null | null | backend/Backendapi/bookdata/migrations/0020_notecomment.py | f0rdream/SkyRead | 798b4dd35b7e6be41e5fed4537d3f6034d20494e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('bookdata', '0019_note_shared'),
]
... | 29.692308 | 114 | 0.612694 |
794b239d7aeac4ed946beb44757762101f798569 | 997 | py | Python | apps/incidents/migrations/0002_auto_20181122_1103.py | seanlefevre/openduty | 34ab21117f114ccc808d8b0aa2cb801c819bdb86 | [
"MIT"
] | 145 | 2016-04-11T06:53:13.000Z | 2022-03-22T05:15:49.000Z | apps/incidents/migrations/0002_auto_20181122_1103.py | seanlefevre/openduty | 34ab21117f114ccc808d8b0aa2cb801c819bdb86 | [
"MIT"
] | 78 | 2017-09-24T10:59:49.000Z | 2022-02-12T07:36:27.000Z | apps/incidents/migrations/0002_auto_20181122_1103.py | seanlefevre/openduty | 34ab21117f114ccc808d8b0aa2cb801c819bdb86 | [
"MIT"
] | 30 | 2016-04-11T06:53:16.000Z | 2021-12-29T11:39:26.000Z | # Generated by Django 2.1.3 on 2018-11-22 11:03
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('services', '0001_initial'),
('incidents', '0001_initial'),
]
operations = [
mig... | 31.15625 | 183 | 0.633902 |
794b2406f92c554dd6278e54904d215536ab9642 | 5,647 | py | Python | locust/locustfiles/locustfile.py | tojatos/laser-tactics | 538bef7ab03bf35c0ef27e195001f6f7f12c1ba4 | [
"MIT"
] | 2 | 2021-12-12T03:45:18.000Z | 2021-12-21T03:53:23.000Z | locust/locustfiles/locustfile.py | tojatos/laser-tactics | 538bef7ab03bf35c0ef27e195001f6f7f12c1ba4 | [
"MIT"
] | 1 | 2022-03-26T15:13:29.000Z | 2022-03-26T15:13:29.000Z | locust/locustfiles/locustfile.py | tojatos/laser-tactics | 538bef7ab03bf35c0ef27e195001f6f7f12c1ba4 | [
"MIT"
] | null | null | null | import csv
import time
from json import JSONDecodeError
from random import choice
import requests
from locust import TaskSet, task, HttpUser, between
import logging
# TODO figure out how to do setup for entire process?
with open('../testdata.csv', 'r+') as f_uc:
reader = csv.reader(f_uc, )
next(reader, None)
... | 33.217647 | 117 | 0.573225 |
794b245680d3e5c55ac94f0297107e6ab5dc39c1 | 44,407 | py | Python | lib/listeners/redirector.py | Gui-Luz/Empire | 6f5eeff5f46dd085e1317cb09b39853a2fce5d13 | [
"BSD-3-Clause"
] | 5,720 | 2017-02-02T13:59:40.000Z | 2022-03-31T09:50:10.000Z | lib/listeners/redirector.py | VookiBoo/Empire | 5aae31e7de591282773d2c8498af04ee4e8778f5 | [
"BSD-3-Clause"
] | 866 | 2017-02-02T10:56:31.000Z | 2020-01-17T07:47:05.000Z | lib/listeners/redirector.py | VookiBoo/Empire | 5aae31e7de591282773d2c8498af04ee4e8778f5 | [
"BSD-3-Clause"
] | 2,181 | 2017-02-04T10:28:41.000Z | 2022-03-31T04:36:56.000Z | import base64
import random
import copy
# Empire imports
from lib.common import helpers
from lib.common import agents
from lib.common import encryption
from lib.common import packets
from lib.common import messages
class Listener:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name... | 46.94186 | 260 | 0.50197 |
794b24ae713e7d84056524237c695218ae3544ad | 754 | py | Python | grimoirebots/urls.py | jjmerchante/grimoirebots | afa0a70ecbb169ba49302cc7bc8c6577bebba5ca | [
"MIT"
] | 1 | 2022-02-28T11:44:07.000Z | 2022-02-28T11:44:07.000Z | grimoirebots/urls.py | jjmerchante/grimoirebots | afa0a70ecbb169ba49302cc7bc8c6577bebba5ca | [
"MIT"
] | null | null | null | grimoirebots/urls.py | jjmerchante/grimoirebots | afa0a70ecbb169ba49302cc7bc8c6577bebba5ca | [
"MIT"
] | 1 | 2022-03-09T08:57:15.000Z | 2022-03-09T08:57:15.000Z | """grimoirebots URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-... | 34.272727 | 77 | 0.710875 |
794b2505e1f910557d3cc0cafbffbfe6b781adb9 | 918 | py | Python | gevir_website/urls.py | gevirank/gevir_website | e5b43daa5ed64af7e1bba3d602ed21e43f5bc131 | [
"MIT"
] | null | null | null | gevir_website/urls.py | gevirank/gevir_website | e5b43daa5ed64af7e1bba3d602ed21e43f5bc131 | [
"MIT"
] | null | null | null | gevir_website/urls.py | gevirank/gevir_website | e5b43daa5ed64af7e1bba3d602ed21e43f5bc131 | [
"MIT"
] | 1 | 2021-05-19T01:41:27.000Z | 2021-05-19T01:41:27.000Z | """gevir_website URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Cl... | 35.307692 | 79 | 0.700436 |
794b25c0debf1e227c7f9bb1beefbc5a82a40a46 | 1,326 | py | Python | leetcode/google/tagged/medium/permutation.py | alvinctk/google-tech-dev-guide | 9d7759bea1f44673c2de4f25a94b27368928a59f | [
"Apache-2.0"
] | 26 | 2019-06-07T05:29:47.000Z | 2022-03-19T15:32:27.000Z | leetcode/google/tagged/medium/permutation.py | alvinctk/google-tech-dev-guide | 9d7759bea1f44673c2de4f25a94b27368928a59f | [
"Apache-2.0"
] | null | null | null | leetcode/google/tagged/medium/permutation.py | alvinctk/google-tech-dev-guide | 9d7759bea1f44673c2de4f25a94b27368928a59f | [
"Apache-2.0"
] | 6 | 2019-10-10T06:39:28.000Z | 2020-05-12T19:50:55.000Z | from typing import List
class Solution:
def permute(self, nums: List[int]) -> List[List[int]]:
"""
Time Complexity: O(Summation of P(N, k))
The algorithm is faster than O(N * N!), but slower than O(N!).
P(N, k) := permutation of k elements out of N elements.
P(N, k) = N!/(N... | 31.571429 | 94 | 0.534691 |
794b26336ef5eeb9b5532069f0e0909079ea6630 | 441 | py | Python | env/lib/python3.8/site-packages/plotly/validators/surface/contours/y/_end.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/surface/contours/y/_end.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/surface/contours/y/_end.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class EndValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="end", parent_name="surface.contours.y", **kwargs):
super(EndValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 33.923077 | 86 | 0.648526 |
794b26bf2ffc1eb4323aacd654d2351d84033007 | 14,599 | py | Python | python/redish_pb2_grpc.py | kitchen/redish | cb4f1275d9ec3313ed3f12a9dd3be13fb85aae67 | [
"MIT"
] | null | null | null | python/redish_pb2_grpc.py | kitchen/redish | cb4f1275d9ec3313ed3f12a9dd3be13fb85aae67 | [
"MIT"
] | null | null | null | python/redish_pb2_grpc.py | kitchen/redish | cb4f1275d9ec3313ed3f12a9dd3be13fb85aae67 | [
"MIT"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import redish_pb2 as redish__pb2
class RedishStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
sel... | 39.456757 | 72 | 0.722447 |
794b277ae34addcd956bb2c9cc870a95e6a8c990 | 3,073 | py | Python | setup.py | JaphetSamuel/django-mobile | 17ebc0ed01f5495c4087633336bd9cf5276de793 | [
"BSD-3-Clause"
] | 254 | 2015-01-09T23:39:22.000Z | 2021-11-22T17:47:34.000Z | setup.py | JaphetSamuel/django-mobile | 17ebc0ed01f5495c4087633336bd9cf5276de793 | [
"BSD-3-Clause"
] | 40 | 2015-02-06T00:09:56.000Z | 2020-12-20T03:38:25.000Z | setup.py | JaphetSamuel/django-mobile | 17ebc0ed01f5495c4087633336bd9cf5276de793 | [
"BSD-3-Clause"
] | 106 | 2015-01-16T08:52:34.000Z | 2022-03-08T00:51:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import os
import sys
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), 'README.rst')
CHANGES_PATH = os.path.join(os.path.dirname(__file__), 'CHANGES.rst')
def readfile(filename):
if sys.version_info[0] >= 3:
return ... | 29.548077 | 102 | 0.631305 |
794b27fbfb7877bad7a6f48828244e7cf0f12306 | 3,895 | py | Python | spook/views.py | pablo-moreno/django_spook | 0d63628abbd530ac5b31f7abb4845fef500bdfb1 | [
"MIT"
] | 2 | 2021-05-18T14:24:27.000Z | 2021-06-09T10:47:32.000Z | spook/views.py | pablo-moreno/django_spook | 0d63628abbd530ac5b31f7abb4845fef500bdfb1 | [
"MIT"
] | 4 | 2020-09-28T19:23:09.000Z | 2021-11-17T16:26:51.000Z | spook/views.py | pablo-moreno/django_spook | 0d63628abbd530ac5b31f7abb4845fef500bdfb1 | [
"MIT"
] | null | null | null | from typing import Type
from rest_framework.generics import (
ListAPIView,
RetrieveAPIView,
CreateAPIView,
UpdateAPIView,
DestroyAPIView,
)
from rest_framework.response import Response
from .resources import APIResource
from .validators import InputValidator
class APIResourceMixin(o... | 30.912698 | 96 | 0.644159 |
794b28159699b608333e89ada169a4226dcf2eb2 | 5,132 | py | Python | tests/checkpoint/conftest.py | arunnthevapalan/great_expectations | 97f1481bcd1c3f4d8878c6f383f4e6f008b20cd1 | [
"Apache-2.0"
] | 1 | 2022-03-17T08:05:44.000Z | 2022-03-17T08:05:44.000Z | tests/checkpoint/conftest.py | arunnthevapalan/great_expectations | 97f1481bcd1c3f4d8878c6f383f4e6f008b20cd1 | [
"Apache-2.0"
] | null | null | null | tests/checkpoint/conftest.py | arunnthevapalan/great_expectations | 97f1481bcd1c3f4d8878c6f383f4e6f008b20cd1 | [
"Apache-2.0"
] | null | null | null | import os
import shutil
import pytest
from great_expectations import DataContext
from great_expectations.core import ExpectationConfiguration
from great_expectations.data_context.util import file_relative_path
@pytest.fixture
def titanic_pandas_data_context_stats_enabled_and_expectation_suite_with_one_expectation(
... | 36.397163 | 126 | 0.616329 |
794b28f6197c31aceca25bee0681f8e8ee7a6fb7 | 225 | py | Python | tests/edge_walk/auto_gen/data/const.py | muzudho/state-machine-py | f8f442c88fcc16db07960ffccc5e466bf20d9a11 | [
"MIT"
] | null | null | null | tests/edge_walk/auto_gen/data/const.py | muzudho/state-machine-py | f8f442c88fcc16db07960ffccc5e466bf20d9a11 | [
"MIT"
] | null | null | null | tests/edge_walk/auto_gen/data/const.py | muzudho/state-machine-py | f8f442c88fcc16db07960ffccc5e466bf20d9a11 | [
"MIT"
] | null | null | null | MACHINE_A = 'MachineA'
INIT = 'Init'
THIS = 'This'
IS = 'Is'
A = 'A'
GOAL = 'Goal'
E_LOOPBACK = ''
E_THAT = 'that'
E_THIS = 'this'
E_WAS = 'was'
E_IS = 'is'
E_AN = 'an'
E_A = 'a'
E_PIN = 'pin'
E_PEN = 'pen'
E_RETRY = 'retry'
| 13.235294 | 22 | 0.573333 |
794b290e7e3fd9f574ccdd3b0646eab09e7158b8 | 1,530 | py | Python | recipes/site_listers/bonappetit.py | cfeenstra67/recipes | a2d296500b4ff70e11ff3177a1092a033498f82a | [
"MIT"
] | null | null | null | recipes/site_listers/bonappetit.py | cfeenstra67/recipes | a2d296500b4ff70e11ff3177a1092a033498f82a | [
"MIT"
] | null | null | null | recipes/site_listers/bonappetit.py | cfeenstra67/recipes | a2d296500b4ff70e11ff3177a1092a033498f82a | [
"MIT"
] | null | null | null | import logging
import re
from typing import Iterator
from urllib.parse import urljoin, urlparse
import scrapy
from lxml import etree
from recipes.site_listers.base import PageCallback, SiteLister
LOGGER = logging.getLogger(__name__)
class BonAppetitLister(SiteLister):
""" """
start_url = "https://www.bon... | 34 | 88 | 0.64902 |
794b298d1de13fea56b8459ae3eb0285035d6ea0 | 4,175 | py | Python | server/booking_portal/admin/slot.py | ujjwal-raizada/lab-booking-system | 4eed0941104d635d90ed74d31f30e2698474a9ea | [
"MIT"
] | null | null | null | server/booking_portal/admin/slot.py | ujjwal-raizada/lab-booking-system | 4eed0941104d635d90ed74d31f30e2698474a9ea | [
"MIT"
] | 5 | 2020-02-02T15:41:48.000Z | 2020-12-15T08:43:25.000Z | server/booking_portal/admin/slot.py | ujjwal-raizada/lab-booking-system | 4eed0941104d635d90ed74d31f30e2698474a9ea | [
"MIT"
] | 5 | 2020-01-10T16:29:15.000Z | 2022-01-07T05:30:19.000Z | import datetime
from django.contrib import admin, messages
from django.contrib.auth.decorators import user_passes_test
from django.shortcuts import redirect, render
from django.urls import path
from django.utils.translation import gettext_lazy
from rangefilter.filter import DateRangeFilter
from .. import permissions
... | 35.683761 | 121 | 0.631138 |
794b29abeaea6270c86e717d785cbd7e129be793 | 14,746 | py | Python | venv/lib/python3.7/site-packages/importlib_metadata/__init__.py | melyxlin/sailor-moon-api | cb665a15fb5f13632773a0049cf18fec783a1fcd | [
"MIT"
] | 6 | 2019-09-02T02:44:44.000Z | 2020-06-22T12:04:02.000Z | venv/lib/python3.7/site-packages/importlib_metadata/__init__.py | melyxlin/sailor-moon-api | cb665a15fb5f13632773a0049cf18fec783a1fcd | [
"MIT"
] | 2 | 2019-12-26T17:31:57.000Z | 2020-01-06T19:45:26.000Z | venv/lib/python3.7/site-packages/importlib_metadata/__init__.py | melyxlin/sailor-moon-api | cb665a15fb5f13632773a0049cf18fec783a1fcd | [
"MIT"
] | 1 | 2019-08-20T18:11:48.000Z | 2019-08-20T18:11:48.000Z | from __future__ import unicode_literals, absolute_import
import io
import os
import re
import abc
import csv
import sys
import zipp
import operator
import functools
import itertools
import collections
from ._compat import (
install,
NullFinder,
ConfigParser,
suppress,
map,
FileNotFoundError,
... | 30.784969 | 79 | 0.63624 |
794b2ac278a7f4a1eaf1963e0a8790a379fb5fbe | 1,966 | py | Python | share/UNCLEAN/parse_ruby.py | racker/zeroclickinfo-fathead | 600fdf04fbf47b4035cc5451f245c87979446754 | [
"Apache-2.0"
] | 1 | 2021-01-05T16:48:23.000Z | 2021-01-05T16:48:23.000Z | share/UNCLEAN/parse_ruby.py | yanirs/zeroclickinfo-fathead | c06003560ef3368da5857df301938aad549a7d6b | [
"Apache-2.0"
] | null | null | null | share/UNCLEAN/parse_ruby.py | yanirs/zeroclickinfo-fathead | c06003560ef3368da5857df301938aad549a7d6b | [
"Apache-2.0"
] | 1 | 2016-06-12T06:12:02.000Z | 2016-06-12T06:12:02.000Z | from BeautifulSoup import BeautifulSoup
import re
import os
import sys
import string
openclosetags = re.compile('''<.*?>|</.*?>''',re.DOTALL)
files = []
for file in os.listdir('./docs/ruby/'):
if '_' not in file:
files.append('./docs/ruby/%s'%(file))
for file in files:
filecontents = ''
filecontents = open... | 30.71875 | 269 | 0.589013 |
794b2af3ce265c1b724eb6e899cc24752b9cff73 | 34,371 | py | Python | model/torch_gpt2.py | kimhyoil/KoGPT2_Ai_Eassay | da7d160f6815dc8ec3dfd635495978409c2a897c | [
"MIT"
] | 77 | 2020-04-16T01:42:39.000Z | 2022-03-09T00:51:23.000Z | model/torch_gpt2.py | kimhyoil/KoGPT2_Ai_Eassay | da7d160f6815dc8ec3dfd635495978409c2a897c | [
"MIT"
] | 9 | 2020-04-21T12:45:22.000Z | 2021-01-29T06:17:19.000Z | model/torch_gpt2.py | kimhyoil/KoGPT2_Ai_Eassay | da7d160f6815dc8ec3dfd635495978409c2a897c | [
"MIT"
] | 20 | 2020-04-19T20:56:18.000Z | 2022-03-09T00:53:20.000Z | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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... | 46.826975 | 148 | 0.646999 |
794b2b4b5a82e5248f00f203dddc1d80fd4b8f1a | 52,504 | py | Python | utils.py | liuqk3/BigGAN-PyTorch | 9b4491f5d68f34a1fe55bc0e8171fa3d3ad7bb08 | [
"MIT"
] | null | null | null | utils.py | liuqk3/BigGAN-PyTorch | 9b4491f5d68f34a1fe55bc0e8171fa3d3ad7bb08 | [
"MIT"
] | null | null | null | utils.py | liuqk3/BigGAN-PyTorch | 9b4491f5d68f34a1fe55bc0e8171fa3d3ad7bb08 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
''' Utilities file
This file contains utility functions for bookkeeping, logging, and data loading.
Methods which directly affect training should either go in layers, the model,
or train_fns.py.
'''
from __future__ import print_function
import sys
import os
import numpy a... | 41.27673 | 109 | 0.647665 |
794b2bcd1edf31cf42f4e4fdf0deed65e35d3dd5 | 292 | py | Python | slimbb/sitemap.py | hsoft/slimbb | 763cb9e0f3daacdcba5cb2b913600a6351ea88e2 | [
"BSD-3-Clause"
] | 1 | 2016-09-04T20:11:17.000Z | 2016-09-04T20:11:17.000Z | slimbb/sitemap.py | hsoft/slimbb | 763cb9e0f3daacdcba5cb2b913600a6351ea88e2 | [
"BSD-3-Clause"
] | null | null | null | slimbb/sitemap.py | hsoft/slimbb | 763cb9e0f3daacdcba5cb2b913600a6351ea88e2 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.sitemaps import Sitemap
from .models import Forum, Topic
class SitemapForum(Sitemap):
priority = 0.5
def items(self):
return Forum.objects.all()
class SitemapTopic(Sitemap):
priority = 0.5
def items(self):
return Topic.objects.all()
| 16.222222 | 43 | 0.678082 |
794b2bfe8fa481966e81921d4dd2a2b1270d0e22 | 513 | py | Python | packages/python/plotly/plotly/validators/parcoords/line/_colorscale.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/parcoords/line/_colorscale.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/parcoords/line/_colorscale.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator):
def __init__(
self, plotly_name="colorscale", parent_name="parcoords.line", **kwargs
):
super(ColorscaleValidator, self).__init__(
plotly_name=plotly_name,
p... | 34.2 | 81 | 0.662768 |
794b2c650b06970b7d6e2a53648676d37bdaf727 | 2,152 | py | Python | backend/src/app.py | gbernardino/RVparcellation | d6068f22eea4fe045f5ce7e19a54344c91a0090f | [
"MIT"
] | null | null | null | backend/src/app.py | gbernardino/RVparcellation | d6068f22eea4fe045f5ce7e19a54344c91a0090f | [
"MIT"
] | null | null | null | backend/src/app.py | gbernardino/RVparcellation | d6068f22eea4fe045f5ce7e19a54344c91a0090f | [
"MIT"
] | null | null | null | from flask import Flask, send_file, jsonify
from flask_restful import Resource, Api, request
from flask_cors import CORS
import sys, os, pathlib
import computeRegionalVolumeDynamics, utilities
app = Flask(__name__)
api = Api(app)
CORS(app)
@app.route('/computePartitionSingleIndividual', methods = [ 'POST'])
def comput... | 39.851852 | 165 | 0.681227 |
794b2cb012281b930eee070328c0784a7d017d4d | 911 | py | Python | pworm/data.py | emuggie/serverlease-python | 88999823132fc60b400991b0b9c0a34feeb686ee | [
"BSD-3-Clause"
] | null | null | null | pworm/data.py | emuggie/serverlease-python | 88999823132fc60b400991b0b9c0a34feeb686ee | [
"BSD-3-Clause"
] | null | null | null | pworm/data.py | emuggie/serverlease-python | 88999823132fc60b400991b0b9c0a34feeb686ee | [
"BSD-3-Clause"
] | null | null | null | """
"""
class Stack :
def __init__(self, max = -1):
self._list = []
self._max = max
def get(self) :
if 0 == len(self._list):
raise IndexError()
return self._list.pop()
def put(self, *values):
if self._max > 0 and self.size() + len(values) > self._m... | 21.186047 | 68 | 0.500549 |
794b2e5e0810f7111fccbab3f1545c92a4498782 | 18,850 | py | Python | test/functional/rpc_blockchain.py | tryphe/bitcoin | da1c0c64fd094880712d1c4167ad9eb3bb6ffcc6 | [
"MIT"
] | 1 | 2021-08-23T05:28:07.000Z | 2021-08-23T05:28:07.000Z | test/functional/rpc_blockchain.py | GoodGooGleINS/bitcoin | 71797beec54d36a055d5e172ecbf2141fa984428 | [
"MIT"
] | null | null | null | test/functional/rpc_blockchain.py | GoodGooGleINS/bitcoin | 71797beec54d36a055d5e172ecbf2141fa984428 | [
"MIT"
] | 1 | 2021-08-01T02:56:10.000Z | 2021-08-01T02:56:10.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPCs related to blockchainstate.
Test the following RPCs:
- getblockchaininfo
- getchaint... | 41.796009 | 257 | 0.649973 |
794b30f9d5f596015058b0eedfbe781de00ec979 | 1,518 | py | Python | rapidtide/tests/test_fullrunhappy_v1.py | bbfrederick/rapidtide | ddd1899a93fafd550feb134debdd028bbba8c853 | [
"Apache-2.0"
] | 44 | 2017-01-19T10:12:39.000Z | 2022-02-08T05:43:58.000Z | rapidtide/tests/test_fullrunhappy_v1.py | bbfrederick/delaytools | 190d79ae4c19317dfce38a528e43fd05459f29a5 | [
"Apache-2.0"
] | 70 | 2018-05-02T14:35:45.000Z | 2022-03-18T17:43:33.000Z | rapidtide/tests/test_fullrunhappy_v1.py | bbfrederick/delaytools | 190d79ae4c19317dfce38a528e43fd05459f29a5 | [
"Apache-2.0"
] | 12 | 2019-02-12T20:40:27.000Z | 2021-06-16T13:28:21.000Z | #!/usr/bin/env python
# -*- coding: latin-1 -*-
#
# Copyright 2016-2021 Blaise Frederick
#
# 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/LICEN... | 29.764706 | 88 | 0.700922 |
794b31c8adfa189efdf1d8599651274f6d8f568e | 2,045 | py | Python | TabNine.py | fearoffish/tabnine-sublime | 8ded738a0713546aa36bd61e36460d335e6e1320 | [
"MIT"
] | null | null | null | TabNine.py | fearoffish/tabnine-sublime | 8ded738a0713546aa36bd61e36460d335e6e1320 | [
"MIT"
] | null | null | null | TabNine.py | fearoffish/tabnine-sublime | 8ded738a0713546aa36bd61e36460d335e6e1320 | [
"MIT"
] | null | null | null | import sublime_plugin
import sublime
import sys
_is_ST3 = int(sublime.version()) >= 3114
if _is_ST3:
# Clear module cache to force reloading all modules of this package.
# See https://github.com/emmetio/sublime-text-plugin/issues/35
prefix = __package__ + "." # don't clear the base package
for module... | 30.984848 | 80 | 0.696333 |
794b33b6d3be04c7903d1da2075c7592d2fecfdf | 15,111 | py | Python | stackstac/stack.py | RichardScottOZ/stackstac | 9e7ba8e76fe0749c3a931adda3e2074dcf8f43d6 | [
"MIT"
] | null | null | null | stackstac/stack.py | RichardScottOZ/stackstac | 9e7ba8e76fe0749c3a931adda3e2074dcf8f43d6 | [
"MIT"
] | null | null | null | stackstac/stack.py | RichardScottOZ/stackstac | 9e7ba8e76fe0749c3a931adda3e2074dcf8f43d6 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import AbstractSet, List, Literal, Optional, Sequence, Type, Union
import numpy as np
import xarray as xr
import dask
from rasterio.enums import Resampling
from .prepare import prepare_items, to_attrs, to_coords
from .raster_spec import Bbox, IntFloat, Resolutions
from ... | 49.061688 | 117 | 0.666733 |
794b35d6564a5c310e9eae4a86714dff5817b1c4 | 16,319 | py | Python | apim-migration-testing-tool/Python/venv/lib/python3.6/site-packages/pip/_internal/vcs/__init__.py | tharindu1st/apim-migration-resources | dd68aa8c53cf310392bb72e699dd24c57b109cfb | [
"Apache-2.0"
] | 69 | 2019-02-18T12:07:35.000Z | 2022-03-12T10:38:32.000Z | venv/lib/python3.7/site-packages/pip/_internal/vcs/__init__.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 64 | 2020-04-16T13:35:27.000Z | 2022-03-31T04:37:41.000Z | venv/lib/python3.7/site-packages/pip/_internal/vcs/__init__.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 78 | 2020-06-19T09:41:01.000Z | 2022-02-05T00:13:29.000Z | """Handles all VCS (version control) support"""
from __future__ import absolute_import
import errno
import logging
import os
import shutil
import sys
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._internal.exceptions import BadCommand
from pip._internal.utils.misc import (
display_path,... | 31.998039 | 78 | 0.57001 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.