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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
288e1a6d274bc5ca9f6df7f21016b1dfe1ee94b9 | 211 | py | Python | template_secret_info.py | JoaoCampos89/0xbtc-discord-price-bot | 6eb6839213dfb0176c0be72c2dda7193d4131750 | [
"MIT"
] | null | null | null | template_secret_info.py | JoaoCampos89/0xbtc-discord-price-bot | 6eb6839213dfb0176c0be72c2dda7193d4131750 | [
"MIT"
] | null | null | null | template_secret_info.py | JoaoCampos89/0xbtc-discord-price-bot | 6eb6839213dfb0176c0be72c2dda7193d4131750 | [
"MIT"
] | null | null | null |
# to add bot to a server:
# https://discordapp.com/oauth2/authorize?client_id=XXXXXXXXXXXXXXXXXX&scope=bot
CLIENT_ID = "XXXXXXXXXXXXXXXXXX"
TOKEN = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
| 26.375 | 80 | 0.824645 |
83213fbacd0d387a2ac3fc6ba2aa7f0a89e27d16 | 9,624 | py | Python | simple_history/admin.py | williwacker/django-simple-history | bc45134b99efb995075d91eaf10f1c338ecf76df | [
"BSD-3-Clause"
] | null | null | null | simple_history/admin.py | williwacker/django-simple-history | bc45134b99efb995075d91eaf10f1c338ecf76df | [
"BSD-3-Clause"
] | null | null | null | simple_history/admin.py | williwacker/django-simple-history | bc45134b99efb995075d91eaf10f1c338ecf76df | [
"BSD-3-Clause"
] | null | null | null | from django import http
from django.apps import apps as django_apps
from django.conf import settings
from django.contrib import admin
from django.contrib.admin import helpers
from django.contrib.admin.utils import unquote
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404... | 40.607595 | 90 | 0.630091 |
41a8d67431f1c9c7456df9869f07d3b654c322dd | 142 | py | Python | djsentry/errors/urls.py | brightmaraba/django-sentry | 87757615d0a88e9115041347ffb134dce182bf5d | [
"MIT"
] | null | null | null | djsentry/errors/urls.py | brightmaraba/django-sentry | 87757615d0a88e9115041347ffb134dce182bf5d | [
"MIT"
] | null | null | null | djsentry/errors/urls.py | brightmaraba/django-sentry | 87757615d0a88e9115041347ffb134dce182bf5d | [
"MIT"
] | null | null | null | # djsentry/errors/urls.py
from django.urls import path
from . import views
urlpatterns = [
path("", views.errors_index, name="index"),
]
| 17.75 | 47 | 0.704225 |
6c6d8e891ad859af70bd054808a85d1b5025d132 | 16,870 | py | Python | venv/lib/python3.7/site-packages/toolium/driver_wrapper.py | SinawoHlaleleni/ProjectDemo | 3bc1994fa40c4548e945f9f7de0cf60a53f2b9ec | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.7/site-packages/toolium/driver_wrapper.py | SinawoHlaleleni/ProjectDemo | 3bc1994fa40c4548e945f9f7de0cf60a53f2b9ec | [
"Apache-2.0"
] | 4 | 2021-06-02T00:35:24.000Z | 2022-01-13T01:47:56.000Z | venv/lib/python3.7/site-packages/toolium/driver_wrapper.py | SinawoHlaleleni/ProjectDemo | 3bc1994fa40c4548e945f9f7de0cf60a53f2b9ec | [
"Apache-2.0"
] | 1 | 2019-12-04T09:10:18.000Z | 2019-12-04T09:10:18.000Z | # -*- coding: utf-8 -*-
u"""
Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
This file is part of Toolium.
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.apach... | 47.655367 | 121 | 0.651097 |
c9dd01e67a367495a6563247ed3425f07b5e82f7 | 24,249 | py | Python | saleor/graphql/product/mutations/products.py | Iahack/saleor | 4e1a0a81812c5914c38c7382506479f8d8522b55 | [
"BSD-3-Clause"
] | 1 | 2021-07-16T13:25:34.000Z | 2021-07-16T13:25:34.000Z | saleor/graphql/product/mutations/products.py | Iahack/saleor | 4e1a0a81812c5914c38c7382506479f8d8522b55 | [
"BSD-3-Clause"
] | 7 | 2020-03-24T16:50:06.000Z | 2021-11-16T16:06:34.000Z | saleor/graphql/product/mutations/products.py | Iahack/saleor | 4e1a0a81812c5914c38c7382506479f8d8522b55 | [
"BSD-3-Clause"
] | 1 | 2019-04-15T10:26:00.000Z | 2019-04-15T10:26:00.000Z | import graphene
from django.template.defaultfilters import slugify
from graphene.types import InputObjectType
from graphql_jwt.decorators import permission_required
from ....product import models
from ....product.utils.attributes import get_name_from_attributes
from ...core.mutations import BaseMutation, ModelDeleteMu... | 35.765487 | 79 | 0.659367 |
f30cf8ae77947b9dccb9403f51267224c6ec698f | 9,309 | py | Python | lib/learn_data.py | knausj85/parrot.py | ae5dc2de6f7d2eae9436e4f1126970b1c32a5245 | [
"MIT"
] | null | null | null | lib/learn_data.py | knausj85/parrot.py | ae5dc2de6f7d2eae9436e4f1126970b1c32a5245 | [
"MIT"
] | null | null | null | lib/learn_data.py | knausj85/parrot.py | ae5dc2de6f7d2eae9436e4f1126970b1c32a5245 | [
"MIT"
] | null | null | null | from config.config import *
import scipy
import scipy.io.wavfile
import os
from sklearn import metrics
from sklearn.metrics import confusion_matrix
from sklearn.ensemble import RandomForestClassifier, ExtraTreesClassifier
from sklearn.model_selection import cross_val_score, train_test_split
import joblib
import time
im... | 46.545 | 167 | 0.650875 |
c68fcb113f6d74e0f0a0ce103c6e7d20fe37102a | 451 | py | Python | rusentrel/classic_cv/ctx/cnn.py | nicolay-r/attitude-extraction-with-attention-and-ds | fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d | [
"MIT"
] | null | null | null | rusentrel/classic_cv/ctx/cnn.py | nicolay-r/attitude-extraction-with-attention-and-ds | fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d | [
"MIT"
] | 1 | 2020-12-16T18:21:11.000Z | 2020-12-30T10:08:27.000Z | rusentrel/classic_cv/ctx/cnn.py | nicolay-r/attitude-extraction-with-attention-and-ds | fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d | [
"MIT"
] | 1 | 2021-03-29T20:58:26.000Z | 2021-03-29T20:58:26.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
sys.path.append('../../../')
from rusentrel.classic.ctx.cnn import run_testing_cnn
from rusentrel.classic_cv.common import CV_COUNT, \
classic_cv_common_callback_modification_func, \
CV_NAME_PREFIX
if __name__ == "__main__":
run_testing_cnn(
... | 22.55 | 74 | 0.731707 |
27ee13549cc4ea15a5d27194a3561e536a1f14c6 | 2,351 | py | Python | env/lib/python2.7/site-packages/agate/table/rename.py | ramshresh/nset-ci-template-hmvc-boilerplate | 04d3a8cff54e9fa49d12efe0cadc0352897fdd62 | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | env/lib/python2.7/site-packages/agate/table/rename.py | ramshresh/nset-ci-template-hmvc-boilerplate | 04d3a8cff54e9fa49d12efe0cadc0352897fdd62 | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | env/lib/python2.7/site-packages/agate/table/rename.py | ramshresh/nset-ci-template-hmvc-boilerplate | 04d3a8cff54e9fa49d12efe0cadc0352897fdd62 | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | #!/usr/bin/env python
# pylint: disable=W0212
from agate import utils
def rename(self, column_names=None, row_names=None, slug_columns=False, slug_rows=False, **kwargs):
"""
Create a copy of this table with different column names or row names.
By enabling :code:`slug_columns` or :code:`slug_rows` and no... | 39.183333 | 108 | 0.70353 |
5eb0c1b41ca7047a1b790c67e4a38e9030dfe3e6 | 30,559 | py | Python | src/transformers/models/transfo_xl/tokenization_transfo_xl.py | kct22aws/transformers | 04cddaf402591e9f5bdb5f116a111d829a0ce4f4 | [
"Apache-2.0"
] | 31 | 2022-02-02T13:13:41.000Z | 2022-03-29T08:37:20.000Z | src/transformers/models/transfo_xl/tokenization_transfo_xl.py | guang7400613/transformers | 28e091430eea9e0d40839e56fd0d57aec262f5f9 | [
"Apache-2.0"
] | 2 | 2022-03-14T10:13:16.000Z | 2022-03-14T11:50:27.000Z | src/transformers/models/transfo_xl/tokenization_transfo_xl.py | guang7400613/transformers | 28e091430eea9e0d40839e56fd0d57aec262f5f9 | [
"Apache-2.0"
] | 2 | 2022-03-21T04:32:39.000Z | 2022-03-22T01:02:49.000Z | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | 38.151061 | 120 | 0.601361 |
3f2dde7ec47370a34c614c038a1f108ead0e5366 | 23,121 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_eth_trunk.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_eth_trunk.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_eth_trunk.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | 34.152142 | 140 | 0.597509 |
050e4d9dc0e1a564dfdfb6e4f7d9d04f6dd2347d | 6,498 | py | Python | pl_bolts/models/gans/basic/basic_gan_module.py | z-fabian/lightning-bolts | 57ab621b0779982010a6b44ece60fec64b9aa039 | [
"Apache-2.0"
] | null | null | null | pl_bolts/models/gans/basic/basic_gan_module.py | z-fabian/lightning-bolts | 57ab621b0779982010a6b44ece60fec64b9aa039 | [
"Apache-2.0"
] | null | null | null | pl_bolts/models/gans/basic/basic_gan_module.py | z-fabian/lightning-bolts | 57ab621b0779982010a6b44ece60fec64b9aa039 | [
"Apache-2.0"
] | null | null | null | from argparse import ArgumentParser
import torch
from pytorch_lightning import LightningModule, seed_everything, Trainer
from torch.nn import functional as F
from pl_bolts.models.gans.basic.components import Discriminator, Generator
class GAN(LightningModule):
"""
Vanilla GAN implementation.
Example::
... | 32.009852 | 111 | 0.65297 |
0ce7c29a44a0dade368098f5b58f7ecada7caf8b | 6,050 | py | Python | PyFlow/Core/Edge.py | pedroCabrera/PyFlow | 8b439d9b47fff450e91c09d40c7b286e88cb624f | [
"MIT"
] | 7 | 2018-06-24T15:55:00.000Z | 2021-07-13T08:11:25.000Z | PyFlow/Core/Edge.py | pedroCabrera/PyFlow | 8b439d9b47fff450e91c09d40c7b286e88cb624f | [
"MIT"
] | 32 | 2019-02-18T20:47:46.000Z | 2019-05-30T12:51:10.000Z | PyFlow/Core/Edge.py | pedroCabrera/PyFlow | 8b439d9b47fff450e91c09d40c7b286e88cb624f | [
"MIT"
] | 5 | 2019-02-19T23:26:21.000Z | 2020-12-23T00:32:59.000Z | """@file Edge.py
Edge is a cubic spline curve. It represents connecton between two pins.
"""
from Qt import QtCore
from Qt import QtGui
from Qt.QtWidgets import QGraphicsPathItem
from Settings import Colors
from AbstractGraph import *
import weakref
from uuid import UUID, uuid4
## Connection between pins
class Edge(Q... | 32.880435 | 144 | 0.582314 |
f4c5938a139363fa801928f316338fa4a9d4e77c | 22,879 | py | Python | sympy/plotting/experimental_lambdify.py | yupbank/sympy | 66d7aef9dc1b26055af22e27ba42004c40b95d7c | [
"BSD-3-Clause"
] | 1 | 2021-11-19T03:38:42.000Z | 2021-11-19T03:38:42.000Z | sympy/plotting/experimental_lambdify.py | yupbank/sympy | 66d7aef9dc1b26055af22e27ba42004c40b95d7c | [
"BSD-3-Clause"
] | null | null | null | sympy/plotting/experimental_lambdify.py | yupbank/sympy | 66d7aef9dc1b26055af22e27ba42004c40b95d7c | [
"BSD-3-Clause"
] | null | null | null | """ rewrite of lambdify - This stuff is not stable at all.
It is for internal use in the new plotting module.
It may (will! see the Q'n'A in the source) be rewritten.
It's completely self contained. Especially it does not use lambdarepr.
It does not aim to replace the current lambdify. Most importantly it will never... | 35.526398 | 101 | 0.578478 |
e1549b58d5fc84889e4caf3d4c18fa0fb48848b2 | 404 | py | Python | EstimatePIbyRandom/Python/estimatePI.py | Icaro-G-Silva/AlmostNothingUseful | 4fbb4dc6f2af382f1c7b45490972d0c92f8d2925 | [
"MIT"
] | null | null | null | EstimatePIbyRandom/Python/estimatePI.py | Icaro-G-Silva/AlmostNothingUseful | 4fbb4dc6f2af382f1c7b45490972d0c92f8d2925 | [
"MIT"
] | null | null | null | EstimatePIbyRandom/Python/estimatePI.py | Icaro-G-Silva/AlmostNothingUseful | 4fbb4dc6f2af382f1c7b45490972d0c92f8d2925 | [
"MIT"
] | null | null | null | from random import uniform
#The more points, the more accurate it gets
def estimatePi(n):
quantPointCircle = 0
quantPointTotal = 0
for _ in range(n):
x = uniform(0,1)
y = uniform(0,1)
distance = (x**2) + (y**2)
if distance <= 1: quantPointCircle += 1
quantPointTotal ... | 25.25 | 49 | 0.626238 |
fa63a40051e24c55c9655a0a6b814cf152b6b8ff | 7,779 | py | Python | test/qa/rpc-tests/assumevalid.py | MagnaChain/MagnaChain-dev-master | c83e7a8b9e8f9ae8684a0e3a11f1eeb42dfa1272 | [
"MIT"
] | 26 | 2018-11-30T09:01:34.000Z | 2020-03-11T00:41:52.000Z | test/qa/rpc-tests/assumevalid.py | MagnaChain/MagnaChain-dev-master | c83e7a8b9e8f9ae8684a0e3a11f1eeb42dfa1272 | [
"MIT"
] | 3 | 2019-01-01T09:06:22.000Z | 2019-04-01T10:06:01.000Z | test/qa/rpc-tests/assumevalid.py | MagnaChain/MagnaChain-dev-master | c83e7a8b9e8f9ae8684a0e3a11f1eeb42dfa1272 | [
"MIT"
] | 24 | 2018-11-30T03:32:53.000Z | 2020-03-20T04:30:34.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The MagnaChain Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
assumevalid.py
Test logic for skipping signature validation on blocks which we've assumed
valid (h... | 40.515625 | 97 | 0.655611 |
cf8bba0aa650a5e24d0dff48c52fe8e1093b6d43 | 709 | py | Python | tests/test_shekel_grad.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | null | null | null | tests/test_shekel_grad.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | 1 | 2021-11-17T09:03:17.000Z | 2021-11-17T09:03:17.000Z | tests/test_shekel_grad.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | null | null | null | import numpy as np
from metod_alg import objective_functions as mt_obj
def test_1():
"""Computational test for mt_obj.shekel_gradient() with d=2."""
p = 3
d = 2
matrix_test = np.array([[[1, 0],
[0, 1]],
[[1, 0],
[0, 1... | 29.541667 | 86 | 0.424542 |
f79735951a8af582e3171934f8e79ae359ed7f13 | 9,949 | py | Python | distpy/jumping/LocaleIndependentJumpingDistribution.py | CU-NESS/distpy | 279ba7e46726a85246566401fca19b8739d18d08 | [
"Apache-2.0"
] | null | null | null | distpy/jumping/LocaleIndependentJumpingDistribution.py | CU-NESS/distpy | 279ba7e46726a85246566401fca19b8739d18d08 | [
"Apache-2.0"
] | null | null | null | distpy/jumping/LocaleIndependentJumpingDistribution.py | CU-NESS/distpy | 279ba7e46726a85246566401fca19b8739d18d08 | [
"Apache-2.0"
] | null | null | null | """
Module containing class representing a jumping distribution which describes a
translation whose distribution does not depend on the starting location. If the
PDF of the translation distribution is \\(g(\\boldsymbol{t})\\), this
distribution's PDF is given by
$$f(\\boldsymbol{x},\\boldsymbol{y})=g(\\boldsymbol{y}-\\... | 40.116935 | 79 | 0.600362 |
1a609979e1f8c024eb19a130bf2a8f6fbff22591 | 3,781 | py | Python | forge_sdk/protos/protos/account_migrate_pb2.py | ArcBlock/forge-python-sdk | 4e72d75d3c06b16554d660860708732c83b5f8b2 | [
"Apache-2.0"
] | 9 | 2019-05-08T01:30:22.000Z | 2020-05-08T22:11:40.000Z | forge_sdk/protos/protos/account_migrate_pb2.py | ArcBlock/forge-python-sdk | 4e72d75d3c06b16554d660860708732c83b5f8b2 | [
"Apache-2.0"
] | 22 | 2019-05-14T18:36:17.000Z | 2019-12-24T10:09:42.000Z | forge_sdk/protos/protos/account_migrate_pb2.py | ArcBlock/forge-python-sdk | 4e72d75d3c06b16554d660860708732c83b5f8b2 | [
"Apache-2.0"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: account_migrate.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection a... | 38.979381 | 389 | 0.764613 |
439de9df85d4097574641ce49e4b0624924e8974 | 7,274 | py | Python | ccc/secrets_server.py | busunkim96/cc-utils | aa864b1fad3061410907d6b93b8aee8cd25f33b5 | [
"Apache-2.0"
] | 15 | 2018-04-18T13:25:30.000Z | 2022-03-04T09:25:41.000Z | ccc/secrets_server.py | busunkim96/cc-utils | aa864b1fad3061410907d6b93b8aee8cd25f33b5 | [
"Apache-2.0"
] | 221 | 2018-04-12T06:29:43.000Z | 2022-03-27T03:01:40.000Z | ccc/secrets_server.py | busunkim96/cc-utils | aa864b1fad3061410907d6b93b8aee8cd25f33b5 | [
"Apache-2.0"
] | 29 | 2018-04-11T14:42:23.000Z | 2021-11-09T16:26:32.000Z | # Copyright (c) 2019-2020 SAP SE or an SAP affiliate company. All rights reserved. This file is
# licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the L... | 34.971154 | 99 | 0.659335 |
2dd0aec4624b0641bab1005a22742288da410476 | 21,701 | py | Python | server/api/project_admin_api.py | theprover97/tasking-manager | 240f2395af522708666c1a6a407b7edeab04d332 | [
"BSD-2-Clause"
] | null | null | null | server/api/project_admin_api.py | theprover97/tasking-manager | 240f2395af522708666c1a6a407b7edeab04d332 | [
"BSD-2-Clause"
] | null | null | null | server/api/project_admin_api.py | theprover97/tasking-manager | 240f2395af522708666c1a6a407b7edeab04d332 | [
"BSD-2-Clause"
] | null | null | null | from flask_restful import Resource, request, current_app
from schematics.exceptions import DataError
from server.models.dtos.project_dto import DraftProjectDTO, ProjectDTO
from server.services.project_admin_service import ProjectAdminService, InvalidGeoJson, InvalidData, \
ProjectAdminServiceError, NotFound
from s... | 34.777244 | 120 | 0.483757 |
9e6dfea16953016ae0dd58e614e8cec57a415988 | 1,431 | py | Python | pymoku/plotly_support.py | liquidinstruments/pymoku | a10c2516e5953722a5f5b52aec7944bec22492c2 | [
"MIT"
] | 11 | 2016-10-11T04:37:14.000Z | 2021-09-10T02:34:03.000Z | pymoku/plotly_support.py | liquidinstruments/pymoku | a10c2516e5953722a5f5b52aec7944bec22492c2 | [
"MIT"
] | 8 | 2017-06-02T18:19:49.000Z | 2020-09-07T06:15:53.000Z | pymoku/plotly_support.py | liquidinstruments/pymoku | a10c2516e5953722a5f5b52aec7944bec22492c2 | [
"MIT"
] | 11 | 2018-07-12T04:18:40.000Z | 2022-03-04T10:10:48.000Z | # Plotly integration for the Moku:Lab Datalogger
# Copyright 2016 Liquid Instruments Pty. Ltd.
from pymoku import InvalidOperationException
def stream_init(moku, uname, api_key, str_id1,
str_id2, npoints=100, mode='lines', line={}):
line = ';'.join(['='.join(i) for i in list(line.items())])
... | 26.5 | 75 | 0.615653 |
293bb062a803e09a1be78c04a75c420912b594c8 | 7,465 | py | Python | iocp/Output.py | Rloota/ioc_parser | 3361263389b0c45706dcbc933f04446dcfb3c418 | [
"MIT"
] | 3 | 2020-01-14T13:34:05.000Z | 2020-07-30T13:04:49.000Z | iocp/Output.py | Rloota/ioc_parser | 3361263389b0c45706dcbc933f04446dcfb3c418 | [
"MIT"
] | 1 | 2020-01-20T12:52:57.000Z | 2020-01-20T12:52:57.000Z | iocp/Output.py | Rloota/ioc_parser | 3361263389b0c45706dcbc933f04446dcfb3c418 | [
"MIT"
] | 2 | 2020-01-20T08:46:01.000Z | 2020-01-20T12:40:46.000Z | #!/usr/bin/env python
import os
import sys
import csv
import json
from pymisp import ExpandedPyMISP
from pymispwarninglists import WarningLists
try:
from configparser import ConfigParser
except ImportError:
from ConfigParser import ConfigParser
import io
import iocp
import urllib3
urllib3.disable_warnings(u... | 31.104167 | 128 | 0.604153 |
05ba0ccbd6478a01869c1a654b6104d41942e678 | 2,081 | py | Python | lighthouse/classes/event_properties/definitions/biosero/samples_picked_from_source.py | sanger/lighthouse | ded48ed20829301f7a131e5711532ee237982050 | [
"MIT"
] | 1 | 2021-11-14T19:57:03.000Z | 2021-11-14T19:57:03.000Z | lighthouse/classes/event_properties/definitions/biosero/samples_picked_from_source.py | sanger/lighthouse | ded48ed20829301f7a131e5711532ee237982050 | [
"MIT"
] | 496 | 2020-04-23T07:45:53.000Z | 2022-03-31T14:33:01.000Z | lighthouse/classes/event_properties/definitions/biosero/samples_picked_from_source.py | sanger/lighthouse | ded48ed20829301f7a131e5711532ee237982050 | [
"MIT"
] | 3 | 2020-11-01T23:41:08.000Z | 2021-02-23T16:09:40.000Z | import logging
from functools import cached_property
from typing import Any, Dict, List
from lighthouse.classes.event_properties.definitions import PlateBarcode, RunID
from lighthouse.classes.event_properties.interfaces import EventPropertyAbstract
from lighthouse.classes.messages import SequencescapeMessage, Warehous... | 40.803922 | 101 | 0.715041 |
6e4bf2bc06577cdc941d154db0342daccb1507d6 | 7,260 | py | Python | ksp/duration.py | agausmann/ksp.py | e49c1fd65e15cbe7a449fd5ea5a9dfeb3dec6368 | [
"0BSD"
] | null | null | null | ksp/duration.py | agausmann/ksp.py | e49c1fd65e15cbe7a449fd5ea5a9dfeb3dec6368 | [
"0BSD"
] | null | null | null | ksp/duration.py | agausmann/ksp.py | e49c1fd65e15cbe7a449fd5ea5a9dfeb3dec6368 | [
"0BSD"
] | null | null | null | """Calculator for in-game time and durations."""
from functools import total_ordering
from typing import Union
Number = Union[float, int]
SECONDS_PER_MINUTE = 60.0
MINUTES_PER_HOUR = 60.0
HOURS_PER_DAY = 6.0
# This is the length of the full orbit of Kerbin, but it appears that
# the "year" in timestamps is exactly 4... | 33.611111 | 78 | 0.626171 |
6da177c23e7e341c9152df64f34a9491b909ec5f | 3,185 | py | Python | Shiptracker/settings.py | wiseljj/shiptracker | 946800d3927d8203d34830fe4abba097467570a1 | [
"MIT"
] | null | null | null | Shiptracker/settings.py | wiseljj/shiptracker | 946800d3927d8203d34830fe4abba097467570a1 | [
"MIT"
] | null | null | null | Shiptracker/settings.py | wiseljj/shiptracker | 946800d3927d8203d34830fe4abba097467570a1 | [
"MIT"
] | 2 | 2019-04-06T10:16:23.000Z | 2019-08-07T14:33:04.000Z | # -*- coding: utf-8 -*-
# Scrapy settings for Shiptracker project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/t... | 34.619565 | 102 | 0.777394 |
022324a16f13a8c942fc72e4015a52ab3e03c2bf | 2,158 | py | Python | src/store.py | Rizal-XD/crackv3 | b932de87dc1d8411ee0d2de54e55ef45077d01af | [
"Apache-2.0"
] | 2 | 2021-02-21T02:15:24.000Z | 2021-03-13T08:49:20.000Z | src/store.py | Rizal-XD/crackv3 | b932de87dc1d8411ee0d2de54e55ef45077d01af | [
"Apache-2.0"
] | null | null | null | src/store.py | Rizal-XD/crackv3 | b932de87dc1d8411ee0d2de54e55ef45077d01af | [
"Apache-2.0"
] | 5 | 2021-02-13T08:19:13.000Z | 2021-05-21T23:42:19.000Z | #!/usr/bin/python3
# coding=utf-8
#######################################################
# File : store.py #
# Author : Rizal F #
# Github : https://github.com/Rizal-XD #
# Facebook : https://www.facebook.com/AKUN.KERTAS... | 29.162162 | 93 | 0.46988 |
1c4e3152dee1f525a3d9f543de5ef8c8bcccbdd3 | 2,897 | py | Python | .cloud-build/execute_notebook_remote.py | gogasca/vertex-ai-samples | 85984f117300768061c03a64e3982fae27c64126 | [
"Apache-2.0"
] | null | null | null | .cloud-build/execute_notebook_remote.py | gogasca/vertex-ai-samples | 85984f117300768061c03a64e3982fae27c64126 | [
"Apache-2.0"
] | null | null | null | .cloud-build/execute_notebook_remote.py | gogasca/vertex-ai-samples | 85984f117300768061c03a64e3982fae27c64126 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2021 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 ... | 32.550562 | 87 | 0.744218 |
f25ec1c242fdf622582a150c68d320030dc80820 | 918 | py | Python | manage.py | k-hsu/it-help-app | 561fae8aaefcf859ed0d8910887e9167314aab9b | [
"Unlicense"
] | null | null | null | manage.py | k-hsu/it-help-app | 561fae8aaefcf859ed0d8910887e9167314aab9b | [
"Unlicense"
] | null | null | null | manage.py | k-hsu/it-help-app | 561fae8aaefcf859ed0d8910887e9167314aab9b | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
import dotenv
def main():
"""Read environment variables"""
django_env = None
if ('DJANGO_ENV' in os.environ):
django_env = os.getenv('DJANGO_ENV')
dotenv.read_dotenv()
if (django_env !=... | 28.6875 | 73 | 0.666667 |
b7f508a5443045e941d35206c132990c803b6e41 | 6,374 | py | Python | docassemble_webapp/docassemble/webapp/setup.py | michaelhofrichterHVL/docassemble | fe5d8dec63d21fc614eb5df67f9a04b806ac8a60 | [
"MIT"
] | null | null | null | docassemble_webapp/docassemble/webapp/setup.py | michaelhofrichterHVL/docassemble | fe5d8dec63d21fc614eb5df67f9a04b806ac8a60 | [
"MIT"
] | null | null | null | docassemble_webapp/docassemble/webapp/setup.py | michaelhofrichterHVL/docassemble | fe5d8dec63d21fc614eb5df67f9a04b806ac8a60 | [
"MIT"
] | null | null | null | from docassemble.webapp.app_object import app
from docassemble.base.config import daconfig
from datetime import timedelta
import docassemble.webapp.database
da_version = '0.5.69'
app.config['DA_VERSION'] = da_version
app.config['APP_NAME'] = daconfig.get('appname', 'docassemble')
app.config['BRAND_NAME'] = daconfig.get... | 65.71134 | 180 | 0.764041 |
0d766aec8dd24f1ae922dfe71eb6df464982bc6b | 18,463 | py | Python | frappe/permissions.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 1 | 2017-07-30T11:46:08.000Z | 2017-07-30T11:46:08.000Z | frappe/permissions.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 5 | 2020-12-04T21:08:07.000Z | 2022-03-12T00:39:56.000Z | frappe/permissions.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 1 | 2020-09-03T18:16:50.000Z | 2020-09-03T18:16:50.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals, print_function
from six import string_types
import frappe, copy, json
from frappe import _, msgprint
from frappe.utils import cint
import frappe.share
rights = ("read", "write", ... | 33.447464 | 151 | 0.737204 |
ecf9c193ef14aacfb650519c3d1c8c782d4e37ed | 926 | py | Python | setup.py | didmar/subs2cia | 5dcd7b1ae2857701ccb8f691f83cb1ffd277fd9e | [
"MIT"
] | null | null | null | setup.py | didmar/subs2cia | 5dcd7b1ae2857701ccb8f691f83cb1ffd277fd9e | [
"MIT"
] | null | null | null | setup.py | didmar/subs2cia | 5dcd7b1ae2857701ccb8f691f83cb1ffd277fd9e | [
"MIT"
] | null | null | null | import setuptools
from subs2cia import __version__
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="subs2cia",
version=__version__,
license='MIT',
author="Daniel Xing",
author_email="danielxing97@gmail.com",
description="A subtitle-based multimedia ex... | 33.071429 | 98 | 0.683585 |
35edd2562ea7e690d73ec2b3fd154f1b25fbc0a4 | 10,367 | py | Python | docs/conf.py | Brewgarten/c4-messaging | ad3b4232c8d50424bf9c8ce2f7b6c9d1953e8928 | [
"MIT"
] | null | null | null | docs/conf.py | Brewgarten/c4-messaging | ad3b4232c8d50424bf9c8ce2f7b6c9d1953e8928 | [
"MIT"
] | null | null | null | docs/conf.py | Brewgarten/c4-messaging | ad3b4232c8d50424bf9c8ce2f7b6c9d1953e8928 | [
"MIT"
] | null | null | null | #
# 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.
import sys
import os
# If extension... | 30.671598 | 80 | 0.719109 |
265724cec94a4417d7065c93a796bf2c4e070bf3 | 2,336 | py | Python | strataalgebra/tests.py | fchapoton/mgn | 9b0245e1f41aa08a19f7f332ef29415e8a66bf76 | [
"MIT"
] | null | null | null | strataalgebra/tests.py | fchapoton/mgn | 9b0245e1f41aa08a19f7f332ef29415e8a66bf76 | [
"MIT"
] | null | null | null | strataalgebra/tests.py | fchapoton/mgn | 9b0245e1f41aa08a19f7f332ef29415e8a66bf76 | [
"MIT"
] | null | null | null | """
The ``tests`` module tests the implementation of the product and the FZ relations by comparing them to the ``topintersections`` code.
You can change which pairs you want to check by modifying the ``g_n_pairs_to_check variable`` in the source code ``tests.py``.
::
sage: import strataalgebra.tests as tests
... | 27.162791 | 133 | 0.545805 |
4bbced5758d33563df788f6765b11c319ebe57b2 | 2,512 | py | Python | vsts/vsts/maven/v4_1/models/__init__.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/maven/v4_1/models/__init__.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/maven/v4_1/models/__init__.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 40.516129 | 94 | 0.730892 |
712b3fb9cfe80a247c587d302a4a4608900ee83f | 2,504 | py | Python | testingbattery.py | kaetze66/tb_pysd | b0f262b0aa4618e170558d071782a1b9af2944b3 | [
"MIT"
] | 1 | 2018-08-10T16:11:25.000Z | 2018-08-10T16:11:25.000Z | testingbattery.py | kaetze66/tb_pysd | b0f262b0aa4618e170558d071782a1b9af2944b3 | [
"MIT"
] | null | null | null | testingbattery.py | kaetze66/tb_pysd | b0f262b0aa4618e170558d071782a1b9af2944b3 | [
"MIT"
] | 2 | 2018-08-10T16:11:27.000Z | 2018-11-12T10:06:14.000Z | """
Master file for the testing battery
defines the testing folder (standard: .\test
reads settings from the config file
- test mode
- pysd helper settings
determines the MP setting (only available in windows)
limits the files tested (in testing mode)
initializes battery
runs pipe according to MP setting
Version 0.... | 30.91358 | 116 | 0.750799 |
3c100d60cb80ac880b3e46654d1e9afaee6d6046 | 1,340 | py | Python | result/migrations/0001_initial.py | easylearn79/oui2 | b2587d191c375d65cc2384b2dcbcc6712f0793ca | [
"MIT"
] | null | null | null | result/migrations/0001_initial.py | easylearn79/oui2 | b2587d191c375d65cc2384b2dcbcc6712f0793ca | [
"MIT"
] | null | null | null | result/migrations/0001_initial.py | easylearn79/oui2 | b2587d191c375d65cc2384b2dcbcc6712f0793ca | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2021-03-16 00:28
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('corecode', '0001_initial'),
('students', '0001_initial'),
]
operations = [
migrat... | 39.411765 | 126 | 0.611194 |
5d0b6615d175035806e8023a83dc9db3a0b8aa69 | 28,547 | py | Python | venv/lib/python3.9/site-packages/SpriteKit/_metadata.py | ipriyam26/RedditTTS | 8528bdc3adcea1197c7159e6eb4c302487e32406 | [
"MIT"
] | null | null | null | venv/lib/python3.9/site-packages/SpriteKit/_metadata.py | ipriyam26/RedditTTS | 8528bdc3adcea1197c7159e6eb4c302487e32406 | [
"MIT"
] | null | null | null | venv/lib/python3.9/site-packages/SpriteKit/_metadata.py | ipriyam26/RedditTTS | 8528bdc3adcea1197c7159e6eb4c302487e32406 | [
"MIT"
] | null | null | null | # This file is generated by objective.metadata
#
# Last update: Sun Jul 11 21:54:16 2021
#
# flake8: noqa
import objc, sys
if sys.maxsize > 2 ** 32:
def sel32or64(a, b):
return b
else:
def sel32or64(a, b):
return a
if objc.arch == "arm64":
def selAorI(a, b):
return a
else:
... | 39.759053 | 2,975 | 0.509125 |
a5fd2dd248c2afeea044d0908b0895ddde2d2a4d | 3,772 | py | Python | factories/vgkr_v2/config_v2.py | yizhe-ang/MMSceneGraph | d4daec3d7930d6fe1efe75b9c0a265c8be0b70ba | [
"MIT"
] | 24 | 2021-10-14T03:28:28.000Z | 2022-03-29T09:30:04.000Z | factories/vgkr_v2/config_v2.py | yizhe-ang/MMSceneGraph | d4daec3d7930d6fe1efe75b9c0a265c8be0b70ba | [
"MIT"
] | 4 | 2021-12-14T15:04:49.000Z | 2022-02-19T09:54:42.000Z | factories/vgkr_v2/config_v2.py | yizhe-ang/MMSceneGraph | d4daec3d7930d6fe1efe75b9c0a265c8be0b70ba | [
"MIT"
] | 4 | 2021-10-31T11:23:06.000Z | 2021-12-17T06:38:50.000Z | # ---------------------------------------------------------------
# config_v2.py
# Set-up time: 2020/12/6 21:57
# Copyright (c) 2020 ICT
# Licensed under The MIT License [see LICENSE for details]
# Written by Kenneth-Wong (Wenbin-Wang) @ VIPL.ICT
# Contact: wenbin.wang@vipl.ict.ac.cn [OR] nkwangwenbin@gmail.com
... | 47.15 | 104 | 0.738335 |
b73c99907f8e1cc34e085670ae1a366fcf886853 | 19,755 | py | Python | radar_class/reproject.py | SRM-Vision/LCR_sjtu | 16cbdc8377aac46f59d3d0cd7fbac72c013911f5 | [
"MIT"
] | 26 | 2021-08-28T08:34:17.000Z | 2022-03-30T12:16:08.000Z | radar_class/reproject.py | SRM-Vision/LCR_sjtu | 16cbdc8377aac46f59d3d0cd7fbac72c013911f5 | [
"MIT"
] | null | null | null | radar_class/reproject.py | SRM-Vision/LCR_sjtu | 16cbdc8377aac46f59d3d0cd7fbac72c013911f5 | [
"MIT"
] | 14 | 2021-08-29T09:16:39.000Z | 2022-03-30T12:16:10.000Z | '''
反投影预警类
'''
import cv2
import numpy as np
from radar_class.camera import read_yaml
from radar_class.missile_detect import Missile
from radar_class.common import plot, armor_plot, is_inside
from radar_class.config import color2enemy, enemy_case
class Real_Scene(object):
'''
反投影预警
'''
# 类全局变量
_u... | 42.575431 | 135 | 0.499317 |
66938754a7b69f0d73e4eb93f2f53c4b9ef91365 | 1,486 | py | Python | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/8_features/numtrees_45/rule_10.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/8_features/numtrees_45/rule_10.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/8_features/numtrees_45/rule_10.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | def findDecision(obj): #obj[0]: Passanger, obj[1]: Coupon, obj[2]: Education, obj[3]: Occupation, obj[4]: Bar, obj[5]: Restaurant20to50, obj[6]: Direction_same, obj[7]: Distance
# {"feature": "Bar", "instances": 23, "metric_value": 0.9986, "depth": 1}
if obj[4]>0.0:
# {"feature": "Restaurant20to50", "instances": 15... | 34.55814 | 177 | 0.574697 |
3ced71b5b98371f250fe54eb0e6eb07dfdce88ee | 511 | py | Python | small_rect_producer.py | chuck-kelly/DataEngineering.Kafka.MbyN | 811e6f3e8a8a91a699890fa0a4072e14e2b28933 | [
"MIT"
] | null | null | null | small_rect_producer.py | chuck-kelly/DataEngineering.Kafka.MbyN | 811e6f3e8a8a91a699890fa0a4072e14e2b28933 | [
"MIT"
] | null | null | null | small_rect_producer.py | chuck-kelly/DataEngineering.Kafka.MbyN | 811e6f3e8a8a91a699890fa0a4072e14e2b28933 | [
"MIT"
] | null | null | null | from kafka import KafkaProducer
from rectangle import make_rectangle
from time import sleep
if __name__=="__main__":
producer = KafkaProducer(bootstrap_servers='localhost:9092')
id = 0
for _ in range(20):
rectangle = bytes(str(make_rectangle(1,10)), encoding = 'utf-8')
producer.send('s... | 34.066667 | 105 | 0.663405 |
dd891dbbb5592251d89b5f058bf3a686f7eb68f4 | 1,699 | py | Python | tests/query_test/test_local_fs.py | adoroszlai/impala | ea13e744977c71206c11a54f65d77aeecb55703d | [
"Apache-2.0"
] | 746 | 2017-12-02T06:02:05.000Z | 2022-03-29T06:59:03.000Z | tests/query_test/test_local_fs.py | xwzbupt/impala | 97dda2b27da99367f4d07699aa046b16cda16dd4 | [
"Apache-2.0"
] | 9 | 2018-01-30T16:16:22.000Z | 2021-08-31T00:13:28.000Z | tests/query_test/test_local_fs.py | xwzbupt/impala | 97dda2b27da99367f4d07699aa046b16cda16dd4 | [
"Apache-2.0"
] | 363 | 2017-12-10T01:08:17.000Z | 2022-03-26T05:25:00.000Z | # 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... | 41.439024 | 77 | 0.788111 |
0fb71f8a0965860fc80a233793c4a5acd1049a94 | 2,308 | py | Python | scripts/pcf_clang_format.py | vincentkfu/xNVMe | 5505592e3993521c4e79eb5a41c4b86f975eaee6 | [
"Apache-2.0"
] | null | null | null | scripts/pcf_clang_format.py | vincentkfu/xNVMe | 5505592e3993521c4e79eb5a41c4b86f975eaee6 | [
"Apache-2.0"
] | null | null | null | scripts/pcf_clang_format.py | vincentkfu/xNVMe | 5505592e3993521c4e79eb5a41c4b86f975eaee6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
clang-format wrapper for pre-commit integration with external style-file
In clang-format-14 one can specify the path to clang-format-definitions, however,
clang-format-14 is at the time of writing this not released and therefore a bit
cumbersome to distribute. This script wra... | 28.146341 | 85 | 0.668111 |
3551e6cc46a2c57837186030978a7873a033b184 | 6,382 | py | Python | spike_swarm_sim/objects/light_source.py | Robolabo/EvoSwarmSim | 45f20f00b079a9481e324e091c46040182cf1d3c | [
"MIT"
] | null | null | null | spike_swarm_sim/objects/light_source.py | Robolabo/EvoSwarmSim | 45f20f00b079a9481e324e091c46040182cf1d3c | [
"MIT"
] | null | null | null | spike_swarm_sim/objects/light_source.py | Robolabo/EvoSwarmSim | 45f20f00b079a9481e324e091c46040182cf1d3c | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import colors
import matplotlib.pyplot as plot
import pybullet as p
from spike_swarm_sim.objects import WorldObject2D, WorldObject3D
from spike_swarm_sim.register import world_object_registry
@world_object_registry(name='light_source')
class LightSource3D(WorldObj... | 40.910256 | 123 | 0.604199 |
882305bd45e920ade9370fc3b909af705b66d643 | 605 | py | Python | blazar/plugins/networks/__init__.py | 4sarathbabu/blazar | 16ed6ad588e3508d1436aa3b2f1aae4ed5f4928b | [
"Apache-2.0"
] | 1 | 2022-02-22T11:34:45.000Z | 2022-02-22T11:34:45.000Z | blazar/plugins/networks/__init__.py | 4sarathbabu/blazar | 16ed6ad588e3508d1436aa3b2f1aae4ed5f4928b | [
"Apache-2.0"
] | 19 | 2017-05-23T21:34:09.000Z | 2022-02-21T19:15:29.000Z | blazar/plugins/networks/__init__.py | 4sarathbabu/blazar | 16ed6ad588e3508d1436aa3b2f1aae4ed5f4928b | [
"Apache-2.0"
] | 4 | 2018-08-20T19:39:02.000Z | 2022-02-22T11:36:39.000Z | # Copyright (c) 2018 StackHPC
#
# 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, ... | 35.588235 | 69 | 0.758678 |
3fb54f8cb2380905cb852c4aaacbb70fa0de7c3d | 190 | py | Python | check.py | HALLOWe3n/Pyser | f2fdb7a6a302cce9c5ed86bf3592cfc61597d81c | [
"MIT"
] | null | null | null | check.py | HALLOWe3n/Pyser | f2fdb7a6a302cce9c5ed86bf3592cfc61597d81c | [
"MIT"
] | null | null | null | check.py | HALLOWe3n/Pyser | f2fdb7a6a302cce9c5ed86bf3592cfc61597d81c | [
"MIT"
] | null | null | null | from parser.lexer import lex
from parser.parser import parse
def from_string(string):
tokens = lex(string)
return parse(tokens)
string = '[{"some": "Body"}]'
from_string(string)
| 15.833333 | 31 | 0.705263 |
ba19a61616fd428e3ab01adae1450d3eff2bd598 | 11,275 | py | Python | tests/test_text.py | antomuli/rich | 5097f44092a4ba4ef7741755b3752d2aebe772a0 | [
"MIT"
] | 1 | 2020-07-05T08:55:19.000Z | 2020-07-05T08:55:19.000Z | tests/test_text.py | antomuli/rich | 5097f44092a4ba4ef7741755b3752d2aebe772a0 | [
"MIT"
] | null | null | null | tests/test_text.py | antomuli/rich | 5097f44092a4ba4ef7741755b3752d2aebe772a0 | [
"MIT"
] | null | null | null | from io import StringIO
import pytest
from rich.console import Console
from rich.text import Span, Text
from rich.measure import Measurement
def test_span():
span = Span(1, 10, "foo")
repr(span)
assert bool(span)
assert not Span(10, 10, "foo")
def test_span_split():
assert Span(5, 10, "foo").sp... | 25.167411 | 149 | 0.570732 |
58db023943bee235a0218a4c179857435394d9cc | 1,240 | py | Python | photos/views.py | elkwal/Gallery-App | d932f15d09f9e8f079ea286149aa30a1bd65aef0 | [
"Unlicense"
] | null | null | null | photos/views.py | elkwal/Gallery-App | d932f15d09f9e8f079ea286149aa30a1bd65aef0 | [
"Unlicense"
] | null | null | null | photos/views.py | elkwal/Gallery-App | d932f15d09f9e8f079ea286149aa30a1bd65aef0 | [
"Unlicense"
] | null | null | null | from django.shortcuts import render,redirect
from .models import Image,Category,Location
from django.http import Http404
# Create your views here.
def index(request):
images = Image.objects.all()
locations = Location.objects.all()
return render(request,'index.html',{'images':images,'locations':locations})
... | 40 | 111 | 0.707258 |
4b04aa75a6e416682fa230d6fbc7338809c74336 | 1,308 | py | Python | example/issues/182_multiple_locations/app.py | rroden12/dynaconf | 9495fdd2145dfc93a9af700c104f7841e52221b2 | [
"MIT"
] | 2,293 | 2015-08-14T22:39:31.000Z | 2022-03-31T12:44:49.000Z | example/issues/182_multiple_locations/app.py | rroden12/dynaconf | 9495fdd2145dfc93a9af700c104f7841e52221b2 | [
"MIT"
] | 676 | 2015-08-20T19:29:56.000Z | 2022-03-31T13:45:51.000Z | example/issues/182_multiple_locations/app.py | rroden12/dynaconf | 9495fdd2145dfc93a9af700c104f7841e52221b2 | [
"MIT"
] | 255 | 2015-12-02T21:16:33.000Z | 2022-03-20T22:03:46.000Z | import os
from dynaconf import settings
# This is the main settings file
os.environ["SETTINGS_FILE_FOR_DYNACONF"] = "default.toml"
# To make dynaconf read more file we need to include it
print("using config 1")
os.environ["INCLUDES_FOR_DYNACONF"] = "./cfg/settings.toml"
print("development")
settings.setenv("develo... | 25.153846 | 74 | 0.765291 |
195aacb13bc2e18f6fe0ef3d9ae4b6213368f3f0 | 517 | py | Python | code/timeout_subprocess.py | UCLA-StarAI/LearnSDD | 3cc33b90468c0c8d074db87b094383619e64a5ce | [
"Apache-2.0"
] | 1 | 2016-11-05T23:44:28.000Z | 2016-11-05T23:44:28.000Z | code/timeout_subprocess.py | UCLA-StarAI/LearnSDD | 3cc33b90468c0c8d074db87b094383619e64a5ce | [
"Apache-2.0"
] | null | null | null | code/timeout_subprocess.py | UCLA-StarAI/LearnSDD | 3cc33b90468c0c8d074db87b094383619e64a5ce | [
"Apache-2.0"
] | null | null | null | import subprocess as sub
import threading, time
def run_with_timeout(func, args=(), timeout_duration=1, default="timeout"):
import signal
class TimeoutError(Exception):
pass
def handler(signum, frame):
raise TimeoutError()
# set the timeout handler
signal.signal(signal.SIGALRM, h... | 21.541667 | 75 | 0.659574 |
6367e573cdea4bc3138d2a109275803eace3e4ce | 136 | py | Python | sdk/ingestion/test/__init__.py | microsoft/bing-commerce-sdk-for-python | cf555ea0bb14792708617d2435dd5aab1c4cbe90 | [
"MIT"
] | 1 | 2020-05-04T09:58:07.000Z | 2020-05-04T09:58:07.000Z | sdk/ingestion/test/__init__.py | microsoft/bing-commerce-sdk-for-python | cf555ea0bb14792708617d2435dd5aab1c4cbe90 | [
"MIT"
] | 2 | 2020-04-21T02:32:32.000Z | 2020-04-21T19:37:54.000Z | sdk/ingestion/test/__init__.py | microsoft/bing-commerce-sdk-for-python | cf555ea0bb14792708617d2435dd5aab1c4cbe90 | [
"MIT"
] | 4 | 2020-07-31T10:39:22.000Z | 2021-11-10T08:14:07.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
__import__('pkg_resources').declare_namespace(__name__)
| 22.666667 | 56 | 0.764706 |
07dd19e55ed00208278f66929f02a434216e232f | 2,742 | py | Python | app/applicants/models.py | swelanauguste/refactored-sniffle | 1c0ea2f4d07a74d694ae3409b8b2ea3d57b9db4f | [
"MIT"
] | null | null | null | app/applicants/models.py | swelanauguste/refactored-sniffle | 1c0ea2f4d07a74d694ae3409b8b2ea3d57b9db4f | [
"MIT"
] | null | null | null | app/applicants/models.py | swelanauguste/refactored-sniffle | 1c0ea2f4d07a74d694ae3409b8b2ea3d57b9db4f | [
"MIT"
] | null | null | null | from django.db import models
from locations.models import District, Community, Quarter
from mixin.assets import TimeStampMixin
from django.urls import reverse
from postoffices.models import PostalAddress
class Nationality(TimeStampMixin):
name = models.CharField(max_length=100)
class Meta:
ordering =... | 32.642857 | 92 | 0.721007 |
e9ec9facb0d3a40008436c8f0de8c906bbeef0b3 | 2,142 | py | Python | setup.py | she11c0de/cubes | 26f27175aa17b08c158057c0a9989f6c94f0f459 | [
"MIT"
] | null | null | null | setup.py | she11c0de/cubes | 26f27175aa17b08c158057c0a9989f6c94f0f459 | [
"MIT"
] | null | null | null | setup.py | she11c0de/cubes | 26f27175aa17b08c158057c0a9989f6c94f0f459 | [
"MIT"
] | null | null | null | import sys
from setuptools import setup, find_packages
requirements = ["pytz", "python-dateutil", "jsonschema"]
extras = {
'sql': 'sqlalchemy>= 0.9.0',
'slicer': 'werkzeug',
'html': 'jinja',
'mongo': 'pymongo',
'all': ['cubes[%s]' % extra for extra in ['sql','slicer','html','mongo']],
'dev': ['... | 35.114754 | 239 | 0.631186 |
8f0fd9c2b8ee3ed2c9a7cc66b5e708f533202340 | 29,737 | py | Python | evoMPS/tdvp_sandwich.py | wfBranch/evoMPS | fabf2df75b0f3bfe6a8ed5e319771be65f075e75 | [
"BSD-3-Clause"
] | null | null | null | evoMPS/tdvp_sandwich.py | wfBranch/evoMPS | fabf2df75b0f3bfe6a8ed5e319771be65f075e75 | [
"BSD-3-Clause"
] | null | null | null | evoMPS/tdvp_sandwich.py | wfBranch/evoMPS | fabf2df75b0f3bfe6a8ed5e319771be65f075e75 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 13 17:29:27 2011
@author: Ashley Milsted
"""
import scipy as sp
import scipy.linalg as la
import matmul as mm
import tdvp_common as tm
from mps_sandwich import EvoMPS_MPS_Sandwich
import time
def go(sim, tau, steps, force_calc_lr=False, RK4=False,
autogrow=False,... | 36.044848 | 116 | 0.489088 |
1762baf22348f2a169fe0a4f0d5bbf7cb7a54cea | 1,455 | py | Python | com/LimePencil/Q2239/_.py | LimePencil/baekjoonProblems | 61eeeeb875585d165d9e39ecdb3d905b4ba6aa87 | [
"MIT"
] | 2 | 2021-07-17T13:05:42.000Z | 2021-09-12T09:14:24.000Z | com/LimePencil/Q2239/_.py | LimePencil/baekjoonProblems | 61eeeeb875585d165d9e39ecdb3d905b4ba6aa87 | [
"MIT"
] | null | null | null | com/LimePencil/Q2239/_.py | LimePencil/baekjoonProblems | 61eeeeb875585d165d9e39ecdb3d905b4ba6aa87 | [
"MIT"
] | null | null | null | import sys
import copy
sys.setrecursionlimit(10**4)
def find_possible(pos):
possibility = []
for i in range(1,10):
possible = True
if i in ls[pos[0]]:
possible = False
continue
if i in [row[pos[1]] for row in ls]:
possible = False
continu... | 23.095238 | 55 | 0.468729 |
1b382fe4ecaf91e479bf08c18203844b27fe0ba2 | 641 | py | Python | library/test/test_compiler/sbs_code_tests/3.7/58_async_for.py | creativemindplus/skybison | d1740e08d8de85a0a56b650675717da67de171a0 | [
"CNRI-Python-GPL-Compatible"
] | 278 | 2021-08-31T00:46:51.000Z | 2022-02-13T19:43:28.000Z | library/test/test_compiler/sbs_code_tests/3.7/58_async_for.py | creativemindplus/skybison | d1740e08d8de85a0a56b650675717da67de171a0 | [
"CNRI-Python-GPL-Compatible"
] | 9 | 2021-11-05T22:28:43.000Z | 2021-11-23T08:39:04.000Z | library/test/test_compiler/sbs_code_tests/3.7/58_async_for.py | tekknolagi/skybison | bea8fc2af0a70e7203b4c19f36c14a745512a335 | [
"CNRI-Python-GPL-Compatible"
] | 12 | 2021-08-31T07:49:54.000Z | 2021-10-08T01:09:01.000Z | # Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
async def foo():
async for a in b:
c
# EXPECTED:
[
...,
CODE_START('foo'),
SETUP_LOOP(Block(6)),
...,
GET_AITER(0),
SETUP_EXCEPT(Block(2)),
GET_ANEXT(0),
LOAD_CONST(None),
YIELD_FROM(0),
...,... | 19.424242 | 76 | 0.567863 |
c486429c9f1a1a6900b25844fa3a8e38ab656d8f | 11,783 | py | Python | pyRTOS/dht_oled/lib/adafruit_dht.py | sourceperl/circuitpython.cookbook | bab1fb726309dbdd39a78d124e9f428698673d4a | [
"MIT"
] | null | null | null | pyRTOS/dht_oled/lib/adafruit_dht.py | sourceperl/circuitpython.cookbook | bab1fb726309dbdd39a78d124e9f428698673d4a | [
"MIT"
] | null | null | null | pyRTOS/dht_oled/lib/adafruit_dht.py | sourceperl/circuitpython.cookbook | bab1fb726309dbdd39a78d124e9f428698673d4a | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2017 Mike McWethy for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
:mod:`adafruit_dhtlib`
======================
CircuitPython support for the DHT11 and DHT22 temperature and humidity devices.
* Author(s): Mike McWethy
**Hardware:**
* Adafruit `DHT22 temperature-humidity senso... | 36.821875 | 100 | 0.618858 |
fa7c985b0356106ef8610fc248cc3b310f6d6471 | 163 | py | Python | generatedateimage/app.py | maheshbansod/generatedateimage | 1e3c6b42d5b43f8033405094fcc074cf861a96da | [
"MIT"
] | null | null | null | generatedateimage/app.py | maheshbansod/generatedateimage | 1e3c6b42d5b43f8033405094fcc074cf861a96da | [
"MIT"
] | null | null | null | generatedateimage/app.py | maheshbansod/generatedateimage | 1e3c6b42d5b43f8033405094fcc074cf861a96da | [
"MIT"
] | null | null | null | from generatedateimage.generatedateimage import generateDateImage
def run():
print("Running code..")
generateDateImage()
print("Done. See image.png")
| 23.285714 | 65 | 0.736196 |
4406da87566471e3381719b7fd5e7ed741a269c6 | 1,166 | py | Python | Software/Python/grove_barometer_sensors/barometric_sensor_bmp280/example.py | drbrain/GrovePi | eef5fbb7961b21dfa579607c866e364a81390324 | [
"MIT"
] | null | null | null | Software/Python/grove_barometer_sensors/barometric_sensor_bmp280/example.py | drbrain/GrovePi | eef5fbb7961b21dfa579607c866e364a81390324 | [
"MIT"
] | null | null | null | Software/Python/grove_barometer_sensors/barometric_sensor_bmp280/example.py | drbrain/GrovePi | eef5fbb7961b21dfa579607c866e364a81390324 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import smbus
import RPi.GPIO as GPIO
#import grovepi
from grove_i2c_barometic_sensor_BME280 import BME280
# ===========================================================================
# Example Code
# ===========================================================================
# Initialize the senso... | 27.761905 | 77 | 0.638079 |
404fce5ba3d994180b73f0899f22f538fe3f07cf | 350 | py | Python | main_gan.py | demelin/IDGAN | 8d4d362e4a2fafc9cf13031bb8180f36e8417c25 | [
"MIT"
] | null | null | null | main_gan.py | demelin/IDGAN | 8d4d362e4a2fafc9cf13031bb8180f36e8417c25 | [
"MIT"
] | null | null | null | main_gan.py | demelin/IDGAN | 8d4d362e4a2fafc9cf13031bb8180f36e8417c25 | [
"MIT"
] | null | null | null | """ Used to call the training / inference session functions defined for the IDGAN.
The uncommented line denotes the session functionality executed upon call. """
from IDGAN.src.codebase import session
if __name__ == '__main__':
# session.train_session()
# session_ssc.train_session()
# session.test_session... | 31.818182 | 82 | 0.745714 |
bef0086095858d2da11a01d5c5cd0d05fb053ddb | 9,165 | py | Python | PathPlanning/RRTStar/rrt_star.py | duken72/PythonRobotics | 177f04618c4bbba40bea38cd57d642f7ab9e3725 | [
"MIT"
] | 15,431 | 2016-10-07T08:25:10.000Z | 2022-03-31T22:06:02.000Z | PathPlanning/RRTStar/rrt_star.py | duken72/PythonRobotics | 177f04618c4bbba40bea38cd57d642f7ab9e3725 | [
"MIT"
] | 486 | 2017-05-01T00:40:00.000Z | 2022-03-23T06:57:42.000Z | PathPlanning/RRTStar/rrt_star.py | duken72/PythonRobotics | 177f04618c4bbba40bea38cd57d642f7ab9e3725 | [
"MIT"
] | 4,978 | 2017-03-05T22:23:36.000Z | 2022-03-31T12:42:17.000Z | """
Path planning Sample Code with RRT*
author: Atsushi Sakai(@Atsushi_twi)
"""
import math
import os
import sys
import matplotlib.pyplot as plt
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../RRT/")
try:
from rrt import RRT
except ImportError:
raise
show_animation = True
class RRTSt... | 32.157895 | 78 | 0.55581 |
249304bb4455934f8278373383c7c1a982313746 | 7,869 | py | Python | pddlstream/ss/algorithms/plan_focused.py | zerongxi/Kitchen2D | 2cbaa6c8ea8fbf5f5c3a5de34cb11efde4121793 | [
"MIT"
] | 35 | 2018-03-15T14:26:33.000Z | 2022-02-09T15:37:59.000Z | pddlstream/ss/algorithms/plan_focused.py | zerongxi/Kitchen2D | 2cbaa6c8ea8fbf5f5c3a5de34cb11efde4121793 | [
"MIT"
] | 1 | 2020-11-03T04:49:43.000Z | 2020-11-17T16:42:48.000Z | pddlstream/ss/algorithms/plan_focused.py | zerongxi/Kitchen2D | 2cbaa6c8ea8fbf5f5c3a5de34cb11efde4121793 | [
"MIT"
] | 12 | 2018-04-28T20:11:21.000Z | 2021-09-18T22:24:46.000Z | import time
from collections import deque
from itertools import product
from ss.algorithms.focused_utils import evaluate_eager, revisit_reset_fn, partial_ordered, instantiate_plan, BoundStream
from ss.algorithms.incremental import solve_universe
from ss.algorithms.universe import Universe
from ss.model.functions impor... | 40.561856 | 187 | 0.637311 |
f9c4f0d383d2713b04d1165eb564b97b78920b52 | 697 | py | Python | test/unit_tests/test_t4mon.py | fernandezcuesta/pySMSCMon | 625bbd967625992386befeb274a9506b0fe5bea1 | [
"MIT"
] | 3 | 2016-02-04T06:34:14.000Z | 2019-07-08T08:02:45.000Z | test/unit_tests/test_t4mon.py | fernandezcuesta/t4Monitor | 625bbd967625992386befeb274a9506b0fe5bea1 | [
"MIT"
] | null | null | null | test/unit_tests/test_t4mon.py | fernandezcuesta/t4Monitor | 625bbd967625992386befeb274a9506b0fe5bea1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
*t4mon* - T4 monitoring **test functions** for __init__.py methods
"""
from __future__ import absolute_import
import tempfile
import unittest
import t4mon as init_func
class TestInit(unittest.TestCase):
""" Set of unit tests for __init__.py """
def test_d... | 25.814815 | 73 | 0.671449 |
dd08d3a07b3d91c2b514f6210ced51ce9d151cbe | 676 | py | Python | polls/models.py | clovisolivier/django | 99cc6f53c1edde1f713fd5a5406cac877ae709d4 | [
"MIT"
] | null | null | null | polls/models.py | clovisolivier/django | 99cc6f53c1edde1f713fd5a5406cac877ae709d4 | [
"MIT"
] | null | null | null | polls/models.py | clovisolivier/django | 99cc6f53c1edde1f713fd5a5406cac877ae709d4 | [
"MIT"
] | null | null | null | import datetime
from django.db import models
from django.utils import timezone
# Create your models here.
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def was_published_recently(self):
return self.pub_date >= t... | 30.727273 | 75 | 0.724852 |
d7cb472be51d48287da765ace0ee7ae89159a5bd | 73 | py | Python | 2.py | zhangze336/demozhangze | f767756f0adadd239aa1e7908f21a489887979e7 | [
"Apache-2.0"
] | null | null | null | 2.py | zhangze336/demozhangze | f767756f0adadd239aa1e7908f21a489887979e7 | [
"Apache-2.0"
] | null | null | null | 2.py | zhangze336/demozhangze | f767756f0adadd239aa1e7908f21a489887979e7 | [
"Apache-2.0"
] | null | null | null | #来来来嗨起来
c=12
# ccccc
# cccccc
# 第二次
# 第三次
# 第一个分之
c+=1
print('dog shit ') | 8.111111 | 18 | 0.616438 |
20b3a9126904539e4b1d13dbfcb76322036c861f | 299 | py | Python | app/uploader/exceptions.py | Wordseer/wordseer | a45102c1848c93360d3815187783756dc5e16156 | [
"Unlicense"
] | 38 | 2015-02-26T02:21:04.000Z | 2022-02-03T16:29:00.000Z | app/uploader/exceptions.py | Wordseer/wordseer | a45102c1848c93360d3815187783756dc5e16156 | [
"Unlicense"
] | 106 | 2015-03-06T20:23:32.000Z | 2016-10-04T21:46:51.000Z | app/uploader/exceptions.py | Wordseer/wordseer | a45102c1848c93360d3815187783756dc5e16156 | [
"Unlicense"
] | 18 | 2015-08-17T02:29:57.000Z | 2022-02-03T16:29:30.000Z | """
Exceptions raised by the wordseer flask app.
"""
class ProjectNotFoundException(Exception):
"""Called when the requested project could not be found.
"""
pass
class DocumentNotFoundException(Exception):
"""Called when the requested document could not be found.
"""
pass
| 21.357143 | 61 | 0.705686 |
71fab895aa5355fcffdb8470d7f1ce899c78275a | 12,728 | py | Python | Code/Components/Analysis/evaluation/current/scripts/imageEval.py | rtobar/askapsoft | 6bae06071d7d24f41abe3f2b7f9ee06cb0a9445e | [
"BSL-1.0",
"Apache-2.0",
"OpenSSL"
] | 1 | 2020-06-18T08:37:43.000Z | 2020-06-18T08:37:43.000Z | Code/Components/Analysis/evaluation/current/scripts/imageEval.py | ATNF/askapsoft | d839c052d5c62ad8a511e58cd4b6548491a6006f | [
"BSL-1.0",
"Apache-2.0",
"OpenSSL"
] | null | null | null | Code/Components/Analysis/evaluation/current/scripts/imageEval.py | ATNF/askapsoft | d839c052d5c62ad8a511e58cd4b6548491a6006f | [
"BSL-1.0",
"Apache-2.0",
"OpenSSL"
] | null | null | null | #!/usr/bin/env python
import askap.analysis.evaluation
import numpy as np
import matplotlib
matplotlib.use('Agg')
import pylab as plt
import math
import scipy.special
from askap.analysis.evaluation.readData import *
import askap.analysis.evaluation.modelcomponents as models
from askap.analysis.evaluation.sourceSelect... | 39.283951 | 147 | 0.659177 |
f626e98000a72e12156dedefe5c44f2a0fc88c75 | 87,134 | py | Python | io_scene_halo/file_jms/export_jms.py | num0005/Halo-Asset-Blender-Development-Toolset | 95782ee3eb9bf06e3c1096d0da8751c10a94f0fe | [
"MIT"
] | null | null | null | io_scene_halo/file_jms/export_jms.py | num0005/Halo-Asset-Blender-Development-Toolset | 95782ee3eb9bf06e3c1096d0da8751c10a94f0fe | [
"MIT"
] | null | null | null | io_scene_halo/file_jms/export_jms.py | num0005/Halo-Asset-Blender-Development-Toolset | 95782ee3eb9bf06e3c1096d0da8751c10a94f0fe | [
"MIT"
] | null | null | null | # ##### BEGIN MIT LICENSE BLOCK #####
#
# MIT License
#
# Copyright (c) 2020 Steven Garcia
#
# 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 ... | 45.453312 | 381 | 0.575103 |
30d06e181f2b636cd8e794271afc6a03243112c6 | 8,963 | py | Python | contentcuration/contentcuration/viewsets/sync/endpoint.py | pcenov/studio | 1751f45de5ac3c085718fb7cf75da931e811eb12 | [
"MIT"
] | 1 | 2019-03-30T18:14:25.000Z | 2019-03-30T18:14:25.000Z | contentcuration/contentcuration/viewsets/sync/endpoint.py | pcenov/studio | 1751f45de5ac3c085718fb7cf75da931e811eb12 | [
"MIT"
] | 2 | 2019-04-06T07:06:08.000Z | 2019-04-08T23:33:53.000Z | contentcuration/contentcuration/viewsets/sync/endpoint.py | MisRob/studio | 92a5c780c8952f7d37db38952483ab7a28d3cb9d | [
"MIT"
] | null | null | null | """
A view that handles synchronization of changes from the frontend
and deals with processing all the changes to make appropriate
bulk creates, updates, and deletes.
"""
import time
from collections import OrderedDict
from itertools import groupby
from rest_framework.authentication import SessionAuthentication
from r... | 37.818565 | 103 | 0.722414 |
3adec9dd0d3036cfd5c7a97e3b428f1d92e71f5e | 19,971 | py | Python | experiment_code/EXP.py | hoenir/DistributionLearningVisualSearch | e5351700c64503fb3f3f18d22446f57aee161cbd | [
"MIT"
] | null | null | null | experiment_code/EXP.py | hoenir/DistributionLearningVisualSearch | e5351700c64503fb3f3f18d22446f57aee161cbd | [
"MIT"
] | null | null | null | experiment_code/EXP.py | hoenir/DistributionLearningVisualSearch | e5351700c64503fb3f3f18d22446f57aee161cbd | [
"MIT"
] | null | null | null |
#!/usr/bin/env python2
from __future__ import division
import sys
from psychopy import visual, core, event, data, gui,logging,monitors
import numpy as np #for maths on arrays
from numpy import random #we only need these two commands from this lib
from itertools import product
from numpy import linspace
import math,... | 38.929825 | 265 | 0.584397 |
815b18c8954ad8dd160caecb8acc3b0f6091a92b | 5,255 | py | Python | studies/SSRC2022/comparison_to_Silver_2010.py | denavit/PyPonding | f3e354cf6225abfb1aa2182d716be618eadf7010 | [
"MIT"
] | null | null | null | studies/SSRC2022/comparison_to_Silver_2010.py | denavit/PyPonding | f3e354cf6225abfb1aa2182d716be618eadf7010 | [
"MIT"
] | null | null | null | studies/SSRC2022/comparison_to_Silver_2010.py | denavit/PyPonding | f3e354cf6225abfb1aa2182d716be618eadf7010 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from math import pi
from numpy import cos,cosh
from PyPonding.structures import ElasticBeam2d
from libdenavit.section.database import wide_flange_database
# Plot settings
plt.rc('text',usetex=True)
plt.rc('font',family='serif')
plt.rc('axes',labelsize=8)
plt.rc('axes... | 34.572368 | 129 | 0.66451 |
300350529ae2c2bb35cc6a3128997ad86da21da2 | 3,456 | py | Python | slimtik_functions/slimtik_solve.py | elizabethnewman/slimTrain | 900ad228476d015fc5eed541e460b253dc9b69a6 | [
"MIT"
] | 1 | 2021-10-03T09:06:48.000Z | 2021-10-03T09:06:48.000Z | slimtik_functions/slimtik_solve.py | elizabethnewman/slimTrain | 900ad228476d015fc5eed541e460b253dc9b69a6 | [
"MIT"
] | null | null | null | slimtik_functions/slimtik_solve.py | elizabethnewman/slimTrain | 900ad228476d015fc5eed541e460b253dc9b69a6 | [
"MIT"
] | null | null | null | import torch
import math
def solve(A, c, MtM, w, sumLambda, n_calTk, n_target,
dtype=torch.float64, device='cpu', opt_method=None,
lower_bound=1e-7, upper_bound=1e3, Lambda=1.0):
"""
Solve ||S[M, Z,
Note that M should contain Z as well
"""
# original datatype and device
or... | 33.882353 | 118 | 0.622685 |
76f68aee438cf21e61c0de6d4e703cd5115669ec | 4,125 | py | Python | openpeerpower/components/monoprice/config_flow.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | openpeerpower/components/monoprice/config_flow.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | openpeerpower/components/monoprice/config_flow.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """Config flow for Monoprice 6-Zone Amplifier integration."""
import logging
from pymonoprice import get_async_monoprice
from serial import SerialException
import voluptuous as vol
from openpeerpower import config_entries, core, exceptions
from openpeerpower.const import CONF_PORT
from .const import (
CONF_SOURC... | 27.871622 | 86 | 0.662788 |
778528c6fc125f87c061dd2cb9e34686fa6872e3 | 4,052 | py | Python | bw2data/ia_data_store.py | dgdekoning/brightway2-data | e7354ae86a778a98267d9bb1cdee60061aa164ab | [
"BSD-3-Clause"
] | null | null | null | bw2data/ia_data_store.py | dgdekoning/brightway2-data | e7354ae86a778a98267d9bb1cdee60061aa164ab | [
"BSD-3-Clause"
] | null | null | null | bw2data/ia_data_store.py | dgdekoning/brightway2-data | e7354ae86a778a98267d9bb1cdee60061aa164ab | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
from eight import *
from .data_store import ProcessedDataStore
from .utils import safe_filename, python_2_unicode_compatible
import hashlib
import string
def abbreviate(names, length=8):
"""Take a tuple or list, and construct a strin... | 41.773196 | 314 | 0.661155 |
b59de46cc01dba196aa1ee429f3ba4823d796956 | 6,606 | py | Python | glazier/lib/splice_test.py | mihailim/glazier | fdacc9e7670310d72cfb098fd4e92c2de9e35fec | [
"Apache-2.0"
] | 1,233 | 2017-01-23T17:40:39.000Z | 2022-03-30T17:11:04.000Z | glazier/lib/splice_test.py | lippertmarkus/glazier | 329eab8c800a984f3d05136eba0708e618904f0c | [
"Apache-2.0"
] | 16 | 2018-06-19T04:11:31.000Z | 2022-01-10T21:28:29.000Z | glazier/lib/splice_test.py | lippertmarkus/glazier | 329eab8c800a984f3d05136eba0708e618904f0c | [
"Apache-2.0"
] | 108 | 2017-01-23T18:12:24.000Z | 2022-03-13T22:18:21.000Z | # Lint as: python3
# Copyright 2020 Google 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 obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 42.896104 | 80 | 0.724039 |
6c5710417520c591d864e0262564ef762ae58516 | 7,625 | py | Python | lib/model/rpn/generate_anchors.py | E-Dreamer-LQ/Astronomical_Target_Detection | 0c2d6c2e516ff1efa28d44582442123c3a03f079 | [
"MIT"
] | 6 | 2020-03-06T10:00:27.000Z | 2021-09-01T17:05:18.000Z | lib/model/rpn/generate_anchors.py | mocas-usr/Astronomical_Target_Detection | 0c2d6c2e516ff1efa28d44582442123c3a03f079 | [
"MIT"
] | null | null | null | lib/model/rpn/generate_anchors.py | mocas-usr/Astronomical_Target_Detection | 0c2d6c2e516ff1efa28d44582442123c3a03f079 | [
"MIT"
] | 4 | 2020-03-06T10:00:31.000Z | 2020-12-03T03:05:05.000Z | # --------------------------------------------------------
# Faster R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick and Sean Bell
# --------------------------------------------------------
import numpy as np
import pdb
# Verify that we compute... | 36.137441 | 92 | 0.586098 |
bfc7ce003bfa6f9292d56db95a8c8b03c43ed83c | 1,711 | py | Python | Python/parser.py | AvAudioPlayer/VtopBetaCaptchaParser | 83b2bba8b70aaef06d841e79c123064abb113dd4 | [
"MIT"
] | 1 | 2020-01-08T15:01:03.000Z | 2020-01-08T15:01:03.000Z | Python/parser.py | AvAudioPlayer/VtopBetaCaptchaParser | 83b2bba8b70aaef06d841e79c123064abb113dd4 | [
"MIT"
] | null | null | null | Python/parser.py | AvAudioPlayer/VtopBetaCaptchaParser | 83b2bba8b70aaef06d841e79c123064abb113dd4 | [
"MIT"
] | null | null | null | from PIL import Image
import os
def CaptchaParse(img):
captcha=""
dirs=os.listdir("Chars")
img=img.convert('L')
pix=img.load()
for y in range(1,44):
for x in range(1,179):
if pix[x,y-1]==255 and pix[x,y]==0 and pix[x,y+1]==255:
pix[x,y]=255
if pix[x-1,... | 32.903846 | 69 | 0.413793 |
e4537f0e6cdd26dda8fdce89256ff75c6ddd81d1 | 253 | py | Python | src/django_perf_rec/__init__.py | aaron7/django-perf-rec | 011878311a9fbebe60140815c654eb7d61fafb76 | [
"MIT"
] | null | null | null | src/django_perf_rec/__init__.py | aaron7/django-perf-rec | 011878311a9fbebe60140815c654eb7d61fafb76 | [
"MIT"
] | null | null | null | src/django_perf_rec/__init__.py | aaron7/django-perf-rec | 011878311a9fbebe60140815c654eb7d61fafb76 | [
"MIT"
] | null | null | null | """
isort:skip_file
"""
try:
import pytest
except ImportError:
pytest = None
if pytest is not None:
pytest.register_assert_rewrite("django_perf_rec.api")
from .api import TestCaseMixin, get_record_name, get_perf_path, record # noqa: F401
| 19.461538 | 84 | 0.743083 |
e4fdc39ec84731f033f56f0f991c3d9dd9ff5abd | 11,053 | py | Python | AER_experimentalist/experiment_environment/experiment_server.py | musslick/DARTS-Cognitive-Modeling | f38e7e34f6f20c1626458de62503e8670e06be7c | [
"MIT"
] | null | null | null | AER_experimentalist/experiment_environment/experiment_server.py | musslick/DARTS-Cognitive-Modeling | f38e7e34f6f20c1626458de62503e8670e06be7c | [
"MIT"
] | null | null | null | AER_experimentalist/experiment_environment/experiment_server.py | musslick/DARTS-Cognitive-Modeling | f38e7e34f6f20c1626458de62503e8670e06be7c | [
"MIT"
] | null | null | null |
import socket
import os.path
import AER_experimentalist.experiment_environment.experiment_config as config
import AER_experimentalist.experiment_environment.client_server_protocol as protocol
from AER_experimentalist.experiment_environment.client_server_interface import Client_Server_Interface
# from experiment_server... | 41.397004 | 115 | 0.589614 |
254028f611bfcf4a57f40cafa058df03b91f4a39 | 1,427 | py | Python | boadata/trees/sql.py | janpipek/boadata | 3da00de9e014b764d40040c0db89aaaebc87fa18 | [
"MIT"
] | 2 | 2016-04-22T06:27:04.000Z | 2017-12-04T18:50:28.000Z | boadata/trees/sql.py | janpipek/boadata | 3da00de9e014b764d40040c0db89aaaebc87fa18 | [
"MIT"
] | 18 | 2015-03-19T10:24:04.000Z | 2017-02-22T17:12:21.000Z | boadata/trees/sql.py | janpipek/boadata | 3da00de9e014b764d40040c0db89aaaebc87fa18 | [
"MIT"
] | null | null | null | from ..core import DataNode, DataObject, DataProperties, DataTree
import os
class TableNode(DataNode):
def __init__(self, table_name, parent=None):
super(TableNode, self).__init__(parent)
self.table_name = table_name
@property
def title(self):
return self.table_name
def has_s... | 24.603448 | 65 | 0.591451 |
924be009787d89964599da767372a277b6076f1c | 1,043 | py | Python | app/core/migrations/0004_recipe.py | telemachosc/recipe-app-api | 1c8dfa510fd6e54e3815e1fd33bc0561bc2fff4f | [
"MIT"
] | null | null | null | app/core/migrations/0004_recipe.py | telemachosc/recipe-app-api | 1c8dfa510fd6e54e3815e1fd33bc0561bc2fff4f | [
"MIT"
] | 2 | 2020-04-02T10:32:46.000Z | 2020-04-02T10:32:47.000Z | app/core/migrations/0004_recipe.py | telemachosc/recipe-app-api | 1c8dfa510fd6e54e3815e1fd33bc0561bc2fff4f | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-04-06 07:35
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0003_ingredient'),
]
operations = [
migrations.CreateModel(
... | 35.965517 | 118 | 0.604027 |
95cafc11a3ce057f9fa254db26bf9e5b401891b4 | 9,743 | py | Python | dnslib/digparser.py | mgorny/dnslib | 52131401efbe8ae9e12f6816b829b77c2b89882c | [
"BSD-2-Clause"
] | null | null | null | dnslib/digparser.py | mgorny/dnslib | 52131401efbe8ae9e12f6816b829b77c2b89882c | [
"BSD-2-Clause"
] | null | null | null | dnslib/digparser.py | mgorny/dnslib | 52131401efbe8ae9e12f6816b829b77c2b89882c | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
digparser
---------
Encode/decode DNS packets from DiG textual representation. Parses
question (if present: +qr flag) & answer sections and returns list
of DNSRecord objects.
Unsupported RR types are skipped (this is different from the packet
parser which will ... | 41.636752 | 126 | 0.518218 |
a015b2e13087455828c49b12cc30bc7f37dbd79e | 3,487 | py | Python | backend/todo_api/settings.py | snowan/DRF-React-Todo | 9d18064c53db682972091b73db378e1b48333afe | [
"MIT"
] | null | null | null | backend/todo_api/settings.py | snowan/DRF-React-Todo | 9d18064c53db682972091b73db378e1b48333afe | [
"MIT"
] | null | null | null | backend/todo_api/settings.py | snowan/DRF-React-Todo | 9d18064c53db682972091b73db378e1b48333afe | [
"MIT"
] | null | null | null | """
Django settings for todo_api project.
Generated by 'django-admin startproject' using Django 2.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
... | 24.907143 | 91 | 0.688557 |
1d384043f2ae9c72d6fbde055d1f623c3f8c87f1 | 2,571 | py | Python | lib/python3.8/site-packages/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acl_interfaces/acl_interfaces.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acl_interfaces/acl_interfaces.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acl_interfaces/acl_interfaces.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)
#############################################
# WARNING #
#############################################
#
# This file is auto generated by ... | 29.895349 | 74 | 0.36445 |
1b871aa233038707789a0560ed397c8287b92142 | 138 | py | Python | src/dataviz_panel/holoviews/__init__.py | lbignone/dataviz-panel | b41176401b2ccf483617b836e2d9e5d3472a43b8 | [
"MIT"
] | null | null | null | src/dataviz_panel/holoviews/__init__.py | lbignone/dataviz-panel | b41176401b2ccf483617b836e2d9e5d3472a43b8 | [
"MIT"
] | 96 | 2021-02-26T17:26:51.000Z | 2022-03-30T15:07:42.000Z | src/dataviz_panel/holoviews/__init__.py | lbignone/dataviz-panel | b41176401b2ccf483617b836e2d9e5d3472a43b8 | [
"MIT"
] | null | null | null | """Extension to holoviews API."""
from .element import * # noqa (API import)
from .plotting.bokeh import * # noqa (models registration)
| 34.5 | 59 | 0.710145 |
1b56d00065b287d70a5efc4aef495c74f5e17bf3 | 34 | py | Python | utest/resources/variables_file.py | phil-davis/robotframework | 4d4ce686cbe01e293bb86ea6ff34330e8c45fc43 | [
"ECL-2.0",
"Apache-2.0"
] | 7,073 | 2015-01-01T17:19:16.000Z | 2022-03-31T22:01:29.000Z | utest/resources/variables_file.py | phil-davis/robotframework | 4d4ce686cbe01e293bb86ea6ff34330e8c45fc43 | [
"ECL-2.0",
"Apache-2.0"
] | 2,412 | 2015-01-02T09:29:05.000Z | 2022-03-31T13:10:46.000Z | utest/resources/variables_file.py | phil-davis/robotframework | 4d4ce686cbe01e293bb86ea6ff34330e8c45fc43 | [
"ECL-2.0",
"Apache-2.0"
] | 2,298 | 2015-01-03T02:47:15.000Z | 2022-03-31T02:00:16.000Z | MY_VARIABLE = "An example string"
| 17 | 33 | 0.764706 |
fa50cab5779dbcd45f353826070b7607d2401ce8 | 3,192 | py | Python | events/kuplii2018/forms.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 13 | 2015-11-29T12:19:12.000Z | 2021-02-21T15:42:11.000Z | events/kuplii2018/forms.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 23 | 2015-04-29T19:43:34.000Z | 2021-02-10T05:50:17.000Z | events/kuplii2018/forms.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 11 | 2015-09-20T18:59:00.000Z | 2020-02-07T08:47:34.000Z | from django import forms
from crispy_forms.layout import Layout, Fieldset
from core.utils import horizontal_form_helper, indented_without_label
from labour.forms import AlternativeFormMixin
from labour.models import Signup, JobCategory, WorkPeriod
from .models import SignupExtra
class SignupExtraForm(forms.ModelFo... | 27.282051 | 97 | 0.592105 |
f892988a78ba74f45e37247e2bf2a18fa9c6496d | 2,901 | py | Python | python/moneysocket/core/message/crypt.py | jarret/prototype | 74124b8ea74061a97f092c3f973907b42b2de8e8 | [
"MIT"
] | null | null | null | python/moneysocket/core/message/crypt.py | jarret/prototype | 74124b8ea74061a97f092c3f973907b42b2de8e8 | [
"MIT"
] | null | null | null | python/moneysocket/core/message/crypt.py | jarret/prototype | 74124b8ea74061a97f092c3f973907b42b2de8e8 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Jarret Dyrbye
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php
import json
import re
from Crypto.Cipher import AES
from Crypto import Random
from moneysocket.core.message.message import MoneysocketMessage
c... | 31.879121 | 77 | 0.633919 |
2ba50a078c9033459c79c8db0f8d9c4f74b90170 | 334 | py | Python | python/test/__init__.py | mohawkjohn/cannonball | 886c159cd7860f896ed4ae6f23aa2a1a82c8d585 | [
"BSD-3-Clause"
] | null | null | null | python/test/__init__.py | mohawkjohn/cannonball | 886c159cd7860f896ed4ae6f23aa2a1a82c8d585 | [
"BSD-3-Clause"
] | null | null | null | python/test/__init__.py | mohawkjohn/cannonball | 886c159cd7860f896ed4ae6f23aa2a1a82c8d585 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from test import test_orbiter
def cannonball_test_suite():
"""
Load unit tests from each file for automatic running using
`python setup.py test`.
"""
loader = unittest.TestLoader()
suite = unittest.TestSuite()
suite.addTests(loader.loadTestsFromModule(test_orbiter))
r... | 20.875 | 63 | 0.709581 |
caeb234d2b7cedb73fa06d52646ed2954c9adcc5 | 495 | py | Python | bootcamp/articles/migrations/0004_alter_article_image.py | elbakouchi/bootcamp | 2c7a0cd2ddb7632acb3009f94d728792ddf9644f | [
"MIT"
] | null | null | null | bootcamp/articles/migrations/0004_alter_article_image.py | elbakouchi/bootcamp | 2c7a0cd2ddb7632acb3009f94d728792ddf9644f | [
"MIT"
] | null | null | null | bootcamp/articles/migrations/0004_alter_article_image.py | elbakouchi/bootcamp | 2c7a0cd2ddb7632acb3009f94d728792ddf9644f | [
"MIT"
] | null | null | null | # Generated by Django 3.2.12 on 2022-02-26 12:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0003_alter_image_null'),
]
operations = [
migrations.AlterField(
model_name='article',
name='image',
... | 24.75 | 123 | 0.610101 |
3e5ff16a195785fab17702ce0bd637d081f9eef9 | 160 | py | Python | tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_PolyTrend_BestCycle_LSTM.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_PolyTrend_BestCycle_LSTM.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_PolyTrend_BestCycle_LSTM.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Integration'] , ['PolyTrend'] , ['BestCycle'] , ['LSTM'] ); | 40 | 82 | 0.75 |
3c66c6332f82b5832bb10f8d60efbebd702e186f | 5,425 | py | Python | csvparser.py | gideontong/Humingbird | 07f8ef2e52e2212742e80b2cece06566b0ebea86 | [
"MIT"
] | 1 | 2020-07-19T22:16:14.000Z | 2020-07-19T22:16:14.000Z | csvparser.py | gideontong/Humingbird | 07f8ef2e52e2212742e80b2cece06566b0ebea86 | [
"MIT"
] | 1 | 2020-07-31T04:43:25.000Z | 2020-07-31T09:16:50.000Z | csvparser.py | gideontong/Humingbird | 07f8ef2e52e2212742e80b2cece06566b0ebea86 | [
"MIT"
] | 1 | 2021-03-07T20:09:44.000Z | 2021-03-07T20:09:44.000Z | import csv
def parseCSV(file_name):
myList = []
with open(file_name, 'r') as file_o_data:
#csv_data = csv.reader(file_o_data)#gives an iterable
for row in csv.reader(file_o_data):
myList.append(row)
print(myList)
return myList
processed_data = {'M':[],
... | 35.457516 | 161 | 0.595207 |
6781347364c3dfa2d604c41cac4e39d3cd749be4 | 994 | py | Python | realm/migrations/0005_auto_20210215_1406.py | FifthTry/play | 899698f63aae5f439acca06297583f7fd54f0a58 | [
"BSD-3-Clause"
] | 8 | 2019-10-05T16:43:39.000Z | 2020-06-23T14:54:49.000Z | migrations/0005_auto_20210215_1406.py | FifthTry/realm | 96db808003011a37899f0b3ea72f1cc4f66c915a | [
"MIT"
] | 12 | 2019-10-09T04:47:28.000Z | 2020-06-16T09:07:18.000Z | migrations/0005_auto_20210215_1406.py | FifthTry/realm | 96db808003011a37899f0b3ea72f1cc4f66c915a | [
"MIT"
] | 6 | 2019-06-06T07:24:41.000Z | 2020-07-08T15:27:59.000Z | # Generated by Django 3.1.2 on 2021-02-15 14:06
from django.db import migrations, models
import django_migration_linter as linter
class Migration(migrations.Migration):
dependencies = [
('realm', '0004_task'),
]
operations = [
linter.IgnoreMigration(),
migrations.AddField(
... | 25.487179 | 51 | 0.550302 |
4a88dcd2cdc013a19f410c94782f3e38be1e775f | 501 | py | Python | check_license_server.py | s1071539/vue-test-simple | a1b1891828a8185a13a1bcb8f29882a923d76c59 | [
"MIT"
] | null | null | null | check_license_server.py | s1071539/vue-test-simple | a1b1891828a8185a13a1bcb8f29882a923d76c59 | [
"MIT"
] | null | null | null | check_license_server.py | s1071539/vue-test-simple | a1b1891828a8185a13a1bcb8f29882a923d76c59 | [
"MIT"
] | null | null | null | import psutil
import os
def run_license_server():
os.system('python license_server.py')
pid = 0
target_path = os.getcwd() + '\\license_server.pid'
if os.path.isfile(target_path):
with open('license_server.pid', 'r') as f:
pid = int(f.read())
if(psutil.pid_exists(pid)):
myprocess = psutil... | 18.555556 | 50 | 0.61477 |
5778aadaba6cda11fe84f517ea01a36d6cb838be | 6,452 | py | Python | awx_collection/plugins/modules/inventory.py | SysBind/awx | 2e0dd61bb63d729054e97b9cf3560b3f6bc63d4f | [
"Apache-2.0"
] | null | null | null | awx_collection/plugins/modules/inventory.py | SysBind/awx | 2e0dd61bb63d729054e97b9cf3560b3f6bc63d4f | [
"Apache-2.0"
] | null | null | null | awx_collection/plugins/modules/inventory.py | SysBind/awx | 2e0dd61bb63d729054e97b9cf3560b3f6bc63d4f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
# 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.... | 33.780105 | 124 | 0.672505 |
9ba5d2c14bb52c0b499dafb2f151002c9e858207 | 680 | py | Python | examples/Python/zhelpers.py | dcramer/zguide | a07fe97c4c597e6401b4281ae07c3a156590f4c6 | [
"Zed",
"X11",
"MIT"
] | 2 | 2015-09-24T19:53:04.000Z | 2015-11-06T10:22:53.000Z | examples/Python/zhelpers.py | tzuryby/zguide | 609b4255d87287a42932392db1d50256c1b878ae | [
"Zed",
"X11",
"MIT"
] | null | null | null | examples/Python/zhelpers.py | tzuryby/zguide | 609b4255d87287a42932392db1d50256c1b878ae | [
"Zed",
"X11",
"MIT"
] | null | null | null | # encoding: utf-8
"""
Helper module for example applications. Mimics ZeroMQ Guide's zhelpers.h.
"""
from random import randint
import zmq
# Receives all message parts from socket, prints neatly
def dump(zsocket):
print "----------------------------------------"
for part in zsocket.recv_multipart():
... | 26.153846 | 73 | 0.604412 |
624175f82684e4faa54a51e2d89a48af8c8688f6 | 289,252 | py | Python | msgraph/cli/command_modules/devicescorpmgt/azext_devicescorpmgt/vendored_sdks/devicescorpmgt/models/_models.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | msgraph/cli/command_modules/devicescorpmgt/azext_devicescorpmgt/vendored_sdks/devicescorpmgt/models/_models.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | 22 | 2022-03-29T22:54:37.000Z | 2022-03-29T22:55:27.000Z | msgraph/cli/command_modules/devicescorpmgt/azext_devicescorpmgt/vendored_sdks/devicescorpmgt/models/_models.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 52.572156 | 430 | 0.719563 |
4156a0fe7378b28c21d6f2bf07c74d67ce04a1a5 | 9,016 | py | Python | nixio/pycore/dimensions.py | JiriVanek/nixpy | 25ccda7ddeeb81b67409a9a9d1a2fd09beddbc12 | [
"BSD-3-Clause"
] | null | null | null | nixio/pycore/dimensions.py | JiriVanek/nixpy | 25ccda7ddeeb81b67409a9a9d1a2fd09beddbc12 | [
"BSD-3-Clause"
] | null | null | null | nixio/pycore/dimensions.py | JiriVanek/nixpy | 25ccda7ddeeb81b67409a9a9d1a2fd09beddbc12 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2016, German Neuroinformatics Node (G-Node)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
from __future__ import (absolute_import, division)
... | 29.464052 | 78 | 0.611912 |
afef4e4ab4666c9195fb5999386d458a306a1cbd | 4,656 | py | Python | webresume/webresume/settings.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-dcam4 | 10e19f7cdf87fcd799c48a53eea1c988574f57ce | [
"MIT"
] | null | null | null | webresume/webresume/settings.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-dcam4 | 10e19f7cdf87fcd799c48a53eea1c988574f57ce | [
"MIT"
] | 1 | 2018-10-20T05:13:48.000Z | 2018-10-20T05:13:48.000Z | webresume/webresume/settings.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-dcam4 | 10e19f7cdf87fcd799c48a53eea1c988574f57ce | [
"MIT"
] | null | null | null | """
Django settings for webresume project.
Generated by 'django-admin startproject' using Django 2.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
... | 29.468354 | 91 | 0.704253 |
02076952be108350950350ac646442508df0e3e4 | 229 | py | Python | chip_eight/runner.py | apalmer/computer-emulation | 2284e26ac9054c147da1145debc5bd73cc6214f1 | [
"MIT"
] | null | null | null | chip_eight/runner.py | apalmer/computer-emulation | 2284e26ac9054c147da1145debc5bd73cc6214f1 | [
"MIT"
] | 5 | 2020-03-31T11:18:49.000Z | 2021-02-14T01:46:17.000Z | chip_eight/runner.py | apalmer/computer-emulation | 2284e26ac9054c147da1145debc5bd73cc6214f1 | [
"MIT"
] | null | null | null | from chip_eight import Computer
__computer = Computer()
def boot():
__computer.initialize()
def load(rom):
rom_data = open(rom,"rb").read()
__computer.load_rom(rom_data)
def run():
__computer.execute_progam()
| 16.357143 | 36 | 0.69869 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.