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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
890a5161d6eed2959007d6f815eb9b7dd35c2414 | 2,541 | py | Python | src/main.py | chanleoc/kbc_demo | 9138de9083d92f5c8bab1dfc42d3dde50544920d | [
"MIT"
] | null | null | null | src/main.py | chanleoc/kbc_demo | 9138de9083d92f5c8bab1dfc42d3dde50544920d | [
"MIT"
] | null | null | null | src/main.py | chanleoc/kbc_demo | 9138de9083d92f5c8bab1dfc42d3dde50544920d | [
"MIT"
] | 1 | 2019-02-01T19:37:30.000Z | 2019-02-01T19:37:30.000Z | "__author__ = 'Leo Chan'"
"__credits__ = 'Keboola 2019'"
"__project__ = 'kbc_demo'"
"""
Python 3 environment
"""
#import pip
#pip.main(['install', '--disable-pip-version-check', '--no-cache-dir', 'logging_gelf'])
import sys
import os
import logging
import csv
import json
import pandas as pd
import logging_gelf.form... | 23.1 | 93 | 0.69815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,366 | 0.537584 |
890c561bf0aec0a3506eddd281bfa30bb906a86e | 92 | py | Python | greek_app/apps.py | HCDigitalScholarship/GreekPal | 15a99b1dae971edef0cc90be064fb7cb291c317b | [
"MIT"
] | null | null | null | greek_app/apps.py | HCDigitalScholarship/GreekPal | 15a99b1dae971edef0cc90be064fb7cb291c317b | [
"MIT"
] | 28 | 2019-10-08T05:36:39.000Z | 2022-01-13T02:54:15.000Z | greek_app/apps.py | HCDigitalScholarship/GreekPal | 15a99b1dae971edef0cc90be064fb7cb291c317b | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class GreekAppConfig(AppConfig):
name = 'greek_app'
| 15.333333 | 33 | 0.76087 | 55 | 0.597826 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.119565 |
890cb45c8ba1a1a9867fe4cb3e4acf45b6533679 | 5,504 | py | Python | peac_pkg/contourer.py | emcramer/peac | 74a3b7c5885d84a0b6e1dfadd887d08aa3967866 | [
"MIT"
] | null | null | null | peac_pkg/contourer.py | emcramer/peac | 74a3b7c5885d84a0b6e1dfadd887d08aa3967866 | [
"MIT"
] | null | null | null | peac_pkg/contourer.py | emcramer/peac | 74a3b7c5885d84a0b6e1dfadd887d08aa3967866 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 8 10:01:34 2019
@author: ecramer
"""
import numpy as np
from scipy import interpolate
from skimage.feature import peak_local_max
class Contourer():
""" TODO: Full writeup of class documentation here.
Steps:
1. generate the contours for each factor... | 39.597122 | 112 | 0.553779 | 5,319 | 0.966388 | 0 | 0 | 0 | 0 | 0 | 0 | 1,774 | 0.322311 |
890cd66cad388ad20cba21addbcdb0f32f1ebfc7 | 1,344 | py | Python | cert_core/cert_store/config.py | johnykkwan/cert-core | 40fdf04bdc255de1b36ca1f99fae10e6994858a1 | [
"MIT"
] | 13 | 2017-03-10T01:03:08.000Z | 2021-06-05T14:13:35.000Z | cert_core/cert_store/config.py | johnykkwan/cert-core | 40fdf04bdc255de1b36ca1f99fae10e6994858a1 | [
"MIT"
] | 2 | 2018-05-09T23:37:21.000Z | 2018-05-09T23:49:56.000Z | cert_core/cert_store/config.py | johnykkwan/cert-core | 40fdf04bdc255de1b36ca1f99fae10e6994858a1 | [
"MIT"
] | 14 | 2017-05-27T16:21:43.000Z | 2022-02-12T16:25:21.000Z | import os
import configargparse
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
def create_config():
p = configargparse.getArgumentParser(default_config_files=[os.path.join(BASE_DIR, 'conf_test.ini'),
os.path.join(BASE... | 42 | 110 | 0.614583 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 396 | 0.294643 |
890e9894c6720002f79090ec3f6c0b3e8a97d456 | 3,053 | py | Python | tests/core/inst/jump/inst_jal.py | cornell-brg/lizard | 7f9a78a913e64b5cfdee3a26223539ad225bd6da | [
"BSD-3-Clause"
] | 50 | 2019-05-22T08:43:15.000Z | 2022-03-21T23:58:50.000Z | tests/core/inst/jump/inst_jal.py | cornell-brg/lizard | 7f9a78a913e64b5cfdee3a26223539ad225bd6da | [
"BSD-3-Clause"
] | 1 | 2019-07-27T18:51:52.000Z | 2019-08-02T01:20:22.000Z | tests/core/inst/jump/inst_jal.py | cornell-brg/lizard | 7f9a78a913e64b5cfdee3a26223539ad225bd6da | [
"BSD-3-Clause"
] | 11 | 2019-12-26T06:00:48.000Z | 2022-03-27T02:29:35.000Z | #=========================================================================
# jal
#=========================================================================
import random
from pymtl import *
from tests.context import lizard
from tests.core.inst_utils import *
#--------------------------------------------------------... | 22.123188 | 74 | 0.480511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,750 | 0.900753 |
890f2b51c60c3ae89e15389064fecd83f7930ef7 | 181 | py | Python | ecs/scratchpad/forms.py | programmierfabrik/ecs | 2389a19453e21b2ea4e40b272552bcbd42b926a9 | [
"Apache-2.0"
] | 9 | 2017-02-13T18:17:13.000Z | 2020-11-21T20:15:54.000Z | ecs/scratchpad/forms.py | programmierfabrik/ecs | 2389a19453e21b2ea4e40b272552bcbd42b926a9 | [
"Apache-2.0"
] | 2 | 2021-05-20T14:26:47.000Z | 2021-05-20T14:26:48.000Z | ecs/scratchpad/forms.py | programmierfabrik/ecs | 2389a19453e21b2ea4e40b272552bcbd42b926a9 | [
"Apache-2.0"
] | 4 | 2017-04-02T18:48:59.000Z | 2021-11-23T15:40:35.000Z | from django import forms
from ecs.scratchpad.models import ScratchPad
class ScratchPadForm(forms.ModelForm):
class Meta:
model = ScratchPad
fields = ('text',)
| 20.111111 | 44 | 0.701657 | 108 | 0.596685 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.033149 |
891149c09a494b51da684081827ffe7afa2014f5 | 1,531 | py | Python | tests/test_canvas.py | 0xF4D3C0D3/ray-tracer-challenge-with-python | 4140f2d534b3af5d70a9aa12dbc411a5bae7b918 | [
"MIT"
] | null | null | null | tests/test_canvas.py | 0xF4D3C0D3/ray-tracer-challenge-with-python | 4140f2d534b3af5d70a9aa12dbc411a5bae7b918 | [
"MIT"
] | 3 | 2020-03-24T18:01:09.000Z | 2021-02-02T22:19:35.000Z | tests/test_canvas.py | 0xF4D3C0D3/ray-tracer-challenge-with-python | 4140f2d534b3af5d70a9aa12dbc411a5bae7b918 | [
"MIT"
] | 1 | 2020-08-07T22:49:48.000Z | 2020-08-07T22:49:48.000Z | import numpy as np
from src.canvas import Canvas
from src.grid import Color
def test_create_canvas():
c = Canvas(10, 20)
assert c.rows == 10
assert c.cols == 20
assert np.all(c == Color(0, 0, 0))
def test_writing_pixel_to_canvas():
c = Canvas(10, 20)
red = Color(1, 0, 0)
c[2, 3] = red
... | 24.693548 | 79 | 0.573481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 387 | 0.252776 |
891182fd38f282bf8f36b0168fcfb4e616539c2d | 273 | py | Python | setup.py | kiran-vemuri/ifmap-python-client | 06198cface6421c50c7352009b8370713a414db5 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2015-01-21T11:52:27.000Z | 2017-01-24T05:13:55.000Z | setup.py | Mirantis/ifmap-python-client | 9d3ba070ca6b60d67a947632d476fca55f31dc5b | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | setup.py | Mirantis/ifmap-python-client | 9d3ba070ca6b60d67a947632d476fca55f31dc5b | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2015-03-11T07:51:30.000Z | 2016-10-12T06:08:08.000Z | #!/usr/bin/env python
import setuptools
setuptools.setup(
name='ifmap',
version='0.1',
description='IF-MAP Python Client Library',
url='https://github.com/ITI/ifmap-python-client',
packages=setuptools.find_packages(),
include_package_data=True,
)
| 21 | 53 | 0.699634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.391941 |
891468b009c1b13ce530b24e7304fbda965e0a7e | 4,697 | py | Python | errvallist.py | stefantkeller/ErrorValues | ad81c45d12067d54f3418ce5ceaf8bd9e78e8054 | [
"MIT"
] | null | null | null | errvallist.py | stefantkeller/ErrorValues | ad81c45d12067d54f3418ce5ceaf8bd9e78e8054 | [
"MIT"
] | null | null | null | errvallist.py | stefantkeller/ErrorValues | ad81c45d12067d54f3418ce5ceaf8bd9e78e8054 | [
"MIT"
] | null | null | null | #! /usr/bin/python2.7
# -*- coding: utf-8 -*-
'''
Work with whole lists of errval's:
[v0+-e0, v1+-e1, ...]
'''
import numpy as np
from errval import *
class errvallist(list):
def __init__(self,vals=[],errs=0,printout='latex'):
if isinstance(vals,errvallist):
self.__errl = vals
elif... | 37.879032 | 104 | 0.607409 | 4,537 | 0.965936 | 184 | 0.039174 | 0 | 0 | 0 | 0 | 948 | 0.201831 |
8916b84699c1edcb6e4ab2a662ea82184162ff53 | 1,148 | py | Python | proyectofinal/quiz/models.py | Syferk/trabajofinal | 54f778fc8b6e21a845702b43524b88c98badd52d | [
"MIT"
] | 1 | 2021-09-05T22:34:26.000Z | 2021-09-05T22:34:26.000Z | proyectofinal/quiz/models.py | Syferk/trabajofinal | 54f778fc8b6e21a845702b43524b88c98badd52d | [
"MIT"
] | null | null | null | proyectofinal/quiz/models.py | Syferk/trabajofinal | 54f778fc8b6e21a845702b43524b88c98badd52d | [
"MIT"
] | 3 | 2021-09-05T23:30:15.000Z | 2021-09-07T02:25:26.000Z | from django.db import models
from user.models import Users
class Category(models.Model):
category_name = models.CharField(max_length=50)
question_available = models.PositiveIntegerField(default=0)
question_number = models.PositiveIntegerField()
def __str__(self):
return self.category_name
class Qu... | 39.586207 | 97 | 0.762195 | 1,082 | 0.942509 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.062718 |
89170f8e42f9d4e440f81502dbb93240f0f1b350 | 11,203 | py | Python | Data_Structures/Graph/unweighted_graph.py | D-Chase-H/PurePy-Data-Structures | 892b9666a80054f4524c090a7b442b125c372403 | [
"MIT"
] | null | null | null | Data_Structures/Graph/unweighted_graph.py | D-Chase-H/PurePy-Data-Structures | 892b9666a80054f4524c090a7b442b125c372403 | [
"MIT"
] | 1 | 2017-12-15T04:13:08.000Z | 2017-12-15T04:13:08.000Z | Data_Structures/Graph/unweighted_graph.py | D-Chase-H/PurePy-Data-Structures | 892b9666a80054f4524c090a7b442b125c372403 | [
"MIT"
] | null | null | null |
# Author: D-Chase-H
"""
License:
MIT License
Copyright (c) 2017 Dustin Chase Harmon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limita... | 28.652174 | 84 | 0.496028 | 8,600 | 0.767652 | 0 | 0 | 0 | 0 | 0 | 0 | 2,805 | 0.250379 |
891932991aa3c2e3cf18663abf2e256d53e75925 | 3,106 | py | Python | dsatools/generator/_marple_sequence.py | diarmaidocualain/dsatools | 50b9259e2846b5fdd3dc52206967b0ee8d0144de | [
"MIT"
] | 31 | 2020-09-14T16:12:01.000Z | 2022-03-30T01:44:18.000Z | generator/_marple_sequence.py | Jimmy-INL/dsatools | 5c811838bb3fb8ae00195d5f68e451bd23b3448c | [
"MIT"
] | 4 | 2021-09-24T17:47:42.000Z | 2022-03-04T08:06:43.000Z | generator/_marple_sequence.py | Jimmy-INL/dsatools | 5c811838bb3fb8ae00195d5f68e451bd23b3448c | [
"MIT"
] | 11 | 2020-12-06T08:18:56.000Z | 2022-03-20T13:28:22.000Z |
import numpy as np
def marple_sequence():
'''
Specific signal-like sequence,
proposed by Marple S.L.
Returns
--------
* signal: 1d ndarray (64 samples).
Example
--------
import dsatools.generator
from dsatools.generator import callbacks
import dsa... | 31.06 | 53 | 0.606246 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 828 | 0.266409 |
89195d2c36779798584689308f4ae52e7d568dbf | 728 | py | Python | polls/views.py | robsonleal/django_enquete | 5dd2743d62ba82d5e63b6210b4893592677def80 | [
"MIT"
] | null | null | null | polls/views.py | robsonleal/django_enquete | 5dd2743d62ba82d5e63b6210b4893592677def80 | [
"MIT"
] | null | null | null | polls/views.py | robsonleal/django_enquete | 5dd2743d62ba82d5e63b6210b4893592677def80 | [
"MIT"
] | null | null | null | from django.views import generic
from django.utils import timezone
from .models import Question
class IndexView(generic.ListView):
template_name = 'polls/index.html'
context_object_name = 'latest_question_list'
def get_queryset(self):
""" Retorna as 5 últimas questões(não inclui publicações futu... | 24.266667 | 77 | 0.706044 | 549 | 0.748977 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.271487 |
8919dcadf341d13761481e587ce0aa0f760975fb | 3,550 | py | Python | buildtest/tools/unittests.py | buildntest/buildtest | d371048631cdd33ae7bf66f795f5afed83491a90 | [
"MIT"
] | 29 | 2017-10-20T02:47:10.000Z | 2020-03-26T17:24:03.000Z | buildtest/tools/unittests.py | shahzebsiddiqui/testgen-HPC | e69d9334cf2939af4fca59e75f397b0b1edbbfaf | [
"MIT"
] | 219 | 2017-08-25T13:21:53.000Z | 2020-04-18T19:07:05.000Z | buildtest/tools/unittests.py | shahzebsiddiqui/BuildTest | 5a04641f37ba588c906112b3848249b241061a9c | [
"MIT"
] | 5 | 2017-08-24T11:20:30.000Z | 2020-02-21T04:28:40.000Z | import argparse
import os
import shutil
import sys
import coverage
import pytest
from buildtest.defaults import (
BUILDTEST_ROOT,
BUILDTEST_UNITTEST_ROOT,
BUILDTEST_USER_HOME,
VAR_DIR,
console,
)
from buildtest.utils.file import is_dir, resolve_path
def run_unit_tests(pytestopts=None, sourcefiles... | 32.568807 | 165 | 0.684225 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,492 | 0.420282 |
8919eadb500a2ec6192616456774d8da32531229 | 2,909 | py | Python | dashboard/__init__.py | VisionTale/StreamHelper-overlay | f50ea9ddfecf177db10c4ee99eac6880d362c3cc | [
"MIT"
] | null | null | null | dashboard/__init__.py | VisionTale/StreamHelper-overlay | f50ea9ddfecf177db10c4ee99eac6880d362c3cc | [
"MIT"
] | null | null | null | dashboard/__init__.py | VisionTale/StreamHelper-overlay | f50ea9ddfecf177db10c4ee99eac6880d362c3cc | [
"MIT"
] | null | null | null | from os.path import realpath, join, dirname
from flask import render_template, request, flash
from flask_login import login_required
from flask_wtf.csrf import validate_csrf
from wtforms.validators import ValidationError
from webapi.libs.network import is_up
from webapi.libs.text import camel_case
from .. import bp... | 29.989691 | 88 | 0.682709 | 0 | 0 | 0 | 0 | 1,873 | 0.643864 | 0 | 0 | 748 | 0.257133 |
891b38b7dc3a77153c98be492001da8cd2a61caf | 3,536 | py | Python | web/openerp/addons/base/tests/test_ir_attachment.py | diogocs1/comps | 63df07f6cf21c41e4527c06e2d0499f23f4322e7 | [
"Apache-2.0"
] | 1 | 2019-12-29T11:53:56.000Z | 2019-12-29T11:53:56.000Z | odoo/openerp/addons/base/tests/test_ir_attachment.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | null | null | null | odoo/openerp/addons/base/tests/test_ir_attachment.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | 3 | 2020-10-08T14:42:10.000Z | 2022-01-28T14:12:29.000Z | import hashlib
import os
import openerp
import openerp.tests.common
HASH_SPLIT = 2 # FIXME: testing implementations detail is not a good idea
class test_ir_attachment(openerp.tests.common.TransactionCase):
def setUp(self):
super(test_ir_attachment, self).setUp()
registry, cr, uid = self.regi... | 38.021505 | 90 | 0.64819 | 3,385 | 0.957296 | 0 | 0 | 0 | 0 | 0 | 0 | 423 | 0.119627 |
891b9abd04593024e436067023f0359758fe9dff | 13,412 | py | Python | UserCode/John/MergeBinaries.py | RunzZhang/SBCcode | e75b8e751cec5fb2c28950edef0c82f005caedcb | [
"MIT"
] | 4 | 2018-08-27T18:02:34.000Z | 2020-06-09T21:19:04.000Z | UserCode/John/MergeBinaries.py | RunzZhang/SBCcode | e75b8e751cec5fb2c28950edef0c82f005caedcb | [
"MIT"
] | null | null | null | UserCode/John/MergeBinaries.py | RunzZhang/SBCcode | e75b8e751cec5fb2c28950edef0c82f005caedcb | [
"MIT"
] | 4 | 2019-06-20T21:36:26.000Z | 2020-11-10T17:23:14.000Z | ## John Gresl
import os
from collections import defaultdict, OrderedDict
import time
from copy import deepcopy
import numpy as np
from SBCcode.DataHandling.ReadBinary import ReadBlock as RB
from SBCcode.DataHandling.WriteBinary import WriteBinaryNtupleFile as WB
from SBCcode.AnalysisModules.AnalyzeDytran import dyt... | 49.308824 | 121 | 0.530122 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,668 | 0.273486 |
891bdc5511e0a29c4be2339f1dc933bccb992ce1 | 2,066 | py | Python | src/ndc/get_ndc.py | TEI-EAJ/auto_aozora_tei | 5535abef680a1e186f8a7dc6efc30a1dcf4efeec | [
"CC0-1.0"
] | 3 | 2019-02-12T13:28:22.000Z | 2021-07-25T20:58:07.000Z | src/ndc/get_ndc.py | TEI-EAJ/auto_aozora_tei | 5535abef680a1e186f8a7dc6efc30a1dcf4efeec | [
"CC0-1.0"
] | null | null | null | src/ndc/get_ndc.py | TEI-EAJ/auto_aozora_tei | 5535abef680a1e186f8a7dc6efc30a1dcf4efeec | [
"CC0-1.0"
] | 1 | 2019-02-12T22:04:00.000Z | 2019-02-12T22:04:00.000Z | import urllib.request
from bs4 import BeautifulSoup
import json
def extract(index):
url = "http://yozora.main.jp/"
html = urllib.request.urlopen(url)
# htmlをBeautifulSoupで扱う
soup = BeautifulSoup(html, "lxml")
a_list = soup.find_all(class_="navi")[index].find_all("a")
arr = []
for a in ... | 22.703297 | 100 | 0.494676 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 452 | 0.213813 |
891be27156d1066f41832049260bb47279ac1736 | 4,116 | py | Python | backend/server/task/views.py | munteanugabriel25/Javascript-Django-TodoList- | e3cb8d4a573dfbb84960839b7a01a24a195c7755 | [
"Unlicense"
] | null | null | null | backend/server/task/views.py | munteanugabriel25/Javascript-Django-TodoList- | e3cb8d4a573dfbb84960839b7a01a24a195c7755 | [
"Unlicense"
] | null | null | null | backend/server/task/views.py | munteanugabriel25/Javascript-Django-TodoList- | e3cb8d4a573dfbb84960839b7a01a24a195c7755 | [
"Unlicense"
] | null | null | null | from django.shortcuts import render
from rest_framework.views import APIView
from rest_framework import status
from .serializers import TaskListCreateSerializer, UserCreateSerializer, UserLoginSerializer, UserSerializer, TaskUpdateSerializer
from rest_framework.response import Response
from .models import Task
from res... | 40.752475 | 130 | 0.688047 | 3,473 | 0.84378 | 0 | 0 | 0 | 0 | 0 | 0 | 238 | 0.057823 |
891c8b6da0ab48f652a004e57633049c482f9248 | 15,003 | py | Python | bookwyrm/preview_images.py | mouse-reeve/fedireads | e3471fcc3500747a1b1deaaca662021aae5b08d4 | [
"CC0-1.0"
] | 270 | 2020-01-27T06:06:07.000Z | 2020-06-21T00:28:18.000Z | bookwyrm/preview_images.py | mouse-reeve/fedireads | e3471fcc3500747a1b1deaaca662021aae5b08d4 | [
"CC0-1.0"
] | 158 | 2020-02-10T20:36:54.000Z | 2020-06-26T17:12:54.000Z | bookwyrm/preview_images.py | mouse-reeve/fedireads | e3471fcc3500747a1b1deaaca662021aae5b08d4 | [
"CC0-1.0"
] | 15 | 2020-02-13T21:53:33.000Z | 2020-06-17T16:52:46.000Z | """ Generate social media preview images for twitter/mastodon/etc """
import math
import os
import textwrap
from io import BytesIO
from uuid import uuid4
import logging
import colorsys
from colorthief import ColorThief
from PIL import Image, ImageDraw, ImageFont, ImageOps, ImageColor
from django.core.files.base impor... | 31.585263 | 88 | 0.672799 | 0 | 0 | 0 | 0 | 1,887 | 0.125775 | 0 | 0 | 1,971 | 0.131374 |
64dfbc4c6711f4cdd56dde0eb4ae1be40d05958f | 1,334 | py | Python | capsule.py | lebek/reversible-raytracer | 9b502737da0e0a7cfd664a795b3a38c1809c1774 | [
"MIT"
] | 15 | 2015-04-11T14:40:35.000Z | 2020-06-05T14:17:53.000Z | capsule.py | lebek/RRT | 9b502737da0e0a7cfd664a795b3a38c1809c1774 | [
"MIT"
] | null | null | null | capsule.py | lebek/RRT | 9b502737da0e0a7cfd664a795b3a38c1809c1774 | [
"MIT"
] | 3 | 2016-02-09T18:12:51.000Z | 2018-05-24T13:07:52.000Z | import numpy as np
import theano
import theano.tensor as T
class Capsule():
def __init__(self, name, n_hidden, n_output, num_caps):
self.name = name
bias = np.asarray([0,0, 3 * num_caps,1,1,1], dtype=theano.config.floatX)/ num_caps
self.params = [self.init_capsule_weight(n_hidden),
... | 33.35 | 90 | 0.55997 | 1,270 | 0.952024 | 0 | 0 | 0 | 0 | 0 | 0 | 272 | 0.203898 |
64e0d083a4907b69b2dd393b09adcf2074033d97 | 60,731 | py | Python | SubExperiment.py | zhangyintai/Experiment_Manager | 800f95068a12b64d4a7e524fe406d5ef3b47f521 | [
"MIT"
] | null | null | null | SubExperiment.py | zhangyintai/Experiment_Manager | 800f95068a12b64d4a7e524fe406d5ef3b47f521 | [
"MIT"
] | null | null | null | SubExperiment.py | zhangyintai/Experiment_Manager | 800f95068a12b64d4a7e524fe406d5ef3b47f521 | [
"MIT"
] | null | null | null | # For controlling experiments for the ion trap lab led by Prof. Yiheng Lin
# The code is written by Yintai Zhang, School of Physical Sciences, USTC
# Last updated: April 29th, 2019
from PyQt5 import QtWidgets, QtCore, QtGui
# import pylint
from Ui_SubExperiment import Ui_SubExperiment_Dialog
import sys
import ... | 41.941298 | 123 | 0.556783 | 59,939 | 0.986959 | 0 | 0 | 0 | 0 | 0 | 0 | 6,727 | 0.110767 |
64e1becee21ec789ab3fba8c1362708a1fcff647 | 1,509 | py | Python | train_DT.py | caspase-like-homolog-identifier/c14_witcher | e2c481607b85fed749daec0e9b3b29b65d6b448f | [
"MIT"
] | null | null | null | train_DT.py | caspase-like-homolog-identifier/c14_witcher | e2c481607b85fed749daec0e9b3b29b65d6b448f | [
"MIT"
] | null | null | null | train_DT.py | caspase-like-homolog-identifier/c14_witcher | e2c481607b85fed749daec0e9b3b29b65d6b448f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
from sklearn.tree import export_graphviz
from IPython.display import Image
from sklearn import metrics
from six import StringIO
import pandas as pd
import pydotplus
import argparse
import pickle
... | 24.33871 | 96 | 0.726972 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 224 | 0.148443 |
64e21c7ea2001708b9da0332c531d7724a4113b2 | 2,505 | py | Python | nbprocess/clean.py | fastai/nbprocess | cf4290b31357101bc96103ee2525e14c0c8ef162 | [
"Apache-2.0"
] | 15 | 2021-08-09T22:50:46.000Z | 2022-03-31T10:11:20.000Z | nbprocess/clean.py | fastai/nbprocess | cf4290b31357101bc96103ee2525e14c0c8ef162 | [
"Apache-2.0"
] | 15 | 2021-08-20T03:07:43.000Z | 2022-03-28T16:45:42.000Z | nbprocess/clean.py | fastai/nbprocess | cf4290b31357101bc96103ee2525e14c0c8ef162 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/05_clean.ipynb.
# %% auto 0
__all__ = ['clean_nb', 'nbdev_clean_nbs']
# %% ../nbs/05_clean.ipynb 2
from fastcore.script import *
from fastcore.utils import *
from fastcore.imports import *
from .imports import *
from .read import *
from .sync import *
# from pathli... | 36.838235 | 104 | 0.663872 | 0 | 0 | 0 | 0 | 626 | 0.2499 | 0 | 0 | 1,022 | 0.407984 |
64e2f7bd0c5248b10b722215e23712c6705e3215 | 3,205 | py | Python | data/process_data.py | YvesDeutschmann/disaster-response-pipeline-project | 6ce33642a9bc05ed063c5adfab42fd69c076bd40 | [
"MIT"
] | null | null | null | data/process_data.py | YvesDeutschmann/disaster-response-pipeline-project | 6ce33642a9bc05ed063c5adfab42fd69c076bd40 | [
"MIT"
] | null | null | null | data/process_data.py | YvesDeutschmann/disaster-response-pipeline-project | 6ce33642a9bc05ed063c5adfab42fd69c076bd40 | [
"MIT"
] | null | null | null | import sys
import pandas as pd
import numpy as np
from sqlalchemy import create_engine
def load_data(messages_filepath, categories_filepath):
"""
Loads the data.
Args:
messages_filepath: String - csv file containing disaster messages.
categories_filepath: String - csv file containing ... | 32.05 | 95 | 0.659282 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,576 | 0.491732 |
64e3373b39465c8e986539b86fbdf9497ff35c51 | 1,914 | py | Python | library/twisted/trtl.py | Kelbec-Nef/EVE-bot-discord | 30432beb482ca56a10fda8aefdb4c1b9802e4ceb | [
"MIT"
] | 59 | 2016-06-27T13:12:18.000Z | 2021-06-23T12:09:16.000Z | trtl.py | andimiller/twistedbot | f462385ab951f1b74e19a2ebb6b3d58da4e2a03f | [
"MIT"
] | 112 | 2016-07-06T15:32:09.000Z | 2022-03-08T07:22:54.000Z | trtl.py | andimiller/twistedbot | f462385ab951f1b74e19a2ebb6b3d58da4e2a03f | [
"MIT"
] | 59 | 2016-07-04T22:22:26.000Z | 2020-05-15T20:38:08.000Z | """
_____________________________________________
___ < trtl - TwistedBot REPL for Testing Libraries >_
//_\\\\ _ ---------------------------------------------
/_|_|_('> /
" "
"""
import os
import sys
import traceback
import readline
import re
regex = re.compile("\x03(?:\d{1,2}(?:,\d{1,2})?)?... | 26.583333 | 134 | 0.521421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 432 | 0.225705 |
64e34eb0a032af8b9bc9db3ed58fc47178b0d893 | 447 | py | Python | swot_item/migrations/0013_auto_20180609_1915.py | imranariffin/liveswot-api | a2acc05fd2c51adc30e8e1785b857a94af81677d | [
"MIT"
] | null | null | null | swot_item/migrations/0013_auto_20180609_1915.py | imranariffin/liveswot-api | a2acc05fd2c51adc30e8e1785b857a94af81677d | [
"MIT"
] | 25 | 2018-03-25T05:25:22.000Z | 2021-06-10T19:51:12.000Z | swot_item/migrations/0013_auto_20180609_1915.py | imranariffin/liveswot-api | a2acc05fd2c51adc30e8e1785b857a94af81677d | [
"MIT"
] | 2 | 2018-07-02T02:59:24.000Z | 2018-08-21T02:58:21.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-06-09 19:15
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('swot_item', '0012_swotitem_score'),
]
operations = [
migrations.AlterField(... | 21.285714 | 48 | 0.612975 | 289 | 0.646532 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.268456 |
64e5cb2f12494c402629102fa0444b71af4c9e8d | 1,006 | py | Python | bnpy/datasets/zzz_unsupported/StandardNormalK1.py | jun2tong/bnp-anomaly | c7fa106b5bb29ed6688a3d91e3f302a0a130b896 | [
"BSD-3-Clause"
] | 184 | 2016-12-13T21:05:48.000Z | 2022-02-28T11:47:23.000Z | bnpy/datasets/zzz_unsupported/StandardNormalK1.py | jun2tong/bnp-anomaly | c7fa106b5bb29ed6688a3d91e3f302a0a130b896 | [
"BSD-3-Clause"
] | 37 | 2016-12-18T14:07:53.000Z | 2022-03-13T10:58:14.000Z | bnpy/datasets/zzz_unsupported/StandardNormalK1.py | jun2tong/bnp-anomaly | c7fa106b5bb29ed6688a3d91e3f302a0a130b896 | [
"BSD-3-Clause"
] | 50 | 2017-01-25T19:44:34.000Z | 2022-03-15T10:22:01.000Z | '''
StandardNormalK1.py
Simple toy dataset from standard normal distribution.
'''
import numpy as np
from bnpy.data import XData
def get_data(seed=8675309, nObsTotal=25000, **kwargs):
''' Create and return toy dataset from 1D standard normal distribution.
Args
-------
seed : integer seed for rando... | 22.355556 | 75 | 0.686879 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 497 | 0.494036 |
64e6916efe37fc956ae95e126abe46204022a77b | 6,259 | py | Python | scripts/rewrite_fcns.py | dolphingarlic/sketch-frontend | e646b7d51405e8a693f45472aa3cc6991a6f38af | [
"X11"
] | 1 | 2020-12-06T03:40:53.000Z | 2020-12-06T03:40:53.000Z | scripts/rewrite_fcns.py | dolphingarlic/sketch-frontend | e646b7d51405e8a693f45472aa3cc6991a6f38af | [
"X11"
] | null | null | null | scripts/rewrite_fcns.py | dolphingarlic/sketch-frontend | e646b7d51405e8a693f45472aa3cc6991a6f38af | [
"X11"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# author: gatoatigrado (nicholas tung) [ntung at ntung]
# Copyright 2010 University of California, Berkeley
# 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 L... | 41.177632 | 104 | 0.602333 | 39 | 0.006231 | 0 | 0 | 0 | 0 | 0 | 0 | 1,424 | 0.227512 |
64e6d9802ff131b02145f06b9894c085a64f01d6 | 795 | py | Python | streamselect/concept_representations/__init__.py | BenHals/streamselect | ca5e80f3a8a31a38ac52bccfd92528d73f387a6a | [
"BSD-3-Clause"
] | null | null | null | streamselect/concept_representations/__init__.py | BenHals/streamselect | ca5e80f3a8a31a38ac52bccfd92528d73f387a6a | [
"BSD-3-Clause"
] | null | null | null | streamselect/concept_representations/__init__.py | BenHals/streamselect | ca5e80f3a8a31a38ac52bccfd92528d73f387a6a | [
"BSD-3-Clause"
] | null | null | null | """ Base classes for concept representations.
A concept is a joint distribution between x and y.
A concept representation is a finite sized approximation of this distribution using a given classifier.
Each concept distribution should have a method of construction from a window of observations and
a similarity method to... | 34.565217 | 103 | 0.798742 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.657862 |
64e7f07288cd11bd5d0f4da97dbcf8d4318f8b8b | 9,586 | py | Python | 4 model_batch/train_for_hist_alldata_loop_result.py | bneiluj/crop_yield_prediction | c73baca3da09e072065c55a1b645e92084df54a1 | [
"MIT"
] | 1 | 2021-04-08T09:14:00.000Z | 2021-04-08T09:14:00.000Z | 4 model_batch/train_for_hist_alldata_loop_result.py | bneiluj/crop_yield_prediction | c73baca3da09e072065c55a1b645e92084df54a1 | [
"MIT"
] | null | null | null | 4 model_batch/train_for_hist_alldata_loop_result.py | bneiluj/crop_yield_prediction | c73baca3da09e072065c55a1b645e92084df54a1 | [
"MIT"
] | 2 | 2020-12-02T04:36:44.000Z | 2021-03-01T12:58:35.000Z | from nnet_for_hist_dropout_stride import *
from GP_crop_v3 import *
if __name__ == "__main__":
config = Config()
summary_train_loss = []
summary_eval_loss = []
summary_RMSE = []
summary_ME = []
# load data to memory
filename = 'histogram_all' + '.npz'
# filename = 'histogram_all_soil... | 45.647619 | 251 | 0.52368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,036 | 0.108074 |
64ea22c140e09fcc03e94150afada75a7e282353 | 1,099 | py | Python | src/layers/tsm.py | zhaojieting/e3d_lstm | e77d5523ad3a6f062042c095f1d40a29ee054db4 | [
"Apache-2.0"
] | null | null | null | src/layers/tsm.py | zhaojieting/e3d_lstm | e77d5523ad3a6f062042c095f1d40a29ee054db4 | [
"Apache-2.0"
] | null | null | null | src/layers/tsm.py | zhaojieting/e3d_lstm | e77d5523ad3a6f062042c095f1d40a29ee054db4 | [
"Apache-2.0"
] | null | null | null | """Module for constructing TSN layers Cells."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
import tensorflow.contrib.layers as layers
def TSM_layer(inputs, output_channels, kernel_shape, padding='same'):
... | 42.269231 | 121 | 0.622384 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.058235 |
64ec1fd31776137216ede3cc1ef1e18c0071a86e | 167 | py | Python | django_dicom/views/utils.py | ZviBaratz/django-dicom | fc5d5443ebcab9af9705a2e81c58662789a34c62 | [
"Apache-2.0"
] | 8 | 2018-12-25T11:00:31.000Z | 2022-02-03T12:05:56.000Z | django_dicom/views/utils.py | ZviBaratz/django-dicom | fc5d5443ebcab9af9705a2e81c58662789a34c62 | [
"Apache-2.0"
] | 11 | 2019-01-03T11:30:42.000Z | 2021-05-12T06:53:20.000Z | django_dicom/views/utils.py | ZviBaratz/django-dicom | fc5d5443ebcab9af9705a2e81c58662789a34c62 | [
"Apache-2.0"
] | 4 | 2019-06-23T18:09:07.000Z | 2019-08-30T15:43:18.000Z | """
Utilities for the :mod:`~django_dicom.views` module.
"""
CONTENT_DISPOSITION = "attachment; filename={name}.zip"
ZIP_CONTENT_TYPE = "application/x-zip-compressed"
| 27.833333 | 55 | 0.754491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.736527 |
64ecd16af3bba6904bb50e63ae398928437708ec | 1,946 | py | Python | tests/tmp.py | ribeirojose/d6tstack | 4d974cca4dc75ff988269443a6622ca9922127e6 | [
"MIT"
] | 176 | 2018-04-30T15:40:34.000Z | 2022-03-16T09:31:08.000Z | tests/tmp.py | tsering10/d6tstack | 7b6c5851b53bdd221466facfb7aebdc96006bf41 | [
"MIT"
] | 29 | 2018-10-28T15:35:24.000Z | 2022-01-31T03:23:35.000Z | tests/tmp.py | tsering10/d6tstack | 7b6c5851b53bdd221466facfb7aebdc96006bf41 | [
"MIT"
] | 45 | 2018-07-27T04:16:28.000Z | 2022-01-10T18:29:21.000Z | import importlib
import d6tstack.utils
importlib.reload(d6tstack.utils)
import time
import yaml
config = yaml.load(open('tests/.test-cred.yaml'))
cfg_uri_psql = config['rds']
cfg_uri_psql = config['wlo']
import pandas as pd
df = pd.DataFrame({'a':range(10),'b':range(10)})
d6tstack.utils.pd_to_psql(df,cfg_uri_psql,'... | 25.605263 | 81 | 0.751285 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 357 | 0.183453 |
64ed7fa0bd919eed84109ce8a4e03eedc4ba591b | 467 | py | Python | tests/py/test_event.py | phlax/playground | ca661f7adcc2c3502f63e630c96e87e31aa9309a | [
"Apache-2.0"
] | 8 | 2020-11-23T21:08:32.000Z | 2021-12-18T10:37:25.000Z | tests/py/test_event.py | phlax/playground | ca661f7adcc2c3502f63e630c96e87e31aa9309a | [
"Apache-2.0"
] | 273 | 2020-11-23T19:27:06.000Z | 2020-12-21T17:34:49.000Z | tests/py/test_event.py | phlax/playground | ca661f7adcc2c3502f63e630c96e87e31aa9309a | [
"Apache-2.0"
] | 2 | 2020-11-24T09:49:29.000Z | 2020-12-30T10:39:10.000Z |
from playground.control import attribs, event
class DummyAttribs(attribs.ValidatingAttribs):
def __init__(self):
pass
def test_event():
_kwargs = dict()
_event = event.PlaygroundEvent(_kwargs)
assert _event._kwargs is _kwargs
assert _event._attribs is None
dummy_attribs = DummyAtt... | 22.238095 | 58 | 0.736617 | 84 | 0.179872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
64eea514dc744490d62df2dbfa0ff759f1bd366a | 13,313 | py | Python | pi_weather.py | mitgobla/Pi-Weather | aa5a8a4a543d721ba9c7ebe3a69444512133d4cc | [
"MIT"
] | 1 | 2021-08-22T20:56:37.000Z | 2021-08-22T20:56:37.000Z | pi_weather.py | mitgobla/Pi-Weather | aa5a8a4a543d721ba9c7ebe3a69444512133d4cc | [
"MIT"
] | null | null | null | pi_weather.py | mitgobla/Pi-Weather | aa5a8a4a543d721ba9c7ebe3a69444512133d4cc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import os
from sys import argv
from time import sleep
from papirus import PapirusComposite
from weather import Weather
DIRECTORY = os.path.dirname(os.path.realpath(__file__))
class PiWeather:
def __init__(self):
self.config = self.load_config()... | 40.588415 | 113 | 0.534966 | 12,990 | 0.975665 | 0 | 0 | 792 | 0.059486 | 0 | 0 | 3,690 | 0.277152 |
64eedb6c77b1e955f83b08c16eb463ea0891406d | 961 | py | Python | crystallography/cube_symmetry.py | rpw199912j/matsci_animation | cd613853a40cdee73f9cdff7bdf23a02451bb1ef | [
"MIT"
] | null | null | null | crystallography/cube_symmetry.py | rpw199912j/matsci_animation | cd613853a40cdee73f9cdff7bdf23a02451bb1ef | [
"MIT"
] | null | null | null | crystallography/cube_symmetry.py | rpw199912j/matsci_animation | cd613853a40cdee73f9cdff7bdf23a02451bb1ef | [
"MIT"
] | null | null | null | from manim import *
class CubeSymmetry(ThreeDScene):
def construct(self):
# define a 3D axes
axes_3d = ThreeDAxes(
tips=False
)
# define a cube with side length 2 placed at the origin
cube = Cube(stroke_color=YELLOW, stroke_width=3)
# define a line that... | 23.439024 | 90 | 0.495317 | 938 | 0.976067 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.123829 |
64f18694f99e323c1c04d6f1bc14cbfb5fcf7280 | 3,226 | py | Python | src/python/services/rpc_services/rpc_requests.py | rockmind/LoveAndMarriage | 2877d6af626eff2a3134a05ab7f03c52f14fde5c | [
"Apache-2.0"
] | null | null | null | src/python/services/rpc_services/rpc_requests.py | rockmind/LoveAndMarriage | 2877d6af626eff2a3134a05ab7f03c52f14fde5c | [
"Apache-2.0"
] | 1 | 2021-12-18T16:07:39.000Z | 2021-12-18T16:07:39.000Z | src/python/services/rpc_services/rpc_requests.py | rockmind/LoveAndMarriage | 2877d6af626eff2a3134a05ab7f03c52f14fde5c | [
"Apache-2.0"
] | null | null | null | from asyncio import sleep, get_event_loop
from aiohttp import ClientSession
from typing import OrderedDict, Union, List
from numpy.random import randint
from oauthlib.oauth2 import LegacyApplicationClient
from requests_oauthlib import OAuth2Session
from services import json_dumps, json_loads
class RequestRpc:
RE... | 33.604167 | 115 | 0.567886 | 2,929 | 0.907936 | 0 | 0 | 0 | 0 | 2,187 | 0.677929 | 283 | 0.087725 |
64f2e2b530af5be77d35403bbf827b176b5a071a | 2,297 | py | Python | Chinese_zodiac.py | 2019-fall-csc-226/a01-breaking-bad-iransi_a01 | 720a648e9068af9e1202893942e311163bd0e1c1 | [
"MIT"
] | null | null | null | Chinese_zodiac.py | 2019-fall-csc-226/a01-breaking-bad-iransi_a01 | 720a648e9068af9e1202893942e311163bd0e1c1 | [
"MIT"
] | null | null | null | Chinese_zodiac.py | 2019-fall-csc-226/a01-breaking-bad-iransi_a01 | 720a648e9068af9e1202893942e311163bd0e1c1 | [
"MIT"
] | null | null | null | birthyear = int(input("what year were you born? {2000-2011}"))
if birthyear == 2000 :
print("you're a fire breathing dragon")
elif birthyear == 2001:
print("sssss you're a snake ")
if birthyear == 2002:
print("Haaayyy. Get it? cause your a horse :)")
if birthyear == 2003 :
print("you are the GO... | 31.902778 | 111 | 0.637353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,158 | 0.504136 |
64f449e7051ecea8b2412b9c5d7d5fca434151bc | 13,150 | py | Python | pyrallis/wrappers/field_wrapper.py | eladrich/pyrallis | 1e0586f9de9ed5d8d67d061dac1fb44c73f9d4a4 | [
"MIT"
] | 22 | 2021-12-30T16:06:09.000Z | 2022-03-09T23:27:30.000Z | pyrallis/wrappers/field_wrapper.py | eladrich/pyrallis | 1e0586f9de9ed5d8d67d061dac1fb44c73f9d4a4 | [
"MIT"
] | 5 | 2022-01-18T14:05:52.000Z | 2022-03-03T17:23:03.000Z | pyrallis/wrappers/field_wrapper.py | eladrich/pyrallis | 1e0586f9de9ed5d8d67d061dac1fb44c73f9d4a4 | [
"MIT"
] | null | null | null | import argparse
import dataclasses
import inspect
from logging import getLogger
from typing import Any, Optional, List, Type, Dict, Set, Union, Tuple
from . import docstring
from .wrapper import Wrapper
from .. import utils
logger = getLogger(__name__)
class FieldWrapper(Wrapper[dataclasses.Field]):
"""
The... | 35.831063 | 89 | 0.63924 | 10,702 | 0.81384 | 0 | 0 | 7,213 | 0.548517 | 0 | 0 | 5,898 | 0.448517 |
64f496f7a964f4a0c2008a4e6ef5318ca9d938ee | 7,183 | py | Python | up/settings/base.py | rodlukas/UP-admin | 08f36de0773f39c6222da82016bf1384af2cce18 | [
"MIT"
] | 4 | 2019-07-19T17:39:04.000Z | 2022-03-22T21:02:15.000Z | up/settings/base.py | rodlukas/UP-admin | 08f36de0773f39c6222da82016bf1384af2cce18 | [
"MIT"
] | 53 | 2019-08-04T14:25:40.000Z | 2022-03-26T20:30:55.000Z | up/settings/base.py | rodlukas/UP-admin | 08f36de0773f39c6222da82016bf1384af2cce18 | [
"MIT"
] | 3 | 2020-03-09T07:11:03.000Z | 2020-09-11T01:22:50.000Z | """
Základní konfigurace Django projektu.
Je základem pro konfigurace v souborech local.py a production.py.
"""
import os
import sys
from datetime import timedelta
import environ
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.... | 35.384236 | 118 | 0.738828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,257 | 0.592402 |
64f4ed4a482b455825429f140a47289347e72d8a | 1,731 | py | Python | common/src/plugins/__init__.py | krisshol/bach-kmno | f40d85b3397bb340e26a671c54d4a753dbbb0d43 | [
"Apache-2.0"
] | 248 | 2015-01-08T09:36:44.000Z | 2022-01-12T10:29:21.000Z | common/src/plugins/__init__.py | krisshol/bach-kmno | f40d85b3397bb340e26a671c54d4a753dbbb0d43 | [
"Apache-2.0"
] | 50 | 2015-01-09T08:31:57.000Z | 2022-03-30T10:41:13.000Z | common/src/plugins/__init__.py | krisshol/bach-kmno | f40d85b3397bb340e26a671c54d4a753dbbb0d43 | [
"Apache-2.0"
] | 74 | 2015-01-05T09:11:21.000Z | 2022-03-29T02:16:54.000Z | from irma.common.plugins.plugin import PluginBase
from irma.common.plugins.plugin import PluginMetaClass
from irma.common.plugins.manager import PluginManager
from irma.common.plugins.exceptions import PluginError
from irma.common.plugins.exceptions import PluginLoadError
from irma.common.plugins.exceptions import Pl... | 35.326531 | 68 | 0.808203 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 426 | 0.246101 |
64f4ede9bde7f503aa60b397301d64722811e7ff | 253 | py | Python | data/image_name_list.py | wangkingkingking/synme | 82b6b7e640939b7946256b7f4e8b6d51357b97be | [
"MIT"
] | null | null | null | data/image_name_list.py | wangkingkingking/synme | 82b6b7e640939b7946256b7f4e8b6d51357b97be | [
"MIT"
] | null | null | null | data/image_name_list.py | wangkingkingking/synme | 82b6b7e640939b7946256b7f4e8b6d51357b97be | [
"MIT"
] | null | null | null | def get_image_name_list(dataset_file):
# get synme image name list
with open(dataset_file, 'r') as f:
lines = f.readlines()
imagenames = [x.strip().split()[0].split('/')[1].split('.')[0] for x in lines]
return imagenames
| 36.142857 | 86 | 0.612648 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.142292 |
64f589c595e6fd6aa5cda5244976e2e886627844 | 2,080 | py | Python | py_wake/tests/test_utils/test_xarray_utils.py | aemoser/PyWake | 889a2c10882195af21339e9bcf2ede0db9b58319 | [
"MIT"
] | 30 | 2019-03-18T14:10:27.000Z | 2022-03-13T17:39:04.000Z | py_wake/tests/test_utils/test_xarray_utils.py | aemoser/PyWake | 889a2c10882195af21339e9bcf2ede0db9b58319 | [
"MIT"
] | 1 | 2020-11-12T06:13:00.000Z | 2020-11-12T06:43:26.000Z | py_wake/tests/test_utils/test_xarray_utils.py | aemoser/PyWake | 889a2c10882195af21339e9bcf2ede0db9b58319 | [
"MIT"
] | 20 | 2019-01-11T14:45:13.000Z | 2021-12-13T19:55:29.000Z | from py_wake.examples.data.hornsrev1 import Hornsrev1Site
import numpy as np
import pytest
import pandas as pd
@pytest.mark.parametrize(['ti', 'dims'], [
(0.1, ()),
(np.full((2), 0.1), ('i',)),
(np.full((2, 360), 0.1), ('i', 'wd')),
(np.full((2, 360, 23), 0.1), ('i', 'wd', 'ws')),
(np.full((360), ... | 29.714286 | 76 | 0.538462 | 0 | 0 | 0 | 0 | 1,957 | 0.940865 | 0 | 0 | 139 | 0.066827 |
64f5cef49fb1fe4a41de9751140db69b63b91e0f | 212 | py | Python | scripts/library/__init__.py | geozeke/ubuntu | 49b7649b4306e6f3eb39c5dd9419cddc5c10d077 | [
"MIT"
] | null | null | null | scripts/library/__init__.py | geozeke/ubuntu | 49b7649b4306e6f3eb39c5dd9419cddc5c10d077 | [
"MIT"
] | 77 | 2020-07-08T18:52:48.000Z | 2022-01-21T20:13:31.000Z | scripts/library/__init__.py | geozeke/ubuntu | 49b7649b4306e6f3eb39c5dd9419cddc5c10d077 | [
"MIT"
] | null | null | null | from .classes import Environment
from .utilities import clear
from .utilities import runOneCommand
from .utilities import runManyArguments
from .utilities import minPythonVersion
from .utilities import copyFiles
| 30.285714 | 39 | 0.858491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
64f625ff3b06630f6e5652636658877b09051eea | 10,470 | py | Python | acme/agents/jax/ail/learning.py | wookayin/acme | 71b2ab8577a118c103718f034fa62c5ad2c0fd97 | [
"Apache-2.0"
] | null | null | null | acme/agents/jax/ail/learning.py | wookayin/acme | 71b2ab8577a118c103718f034fa62c5ad2c0fd97 | [
"Apache-2.0"
] | null | null | null | acme/agents/jax/ail/learning.py | wookayin/acme | 71b2ab8577a118c103718f034fa62c5ad2c0fd97 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 DeepMind Technologies Limited. 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 ... | 35.612245 | 80 | 0.720153 | 7,530 | 0.719198 | 0 | 0 | 0 | 0 | 0 | 0 | 3,352 | 0.320153 |
64f62b0e9a31a02193441b2301ca86a8c2d36616 | 9,878 | py | Python | json_database/utils/__init__.py | NeonJarbas/json_database | 026d01faff79f178ab8e5a8505666959279761cb | [
"MIT"
] | 8 | 2020-05-30T12:44:35.000Z | 2022-02-14T15:12:53.000Z | json_database/utils/__init__.py | NeonJarbas/json_database | 026d01faff79f178ab8e5a8505666959279761cb | [
"MIT"
] | 4 | 2021-08-18T23:40:45.000Z | 2021-09-30T00:43:42.000Z | json_database/utils/__init__.py | NeonJarbas/json_database | 026d01faff79f178ab8e5a8505666959279761cb | [
"MIT"
] | 7 | 2020-05-30T12:44:41.000Z | 2021-09-30T00:27:04.000Z | import json
from difflib import SequenceMatcher
def fuzzy_match(x, against):
"""Perform a 'fuzzy' comparison between two strings.
Returns:
float: match percentage -- 1.0 for perfect match,
down to 0.0 for no match at all.
"""
return SequenceMatcher(None, x, against).ratio()
de... | 32.071429 | 103 | 0.57542 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,632 | 0.266451 |
64f676f9dc39b1b750355b9ece3b4cb04859aa3d | 51 | py | Python | master/bopytest-code/code/tasks_proj/tests/func/test_delete.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/bopytest-code/code/tasks_proj/tests/func/test_delete.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/bopytest-code/code/tasks_proj/tests/func/test_delete.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | def test_delete():
"""Placeholder test"""
pass
| 12.75 | 24 | 0.647059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.431373 |
64f6cfdf3012940080f0da657680c3dfea60fa6b | 17,679 | py | Python | AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic.py | LB-JakubSkorupka/o3de | e224fc2ee5ec2a12e75a10acae268b7b38ae3a32 | [
"Apache-2.0",
"MIT"
] | 11 | 2021-07-08T09:58:26.000Z | 2022-03-17T17:59:26.000Z | AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic.py | LB-JakubSkorupka/o3de | e224fc2ee5ec2a12e75a10acae268b7b38ae3a32 | [
"Apache-2.0",
"MIT"
] | 29 | 2021-07-06T19:33:52.000Z | 2022-03-22T10:27:49.000Z | AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic.py | LB-JakubSkorupka/o3de | e224fc2ee5ec2a12e75a10acae268b7b38ae3a32 | [
"Apache-2.0",
"MIT"
] | 4 | 2021-07-06T19:24:43.000Z | 2022-03-31T12:42:27.000Z | """
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
import os
import pytest
import sys
import ly_test_tools.environment.waiter as waiter
import ly_test_tools.envi... | 62.25 | 138 | 0.783755 | 15,815 | 0.894564 | 0 | 0 | 17,037 | 0.963686 | 0 | 0 | 1,431 | 0.080943 |
64f819eba5fc083ede53de05b85e42707d3caf74 | 1,192 | py | Python | Modulo_construcao_regras/Frase_pt.py | mattgoncalves/PE2LGP | dc74d496637217170b5287ca877d86e2e18068ab | [
"MIT"
] | 1 | 2021-12-16T13:13:19.000Z | 2021-12-16T13:13:19.000Z | PE2LGP/Modulo_construcao_regras/Frase_pt.py | ineslacerda/PE2LGP-Translator | 6ff22da887444d8be6cd50b3c3cdc3ce5bd2449a | [
"MIT"
] | null | null | null | PE2LGP/Modulo_construcao_regras/Frase_pt.py | ineslacerda/PE2LGP-Translator | 6ff22da887444d8be6cd50b3c3cdc3ce5bd2449a | [
"MIT"
] | 2 | 2021-03-27T10:59:28.000Z | 2021-12-16T11:51:43.000Z | class Frase_pt:
#informações com as dependências da frase em português e das classes gramaticais.
def __init__(self, frase_pt= ""):
self.frase_pt = frase_pt
self.lemmas = {}
self.classes_gramaticais = {}
self.analise_sintatica = {}
def append_classes_gramaticais(self, glosa, classe):
self.classes_gramat... | 30.564103 | 82 | 0.698826 | 1,196 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.134615 |
8f01c902b327cbd9d3e3b498fc969a42f9707e07 | 6,994 | py | Python | sysinv/sysinv/sysinv/sysinv/puppet/heat.py | etaivan/stx-config | 281e1f110973f96e077645fb01f67b646fc253cc | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/puppet/heat.py | etaivan/stx-config | 281e1f110973f96e077645fb01f67b646fc253cc | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/puppet/heat.py | etaivan/stx-config | 281e1f110973f96e077645fb01f67b646fc253cc | [
"Apache-2.0"
] | 1 | 2021-01-05T16:24:58.000Z | 2021-01-05T16:24:58.000Z | #
# Copyright (c) 2017 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sysinv.puppet import openstack
from sysinv.common import constants
class HeatPuppet(openstack.OpenstackBasePuppet):
"""Class to encapsulate puppet operations for heat configuration"""
SERVICE_NAME = 'heat'
SER... | 39.292135 | 77 | 0.622391 | 6,828 | 0.976265 | 0 | 0 | 0 | 0 | 0 | 0 | 1,831 | 0.261796 |
8f02541a7ae70196b397d818b7763843b81bed3a | 6,213 | py | Python | pong_v2b.py | jasonj2333/Pico-Pong-2021 | dabd57a9b6a44723a1d690a614265e1a6d5d9b1f | [
"MIT"
] | null | null | null | pong_v2b.py | jasonj2333/Pico-Pong-2021 | dabd57a9b6a44723a1d690a614265e1a6d5d9b1f | [
"MIT"
] | null | null | null | pong_v2b.py | jasonj2333/Pico-Pong-2021 | dabd57a9b6a44723a1d690a614265e1a6d5d9b1f | [
"MIT"
] | 1 | 2021-03-11T08:34:21.000Z | 2021-03-11T08:34:21.000Z | #####################################################
####### Pico Pong 2021 by Jerzy Jasonek ########
####### version 2.0 ########
####### add training mode - 1 player mode ########
#####################################################
from machine import Pin, I2C, ADC
from ssd1306 im... | 30.014493 | 104 | 0.541445 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,430 | 0.230163 |
8f0774dc003329dbb4aee294ed1abf6b04d27049 | 14,904 | py | Python | gh/views.py | Gepetto/dashboard | a24bbcec7c13c00b2a783c840658130083ad3b30 | [
"BSD-2-Clause"
] | null | null | null | gh/views.py | Gepetto/dashboard | a24bbcec7c13c00b2a783c840658130083ad3b30 | [
"BSD-2-Clause"
] | 7 | 2018-02-21T18:03:36.000Z | 2021-04-29T15:17:59.000Z | gh/views.py | Gepetto/dashboard | a24bbcec7c13c00b2a783c840658130083ad3b30 | [
"BSD-2-Clause"
] | 1 | 2018-07-10T15:19:31.000Z | 2018-07-10T15:19:31.000Z | """Views for dashboard_apps."""
import hmac
import logging
import re
import traceback
from hashlib import sha1
from ipaddress import ip_address, ip_network
from json import loads
from asgiref.sync import sync_to_async, async_to_sync
from django.conf import settings
from django.core.mail import mail_admins
from django.... | 45.577982 | 119 | 0.650631 | 0 | 0 | 0 | 0 | 2,915 | 0.195585 | 13,618 | 0.913714 | 4,361 | 0.292606 |
8f0ac5d355c9a9038a09d1d81879dac676f628c0 | 2,844 | py | Python | plugins/serializables/global_packets.py | wesleyd1124/WLUS | ce319962d57d91dc9c8b06cc435469c7b24da826 | [
"MIT"
] | 25 | 2018-06-05T22:45:03.000Z | 2021-09-01T08:15:38.000Z | plugins/serializables/global_packets.py | wesleyd1124/WLUS | ce319962d57d91dc9c8b06cc435469c7b24da826 | [
"MIT"
] | 15 | 2018-07-10T10:39:55.000Z | 2021-07-01T20:56:26.000Z | plugins/serializables/global_packets.py | wesleyd1124/WLUS | ce319962d57d91dc9c8b06cc435469c7b24da826 | [
"MIT"
] | 13 | 2018-05-19T19:44:59.000Z | 2021-07-18T18:45:58.000Z | """
Contains all the packets which are sent by either the client or server
"""
from pyraknet import bitstream
class HandshakePacket(bitstream.Serializable):
"""
[53-00-00-00]
Global handshake packet serializable.
This packet is sent to establish a connection.
"""
def __init__(self):
se... | 35.55 | 81 | 0.697961 | 2,725 | 0.958158 | 0 | 0 | 899 | 0.316104 | 0 | 0 | 464 | 0.16315 |
8f0b154543475c7fee417eb340ebc23a9a65e18b | 1,278 | py | Python | tests/test_rasterize.py | PADAS/django-raster | 68b2d181c70827dffad3c07f4f38d3490872a3eb | [
"BSD-3-Clause"
] | null | null | null | tests/test_rasterize.py | PADAS/django-raster | 68b2d181c70827dffad3c07f4f38d3490872a3eb | [
"BSD-3-Clause"
] | null | null | null | tests/test_rasterize.py | PADAS/django-raster | 68b2d181c70827dffad3c07f4f38d3490872a3eb | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.gis.gdal import GDALRaster, OGRGeometry
from django.test import TestCase
from raster.rasterize import rasterize
class RasterizeGeometryTests(TestCase):
def setUp(self):
self.rast = GDALRaster({
'datatype': 1,
'driver': 'MEM',
'width': 2,
... | 32.769231 | 79 | 0.571205 | 1,143 | 0.894366 | 0 | 0 | 0 | 0 | 0 | 0 | 105 | 0.08216 |
8f0b38a7be3883ab570ebdb5fd63d7f0c704c7d9 | 340 | py | Python | array/shuffle_the_array.py | elenaborisova/LeetCode-Solutions | 98376aab7fd150a724e316357ae5ea46988d9eac | [
"MIT"
] | null | null | null | array/shuffle_the_array.py | elenaborisova/LeetCode-Solutions | 98376aab7fd150a724e316357ae5ea46988d9eac | [
"MIT"
] | null | null | null | array/shuffle_the_array.py | elenaborisova/LeetCode-Solutions | 98376aab7fd150a724e316357ae5ea46988d9eac | [
"MIT"
] | null | null | null | def shuffle(nums, n):
shuffled_array = []
i = 0
while len(shuffled_array) < len(nums):
shuffled_array.append(nums[i])
shuffled_array.append(nums[i + n])
i += 1
return shuffled_array
print(shuffle([2, 5, 1, 3, 4, 7], 3))
print(shuffle([1, 2, 3, 4, 4, 3, 2, 1], 4))
print(shuffl... | 21.25 | 43 | 0.558824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8f0ecc69fcbb900b73340911f3b2c0dbdb93c8a1 | 6,577 | py | Python | otcs.py | neckro/mr-otcs | 5782f3664afb7213729e207881ae855fb60e43a0 | [
"MIT"
] | null | null | null | otcs.py | neckro/mr-otcs | 5782f3664afb7213729e207881ae855fb60e43a0 | [
"MIT"
] | null | null | null | otcs.py | neckro/mr-otcs | 5782f3664afb7213729e207881ae855fb60e43a0 | [
"MIT"
] | null | null | null | import datetime
import errno
import itertools
import os
import subprocess
import sys
###############################################################################
# Configuration.
# Program paths. Use absolute paths.
MEDIA_PLAYER_PATH = "/usr/bin/vlc"
FFPROBE_PATH = "/usr/bin/ffprobe"
# Base path for all video fil... | 39.383234 | 103 | 0.636764 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,071 | 0.46693 |
8f0f210fb96be3418eb569e273c87bbeadbc980a | 4,674 | py | Python | src/lambda_functions/lex_v2_cfn_cr/lex_v2_cfn_cr/slot.py | mohsenari/aws-lex-v2-cfn-cr | 619b223d5b6fb4561ca3adb4c278ad03cc978cf0 | [
"Apache-2.0"
] | 11 | 2021-06-24T23:23:16.000Z | 2021-09-07T16:38:01.000Z | src/lambda_functions/lex_v2_cfn_cr/lex_v2_cfn_cr/slot.py | mohsenari/aws-lex-v2-cfn-cr | 619b223d5b6fb4561ca3adb4c278ad03cc978cf0 | [
"Apache-2.0"
] | 3 | 2021-09-23T00:07:36.000Z | 2021-11-24T00:29:33.000Z | src/lambda_functions/lex_v2_cfn_cr/lex_v2_cfn_cr/slot.py | mohsenari/aws-lex-v2-cfn-cr | 619b223d5b6fb4561ca3adb4c278ad03cc978cf0 | [
"Apache-2.0"
] | 4 | 2021-07-11T02:46:36.000Z | 2022-01-13T22:47:39.000Z | #!/usr/bin/env python3.8
################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (t... | 34.367647 | 89 | 0.537441 | 3,003 | 0.64249 | 0 | 0 | 0 | 0 | 0 | 0 | 1,535 | 0.328412 |
8f0f7ac7b18d123aa39d6ab27ba2f2362e38f9ef | 3,939 | py | Python | pyiomica/visibilityGraphAuxiliaryFunctions.py | benstear/pyiomica | bc26032b610fc911cc03b54115d6abdf53a56fce | [
"MIT"
] | 12 | 2019-11-22T21:44:13.000Z | 2022-03-06T21:46:31.000Z | pyiomica/visibilityGraphAuxiliaryFunctions.py | benstear/pyiomica | bc26032b610fc911cc03b54115d6abdf53a56fce | [
"MIT"
] | null | null | null | pyiomica/visibilityGraphAuxiliaryFunctions.py | benstear/pyiomica | bc26032b610fc911cc03b54115d6abdf53a56fce | [
"MIT"
] | 5 | 2019-07-25T21:03:42.000Z | 2021-06-09T02:14:30.000Z | '''Functions to generate adjacency matrix of visibility graphs'''
import numba
numba.config.NUMBA_DEFAULT_NUM_THREADS = 4
from .globalVariables import *
@numba.jit(cache=True)
def getAdjacencyMatrixOfNVG(data, times):
"""Calculate adjacency matrix of visibility graph.
JIT-accelerated version (a b... | 24.465839 | 99 | 0.550394 | 0 | 0 | 0 | 0 | 2,056 | 0.52196 | 0 | 0 | 1,820 | 0.462046 |
8f10177907a54de871e4ea66e85d002d100e36d1 | 1,557 | py | Python | turkApi/reject_assignments.py | arunchaganty/kbp-online | 9f8763d8f4bfb1fb8a01f1f4f506f56625dd38d8 | [
"MIT"
] | 4 | 2017-08-09T14:05:48.000Z | 2018-12-25T01:34:23.000Z | turkApi/reject_assignments.py | arunchaganty/kbp-online | 9f8763d8f4bfb1fb8a01f1f4f506f56625dd38d8 | [
"MIT"
] | 12 | 2017-01-19T23:18:18.000Z | 2018-12-23T18:57:54.000Z | turkApi/reject_assignments.py | arunchaganty/kbp-online | 9f8763d8f4bfb1fb8a01f1f4f506f56625dd38d8 | [
"MIT"
] | 2 | 2017-08-08T09:48:20.000Z | 2018-07-09T09:12:43.000Z | import boto
from boto.mturk.connection import MTurkConnection
from boto.mturk.question import ExternalQuestion
from connection import connect
import urllib
import argparse
import ConfigParser
import sys, os
import time
import pandas as pd
parser = argparse.ArgumentParser()
parser.add_argument('answers_file', nargs=1,... | 35.386364 | 141 | 0.652537 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 417 | 0.267823 |
8f104b5661836f5be7edc0ffb289f0055a1c9b2f | 2,265 | py | Python | api/models.py | DominikWolek/survey | 358794ea1ed81ba7ba2ffe4a0897d9867455cf31 | [
"MIT"
] | null | null | null | api/models.py | DominikWolek/survey | 358794ea1ed81ba7ba2ffe4a0897d9867455cf31 | [
"MIT"
] | null | null | null | api/models.py | DominikWolek/survey | 358794ea1ed81ba7ba2ffe4a0897d9867455cf31 | [
"MIT"
] | null | null | null | import datetime
from django.db import models
from django.contrib.postgres.fields import ArrayField
from django.utils import timezone
class Survey(models.Model):
name = models.CharField(max_length=200)
def __str__(self):
return self.name
def questions(self):
return self.question_set
... | 26.964286 | 117 | 0.671082 | 2,103 | 0.928477 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.029581 |
8f10cb27e5a5f26016387bdf0a6b631a9bfd71b3 | 92 | py | Python | my_PP4E/system/adder3.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | my_PP4E/system/adder3.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | my_PP4E/system/adder3.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | import sys
sum_int = 0
for line_str in sys.stdin: sum_int += int(line_str)
print(sum_int)
| 13.142857 | 51 | 0.73913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8f170c370bacf2243ee7c2b4a5545bf2f5612009 | 7,102 | py | Python | okcupyd_testing/util.py | sphericalcow/okcupyd | ae0a99d248c515eea9a6d21a9c89f51e299b33f5 | [
"MIT"
] | 89 | 2015-01-09T19:58:07.000Z | 2022-03-03T21:56:50.000Z | okcupyd_testing/util.py | sphericalcow/okcupyd | ae0a99d248c515eea9a6d21a9c89f51e299b33f5 | [
"MIT"
] | 51 | 2015-01-18T23:09:35.000Z | 2017-04-24T03:16:03.000Z | okcupyd_testing/util.py | sphericalcow/okcupyd | ae0a99d248c515eea9a6d21a9c89f51e299b33f5 | [
"MIT"
] | 24 | 2015-01-16T17:43:21.000Z | 2020-09-18T12:19:15.000Z | import copy
import inspect
import logging
import os
import zlib
from six.moves import urllib
import simplejson
import vcr
import wrapt
from okcupyd import settings
from okcupyd import util
log = logging.getLogger(__name__)
TESTING_USERNAME = 'username'
TESTING_PASSWORD = 'password'
WBITS = 16 + zlib.MAX_WBITS
SH... | 31.286344 | 107 | 0.656998 | 0 | 0 | 0 | 0 | 1,096 | 0.154323 | 0 | 0 | 663 | 0.093354 |
8f199845284d48a07aa7f005ade6fd7c86f09c1e | 68 | py | Python | clips/training_session/plotsequence.py | thomasbazeille/public_protocols | 8d8dd051eda7eec2b8358dae42ab363b7d83e1d0 | [
"BSD-3-Clause"
] | 3 | 2019-09-19T13:06:59.000Z | 2021-07-03T18:09:32.000Z | clips/training_session/plotsequence.py | thomasbazeille/public_protocols | 8d8dd051eda7eec2b8358dae42ab363b7d83e1d0 | [
"BSD-3-Clause"
] | 2 | 2017-11-30T19:32:24.000Z | 2020-09-03T19:40:13.000Z | clips/training_session/plotsequence.py | thomasbazeille/public_protocols | 8d8dd051eda7eec2b8358dae42ab363b7d83e1d0 | [
"BSD-3-Clause"
] | 3 | 2019-09-19T13:07:10.000Z | 2021-01-14T16:07:16.000Z | import numpy as np
import sys
import pylab as pl
_, f = sys.argv
| 8.5 | 18 | 0.705882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8f1d431916ff72728e735e8e734dd11974fd8bb1 | 1,474 | py | Python | utils/checkpoint.py | Jackson-Kang/VQVC-Pytorch | d2267b5c52253b6ae11a5767963a65320ae335c2 | [
"MIT"
] | 13 | 2021-02-11T17:48:40.000Z | 2022-02-08T06:37:12.000Z | utils/checkpoint.py | Jackson-Kang/VQVC-Pytorch | d2267b5c52253b6ae11a5767963a65320ae335c2 | [
"MIT"
] | 1 | 2022-01-17T17:07:22.000Z | 2022-01-18T06:51:21.000Z | utils/checkpoint.py | Jackson-Kang/VQVC-Pytorch | d2267b5c52253b6ae11a5767963a65320ae335c2 | [
"MIT"
] | 3 | 2021-03-10T08:40:00.000Z | 2022-01-17T17:08:48.000Z | import torch
import os, glob
from .path import create_dir, get_path
def load_checkpoint(checkpoint_path, model, optimizer=None, scheduler=None):
if optimizer is not None:
if not(os.path.exists(checkpoint_path)):
print("[WARNING] No checkpoint exists. Start from scratch.")
global_step = 0
else:
print(... | 30.708333 | 111 | 0.729308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 299 | 0.202849 |
8f1dda3eb63e47622769b82f7f990a3303f3a4ae | 2,514 | py | Python | ui/Pytest/test_LineEditMinimumMaximumController.py | MoisesHenr/OCEAN | e99c853893adc89652794ace62fcc8ffa78aa7ac | [
"MIT"
] | 15 | 2021-06-15T13:48:03.000Z | 2022-01-26T13:51:46.000Z | ui/Pytest/test_LineEditMinimumMaximumController.py | MoisesHenr/OCEAN | e99c853893adc89652794ace62fcc8ffa78aa7ac | [
"MIT"
] | 1 | 2021-07-04T02:58:29.000Z | 2021-07-04T02:58:29.000Z | ui/Pytest/test_LineEditMinimumMaximumController.py | MoisesHenr/OCEAN | e99c853893adc89652794ace62fcc8ffa78aa7ac | [
"MIT"
] | 2 | 2021-06-21T20:44:01.000Z | 2021-06-23T11:10:56.000Z | # Author: Moises Henrique Pereira
# this class handle the functions tests of controller of the component of the numerical features
import pytest
import sys
from PyQt5 import QtWidgets
from ui.mainTest import StaticObjects
@pytest.mark.parametrize('featureName', [1, 2.9, False, ('t1', 't2'), None])
def test_CILE... | 55.866667 | 143 | 0.838902 | 0 | 0 | 0 | 0 | 484 | 0.192522 | 0 | 0 | 191 | 0.075975 |
8f1e2d5980fe5fec1c6bd18c363575e550ec387e | 1,055 | py | Python | retropongbuild/randomMusicplayer.py | MatthewAlgo/RetroPongBuild | 9ab6770928b7e48e638655acd7ac6bfdd7ae85c1 | [
"Unlicense"
] | null | null | null | retropongbuild/randomMusicplayer.py | MatthewAlgo/RetroPongBuild | 9ab6770928b7e48e638655acd7ac6bfdd7ae85c1 | [
"Unlicense"
] | null | null | null | retropongbuild/randomMusicplayer.py | MatthewAlgo/RetroPongBuild | 9ab6770928b7e48e638655acd7ac6bfdd7ae85c1 | [
"Unlicense"
] | null | null | null | import multiprocessing
import os
import random
import threading
import time
from multiprocessing import Process
import concurrent.futures
import pygame
import retropong
class WavPlayerRandom():
def __init__(self):
# th = threading.Thread(target=self.fileChooser(), args=(), daemon=True)
process =... | 31.029412 | 80 | 0.605687 | 881 | 0.835071 | 0 | 0 | 0 | 0 | 0 | 0 | 224 | 0.212322 |
8f1edf521362329d1afd7290b5a0f0db4b9cc960 | 1,277 | py | Python | Interviews/goldmansachs/1802.Grid Game/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 12 | 2019-05-04T04:21:27.000Z | 2022-03-02T07:06:57.000Z | Interviews/goldmansachs/1802.Grid Game/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 1 | 2019-07-24T18:43:53.000Z | 2019-07-24T18:43:53.000Z | Interviews/goldmansachs/1802.Grid Game/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 10 | 2019-07-01T04:03:04.000Z | 2022-03-09T03:57:37.000Z | class Solution:
"""
@param grid: a 2D array of integers
@param rules: an array of strings
@param k: an integer that denotes the number of steps to perform
@return: return a grid
"""
ALIVE = []
dx = [1, 1, 1, 0, 0, -1, -1, -1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
def GridGame(self,... | 28.377778 | 103 | 0.47455 | 1,276 | 0.999217 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.16758 |
8f21a46afa8fc39f3ecf728165185537c6f76296 | 1,712 | py | Python | lib/tsetmc_api/core/symbol.py | mahs4d/tsetmc-api | 4d7252b9e9aeda870e0340d7641aa244427a4ab1 | [
"MIT"
] | 18 | 2020-06-01T06:12:41.000Z | 2021-05-08T07:57:47.000Z | lib/tsetmc_api/core/symbol.py | mahs4d/tsetmc-api | 4d7252b9e9aeda870e0340d7641aa244427a4ab1 | [
"MIT"
] | 3 | 2020-08-07T11:25:53.000Z | 2021-04-09T12:37:00.000Z | lib/tsetmc_api/core/symbol.py | mahs4d/tsetmc-api | 4d7252b9e9aeda870e0340d7641aa244427a4ab1 | [
"MIT"
] | 6 | 2021-04-09T12:37:40.000Z | 2021-11-08T20:50:16.000Z | from datetime import date
import requests
from bs4 import BeautifulSoup
def get_symbol_details(symbol_id):
raw = requests.get(f'http://www.tsetmc.com/Loader.aspx?Partree=15131M&i={symbol_id}', timeout=20, verify=False).text
ret = {}
trs = BeautifulSoup(raw, 'lxml').find_all('tr')
for tr in trs:
... | 30.035088 | 120 | 0.586449 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 282 | 0.16472 |
8f231583cf8cbaed36b765c3c82ea90dabd12d76 | 975 | py | Python | shamester_api/handlers/new_website_handler.py | heynemann/shamester | b098c922be941037410d3c7b3214a9aecde67495 | [
"MIT"
] | 1 | 2015-01-25T13:13:23.000Z | 2015-01-25T13:13:23.000Z | shamester_api/handlers/new_website_handler.py | heynemann/shamester | b098c922be941037410d3c7b3214a9aecde67495 | [
"MIT"
] | null | null | null | shamester_api/handlers/new_website_handler.py | heynemann/shamester | b098c922be941037410d3c7b3214a9aecde67495 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from tornado.web import RequestHandler, asynchronous
import tornado.gen
import motor
from ujson import loads, dumps
from shamester_api.models import Website
class NewWebsiteHandler(RequestHandler):
@property
def websites(self):
return self.application.mongo.... | 23.780488 | 72 | 0.61641 | 771 | 0.790769 | 595 | 0.610256 | 720 | 0.738462 | 0 | 0 | 118 | 0.121026 |
8f246adac761633444e7917b2e83510f4f23aa8d | 8,368 | py | Python | TM271A-ctrl.py | wb4bxo/TM-271A-ctrl | 45f9f931553b08f4bc1b30360c2c946b07b54074 | [
"Unlicense"
] | null | null | null | TM271A-ctrl.py | wb4bxo/TM-271A-ctrl | 45f9f931553b08f4bc1b30360c2c946b07b54074 | [
"Unlicense"
] | null | null | null | TM271A-ctrl.py | wb4bxo/TM-271A-ctrl | 45f9f931553b08f4bc1b30360c2c946b07b54074 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
import sys
import os
import time
import serial
# This is a quick and dirty control program for the Kenwood TM-271A and TM-281A
# transceiver to allow remote base like operations for use with Allstar or
# other digital modes. It is primarily targeted at the Raspberry Pi but being
# in Python allo... | 30.652015 | 112 | 0.58162 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,514 | 0.539436 |
8f247daa65827948d6dd176860fe6b66dc1abfcd | 2,347 | py | Python | snake/games/snake_gen.py | TeamSerpentine/retro-baselines | 9b2c725604496aca9c382a53f456d31fdbcaa5b1 | [
"BSD-3-Clause"
] | 2 | 2019-12-09T08:41:13.000Z | 2020-10-22T02:29:22.000Z | snake/games/snake_gen.py | TeamSerpentine/retro-baselines | 9b2c725604496aca9c382a53f456d31fdbcaa5b1 | [
"BSD-3-Clause"
] | null | null | null | snake/games/snake_gen.py | TeamSerpentine/retro-baselines | 9b2c725604496aca9c382a53f456d31fdbcaa5b1 | [
"BSD-3-Clause"
] | null | null | null |
import itertools
import numpy as np
from snake.objects.utils import Point
from snake.games.base_game import SnakeGame
from snake.boards.classic import Board
from snake.displays.single_image import SingleImage
class Snake(SnakeGame):
"""
Classic snake game, which outputs a numpy ndarray of size (24,)
... | 39.116667 | 93 | 0.607158 | 2,133 | 0.90882 | 0 | 0 | 0 | 0 | 0 | 0 | 499 | 0.212612 |
8f2505c47e5671579a2268dd78cbe3bc9dc699e6 | 448 | py | Python | mytest.py | qxcross/tdd-practice | 72d58bf99ab02decc570649fd8995f8a9ccb0d4f | [
"MIT"
] | null | null | null | mytest.py | qxcross/tdd-practice | 72d58bf99ab02decc570649fd8995f8a9ccb0d4f | [
"MIT"
] | null | null | null | mytest.py | qxcross/tdd-practice | 72d58bf99ab02decc570649fd8995f8a9ccb0d4f | [
"MIT"
] | null | null | null | import unittest
from practice import *
class myFirstTests(unittest.TestCase):
def test_hello(self):
self.assertEqual(hello_world(),'hello world')
def test_sorted(self):
self.assertEqual(sorted_list(list(range(0,11))),[0,1,2,3,4,5,6,7,8,9,10])
def test_even(self):
self.assertEqual... | 24.888889 | 81 | 0.676339 | 391 | 0.872768 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.029018 |
8f26c80988f27d122c2a8050884079763f1d447d | 309 | py | Python | 49. matplotlib 6 - Plotting from a csv file.py | JatinR05/Python-3-basics-series | e4b3d8056e2074602c9ed0cd201676484dd0d179 | [
"MIT"
] | 41 | 2015-05-12T12:49:35.000Z | 2021-07-13T11:07:09.000Z | 49. matplotlib 6 - Plotting from a csv file.py | JatinR05/Python-3-basics-series | e4b3d8056e2074602c9ed0cd201676484dd0d179 | [
"MIT"
] | null | null | null | 49. matplotlib 6 - Plotting from a csv file.py | JatinR05/Python-3-basics-series | e4b3d8056e2074602c9ed0cd201676484dd0d179 | [
"MIT"
] | 37 | 2016-10-13T04:02:09.000Z | 2021-12-16T18:28:27.000Z | from matplotlib import pyplot as plt
from matplotlib import style
####
import numpy as np
style.use('ggplot')
x,y = np.loadtxt('exampleFile.csv',
unpack=True,
delimiter = ',')
plt.plot(x,y)
plt.title('Epic Info')
plt.ylabel('Y axis')
plt.xlabel('X axis')
plt.show()
| 13.434783 | 36 | 0.61165 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.190939 |
8f272df30ff4e1643b5772b92ea4e650ad48af7e | 473 | py | Python | hw5/close_p_q.py | rocke97/crypto | 89c4e595adf74558e12ceb1762025fd2f0275fec | [
"MIT"
] | null | null | null | hw5/close_p_q.py | rocke97/crypto | 89c4e595adf74558e12ceb1762025fd2f0275fec | [
"MIT"
] | null | null | null | hw5/close_p_q.py | rocke97/crypto | 89c4e595adf74558e12ceb1762025fd2f0275fec | [
"MIT"
] | null | null | null | import math
def find_s_and_t(n):
s = 0
t = 0
for possible_t in range(math.ceil(math.sqrt(n)), n):
if math.sqrt((pow(possible_t, 2) - n)) == math.ceil(math.sqrt((pow(possible_t, 2) - n))):
t = possible_t
s_squared = pow(t, 2) - n
s = math.floor(math.sqrt(s_squared... | 24.894737 | 97 | 0.547569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.02537 |
8f2a2ed8a1f8b461a2fc0955e0ccc67710df3bfc | 1,051 | py | Python | Week_4/xcoverage.py | actaylor05/learning_python | d8c72fdb7c07bac4176a4418f83d75013db2245a | [
"MIT"
] | null | null | null | Week_4/xcoverage.py | actaylor05/learning_python | d8c72fdb7c07bac4176a4418f83d75013db2245a | [
"MIT"
] | null | null | null | Week_4/xcoverage.py | actaylor05/learning_python | d8c72fdb7c07bac4176a4418f83d75013db2245a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Write a program that simulates random BAC coverage over a genome
# Command line arguments include
# Genome size (e.g. 1000)
# X coverage (e.g. 5)
# Use assert() to check parameter bounds
# Report min, max, and histogram of coverage
# Note that your output may vary due to random function
imp... | 16.169231 | 66 | 0.647954 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 560 | 0.532826 |
8f2ab165419c56c1e792ea4658c93240a1bf71e7 | 1,023 | py | Python | GetExcelWorksheetName.py | gnomesoup/pyDynamo | dea046e96f7973fcb6c28a274a3092b246457551 | [
"Unlicense",
"MIT"
] | null | null | null | GetExcelWorksheetName.py | gnomesoup/pyDynamo | dea046e96f7973fcb6c28a274a3092b246457551 | [
"Unlicense",
"MIT"
] | null | null | null | GetExcelWorksheetName.py | gnomesoup/pyDynamo | dea046e96f7973fcb6c28a274a3092b246457551 | [
"Unlicense",
"MIT"
] | null | null | null | import clr
clr.AddReference('Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c')
from Microsoft.Office.Interop import Excel
from System.Runtime.InteropServices import Marshal
paths = IN[0]
if not isinstance(paths, list):
paths = [paths]
outList = []
for path in p... | 28.416667 | 118 | 0.662757 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 273 | 0.266862 |
8f2afa44239c14e6b1bb586457468cf46963a9c2 | 3,352 | py | Python | python/desc/sims_ci_pipe/psf_mag_check.py | jchiang87/sims_ci_pipe | db8f5ba03880c8def4242fc80ab4cfe6e225e72f | [
"BSD-3-Clause"
] | 3 | 2019-12-04T02:47:34.000Z | 2021-07-04T16:25:34.000Z | python/desc/sims_ci_pipe/psf_mag_check.py | jchiang87/sims_ci_pipe | db8f5ba03880c8def4242fc80ab4cfe6e225e72f | [
"BSD-3-Clause"
] | 5 | 2019-12-10T15:54:49.000Z | 2020-07-19T02:25:39.000Z | python/desc/sims_ci_pipe/psf_mag_check.py | jchiang87/sims_ci_pipe | db8f5ba03880c8def4242fc80ab4cfe6e225e72f | [
"BSD-3-Clause"
] | 1 | 2020-07-15T15:41:34.000Z | 2020-07-15T15:41:34.000Z | """
Compute visit-level distributions of psf_mag - calib_mag to check
for biases in photometry.
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import lsst.daf.persistence as dp
from .ellipticity_distributions import get_point_sources
__all__ = ['get_psf_calib_mags', 'psf_mag_check']
def ... | 34.204082 | 79 | 0.656026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,402 | 0.418258 |
8f2d5a928f67b43b78d0330c6a21750fcb1cff1d | 129 | py | Python | webpagecrawl.py | solodom/crawler | fcaf8570b85452194bac18a49f5a61d88ca16a60 | [
"MIT"
] | null | null | null | webpagecrawl.py | solodom/crawler | fcaf8570b85452194bac18a49f5a61d88ca16a60 | [
"MIT"
] | null | null | null | webpagecrawl.py | solodom/crawler | fcaf8570b85452194bac18a49f5a61d88ca16a60 | [
"MIT"
] | null | null | null | from urllib import request
url=input('URL:')
file_name=input('Filename:')
page_file=request.urlretrieve(url,filename=file_name) | 21.5 | 53 | 0.79845 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.131783 |
8f30236674d6673760085f111ad109a0c51c2725 | 7,601 | py | Python | job_scheduler_web/scheduler_web/views.py | ewerkema/job-scheduler | ecb2e93cf8eb3d9200f05176b60c3424d70056c3 | [
"MIT"
] | null | null | null | job_scheduler_web/scheduler_web/views.py | ewerkema/job-scheduler | ecb2e93cf8eb3d9200f05176b60c3424d70056c3 | [
"MIT"
] | null | null | null | job_scheduler_web/scheduler_web/views.py | ewerkema/job-scheduler | ecb2e93cf8eb3d9200f05176b60c3424d70056c3 | [
"MIT"
] | 1 | 2018-06-25T19:05:13.000Z | 2018-06-25T19:05:13.000Z | from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from django.template import loader
from django import forms
import logging
from dateutil.parser import parse
from requests.utils import quote
from django.urls import reverse
from time import strftime
import csv
from .model... | 30.526104 | 169 | 0.597553 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 964 | 0.126825 |
8f30b3b7f97b65c7deec8372528b61489b88ad0a | 558 | py | Python | WaybackMedic 2.1/cloudflare.py | greencardamom/WaybackMedic | 4291afb5451e25ec9cb73f207a7da39456440865 | [
"MIT"
] | 8 | 2016-03-16T02:23:09.000Z | 2021-12-21T21:58:59.000Z | WaybackMedic 2.1/cloudflare.py | greencardamom/WaybackMedic | 4291afb5451e25ec9cb73f207a7da39456440865 | [
"MIT"
] | null | null | null | WaybackMedic 2.1/cloudflare.py | greencardamom/WaybackMedic | 4291afb5451e25ec9cb73f207a7da39456440865 | [
"MIT"
] | 1 | 2017-04-29T14:35:08.000Z | 2017-04-29T14:35:08.000Z | #!/usr/bin/python
#
# Bypass Cloudflare DDOS protection with cfscrape library.
# https://github.com/Anorov/cloudflare-scrape
# Note: SSL doesn't work, use HTTP
# If it stops working check for newer version
#
import cfscrape, sys
scraper = cfscrape.create_scraper() # returns a CloudflareScraper instance
# ... | 31 | 96 | 0.729391 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 355 | 0.636201 |
8f31782a6012b73d5ada6e6de802c8e5d232912b | 33,930 | py | Python | mapmint-services/datastores/postgis/pgConnection.py | fenilgmehta/mapmint | 7c28c42dbe9b17b11f5f6f080fd2c397f4f6937f | [
"MIT"
] | null | null | null | mapmint-services/datastores/postgis/pgConnection.py | fenilgmehta/mapmint | 7c28c42dbe9b17b11f5f6f080fd2c397f4f6937f | [
"MIT"
] | 2 | 2019-03-31T01:11:06.000Z | 2020-03-15T13:43:16.000Z | mapmint-services/datastores/postgis/pgConnection.py | fenilgmehta/mapmint | 7c28c42dbe9b17b11f5f6f080fd2c397f4f6937f | [
"MIT"
] | null | null | null | import psycopg2
import lxml
# import libxslt
from lxml import etree
import osgeo.ogr
import sys
import zoo
import json
try:
from manage_users.manage_users import mm_md5
except:
from manage_users import mm_md5
class pgConnection:
def __init__(self, conf, dbfile):
self.dbfile = dbfile
self.... | 54.725806 | 2,322 | 0.536045 | 1,458 | 0.042971 | 0 | 0 | 0 | 0 | 0 | 0 | 15,429 | 0.45473 |
8f31fe570d9ae4f3cf87da4f3445c66fe7790cc6 | 1,739 | py | Python | tests/test_errors.py | vishalbelsare/cointanalysis | ae21c520dfe500fe535265e93df4a36f4d012069 | [
"BSD-3-Clause"
] | 27 | 2020-01-03T03:36:42.000Z | 2022-03-28T06:47:32.000Z | tests/test_errors.py | simaki/cointanalysis | ae21c520dfe500fe535265e93df4a36f4d012069 | [
"BSD-3-Clause"
] | 26 | 2020-01-03T09:02:21.000Z | 2022-02-22T01:01:48.000Z | tests/test_errors.py | vishalbelsare/cointanalysis | ae21c520dfe500fe535265e93df4a36f4d012069 | [
"BSD-3-Clause"
] | 8 | 2021-02-09T22:19:18.000Z | 2022-02-23T19:45:24.000Z | import numpy as np
import pytest
from cointanalysis import CointAnalysis
from cointanalysis._stat import StationarityTester
from cointanalysis._utils import check_shape
# --------------------------------------------------------------------------------
@pytest.mark.parametrize("n_features", [0, 1, 3])
def test_check... | 24.842857 | 82 | 0.626797 | 0 | 0 | 0 | 0 | 201 | 0.115584 | 0 | 0 | 389 | 0.223692 |
8f3300062c5c25c6b9220dca88740586126db017 | 575 | py | Python | perma_web/perma/migrations/0004_auto_20160506_1632.py | rachelaus/perma | 36c05080520ea3ffce465dbc383795c060fa4112 | [
"MIT",
"Unlicense"
] | 317 | 2015-02-12T16:53:34.000Z | 2022-03-14T23:38:04.000Z | perma_web/perma/migrations/0004_auto_20160506_1632.py | rachelaus/perma | 36c05080520ea3ffce465dbc383795c060fa4112 | [
"MIT",
"Unlicense"
] | 2,069 | 2015-01-06T20:09:24.000Z | 2022-03-31T15:44:36.000Z | perma_web/perma/migrations/0004_auto_20160506_1632.py | rachelaus/perma | 36c05080520ea3ffce465dbc383795c060fa4112 | [
"MIT",
"Unlicense"
] | 69 | 2015-01-12T18:56:07.000Z | 2022-02-22T19:57:10.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('perma', '0003_capturejob'),
]
operations = [
migrations.AddField(
model_name='historicallink',
name=... | 23 | 61 | 0.582609 | 466 | 0.810435 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.158261 |
8f332ee1aa858c59191df24f355feb7d4151e658 | 3,052 | py | Python | Baseline/NABA/obs_naba.py | sarthak-chakraborty/PARIMA | c6ceb6e17fc3c934603fa843febc42a8b6ee5bb1 | [
"MIT"
] | 13 | 2021-03-06T16:53:33.000Z | 2022-02-04T20:28:13.000Z | Baseline/NABA/obs_naba.py | sarthak-chakraborty/Adaptive-360-video | c6ceb6e17fc3c934603fa843febc42a8b6ee5bb1 | [
"MIT"
] | 6 | 2021-06-02T08:08:09.000Z | 2022-03-12T00:58:26.000Z | Baseline/NABA/obs_naba.py | sarthak-chakraborty/Adaptive-360-video | c6ceb6e17fc3c934603fa843febc42a8b6ee5bb1 | [
"MIT"
] | 3 | 2021-05-26T03:32:04.000Z | 2021-07-17T14:34:20.000Z | import numpy as np
import math
import pickle
from naba import get_data, tiling, alloc_bitrate, calc_qoe
import argparse
import json
def main():
parser = argparse.ArgumentParser(description='Run NABA algorithm and calculate Average QoE of a video for all users')
parser.add_argument('-D', '--dataset', type=int, re... | 35.488372 | 167 | 0.713303 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 996 | 0.326343 |
8f391da0df73d8436dc8322ba02d27a6dffd570f | 2,635 | py | Python | tsserver/features/environment.py | m4tx/techswarm-server | a04a3e2a731c3a086aa8476f66adda64973dcd66 | [
"MIT"
] | 1 | 2016-08-12T14:27:31.000Z | 2016-08-12T14:27:31.000Z | tsserver/features/environment.py | TechSwarm/techswarm-server | a04a3e2a731c3a086aa8476f66adda64973dcd66 | [
"MIT"
] | null | null | null | tsserver/features/environment.py | TechSwarm/techswarm-server | a04a3e2a731c3a086aa8476f66adda64973dcd66 | [
"MIT"
] | null | null | null | import base64
import os
import tempfile
from flask import json
from werkzeug.datastructures import Headers
import tsserver
from tsserver import configutils
# If set to True, each time the test is run, new database is created as a
# temporary file. If the value is equal to False, tests will be using SQLite
# in-memo... | 29.606742 | 76 | 0.656546 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 722 | 0.274004 |
8f397a404c6c6b7845cf8d3cc2ad927c19c0bc7f | 1,568 | py | Python | tests/time_delay_layers_test.py | veqtor/veqtor_keras | 303f81b7c6aaa7962b288541275fe7ea618804b9 | [
"MIT"
] | 1 | 2020-08-07T14:47:16.000Z | 2020-08-07T14:47:16.000Z | tests/time_delay_layers_test.py | veqtor/veqtor_keras | 303f81b7c6aaa7962b288541275fe7ea618804b9 | [
"MIT"
] | null | null | null | tests/time_delay_layers_test.py | veqtor/veqtor_keras | 303f81b7c6aaa7962b288541275fe7ea618804b9 | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras.utils import custom_object_scope
from tensorflow.python.keras.testing_utils import layer_test
from veqtor_keras.layers.time_delay_layers import TimeDelayLayer1D, DepthGroupwiseTimeDelayLayer1D, \
DepthGroupwiseTimeDelayLayerFake2D, TimeDelayLayerFake2D
class TimeDela... | 38.243902 | 109 | 0.720026 | 1,204 | 0.767857 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.109694 |
8f39b9e08ffeda9e93fcc277f54d4d6aea6ba49a | 208 | py | Python | Python/factorial.py | tinkpo/Curso-Introducci-n-a-la-Computaci-n-para-Matem-ticos | 72b5db944c759c0d977553fa1bc15a11ac110909 | [
"MIT"
] | null | null | null | Python/factorial.py | tinkpo/Curso-Introducci-n-a-la-Computaci-n-para-Matem-ticos | 72b5db944c759c0d977553fa1bc15a11ac110909 | [
"MIT"
] | null | null | null | Python/factorial.py | tinkpo/Curso-Introducci-n-a-la-Computaci-n-para-Matem-ticos | 72b5db944c759c0d977553fa1bc15a11ac110909 | [
"MIT"
] | null | null | null | def fact(n):
if(n==0):
return 1
else:
return n*fact(n-1)
x=int(input("Ingrese el valor al que le quiere calcular el factorial "))
print('El factorial de ', x, 'es ', fact(x))
| 23.111111 | 73 | 0.5625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.389423 |
8f3f574c981c25a097dafd8bdfc599460d07e952 | 660 | py | Python | PyTester/data/Root.py | Sildra/PyTester | ebe16dc4dc169416ee839adc03e42806d8d57620 | [
"Apache-2.0"
] | null | null | null | PyTester/data/Root.py | Sildra/PyTester | ebe16dc4dc169416ee839adc03e42806d8d57620 | [
"Apache-2.0"
] | null | null | null | PyTester/data/Root.py | Sildra/PyTester | ebe16dc4dc169416ee839adc03e42806d8d57620 | [
"Apache-2.0"
] | null | null | null | from data.Category import Category
class Root(Category):
"""description of class"""
instance = None
def __init__(self, args, name="Root", depth=-1):
super().__init__(args.path, name, depth)
global instance
instance = self
self.args = args
def accept(self, visitor):
... | 23.571429 | 52 | 0.589394 | 622 | 0.942424 | 0 | 0 | 136 | 0.206061 | 0 | 0 | 32 | 0.048485 |
8f41984526bd0a507c9c13a13aba537060703cb9 | 2,880 | py | Python | predict.py | wangruichens/textcnn | 99dadc2da13d6dff48cc824492788046ceb82031 | [
"Apache-2.0"
] | null | null | null | predict.py | wangruichens/textcnn | 99dadc2da13d6dff48cc824492788046ceb82031 | [
"Apache-2.0"
] | null | null | null | predict.py | wangruichens/textcnn | 99dadc2da13d6dff48cc824492788046ceb82031 | [
"Apache-2.0"
] | null | null | null | # @Time : 18-11-5
# @Author : wangrc
# @Refers :
# @Outputs :
# @Desc :
import tensorflow as tf
import numpy as np
import os
import time
import datetime
import data_helpers
from text_cnn import TextCNN
from tensorflow.contrib import learn
import csv
import read_nlpcc
# Eval Parameters
tf.flags.DEFINE_int... | 36 | 116 | 0.721875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 940 | 0.326389 |
8f42142e2fce9843103335bc343e1cb5be87d4ce | 350 | py | Python | pypdfkit/__init__.py | BogdanGrebenuk/pypdfkit | da92782e1cfa3338e096f4a32e48b28a9730c29f | [
"MIT"
] | 11 | 2019-06-12T13:29:10.000Z | 2019-12-19T12:20:41.000Z | pypdfkit/__init__.py | BogdanGrebenuk/pypdfkit | da92782e1cfa3338e096f4a32e48b28a9730c29f | [
"MIT"
] | null | null | null | pypdfkit/__init__.py | BogdanGrebenuk/pypdfkit | da92782e1cfa3338e096f4a32e48b28a9730c29f | [
"MIT"
] | 1 | 2020-02-05T17:48:46.000Z | 2020-02-05T17:48:46.000Z | from .abc_pdf import *
from .datamanager import *
from .entities import *
from .pyobj2html import *
from .pypdfkit import *
from .templatemanager import *
__all__ = (
abc_pdf.__all__
+ datamanager.__all__
+ entities.__all__
+ pyobj2html.__all__
+ pypdfkit.__all__
+ templatemanager.__all__
+... | 19.444444 | 30 | 0.694286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.045714 |
8f443933ce391a779da9a70c342fe4fdd0a98f7a | 414 | py | Python | rltk/blocking/__init__.py | ckxz105/rltk | 2d08269002c00c0218421c8c2dc0cc7c4f677131 | [
"MIT"
] | null | null | null | rltk/blocking/__init__.py | ckxz105/rltk | 2d08269002c00c0218421c8c2dc0cc7c4f677131 | [
"MIT"
] | null | null | null | rltk/blocking/__init__.py | ckxz105/rltk | 2d08269002c00c0218421c8c2dc0cc7c4f677131 | [
"MIT"
] | null | null | null | from rltk.blocking.block import Block
from rltk.blocking.block_black_list import BlockBlackList
from rltk.blocking.block_generator import BlockGenerator
from rltk.blocking.hash_block_generator import HashBlockGenerator
from rltk.blocking.token_block_generator import TokenBlockGenerator
from rltk.blocking.canopy_block_g... | 51.75 | 69 | 0.898551 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8f46e0716183980d44e4a86f4c6e12b6c8d6a358 | 1,422 | py | Python | innuendo/core/interface.py | innuendoio/innuendo-agent-python | bcd79ddaf39083fa6498d1c9af2be2d79e495fc2 | [
"MIT"
] | null | null | null | innuendo/core/interface.py | innuendoio/innuendo-agent-python | bcd79ddaf39083fa6498d1c9af2be2d79e495fc2 | [
"MIT"
] | null | null | null | innuendo/core/interface.py | innuendoio/innuendo-agent-python | bcd79ddaf39083fa6498d1c9af2be2d79e495fc2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Backwards compatibility imports
from __future__ import absolute_import, division, print_function
from builtins import *
# Imports
import sys
import imp
import os
import argparse
import traceback
from innuendo.utils import file_manager as fm, parser
class TerminalInterface():
def __init... | 27.346154 | 97 | 0.613221 | 1,143 | 0.803797 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.146976 |
8f483a2d601c9006e62be6731d151449cfbbb0bc | 8,108 | py | Python | IMLearn/learners/gaussian_estimators.py | guymkaplan/IML.HUJI | cd0aac71c3684bca9a64df13b0ba15d42ec88e98 | [
"MIT"
] | null | null | null | IMLearn/learners/gaussian_estimators.py | guymkaplan/IML.HUJI | cd0aac71c3684bca9a64df13b0ba15d42ec88e98 | [
"MIT"
] | null | null | null | IMLearn/learners/gaussian_estimators.py | guymkaplan/IML.HUJI | cd0aac71c3684bca9a64df13b0ba15d42ec88e98 | [
"MIT"
] | null | null | null | from __future__ import annotations
import math
import numpy as np
from numpy.linalg import inv, det, slogdet
class UnivariateGaussian:
"""
Class for univariate Gaussian Distribution Estimator
"""
def __init__(self, biased_var: bool = False) -> UnivariateGaussian:
"""
Estimator for un... | 32.562249 | 115 | 0.583004 | 7,991 | 0.98557 | 0 | 0 | 2,330 | 0.28737 | 0 | 0 | 5,432 | 0.669956 |
8f499412eff769d36ce3fc8f434016dea692f534 | 1,509 | py | Python | pycqed/analysis/fit_toolbox/init_guess.py | nuttamas/PycQED_py3 | 1ee35c7428d36ed42ba4afb5d4bda98140b2283e | [
"MIT"
] | 60 | 2016-08-03T10:00:18.000Z | 2021-11-10T11:46:16.000Z | pycqed/analysis/fit_toolbox/init_guess.py | nuttamas/PycQED_py3 | 1ee35c7428d36ed42ba4afb5d4bda98140b2283e | [
"MIT"
] | 512 | 2016-08-03T17:10:02.000Z | 2022-03-31T14:03:43.000Z | pycqed/analysis/fit_toolbox/init_guess.py | nuttamas/PycQED_py3 | 1ee35c7428d36ed42ba4afb5d4bda98140b2283e | [
"MIT"
] | 34 | 2016-10-19T12:00:52.000Z | 2022-03-19T04:43:26.000Z | import numpy
from scipy import *
def lorentzian(x_data, y_data):
p=4*[0]
y_min = min(y_data)
index_y_min = y_data.tolist().index(y_min)
x_min = x_data[index_y_min]
y_max = max(y_data)
index_y_max = y_data.tolist().index(y_max)
y_mean = y_data.mean()
HM = (y_max - y_min)/2
#print 'ch... | 26.473684 | 98 | 0.588469 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.141816 |
8f4a9032ca67ddad37ba103c8f41aa58eaf22f85 | 268 | py | Python | src/rez/data/tests/commands/packages/rextest2/2/package.py | alexey-pelykh/rez | ad12105d89d658e4d2ea9249e537b3de90391f0e | [
"Apache-2.0"
] | null | null | null | src/rez/data/tests/commands/packages/rextest2/2/package.py | alexey-pelykh/rez | ad12105d89d658e4d2ea9249e537b3de90391f0e | [
"Apache-2.0"
] | null | null | null | src/rez/data/tests/commands/packages/rextest2/2/package.py | alexey-pelykh/rez | ad12105d89d658e4d2ea9249e537b3de90391f0e | [
"Apache-2.0"
] | 1 | 2020-09-24T08:33:43.000Z | 2020-09-24T08:33:43.000Z | name = 'rextest2'
version = '2'
requires = ["rextest-1.3"]
def commands():
# prepend to existing var
env.REXTEST_DIRS.append('{root}/data2')
setenv("REXTEST2_REXTEST_VER", '{resolve.rextest.version}')
env.REXTEST2_REXTEST_BASE = resolve.rextest.base
| 24.363636 | 63 | 0.697761 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.425373 |
8f4cb0e01f8ead732bd4879f7c1e12e4253c6239 | 937 | py | Python | examples/CheckFirmwareVersion.py | drizztguen77/PTHat | f46d05054875599e80b396f74bc5a348cfcefbfb | [
"Apache-2.0"
] | 5 | 2021-01-28T13:26:08.000Z | 2022-02-24T08:15:44.000Z | examples/CheckFirmwareVersion.py | drizztguen77/PTHat | f46d05054875599e80b396f74bc5a348cfcefbfb | [
"Apache-2.0"
] | null | null | null | examples/CheckFirmwareVersion.py | drizztguen77/PTHat | f46d05054875599e80b396f74bc5a348cfcefbfb | [
"Apache-2.0"
] | null | null | null | """
This is an example of setting up an Axis (motor) and starting it, revving it up to a specified RPM and letting it
run for some time and then shutting it down.
This example does not auto send the commands. It gets the command and then sends it to the send_command method.
"""
from pthat.pthat import Axis
def wait_... | 32.310345 | 113 | 0.742796 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 435 | 0.464248 |
8f51187c7b29e504944fcdf736e1d835859086bf | 392 | py | Python | usaco/january-2021/bronze/problem-1/problem-1.py | Yash-Singh1/competitive-programming | 3b9d278ed8138ab614e2a3d748627db8f4a2cdbd | [
"MIT"
] | 1 | 2021-04-25T21:58:57.000Z | 2021-04-25T21:58:57.000Z | usaco/january-2021/bronze/problem-1/problem-1.py | Yash-Singh1/competitive-programming | 3b9d278ed8138ab614e2a3d748627db8f4a2cdbd | [
"MIT"
] | null | null | null | usaco/january-2021/bronze/problem-1/problem-1.py | Yash-Singh1/competitive-programming | 3b9d278ed8138ab614e2a3d748627db8f4a2cdbd | [
"MIT"
] | null | null | null | cowphabet = raw_input()
duplicated_cowphabet = cowphabet
heard = raw_input()
amount = 1
for char in heard:
if char in duplicated_cowphabet:
duplicated_cowphabet = duplicated_cowphabet[duplicated_cowphabet.find(char) + 1:]
else:
duplicated_cowphabet += cowphabet
amount += 1
duplicated_cowphabet = du... | 26.133333 | 85 | 0.762755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8f53a5257eab324e5aae41fe7022ee0ccae9f4f5 | 586 | py | Python | setup.py | luismarcanth/google-searchconsole | e51d012b7404146bccf61e3923237e46ef10c15a | [
"MIT"
] | 9 | 2020-04-26T09:27:01.000Z | 2021-06-23T18:10:48.000Z | setup.py | luismarcanth/google-searchconsole | e51d012b7404146bccf61e3923237e46ef10c15a | [
"MIT"
] | null | null | null | setup.py | luismarcanth/google-searchconsole | e51d012b7404146bccf61e3923237e46ef10c15a | [
"MIT"
] | 3 | 2019-10-22T11:46:38.000Z | 2020-07-23T07:39:41.000Z | # encoding: utf-8
from setuptools import find_packages, setup
setup(name='searchconsole',
description='A wrapper for the Google Search Console API.',
author='Josh Carty',
author_email='carty.josh@gmail.com',
version='0.0.3',
license='MIT',
packages=find_packages(),
keywords=... | 27.904762 | 65 | 0.605802 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 282 | 0.481229 |
8f56222a9d4f4dba998acce60d101d7eba94059a | 257 | py | Python | generated-libraries/python/netapp/exports/exportchownmode.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | 2 | 2017-03-28T15:31:26.000Z | 2018-08-16T22:15:18.000Z | generated-libraries/python/netapp/exports/exportchownmode.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | generated-libraries/python/netapp/exports/exportchownmode.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | class Exportchownmode(basestring):
"""
restricted|unrestricted
Possible values:
<ul>
<li> "restricted" ,
<li> "unrestricted"
</ul>
"""
@staticmethod
def get_api_name():
return "exportchownmode"
| 17.133333 | 34 | 0.560311 | 251 | 0.976654 | 0 | 0 | 72 | 0.280156 | 0 | 0 | 147 | 0.571984 |