hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0d8382878dbce6ddf7ce8ce123d7a9ded47e0a2c | 2,640 | py | Python | HW4-3/lib/agent/preprocess.py | b05611038/MLDS_2019SPRING | 0591a1a6f461da0a02b9e1b83f37ad3579f36f4d | [
"MIT"
] | 3 | 2019-06-20T06:47:30.000Z | 2021-11-05T03:16:37.000Z | HW4-3/lib/agent/preprocess.py | b05611038/MLDS_2019SPRING | 0591a1a6f461da0a02b9e1b83f37ad3579f36f4d | [
"MIT"
] | null | null | null | HW4-3/lib/agent/preprocess.py | b05611038/MLDS_2019SPRING | 0591a1a6f461da0a02b9e1b83f37ad3579f36f4d | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torchvision
import torchvision.transforms as T
from PIL import Image
#transform dictionary format pass in the class
# {'implenmented string': True}
class Transform(object):
def __init__(self, preprocess_dict, device):
self.implemented_list = self.implenmented()
... | 33 | 92 | 0.655303 | 2,448 | 0.927273 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.125 |
0d8574f7ced18f33ce95753ea49a9e803ee9d3c1 | 120 | py | Python | 5 Python Projects in 5 mins/Figlet.py | SaiAshish-Konchada/Python-Projects-for-Beginners | bce0a705b636a1090b56f59205c6acb94ab2e54a | [
"MIT"
] | 5 | 2021-01-19T18:32:13.000Z | 2021-05-03T05:19:11.000Z | 5 Python Projects in 5 mins/Figlet.py | SaiAshish-Konchada/Python-Projects-for-Beginners | bce0a705b636a1090b56f59205c6acb94ab2e54a | [
"MIT"
] | null | null | null | 5 Python Projects in 5 mins/Figlet.py | SaiAshish-Konchada/Python-Projects-for-Beginners | bce0a705b636a1090b56f59205c6acb94ab2e54a | [
"MIT"
] | 2 | 2021-05-22T13:35:51.000Z | 2021-08-31T07:05:32.000Z | # import pyfiglet module
import pyfiglet
result = pyfiglet.figlet_format("Sai Ashish", font = "slant")
print(result)
| 20 | 61 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.366667 |
0d85982226b16dae26e630785d3d4d131cf804a0 | 10,110 | py | Python | api/util/paylib/alipayapi.py | edisonlz/fastor | 342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3 | [
"Apache-2.0"
] | 285 | 2019-12-23T09:50:21.000Z | 2021-12-08T09:08:49.000Z | api/util/paylib/alipayapi.py | jeckun/fastor | 342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3 | [
"Apache-2.0"
] | null | null | null | api/util/paylib/alipayapi.py | jeckun/fastor | 342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3 | [
"Apache-2.0"
] | 9 | 2019-12-23T12:59:25.000Z | 2022-03-15T05:12:11.000Z | # -*- coding: utf-8 -*-
import urllib
import hashlib
import urllib2
import logging
import os,sys
import base64
from datetime import datetime
import json
import logging
import urllib
class AliPayConfig(object):
"""
支付宝 公共配置
"""
APP_ID = '' #appid
precreate_GATEWAY="https://openapi.alipay.com/gatew... | 27.104558 | 112 | 0.561227 | 10,774 | 0.980167 | 0 | 0 | 0 | 0 | 0 | 0 | 3,440 | 0.312955 |
0d883a2bfdddbed4a07d5a8b567441b596d8ba08 | 3,658 | py | Python | DQM/TrackingMonitorSource/python/pset4GenericTriggerEventFlag_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:24:46.000Z | 2021-11-30T16:24:46.000Z | DQM/TrackingMonitorSource/python/pset4GenericTriggerEventFlag_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 4 | 2021-11-29T13:57:56.000Z | 2022-03-29T06:28:36.000Z | DQM/TrackingMonitorSource/python/pset4GenericTriggerEventFlag_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-23T09:25:45.000Z | 2021-11-23T09:25:45.000Z | import FWCore.ParameterSet.Config as cms
genericTriggerEventFlag4fullTracker = cms.PSet(
andOr = cms.bool( False ),
dcsInputTag = cms.InputTag( "scalersRawToDigi" ),
dcsRecordInputTag = cms.InputTag("onlineMetaDataDigis"),
dcsPartitions = cms.vint32 ( 24, 25, 26, 27, 28, 29 ),
andOrDcs = ... | 44.609756 | 80 | 0.667031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 801 | 0.218972 |
0d88fd8f7b8ecb88133d8ec5e772645139507eaa | 4,557 | py | Python | py/desigal/sky.py | biprateep/DESI-stack | 368e5d93e663b303ce93af55836c94265d5baa3a | [
"MIT"
] | 1 | 2022-01-27T15:46:14.000Z | 2022-01-27T15:46:14.000Z | py/desigal/sky.py | biprateep/DESI-stack | 368e5d93e663b303ce93af55836c94265d5baa3a | [
"MIT"
] | null | null | null | py/desigal/sky.py | biprateep/DESI-stack | 368e5d93e663b303ce93af55836c94265d5baa3a | [
"MIT"
] | null | null | null | import os
import multiprocessing
from pathlib import Path
from joblib import Parallel, delayed
import numpy as np
import desispec.io
import desispec.fluxcalibration
# TODO: Parallelization should be done in the target dimension if decided to run on all targets
def _preprocess_sky_frame(
night, exp, petal, fiber,... | 39.284483 | 100 | 0.644942 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,661 | 0.364494 |
0d8c4d2e42c7e76999617276cbd6cb05860d2fc1 | 2,232 | py | Python | No_0703_Kth Largest Element in a Stream/by_min_heap.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 32 | 2020-01-05T13:37:16.000Z | 2022-03-26T07:27:09.000Z | No_0703_Kth Largest Element in a Stream/by_min_heap.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | null | null | null | No_0703_Kth Largest Element in a Stream/by_min_heap.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 8 | 2020-06-18T16:17:27.000Z | 2022-03-15T23:58:18.000Z | '''
Description:
Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element.
Your KthLargest class will have a constructor which accepts an integer k and an integer array nums, which contains initial elements from the stream. ... | 22.09901 | 263 | 0.617384 | 617 | 0.275939 | 0 | 0 | 0 | 0 | 0 | 0 | 1,270 | 0.567979 |
0d8ca2861b205d338f99194e7413014a868e02f4 | 1,778 | py | Python | tbot/web/handlers/api/twitch/chat_alerts.py | thomaserlang/tbot | 99cfa204d86ef35cf2cc9482ae5a44abb35b443a | [
"MIT"
] | null | null | null | tbot/web/handlers/api/twitch/chat_alerts.py | thomaserlang/tbot | 99cfa204d86ef35cf2cc9482ae5a44abb35b443a | [
"MIT"
] | 10 | 2022-02-14T11:40:20.000Z | 2022-03-09T22:44:03.000Z | tbot/web/handlers/api/twitch/chat_alerts.py | thomaserlang/tbot | 99cfa204d86ef35cf2cc9482ae5a44abb35b443a | [
"MIT"
] | 1 | 2020-09-19T16:38:24.000Z | 2020-09-19T16:38:24.000Z | import logging, good
from tornado import web
from ..base import Api_handler, Level
class Handler(Api_handler):
__schema__ = good.Schema({
str: [{
'message': good.All(str, good.Length(min=0, max=200)),
good.Optional('min_amount'): good.All(good.Coerce(int), good.Range(min=0, max=100... | 32.925926 | 97 | 0.468504 | 1,694 | 0.952756 | 0 | 0 | 1,395 | 0.784589 | 1,367 | 0.768841 | 454 | 0.255343 |
0d8d6dded7ee3c79f0a3020bc4bc9d4851c84949 | 1,119 | py | Python | pymouse/__init__.py | aronei44/PyMouse | b0cc56cc5c2f9ca514fbcbc9fccf95628412b175 | [
"Apache-2.0"
] | 86 | 2015-02-24T20:40:15.000Z | 2021-12-25T13:27:36.000Z | pymouse/__init__.py | aronei44/PyMouse | b0cc56cc5c2f9ca514fbcbc9fccf95628412b175 | [
"Apache-2.0"
] | 7 | 2015-08-28T23:14:37.000Z | 2021-11-29T10:39:44.000Z | pymouse/__init__.py | aronei44/PyMouse | b0cc56cc5c2f9ca514fbcbc9fccf95628412b175 | [
"Apache-2.0"
] | 30 | 2015-04-07T13:08:34.000Z | 2022-01-02T15:03:15.000Z | # -*- coding: iso-8859-1 -*-
# Copyright 2010 Pepijn de Vos
#
# 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... | 30.243243 | 76 | 0.73101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 842 | 0.752458 |
0d8d7f07ee7f1fb1abddfc13378b9331565be05e | 1,342 | py | Python | fraid/rps/viewsets.py | mikaelengstrom/fraid | 3a1cf6ebe39a2105218d8b28eaeec825b9a80858 | [
"MIT"
] | null | null | null | fraid/rps/viewsets.py | mikaelengstrom/fraid | 3a1cf6ebe39a2105218d8b28eaeec825b9a80858 | [
"MIT"
] | null | null | null | fraid/rps/viewsets.py | mikaelengstrom/fraid | 3a1cf6ebe39a2105218d8b28eaeec825b9a80858 | [
"MIT"
] | null | null | null | from rest_framework import (viewsets, mixins, status, response)
from rest_framework.decorators import detail_route
from . import (serializers, models, constants)
class InvalidStringException(Exception):
pass
def str_to_const(string):
_s = string.upper()
if _s == 'ROCK':
return constants.ROCK
... | 31.209302 | 81 | 0.662444 | 907 | 0.675857 | 0 | 0 | 589 | 0.438897 | 0 | 0 | 79 | 0.058867 |
0d8daca2b2d71b7a8855c2ded9597e6220e1a469 | 576 | py | Python | utils/model/get_model.py | CodingLooHee/stock-prediction | 8f0b1a4c34c738748a0be10f73e7a63808f2371b | [
"MIT"
] | null | null | null | utils/model/get_model.py | CodingLooHee/stock-prediction | 8f0b1a4c34c738748a0be10f73e7a63808f2371b | [
"MIT"
] | null | null | null | utils/model/get_model.py | CodingLooHee/stock-prediction | 8f0b1a4c34c738748a0be10f73e7a63808f2371b | [
"MIT"
] | null | null | null | import os as _os
_os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
from tensorflow import keras as _keras
def model_v1(input_shape: tuple):
model = _keras.Sequential()
model.add(_keras.layers.LSTM(64, input_shape=input_shape, activation='relu', return_sequences=True))
model.add(_keras.layers.Dropout(0.3))
mode... | 41.142857 | 104 | 0.730903 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.105903 |
0d8e0ee11e5fb5600838ccf66f631721bafdb54e | 4,989 | py | Python | gestia.py | SunandaS76/GestIA | 277e273e954fdf0fd94aad37ba5770c01f23a5e6 | [
"MIT"
] | null | null | null | gestia.py | SunandaS76/GestIA | 277e273e954fdf0fd94aad37ba5770c01f23a5e6 | [
"MIT"
] | null | null | null | gestia.py | SunandaS76/GestIA | 277e273e954fdf0fd94aad37ba5770c01f23a5e6 | [
"MIT"
] | null | null | null | import sys
import time
import cv2
import keyboard
from PyQt5 import QtCore, QtGui, QtWidgets, uic
from config import *
from detector import *
import json
class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
def __init__(self, *args, **kwargs):
# Set up environment
QtWidgets.QMainWindow.__init_... | 33.483221 | 82 | 0.646021 | 4,705 | 0.943075 | 0 | 0 | 0 | 0 | 0 | 0 | 649 | 0.130086 |
0d904dc18a471dd3b6af487b503d01e92bd91a24 | 1,304 | py | Python | examples/basic/basic_extract_features.py | Tongjilibo/bert4torch | 71d5ffb3698730b16e5a252b06644a136787711e | [
"MIT"
] | 49 | 2022-03-15T07:28:16.000Z | 2022-03-31T07:16:15.000Z | examples/basic/basic_extract_features.py | Tongjilibo/bert4torch | 71d5ffb3698730b16e5a252b06644a136787711e | [
"MIT"
] | null | null | null | examples/basic/basic_extract_features.py | Tongjilibo/bert4torch | 71d5ffb3698730b16e5a252b06644a136787711e | [
"MIT"
] | null | null | null | #! -*- coding: utf-8 -*-
# 测试代码可用性: 提取特征
import torch
from bert4torch.models import build_transformer_model
from bert4torch.tokenizers import Tokenizer
root_model_path = "F:/Projects/pretrain_ckpt/bert/[google_tf_base]--chinese_L-12_H-768_A-12"
vocab_path = root_model_path + "/vocab.txt"
config_path = root_model_path... | 34.315789 | 92 | 0.69862 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 805 | 0.585029 |
0d910fd391e1e3916101e4b14a154a4e7e1bb28e | 4,472 | py | Python | Exec/debug/inspect_FAB.py | darylbond/cerberus | a1b99f6b50ba6876d4705f26e6be98ed6e1c5c6a | [
"MIT"
] | 5 | 2021-05-10T01:21:52.000Z | 2022-03-10T17:26:41.000Z | Exec/debug/inspect_FAB.py | darylbond/cerberus | a1b99f6b50ba6876d4705f26e6be98ed6e1c5c6a | [
"MIT"
] | 3 | 2021-05-26T01:12:12.000Z | 2021-12-14T00:34:06.000Z | Exec/debug/inspect_FAB.py | darylbond/cerberus | a1b99f6b50ba6876d4705f26e6be98ed6e1c5c6a | [
"MIT"
] | 3 | 2021-05-11T02:45:27.000Z | 2021-09-06T12:08:23.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 20 05:46:07 2018
@author: uqdbond1
"""
import numpy as np
import re
import pylab as plt
import os, sys
np.set_printoptions(linewidth=1000)
#==============================================================================
#
#==============================================... | 23.661376 | 79 | 0.489714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 779 | 0.174195 |
0d91bbf3521fb204188d37328c0cfa2d88a3d719 | 72,911 | py | Python | tests/3_endpoints/test_3_0_ldp.py | whikloj/lakesuperior | 733ac54e9525dcb7c3161bc70f04415e81650c06 | [
"Apache-2.0"
] | null | null | null | tests/3_endpoints/test_3_0_ldp.py | whikloj/lakesuperior | 733ac54e9525dcb7c3161bc70f04415e81650c06 | [
"Apache-2.0"
] | null | null | null | tests/3_endpoints/test_3_0_ldp.py | whikloj/lakesuperior | 733ac54e9525dcb7c3161bc70f04415e81650c06 | [
"Apache-2.0"
] | null | null | null | import hashlib
import pdb
import pytest
from base64 import b64encode
from datetime import timedelta
from hashlib import sha1, sha256, blake2b
from uuid import uuid4
from werkzeug.http import http_date
import arrow
import requests
from flask import g
from rdflib import Graph
from rdflib.compare import isomorphic
from... | 35.205698 | 98 | 0.576635 | 69,421 | 0.952133 | 0 | 0 | 69,916 | 0.958923 | 0 | 0 | 26,100 | 0.357971 |
0d93229576f67b3cf03c2c7712ccfa02da5e0379 | 2,040 | py | Python | examples/example_026.py | evereux/catia_python | 08948585899b12587b0415ce3c9191a408b34897 | [
"MIT"
] | 90 | 2019-02-21T10:05:28.000Z | 2022-03-19T01:53:41.000Z | examples/example_026.py | evereux/catia_python | 08948585899b12587b0415ce3c9191a408b34897 | [
"MIT"
] | 99 | 2019-05-21T08:29:12.000Z | 2022-03-25T09:55:15.000Z | examples/example_026.py | evereux/catia_python | 08948585899b12587b0415ce3c9191a408b34897 | [
"MIT"
] | 26 | 2019-04-04T06:31:36.000Z | 2022-03-30T07:24:47.000Z | #! /usr/bin/python3.6
"""
Example 26:
Prompt the user to select a product and get it's bounding box parameters
.. warning:
Currently there must be NO other existing Measure Inertias saved
ANYWHERE in your product tree as these may be returned and not
product you have selected.
"... | 29.142857 | 127 | 0.645588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,276 | 0.62549 |
0d950659300f78db9a3ef0896e4c8d3f830c4f0e | 7,060 | py | Python | docker/laaws-demo-webui/cgi-bin/auid-to-json.py | lockss/laaws-demo | f7aeb1b3a15f5955ae7ab41b64b5e45d07e0433e | [
"BSD-3-Clause"
] | null | null | null | docker/laaws-demo-webui/cgi-bin/auid-to-json.py | lockss/laaws-demo | f7aeb1b3a15f5955ae7ab41b64b5e45d07e0433e | [
"BSD-3-Clause"
] | null | null | null | docker/laaws-demo-webui/cgi-bin/auid-to-json.py | lockss/laaws-demo | f7aeb1b3a15f5955ae7ab41b64b5e45d07e0433e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# CGI script to extract content of AU as WARC and report result
# in JSON as specified in WASAPI
from warcio.warcwriter import WARCWriter
from warcio.statusandheaders import StatusAndHeaders
from argparse import ArgumentParser
import requests
import json
import tempfile
import re
import cgi
i... | 35.3 | 134 | 0.589802 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,850 | 0.26204 |
0d954434c6a7a3f58c9b0faf0d8512807c7b2362 | 1,082 | py | Python | taillight/__init__.py | Elizafox/taillight | 52df2b1043bbbbc559e5676e9c9ec838aa38a808 | [
"WTFPL"
] | 4 | 2015-06-21T13:00:44.000Z | 2020-09-14T18:09:28.000Z | taillight/__init__.py | Elizafox/taillight | 52df2b1043bbbbc559e5676e9c9ec838aa38a808 | [
"WTFPL"
] | null | null | null | taillight/__init__.py | Elizafox/taillight | 52df2b1043bbbbc559e5676e9c9ec838aa38a808 | [
"WTFPL"
] | null | null | null | # Copyright © 2017-2019 Elizabeth Myers. All rights reserved.
# This file is part of the taillight project. See LICENSE in the root
# directory for licensing information.
"""The top level module contains a few constants needed throughout taillight,
the base exception for all taillight errors (for easier catching by h... | 23.521739 | 78 | 0.707024 | 371 | 0.342567 | 0 | 0 | 0 | 0 | 0 | 0 | 690 | 0.637119 |
0d96171a77724c2daf45636b712ea7b4c2164248 | 1,504 | py | Python | foliofunctions.py | becahp/ibict-folio | 7f82acd1f9c1d37c3858f51540a703c12a9d92ce | [
"Apache-2.0"
] | null | null | null | foliofunctions.py | becahp/ibict-folio | 7f82acd1f9c1d37c3858f51540a703c12a9d92ce | [
"Apache-2.0"
] | null | null | null | foliofunctions.py | becahp/ibict-folio | 7f82acd1f9c1d37c3858f51540a703c12a9d92ce | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Function definition is here
def folio2solr(folioReg):
#folioReg is the dictonary
##Checar campos problematicos
#contributors
if len(folioReg['contributors']): #diferente de zero
auxContributors = folioReg['contributors'][0]['name']
else:
auxContributors = []
... | 29.490196 | 82 | 0.625665 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 627 | 0.416888 |
0d9673abce324fd2c4264d7ff064fc9ecdf36925 | 2,399 | py | Python | civis_jupyter_notebooks/tests/test_git_utils.py | civisanalytics/civis-jupyter-notebook | 16e3fb804c53e7e146aeebe0cc56192ad51dc668 | [
"BSD-3-Clause"
] | 1 | 2020-05-20T10:17:32.000Z | 2020-05-20T10:17:32.000Z | civis_jupyter_notebooks/tests/test_git_utils.py | civisanalytics/civis-jupyter-notebook | 16e3fb804c53e7e146aeebe0cc56192ad51dc668 | [
"BSD-3-Clause"
] | 26 | 2017-09-08T20:59:00.000Z | 2021-08-23T19:42:22.000Z | civis_jupyter_notebooks/tests/test_git_utils.py | civisanalytics/civis-jupyter-notebook | 16e3fb804c53e7e146aeebe0cc56192ad51dc668 | [
"BSD-3-Clause"
] | 4 | 2017-09-13T20:44:09.000Z | 2020-01-22T21:24:53.000Z | import unittest
from unittest.mock import patch, MagicMock
import os
import logging
from git.exc import GitCommandError
from git import Repo
from civis_jupyter_notebooks.git_utils import CivisGit, CivisGitError
REPO_URL = 'http://www.github.com/civisanalytics.foo.git'
REPO_MOUNT_PATH = '/root/work'
GIT_REPO_REF = 'ma... | 33.319444 | 87 | 0.706544 | 2,021 | 0.842434 | 0 | 0 | 834 | 0.347645 | 0 | 0 | 265 | 0.110463 |
0d96cf3d5241eee40b7c9c8b48600b5b8db0b111 | 1,527 | py | Python | morpfw/authn/pas/apikey/model.py | morpframework/morpfw | b867e5809d6c52e8839586670a29fcd179ce64c7 | [
"Apache-2.0"
] | 8 | 2018-12-08T01:41:58.000Z | 2020-12-21T15:30:12.000Z | morpfw/authn/pas/apikey/model.py | morpframework/morpfw | b867e5809d6c52e8839586670a29fcd179ce64c7 | [
"Apache-2.0"
] | 17 | 2019-02-05T15:01:32.000Z | 2020-04-28T16:17:42.000Z | morpfw/authn/pas/apikey/model.py | morpframework/morpfw | b867e5809d6c52e8839586670a29fcd179ce64c7 | [
"Apache-2.0"
] | 2 | 2018-12-08T05:03:37.000Z | 2019-03-20T07:15:21.000Z | import hashlib
import secrets
from uuid import uuid4
import rulez
from morpfw.crud import Collection, Model, Schema
from ..app import App
from .schema import APIKeySchema
class APIKeyModel(Model):
schema = APIKeySchema
update_view_enabled = False
@property
def client_id(self):
return self["... | 28.277778 | 88 | 0.645711 | 1,348 | 0.882777 | 0 | 0 | 70 | 0.045842 | 0 | 0 | 115 | 0.075311 |
0d976185ebb8ba910132efb175704d26165689c5 | 3,417 | py | Python | skeleton.py | Ragnarok7861/4d_plant_registration | 6c2a4fab7857260ecc5f956c717c997bfa25ea9a | [
"MIT"
] | 16 | 2020-09-17T06:36:43.000Z | 2022-02-04T18:35:30.000Z | skeleton.py | Ragnarok7861/4d_plant_registration | 6c2a4fab7857260ecc5f956c717c997bfa25ea9a | [
"MIT"
] | null | null | null | skeleton.py | Ragnarok7861/4d_plant_registration | 6c2a4fab7857260ecc5f956c717c997bfa25ea9a | [
"MIT"
] | 6 | 2021-09-29T08:32:06.000Z | 2022-01-10T20:53:57.000Z | """ Skeleton class for creating, accessing different attributes for a skelton.
"""
import numpy as np
class Skeleton():
def __init__(self, XYZ = None, edges = None , labels = None):
self._XYZ = XYZ if XYZ is not None else np.empty((0,3))
self._edges = edges if edges is not None else []
self._labels = la... | 28.957627 | 84 | 0.609014 | 3,313 | 0.969564 | 0 | 0 | 1,316 | 0.385133 | 0 | 0 | 682 | 0.19959 |
0d97e17b49711bc26ae6b1e76c4955fa918c05d5 | 1,233 | py | Python | src/com/dao/aclDao.py | amzpiper/synchronize_data | a0ef983a6445ac5b793691dd3d4a86790c0581a7 | [
"Apache-2.0"
] | null | null | null | src/com/dao/aclDao.py | amzpiper/synchronize_data | a0ef983a6445ac5b793691dd3d4a86790c0581a7 | [
"Apache-2.0"
] | null | null | null | src/com/dao/aclDao.py | amzpiper/synchronize_data | a0ef983a6445ac5b793691dd3d4a86790c0581a7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env/python
# -*- coding:utf-8 -*-
# Author:guoyuhang
import json
from com.request import aclRequest
from com.config.config import Config
from com.model import acl
""" 处理把response返回的dict对象中内容处理后放到acl对象数组中 """
class AclDao(object):
def __init__(self) :
self.aclList = []
self.aclReq = acl... | 31.615385 | 71 | 0.587997 | 1,081 | 0.803717 | 0 | 0 | 0 | 0 | 0 | 0 | 535 | 0.39777 |
0d9849a947ec51d625e83e09d1e16e0cc76affe4 | 6,044 | py | Python | webserver/www/api/api_functions.py | HendrikVE/my_pi_drei | 7e0392dced6e54791690929d968195282796cbd8 | [
"MIT"
] | null | null | null | webserver/www/api/api_functions.py | HendrikVE/my_pi_drei | 7e0392dced6e54791690929d968195282796cbd8 | [
"MIT"
] | 1 | 2018-02-03T23:14:38.000Z | 2018-02-03T23:17:06.000Z | webserver/www/api/api_functions.py | HendrikVE/my_pi_drei | 7e0392dced6e54791690929d968195282796cbd8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
* Copyright (C) 2017 Hendrik van Essen
*
* This file is subject to the terms and conditions of the MIT License
* See the file LICENSE in the top level directory for more details.
"""
from __future__ import absolute_import, print_function, unicode_literals
import ... | 40.293333 | 120 | 0.458471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,135 | 0.518696 |
0d984b08ec5ee5ed4211e1f1a20144e423ac7488 | 970 | py | Python | experiments/scripts/benchmark.py | chrislybaer/huggingmolecules | 210239ac46b467e900a47e8f4520054636744ca6 | [
"Apache-2.0"
] | 60 | 2021-05-07T16:07:26.000Z | 2022-03-26T19:23:54.000Z | experiments/scripts/benchmark.py | gabegomes/huggingmolecules | adc581c97fbc21d9967dd9334afa94b22fb77651 | [
"Apache-2.0"
] | 11 | 2021-05-07T16:01:35.000Z | 2022-03-09T13:06:05.000Z | experiments/scripts/benchmark.py | gabegomes/huggingmolecules | adc581c97fbc21d9967dd9334afa94b22fb77651 | [
"Apache-2.0"
] | 12 | 2021-05-20T08:02:25.000Z | 2022-03-10T14:11:36.000Z | """
benchmark.py: this script performs a benchmark based on hyper-parameters tuning (grid-search).
For details see main README.md.
"""
if __name__ == "__main__":
import argparse
from experiments.src import tune_hyper
from experiments.src.benchmarking.benchmarking_benchmark_results import benchmark_result
... | 40.416667 | 115 | 0.757732 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 466 | 0.480412 |
0d999c2c7289bdc61260b86041d431ef20b3a55c | 916 | py | Python | alerts/push/app.py | isabella232/mirandum | 758286dfef5801747cade7902bc234d14b85de52 | [
"Apache-2.0"
] | 14 | 2016-04-30T00:00:02.000Z | 2022-03-31T14:52:37.000Z | alerts/push/app.py | google/mirandum | 758286dfef5801747cade7902bc234d14b85de52 | [
"Apache-2.0"
] | 9 | 2016-05-03T12:30:09.000Z | 2018-09-10T01:46:02.000Z | alerts/push/app.py | isabella232/mirandum | 758286dfef5801747cade7902bc234d14b85de52 | [
"Apache-2.0"
] | 11 | 2016-04-30T08:12:07.000Z | 2021-10-21T04:25:41.000Z | from tornado import websocket, web, ioloop
import json
import time
clients = []
class SocketHandler(websocket.WebSocketHandler):
def check_origin(self, origin):
return True
def open(self, key=None):
self.key = key
if self not in clients:
clients.append(self)
def on_cl... | 20.818182 | 48 | 0.590611 | 646 | 0.70524 | 0 | 0 | 288 | 0.31441 | 0 | 0 | 48 | 0.052402 |
0d9a3126b7e9a62cce813b3e08d0be070b4a7d1d | 11,410 | py | Python | mapzen/whosonfirst/validator/__init__.py | iandees/py-mapzen-whosonfirst-validator | 64bc526728b7c06796deb767fbdaa196cc630b5e | [
"BSD-3-Clause"
] | null | null | null | mapzen/whosonfirst/validator/__init__.py | iandees/py-mapzen-whosonfirst-validator | 64bc526728b7c06796deb767fbdaa196cc630b5e | [
"BSD-3-Clause"
] | null | null | null | mapzen/whosonfirst/validator/__init__.py | iandees/py-mapzen-whosonfirst-validator | 64bc526728b7c06796deb767fbdaa196cc630b5e | [
"BSD-3-Clause"
] | null | null | null | import sys
import os.path
import logging
import json
import geojson
import types
import mapzen.whosonfirst.export
import mapzen.whosonfirst.placetypes
import mapzen.whosonfirst.sources
import mapzen.whosonfirst.utils
class reporter:
def __init__(self):
self._debug_ = []
self._info_ = []
... | 29.407216 | 125 | 0.470903 | 10,914 | 0.956529 | 99 | 0.008677 | 0 | 0 | 0 | 0 | 2,706 | 0.23716 |
0d9a54468e18f49414d191f9a2a62adbd5c19f14 | 2,072 | py | Python | contents/6_OpenAI_gym/my_DQN_CartPole.py | venaissance/Reinforcement-learning-with-tensorflow | 78f5253d7e2bbd5aff5bacbbafd85ba9dbda686d | [
"MIT"
] | 1 | 2021-06-27T15:10:29.000Z | 2021-06-27T15:10:29.000Z | contents/6_OpenAI_gym/my_DQN_CartPole.py | venaissance/Reinforcement-learning-with-tensorflow | 78f5253d7e2bbd5aff5bacbbafd85ba9dbda686d | [
"MIT"
] | null | null | null | contents/6_OpenAI_gym/my_DQN_CartPole.py | venaissance/Reinforcement-learning-with-tensorflow | 78f5253d7e2bbd5aff5bacbbafd85ba9dbda686d | [
"MIT"
] | null | null | null | """
Deep Q network,
Using:
Tensorflow: 1.0
gym: 0.7.3
"""
import gym
import numpy as np
from my_DQN_brain import DeepQNetwork
import matplotlib.pyplot as plt
env = gym.make('CartPole-v0')
env = env.unwrapped
print(env.action_space)
print(env.observation_space)
print(env.observation_space.high)
print(env.observatio... | 25.580247 | 95 | 0.578668 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.105888 |
0d9a9b26e7073de8676c3a211d324b1ab21593cd | 283 | py | Python | bubble_sort.py | iabudanov/Algorithms_and_DataStructures | d2244f1e8db829ab566b494b8fe8399fca63a7b8 | [
"MIT"
] | 1 | 2019-02-24T14:20:17.000Z | 2019-02-24T14:20:17.000Z | bubble_sort.py | iabudanov/Algorithms_and_DataStructures | d2244f1e8db829ab566b494b8fe8399fca63a7b8 | [
"MIT"
] | null | null | null | bubble_sort.py | iabudanov/Algorithms_and_DataStructures | d2244f1e8db829ab566b494b8fe8399fca63a7b8 | [
"MIT"
] | null | null | null | def bubble_sort(int_list):
for i in range(0, len(int_list)):
if (i == 0):
pass
elif int_list[i] < int_list[i-1]:
int_list[i], int_list[i-1] = int_list[i-1], int_list[i]
print('lol')
print(int_list)
print(int_list)
| 25.727273 | 67 | 0.522968 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.017668 |
0d9b4f810021d1ba58be710dada119c03e1176aa | 4,098 | py | Python | src/sampling_update/conditionals.py | mfkiwl/precise_gps | e30c6355447424cb69549feb85c9393b10eae7aa | [
"MIT"
] | null | null | null | src/sampling_update/conditionals.py | mfkiwl/precise_gps | e30c6355447424cb69549feb85c9393b10eae7aa | [
"MIT"
] | null | null | null | src/sampling_update/conditionals.py | mfkiwl/precise_gps | e30c6355447424cb69549feb85c9393b10eae7aa | [
"MIT"
] | null | null | null | # Credit to GPflow
import tensorflow as tf
def base_conditional(Kmn, Kmm, Knn, f, *, full_cov=False, q_sqrt=None, white=False, return_Lm=False):
"""
Given a g1 and g2, and distribution p and q such that
p(g2) = N(g2;0,Kmm)
p(g1) = N(g1;0,Knn)
p(g1|g2) = N(g1;0,Knm)
And
q(g2) = N(g... | 37.59633 | 141 | 0.608346 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,255 | 0.550268 |
0d9cc7612f2e00ee4ab1d28f9946e89d43ce1f78 | 32 | py | Python | Unit 3: Structured Types/Lecture_5_Tuples_and_lists/Exercise: apply to each.py | Hongbin-Ze/MITx-6.00.1 | 9443e326a9893f7cdb3b74e06025d34b3e1e9fdc | [
"MIT"
] | null | null | null | Unit 3: Structured Types/Lecture_5_Tuples_and_lists/Exercise: apply to each.py | Hongbin-Ze/MITx-6.00.1 | 9443e326a9893f7cdb3b74e06025d34b3e1e9fdc | [
"MIT"
] | null | null | null | Unit 3: Structured Types/Lecture_5_Tuples_and_lists/Exercise: apply to each.py | Hongbin-Ze/MITx-6.00.1 | 9443e326a9893f7cdb3b74e06025d34b3e1e9fdc | [
"MIT"
] | null | null | null | def aFunc(a):
return abs(a)
| 10.666667 | 17 | 0.59375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0d9d764fa2fc09c6656c23160c85475a4f88f596 | 389 | py | Python | CloudSchedule/CodeCraft-2021/src/constant.py | RavenLite/HuaweiCodeCraft2021 | a9c87eb4e01d58c2ec1c021c89d7da422553613f | [
"Apache-2.0"
] | 3 | 2022-02-16T09:42:10.000Z | 2022-02-24T02:26:30.000Z | CloudSchedule/CodeCraft-2021/src/constant.py | RavenLite/HuaweiCodeCraft2021 | a9c87eb4e01d58c2ec1c021c89d7da422553613f | [
"Apache-2.0"
] | null | null | null | CloudSchedule/CodeCraft-2021/src/constant.py | RavenLite/HuaweiCodeCraft2021 | a9c87eb4e01d58c2ec1c021c89d7da422553613f | [
"Apache-2.0"
] | null | null | null | # queue item action
ACTION_ADD = "add"
ACTION_DEL = "del"
# server type field
SERVER_TYPE_RATIO = "server_type_ratio"
# vm deployment way
VM_DEPLOYMENT_SINGLE = 0
VM_DEPLOYMENT_DOUBLE = 1
# vm node name
VM_NODE_A = "A"
VM_NODE_B = "B"
VM_NODE_AB = "AB"
# common
NULL_STRING = ""
ZERO_NUM = 0
MIN_VALUE_INITIAL = 1000... | 15.56 | 39 | 0.74036 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 139 | 0.357326 |
0da06da4a9f43226acb2912e15cb685099ae3f01 | 1,075 | py | Python | h2o-bindings/bin/custom/R/gen_rulefit.py | subhash0x/h2o-3 | b9e46003d5d546ab231b215beab08cec75be86b0 | [
"Apache-2.0"
] | null | null | null | h2o-bindings/bin/custom/R/gen_rulefit.py | subhash0x/h2o-3 | b9e46003d5d546ab231b215beab08cec75be86b0 | [
"Apache-2.0"
] | null | null | null | h2o-bindings/bin/custom/R/gen_rulefit.py | subhash0x/h2o-3 | b9e46003d5d546ab231b215beab08cec75be86b0 | [
"Apache-2.0"
] | null | null | null | extensions = dict(
extensions = dict(
validate_params="""
# Required maps for different names params, including deprecated params
.gbm.map <- c("x" = "ignored_columns",
"y" = "response_column")
"""
),
set_required_params="""
parms$training_frame <- training_frame
args <- .verify_dataxy... | 28.289474 | 93 | 0.688372 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 929 | 0.864186 |
0da15f409411673cc5bb5b14dc4de318260a890e | 1,788 | py | Python | torchimage/random.py | miaotianyi/torchimage | 8b209c7da087bc18fd78dc0013c671e21a338f38 | [
"MIT"
] | 10 | 2021-04-22T08:15:49.000Z | 2022-03-19T01:28:06.000Z | torchimage/random.py | miaotianyi/torchimage | 8b209c7da087bc18fd78dc0013c671e21a338f38 | [
"MIT"
] | null | null | null | torchimage/random.py | miaotianyi/torchimage | 8b209c7da087bc18fd78dc0013c671e21a338f38 | [
"MIT"
] | null | null | null | import torch
from .utils import NdSpec
from .utils.validation import check_axes
def random_crop(x: torch.Tensor, axes, size, *, generator: torch.Generator = None):
axes = check_axes(x, axes)
size = NdSpec(size, item_shape=[])
idx = [slice(None)] * x.ndim
for i, a in enumerate(axes):
length = ... | 29.311475 | 109 | 0.644295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 509 | 0.284676 |
0da1f2772727d2da5ec5d537da5d7526f0a0bfca | 523 | py | Python | tests/test_core.py | bofm/libextract | 9cf9d55c7f8cd622eab0a50f009385f0a39b1200 | [
"MIT"
] | 502 | 2015-04-18T18:11:07.000Z | 2022-03-04T20:10:11.000Z | tests/test_core.py | bofm/libextract | 9cf9d55c7f8cd622eab0a50f009385f0a39b1200 | [
"MIT"
] | 18 | 2015-04-06T12:21:14.000Z | 2015-04-14T03:53:39.000Z | tests/test_core.py | bofm/libextract | 9cf9d55c7f8cd622eab0a50f009385f0a39b1200 | [
"MIT"
] | 45 | 2015-04-15T13:31:38.000Z | 2021-05-19T09:37:23.000Z | from .fixtures import foo_file
from libextract.core import parse_html, pipeline
def test_parse_html(foo_file):
etree = parse_html(foo_file, encoding='ascii')
divs = etree.xpath('//body/article/div')
for node in divs:
assert node.tag == 'div'
assert node.text == 'foo.'
assert len(divs... | 21.791667 | 50 | 0.59847 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.072658 |
0da491b9962ecdc77815ce0f838f8cd5faab7f6a | 5,868 | py | Python | retrieve_by_jersey_number_app.py | shivaprasadm26/JerseyNumberDetectionTF20 | 64f8bd63fafb37c1bf2a6054ffba44670b44bb79 | [
"MIT"
] | 1 | 2022-01-02T02:33:54.000Z | 2022-01-02T02:33:54.000Z | retrieve_by_jersey_number_app.py | shivaprasadm26/JerseyNumberDetectionTF20 | 64f8bd63fafb37c1bf2a6054ffba44670b44bb79 | [
"MIT"
] | null | null | null | retrieve_by_jersey_number_app.py | shivaprasadm26/JerseyNumberDetectionTF20 | 64f8bd63fafb37c1bf2a6054ffba44670b44bb79 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Jun 21 14:36:56 2020
@author: user
"""
import glob
import os
import pickle
import shutil
import time
from flask import request
from flask import Flask
import argparse
import os
import glob
from predict_jersey_number import detect_person_jersey_no, load_objdetection, load_n... | 38.860927 | 171 | 0.676721 | 0 | 0 | 0 | 0 | 594 | 0.101227 | 0 | 0 | 1,680 | 0.286299 |
0da6996eb6527e0c2b453ab7c5236849422a1e74 | 224 | py | Python | test/BeautifulSoupTest/BeautifulSoupTest.py | upa8/Stock-Market-Analyser | bfd8661de343d053d1a772cc375d7227963b9c66 | [
"Apache-2.0"
] | 1 | 2016-12-06T08:27:08.000Z | 2016-12-06T08:27:08.000Z | test/BeautifulSoupTest/BeautifulSoupTest.py | upa8/Stock-Market-Analyser | bfd8661de343d053d1a772cc375d7227963b9c66 | [
"Apache-2.0"
] | null | null | null | test/BeautifulSoupTest/BeautifulSoupTest.py | upa8/Stock-Market-Analyser | bfd8661de343d053d1a772cc375d7227963b9c66 | [
"Apache-2.0"
] | null | null | null | from bs4 import BeautifulSoup
import requests
url = "https://www.nseindia.com/live_market/dynaContent/live_analysis/gainers/niftyGainers1.json"
r = requests.get(url)
data = r.text
soup = BeautifulSoup(data)
print soup | 17.230769 | 97 | 0.78125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.40625 |
0da6f261d225a4fe131215b85716b0dbdbf69ac9 | 382 | py | Python | aether-ui/aether/ui/api/migrations/0002_remove_usertokens_odk_token.py | lordmallam/aether | 7ceb71d2ef8b09d704d94dfcb243dbbdf8356135 | [
"Apache-2.0"
] | 14 | 2018-08-09T20:57:16.000Z | 2020-10-11T12:22:18.000Z | aether-ui/aether/ui/api/migrations/0002_remove_usertokens_odk_token.py | lordmallam/aether | 7ceb71d2ef8b09d704d94dfcb243dbbdf8356135 | [
"Apache-2.0"
] | 148 | 2018-07-24T10:52:29.000Z | 2022-02-10T09:06:44.000Z | aether-ui/aether/ui/api/migrations/0002_remove_usertokens_odk_token.py | lordmallam/aether | 7ceb71d2ef8b09d704d94dfcb243dbbdf8356135 | [
"Apache-2.0"
] | 6 | 2018-07-25T13:33:10.000Z | 2019-09-23T03:02:09.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-04-05 15:46
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ui', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name... | 19.1 | 46 | 0.604712 | 234 | 0.612565 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.287958 |
0da876d446bc61ffb3488ca44081d936ae371044 | 422 | py | Python | home/models.py | sapiendraft/superburguerDEMO | a2bfd8bc2e0c8025750ff428782165751684faab | [
"Apache-2.0"
] | null | null | null | home/models.py | sapiendraft/superburguerDEMO | a2bfd8bc2e0c8025750ff428782165751684faab | [
"Apache-2.0"
] | 1 | 2022-01-21T22:40:44.000Z | 2022-01-21T22:40:44.000Z | home/models.py | sapiendraft/superburguerDEMO | a2bfd8bc2e0c8025750ff428782165751684faab | [
"Apache-2.0"
] | null | null | null | from django.db import models
# main page posts
class IndexCards(models.Model):
id = models.AutoField(primary_key=True)
title = models.CharField(max_length=64)
paragraph = models.CharField(max_length=256)
observation = models.CharField(max_length=128)
image_link = models.CharField(max_length=512)
... | 30.142857 | 53 | 0.739336 | 373 | 0.883886 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.040284 |
0da8d51887cededd42699ffaa6e25ac8a8fcd250 | 1,929 | py | Python | pyembroidery/EmbThreadHus.py | mrjohnmain/pyembroidery | 3acaa543e3ffaad67f83092ab3151fce87c76ec4 | [
"MIT"
] | null | null | null | pyembroidery/EmbThreadHus.py | mrjohnmain/pyembroidery | 3acaa543e3ffaad67f83092ab3151fce87c76ec4 | [
"MIT"
] | null | null | null | pyembroidery/EmbThreadHus.py | mrjohnmain/pyembroidery | 3acaa543e3ffaad67f83092ab3151fce87c76ec4 | [
"MIT"
] | null | null | null | from .EmbThread import EmbThread
def get_thread_set():
return [
EmbThreadHus("#000000", "Black", "026"),
EmbThreadHus("#0000e7", "Blue", "005"),
EmbThreadHus("#00c600", "Green", "002"),
EmbThreadHus("#ff0000", "Red", "014"),
EmbThreadHus("#840084", "Purple", "008")... | 41.042553 | 65 | 0.554692 | 297 | 0.153966 | 0 | 0 | 0 | 0 | 0 | 0 | 712 | 0.369103 |
0dab71e44d19e1a5e77798e515a3353c6d5c4b65 | 25,479 | py | Python | sdk/python/pulumi_sumologic/scheduled_view.py | pulumi/pulumi-sumologic | 962fa056ee4b96e61a200e7bf2308bfad723c3af | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-10-13T03:50:41.000Z | 2021-10-13T03:50:41.000Z | sdk/python/pulumi_sumologic/scheduled_view.py | pulumi/pulumi-sumologic | 962fa056ee4b96e61a200e7bf2308bfad723c3af | [
"ECL-2.0",
"Apache-2.0"
] | 28 | 2021-05-21T11:00:45.000Z | 2022-03-31T15:47:13.000Z | sdk/python/pulumi_sumologic/scheduled_view.py | pulumi/pulumi-sumologic | 962fa056ee4b96e61a200e7bf2308bfad723c3af | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 56.245033 | 514 | 0.692296 | 25,051 | 0.983202 | 0 | 0 | 22,341 | 0.87684 | 0 | 0 | 13,911 | 0.545979 |
0dad414d72c7d15d58e68ccf54a951a9d79b23c9 | 1,140 | py | Python | scylla/worker.py | gillbates/scylla | 88b999eb60504c23041a56b343c6a021d778538d | [
"Apache-2.0"
] | null | null | null | scylla/worker.py | gillbates/scylla | 88b999eb60504c23041a56b343c6a021d778538d | [
"Apache-2.0"
] | null | null | null | scylla/worker.py | gillbates/scylla | 88b999eb60504c23041a56b343c6a021d778538d | [
"Apache-2.0"
] | null | null | null | from typing import Union
import requests
from requests_html import HTMLSession, HTMLResponse, HTML
from scylla.loggings import logger
class Worker:
def __init__(self):
"""Initialize the worker object
"""
self.session = HTMLSession()
def get_html(self, url: str, render_js: bool = ... | 26.511628 | 78 | 0.581579 | 1,001 | 0.87807 | 0 | 0 | 0 | 0 | 0 | 0 | 383 | 0.335965 |
0dae84818582972a573cb9582067de8c07197bac | 852 | py | Python | tests/setup_scripts/rerun_prep.py | yardencsGitHub/vak | 04da97b02ded5acccab437c2538d0a1ded3bef80 | [
"BSD-3-Clause"
] | 1 | 2021-04-27T01:22:38.000Z | 2021-04-27T01:22:38.000Z | tests/setup_scripts/rerun_prep.py | yardencsGitHub/vak | 04da97b02ded5acccab437c2538d0a1ded3bef80 | [
"BSD-3-Clause"
] | null | null | null | tests/setup_scripts/rerun_prep.py | yardencsGitHub/vak | 04da97b02ded5acccab437c2538d0a1ded3bef80 | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
import shutil
import vak
HERE = Path(__file__).parent
# convention is that all the config.ini files in setup_scripts/ that should be
# run when setting up for development have filenames of the form `setup_*_config.ini'
# e.g., 'setup_learncurve_config.ini'
PREP_CONFIGS_TO_RUN = HERE.glob('set... | 29.37931 | 85 | 0.700704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 366 | 0.429577 |
0daf09f9bf36528566ecad4f419efb5d2a980b42 | 1,810 | py | Python | fic_modules/GITMethods.py | Mozilla-GitHub-Standards/4b07a4dfd4387a472231fb57efcde670c9dbb490fb838c59ecfdd33a55e01e42 | d891077a9218444d3948d3c8290e59924d578f99 | [
"MIT"
] | null | null | null | fic_modules/GITMethods.py | Mozilla-GitHub-Standards/4b07a4dfd4387a472231fb57efcde670c9dbb490fb838c59ecfdd33a55e01e42 | d891077a9218444d3948d3c8290e59924d578f99 | [
"MIT"
] | null | null | null | fic_modules/GITMethods.py | Mozilla-GitHub-Standards/4b07a4dfd4387a472231fb57efcde670c9dbb490fb838c59ecfdd33a55e01e42 | d891077a9218444d3948d3c8290e59924d578f99 | [
"MIT"
] | null | null | null | from git import Repo
class Github:
def __init__(self, files, msg, LOGGER, config):
self.files = files
self.msg = msg
self.LOGGER = LOGGER
self.config = config
def git_add(self):
try:
repo = Repo(self.config)
for file in self.files:
... | 36.938776 | 97 | 0.587293 | 1,786 | 0.98674 | 0 | 0 | 0 | 0 | 0 | 0 | 383 | 0.211602 |
0db00d04dd0863321e2100daed1c947150d4bdc1 | 614 | py | Python | utils.py | shehryar37/mod-activity-bot | a35f0d94ce198d1191cda4437c8400e1fbfeafdf | [
"Apache-2.0"
] | null | null | null | utils.py | shehryar37/mod-activity-bot | a35f0d94ce198d1191cda4437c8400e1fbfeafdf | [
"Apache-2.0"
] | null | null | null | utils.py | shehryar37/mod-activity-bot | a35f0d94ce198d1191cda4437c8400e1fbfeafdf | [
"Apache-2.0"
] | null | null | null | import praw
import os
channel_ids = [742799267294609448]
# add 743486931836338267
def reddit_access(file):
try:
reddit = praw.Reddit(username=os.environ["USERNAME"],
password=os.environ["PASSWORD"],
client_id=os.environ["CLIENT_ID"],
... | 25.583333 | 71 | 0.52443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.174267 |
0db27a58d33995cf4b7f72d8f930a14784bafea3 | 1,172 | py | Python | code/emojify.py | namaannn/Emoji-with-Deep-Learning | a40c78361663245194c043b485b0f20561559f99 | [
"Apache-2.0"
] | null | null | null | code/emojify.py | namaannn/Emoji-with-Deep-Learning | a40c78361663245194c043b485b0f20561559f99 | [
"Apache-2.0"
] | null | null | null | code/emojify.py | namaannn/Emoji-with-Deep-Learning | a40c78361663245194c043b485b0f20561559f99 | [
"Apache-2.0"
] | null | null | null | import cv2 as cv
import numpy as np
from tensorflow.keras.models import load_model
model=load_model('facial.h5')
cv.ocl.setUseOpenCL(False)
dic={0:"Angry",1:"Disgusted",2:"Fearful",3:"Happy",4:"Neutral",5:"Sad",6:"Surprised"}
cap=cv.VideoCapture(0)
while True:
ret,frame=cap.read()
if not ret:
... | 45.076923 | 130 | 0.673208 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.145051 |
0db309f3af7765ae96862762b146d97c7d0b4df5 | 24,060 | py | Python | mmdet/models/heads/ppyoloe_head.py | jie311/miemiedetection | b0e7a45717fe6c9cf9bf3c0f47d47a2e6c68b1b6 | [
"Apache-2.0"
] | 65 | 2021-12-30T03:30:52.000Z | 2022-03-25T01:44:32.000Z | mmdet/models/heads/ppyoloe_head.py | jie311/miemiedetection | b0e7a45717fe6c9cf9bf3c0f47d47a2e6c68b1b6 | [
"Apache-2.0"
] | 1 | 2021-12-31T01:51:35.000Z | 2022-01-01T14:42:37.000Z | mmdet/models/heads/ppyoloe_head.py | jie311/miemiedetection | b0e7a45717fe6c9cf9bf3c0f47d47a2e6c68b1b6 | [
"Apache-2.0"
] | 7 | 2021-12-31T09:25:06.000Z | 2022-03-10T01:25:09.000Z | # Copyright (c) 2022 PaddlePaddle 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 appli... | 44.555556 | 98 | 0.602037 | 22,751 | 0.935024 | 0 | 0 | 1,627 | 0.066867 | 0 | 0 | 4,105 | 0.168708 |
0db35958e78ad7e7170322d7f64f1fbd5c07a1be | 10,800 | py | Python | guipyg/gui.py | neccarus/Gui-Pyg | e69eb9e7f75b67b0cb70f211e5b3e602a920502b | [
"BSD-3-Clause"
] | null | null | null | guipyg/gui.py | neccarus/Gui-Pyg | e69eb9e7f75b67b0cb70f211e5b3e602a920502b | [
"BSD-3-Clause"
] | null | null | null | guipyg/gui.py | neccarus/Gui-Pyg | e69eb9e7f75b67b0cb70f211e5b3e602a920502b | [
"BSD-3-Clause"
] | null | null | null | import pygame
import json
from json import JSONEncoder
from .gui_element.button import Button
from .gui_element.element import Element
from .gui_element.toggleable_element import ToggleableElement
from .gui_element.popup import Popup
from .gui_element.element_group import ElementGroup
from .gui_element.text_ele... | 39.130435 | 147 | 0.604074 | 5,493 | 0.508611 | 0 | 0 | 0 | 0 | 0 | 0 | 2,301 | 0.213056 |
0db43653000af9adcec19e6e0656f6027aeb666c | 333 | py | Python | tests/stores.py | meghabhoj/NEWBAZAAR | cb1405dcb2c8b4812ddf724d5a3c07b2f77c1b34 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/stores.py | meghabhoj/NEWBAZAAR | cb1405dcb2c8b4812ddf724d5a3c07b2f77c1b34 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/stores.py | meghabhoj/NEWBAZAAR | cb1405dcb2c8b4812ddf724d5a3c07b2f77c1b34 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | from __future__ import absolute_import
from __future__ import unicode_literals
from bazaar.listings.stores.strategies import DefaultStoreStrategy
class Store1(DefaultStoreStrategy):
def get_store_name(self):
return "Store 1"
class Store2(DefaultStoreStrategy):
def get_store_name(self):
retu... | 22.2 | 66 | 0.777778 | 180 | 0.540541 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.054054 |
0db5195b0ce02f6398c37148c78ebf844f6bb86f | 2,918 | py | Python | src/stratis_cli/_errors.py | mulkieran/stratis-cli | c5731f98f9b427ccecb16ba8866636ab5c5d847d | [
"Apache-2.0"
] | null | null | null | src/stratis_cli/_errors.py | mulkieran/stratis-cli | c5731f98f9b427ccecb16ba8866636ab5c5d847d | [
"Apache-2.0"
] | null | null | null | src/stratis_cli/_errors.py | mulkieran/stratis-cli | c5731f98f9b427ccecb16ba8866636ab5c5d847d | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 29.474747 | 77 | 0.6573 | 2,225 | 0.762509 | 0 | 0 | 0 | 0 | 0 | 0 | 1,782 | 0.610692 |
0db5b2837cd73476280980cdc40f9d974e4b24bd | 1,645 | py | Python | bin/interactive.py | dianaspencer/multiagent-particle-envs | 3e0dc8c525c4a2f898e89b87b0a036c4a96bc8cb | [
"MIT"
] | null | null | null | bin/interactive.py | dianaspencer/multiagent-particle-envs | 3e0dc8c525c4a2f898e89b87b0a036c4a96bc8cb | [
"MIT"
] | null | null | null | bin/interactive.py | dianaspencer/multiagent-particle-envs | 3e0dc8c525c4a2f898e89b87b0a036c4a96bc8cb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
import os
import sys
sys.path.insert(1, os.path.join(sys.path[0], '..'))
import multiagent.scenarios as scenarios
from multiagent.environment import MultiAgentEnv
from multiagent.policy import InteractivePolicy
if __name__ == '__main__':
parser = argparse.ArgumentParser(des... | 29.909091 | 108 | 0.672948 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 542 | 0.329483 |
0db74252debf6e64e108a23cdf2eb6b8ae993a41 | 2,456 | py | Python | meteortracker/serverside/triangulate_events.py | heidtn/MeteorTracker | d0cfe5c34568c9d5ce42f0d9d6e3d63cf96b02a2 | [
"MIT"
] | 11 | 2016-06-24T23:31:57.000Z | 2021-09-08T14:23:00.000Z | meteortracker/serverside/triangulate_events.py | heidtn/MeteorTracker | d0cfe5c34568c9d5ce42f0d9d6e3d63cf96b02a2 | [
"MIT"
] | 1 | 2016-06-25T18:53:55.000Z | 2016-06-26T00:23:43.000Z | meteortracker/serverside/triangulate_events.py | heidtn/MeteorTracker | d0cfe5c34568c9d5ce42f0d9d6e3d63cf96b02a2 | [
"MIT"
] | 1 | 2016-06-25T08:26:31.000Z | 2016-06-25T08:26:31.000Z | import numpy as np
import sys
sys.path.append('../')
import events
import vector_calcs
import find_events
from itertools import combinations
"""
@author(s): Nathan Heidt
This handles single and multiview triangulation of events
TODO:
-
CHANGELOG:
-
"""
class Triangulator(object):
def __init__(self, ... | 26.695652 | 99 | 0.631515 | 1,222 | 0.497557 | 0 | 0 | 0 | 0 | 0 | 0 | 715 | 0.291124 |
0db8e367adf74db3975b54efc018e7078d8335d1 | 21,311 | py | Python | src/systemtest/op-monitoring/xrd-opmon-tests/testcases/test_simple_store_and_query.py | digitaliceland/X-Road | 3f4ec6ebd09681629d375a43edfa2f7ea0500ed2 | [
"MIT"
] | 436 | 2018-06-02T12:42:25.000Z | 2022-03-31T13:51:16.000Z | src/systemtest/op-monitoring/xrd-opmon-tests/testcases/test_simple_store_and_query.py | digitaliceland/X-Road | 3f4ec6ebd09681629d375a43edfa2f7ea0500ed2 | [
"MIT"
] | 355 | 2018-06-28T13:59:46.000Z | 2022-03-09T12:47:14.000Z | src/systemtest/op-monitoring/xrd-opmon-tests/testcases/test_simple_store_and_query.py | digitaliceland/X-Road | 3f4ec6ebd09681629d375a43edfa2f7ea0500ed2 | [
"MIT"
] | 155 | 2018-06-24T17:58:23.000Z | 2022-03-22T01:25:14.000Z | #!/usr/bin/env python3
# The MIT License
# Copyright (c) 2016 Estonian Information System Authority (RIA), Population Register Centre (VRK)
#
# 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 ... | 45.246285 | 98 | 0.733283 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,675 | 0.359872 |
0dbac5a99ba857cadb23977c772610258d8a683e | 452 | py | Python | djangocms_rest_api/urls.py | wearehoods/djangocms-rest-api | 7ac95b683e24bfdb61a2a2d73c9d018a190d51f8 | [
"MIT"
] | 55 | 2016-08-04T19:08:01.000Z | 2020-07-27T06:43:35.000Z | djangocms_rest_api/urls.py | wearehoods/djangocms-rest-api | 7ac95b683e24bfdb61a2a2d73c9d018a190d51f8 | [
"MIT"
] | 14 | 2016-10-03T19:44:19.000Z | 2019-01-17T13:18:24.000Z | djangocms_rest_api/urls.py | wearehoods/djangocms-rest-api | 7ac95b683e24bfdb61a2a2d73c9d018a190d51f8 | [
"MIT"
] | 18 | 2016-09-30T03:20:43.000Z | 2021-03-03T07:20:01.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from rest_framework.routers import DefaultRouter
from djangocms_rest_api.views import PageViewSet, PlaceHolderViewSet, PluginViewSet
router = DefaultRouter()
router.register(r'pages', PageViewSet, 'page')
router.register... | 34.769231 | 83 | 0.809735 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.183628 |
0dbb5ba21f168ccee678474be80bf54efdfe9cda | 1,130 | py | Python | tasks.py | WasabiFan/pyright-ui-test-poc | 2c9b5220f6fb469d35383a99b692074a4d58ca6c | [
"MIT"
] | 1 | 2021-08-24T03:36:25.000Z | 2021-08-24T03:36:25.000Z | tasks.py | WasabiFan/pyright-ui-test-poc | 2c9b5220f6fb469d35383a99b692074a4d58ca6c | [
"MIT"
] | null | null | null | tasks.py | WasabiFan/pyright-ui-test-poc | 2c9b5220f6fb469d35383a99b692074a4d58ca6c | [
"MIT"
] | null | null | null | """
Tasks to be invoked via "poetry run".
Any task added here must also be specified as a "script" in pyproject.toml.
"""
import os
import subprocess
import sys
from typing import List, Union
repo_root = os.path.dirname(__file__)
def _command(command: Union[List[str], str], shell: bool = False):
command_exit_c... | 20.178571 | 96 | 0.641593 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 544 | 0.481416 |
0dbc3224340c0d1375e8b28e1e9819ae6bd24084 | 731 | py | Python | scripts/old/filter_by_filter_presence.py | tomarovsky/MACE | eccc050820f4bb9e483d2592e485ee372ac9453b | [
"Apache-2.0"
] | null | null | null | scripts/old/filter_by_filter_presence.py | tomarovsky/MACE | eccc050820f4bb9e483d2592e485ee372ac9453b | [
"Apache-2.0"
] | null | null | null | scripts/old/filter_by_filter_presence.py | tomarovsky/MACE | eccc050820f4bb9e483d2592e485ee372ac9453b | [
"Apache-2.0"
] | 8 | 2018-05-17T05:00:11.000Z | 2022-03-06T04:08:24.000Z | #!/usr/bin/env python
__author__ = 'Sergei F. Kliver'
import argparse
from MACE.Parsers.VCF import CollectionVCF
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--input", action="store", dest="input", required=True,
help="Input vcf file with variants")
parser.add_argument("-o", "--o... | 34.809524 | 97 | 0.72777 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.284542 |
0dbd78b43d77e2f637add4aadedc2dd45ad3b56e | 1,227 | py | Python | tests/test_analyzer.py | skantar-modoolar/githubrepo | 7a5954dc6383a3c3219bc75c009dde1b2422ec29 | [
"MIT"
] | 31 | 2018-02-23T20:14:40.000Z | 2022-02-13T09:39:41.000Z | tests/test_analyzer.py | skantar-modoolar/githubrepo | 7a5954dc6383a3c3219bc75c009dde1b2422ec29 | [
"MIT"
] | null | null | null | tests/test_analyzer.py | skantar-modoolar/githubrepo | 7a5954dc6383a3c3219bc75c009dde1b2422ec29 | [
"MIT"
] | 12 | 2017-12-24T22:31:16.000Z | 2022-01-27T13:49:43.000Z | import unittest
class SemanticAnalyzerTestCase(unittest.TestCase):
def analyze(self, text):
from interpreter.lexical_analysis.lexer import Lexer
from interpreter.syntax_analysis.parser import Parser
from interpreter.semantic_analysis.analyzer import SemanticAnalyzer
lexer = Lexer(t... | 25.5625 | 75 | 0.416463 | 1,210 | 0.986145 | 0 | 0 | 0 | 0 | 0 | 0 | 709 | 0.577832 |
0dbf5574312608332f8313f03b50dab922a2211e | 2,176 | py | Python | pdxpython/ast/php2python.py | dcolish/Presentations | 50697a3f26405a916eab481b8749cfef2fa23d4b | [
"BSD-3-Clause"
] | 2 | 2016-02-28T09:24:58.000Z | 2019-10-22T03:38:18.000Z | pdxpython/ast/php2python.py | dcolish/Presentations | 50697a3f26405a916eab481b8749cfef2fa23d4b | [
"BSD-3-Clause"
] | null | null | null | pdxpython/ast/php2python.py | dcolish/Presentations | 50697a3f26405a916eab481b8749cfef2fa23d4b | [
"BSD-3-Clause"
] | 1 | 2018-08-17T01:28:58.000Z | 2018-08-17T01:28:58.000Z | import ast
from ast import Assign, Load, Module, Name, Print, Store
node_map = {
'Assignment': dict(pynode='Assign',
mappers={'targets': 'node', 'value': 'expr'},
types={'left': 'list'},
args={'ctx': ast.Store(lineno=0, col_offset=0)}),
'Ech... | 31.085714 | 77 | 0.517463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.097886 |
0dc0056efdee9b1d1bd0f350e44c040b3529806f | 8,178 | py | Python | ali1688shopeehtmlparse.py | zdlgithub/Ali1688Scraper | 0dc183eca536417bf970a7126d7fc03e90890e16 | [
"Apache-2.0"
] | null | null | null | ali1688shopeehtmlparse.py | zdlgithub/Ali1688Scraper | 0dc183eca536417bf970a7126d7fc03e90890e16 | [
"Apache-2.0"
] | null | null | null | ali1688shopeehtmlparse.py | zdlgithub/Ali1688Scraper | 0dc183eca536417bf970a7126d7fc03e90890e16 | [
"Apache-2.0"
] | null | null | null | import settings
from ali1688scraperbrowser import ScraperBrowser
from bs4 import BeautifulSoup
import datetime
from functools import reduce
import re
def get_attr_content(aa, bb):
cc = []
for a in aa:
for b in bb:
ctemp = []
tmp0 = a[0] + ',' + b[0]
ctemp.append(tmp... | 37.172727 | 112 | 0.514796 | 7,767 | 0.926187 | 0 | 0 | 0 | 0 | 0 | 0 | 2,172 | 0.259003 |
0dc06fc3dbe0b9ac91b605cf4ba54edd77f86c7d | 2,454 | py | Python | misc_utils/scripts/combined/combine_datasets.py | shiningsunnyday/ssd_keras | 3a2ea0ceaa676f59b1787ad5f5e8337520c7c056 | [
"Apache-2.0"
] | null | null | null | misc_utils/scripts/combined/combine_datasets.py | shiningsunnyday/ssd_keras | 3a2ea0ceaa676f59b1787ad5f5e8337520c7c056 | [
"Apache-2.0"
] | null | null | null | misc_utils/scripts/combined/combine_datasets.py | shiningsunnyday/ssd_keras | 3a2ea0ceaa676f59b1787ad5f5e8337520c7c056 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
belga_train_path = '../../../../datasets/belgas/belgas_relabelled.csv'
logos_train_path = '../../../../datasets/LogosInTheWild-v2/LogosClean/commonformat/ImageSets/logos_top_train.csv'
flickr_train_path = '../../../../datasets/FlickrLogos_47/flickr_train_labels.csv'
belga_t... | 70.114286 | 137 | 0.757539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 881 | 0.359006 |
0dc0ab3941d2a0577ef9dd19f4ae678cbe8b2aa3 | 7,327 | py | Python | package/cudamat/cudamat_conv.py | Corvalius/deepnet | 5ff6726ae64c248283b9038a0023983bd209a7b0 | [
"BSD-3-Clause"
] | 1 | 2018-04-02T08:59:56.000Z | 2018-04-02T08:59:56.000Z | package/cudamat/cudamat_conv.py | Corvalius/deepnet | 5ff6726ae64c248283b9038a0023983bd209a7b0 | [
"BSD-3-Clause"
] | null | null | null | package/cudamat/cudamat_conv.py | Corvalius/deepnet | 5ff6726ae64c248283b9038a0023983bd209a7b0 | [
"BSD-3-Clause"
] | null | null | null | import ctypes as ct
import math
import pdb
import platform
if platform.system() == 'Windows':
_ConvNet = ct.cdll.LoadLibrary('libcudamat_conv.dll')
else:
_ConvNet = ct.cdll.LoadLibrary('libcudamat_conv.so')
def convUp(images, filters, targets, numModulesX, paddingStart, moduleStride, numImgColors, numGroups=1... | 39.181818 | 184 | 0.711888 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,348 | 0.320459 |
0dc3b4808b6cd53b143bd55fb5ab0282f1755cf6 | 292 | py | Python | web/django/users/views.py | codpro880/heartspeed | 8027216fe3c3bb0bd702c823b876dfa42c91ce7a | [
"MIT"
] | 3 | 2019-04-28T16:01:38.000Z | 2020-12-06T02:39:03.000Z | web/django/users/views.py | codpro880/heartspeed | 8027216fe3c3bb0bd702c823b876dfa42c91ce7a | [
"MIT"
] | 12 | 2020-12-06T05:30:02.000Z | 2021-04-27T00:18:13.000Z | web/django/users/views.py | codpro880/heartspeed | 8027216fe3c3bb0bd702c823b876dfa42c91ce7a | [
"MIT"
] | null | null | null | from django.http import HttpRequest, HttpResponse
from django.shortcuts import render
def home(request: HttpRequest) -> HttpResponse:
if request.user.is_authenticated:
return render(request, 'home.html', {'user': request.user})
return HttpResponse("Login to see this page")
| 32.444444 | 67 | 0.746575 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.140411 |
0dc3ca7f4bf0bc9234f64614f8a96483cdf2160f | 10,579 | py | Python | patchy/core.py | arogazinsky/django-more | 2eb309b383b1c5b001a0596f0f3ecf2c6910a821 | [
"BSD-3-Clause"
] | 32 | 2017-10-19T10:38:14.000Z | 2021-11-30T22:31:39.000Z | patchy/core.py | OakNorthAI/django-more | 627448bb280674370d088ceb26bcbb0994665d79 | [
"BSD-3-Clause"
] | 6 | 2017-10-25T14:21:53.000Z | 2020-09-17T07:02:34.000Z | patchy/core.py | OakNorthAI/django-more | 627448bb280674370d088ceb26bcbb0994665d79 | [
"BSD-3-Clause"
] | 7 | 2017-12-29T03:18:59.000Z | 2020-09-16T11:52:38.000Z | """ Generic monkey patching functions for doing it (mostly) safely """
import logging
import inspect
from types import MethodType, ModuleType
from collections import abc
from importlib import import_module
from importlib.util import resolve_name
from contextlib import suppress
__all__ = ['patchy', 'super_patchy']
lo... | 37.647687 | 112 | 0.614519 | 7,489 | 0.707912 | 0 | 0 | 0 | 0 | 0 | 0 | 2,074 | 0.196049 |
0dc4f9d36773ff6ca62f3b1a523b2733e0acae36 | 569 | py | Python | loop-nests/graph-processing/bfs-pull/util/stats_parser.py | NVlabs/data-orchestration | ad86e65fbd99bb7670700cab7c7031bf232c831f | [
"BSD-3-Clause"
] | 5 | 2019-04-13T02:00:35.000Z | 2019-07-22T18:23:25.000Z | loop-nests/graph-processing/bfs-pull/util/stats_parser.py | NVlabs/data-orchestration | ad86e65fbd99bb7670700cab7c7031bf232c831f | [
"BSD-3-Clause"
] | null | null | null | loop-nests/graph-processing/bfs-pull/util/stats_parser.py | NVlabs/data-orchestration | ad86e65fbd99bb7670700cab7c7031bf232c831f | [
"BSD-3-Clause"
] | 2 | 2019-06-23T18:14:21.000Z | 2019-12-29T02:34:33.000Z | import sys
import os
import numpy as np
import helper
fname = sys.argv[1]
stats = ['parent', 'frontier', 'TileInOffsets', 'TileSources', 'Totals']
stypes = ['Tensor', 'Offchip']
data = {}
# collect data
for stat in stats:
data[stat] = {}
for stype in stypes:
data[stat][stype] = helper.getData(fname... | 19.62069 | 73 | 0.525483 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.388401 |
0dc665111b39744549e1fb53ae5f7e841e340385 | 369 | py | Python | siswa/urls.py | nelsonpythondev/crud-using-widget-tweaks | eb9722e890540a2703068a101546527c7c667db5 | [
"MIT"
] | null | null | null | siswa/urls.py | nelsonpythondev/crud-using-widget-tweaks | eb9722e890540a2703068a101546527c7c667db5 | [
"MIT"
] | null | null | null | siswa/urls.py | nelsonpythondev/crud-using-widget-tweaks | eb9722e890540a2703068a101546527c7c667db5 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name="home"),
path('listsiswa', views.siswa_view, name="list-siswa"),
path('addsiswa', views.add_siswa, name="add-siswa"),
path('editsiswa/<int:id>', views.edit_siswa, name="edit-siswa"),
path('deletesiswa/<int:i... | 33.545455 | 74 | 0.674797 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.325203 |
0dc67cec6d004a4498776bf6383786b9d8123e1d | 3,909 | py | Python | name_sub.py | user2589/10707-project | adf1b05e15a3bbc2e7dd8940a2a2bba9e72b5ada | [
"Apache-2.0"
] | null | null | null | name_sub.py | user2589/10707-project | adf1b05e15a3bbc2e7dd8940a2a2bba9e72b5ada | [
"Apache-2.0"
] | null | null | null | name_sub.py | user2589/10707-project | adf1b05e15a3bbc2e7dd8940a2a2bba9e72b5ada | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# coding=utf-8
import argparse
import logging
import os
import numpy as np
import pandas as pd
import string
PRONOUN2GENDER = {
'he': 'male', 'him': 'male', 'his': 'male',
'she': 'female', 'her': 'female', 'hers': 'female'}
GENDER2NAME = {
'female': (
('Mary', 'Alice'),
... | 31.02381 | 91 | 0.507291 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,536 | 0.392939 |
0dc6e7bdb0da5bb1eda25e86d04aeac07af2edc1 | 185 | py | Python | examples/rampup.py | druck13/blinkt | 4370a64cbd4cf7d6177967b902f16793a4c5fa60 | [
"MIT"
] | null | null | null | examples/rampup.py | druck13/blinkt | 4370a64cbd4cf7d6177967b902f16793a4c5fa60 | [
"MIT"
] | null | null | null | examples/rampup.py | druck13/blinkt | 4370a64cbd4cf7d6177967b902f16793a4c5fa60 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
from time import sleep
import blinkt
for i in range(256):
blinkt.set_all(i, i, i)
sys.stdout.write("%3d" % i)
blinkt.show()
sleep(0.1)
| 16.818182 | 31 | 0.643243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.140541 |
0dc81185812bd2a578f8d6217d7f878061f816f2 | 732 | py | Python | django_fixtures/decorators.py | retxxxirt/django-fixtures | 8a8d3c1ac49291716c02efe56ed0b9697b93370c | [
"MIT"
] | null | null | null | django_fixtures/decorators.py | retxxxirt/django-fixtures | 8a8d3c1ac49291716c02efe56ed0b9697b93370c | [
"MIT"
] | null | null | null | django_fixtures/decorators.py | retxxxirt/django-fixtures | 8a8d3c1ac49291716c02efe56ed0b9697b93370c | [
"MIT"
] | null | null | null | from typing import Callable
from .utilities import get_fixture
def exclude_fixtures(*fixtures_classes_or_accessors):
def decorator(function: Callable):
def wrapper(*args, **kwargs):
for fixture_class_or_accessor in fixtures_classes_or_accessors:
if isinstance(fixture_class_or_... | 31.826087 | 93 | 0.654372 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0dce53a767ed3bfb1d9e58bb58279706fd6813fa | 378 | py | Python | bot/config.py | famaxth/Russian-Bot-Shop | 0fc1f55878b867e20489bfd115ed0148bd6238e8 | [
"MIT"
] | 13 | 2021-06-02T09:48:23.000Z | 2022-03-28T22:13:02.000Z | bot/config.py | famaxth/Russian-Bot-Shop | 0fc1f55878b867e20489bfd115ed0148bd6238e8 | [
"MIT"
] | 1 | 2020-12-12T00:31:33.000Z | 2020-12-12T00:31:33.000Z | bot/config.py | famaxth/Russian-Bot-Shop | 0fc1f55878b867e20489bfd115ed0148bd6238e8 | [
"MIT"
] | 5 | 2021-06-23T07:00:46.000Z | 2021-12-20T11:25:49.000Z | name = "text" # Имя магазина
token = "text" # Токен бота
admin_id = 777777777 # ID администратора
channel = "@text" # Адрес канала с новостями
op = "@text" # Юзернейм оператора
token_qiwi = "text"
qiwi = "number" # Номер Qiwi кошелька
bitcoin = "text" # Адрес биткоин
logo_stick = "text" # Код стикера
s... | 31.5 | 46 | 0.674603 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 341 | 0.686117 |
0dcfc9d940cb87b3c927e8703caf4aa8cf22b376 | 725 | py | Python | SparkPythonCourse/word-count-dataframe.py | leodias-datascience/apache-spark | faecd0e5910b4e780abb7db4e94f83a409e03e34 | [
"Apache-2.0"
] | null | null | null | SparkPythonCourse/word-count-dataframe.py | leodias-datascience/apache-spark | faecd0e5910b4e780abb7db4e94f83a409e03e34 | [
"Apache-2.0"
] | null | null | null | SparkPythonCourse/word-count-dataframe.py | leodias-datascience/apache-spark | faecd0e5910b4e780abb7db4e94f83a409e03e34 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 27 10:13:22 2021
@author: LeonardoDiasdaRosa
"""
from pyspark.sql import SparkSession
from pyspark.sql import functions as func
## Data
DATA_PATH = '../data/'
FILE = "book.txt"
data = DATA_PATH + FILE
# Create a SparkSession
spark = SparkSession.builder.appName("WordC... | 23.387097 | 85 | 0.726897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 200 | 0.275862 |
0dd0991a96f1b462421439b00656979004b9d577 | 2,606 | py | Python | app/tableScraper.py | nyatla/PdfExtractKit | 541cf5a381f5ff0c96e386e1d1cc0fc552ac6845 | [
"MIT"
] | null | null | null | app/tableScraper.py | nyatla/PdfExtractKit | 541cf5a381f5ff0c96e386e1d1cc0fc552ac6845 | [
"MIT"
] | null | null | null | app/tableScraper.py | nyatla/PdfExtractKit | 541cf5a381f5ff0c96e386e1d1cc0fc552ac6845 | [
"MIT"
] | null | null | null | #!/bin/python3
"""
pdf内の単純表をjsonに変換します。
# python3 table.pdf -o out.json
出力するjsonの形式は以下の通りです。
[
{page:int,data:[parsed tables]},...
]
テーブルはテーブルの行毎に1列づつ、セル内の行毎に配列で格納します。
"""
#%%
from datetime import date
from tqdm import tqdm
from logging import addLevelName
import os,sys
sys.path.ap... | 35.216216 | 164 | 0.693784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 937 | 0.322881 |
0dd18628c57f70a1b34391c7c3b1e07d45c77aea | 1,795 | py | Python | sqlite.py | Ben-Ning/webhook_demo | 4a07f83df7e4d7788656582f68358aab4e30e3a1 | [
"Apache-2.0"
] | null | null | null | sqlite.py | Ben-Ning/webhook_demo | 4a07f83df7e4d7788656582f68358aab4e30e3a1 | [
"Apache-2.0"
] | null | null | null | sqlite.py | Ben-Ning/webhook_demo | 4a07f83df7e4d7788656582f68358aab4e30e3a1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2016-2020
# Chenglin Ning, chenglinning@gmain.com
import logging
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import scoped_session
from sqlalchemy import create_engine
from sqlalchemy import exc
from sqlalchemy import event
from sqlalchemy.pool import Pool
from s... | 28.951613 | 75 | 0.69415 | 657 | 0.366017 | 0 | 0 | 948 | 0.528134 | 0 | 0 | 219 | 0.122006 |
0dd2369e794daf26a5b02e83b43c9d84e97be11a | 2,909 | py | Python | calibrate_cam.py | EsbernTK/first-order-model | 35117e1bb8ad72f9de134e0167defd6c381dcc5d | [
"MIT"
] | null | null | null | calibrate_cam.py | EsbernTK/first-order-model | 35117e1bb8ad72f9de134e0167defd6c381dcc5d | [
"MIT"
] | null | null | null | calibrate_cam.py | EsbernTK/first-order-model | 35117e1bb8ad72f9de134e0167defd6c381dcc5d | [
"MIT"
] | null | null | null | import cv2
from skimage.transform import resize
import os
from demo import key_pressed
if __name__ == '__main__':
frame_dim = 256
vid = cv2.VideoCapture(0)
width = 1920
height = 1080
vid.set(cv2.CAP_PROP_FRAME_WIDTH, width)
vid.set(cv2.CAP_PROP_FRAME_HEIGHT, height)
capname = "cap"
# cv... | 35.048193 | 113 | 0.564799 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 414 | 0.142317 |
0dd3d5da7a826b786172c44a1312296d48423f6a | 2,824 | py | Python | fallball/fallballapp/fixtures/load_data.py | jazz-jack/fallball-service | 12c91bc0162a8d3d2d103acd66df6e72cdf6a8d2 | [
"Apache-2.0"
] | null | null | null | fallball/fallballapp/fixtures/load_data.py | jazz-jack/fallball-service | 12c91bc0162a8d3d2d103acd66df6e72cdf6a8d2 | [
"Apache-2.0"
] | null | null | null | fallball/fallballapp/fixtures/load_data.py | jazz-jack/fallball-service | 12c91bc0162a8d3d2d103acd66df6e72cdf6a8d2 | [
"Apache-2.0"
] | 1 | 2020-06-19T05:00:43.000Z | 2020-06-19T05:00:43.000Z | import binascii
import os
from django.conf import settings
from fallballapp.meta_data import data
from fallballapp.utils import get_app_username
def load_data(apps, schema_editor):
user_admin, created = apps.get_model('auth', 'User').objects.get_or_create(
username='admin',
password='pbkdf2_sha2... | 40.342857 | 97 | 0.589235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 389 | 0.137748 |
0dd55b3492d17351fe309ec42664f2d185906465 | 1,417 | py | Python | pymc3/step_methods/compound.py | bishax/pymc3 | 7cd66b7ff35659bf6dc7ae100794925e18708781 | [
"Apache-2.0"
] | 4 | 2019-04-03T08:49:07.000Z | 2022-01-05T00:36:29.000Z | pymc3/step_methods/compound.py | bishax/pymc3 | 7cd66b7ff35659bf6dc7ae100794925e18708781 | [
"Apache-2.0"
] | null | null | null | pymc3/step_methods/compound.py | bishax/pymc3 | 7cd66b7ff35659bf6dc7ae100794925e18708781 | [
"Apache-2.0"
] | 1 | 2017-06-12T14:59:34.000Z | 2017-06-12T14:59:34.000Z | '''
Created on Mar 7, 2011
@author: johnsalvatier
'''
class CompoundStep(object):
"""Step method composed of a list of several other step methods applied in sequence."""
def __init__(self, methods):
self.methods = list(methods)
self.generates_stats = any(method.generates_stats for method in ... | 28.34 | 91 | 0.579393 | 1,356 | 0.956951 | 0 | 0 | 216 | 0.152435 | 0 | 0 | 149 | 0.105152 |
0dd6275a25b6feb105a3fe19758151a3ee6b6e20 | 2,221 | py | Python | book4/s4_teorico.py | Felipe-Tommaselli/Python4everbody_Michigan | f4f940c15a4b165b144d14ead79d583bf31b805b | [
"MIT"
] | null | null | null | book4/s4_teorico.py | Felipe-Tommaselli/Python4everbody_Michigan | f4f940c15a4b165b144d14ead79d583bf31b805b | [
"MIT"
] | null | null | null | book4/s4_teorico.py | Felipe-Tommaselli/Python4everbody_Michigan | f4f940c15a4b165b144d14ead79d583bf31b805b | [
"MIT"
] | null | null | null | # MANY-TO-MANY RELATIONSHIPS IN SQL
#! MANY-TO-MANY
# até agr só vimos one-to-many ou many-to-one relationships
#* um exemplo são diferentes livros que são escritos por diferentes autores
#* -------- ----------
#* | BOOKS | <==> | AUTHORS |
#* -------- ----------
#* Nesse caso adicionamos... | 29.613333 | 78 | 0.558757 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,175 | 0.975336 |
0dd648a1b0a3c6380cf52b3fe1adf783f9259752 | 426 | py | Python | english/migrations/0006_alter_english_tag.py | xgxofdream/Notebook_by_Tag | 226b304a37564ad68092864266f1c769dcba7473 | [
"MIT"
] | null | null | null | english/migrations/0006_alter_english_tag.py | xgxofdream/Notebook_by_Tag | 226b304a37564ad68092864266f1c769dcba7473 | [
"MIT"
] | null | null | null | english/migrations/0006_alter_english_tag.py | xgxofdream/Notebook_by_Tag | 226b304a37564ad68092864266f1c769dcba7473 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2022-02-02 00:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('english', '0005_auto_20220201_2343'),
]
operations = [
migrations.AlterField(
model_name='english',
name='tag',
... | 22.421053 | 92 | 0.610329 | 333 | 0.78169 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.269953 |
0dd7a9eb3782838d1e9f740e275a10773c24ba31 | 247 | py | Python | categorization/animal_categories.py | techmango-org/python-import-resolution | d41e394399370aebb8862cdfd10daa2de9bc71ab | [
"Apache-2.0"
] | 1 | 2019-07-12T15:58:10.000Z | 2019-07-12T15:58:10.000Z | categorization/animal_categories.py | techmango-org/python-import-resolution | d41e394399370aebb8862cdfd10daa2de9bc71ab | [
"Apache-2.0"
] | null | null | null | categorization/animal_categories.py | techmango-org/python-import-resolution | d41e394399370aebb8862cdfd10daa2de9bc71ab | [
"Apache-2.0"
] | 1 | 2019-06-07T01:23:12.000Z | 2019-06-07T01:23:12.000Z | import utils.constants as const
animal_scores = {
const.DOG: 100,
const.CAT: 300
}
def get_animal_score(animal_name):
if animal_name in animal_scores:
return animal_scores[animal_name]
return const.DEFAULT_ANIMAL_SCORE
| 17.642857 | 41 | 0.732794 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0dda6198b29e6336d0c0d4ba19bec65d52b9c7a2 | 674 | py | Python | Assignment13_2JSONdataextraction.py | AnkurDesai11/PY4E | bfd185ef89d4b054a2286ca8a6eae476c086b782 | [
"BSD-3-Clause"
] | null | null | null | Assignment13_2JSONdataextraction.py | AnkurDesai11/PY4E | bfd185ef89d4b054a2286ca8a6eae476c086b782 | [
"BSD-3-Clause"
] | null | null | null | Assignment13_2JSONdataextraction.py | AnkurDesai11/PY4E | bfd185ef89d4b054a2286ca8a6eae476c086b782 | [
"BSD-3-Clause"
] | null | null | null | '''
Created on 25 Aug, 2020
@author: ABD
Sample data: http://py4e-data.dr-chuck.net/comments_42.json (Sum=2553)
Actual data: http://py4e-data.dr-chuck.net/comments_896976.json (Sum ends with 62)
'''
import urllib.request, urllib.parse, urllib.error
import ssl
import json
ctx = ssl.create_default_context()
... | 28.083333 | 83 | 0.688427 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.408012 |
0ddaedacd3a784847edbad802242ae23fdc0a158 | 2,027 | py | Python | strands_tweets/scripts/image_tweeter_node.py | LuAPi/strands_social | 488e2d3450df6d5d0dd26994d19077b8259c285e | [
"MIT"
] | null | null | null | strands_tweets/scripts/image_tweeter_node.py | LuAPi/strands_social | 488e2d3450df6d5d0dd26994d19077b8259c285e | [
"MIT"
] | 8 | 2015-02-10T11:07:21.000Z | 2019-10-17T09:41:10.000Z | strands_tweets/scripts/image_tweeter_node.py | LuAPi/strands_social | 488e2d3450df6d5d0dd26994d19077b8259c285e | [
"MIT"
] | 4 | 2015-02-09T16:15:58.000Z | 2019-01-23T14:15:44.000Z | #! /usr/bin/env python
import rospy
import actionlib
from strands_tweets.msg import SendTweetAction, SendTweetGoal, GrabImageThenTweetAction, GrabImageThenTweetResult
from sensor_msgs.msg import Image
class ImageTweeter(object):
def __init__(self) :
rospy.loginfo('Waiting for strands_tweets'... | 34.948276 | 144 | 0.674396 | 1,713 | 0.845091 | 0 | 0 | 0 | 0 | 0 | 0 | 257 | 0.126788 |
0ddb9f14ed80c3814d00d8cedd70dbfbb0e10be6 | 1,876 | py | Python | 3.py | Abhilash2015mca/Flask-Restful | 308f7e3887e465361cd7c399c684d70b375752fa | [
"MIT"
] | null | null | null | 3.py | Abhilash2015mca/Flask-Restful | 308f7e3887e465361cd7c399c684d70b375752fa | [
"MIT"
] | null | null | null | 3.py | Abhilash2015mca/Flask-Restful | 308f7e3887e465361cd7c399c684d70b375752fa | [
"MIT"
] | null | null | null | # Avoided iterarion using filter function and added put and delete operation
from flask import Flask, request
from flask_restful import Resource, Api
app = Flask(__name__)
api = Api(app)
items = []
class Item(Resource):
def get(self, name):
item = next(filter(lambda x: x['name'] == name, items), None)
... | 30.258065 | 77 | 0.579424 | 1,493 | 0.795842 | 0 | 0 | 0 | 0 | 0 | 0 | 492 | 0.26226 |
0ddd0c2f299cd8c68206ef4fe9197b0a0b2718d4 | 3,287 | py | Python | tests/integration_tests/test_node_starts_in_reset_and_converges.py | sspbft/BFTList | d73aee5bd0ab05995509f0fcfaf3c0a5944e617a | [
"MIT"
] | 6 | 2019-11-12T01:45:55.000Z | 2022-03-18T10:57:21.000Z | tests/integration_tests/test_node_starts_in_reset_and_converges.py | practicalbft/BFTList | d73aee5bd0ab05995509f0fcfaf3c0a5944e617a | [
"MIT"
] | 4 | 2019-02-14T10:57:09.000Z | 2019-03-21T15:22:08.000Z | tests/integration_tests/test_node_starts_in_reset_and_converges.py | sspbft/BFTList | d73aee5bd0ab05995509f0fcfaf3c0a5944e617a | [
"MIT"
] | 1 | 2019-04-04T15:09:33.000Z | 2019-04-04T15:09:33.000Z | """
Testing functionality of reseting when no other node is resetting.
Node 0 has gone through a reset without needing it and ended up in phase 1 with RST_PAIR.
Node 0 shall catch up with the other nodes in view (2,2)
"""
# standard
import asyncio
import logging
from copy import deepcopy
# local
from . import helper... | 31.304762 | 89 | 0.56404 | 2,317 | 0.704898 | 0 | 0 | 258 | 0.078491 | 1,827 | 0.555826 | 709 | 0.215698 |
0ddd68a108546a0adfbfa6089b444f8271d6dbbc | 4,723 | py | Python | test_attack.py | leeyegy/pytorch-cifar | a8a39891c7f7a86b636cfc615a431a761dfd74c6 | [
"MIT"
] | null | null | null | test_attack.py | leeyegy/pytorch-cifar | a8a39891c7f7a86b636cfc615a431a761dfd74c6 | [
"MIT"
] | null | null | null | test_attack.py | leeyegy/pytorch-cifar | a8a39891c7f7a86b636cfc615a431a761dfd74c6 | [
"MIT"
] | null | null | null | '''Train CIFAR10 with PyTorch.'''
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torchvision
import torchvision.transforms as transforms
import os
import argparse
from models import *
from utils import progress_bar
from loss ... | 33.978417 | 126 | 0.680076 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,244 | 0.263392 |
0ddda64a86be49c713d7995b9f5330b5684cded0 | 2,327 | py | Python | src/megrok/rdb/tests/initialization.py | prsephton/megrok.rdb | 5e1f5493704159869eac24518b77fc0a06c62c14 | [
"ZPL-2.1"
] | null | null | null | src/megrok/rdb/tests/initialization.py | prsephton/megrok.rdb | 5e1f5493704159869eac24518b77fc0a06c62c14 | [
"ZPL-2.1"
] | null | null | null | src/megrok/rdb/tests/initialization.py | prsephton/megrok.rdb | 5e1f5493704159869eac24518b77fc0a06c62c14 | [
"ZPL-2.1"
] | null | null | null | """
We test an initialization pattern for z3c.saconfig where the metadata
is set up in an event handler.
Let's first grok things::
>>> grok.testing.grok('megrok.rdb.meta')
>>> grok.testing.grok(__name__)
We start using the database now::
>>> session = rdb.Session()
Let's start using the database now::
>>>... | 27.376471 | 69 | 0.700473 | 502 | 0.215728 | 0 | 0 | 94 | 0.040395 | 0 | 0 | 1,244 | 0.534594 |
0ddf70bf8e1bbf5bc20b4ce995028fd8820e67d8 | 841 | py | Python | auctioning_platform/main/main/redis.py | nhdinh/smp-modulith | 84c31b36e9b449fe3135f3802c1bbc362e7fb459 | [
"MIT"
] | 299 | 2019-09-13T23:03:29.000Z | 2022-03-24T09:20:43.000Z | auctioning_platform/main/main/redis.py | winston-won/clean-architecture | 95546b29c9a5ff0e16c7f67b9ab736749e87f8ae | [
"MIT"
] | 109 | 2019-11-03T12:16:16.000Z | 2021-07-26T08:32:28.000Z | auctioning_platform/main/main/redis.py | winston-won/clean-architecture | 95546b29c9a5ff0e16c7f67b9ab736749e87f8ae | [
"MIT"
] | 38 | 2019-09-13T23:03:34.000Z | 2022-03-24T09:21:10.000Z | from types import TracebackType
from typing import Optional, Type
from redis import StrictRedis
from typing_extensions import Literal
from foundation.locks import AlreadyLocked, Lock
class RedisLock(Lock):
LOCK_VALUE = "LOCKED"
def __init__(self, redis: StrictRedis, name: str, timeout: int = 30) -> None:
... | 30.035714 | 120 | 0.690844 | 653 | 0.776457 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.009512 |
0ddfc1680e0087c9a160e4d4f6fa41fc5828a2ba | 7,124 | py | Python | python/bitwarden/crypto.py | rjc/bitwarden-cli | 770c2af962d696b3aaaf16a77eefc0c3187b7b11 | [
"MIT"
] | 48 | 2018-04-08T02:54:23.000Z | 2022-02-21T10:13:47.000Z | python/bitwarden/crypto.py | rjc/bitwarden-cli | 770c2af962d696b3aaaf16a77eefc0c3187b7b11 | [
"MIT"
] | 13 | 2018-04-08T22:31:44.000Z | 2021-05-08T20:42:39.000Z | python/bitwarden/crypto.py | rjc/bitwarden-cli | 770c2af962d696b3aaaf16a77eefc0c3187b7b11 | [
"MIT"
] | 15 | 2018-04-09T18:39:16.000Z | 2021-04-23T07:12:27.000Z | """
Bitwarden crypto functions.
Yes, this code is UGLY, The bitwarden documentation is either
missing, inconsistent or confusing.
This needs a refactor, but unknown if I will get to it before I move back to rust
where this code probably should live for reals.
See tests/test_bitwarden.py if you want to make sense of... | 34.086124 | 158 | 0.669989 | 77 | 0.010809 | 0 | 0 | 0 | 0 | 0 | 0 | 3,232 | 0.453678 |
0de0c7aff912812a7b1cf3cab0a2153ee44f170a | 12,624 | py | Python | genproto.py | eruffaldi/protosim | 921ef9f8c174809e2937a44daa2595c11426f7cd | [
"MIT"
] | null | null | null | genproto.py | eruffaldi/protosim | 921ef9f8c174809e2937a44daa2595c11426f7cd | [
"MIT"
] | null | null | null | genproto.py | eruffaldi/protosim | 921ef9f8c174809e2937a44daa2595c11426f7cd | [
"MIT"
] | null | null | null | #
# GenPROTO by Emanuele Ruffaldi 2009
# v1 2009/12/05
#
# TODO:
# - nicer Simulink layout
# - hash as annotation or as output
# - encoder id > 256 in particular using extended encoding (lsb+msb)
# - Alternative: XVR encoding of an array
# - Support for new types
import hashlib
def fixref(x):
if type(... | 41.526316 | 165 | 0.506099 | 10,928 | 0.865653 | 0 | 0 | 161 | 0.012753 | 0 | 0 | 4,534 | 0.359157 |
0de1f940fc4bc7f5faadcf0b88c3569a16720129 | 44,776 | py | Python | rlkit/launchers/rl_exp_launcher_util_old.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | rlkit/launchers/rl_exp_launcher_util_old.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/launchers/rl_exp_launcher_util_old.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | from rlkit.samplers.data_collector import VAEWrappedEnvPathCollector
from rlkit.visualization.video import VideoSaveFunction
from rlkit.torch.her.her import HERTrainer
from rlkit.torch.sac.policies import MakeDeterministic
from rlkit.torch.sac.sac import SACTrainer
from rlkit.torch.vae.online_vae_algorithm import Onlin... | 32.778917 | 90 | 0.655664 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,464 | 0.12203 |
0de2dcd6a923e5ccc38202d45bae32bf1315f3b6 | 2,200 | py | Python | python/helper/QTPAD_DataPrep.py | noxtoby/dem | 13fcd39194eeab91b276d5f616270c3e132b9070 | [
"MIT"
] | null | null | null | python/helper/QTPAD_DataPrep.py | noxtoby/dem | 13fcd39194eeab91b276d5f616270c3e132b9070 | [
"MIT"
] | null | null | null | python/helper/QTPAD_DataPrep.py | noxtoby/dem | 13fcd39194eeab91b276d5f616270c3e132b9070 | [
"MIT"
] | null | null | null | # Simple wrapper for data preparation
#
# Input: ADNI data as pandas dataframe
# Output: Modified dataframe
# * handle missing data: remove individuals with missing demographics?
# * stables and progressors (clinical diagnosis)
#
# Author: Neil Oxtoby, UCL, January 2018
# Translated and modified from earlier MAT... | 48.888889 | 208 | 0.704091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 937 | 0.425909 |
0de3841159183190f269892a6f7cb86c1c65bd8f | 5,237 | py | Python | scripts/automation/trex_control_plane/common/trex_exceptions.py | timgates42/trex-core | efe94752fcb2d0734c83d4877afe92a3dbf8eccd | [
"Apache-2.0"
] | 956 | 2015-06-24T15:04:55.000Z | 2022-03-30T06:25:04.000Z | scripts/automation/trex_control_plane/common/trex_exceptions.py | angelyouyou/trex-core | fddf78584cae285d9298ef23f9f5c8725e16911e | [
"Apache-2.0"
] | 782 | 2015-09-20T15:19:00.000Z | 2022-03-31T23:52:05.000Z | scripts/automation/trex_control_plane/common/trex_exceptions.py | angelyouyou/trex-core | fddf78584cae285d9298ef23f9f5c8725e16911e | [
"Apache-2.0"
] | 429 | 2015-06-27T19:34:21.000Z | 2022-03-23T11:02:51.000Z | #!/router/bin/python
#from rpc_exceptions import RPCExceptionHandler, WrappedRPCError
from jsonrpclib import Fault, ProtocolError, AppError
class RPCError(Exception):
"""
This is the general RPC error exception class from which :exc:`trex_exceptions.TRexException` inherits.
Every exception in this clas... | 37.141844 | 162 | 0.674814 | 4,889 | 0.93355 | 0 | 0 | 0 | 0 | 0 | 0 | 3,366 | 0.642734 |
0de5270e48f9bb8140229ad87f702d9f9395b7a9 | 1,319 | py | Python | functions/benchmarks/utils.py | xyclin/fluent | f1dcede5d4b7d6eab722180129dbb5aff4241621 | [
"Apache-2.0"
] | 1,164 | 2018-07-25T23:17:07.000Z | 2019-07-11T20:33:52.000Z | functions/benchmarks/utils.py | longwutianya/fluent | c8fc9f2dd781e5ed91c34351adc6a101cc383083 | [
"Apache-2.0"
] | 126 | 2018-07-25T22:41:53.000Z | 2019-07-10T21:49:19.000Z | functions/benchmarks/utils.py | longwutianya/fluent | c8fc9f2dd781e5ed91c34351adc6a101cc383083 | [
"Apache-2.0"
] | 178 | 2018-07-25T23:17:11.000Z | 2019-07-10T02:45:27.000Z | import logging
import numpy as np
import scipy.stats
def mean_confidence_interval(data, confidence=0.95):
n = len(data)
m, se = np.mean(data), scipy.stats.sem(data)
h = se * scipy.stats.t.ppf((1 + confidence) / 2., n-1)
return m, m-h, m+h
def print_latency_stats(data, ident, log=False):
npdata =... | 30.674419 | 76 | 0.501137 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 204 | 0.154663 |
0de9954b30086eb49e586c15ab6996930b07db5e | 2,038 | py | Python | pyxll_jupyter/qtimports.py | masariello/pyxll-jupyter | ae6f4416efda7329a5d67664ab957bad4fc431f1 | [
"MIT"
] | 132 | 2020-11-12T02:09:52.000Z | 2022-02-11T13:21:14.000Z | pyxll_jupyter/qtimports.py | masariello/pyxll-jupyter | ae6f4416efda7329a5d67664ab957bad4fc431f1 | [
"MIT"
] | 17 | 2020-12-25T03:12:18.000Z | 2022-01-12T15:35:26.000Z | pyxll_jupyter/qtimports.py | masariello/pyxll-jupyter | ae6f4416efda7329a5d67664ab957bad4fc431f1 | [
"MIT"
] | 26 | 2020-12-28T10:18:46.000Z | 2021-11-25T10:15:13.000Z | """Common imports used by other modules in this package.
They are collected here so we can switch between PySide6, PySide2 and PyQt5
depending on what's installed.
A specific Qt package can be specified in the pyxll.cfg file by setting
'qt' in the JUPYTER section, eg::
[JUPYTER]
qt = PyQt5
"""
import logging... | 34.542373 | 121 | 0.670265 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 616 | 0.302257 |
0de9ec4631263c9362f00069530b9cb00707225b | 2,852 | py | Python | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_patch.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_patch.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_patch.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.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ... | 46 | 137 | 0.717742 | 818 | 0.286816 | 0 | 0 | 0 | 0 | 0 | 0 | 1,598 | 0.560309 |
0dea26bd304d66b97401c4279b06adff6552c050 | 2,160 | py | Python | setup.py | collective/collective.recipe.beanstalkd | e19d8046f0adabfddf8c030a5eeacf66bca1e5cc | [
"MIT"
] | null | null | null | setup.py | collective/collective.recipe.beanstalkd | e19d8046f0adabfddf8c030a5eeacf66bca1e5cc | [
"MIT"
] | null | null | null | setup.py | collective/collective.recipe.beanstalkd | e19d8046f0adabfddf8c030a5eeacf66bca1e5cc | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/collective/collective.recipe.beanstalkd
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import pa... | 34.285714 | 89 | 0.658796 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,277 | 0.591204 |
0dea59d213130e261db2bc8cf3da1b67cff5451e | 5,187 | py | Python | model/LGNN.py | FeiGSSS/LGNN | d91107dcb2e94622b57afab1bcef90817545d729 | [
"MIT"
] | 2 | 2021-04-02T03:36:26.000Z | 2022-02-22T13:33:05.000Z | model/LGNN.py | FeiGSSS/LGNN | d91107dcb2e94622b57afab1bcef90817545d729 | [
"MIT"
] | null | null | null | model/LGNN.py | FeiGSSS/LGNN | d91107dcb2e94622b57afab1bcef90817545d729 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
'''
@File : LGNN.py
@Time : 2021/03/26 16:55:20
@Author : Fei gao
@Contact : feig@mail.bnu.edu.cn
BNU, Beijing, China
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
class LGNN_layer(nn.Module):
def __init__(self, size_Fa,
s... | 38.139706 | 81 | 0.555427 | 4,926 | 0.949682 | 0 | 0 | 0 | 0 | 0 | 0 | 582 | 0.112204 |
0deb78bf2abfa3eb4f5da9d512c50b99330acc10 | 1,682 | py | Python | Cloud/seeder.py | faramarzQ/Cloud_assisted_resource_allocation_using_machine_learning | 1aa8d8e63dcd6053f69e17bf90595a0aa2a7d317 | [
"Apache-2.0"
] | 1 | 2022-03-14T01:44:28.000Z | 2022-03-14T01:44:28.000Z | Cloud/seeder.py | faramarzQ/Cloud_assisted_resource_allocation_using_machine_learning | 1aa8d8e63dcd6053f69e17bf90595a0aa2a7d317 | [
"Apache-2.0"
] | null | null | null | Cloud/seeder.py | faramarzQ/Cloud_assisted_resource_allocation_using_machine_learning | 1aa8d8e63dcd6053f69e17bf90595a0aa2a7d317 | [
"Apache-2.0"
] | 1 | 2021-08-04T08:30:58.000Z | 2021-08-04T08:30:58.000Z | import random
if __name__ == '__main__':
""" the seeder module creates sample data using the given template
the template is in the seeder_data file,
it specifies the attributes and values our data has
output: data.csv
"""
# read template
with open("Cloud/storage/data/seeder_da... | 32.346154 | 81 | 0.548157 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 560 | 0.332937 |
0debd1322ec02fba09f8ff27e8077a2edc7b8e18 | 485 | py | Python | Difficulty/Medium/78.subsets.py | ryderfang/LeetCode | be9470dee6175bab321f0549f173c0c682dddd77 | [
"MIT"
] | 1 | 2021-05-06T02:27:30.000Z | 2021-05-06T02:27:30.000Z | Difficulty/Medium/78.subsets.py | ryderfang/LeetCode | be9470dee6175bab321f0549f173c0c682dddd77 | [
"MIT"
] | null | null | null | Difficulty/Medium/78.subsets.py | ryderfang/LeetCode | be9470dee6175bab321f0549f173c0c682dddd77 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=78 lang=python3
#
# [78] Subsets
#
# @lc code=start
from typing import List
import itertools
class Solution:
def subsets(self, nums: List[int]) -> List[List[int]]:
sz = len(nums)
ret = [[]]
cnt = 1
while cnt <= sz:
idx = list(itertools.combination... | 20.208333 | 62 | 0.519588 | 341 | 0.703093 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.173196 |
0decd297da4d380687e304aaf258a5a2ae51da22 | 220 | py | Python | BOJ_Solved/BOJ-1546.py | CodingLeeSeungHoon/Python_Algorithm_TeamNote | 1e92986999b45aa9951e12e67b23062e410e9b36 | [
"MIT"
] | 7 | 2021-11-19T14:50:59.000Z | 2022-02-25T20:00:20.000Z | BOJ_Solved/BOJ-1546.py | CodingLeeSeungHoon/Python_Algorithm_TeamNote | 1e92986999b45aa9951e12e67b23062e410e9b36 | [
"MIT"
] | null | null | null | BOJ_Solved/BOJ-1546.py | CodingLeeSeungHoon/Python_Algorithm_TeamNote | 1e92986999b45aa9951e12e67b23062e410e9b36 | [
"MIT"
] | null | null | null | """
백준 1546번 : 평균
"""
number = int(input( ))
scores = list(map(int, input( ).split( )))
temp = -1
for score in scores:
if score > temp:
temp = score
whole = sum(scores)
print((whole * 100 / temp) / number) | 15.714286 | 42 | 0.577273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.134783 |
0dee8b182c9c00b957334b937616b3f61730f89a | 1,406 | py | Python | selfdrive/car/tesla/teslacan.py | Basketkase/openpilot | 769e1cf7a8322ca83d1a86a2f547acf5e3a5a52e | [
"MIT"
] | 251 | 2019-07-12T05:14:20.000Z | 2022-03-30T21:05:22.000Z | selfdrive/car/tesla/teslacan.py | Basketkase/openpilot | 769e1cf7a8322ca83d1a86a2f547acf5e3a5a52e | [
"MIT"
] | 31 | 2020-03-06T01:50:25.000Z | 2022-03-11T19:09:08.000Z | selfdrive/car/tesla/teslacan.py | Basketkase/openpilot | 769e1cf7a8322ca83d1a86a2f547acf5e3a5a52e | [
"MIT"
] | 284 | 2019-07-29T13:14:19.000Z | 2022-03-30T17:26:47.000Z | import copy
import crcmod
from opendbc.can.can_define import CANDefine
from selfdrive.car.tesla.values import CANBUS
class TeslaCAN:
def __init__(self, dbc_name, packer):
self.can_define = CANDefine(dbc_name)
self.packer = packer
self.crc = crcmod.mkCrcFun(0x11d, initCrc=0x00, rev=False, xorOut=0xff)
... | 33.47619 | 85 | 0.706259 | 1,286 | 0.914651 | 0 | 0 | 180 | 0.128023 | 0 | 0 | 293 | 0.208393 |
0deea45a7c967ea82b3e38ab6a70977f2a533c4a | 888 | py | Python | af_scripts/uv/uvSetTgl.py | aaronfang/small-Scripts | 890b10ab19fa9cdf2415aaf2dc08b81cc64fc79d | [
"MIT"
] | 1 | 2018-03-08T16:34:00.000Z | 2018-03-08T16:34:00.000Z | af_scripts/uv/uvSetTgl.py | aaronfang/personal_scripts | 890b10ab19fa9cdf2415aaf2dc08b81cc64fc79d | [
"MIT"
] | null | null | null | af_scripts/uv/uvSetTgl.py | aaronfang/personal_scripts | 890b10ab19fa9cdf2415aaf2dc08b81cc64fc79d | [
"MIT"
] | null | null | null | # This script will switch UV Set between "map1" and "atlasmap".
# Useage:
# Select meshes and run this script
import maya.cmds as cmds
def uvsetTgl():
shape_node = cmds.ls(sl=True, fl=True, dag=True, type='shape')
current_uvset = cmds.polyUVSet(shape_node[0],q=True, currentUVSet=True)
for shape in shap... | 42.285714 | 75 | 0.634009 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.209459 |
0def1562e19ad9a5b2327c246d0c89c271c956ce | 2,480 | py | Python | acceptance_test.py | pgrabiec/Interpreter | 427786be63b35decc0af0bba602d84b5ab7d02bd | [
"MIT"
] | null | null | null | acceptance_test.py | pgrabiec/Interpreter | 427786be63b35decc0af0bba602d84b5ab7d02bd | [
"MIT"
] | null | null | null | acceptance_test.py | pgrabiec/Interpreter | 427786be63b35decc0af0bba602d84b5ab7d02bd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import filecmp
import os
import sys
import unittest
class AcceptanceTests(unittest.TestCase):
@classmethod
def add_test(cls, dirpath, filename):
basename = os.path.splitext(filename)[0]
if dirpath.startswith('./'):
dirpath = dirpath[2:]
if dirpath.end... | 43.508772 | 125 | 0.381048 | 2,213 | 0.892339 | 0 | 0 | 2,161 | 0.871371 | 0 | 0 | 210 | 0.084677 |