hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0602ce4cc0497f3903c5bbf1c08e5b5ccb57cc22 | 5,539 | py | Python | docs/conf.py | steinzi/ntc-rosetta | fac7086c460a2c68c769879930b74c05ed89b1f4 | [
"Apache-2.0"
] | 95 | 2019-05-29T13:04:12.000Z | 2022-03-11T20:38:13.000Z | docs/conf.py | tbotnz/ntc-rosetta | fac7086c460a2c68c769879930b74c05ed89b1f4 | [
"Apache-2.0"
] | 35 | 2019-05-30T03:58:34.000Z | 2021-03-03T15:30:05.000Z | docs/conf.py | tbotnz/ntc-rosetta | fac7086c460a2c68c769879930b74c05ed89b1f4 | [
"Apache-2.0"
] | 28 | 2019-05-29T19:32:26.000Z | 2021-04-05T09:49:30.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# ntc_rosetta documentation build configuration file, created by
# sphinx-quickstart on Sun Nov 19 10:41:40 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
... | 30.772222 | 83 | 0.672143 |
f7755a56d92ab07735fa5ddb1e9b8c106dd518bf | 750 | py | Python | openslides/urls.py | boehlke/OpenSlides | 7a64fb83ebda2cb41706f62d7cfc5a63dbcab4a2 | [
"MIT"
] | null | null | null | openslides/urls.py | boehlke/OpenSlides | 7a64fb83ebda2cb41706f62d7cfc5a63dbcab4a2 | [
"MIT"
] | null | null | null | openslides/urls.py | boehlke/OpenSlides | 7a64fb83ebda2cb41706f62d7cfc5a63dbcab4a2 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls import include, url
from openslides.mediafiles.views import protected_serve
from openslides.utils.rest_api import router
from .core import views as core_views
urlpatterns = [
# URLs for /media/
url(
r"^%s(?P<path>.*)$" % settings.MEDIA_URL.lstri... | 30 | 73 | 0.672 |
174270168e0b5c9eba8dd1341856c5422abaa482 | 4,420 | py | Python | Course_2/Week_02/Zhiyuan_dijkstra.py | KnightZhang625/Stanford_Algorithm | 7dacbbfa50e7b0e8380cf500df24af60cb9f42df | [
"Apache-2.0"
] | null | null | null | Course_2/Week_02/Zhiyuan_dijkstra.py | KnightZhang625/Stanford_Algorithm | 7dacbbfa50e7b0e8380cf500df24af60cb9f42df | [
"Apache-2.0"
] | 1 | 2020-07-16T08:03:22.000Z | 2020-07-16T08:09:34.000Z | Course_2/Week_02/Zhiyuan_dijkstra.py | KnightZhang625/Stanford_Algorithm | 7dacbbfa50e7b0e8380cf500df24af60cb9f42df | [
"Apache-2.0"
] | null | null | null | class Edge:
def __init__(self,inputList):
self.destination = inputList[0]-1
self.length = inputList[1]
class Vertex:
def __init__(self,inputString):
self.edges = []
for i in inputString.split('\t')[1:-1]:
self.edges.append(Edge(list(map(int,i.split(',')))))
... | 35.079365 | 117 | 0.518552 |
2fb6119303fdcac3a5e11808b159d4cf261a15f6 | 997 | py | Python | rdftools/datagen/lubm_seed_propagation.py | cosminbasca/rdftools | 5a9516e1a3bb52cbfc61ec546795a3b73fd82f48 | [
"Apache-2.0"
] | 4 | 2015-11-18T18:44:59.000Z | 2021-05-04T18:35:11.000Z | rdftools/datagen/lubm_seed_propagation.py | cosminbasca/rdftools | 5a9516e1a3bb52cbfc61ec546795a3b73fd82f48 | [
"Apache-2.0"
] | 1 | 2015-09-17T11:52:45.000Z | 2015-09-17T11:52:45.000Z | rdftools/datagen/lubm_seed_propagation.py | cosminbasca/rdftools | 5a9516e1a3bb52cbfc61ec546795a3b73fd82f48 | [
"Apache-2.0"
] | 2 | 2015-07-13T15:44:26.000Z | 2015-11-16T21:23:04.000Z | #
# author: Cosmin Basca
#
# Copyright 2010 University of Zurich
#
# 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 a... | 32.16129 | 75 | 0.752257 |
17a751cbaf0b8fc82679abbc5de62d448768cd34 | 457 | py | Python | profiles/tests/test_models.py | JaveBychkov/dmitriy-shop | 71856b0c9dff375e5491b001790807b3c7b01ae8 | [
"MIT"
] | null | null | null | profiles/tests/test_models.py | JaveBychkov/dmitriy-shop | 71856b0c9dff375e5491b001790807b3c7b01ae8 | [
"MIT"
] | null | null | null | profiles/tests/test_models.py | JaveBychkov/dmitriy-shop | 71856b0c9dff375e5491b001790807b3c7b01ae8 | [
"MIT"
] | null | null | null | import pytest
from profiles.models import User
@pytest.mark.django_db
def test_address_creation_for_user():
u = User.objects.create_user('User1', 'user@user.com', 'somepass')
assert hasattr(u, 'address')
@pytest.mark.django_db
def test_user_has_address_method():
u = User.objects.create_user('User1', 'u... | 24.052632 | 70 | 0.722101 |
93a918f6b6fbf8c66c8fd037a115ad501bcc8231 | 6,396 | py | Python | deploy/server.py | jiangxiaolin/tatk | 856cf23f33bcf51e27a096d89d2d838ced8fd444 | [
"Apache-2.0"
] | 2 | 2020-09-05T13:12:44.000Z | 2020-10-12T16:51:16.000Z | deploy/server.py | KellyHuang63/tatk | 2f58e245e48f281db8ffad4e73441d01a787edb4 | [
"Apache-2.0"
] | null | null | null | deploy/server.py | KellyHuang63/tatk | 2f58e245e48f281db8ffad4e73441d01a787edb4 | [
"Apache-2.0"
] | 1 | 2019-11-25T15:34:33.000Z | 2019-11-25T15:34:33.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
"""
import json
import copy
from deploy.ctrl import ModuleCtrl, SessionCtrl
from deploy.utils import DeployError
class ServerCtrl(object):
def __init__(self, **kwargs):
self.net_conf = copy.deepcopy(kwargs['net'])
self.module_conf = {
... | 42.078947 | 123 | 0.573014 |
cec4aaa91c55325428ff083c93ee6167355b8a32 | 11,211 | py | Python | PaddleCV/PaddleDetection/tools/infer.py | Qinyinmm/models | 83d4799028eba4568e7c193ded297d1dfc3279a3 | [
"Apache-2.0"
] | 1 | 2021-09-08T13:27:19.000Z | 2021-09-08T13:27:19.000Z | PaddleCV/PaddleDetection/tools/infer.py | Qinyinmm/models | 83d4799028eba4568e7c193ded297d1dfc3279a3 | [
"Apache-2.0"
] | null | null | null | PaddleCV/PaddleDetection/tools/infer.py | Qinyinmm/models | 83d4799028eba4568e7c193ded297d1dfc3279a3 | [
"Apache-2.0"
] | 1 | 2021-07-29T06:43:01.000Z | 2021-07-29T06:43:01.000Z | # Copyright (c) 2019 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... | 35.034375 | 80 | 0.637677 |
8f405704b9511b08195bab41ea027abdd167ecd4 | 12,908 | py | Python | scripts/startup/tila_OP_action_center.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | 2 | 2020-04-16T22:12:40.000Z | 2022-01-22T17:18:45.000Z | scripts/startup/tila_OP_action_center.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | null | null | null | scripts/startup/tila_OP_action_center.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | 2 | 2019-05-16T04:01:09.000Z | 2020-08-25T11:42:26.000Z | import bpy
class TILA_action_center(bpy.types.Operator):
bl_idname = "view3d.tila_action_center"
bl_label = "Set action center"
bl_options = {'REGISTER', 'UNDO'}
action_center : bpy.props.StringProperty(name="Action Center", default='AUTO')
context : bpy.props.StringProperty(name="context", defau... | 57.368889 | 160 | 0.618686 |
e719064f52acebdcf4d038a4a38c891c31f4bab2 | 799 | py | Python | deploy/virenv/lib/python2.7/site-packages/ptrace/syscall/linux_constants.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | deploy/virenv/lib/python2.7/site-packages/ptrace/syscall/linux_constants.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | deploy/virenv/lib/python2.7/site-packages/ptrace/syscall/linux_constants.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | from ptrace.syscall.posix_constants import SYSCALL_ARG_DICT
SIGSET_SIZE = 64
FD_SETSIZE = 1024
RLIMIT_RESOURCE = {
0: "RLIMIT_CPU",
1: "RLIMIT_FSIZE",
2: "RLIMIT_DATA",
3: "RLIMIT_STACK",
4: "RLIMIT_CORE",
5: "RLIMIT_RSS",
6: "RLIMIT_NPROC",
7: "RLIMIT_NOFILE",
8: "RLIMIT_... | 23.5 | 70 | 0.638298 |
58f85321a9f1cb511fb9129a41ffbfdf080752e6 | 18,369 | py | Python | readthedocs/builds/models.py | fiennyangeln/readthedocs.org | 0c547f47fb9dffbeb17e4e9ccf205a10caf31189 | [
"MIT"
] | null | null | null | readthedocs/builds/models.py | fiennyangeln/readthedocs.org | 0c547f47fb9dffbeb17e4e9ccf205a10caf31189 | [
"MIT"
] | null | null | null | readthedocs/builds/models.py | fiennyangeln/readthedocs.org | 0c547f47fb9dffbeb17e4e9ccf205a10caf31189 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Models for the builds app."""
from __future__ import (
absolute_import, division, print_function, unicode_literals)
import logging
import os.path
import re
from builtins import object
from shutil import rmtree
from django.conf import settings
from django.core.urlresolvers import revers... | 34.855787 | 81 | 0.616691 |
af279eaa5b87d9374cc3c6874af484e93bb1a618 | 11,062 | py | Python | mlmodels/model_tf/26_lstm_residual.py | gitter-badger/mlmodels | f08cc9b6ec202d4ad25ecdda2f44487da387569d | [
"MIT"
] | 1 | 2022-03-11T07:57:48.000Z | 2022-03-11T07:57:48.000Z | mlmodels/model_tf/26_lstm_residual.py | whitetiger1002/mlmodels | f70f1da7434e8855eed50adc67b49cc169f2ea24 | [
"MIT"
] | null | null | null | mlmodels/model_tf/26_lstm_residual.py | whitetiger1002/mlmodels | f70f1da7434e8855eed50adc67b49cc169f2ea24 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import copy
from datetime import datetime, timedelta
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import tensorflow as tf
from sklearn.preprocessing import MinMaxScaler
sns.set()
# In[9]:
class Model:
def __init_... | 34.461059 | 100 | 0.612095 |
d92f4603329dd70c1f2a2ebebb5913eaa96f4c0c | 323 | py | Python | website/addons/osfstorage/settings/defaults.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | null | null | null | website/addons/osfstorage/settings/defaults.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | 1 | 2019-08-16T13:45:12.000Z | 2019-08-16T13:45:12.000Z | website/addons/osfstorage/settings/defaults.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
import os
from website import settings
REVISIONS_PAGE_SIZE = 10
WATERBUTLER_CREDENTIALS = {
'storage': {}
}
WATERBUTLER_SETTINGS = {
'storage': {
'provider': 'filesystem',
'folder': os.path.join(settings.BASE_PATH, 'osfstoragecache'),
}
}
WATERBUTLER_RESOURCE = 'fold... | 15.380952 | 70 | 0.665635 |
adcd756ae83bee17a6650cae89e8f72589257cf1 | 3,831 | py | Python | caffe2/python/docs/github.py | gautamkmr/caffe2 | cde7f21d1e34ec714bc08dbfab945a1ad30e92ff | [
"MIT"
] | 40 | 2017-09-03T13:23:42.000Z | 2021-02-03T23:59:28.000Z | caffe2/python/docs/github.py | gautamkmr/caffe2 | cde7f21d1e34ec714bc08dbfab945a1ad30e92ff | [
"MIT"
] | 1 | 2017-12-15T09:49:26.000Z | 2018-01-21T10:54:36.000Z | caffe2/python/docs/github.py | gautamkmr/caffe2 | cde7f21d1e34ec714bc08dbfab945a1ad30e92ff | [
"MIT"
] | 6 | 2017-09-01T22:12:44.000Z | 2018-10-12T13:14:25.000Z | ## @package github
# Module caffe2.python.docs.github
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from caffe2.python.docs.formatter import Markdown
from caffe2.python.docs.generator import OpDocGenerator, DocUploade... | 32.466102 | 83 | 0.632211 |
988d44ef8493210a41a5bfbbfe2ed6375f50c3c3 | 156 | py | Python | 003.py | souza-joao/cursoemvideo-python3 | b9f747d1083c1c779630b25b321b291d76611901 | [
"MIT"
] | null | null | null | 003.py | souza-joao/cursoemvideo-python3 | b9f747d1083c1c779630b25b321b291d76611901 | [
"MIT"
] | null | null | null | 003.py | souza-joao/cursoemvideo-python3 | b9f747d1083c1c779630b25b321b291d76611901 | [
"MIT"
] | null | null | null | n1 = int(input('digite um número:'))
n2 = int(input('digite outro número, por gentileza:'))
s = n1 + n2
print('a soma ente {} e {} é {}'.format(n1, n2, s))
| 31.2 | 54 | 0.608974 |
f695b3562f8c03a741a26ae596cd8c80ecf40862 | 2,515 | py | Python | ITER_KER_GER/_compare_ray/_iter_from_ray's_laptop/her/ger_learning_method.py | Ray006/iter_improvement | 569090075ba2469ffaca8cbee89885c9bcaea82f | [
"MIT"
] | null | null | null | ITER_KER_GER/_compare_ray/_iter_from_ray's_laptop/her/ger_learning_method.py | Ray006/iter_improvement | 569090075ba2469ffaca8cbee89885c9bcaea82f | [
"MIT"
] | null | null | null | ITER_KER_GER/_compare_ray/_iter_from_ray's_laptop/her/ger_learning_method.py | Ray006/iter_improvement | 569090075ba2469ffaca8cbee89885c9bcaea82f | [
"MIT"
] | null | null | null | import numpy as np
from gym.envs.robotics import rotations as r_tool
from numpy.linalg import inv
from ipdb import set_trace
import math
from math import pi,cos,sin,acos
class ger_learning:
def __init__(self,env_name=None,err_distance = 0.05):
self.err_distance = err_distance
self.env_name = env_n... | 37.537313 | 168 | 0.55666 |
e9976f43cf41646081e75a5d5feec357e7221caf | 9,159 | py | Python | .venv/lib/python3.8/site-packages/numpy/f2py/func2subr.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | .venv/lib/python3.8/site-packages/numpy/f2py/func2subr.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | bot/lib/python3.7/site-packages/numpy/f2py/func2subr.py | carlosrh18/DavinciBot | d73a6b7f68d7bab25d134d3f85c6b63a86c206c5 | [
"MIT"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | #!/usr/bin/env python3
"""
Rules for building C/API module with f2py2e.
Copyright 1999,2000 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RI... | 30.734899 | 81 | 0.516541 |
6b4c357a4051063dcdc70caf34527eca60e55eb8 | 3,980 | py | Python | recipes/Python/577989_Yahoo_Stock_Information/recipe-577989.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/577989_Yahoo_Stock_Information/recipe-577989.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/577989_Yahoo_Stock_Information/recipe-577989.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | #!/usr/bin/env python
#
# Copyright (c) 2007-2008, Corey Goldberg (corey@goldb.org)
#
# license: GNU LGPL
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of t... | 41.458333 | 85 | 0.615829 |
a4a323ef21f2cdd17bcf39dc30dfba9ae59eb61b | 1,378 | py | Python | config.py | tudev/HackPack | 5bde2864b21174ee1a70cf7245d8cf95796ebc3c | [
"MIT"
] | 2 | 2018-01-30T01:13:02.000Z | 2018-11-19T20:37:53.000Z | config.py | tudev/HackPack | 5bde2864b21174ee1a70cf7245d8cf95796ebc3c | [
"MIT"
] | null | null | null | config.py | tudev/HackPack | 5bde2864b21174ee1a70cf7245d8cf95796ebc3c | [
"MIT"
] | null | null | null | '''
config.py
Configuration module for the server
'''
import os
basedir = os.path.abspath(os.path.dirname(__file__))
from uuid import uuid5, NAMESPACE_DNS
from socket import gethostname
class Config:
def __init__(self):
pass
CLIENT_ID = uuid5(NAMESPACE_DNS, gethostname())
VERSION = "1.0... | 27.019608 | 66 | 0.634978 |
814d68783a98126a48a7084913eabb89c98ae4d1 | 170 | py | Python | sktime/datasets/__init__.py | TonyBagnall/sktime | 837a77026be3e53511c3d6139ddad14a39351bf5 | [
"BSD-3-Clause"
] | 2 | 2019-08-19T13:59:21.000Z | 2020-03-02T20:32:31.000Z | sktime/datasets/__init__.py | TonyBagnall/boss_fork | 837a77026be3e53511c3d6139ddad14a39351bf5 | [
"BSD-3-Clause"
] | null | null | null | sktime/datasets/__init__.py | TonyBagnall/boss_fork | 837a77026be3e53511c3d6139ddad14a39351bf5 | [
"BSD-3-Clause"
] | 2 | 2019-08-24T12:06:15.000Z | 2020-01-09T07:32:40.000Z | from .base import load_gunpoint
from .base import load_gunpoint_dataframe
from .base import load_italy_power_demand_dataframe
from .base import load_arrow_head_dataframe
| 34 | 51 | 0.882353 |
55a1b595eed8e2ca4e2fd450846d303eecee6ffb | 2,527 | py | Python | notas/models.py | shiminasai/cafodca | c7935a5daa3e0cff5a1de4b43ef24c227fbf7104 | [
"MIT"
] | null | null | null | notas/models.py | shiminasai/cafodca | c7935a5daa3e0cff5a1de4b43ef24c227fbf7104 | [
"MIT"
] | null | null | null | notas/models.py | shiminasai/cafodca | c7935a5daa3e0cff5a1de4b43ef24c227fbf7104 | [
"MIT"
] | 1 | 2018-08-30T15:17:52.000Z | 2018-08-30T15:17:52.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
from contrapartes.models import *
from foros.models import *
from django.template.defaultfilters import slugify
# from south.modelsinspector imp... | 34.148649 | 84 | 0.71112 |
4bf3d23d634a28d85c0b0f30bca2fcb9437a439a | 2,198 | py | Python | djsani/bin/get_insurance.py | carthagecollege/django-djsani | ad95158f443c9d4e0cd0cea2a99ebe7062d38ce5 | [
"BSD-3-Clause"
] | 1 | 2017-04-22T11:08:41.000Z | 2017-04-22T11:08:41.000Z | djsani/bin/get_insurance.py | carthagecollege/django-djsani | ad95158f443c9d4e0cd0cea2a99ebe7062d38ce5 | [
"BSD-3-Clause"
] | 10 | 2020-06-11T14:22:47.000Z | 2021-07-08T14:05:27.000Z | djsani/bin/get_insurance.py | carthagecollege/django-djsani | ad95158f443c9d4e0cd0cea2a99ebe7062d38ce5 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os, sys
# env
sys.path.append('/usr/lib/python2.7/dist-packages/')
sys.path.append('/usr/lib/python2.7/')
sys.path.append('/usr/local/lib/python2.7/dist-packages/')
sys.path.append('/data2/django_1.7/')
sys.path.append('/data2/django_projects/')
sys.path.append('/data2/django_third/')
os... | 22.895833 | 66 | 0.655596 |
44c4ba18d8f8fd969f0f5a3de342da014040ef7b | 1,944 | py | Python | modules/wifi.py | Bonn18/ghost | 7e9d91014887f02696bb61e232d378ccd19cb2d5 | [
"MIT"
] | 9 | 2020-09-18T19:44:52.000Z | 2021-05-01T10:00:21.000Z | modules/wifi.py | Bonn18/ghost | 7e9d91014887f02696bb61e232d378ccd19cb2d5 | [
"MIT"
] | 1 | 2021-09-11T06:07:31.000Z | 2021-09-11T06:07:31.000Z | modules/wifi.py | Bonn18/ghost | 7e9d91014887f02696bb61e232d378ccd19cb2d5 | [
"MIT"
] | 2 | 2020-12-27T15:51:50.000Z | 2021-03-17T10:43:28.000Z | #!/usr/bin/env python3
#
# MIT License
#
# Copyright (c) 2020 EntySec
#
# 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 limitation the rights
# to use,... | 36 | 82 | 0.649691 |
a29db9f745561b397b6aab374b4d90bcb4efa761 | 12,841 | py | Python | common/gaussian_moments.py | dpmlanonymous/dpml-benchmark | 4cbc2daf1561a39fae501ab99759077f8d480fd1 | [
"MIT"
] | null | null | null | common/gaussian_moments.py | dpmlanonymous/dpml-benchmark | 4cbc2daf1561a39fae501ab99759077f8d480fd1 | [
"MIT"
] | null | null | null | common/gaussian_moments.py | dpmlanonymous/dpml-benchmark | 4cbc2daf1561a39fae501ab99759077f8d480fd1 | [
"MIT"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 32.508861 | 97 | 0.664045 |
54c03d193ee0796078fc6f99fb3a1015e1980c6f | 561 | py | Python | all_py_stuff/megasecret/demo.py | yoko1998/cpp-code-guidelines | 9209b1b9f3818d9e2d8c4aadd7041c3a6168695c | [
"Unlicense"
] | 2 | 2019-11-01T16:00:30.000Z | 2021-02-22T11:47:09.000Z | all_py_stuff/megasecret/demo.py | yoko1998/cpp-modernize-guidelines | 9209b1b9f3818d9e2d8c4aadd7041c3a6168695c | [
"Unlicense"
] | null | null | null | all_py_stuff/megasecret/demo.py | yoko1998/cpp-modernize-guidelines | 9209b1b9f3818d9e2d8c4aadd7041c3a6168695c | [
"Unlicense"
] | null | null | null | def generate_secret(yourname: str) -> str:
"""Generates very secret password based on your name
Args:
yourname (str): user name
Returns:
str: secret password
"""
return "secret" + yourname
def generate_hello() -> str:
"""Generates hello from the binary depth
Returns:
... | 20.035714 | 56 | 0.616756 |
e6d337cba3a492e62aa3d165ecdb3507acb760aa | 996 | py | Python | tests/test_config.py | spelletie/openVulnQuery | 9b1d2d51f7d5290bc9e58c9ac435e5804d11fa08 | [
"MIT"
] | 17 | 2020-12-01T20:14:15.000Z | 2022-02-06T02:47:06.000Z | tests/test_config.py | spelletie/openVulnQuery | 9b1d2d51f7d5290bc9e58c9ac435e5804d11fa08 | [
"MIT"
] | 7 | 2020-12-13T17:56:18.000Z | 2022-01-11T19:29:52.000Z | tests/test_config.py | spelletie/openVulnQuery | 9b1d2d51f7d5290bc9e58c9ac435e5804d11fa08 | [
"MIT"
] | 5 | 2020-11-17T16:25:09.000Z | 2021-11-05T11:41:23.000Z | """Note: Suggested as pre-commit hook, to block credentials being published."""
import os
import unittest
from openVulnQuery import config
CLIENT_ID = ''
CLIENT_ID_DUMMY = 'BadCodedBadCodedBadCoded'
CLIENT_SECRET_DUMMY = 'DeadFaceDeadFaceDeadFace'
CLIENT_SECRET = ''
REQUEST_TOKEN_URL = "https://cloudsso.cisco.com/as... | 31.125 | 79 | 0.720884 |
4409334361e10e166aee22b7b2e8c3338de41eeb | 5,168 | py | Python | common/sync_package.py | d-smirnov/tlcpack | c1f3bd68c2722a32396668441c551a4bd2ab4fcf | [
"Apache-2.0"
] | null | null | null | common/sync_package.py | d-smirnov/tlcpack | c1f3bd68c2722a32396668441c551a4bd2ab4fcf | [
"Apache-2.0"
] | null | null | null | common/sync_package.py | d-smirnov/tlcpack | c1f3bd68c2722a32396668441c551a4bd2ab4fcf | [
"Apache-2.0"
] | null | null | null | """ Synchronize name and the tvm version """
import os
import re
import subprocess
import argparse
# Modify the following two settings during release
# -----------------------------------------------------------
# Tag used for stable build.
# We need to use a tag after v0.7 to enable windows build
# switch to a stabl... | 34 | 102 | 0.542957 |
af8c0929884feb103fa22717e0ffeede40d31c33 | 1,305 | py | Python | train_utils/vocab_utils.py | GarrettMerz/CipherGAN | ea85bd2f901727de92c84a1df5cb08ab24dd741d | [
"MIT"
] | null | null | null | train_utils/vocab_utils.py | GarrettMerz/CipherGAN | ea85bd2f901727de92c84a1df5cb08ab24dd741d | [
"MIT"
] | null | null | null | train_utils/vocab_utils.py | GarrettMerz/CipherGAN | ea85bd2f901727de92c84a1df5cb08ab24dd741d | [
"MIT"
] | null | null | null | import codecs
import os
import re
import numpy as np
import tensorflow as tf
FLAGS = tf.compat.v1.app.flags.FLAGS
def read_vocab(filename):
vocab = dict()
filepath = os.path.join(FLAGS.data_dir, filename)
with tf.compat.v1.gfile.FastGFile(filepath) as vocab_file:
for line in vocab_file:
match = re.s... | 28.369565 | 76 | 0.665134 |
6d0c8e97aff31a0df5e13051451d0917550863c9 | 184 | py | Python | Python/python_study_5/page5/script.py | zharmedia386/Progate-Course-Repo | 0dec6bd2d5594b1624251a74f6ebcf8266c449ba | [
"MIT"
] | null | null | null | Python/python_study_5/page5/script.py | zharmedia386/Progate-Course-Repo | 0dec6bd2d5594b1624251a74f6ebcf8266c449ba | [
"MIT"
] | null | null | null | Python/python_study_5/page5/script.py | zharmedia386/Progate-Course-Repo | 0dec6bd2d5594b1624251a74f6ebcf8266c449ba | [
"MIT"
] | null | null | null | from food import Food
from drink import Drink
food1 = Food('Sandwich', 5)
food1.calorie_count = 330
# Call the info method from food1 and output the return value
print(food1.info())
| 20.444444 | 61 | 0.76087 |
b424f7984762f30018be1e92c56df92ee435e4ca | 30,248 | py | Python | tensorflow/python/distribute/mirrored_strategy.py | freewind2016/tensorflow | 84d6b43f5fc72c9ac5eb0fc95b91b23f532a2738 | [
"Apache-2.0"
] | 3 | 2021-07-07T12:34:59.000Z | 2022-03-02T14:56:00.000Z | tensorflow/python/distribute/mirrored_strategy.py | freewind2016/tensorflow | 84d6b43f5fc72c9ac5eb0fc95b91b23f532a2738 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:12:24.000Z | 2022-02-10T02:04:13.000Z | tensorflow/python/distribute/mirrored_strategy.py | freewind2016/tensorflow | 84d6b43f5fc72c9ac5eb0fc95b91b23f532a2738 | [
"Apache-2.0"
] | 1 | 2020-07-27T14:19:28.000Z | 2020-07-27T14:19:28.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.116711 | 105 | 0.702493 |
a8e0207f7bd319d33d73a2e0a594606ad0b50a32 | 2,817 | py | Python | ssg/build_cpe.py | kishorkunal-raj/content | c2029dc02cedd83ada1fbb9bd97d10e137b51a26 | [
"BSD-3-Clause"
] | 3 | 2015-08-08T06:54:03.000Z | 2019-03-25T02:37:54.000Z | ssg/build_cpe.py | kishorkunal-raj/content | c2029dc02cedd83ada1fbb9bd97d10e137b51a26 | [
"BSD-3-Clause"
] | 1 | 2020-10-14T17:31:39.000Z | 2020-10-14T17:31:39.000Z | ssg/build_cpe.py | kishorkunal-raj/content | c2029dc02cedd83ada1fbb9bd97d10e137b51a26 | [
"BSD-3-Clause"
] | 1 | 2020-10-12T19:15:34.000Z | 2020-10-12T19:15:34.000Z | """
Common functions for building CPEs
"""
from __future__ import absolute_import
from __future__ import print_function
def extract_subelement(objects, sub_elem_type):
"""
From a collection of element objects, return the value of
the first attribute of name sub_elem_type found.
This is useful when t... | 32.755814 | 79 | 0.682641 |
6fa7802cdb9670934d0f9a390ec5c2b0a535889e | 592 | py | Python | rpython/jit/backend/arm/test/test_send.py | olliemath/pypy | 8b873bd0b8bf76075aba3d915c260789f26f5788 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | rpython/jit/backend/arm/test/test_send.py | olliemath/pypy | 8b873bd0b8bf76075aba3d915c260789f26f5788 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | rpython/jit/backend/arm/test/test_send.py | olliemath/pypy | 8b873bd0b8bf76075aba3d915c260789f26f5788 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null |
import py
from rpython.jit.metainterp.test.test_send import SendTests
from rpython.jit.backend.arm.test.support import JitARMMixin
from rpython.rlib import jit
class TestSend(JitARMMixin, SendTests):
# for the individual tests see
# ====> ../../../metainterp/test/test_send.py
def test_call_with_additional... | 29.6 | 60 | 0.635135 |
4b9a403be9a57e0da702e92f2b9504fea25424ad | 2,062 | py | Python | vulcan/_student.py | Majroch/vulcan-api | 4448eeb64d2481b5deb643bcb32f2c9ee04463f5 | [
"MIT"
] | null | null | null | vulcan/_student.py | Majroch/vulcan-api | 4448eeb64d2481b5deb643bcb32f2c9ee04463f5 | [
"MIT"
] | null | null | null | vulcan/_student.py | Majroch/vulcan-api | 4448eeb64d2481b5deb643bcb32f2c9ee04463f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from aenum import Enum, unique
from related import IntegerField, immutable, StringField, ChildField, to_model
from ._class import Class
from ._period import Period
from ._school import School
@unique
class Gender(Enum):
"""Studen gender"""
WOMAN = 0
MAN = 1
@immutable
class St... | 30.323529 | 78 | 0.646945 |
d79519fc562a4a4bea1cf4a6ab26fff4641664ca | 750 | py | Python | import2md.py | lnds/import2md | 514f5ad1b1a0628f3d31ad42dbb0ee323af4710f | [
"MIT"
] | 1 | 2019-12-24T03:55:03.000Z | 2019-12-24T03:55:03.000Z | import2md.py | lnds/import2md | 514f5ad1b1a0628f3d31ad42dbb0ee323af4710f | [
"MIT"
] | null | null | null | import2md.py | lnds/import2md | 514f5ad1b1a0628f3d31ad42dbb0ee323af4710f | [
"MIT"
] | null | null | null | import argparse
import urllib.request
import urllib.parse
import html2text
import os.path
parser = argparse.ArgumentParser()
parser.add_argument("url")
parser.add_argument("md_name")
parser.add_argument("output_dir")
args = parser.parse_args()
with urllib.request.urlopen(args.url) as response:
content = response... | 25 | 54 | 0.729333 |
e30a726430d5610c7e626015a69a7e6a4c022f43 | 1,852 | py | Python | app/auth/forms.py | nifadyev/flask-microblog | 384a79a05572567969650f49dc476184c3666dd0 | [
"MIT"
] | 1 | 2020-09-09T20:50:15.000Z | 2020-09-09T20:50:15.000Z | app/auth/forms.py | nifadyev/flask-microblog | 384a79a05572567969650f49dc476184c3666dd0 | [
"MIT"
] | null | null | null | app/auth/forms.py | nifadyev/flask-microblog | 384a79a05572567969650f49dc476184c3666dd0 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField
from wtforms.validators import ValidationError, DataRequired, Email, EqualTo
from flask_babel import _, lazy_gettext as _l
from app.models import User
class LoginForm(FlaskForm):
username = StringFiel... | 42.090909 | 81 | 0.698164 |
46877600be65798ed3c664b529fd56d0bc753c9b | 7,574 | py | Python | api-ref/source/conf.py | cloud-zuiwanyuan/nova | 0b59a2d9dc22e4fb172810019dba5ece09bb4526 | [
"Apache-2.0"
] | 1 | 2019-07-29T10:30:24.000Z | 2019-07-29T10:30:24.000Z | api-ref/source/conf.py | cloud-zuiwanyuan/nova | 0b59a2d9dc22e4fb172810019dba5ece09bb4526 | [
"Apache-2.0"
] | 1 | 2016-04-04T18:41:59.000Z | 2016-04-04T18:41:59.000Z | api-ref/source/conf.py | cloud-zuiwanyuan/nova | 0b59a2d9dc22e4fb172810019dba5ece09bb4526 | [
"Apache-2.0"
] | 2 | 2015-12-04T23:51:46.000Z | 2016-06-07T20:01:59.000Z | # -*- coding: utf-8 -*-
#
# 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, softwa... | 32.646552 | 79 | 0.713494 |
e702a7058c244a9848617d3c47204b1a9ddae531 | 44,708 | py | Python | yolov5/utils/datasets.py | jario-jin/yolov5-on-nvidia-jetson | c4aaada7429f74987bb3c7aeb7a3b0da2d2cdcb6 | [
"MIT"
] | 3 | 2021-08-23T03:24:35.000Z | 2021-11-30T06:47:53.000Z | yolov5/utils/datasets.py | jario-jin/yolov5-on-nvidia-jetson | c4aaada7429f74987bb3c7aeb7a3b0da2d2cdcb6 | [
"MIT"
] | 1 | 2021-09-09T07:53:50.000Z | 2021-09-12T19:09:05.000Z | yolov5/utils/datasets.py | jario-jin/yolov5-on-nvidia-jetson | c4aaada7429f74987bb3c7aeb7a3b0da2d2cdcb6 | [
"MIT"
] | null | null | null | # Dataset utils and dataloaders
import glob
import logging
import math
import os
import random
import shutil
import time
from itertools import repeat
from multiprocessing.pool import ThreadPool
from pathlib import Path
from threading import Thread
import cv2
import numpy as np
import torch
import torch.nn.functional ... | 41.822264 | 120 | 0.540082 |
7aef9479bfc42b93e31055fd6a20dfda0ff2f6dd | 774 | py | Python | app/app.py | JRedeker/flask-postgres-boiler | 930e3e60f84a629c4159425de2a7d7fe8a07b561 | [
"MIT"
] | 2 | 2018-01-24T18:23:08.000Z | 2018-01-24T18:57:53.000Z | app/app.py | JRedeker/flask-postgres-boiler | 930e3e60f84a629c4159425de2a7d7fe8a07b561 | [
"MIT"
] | 1 | 2018-01-24T19:26:34.000Z | 2018-01-24T19:26:34.000Z | app/app.py | JRedeker/flask-postgres-boiler | 930e3e60f84a629c4159425de2a7d7fe8a07b561 | [
"MIT"
] | 1 | 2018-01-24T18:23:08.000Z | 2018-01-24T18:23:08.000Z | from database import db
from flask import Flask
from module_one.views import module_one
from module_two.views import module_two
def create_app():
# create the application object and configure
app = Flask(__name__)
app.config.from_pyfile('configure.py')
with app.app_context():
db.init_app(app)
... | 24.967742 | 57 | 0.684755 |
f9cc24fa2b41aa8382974de3a98156cec9b79c93 | 4,298 | py | Python | Step.py | Forkxz/Running-Robot | b2bb25f15423762bc06a6483f0ee1ecae4e93813 | [
"MIT"
] | 2 | 2020-12-30T15:26:10.000Z | 2021-04-21T15:37:45.000Z | Step.py | Forkxz/Running-Robot | b2bb25f15423762bc06a6483f0ee1ecae4e93813 | [
"MIT"
] | null | null | null | Step.py | Forkxz/Running-Robot | b2bb25f15423762bc06a6483f0ee1ecae4e93813 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import time
from Color_define import *
from Landmine import getAreaMaxContour1
# from Robot_control import action_append,action_list
from CMDcontrol import action_append,action_list
def step(Chest):
while True:
org_img_copy = np.rot90(Chest.imgs)
border = cv2.copyMakeB... | 40.933333 | 142 | 0.500465 |
c40f98876566b7c1094a16d45c190d3f3ca941cc | 1,433 | py | Python | network_scanner.py | menuscreen/PythonEthicalHacking | ebd132b9d6d1f75a1edf2365efbe12c161d0f152 | [
"Apache-2.0"
] | null | null | null | network_scanner.py | menuscreen/PythonEthicalHacking | ebd132b9d6d1f75a1edf2365efbe12c161d0f152 | [
"Apache-2.0"
] | null | null | null | network_scanner.py | menuscreen/PythonEthicalHacking | ebd132b9d6d1f75a1edf2365efbe12c161d0f152 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# network_scanner.py - run with cmd line args
# Goal -> Discover clients on same network
# steps: Create arp request directed to broadcast MAC asking for ip
# Send packet and receive response
# Parse the response
# Print the result
import scapy.all as scapy
import argparse
... | 31.844444 | 99 | 0.664341 |
02e28dc71113cba1c5ebcc9265a485d6cda3ed6f | 513 | py | Python | shardingpy/optimizer/factory.py | hongfuli/sharding-py | a26a64aa9d9196c830e7e2fa4095a58bef608a40 | [
"Apache-2.0"
] | 1 | 2021-01-29T13:29:29.000Z | 2021-01-29T13:29:29.000Z | shardingpy/optimizer/factory.py | hongfuli/sharding-py | a26a64aa9d9196c830e7e2fa4095a58bef608a40 | [
"Apache-2.0"
] | null | null | null | shardingpy/optimizer/factory.py | hongfuli/sharding-py | a26a64aa9d9196c830e7e2fa4095a58bef608a40 | [
"Apache-2.0"
] | null | null | null | from shardingpy.optimizer.insert_optimizer import InsertOptimizeEngine
from shardingpy.optimizer.query_optimizer import QueryOptimizeEngine
from shardingpy.parsing.parser.sql.dml.insert import InsertStatement
def get_optimizer(sharding_rule, sql_statement, parameters, generated_key):
if isinstance(sql_statement, ... | 51.3 | 92 | 0.853801 |
9b9b65b9bd9d3f567864a89232ae73e6bb2752ea | 6,169 | py | Python | src/bobcat_miner/api.py | aidanmelen/bobcat_miner | 5ce85e17e93332a126db0a196c29b01433dc90d4 | [
"Apache-2.0"
] | 6 | 2022-01-06T05:50:14.000Z | 2022-03-25T09:41:34.000Z | src/bobcat_miner/api.py | aidanmelen/bobcat_miner | 5ce85e17e93332a126db0a196c29b01433dc90d4 | [
"Apache-2.0"
] | 9 | 2022-01-19T03:16:33.000Z | 2022-02-20T20:37:56.000Z | src/bobcat_miner/api.py | aidanmelen/bobcat_miner | 5ce85e17e93332a126db0a196c29b01433dc90d4 | [
"Apache-2.0"
] | 3 | 2022-01-06T05:50:00.000Z | 2022-02-15T16:24:58.000Z | from __future__ import annotations
from typing import List
from requests import Response
import json
import time
try:
from connection import BobcatConnection
except:
from .connection import BobcatConnection
try:
from constants import *
except:
from .constants import *
class BobcatAPI(BobcatConnectio... | 31.798969 | 100 | 0.555682 |
fe4f23dd0db6149db3b1bbb676d591da6493faab | 670 | py | Python | python/sklearnserver/sklearnserver/__init__.py | pvaneck/kserve | 5ba63e74eadd66797b6681fcefd89d7e2462ffac | [
"Apache-2.0"
] | null | null | null | python/sklearnserver/sklearnserver/__init__.py | pvaneck/kserve | 5ba63e74eadd66797b6681fcefd89d7e2462ffac | [
"Apache-2.0"
] | 635 | 2021-01-29T07:06:06.000Z | 2022-03-31T09:09:20.000Z | python/sklearnserver/sklearnserver/__init__.py | pvaneck/kserve | 5ba63e74eadd66797b6681fcefd89d7e2462ffac | [
"Apache-2.0"
] | 4 | 2021-02-15T23:02:53.000Z | 2022-01-27T22:54:16.000Z | # Copyright 2019 kubeflow.org.
#
# 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,... | 39.411765 | 74 | 0.780597 |
1d98a55b9fb91f1167debd761638e79c3595b08c | 2,412 | py | Python | src/git_conventional_version/versioning/conventional.py | atudomain/git-conventional-version | 37de40b05ace5b9f1e320866b9abe828323d17ef | [
"MIT"
] | null | null | null | src/git_conventional_version/versioning/conventional.py | atudomain/git-conventional-version | 37de40b05ace5b9f1e320866b9abe828323d17ef | [
"MIT"
] | null | null | null | src/git_conventional_version/versioning/conventional.py | atudomain/git-conventional-version | 37de40b05ace5b9f1e320866b9abe828323d17ef | [
"MIT"
] | null | null | null | from typing import List
from git_conventional_version.versioning.versions import Version
from git import Repo
from git.exc import GitCommandError
import re
class Conventional:
"""Handles incrementing versions based on commit messages.
"""
major_patterns = [r"breaking change:"]
minor_patterns = [r"^fea... | 31.736842 | 72 | 0.577114 |
52a57cec39383fd720da1de7cfc6e05c81d29b03 | 3,366 | py | Python | setup.py | tddschn/Easy-Graph | 2cdecbde0b67a0c106e2bcf82d13c6fcd0b4c5d8 | [
"BSD-3-Clause"
] | 1 | 2022-03-19T11:29:42.000Z | 2022-03-19T11:29:42.000Z | setup.py | tddschn/Easy-Graph | 2cdecbde0b67a0c106e2bcf82d13c6fcd0b4c5d8 | [
"BSD-3-Clause"
] | null | null | null | setup.py | tddschn/Easy-Graph | 2cdecbde0b67a0c106e2bcf82d13c6fcd0b4c5d8 | [
"BSD-3-Clause"
] | null | null | null | import setuptools
import io
import platform
with open("README.rst", "r") as fh:
long_description = fh.read()
sources = [
'easygraph/classes/GraphC/Graph.cpp',
'easygraph/classes/GraphC/GraphEdge.cpp',
'easygraph/classes/GraphC/GraphEdges.cpp',
'easygraph/classes/GraphC/GraphEdgesIter.cpp',
'ea... | 44.289474 | 77 | 0.47148 |
69e3937459eb6918ec469d51d1b032d4a9562a1d | 5,632 | py | Python | app/main/routes.py | INASIC/AnnotateChange | 91b804c59adf1bd26700b3aa541603f7c2506da3 | [
"MIT"
] | 13 | 2020-07-14T05:51:13.000Z | 2021-12-26T12:01:51.000Z | app/main/routes.py | INASIC/AnnotateChange | 91b804c59adf1bd26700b3aa541603f7c2506da3 | [
"MIT"
] | 2 | 2020-12-04T21:15:55.000Z | 2021-02-18T22:24:32.000Z | app/main/routes.py | INASIC/AnnotateChange | 91b804c59adf1bd26700b3aa541603f7c2506da3 | [
"MIT"
] | 10 | 2020-11-30T17:21:14.000Z | 2022-02-09T23:11:49.000Z | # -*- coding: utf-8 -*-
# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk>
# License: See LICENSE file
# Copyright: 2020 (c) The Alan Turing Institute
import datetime
import logging
from flask import render_template, flash, url_for, redirect, request
from flask_login import current_user
from app import db
fro... | 33.927711 | 152 | 0.641513 |
583cd37cd70dd07a518457ab7a53901b11efc52f | 1,726 | py | Python | src/z3c/dav/exceptions/browser.py | mkerrin/z3c.dav | 5f6c44d3307bd1fafed61b17e3fa7b6d60dd80f3 | [
"ZPL-2.1"
] | 1 | 2017-09-22T06:07:23.000Z | 2017-09-22T06:07:23.000Z | src/z3c/dav/exceptions/browser.py | mkerrin/z3c.dav | 5f6c44d3307bd1fafed61b17e3fa7b6d60dd80f3 | [
"ZPL-2.1"
] | null | null | null | src/z3c/dav/exceptions/browser.py | mkerrin/z3c.dav | 5f6c44d3307bd1fafed61b17e3fa7b6d60dd80f3 | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2006 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 33.843137 | 78 | 0.68482 |
003dc05bd5662f8b9c80df331e32743834a01363 | 322 | py | Python | manage.py | krishnasagar14/Project | d3e5595e8572fd5d701f0a4aa051377b13967179 | [
"MIT"
] | null | null | null | manage.py | krishnasagar14/Project | d3e5595e8572fd5d701f0a4aa051377b13967179 | [
"MIT"
] | null | null | null | manage.py | krishnasagar14/Project | d3e5595e8572fd5d701f0a4aa051377b13967179 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
#import Project.settings
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Project.settings")
#DJANGO_SETTINGS_MODULE = Project.settings
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv... | 24.769231 | 71 | 0.779503 |
90bcb06a01cacde5633b0e8fcd33761a92b819c7 | 3,753 | py | Python | ckanext/cloudstorage/plugin/__init__.py | EnviDat/ckanext-cloudstorage | f205024f64cbee231d48386534e18b25416c8fc0 | [
"MIT"
] | null | null | null | ckanext/cloudstorage/plugin/__init__.py | EnviDat/ckanext-cloudstorage | f205024f64cbee231d48386534e18b25416c8fc0 | [
"MIT"
] | null | null | null | ckanext/cloudstorage/plugin/__init__.py | EnviDat/ckanext-cloudstorage | f205024f64cbee231d48386534e18b25416c8fc0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os.path
from ckan import plugins
from ckanext.cloudstorage.logic.action import get_actions
from ckanext.cloudstorage.logic.auth import get_auth_functions
from ckanext.cloudstorage import storage
from ckanext.cloudstorage import helpers
if plugins.toolkit.check_ckan_version("2.9"):
... | 32.353448 | 86 | 0.66267 |
6abce07a07922b25030dc00a3492627636864239 | 350 | py | Python | setup.py | softdevteam/zhang-shasha | cdd84d8e9f311418f02b9841ba4e7dd69bc60793 | [
"BSD-3-Clause"
] | 1 | 2018-10-30T05:01:30.000Z | 2018-10-30T05:01:30.000Z | setup.py | bauerca/zhang-shasha | 138c9914520ddac69c8d4a3bfd41f4ab2ca323ce | [
"BSD-3-Clause"
] | null | null | null | setup.py | bauerca/zhang-shasha | 138c9914520ddac69c8d4a3bfd41f4ab2ca323ce | [
"BSD-3-Clause"
] | null | null | null | from distutils.core import setup
import zss
setup(name='zss',
version=zss.__version__,
description='Tree edit distance using the Zhang Shasha algorithm',
author='Tim Henderson',
author_email='tim.tadh@gmail.com',
url='https://www.github.com/timtadh/zss',
packages=['zss'],
req... | 25 | 72 | 0.662857 |
6e71a5d5e996def631dd23a5bdb575c9ada4d235 | 1,034 | py | Python | tests/test_twist.py | audy/sars-cov-2 | ab473951dce10d0dba0d87854cf76cde4e74cb53 | [
"MIT"
] | 18 | 2020-03-30T14:59:38.000Z | 2022-01-19T19:03:17.000Z | tests/test_twist.py | audy/sars-cov-2 | ab473951dce10d0dba0d87854cf76cde4e74cb53 | [
"MIT"
] | 17 | 2020-03-20T17:56:56.000Z | 2022-03-03T20:51:41.000Z | tests/test_twist.py | audy/sars-cov-2 | ab473951dce10d0dba0d87854cf76cde4e74cb53 | [
"MIT"
] | 3 | 2020-04-09T03:39:47.000Z | 2021-11-09T06:43:28.000Z | import pandas as pd
def test_twist_truth_data(tmp_path, run_call_variants_illumina, read_vcf_as_dataframe):
"""Tests insert of N snps"""
# Run pipeline on simulated data
run_call_variants_illumina(
input_filename=(
"/repo/data/twist-target-capture/RNA_control_spike_in_10_6_100k_reads.f... | 35.655172 | 91 | 0.629594 |
4737898506f5819ce32bb28f8c106072ef6dff11 | 2,838 | py | Python | utils/reader.py | ParikhKadam/pyrwr | 89bafcfb598e861af1ef8ba970a86e068b1777c6 | [
"MIT"
] | 78 | 2018-08-19T02:34:31.000Z | 2022-03-18T05:59:59.000Z | utils/reader.py | ParikhKadam/pyrwr | 89bafcfb598e861af1ef8ba970a86e068b1777c6 | [
"MIT"
] | 9 | 2019-07-18T03:29:24.000Z | 2022-01-03T06:52:23.000Z | utils/reader.py | ParikhKadam/pyrwr | 89bafcfb598e861af1ef8ba970a86e068b1777c6 | [
"MIT"
] | 17 | 2018-08-19T02:34:34.000Z | 2021-12-21T02:55:49.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from scipy.sparse import csr_matrix, find
def read_directed_graph(X, weighted):
rows = X[:, 0]
cols = X[:, 1]
data = X[:, 2]
# assume id starts from 0
n = int(np.amax(X[:, 0:2])) + 1
# the weights of redundant edges will be su... | 25.115044 | 97 | 0.566596 |
aaa2c24d6dc5b83b94d475ee630f5ff34df7c54e | 2,921 | py | Python | migrations/versions/3962b9d4c342_.py | MaryamMuchai/Pitch-World | 1747a3fa20aeaace397d188d656e4fbe74d70b62 | [
"MIT"
] | null | null | null | migrations/versions/3962b9d4c342_.py | MaryamMuchai/Pitch-World | 1747a3fa20aeaace397d188d656e4fbe74d70b62 | [
"MIT"
] | null | null | null | migrations/versions/3962b9d4c342_.py | MaryamMuchai/Pitch-World | 1747a3fa20aeaace397d188d656e4fbe74d70b62 | [
"MIT"
] | 1 | 2021-08-19T06:07:23.000Z | 2021-08-19T06:07:23.000Z | """empty message
Revision ID: 3962b9d4c342
Revises:
Create Date: 2021-05-03 12:10:22.689521
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3962b9d4c342'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 36.5125 | 87 | 0.662787 |
deedc6834b7579fb2208cc0f65bcbb455a6aeca8 | 3,017 | py | Python | pygrim/formulas/halphen_constant.py | mezzarobba/fungrim | 01866a19882d44420e01383165dbb0a9f97680da | [
"MIT"
] | 102 | 2019-03-15T19:57:55.000Z | 2022-03-04T06:56:18.000Z | pygrim/formulas/halphen_constant.py | mezzarobba/fungrim | 01866a19882d44420e01383165dbb0a9f97680da | [
"MIT"
] | 26 | 2019-03-15T03:17:26.000Z | 2022-02-21T17:46:50.000Z | pygrim/formulas/halphen_constant.py | mezzarobba/fungrim | 01866a19882d44420e01383165dbb0a9f97680da | [
"MIT"
] | 12 | 2019-03-15T01:59:04.000Z | 2022-02-24T14:53:35.000Z | # -*- coding: utf-8 -*-
from ..expr import *
def_Topic(
Title("Halphen's constant"),
Section("Definitions"),
Entries(
"6161c7",
),
Section("Numerical value"),
Entries(
"e2bfdb",
"f5e0b0",
"d0993b",
),
Section("Approximation theory"),
Entries(
... | 32.793478 | 124 | 0.634736 |
88f9a2a6bcfbfcd022b6ccf31d4563c605cc8b56 | 12,248 | py | Python | sib_api_v3_sdk/models/update_smtp_template.py | parth115/APIv3-python-library | cba7cb905d8b2206ee51b051eee63bbe3fb68522 | [
"MIT"
] | null | null | null | sib_api_v3_sdk/models/update_smtp_template.py | parth115/APIv3-python-library | cba7cb905d8b2206ee51b051eee63bbe3fb68522 | [
"MIT"
] | null | null | null | sib_api_v3_sdk/models/update_smtp_template.py | parth115/APIv3-python-library | cba7cb905d8b2206ee51b051eee63bbe3fb68522 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
SendinBlue API
SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at h... | 33.373297 | 820 | 0.609977 |
bb069f082aaeedd8d88ff5f529e4a647c7be6eec | 7,361 | py | Python | nova/db/sqlalchemy/migrate_repo/versions/296_add_missing_db2_fkeys.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | null | null | null | nova/db/sqlalchemy/migrate_repo/versions/296_add_missing_db2_fkeys.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | null | null | null | nova/db/sqlalchemy/migrate_repo/versions/296_add_missing_db2_fkeys.py | bopopescu/nova-token | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | [
"Apache-2.0"
] | 2 | 2017-07-20T17:31:34.000Z | 2020-07-24T02:42:19.000Z | begin_unit
comment|'# Copyright 2014 IBM Corp.'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may'
nl|'\n'
comment|'# not use this file except in compliance with the License. You may obtain'
nl|'\n'
comment|'# a copy of the License at'
nl|'\n'
commen... | 13.631481 | 88 | 0.601413 |
cc4b886c11b1cce3a095b388bdd2c75498d3ad83 | 4,609 | py | Python | api/views/wiki_api.py | cusele/DB_OPS | f666bc56844cb6985937314190508ed393ce2171 | [
"Apache-2.0"
] | null | null | null | api/views/wiki_api.py | cusele/DB_OPS | f666bc56844cb6985937314190508ed393ce2171 | [
"Apache-2.0"
] | null | null | null | api/views/wiki_api.py | cusele/DB_OPS | f666bc56844cb6985937314190508ed393ce2171 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# _#_ coding:utf-8 _*_
from rest_framework import viewsets,permissions
from api.serializers import TagSerializer,CategorySerializer,PostSerializer
from wiki.models import Category,Tag,Post
from rest_framework import status
from rest_framework.response import Response
from rest_framework.decorat... | 40.787611 | 79 | 0.697765 |
e6cb048e14569b834a24f9b2391dcda6310cf04f | 13,129 | py | Python | tests/generator/test_compression.py | jjm2473/chia-blockchain | c1846b0f49136e36fb4433e056270a40a56bf171 | [
"Apache-2.0"
] | 3 | 2021-04-29T03:18:20.000Z | 2021-07-24T00:00:53.000Z | tests/generator/test_compression.py | jjm2473/chia-blockchain | c1846b0f49136e36fb4433e056270a40a56bf171 | [
"Apache-2.0"
] | 1 | 2021-05-02T23:05:03.000Z | 2021-05-04T07:49:16.000Z | tests/generator/test_compression.py | jjm2473/chia-blockchain | c1846b0f49136e36fb4433e056270a40a56bf171 | [
"Apache-2.0"
] | 1 | 2021-05-12T18:15:24.000Z | 2021-05-12T18:15:24.000Z | # flake8: noqa: F501
from dataclasses import dataclass
from typing import List, Any
from unittest import TestCase
from chia.full_node.bundle_tools import (
bundle_suitable_for_compression,
compressed_coin_solution_entry_list,
compressed_spend_bundle_solution,
match_standard_transaction_at_any_index,
... | 44.205387 | 792 | 0.739584 |
926b0309c33f857838fc3f44ba5278cba5e4f66f | 739 | py | Python | anvil/commands/clean_command.py | suraj-testing2/Crab_Floppy_Disk | 01f6f89426308904cc5eaf9f7ab64038f84ea191 | [
"ECL-2.0",
"Apache-2.0"
] | 27 | 2015-02-18T22:38:05.000Z | 2021-05-09T15:17:05.000Z | anvil/commands/clean_command.py | suraj-testing2/Crab_Floppy_Disk | 01f6f89426308904cc5eaf9f7ab64038f84ea191 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2015-05-17T22:42:13.000Z | 2017-05-01T18:31:48.000Z | anvil/commands/clean_command.py | suraj-testing2/Crab_Floppy_Disk | 01f6f89426308904cc5eaf9f7ab64038f84ea191 | [
"ECL-2.0",
"Apache-2.0"
] | 16 | 2015-05-06T20:28:06.000Z | 2021-10-13T22:27:21.000Z | # Copyright 2012 Google Inc. All Rights Reserved.
"""Cleans all build-* paths and caches.
Attempts to delete all paths the build system creates.
"""
__author__ = 'benvanik@google.com (Ben Vanik)'
import os
import shutil
import sys
import anvil.commands.util as commandutil
from anvil.manage import ManageCommand
c... | 23.09375 | 63 | 0.730717 |
44de0d0cdf7718abb08d1c1358ccbc523647f566 | 650 | py | Python | Program's_Contributed_By_Contributors/AI-Summer-Course/py-master/Basics/18_inheritance.py | SDGraph/Hacktoberfest2k21 | 8f8aead15afa10ea12e1b23ece515a10a882de28 | [
"MIT"
] | 4 | 2019-11-11T10:18:26.000Z | 2020-06-05T04:14:45.000Z | Program's_Contributed_By_Contributors/AI-Summer-Course/py-master/Basics/18_inheritance.py | SDGraph/Hacktoberfest2k21 | 8f8aead15afa10ea12e1b23ece515a10a882de28 | [
"MIT"
] | null | null | null | Program's_Contributed_By_Contributors/AI-Summer-Course/py-master/Basics/18_inheritance.py | SDGraph/Hacktoberfest2k21 | 8f8aead15afa10ea12e1b23ece515a10a882de28 | [
"MIT"
] | 1 | 2020-08-11T14:04:14.000Z | 2020-08-11T14:04:14.000Z | class Vehicle:
def general_usage(self):
print("general use: transporation")
class Car(Vehicle):
def __init__(self):
print("I'm car")
self.wheels = 4
self.has_roof = True
def specific_usage(self):
self.general_usage()
print("specific use: commute to work, vac... | 23.214286 | 68 | 0.623077 |
8010204430f3cf3544d5c5682566981efb31bc75 | 1,335 | py | Python | setup.py | lociii/django-macaddress | d5d3959ef98b1b30e4218d24336b7788bc7d8106 | [
"BSD-3-Clause"
] | null | null | null | setup.py | lociii/django-macaddress | d5d3959ef98b1b30e4218d24336b7788bc7d8106 | [
"BSD-3-Clause"
] | null | null | null | setup.py | lociii/django-macaddress | d5d3959ef98b1b30e4218d24336b7788bc7d8106 | [
"BSD-3-Clause"
] | null | null | null | import os
from setuptools import setup, find_packages
version = "1.7.0"
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-macaddress",
version=version,
url='http://github.com/tubaman/django-macaddress',
license='BSD',
description="MAC addr... | 33.375 | 70 | 0.63221 |
405975d83cbae829cc36cbc9816c0c53d8140e79 | 17,380 | py | Python | SearchService.py | ice871117/airbnb-python | c77ad42f27f259014021177ac759829b16c618cb | [
"WTFPL"
] | null | null | null | SearchService.py | ice871117/airbnb-python | c77ad42f27f259014021177ac759829b16c618cb | [
"WTFPL"
] | null | null | null | SearchService.py | ice871117/airbnb-python | c77ad42f27f259014021177ac759829b16c618cb | [
"WTFPL"
] | null | null | null | # coding=utf-8
"""
This Search service is for querying airbnb's room reservation information.
Before start it, you should first config through the config method.
The implementation of this service is airbnb's public api through api.
"""
import time
from airbnb.api import Api
from Utils import *
from Models import RoomI... | 42.082324 | 216 | 0.572785 |
57c4d355f1e082889ce33186caf377949c361d10 | 10,433 | py | Python | flexget/plugins/api/entry_list.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | 1 | 2018-05-02T21:14:50.000Z | 2018-05-02T21:14:50.000Z | flexget/plugins/api/entry_list.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/api/entry_list.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
import copy
import logging
from math import ceil
from flask import jsonify, request
from sqlalchemy.orm.exc import NoResultFound
import flexget.plugins.list.entry_list as el
f... | 38.498155 | 119 | 0.646027 |
1d62a84122289d128d0e2cbe6dd7cbb33350f229 | 1,501 | py | Python | branch/dto/branch_dto.py | Guya-LTD/branch | a6c7408d34c7e2c29de9f9528194f66f3be5efd1 | [
"RSA-MD"
] | null | null | null | branch/dto/branch_dto.py | Guya-LTD/branch | a6c7408d34c7e2c29de9f9528194f66f3be5efd1 | [
"RSA-MD"
] | null | null | null | branch/dto/branch_dto.py | Guya-LTD/branch | a6c7408d34c7e2c29de9f9528194f66f3be5efd1 | [
"RSA-MD"
] | null | null | null | # -*- coding: utf-8 -*-
"""Copyright Header Details
Copyright
---------
Copyright (C) Guya , PLC - All Rights Reserved (As Of Pending...)
Unauthorized copying of this file, via any medium is strictly prohibited
Proprietary and confidential
LICENSE
-------
This file is subject to the terms and conditi... | 24.606557 | 76 | 0.626249 |
f064e2adb50f6e7de81206f0fa13c18d3259e57d | 300 | py | Python | app.py | eit/jieba-web-service | 85810b411b1e99b94fcf9b0535da931e07130652 | [
"MIT"
] | null | null | null | app.py | eit/jieba-web-service | 85810b411b1e99b94fcf9b0535da931e07130652 | [
"MIT"
] | null | null | null | app.py | eit/jieba-web-service | 85810b411b1e99b94fcf9b0535da931e07130652 | [
"MIT"
] | null | null | null | # jieba app
import falcon
import seg
import tag
import pos
api = application = falcon.API()
api.req_options.auto_parse_form_urlencoded = True
seg = seg.Resource()
api.add_route('/jieba', seg)
tag = tag.Resource()
api.add_route('/jieba/tag', tag)
pos = pos.Resource()
api.add_route('/jieba/pos', pos)
| 21.428571 | 49 | 0.74 |
3086f5846290af735e408e820aed718b1b8c7043 | 2,950 | py | Python | src/mpui.py | genmeblog/twixtbot | eca001e6f2b3f0e7fd1760770e2ed0a9906c3ef6 | [
"MIT"
] | 5 | 2020-09-04T16:05:48.000Z | 2021-07-03T13:31:27.000Z | src/mpui.py | genmeblog/twixtbot | eca001e6f2b3f0e7fd1760770e2ed0a9906c3ef6 | [
"MIT"
] | 2 | 2021-03-08T09:46:02.000Z | 2021-03-08T14:50:36.000Z | src/mpui.py | BonyJordan/twixtbot | f0b8d10f444f46787cf4cd03f8d67fc68d1f9ddb | [
"MIT"
] | 2 | 2020-11-02T14:34:00.000Z | 2021-03-08T15:47:03.000Z | #! /usr/bin/env python
import math
import numpy
import matplotlib.pyplot as plt
import matplotlib.lines as lines
import matplotlib.patches as patches
import naf
import twixt
SIZE = twixt.Game.SIZE
CRAD = 0.3
def _link_coords(p1, p2):
dx = p2.x - p1.x
dy = p2.y - p1.y
n = math.hypot(dx, dy)
nx = CRAD ... | 26.106195 | 87 | 0.602373 |
d0ce8e10774f06684a12423c58a9ad6039da717d | 8,004 | py | Python | tests/test_cli.py | snmishra/flakeheaven | 20f94457744c47d965d4520d3b22def538b0cc49 | [
"MIT"
] | null | null | null | tests/test_cli.py | snmishra/flakeheaven | 20f94457744c47d965d4520d3b22def538b0cc49 | [
"MIT"
] | null | null | null | tests/test_cli.py | snmishra/flakeheaven | 20f94457744c47d965d4520d3b22def538b0cc49 | [
"MIT"
] | null | null | null | # built-in
import subprocess
import sys
from io import BytesIO
from pathlib import Path
from textwrap import dedent
from unittest.mock import Mock, patch
# external
import pytest
from flake8.utils import parse_unified_diff, stdin_get_value
# project
from flakeheaven._cli import main
# app
from .utils import chdir
... | 30.43346 | 109 | 0.615817 |
7bc27a73a55107a05af045b94c23f2d4fc249c6a | 11,616 | py | Python | odo/backends/aws.py | dan-coates/odo | ac8061b1853a53bfebafdfcf8314d2ba3ebb0413 | [
"BSD-3-Clause"
] | null | null | null | odo/backends/aws.py | dan-coates/odo | ac8061b1853a53bfebafdfcf8314d2ba3ebb0413 | [
"BSD-3-Clause"
] | null | null | null | odo/backends/aws.py | dan-coates/odo | ac8061b1853a53bfebafdfcf8314d2ba3ebb0413 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, division, absolute_import
import os
import uuid
import zlib
import re
from fnmatch import fnmatch
from contextlib import contextmanager
from collections import Iterator
from operator import attrgetter
from io import BytesIO
import pandas as pd
from toolz import memoize, first, c... | 35.741538 | 98 | 0.634298 |
b3352c769d3d1956cde53265854f5e3729d81678 | 75,362 | py | Python | Lib/html/entities.py | cemeyer/tauthon | 2c3328c5272cffa2a544542217181c5828afa7ed | [
"PSF-2.0"
] | 473 | 2017-02-03T04:03:02.000Z | 2022-02-12T17:44:25.000Z | Lib/html/entities.py | cemeyer/tauthon | 2c3328c5272cffa2a544542217181c5828afa7ed | [
"PSF-2.0"
] | 70 | 2017-02-02T21:20:07.000Z | 2022-02-04T15:32:45.000Z | Lib/html/entities.py | cemeyer/tauthon | 2c3328c5272cffa2a544542217181c5828afa7ed | [
"PSF-2.0"
] | 37 | 2017-02-11T21:02:34.000Z | 2020-11-16T10:51:45.000Z | """HTML character entity references."""
from __future__ import unicode_literals
__all__ = [b'html5', b'name2codepoint', b'codepoint2name', b'entitydefs']
# maps the HTML entity name to the Unicode code point
name2codepoint = {
'AElig': 0x00c6, # latin capital letter AE = latin capital ligature AE, U+00C6 ISOl... | 30.012744 | 110 | 0.501898 |
4438058ead011322bf35da4843e5557defe8b181 | 24,168 | py | Python | deepflash2/data.py | PuckWong/deepflash2 | fb91e16b5bb5144d10ac15f859644e3ff1a4d178 | [
"Apache-2.0"
] | null | null | null | deepflash2/data.py | PuckWong/deepflash2 | fb91e16b5bb5144d10ac15f859644e3ff1a4d178 | [
"Apache-2.0"
] | null | null | null | deepflash2/data.py | PuckWong/deepflash2 | fb91e16b5bb5144d10ac15f859644e3ff1a4d178 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/02_data.ipynb (unless otherwise specified).
__all__ = ['show', 'DeformationField', 'BaseDataset', 'RandomTileDataset', 'TileDataset']
# Cell
import os, zarr, cv2, imageio, shutil, numpy as np
from joblib import Parallel, delayed
from scipy import ndimage
from scipy.int... | 42.4 | 202 | 0.591691 |
332019d15d2b224303cf8078726d53cda4cc0c0a | 1,600 | py | Python | ldwl.py | guillochon/ldwl | 1922eec467e309525c99d49fa9888db2232953c8 | [
"MIT"
] | null | null | null | ldwl.py | guillochon/ldwl | 1922eec467e309525c99d49fa9888db2232953c8 | [
"MIT"
] | null | null | null | ldwl.py | guillochon/ldwl | 1922eec467e309525c99d49fa9888db2232953c8 | [
"MIT"
] | null | null | null | import inflect
import nltk
from pattern.en import conjugate
from tqdm import tqdm
from itertools import product
p = inflect.engine()
english = set(w.lower() for w in nltk.corpus.wordnet.words()) | set(
w.lower() for w in nltk.corpus.words.words())
tenses = ['past', 'infinitive', 'present', 'future']
persons = r... | 26.229508 | 68 | 0.59625 |
417c62cac96cac9e250ccd8b6d7165366ebfb33f | 2,368 | py | Python | unittests/components/test_position.py | MoyTW/7DRL2016_Rewrite | 99e092dcb8797a25caa3c8a989a574efae19e4d4 | [
"MIT"
] | 2 | 2020-05-10T02:16:28.000Z | 2021-04-05T21:54:10.000Z | unittests/components/test_position.py | MoyTW/7DRL2016_Rewrite | 99e092dcb8797a25caa3c8a989a574efae19e4d4 | [
"MIT"
] | null | null | null | unittests/components/test_position.py | MoyTW/7DRL2016_Rewrite | 99e092dcb8797a25caa3c8a989a574efae19e4d4 | [
"MIT"
] | null | null | null | import unittest
from dodge.constants import EventType, EventParam
from dodge.components.position import Position
from dodge.event import Event
from dodge.fov import FOVMap
from unittests.utils import EntityStub, LevelStub, EventStackStub
class TestPosition(unittest.TestCase):
def setUp(self):
fov_map = FO... | 43.851852 | 111 | 0.649493 |
fe15d658757056b420117d3040a3c2d86c9e3563 | 3,346 | py | Python | Path_finding_visualization using bfs/GUI.py | arymandeshwal/Path-Finding-Visualization | 9f79eb2b9cc9cf2e1515582a1bc71f5b4a657437 | [
"MIT"
] | 1 | 2020-06-30T15:13:14.000Z | 2020-06-30T15:13:14.000Z | Path_finding_visualization using bfs/GUI.py | arymandeshwal/Path-Finding-Visualization | 9f79eb2b9cc9cf2e1515582a1bc71f5b4a657437 | [
"MIT"
] | null | null | null | Path_finding_visualization using bfs/GUI.py | arymandeshwal/Path-Finding-Visualization | 9f79eb2b9cc9cf2e1515582a1bc71f5b4a657437 | [
"MIT"
] | null | null | null | import pygame
import sys
from bfs import *
#from AstarAlgo import *
pygame.init()
algo_choice = 0
#print("Choose algorithm to use:")
#try:
#algo_choice = int(input("[1] for BFS\n[2] for A* search(shortest distance)\n"))
#except:
#print("Incorrect value enter again!!")
#algo_choice = int(input("... | 24.970149 | 119 | 0.490436 |
d7769ecf5a988d091239b32501539f24f67c4351 | 28,334 | py | Python | twilio/rest/api/v2010/account/usage/record/all_time.py | Atharva2011/twilio-python | 5397b41e0a93fd85d5a39b584289910785e19cd1 | [
"MIT"
] | null | null | null | twilio/rest/api/v2010/account/usage/record/all_time.py | Atharva2011/twilio-python | 5397b41e0a93fd85d5a39b584289910785e19cd1 | [
"MIT"
] | null | null | null | twilio/rest/api/v2010/account/usage/record/all_time.py | Atharva2011/twilio-python | 5397b41e0a93fd85d5a39b584289910785e19cd1 | [
"MIT"
] | null | null | null | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import serialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import L... | 46.44918 | 121 | 0.690301 |
bcf9422955f353f8667fb9da73180d3107bb54f7 | 622 | py | Python | tracker/siamese_tracker.py | fredfung007/snlt | 5ce66f9f79808d39341dd3dfbab6a2c78e1c0425 | [
"Apache-2.0"
] | 8 | 2021-04-08T12:48:13.000Z | 2022-03-30T03:28:03.000Z | tracker/siamese_tracker.py | fredfung007/snlt | 5ce66f9f79808d39341dd3dfbab6a2c78e1c0425 | [
"Apache-2.0"
] | 11 | 2021-05-21T08:56:16.000Z | 2022-03-15T01:58:21.000Z | tracker/siamese_tracker.py | fredfung007/snlt | 5ce66f9f79808d39341dd3dfbab6a2c78e1c0425 | [
"Apache-2.0"
] | 3 | 2021-06-21T17:14:41.000Z | 2021-11-30T12:34:34.000Z | # COPYRIGHT 2021. Fred Fung. Boston University.
import abc
from typing import Any
import torch
from utils.logging import get_logger
class SiameseTracker(torch.nn.Module):
def __init__(self, cfg):
super(SiameseTracker, self).__init__()
self.cfg = cfg
self._logger = get_logger(__name__)
... | 20.064516 | 58 | 0.673633 |
5f934c2d9ddcf6a3375f32047266f970e0ad54a1 | 4,945 | py | Python | LUCE-API/luce_vm/luce_django/luce/lucehome/settings.py | maastrichtlawtech/webmon-extension | 74b0f449eac4417495e69bb3f6f711bdbebfb2fd | [
"MIT"
] | null | null | null | LUCE-API/luce_vm/luce_django/luce/lucehome/settings.py | maastrichtlawtech/webmon-extension | 74b0f449eac4417495e69bb3f6f711bdbebfb2fd | [
"MIT"
] | null | null | null | LUCE-API/luce_vm/luce_django/luce/lucehome/settings.py | maastrichtlawtech/webmon-extension | 74b0f449eac4417495e69bb3f6f711bdbebfb2fd | [
"MIT"
] | 1 | 2022-03-31T09:22:49.000Z | 2022-03-31T09:22:49.000Z | """
Django settings for lucehome project.
Generated by 'django-admin startproject' using Django 2.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
... | 27.17033 | 101 | 0.696057 |
8b1d2802c5025714463504a3c3bcfdb7d19e300d | 2,412 | py | Python | pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/cat9500/platform/get.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 94 | 2018-04-30T20:29:15.000Z | 2022-03-29T13:40:31.000Z | pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/cat9500/platform/get.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 67 | 2018-12-06T21:08:09.000Z | 2022-03-29T18:00:46.000Z | pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/cat9500/platform/get.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 49 | 2018-06-29T18:59:03.000Z | 2022-03-10T02:07:59.000Z | # Python
import logging
# Genie
from genie.metaparser.util.exceptions import SchemaEmptyParserError, SchemaMissingKeyError
# Logger
log = logging.getLogger(__name__)
def get_boot_variables(device, boot_var, output=None):
'''Get current or next-reload boot variables on the device
Args:
device... | 32.16 | 90 | 0.570896 |
6505b795aa6ab246b4e615fdfbc5634c6071532a | 2,521 | py | Python | bot.py | duckyquack/Changing-Discord-Status-Bot | 6a63b8e75acd22fbcbd16be9a81ac68b9f5bf2a5 | [
"MIT"
] | 1 | 2020-07-09T03:17:39.000Z | 2020-07-09T03:17:39.000Z | bot.py | duckyquack/Changing-Discord-Status-Bot | 6a63b8e75acd22fbcbd16be9a81ac68b9f5bf2a5 | [
"MIT"
] | null | null | null | bot.py | duckyquack/Changing-Discord-Status-Bot | 6a63b8e75acd22fbcbd16be9a81ac68b9f5bf2a5 | [
"MIT"
] | 5 | 2020-03-13T08:17:24.000Z | 2021-07-26T23:25:12.000Z | import discord
import asyncio
import iomanage
class bot(discord.Client):
def __init__(self):
super().__init__()
self.io = iomanage.IOManager("config.json")
d = self.io.Read()
if d == {} or d["token"] == "":
self.io.Write({"token": "", "status": "", "changeRate": 4, "ani... | 31.911392 | 109 | 0.495042 |
0a162a9dbf067f6dbe5215db41c1b8e2d3bbe07f | 5,131 | py | Python | fairness/metrics/SensitiveMetric.py | lurosenb/Swap_Auditor | 63f1ba22a1c834ad2cb961e5e25b9c3a36c12cec | [
"Apache-2.0"
] | null | null | null | fairness/metrics/SensitiveMetric.py | lurosenb/Swap_Auditor | 63f1ba22a1c834ad2cb961e5e25b9c3a36c12cec | [
"Apache-2.0"
] | null | null | null | fairness/metrics/SensitiveMetric.py | lurosenb/Swap_Auditor | 63f1ba22a1c834ad2cb961e5e25b9c3a36c12cec | [
"Apache-2.0"
] | 1 | 2022-03-15T06:10:26.000Z | 2022-03-15T06:10:26.000Z | from metrics.Average import Average
from metrics.Diff import Diff
from metrics.FilterSensitive import FilterSensitive
from metrics.Metric import Metric
from metrics.Ratio import Ratio
class SensitiveMetric(Metric):
"""
Takes the given metric and creates a version of it that is conditioned on a sensitive
... | 54.010526 | 101 | 0.698499 |
7bc8e1f829e130cdb7de363de6bcd7e211684b26 | 1,232 | py | Python | fairing/builders/dockerfile.py | jinchihe/fairing | 6da86a8cbc8a8764d045145afe9575a000ebc363 | [
"Apache-2.0"
] | 2 | 2019-06-27T18:17:06.000Z | 2019-08-14T12:29:32.000Z | fairing/builders/dockerfile.py | jinchihe/fairing | 6da86a8cbc8a8764d045145afe9575a000ebc363 | [
"Apache-2.0"
] | null | null | null | fairing/builders/dockerfile.py | jinchihe/fairing | 6da86a8cbc8a8764d045145afe9575a000ebc363 | [
"Apache-2.0"
] | 2 | 2020-05-05T01:09:22.000Z | 2021-02-10T11:18:39.000Z | from fairing.constants import constants
import logging
import tempfile
logger = logging.getLogger('fairing')
# TODO(@karthikv2k): Need to be refractored into a better template
def write_dockerfile(
docker_command=None,
destination=None,
path_prefix=constants.DEFAULT_DEST_PREFIX,
dockerf... | 37.333333 | 92 | 0.690747 |
c8a6481bec4efe7679970210f326a5ee87b5c4ed | 704 | py | Python | edera/consumers/basic.py | thoughteer/edera | c4ddb5d8a25906c3bd773c91afb3260fc0b704f2 | [
"MIT"
] | 3 | 2018-11-27T15:45:19.000Z | 2018-12-21T20:32:10.000Z | edera/consumers/basic.py | thoughteer/edera | c4ddb5d8a25906c3bd773c91afb3260fc0b704f2 | [
"MIT"
] | 18 | 2018-12-02T18:38:59.000Z | 2020-02-05T22:09:37.000Z | edera/consumers/basic.py | thoughteer/edera | c4ddb5d8a25906c3bd773c91afb3260fc0b704f2 | [
"MIT"
] | null | null | null | from edera.consumer import Consumer
from edera.exceptions import ConsumptionError
from edera.routine import deferrable
from edera.routine import routine
class BasicConsumer(Consumer):
"""
A basic consumer that simply applies a given function to each element.
"""
def __init__(self, handler):
"... | 28.16 | 86 | 0.653409 |
a08759b7ac07920576379933f3eb4b0514c1d103 | 4,734 | py | Python | tests/test_extractors.py | marcwebbie/spycis | fa0cbad966ee0c10fbc0160048db35913f7dfe2a | [
"WTFPL",
"Unlicense"
] | 7 | 2015-10-24T07:06:15.000Z | 2017-03-25T18:44:20.000Z | tests/test_extractors.py | marcwebbie/spycis | fa0cbad966ee0c10fbc0160048db35913f7dfe2a | [
"WTFPL",
"Unlicense"
] | 2 | 2021-03-25T21:43:19.000Z | 2021-03-31T18:33:12.000Z | tests/test_extractors.py | marcwebbie/spycis | fa0cbad966ee0c10fbc0160048db35913f7dfe2a | [
"WTFPL",
"Unlicense"
] | null | null | null | import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from spycis import extractors
class ExtractorsTests(unittest.TestCase):
def test_get_extractors_by_name(self):
from spycis.extractors import example
extractor = extractors.get_ext... | 31.771812 | 79 | 0.631812 |
f0ca9fc378100b7b5a8a341f51883c9273f826b5 | 3,835 | gyp | Python | binding.gyp | aeadigt/node-webrtc | 3e84e6157764aad35b0a04aa66f6c6e86ca00191 | [
"BSD-2-Clause"
] | 3 | 2018-02-22T18:06:56.000Z | 2021-08-28T12:49:27.000Z | binding.gyp | aeadigt/node-webrtc | 3e84e6157764aad35b0a04aa66f6c6e86ca00191 | [
"BSD-2-Clause"
] | null | null | null | binding.gyp | aeadigt/node-webrtc | 3e84e6157764aad35b0a04aa66f6c6e86ca00191 | [
"BSD-2-Clause"
] | 2 | 2017-08-16T08:15:01.000Z | 2018-03-27T00:07:30.000Z | {
'targets': [
{
'target_name': 'action_before_build',
'type': 'none',
'actions': [
{
'action_name': 'download_webrtc_libraries_and_headers',
'inputs': [],
'outputs': ['third_party/webrtc'],
'conditions': [
['OS=="win"', {
... | 25.230263 | 70 | 0.424772 |
51af8ee8ead532cca0998645ab86b2db0eb53305 | 3,418 | py | Python | packages/sdk/snet/sdk/mpe/payment_channel_provider.py | dhruvshettty/snet-cli | 2fa64b0c122dd2713714d1a37d3f0ef0d7d11b84 | [
"MIT"
] | 1 | 2021-02-16T17:03:54.000Z | 2021-02-16T17:03:54.000Z | packages/sdk/snet/sdk/mpe/payment_channel_provider.py | dhruvshettty/snet-cli | 2fa64b0c122dd2713714d1a37d3f0ef0d7d11b84 | [
"MIT"
] | null | null | null | packages/sdk/snet/sdk/mpe/payment_channel_provider.py | dhruvshettty/snet-cli | 2fa64b0c122dd2713714d1a37d3f0ef0d7d11b84 | [
"MIT"
] | 1 | 2021-01-15T11:08:35.000Z | 2021-01-15T11:08:35.000Z | import web3
from snet.sdk.mpe.mpe_contract import MPEContract
from snet.sdk.mpe.payment_channel import PaymentChannel
from snet.snet_cli.utils.utils import get_contract_deployment_block
BLOCKS_PER_BATCH = 20000
class PaymentChannelProvider(object):
def __init__(self, w3, payment_channel_state_service_client, m... | 50.264706 | 128 | 0.66062 |
747c1c2bb3b763c96529008a535454a94777ba2d | 597 | py | Python | cunqian.py | python1906l/Python1906team | 57ecd3ed378a4ccaf459b029e4aff51c0f64c8c7 | [
"Apache-2.0"
] | null | null | null | cunqian.py | python1906l/Python1906team | 57ecd3ed378a4ccaf459b029e4aff51c0f64c8c7 | [
"Apache-2.0"
] | null | null | null | cunqian.py | python1906l/Python1906team | 57ecd3ed378a4ccaf459b029e4aff51c0f64c8c7 | [
"Apache-2.0"
] | null | null | null | import csv
def cunqian():
print('------------存款功能-------------------')
no=input('卡号:')
pwd=input('密码:')
with open(r'lib.csv',mode='r') as rstream:
users=csv.reader(rstream)
for user in users:
no=user[0]
pwd=user[1]
money=user[2]
cun=i... | 19.258065 | 64 | 0.455611 |
bf01766461921f04b09be57b0abf13aca16a80b6 | 20,484 | py | Python | ma_gym/envs/combat/combat.py | mlii/ma-gym | 9391551fd4d347f98eee8e8200c85ef4e0f8949d | [
"Apache-2.0"
] | null | null | null | ma_gym/envs/combat/combat.py | mlii/ma-gym | 9391551fd4d347f98eee8e8200c85ef4e0f8949d | [
"Apache-2.0"
] | null | null | null | ma_gym/envs/combat/combat.py | mlii/ma-gym | 9391551fd4d347f98eee8e8200c85ef4e0f8949d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import copy
import logging
import random
import gym
import numpy as np
from gym import spaces
from gym.utils import seeding
from ..utils.action_space import MultiAgentActionSpace
from ..utils.observation_space import MultiAgentObservationSpace
from ..utils.draw import draw_grid, fill_cell, wr... | 43.306554 | 142 | 0.596319 |
832bb045f516f82ed49e178ff4bfe977fafe2418 | 3,913 | py | Python | scripts/initialize.py | mh6100/repy_v2 | 960a8887dd61281b4d49c2522727eda3453b038c | [
"MIT"
] | null | null | null | scripts/initialize.py | mh6100/repy_v2 | 960a8887dd61281b4d49c2522727eda3453b038c | [
"MIT"
] | null | null | null | scripts/initialize.py | mh6100/repy_v2 | 960a8887dd61281b4d49c2522727eda3453b038c | [
"MIT"
] | 10 | 2020-09-10T19:49:29.000Z | 2022-02-01T01:58:50.000Z | """
<Program>
initialize.py
<Started>
August 2014.
<Authors>
Albert Rafetseder
Chintan Choksi
<Purpose>
This script does a "git clone" of all the dependent repositories
of a Seattle component.
<Usage>
* Clone the repository you would like to build on your machine, e.g. using
"git clone htt... | 33.161017 | 114 | 0.705852 |
065db158eb43c23a6ac2856b00dfda7ddb4ae63c | 11,449 | py | Python | swig/python/gnm.py | VisualAwarenessTech/gdal-2.2.1 | 5ea1c6671d6f0f3b93e9e9bf2a71da618c834e8d | [
"Apache-2.0"
] | 2 | 2015-09-23T14:55:26.000Z | 2018-01-10T07:09:22.000Z | swig/python/gnm.py | VisualAwarenessTech/gdal-2.2.1 | 5ea1c6671d6f0f3b93e9e9bf2a71da618c834e8d | [
"Apache-2.0"
] | 7 | 2018-04-09T09:35:42.000Z | 2018-05-22T06:54:05.000Z | swig/python/gnm.py | VisualAwarenessTech/gdal-2.2.1 | 5ea1c6671d6f0f3b93e9e9bf2a71da618c834e8d | [
"Apache-2.0"
] | 5 | 2015-01-10T12:52:15.000Z | 2020-09-04T13:47:41.000Z | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path impo... | 41.183453 | 161 | 0.701983 |
fe479c74691afafa81c4c35f21095f72fbc02246 | 7,762 | py | Python | venv/lib/python3.9/site-packages/platformio/package/manager/core.py | janten/ESP32-Paxcounter | 212317f3800ec87aef4847e7d60971d4bb9e7d70 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.9/site-packages/platformio/package/manager/core.py | janten/ESP32-Paxcounter | 212317f3800ec87aef4847e7d60971d4bb9e7d70 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.9/site-packages/platformio/package/manager/core.py | janten/ESP32-Paxcounter | 212317f3800ec87aef4847e7d60971d4bb9e7d70 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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... | 32.07438 | 84 | 0.621618 |
fc2b0b0f1f0ba6ff953c8eff615ecaf74558df3d | 1,098 | py | Python | ems/migrations/0005_bitsian.py | abhi20161997/Oasis-17 | 80618af478beb256502bf1b6c05e0a22068577c9 | [
"BSD-3-Clause"
] | null | null | null | ems/migrations/0005_bitsian.py | abhi20161997/Oasis-17 | 80618af478beb256502bf1b6c05e0a22068577c9 | [
"BSD-3-Clause"
] | null | null | null | ems/migrations/0005_bitsian.py | abhi20161997/Oasis-17 | 80618af478beb256502bf1b6c05e0a22068577c9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-09-24 14:30
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ems', '0004_level_position'),
]
operations = [
migrations.CreateModel(
... | 39.214286 | 124 | 0.59745 |
c2d859c5f9a444197a6f695c5ba093cbfc2a0ae7 | 114 | py | Python | atcoder/abc/abc148_a.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | 1 | 2018-11-12T15:18:55.000Z | 2018-11-12T15:18:55.000Z | atcoder/abc/abc148_a.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | atcoder/abc/abc148_a.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | A = int(input())
B = int(input())
for i in range(1, 4):
if i != A and i != B:
print(i)
quit()
| 16.285714 | 25 | 0.438596 |
535ca2df442294c0d890585a4d76ec7055ceacb1 | 3,350 | py | Python | src/ui/library_player/playback/control_panel.py | temportalflux/MelodyBot | f5172a6895b8dc4ee89bf6327fd8663456390861 | [
"Apache-2.0"
] | null | null | null | src/ui/library_player/playback/control_panel.py | temportalflux/MelodyBot | f5172a6895b8dc4ee89bf6327fd8663456390861 | [
"Apache-2.0"
] | null | null | null | src/ui/library_player/playback/control_panel.py | temportalflux/MelodyBot | f5172a6895b8dc4ee89bf6327fd8663456390861 | [
"Apache-2.0"
] | null | null | null | import tkinter as tk
class ControlPanel():
def __init__(self, parent, logger):
self.logger = logger
self.backend = None
self.frame = tk.Frame(master=parent)
self.frame.pack(fill=tk.BOTH, expand=True)
self.create_track_labels(self.frame)
self.create_control_area(self.frame)
self.create_volume_bar(se... | 31.603774 | 129 | 0.736119 |
798bd1b30b0c5998adfc642811d99afdf27b941a | 1,292 | py | Python | Blender/Scripts/Lib/.ipynb_checkpoints/BlenderBridge-checkpoint.py | Zhaoc917/cg | 1ed7e145c466a1eb5b4361d7ee9846204236947d | [
"MIT"
] | 1 | 2019-12-06T04:00:03.000Z | 2019-12-06T04:00:03.000Z | Blender/Scripts/Lib/.ipynb_checkpoints/BlenderBridge-checkpoint.py | Zhaoc917/cg | 1ed7e145c466a1eb5b4361d7ee9846204236947d | [
"MIT"
] | 1 | 2019-12-14T06:09:59.000Z | 2019-12-14T06:26:30.000Z | Blender/Scripts/Lib/.ipynb_checkpoints/BlenderBridge-checkpoint.py | Zhaoc917/cg | 1ed7e145c466a1eb5b4361d7ee9846204236947d | [
"MIT"
] | 2 | 2020-01-05T10:42:56.000Z | 2020-03-31T05:10:42.000Z | import argparse
import os
import sys
import json
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from RenderClass import *
from ConfigClass import *
if __name__ == '__main__':
argv = sys.argv
argv = argv[argv.index('--') + 1:]
parser = argparse.ArgumentParser(description='Render')
# pars... | 39.151515 | 126 | 0.688854 |
4ea5579133a13b527177fa9872cbf50f6b35031c | 11,382 | py | Python | pyro/ops/rings.py | ludkinm/pyro | d24c808a9d86d79c43a99990fe9e418ce5976613 | [
"Apache-2.0"
] | null | null | null | pyro/ops/rings.py | ludkinm/pyro | d24c808a9d86d79c43a99990fe9e418ce5976613 | [
"Apache-2.0"
] | null | null | null | pyro/ops/rings.py | ludkinm/pyro | d24c808a9d86d79c43a99990fe9e418ce5976613 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import weakref
from abc import ABCMeta, abstractmethod
import torch
from pyro.ops.einsum import contract
from pyro.ops.einsum.adjoint import SAMPLE_SYMBOL, Backward
from pyro.util import ignore_jit_warnings
class Ring(object, m... | 35.021538 | 94 | 0.619399 |
a622e2141331a2b419fed150afa584574ea66e33 | 30,557 | py | Python | sqlacodegen/codegen.py | hvgab/sqlacodegen | a574d8c7bdea2a7a2593a5b5ba8507d1c0edc6ca | [
"MIT"
] | null | null | null | sqlacodegen/codegen.py | hvgab/sqlacodegen | a574d8c7bdea2a7a2593a5b5ba8507d1c0edc6ca | [
"MIT"
] | null | null | null | sqlacodegen/codegen.py | hvgab/sqlacodegen | a574d8c7bdea2a7a2593a5b5ba8507d1c0edc6ca | [
"MIT"
] | null | null | null | """Contains the code generation logic and helper functions."""
from __future__ import unicode_literals, division, print_function, absolute_import
import inspect
import re
import sys
from collections import defaultdict
from importlib import import_module
from inspect import ArgSpec
from keyword import iskeyword
import... | 44.478894 | 99 | 0.60608 |
469ac2f3b3c9d0d51cd4e5cae6f31bc01ff0df7d | 2,503 | py | Python | s3Scan.py | krlnwll/s3-scanner | 46072794ae82b1c9c9595036943be089d10cc650 | [
"MIT"
] | null | null | null | s3Scan.py | krlnwll/s3-scanner | 46072794ae82b1c9c9595036943be089d10cc650 | [
"MIT"
] | null | null | null | s3Scan.py | krlnwll/s3-scanner | 46072794ae82b1c9c9595036943be089d10cc650 | [
"MIT"
] | null | null | null | import boto3
import termcolor
# Create an S3 client
s3 = boto3.resource("s3")
s3_client = boto3.client("s3")
GROUPS_TO_CHECK = {
"http://acs.amazonaws.com/groups/global/AllUsers": "Everyone",
"http://acs.amazonaws.com/groups/global/AuthenticatedUsers": "Authenticated AWS users"
}
BUCKETS_TO_SKIP = {
}
... | 31.2875 | 90 | 0.629245 |
0c010768d4ec36939bcf248a456e35346742b7ea | 637 | py | Python | log-summarizer.py | kassner/log-summarizer | 16c673d3688716f103e0de6071dda2ca6d071254 | [
"Apache-2.0"
] | 1 | 2018-07-26T18:58:30.000Z | 2018-07-26T18:58:30.000Z | log-summarizer.py | kassner/log-summarizer | 16c673d3688716f103e0de6071dda2ca6d071254 | [
"Apache-2.0"
] | null | null | null | log-summarizer.py | kassner/log-summarizer | 16c673d3688716f103e0de6071dda2ca6d071254 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sys, os, apachelog, bandwidth, MySQLdb
p = apachelog.parser(r"%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"")
bwsum = bandwidth.Bandwidth()
for file in sys.argv[1:]:
print "Processing %s file" % file
for line in open(file):
try:
data = p.parse(li... | 27.695652 | 88 | 0.549451 |
500203a3a9340f73c1ae5575fb8c1cc9ce150c21 | 1,713 | py | Python | app/core/migrations/0001_initial.py | OldMan-3301/recipe-app-api | 2feddd961c93b03ff4f5f841f06a8293e8e92256 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | OldMan-3301/recipe-app-api | 2feddd961c93b03ff4f5f841f06a8293e8e92256 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | OldMan-3301/recipe-app-api | 2feddd961c93b03ff4f5f841f06a8293e8e92256 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.13 on 2022-04-13 06:39
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
... | 50.382353 | 266 | 0.639813 |
ea2fed7b3ab37d052d02dbb3290bf60bda10bb3b | 803 | py | Python | packages/micropython-official/v1.11/esp8266/stubs/math.py | TheVinhLuong102/micropy-stubs | 55ff1773008f7c4dfc3d70a403986486226eb6b3 | [
"MIT"
] | 18 | 2019-07-11T13:31:09.000Z | 2022-01-27T06:38:40.000Z | packages/micropython-official/v1.11/esp8266/stubs/math.py | TheVinhLuong102/micropy-stubs | 55ff1773008f7c4dfc3d70a403986486226eb6b3 | [
"MIT"
] | 9 | 2019-09-01T21:44:49.000Z | 2022-02-04T20:55:08.000Z | packages/micropython-official/v1.11/esp8266/stubs/math.py | TheVinhLuong102/micropy-stubs | 55ff1773008f7c4dfc3d70a403986486226eb6b3 | [
"MIT"
] | 6 | 2019-10-08T05:31:21.000Z | 2021-04-22T10:21:01.000Z | """
Module: 'math' on esp8266 v1.11
"""
# MCU: (sysname='esp8266', nodename='esp8266', release='2.2.0-dev(9422289)', version='v1.11-8-g48dcbbe60 on 2019-05-29', machine='ESP module with ESP8266')
# Stubber: 1.2.0
def acos():
pass
def asin():
pass
def atan():
pass
def atan2():
pass
def ceil():
pa... | 9.674699 | 155 | 0.559153 |
6f4c9a4d91ebbae339d3b261be1089ec0b9224f6 | 11,749 | py | Python | models.py | NeTeLead/punc | 16ba0aec5c5c3f2630f383bb720c7b05f83247ef | [
"MIT"
] | null | null | null | models.py | NeTeLead/punc | 16ba0aec5c5c3f2630f383bb720c7b05f83247ef | [
"MIT"
] | null | null | null | models.py | NeTeLead/punc | 16ba0aec5c5c3f2630f383bb720c7b05f83247ef | [
"MIT"
] | null | null | null | # coding: utf-8
import theano
import pickle
import os
import theano.tensor as T
import numpy as np
def PReLU(a, x):
return T.maximum(0.0, x) + a * T.minimum(0.0, x)
def ReLU(x):
return T.maximum(0.0, x)
def _get_shape(i, o, keepdims):
if (i == 1 or o == 1) and not keepdims:
return (max(i,o),)
... | 41.515901 | 148 | 0.623202 |
fad5aaf1a29d7e39678d39d09954aae011885a20 | 3,473 | py | Python | test/test_sankey_definition.py | guest-cc/floweaver | ee02a6fdd07ef7c9bfcf806b54a92efe713e2d78 | [
"MIT"
] | 342 | 2018-01-20T19:31:16.000Z | 2022-02-28T20:45:26.000Z | test/test_sankey_definition.py | guest-cc/floweaver | ee02a6fdd07ef7c9bfcf806b54a92efe713e2d78 | [
"MIT"
] | 108 | 2018-02-06T11:31:45.000Z | 2022-01-13T18:33:25.000Z | test/test_sankey_definition.py | guest-cc/floweaver | ee02a6fdd07ef7c9bfcf806b54a92efe713e2d78 | [
"MIT"
] | 86 | 2018-02-15T13:07:20.000Z | 2022-03-18T15:25:33.000Z | import pytest
from textwrap import dedent
from floweaver.sankey_definition import SankeyDefinition, Waypoint, ProcessGroup, Bundle
from floweaver.partition import Partition
from floweaver.ordering import Ordering
def test_sankey_definition():
nodes = {}
bundles = {}
ordering = Ordering([])
vd = Sank... | 26.51145 | 88 | 0.579326 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.