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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e65f4e0b4ec626358f179bd13aaec4faa3109855 | 995 | py | Python | core/migrations/0005_auto_20190726_2347.py | thiagomurtinho/djangoStudies | c17e922980f5f2944616fb6f6c7365f19ce07016 | [
"MIT"
] | null | null | null | core/migrations/0005_auto_20190726_2347.py | thiagomurtinho/djangoStudies | c17e922980f5f2944616fb6f6c7365f19ce07016 | [
"MIT"
] | null | null | null | core/migrations/0005_auto_20190726_2347.py | thiagomurtinho/djangoStudies | c17e922980f5f2944616fb6f6c7365f19ce07016 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-07-27 02:47
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0004_rotarymotion'),
]
operations = [
migrations.AlterField(
model_name='rotarymotion',... | 34.310345 | 141 | 0.61407 |
4ff53b809639ed126624d26aab8a5fed7dc71b97 | 2,011 | py | Python | ucsmsdk/mometa/mgmt/MgmtSwPersonalities.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 78 | 2015-11-30T14:10:05.000Z | 2022-02-13T00:29:08.000Z | ucsmsdk/mometa/mgmt/MgmtSwPersonalities.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 113 | 2015-11-20T09:42:46.000Z | 2022-03-16T16:53:29.000Z | ucsmsdk/mometa/mgmt/MgmtSwPersonalities.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 86 | 2015-12-12T08:22:18.000Z | 2022-01-23T03:56:34.000Z | """This module contains the general information for MgmtSwPersonalities ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class MgmtSwPersonalitiesConsts:
pass
class MgmtSwPersonalities(ManagedObject):
"""This is MgmtSw... | 46.767442 | 247 | 0.664346 |
806b477dac0de2416f1f2e68495076bbf833f450 | 4,110 | py | Python | frappe/core/page/permission_manager/permission_manager.py | nehasacher143/frappe | 2a2bdf722108b983f5116fe43ac6a5c4c290e01a | [
"MIT"
] | null | null | null | frappe/core/page/permission_manager/permission_manager.py | nehasacher143/frappe | 2a2bdf722108b983f5116fe43ac6a5c4c290e01a | [
"MIT"
] | null | null | null | frappe/core/page/permission_manager/permission_manager.py | nehasacher143/frappe | 2a2bdf722108b983f5116fe43ac6a5c4c290e01a | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
import frappe.defaults
from frappe.modules.import_file import get_file_path, read_doc_from_file
from frappe.translate import send_translations
f... | 33.414634 | 106 | 0.739416 |
de6039de046440d03e93f7b721848d8b9a466894 | 682 | py | Python | src/python/pants/backend/codegen/protobuf/python/register.py | jperkelens/pants | b7ad997b5ef9175cc5e22e36574d8590bc8da120 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/codegen/protobuf/python/register.py | jperkelens/pants | b7ad997b5ef9175cc5e22e36574d8590bc8da120 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/codegen/protobuf/python/register.py | jperkelens/pants | b7ad997b5ef9175cc5e22e36574d8590bc8da120 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
"""Generate Python sources from Protocol Buffers (Protobufs).
See https://www.pantsbuild.org/docs/protobuf.
"""
from pants.backend.codegen.protobuf.python import additional_fields
from p... | 32.47619 | 77 | 0.794721 |
73535e94db50f016b826f552c28c7cfba43258c2 | 15,089 | py | Python | test/test_optimize.py | odidev/cmdstanpy | 49f00baff21bfd11541b3c98a5f2fb36e6b7d9ce | [
"BSD-3-Clause"
] | null | null | null | test/test_optimize.py | odidev/cmdstanpy | 49f00baff21bfd11541b3c98a5f2fb36e6b7d9ce | [
"BSD-3-Clause"
] | null | null | null | test/test_optimize.py | odidev/cmdstanpy | 49f00baff21bfd11541b3c98a5f2fb36e6b7d9ce | [
"BSD-3-Clause"
] | null | null | null | """CmdStan method optimize tests"""
import json
import os
import unittest
import numpy as np
import pytest
from cmdstanpy.cmdstan_args import CmdStanArgs, OptimizeArgs
from cmdstanpy.model import CmdStanModel
from cmdstanpy.stanfit import CmdStanMLE, RunSet, from_csv
from cmdstanpy.utils import EXTENSION
HERE = os.... | 35.337237 | 80 | 0.562529 |
42dbae2d4162991975e727bcdaf299401a7b11c4 | 6,003 | py | Python | DEEPLEARNING/DL_VOXELNET/config.py | Hqss/DINK | 5fecaa65e2f9da48eb8ac38ef709aa555fca8766 | [
"BSD-3-Clause"
] | 189 | 2019-01-16T03:05:23.000Z | 2020-09-14T14:54:16.000Z | DEEPLEARNING/DL_VOXELNET/config.py | jtpils/DINK | 5f6b3eaba279126f79ae6607f965311002d7451c | [
"BSD-3-Clause"
] | 3 | 2019-02-11T06:20:15.000Z | 2020-04-05T07:03:53.000Z | DEEPLEARNING/DL_VOXELNET/config.py | jtpils/DINK | 5f6b3eaba279126f79ae6607f965311002d7451c | [
"BSD-3-Clause"
] | 25 | 2019-01-16T03:05:24.000Z | 2020-04-04T21:07:53.000Z | #!/usr/bin/env python
# -*- coding:UTF-8 -*-
# BSD 3-Clause License
#
# Copyright (c) 2019, FPAI
# Copyright (c) 2019, SeriouslyHAO
# Copyright (c) 2019, xcj2019
# Copyright (c) 2019, Leonfirst
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted ... | 29.140777 | 80 | 0.685824 |
99ed8832595af4b0f23b3ddbf2099176657d6043 | 9,387 | py | Python | tuir/oauth.py | c4pt0r/tuir | ba3435cca3e4e66c029230e523fa24b775378874 | [
"MIT"
] | null | null | null | tuir/oauth.py | c4pt0r/tuir | ba3435cca3e4e66c029230e523fa24b775378874 | [
"MIT"
] | null | null | null | tuir/oauth.py | c4pt0r/tuir | ba3435cca3e4e66c029230e523fa24b775378874 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import time
import uuid
import string
import codecs
import logging
import threading
# pylint: disable=import-error
from six.moves.urllib.parse import urlparse, parse_qs
from six.moves.BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
fr... | 37.548 | 78 | 0.601577 |
0911d4e1e4d7a603db69b977b87307fe0fa7d071 | 274 | py | Python | graph_rl/aux_rewards/constant_reward.py | nicoguertler/graphrl | 21a1cefc53e5c457745570460de0d99e68622e57 | [
"MIT"
] | 1 | 2022-01-04T15:21:55.000Z | 2022-01-04T15:21:55.000Z | graph_rl/aux_rewards/constant_reward.py | nicoguertler/graph_rl | 21a1cefc53e5c457745570460de0d99e68622e57 | [
"MIT"
] | null | null | null | graph_rl/aux_rewards/constant_reward.py | nicoguertler/graph_rl | 21a1cefc53e5c457745570460de0d99e68622e57 | [
"MIT"
] | null | null | null | import numpy as np
from . import AuxReward
class ConstantReward(AuxReward):
"""Constant auxiliary reward."""
def __init__(self, constant_reward):
self._reward = constant_reward
def __call__(self, obs, action, env_reward):
return self._reward
| 21.076923 | 48 | 0.70073 |
b2e35b0f517f6c934ddd1c46ecd581976fdb81cd | 135 | py | Python | aces_1.2/python/aces_ocio/tests/__init__.py | SaeedDeev/OpenColorIO-Configs | af9ec74c233cc4ef87ceeaccbac3d1c5fec93885 | [
"AMPAS"
] | 409 | 2015-04-19T04:34:43.000Z | 2022-03-31T06:43:08.000Z | aces_1.2/python/aces_ocio/tests/__init__.py | SaeedDeev/OpenColorIO-Configs | af9ec74c233cc4ef87ceeaccbac3d1c5fec93885 | [
"AMPAS"
] | 10 | 2020-03-03T12:07:05.000Z | 2021-11-22T19:58:14.000Z | aces_1.2/python/aces_ocio/tests/__init__.py | SaeedDeev/OpenColorIO-Configs | af9ec74c233cc4ef87ceeaccbac3d1c5fec93885 | [
"AMPAS"
] | 277 | 2016-03-08T09:27:14.000Z | 2022-03-30T07:50:59.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: AMPAS
# Copyright Academy of Motion Picture Arts and Sciences
| 27 | 55 | 0.718519 |
603224c603a018708217e3f8ac4aaf829a919145 | 956 | py | Python | run.py | javecruz/redisAPI | b8ea21b888bb6e23563e46a7904f627a2ba3a5b2 | [
"MIT"
] | null | null | null | run.py | javecruz/redisAPI | b8ea21b888bb6e23563e46a7904f627a2ba3a5b2 | [
"MIT"
] | null | null | null | run.py | javecruz/redisAPI | b8ea21b888bb6e23563e46a7904f627a2ba3a5b2 | [
"MIT"
] | null | null | null | from flask import Flask, jsonify
#la conexion para poder iniciarlizar la app de flask desde aqui
from models.dbFlaskLink import db
#views
from clientesView import bp_clientes
from vehiculosView import bp_vehiculos
from ficherosView import bp_ficheros
#all config info such db
import config
# redis connection
from redisA... | 28.969697 | 109 | 0.777197 |
ebd4d24a2b93591f26a4ba7480a83970c5625255 | 6,543 | py | Python | code/client/munkilib/authrestart/client.py | dderusha/munki | ad3dd1673fc6544770e561b52000371113cd5294 | [
"Apache-2.0"
] | 1 | 2019-01-13T22:36:59.000Z | 2019-01-13T22:36:59.000Z | code/client/munkilib/authrestart/client.py | MarcelRaschke/munki | 5ab55e81934cf081d369ab11df70d2ee215df33e | [
"Apache-2.0"
] | null | null | null | code/client/munkilib/authrestart/client.py | MarcelRaschke/munki | 5ab55e81934cf081d369ab11df70d2ee215df33e | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
#
# Copyright 2017-2018 Greg Neagle.
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 32.552239 | 76 | 0.6604 |
6cb5c6bcb186a0b9bcc8d7320f085a8ce70728f7 | 12,323 | py | Python | atomic_reactor/plugins/exit_store_metadata_in_osv3.py | MartinBasti/atomic-reactor | 4431225c5a474c7f88c63ec1f25216d4b84a0f1d | [
"BSD-3-Clause"
] | null | null | null | atomic_reactor/plugins/exit_store_metadata_in_osv3.py | MartinBasti/atomic-reactor | 4431225c5a474c7f88c63ec1f25216d4b84a0f1d | [
"BSD-3-Clause"
] | null | null | null | atomic_reactor/plugins/exit_store_metadata_in_osv3.py | MartinBasti/atomic-reactor | 4431225c5a474c7f88c63ec1f25216d4b84a0f1d | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals
import json
import os
from osbs.exceptions import OsbsResponseException
from osbs.utils import grace... | 39.245223 | 100 | 0.614542 |
3e8fcc8d76c7eff8dfdca2197ca9c7b6cf40d40c | 59,216 | py | Python | core/domain/user_jobs_one_off_test.py | marianazangrossi/oppia | f9bd0712503ed483f34c86692954a31021596858 | [
"Apache-2.0"
] | null | null | null | core/domain/user_jobs_one_off_test.py | marianazangrossi/oppia | f9bd0712503ed483f34c86692954a31021596858 | [
"Apache-2.0"
] | null | null | null | core/domain/user_jobs_one_off_test.py | marianazangrossi/oppia | f9bd0712503ed483f34c86692954a31021596858 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | 40.782369 | 117 | 0.668552 |
d1b71dc3ede3aaac896caee3159eb2d6220e441d | 860 | py | Python | bigflow_python/python/bigflow/transform_impls/__init__.py | advancedxy/bigflow_python | 8a244b483404fde7afc42eee98bc964da8ae03e2 | [
"Apache-2.0"
] | 1,236 | 2017-11-14T11:10:10.000Z | 2022-03-08T11:54:41.000Z | bigflow_python/python/bigflow/transform_impls/__init__.py | advancedxy/bigflow_python | 8a244b483404fde7afc42eee98bc964da8ae03e2 | [
"Apache-2.0"
] | 38 | 2017-11-14T16:29:12.000Z | 2020-01-23T08:32:04.000Z | bigflow_python/python/bigflow/transform_impls/__init__.py | advancedxy/bigflow_python | 8a244b483404fde7afc42eee98bc964da8ae03e2 | [
"Apache-2.0"
] | 184 | 2017-11-27T07:23:36.000Z | 2022-03-14T02:54:16.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
########################################################################
#
# Copyright (c) 2015 Baidu, Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may o... | 34.4 | 74 | 0.616279 |
08594054df5d42631db3dfc9ed2ba7bef9346b16 | 23,134 | py | Python | lib/carbon/conf.py | hessu/carbon | db0ffa3dea0e8fffd5cd05c22b60c08d7e4ae799 | [
"Apache-2.0"
] | 1 | 2015-08-04T08:58:56.000Z | 2015-08-04T08:58:56.000Z | lib/carbon/conf.py | hessu/carbon | db0ffa3dea0e8fffd5cd05c22b60c08d7e4ae799 | [
"Apache-2.0"
] | null | null | null | lib/carbon/conf.py | hessu/carbon | db0ffa3dea0e8fffd5cd05c22b60c08d7e4ae799 | [
"Apache-2.0"
] | null | null | null | """Copyright 2009 Chris Davis
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, software
dist... | 34.683658 | 97 | 0.60383 |
eebcc3a4111f94add2f05af23399a71834ba2024 | 1,625 | py | Python | src/newton-opt-lu.py | codinginbrazil/GA018 | 714fcfca0144536ce17481793b100058fb07b928 | [
"MIT"
] | 1 | 2021-03-24T12:52:12.000Z | 2021-03-24T12:52:12.000Z | src/newton-opt-lu.py | codinginbrazil/GA018 | 714fcfca0144536ce17481793b100058fb07b928 | [
"MIT"
] | null | null | null | src/newton-opt-lu.py | codinginbrazil/GA018 | 714fcfca0144536ce17481793b100058fb07b928 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# from sympy import lambdify, diff, hessian, jacobi, cos, sin, exp, pprint
# from sympy.matrices import Matrix, eye, zeros, ones, diag, GramSchmidt
from sympy.abc import x,y,w,z
from Linear_system import *
from Error import *
from Log import *
MAX = 20
PATH = 'log/newton-opt/'
TOLERANCE = 0.0... | 30.092593 | 118 | 0.527385 |
976eedf8890e9b621a7cd9fe5b8c1870c131fc09 | 1,598 | py | Python | trix/trix_student/views/users.py | Elthan/trix2 | 5fea5eaea8dfd2a6201377fc7775e89ce99f6cbd | [
"BSD-3-Clause"
] | 1 | 2020-03-15T12:29:13.000Z | 2020-03-15T12:29:13.000Z | trix/trix_student/views/users.py | devilry/trix2 | 5bbf15671b4a72ef1ec41240b975950f413735d8 | [
"BSD-3-Clause"
] | 63 | 2015-01-03T17:21:38.000Z | 2020-10-07T13:21:08.000Z | trix/trix_student/views/users.py | Elthan/trix2 | 5fea5eaea8dfd2a6201377fc7775e89ce99f6cbd | [
"BSD-3-Clause"
] | 4 | 2015-01-08T14:49:44.000Z | 2018-06-18T06:55:30.000Z | from django.views.generic import DeleteView
from django.contrib.auth.mixins import LoginRequiredMixin
from django.utils.translation import ugettext_lazy as _
from django.http import Http404
from django.urls import reverse_lazy
from trix.trix_core import models
from trix.trix_student.views import base
class ProfilePa... | 35.511111 | 83 | 0.711514 |
82718353092cb63f6560eed035bb958036a900eb | 191,055 | py | Python | breeze_resources.py | adamerose/BreezeStyleSheets | a3c6d5bbaaa0f94072342f18b633e210ad1c1940 | [
"MIT"
] | 1 | 2021-03-03T06:17:04.000Z | 2021-03-03T06:17:04.000Z | breeze_resources.py | adamerose/BreezeStyleSheets | a3c6d5bbaaa0f94072342f18b633e210ad1c1940 | [
"MIT"
] | null | null | null | breeze_resources.py | adamerose/BreezeStyleSheets | a3c6d5bbaaa0f94072342f18b633e210ad1c1940 | [
"MIT"
] | 1 | 2021-03-03T06:38:15.000Z | 2021-03-03T06:38:15.000Z | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.15.1)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x14\x04\
\x00\
\x00\x80\xd6\x78\x9c\xdd\x1d\x6b\x73\xdb\x36\xf2\x7b\x67\xfa\x1f\
\x50\xe7\x4b\x... | 58.641805 | 129 | 0.724692 |
453002bd598dabb04300643965c9dc9b46fccd66 | 335 | py | Python | generators/nav_generator.py | tulku/traffic_editor | a0f6968ebc6a03968d2af7a09aa8471b74e51b48 | [
"Apache-2.0"
] | null | null | null | generators/nav_generator.py | tulku/traffic_editor | a0f6968ebc6a03968d2af7a09aa8471b74e51b48 | [
"Apache-2.0"
] | null | null | null | generators/nav_generator.py | tulku/traffic_editor | a0f6968ebc6a03968d2af7a09aa8471b74e51b48 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
import generator
if __name__ == '__main__':
if len(sys.argv) != 3:
print('usage: nav_generator INPUT.yaml OUTPUT_PREFIX')
sys.exit(1)
input_filename = sys.argv[1]
output_prefix = sys.argv[2]
g = generator.Generator()
g.generate_nav(input_filename, ... | 23.928571 | 62 | 0.674627 |
edcad596cdef9464b3fa753f308a471a6e39baf6 | 4,359 | py | Python | prioritized_memory.py | djmax008/GEIRINA_baseline | 3b847bd217bc9784c846cd2aa0700f8e1b08f7f9 | [
"MIT"
] | 5 | 2020-06-17T03:00:41.000Z | 2022-03-09T07:32:14.000Z | prioritized_memory.py | djmax008/GEIRINA_baseline | 3b847bd217bc9784c846cd2aa0700f8e1b08f7f9 | [
"MIT"
] | 2 | 2020-05-15T17:12:50.000Z | 2020-06-18T10:06:06.000Z | prioritized_memory.py | djmax008/GEIRINA_baseline | 3b847bd217bc9784c846cd2aa0700f8e1b08f7f9 | [
"MIT"
] | 3 | 2021-02-04T10:29:46.000Z | 2022-03-09T07:32:17.000Z | """
https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow/blob/master/contents/5.2_Prioritized_Replay_DQN/RL_brain.py
"""
import numpy as np
class SumTree(object):
"""
This SumTree code is a modified version and the original code is from:
https://github.com/jaara/AI-blog/blob/master/SumTree.py
... | 34.322835 | 128 | 0.630649 |
ba445366ad0c87bc5e4bf535c7ef710511a50f1e | 653 | py | Python | contact/migrations/0002_auto_20201009_0814.py | HarshilShrivastava/TrueCaller-Backend | 8303fbd1ac6ddc79a50803da6b682deb5b9dddfe | [
"MIT"
] | null | null | null | contact/migrations/0002_auto_20201009_0814.py | HarshilShrivastava/TrueCaller-Backend | 8303fbd1ac6ddc79a50803da6b682deb5b9dddfe | [
"MIT"
] | null | null | null | contact/migrations/0002_auto_20201009_0814.py | HarshilShrivastava/TrueCaller-Backend | 8303fbd1ac6ddc79a50803da6b682deb5b9dddfe | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-09 08:14
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contact', '0001_initial'),
]
operations = [
... | 26.12 | 123 | 0.633997 |
9fce833a0cdc18c7166875ba42f3c88641abecf2 | 3,714 | py | Python | docker/docker_run.py | H-HChen/OMG-Planner | 7a53c303e229d91c3af13459df7c526fc2d0f492 | [
"MIT"
] | 52 | 2020-10-07T01:53:31.000Z | 2022-03-04T20:43:37.000Z | docker/docker_run.py | H-HChen/OMG-Planner | 7a53c303e229d91c3af13459df7c526fc2d0f492 | [
"MIT"
] | 14 | 2020-11-08T09:28:17.000Z | 2021-11-12T01:17:27.000Z | docker/docker_run.py | H-HChen/OMG-Planner | 7a53c303e229d91c3af13459df7c526fc2d0f492 | [
"MIT"
] | 12 | 2020-10-07T02:10:04.000Z | 2022-03-10T15:38:04.000Z | #!/usr/bin/env python
from __future__ import print_function
#########
# Credit: https://github.com/RobotLocomotion/pytorch-dense-correspondence/blob/master/docker/docker_run.py
#########
import argparse
import os
import socket
import getpass
import yaml
if __name__=="__main__":
user_name = getpass.getuser()
... | 36.772277 | 260 | 0.62224 |
25f24da6cf7c7cf452ca769829f8ed311de3326c | 2,039 | py | Python | src/egyptian_data_generator/national_identification_number.py | mahmoudahmedd/Egyptian-Data-Generator | d7bea688a7c7f8604908f302917267d795aa40a2 | [
"MIT"
] | 9 | 2020-11-25T10:45:32.000Z | 2020-11-29T12:42:09.000Z | src/egyptian_data_generator/national_identification_number.py | mahmoudahmedd/Egyptian-Data-Generator | d7bea688a7c7f8604908f302917267d795aa40a2 | [
"MIT"
] | null | null | null | src/egyptian_data_generator/national_identification_number.py | mahmoudahmedd/Egyptian-Data-Generator | d7bea688a7c7f8604908f302917267d795aa40a2 | [
"MIT"
] | null | null | null | import random
from egyptian_data_generator.helpers import Helpers
from egyptian_data_generator.date import Date
class NationalID:
def generate(self, _dateOfBirth = None, _governorate = None, _gender = None):
governorates = {
"Alexandria": "02",
"Aswan": "28",
... | 30.432836 | 136 | 0.437469 |
e90bd38312becb970ad9685d99dc6a85ca4b83d1 | 582 | py | Python | corehq/ex-submodules/dimagi/utils/modules.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 471 | 2015-01-10T02:55:01.000Z | 2022-03-29T18:07:18.000Z | corehq/ex-submodules/dimagi/utils/modules.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 14,354 | 2015-01-01T07:38:23.000Z | 2022-03-31T20:55:14.000Z | corehq/ex-submodules/dimagi/utils/modules.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 175 | 2015-01-06T07:16:47.000Z | 2022-03-29T13:27:01.000Z | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import importlib
def to_function(function_path, failhard=False):
"""
Convert a string like foo.bar.baz into a function (assumes that
baz is a function defined in foo/bar.py).
"""
try:
# TODO: make this less brittle if imports or args don't... | 29.1 | 71 | 0.64433 |
8044760e5646771a3ea915d7ac9b6cb303c4c1d2 | 408 | py | Python | lists/migrations/0011_family_family_gifts.py | olegesan/christmas_list_webapp | d705fdedef651f3f5bf7a4f5d58034df0aab572f | [
"MIT"
] | null | null | null | lists/migrations/0011_family_family_gifts.py | olegesan/christmas_list_webapp | d705fdedef651f3f5bf7a4f5d58034df0aab572f | [
"MIT"
] | 3 | 2021-04-08T20:55:20.000Z | 2022-02-10T09:55:03.000Z | lists/migrations/0011_family_family_gifts.py | olegesan/christmas_list_webapp | d705fdedef651f3f5bf7a4f5d58034df0aab572f | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2019-12-06 23:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lists', '0010_auto_20191206_2307'),
]
operations = [
migrations.AddField(
model_name='family',
name='family_gifts',
... | 21.473684 | 70 | 0.605392 |
902a873e5099bcb84ff3417bc3f31f74d83c663d | 1,183 | py | Python | create_data.py | vardhman1996/language_model | b81b8be6e2bf79b3d823e20bb9d20a1d9c4305d2 | [
"MIT"
] | null | null | null | create_data.py | vardhman1996/language_model | b81b8be6e2bf79b3d823e20bb9d20a1d9c4305d2 | [
"MIT"
] | 1 | 2018-05-24T05:37:36.000Z | 2018-05-24T05:37:36.000Z | create_data.py | vardhman1996/language_model | b81b8be6e2bf79b3d823e20bb9d20a1d9c4305d2 | [
"MIT"
] | null | null | null | '''
Vikram Sringari
CSE517
This file parses the raw data file.
Then it produces sequences of length 5 for the LSTM
'''
import random
import io
#reads parsed data file in
#takes filename parameter
def read_file(ifile):
file = io.open(ifile, 'r', encoding='utf-8')
# reads text
text = file.read()
file.close()
return ... | 22.320755 | 64 | 0.676247 |
3282cbfe1838989a34c65ac08d76336245c059fe | 4,165 | py | Python | noggin/utility/pagination.py | josselineperdomo/noggin | 7f84343bd79f0871dcda2667f5b92256aee9cde9 | [
"MIT"
] | null | null | null | noggin/utility/pagination.py | josselineperdomo/noggin | 7f84343bd79f0871dcda2667f5b92256aee9cde9 | [
"MIT"
] | null | null | null | noggin/utility/pagination.py | josselineperdomo/noggin | 7f84343bd79f0871dcda2667f5b92256aee9cde9 | [
"MIT"
] | null | null | null | import math
from flask import current_app, request
class PagedResult:
def __init__(self, items=None, total=None, page_size=None, page_number=None):
self.items = items or []
self.total = total or len(self.items)
self.page_size = page_size
self.page_number = page_number
@proper... | 34.421488 | 88 | 0.605282 |
a032e0a5d6e9032197568f8677130eb46e931649 | 17,180 | py | Python | cinder/volume/drivers/hpe/hpe_3par_fc.py | SaumyaRackspace/cinder | 08cfa44d353f84019cab529ca6f13362ba2808ea | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/hpe/hpe_3par_fc.py | SaumyaRackspace/cinder | 08cfa44d353f84019cab529ca6f13362ba2808ea | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/hpe/hpe_3par_fc.py | SaumyaRackspace/cinder | 08cfa44d353f84019cab529ca6f13362ba2808ea | [
"Apache-2.0"
] | null | null | null | # (c) Copyright 2013-2015 Hewlett Packard Enterprise Development LP
# All Rights Reserved.
#
# Copyright 2012 OpenStack Foundation
#
# 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 Licen... | 42.107843 | 78 | 0.569208 |
fbf0238a8d6e19a84443172a103db28069dfa8e8 | 3,388 | py | Python | test-framework/test-suites/integration/tests/wizard/test_boss_config_snack.py | anooprajendra/stacki | 5e3f51c928ff5367a7441f07bf28f0121e7abdff | [
"BSD-3-Clause"
] | 123 | 2015-05-12T23:36:45.000Z | 2017-07-05T23:26:57.000Z | test-framework/test-suites/integration/tests/wizard/test_boss_config_snack.py | anooprajendra/stacki | 5e3f51c928ff5367a7441f07bf28f0121e7abdff | [
"BSD-3-Clause"
] | 177 | 2015-06-05T19:17:47.000Z | 2017-07-07T17:57:24.000Z | test-framework/test-suites/integration/tests/wizard/test_boss_config_snack.py | anooprajendra/stacki | 5e3f51c928ff5367a7441f07bf28f0121e7abdff | [
"BSD-3-Clause"
] | 32 | 2015-06-07T02:25:03.000Z | 2017-06-23T07:35:35.000Z | import glob
import os
import re
import subprocess
import time
import xml.etree.ElementTree as ET
import pexpect
import pytest
class TestBossConfigSnack:
DOWN_KEY = "\033[B"
@pytest.fixture
def mount_cdrom(self):
# StackiOS test pipeline doesn't have a stacki ISO, so we skip the test
if not glob.glob("/export... | 27.104 | 92 | 0.684475 |
b95539ace767287c50f2c1b3c35d20cb9fd4b3e8 | 8,791 | py | Python | bash_kernel/kernel.py | amn41/bash_plus_kernel | 185d970696a99f1d593d1cc0408c2bd724beb872 | [
"BSD-3-Clause"
] | null | null | null | bash_kernel/kernel.py | amn41/bash_plus_kernel | 185d970696a99f1d593d1cc0408c2bd724beb872 | [
"BSD-3-Clause"
] | null | null | null | bash_kernel/kernel.py | amn41/bash_plus_kernel | 185d970696a99f1d593d1cc0408c2bd724beb872 | [
"BSD-3-Clause"
] | null | null | null | from ipykernel.kernelbase import Kernel
from pexpect import replwrap, EOF
import pexpect
from subprocess import check_output
import os.path
import re
import signal
__version__ = '0.7.1'
version_pat = re.compile(r'version (\d+(\.\d+)+)')
from .images import (
extract_image_filenames, display_data_for_image, ima... | 39.245536 | 111 | 0.580935 |
b633e490197b4180c8ecbe8d9194a02878e19dd7 | 988,786 | py | Python | src/output/solLexer.py | ZhouBoXiao/SolidityObfuscator | 5a1e374fed2718a5e749e99ac7740b714636aa51 | [
"Apache-2.0"
] | 2 | 2020-04-25T08:03:26.000Z | 2020-09-09T11:16:06.000Z | src/output/solLexer.py | ZhouBoXiao/SolidityObfuscator | 5a1e374fed2718a5e749e99ac7740b714636aa51 | [
"Apache-2.0"
] | 1 | 2020-10-30T07:42:55.000Z | 2020-10-30T09:40:31.000Z | src/output/solLexer.py | ZhouBoXiao/SolidityObfuscator | 5a1e374fed2718a5e749e99ac7740b714636aa51 | [
"Apache-2.0"
] | 1 | 2020-10-30T02:57:56.000Z | 2020-10-30T02:57:56.000Z | # $ANTLR 3.1.1 D:\\PycharmProjects\\SolidityObfuscator\\src\\sol.g 2019-04-10 21:57:13
import sys
from antlr3 import *
from antlr3.compat import set, frozenset
# for convenience in actions
HIDDEN = BaseRecognizer.HIDDEN
# token types
T__144=144
Delete=61
T__143=143
Each=12
T__146=146
T__145=145
Or=39
String=21
TTYP... | 58.208395 | 9,302 | 0.587728 |
0fef8d9cdd77bc503c06228b7c00d952a7eec6df | 7,200 | py | Python | python/fate_arch/federation/pulsar/_pulsar_manager.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 1 | 2021-03-30T13:24:01.000Z | 2021-03-30T13:24:01.000Z | python/fate_arch/federation/pulsar/_pulsar_manager.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | null | null | null | python/fate_arch/federation/pulsar/_pulsar_manager.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | null | null | null | ########################################################
# Copyright 2019-2021 program was created VMware, Inc. #
# SPDX-License-Identifier: Apache-2.0 #
########################################################
import logging
import json
import requests
from requests.adapters import HTTPAdapter
from ... | 35.46798 | 123 | 0.605556 |
269ee7085817f53c01075896867ff51da1ee44f6 | 7,375 | py | Python | nuqql_matrixd_nio/server.py | hwipl/nuqql-matrixd-nio | 5a121eb45496cf9f329b3afddebd1ab9b3d6fce7 | [
"MIT"
] | null | null | null | nuqql_matrixd_nio/server.py | hwipl/nuqql-matrixd-nio | 5a121eb45496cf9f329b3afddebd1ab9b3d6fce7 | [
"MIT"
] | null | null | null | nuqql_matrixd_nio/server.py | hwipl/nuqql-matrixd-nio | 5a121eb45496cf9f329b3afddebd1ab9b3d6fce7 | [
"MIT"
] | null | null | null | """
matrixd backend server
"""
import html
import re
from typing import TYPE_CHECKING, Dict, Optional, Tuple
# nuqql-based imports
from nuqql_based.based import Based
from nuqql_based.callback import Callback
from nuqql_based.message import Message
# matrixd imports
from nuqql_matrixd_nio.client import BackendClien... | 31.926407 | 79 | 0.571119 |
e30ececd72355be8dbf4e5b0d771de1a56401529 | 1,658 | py | Python | tests/test_stats.py | InigoSJ/airflow | 8b97a387dc30d8c88390d500ec99333798c20f1c | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 3 | 2019-08-17T15:16:11.000Z | 2019-11-18T06:42:15.000Z | tests/test_stats.py | InigoSJ/airflow | 8b97a387dc30d8c88390d500ec99333798c20f1c | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 7 | 2019-03-27T07:58:14.000Z | 2020-02-12T17:42:33.000Z | tests/test_stats.py | upjohnc/airflow-upjohn-k8s | caadbc1618d73e054de99138b0892cea3a9327c4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 5 | 2017-06-19T19:55:47.000Z | 2020-10-10T00:49:20.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 35.276596 | 79 | 0.74608 |
d079aaa8eb79ed97c762ab7bc8d25028e79a84f8 | 15,462 | py | Python | 2vtk.py | ksaslam/dynosol_coupling | 8d4cae809c00ae4e8569842a93722b9aedc41a90 | [
"MIT"
] | null | null | null | 2vtk.py | ksaslam/dynosol_coupling | 8d4cae809c00ae4e8569842a93722b9aedc41a90 | [
"MIT"
] | null | null | null | 2vtk.py | ksaslam/dynosol_coupling | 8d4cae809c00ae4e8569842a93722b9aedc41a90 | [
"MIT"
] | 1 | 2019-08-28T21:40:06.000Z | 2019-08-28T21:40:06.000Z | #!/usr/bin/env python
# encoding: utf-8
'''Convert the binary output of DynEarthSol3D to VTK files.
usage: 2vtk.py [-a -c -m -p -t -h] modelname [start [end [delta]]]]
options:
-a save data in ASCII format (default: binary)
-c save files in current directory (default: same directory as
... | 30.617822 | 108 | 0.55562 |
a6da9ecf7708d8b610d00b5e416900b7c5f7b24c | 4,985 | py | Python | examples/mpi_example_experiment.py | Nathaniel-Rodriguez/reservoirlib | 367261d17fa762375ae40b4cc2ffab1de2113858 | [
"MIT"
] | 4 | 2018-07-01T20:17:08.000Z | 2020-04-19T06:56:43.000Z | examples/mpi_example_experiment.py | Nathaniel-Rodriguez/reservoirlib | 367261d17fa762375ae40b4cc2ffab1de2113858 | [
"MIT"
] | null | null | null | examples/mpi_example_experiment.py | Nathaniel-Rodriguez/reservoirlib | 367261d17fa762375ae40b4cc2ffab1de2113858 | [
"MIT"
] | 5 | 2019-08-20T02:04:54.000Z | 2021-08-16T22:11:38.000Z | from reservoirlib.esn import DiscreteEchoStateNetwork
from reservoirlib.task import BinaryMemoryCapacityTask
from reservoirlib.experiment import BenchmarkExperiment
from reservoirlib.trainer import LeastSquaredErrorTrainer
from reservoirlib.distribution import Distribution
from reservoirlib.generator import generate_re... | 45.318182 | 95 | 0.614845 |
8cbb90b7b02d5bcb1bb63af2d976d98311944adf | 4,570 | py | Python | model.py | Cornell-CS-5740-Marseille/NM-pj3 | 8a883428df850f7217ff06478b2c6f99b5040113 | [
"FTL",
"CNRI-Python",
"RSA-MD"
] | null | null | null | model.py | Cornell-CS-5740-Marseille/NM-pj3 | 8a883428df850f7217ff06478b2c6f99b5040113 | [
"FTL",
"CNRI-Python",
"RSA-MD"
] | null | null | null | model.py | Cornell-CS-5740-Marseille/NM-pj3 | 8a883428df850f7217ff06478b2c6f99b5040113 | [
"FTL",
"CNRI-Python",
"RSA-MD"
] | null | null | null | import os
import random
import numpy as np
import math
import torch
from torch import nn
from torch.nn import init
from torch import optim
# Consult the PyTorch documentation for information on the functions used below:
# https://pytorch.org/docs/stable/torch.html
class model(nn.Module):
def __init... | 41.545455 | 117 | 0.597374 |
a89444583a8a48906f65350f511cb55ff442a600 | 2,069 | py | Python | setup.py | JulianWgs/pip-audit | cd91d2a0cbdadafe587ab459583649ad75569fcc | [
"Apache-2.0"
] | null | null | null | setup.py | JulianWgs/pip-audit | cd91d2a0cbdadafe587ab459583649ad75569fcc | [
"Apache-2.0"
] | null | null | null | setup.py | JulianWgs/pip-audit | cd91d2a0cbdadafe587ab459583649ad75569fcc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from setuptools import find_packages, setup
version = {}
with open("./pip_audit/_version.py") as f:
exec(f.read(), version)
with open("./README.md") as f:
long_description = f.read()
setup(
name="pip-audit",
version=version["__version__"],
license="Apache-2.0",
author=... | 29.557143 | 84 | 0.560657 |
45c858327c8001a0e7c0a3bc16230937ca6646cf | 6,661 | py | Python | tests/unit/test_solvers/test_algebraic_solver.py | gyouhoc/PyBaMM | 6852e0e518157e6802ce83a2549562e7d0ed4b9f | [
"BSD-3-Clause"
] | null | null | null | tests/unit/test_solvers/test_algebraic_solver.py | gyouhoc/PyBaMM | 6852e0e518157e6802ce83a2549562e7d0ed4b9f | [
"BSD-3-Clause"
] | null | null | null | tests/unit/test_solvers/test_algebraic_solver.py | gyouhoc/PyBaMM | 6852e0e518157e6802ce83a2549562e7d0ed4b9f | [
"BSD-3-Clause"
] | null | null | null | #
# Tests for the Algebraic Solver class
#
import pybamm
import unittest
import numpy as np
from tests import get_discretisation_for_testing
class TestAlgebraicSolver(unittest.TestCase):
def test_algebraic_solver_init(self):
solver = pybamm.AlgebraicSolver(
method="hybr", tol=1e-4, extra_optio... | 33.472362 | 87 | 0.589401 |
3e4cacad9fc35d6839c7e29eb7a4ad85c6f822f4 | 2,549 | py | Python | main_app/urls.py | boyoon-c/readuck-api | 4d62705e86603372f867a59604424a86d35b4b87 | [
"MIT"
] | null | null | null | main_app/urls.py | boyoon-c/readuck-api | 4d62705e86603372f867a59604424a86d35b4b87 | [
"MIT"
] | null | null | null | main_app/urls.py | boyoon-c/readuck-api | 4d62705e86603372f867a59604424a86d35b4b87 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name='home'),
path('accounts/login/', views.Login.as_view(), name='login'),
path('about/', views.about, name='about'),
path('signup/', views.signup, name='signup'),
# articles
path('articles/', views.articles_index, name=... | 50.98 | 131 | 0.723029 |
173030055891e73f947a48e8bf1224c26a9dd1e7 | 1,107 | py | Python | term.py | pmchozas/llod4lion | 52bb00634f770cb5fd46cfb2cc4d009c317bcef9 | [
"Apache-2.0"
] | null | null | null | term.py | pmchozas/llod4lion | 52bb00634f770cb5fd46cfb2cc4d009c317bcef9 | [
"Apache-2.0"
] | 1 | 2020-12-18T06:19:55.000Z | 2020-12-18T06:19:55.000Z | term.py | pmchozas/llod4lion | 52bb00634f770cb5fd46cfb2cc4d009c317bcef9 | [
"Apache-2.0"
] | 1 | 2020-05-16T11:11:18.000Z | 2020-05-16T11:11:18.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 29 15:59:53 2020
@author: Pablo
"""
class Term:
string = ''
lang = ''
score=0
corpus=''
synonyms=[]
iateURL=''
translations = {}
def __init__(self, term, code):
self.strin... | 14.959459 | 78 | 0.560072 |
45efea88d76c390df0c3740275f07346404f90bd | 402 | py | Python | codertheory/contrib/sites/migrations/0004_auto_20200825_2337.py | codertheory/backend | 66017e4f484414b878d2a6e78fa623870aa38cfb | [
"MIT"
] | null | null | null | codertheory/contrib/sites/migrations/0004_auto_20200825_2337.py | codertheory/backend | 66017e4f484414b878d2a6e78fa623870aa38cfb | [
"MIT"
] | null | null | null | codertheory/contrib/sites/migrations/0004_auto_20200825_2337.py | codertheory/backend | 66017e4f484414b878d2a6e78fa623870aa38cfb | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-08-25 23:37
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('sites', '0003_set_site_domain_and_name'),
]
operations = [
migrations.AlterModelOptions(
name='site',
options={'ordering': ['do... | 23.647059 | 101 | 0.61194 |
7add08986c3e6ec13bf8bd1c38b83babdae1c36e | 15,323 | py | Python | docs_old/sphinxext/docscrape.py | vishalbelsare/hddm | bf10f05c956a590d93ec8f3b162ce60df668c18a | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2016-07-14T11:18:04.000Z | 2021-07-19T13:13:53.000Z | docs_old/sphinxext/docscrape.py | vishalbelsare/hddm | bf10f05c956a590d93ec8f3b162ce60df668c18a | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | docs_old/sphinxext/docscrape.py | vishalbelsare/hddm | bf10f05c956a590d93ec8f3b162ce60df668c18a | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-01-17T09:01:53.000Z | 2020-01-17T09:01:53.000Z | """Extract reference documentation from the NumPy source tree.
"""
import inspect
import textwrap
import re
import pydoc
from StringIO import StringIO
from warnings import warn
class Reader(object):
"""A line-based string reader.
"""
def __init__(self, data):
"""
Parameters
-----... | 30.523904 | 80 | 0.501273 |
53aae45906328ae6357f2bde60668ab822b20850 | 1,232 | py | Python | harstorage/tests/functional/test_combine.py | beenanner/harstorage | c45e735d9d28cb951e70d0c783d5678996ef31ad | [
"Apache-2.0"
] | null | null | null | harstorage/tests/functional/test_combine.py | beenanner/harstorage | c45e735d9d28cb951e70d0c783d5678996ef31ad | [
"Apache-2.0"
] | null | null | null | harstorage/tests/functional/test_combine.py | beenanner/harstorage | c45e735d9d28cb951e70d0c783d5678996ef31ad | [
"Apache-2.0"
] | null | null | null | from harstorage.tests import *
class TestCombineController(TestController):
"""
Test suite for consolidation of static resources
"""
def test_01_combine_styles(self):
"""Combine common styles"""
# Expected valid response
response = self.app.get(
url(controller="... | 29.333333 | 89 | 0.579545 |
ba3e7c8e8e850c253afc4c811a96ae73b0134db1 | 39 | py | Python | modules/2.79/bpy/types/AlphaOverSequence.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | modules/2.79/bpy/types/AlphaOverSequence.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | modules/2.79/bpy/types/AlphaOverSequence.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | AlphaOverSequence.input_count = None
| 9.75 | 36 | 0.820513 |
fb30ec6d309085790136354fbb7c9ab067ad1c4f | 4,367 | py | Python | contrib/seeds/generate-seeds.py | m42cx/dashfirst | 0789ccf17b8589a5884688df1f9a1340b48b5453 | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | m42cx/dashfirst | 0789ccf17b8589a5884688df1f9a1340b48b5453 | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | m42cx/dashfirst | 0789ccf17b8589a5884688df1f9a1340b48b5453 | [
"MIT"
] | 1 | 2021-02-12T10:50:24.000Z | 2021-02-12T10:50:24.000Z | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the directory tha... | 31.644928 | 98 | 0.584612 |
1f30967987ff242250b0f048a287bbdb36987ae5 | 167 | py | Python | home/urls.py | idokk1/shlifim | f05fd205c1173a2e838b935712e3279e81e2cdf4 | [
"MIT"
] | null | null | null | home/urls.py | idokk1/shlifim | f05fd205c1173a2e838b935712e3279e81e2cdf4 | [
"MIT"
] | null | null | null | home/urls.py | idokk1/shlifim | f05fd205c1173a2e838b935712e3279e81e2cdf4 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('about/', views.about, name='about'),
path('', views.landingpage, name='landingpage')
]
| 20.875 | 51 | 0.676647 |
71ae39d611bc7834df990ccc83d4264e08958cf7 | 12,631 | py | Python | server/grpc/example_pb2_grpc.py | amine-ouertani/DigitalBeing | 1acba704d4dd512b54b3cce124ecad3926268695 | [
"MIT"
] | null | null | null | server/grpc/example_pb2_grpc.py | amine-ouertani/DigitalBeing | 1acba704d4dd512b54b3cce124ecad3926268695 | [
"MIT"
] | null | null | null | server/grpc/example_pb2_grpc.py | amine-ouertani/DigitalBeing | 1acba704d4dd512b54b3cce124ecad3926268695 | [
"MIT"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import example_pb2 as example__pb2
class AgentStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel)... | 42.385906 | 93 | 0.640804 |
c2a54c1dc6e02f8692a868fb841acfbe651c2ebb | 2,218 | py | Python | src/compas/datastructures/mesh/duality.py | elidim/compas | b7fab867bbc2f505f1ce6a5375a4fa88623d0717 | [
"MIT"
] | 1 | 2019-03-27T22:46:29.000Z | 2019-03-27T22:46:29.000Z | src/compas/datastructures/mesh/duality.py | elidim/compas | b7fab867bbc2f505f1ce6a5375a4fa88623d0717 | [
"MIT"
] | null | null | null | src/compas/datastructures/mesh/duality.py | elidim/compas | b7fab867bbc2f505f1ce6a5375a4fa88623d0717 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from math import pi
__all__ = ['mesh_dual']
PI2 = 2.0 * pi
def mesh_dual(mesh, cls=None):
"""Construct the dual of a mesh.
Parameters
----------
mesh : Mesh
A mesh object.
cls... | 22.865979 | 95 | 0.529757 |
d915466e5fd3c97db5cb2aef01d5846d430a72ba | 9,349 | py | Python | sentiment analysis/sentiment2.py | chuncaohenli/clp_project | 1df861f6c91ce35e1c6118a226c549d5a274d9df | [
"MIT"
] | null | null | null | sentiment analysis/sentiment2.py | chuncaohenli/clp_project | 1df861f6c91ce35e1c6118a226c549d5a274d9df | [
"MIT"
] | null | null | null | sentiment analysis/sentiment2.py | chuncaohenli/clp_project | 1df861f6c91ce35e1c6118a226c549d5a274d9df | [
"MIT"
] | null | null | null | #coding=utf-8
import json
import nltk
import os
import utils
import traceback
n_dict = {}
adj_dict = {}
adv_dict = {}
inverse_dict = []
posdict = []
negdict = []
################ read in all the files ##################
# comment_list = getComments(jcontent)
id_list = ['3133817']
comments = []
comments_dict = {}
allr... | 34.754647 | 99 | 0.599529 |
68e73668406db65563eb6b838c8b51d4017f744c | 725 | py | Python | wordcount/migrations/0001_initial.py | novalex/wordcount | d0dd0d7c4e2389ab9dc54f35d085a0d53546d620 | [
"MIT"
] | null | null | null | wordcount/migrations/0001_initial.py | novalex/wordcount | d0dd0d7c4e2389ab9dc54f35d085a0d53546d620 | [
"MIT"
] | null | null | null | wordcount/migrations/0001_initial.py | novalex/wordcount | d0dd0d7c4e2389ab9dc54f35d085a0d53546d620 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2019-11-05 18:57
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='FileUpload',
fi... | 27.884615 | 114 | 0.588966 |
856fb37d5c5ffcb9322835d1c7598d3026379bc3 | 180,817 | py | Python | python/tvm/relay/frontend/onnx.py | embodyme/tvm | 3c05eb6a4bc026b7b194e6708d96b2dc9eea070a | [
"Apache-2.0"
] | 1 | 2021-12-26T06:58:55.000Z | 2021-12-26T06:58:55.000Z | python/tvm/relay/frontend/onnx.py | redbopo/tvm | b54beed37ca2baad6002990b014a2119223e0900 | [
"Apache-2.0"
] | null | null | null | python/tvm/relay/frontend/onnx.py | redbopo/tvm | b54beed37ca2baad6002990b014a2119223e0900 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.528687 | 120 | 0.585376 |
12df453648e15bf12d07e124dff7d1f97bad156c | 15,955 | py | Python | sim/multi_agent_power.py | mjycom/pensieve | b31cabf2742ad5f3d6ee67bf687704524b2ca9ea | [
"MIT"
] | null | null | null | sim/multi_agent_power.py | mjycom/pensieve | b31cabf2742ad5f3d6ee67bf687704524b2ca9ea | [
"MIT"
] | null | null | null | sim/multi_agent_power.py | mjycom/pensieve | b31cabf2742ad5f3d6ee67bf687704524b2ca9ea | [
"MIT"
] | null | null | null | import os
import logging
import numpy as np
import multiprocessing as mp
os.environ['CUDA_VISIBLE_DEVICES']='-1'
import tensorflow as tf
import env
import a3c
import load_trace
S_INFO = 6 # bit_rate, buffer_size, next_chunk_size, bandwidth_measurement(throughput and time), chunk_til_video_end
S_LEN = 8 # take how m... | 39.590571 | 117 | 0.575932 |
e58dd96af38b22b6b1659774a29e886f96cb63d3 | 6,019 | py | Python | enaml/qt/qt_flow_area.py | ContinuumIO/enaml | 15c20b035a73187e8e66fa20a43c3a4372d008bd | [
"BSD-3-Clause-Clear"
] | 2 | 2017-09-17T18:05:55.000Z | 2019-08-26T03:07:54.000Z | enaml/qt/qt_flow_area.py | ContinuumIO/enaml | 15c20b035a73187e8e66fa20a43c3a4372d008bd | [
"BSD-3-Clause-Clear"
] | null | null | null | enaml/qt/qt_flow_area.py | ContinuumIO/enaml | 15c20b035a73187e8e66fa20a43c3a4372d008bd | [
"BSD-3-Clause-Clear"
] | 3 | 2021-02-23T09:19:14.000Z | 2021-02-23T09:19:27.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | 31.678947 | 79 | 0.563216 |
f6075c7ce6c3cf4e6b930ef15253a603edaeeec6 | 7,205 | py | Python | src/paper.py | aflaxman/performance_of_insilicova_replication_archive | 6f02d2fda33c652f835ba2cf194ed9d9a1537d61 | [
"MIT"
] | null | null | null | src/paper.py | aflaxman/performance_of_insilicova_replication_archive | 6f02d2fda33c652f835ba2cf194ed9d9a1537d61 | [
"MIT"
] | null | null | null | src/paper.py | aflaxman/performance_of_insilicova_replication_archive | 6f02d2fda33c652f835ba2cf194ed9d9a1537d61 | [
"MIT"
] | null | null | null | from __future__ import print_function
from collections import namedtuple
import re
import os
import sys
import jinja2
import jinja2.meta
import yaml
from map_insilico import INSILICO_CAUSE_MAP
from download import load_ghdx_data
from annex_tables import prep_icds
PAPER_DIR = os.path.join(os.path.abspath(os.path.dir... | 32.899543 | 79 | 0.606523 |
e1f0b526a164aaa08cebfec31c2eac154e561980 | 613 | py | Python | lib/python3.8/site-packages/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/facts/facts.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/facts/facts.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/facts/facts.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | #
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The arg spec for the asa facts module.
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class FactsArgs(object):
""" The ... | 21.892857 | 70 | 0.628059 |
51552e7cad488c618f738d8077a6a2bf8a49b544 | 26,117 | py | Python | pysilcam/__main__.py | Sondreab/PySilCam | a855f769fee8f86a364f9dc2c448c74a7a71c2a6 | [
"BSD-3-Clause"
] | null | null | null | pysilcam/__main__.py | Sondreab/PySilCam | a855f769fee8f86a364f9dc2c448c74a7a71c2a6 | [
"BSD-3-Clause"
] | null | null | null | pysilcam/__main__.py | Sondreab/PySilCam | a855f769fee8f86a364f9dc2c448c74a7a71c2a6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import time
import datetime
import logging
from docopt import docopt
import numpy as np
from pysilcam import __version__
from pysilcam.acquisition import Acquire
from pysilcam.background import backgrounder
from pysilcam.process import statextract
import pysilcam.oilgas as scog
from p... | 38.127007 | 143 | 0.596929 |
5a05eda1241a4bae5182a5c74c06173201e6a21e | 14,337 | py | Python | dev_scripts/git/git_hooks/utils.py | alphamatic/amp | 5018137097159415c10eaa659a2e0de8c4e403d4 | [
"BSD-3-Clause"
] | 5 | 2021-08-10T23:16:44.000Z | 2022-03-17T17:27:00.000Z | dev_scripts/git/git_hooks/utils.py | alphamatic/amp | 5018137097159415c10eaa659a2e0de8c4e403d4 | [
"BSD-3-Clause"
] | 330 | 2021-06-10T17:28:22.000Z | 2022-03-31T00:55:48.000Z | dev_scripts/git/git_hooks/utils.py | alphamatic/amp | 5018137097159415c10eaa659a2e0de8c4e403d4 | [
"BSD-3-Clause"
] | 6 | 2021-06-10T17:20:32.000Z | 2022-03-28T08:08:03.000Z | """
Import as:
import dev_scripts.git.git_hooks.utils as dsgghout
"""
# NOTE: This file should depend only on Python standard libraries.
import compileall
import inspect
import logging
import os
import re
import string
import subprocess
import sys
from typing import Any, List, Optional, Tuple
_LOG = logging.getLogge... | 31.099783 | 104 | 0.575295 |
ab2b782cb321e33fc5f2462049b3c6c1c0cb402e | 10,820 | py | Python | demo/vww/mobilenet_tinyml.py | wei2374/model_compression | bf3e9a11396ace3c6845f44f6aa02b38364e2ec8 | [
"MIT"
] | null | null | null | demo/vww/mobilenet_tinyml.py | wei2374/model_compression | bf3e9a11396ace3c6845f44f6aa02b38364e2ec8 | [
"MIT"
] | null | null | null | demo/vww/mobilenet_tinyml.py | wei2374/model_compression | bf3e9a11396ace3c6845f44f6aa02b38364e2ec8 | [
"MIT"
] | 1 | 2022-02-13T06:28:35.000Z | 2022-02-13T06:28:35.000Z | import tensorflow as tf
from tensorflow.keras.applications.mobilenet import MobileNet
from tensorflow.keras.layers import Dense, GlobalAveragePooling2D, Dropout
from tensorflow.keras.optimizers import SGD
from tensorflow.keras.regularizers import l2
from tensorflow.keras.models import Model
from tensorflow.keras.layers... | 33.8125 | 97 | 0.554067 |
e3c864273e9fbed05f866d9caf5a53bedc117d5e | 369 | py | Python | channels/migrations/0007_auto_20141118_1554.py | CMU-Robotics-Club/roboticsclub.org | 5f2ad4a15dc62160c6d03c87c121e934cacb8228 | [
"MIT"
] | null | null | null | channels/migrations/0007_auto_20141118_1554.py | CMU-Robotics-Club/roboticsclub.org | 5f2ad4a15dc62160c6d03c87c121e934cacb8228 | [
"MIT"
] | 16 | 2015-01-01T03:42:36.000Z | 2016-06-21T05:14:16.000Z | channels/migrations/0007_auto_20141118_1554.py | CMU-Robotics-Club/roboticsclub.org | 5f2ad4a15dc62160c6d03c87c121e934cacb8228 | [
"MIT"
] | 2 | 2015-07-23T14:37:16.000Z | 2021-09-11T01:23:25.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('channels', '0006_auto_20141020_1226'),
]
operations = [
migrations.AlterModelOptions(
name='channel',
... | 19.421053 | 48 | 0.598916 |
36bfefe6333d2a2fb63912876a488b0187846518 | 803 | py | Python | AnnotationLocalisationSegmentationWebApp/user.py | SocioRecSys/FashionRec_DataCollection | 8bb97beda01b34fa1eaab06d003faa95b2b2808f | [
"RSA-MD"
] | 2 | 2020-05-03T00:51:41.000Z | 2020-08-23T17:19:59.000Z | AnnotationLocalisationSegmentationWebApp/user.py | SocioRecSys/FashionRec_DataCollection | 8bb97beda01b34fa1eaab06d003faa95b2b2808f | [
"RSA-MD"
] | 5 | 2021-06-08T22:55:28.000Z | 2022-03-12T00:33:42.000Z | AnnotationLocalisationSegmentationWebApp/user.py | SocioRecSys/FashionRec_DataCollection | 8bb97beda01b34fa1eaab06d003faa95b2b2808f | [
"RSA-MD"
] | null | null | null | #!/usr/bin/python
from werkzeug.security import check_password_hash
#from flask_wtf import Form
from wtforms import Form, StringField, PasswordField
from wtforms.validators import DataRequired
class User():
def __init__(self, username):
self.username = username
def is_authenticated(self):
r... | 22.305556 | 69 | 0.706102 |
ef35eabc973a528c19861855ab7e4398ac8498e8 | 32,640 | py | Python | cmd2/argparse_completer.py | jedie/cmd2 | 8f981f37eddcccc919329245b85fd44d5975a6a7 | [
"MIT"
] | null | null | null | cmd2/argparse_completer.py | jedie/cmd2 | 8f981f37eddcccc919329245b85fd44d5975a6a7 | [
"MIT"
] | null | null | null | cmd2/argparse_completer.py | jedie/cmd2 | 8f981f37eddcccc919329245b85fd44d5975a6a7 | [
"MIT"
] | null | null | null | # coding=utf-8
# flake8: noqa C901
# NOTE: Ignoring flake8 cyclomatic complexity in this file
"""
This module defines the ArgparseCompleter class which provides argparse-based tab completion to cmd2 apps.
See the header of argparse_custom.py for instructions on how to use these features.
"""
import argparse
import ins... | 46.232295 | 122 | 0.616575 |
44e20ac3cda777ce90eb06baac0e1f8f416bd2a0 | 1,370 | py | Python | sceptre/cli/launch.py | ACenterA/sceptre | 9749486298bb603f0527fec76b36b8bc29e6a694 | [
"Apache-2.0"
] | null | null | null | sceptre/cli/launch.py | ACenterA/sceptre | 9749486298bb603f0527fec76b36b8bc29e6a694 | [
"Apache-2.0"
] | null | null | null | sceptre/cli/launch.py | ACenterA/sceptre | 9749486298bb603f0527fec76b36b8bc29e6a694 | [
"Apache-2.0"
] | null | null | null | import click
from sceptre.context import SceptreContext
from sceptre.cli.helpers import catch_exceptions
from sceptre.cli.helpers import confirmation
from sceptre.cli.helpers import stack_status_exit_code
from sceptre.plan.plan import SceptrePlan
@click.command(name="launch", short_help="Launch a Stack or StackGroup... | 29.782609 | 75 | 0.70146 |
8ae234e2f73ef0f27857f6a40facb53c11ca8ccc | 5,304 | py | Python | tests/test_cwl.py | anastasiia-zolochevska/cloud-custodian | f25315a01bec808c16ab0e2d433d6151cf5769e4 | [
"Apache-2.0"
] | 2 | 2020-01-20T19:46:28.000Z | 2020-08-19T14:20:27.000Z | tests/test_cwl.py | anastasiia-zolochevska/cloud-custodian | f25315a01bec808c16ab0e2d433d6151cf5769e4 | [
"Apache-2.0"
] | 79 | 2019-03-20T12:27:06.000Z | 2019-08-14T14:07:04.000Z | tests/test_cwl.py | anastasiia-zolochevska/cloud-custodian | f25315a01bec808c16ab0e2d433d6151cf5769e4 | [
"Apache-2.0"
] | 3 | 2017-09-21T13:36:46.000Z | 2021-09-20T16:38:29.000Z | # Copyright 2016-2017 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 37.885714 | 90 | 0.581825 |
a2f96690b70422d32922d11ace6abbe30b152817 | 2,341 | py | Python | modin/experimental/cloud/base.py | Rubtsowa/modin | 6550939753c76e896ef2bfd65bb9468d6ad161d7 | [
"ECL-2.0",
"Apache-2.0"
] | 7,258 | 2018-06-21T21:39:15.000Z | 2022-03-31T23:09:20.000Z | modin/experimental/cloud/base.py | Rubtsowa/modin | 6550939753c76e896ef2bfd65bb9468d6ad161d7 | [
"ECL-2.0",
"Apache-2.0"
] | 4,125 | 2018-06-22T18:04:48.000Z | 2022-03-31T17:13:19.000Z | modin/experimental/cloud/base.py | Rubtsowa/modin | 6550939753c76e896ef2bfd65bb9468d6ad161d7 | [
"ECL-2.0",
"Apache-2.0"
] | 547 | 2018-06-21T23:23:00.000Z | 2022-03-27T09:04:56.000Z | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... | 29.632911 | 88 | 0.673217 |
6c74a3a90764d81fd510f8af9c11a2d772ecf73e | 4,811 | py | Python | animus/torch/engine.py | Scitator/animus | 7c80dba79d9cac87455f5bc61c8bd4110dfb26f8 | [
"Apache-2.0"
] | 8 | 2022-01-12T23:21:55.000Z | 2022-03-22T13:26:05.000Z | animus/torch/engine.py | Scitator/animus | 7c80dba79d9cac87455f5bc61c8bd4110dfb26f8 | [
"Apache-2.0"
] | 1 | 2022-02-09T14:54:08.000Z | 2022-02-09T14:54:08.000Z | animus/torch/engine.py | Scitator/animus | 7c80dba79d9cac87455f5bc61c8bd4110dfb26f8 | [
"Apache-2.0"
] | 1 | 2022-01-21T19:51:35.000Z | 2022-01-21T19:51:35.000Z | # Date: 12/12/2021
# Author: Sergey Kolesnikov (scitator@gmail.com)
# Licence: Apache 2.0
from typing import Any, Callable, Dict, Optional, Union
import os
from accelerate import Accelerator
from accelerate.state import DistributedType
import numpy as np
import torch
import torch.distributed as dist
import torch.multi... | 30.257862 | 89 | 0.609021 |
eb7071f86be1070aada2f874d84224118ca31267 | 31,079 | py | Python | tests/test_models/test_backbones.py | ddayzzz/mmdetection | b9940c56cc19b3dda7468a5fd858b9683e93a486 | [
"Apache-2.0"
] | 77 | 2021-07-30T03:05:36.000Z | 2022-03-31T11:02:33.000Z | tests/test_models/test_backbones.py | ddayzzz/mmdetection | b9940c56cc19b3dda7468a5fd858b9683e93a486 | [
"Apache-2.0"
] | 7 | 2021-08-04T07:03:41.000Z | 2021-12-21T16:08:52.000Z | tests/test_models/test_backbones.py | ddayzzz/mmdetection | b9940c56cc19b3dda7468a5fd858b9683e93a486 | [
"Apache-2.0"
] | 24 | 2021-08-03T07:16:54.000Z | 2022-03-27T12:41:17.000Z | import pytest
import torch
from mmcv.ops import DeformConv2dPack
from torch.nn.modules import AvgPool2d, GroupNorm
from torch.nn.modules.batchnorm import _BatchNorm
from mmdet.models.backbones import (RegNet, Res2Net, ResNeSt, ResNet,
ResNetV1d, ResNeXt)
from mmdet.models.backbones.... | 34.647715 | 79 | 0.612536 |
908c0c3a883c213145b1d3fbb6cef12589c895b2 | 351 | py | Python | awacs/mobileanalytics.py | craigbruce/awacs | e1d0699409291f0ad586b86d6c55cfc54af70778 | [
"BSD-2-Clause"
] | null | null | null | awacs/mobileanalytics.py | craigbruce/awacs | e1d0699409291f0ad586b86d6c55cfc54af70778 | [
"BSD-2-Clause"
] | null | null | null | awacs/mobileanalytics.py | craigbruce/awacs | e1d0699409291f0ad586b86d6c55cfc54af70778 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2012-2013, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from aws import Action
service_name = 'Amazon Mobile Analytics'
prefix = 'mobileanalytics'
PutEvents = Action(prefix, 'PutEvents')
GetReports = Action(prefix, 'GetReports')
GetFinancialReports = Action(... | 25.071429 | 59 | 0.760684 |
a9a8fb8e70cbd435b756c66e1304424357147515 | 9,838 | py | Python | tests/test_parser.py | Tordek/modl | 1cd862479eff44541919c0a4a0cd274963f12d58 | [
"MIT"
] | 20 | 2019-02-12T15:50:08.000Z | 2021-11-19T23:05:15.000Z | tests/test_parser.py | Tordek/modl | 1cd862479eff44541919c0a4a0cd274963f12d58 | [
"MIT"
] | null | null | null | tests/test_parser.py | Tordek/modl | 1cd862479eff44541919c0a4a0cd274963f12d58 | [
"MIT"
] | null | null | null | import unittest
from modl.parser import Parser
from modl.scanner import Scanner
from modl import expr
class PrimaryTests(unittest.TestCase):
literals = {"5;": 5, '"five";': "five", "5.0;": 5.0}
def test_literals(self):
for string, literal in self.literals.items():
with self.subTest(i=stri... | 36.984962 | 76 | 0.63702 |
5572d051407640a523696e2ac071b42421db1afe | 126 | py | Python | eduu/__init__.py | Keys-007/EduuRobot | 13d75fee3b3c08cd6f1f0c6dcec5df0f542ba851 | [
"MIT"
] | null | null | null | eduu/__init__.py | Keys-007/EduuRobot | 13d75fee3b3c08cd6f1f0c6dcec5df0f542ba851 | [
"MIT"
] | null | null | null | eduu/__init__.py | Keys-007/EduuRobot | 13d75fee3b3c08cd6f1f0c6dcec5df0f542ba851 | [
"MIT"
] | null | null | null | """EduuRobot core package."""
# SPDX-License-Identifier: MIT
# Copyright (c) 2018-2022 Amano Team
__version__ = "2.0.0-beta"
| 21 | 36 | 0.706349 |
ccffe38fd8a077bc8d91e714ab4c4bb06873e046 | 1,321 | py | Python | cogs/commands.py | Manoj-Paramsetti/corona-discord-bot | 5ff6e27f818885387b9f1ed954bea7c0281fbf6e | [
"BSD-3-Clause"
] | 3 | 2021-08-19T08:36:30.000Z | 2022-01-03T14:35:57.000Z | cogs/commands.py | Manoj-Paramsetti/discord-bot | 5ff6e27f818885387b9f1ed954bea7c0281fbf6e | [
"BSD-3-Clause"
] | 4 | 2021-04-29T03:25:43.000Z | 2021-04-29T03:32:49.000Z | cogs/commands.py | Manoj-Paramsetti/discord-bot | 5ff6e27f818885387b9f1ed954bea7c0281fbf6e | [
"BSD-3-Clause"
] | null | null | null | from discord.ext import commands
from assets.getcorona import getcorona
from assets.embed import *
class commander(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name="check")
async def chack_corona(self, ctx, arg):
if arg == 'corona':
await ctx.c... | 32.219512 | 93 | 0.635882 |
1091e211a9cabc9e80bc3e29c5b11908eef7218c | 13,262 | py | Python | event/io/dataset/nombank.py | edvisees/DDSemantics | 9044e4afa6f9d6d7504de028633295f30679278d | [
"Apache-2.0"
] | null | null | null | event/io/dataset/nombank.py | edvisees/DDSemantics | 9044e4afa6f9d6d7504de028633295f30679278d | [
"Apache-2.0"
] | null | null | null | event/io/dataset/nombank.py | edvisees/DDSemantics | 9044e4afa6f9d6d7504de028633295f30679278d | [
"Apache-2.0"
] | null | null | null | import logging
import xml.etree.ElementTree as ET
from collections import defaultdict
from nltk.corpus import (
NombankCorpusReader,
BracketParseCorpusReader,
)
from nltk.corpus.reader.nombank import (
NombankChainTreePointer,
NombankSplitTreePointer,
NombankTreePointer,
)
from nltk.data import Fil... | 33.574684 | 80 | 0.558588 |
57cf7130d420d9ea7ac339598f88e6849e420141 | 1,219 | py | Python | authors/apps/articles/migrations/0002_auto_20190222_1139.py | bryan-munene/ah-bird-box | b36bb4ff7584d49ecf9fec0095c6fd59da14733e | [
"BSD-3-Clause"
] | 3 | 2019-01-28T16:19:00.000Z | 2019-02-07T11:38:58.000Z | authors/apps/articles/migrations/0002_auto_20190222_1139.py | bryan-munene/ah-bird-box | b36bb4ff7584d49ecf9fec0095c6fd59da14733e | [
"BSD-3-Clause"
] | 20 | 2019-01-29T08:37:37.000Z | 2022-03-11T23:40:32.000Z | authors/apps/articles/migrations/0002_auto_20190222_1139.py | bryan-munene/ah-bird-box | b36bb4ff7584d49ecf9fec0095c6fd59da14733e | [
"BSD-3-Clause"
] | 6 | 2019-03-09T19:12:19.000Z | 2019-10-23T07:53:51.000Z | # Generated by Django 2.1.5 on 2019-02-22 11:39
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('arti... | 31.25641 | 134 | 0.629204 |
3c65066f425d00fe112d38cd7792db25f663beb0 | 3,132 | py | Python | main.py | FrankWSamuelson/merge-sort | 524b3f355228f97e3b4ac8b10b993e8558a20cd9 | [
"CC0-1.0"
] | null | null | null | main.py | FrankWSamuelson/merge-sort | 524b3f355228f97e3b4ac8b10b993e8558a20cd9 | [
"CC0-1.0"
] | null | null | null | main.py | FrankWSamuelson/merge-sort | 524b3f355228f97e3b4ac8b10b993e8558a20cd9 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/python3.6
import pickle
import os
import sys
import numpy as np
from tqdm import tqdm
from time import sleep
from multiprocessing import Pool
from warnings import filterwarnings
filterwarnings('ignore')
from DylComp import Comparator
from DylMath import genSep
from DylSort import treeMergeSort
from DylData i... | 34.043478 | 119 | 0.686462 |
d5d39e159efe90080325bda07624da871ff63da6 | 3,535 | py | Python | modules/api/functional_test/conftest.py | exoego/vinyldns | aac4c2afe4c599ac8c96ad3a826f3a6dff887104 | [
"Apache-2.0"
] | null | null | null | modules/api/functional_test/conftest.py | exoego/vinyldns | aac4c2afe4c599ac8c96ad3a826f3a6dff887104 | [
"Apache-2.0"
] | 1 | 2019-02-06T21:38:12.000Z | 2019-02-06T21:38:12.000Z | modules/api/functional_test/conftest.py | exoego/vinyldns | aac4c2afe4c599ac8c96ad3a826f3a6dff887104 | [
"Apache-2.0"
] | null | null | null | import os
import pytest
import boto.dynamodb2
from boto.dynamodb2.table import Table
from boto.dynamodb2.fields import HashKey
from boto.dynamodb2.fields import GlobalAllIndex
from vinyldns_context import VinylDNSTestContext
def pytest_addoption(parser):
"""
Adds additional options that we can parse when we r... | 44.746835 | 112 | 0.637058 |
d2505f2e87f3affa37d8d3a3d90923756f1dcc87 | 430 | py | Python | Mundo03/016-Tuplas/desafios/ex073.py | Maycon13PB/Python3 | 8a1d55d6ae8ab67c80fffd11736422b98320a3d2 | [
"MIT"
] | null | null | null | Mundo03/016-Tuplas/desafios/ex073.py | Maycon13PB/Python3 | 8a1d55d6ae8ab67c80fffd11736422b98320a3d2 | [
"MIT"
] | null | null | null | Mundo03/016-Tuplas/desafios/ex073.py | Maycon13PB/Python3 | 8a1d55d6ae8ab67c80fffd11736422b98320a3d2 | [
"MIT"
] | null | null | null | Times = ("Palmeiras", "Atlético-MG", "Fortaleza", "Bragantino", "Flamengo", "Athletico-PR", "Ceará", "Santos", "Atlético-GO", "Bahia", "Corinthians", "Fluminense", "Juventude", "Internacional", "Sport", "Cuiabá", "São Paulo", "América-MG", "Grêmio", "Chapecoense")
print("="*50)
print(Times[:5])
print("="*50)
print(Time... | 39.090909 | 264 | 0.637209 |
37072e77944b2a0676c2bc31aeee35a5eae74a31 | 2,658 | py | Python | scripts/ensembl_gtf_to_tss_bed.py | thehyve/genetics-v2g-data | 96544d075955282ab0f8bef287a11bb782942cf7 | [
"Apache-2.0"
] | 7 | 2019-01-30T01:08:15.000Z | 2022-03-07T20:43:53.000Z | scripts/ensembl_gtf_to_tss_bed.py | thehyve/genetics-v2g-data | 96544d075955282ab0f8bef287a11bb782942cf7 | [
"Apache-2.0"
] | null | null | null | scripts/ensembl_gtf_to_tss_bed.py | thehyve/genetics-v2g-data | 96544d075955282ab0f8bef287a11bb782942cf7 | [
"Apache-2.0"
] | 5 | 2019-07-11T09:37:58.000Z | 2021-07-30T23:05:37.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Ed Mountjoy (June 2018)
Converts Ensembl GTF to bed of Gene TSS.
Notes:
- Keeps protein coding transcripts only.
'''
import argparse
import pandas as pd
def main():
# Parse args
args = parse_args()
# Read gtf in chunks to save RAM
iter_csv = p... | 28.276596 | 98 | 0.615877 |
5a9365a9336b27f17cbe8643f11208fb9fe3c3f9 | 21 | py | Python | src/qutip_qip/transpiler/__init__.py | bopardikarsoham/qutip-qip | 5b8416255c48b66c41d304f78fe39ec5c1ae3bf3 | [
"BSD-3-Clause"
] | 36 | 2020-05-22T10:51:13.000Z | 2022-03-07T05:41:08.000Z | src/qutip_qip/transpiler/__init__.py | bopardikarsoham/qutip-qip | 5b8416255c48b66c41d304f78fe39ec5c1ae3bf3 | [
"BSD-3-Clause"
] | 73 | 2020-07-14T07:26:48.000Z | 2022-03-25T08:00:43.000Z | src/qutip_qip/transpiler/__init__.py | BoxiLi/qutip-qip | 04962ded1f6f21620f06f52869b61c4f392e9dea | [
"BSD-3-Clause"
] | 24 | 2020-06-18T22:59:20.000Z | 2022-03-12T05:11:59.000Z | from .chain import *
| 10.5 | 20 | 0.714286 |
71fce56b35456194cf98fd09b08c3aa51bce4c32 | 4,892 | py | Python | model.py | brianadit24/AIGymTracker | b4c428733a09de0c171712c7fbebe1f0a9fa087d | [
"MIT"
] | 3 | 2021-07-22T12:39:50.000Z | 2022-02-26T18:53:37.000Z | model.py | brianadit24/AIGymTracker | b4c428733a09de0c171712c7fbebe1f0a9fa087d | [
"MIT"
] | null | null | null | model.py | brianadit24/AIGymTracker | b4c428733a09de0c171712c7fbebe1f0a9fa087d | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import mediapipe as mp
from src import calculate_angle as ca
# Mediapipe Tools
mp_drawing = mp.solutions.drawing_utils
mp_pose = mp.solutions.pose
cap = cv2.VideoCapture(-1)
# Curl Counter Variables
counter = 0
stage = None
## Setup Mediapipe Instance
with mp_pose.Pose(min_detection_co... | 35.708029 | 86 | 0.484056 |
6cb40a02079f21e22a68ab8d9996551944ec534c | 2,024 | py | Python | autogen/openapi_server/models/pm25.py | jeanyjean/locatitude-api | b36759f372060a3726c63edb35516303d0e85d81 | [
"MIT"
] | null | null | null | autogen/openapi_server/models/pm25.py | jeanyjean/locatitude-api | b36759f372060a3726c63edb35516303d0e85d81 | [
"MIT"
] | null | null | null | autogen/openapi_server/models/pm25.py | jeanyjean/locatitude-api | b36759f372060a3726c63edb35516303d0e85d81 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from openapi_server.models.base_model_ import Model
from openapi_server import util
class PM25(Model):
"""NOTE: This class is auto generated by OpenAPI Generator ... | 22.241758 | 96 | 0.5667 |
5c19d7a9d002fe10593520301b62597e3fa21717 | 9,824 | py | Python | forms/ui_receivePage.py | beyondcoin-project/lightning-qt | dc48fbc35b452f4149d1b601159e8f1806d4ba13 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-03-28T00:17:34.000Z | 2020-03-28T00:17:34.000Z | forms/ui_receivePage.py | beyondcoin-project/lightning-qt | dc48fbc35b452f4149d1b601159e8f1806d4ba13 | [
"BSD-3-Clause-Clear"
] | null | null | null | forms/ui_receivePage.py | beyondcoin-project/lightning-qt | dc48fbc35b452f4149d1b601159e8f1806d4ba13 | [
"BSD-3-Clause-Clear"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'forms/receivepage.ui'
#
# Created by: PyQt5 UI code generator 5.12.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_ReceivePage(object):
def setupUi(self, ReceivePage):
... | 62.573248 | 189 | 0.739719 |
9ee89e26215ee7aec4c8453a56f745997c7a011a | 311 | py | Python | controle_colaboradores_api/wsgi.py | helderlgoliveira/controle-colaboradores-api | def3f77ef547e87b6f827cb711fd0f7d1099d987 | [
"BSD-3-Clause"
] | 1 | 2021-10-17T04:28:31.000Z | 2021-10-17T04:28:31.000Z | controle_colaboradores_api/wsgi.py | helderlgoliveira/controle-colaboradores-api | def3f77ef547e87b6f827cb711fd0f7d1099d987 | [
"BSD-3-Clause"
] | null | null | null | controle_colaboradores_api/wsgi.py | helderlgoliveira/controle-colaboradores-api | def3f77ef547e87b6f827cb711fd0f7d1099d987 | [
"BSD-3-Clause"
] | null | null | null | """
WSGI config for projeto project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
| 23.923077 | 78 | 0.78135 |
99a493e851047f04ec16ebea53711920350a979a | 1,274 | py | Python | tests/unit_test/app_test.py | sidhukumar/AWS-MLOps-Abalone | 8fd3609c537f538d002cc43edef8838f02bd0809 | [
"MIT-0"
] | null | null | null | tests/unit_test/app_test.py | sidhukumar/AWS-MLOps-Abalone | 8fd3609c537f538d002cc43edef8838f02bd0809 | [
"MIT-0"
] | null | null | null | tests/unit_test/app_test.py | sidhukumar/AWS-MLOps-Abalone | 8fd3609c537f538d002cc43edef8838f02bd0809 | [
"MIT-0"
] | null | null | null | import json
from urllib import request
base_url='http://localhost:8080'
headers={"Content-type": "text/csv"}
# Toy request payload: `str()`
payload = "6.550000000000000266e-01,5.200000000000000178e-01,1.900000000000000022e-01,\
1.454499999999999904e+00,5.999999999999999778e-01,3.865000000000000102e-01,\
3.82999999999... | 32.666667 | 108 | 0.686813 |
a14706bf8bf882d7f80a2dcdf53e1a9e94b2c589 | 4,479 | py | Python | google/ads/google_ads/v5/proto/errors/access_invitation_error_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | 1 | 2021-04-09T04:28:47.000Z | 2021-04-09T04:28:47.000Z | google/ads/google_ads/v5/proto/errors/access_invitation_error_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v5/proto/errors/access_invitation_error_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v5/proto/errors/access_invitation_error.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
fro... | 42.254717 | 736 | 0.801518 |
8d0917e8de3ab495247127c7fbe4dd25bd8de252 | 3,219 | py | Python | invenio_app_ils/patrons/views.py | NRodriguezcuellar/invenio-app-ils | 144a25a6c56330b214c6fd0b832220fa71f2e68a | [
"MIT"
] | 41 | 2018-09-04T13:00:46.000Z | 2022-03-24T20:45:56.000Z | invenio_app_ils/patrons/views.py | NRodriguezcuellar/invenio-app-ils | 144a25a6c56330b214c6fd0b832220fa71f2e68a | [
"MIT"
] | 720 | 2017-03-10T08:02:41.000Z | 2022-01-14T15:36:37.000Z | invenio_app_ils/patrons/views.py | NRodriguezcuellar/invenio-app-ils | 144a25a6c56330b214c6fd0b832220fa71f2e68a | [
"MIT"
] | 54 | 2017-03-09T16:05:29.000Z | 2022-03-17T08:34:51.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 CERN.
#
# invenio-app-ils is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Invenio App ILS Patrons views."""
from elasticsearch import VERSION as ES_VERSION
from flask import Blueprint,... | 33.884211 | 78 | 0.665113 |
6b83add93c44cfa14b7ec8987a7ca53e702918e5 | 3,053 | py | Python | rptk/web.py | wolcomm/rptk | fe6c1b597741ff14e4c89519458bb0950f0aa955 | [
"Apache-2.0"
] | 15 | 2017-11-30T01:28:11.000Z | 2021-08-12T09:17:36.000Z | rptk/web.py | wolcomm/rptk | fe6c1b597741ff14e4c89519458bb0950f0aa955 | [
"Apache-2.0"
] | 71 | 2018-06-22T09:54:50.000Z | 2020-10-21T07:10:54.000Z | rptk/web.py | wolcomm/rptk | fe6c1b597741ff14e4c89519458bb0950f0aa955 | [
"Apache-2.0"
] | 2 | 2019-08-31T20:45:19.000Z | 2019-10-02T18:26:58.000Z | # Copyright (c) 2018 Workonline Communications (Pty) Ltd. All rights reserved.
#
# The contents of this file are licensed under the Apache License version 2.0
# (the "License"); you may not use this file except in compliance with the
# License.
#
# Unless required by applicable law or agreed to in writing, software
# d... | 33.184783 | 79 | 0.699312 |
d0b70a78826c76f6042f0345456bcc35907179e5 | 4,769 | py | Python | sisjuridico/apps/matenimiento/views.py | AnthonyWainer/sistemaJuridico | 83acf42fd20793ea05d6bff57322e17355893fc9 | [
"MIT"
] | null | null | null | sisjuridico/apps/matenimiento/views.py | AnthonyWainer/sistemaJuridico | 83acf42fd20793ea05d6bff57322e17355893fc9 | [
"MIT"
] | null | null | null | sisjuridico/apps/matenimiento/views.py | AnthonyWainer/sistemaJuridico | 83acf42fd20793ea05d6bff57322e17355893fc9 | [
"MIT"
] | null | null | null | from django.shortcuts import render,get_object_or_404,redirect
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from apps.seguridad.models import permisos
from .forms import formOficina, formAccion
from .models import oficina, accion
# Crea tus vista aqui.
def permi(reque... | 48.663265 | 160 | 0.658419 |
1c1c40a156ff09b4f3775134367af495862bb94c | 71,398 | py | Python | selfdrive/car/toyota/values.py | hankteng19650323/dragonpilot | 35f5828690d0e98eb605661354b50d59a8b190ba | [
"MIT"
] | 1 | 2019-09-19T12:23:26.000Z | 2019-09-19T12:23:26.000Z | selfdrive/car/toyota/values.py | hankteng19650323/dragonpilot | 35f5828690d0e98eb605661354b50d59a8b190ba | [
"MIT"
] | null | null | null | selfdrive/car/toyota/values.py | hankteng19650323/dragonpilot | 35f5828690d0e98eb605661354b50d59a8b190ba | [
"MIT"
] | null | null | null | # flake8: noqa
from cereal import car
from selfdrive.car import dbc_dict
from selfdrive.config import Conversions as CV
Ecu = car.CarParams.Ecu
MIN_ACC_SPEED = 19. * CV.MPH_TO_MS
PEDAL_TRANSITION = 10. * CV.MPH_TO_MS
class CarControllerParams:
ACCEL_MAX = 1.5 # m/s2, lower than allowed 2.0 m/s2 for tuning reason... | 42.574836 | 247 | 0.651867 |
00f56b0beeb687cea45819acad656c9af1f1cef7 | 50,640 | py | Python | pycorrector/transformers/file_utils.py | xinjianlv/pycorrector | 697fc09032d129b2777cf686bb05663f2fc3c04f | [
"Apache-2.0"
] | null | null | null | pycorrector/transformers/file_utils.py | xinjianlv/pycorrector | 697fc09032d129b2777cf686bb05663f2fc3c04f | [
"Apache-2.0"
] | null | null | null | pycorrector/transformers/file_utils.py | xinjianlv/pycorrector | 697fc09032d129b2777cf686bb05663f2fc3c04f | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The HuggingFace Team, the AllenNLP library 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
#
... | 36.01707 | 150 | 0.66329 |
50dbbb6d9f849bc73f254c38b6fe8ca6e37c0e81 | 1,595 | py | Python | pypayd/config.py | pik/pypayd | f64ef7ff90cda8f5da8844a2520aa604fbd6a9ff | [
"MIT"
] | 4 | 2015-03-02T04:01:51.000Z | 2020-01-12T04:06:34.000Z | pypayd/config.py | pik/pypayd | f64ef7ff90cda8f5da8844a2520aa604fbd6a9ff | [
"MIT"
] | 12 | 2015-03-02T06:07:17.000Z | 2016-01-19T00:43:11.000Z | pypayd/config.py | pik/pypayd | f64ef7ff90cda8f5da8844a2520aa604fbd6a9ff | [
"MIT"
] | 4 | 2015-04-30T01:49:09.000Z | 2019-06-14T11:25:50.000Z |
#Defaults - overridable via. pypayd.conf or command-line arguments
DEFAULT_KEYPATH = '0/0/1'
DEFAULT_TICKER = 'dummy'
DEFAULT_CURRENCY = 'USD'
DEFAULT_WALLET_FILE = 'wallet.txt'
DEFAULT_WALLET_PASSWORD = "foobar"
DEFAULT_MNEMONIC_TYPE = "electrumseed"
DB = None
DEFAULT_DB = "pypayd.db"
DEFAULT_TESTNET_DB = "pypayd_tes... | 29 | 94 | 0.774922 |
0ec3ba56c43776087ae529562178739f1b219f07 | 1,234 | py | Python | app/fme/fme_god_agent.py | yt7589/aqp | c9c1c79facdea7ace73e2421e8a5868d87fb58dd | [
"Apache-2.0"
] | null | null | null | app/fme/fme_god_agent.py | yt7589/aqp | c9c1c79facdea7ace73e2421e8a5868d87fb58dd | [
"Apache-2.0"
] | null | null | null | app/fme/fme_god_agent.py | yt7589/aqp | c9c1c79facdea7ace73e2421e8a5868d87fb58dd | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pandas as pd
#from stable_baselines.common.vec_env import DummyVecEnv
from app.fme.fme_env import FmeEnv
class FmeGodAgent(object):
def __init__(self):
self.name = 'FmeGodAgent'
self.test_size = 500
self.df = None
self.fme_env = None
def choose_action(... | 32.473684 | 68 | 0.537277 |
ad150a2b03359c8288fd2ad134c06bb6fc56d519 | 2,497 | py | Python | compiler/tests/02_library_lvs_test.py | mguthaus/OpenRAM | 46c86d3bb3df82e150532ede75cbf6180a697cfd | [
"BSD-3-Clause"
] | 43 | 2016-11-06T20:53:46.000Z | 2021-09-03T18:57:39.000Z | compiler/tests/02_library_lvs_test.py | mguthaus/OpenRAM | 46c86d3bb3df82e150532ede75cbf6180a697cfd | [
"BSD-3-Clause"
] | 27 | 2016-11-15T19:28:25.000Z | 2018-02-20T19:23:52.000Z | compiler/tests/02_library_lvs_test.py | mguthaus/OpenRAM | 46c86d3bb3df82e150532ede75cbf6180a697cfd | [
"BSD-3-Clause"
] | 30 | 2016-11-09T16:02:45.000Z | 2018-02-23T17:07:59.000Z | #!/usr/bin/env python3
# See LICENSE for licensing information.
#
# Copyright (c) 2016-2019 Regents of the University of California and The Board
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
import unittest
from test... | 32.855263 | 79 | 0.637165 |
864797b5f2e1a871f46710b6fb3f280a5f979d83 | 831 | py | Python | generate_time_images.py | eVoloshchak/telegramTimeAvatar | 0a43a8725941fb3f7433ae1fb2abd21cfb95eccf | [
"MIT"
] | null | null | null | generate_time_images.py | eVoloshchak/telegramTimeAvatar | 0a43a8725941fb3f7433ae1fb2abd21cfb95eccf | [
"MIT"
] | null | null | null | generate_time_images.py | eVoloshchak/telegramTimeAvatar | 0a43a8725941fb3f7433ae1fb2abd21cfb95eccf | [
"MIT"
] | null | null | null | from utils import *
from config import *
import cv2
import os.path
import numpy as np
from datetime import datetime, timedelta
def get_black_background():
return np.zeros((500, 500))
start_time = datetime.strptime("2019-01-01", "%Y-%m-%d")
end_time = start_time + timedelta(days=1)
def generate_image_with_text(te... | 30.777778 | 122 | 0.705174 |
f6a73dfe472b40977087877e59438893eb4a92ca | 706 | py | Python | slack_bolt/workflows/step/utilities/async_configure.py | korymath/bolt-python | 67e0286d756ba92510315d044303f43b03380b52 | [
"MIT"
] | 1 | 2021-05-02T16:06:44.000Z | 2021-05-02T16:06:44.000Z | slack_bolt/workflows/step/utilities/async_configure.py | korymath/bolt-python | 67e0286d756ba92510315d044303f43b03380b52 | [
"MIT"
] | 1 | 2021-02-23T21:05:57.000Z | 2021-02-23T21:05:57.000Z | slack_bolt/workflows/step/utilities/async_configure.py | korymath/bolt-python | 67e0286d756ba92510315d044303f43b03380b52 | [
"MIT"
] | null | null | null | from typing import Optional, Union, Sequence
from slack_sdk.web.async_client import AsyncWebClient
from slack_sdk.models.blocks import Block
class AsyncConfigure:
def __init__(self, *, callback_id: str, client: AsyncWebClient, body: dict):
self.callback_id = callback_id
self.client = client
... | 29.416667 | 80 | 0.604816 |
fe2df9a3293e295977fe3e91f4233a3432c4ee57 | 2,011 | py | Python | projectmanager/migrations/0001_initial.py | AbhijithGanesh/Django-Custom-Authentication | ea2fdac47eabe09e22de586dc16f0adaedf08b3a | [
"BSD-3-Clause"
] | null | null | null | projectmanager/migrations/0001_initial.py | AbhijithGanesh/Django-Custom-Authentication | ea2fdac47eabe09e22de586dc16f0adaedf08b3a | [
"BSD-3-Clause"
] | null | null | null | projectmanager/migrations/0001_initial.py | AbhijithGanesh/Django-Custom-Authentication | ea2fdac47eabe09e22de586dc16f0adaedf08b3a | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 3.2.4 on 2021-06-19 16:11
from django.db import migrations, models
import django.db.models.deletion
import projectmanager.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Employee'... | 41.040816 | 130 | 0.594232 |
c1b7b5219ebc79488daddd744b34bb02759459c4 | 4,433 | py | Python | setup.py | coppelia517/stve | dd23cc83e7a516e3f2ea9984aabb0cb407a30647 | [
"MIT"
] | null | null | null | setup.py | coppelia517/stve | dd23cc83e7a516e3f2ea9984aabb0cb407a30647 | [
"MIT"
] | 9 | 2021-03-18T20:25:04.000Z | 2022-01-13T00:44:11.000Z | setup.py | coppelia517/stve | dd23cc83e7a516e3f2ea9984aabb0cb407a30647 | [
"MIT"
] | null | null | null | import os
import sys
import codecs
from distutils.util import convert_path
from fnmatch import fnmatchcase
from setuptools import setup, find_packages
def read(filename):
return codecs.open(os.path.join(os.path.dirname(__file__), filename)).read()
standard_exclude = ["*.py", "*.pyc", "*$py.class", "*~... | 38.215517 | 114 | 0.540041 |
09091c4effc170b3f7b20bf1ce1dd5c92a1158c3 | 1,276 | py | Python | SC101_Assignment0/coin_flip_runs.py | hanklee2023/stanCode101 | 69d6a2cc575b037b17f3b77d13ef61a712d9049e | [
"MIT"
] | null | null | null | SC101_Assignment0/coin_flip_runs.py | hanklee2023/stanCode101 | 69d6a2cc575b037b17f3b77d13ef61a712d9049e | [
"MIT"
] | null | null | null | SC101_Assignment0/coin_flip_runs.py | hanklee2023/stanCode101 | 69d6a2cc575b037b17f3b77d13ef61a712d9049e | [
"MIT"
] | null | null | null | """
File: coin_flip_runs.py
Name:
-----------------------
This program should simulate coin flip(s)
with the number of runs input by users.
A 'run' is defined as consecutive results
on either 'H' or 'T'. For example, 'HHHHHTHTT'
is regarded as a 2-run result.
Your program should stop immediately after your
coin flip re... | 19.630769 | 63 | 0.623041 |
da1c4785d7a20d5ed60ed7d1a25490b7c75bc9df | 627 | py | Python | backend/manage.py | mbranko/webshop | b7c2ebb8720922f5277fee98fe826e54760b29d2 | [
"MIT"
] | null | null | null | backend/manage.py | mbranko/webshop | b7c2ebb8720922f5277fee98fe826e54760b29d2 | [
"MIT"
] | 5 | 2021-03-19T01:53:49.000Z | 2022-03-02T08:11:51.000Z | backend/manage.py | mbranko/webshop | b7c2ebb8720922f5277fee98fe826e54760b29d2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'webshop.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Import... | 28.5 | 73 | 0.682616 |
4da13b923d4a807e312d8b5a111f4e1366657894 | 8,811 | py | Python | neutron/tests/unit/extensions/test_external_net.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | 4 | 2018-08-05T00:43:03.000Z | 2021-10-13T00:45:45.000Z | neutron/tests/unit/extensions/test_external_net.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | 8 | 2018-06-14T14:50:16.000Z | 2018-11-13T16:30:42.000Z | neutron/tests/unit/extensions/test_external_net.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | 7 | 2018-06-12T18:57:04.000Z | 2019-05-09T15:42:30.000Z | # Copyright (c) 2013 OpenStack Foundation.
# 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... | 44.954082 | 78 | 0.615367 |
98a1db7fe1a989394505a20157f8a16c9c511ad0 | 12,498 | py | Python | tensorflow/python/ops/control_flow_util_v2.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 3 | 2019-04-01T09:22:17.000Z | 2020-01-20T16:33:22.000Z | tensorflow/python/ops/control_flow_util_v2.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 3 | 2019-03-21T17:56:51.000Z | 2019-11-13T21:02:35.000Z | tensorflow/python/ops/control_flow_util_v2.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 3 | 2019-04-01T09:22:18.000Z | 2019-06-21T06:47:12.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.316129 | 80 | 0.74756 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.