hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bba92e1e20cfe9edec4e03afe4a6d75583a1ea97 | 3,473 | py | Python | test/scenario_test/flow_spec_test.py | Axellant/gobgp | 840755be18f226b202759aea8318de20ccc32057 | [
"Apache-2.0"
] | null | null | null | test/scenario_test/flow_spec_test.py | Axellant/gobgp | 840755be18f226b202759aea8318de20ccc32057 | [
"Apache-2.0"
] | null | null | null | test/scenario_test/flow_spec_test.py | Axellant/gobgp | 840755be18f226b202759aea8318de20ccc32057 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.557895 | 86 | 0.660236 |
ef228f92c4055f540c9c94def5f1a8641a0a506b | 6,570 | py | Python | configs/self6dpp/ssHB/ss_dibr_mlBCE_FreezeBN_woCenter_refinePM10_10e_train_diffRatio/ss_dibr_mlBCE_FreezeBN_woCenter_refinePM10_10e_train900/ss_dibr_mlBCE_FreezeBN_woCenter_refinePM10_10e_train900_benchvise.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 33 | 2021-12-15T07:11:47.000Z | 2022-03-29T08:58:32.000Z | configs/self6dpp/ssHB/ss_dibr_mlBCE_FreezeBN_woCenter_refinePM10_10e_train_diffRatio/ss_dibr_mlBCE_FreezeBN_woCenter_refinePM10_10e_train900/ss_dibr_mlBCE_FreezeBN_woCenter_refinePM10_10e_train900_benchvise.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 3 | 2021-12-15T11:39:54.000Z | 2022-03-29T07:24:23.000Z | configs/self6dpp/ssHB/ss_dibr_mlBCE_FreezeBN_woCenter_refinePM10_10e_train_diffRatio/ss_dibr_mlBCE_FreezeBN_woCenter_refinePM10_10e_train900/ss_dibr_mlBCE_FreezeBN_woCenter_refinePM10_10e_train900_benchvise.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | null | null | null | _base_ = ["../../../../_base_/self6dpp_base.py"]
# refiner_cfg_path = "configs/_base_/self6dpp_refiner_base.py"
OUTPUT_DIR = "output/self6dpp/ssHB/ss_dibr_mlBCE_FreezeBN_woCenter_refinePM10_10e_train900/benchvise"
INPUT = dict(
WITH_DEPTH=True,
DZI_PAD_SCALE=1.5,
TRUNCATE_FG=False,
CHANGE_BG_PROB=0.5,
... | 37.758621 | 158 | 0.567732 |
18207358204d6224d2679830f5a7ca750a63ab48 | 1,676 | py | Python | windows_packages_gpu/torch/multiprocessing/pool.py | codeproject/DeepStack | d96368a3db1bc0266cb500ba3701d130834da0e6 | [
"Apache-2.0"
] | 353 | 2020-12-10T10:47:17.000Z | 2022-03-31T23:08:29.000Z | windows_packages_gpu/torch/multiprocessing/pool.py | codeproject/DeepStack | d96368a3db1bc0266cb500ba3701d130834da0e6 | [
"Apache-2.0"
] | 80 | 2020-12-10T09:54:22.000Z | 2022-03-30T22:08:45.000Z | windows_packages_gpu/torch/multiprocessing/pool.py | codeproject/DeepStack | d96368a3db1bc0266cb500ba3701d130834da0e6 | [
"Apache-2.0"
] | 63 | 2020-12-10T17:10:34.000Z | 2022-03-28T16:27:07.000Z | import multiprocessing
import multiprocessing.pool
import multiprocessing.util as util
from .queue import SimpleQueue
def clean_worker(*args, **kwargs):
import gc
multiprocessing.pool.worker(*args, **kwargs)
# Regular multiprocessing workers don't fully clean up after themselves,
# so we h... | 37.244444 | 80 | 0.634248 |
a11d0aa0c8f21b8ab4eddae929916fa73c19d28f | 3,796 | py | Python | sdk/python/pulumi_azure_native/devices/v20200301/get_certificate.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devices/v20200301/get_certificate.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devices/v20200301/get_certificate.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 31.114754 | 137 | 0.628293 |
32b4e552b8710c6635a81e843533182577899213 | 5,337 | py | Python | withdrawall.py | Nugetzrul3/Magi-Tip | ac86aaf7bc0708dd1c43071da28b5b4b922bfe37 | [
"MIT"
] | null | null | null | withdrawall.py | Nugetzrul3/Magi-Tip | ac86aaf7bc0708dd1c43071da28b5b4b922bfe37 | [
"MIT"
] | null | null | null | withdrawall.py | Nugetzrul3/Magi-Tip | ac86aaf7bc0708dd1c43071da28b5b4b922bfe37 | [
"MIT"
] | null | null | null | from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from decimal import Decimal
import discord
from discord.ext import commands
import user_db
import config
# connect to coind
rpc_connection = 'http://{0}:{1}@{2}:{3}'.format(config.rpc_user, config.rpc_password, config.ip, config.rpc_port)
class With... | 48.081081 | 173 | 0.526888 |
b1d4f8d6a8da5a45817f42c56a9701acae69b8e7 | 815 | py | Python | src/resources/user.py | ardydedase/flask-postgres-api | d9edb69988f89f480d595a8b111fafeb7ae81234 | [
"MIT"
] | 3 | 2020-10-08T03:06:51.000Z | 2021-04-28T12:31:46.000Z | src/resources/user.py | ardydedase/flask-postgres-api | d9edb69988f89f480d595a8b111fafeb7ae81234 | [
"MIT"
] | null | null | null | src/resources/user.py | ardydedase/flask-postgres-api | d9edb69988f89f480d595a8b111fafeb7ae81234 | [
"MIT"
] | 6 | 2020-08-11T10:58:30.000Z | 2021-09-09T03:57:37.000Z | from flask import request, jsonify
from flask_restful import Resource
from repositories import UserRepository
class User(Resource):
def get(self, username: str):
# TODO: error handler
# move to another resource
user = UserRepository.get(username)
return user, 200
class UserList(... | 27.166667 | 62 | 0.619632 |
b2e4ad7ffe2973a8153b0d4c38ef37164bd70a23 | 5,799 | py | Python | service/workflow/workflow_base_service.py | jzx1230/myloonflow | 879a6d578b4fc17baf0f02e1ae5431931a6d2237 | [
"MIT"
] | null | null | null | service/workflow/workflow_base_service.py | jzx1230/myloonflow | 879a6d578b4fc17baf0f02e1ae5431931a6d2237 | [
"MIT"
] | null | null | null | service/workflow/workflow_base_service.py | jzx1230/myloonflow | 879a6d578b4fc17baf0f02e1ae5431931a6d2237 | [
"MIT"
] | null | null | null | import json
from django.db.models import Q
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from apps.workflow.models import Workflow
from service.base_service import BaseService
from service.common.log_service import auto_log
from service.account.account_base_service import AccountBaseService
... | 46.392 | 247 | 0.67322 |
9064be8d8119ed4a5c66f787b6e95df1fd135987 | 526 | py | Python | analyzeapp/extensions.py | topdeveloper424/DataAnalyzer-Flask- | 94724d77d993617d362a9c0cfc3f6be458089723 | [
"BSD-2-Clause"
] | 1 | 2019-05-11T16:34:51.000Z | 2019-05-11T16:34:51.000Z | analyzeapp/extensions.py | AShark1001/DataAnalyze | 2e1e28d4ef3802693617c557d9c573dd4c8cf0e0 | [
"BSD-2-Clause"
] | 2 | 2019-07-05T14:59:22.000Z | 2019-07-05T15:26:52.000Z | analyzeapp/extensions.py | AShark1001/DataAnalyze | 2e1e28d4ef3802693617c557d9c573dd4c8cf0e0 | [
"BSD-2-Clause"
] | null | null | null | from flask_cache import Cache
from flask_debugtoolbar import DebugToolbarExtension
from flask_login import LoginManager
from flask_assets import Environment
from analyzeapp.models import User
# Setup flask cache
cache = Cache()
# init flask assets
assets_env = Environment()
debug_toolbar = DebugToolbarExtension()
... | 21.916667 | 52 | 0.819392 |
679c081a0adeb646031205f3413b76d4ddf82548 | 4,279 | py | Python | tests/test_dask.py | kratsg/coffea | ec70b898677e03eecc5003177b26b3a42692a4b3 | [
"BSD-3-Clause"
] | 77 | 2019-06-09T14:23:33.000Z | 2022-03-22T21:34:01.000Z | tests/test_dask.py | kratsg/coffea | ec70b898677e03eecc5003177b26b3a42692a4b3 | [
"BSD-3-Clause"
] | 353 | 2019-06-05T23:54:39.000Z | 2022-03-31T21:21:47.000Z | tests/test_dask.py | kratsg/coffea | ec70b898677e03eecc5003177b26b3a42692a4b3 | [
"BSD-3-Clause"
] | 71 | 2019-06-07T02:04:11.000Z | 2022-03-05T21:03:45.000Z | from __future__ import print_function, division
from coffea import processor
import pytest
def do_dask_job(client, filelist, compression=0):
from coffea.processor.test_items import NanoTestProcessor
executor = processor.DaskExecutor(client=client, compression=compression)
run = processor.Runner(executor... | 33.960317 | 128 | 0.641739 |
e959b18eefe29c9ac202491f37df80a502fc05fd | 16,339 | py | Python | helm/dagster/schema/schema_tests/test_user_deployments.py | Andrew-Crosby/dagster | e646625a687dc656bdd855d88b868de957b37b62 | [
"Apache-2.0"
] | null | null | null | helm/dagster/schema/schema_tests/test_user_deployments.py | Andrew-Crosby/dagster | e646625a687dc656bdd855d88b868de957b37b62 | [
"Apache-2.0"
] | null | null | null | helm/dagster/schema/schema_tests/test_user_deployments.py | Andrew-Crosby/dagster | e646625a687dc656bdd855d88b868de957b37b62 | [
"Apache-2.0"
] | null | null | null | import json
import subprocess
from typing import List
import pytest
from kubernetes.client import models
from schema.charts.dagster.values import DagsterHelmValues
from schema.charts.dagster_user_deployments.subschema.user_deployments import UserDeployments
from schema.charts.utils import kubernetes
from .helm_templa... | 36.634529 | 100 | 0.672624 |
6787b74298f1830413742e591bfd17b63b3bdaff | 430 | py | Python | module/elasticsearch/cursor.py | KentWangYQ/mongo2es | 8952640e8ac3f2b1aa6845082fce04b7c4f7bd1e | [
"Apache-2.0"
] | 5 | 2018-12-24T10:45:56.000Z | 2019-07-29T07:26:28.000Z | module/elasticsearch/cursor.py | KentWangYQ/mongo2es | 8952640e8ac3f2b1aa6845082fce04b7c4f7bd1e | [
"Apache-2.0"
] | null | null | null | module/elasticsearch/cursor.py | KentWangYQ/mongo2es | 8952640e8ac3f2b1aa6845082fce04b7c4f7bd1e | [
"Apache-2.0"
] | 2 | 2019-07-30T06:27:49.000Z | 2021-09-24T08:21:52.000Z | # -*- coding: utf-8 -*-
class Cursor(object):
def __init__(self, total=0, limit=100, skip=0, count=0, filter=None, projection=None, pop_fields=None,
pipeline=None):
self.total = total
self.limit = limit
self.skip = skip
self.count = count
self.filter = filt... | 28.666667 | 106 | 0.593023 |
b8f8e3968916d639a8a7427a3f0772d955054fc0 | 49,540 | py | Python | cms/tests/placeholder.py | intgr/django-cms | 92edf033ccc0938e41f3752935516572c3623695 | [
"BSD-3-Clause"
] | 1 | 2015-09-28T10:07:41.000Z | 2015-09-28T10:07:41.000Z | cms/tests/placeholder.py | intgr/django-cms | 92edf033ccc0938e41f3752935516572c3623695 | [
"BSD-3-Clause"
] | null | null | null | cms/tests/placeholder.py | intgr/django-cms | 92edf033ccc0938e41f3752935516572c3623695 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import with_statement
import itertools
from cms.toolbar.toolbar import CMSToolbar
from sekizai.context import SekizaiContext
import warnings
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.models import Permission
from django.contrib.me... | 43.801945 | 186 | 0.628603 |
42302c2ca9b88636d9a09fbcc71c7c9dc33211c7 | 9,690 | py | Python | src/launch_aggregation_term_evaluation.py | Jie317/WordEmbeddingsAnalysis | e412782aa135a452894b0ab1f0cc4e5df037a0d8 | [
"Apache-2.0"
] | 1 | 2017-08-11T13:23:08.000Z | 2017-08-11T13:23:08.000Z | src/launch_aggregation_term_evaluation.py | Jie317/WordEmbeddingsEvaluation | e412782aa135a452894b0ab1f0cc4e5df037a0d8 | [
"Apache-2.0"
] | null | null | null | src/launch_aggregation_term_evaluation.py | Jie317/WordEmbeddingsEvaluation | e412782aa135a452894b0ab1f0cc4e5df037a0d8 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
import glob, time, sys, os
import numpy as np
from sklearn.cross_validation import KFold
from tools.neural_network import simple_neural_network
from tools.tflearn_neural_network import tflearn_DNN_training
help_s = '''
A script to aggregate the models by applying a set of weights to each model. The... | 41.234043 | 300 | 0.685346 |
d1d9907e9013d3d857f3263a78f6005026f33653 | 5,224 | py | Python | tests/fixtures/auth0.py | techdragon/django-auth0-auth | 418de8adee28a7dc079af1ed84985239b715a258 | [
"BSD-2-Clause"
] | 4 | 2017-11-20T02:56:09.000Z | 2019-06-27T13:20:54.000Z | tests/fixtures/auth0.py | techdragon/django-auth0-auth | 418de8adee28a7dc079af1ed84985239b715a258 | [
"BSD-2-Clause"
] | 1 | 2021-05-10T17:30:21.000Z | 2021-05-10T17:30:21.000Z | tests/fixtures/auth0.py | techdragon/django-auth0-auth | 418de8adee28a7dc079af1ed84985239b715a258 | [
"BSD-2-Clause"
] | null | null | null | import logging
import pytest
from test_app.models import Auth0User
from tests.utils.auth0 import (
create_auth0_users_and_confirm,
delete_all_auth0_users as delete_all_auth0_users_via_api,
delete_all_auth0_users_with_confirmation,
pause_and_confirm_total_auth0_users,
)
logger = logging.getLogger(__n... | 33.487179 | 100 | 0.744257 |
629d6ae4a3d4343c372d5b81ac57e23872abd030 | 696 | py | Python | register/views/confirmation.py | Ajuajmal/heroku | f23aad8c392a273caf0da39cedeec4746ded29dc | [
"0BSD"
] | null | null | null | register/views/confirmation.py | Ajuajmal/heroku | f23aad8c392a273caf0da39cedeec4746ded29dc | [
"0BSD"
] | null | null | null | register/views/confirmation.py | Ajuajmal/heroku | f23aad8c392a273caf0da39cedeec4746ded29dc | [
"0BSD"
] | null | null | null | from django.forms import Form
from django.urls import reverse
from register.models.attendee import Attendee
from register.views.core import RegisterStep
class ConfirmationView(RegisterStep):
title = 'Confirmation'
form_class = Form
template_name = 'register/page/confirmation.html'
def get_context_da... | 26.769231 | 71 | 0.679598 |
37395206fca18fff502ff574c63566be4b57318e | 12,977 | py | Python | rllib/utils/test_utils.py | AnesBenmerzoug/ray | 5921e87ecd4e359fad60dab55f45855456d591e5 | [
"Apache-2.0"
] | null | null | null | rllib/utils/test_utils.py | AnesBenmerzoug/ray | 5921e87ecd4e359fad60dab55f45855456d591e5 | [
"Apache-2.0"
] | null | null | null | rllib/utils/test_utils.py | AnesBenmerzoug/ray | 5921e87ecd4e359fad60dab55f45855456d591e5 | [
"Apache-2.0"
] | null | null | null | import gym
import logging
import numpy as np
from ray.rllib.utils.framework import try_import_tf, try_import_torch
tf1, tf, tfv = try_import_tf()
if tf1:
eager_mode = None
try:
from tensorflow.python.eager.context import eager_mode
except (ImportError, ModuleNotFoundError):
pass
torch, _ ... | 37.833819 | 79 | 0.525314 |
6ff06df311c141158fb9b551d3146e6a15a03513 | 1,016 | py | Python | model.py | DakshMiglani/Cartpole-1 | d19f5fa8ba3aebab811ae3782af1a3a96b36c376 | [
"MIT"
] | null | null | null | model.py | DakshMiglani/Cartpole-1 | d19f5fa8ba3aebab811ae3782af1a3a96b36c376 | [
"MIT"
] | null | null | null | model.py | DakshMiglani/Cartpole-1 | d19f5fa8ba3aebab811ae3782af1a3a96b36c376 | [
"MIT"
] | null | null | null | import tflearn
def create_model(input_size, output_nodes, learning_rate, dir):
nn = tflearn.input_data(shape=[None, input_size, 1], name='input')
nn = tflearn.fully_connected(nn, 128, activation='relu')
nn = tflearn.dropout(nn, 0.8)
nn = tflearn.fully_connected(nn, 256, activation='relu')
nn = tflearn.dropout(n... | 33.866667 | 80 | 0.726378 |
dec7223b1c0f51d091d8176e835e9c6d53281072 | 512 | py | Python | packages/python/plotly/plotly/validators/pie/marker/__init__.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/pie/marker/__init__.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/pie/marker/__init__.py | labaran1/plotly.py | 7ec751e8fed4a570c11ea4bea2231806389d62eb | [
"MIT"
] | null | null | null | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._line import LineValidator
from ._colorssrc import ColorssrcValidator
from ._colors import ColorsValidator
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = rela... | 25.6 | 55 | 0.658203 |
8ea747f854f9b89f7ca9b8006a63be041fb30bd4 | 288 | py | Python | Others/code_festival/CODE_FESTIVAL_2017_qual_B/ProblemA.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | Others/code_festival/CODE_FESTIVAL_2017_qual_B/ProblemA.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | Others/code_festival/CODE_FESTIVAL_2017_qual_B/ProblemA.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | '''input
0
0
0
0
0
0
0
0
0
240
600
1800
3600
4800
7200
10000
0
10000
10400
10300
10100
9800
9500
8500
7000
5000
10400
10400
'''
# -*- coding: utf-8 -*-
# CODE THANKS FESTIVAL 2017 A
# Problem A
if __name__ == '__main__':
ts = [int(input()) for _ in range(8)]
print(max(ts))
| 6.697674 | 41 | 0.635417 |
85a31b694ac2fc23be9fe319f347cd9cb924b110 | 1,939 | py | Python | PreprocessText.py | prtshshrm/SpamClassifier | af11d445862cecbb95677acbcf1fc2c9dee8dc81 | [
"Unlicense"
] | null | null | null | PreprocessText.py | prtshshrm/SpamClassifier | af11d445862cecbb95677acbcf1fc2c9dee8dc81 | [
"Unlicense"
] | null | null | null | PreprocessText.py | prtshshrm/SpamClassifier | af11d445862cecbb95677acbcf1fc2c9dee8dc81 | [
"Unlicense"
] | null | null | null | #Loads data and preprocesses it
import nltk
import pandas as pd
import numpy as np
from sklearn.preprocessing import LabelEncoder
from nltk.corpus import stopwords
def loadData(file_name):
df=pd.read_table(file_name, header=None, encoding='utf-8')
return df
def encodeMessages(df):
classes=df[0]
encoder=LabelEncod... | 33.431034 | 115 | 0.725116 |
e6c00de097ad6d930aa204f5f121b3d74f08d05f | 15,772 | py | Python | lib/sqlalchemy/testing/assertsql.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | lib/sqlalchemy/testing/assertsql.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | lib/sqlalchemy/testing/assertsql.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | # testing/assertsql.py
# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
from __future__ import annotations
import collections
import contextlib
impor... | 32.386037 | 77 | 0.577352 |
45873d2f408f319afc8ad2fbf865f25b5601f790 | 35,682 | py | Python | skipole/ski/widgets/inputforms.py | bernie-skipole/skipole | b45d3291c593e7c03c053ab4f192f1ecc5c3e9b9 | [
"MIT"
] | null | null | null | skipole/ski/widgets/inputforms.py | bernie-skipole/skipole | b45d3291c593e7c03c053ab4f192f1ecc5c3e9b9 | [
"MIT"
] | null | null | null | skipole/ski/widgets/inputforms.py | bernie-skipole/skipole | b45d3291c593e7c03c053ab4f192f1ecc5c3e9b9 | [
"MIT"
] | null | null | null |
"""Contains form widgets, these have 'container' functionality - they can contain further html and widgets, typically
further input fields. The module also has an Hidden Field and Submit Button widgets, which can be inserted into
a form. """
from .. import skiboot, tag
from . import Widget, ClosedWidget,... | 46.826772 | 151 | 0.596267 |
ae57387ca255dd09d90695652f0c3c7efe18c799 | 25 | py | Python | clearml/version.py | H4dr1en/trains | 642c1130ad1f76db10ed9b8e1a4ff0fd7e45b3cc | [
"Apache-2.0"
] | null | null | null | clearml/version.py | H4dr1en/trains | 642c1130ad1f76db10ed9b8e1a4ff0fd7e45b3cc | [
"Apache-2.0"
] | null | null | null | clearml/version.py | H4dr1en/trains | 642c1130ad1f76db10ed9b8e1a4ff0fd7e45b3cc | [
"Apache-2.0"
] | null | null | null | __version__ = '1.1.5rc3'
| 12.5 | 24 | 0.68 |
330fb60aa85b749ba65c897b6150c15962669c24 | 59,435 | py | Python | lynx_code/network.py | enkrypter/Lynx-wallet | 166b7e5810f017a6e12bf96e54b0d44767b2a901 | [
"MIT"
] | null | null | null | lynx_code/network.py | enkrypter/Lynx-wallet | 166b7e5810f017a6e12bf96e54b0d44767b2a901 | [
"MIT"
] | null | null | null | lynx_code/network.py | enkrypter/Lynx-wallet | 166b7e5810f017a6e12bf96e54b0d44767b2a901 | [
"MIT"
] | null | null | null | # Electrum - Lightweight Bitcoin Client
# Copyright (c) 2011-2016 Thomas Voegtlin
#
# 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 rig... | 42.514306 | 124 | 0.618659 |
4807ff9ea9ae20d63575451c718006e17884d96c | 12,488 | py | Python | src/parascopy/inner/genome.py | emikoifish/parascopy | 4b43f0e16cfa135c953dacd06b08cd25b93ca578 | [
"MIT"
] | null | null | null | src/parascopy/inner/genome.py | emikoifish/parascopy | 4b43f0e16cfa135c953dacd06b08cd25b93ca578 | [
"MIT"
] | null | null | null | src/parascopy/inner/genome.py | emikoifish/parascopy | 4b43f0e16cfa135c953dacd06b08cd25b93ca578 | [
"MIT"
] | null | null | null | import pysam
import re
import sys
from . import common
class OnlyChromNames:
def __init__(self, names):
self._names = names
def chrom_name(self, chrom_id):
return self._names[chrom_id]
class ChromNames:
def __init__(self, names, lengths):
self._names = names
self._ids =... | 31.142145 | 111 | 0.599455 |
09d59e8e9a1a7905ab9e6d73c6978056c16497ad | 83,980 | py | Python | lib/werkzeug/datastructures.py | Slashbunny/maraschino | 941a0f82a352e9c178e701d5156711b613f7f6db | [
"MIT"
] | 137 | 2015-01-12T19:29:04.000Z | 2022-02-25T04:51:02.000Z | lib/werkzeug/datastructures.py | Slashbunny/maraschino | 941a0f82a352e9c178e701d5156711b613f7f6db | [
"MIT"
] | 24 | 2015-01-06T08:36:13.000Z | 2019-04-08T13:59:05.000Z | lib/werkzeug/datastructures.py | Slashbunny/maraschino | 941a0f82a352e9c178e701d5156711b613f7f6db | [
"MIT"
] | 57 | 2015-01-01T00:42:44.000Z | 2022-03-10T20:54:41.000Z | # -*- coding: utf-8 -*-
"""
werkzeug.datastructures
~~~~~~~~~~~~~~~~~~~~~~~
This module provides mixins and classes with an immutable interface.
:copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import re
import codecs
import ... | 32.626263 | 83 | 0.58602 |
7c69129b6cced3c0efdd5f70dd54e6615a3e11f3 | 738 | py | Python | AlgoExpert-Array/SpiralTraversal.py | betaSolver05609/LeetCode | 0e7386e7ead80597e2893ec45f6dc6dfcd5d694b | [
"MIT"
] | null | null | null | AlgoExpert-Array/SpiralTraversal.py | betaSolver05609/LeetCode | 0e7386e7ead80597e2893ec45f6dc6dfcd5d694b | [
"MIT"
] | null | null | null | AlgoExpert-Array/SpiralTraversal.py | betaSolver05609/LeetCode | 0e7386e7ead80597e2893ec45f6dc6dfcd5d694b | [
"MIT"
] | null | null | null | #Spiral Traversal
def spiralTraverse(array):
# Write your code here.
result=[]
startRow=0
startCol=0
endRow=len(array)-1
endCol=len(array[0])-1
while startRow<=endRow and startCol<=endCol:
for col in range(startCol, endCol+1):
print(col)
result.append(array[startRow][col])
for row in range(startRow... | 22.363636 | 49 | 0.691057 |
13ded90303ca12e3b961849b225afc50c85c500b | 9,891 | py | Python | docs/conf.py | jaor/flatline | dabccdfd5b70520cbe99afa86a8fcf3f6a9dbd93 | [
"Apache-2.0"
] | 18 | 2015-04-06T22:06:03.000Z | 2021-10-29T22:05:23.000Z | docs/conf.py | jaor/flatline | dabccdfd5b70520cbe99afa86a8fcf3f6a9dbd93 | [
"Apache-2.0"
] | 5 | 2015-03-09T19:43:18.000Z | 2015-12-03T19:24:21.000Z | docs/conf.py | jaor/flatline | dabccdfd5b70520cbe99afa86a8fcf3f6a9dbd93 | [
"Apache-2.0"
] | 11 | 2015-02-16T22:38:46.000Z | 2020-09-24T08:37:04.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Flatline documentation build configuration file, created by
# sphinx-quickstart on Tue Jan 10 00:20:23 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
# a... | 28.504323 | 80 | 0.702558 |
f45a09c1ebf0f43e72c54554e40b85fbf60b0583 | 10,271 | py | Python | dataset/dataset.py | VedaSmartMathSolver/image-to-latex | 978f196c51912aa3ee72484907c984648f870694 | [
"MIT"
] | null | null | null | dataset/dataset.py | VedaSmartMathSolver/image-to-latex | 978f196c51912aa3ee72484907c984648f870694 | [
"MIT"
] | null | null | null | dataset/dataset.py | VedaSmartMathSolver/image-to-latex | 978f196c51912aa3ee72484907c984648f870694 | [
"MIT"
] | null | null | null | import albumentations as alb
from albumentations.pytorch import ToTensorV2
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils.rnn import pad_sequence
import torch.utils.data as data
from torchvision import transforms
import numpy as np
import imagesize
import logging
import glob
impo... | 40.596838 | 137 | 0.60442 |
7da7317926e8edb5b1066fd1642d6b5a2acba52c | 14,862 | py | Python | website/addons/base/views.py | dplorimer/osf | 9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6 | [
"Apache-2.0"
] | null | null | null | website/addons/base/views.py | dplorimer/osf | 9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6 | [
"Apache-2.0"
] | null | null | null | website/addons/base/views.py | dplorimer/osf | 9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import uuid
import httplib
import functools
import furl
from flask import request
from flask import redirect
from flask import make_response
from modularodm.exceptions import NoResultsFound
from framework.auth import Auth
from framework.sessions import session
from framework.sentry ... | 32.099352 | 129 | 0.634302 |
dd538814886b7edcabafb1cd941cc45cd5657a4b | 15,854 | py | Python | lib/mplcairo/base.py | briennakh/mplcairo | 60456018425381b49d9ab1119be4dcdb78f20091 | [
"MIT"
] | null | null | null | lib/mplcairo/base.py | briennakh/mplcairo | 60456018425381b49d9ab1119be4dcdb78f20091 | [
"MIT"
] | null | null | null | lib/mplcairo/base.py | briennakh/mplcairo | 60456018425381b49d9ab1119be4dcdb78f20091 | [
"MIT"
] | null | null | null | from collections import OrderedDict
import functools
from functools import partial, partialmethod
from gzip import GzipFile
import logging
import os
from pathlib import Path
import shutil
import sys
from tempfile import TemporaryDirectory
from threading import RLock
import numpy as np
try:
from PIL import Image
ex... | 40.035354 | 79 | 0.633783 |
e7316ad4022e41d081f5e1ba4d261d92940bd723 | 9,043 | py | Python | dataProcess.py | aguijarro/vizProject | b8ac13264c56c5fa6d3c6574c531bdb24be81366 | [
"MIT"
] | null | null | null | dataProcess.py | aguijarro/vizProject | b8ac13264c56c5fa6d3c6574c531bdb24be81366 | [
"MIT"
] | null | null | null | dataProcess.py | aguijarro/vizProject | b8ac13264c56c5fa6d3c6574c531bdb24be81366 | [
"MIT"
] | null | null | null | import psycopg2
import psycopg2.extras
import os
import collections
import json
def create_json_file(result, upload_folder, name):
#fligths_result = json.dumps(flight_list)
try:
"Creating json file"
with open(os.path.join(upload_folder, name), 'w') as outfile:
json.dump(result, out... | 38.978448 | 87 | 0.513104 |
bd7951d3a41f5b8b40f3e59980ff11d76608f0b7 | 4,719 | py | Python | dpaybase/bip38.py | dpays/dpay-python | 09218d2edc6361a0ebe8095b13c30d59b31a051c | [
"MIT"
] | null | null | null | dpaybase/bip38.py | dpays/dpay-python | 09218d2edc6361a0ebe8095b13c30d59b31a051c | [
"MIT"
] | null | null | null | dpaybase/bip38.py | dpays/dpay-python | 09218d2edc6361a0ebe8095b13c30d59b31a051c | [
"MIT"
] | null | null | null | import hashlib
import logging
import os
import sys
from binascii import hexlify, unhexlify
from .account import PrivateKey
from .base58 import Base58, base58decode
from dpay.utils import compat_bytes
log = logging.getLogger(__name__)
try:
from Crypto.Cipher import AES
except ImportError:
raise ImportError("M... | 33.707143 | 87 | 0.660945 |
5f61166f2e87783d7d75198ab76ad81711edbfdf | 910 | py | Python | televisao.py | gacarvalho/python-televisao | cf417e0dc9d3d3531dc7b9c336cbfabb3110fa43 | [
"MIT"
] | null | null | null | televisao.py | gacarvalho/python-televisao | cf417e0dc9d3d3531dc7b9c336cbfabb3110fa43 | [
"MIT"
] | null | null | null | televisao.py | gacarvalho/python-televisao | cf417e0dc9d3d3531dc7b9c336cbfabb3110fa43 | [
"MIT"
] | null | null | null | class Televisao:
def __init__(self):
self.ligada = False
self.canal = 2
def power(self):
if self.ligada == True:
self.ligada = False
else:
self.ligada = True
def aumenta_canal(self):
if self.ligada:
self.canal += 1
... | 24.594595 | 55 | 0.610989 |
6311fbbef7af1649d364a0f1ac8fae7cdac9b264 | 8,570 | py | Python | rp_transferto/views.py | praekeltfoundation/rp-sidekick | 01f2d1ced8caefb39c93112f74baac70dbe943bc | [
"BSD-3-Clause"
] | 1 | 2018-10-05T21:47:43.000Z | 2018-10-05T21:47:43.000Z | rp_transferto/views.py | praekeltfoundation/rp-sidekick | 01f2d1ced8caefb39c93112f74baac70dbe943bc | [
"BSD-3-Clause"
] | 114 | 2018-08-14T14:37:20.000Z | 2020-07-31T15:56:51.000Z | rp_transferto/views.py | praekeltfoundation/rp-sidekick | 01f2d1ced8caefb39c93112f74baac70dbe943bc | [
"BSD-3-Clause"
] | null | null | null | from django.http import JsonResponse
from rest_framework import status
from rest_framework.views import APIView
from sidekick.models import Organization
from sidekick.utils import clean_msisdn
from .models import MsisdnInformation, TopupAttempt
from .tasks import buy_airtime_take_action, buy_product_take_action, topu... | 34.143426 | 99 | 0.653676 |
e2405aa8a5a4ccf0aac749c15aa7e526a8017685 | 276 | py | Python | codeabbey/ejerciciospracticepython/ejercicio1.py | rubyal/calculadora | f86a106651816efb18d94acf58160721d350ee7d | [
"Unlicense"
] | null | null | null | codeabbey/ejerciciospracticepython/ejercicio1.py | rubyal/calculadora | f86a106651816efb18d94acf58160721d350ee7d | [
"Unlicense"
] | null | null | null | codeabbey/ejerciciospracticepython/ejercicio1.py | rubyal/calculadora | f86a106651816efb18d94acf58160721d350ee7d | [
"Unlicense"
] | null | null | null | #ingresar nombre y edad
print("SE INICIA PROGRAMA")
print("ingrese su nombre")
nombre=str(input())
print("ingrese su edad")
edad=int(input())
print("su nombre es {} y tiene {}".format(nombre,edad))
año=str((2021-edad)+100)
print(nombre + " cumplira 100 años en el año " + año) | 30.666667 | 55 | 0.702899 |
c591f51810dae09b096c113cf9d54310aa0c9308 | 224 | py | Python | setup.py | willembressers/CarND-Traffic-Sign-Classifier-Project | c461f6cdff0e0bdd2733fa1ca5e1452d3030d4c6 | [
"MIT"
] | null | null | null | setup.py | willembressers/CarND-Traffic-Sign-Classifier-Project | c461f6cdff0e0bdd2733fa1ca5e1452d3030d4c6 | [
"MIT"
] | null | null | null | setup.py | willembressers/CarND-Traffic-Sign-Classifier-Project | c461f6cdff0e0bdd2733fa1ca5e1452d3030d4c6 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='Udacity | Traffic Sign Recognition',
author='Willem Bressers',
license='MIT',
)
| 20.363636 | 53 | 0.674107 |
b745171f37a30e5aa4e7b85af58db6e59001783b | 13,196 | py | Python | scripts/imagetransfer.py | Darkdadaah/pywikibot-core | 6cad0915f3e058fe4cf2bce4f37d395d21636df9 | [
"MIT"
] | null | null | null | scripts/imagetransfer.py | Darkdadaah/pywikibot-core | 6cad0915f3e058fe4cf2bce4f37d395d21636df9 | [
"MIT"
] | null | null | null | scripts/imagetransfer.py | Darkdadaah/pywikibot-core | 6cad0915f3e058fe4cf2bce4f37d395d21636df9 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Script to copy images to Wikimedia Commons, or to another wiki.
Syntax:
python pwb.py imagetransfer pagename [-interwiki] [-tolang:x] [-tofamily:y]
Arguments:
-interwiki Look for images in pages found through interwiki links.
-keepname Keep the filename an... | 39.746988 | 80 | 0.521673 |
e18aa30eaff031a94d6efaf198f1eb945bcaa239 | 4,766 | py | Python | meraki/controllers/connectivity_monitoring_destinations_controller.py | meraki/meraki-python-sdk | 9894089eb013318243ae48869cc5130eb37f80c0 | [
"MIT"
] | 37 | 2019-04-24T14:01:33.000Z | 2022-01-28T01:37:21.000Z | meraki/controllers/connectivity_monitoring_destinations_controller.py | ankita66666666/meraki-python-sdk | 9894089eb013318243ae48869cc5130eb37f80c0 | [
"MIT"
] | 10 | 2019-07-09T16:35:11.000Z | 2021-12-07T03:47:53.000Z | meraki/controllers/connectivity_monitoring_destinations_controller.py | ankita66666666/meraki-python-sdk | 9894089eb013318243ae48869cc5130eb37f80c0 | [
"MIT"
] | 17 | 2019-04-30T23:53:21.000Z | 2022-02-07T22:57:44.000Z | # -*- coding: utf-8 -*-
"""
meraki
This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ).
"""
from meraki.api_helper import APIHelper
from meraki.configuration import Configuration
from meraki.controllers.base_controller import BaseController
from meraki.http.au... | 39.38843 | 175 | 0.633865 |
4f6c3cc4f88ddcfaf9e9bcd3601d54bd1671d8fe | 826 | py | Python | h5py/highlevel.py | rainwoodman/h5py | 25eba5f019d4417de0908ce602f14c038faa9237 | [
"BSD-3-Clause"
] | 31 | 2018-10-19T15:28:36.000Z | 2022-02-14T03:01:25.000Z | SLpackage/private/thirdparty/pythonpkgs/h5py/h5py_2.7.0/lib/python2.7/site-packages/h5py/highlevel.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 13 | 2020-01-28T22:20:14.000Z | 2022-03-11T23:20:14.000Z | SLpackage/private/thirdparty/pythonpkgs/h5py/h5py_2.7.0/lib/python2.7/site-packages/h5py/highlevel.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 10 | 2019-01-10T04:02:12.000Z | 2021-11-17T01:52:15.000Z | # This file is part of h5py, a Python interface to the HDF5 library.
#
# http://www.h5py.org
#
# Copyright 2008-2013 Andrew Collette and contributors
#
# License: Standard 3-clause BSD; see "license.txt" for full license terms
# and contributor agreement.
# pylint: disable=unused-import
"""
This is the... | 27.533333 | 77 | 0.751816 |
26b2971ee42a1c53ef409144c7fdee8c762ab763 | 7,048 | py | Python | password_based_shooting_stars_resource.py | andmcadams/shooting-stars-server | 7bd8f74401dcf013d1a55edf1d97527d6cb77543 | [
"BSD-2-Clause"
] | null | null | null | password_based_shooting_stars_resource.py | andmcadams/shooting-stars-server | 7bd8f74401dcf013d1a55edf1d97527d6cb77543 | [
"BSD-2-Clause"
] | null | null | null | password_based_shooting_stars_resource.py | andmcadams/shooting-stars-server | 7bd8f74401dcf013d1a55edf1d97527d6cb77543 | [
"BSD-2-Clause"
] | 3 | 2021-11-16T13:27:01.000Z | 2022-03-21T02:48:42.000Z | import json
import sqlite3
import time
import falcon
from base_shooting_stars_resource import BaseShootingStarsResource, hook_validate_auth
from constants import ERROR_MSG_AUTHORIZATION_FAIL_SUBMIT, ERROR_MSG_DATA_VALIDATION_FAIL
master_pw_whitelist = set()
scout_pw_whitelist = set()
def hook_validate_scout_passwor... | 41.216374 | 116 | 0.649688 |
780685cce1b0cbe4cebbe976ae38ba6fd9a37e8d | 3,371 | py | Python | api/tests/helpers.py | vanillaSlice/dawdle | 99c2cc7c59433bd5d05677218537301e2ebb1d2d | [
"MIT"
] | null | null | null | api/tests/helpers.py | vanillaSlice/dawdle | 99c2cc7c59433bd5d05677218537301e2ebb1d2d | [
"MIT"
] | 26 | 2019-07-05T09:34:02.000Z | 2020-07-10T16:22:44.000Z | api/tests/helpers.py | vanillaSlice/dawdle | 99c2cc7c59433bd5d05677218537301e2ebb1d2d | [
"MIT"
] | null | null | null | from faker import Faker
from werkzeug import exceptions
from werkzeug.http import HTTP_STATUS_CODES
from dawdle import create_app
from dawdle.components.auth.utils import (create_fresh_user_access_token,
create_user_access_token,
creat... | 33.04902 | 75 | 0.641056 |
181418b3e595bfcf2ca9681df1b4d95b8af19af7 | 9,318 | py | Python | tools/report-converter/codechecker_report_converter/cli.py | vabridgers/codechecker-1 | 08ae7e9d21a94385756b192fc13df86b9d1f79e3 | [
"Apache-2.0"
] | null | null | null | tools/report-converter/codechecker_report_converter/cli.py | vabridgers/codechecker-1 | 08ae7e9d21a94385756b192fc13df86b9d1f79e3 | [
"Apache-2.0"
] | null | null | null | tools/report-converter/codechecker_report_converter/cli.py | vabridgers/codechecker-1 | 08ae7e9d21a94385756b192fc13df86b9d1f79e3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ----------------------------... | 38.188525 | 79 | 0.565894 |
b0f8d739c653863d07386a86b53c4e7fe6355ef2 | 398 | py | Python | setup.py | pysat/pysatModelUtils | e563c36531632cd68b4e15d2ac6099fa3cb45aef | [
"BSD-3-Clause"
] | null | null | null | setup.py | pysat/pysatModelUtils | e563c36531632cd68b4e15d2ac6099fa3cb45aef | [
"BSD-3-Clause"
] | 17 | 2019-09-18T18:19:00.000Z | 2020-01-30T18:41:59.000Z | setup.py | pysat/pysatModelUtils | e563c36531632cd68b4e15d2ac6099fa3cb45aef | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2022, Pysat Development Team
# Full license can be found in License.md and AUTHORS.md
# -----------------------------------------------------------------------------
"""Setup routine for pysat.
Note
----
Package metadata stored in setup.cfg
"""
from setup... | 22.111111 | 79 | 0.570352 |
4d0cc526329a24fe82db724e73bd5305f0f7004e | 3,204 | py | Python | main/settings.py | SpeedyCoder/task-manager | 1f7d98bad6b8251e94bd8cd63f14e3f4524c4f72 | [
"MIT"
] | null | null | null | main/settings.py | SpeedyCoder/task-manager | 1f7d98bad6b8251e94bd8cd63f14e3f4524c4f72 | [
"MIT"
] | null | null | null | main/settings.py | SpeedyCoder/task-manager | 1f7d98bad6b8251e94bd8cd63f14e3f4524c4f72 | [
"MIT"
] | null | null | null | import os
import dj_database_url
from decouple import config
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = config('SECRET_KEY')
DEBUG = config('DEBUG', cast=bool)
if config('DEPLOYED', default=True, cast=bool):
DATABASES = {
'default': dj_database_url.config(
... | 24.458015 | 91 | 0.647004 |
099a0b13ee37409ac379b19f135132e10c1dc82f | 31,378 | py | Python | code/test_if_values_can_be_extracted_from_the_model.py | saloniagarwal0403/SSCNN | 30dafb61e5822d0011516c1d600450818844c106 | [
"MIT"
] | null | null | null | code/test_if_values_can_be_extracted_from_the_model.py | saloniagarwal0403/SSCNN | 30dafb61e5822d0011516c1d600450818844c106 | [
"MIT"
] | null | null | null | code/test_if_values_can_be_extracted_from_the_model.py | saloniagarwal0403/SSCNN | 30dafb61e5822d0011516c1d600450818844c106 | [
"MIT"
] | null | null | null | # conda activate SurvivalAnalysis_January2021
# python Siamese_with_conv_parallel_processing_average_pooling_multiple__magnifications.py>Epoch_4_using_average.txt
import sklearn
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow.keras import backend as ... | 59.31569 | 242 | 0.658073 |
d9a25dbb08cbe6ac64813d33d0b8d7ff004eea0a | 4,212 | py | Python | code/import-cat-from-coco.py | faisalthaheem/simanno-scripts | fed6779dab60c11daed14ea8d42f67f789252389 | [
"Apache-2.0"
] | null | null | null | code/import-cat-from-coco.py | faisalthaheem/simanno-scripts | fed6779dab60c11daed14ea8d42f67f789252389 | [
"Apache-2.0"
] | null | null | null | code/import-cat-from-coco.py | faisalthaheem/simanno-scripts | fed6779dab60c11daed14ea8d42f67f789252389 | [
"Apache-2.0"
] | null | null | null | from pycocotools.coco import COCO
import sys
import os
import argparse
import sqlite3
import json
import shutil
# Sample invocation
# python3 import-cat-from-coco.py -t val -c car -li 1 -af $CARS_FROM_COCO_PATH/annotations/instances_val2017.json -dp $CARS_FROM_COCO_PATH -sp $COCO_PATH/val2017/
# python3 import-cat-fro... | 30.970588 | 162 | 0.666667 |
aa279f918e4b24ce6fae0ac1f00043c816b67a5d | 4,156 | py | Python | instabot_py/models/consolidate_model.py | rickymoli/instabot.py | 8c66d76fc8841f1cb47fad148789bef2dc52f2be | [
"MIT"
] | null | null | null | instabot_py/models/consolidate_model.py | rickymoli/instabot.py | 8c66d76fc8841f1cb47fad148789bef2dc52f2be | [
"MIT"
] | null | null | null | instabot_py/models/consolidate_model.py | rickymoli/instabot.py | 8c66d76fc8841f1cb47fad148789bef2dc52f2be | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pymongo
class ConsolidateModel:
def __init__(self):
conexion = pymongo.MongoClient('localhost',27017)
self.db = conexion.instabot
def saveFollowers(self, date, news, lost):
collection = self.db.consolidate_followers
collecti... | 41.56 | 88 | 0.588065 |
f769ed288604d3a7e00eef6361e241054626384d | 2,523 | py | Python | gala/dynamics/tests/test_actionangle_staeckel.py | zilishen/gala | f7184e6b09fbc42a349f6b5a2bca6242f1e9936e | [
"MIT"
] | 1 | 2020-11-20T18:27:25.000Z | 2020-11-20T18:27:25.000Z | gala/dynamics/tests/test_actionangle_staeckel.py | zilishen/gala | f7184e6b09fbc42a349f6b5a2bca6242f1e9936e | [
"MIT"
] | 3 | 2021-07-26T15:07:25.000Z | 2021-09-13T15:04:27.000Z | gala/dynamics/tests/test_actionangle_staeckel.py | nstarman/gala | 5415c817a7cc5e1a5086217332466ffc7af16ab3 | [
"MIT"
] | null | null | null | # Third-party
from astropy.constants import G
import astropy.units as u
import numpy as np
import pytest
# gala
from gala.dynamics import get_staeckel_fudge_delta, PhaseSpacePosition
import gala.potential as gp
from gala.units import galactic
from .helpers import HAS_GALPY
@pytest.mark.skipif(not HAS_GALPY,
... | 37.656716 | 80 | 0.614744 |
95275c8ddadcfd52aba31af49decce4212c99918 | 11,877 | py | Python | python/federatedml/model_selection/data_split/data_split.py | kakasu/FATE | cfc61ef268154e08a9e7125c047c318c5e5eb42a | [
"Apache-2.0"
] | 2 | 2020-11-21T11:25:08.000Z | 2020-11-21T11:25:11.000Z | python/federatedml/model_selection/data_split/data_split.py | TroubleMaker1994/FATE | 23ad848bcc7ae7f304a376d3f46f4af26872c8a2 | [
"Apache-2.0"
] | null | null | null | python/federatedml/model_selection/data_split/data_split.py | TroubleMaker1994/FATE | 23ad848bcc7ae7f304a376d3f46f4af26872c8a2 | [
"Apache-2.0"
] | 1 | 2021-02-03T08:23:42.000Z | 2021-02-03T08:23:42.000Z | #
# Copyright 2019 The FATE 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... | 38.189711 | 118 | 0.623474 |
538da682e18d6402bc81761b5e76fa08e912dc5d | 301 | py | Python | django_socketio/example_project/urls.py | Reachpodofficial/django-socketio | d7d7a1a52b689c15de3dc54f5d20dc3eb293d771 | [
"BSD-2-Clause"
] | 790 | 2015-01-01T17:57:37.000Z | 2022-03-18T21:54:57.000Z | django_socketio/example_project/urls.py | Reachpodofficial/django-socketio | d7d7a1a52b689c15de3dc54f5d20dc3eb293d771 | [
"BSD-2-Clause"
] | 59 | 2015-01-19T10:55:25.000Z | 2021-09-07T09:12:38.000Z | django_socketio/example_project/urls.py | Reachpodofficial/django-socketio | d7d7a1a52b689c15de3dc54f5d20dc3eb293d771 | [
"BSD-2-Clause"
] | 224 | 2015-01-09T02:44:57.000Z | 2021-09-05T07:06:30.000Z |
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url("", include("django_socketio.urls")),
url("", include("chat.urls")),
)
| 20.066667 | 51 | 0.697674 |
63acb73f567ce7a23c4a4394992a5b19ec91db07 | 1,230 | py | Python | Text - character/text_io.py | pranshumalviya2/playwith_rnn | f9d4c851d9aef08ac265992daac137fa9b9b7a5e | [
"MIT"
] | 1 | 2017-07-23T18:19:39.000Z | 2017-07-23T18:19:39.000Z | Text - character/text_io.py | pranshumalviya2/playwith_rnn | f9d4c851d9aef08ac265992daac137fa9b9b7a5e | [
"MIT"
] | 1 | 2017-11-29T06:39:12.000Z | 2017-12-01T10:28:07.000Z | Text - character/text_io.py | pranshumalviya2/playwith_rnn | f9d4c851d9aef08ac265992daac137fa9b9b7a5e | [
"MIT"
] | null | null | null | import numpy as np
from keras.utils import np_utils
# import sys
class inp(object):
def __init__(self, inp='karpathy', seq=10):
self.inp = inp
self.seq = seq
self.inpFile = self.inp+".txt"
self.outFile = self.inp+"-out.txt"
self.content = [x.lower() for x in open(self.inpFile).read()]
self.vocab = sorted... | 29.285714 | 69 | 0.685366 |
f1135e3a07546c99e39585eb681d758aadc33f55 | 2,268 | py | Python | propnet/web/tests/test_web.py | nile0316/propnet | 3e1f1476c70a878c6eb43587c328d108b0e2a410 | [
"BSD-3-Clause-LBNL"
] | 57 | 2018-01-09T14:56:20.000Z | 2022-02-24T11:44:42.000Z | propnet/web/tests/test_web.py | ruriboshi/propnet | 770703fb4fc344f785f89c02f26b31ea5733d2bd | [
"BSD-3-Clause-LBNL"
] | 214 | 2017-09-26T23:31:09.000Z | 2022-03-14T04:50:58.000Z | propnet/web/tests/test_web.py | nile0316/propnet | 3e1f1476c70a878c6eb43587c328d108b0e2a410 | [
"BSD-3-Clause-LBNL"
] | 26 | 2017-10-29T21:34:22.000Z | 2022-01-12T05:59:12.000Z | import unittest
import json
from propnet.core.graph import Graph
from propnet.core.registry import Registry
from propnet.models import add_builtin_models_to_registry
import os
no_store_file = os.environ.get('PROPNET_STORE_FILE') is None
if not no_store_file:
from propnet.web.app import app, symbol_layout, model_l... | 30.648649 | 80 | 0.655203 |
a20938a460ebf408c0d2952a2375a4621b6f836d | 6,848 | py | Python | mxtools/governor.py | mskinner5278/mxtools | 4dda89890ffe669778354b9752cc47c4fac5f4c4 | [
"BSD-3-Clause"
] | null | null | null | mxtools/governor.py | mskinner5278/mxtools | 4dda89890ffe669778354b9752cc47c4fac5f4c4 | [
"BSD-3-Clause"
] | 4 | 2021-11-24T19:26:30.000Z | 2022-03-21T20:52:52.000Z | mxtools/governor.py | mskinner5278/mxtools | 4dda89890ffe669778354b9752cc47c4fac5f4c4 | [
"BSD-3-Clause"
] | 3 | 2021-11-18T18:10:34.000Z | 2021-11-23T18:18:27.000Z | """
Rationale:
The Governor is a dynamic beast. The PVs it exposes depend
on the configuration files given to it. Therefore, it would be
hopelessly tedious to manually keep a Governor ophyd object in
sync with the Governor IOC. There are at least two solutions to
this issue:
1. Have the IO... | 30.435556 | 102 | 0.65844 |
819e70addddb3290dffdeb3c906eab23eb0bcb75 | 38 | py | Python | onelinerizer/__init__.py | mayl8822/onelinerizer | bad341f261d35e56872b4c22297a44dc6d5cfab3 | [
"MIT"
] | 1,062 | 2015-11-18T01:04:33.000Z | 2022-03-29T07:13:30.000Z | onelinerizer/__init__.py | mayl8822/onelinerizer | bad341f261d35e56872b4c22297a44dc6d5cfab3 | [
"MIT"
] | 26 | 2015-11-17T06:58:07.000Z | 2022-01-15T18:11:16.000Z | onelinerizer/__init__.py | mayl8822/onelinerizer | bad341f261d35e56872b4c22297a44dc6d5cfab3 | [
"MIT"
] | 100 | 2015-11-17T09:01:22.000Z | 2021-09-12T13:58:28.000Z | from .onelinerizer import onelinerize
| 19 | 37 | 0.868421 |
815eff50687af154b4c3cffe270bfdf8250af154 | 13,953 | py | Python | QRSDetectorOnline.py | TeamCanaria/fatigue-analysis | cbd151b2cdac06fbc824f9942d4b453350bc6487 | [
"MIT"
] | 1 | 2019-06-28T17:42:19.000Z | 2019-06-28T17:42:19.000Z | QRSDetectorOnline.py | adipurapunya/ecg-qrs-detector-GPU-python | 7c5221f63a7c21ecbaf53fa49cf83123a23d430f | [
"MIT"
] | null | null | null | QRSDetectorOnline.py | adipurapunya/ecg-qrs-detector-GPU-python | 7c5221f63a7c21ecbaf53fa49cf83123a23d430f | [
"MIT"
] | 1 | 2019-11-26T08:10:36.000Z | 2019-11-26T08:10:36.000Z | import serial
import numpy as np
from collections import deque
from time import gmtime, strftime
from scipy.signal import butter, lfilter
LOG_DIR = "logs/"
class QRSDetectorOnline(object):
"""
Python Online ECG QRS Detector based on the Pan-Tomkins algorithm.
Michał Sznajder (Jagiellonian University... | 47.459184 | 472 | 0.662582 |
3d648ffab67768efa1c2f05e13890f00651d48d6 | 3,256 | py | Python | tests/mime/message/headers/encoding_test.py | plq/flanker | d71c36eca84ff102a32d8d9c6188900828409018 | [
"Apache-2.0"
] | null | null | null | tests/mime/message/headers/encoding_test.py | plq/flanker | d71c36eca84ff102a32d8d9c6188900828409018 | [
"Apache-2.0"
] | null | null | null | tests/mime/message/headers/encoding_test.py | plq/flanker | d71c36eca84ff102a32d8d9c6188900828409018 | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
from email.header import Header
from nose.tools import eq_, ok_
from mock import patch, Mock
from flanker.mime.message import headers
from flanker.mime.message.headers.encoding import (_encode_unstructured,
encode_string)
from flanker.mime.message imp... | 38.305882 | 125 | 0.708845 |
efe83e0dd7203eca1c9154458900e09417a2739d | 472 | py | Python | conan_build_helper/headeronly.py | blockspacer/conan_build_helper | 55dfafa6d20079ff13dbc45ccee4f104f53c9632 | [
"MIT"
] | 1 | 2022-02-08T20:15:01.000Z | 2022-02-08T20:15:01.000Z | conan_build_helper/headeronly.py | blockspacer/conan_build_helper | 55dfafa6d20079ff13dbc45ccee4f104f53c9632 | [
"MIT"
] | null | null | null | conan_build_helper/headeronly.py | blockspacer/conan_build_helper | 55dfafa6d20079ff13dbc45ccee4f104f53c9632 | [
"MIT"
] | 1 | 2020-05-19T01:03:20.000Z | 2020-05-19T01:03:20.000Z | from conans import ConanFile
from conan_build_helper.require_scm import RequireScm
import os
def package_headers(conanfile):
include_dir = conanfile._repository_include_dir_required
for ext in ['*.h', '*.hpp', '*.hxx', '*.hcc']:
conanfile.copy(ext, dst='include', src=include_dir)
class He... | 27.764706 | 64 | 0.697034 |
6998193cfd5da0fc5412702d9f4125e021f01004 | 1,080 | py | Python | KalmanFilter.py | davidliyutong/VideoAnalyzer | 5cf3d589facab559269394fb65f162972b977d65 | [
"MIT"
] | null | null | null | KalmanFilter.py | davidliyutong/VideoAnalyzer | 5cf3d589facab559269394fb65f162972b977d65 | [
"MIT"
] | null | null | null | KalmanFilter.py | davidliyutong/VideoAnalyzer | 5cf3d589facab559269394fb65f162972b977d65 | [
"MIT"
] | null | null | null | class KalmanFilter:
def __init__(self, Q=0.001, R=0.01):
self.Q = Q
self.R = R
self.P_k_k1 = 1
self.Kg = 0
self.P_k1_k1 = 1
self.x_k_k1 = 0
self.ADC_OLD_Value = 0
self.Z_k = 0
self.kalman_adc_old = 0
def kalman(self, ADC_Value):
... | 27 | 77 | 0.567593 |
2346e04d04da6ed47b6bb8995ea3ed2b9d389c20 | 504 | py | Python | normalizer.py | somiljain7/unsupervised-learning | 2d698e5ba25ede8e43e47dfe3352db1f2d978278 | [
"Apache-2.0"
] | null | null | null | normalizer.py | somiljain7/unsupervised-learning | 2d698e5ba25ede8e43e47dfe3352db1f2d978278 | [
"Apache-2.0"
] | null | null | null | normalizer.py | somiljain7/unsupervised-learning | 2d698e5ba25ede8e43e47dfe3352db1f2d978278 | [
"Apache-2.0"
] | null | null | null | # Import Normalizer
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.cluster import KMeans
from sklearn.preprocessing import Normalizer
# Create a normalizer: normalizer
normalizer = Normalizer()
# Create a KMeans model with 10 clusters: kmeans
kmeans = KMeans(n_c... | 36 | 58 | 0.827381 |
5e7e5d051fdcf60d3ab8dc486a4f29b58b181513 | 1,001 | py | Python | pyopenproject/business/services/command/version/find_projects.py | webu/pyopenproject | 40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966 | [
"MIT"
] | 5 | 2021-02-25T15:54:28.000Z | 2021-04-22T15:43:36.000Z | pyopenproject/business/services/command/version/find_projects.py | webu/pyopenproject | 40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966 | [
"MIT"
] | 7 | 2021-03-15T16:26:23.000Z | 2022-03-16T13:45:18.000Z | pyopenproject/business/services/command/version/find_projects.py | webu/pyopenproject | 40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966 | [
"MIT"
] | 6 | 2021-06-18T18:59:11.000Z | 2022-03-27T04:58:52.000Z | from pyopenproject.api_connection.exceptions.request_exception import RequestError
from pyopenproject.api_connection.requests.get_request import GetRequest
from pyopenproject.business.exception.business_error import BusinessError
from pyopenproject.business.services.command.find_list_command import FindListCommand
from... | 45.5 | 90 | 0.764236 |
ee680b9c4a7b300f726473268b415ef16807ef4a | 13,460 | py | Python | mmdet/models/detectors/base.py | JulioZhao97/mmdetection-LOGODet | 4e06357c1e88c74e0f3aafc30f9a503e2833f1a8 | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/base.py | JulioZhao97/mmdetection-LOGODet | 4e06357c1e88c74e0f3aafc30f9a503e2833f1a8 | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/base.py | JulioZhao97/mmdetection-LOGODet | 4e06357c1e88c74e0f3aafc30f9a503e2833f1a8 | [
"Apache-2.0"
] | null | null | null | from abc import ABCMeta, abstractmethod
from collections import OrderedDict
import mmcv
import numpy as np
import torch
import torch.distributed as dist
import torch.nn as nn
from mmcv.runner import auto_fp16
from mmcv.utils import print_log
from mmdet.utils import get_root_logger
class BaseDetector(nn.Module, meta... | 38.130312 | 79 | 0.572214 |
0d0f1077d4ad6a93998a2d687b0f777a78e7f649 | 775 | py | Python | marker/tests/test_filter.py | wang-ye/marker | 3e2d2005c2ae355084a7ad44a55cb59b7e151039 | [
"MIT"
] | null | null | null | marker/tests/test_filter.py | wang-ye/marker | 3e2d2005c2ae355084a7ad44a55cb59b7e151039 | [
"MIT"
] | null | null | null | marker/tests/test_filter.py | wang-ye/marker | 3e2d2005c2ae355084a7ad44a55cb59b7e151039 | [
"MIT"
] | null | null | null | from marker.filter import filter_commands
from marker.command import Command
import unittest
class FilterTest(unittest.TestCase):
def setUp(self):
cmd1 = Command('marker_cmd', alias='marker', description='test mark commands')
cmd2 = Command('painter_cmd', alias='painter', description='mark command... | 33.695652 | 87 | 0.694194 |
34d2dfc116d395a36989d9cc3fba9f72ac7996a5 | 5,594 | py | Python | mars/oscar/backends/ray/utils.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | 1 | 2022-02-02T03:03:48.000Z | 2022-02-02T03:03:48.000Z | mars/oscar/backends/ray/utils.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | null | null | null | mars/oscar/backends/ray/utils.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 31.784091 | 96 | 0.653736 |
58b1fa775dab39aa03f96ee23701e32ce6c55ac9 | 51,868 | py | Python | djstripe/models/billing.py | fdintino/dj-stripe | 6f1cdd4fc1a40cad82163b8fbc5de1f566d8d117 | [
"MIT"
] | null | null | null | djstripe/models/billing.py | fdintino/dj-stripe | 6f1cdd4fc1a40cad82163b8fbc5de1f566d8d117 | [
"MIT"
] | null | null | null | djstripe/models/billing.py | fdintino/dj-stripe | 6f1cdd4fc1a40cad82163b8fbc5de1f566d8d117 | [
"MIT"
] | null | null | null | from copy import deepcopy
import stripe
from django.db import models
from django.utils import timezone
from django.utils.text import format_lazy
from django.utils.translation import gettext_lazy as _
from stripe.error import InvalidRequestError
from .. import enums
from .. import settings as djstripe_settings
from ..... | 38.054292 | 95 | 0.646391 |
efffd234c1325e35e7b472a8ec566f9eb5b4c784 | 702 | py | Python | FunStuff/fun_draw_tree.py | XuhuaHuang/LearnPython | eb39f11147716193971dd5a8894e675daa1b9d01 | [
"MIT"
] | null | null | null | FunStuff/fun_draw_tree.py | XuhuaHuang/LearnPython | eb39f11147716193971dd5a8894e675daa1b9d01 | [
"MIT"
] | null | null | null | FunStuff/fun_draw_tree.py | XuhuaHuang/LearnPython | eb39f11147716193971dd5a8894e675daa1b9d01 | [
"MIT"
] | null | null | null | from turtle import *
def tree(plist, l, a, f):
"""plist is a list of pens
l is length of the branch
a is a half of the angle between 2 branches
f is factor by which branch is shortened
"""
if l > 5:
lst = []
for p in plist:
p.forward(1)
q = p.clone()
... | 18.972973 | 47 | 0.497151 |
8fc7bb90299e2dcfc22b5e384f1b5968f4b83bb9 | 8,271 | py | Python | docs/conf.py | jayaram24/Termineter-Modified | 2cab514ff1640809337c6fe17f24433bcdec2260 | [
"MIT"
] | 185 | 2015-03-20T02:16:32.000Z | 2020-04-07T23:58:46.000Z | docs/conf.py | pascal1989/termineter | d657d25d97c7739e650b951c396404e857e56625 | [
"BSD-3-Clause"
] | 7 | 2015-06-18T15:27:12.000Z | 2018-03-18T20:30:06.000Z | docs/conf.py | pascal1989/termineter | d657d25d97c7739e650b951c396404e857e56625 | [
"BSD-3-Clause"
] | 80 | 2015-03-10T18:37:19.000Z | 2020-04-01T00:24:26.000Z | # -*- coding: utf-8 -*-
#
# 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
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
GITHUB_BRANC... | 31.093985 | 142 | 0.714182 |
c3c3570c0f8217b3455bb02a08c438ea16eda9e8 | 20,249 | py | Python | tensorflow/python/training/saving/saveable_object_util.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 4 | 2020-06-28T08:25:36.000Z | 2021-08-12T12:41:34.000Z | tensorflow/python/training/saving/saveable_object_util.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 10 | 2021-08-03T08:42:38.000Z | 2022-01-03T03:29:12.000Z | tensorflow/python/training/saving/saveable_object_util.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 28 | 2020-02-10T07:03:06.000Z | 2022-01-12T11:19:20.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.938856 | 101 | 0.704183 |
e4ad1a8990a53ccba36daabfd2907f006f69d8ad | 13,651 | py | Python | dfa/agent/topo_disc/topo_disc.py | CiscoSystems/fabric_enabler | d5318624dd15692197a7212ecd4b0ceea42dc73e | [
"Apache-2.0"
] | 1 | 2015-03-05T02:48:15.000Z | 2015-03-05T02:48:15.000Z | dfa/agent/topo_disc/topo_disc.py | CiscoSystems/fabric_enabler | d5318624dd15692197a7212ecd4b0ceea42dc73e | [
"Apache-2.0"
] | 1 | 2016-05-25T22:13:43.000Z | 2016-07-21T20:49:48.000Z | dfa/agent/topo_disc/topo_disc.py | CiscoSystems/fabric_enabler | d5318624dd15692197a7212ecd4b0ceea42dc73e | [
"Apache-2.0"
] | 2 | 2017-05-02T21:32:46.000Z | 2018-08-22T16:52:40.000Z | # Copyright 2014 Cisco Systems.
# 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 b... | 40.15 | 79 | 0.668889 |
996f5f849d2c7cf3b7b45e81d15ce1face95458e | 7,373 | py | Python | ansible/modules/cloud/rackspace/rax_mon_alarm.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 1 | 2022-01-25T22:52:58.000Z | 2022-01-25T22:52:58.000Z | ansible/modules/cloud/rackspace/rax_mon_alarm.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | ansible/modules/cloud/rackspace/rax_mon_alarm.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | 33.06278 | 96 | 0.637732 |
92d617e93d45792cb99e11516f4b4931f3b768c4 | 4,039 | py | Python | oaff/app/oaff/app/data/sources/postgresql/stac_hybrid/postgresql_feature_set_provider.py | JBurkinshaw/ogc-api-fast-features | 4fc6ba3cc4df1600450fe4c9f35320b00c69f158 | [
"MIT"
] | 19 | 2021-07-06T16:35:27.000Z | 2022-02-08T04:59:21.000Z | oaff/app/oaff/app/data/sources/postgresql/stac_hybrid/postgresql_feature_set_provider.py | JBurkinshaw/ogc-api-fast-features | 4fc6ba3cc4df1600450fe4c9f35320b00c69f158 | [
"MIT"
] | 30 | 2021-07-14T04:13:11.000Z | 2021-11-22T20:45:15.000Z | oaff/app/oaff/app/data/sources/postgresql/stac_hybrid/postgresql_feature_set_provider.py | JBurkinshaw/ogc-api-fast-features | 4fc6ba3cc4df1600450fe4c9f35320b00c69f158 | [
"MIT"
] | 6 | 2021-07-06T16:35:28.000Z | 2021-09-17T19:24:49.000Z | from json import dumps
from typing import Callable, Dict, Final, List
from uuid import uuid4
import sqlalchemy as sa
from databases.core import Database
from oaff.app.data.retrieval.feature_set_provider import FeatureSetProvider
from oaff.app.data.sources.postgresql.stac_hybrid.postgresql_layer import PostgresqlLayer... | 35.121739 | 90 | 0.501114 |
2372e4419d469adb34ada0cc77dd3dd7d2ab7374 | 1,734 | py | Python | standardlib.py | Syk326/PythonTest | ee17c134009f690c2c8045fce0e56699d1a81775 | [
"Unlicense"
] | null | null | null | standardlib.py | Syk326/PythonTest | ee17c134009f690c2c8045fce0e56699d1a81775 | [
"Unlicense"
] | null | null | null | standardlib.py | Syk326/PythonTest | ee17c134009f690c2c8045fce0e56699d1a81775 | [
"Unlicense"
] | null | null | null | # Python Standard Library: import modules @ top
import math # math module
# from module_name import object_name <- import individual function
from random import randrange
from datetime import datetime
from collections import defaultdict, namedtuple # import multiple objects
from csv import reader as csv # rename the mo... | 38.533333 | 103 | 0.749135 |
45f096891383e10b64b3cecf4de511fc60e5e163 | 162 | py | Python | example_snippets/multimenus_snippets/Snippets/SciPy/Integration and ODE solvers/Integrate given function object/General-purpose integration.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/Snippets/SciPy/Integration and ODE solvers/Integrate given function object/General-purpose integration.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/Snippets/SciPy/Integration and ODE solvers/Integrate given function object/General-purpose integration.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | 1 | 2021-02-04T04:51:48.000Z | 2021-02-04T04:51:48.000Z | from scipy import integrate
def f(x, a, b):
return a * x + b
integral,error = integrate.quad(f, 0, 4.5, args=(2,1)) # integrates 2*x+1
print(integral, error) | 32.4 | 74 | 0.660494 |
0882c859f188398fe00e106472ea2d98668ad8c7 | 4,648 | py | Python | setupext/build_thunk.py | baztian/jpype | 034d44e6c719995c25e9cd61348ebc1860030a9b | [
"Apache-2.0"
] | null | null | null | setupext/build_thunk.py | baztian/jpype | 034d44e6c719995c25e9cd61348ebc1860030a9b | [
"Apache-2.0"
] | null | null | null | setupext/build_thunk.py | baztian/jpype | 034d44e6c719995c25e9cd61348ebc1860030a9b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import fnmatch
import os
import distutils.cmd
import distutils.log
import array
import sys
if (sys.version_info < (3, 0)):
import string
def translate(s, cfrom, cto):
return s.translate(string.maketrans(cfrom, cto))
else:
def translate(... | 30.181818 | 74 | 0.560671 |
6e92d3ad27831eac62990bc82dd6ce3dd043d5b9 | 378 | py | Python | src/UQpy/surrogates/polynomial_chaos/regressions/__init__.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | src/UQpy/surrogates/polynomial_chaos/regressions/__init__.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | src/UQpy/surrogates/polynomial_chaos/regressions/__init__.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | from UQpy.surrogates.polynomial_chaos.regressions.LassoRegression import LassoRegression
from UQpy.surrogates.polynomial_chaos.regressions.LeastSquareRegression import LeastSquareRegression
from UQpy.surrogates.polynomial_chaos.regressions.RidgeRegression import RidgeRegression
from UQpy.surrogates.polynomial_chaos.reg... | 75.6 | 100 | 0.915344 |
558052a89c3e90cf679bdd77194598ec39e9bf6f | 1,896 | py | Python | framework/UI/__init__.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | 2 | 2019-10-11T15:59:10.000Z | 2021-04-08T18:23:57.000Z | framework/UI/__init__.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | 1 | 2018-03-27T13:06:00.000Z | 2018-03-27T13:06:00.000Z | framework/UI/__init__.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | 1 | 2017-08-29T16:09:13.000Z | 2017-08-29T16:09:13.000Z | # Copyright 2017 Battelle Energy Alliance, 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 t... | 38.693878 | 80 | 0.785338 |
5c7ca060b06358bce823fc0f6b1e1f2f3704b0f8 | 9,534 | py | Python | docs/conf.py | cfpb/regulations-xml-parser | e3bcbd9025f6fb6fa9ef2671fb8ed061c8de3e88 | [
"CC0-1.0"
] | 4 | 2016-01-02T21:04:42.000Z | 2019-08-17T06:30:36.000Z | docs/conf.py | DalavanCloud/regulations-xml-parser | e3bcbd9025f6fb6fa9ef2671fb8ed061c8de3e88 | [
"CC0-1.0"
] | 49 | 2016-01-25T15:19:04.000Z | 2017-12-06T20:02:09.000Z | docs/conf.py | DalavanCloud/regulations-xml-parser | e3bcbd9025f6fb6fa9ef2671fb8ed061c8de3e88 | [
"CC0-1.0"
] | 9 | 2016-01-21T19:25:30.000Z | 2021-02-20T10:53:47.000Z | # -*- coding: utf-8 -*-
#
# regulations-xml-parser documentation build configuration file, created by
# sphinx-quickstart on Mon Feb 22 23:05:44 2016.
#
# 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
# autogenera... | 33.335664 | 87 | 0.722152 |
e43fdcf4ecdc4000f4b5c366fbffdd292c3120fc | 10,005 | py | Python | pele_platform/Utilities/Helpers/metal_constraints.py | TheKipiDragon/pele_platform | bb33fb69741685d423bdccda4ed104fd0b70ed5b | [
"Apache-2.0"
] | null | null | null | pele_platform/Utilities/Helpers/metal_constraints.py | TheKipiDragon/pele_platform | bb33fb69741685d423bdccda4ed104fd0b70ed5b | [
"Apache-2.0"
] | null | null | null | pele_platform/Utilities/Helpers/metal_constraints.py | TheKipiDragon/pele_platform | bb33fb69741685d423bdccda4ed104fd0b70ed5b | [
"Apache-2.0"
] | null | null | null | import pele_platform.constants.constants as cs
import pele_platform.Errors.custom_errors as ce
from Bio.PDB import PDBParser, NeighborSearch, Selection, Vector, vectors
import itertools
import numpy as np
def find_metals(protein_file):
# read in the protein file
parser = PDBParser()
structure = parser.ge... | 39.702381 | 265 | 0.554023 |
e9b2f6fca7ea1a256f468c2d4fe8c7fdf2a326ae | 67,547 | py | Python | snakemake/workflow.py | LvKvA/snakemake | 5d4e7d8c4d7901c41bfb8f01c4b2c6551add59f7 | [
"MIT"
] | null | null | null | snakemake/workflow.py | LvKvA/snakemake | 5d4e7d8c4d7901c41bfb8f01c4b2c6551add59f7 | [
"MIT"
] | null | null | null | snakemake/workflow.py | LvKvA/snakemake | 5d4e7d8c4d7901c41bfb8f01c4b2c6551add59f7 | [
"MIT"
] | null | null | null | __author__ = "Johannes Köster"
__copyright__ = "Copyright 2022, Johannes Köster"
__email__ = "johannes.koester@uni-due.de"
__license__ = "MIT"
import re
import os
import sys
import signal
import json
from tokenize import maybe
import urllib
from collections import OrderedDict, namedtuple
from itertools import filterfa... | 34.533231 | 184 | 0.56383 |
35faeed95c16e6c5cd763afcd17c0bab5d52cde4 | 4,195 | py | Python | tensorflow/contrib/tensor_forest/python/kernel_tests/update_fertile_slots_op_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 101 | 2016-12-03T11:40:52.000Z | 2017-12-23T02:02:03.000Z | tensorflow/contrib/tensor_forest/python/kernel_tests/update_fertile_slots_op_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 9 | 2016-12-14T03:27:46.000Z | 2017-09-13T02:29:07.000Z | tensorflow/contrib/tensor_forest/python/kernel_tests/update_fertile_slots_op_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 47 | 2016-12-04T12:37:24.000Z | 2018-01-14T18:13:07.000Z | # 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... | 41.534653 | 80 | 0.679619 |
25f975ce0eeaa263d46dcac8e2b1b078536b0a85 | 1,347 | py | Python | regipy/plugins/plugin.py | kamnon/regipy | 12d3be9da631dcc0d6fb342767e51ec4799141c6 | [
"MIT"
] | 190 | 2019-03-06T09:13:08.000Z | 2022-03-19T14:43:34.000Z | regipy/plugins/plugin.py | kamnon/regipy | 12d3be9da631dcc0d6fb342767e51ec4799141c6 | [
"MIT"
] | 117 | 2019-05-15T12:22:46.000Z | 2022-03-30T10:43:03.000Z | regipy/plugins/plugin.py | kamnon/regipy | 12d3be9da631dcc0d6fb342767e51ec4799141c6 | [
"MIT"
] | 37 | 2019-03-12T14:46:12.000Z | 2022-01-12T11:07:10.000Z | import logging
from typing import Any, Dict, List, Optional
from regipy.registry import RegistryHive
PLUGINS = set()
logger = logging.getLogger(__name__)
class Plugin(object):
NAME: Optional[str] = None
DESCRIPTION: Optional[str] = None
COMPATIBLE_HIVE: Optional[str] = None
def __init_subclass__... | 24.053571 | 119 | 0.63029 |
6a9ce572c2d1300d244a4574ab88f5c553638252 | 616 | py | Python | exercicios/exercicio073.py | TayAntony/python | c79d62a12f48965ed374e4c037287a162a368a40 | [
"MIT"
] | null | null | null | exercicios/exercicio073.py | TayAntony/python | c79d62a12f48965ed374e4c037287a162a368a40 | [
"MIT"
] | null | null | null | exercicios/exercicio073.py | TayAntony/python | c79d62a12f48965ed374e4c037287a162a368a40 | [
"MIT"
] | null | null | null | colocacao = ('São Paulo','Coritiba','Corinthians','Atlétigo-MG','Ceará','Avaí','Cuiabá','Bragantino','Juventude','Flamengo','Atlético-GO','Santos','Fluminense','Palmeiras','Fortaleza','América-MG','Botafogo','Internacional',
'Goiás','Athletico-PR')
print('=-'*20)
print(f'Lista de times do Brasileirão 2022: {colocacao}'... | 44 | 224 | 0.683442 |
04865fbde635ef56b126336b8c3303ed2e690f06 | 135 | py | Python | dolldb/dolldb_landing/views.py | nkzou/dolldb | 97444555b47e399834cf257ef0c7b8b088dba4d9 | [
"MIT"
] | 1 | 2018-11-16T01:44:39.000Z | 2018-11-16T01:44:39.000Z | dolldb/dolldb_landing/views.py | nkzou/dolldb | 97444555b47e399834cf257ef0c7b8b088dba4d9 | [
"MIT"
] | 3 | 2019-03-06T20:07:01.000Z | 2019-06-17T21:56:45.000Z | dolldb/dolldb_landing/views.py | NullKZ/dolldb | 97444555b47e399834cf257ef0c7b8b088dba4d9 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse("Landing Page.") | 22.5 | 40 | 0.792593 |
5054d79e07bbbe9cd403e39da6d51889c7f134e0 | 3,683 | py | Python | banking_solution.py | souparnabose99/PythonOOPs | 50707de28a07b7922abc7e2f558fb635044e925b | [
"MIT"
] | null | null | null | banking_solution.py | souparnabose99/PythonOOPs | 50707de28a07b7922abc7e2f558fb635044e925b | [
"MIT"
] | null | null | null | banking_solution.py | souparnabose99/PythonOOPs | 50707de28a07b7922abc7e2f558fb635044e925b | [
"MIT"
] | 1 | 2021-07-22T14:42:46.000Z | 2021-07-22T14:42:46.000Z | from abc import ABCMeta, abstractmethod
from random import randint
class Account(metaclass=ABCMeta):
@abstractmethod
def create_new_account(self):
return 0
@abstractmethod
def authenticate_user(self):
return 0
@abstractmethod
def withdraw_amount(self):
... | 32.59292 | 100 | 0.585935 |
060dd32d59160b6f6845eec05f50a9da117ccce7 | 3,112 | py | Python | get_req_status.py | rovere/utilities | fe864dbe45f688ef9070deb5eb6e9cbd4fb359a4 | [
"MIT"
] | null | null | null | get_req_status.py | rovere/utilities | fe864dbe45f688ef9070deb5eb6e9cbd4fb359a4 | [
"MIT"
] | null | null | null | get_req_status.py | rovere/utilities | fe864dbe45f688ef9070deb5eb6e9cbd4fb359a4 | [
"MIT"
] | null | null | null | #!/bin/env python
import httplib
import urllib
import os
import pprint
import json
pp = pprint.PrettyPrinter(indent=4)
req_name='cmsdataops_CMSSW_4_2_8_patch6_HiggsReproForCert2011A_Jet_Run2011A-v1_RAW_111115_160930'
url= 'cmsweb.cern.ch'
url_old='localhost:8687'
headers = {"Content-type": "application/x-www-form-... | 39.392405 | 124 | 0.760283 |
a4a712ea4c4bd423c203d477d78370014843cda7 | 1,973 | py | Python | tests/__init__.py | RazerM/bucketcache | 8d9b163b73da8c498793cce2f22f6a7cbe524d94 | [
"MIT"
] | 2 | 2018-02-13T03:04:08.000Z | 2021-08-04T05:46:18.000Z | tests/__init__.py | RazerM/bucketcache | 8d9b163b73da8c498793cce2f22f6a7cbe524d94 | [
"MIT"
] | 10 | 2015-04-21T09:45:53.000Z | 2020-09-04T12:34:03.000Z | tests/__init__.py | RazerM/bucketcache | 8d9b163b73da8c498793cce2f22f6a7cbe524d94 | [
"MIT"
] | 1 | 2016-05-28T21:02:31.000Z | 2016-05-28T21:02:31.000Z | from __future__ import absolute_import, division
import sys
import pytest
from bucketcache import Bucket, DeferredWriteBucket
from bucketcache.backends import (
JSONBackend, MessagePackBackend, PickleBackend)
from bucketcache.keymakers import DefaultKeyMaker, StreamingDefaultKeyMaker
cache_objects = [JSONBacken... | 31.31746 | 78 | 0.763305 |
ae0cd3c3ce26d808fa021aa31c2b43df1dc26935 | 752 | py | Python | ebnmpy/r_utils/__init__.py | kclamar/ebnmpy | fc3d7126757c4184c7cb442312f1db5b78d73a3b | [
"MIT"
] | null | null | null | ebnmpy/r_utils/__init__.py | kclamar/ebnmpy | fc3d7126757c4184c7cb442312f1db5b78d73a3b | [
"MIT"
] | null | null | null | ebnmpy/r_utils/__init__.py | kclamar/ebnmpy | fc3d7126757c4184c7cb442312f1db5b78d73a3b | [
"MIT"
] | null | null | null | import numpy as np
def stop(*args):
raise Exception(*args)
def unlist(d: dict):
return np.array(list(d.values()))
def numeric(*args, **kwargs):
return np.zeros(*args)
def matrix(nrow, ncol):
return np.empty((nrow, ncol))
def rep(x, times=1, each=1, length_out=None):
if length_out is None:
... | 15.666667 | 75 | 0.611702 |
8fca68c24bcb97056b462e52e1beeb2d950c9f78 | 15,070 | py | Python | src/chrome/test/functional/prefs.py | jxjnjjn/chromium | 435c1d02fd1b99001dc9e1e831632c894523580d | [
"Apache-2.0"
] | 9 | 2018-09-21T05:36:12.000Z | 2021-11-15T15:14:36.000Z | chrome/test/functional/prefs.py | devasia1000/chromium | 919a8a666862fb866a6bb7aa7f3ae8c0442b4828 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2015-07-21T08:02:01.000Z | 2015-07-21T08:02:01.000Z | chrome/test/functional/prefs.py | devasia1000/chromium | 919a8a666862fb866a6bb7aa7f3ae8c0442b4828 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2016-11-14T10:13:35.000Z | 2021-01-23T15:29:53.000Z | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import shutil
import pyauto_functional # Must be imported before pyauto
import pyauto
import test_utils
... | 42.934473 | 80 | 0.712541 |
ed8804c17eb85d311bfc63c398288e01e8150ec6 | 9,766 | py | Python | api/base/utils.py | prisnormando/osf.io | 78dbbd3b1104a40480754b3172de03e230534523 | [
"Apache-2.0"
] | 1 | 2019-05-08T02:30:38.000Z | 2019-05-08T02:30:38.000Z | api/base/utils.py | prisnormando/osf.io | 78dbbd3b1104a40480754b3172de03e230534523 | [
"Apache-2.0"
] | null | null | null | api/base/utils.py | prisnormando/osf.io | 78dbbd3b1104a40480754b3172de03e230534523 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import urllib
import furl
import urlparse
from distutils.version import StrictVersion
from hashids import Hashids
from django.utils.http import urlquote
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import OuterRef, Exists, Q, QuerySet, F
from rest_framework.except... | 43.022026 | 145 | 0.712369 |
744b18552009d0f3b0baea98a0e563a4d086f130 | 1,095 | py | Python | rlkit/launchers/experiments/vitchyr/probabilistic_goal_reaching/env.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | rlkit/launchers/experiments/vitchyr/probabilistic_goal_reaching/env.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/launchers/experiments/vitchyr/probabilistic_goal_reaching/env.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import gym
import numpy as np
from multiworld.envs.mujoco.classic_mujoco.ant import AntFullPositionGoalEnv
class NormalizeAntFullPositionGoalEnv(gym.Wrapper):
def __init__(self, env):
assert isinstance(env, AntFullPositionGoalEnv)
super().__init__(env)
self.qpos_weights = 1. / env.presamp... | 30.416667 | 76 | 0.624658 |
da94e6f90d823f110e4a2373d7fd16b3d1ab5ac3 | 850 | py | Python | configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ.py | mmabrouk/detectron2 | 158e395acdb8ca6ed6d488b43475f9ef9d200405 | [
"Apache-2.0"
] | 201 | 2022-02-14T17:44:27.000Z | 2022-03-31T03:42:41.000Z | configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ.py | mmabrouk/detectron2 | 158e395acdb8ca6ed6d488b43475f9ef9d200405 | [
"Apache-2.0"
] | 8 | 2022-03-05T11:46:45.000Z | 2022-03-21T02:44:06.000Z | configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ.py | mmabrouk/detectron2 | 158e395acdb8ca6ed6d488b43475f9ef9d200405 | [
"Apache-2.0"
] | 15 | 2022-02-22T08:00:13.000Z | 2022-03-29T06:29:45.000Z | from .mask_rcnn_R_50_FPN_100ep_LSJ import (
dataloader,
lr_multiplier,
model,
optimizer,
train,
)
from detectron2.config import LazyCall as L
from detectron2.modeling.backbone import RegNet
from detectron2.modeling.backbone.regnet import SimpleStem, ResBottleneckBlock
# Config source:
# https://git... | 27.419355 | 138 | 0.736471 |
2efd6c477b78c9b6e59c5d01087f613f8b847020 | 6,426 | py | Python | TTSpy.py | Er0s/PyTTS | f80bf1c373e5646c5c4517117859c1531ad38a61 | [
"MIT"
] | 1 | 2016-12-30T01:56:00.000Z | 2016-12-30T01:56:00.000Z | TTSpy.py | Er0s/PyTTS | f80bf1c373e5646c5c4517117859c1531ad38a61 | [
"MIT"
] | null | null | null | TTSpy.py | Er0s/PyTTS | f80bf1c373e5646c5c4517117859c1531ad38a61 | [
"MIT"
] | null | null | null | # coding=utf-8
#!/usr/bin/python
# <ErosXD@qq.com>
"""
Created by IDLE.
File: TTSpy.py
User: Er0s
Create Date: 2016/9/26
Create Time: 15:30
"""
from __future__ import unicode_literals
from BGtext import BGtext
from sys import argv
import prompt
import ctypes
impo... | 51.822581 | 443 | 0.561625 |
076859e745e398b46d5c10513fdee7da341cbbd9 | 4,739 | py | Python | src/python/tests/core/datastore/data_types_test.py | adetaylor/clusterfuzz | 0260fd19a9e25ac62679f50ce3859c5a7486ee20 | [
"Apache-2.0"
] | null | null | null | src/python/tests/core/datastore/data_types_test.py | adetaylor/clusterfuzz | 0260fd19a9e25ac62679f50ce3859c5a7486ee20 | [
"Apache-2.0"
] | null | null | null | src/python/tests/core/datastore/data_types_test.py | adetaylor/clusterfuzz | 0260fd19a9e25ac62679f50ce3859c5a7486ee20 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38.217742 | 77 | 0.7069 |
af4ef53985c0c794646d357ed6ab0e7b2972d0be | 1,411 | py | Python | pretrained_embedding/run_get_vec.py | ZouJoshua/deeptext_project | efb4db34a4a22951bba4ae724d05c41958bbd347 | [
"Apache-2.0"
] | 2 | 2021-03-01T06:37:27.000Z | 2021-04-07T09:40:55.000Z | pretrained_embedding/run_get_vec.py | ZouJoshua/deeptext_project | efb4db34a4a22951bba4ae724d05c41958bbd347 | [
"Apache-2.0"
] | 5 | 2020-09-26T01:16:58.000Z | 2022-02-10T01:49:30.000Z | pretrained_embedding/run_get_vec.py | ZouJoshua/deeptext_project | efb4db34a4a22951bba4ae724d05c41958bbd347 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Author : Joshua
@Time : 2020/6/16 5:15 下午
@File : run_get_vec.py
@Desc :
"""
from .test_we import redis_conn, wrap_key
import json
import sys
import pandas as pd
import numpy as np
import multiprocessing
def read_redis(res):
res = _redis.get(wrap_key... | 25.196429 | 90 | 0.598866 |
1fe2a5ddabb86f20e7e3fc5791545ffb9c6edfdb | 2,694 | py | Python | qa/rpc-tests/test_framework/blocktools.py | IndieProof/VerusCoin | 948da26bcc8dc2d7bfce3decc40f31621de82a7c | [
"Unlicense"
] | 5 | 2020-10-09T05:47:25.000Z | 2022-03-22T08:38:48.000Z | qa/rpc-tests/test_framework/blocktools.py | IndieProof/VerusCoin | 948da26bcc8dc2d7bfce3decc40f31621de82a7c | [
"Unlicense"
] | 2 | 2020-01-29T12:26:04.000Z | 2020-03-17T01:11:34.000Z | qa/rpc-tests/test_framework/blocktools.py | IndieProof/VerusCoin | 948da26bcc8dc2d7bfce3decc40f31621de82a7c | [
"Unlicense"
] | 7 | 2018-07-28T21:54:40.000Z | 2020-01-20T03:35:00.000Z | # blocktools.py - utilities for manipulating blocks and transactions
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from mininode import CBlock, CTransaction, CTxIn, CTxOut, COutPoint
from script import CScript, OP_0, OP_... | 34.101266 | 78 | 0.657387 |
814f9bb8b748e2a9ffac0a140d188d94c5e2da68 | 3,520 | py | Python | code.py | shadow09rj/olympic-hero | 652f9f88241e3320cdeb16abee18af75d4aef3e7 | [
"MIT"
] | null | null | null | code.py | shadow09rj/olympic-hero | 652f9f88241e3320cdeb16abee18af75d4aef3e7 | [
"MIT"
] | null | null | null | code.py | shadow09rj/olympic-hero | 652f9f88241e3320cdeb16abee18af75d4aef3e7 | [
"MIT"
] | null | null | null | # --------------
#Importing header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#Path of the file
data= pd.read_csv(path)
data.rename(columns = {'Total':'Total_Medals'},inplace=True)
print(data.head(10))
#Code starts here
# --------------
#Code starts here0
#Code starts he... | 30.344828 | 118 | 0.705398 |
1d6da27bb44f335a5aeb3e2dd567f903d5a2d8b5 | 5,154 | py | Python | .github/scripts/flake.py | timmattison/aws-greengrass-nucleus | 9d2fc753fe4b45f1d53862f3e19019d22fff2ca3 | [
"ECL-2.0",
"Apache-2.0"
] | 71 | 2020-12-15T17:27:53.000Z | 2022-03-04T19:30:39.000Z | .github/scripts/flake.py | timmattison/aws-greengrass-nucleus | 9d2fc753fe4b45f1d53862f3e19019d22fff2ca3 | [
"ECL-2.0",
"Apache-2.0"
] | 363 | 2020-12-15T17:27:40.000Z | 2022-03-31T22:22:35.000Z | .github/scripts/flake.py | timmattison/aws-greengrass-nucleus | 9d2fc753fe4b45f1d53862f3e19019d22fff2ca3 | [
"ECL-2.0",
"Apache-2.0"
] | 27 | 2020-12-15T22:01:45.000Z | 2022-03-25T04:44:06.000Z | # Copyright Amazon.com Inc. or its affiliates.
# SPDX-License-Identifier: Apache-2.0
import argparse
import json
import os
import subprocess
import xml.etree.ElementTree as ET
from collections import defaultdict
from agithub.GitHub import GitHub
def main():
parser = argparse.ArgumentParser()
parser.add_ar... | 44.051282 | 114 | 0.602833 |
b844eeed206170bd99b08d212ed96670ec43f94b | 849 | py | Python | image_space_sh_light.py | torresguilherme/spherical-harmonics-demo | 4830dddafeab9ba6b4eff7ae4167a1bc5db16fef | [
"MIT"
] | 1 | 2021-01-13T11:03:28.000Z | 2021-01-13T11:03:28.000Z | image_space_sh_light.py | torresguilherme/spherical-harmonics-demo | 4830dddafeab9ba6b4eff7ae4167a1bc5db16fef | [
"MIT"
] | null | null | null | image_space_sh_light.py | torresguilherme/spherical-harmonics-demo | 4830dddafeab9ba6b4eff7ae4167a1bc5db16fef | [
"MIT"
] | null | null | null | import numpy as np
import glob
from PIL import Image
import sys
try:
i = 0
for lightname in sorted(glob.glob(sys.argv[1] + '*.npy')):
print("rendering image with light: " + lightname)
light = np.load(lightname)
if light.shape[0] < light.shape[1]:
light = light.T
tran... | 36.913043 | 132 | 0.628975 |
f5770eefde9a3ef982f9d4ea92972588c97258d5 | 3,202 | py | Python | salt/states/mount.py | SEJeff/salt | 788402c650a4c821140b461317119ea0543fee4c | [
"Apache-2.0"
] | null | null | null | salt/states/mount.py | SEJeff/salt | 788402c650a4c821140b461317119ea0543fee4c | [
"Apache-2.0"
] | null | null | null | salt/states/mount.py | SEJeff/salt | 788402c650a4c821140b461317119ea0543fee4c | [
"Apache-2.0"
] | null | null | null | '''
Mount Managment
===============
Mount any type of mountable filesystem with the mounted function:
.. code-block:: yaml
/mnt/sdb:
mount:
- mounted
- device: /dev/sdb1
- fstype: ext4
- mkmnt: True
- opts:
- defaults
'''
def mounted(
name,
... | 27.367521 | 78 | 0.527795 |
1c1ed34fc7641b18161e069c4229be7c7b7a2afc | 18,891 | py | Python | rpython/translator/backendopt/test/test_inline.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | 34 | 2015-07-09T04:53:27.000Z | 2021-07-19T05:22:27.000Z | rpython/translator/backendopt/test/test_inline.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | 6 | 2015-05-30T17:20:45.000Z | 2017-06-12T14:29:23.000Z | rpython/translator/backendopt/test/test_inline.py | jptomo/pypy-lang-scheme | 55edb2cec69d78f86793282a4566fcbc1ef9fcac | [
"MIT"
] | 11 | 2015-09-07T14:26:08.000Z | 2020-04-10T07:20:41.000Z | # XXX clean up these tests to use more uniform helpers
import py
from rpython.flowspace.model import Variable, Constant, checkgraph
from rpython.translator.backendopt import canraise
from rpython.translator.backendopt.inline import (simple_inline_function,
CannotInline, auto_inlining, Inliner, collect_called_graphs... | 30.274038 | 90 | 0.500397 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.