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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3ae6d4b4a5db3498d8459e55098bc471d3ce7ad4 | 2,025 | py | Python | CLIMA/views.py | weslleybulhoes/projeto-pibic | 971918cd76fedce7dee297201b54fab076078d81 | [
"MIT"
] | null | null | null | CLIMA/views.py | weslleybulhoes/projeto-pibic | 971918cd76fedce7dee297201b54fab076078d81 | [
"MIT"
] | null | null | null | CLIMA/views.py | weslleybulhoes/projeto-pibic | 971918cd76fedce7dee297201b54fab076078d81 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views.generic import View
import pandas as pd
import datetime
from utils.grafico_clima import gerando_grafico
from .templatetags.filtro_select import concatenando_string, removendo_string
import os
class Clima(View):
def get(self, *args, **kwargs):
if self.re... | 36.818182 | 124 | 0.631111 |
409317f0b2f4ad95db118be536e5182c0ff7f547 | 9,421 | py | Python | build_helpers.py | neurospin/nipy | cc54600a0dca1e003ad393bc05c46f91eef30a68 | [
"BSD-3-Clause"
] | 1 | 2016-03-08T15:01:06.000Z | 2016-03-08T15:01:06.000Z | setup_helpers.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | null | null | null | setup_helpers.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Build helpers for setup.py
Includes package dependency checks, and code to build the documentation
To build the docs, run::
python setup.py build_sphinx
"""
# Standard library imports
impor... | 36.515504 | 133 | 0.578389 |
56cb929d13460820a169a8ebd6eb9a774fc3752e | 6,043 | py | Python | python/qpid_dispatch_internal/management/schema_doc.py | kishorkunal-raj/qpid-dispatch | f629b448dc1ae92d46c31f3c8d7bf317412b9e22 | [
"Apache-2.0"
] | 1 | 2019-03-17T04:08:43.000Z | 2019-03-17T04:08:43.000Z | python/qpid_dispatch_internal/management/schema_doc.py | kishorkunal-raj/qpid-dispatch | f629b448dc1ae92d46c31f3c8d7bf317412b9e22 | [
"Apache-2.0"
] | 121 | 2020-09-16T06:03:53.000Z | 2022-03-30T13:03:23.000Z | python/qpid_dispatch_internal/management/schema_doc.py | irinabov/debian-qpid-dispatch | 42fb2ffb65f8e8c8d616633c0b4308d6531a281d | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 43.47482 | 114 | 0.6093 |
c1ea4ee4ee36cc8a4d0b03d43f9f922b601a89e7 | 3,267 | py | Python | pdtable/io/excel.py | guilhermebs/pdtable | 7821b015f5c92a0be5124f4527717c99b802f45c | [
"BSD-3-Clause"
] | null | null | null | pdtable/io/excel.py | guilhermebs/pdtable | 7821b015f5c92a0be5124f4527717c99b802f45c | [
"BSD-3-Clause"
] | null | null | null | pdtable/io/excel.py | guilhermebs/pdtable | 7821b015f5c92a0be5124f4527717c99b802f45c | [
"BSD-3-Clause"
] | null | null | null | """Interface to read/write Tables from/to an Excel workbook.
The only Excel I/O engine supported right now is 'openpyxl', but this module can
be extended to support others readers such as 'xlrd' and writers such as 'xlsxwriter'.
openpyxl (and eventually other engines) are not required at install time; only when the f... | 34.389474 | 99 | 0.677074 |
5cedc083de6aeab00b5204a041e6d83206c1f0d8 | 73,457 | py | Python | src/sage/functions/orthogonal_polys.py | fchapoton/sage | 765c5cb3e24dd134708eca97e4c52e0221cd94ba | [
"BSL-1.0"
] | 1 | 2020-08-30T04:27:27.000Z | 2020-08-30T04:27:27.000Z | src/sage/functions/orthogonal_polys.py | fchapoton/sage | 765c5cb3e24dd134708eca97e4c52e0221cd94ba | [
"BSL-1.0"
] | null | null | null | src/sage/functions/orthogonal_polys.py | fchapoton/sage | 765c5cb3e24dd134708eca97e4c52e0221cd94ba | [
"BSL-1.0"
] | 3 | 2020-03-29T17:13:36.000Z | 2021-05-03T18:11:28.000Z | r"""
Orthogonal Polynomials
- The Chebyshev polynomial of the first kind arises as a solution
to the differential equation
.. MATH::
(1-x^2)\,y'' - x\,y' + n^2\,y = 0
and those of the second kind as a solution to
.. MATH::
(1-x^2)\,y'' - 3x\,y' + n(n+2)\,y = 0.
The Chebyshev p... | 32.007407 | 212 | 0.523449 |
7ca863067a8fd90e6f4b817b64937c2e01094dca | 15,179 | py | Python | Segmentation/train_DenseNet_one_Concrete_CamVid11.py | ardywibowo/LBD | 1c56917fa0797c98ef1233879849c9ec536fe896 | [
"MIT"
] | null | null | null | Segmentation/train_DenseNet_one_Concrete_CamVid11.py | ardywibowo/LBD | 1c56917fa0797c98ef1233879849c9ec536fe896 | [
"MIT"
] | null | null | null | Segmentation/train_DenseNet_one_Concrete_CamVid11.py | ardywibowo/LBD | 1c56917fa0797c98ef1233879849c9ec536fe896 | [
"MIT"
] | null | null | null | from __future__ import print_function
import os,time,cv2, sys, math
import tensorflow as tf
import tensorflow.contrib.slim as slim
import numpy as np
import time, datetime
import argparse
import random
import os, sys
import subprocess
import matplotlib
matplotlib.use('Agg')
from utils import utils, helpers
from buil... | 41.024324 | 274 | 0.684498 |
ae5270d1e81b456c58292fa389e87d041d118435 | 383 | py | Python | dt/migrations/0002_datetime_twenty_four_hours.py | zembrodt/django-home | 0a8d379028a1afd22ab9a6d7589672d623d8c6e8 | [
"MIT"
] | null | null | null | dt/migrations/0002_datetime_twenty_four_hours.py | zembrodt/django-home | 0a8d379028a1afd22ab9a6d7589672d623d8c6e8 | [
"MIT"
] | 16 | 2019-03-07T21:04:26.000Z | 2022-03-11T23:42:00.000Z | dt/migrations/0002_datetime_twenty_four_hours.py | zembrodt/django-home | 0a8d379028a1afd22ab9a6d7589672d623d8c6e8 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.3 on 2019-02-16 19:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dt', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='datetime',
name='twenty_four_hours',
... | 20.157895 | 52 | 0.5953 |
871dcc6b8d28b4aafb3d2045b3ba66ca5c9c3f6d | 780 | py | Python | vertica_python/vertica/messages/backend_messages/authentication.py | jakubjedelsky/vertica-python | f379576b6949638c90908f5ebded321dce9330e5 | [
"MIT"
] | 1 | 2019-06-17T19:05:10.000Z | 2019-06-17T19:05:10.000Z | vertica_python/vertica/messages/backend_messages/authentication.py | jakubjedelsky/vertica-python | f379576b6949638c90908f5ebded321dce9330e5 | [
"MIT"
] | null | null | null | vertica_python/vertica/messages/backend_messages/authentication.py | jakubjedelsky/vertica-python | f379576b6949638c90908f5ebded321dce9330e5 | [
"MIT"
] | 2 | 2020-06-20T21:26:31.000Z | 2021-04-03T10:44:40.000Z | from __future__ import print_function, division, absolute_import
from struct import unpack
from ..message import BackendMessage
class Authentication(BackendMessage):
message_id = b'R'
OK = 0
KERBEROS_V5 = 2
CLEARTEXT_PASSWORD = 3
CRYPT_PASSWORD = 4
MD5_PASSWORD = 5
SCM_CREDENTIAL = 6
... | 23.636364 | 65 | 0.65 |
f764d80da33e8ddbfa585094e6ec89c871ac6da3 | 1,016 | py | Python | dlkit/json_/proxy/record_templates.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 2 | 2018-02-23T12:16:11.000Z | 2020-10-08T17:54:24.000Z | dlkit/json_/proxy/record_templates.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 87 | 2017-04-21T18:57:15.000Z | 2021-12-13T19:43:57.000Z | dlkit/json_/proxy/record_templates.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 1 | 2018-03-01T16:44:25.000Z | 2018-03-01T16:44:25.000Z | """JSON implementations of proxy records."""
# pylint: disable=no-init
# Numerous classes don't require __init__.
# pylint: disable=too-many-public-methods,too-few-public-methods
# Number of methods are defined in specification
# pylint: disable=protected-access
# Access to protected methods allowed in pac... | 29.882353 | 92 | 0.759843 |
06a1fb78029883bf3f1a8ee3532361a743171c69 | 130 | py | Python | app/db.py | lealssa/cvm_api | d3e468f6c81009aeb5dc358a39e22f109ea3315d | [
"MIT"
] | null | null | null | app/db.py | lealssa/cvm_api | d3e468f6c81009aeb5dc358a39e22f109ea3315d | [
"MIT"
] | null | null | null | app/db.py | lealssa/cvm_api | d3e468f6c81009aeb5dc358a39e22f109ea3315d | [
"MIT"
] | null | null | null | import motor.motor_asyncio
from .config import settings
client = motor.motor_asyncio.AsyncIOMotorClient(settings.cvm_mongodb_url) | 32.5 | 73 | 0.869231 |
a62219842fb04e48966f90a4b181478fa2be827d | 1,591 | py | Python | contrib/attic/pydl4j/pydl4j/__init__.py | eric-erki/deeplearning4j | b9d462f66879e9315767b70190bd2ab31b9a3275 | [
"Apache-2.0"
] | null | null | null | contrib/attic/pydl4j/pydl4j/__init__.py | eric-erki/deeplearning4j | b9d462f66879e9315767b70190bd2ab31b9a3275 | [
"Apache-2.0"
] | null | null | null | contrib/attic/pydl4j/pydl4j/__init__.py | eric-erki/deeplearning4j | b9d462f66879e9315767b70190bd2ab31b9a3275 | [
"Apache-2.0"
] | null | null | null | # /* ******************************************************************************
# * Copyright (c) 2021 Deeplearning4j Contributors
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License, Version 2.0 which is available at
# * https://www.apache.org... | 45.457143 | 84 | 0.590195 |
31c8ea234e0baa68038d11dc325b9d00ffe8ae15 | 7,769 | py | Python | invenio_rdm_records/records/api.py | caltechlibrary/invenio-rdm-records | 5f35d82a3ed7caec5aa2350d62c26a021edf2d87 | [
"MIT"
] | null | null | null | invenio_rdm_records/records/api.py | caltechlibrary/invenio-rdm-records | 5f35d82a3ed7caec5aa2350d62c26a021edf2d87 | [
"MIT"
] | null | null | null | invenio_rdm_records/records/api.py | caltechlibrary/invenio-rdm-records | 5f35d82a3ed7caec5aa2350d62c26a021edf2d87 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
# Copyright (C) 2021 TU Wien.
#
# Invenio-RDM-Records is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""RDM Record and Draft API."""
from invenio_drafts_resources.records import Dr... | 30.347656 | 78 | 0.635346 |
e03f04222f8b45b76e66e53c434df130ae288aea | 588 | py | Python | test/test_cli.py | kdelee/ansible-builder | 07cee927efca220ad17f66bba6fb4a42d9c09953 | [
"Apache-2.0"
] | null | null | null | test/test_cli.py | kdelee/ansible-builder | 07cee927efca220ad17f66bba6fb4a42d9c09953 | [
"Apache-2.0"
] | null | null | null | test/test_cli.py | kdelee/ansible-builder | 07cee927efca220ad17f66bba6fb4a42d9c09953 | [
"Apache-2.0"
] | null | null | null | from ansible_builder.cli import prepare
def test_custom_image(exec_env_definition_file, tmpdir):
content = {'version': 1}
path = str(exec_env_definition_file(content=content))
aee = prepare(['create', '-f', path, '-b', 'my-custom-image', '-c', str(tmpdir)])
assert aee.containerfile.base_image == 'my... | 30.947368 | 85 | 0.712585 |
1f58b6d5ff633650863dbd5953fe7100d8bce2c3 | 1,407 | py | Python | redbot/message/headers/soapaction.py | thinkbox/redbot | 90744dd971389bbf435d200483309b70b748785a | [
"Unlicense"
] | 1 | 2019-06-27T13:02:52.000Z | 2019-06-27T13:02:52.000Z | redbot/message/headers/soapaction.py | thinkbox/redbot | 90744dd971389bbf435d200483309b70b748785a | [
"Unlicense"
] | null | null | null | redbot/message/headers/soapaction.py | thinkbox/redbot | 90744dd971389bbf435d200483309b70b748785a | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
__author__ = "Mark Nottingham <mnot@mnot.net>"
__copyright__ = """\
Copyright (c) 2008-2013 Mark Nottingham
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 restricti... | 38.027027 | 77 | 0.78607 |
11060cecfdb7bd68bd7082ac490b00d26deeff8a | 240,512 | py | Python | run_unittests.py | felipealmeida/meson | 2f72d4db0921ec3ce7c4cd9803c7af9f4ac776cf | [
"Apache-2.0"
] | null | null | null | run_unittests.py | felipealmeida/meson | 2f72d4db0921ec3ce7c4cd9803c7af9f4ac776cf | [
"Apache-2.0"
] | null | null | null | run_unittests.py | felipealmeida/meson | 2f72d4db0921ec3ce7c4cd9803c7af9f4ac776cf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2016-2017 The Meson development team
# 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 ... | 45.482602 | 199 | 0.585875 |
7f29599ade318ec5f44f34edfceb4539635dac58 | 518 | py | Python | RecoEgamma/ElectronIdentification/python/VIDElectronSelector.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:24:46.000Z | 2021-11-30T16:24:46.000Z | RecoEgamma/ElectronIdentification/python/VIDElectronSelector.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 4 | 2021-11-29T13:57:56.000Z | 2022-03-29T06:28:36.000Z | RecoEgamma/ElectronIdentification/python/VIDElectronSelector.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2022-02-27T06:12:26.000Z | 2022-02-27T06:12:26.000Z | import ROOT
from PhysicsTools.SelectorUtils.VIDSelectorBase import VIDSelectorBase
class VIDElectronSelector(VIDSelectorBase):
def __init__(self,pythonpset = None):
builder = ROOT.MakeVersionedSelector(ROOT.reco.GsfElectron)
ptrmaker = ROOT.MakePtrFromCollection(ROOT.vector(ROOT.pat.Electron),
... | 47.090909 | 77 | 0.65251 |
658066032eedceca2ea1f42e08874cfe58c653b2 | 2,799 | py | Python | algo/distributions.py | yunshengtian/ppo-mujoco | 1989bc5491d2abc3d015d0ec81d34ea166c3352b | [
"MIT"
] | 1 | 2021-01-27T08:59:31.000Z | 2021-01-27T08:59:31.000Z | algo/distributions.py | yunshengtian/ppo-mujoco | 1989bc5491d2abc3d015d0ec81d34ea166c3352b | [
"MIT"
] | null | null | null | algo/distributions.py | yunshengtian/ppo-mujoco | 1989bc5491d2abc3d015d0ec81d34ea166c3352b | [
"MIT"
] | 1 | 2021-01-20T07:56:54.000Z | 2021-01-20T07:56:54.000Z | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from algo.utils import AddBias, init
"""
Modify standard PyTorch distributions so they are compatible with this code.
"""
#
# Standardize distribution interfaces
#
# Categorical
class FixedCategorical(torch.distributions.Categorical):
... | 25.445455 | 86 | 0.618078 |
bf65f35ed0ef2ef97a8d9512285e050e9b548821 | 2,204 | py | Python | tests/functional/test_scoping/test_metamodel_provider.py | goto40/textX-gui-experiment2 | bcacc33f6e6cd49468fe3a4746b01505af2b4862 | [
"MIT"
] | null | null | null | tests/functional/test_scoping/test_metamodel_provider.py | goto40/textX-gui-experiment2 | bcacc33f6e6cd49468fe3a4746b01505af2b4862 | [
"MIT"
] | null | null | null | tests/functional/test_scoping/test_metamodel_provider.py | goto40/textX-gui-experiment2 | bcacc33f6e6cd49468fe3a4746b01505af2b4862 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from os.path import dirname, abspath
from pytest import raises
import textx.scoping as scoping
import textx.scoping.providers as scoping_providers
from textx import metamodel_from_file
from textx.scoping.tools import get_unique_named_object_in_all_models
def test_metamodel_p... | 33.907692 | 74 | 0.630218 |
e17d36494fefb55cddf03a24e59c690bbdc0c1a7 | 233 | py | Python | pl_bolts/loggers/__init__.py | dkmiller/pytorch-lightning-bolts | 1373f3843770a05a9f3b19752da7c095367702ed | [
"Apache-2.0"
] | null | null | null | pl_bolts/loggers/__init__.py | dkmiller/pytorch-lightning-bolts | 1373f3843770a05a9f3b19752da7c095367702ed | [
"Apache-2.0"
] | null | null | null | pl_bolts/loggers/__init__.py | dkmiller/pytorch-lightning-bolts | 1373f3843770a05a9f3b19752da7c095367702ed | [
"Apache-2.0"
] | null | null | null | """
Collection of PyTorchLightning loggers
"""
__all__ = []
try:
from pl_bolts.loggers.azureml import AzureMlLogger
except ImportError: # pragma: no-cover
pass # pragma: no-cover
else:
__all__.append('AzureMlLogger')
| 17.923077 | 54 | 0.716738 |
6ce501b160dda321ec6b8a40eae3f1c0aa28c311 | 732 | py | Python | test/test_delete.py | 100loto/Mantis | e4d4a4627354f77c7a1e1e33a42a1aede3a2f505 | [
"Apache-2.0"
] | null | null | null | test/test_delete.py | 100loto/Mantis | e4d4a4627354f77c7a1e1e33a42a1aede3a2f505 | [
"Apache-2.0"
] | null | null | null | test/test_delete.py | 100loto/Mantis | e4d4a4627354f77c7a1e1e33a42a1aede3a2f505 | [
"Apache-2.0"
] | null | null | null | import random
import string
from model.project import Project
def test_delete_project(app, soap):
if len(app.project.get_list()) == 0:
app.project.create(Project(name=random_string("project_of", 10), description=random_string("description:", 50)))
old_projects = soap.get_list()
project = random.ch... | 34.857143 | 120 | 0.734973 |
11f581b59822f74735d3a59c6f10a27becf4245f | 254 | py | Python | predavanje3/uvjetna_naredba_if_elif_else1.py | Miillky/uvod_u_programiranje | 209611e38c8fe84c727649df4b868a4278eb77c3 | [
"MIT"
] | null | null | null | predavanje3/uvjetna_naredba_if_elif_else1.py | Miillky/uvod_u_programiranje | 209611e38c8fe84c727649df4b868a4278eb77c3 | [
"MIT"
] | null | null | null | predavanje3/uvjetna_naredba_if_elif_else1.py | Miillky/uvod_u_programiranje | 209611e38c8fe84c727649df4b868a4278eb77c3 | [
"MIT"
] | null | null | null | print('Program za provjeru unesenog broj:')
broj = int(input("Unesi priroda broj:"))
if broj<0:
print('Broj {0} je negativan'.format(broj))
elif broj==0:
print('Broj {0} je nula'.format(broj))
else:
print('Broj {0} je pozitivan'.format(broj)) | 31.75 | 47 | 0.669291 |
63800c7bae35b9e962faf9082ff0257c67e78ef3 | 5,877 | py | Python | neolib/http/Page.py | kemcbride/Neolib | a3e61cef74328aa10a757155eb930b18ccad7bae | [
"MIT"
] | null | null | null | neolib/http/Page.py | kemcbride/Neolib | a3e61cef74328aa10a757155eb930b18ccad7bae | [
"MIT"
] | 10 | 2017-08-30T18:34:33.000Z | 2020-06-25T11:17:17.000Z | neolib/http/Page.py | kemcbride/Neolib | a3e61cef74328aa10a757155eb930b18ccad7bae | [
"MIT"
] | null | null | null | """:mod:`Page` -- Provides an interface for HTTP communicating and HTML parsing
.. module:: Page
:synopsis: Provides an interface for HTTP communicating and HTML parsing
.. moduleauthor:: Joshua Gilman <joshuagilman@gmail.com>
"""
from neolib.http.HTTPForm import HTTPForm
from bs4 import BeautifulSoup
import reque... | 38.92053 | 111 | 0.61494 |
0ef52cb7a1410bb3356fde70997ea8b57eba4913 | 2,435 | py | Python | src/hsd/eventhandler.py | aradi/hsd-python | 6d9fae3536da99aafff928d96c6b36b9a9c05847 | [
"BSD-2-Clause"
] | null | null | null | src/hsd/eventhandler.py | aradi/hsd-python | 6d9fae3536da99aafff928d96c6b36b9a9c05847 | [
"BSD-2-Clause"
] | null | null | null | src/hsd/eventhandler.py | aradi/hsd-python | 6d9fae3536da99aafff928d96c6b36b9a9c05847 | [
"BSD-2-Clause"
] | null | null | null | #--------------------------------------------------------------------------------------------------#
# hsd-python: package for manipulating HSD-formatted data in Python #
# Copyright (C) 2011 - 2021 DFTB+ developers group
# # BSD 2-clause license.
... | 30.822785 | 100 | 0.55729 |
1eb1188ae412c42a97546704a770be85c53e6331 | 3,755 | py | Python | manim/config.py | mykytarudenko/manim | 08678f7b3edc376932493f53e416d310666ed3b7 | [
"MIT"
] | 3 | 2020-10-19T18:16:22.000Z | 2021-05-09T14:49:58.000Z | manim/config.py | Zoravar-python/News-API | 08678f7b3edc376932493f53e416d310666ed3b7 | [
"MIT"
] | null | null | null | manim/config.py | Zoravar-python/News-API | 08678f7b3edc376932493f53e416d310666ed3b7 | [
"MIT"
] | null | null | null | """
config.py
---------
Process the manim.cfg file and the command line arguments into a single
config object.
"""
import os
import sys
import colour
from . import constants
from .utils.config_utils import _run_config, _init_dirs, _from_command_line
from .logger import logger
from .utils.tex import TexTemplate, TexT... | 37.55 | 104 | 0.681225 |
e5dd01dbafa8744f64e6c13663974d624442c04c | 356 | py | Python | Chapter02/Exercise2.08/exercise2.08.py | lmoshood/The-Django-Workshop | 52e86a8f93cb38bf70d50e9b8d2c6d7dac416f62 | [
"MIT"
] | null | null | null | Chapter02/Exercise2.08/exercise2.08.py | lmoshood/The-Django-Workshop | 52e86a8f93cb38bf70d50e9b8d2c6d7dac416f62 | [
"MIT"
] | null | null | null | Chapter02/Exercise2.08/exercise2.08.py | lmoshood/The-Django-Workshop | 52e86a8f93cb38bf70d50e9b8d2c6d7dac416f62 | [
"MIT"
] | 1 | 2020-05-27T13:41:58.000Z | 2020-05-27T13:41:58.000Z | #!/usr/bin/env python3
from reviews.models import Contributor
Contributor.objects.create(first_names='Peter', last_names='Wharton', email='PeterWharton@example.com')
Contributor.objects.create(first_names='Peter', last_names='Tyrrell', email='PeterTyrrell@example.com')
contributors = Contributor.objects.filter(first_... | 35.6 | 103 | 0.80618 |
9ab777829a90618cdaec9dcb974f04bd79f16e52 | 1,037 | py | Python | peeringdb/tests/test_get_asn.py | mihalysz/peeringdb-py | 941902dd6829121134f56f20123ea16b1718ed3a | [
"Apache-2.0"
] | 2 | 2015-08-25T13:46:41.000Z | 2020-03-22T19:19:13.000Z | peeringdb/tests/test_get_asn.py | plajjan/peeringdb-py | 941902dd6829121134f56f20123ea16b1718ed3a | [
"Apache-2.0"
] | null | null | null | peeringdb/tests/test_get_asn.py | plajjan/peeringdb-py | 941902dd6829121134f56f20123ea16b1718ed3a | [
"Apache-2.0"
] | 2 | 2016-11-09T23:13:50.000Z | 2020-12-10T06:06:29.000Z | #!/usr/bin/env python
import unittest
from peeringdb.PeeringDB import PeeringDB
class TestASN(unittest.TestCase):
PDB = None
def setUp(self):
self.PDB = PeeringDB(cache=False)
# Real networks that exist and have PeeringDB entries
def test_exists_768(self):
# JANET UK
asn =... | 23.044444 | 74 | 0.650916 |
b3c99c5c2cf8b22dfeab8f8ae85299bca0beb91f | 648 | py | Python | django_meetups/meetups/migrations/0007_auto_20211125_0658.py | yaswanthsaivendra/django_projects | 9c4b3511d32eb3bfd0825480a5dd021bd865b16b | [
"MIT"
] | 3 | 2021-11-08T18:26:26.000Z | 2021-12-11T18:30:50.000Z | django_meetups/meetups/migrations/0007_auto_20211125_0658.py | yaswanthsaivendra/django_projects | 9c4b3511d32eb3bfd0825480a5dd021bd865b16b | [
"MIT"
] | null | null | null | django_meetups/meetups/migrations/0007_auto_20211125_0658.py | yaswanthsaivendra/django_projects | 9c4b3511d32eb3bfd0825480a5dd021bd865b16b | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-25 06:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('meetups', '0006_auto_20211125_0650'),
]
operations = [
migrations.AddField(
model_name='meetup',
name='date',
... | 24.923077 | 77 | 0.58179 |
8d4f415f3a1ed5903db7b9834b83a78e8ba98f26 | 5,079 | py | Python | model_compression_toolkit/hardware_models/keras_hardware_model/keras_tflite.py | isabella232/model_optimization | 074d1dfd8b4d18e57c6186c0ec5e49eb17a0fc7a | [
"Apache-2.0"
] | null | null | null | model_compression_toolkit/hardware_models/keras_hardware_model/keras_tflite.py | isabella232/model_optimization | 074d1dfd8b4d18e57c6186c0ec5e49eb17a0fc7a | [
"Apache-2.0"
] | null | null | null | model_compression_toolkit/hardware_models/keras_hardware_model/keras_tflite.py | isabella232/model_optimization | 074d1dfd8b4d18e57c6186c0ec5e49eb17a0fc7a | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Sony Semiconductors Israel, 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 b... | 54.031915 | 112 | 0.485726 |
2e1a84f4ee69b6f1ae3d393c5584cc4c09735966 | 2,215 | py | Python | Chapter08/10_init_hooks/my_library/models/library_book.py | PacktPublishing/-Odoo-13-Development-Cookbook-Fouth-Edition | fb75412e1ff13e1a1b3233f06de425c9df18aca7 | [
"MIT"
] | 125 | 2020-11-28T18:00:34.000Z | 2022-03-07T17:53:22.000Z | Chapter08/10_init_hooks/my_library/models/library_book.py | PacktPublishing/-Odoo-13-Development-Cookbook-Fouth-Edition | fb75412e1ff13e1a1b3233f06de425c9df18aca7 | [
"MIT"
] | 5 | 2021-02-02T10:03:29.000Z | 2022-03-16T07:32:28.000Z | Chapter08/10_init_hooks/my_library/models/library_book.py | PacktPublishing/-Odoo-13-Development-Cookbook-Fouth-Edition | fb75412e1ff13e1a1b3233f06de425c9df18aca7 | [
"MIT"
] | 182 | 2020-11-29T12:07:07.000Z | 2022-03-22T04:27:51.000Z | # -*- coding: utf-8 -*-
from odoo import models, fields, _
from odoo.exceptions import UserError
from odoo.tests.common import Form
import logging
_logger = logging.getLogger(__name__)
class LibraryBook(models.Model):
_name = 'library.book'
_description = 'Library Book'
name = fields.Char('Title', req... | 30.763889 | 83 | 0.602257 |
23b4ff256f39df8a1117c01039dda05f07632397 | 4,870 | py | Python | sentinelhub/testing_utils.py | HenryKobin/sentinelhub-py | d3b74201cbb613f6866e75e19527339967b9a2e1 | [
"MIT"
] | null | null | null | sentinelhub/testing_utils.py | HenryKobin/sentinelhub-py | d3b74201cbb613f6866e75e19527339967b9a2e1 | [
"MIT"
] | null | null | null | sentinelhub/testing_utils.py | HenryKobin/sentinelhub-py | d3b74201cbb613f6866e75e19527339967b9a2e1 | [
"MIT"
] | null | null | null | """
Utility tools for writing unit tests for packages which rely on `sentinelhub-py`
"""
import unittest
import os
import shutil
import logging
import inspect
import numpy as np
from .config import SHConfig
class TestSentinelHub(unittest.TestCase):
""" Class implementing common functionalities of unit tests fo... | 36.343284 | 120 | 0.619918 |
6086db778782715034bf17e4bff4dc8115c696f8 | 1,201 | py | Python | custom/ilsgateway/tests/test_product_sync.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T23:26:39.000Z | 2015-02-10T23:26:39.000Z | custom/ilsgateway/tests/test_product_sync.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | custom/ilsgateway/tests/test_product_sync.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | import json
import os
from django.test import TestCase
from corehq.apps.commtrack.models import Product as Prod
from corehq.apps.commtrack.tests.util import bootstrap_domain as initial_bootstrap
from custom.ilsgateway.api import Product
from custom.ilsgateway.commtrack import sync_ilsgateway_product
TEST_DOMAIN = 'ils... | 40.033333 | 82 | 0.750208 |
9d38a9639676a7a5b69ece3acff461f2998e76f8 | 2,525 | py | Python | generic/scrapper.py | tushortz/scrapper | 8b150f55d5c4e13264de7a03cbb7953e19645f3c | [
"MIT"
] | 2 | 2018-06-10T21:02:43.000Z | 2021-11-06T11:51:12.000Z | generic/scrapper.py | tushortz/simple-scrapper | 8b150f55d5c4e13264de7a03cbb7953e19645f3c | [
"MIT"
] | null | null | null | generic/scrapper.py | tushortz/simple-scrapper | 8b150f55d5c4e13264de7a03cbb7953e19645f3c | [
"MIT"
] | null | null | null | # Taiwo Kareem
# 05/04/2018 04:09 AM
import sys
import requests
import re
import time
import os
import json
from urllib.parse import urljoin # Python3
if len(sys.argv) != 2:
sys.exit('Usage: python %s "<config_filename>"' % __file__)
config_file = sys.argv[1]
config = {}
if os.path.isfile(config_file):
with ope... | 20.696721 | 102 | 0.601584 |
de9e0954979762eb743aedccddb1bc784505ff21 | 1,457 | py | Python | napari/layers/_tests/test_source.py | MaksHess/napari | 64a144607342c02177fc62fa83a3442ace0a98e7 | [
"BSD-3-Clause"
] | 1,345 | 2019-03-03T21:14:14.000Z | 2022-03-31T19:46:39.000Z | napari/layers/_tests/test_source.py | MaksHess/napari | 64a144607342c02177fc62fa83a3442ace0a98e7 | [
"BSD-3-Clause"
] | 3,904 | 2019-03-02T01:30:24.000Z | 2022-03-31T20:17:27.000Z | napari/layers/_tests/test_source.py | MaksHess/napari | 64a144607342c02177fc62fa83a3442ace0a98e7 | [
"BSD-3-Clause"
] | 306 | 2019-03-29T17:09:10.000Z | 2022-03-30T09:54:11.000Z | from napari.layers import Points
from napari.layers._source import Source, current_source, layer_source
def test_layer_source():
"""Test basic layer source assignment mechanism"""
with layer_source(path='some_path', reader_plugin='builtins'):
points = Points()
assert points.source == Source(path=... | 40.472222 | 78 | 0.611531 |
7263e9e3bb8d77827f94f14b5e3044a61eae6e09 | 619 | py | Python | Hereditariedade_e_Polimorfismo/18-Inheritance-Examples.py | nnsdtr/OOP-Python | 3b739966c9b35c32a2bd934574f6421b1470eb23 | [
"MIT"
] | null | null | null | Hereditariedade_e_Polimorfismo/18-Inheritance-Examples.py | nnsdtr/OOP-Python | 3b739966c9b35c32a2bd934574f6421b1470eb23 | [
"MIT"
] | null | null | null | Hereditariedade_e_Polimorfismo/18-Inheritance-Examples.py | nnsdtr/OOP-Python | 3b739966c9b35c32a2bd934574f6421b1470eb23 | [
"MIT"
] | null | null | null |
class Animal(object):
def __init__(self, name):
self.name = name
def eat(self, food):
print('{0} is eating {1}'.format(self.name, food))
class Dog(Animal):
def fetch(self, thing):
print('{0} goes after the {1}'.format(self.name, thing))
class Cat(Animal):
def swat_string(se... | 18.757576 | 86 | 0.641357 |
8418992ac5dea98b0ca98fb940e74b61ae4e8a65 | 4,533 | py | Python | homeassistant/components/waterfurnace/sensor.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/waterfurnace/sensor.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/waterfurnace/sensor.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Support for Waterfurnace."""
from __future__ import annotations
from homeassistant.components.sensor import (
ENTITY_ID_FORMAT,
SensorDeviceClass,
SensorEntity,
)
from homeassistant.const import PERCENTAGE, POWER_WATT, TEMP_FAHRENHEIT
from homeassistant.core import HomeAssistant, callback
from homeassis... | 29.627451 | 83 | 0.661372 |
d14ff0d35b1c7bc31f6ce170582bf57963b70c16 | 3,958 | py | Python | projects/objectnav_baselines/experiments/robothor/objectnav_robothor_depth_resnetgru_ddppo.py | prithv1/allenact | ee736e6a3aeed29b3661ee18fa0dc0a68a40201e | [
"MIT"
] | 1 | 2020-09-10T13:09:14.000Z | 2020-09-10T13:09:14.000Z | projects/objectnav_baselines/experiments/robothor/objectnav_robothor_depth_resnetgru_ddppo.py | andrlima/allenact | f29dd6f0ec62425b02ca07fee815b1a82627a28e | [
"MIT"
] | null | null | null | projects/objectnav_baselines/experiments/robothor/objectnav_robothor_depth_resnetgru_ddppo.py | andrlima/allenact | f29dd6f0ec62425b02ca07fee815b1a82627a28e | [
"MIT"
] | null | null | null | import gym
import torch.nn as nn
import torch.optim as optim
from torch.optim.lr_scheduler import LambdaLR
from torchvision import models
from core.algorithms.onpolicy_sync.losses import PPO
from core.algorithms.onpolicy_sync.losses.ppo import PPOConfig
from projects.objectnav_baselines.experiments.robothor.objectnav_... | 35.981818 | 88 | 0.641233 |
fa06b086876dda3e42060d0cdab7627f7c304f00 | 6,367 | py | Python | airflow/contrib/operators/kubernetes_pod_operator.py | abhishek-ch/incubator-airflow | 3358551c8e73d9019900f7a85f18ebfd88591450 | [
"Apache-2.0"
] | 1 | 2021-08-25T14:24:23.000Z | 2021-08-25T14:24:23.000Z | airflow/contrib/operators/kubernetes_pod_operator.py | abhishek-ch/incubator-airflow | 3358551c8e73d9019900f7a85f18ebfd88591450 | [
"Apache-2.0"
] | null | null | null | airflow/contrib/operators/kubernetes_pod_operator.py | abhishek-ch/incubator-airflow | 3358551c8e73d9019900f7a85f18ebfd88591450 | [
"Apache-2.0"
] | 1 | 2021-08-25T14:24:27.000Z | 2021-08-25T14:24:27.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... | 40.814103 | 87 | 0.649914 |
11003e16d0eade068f9aaed5b7d1d8679372d74b | 1,724 | py | Python | scout/commands/view/individuals.py | mhkc/scout | a7162f28c0f3490c3f3376268118fa8e6072a9db | [
"BSD-3-Clause"
] | null | null | null | scout/commands/view/individuals.py | mhkc/scout | a7162f28c0f3490c3f3376268118fa8e6072a9db | [
"BSD-3-Clause"
] | null | null | null | scout/commands/view/individuals.py | mhkc/scout | a7162f28c0f3490c3f3376268118fa8e6072a9db | [
"BSD-3-Clause"
] | null | null | null | import logging
import click
from flask.cli import with_appcontext
from scout.server.extensions import store
from scout.constants import SEX_MAP, PHENOTYPE_MAP
LOG = logging.getLogger(__name__)
@click.command("individuals", short_help="Display individuals")
@click.option("-i", "--institute", help="institute id of re... | 32.528302 | 92 | 0.612529 |
24063ae4bec035ad2dff8b21eff2dceba125b4af | 2,111 | py | Python | src/OTLMOW/OTLModel/Classes/ProefZichtbaarheidBijNacht.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/OTLModel/Classes/ProefZichtbaarheidBijNacht.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/OTLModel/Classes/ProefZichtbaarheidBijNacht.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | # coding=utf-8
from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut
from OTLMOW.OTLModel.Classes.Proef import Proef
from OTLMOW.OTLModel.Datatypes.FloatOrDecimalField import FloatOrDecimalField
from OTLMOW.GeometrieArtefact.PuntGeometrie import PuntGeometrie
from OTLMOW.GeometrieArtefact.LijnGeometrie impo... | 54.128205 | 181 | 0.670298 |
d16b65fbd4fa18a9b16a7cf25fd69f0380df6792 | 1,209 | py | Python | airbyte-integrations/connectors/source-webflow/source_webflow/webflow_to_airbyte_mapping.py | faros-ai/airbyte | 2ebafe1817a71b5c0a8f8b6f448dbef9db708668 | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-webflow/source_webflow/webflow_to_airbyte_mapping.py | faros-ai/airbyte | 2ebafe1817a71b5c0a8f8b6f448dbef9db708668 | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-webflow/source_webflow/webflow_to_airbyte_mapping.py | faros-ai/airbyte | 2ebafe1817a71b5c0a8f8b6f448dbef9db708668 | [
"MIT"
] | 1 | 2021-11-12T14:27:56.000Z | 2021-11-12T14:27:56.000Z | #
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
class WebflowToAirbyteMapping:
"""
The following disctionary is used for dynamically pulling the schema from Webflow, and mapping it to an Airbyte-compatible json-schema
Webflow: https://developers.webflow.com/#get-collection-with-full-sche... | 35.558824 | 138 | 0.53019 |
e4adfdc6488e393bd2cc5c3bdc0583ef11b6018a | 4,408 | py | Python | data/templates/account/signin.mako.py | sumukh210991/Cyberweb | 297bd54c9e223d38818b802087055e397c403f1c | [
"Apache-2.0"
] | null | null | null | data/templates/account/signin.mako.py | sumukh210991/Cyberweb | 297bd54c9e223d38818b802087055e397c403f1c | [
"Apache-2.0"
] | null | null | null | data/templates/account/signin.mako.py | sumukh210991/Cyberweb | 297bd54c9e223d38818b802087055e397c403f1c | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
STOP_RENDERING = runtime.STOP_RENDERING
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 10
_modified_time = 1467226821.321253
_enable_loop = True
_template_filename = '/home/sumukh/Documents/thesis/Cyberweb... | 40.072727 | 644 | 0.616833 |
17aa8c96506e60a79ca88d25a831b6d7e528ca5c | 547 | py | Python | manage.py | ryankibayhan/ryb-ecommerce | 15fa3bcb624be528926458b466ad7fe7fef5158e | [
"MIT"
] | null | null | null | manage.py | ryankibayhan/ryb-ecommerce | 15fa3bcb624be528926458b466ad7fe7fef5158e | [
"MIT"
] | 12 | 2019-12-04T23:48:45.000Z | 2022-03-11T23:53:30.000Z | manage.py | ryankibayhan/ryb-ecommerce | 15fa3bcb624be528926458b466ad7fe7fef5158e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ryb.settings.development')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Djan... | 34.1875 | 79 | 0.689214 |
0f8c46d159227775a491d6beb5ae6f6089b949f2 | 1,943 | py | Python | write_file.py | jayagascon/pos-chair | a5eefdb23df97e21bbc72e3f84711c2ab6377357 | [
"CC0-1.0"
] | null | null | null | write_file.py | jayagascon/pos-chair | a5eefdb23df97e21bbc72e3f84711c2ab6377357 | [
"CC0-1.0"
] | null | null | null | write_file.py | jayagascon/pos-chair | a5eefdb23df97e21bbc72e3f84711c2ab6377357 | [
"CC0-1.0"
] | null | null | null | # adapted from https://learn.adafruit.com/mcp3008-spi-adc/python-circuitpython
import busio
import digitalio
import board
import time
import adafruit_mcp3xxx.mcp3008 as MCP
from adafruit_mcp3xxx.analog_in import AnalogIn
import csv
from datetime import datetime
# create the spi bus
spi = busio.SPI(clock=board.SCK, MI... | 33.5 | 210 | 0.689655 |
d0aa4eb1042c9b42b82401adf9d84009fcf90f68 | 11,263 | py | Python | exifread/__init__.py | basnijholt/exif-py | 053eb84744cb138f8ad3a77cfa03cca735874369 | [
"BSD-3-Clause"
] | null | null | null | exifread/__init__.py | basnijholt/exif-py | 053eb84744cb138f8ad3a77cfa03cca735874369 | [
"BSD-3-Clause"
] | null | null | null | exifread/__init__.py | basnijholt/exif-py | 053eb84744cb138f8ad3a77cfa03cca735874369 | [
"BSD-3-Clause"
] | null | null | null | """
Read Exif metadata from tiff and jpeg files.
"""
from .exif_log import get_logger
from .classes import *
from .tags import *
from .utils import ord_
from .heic import HEICExifFinder
__version__ = '2.1.2'
logger = get_logger()
def increment_base(data, base):
return ord_(data[base + 2]) * 256 + ord_(data[bas... | 41.560886 | 124 | 0.500666 |
b334b84e25a98f663b9646b24d691c358329c2b8 | 1,913 | py | Python | deliver/functions_will/rotateDTI.py | mariecpereira/Extracao-de-Caracteristicas-Corpo-Caloso | f094c706db815f91cf61d1d501c2a9030b9b54d3 | [
"MIT"
] | null | null | null | deliver/functions_will/rotateDTI.py | mariecpereira/Extracao-de-Caracteristicas-Corpo-Caloso | f094c706db815f91cf61d1d501c2a9030b9b54d3 | [
"MIT"
] | null | null | null | deliver/functions_will/rotateDTI.py | mariecpereira/Extracao-de-Caracteristicas-Corpo-Caloso | f094c706db815f91cf61d1d501c2a9030b9b54d3 | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[ ]:
def rotateDTI(evl, evt, R):
s,m,n = evl[0].shape
# ====== DETERMINE TARGET DOMAIN SIZE AND A TRANSLATION TO FIT THE ROTATED IMAGE =======
# VERTICES FROM THE CUBE DEFINING THE ORIGINAL VOLUME
cube = np.array([[0,0,0,1],
[0,0,n,1],
... | 26.569444 | 94 | 0.550444 |
42c52b62ca36d09d1970509163f811a1b512954e | 2,376 | py | Python | services/classification-api/manage.py | conlamon/satellite-classification-flask-api | 0caf5e91d8545da07ef65704dfbdb63d21fa8e76 | [
"MIT"
] | 5 | 2018-05-24T18:46:39.000Z | 2020-03-23T20:37:46.000Z | services/classification-api/manage.py | conlamon/satellite-classification-flask-api | 0caf5e91d8545da07ef65704dfbdb63d21fa8e76 | [
"MIT"
] | 1 | 2019-08-31T23:31:41.000Z | 2019-09-01T19:29:13.000Z | services/classification-api/manage.py | conlamon/satellite-classification-flask-api | 0caf5e91d8545da07ef65704dfbdb63d21fa8e76 | [
"MIT"
] | 1 | 2019-08-27T18:20:15.000Z | 2019-08-27T18:20:15.000Z |
import unittest
from flask.cli import FlaskGroup
from project import create_app, db
from project.api.models import ImageTile
from project.api.inference_helper import load_model
import coverage
# ------- Setup code coverage reporting
# Configure the code coverage report
COV = coverage.coverage(
branch=True,
... | 26.696629 | 85 | 0.688552 |
4246541b3c37b31cef87bf2680e15f5c59c57894 | 10,171 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20181201/virtual_network_tap.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20181201/virtual_network_tap.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20181201/virtual_network_tap.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"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
from ... import _utilities, _tables
from... | 50.351485 | 1,291 | 0.687543 |
297933311d117125483d95d5faaa2fe1891aaf7d | 600 | py | Python | fastreid/data/prepare_data.py | huang-ju-git/fast-reid | ef55d8e3ac2995a7969468ea165e3decb2b3f212 | [
"Apache-2.0"
] | null | null | null | fastreid/data/prepare_data.py | huang-ju-git/fast-reid | ef55d8e3ac2995a7969468ea165e3decb2b3f212 | [
"Apache-2.0"
] | null | null | null | fastreid/data/prepare_data.py | huang-ju-git/fast-reid | ef55d8e3ac2995a7969468ea165e3decb2b3f212 | [
"Apache-2.0"
] | null | null | null | import pickle
import numpy as np
from torch import nn
import torch
# with open("msmt17-train-face.pkl","rb") as f:
# msmt_dict=pickle.load(f)
# keys=list(msmt_dict.keys())
# print(len(keys))
# keys_np=np.array(keys)
# np.save('msmt17-test-face-keys',keys_np)
# features=[]
# for term in keys:
# features.app... | 24 | 51 | 0.738333 |
ec0b17f56b83cafcd8924af732b81f74468b0ea7 | 432 | py | Python | numbas_lti/migrations/0038_lticonsumer_url.py | oscarsiles/numbas-lti-provider | ef7080a2593a800a1b9630c746e4f8667e2ec42d | [
"Apache-2.0"
] | 6 | 2016-12-12T14:41:33.000Z | 2021-04-18T01:04:23.000Z | numbas_lti/migrations/0038_lticonsumer_url.py | oscarsiles/numbas-lti-provider | ef7080a2593a800a1b9630c746e4f8667e2ec42d | [
"Apache-2.0"
] | 206 | 2016-08-24T13:53:07.000Z | 2022-03-31T09:14:43.000Z | numbas_lti/migrations/0038_lticonsumer_url.py | oscarsiles/numbas-lti-provider | ef7080a2593a800a1b9630c746e4f8667e2ec42d | [
"Apache-2.0"
] | 13 | 2016-10-23T04:53:30.000Z | 2022-02-17T09:25:00.000Z | # Generated by Django 2.0 on 2018-05-03 11:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('numbas_lti', '0037_auto_20171024_1400'),
]
operations = [
migrations.AddField(
model_name='lticonsumer',
name='url',
... | 22.736842 | 95 | 0.613426 |
dd5647a317a31b25337113a97429268d1ca193ac | 471 | py | Python | thread_Mutex.py | matiji66/python-concurrent-study | dcee1b2573bae75efecc578b5461dc6767f6e570 | [
"Apache-2.0"
] | null | null | null | thread_Mutex.py | matiji66/python-concurrent-study | dcee1b2573bae75efecc578b5461dc6767f6e570 | [
"Apache-2.0"
] | null | null | null | thread_Mutex.py | matiji66/python-concurrent-study | dcee1b2573bae75efecc578b5461dc6767f6e570 | [
"Apache-2.0"
] | null | null | null | import time
import threading
# 3.4 线程锁、互斥锁Mutex
# 一个进程下可以启动多个线程,多个线程共享父进程的内存空间,也就意味着每个线程可以访问同一份数据,此时,如果2个线程同时要修改同一份数据,会出现什么状况?
def addNum():
global num # 在每个线程中都获取这个全局变量
print('--get num:', num)
time.sleep(1)
num -= 1 # 对此公共变量进行-1操作
num = 100 # 设定一个共享变量
thread_list = []
for i in range(100):
... | 18.84 | 78 | 0.677282 |
477d797944709f8b9db3f86ca2ada0619949b66a | 12,170 | py | Python | unittests/taptests.py | annacrombie/meson | 3e2dba5b7cd107f60474b3cb01c307a9e2354868 | [
"Apache-2.0"
] | 64 | 2015-01-09T13:45:23.000Z | 2015-06-13T20:16:01.000Z | unittests/taptests.py | annacrombie/meson | 3e2dba5b7cd107f60474b3cb01c307a9e2354868 | [
"Apache-2.0"
] | 110 | 2015-01-09T01:35:56.000Z | 2015-06-14T11:26:04.000Z | unittests/taptests.py | annacrombie/meson | 3e2dba5b7cd107f60474b3cb01c307a9e2354868 | [
"Apache-2.0"
] | 13 | 2015-01-05T09:08:37.000Z | 2015-06-04T08:34:45.000Z | # Copyright 2016-2021 The Meson development team
# 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 agree... | 41.821306 | 88 | 0.655793 |
0a2d658018f7e2bd03365830f952e33493fd8803 | 16,459 | py | Python | custom/intrahealth/reports/taux_de_satisfaction_dashboard.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 1 | 2020-07-14T13:00:23.000Z | 2020-07-14T13:00:23.000Z | custom/intrahealth/reports/taux_de_satisfaction_dashboard.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 94 | 2020-12-11T06:57:31.000Z | 2022-03-15T10:24:06.000Z | custom/intrahealth/reports/taux_de_satisfaction_dashboard.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | null | null | null | import datetime
from django.utils.functional import cached_property
from memoized import memoized
from corehq.apps.hqwebapp.decorators import use_nvd3
from corehq.apps.locations.models import SQLLocation
from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn
from corehq.apps.reports.graph_model... | 41.987245 | 112 | 0.559512 |
2b837b502e5f3cba1893c8594b7ec730f5414187 | 815 | py | Python | setup.py | gaoyunzhi/readee | fc1be745869a52b9e6e48f9e00245dd15819e706 | [
"MIT"
] | null | null | null | setup.py | gaoyunzhi/readee | fc1be745869a52b9e6e48f9e00245dd15819e706 | [
"MIT"
] | null | null | null | setup.py | gaoyunzhi/readee | fc1be745869a52b9e6e48f9e00245dd15819e706 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="readee",
version="0.0.119",
author="Yunzhi Gao",
author_email="gaoyunzhi@gmail.com",
description="Library for export webpage to reader mode html.",
long_description=long_description,
... | 28.103448 | 66 | 0.635583 |
74007d872b8f7d6245f299fae5245b5ee4c86aa9 | 84 | py | Python | curves/curves/__init__.py | SweRavn/curve | 44ad54800fae1f434e7845963ef8b556c147c327 | [
"MIT"
] | null | null | null | curves/curves/__init__.py | SweRavn/curve | 44ad54800fae1f434e7845963ef8b556c147c327 | [
"MIT"
] | 10 | 2020-12-13T17:25:11.000Z | 2020-12-28T17:16:59.000Z | curves/curves/__init__.py | SweRavn/curve | 44ad54800fae1f434e7845963ef8b556c147c327 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 23 07:50:15 2019
@author: rore
"""
| 10.5 | 35 | 0.559524 |
df21d3ec4ea153e9d1ce60f89c26a61ff72f2c85 | 2,340 | py | Python | python/kfserving/kfserving/models/v1_time.py | quanjielin/kfserving | b3e99d1131d12b8da151954340df2aea3ab161cb | [
"Apache-2.0"
] | null | null | null | python/kfserving/kfserving/models/v1_time.py | quanjielin/kfserving | b3e99d1131d12b8da151954340df2aea3ab161cb | [
"Apache-2.0"
] | null | null | null | python/kfserving/kfserving/models/v1_time.py | quanjielin/kfserving | b3e99d1131d12b8da151954340df2aea3ab161cb | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
KFServing
Python SDK for KFServing # noqa: E501
OpenAPI spec version: v0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class V1Time(object):
"""NOTE: This class is auto generated by the swagge... | 26.590909 | 80 | 0.538889 |
49de5ab38557e3338b4681512b94a30a32e3e2f9 | 10,990 | py | Python | com/vmware/vmc/orgs/sddcs/networks/cgws/l2vpn_client.py | adammillerio/vsphere-automation-sdk-python | c07e1be98615201139b26c28db3aa584c4254b66 | [
"MIT"
] | null | null | null | com/vmware/vmc/orgs/sddcs/networks/cgws/l2vpn_client.py | adammillerio/vsphere-automation-sdk-python | c07e1be98615201139b26c28db3aa584c4254b66 | [
"MIT"
] | null | null | null | com/vmware/vmc/orgs/sddcs/networks/cgws/l2vpn_client.py | adammillerio/vsphere-automation-sdk-python | c07e1be98615201139b26c28db3aa584c4254b66 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#---------------------------------------------------------------------------
# Copyright 2020 VMware, Inc. All rights reserved.
# AUTO GENERATED FILE -- DO NOT MODIFY!
#
# vAPI stub file for package com.vmware.vmc.orgs.sddcs.networks.cgws.l2vpn.
#-----------------------------------------------... | 38.027682 | 105 | 0.559873 |
9375e7434ca9b44ec32c4671a836dd70dc6c92a9 | 431 | py | Python | back-end/RawFishSheep/app_order/migrations/0007_auto_20190516_1354.py | Coldarra/RawFishSheep | 266bd9d8d9832d5c692b63e7515d45fdc4f6acc4 | [
"Apache-2.0"
] | null | null | null | back-end/RawFishSheep/app_order/migrations/0007_auto_20190516_1354.py | Coldarra/RawFishSheep | 266bd9d8d9832d5c692b63e7515d45fdc4f6acc4 | [
"Apache-2.0"
] | 4 | 2021-10-06T22:49:52.000Z | 2022-02-27T12:28:18.000Z | back-end/RawFishSheep/app_order/migrations/0007_auto_20190516_1354.py | Coldarra/RawFishSheep | 266bd9d8d9832d5c692b63e7515d45fdc4f6acc4 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.7 on 2019-05-16 05:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_order', '0006_auto_20190514_1659'),
]
operations = [
migrations.AlterField(
model_name='order',
name='status',
... | 22.684211 | 94 | 0.617169 |
fb65cd91fc9cfc8b6c0ffd1ac1767f72991b1ccd | 6,462 | py | Python | fhir/resources/STU3/triggerdefinition.py | ItayGoren/fhir.resources | 3c45fddeb5a91ca0f02f9e28126b1f41a60360ba | [
"BSD-3-Clause"
] | 1 | 2020-08-31T09:52:25.000Z | 2020-08-31T09:52:25.000Z | fhir/resources/STU3/triggerdefinition.py | arkhn/fhir.resources | 122e89c8599c4034bb3075b31d1a1188e377db91 | [
"BSD-3-Clause"
] | null | null | null | fhir/resources/STU3/triggerdefinition.py | arkhn/fhir.resources | 122e89c8599c4034bb3075b31d1a1188e377db91 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/TriggerDefinition
Release: STU3
Version: 3.0.2
Revision: 11917
Last updated: 2019-10-24T11:53:00+11:00
"""
from typing import Any, Dict
from pydantic import Field, root_validator
from . import element, fhirtypes
class TriggerDefinition(ele... | 37.137931 | 88 | 0.616063 |
d8ee5480a6cc314e88a834bf7042c479b2be3e89 | 6,259 | py | Python | docs/source/01-AWS/12-Application-Integration/01-AWS-Simple-Queue-Service-Root/99-POC/FIFO-Q-Event-Source-for-Lambda-Concurrency/consumer.py | MacHu-GWU/Dev-Exp-Share | 4215d3872e5b2b26c3a37301d0dbe39c2bfecaea | [
"MIT"
] | 2 | 2021-07-23T03:03:43.000Z | 2021-10-04T12:03:54.000Z | docs/source/01-AWS/12-Application-Integration/01-AWS-Simple-Queue-Service-Root/99-POC/FIFO-Q-Event-Source-for-Lambda-Concurrency/consumer.py | MacHu-GWU/Dev-Exp-Share | 4215d3872e5b2b26c3a37301d0dbe39c2bfecaea | [
"MIT"
] | 3 | 2021-09-23T23:32:14.000Z | 2022-03-30T16:35:27.000Z | docs/source/01-AWS/12-Application-Integration/01-AWS-Simple-Queue-Service-Root/99-POC/FIFO-Q-Event-Source-for-Lambda-Concurrency/consumer.py | MacHu-GWU/Dev-Exp-Share | 4215d3872e5b2b26c3a37301d0dbe39c2bfecaea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import boto3
import pynamodb
import pynamodb.exceptions as exc
from pynamodb.attributes import (
UnicodeAttribute, BooleanAttribute, ListAttribute, NumberAttribute,
)
from pynamodb.models import Model
# --- Resovle Constant Value ---
def is_lambda_runtime():
return "AWS_LAM... | 27.69469 | 122 | 0.590989 |
76227904d46dc9a5113bd05a18ee9c05d7b410a1 | 276 | py | Python | grampanchayat/grampanchayat/doctype/village_setting/village_setting.py | ramjanalilal/grampanchayat | de837d98974b0f9eda559a7ff20890edd814fe29 | [
"MIT"
] | 1 | 2020-10-17T05:39:13.000Z | 2020-10-17T05:39:13.000Z | grampanchayat/grampanchayat/doctype/village_setting/village_setting.py | ramjanalilal/grampanchayat | de837d98974b0f9eda559a7ff20890edd814fe29 | [
"MIT"
] | null | null | null | grampanchayat/grampanchayat/doctype/village_setting/village_setting.py | ramjanalilal/grampanchayat | de837d98974b0f9eda559a7ff20890edd814fe29 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, FinForce Consulting LLP and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class VillageSetting(Document):
pass
| 25.090909 | 62 | 0.782609 |
2142eb932c771e9f00f1f1bc8133bde8659c146a | 18 | py | Python | python/taichi/image/__init__.py | gonnavis/taichi | ba1898643e4548a23ecae340e963614b28b8a103 | [
"MIT"
] | 2 | 2019-06-25T02:12:37.000Z | 2019-06-25T02:12:48.000Z | python/taichi/image/__init__.py | gonnavis/taichi | ba1898643e4548a23ecae340e963614b28b8a103 | [
"MIT"
] | null | null | null | python/taichi/image/__init__.py | gonnavis/taichi | ba1898643e4548a23ecae340e963614b28b8a103 | [
"MIT"
] | 1 | 2021-11-29T22:47:24.000Z | 2021-11-29T22:47:24.000Z | from .hdr import * | 18 | 18 | 0.722222 |
9e6c2b88b0e74795448071ee6c4ce5806b5d5377 | 907 | py | Python | applications/physbam/physbam-lib/External_Libraries/Archives/boost/tools/build/v2/test/conditionals3.py | schinmayee/nimbus | 170cd15e24a7a88243a6ea80aabadc0fc0e6e177 | [
"BSD-3-Clause"
] | 20 | 2017-07-03T19:09:09.000Z | 2021-09-10T02:53:56.000Z | applications/physbam/physbam-lib/External_Libraries/Archives/boost/tools/build/v2/test/conditionals3.py | schinmayee/nimbus | 170cd15e24a7a88243a6ea80aabadc0fc0e6e177 | [
"BSD-3-Clause"
] | null | null | null | applications/physbam/physbam-lib/External_Libraries/Archives/boost/tools/build/v2/test/conditionals3.py | schinmayee/nimbus | 170cd15e24a7a88243a6ea80aabadc0fc0e6e177 | [
"BSD-3-Clause"
] | 9 | 2017-09-17T02:05:06.000Z | 2020-01-31T00:12:01.000Z | #!/usr/bin/python
# Copyright (C) Vladimir Prus 2003. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to its suitability for any purp... | 25.914286 | 80 | 0.710033 |
3f7b4af7ddda5e355be2d9d9c4c589c892f1a719 | 3,559 | py | Python | Battleships/Battleships.py | Dorthion/Python-Minigames | 91ba20d42ac7376ccaad60cd948a576800085623 | [
"MIT"
] | null | null | null | Battleships/Battleships.py | Dorthion/Python-Minigames | 91ba20d42ac7376ccaad60cd948a576800085623 | [
"MIT"
] | null | null | null | Battleships/Battleships.py | Dorthion/Python-Minigames | 91ba20d42ac7376ccaad60cd948a576800085623 | [
"MIT"
] | null | null | null | import pygame
import os.path
import sys
from configparser import ConfigParser
from Source import Config
from Source import UI_functions as UI #UI - User Interface
from Source import Set_Player_ai_game as spa #spa - set player ai
from Source import Play_Player_ai_game as ppa #ppa - pl... | 32.354545 | 94 | 0.588648 |
0cd6e7f7557a8945490ab383eee75a6fa7d4189a | 10,429 | py | Python | src/metrics/coref.py | klimzaporojets/e2e-knowledge-ie | 284ff2ba61b32659618735ba09ee06a8745af850 | [
"Apache-2.0"
] | 5 | 2021-07-07T11:50:31.000Z | 2021-09-17T00:54:19.000Z | src/metrics/coref.py | klimzaporojets/e2e-knowledge-ie | 284ff2ba61b32659618735ba09ee06a8745af850 | [
"Apache-2.0"
] | 2 | 2021-07-19T05:21:52.000Z | 2022-01-22T21:47:52.000Z | src/metrics/coref.py | klimzaporojets/e2e-knowledge-ie | 284ff2ba61b32659618735ba09ee06a8745af850 | [
"Apache-2.0"
] | null | null | null | from collections import Counter
import numpy as np
import torch
from scipy.optimize import linear_sum_assignment
## MOSTLY COPIED FROM ALLENNLP
def decode_m2i(scores, lengths):
output = []
for b, length in enumerate(lengths.tolist()):
m2i = list(range(length))
if length > 0:
# pr... | 38.062044 | 138 | 0.542046 |
413fdbb205e160f70281d3c8d86d36ceca46ebef | 607 | py | Python | portfolio/migrations/0013_auto_20210127_2330.py | HerbertRamirez/inmo_web | 3c48911d5e3ee7a75580534664874ba5e8281e55 | [
"MIT"
] | null | null | null | portfolio/migrations/0013_auto_20210127_2330.py | HerbertRamirez/inmo_web | 3c48911d5e3ee7a75580534664874ba5e8281e55 | [
"MIT"
] | null | null | null | portfolio/migrations/0013_auto_20210127_2330.py | HerbertRamirez/inmo_web | 3c48911d5e3ee7a75580534664874ba5e8281e55 | [
"MIT"
] | 3 | 2021-02-18T15:11:53.000Z | 2021-02-20T17:34:01.000Z | # Generated by Django 3.1.2 on 2021-01-27 23:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('portfolio', '0012_auto_20210127_0722'),
]
operations = [
migrations.AddField(
model_name='inmueble',
name='map',
... | 25.291667 | 116 | 0.589786 |
c8707fa7c89c821c560b9051a443a2114c1fadd4 | 3,701 | py | Python | mmocr/models/textrecog/recognizer/master.py | zezeze97/image2latex | c745667cd1af91dbff2385dcf2f2b80b9a40adb6 | [
"Apache-2.0"
] | 4 | 2022-01-03T06:52:30.000Z | 2022-01-17T02:30:25.000Z | mmocr/models/textrecog/recognizer/master.py | zezeze97/image2latex | c745667cd1af91dbff2385dcf2f2b80b9a40adb6 | [
"Apache-2.0"
] | null | null | null | mmocr/models/textrecog/recognizer/master.py | zezeze97/image2latex | c745667cd1af91dbff2385dcf2f2b80b9a40adb6 | [
"Apache-2.0"
] | 1 | 2021-12-31T04:47:16.000Z | 2021-12-31T04:47:16.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from mmdet.models.builder import DETECTORS, build_backbone, build_loss
from mmocr.models.builder import (build_convertor, build_decoder,
build_encoder, build_preprocessor)
from .encode_decode_recognizer import EncodeD... | 34.268519 | 77 | 0.53418 |
798183f12a474df1ce498c36f44c15502b5a08db | 897 | py | Python | src/account/azext_account/generated/_validators.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/account/azext_account/generated/_validators.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/account/azext_account/generated/_validators.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 52.764706 | 114 | 0.561873 |
d95a2574f9bf85e461d88c9671a6d190ca2601b8 | 861 | py | Python | measurement.py | thomasjsn/python-sios | b1a1415b5a3f9e0594d0ab54b6795100ade1a414 | [
"MIT"
] | null | null | null | measurement.py | thomasjsn/python-sios | b1a1415b5a3f9e0594d0ab54b6795100ade1a414 | [
"MIT"
] | null | null | null | measurement.py | thomasjsn/python-sios | b1a1415b5a3f9e0594d0ab54b6795100ade1a414 | [
"MIT"
] | null | null | null | import statistics
class Measurement:
def __init__(self, decimals=2, length=300):
self.__decimals = decimals
self.__values = list()
self.__length = length
@property
def length(self):
return len(self.__values)
@property
def mean(self):
return round(statistic... | 25.323529 | 104 | 0.630662 |
8d5e879176159cfcc1b9c18b26323a06b629a681 | 230 | py | Python | Core/Block_0/R0150_Factory.py | BernardoB95/Extrator_SPEDFiscal | 10b4697833c561d24654251da5f22d044f03fc16 | [
"MIT"
] | 1 | 2021-04-25T13:53:20.000Z | 2021-04-25T13:53:20.000Z | Core/Block_0/R0150_Factory.py | BernardoB95/Extrator_SPEDFiscal | 10b4697833c561d24654251da5f22d044f03fc16 | [
"MIT"
] | null | null | null | Core/Block_0/R0150_Factory.py | BernardoB95/Extrator_SPEDFiscal | 10b4697833c561d24654251da5f22d044f03fc16 | [
"MIT"
] | null | null | null | from Core.IFactory import IFactory
from Regs.Block_0 import R0150
class R0150Factory(IFactory):
def create_block_object(self, line):
self.r0150 = _r0150 = R0150()
_r0150.reg_list = line
return _r0150 | 23 | 40 | 0.7 |
4168c5aeda2b43cf3bbbaa7a5e7348af1ba41d50 | 19,347 | py | Python | SmartObjectFramework/ObjectService/rdflib/plugins/sleepycat.py | OSIOT/OBSOLETE-IoT-Toolkit | f6cfb116a9f115d5ce288d990b57e0f6855283cc | [
"Apache-2.0"
] | 1 | 2019-06-12T19:37:58.000Z | 2019-06-12T19:37:58.000Z | SmartObjectFramework/ObjectService/rdflib/plugins/sleepycat.py | OSIOT/OBSOLETE-IoT-Toolkit | f6cfb116a9f115d5ce288d990b57e0f6855283cc | [
"Apache-2.0"
] | null | null | null | SmartObjectFramework/ObjectService/rdflib/plugins/sleepycat.py | OSIOT/OBSOLETE-IoT-Toolkit | f6cfb116a9f115d5ce288d990b57e0f6855283cc | [
"Apache-2.0"
] | null | null | null | from rdflib.store import Store, VALID_STORE, CORRUPTED_STORE, NO_STORE, UNKNOWN
from rdflib.term import URIRef
from rdflib.py3compat import b
def bb(u): return u.encode('utf-8')
try:
from bsddb import db
has_bsddb = True
except ImportError:
try:
from bsddb3 import db
has_bsddb = True
ex... | 36.366541 | 156 | 0.529746 |
47863e6326596d946086e2f6ecb631a09d35c1f5 | 1,660 | py | Python | cnn/main.py | arielrodrigues/nlp-relations-extraction-ptbr | 421db8ea0443f1a4248b62aea17adb0fea69d1f3 | [
"MIT"
] | null | null | null | cnn/main.py | arielrodrigues/nlp-relations-extraction-ptbr | 421db8ea0443f1a4248b62aea17adb0fea69d1f3 | [
"MIT"
] | null | null | null | cnn/main.py | arielrodrigues/nlp-relations-extraction-ptbr | 421db8ea0443f1a4248b62aea17adb0fea69d1f3 | [
"MIT"
] | 1 | 2021-02-09T16:27:10.000Z | 2021-02-09T16:27:10.000Z | # -*- coding: utf-8 -*-
__author__ = "Ariel Rodrigues"
__version__ = "0.1.0"
__license__ = ""
"""
Module Docstring
params: {
join_data: string,
embeddings: string
}
"""
import luigi
import logging
import datetime
import utils
log = logging.getLogger(__name__)
class CNN(luigi.Task):
params = luigi.Dic... | 25.151515 | 123 | 0.620482 |
6c45fb71fe5f6d6211f5ae985a5e9d6210284cd4 | 450 | py | Python | 121-Best-Time-to-Buy-and-Sell -Stock.py | pyxuweitao/Python-LeetCode | 16b23e340d38658107b6f4a6ab93119cda690d2a | [
"Apache-2.0"
] | null | null | null | 121-Best-Time-to-Buy-and-Sell -Stock.py | pyxuweitao/Python-LeetCode | 16b23e340d38658107b6f4a6ab93119cda690d2a | [
"Apache-2.0"
] | null | null | null | 121-Best-Time-to-Buy-and-Sell -Stock.py | pyxuweitao/Python-LeetCode | 16b23e340d38658107b6f4a6ab93119cda690d2a | [
"Apache-2.0"
] | null | null | null | __author__ = 'xuweitao'
#runtime = 64ms
class Solution:
# @param {integer[]} prices
# @return {integer}
def maxProfit(self, prices):
profit = 0
if len( prices ) != 0:
min_price = prices[0]
for iPrice in prices:
if iPrice < min_price:
... | 30 | 86 | 0.544444 |
1033cf3de60eb009d82175229ac3f753a6f973df | 4,385 | py | Python | phr/settings.py | Ezenwankwo/health_stack | 7e760397a00d045713e286c75dca4038bc6b0145 | [
"Apache-2.0"
] | null | null | null | phr/settings.py | Ezenwankwo/health_stack | 7e760397a00d045713e286c75dca4038bc6b0145 | [
"Apache-2.0"
] | null | null | null | phr/settings.py | Ezenwankwo/health_stack | 7e760397a00d045713e286c75dca4038bc6b0145 | [
"Apache-2.0"
] | null | null | null | """
Django settings for phr project.
Generated by 'django-admin startproject' using Django 2.1.2.
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
from ... | 26.737805 | 98 | 0.713341 |
efec3bf59e9196127f85d1fdacfb7ba27f6724ce | 6,686 | py | Python | calabiyau/views/accounting.py | TachyonicProject/calabiyau | 415a8ada4a93ee84c4776e89c9442af328dcfdd6 | [
"BSD-3-Clause"
] | null | null | null | calabiyau/views/accounting.py | TachyonicProject/calabiyau | 415a8ada4a93ee84c4776e89c9442af328dcfdd6 | [
"BSD-3-Clause"
] | 8 | 2019-06-06T11:01:48.000Z | 2019-06-06T12:18:03.000Z | calabiyau/views/accounting.py | TachyonicProject/calabiyau | 415a8ada4a93ee84c4776e89c9442af328dcfdd6 | [
"BSD-3-Clause"
] | 3 | 2019-03-28T07:36:22.000Z | 2019-12-27T12:10:14.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019-2020 Christiaan Frans Rademan <chris@fwiw.co.za>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the ... | 39.797619 | 79 | 0.560873 |
6f145cbf68dae0d4813f36b236a1f94f58541e7b | 1,618 | py | Python | setup.py | tjnh05/ner_build | b07ee1cd78c82804f386fd935c983f202020669a | [
"MIT"
] | null | null | null | setup.py | tjnh05/ner_build | b07ee1cd78c82804f386fd935c983f202020669a | [
"MIT"
] | null | null | null | setup.py | tjnh05/ner_build | b07ee1cd78c82804f386fd935c983f202020669a | [
"MIT"
] | null | null | null | # coding: utf-8
import setuptools, os
import sys
packagename= "pyner"
version = ""
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, packagename, "ner.py")) as f:
for line in f.readlines():
if "__version__" in line:
version = line.strip().replace('"', '').split()[-... | 28.385965 | 101 | 0.639061 |
d5ae876c98257b3bb1a74581ac8aa627f2c257bc | 1,152 | py | Python | kubernetes/test/test_v1_azure_disk_volume_source.py | amanagarwal33/python | e31693557f75950805fb4dc5af4cb7434a470e26 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_azure_disk_volume_source.py | amanagarwal33/python | e31693557f75950805fb4dc5af4cb7434a470e26 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_azure_disk_volume_source.py | amanagarwal33/python | e31693557f75950805fb4dc5af4cb7434a470e26 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
<<<<<<< HEAD
OpenAPI spec version: v1.15.6
Generated by: https://openapi-generator.tech
=======
OpenAPI spec version: v1.5.3
Generated b... | 25.043478 | 124 | 0.717014 |
9201bd1f017c6fc48787c8a3155692f107ea9adc | 151 | py | Python | multiple_futures_prediction/__init__.py | LaudateCorpus1/ml-multiple-futures-prediction | 6b24c8e10c0f974af2df59fdfc68ba83a0ad21e1 | [
"AML"
] | 82 | 2019-10-30T13:53:55.000Z | 2022-03-28T19:40:01.000Z | multiple_futures_prediction/__init__.py | LaudateCorpus1/ml-multiple-futures-prediction | 6b24c8e10c0f974af2df59fdfc68ba83a0ad21e1 | [
"AML"
] | 6 | 2019-11-11T12:58:10.000Z | 2021-05-04T04:11:15.000Z | multiple_futures_prediction/__init__.py | LaudateCorpus1/ml-multiple-futures-prediction | 6b24c8e10c0f974af2df59fdfc68ba83a0ad21e1 | [
"AML"
] | 21 | 2019-11-04T20:20:41.000Z | 2022-03-26T11:39:27.000Z | #
# Copyright (C) 2020 Apple Inc. All rights reserved.
#
"""Demo code for Multiple Futures Prediction Paper (NeurIPS 2019)."""
__version__ = "0.1.0"
| 18.875 | 69 | 0.695364 |
bbbe2fe62d3e15546180fd97804d5434273c3f11 | 17,247 | py | Python | sandbox/elearning/test_markup_conversion.py | cirosantilli/python-utils | 3854d2c7973c6382f76e311423c219bccacb8c1d | [
"MIT"
] | 1 | 2018-10-04T15:29:04.000Z | 2018-10-04T15:29:04.000Z | sandbox/elearning/test_markup_conversion.py | cirosantilli/python-utils | 3854d2c7973c6382f76e311423c219bccacb8c1d | [
"MIT"
] | null | null | null | sandbox/elearning/test_markup_conversion.py | cirosantilli/python-utils | 3854d2c7973c6382f76e311423c219bccacb8c1d | [
"MIT"
] | null | null | null | import os.path
import re
from xml.parsers import expat
import codecs, sys
'''
Transforms my innter markup into markup for my wordpress site.
Main tasks are:
- expand as much Javascript as possible to improve speed, and portability to non js users and google reader like sites. Things that can be handled with CSS wil... | 38.241685 | 193 | 0.606308 |
08024c0086cf63cb9c0d5c75b00d1a131b03dd05 | 2,562 | py | Python | venv/lib/python3.9/site-packages/google/cloud/redis/__init__.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 1 | 2022-01-17T21:06:44.000Z | 2022-01-17T21:06:44.000Z | venv/lib/python3.9/site-packages/google/cloud/redis/__init__.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.9/site-packages/google/cloud/redis/__init__.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 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... | 40.666667 | 78 | 0.807572 |
227238bd84ba653cf69f7ea115242d89709c92d8 | 79,872 | py | Python | tensorflow/python/keras/losses_test.py | AdaAlarm/tensorflow | e0db063159751276a92d88a4ad6d481b1199318c | [
"Apache-2.0"
] | 10 | 2021-05-25T17:43:04.000Z | 2022-03-08T10:46:09.000Z | tensorflow/python/keras/losses_test.py | AdaAlarm/tensorflow | e0db063159751276a92d88a4ad6d481b1199318c | [
"Apache-2.0"
] | 1,056 | 2019-12-15T01:20:31.000Z | 2022-02-10T02:06:28.000Z | tensorflow/python/keras/losses_test.py | AdaAlarm/tensorflow | e0db063159751276a92d88a4ad6d481b1199318c | [
"Apache-2.0"
] | 6 | 2016-09-07T04:00:15.000Z | 2022-01-12T01:47:38.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... | 42.621131 | 80 | 0.616762 |
2a8f73e1f7e0db8837109bb4a82d3ac71a3bbb95 | 26,103 | py | Python | backend/core/migrations/0001_initial.py | iamnkc/tournesol | 4a09985f494577917c357783a37dfae02c57fd82 | [
"CC0-1.0"
] | null | null | null | backend/core/migrations/0001_initial.py | iamnkc/tournesol | 4a09985f494577917c357783a37dfae02c57fd82 | [
"CC0-1.0"
] | null | null | null | backend/core/migrations/0001_initial.py | iamnkc/tournesol | 4a09985f494577917c357783a37dfae02c57fd82 | [
"CC0-1.0"
] | null | null | null | # Generated by Django 3.2.4 on 2021-06-06 13:49
import core.utils.models
import core.utils.validators
import django.contrib.auth.models
import django.contrib.auth.validators
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migr... | 208.824 | 7,796 | 0.639007 |
b00d5fad1d62f75ce9ed4e0615a5bf246a0b8396 | 23,432 | py | Python | girderformindlogger/models/item.py | ChildMindInstitute/mindlogger-app-backend | 0470d052c952d51816d06eaab8fcc64ed54d9565 | [
"Apache-2.0"
] | 3 | 2019-12-18T21:08:48.000Z | 2020-04-24T23:34:37.000Z | girderformindlogger/models/item.py | ChildMindInstitute/mindlogger-app-backend | 0470d052c952d51816d06eaab8fcc64ed54d9565 | [
"Apache-2.0"
] | 582 | 2018-05-15T22:29:21.000Z | 2020-05-29T15:21:21.000Z | girderformindlogger/models/item.py | ChildMindInstitute/mindlogger-app-backend | 0470d052c952d51816d06eaab8fcc64ed54d9565 | [
"Apache-2.0"
] | 20 | 2019-01-27T22:41:15.000Z | 2020-03-18T02:37:01.000Z | # -*- coding: utf-8 -*-
import copy
import datetime
import json
import os
import six
import cherrypy
from bson.objectid import ObjectId
from girderformindlogger import events
from girderformindlogger import logger
from girderformindlogger.constants import AccessType
from girderformindlogger.exceptions import Validatio... | 38.287582 | 98 | 0.563375 |
e6717ed27aee333075f6a656c202685e3d314e19 | 4,412 | py | Python | discord/file.py | jeromedontdev/discord.py | 42bab370a73440fa8af2380211ad92ccb6bf7f46 | [
"MIT"
] | 13 | 2020-12-16T06:13:11.000Z | 2021-04-15T12:01:38.000Z | discord/file.py | RootGC/discord.py | 8bc489dba8b8c7ca9141e4e7f00a0e916a7c0269 | [
"MIT"
] | 1 | 2021-05-23T16:08:10.000Z | 2021-05-23T16:08:10.000Z | discord/file.py | RootGC/discord.py | 8bc489dba8b8c7ca9141e4e7f00a0e916a7c0269 | [
"MIT"
] | 6 | 2020-12-16T00:01:24.000Z | 2021-02-05T12:32:54.000Z | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merg... | 34.46875 | 102 | 0.643246 |
0ddd30b9175786708bd8ed7ebcec8d552e95b7ca | 48 | py | Python | users/models/__init__.py | lynnetsy/ms_users | d51bec4bb6326752889bc9e1ea1f6fb5ecef3cbb | [
"MIT"
] | null | null | null | users/models/__init__.py | lynnetsy/ms_users | d51bec4bb6326752889bc9e1ea1f6fb5ecef3cbb | [
"MIT"
] | null | null | null | users/models/__init__.py | lynnetsy/ms_users | d51bec4bb6326752889bc9e1ea1f6fb5ecef3cbb | [
"MIT"
] | null | null | null | from .model import Model
from .user import User
| 16 | 24 | 0.791667 |
011701b4ee777eaae2a463ec098acb8aae9f2c32 | 729 | py | Python | setup.py | rethinkpriorities/survey_dud_detector | dd5cc769798b66405963e0b3469ce0b41c92e989 | [
"MIT"
] | 2 | 2020-10-17T03:54:28.000Z | 2021-01-05T19:53:13.000Z | setup.py | rethinkpriorities/survey_dud_detector | dd5cc769798b66405963e0b3469ce0b41c92e989 | [
"MIT"
] | null | null | null | setup.py | rethinkpriorities/survey_dud_detector | dd5cc769798b66405963e0b3469ce0b41c92e989 | [
"MIT"
] | null | null | null | import setuptools
with open('README.md', 'r') as fh:
long_description = fh.read()
setuptools.setup(
name='survey_dud_detector',
version='0.2',
author='Peter Hurford',
author_email='peter@peterhurford.com',
description='Automatically detect bad responses in survey responses',
long_d... | 31.695652 | 74 | 0.66941 |
a810db968fd68b49d8e0a8cae492fdfe8c8dab0c | 2,776 | py | Python | hoomd/mpcd/test-py/init_make_random_test.py | moosee333/hoomd | bdbf221b62cb5166b03c0a10db58bebcb952f755 | [
"BSD-3-Clause"
] | null | null | null | hoomd/mpcd/test-py/init_make_random_test.py | moosee333/hoomd | bdbf221b62cb5166b03c0a10db58bebcb952f755 | [
"BSD-3-Clause"
] | null | null | null | hoomd/mpcd/test-py/init_make_random_test.py | moosee333/hoomd | bdbf221b62cb5166b03c0a10db58bebcb952f755 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2009-2018 The Regents of the University of Michigan
# This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.
# Maintainer: mphoward
import unittest
import numpy as np
import hoomd
from hoomd import mpcd
# unit tests for snapshots with mpcd particle data
class mpcd_init_... | 37.513514 | 93 | 0.604107 |
af6953714ec76c5e3a8fb7b14f88db75d4e7294e | 590 | gyp | Python | binding.gyp | creativeschool/simplencrypt | 8757353ee3d9ef81722f1cd8bfc9567c4c4d9134 | [
"MIT"
] | null | null | null | binding.gyp | creativeschool/simplencrypt | 8757353ee3d9ef81722f1cd8bfc9567c4c4d9134 | [
"MIT"
] | null | null | null | binding.gyp | creativeschool/simplencrypt | 8757353ee3d9ef81722f1cd8bfc9567c4c4d9134 | [
"MIT"
] | null | null | null | {
"targets": [
{
"target_name": "main",
"sources": [
"addon/main.cpp"
],
"include_dirs" : [
"<!@(node -p \"require('node-addon-api').include\")"
],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
'conditions': [
['OS=="win"', {
'defines': [... | 21.071429 | 60 | 0.352542 |
abe19d0ecfcbb041500206734bd51c18dddcd03d | 710 | py | Python | setup.py | enezhadian/visualization | b70358fb295bf833484c0a25b7c6cb1c4e156ae6 | [
"MIT"
] | 3 | 2017-05-06T12:40:43.000Z | 2019-10-29T09:45:27.000Z | setup.py | enezhadian/visualization | b70358fb295bf833484c0a25b7c6cb1c4e156ae6 | [
"MIT"
] | null | null | null | setup.py | enezhadian/visualization | b70358fb295bf833484c0a25b7c6cb1c4e156ae6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from os import path
with open(path.join(path.abspath(path.dirname(__file__)), 'README.rst'), 'r') as readme:
long_description = readme.read()
setup(
name='visualization',
description='Deep Convolutional Neural Network Visaulization',
... | 21.515152 | 88 | 0.616901 |
e6f807f02f0eca30f29d8a4cc5fc3c2337b23859 | 2,460 | py | Python | ML_tests/LinearRegression_tests/LinearRegression_normal.py | xuyannus/Machine-Learning-Collection | 6d5dcd18d4e40f90e77355d56a2902e4c617ecbe | [
"MIT"
] | 3,094 | 2020-09-20T04:34:31.000Z | 2022-03-31T23:59:46.000Z | ML_tests/LinearRegression_tests/LinearRegression_normal.py | xkhainguyen/Machine-Learning-Collection | 425d196e9477dbdbbd7cc0d19d29297571746ab5 | [
"MIT"
] | 79 | 2020-09-24T08:54:17.000Z | 2022-03-30T14:45:08.000Z | ML_tests/LinearRegression_tests/LinearRegression_normal.py | xkhainguyen/Machine-Learning-Collection | 425d196e9477dbdbbd7cc0d19d29297571746ab5 | [
"MIT"
] | 1,529 | 2020-09-20T16:21:21.000Z | 2022-03-31T21:16:25.000Z | # Import folder where sorting algorithms
import sys
import unittest
import numpy as np
# For importing from different folders
# OBS: This is supposed to be done with automated testing,
# hence relative to folder we want to import from
sys.path.append("ML/algorithms/linearregression")
# If run from local:
# sys.path.a... | 34.166667 | 79 | 0.642276 |
99f3e14ec256ecb5f74576d2e053c7772a3d0902 | 3,954 | py | Python | src/cube2common/ivec.py | DanSeraf/spyd | af893b7f9c67785613b25754eb2cf150523a9fe4 | [
"Zlib"
] | 1 | 2020-03-23T20:28:06.000Z | 2020-03-23T20:28:06.000Z | src/cube2common/ivec.py | DanSeraf/spyd | af893b7f9c67785613b25754eb2cf150523a9fe4 | [
"Zlib"
] | 1 | 2022-02-05T16:59:53.000Z | 2022-02-08T17:30:55.000Z | src/cube2common/ivec.py | DanSeraf/spyd | af893b7f9c67785613b25754eb2cf150523a9fe4 | [
"Zlib"
] | null | null | null | from cube2common.vec import vec
R = [1, 2, 0]
C = [2, 0, 1]
D = [0, 1, 2]
class ivec(object):
def __init__(self, *args):
self.v = [0]*3
if len(args) == 1 and isinstance(args[0], vec):
v = args[0]
self.x = v.x
self.y = v.y
self.z... | 22.465909 | 80 | 0.40693 |
f7a94bf19dba5353e7a8694992bd2c36adda36c8 | 29,184 | py | Python | Code-SPA/RNN_feedback.py | 1212Prajwol-Pdl/SmartProcessAnalytics | b25b6e922e19cc61cfb9eb96395ad177af1daf71 | [
"MIT"
] | 2 | 2020-11-18T02:50:06.000Z | 2021-02-02T16:18:32.000Z | Code-SPA/RNN_feedback.py | 1212Prajwol-Pdl/SmartProcessAnalytics | b25b6e922e19cc61cfb9eb96395ad177af1daf71 | [
"MIT"
] | 1 | 2021-09-09T15:52:53.000Z | 2022-02-03T05:43:15.000Z | Code-SPA/RNN_feedback.py | 1212Prajwol-Pdl/SmartProcessAnalytics | b25b6e922e19cc61cfb9eb96395ad177af1daf71 | [
"MIT"
] | 3 | 2021-02-02T16:18:34.000Z | 2021-09-08T06:27:37.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 23 17:52:31 2019
@author: Weike (Vicky) Sun vickysun@mit.edu/weike.sun93@gmail.com
(c) 2020 Weike Sun, all rights reserved
"""
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 4 09:15:46 2018
@author: weiksun
@comment: this file conta... | 42.112554 | 276 | 0.578673 |
ef06c27200d8ad77d8f5058ee7f30f14751def04 | 1,799 | py | Python | Preprocess/EdgeHistogramComputer.py | pection-zz/Lenquality-MachineLearning | 61e10a7dcff07ad4e63ec9e88dd6f164cadf22ff | [
"MIT"
] | 1 | 2022-02-22T06:20:39.000Z | 2022-02-22T06:20:39.000Z | Preprocess/EdgeHistogramComputer.py | pection/Lenquality-MachineLearning | 61e10a7dcff07ad4e63ec9e88dd6f164cadf22ff | [
"MIT"
] | null | null | null | Preprocess/EdgeHistogramComputer.py | pection/Lenquality-MachineLearning | 61e10a7dcff07ad4e63ec9e88dd6f164cadf22ff | [
"MIT"
] | 1 | 2020-11-24T18:18:44.000Z | 2020-11-24T18:18:44.000Z | import cv2
import numpy as np
import math
from DescriptorComputer import DescriptorComputer
class EdgeHistogramComputer(DescriptorComputer):
def __init__(self, rows, cols):
sqrt2 = math.sqrt(2)
self.kernels = (np.matrix([[1,1],[-1,-1]]), \
np.matrix([[1,-1],[1,-1]]), \
np.matrix([[sqrt2,0],[0,-sq... | 34.596154 | 121 | 0.674263 |
c3e2697d194a8de83c3d6a6a296af4a526cf2470 | 10,315 | py | Python | lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py | danliew-apple/llvm-project | 323163820208428b74f272421e4a8e1ab0a158fb | [
"Apache-2.0"
] | 34 | 2020-01-31T17:50:00.000Z | 2022-02-16T20:19:29.000Z | lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py | danliew-apple/llvm-project | 323163820208428b74f272421e4a8e1ab0a158fb | [
"Apache-2.0"
] | 14 | 2020-02-03T23:39:51.000Z | 2021-07-20T16:24:25.000Z | lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py | danliew-apple/llvm-project | 323163820208428b74f272421e4a8e1ab0a158fb | [
"Apache-2.0"
] | 5 | 2020-07-22T16:56:37.000Z | 2022-01-08T02:50:20.000Z | """
Test lldb-vscode setBreakpoints request
"""
import unittest2
import vscode
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import lldbvscode_testcase
import os
class TestVSCode_setBreakpoints(lldbvscode_testcase.VSCodeTestCaseBase):
mydir = ... | 50.072816 | 78 | 0.613088 |
46f71c943050902ec31441de0602aa6bdfc7b6ce | 84 | py | Python | src/visualization/recall.py | FilipCvetko/clinical_notes | 5fa0d26898e0083fcf424cdd61d2190b32a495be | [
"MIT"
] | 2 | 2021-11-17T16:51:47.000Z | 2021-12-16T23:00:26.000Z | src/visualization/recall.py | FilipCvetko/clinical_notes | 5fa0d26898e0083fcf424cdd61d2190b32a495be | [
"MIT"
] | null | null | null | src/visualization/recall.py | FilipCvetko/clinical_notes | 5fa0d26898e0083fcf424cdd61d2190b32a495be | [
"MIT"
] | null | null | null | import streamlit as st
def recall_app():
st.title("Patient notes collection")
| 14 | 40 | 0.72619 |
ad348ac0813f1f923264e97fd9c131d69d421ea5 | 3,686 | py | Python | mapss/static/packages/arches/arches/management/commands/plugin.py | MPI-MAPSS/MAPSS | 3a5c0109758801717aaa8de1125ca5e98f83d3b4 | [
"CC0-1.0"
] | null | null | null | mapss/static/packages/arches/arches/management/commands/plugin.py | MPI-MAPSS/MAPSS | 3a5c0109758801717aaa8de1125ca5e98f83d3b4 | [
"CC0-1.0"
] | null | null | null | mapss/static/packages/arches/arches/management/commands/plugin.py | MPI-MAPSS/MAPSS | 3a5c0109758801717aaa8de1125ca5e98f83d3b4 | [
"CC0-1.0"
] | null | null | null | """
ARCHES - a program developed to inventory and manage immovable cultural heritage.
Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Founda... | 29.488 | 129 | 0.613945 |
160513f13cec26a8b8bb6a1c63191521bf4b0c47 | 2,108 | py | Python | application/models/topic.py | Rsl1122/Forum-Aurum | d9f2d6687b4411a3d9cba4c1a01923f6d4ba0c69 | [
"MIT"
] | null | null | null | application/models/topic.py | Rsl1122/Forum-Aurum | d9f2d6687b4411a3d9cba4c1a01923f6d4ba0c69 | [
"MIT"
] | 2 | 2018-04-22T20:08:25.000Z | 2018-08-11T20:57:47.000Z | application/models/topic.py | Rsl1122/Forum-Aurum | d9f2d6687b4411a3d9cba4c1a01923f6d4ba0c69 | [
"MIT"
] | null | null | null | import os
from sqlalchemy import text
from application import db
class Topic(db.Model):
__tablename__ = "topic"
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(100))
created = db.Column(db.DateTime, default=db.func.current_timestamp())
account_id = db.Column(db.Integer,... | 31.939394 | 83 | 0.552657 |
1ad7fb616b93780254e6d693ae294b2b656039e6 | 3,117 | py | Python | src/_cffi_src/openssl/cryptography.py | hboshnak/cryptography | 137074fcc419d62db82d23955bd4d0429eafb211 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2019-09-20T18:51:44.000Z | 2019-09-20T18:51:44.000Z | src/_cffi_src/openssl/cryptography.py | hboshnak/cryptography | 137074fcc419d62db82d23955bd4d0429eafb211 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 11 | 2022-03-04T14:14:10.000Z | 2022-03-31T01:50:05.000Z | src/_cffi_src/openssl/cryptography.py | simo5/cryptography | 617c66e2b9dcc311c2e5221b50a45ec99f5d0c67 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2022-03-31T04:00:31.000Z | 2022-03-31T04:00:31.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
INCLUDES = """
/* define our OpenSSL API compatibility level to 1.0.1. Any symbols older than
that will raise an error during compilati... | 30.861386 | 79 | 0.812961 |
f12a7cb2ba41c8536aa061c3c4c4e63526343133 | 3,900 | py | Python | lib/surface/logging/read.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/surface/logging/read.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | null | null | null | lib/surface/logging/read.py | bopopescu/Google-Cloud-SDK-1 | c4683bacb2f6192d8a816932e438a0493085469b | [
"Apache-2.0"
] | 1 | 2020-07-24T20:13:29.000Z | 2020-07-24T20:13:29.000Z | # Copyright 2015 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 applicable law or ag... | 36.448598 | 95 | 0.66359 |
f69a792a0ba28cc5f663cabc37474b1c513ca384 | 7,627 | py | Python | eternabench/chemmapping_utils.py | eternagame/EternaBench | 1df177603ce326c1f68931a027b449f44f38c203 | [
"MIT"
] | null | null | null | eternabench/chemmapping_utils.py | eternagame/EternaBench | 1df177603ce326c1f68931a027b449f44f38c203 | [
"MIT"
] | null | null | null | eternabench/chemmapping_utils.py | eternagame/EternaBench | 1df177603ce326c1f68931a027b449f44f38c203 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import sys
sys.path.append('/Users/hwayment/das/github/')
from RDATKit import rdatkit
import subprocess as sp
from arnie.bpps import bpps
from glob import glob
import sys, os
from copy import deepcopy
def write_rdat_as_dataframe(rdat_file, verbose=True):
df = pd.DataFrame()... | 40.569149 | 146 | 0.604301 |
a3450751687fe343775d500b98cda79c690ede2c | 5,378 | py | Python | squid/squid.py | mrkksparrow/plugins | 04362fd13ca1d6917f39be2809414c99fbe7c642 | [
"BSD-2-Clause"
] | 36 | 2016-03-30T10:59:37.000Z | 2022-02-28T21:46:42.000Z | squid/squid.py | mrkksparrow/plugins | 04362fd13ca1d6917f39be2809414c99fbe7c642 | [
"BSD-2-Clause"
] | 21 | 2016-10-07T06:20:56.000Z | 2022-03-10T12:09:34.000Z | squid/squid.py | mrkksparrow/plugins | 04362fd13ca1d6917f39be2809414c99fbe7c642 | [
"BSD-2-Clause"
] | 65 | 2016-03-16T09:11:48.000Z | 2022-03-09T13:10:08.000Z | #!/usr/bin/python
import json
import sys
import argparse
import os.path
import time
import urllib.request as urlconnection
# if any impacting changes to this plugin kindly increment the plugin version here.
PLUGIN_VERSION = 1
# Setting this to true will alert you when there is a communication problem while posting... | 31.635294 | 177 | 0.632577 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.