hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7637b4dcb2b70fabf1d2ab9937260c32be85afd8 | 3,315 | py | Python | Wrappers/Python/cil/framework/BlockGeometry.py | paskino/CIL | 1803cbd445c408588fecbf705fb8b4df486029fc | [
"Apache-2.0"
] | null | null | null | Wrappers/Python/cil/framework/BlockGeometry.py | paskino/CIL | 1803cbd445c408588fecbf705fb8b4df486029fc | [
"Apache-2.0"
] | null | null | null | Wrappers/Python/cil/framework/BlockGeometry.py | paskino/CIL | 1803cbd445c408588fecbf705fb8b4df486029fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
# Copyright 2017 UKRI-STFC
# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may... | 33.826531 | 95 | 0.539367 |
64f9c53d82a7c418d6952c79afd3930445d54f13 | 168 | py | Python | orochi/__init__.py | garanews/orochi | ec037ad5836855cd1a734fa1bf40ecc5647cb824 | [
"MIT"
] | 121 | 2020-09-25T16:14:44.000Z | 2022-03-09T21:21:36.000Z | orochi/__init__.py | garanews/orochi | ec037ad5836855cd1a734fa1bf40ecc5647cb824 | [
"MIT"
] | 382 | 2020-09-28T06:46:21.000Z | 2022-03-31T11:02:19.000Z | orochi/__init__.py | garanews/orochi | ec037ad5836855cd1a734fa1bf40ecc5647cb824 | [
"MIT"
] | 10 | 2020-09-29T16:36:30.000Z | 2022-01-18T14:02:09.000Z | __version__ = "1.2.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| 21 | 62 | 0.547619 |
a58dba5f71bbfa5fc8b7763e0437c45886c3552d | 3,408 | py | Python | utils/Halftone/halftone.py | Nikronic/U-net | 3c560ac66e0d1844e7a29326920930d7bea69a63 | [
"MIT"
] | 29 | 2018-11-17T23:00:05.000Z | 2022-03-30T11:56:40.000Z | utils/Halftone/halftone.py | Nikronic/U-net | 3c560ac66e0d1844e7a29326920930d7bea69a63 | [
"MIT"
] | 13 | 2018-11-22T12:45:35.000Z | 2019-09-13T13:26:36.000Z | utils/Halftone/halftone.py | Nikronic/U-net | 3c560ac66e0d1844e7a29326920930d7bea69a63 | [
"MIT"
] | 3 | 2019-04-29T10:45:47.000Z | 2020-12-08T02:56:20.000Z | # %% libraries
import PIL.Image as Image
import numpy.matlib
import numpy as np
import random
import math
# %% functions
dithMat =[
# # 8x8 sprial
[[62, 58, 45, 41, 37, 49, 53, 61],
[54, 34, 25, 21, 17, 29, 33, 57],
[ 50, 30, 13, 9, 5, 12, 24, 44],
[ 38, 18, 6, 1, 0, 8, 20, 40],
[42, ... | 31.850467 | 108 | 0.539613 |
42bb181df153a2b949b08ead45a58aeaa89bcaca | 35 | py | Python | pycalc/constants.py | TimothyDJones/pyqt5-calc | 61813f76d0235301eb21b0b53a7a6910a2b78f1f | [
"MIT"
] | 2 | 2021-04-25T13:32:58.000Z | 2021-12-22T17:25:11.000Z | pycalc/constants.py | TimothyDJones/pyqt5-calc | 61813f76d0235301eb21b0b53a7a6910a2b78f1f | [
"MIT"
] | null | null | null | pycalc/constants.py | TimothyDJones/pyqt5-calc | 61813f76d0235301eb21b0b53a7a6910a2b78f1f | [
"MIT"
] | null | null | null | # constants.py
ERROR_MSG = "ERROR" | 11.666667 | 19 | 0.714286 |
e49ff91b87a3b6a172073b4d2868b8907d2b62bc | 684 | py | Python | test_package/conanfile.py | ralfschulze/conan-liblxi | 8fcb2f686ae850c047571952dcc9f1214c1afd69 | [
"MIT"
] | null | null | null | test_package/conanfile.py | ralfschulze/conan-liblxi | 8fcb2f686ae850c047571952dcc9f1214c1afd69 | [
"MIT"
] | null | null | null | test_package/conanfile.py | ralfschulze/conan-liblxi | 8fcb2f686ae850c047571952dcc9f1214c1afd69 | [
"MIT"
] | null | null | null | import os
from conans import ConanFile, CMake, tools
class LibLxiTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
def build(self):
cmake = CMake(self)
# Current dir is "test_package/build/<build_id>" and CMakeLists.txt is
# in "test_pac... | 26.307692 | 78 | 0.571637 |
41e3dede130b535cc9fdecb20039a4e2832ab6a3 | 1,634 | py | Python | test/store/mem_server_store_test.py | bowlofstew/bii-server | 9abc558b1ba9722088e22a4937a224cfcc3c5f22 | [
"MIT"
] | 27 | 2015-04-15T09:40:26.000Z | 2020-04-29T06:24:06.000Z | test/store/mem_server_store_test.py | bowlofstew/bii-server | 9abc558b1ba9722088e22a4937a224cfcc3c5f22 | [
"MIT"
] | 2 | 2015-06-03T20:19:51.000Z | 2015-06-30T20:40:14.000Z | test/store/mem_server_store_test.py | bowlofstew/bii-server | 9abc558b1ba9722088e22a4937a224cfcc3c5f22 | [
"MIT"
] | 10 | 2015-08-06T08:17:28.000Z | 2020-09-29T17:02:57.000Z | from biicode.server.model.block import Block
from biicode.common.model.id import ID
from biicode.common.publish.publish_request import PublishRequest
from biicode.common.model.cells import SimpleCell
from biicode.common.model.content import Content
from biicode.common.model.blob import Blob
import datetime
from biicode... | 44.162162 | 82 | 0.746022 |
86ea28d319e18609cecbfdf60e793696d008bfb4 | 8,925 | py | Python | contrib/linearize/linearize-data.py | pmo24/flash | 1c8acedc0ac3ce28321e98a6a54eb3b15d32052e | [
"MIT"
] | null | null | null | contrib/linearize/linearize-data.py | pmo24/flash | 1c8acedc0ac3ce28321e98a6a54eb3b15d32052e | [
"MIT"
] | null | null | null | contrib/linearize/linearize-data.py | pmo24/flash | 1c8acedc0ac3ce28321e98a6a54eb3b15d32052e | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# linearize-data.py: Construct a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import print_func... | 29.166667 | 108 | 0.6893 |
0bd6d3a4747d8826e9f4b66c8e7abe05a1830a60 | 155,009 | py | Python | erpUI.py | abhiraj-ranjan/Clouster | d5a2b9a1184c5ff86ce8a34c9b334597f3ee2ebc | [
"CC-BY-4.0"
] | null | null | null | erpUI.py | abhiraj-ranjan/Clouster | d5a2b9a1184c5ff86ce8a34c9b334597f3ee2ebc | [
"CC-BY-4.0"
] | null | null | null | erpUI.py | abhiraj-ranjan/Clouster | d5a2b9a1184c5ff86ce8a34c9b334597f3ee2ebc | [
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'D:\all\python projects\python os\ui\Simple_PySide_Base-org\e\erpUI.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file un... | 82.892513 | 282 | 0.680141 |
cf0dd6cbbaca6b19028e127983a8afb5345ba650 | 8,865 | py | Python | tensorflow/mnist.py | ColumbiaDVMM/Heated_Up_Softmax_Embedding | cb62d28e5faaf7fdb134b31c461125e3fef50d06 | [
"BSD-2-Clause"
] | 44 | 2018-09-13T01:26:47.000Z | 2022-01-23T17:15:50.000Z | tensorflow/mnist.py | mangye16/Heated_Up_Softmax_Embedding | cb62d28e5faaf7fdb134b31c461125e3fef50d06 | [
"BSD-2-Clause"
] | null | null | null | tensorflow/mnist.py | mangye16/Heated_Up_Softmax_Embedding | cb62d28e5faaf7fdb134b31c461125e3fef50d06 | [
"BSD-2-Clause"
] | 13 | 2018-09-13T02:36:03.000Z | 2021-01-12T10:55:29.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... | 33.327068 | 80 | 0.659109 |
6badeac5cc6a6f18405aaf63478d4baf9fa0166d | 672 | py | Python | backend/estruturas_de_dados/fila.py | cristianomg/RecomendacaoFilmesComGrafos | eaa78ccd07e7df122016951c53f6e1474b281231 | [
"MIT"
] | null | null | null | backend/estruturas_de_dados/fila.py | cristianomg/RecomendacaoFilmesComGrafos | eaa78ccd07e7df122016951c53f6e1474b281231 | [
"MIT"
] | 3 | 2021-03-31T20:24:36.000Z | 2021-12-13T20:26:37.000Z | backend/estruturas_de_dados/fila.py | cristianomg/RecomendacaoFilmesComGrafos | eaa78ccd07e7df122016951c53f6e1474b281231 | [
"MIT"
] | null | null | null | from estruturas_de_dados import lista_ligada
class Fila:
def __init__(self):
self.__elementos = lista_ligada.ListaLigada()
@property
def tamanho(self):
return self.__elementos.tamanho
@property
def inicio(self):
return self.__elementos.recuperar_elemento_no(0)
def enfilerar(self, elemento):
self.__e... | 20.363636 | 55 | 0.763393 |
463a2003d35379dae8c79101b24b2dc3db306ca5 | 58 | py | Python | hello.py | aschrad2/electron-app-python | 47b7ae9977a5dc9264675dc4a31ae9d469c45802 | [
"CC0-1.0"
] | null | null | null | hello.py | aschrad2/electron-app-python | 47b7ae9977a5dc9264675dc4a31ae9d469c45802 | [
"CC0-1.0"
] | null | null | null | hello.py | aschrad2/electron-app-python | 47b7ae9977a5dc9264675dc4a31ae9d469c45802 | [
"CC0-1.0"
] | null | null | null | import sys
print('Hello from Python!')
sys.stdout.flush()
| 14.5 | 27 | 0.741379 |
136d3d14ce82dc33463f9120a0ab31de31119f41 | 8,410 | py | Python | airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/streams/report_streams/products_report.py | Daemonxiao/airbyte | 34146564ba17423da8000e983722094f2426367e | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/streams/report_streams/products_report.py | Daemonxiao/airbyte | 34146564ba17423da8000e983722094f2426367e | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/streams/report_streams/products_report.py | Daemonxiao/airbyte | 34146564ba17423da8000e983722094f2426367e | [
"MIT"
] | null | null | null | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
from copy import copy
from .report_streams import RecordType, ReportStream
METRICS_MAP = {
"campaigns": [
"bidPlus",
"campaignName",
"campaignId",
"campaignStatus",
"campaignBudget",
"campaignRuleBasedBu... | 30.693431 | 96 | 0.62604 |
76f778ae23c140bc734436d62f6cb087460f8e7d | 7,372 | py | Python | field_application/field_application/campus_field/forms.py | tonylifepix/CryD-r | a38fdb003a44cd2905570424bea722316b923575 | [
"Apache-2.0"
] | null | null | null | field_application/field_application/campus_field/forms.py | tonylifepix/CryD-r | a38fdb003a44cd2905570424bea722316b923575 | [
"Apache-2.0"
] | null | null | null | field_application/field_application/campus_field/forms.py | tonylifepix/CryD-r | a38fdb003a44cd2905570424bea722316b923575 | [
"Apache-2.0"
] | null | null | null | #-*- coding: utf-8 -*-
from datetime import timedelta
from django import forms
from django.utils import timezone
from django.forms import ModelForm
from django.forms.extras.widgets import SelectDateWidget
from django.forms import Textarea, RadioSelect
from django.forms import CheckboxSelectMultiple
from django.db.mod... | 38.395833 | 72 | 0.591427 |
555ad46ebe74143571835e9815ed6869fefb2d6d | 33,427 | py | Python | isort/settings.py | viourr/isort | 3dc4d89003d5aa2f1f0c511346fb5622b05702c4 | [
"MIT"
] | null | null | null | isort/settings.py | viourr/isort | 3dc4d89003d5aa2f1f0c511346fb5622b05702c4 | [
"MIT"
] | null | null | null | isort/settings.py | viourr/isort | 3dc4d89003d5aa2f1f0c511346fb5622b05702c4 | [
"MIT"
] | null | null | null | """isort/settings.py.
Defines how the default settings for isort should be loaded
"""
import configparser
import fnmatch
import os
import posixpath
import re
import stat
import subprocess # nosec: Needed for gitignore support.
import sys
from functools import lru_cache
from pathlib import Path
from typing import (
... | 38.202286 | 120 | 0.592724 |
c2b9875a5a3bf32065f5f0987dffbc74cf8673d8 | 7,381 | py | Python | hackerrank_template_generator/test_functions.py | KaShing96/personal-projects | e20134ba694cd095caa62211b18396a011d4f4f2 | [
"MIT"
] | null | null | null | hackerrank_template_generator/test_functions.py | KaShing96/personal-projects | e20134ba694cd095caa62211b18396a011d4f4f2 | [
"MIT"
] | null | null | null | hackerrank_template_generator/test_functions.py | KaShing96/personal-projects | e20134ba694cd095caa62211b18396a011d4f4f2 | [
"MIT"
] | null | null | null | # === Script variables ===
TIME_LIMIT = 10 # Default time limit
# === Imports ===
import pytest
import warnings
import json
import os
from pathlib import Path
import functions as fnc
from func_timeout import func_timeout as fto
from func_timeout.exceptions import FunctionTimedOut
from datetime import datetim... | 28.388462 | 204 | 0.58339 |
3737c4194f1dd1d8d90dc27ea4e24b635d78f94c | 3,180 | py | Python | test/test_sms_campaigns_api.py | tarraschk/APIv3-python-library | 440883d3a7ca503a655f16bf69cef6c122a95e01 | [
"MIT"
] | 46 | 2018-12-18T21:37:18.000Z | 2022-03-30T20:38:29.000Z | test/test_sms_campaigns_api.py | tarraschk/APIv3-python-library | 440883d3a7ca503a655f16bf69cef6c122a95e01 | [
"MIT"
] | 41 | 2018-03-02T13:22:48.000Z | 2021-11-25T04:32:03.000Z | test/test_sms_campaigns_api.py | tarraschk/APIv3-python-library | 440883d3a7ca503a655f16bf69cef6c122a95e01 | [
"MIT"
] | 45 | 2018-01-22T14:42:32.000Z | 2021-12-16T19:58:45.000Z | # coding: utf-8
"""
SendinBlue API
SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at h... | 30.285714 | 856 | 0.636164 |
39de768835d34ad1fec421b133be92c256ee2d37 | 4,164 | py | Python | app/project_configuration/settings/base.py | michel-rodrigues/viggio_backend | f419f0b939209722e1eb1e272f33de172cd5c1f1 | [
"MIT"
] | null | null | null | app/project_configuration/settings/base.py | michel-rodrigues/viggio_backend | f419f0b939209722e1eb1e272f33de172cd5c1f1 | [
"MIT"
] | null | null | null | app/project_configuration/settings/base.py | michel-rodrigues/viggio_backend | f419f0b939209722e1eb1e272f33de172cd5c1f1 | [
"MIT"
] | null | null | null | import os
from datetime import timedelta
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
SECRET_KEY = os.environ.get('SECRET_KEY')
DEBUG = int(os.environ.get('DEBUG', default=0))
ALLOWED_HOSTS = ['viggio... | 27.576159 | 93 | 0.696686 |
19ea4ffd9ce35fa33a457cd3e4aaed4f362407b1 | 5,553 | py | Python | xfel/merging/refine.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | xfel/merging/refine.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | xfel/merging/refine.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | # -*- mode: python; coding: utf-8; indent-tabs-mode: nil; python-indent: 2 -*-
#
# $Id$
from __future__ import division
import math
from cctbx.array_family import flex
from scitbx.lbfgs.tst_curvatures import lbfgs_with_curvatures_mix_in
class find_scale(lbfgs_with_curvatures_mix_in):
def __init__(self, scaler, p... | 34.277778 | 78 | 0.676751 |
0c47e68c497b8b965e8ad64cc16c45656f6e90c7 | 990 | py | Python | Chapter04/code/chapter4_02.py | sTone3/Tkinter-GUI-Application-Development-Cookbook | 6c42edaa66c30d13e1903f3a3a66f609f20783d9 | [
"MIT"
] | 43 | 2018-05-09T23:29:07.000Z | 2022-03-05T02:03:32.000Z | Chapter04/code/chapter4_02.py | wenxuefeng3930/Tkinter-GUI-Application-Development-Cookbook | 6e22bc472e07a9aaa017ef66bfd32644578a873a | [
"MIT"
] | null | null | null | Chapter04/code/chapter4_02.py | wenxuefeng3930/Tkinter-GUI-Application-Development-Cookbook | 6e22bc472e07a9aaa017ef66bfd32644578a873a | [
"MIT"
] | 40 | 2018-06-18T14:44:13.000Z | 2022-03-12T09:11:50.000Z | import tkinter as tk
import tkinter.messagebox as mb
class App(tk.Tk):
def __init__(self):
super().__init__()
self.create_button(mb.askyesno, "Ask Yes/No",
"Returns True or False")
self.create_button(mb.askquestion, "Ask a question",
"Re... | 38.076923 | 66 | 0.576768 |
546a093192f3d5db023e68edf7793cbb256c0621 | 406 | py | Python | src/evgen/latency_sources/__init__.py | smdsbz/latency-sim | 192fb0da89be718a312ea5400902aa6e99b7a174 | [
"MIT"
] | null | null | null | src/evgen/latency_sources/__init__.py | smdsbz/latency-sim | 192fb0da89be718a312ea5400902aa6e99b7a174 | [
"MIT"
] | null | null | null | src/evgen/latency_sources/__init__.py | smdsbz/latency-sim | 192fb0da89be718a312ea5400902aa6e99b7a174 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .latency_source import *
from .constant_sources import *
from .sampling_sources import *
def get_latency_source(type_: str, name: str, *_, **kwarg):
if type_ == 'constant':
return ConstantSource(name, **kwarg)
if type_ == 'normal-distribution':
return NormalDistrib... | 31.230769 | 59 | 0.682266 |
b87e9a8475a77aedc607bd92a1da2bb8be1ab676 | 28,620 | py | Python | saleor/plugins/manager.py | largotuan/sonjay | 9826dc7dfe9acd5a03aaa136020f105309805402 | [
"CC-BY-4.0"
] | 1 | 2021-03-23T20:27:50.000Z | 2021-03-23T20:27:50.000Z | saleor/plugins/manager.py | largotuan/sonjay | 9826dc7dfe9acd5a03aaa136020f105309805402 | [
"CC-BY-4.0"
] | 18 | 2021-03-23T20:32:14.000Z | 2022-03-12T01:04:06.000Z | saleor/plugins/manager.py | largotuan/sonjay | 9826dc7dfe9acd5a03aaa136020f105309805402 | [
"CC-BY-4.0"
] | null | null | null | from decimal import Decimal
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, Union
import opentracing
from django.conf import settings
from django.core.handlers.wsgi import WSGIRequest
from django.http import HttpResponse, HttpResponseNotFound
from django.utils.module_loading import import... | 36.319797 | 88 | 0.633438 |
981082d07568624d286a512da73b098274ed0a9d | 29,756 | py | Python | Blender 2.91/2.91/scripts/addons/archimesh/achm_gltools.py | calculusrobotics/RNNs-for-Bayesian-State-Estimation | 2aacf86d2e447e10c840b4926d4de7bc5e46d9bc | [
"MIT"
] | 3 | 2019-09-16T10:29:19.000Z | 2022-02-11T14:43:18.000Z | release/scripts/addons/archimesh/achm_gltools.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/addons/archimesh/achm_gltools.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 43.376093 | 119 | 0.594838 |
d8203fe107803869f28bfee8d1f192c89e6dbddf | 1,011 | py | Python | RAISoft/CELIV/ControlPanel.py | daveraees/EMA_Test_Lab | a3073c5ec205d6ee327a993b38e92698c12cb0a6 | [
"MIT"
] | null | null | null | RAISoft/CELIV/ControlPanel.py | daveraees/EMA_Test_Lab | a3073c5ec205d6ee327a993b38e92698c12cb0a6 | [
"MIT"
] | null | null | null | RAISoft/CELIV/ControlPanel.py | daveraees/EMA_Test_Lab | a3073c5ec205d6ee327a993b38e92698c12cb0a6 | [
"MIT"
] | null | null | null |
import wx, wx.html
import sys
aboutText = """<p>Sorry, there is no information about this program. It is
running on version %(wxpy)s of <b>wxPython</b> and %(python)s of <b>Python</b>.
See <a href="http://wiki.wxpython.org">wxPython Wiki</a></p>"""
class CELIVcontrolDialog(wx.Dialog):
def __init__(self, pare... | 34.862069 | 79 | 0.630069 |
254085522fb1ef09e0c55d729a444b13bd2931e5 | 11,047 | py | Python | pip_services3_mongodb/persistence/IdentifiableMongoDbPersistence.py | pip-services3-python/pip-services3-mongodb-python | 81ff75d6eab96afb7065a403e902b7f2992b8662 | [
"MIT"
] | null | null | null | pip_services3_mongodb/persistence/IdentifiableMongoDbPersistence.py | pip-services3-python/pip-services3-mongodb-python | 81ff75d6eab96afb7065a403e902b7f2992b8662 | [
"MIT"
] | 1 | 2020-11-03T00:57:01.000Z | 2020-11-10T20:17:49.000Z | pip_services3_mongodb/persistence/IdentifiableMongoDbPersistence.py | pip-services3-python/pip-services3-mongodb-python | 81ff75d6eab96afb7065a403e902b7f2992b8662 | [
"MIT"
] | 1 | 2020-03-19T21:37:43.000Z | 2020-03-19T21:37:43.000Z | # -*- coding: utf-8 -*-
"""
pip_services3_mongodb.persistence.IdentifiableMongoDbPersistence
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Identifiable MongoDb persistence implementation
:copyright: Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details.
:licens... | 40.170909 | 182 | 0.631755 |
9c35006ca79179056d8898a34bff925c742ed73b | 4,793 | py | Python | isi_sdk_7_2/isi_sdk_7_2/models/snapshot_aliases_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_7_2/isi_sdk_7_2/models/snapshot_aliases_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_7_2/isi_sdk_7_2/models/snapshot_aliases_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 2
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_7_2.models.snapshot_... | 28.02924 | 95 | 0.586898 |
74ef8d86b2d9d2c640b8495b8a5a9f76ad5344e2 | 6,501 | py | Python | kubernetes_asyncio/client/models/v1alpha1_subject.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1alpha1_subject.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1alpha1_subject.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"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
OpenAPI spec version: v1.14.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1alpha1Su... | 32.343284 | 229 | 0.599446 |
4738d4a01f86b126304d06043d5766d50e75b7d2 | 1,993 | py | Python | project3/problem-4/sort_012.py | jurayev/algorithms-datastructures-udacity | e29149d8fdf65c27a8ceed205b6640e6a4c36e5a | [
"MIT"
] | 1 | 2020-05-08T17:52:19.000Z | 2020-05-08T17:52:19.000Z | project3/problem-4/sort_012.py | jurayev/algorithms-datastructures-udacity | e29149d8fdf65c27a8ceed205b6640e6a4c36e5a | [
"MIT"
] | null | null | null | project3/problem-4/sort_012.py | jurayev/algorithms-datastructures-udacity | e29149d8fdf65c27a8ceed205b6640e6a4c36e5a | [
"MIT"
] | null | null | null | """
For this problem single traversal with 3 pointers approach is used. Single traversal is meant to have order of Runtime O(n).
The sorting is performed in-place, so Space order is O(1).
Complexities:
* `Runtime O(n)`, where n is the input list size. This is achieved by the following: the sort_012(input_list) implem... | 39.078431 | 133 | 0.646262 |
a7e324ea8e7384cb8acef4baa32fca09e8e560d9 | 649 | py | Python | lambda_cron/__init__.py | MediaMath/lambda-cron | 2545e9fdeced7ebeaba2f98d02891cc6db7546e2 | [
"Apache-2.0"
] | 22 | 2017-10-27T11:37:58.000Z | 2021-11-09T09:35:37.000Z | lambda_cron/__init__.py | MediaMath/lambda-cron | 2545e9fdeced7ebeaba2f98d02891cc6db7546e2 | [
"Apache-2.0"
] | 1 | 2018-03-21T18:31:01.000Z | 2018-03-21T18:31:01.000Z | lambda_cron/__init__.py | MediaMath/lambda-cron | 2545e9fdeced7ebeaba2f98d02891cc6db7546e2 | [
"Apache-2.0"
] | 3 | 2017-10-27T16:49:42.000Z | 2018-11-03T04:14:10.000Z | # Copyright (C) 2016 MediaMath <http://www.mediamath.com>
#
# 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 ... | 36.055556 | 74 | 0.747304 |
bbca3b76d699a530d41f1f982b30658f4dc44d5a | 557 | py | Python | 05_scrapy/python_04/python_04/items.py | 2018-B-GR1-Python/Velasco-Yepez-Andres-David | 0c017d6e5f169f31207ddec5ceffc8dd82d327eb | [
"MIT"
] | null | null | null | 05_scrapy/python_04/python_04/items.py | 2018-B-GR1-Python/Velasco-Yepez-Andres-David | 0c017d6e5f169f31207ddec5ceffc8dd82d327eb | [
"MIT"
] | null | null | null | 05_scrapy/python_04/python_04/items.py | 2018-B-GR1-Python/Velasco-Yepez-Andres-David | 0c017d6e5f169f31207ddec5ceffc8dd82d327eb | [
"MIT"
] | 1 | 2019-10-21T19:27:12.000Z | 2019-10-21T19:27:12.000Z | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
from scrapy.loader.processors import MapCompose
def shorten_amazon_link(link):
id_producto = link.split('/')[-1] # ultimo elemento
short_link = 'ht... | 25.318182 | 57 | 0.712747 |
ae7fd7e24c799ac776f1f4de1e7421261821df8f | 33,041 | py | Python | lib/capablerobot_usbhub.py | d-c-d/CapableRobot_USBHub_Firmware | ec66a90dfc572a701b62129fdfa1774e5d732c8e | [
"MIT"
] | 1 | 2019-05-14T17:48:03.000Z | 2019-05-14T17:48:03.000Z | lib/capablerobot_usbhub.py | d-c-d/CapableRobot_USBHub_Firmware | ec66a90dfc572a701b62129fdfa1774e5d732c8e | [
"MIT"
] | null | null | null | lib/capablerobot_usbhub.py | d-c-d/CapableRobot_USBHub_Firmware | ec66a90dfc572a701b62129fdfa1774e5d732c8e | [
"MIT"
] | null | null | null | # The MIT License (MIT)
#
# Copyright (c) 2019 Chris Osterwood for Capable Robot Components
#
# 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... | 34.346154 | 122 | 0.605914 |
4a1f96cf491ede58daa20b1d366630a1f73d6d30 | 2,568 | py | Python | data/cirq_new/cirq_program/startCirq_noisy933.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy933.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy933.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=24
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
def make_circuit(n: int, input_qubit):
c = cirq.Ci... | 35.178082 | 77 | 0.689642 |
c4a44af604cb99441259658a62348b40e0899b01 | 42,100 | py | Python | gplearn/tests/test_genetic.py | DaGuT/gplearn | 8ef45101858cd0d61ac6c27ec1921fe185ee5882 | [
"BSD-3-Clause"
] | null | null | null | gplearn/tests/test_genetic.py | DaGuT/gplearn | 8ef45101858cd0d61ac6c27ec1921fe185ee5882 | [
"BSD-3-Clause"
] | null | null | null | gplearn/tests/test_genetic.py | DaGuT/gplearn | 8ef45101858cd0d61ac6c27ec1921fe185ee5882 | [
"BSD-3-Clause"
] | null | null | null | """Testing the Genetic Programming module's underlying datastructure
(gplearn.genetic._Program) as well as the classes that use it,
gplearn.genetic.SymbolicRegressor and gplearn.genetic.SymbolicTransformer."""
# Author: Trevor Stephens <trevorstephens.com>
#
# License: BSD 3 clause
import pickle
import sys
import nu... | 37.12522 | 79 | 0.629786 |
da48ff50d54716c6b4f26cc3743865e27af5dd03 | 1,450 | py | Python | hio-yocto-bsp/sources/poky/scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py | qiangzai00001/hio-prj | 060ff97fe21093b1369db78109d5b730b2b181c8 | [
"MIT"
] | null | null | null | hio-yocto-bsp/sources/poky/scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py | qiangzai00001/hio-prj | 060ff97fe21093b1369db78109d5b730b2b181c8 | [
"MIT"
] | null | null | null | hio-yocto-bsp/sources/poky/scripts/lib/mic/3rdparty/pykickstart/commands/__init__.py | qiangzai00001/hio-prj | 060ff97fe21093b1369db78109d5b730b2b181c8 | [
"MIT"
] | null | null | null | #
# Chris Lumens <clumens@redhat.com>
#
# Copyright 2009 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This program is distributed in the hope that it
# will be usef... | 53.703704 | 79 | 0.781379 |
cb831a65d4e4f8f337fbdcf3d43fc1ebae8a0809 | 15,923 | py | Python | packages/w3af/w3af/plugins/tests/crawl/test_open_api.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | null | null | null | packages/w3af/w3af/plugins/tests/crawl/test_open_api.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | null | null | null | packages/w3af/w3af/plugins/tests/crawl/test_open_api.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | null | null | null | """
test_open_api.py
Copyright 2018 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af 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 version 2 of the License.
w3af is distributed in the hope th... | 36.106576 | 114 | 0.560384 |
a5522282d2b609530afeafa2023d013cc5495f97 | 3,570 | py | Python | list_routes.py | Yusef28/todoskeleton | f6965c4eec2e732cd0f6f72f7d35866fdbb6c961 | [
"MIT"
] | null | null | null | list_routes.py | Yusef28/todoskeleton | f6965c4eec2e732cd0f6f72f7d35866fdbb6c961 | [
"MIT"
] | null | null | null | list_routes.py | Yusef28/todoskeleton | f6965c4eec2e732cd0f6f72f7d35866fdbb6c961 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
list_routes.py
"""
#Built-in/Generic
import datetime
#Libs
from flask import Flask, g, redirect, render_template, request, url_for, session, flash
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import (
Table, Column, Integer, String, MetaData, ForeignKey, Boolea... | 28.333333 | 102 | 0.7 |
88988d2bc89b911223c66b3ec58944ac0cff2dfc | 1,714 | py | Python | stanCode_Projects/my_photoshop/mirror_lake.py | fangchingsu/stanCode_Turing | d114ac8bc86855871e1da94bc58a8f9e6d78ef6e | [
"MIT"
] | null | null | null | stanCode_Projects/my_photoshop/mirror_lake.py | fangchingsu/stanCode_Turing | d114ac8bc86855871e1da94bc58a8f9e6d78ef6e | [
"MIT"
] | null | null | null | stanCode_Projects/my_photoshop/mirror_lake.py | fangchingsu/stanCode_Turing | d114ac8bc86855871e1da94bc58a8f9e6d78ef6e | [
"MIT"
] | null | null | null | """
File: mirror_lake.py
----------------------------------
This file reads in mt-rainier.jpg and
makes a new image that creates a mirror
lake vibe by placing the inverse image of
mt-rainier.jpg below the original one
"""
from simpleimage import SimpleImage
def reflect(filename):
"""
:param filename: SimpleIm... | 31.163636 | 109 | 0.640023 |
543d2e987e89158f9950bbd20c4f4b00d9f78318 | 2,953 | py | Python | spotify_ripper/eventloop.py | s0ng/spotify-ripper | d0464193dead7bd3ac7580e98bde86a0f323acae | [
"MIT"
] | 536 | 2016-10-05T15:31:29.000Z | 2022-03-27T22:24:34.000Z | spotify_ripper/eventloop.py | jilgue/spotify-ripper | 425b01b70d2f5b681cba750ba0b7ff892a7efe4b | [
"MIT"
] | 62 | 2016-10-11T01:53:38.000Z | 2022-02-07T08:35:39.000Z | spotify_ripper/eventloop.py | jilgue/spotify-ripper | 425b01b70d2f5b681cba750ba0b7ff892a7efe4b | [
"MIT"
] | 148 | 2016-10-04T11:54:01.000Z | 2022-03-27T22:24:55.000Z | # -*- coding: utf-8 -*-
# From PySpotify's EventLoop
# https://github.com/mopidy/pyspotify/blob/v2.x/master/spotify/eventloop.py
from __future__ import unicode_literals
from colorama import Fore
import threading
try:
# Python 3
import queue
except ImportError:
# Python 2
import Queue as queue
impor... | 28.95098 | 79 | 0.62445 |
28ad4eff66b27f5a0ac679edc3b4c26f48f6f286 | 22,529 | py | Python | 2015/2015_16a.py | davidxiao93/Advent-of-Code | 29503100ae4eb46b048fc3ab68ff0181c6f00ee5 | [
"MIT"
] | null | null | null | 2015/2015_16a.py | davidxiao93/Advent-of-Code | 29503100ae4eb46b048fc3ab68ff0181c6f00ee5 | [
"MIT"
] | null | null | null | 2015/2015_16a.py | davidxiao93/Advent-of-Code | 29503100ae4eb46b048fc3ab68ff0181c6f00ee5 | [
"MIT"
] | null | null | null | input = """Sue 1: goldfish: 6, trees: 9, akitas: 0
Sue 2: goldfish: 7, trees: 1, akitas: 0
Sue 3: cars: 10, akitas: 6, perfumes: 7
Sue 4: perfumes: 2, vizslas: 0, cars: 6
Sue 5: goldfish: 1, trees: 3, perfumes: 10
Sue 6: children: 9, vizslas: 7, cars: 9
Sue 7: cars: 6, vizslas: 5, cats: 3
Sue 8: akitas: 10, vizslas: 9,... | 41.566421 | 59 | 0.669359 |
96196c943aae8d453f4a0051da7d82d47859f827 | 40,110 | py | Python | tests/test_config.py | RavensburgOP/core | 0ea76e848b182ca0ebb0fdb54558f7f733898ad7 | [
"Apache-2.0"
] | 1 | 2019-08-28T00:54:28.000Z | 2019-08-28T00:54:28.000Z | tests/test_config.py | RavensburgOP/core | 0ea76e848b182ca0ebb0fdb54558f7f733898ad7 | [
"Apache-2.0"
] | 72 | 2020-08-03T07:31:01.000Z | 2022-03-31T06:11:49.000Z | tests/test_config.py | Vaarlion/core | f3de8b9f28de01abf72c0f5bb0b457eb1841f201 | [
"Apache-2.0"
] | null | null | null | """Test config utils."""
# pylint: disable=protected-access
from collections import OrderedDict
import copy
import os
from unittest import mock
from unittest.mock import AsyncMock, Mock, patch
import pytest
import voluptuous as vol
from voluptuous import Invalid, MultipleInvalid
import yaml
import homeassistant.confi... | 33.991525 | 119 | 0.622862 |
ce78348ea29888cf46c9fcf38e4784e877ace145 | 10,812 | py | Python | sdk/python/pulumi_azure_native/dbforpostgresql/v20200101privatepreview/server_key.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/dbforpostgresql/v20200101privatepreview/server_key.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/dbforpostgresql/v20200101privatepreview/server_key.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 42.070039 | 410 | 0.63892 |
25981c7bf28d76978a75e471521c2d656c74de08 | 2,237 | py | Python | bstree.py | gidj/pyBSTree | 9eb5a11a073b6c2023984d9cebcb28c590725bca | [
"BSD-2-Clause"
] | 1 | 2017-11-17T06:18:47.000Z | 2017-11-17T06:18:47.000Z | bstree.py | gidj/pyBSTree | 9eb5a11a073b6c2023984d9cebcb28c590725bca | [
"BSD-2-Clause"
] | null | null | null | bstree.py | gidj/pyBSTree | 9eb5a11a073b6c2023984d9cebcb28c590725bca | [
"BSD-2-Clause"
] | null | null | null | import collections
class BSTree:
def __init__(self, *args, **kwargs):
self.head = None
if args:
print args
for item in args:
self.insert(item)
if kwargs:
print kwargs
for item in kwargs.items():
self.insert(*ite... | 28.316456 | 80 | 0.513634 |
5b7ff10826404314bedffb5789983b43df346a4d | 3,230 | py | Python | thinc/layers/__init__.py | TheVinhLuong102/thinc | 7b54f728ddec7765a1d8a5e553d4b4b90b9edaec | [
"MIT"
] | 1 | 2022-03-08T07:25:21.000Z | 2022-03-08T07:25:21.000Z | thinc/layers/__init__.py | TheVinhLuong102/thinc | 7b54f728ddec7765a1d8a5e553d4b4b90b9edaec | [
"MIT"
] | null | null | null | thinc/layers/__init__.py | TheVinhLuong102/thinc | 7b54f728ddec7765a1d8a5e553d4b4b90b9edaec | [
"MIT"
] | 1 | 2021-07-18T16:28:32.000Z | 2021-07-18T16:28:32.000Z | # Weights layers
from .cauchysimilarity import CauchySimilarity
from .dropout import Dropout
from .embed import Embed
from .expand_window import expand_window
from .hashembed import HashEmbed
from .layernorm import LayerNorm
from .linear import Linear
from .lstm import LSTM, PyTorchLSTM
from .logistic import Logistic
f... | 25.234375 | 64 | 0.760991 |
12e7df6d832adc256529e84feb7c8382bd08e6bd | 1,147 | py | Python | system_disk/home/pi/tests/testAutoStop.py | IronMines/PST2017-2018 | ea97c521380edcee7d2f991c402d1856c77e0739 | [
"MIT"
] | null | null | null | system_disk/home/pi/tests/testAutoStop.py | IronMines/PST2017-2018 | ea97c521380edcee7d2f991c402d1856c77e0739 | [
"MIT"
] | null | null | null | system_disk/home/pi/tests/testAutoStop.py | IronMines/PST2017-2018 | ea97c521380edcee7d2f991c402d1856c77e0739 | [
"MIT"
] | null | null | null | #!/bin/usr/python
import RPi.GPIO as GPIO
import time
import serial
GPIO.setmode(GPIO.BCM)
inputs_IO = [5,6,13,19,26,12]
for i in inputs_IO:
GPIO.setup(i, GPIO.IN)
ser = serial.Serial(
port="/dev/ttyS0",
baudrate=115200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS
)
ser ... | 20.482143 | 71 | 0.628596 |
47142723f444895fe045d87967c8adfeaacb8ea3 | 3,268 | py | Python | avalanche/benchmarks/datasets/core50/core50_data.py | aishikhar/avalanche | 39c361aba1663795ed33f093ab2e15cc5792026e | [
"MIT"
] | 1 | 2021-08-11T19:43:38.000Z | 2021-08-11T19:43:38.000Z | avalanche/benchmarks/datasets/core50/core50_data.py | aishikhar/avalanche | 39c361aba1663795ed33f093ab2e15cc5792026e | [
"MIT"
] | null | null | null | avalanche/benchmarks/datasets/core50/core50_data.py | aishikhar/avalanche | 39c361aba1663795ed33f093ab2e15cc5792026e | [
"MIT"
] | 1 | 2021-04-09T08:10:27.000Z | 2021-04-09T08:10:27.000Z | ################################################################################
# Copyright (c) 2021 ContinualAI. #
# Copyrights licensed under the MIT License. #
# See the accompanying LICENSE file for terms. ... | 35.912088 | 80 | 0.504284 |
a1cc76889d94f049359fb7874352e7d58055eba0 | 823 | py | Python | google/ads/google_ads/v4/services/ad_group_ad_asset_view_service_client_config.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | 1 | 2021-04-09T04:28:47.000Z | 2021-04-09T04:28:47.000Z | google/ads/google_ads/v4/services/ad_group_ad_asset_view_service_client_config.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v4/services/ad_group_ad_asset_view_service_client_config.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | config = {
"interfaces": {
"google.ads.googleads.v4.services.AdGroupAdAssetViewService": {
"retry_codes": {
"idempotent": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"non_idempotent": []
},
"retry_params": {
"default": {
"initial_retry_de... | 25.71875 | 67 | 0.53706 |
0738ae74ea8317102423a614311d162935cd5d23 | 3,280 | py | Python | keras/utils/layer_utils.py | ikingye/keras | 1a3ee8441933fc007be6b2beb47af67998d50737 | [
"MIT"
] | 5 | 2020-11-30T22:26:03.000Z | 2020-12-01T22:34:25.000Z | keras/utils/layer_utils.py | ikingye/keras | 1a3ee8441933fc007be6b2beb47af67998d50737 | [
"MIT"
] | 10 | 2020-12-01T22:55:29.000Z | 2020-12-11T18:31:46.000Z | keras/utils/layer_utils.py | ikingye/keras | 1a3ee8441933fc007be6b2beb47af67998d50737 | [
"MIT"
] | 15 | 2020-11-30T22:12:22.000Z | 2020-12-09T01:32:48.000Z | """Utilities related to layer/model functionality.
"""
from .conv_utils import convert_kernel
from .. import backend as K
import numpy as np
from tensorflow.keras.utils import get_source_inputs
from tensorflow.python.keras.utils.layer_utils import print_summary
def count_params(weights):
"""Count the total numb... | 35.652174 | 78 | 0.641159 |
dca65a02dc9a91bbe106614c061a406e60408881 | 117 | py | Python | Python 3.8/1096 - Sequencia IJ 2.py | JhonatanGuilherme/BeeCrowd | e039f8128399697ad9eb75f48047b83eb7b0201e | [
"MIT"
] | null | null | null | Python 3.8/1096 - Sequencia IJ 2.py | JhonatanGuilherme/BeeCrowd | e039f8128399697ad9eb75f48047b83eb7b0201e | [
"MIT"
] | null | null | null | Python 3.8/1096 - Sequencia IJ 2.py | JhonatanGuilherme/BeeCrowd | e039f8128399697ad9eb75f48047b83eb7b0201e | [
"MIT"
] | null | null | null | I = 1
J = 7
while I < 10:
print('I={} J={}'.format(I, J))
J -= 1
if J < 5:
J += 3
I += 2
| 13 | 35 | 0.316239 |
03104f50061698832f29505894abebbb2e01de77 | 1,149 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/plugins/action/slxos_config.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/venv/lib/python2.7/site-packages/ansible/plugins/action/slxos_config.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/venv/lib/python2.7/site-packages/ansible/plugins/action/slxos_config.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #
# (c) 2018 Extreme Networks Inc.
#
# 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.
#
# Ans... | 31.916667 | 78 | 0.752829 |
43adaf374bff78bef0ece0166067491416f76b68 | 1,696 | py | Python | geoposition/fields.py | avallbona/django-geoposition | ce8c40c60bf7dfdcec4b47b2f3e013fd75b7fcc3 | [
"MIT"
] | 13 | 2018-10-28T21:39:45.000Z | 2022-02-05T02:55:43.000Z | geoposition/fields.py | avallbona/django-geoposition | ce8c40c60bf7dfdcec4b47b2f3e013fd75b7fcc3 | [
"MIT"
] | 5 | 2019-04-05T13:48:51.000Z | 2020-03-25T10:40:18.000Z | geoposition/fields.py | avallbona/django-geoposition | ce8c40c60bf7dfdcec4b47b2f3e013fd75b7fcc3 | [
"MIT"
] | 13 | 2018-11-13T12:11:55.000Z | 2021-12-28T09:40:41.000Z | from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_text
from . import Geoposition
from .forms import GeopositionField as GeopositionFormField
class GeopositionField(models.Field):
description = _("A... | 29.754386 | 73 | 0.652712 |
6ace5e17a0872fffca819597d78b7f62acaa2704 | 85 | py | Python | Course/apps.py | Ryize/CourseMC | 1f2823870462b4f6957621975c9b657430649bd4 | [
"Apache-2.0"
] | 2 | 2021-12-20T16:57:02.000Z | 2021-12-20T17:00:24.000Z | Course/apps.py | Ryize/CourseMC | 1f2823870462b4f6957621975c9b657430649bd4 | [
"Apache-2.0"
] | null | null | null | Course/apps.py | Ryize/CourseMC | 1f2823870462b4f6957621975c9b657430649bd4 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class AuthConfig(AppConfig):
name = 'Course'
| 14.166667 | 33 | 0.741176 |
b740a509209e5ad0cd98eeebebcfcb8763cd78cc | 903 | py | Python | filter.py | lsh0357/pytorch-CycleGAN-and-pix2pix | 4bef8e8895e0233aba5f385512719a96b5f05410 | [
"BSD-3-Clause"
] | 2 | 2020-05-14T09:09:02.000Z | 2020-11-24T04:36:23.000Z | filter.py | lsh0357/pytorch-CycleGAN-and-pix2pix | 4bef8e8895e0233aba5f385512719a96b5f05410 | [
"BSD-3-Clause"
] | null | null | null | filter.py | lsh0357/pytorch-CycleGAN-and-pix2pix | 4bef8e8895e0233aba5f385512719a96b5f05410 | [
"BSD-3-Clause"
] | 1 | 2020-06-07T08:36:20.000Z | 2020-06-07T08:36:20.000Z | import glob, os, shutil
def main():
testA, testB = 200, 400
for filename in glob.iglob('/Users/shihaoli/Downloads/face-pics/**', recursive=True):
if os.path.isfile(filename): # filter dirs
fn = os.path.basename(filename)
age = int(fn.split('_')[0])
if age <= 5:
... | 39.26087 | 89 | 0.520487 |
53df09a1edbd8b758b3c0cbeea23acb6b7b7e781 | 2,490 | py | Python | chainer_ssim/structural_similarity3d_loss.py | zEttOn86/chainer-ssim | e0e87600b8f9616415d3ad4eeb95357c3efb49ce | [
"MIT"
] | null | null | null | chainer_ssim/structural_similarity3d_loss.py | zEttOn86/chainer-ssim | e0e87600b8f9616415d3ad4eeb95357c3efb49ce | [
"MIT"
] | null | null | null | chainer_ssim/structural_similarity3d_loss.py | zEttOn86/chainer-ssim | e0e87600b8f9616415d3ad4eeb95357c3efb49ce | [
"MIT"
] | 1 | 2022-01-17T10:46:46.000Z | 2022-01-17T10:46:46.000Z | #coding:utf-8
import chainer
import chainer.functions as F
import numpy as np
from math import exp
def gaussian(window_size, sigma, xp):
"""
https://daily.belltail.jp/?p=2457
"""
x = xp.arange(0, window_size, dtype=xp.float32)
gauss = xp.exp(-(x-window_size//2)**2/(2*sigma**2))
# gauss = chaine... | 40.819672 | 137 | 0.681526 |
c75748c88d36f80b7b832a104000a7fd266bb135 | 19,820 | py | Python | opacus/sv_privacy_engine.py | twosixlabs/opacus | c52af6f1e4cd32d27e60e255ec52a51ff135f996 | [
"Apache-2.0"
] | null | null | null | opacus/sv_privacy_engine.py | twosixlabs/opacus | c52af6f1e4cd32d27e60e255ec52a51ff135f996 | [
"Apache-2.0"
] | null | null | null | opacus/sv_privacy_engine.py | twosixlabs/opacus | c52af6f1e4cd32d27e60e255ec52a51ff135f996 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import math
import os
import types
import warnings
from functools import partial
from typing import List, Optional, Tuple, Union
import torch
from scipy.stats import planck
from torch import Tensor, nn
import numpy as np
f... | 39.719439 | 129 | 0.62114 |
5b0c9c0c3dfc20e8b87b19fdda125124a91f0304 | 6,276 | py | Python | ndb/src/google/cloud/ndb/_datastore_api.py | shivasiddharth/google-cloud-python | 91ac0aab77a1a17a8837c49b61df2415de60d2a3 | [
"Apache-2.0"
] | null | null | null | ndb/src/google/cloud/ndb/_datastore_api.py | shivasiddharth/google-cloud-python | 91ac0aab77a1a17a8837c49b61df2415de60d2a3 | [
"Apache-2.0"
] | null | null | null | ndb/src/google/cloud/ndb/_datastore_api.py | shivasiddharth/google-cloud-python | 91ac0aab77a1a17a8837c49b61df2415de60d2a3 | [
"Apache-2.0"
] | 1 | 2020-11-15T11:44:36.000Z | 2020-11-15T11:44:36.000Z | # Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.518135 | 97 | 0.675271 |
f151dfc704911b4bdc761015aa29cc491bf69be4 | 9,963 | py | Python | contrib/spendfrom/spendfrom.py | Tyron888/EternCoin | 3ef9655dcab278e50de048a561bcab4cddd3232b | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | Tyron888/EternCoin | 3ef9655dcab278e50de048a561bcab4cddd3232b | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | Tyron888/EternCoin | 3ef9655dcab278e50de048a561bcab4cddd3232b | [
"MIT"
] | 1 | 2022-03-15T23:27:06.000Z | 2022-03-15T23:27:06.000Z | #!/usr/bin/env python
#
# Use the raw transactions API to spend ETENs received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a eternd or etern-Qt... | 37.175373 | 111 | 0.629931 |
19d4bf7376b9c686d75a16db49c75ec102e38eb0 | 1,543 | py | Python | setup.py | Quarticai/graphene-django-extras | 66a59b6b255244dcb88bbcb858c38b14962502ad | [
"MIT"
] | null | null | null | setup.py | Quarticai/graphene-django-extras | 66a59b6b255244dcb88bbcb858c38b14962502ad | [
"MIT"
] | 77 | 2021-06-28T11:12:22.000Z | 2022-03-14T09:07:39.000Z | setup.py | Quarticai/graphene-django-extras | 66a59b6b255244dcb88bbcb858c38b14962502ad | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import os
from os.path import dirname
from setuptools import find_packages, setup
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
BASE_PKG_DIR = BASE_DIR
if os.path.exists(BASE_PKG_DIR) and os.path.isdir(BASE_PKG_DIR):
sys.path.insert(0, BASE_PKG_DIR)
else:
raise Valu... | 29.113208 | 82 | 0.645496 |
c14bb6b735e5688a2ff2fcaecb7c763a53521733 | 17,239 | py | Python | src/ixdat/readers/zilien.py | matenestor/ixdat | ac3ff81f5c92f2d4bbede5fc9fc5a1df2a5eb34f | [
"MIT"
] | null | null | null | src/ixdat/readers/zilien.py | matenestor/ixdat | ac3ff81f5c92f2d4bbede5fc9fc5a1df2a5eb34f | [
"MIT"
] | 1 | 2022-03-31T09:54:40.000Z | 2022-03-31T09:54:40.000Z | src/ixdat/readers/zilien.py | matenestor/ixdat | ac3ff81f5c92f2d4bbede5fc9fc5a1df2a5eb34f | [
"MIT"
] | null | null | null | """Readers for files produces by the Zilien software from Spectro Inlets"""
import re
from collections import defaultdict
from pathlib import Path
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
from ..data_series import DataSeries, TimeSeries, ValueSeries, Field
from ..techniques import ... | 38.139381 | 89 | 0.617495 |
a0b656050daa42642c471ae98a46d7306ce32614 | 281 | py | Python | 4 kyu/Number of integer partitions.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 6 | 2020-09-03T09:32:25.000Z | 2020-12-07T04:10:01.000Z | 4 kyu/Number of integer partitions.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | 1 | 2021-12-13T15:30:21.000Z | 2021-12-13T15:30:21.000Z | 4 kyu/Number of integer partitions.py | mwk0408/codewars_solutions | 9b4f502b5f159e68024d494e19a96a226acad5e5 | [
"MIT"
] | null | null | null | def partitions(n):
return helper(n, n)
def helper(n, n2, dict={}):
if n2==0:
return 0
elif n<=0:
return 1 if n==0 else 0
if dict.get((n, n2)):
return dict[(n, n2)]
dict[(n, n2)]=(helper(n, n2-1)+helper(n-n2, n2))
return dict[(n, n2)] | 25.545455 | 52 | 0.512456 |
d7a8b7c999a95b4860382af5bf9fec5305d77dc2 | 7,280 | py | Python | multitool/win.py | alexpdev/multitool | 8a635410d5010d9be2e5118b887e26244589a5df | [
"MIT"
] | null | null | null | multitool/win.py | alexpdev/multitool | 8a635410d5010d9be2e5118b887e26244589a5df | [
"MIT"
] | null | null | null | multitool/win.py | alexpdev/multitool | 8a635410d5010d9be2e5118b887e26244589a5df | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
## Generated by alexpdev
##
## PySide6
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A P... | 33.090909 | 85 | 0.593681 |
0f60672e8d65b236183c32a95652143a11843ccb | 1,452 | py | Python | examples/PagePostCommentsEdge.py | GDGSNF/facebook-python-business-sdk | 95e64a10d987d7a53963d17036b6730d07f84ab5 | [
"CNRI-Python"
] | 576 | 2018-05-01T19:09:32.000Z | 2022-03-31T11:45:11.000Z | examples/PagePostCommentsEdge.py | GDGSNF/facebook-python-business-sdk | 95e64a10d987d7a53963d17036b6730d07f84ab5 | [
"CNRI-Python"
] | 217 | 2018-05-03T07:31:59.000Z | 2022-03-29T14:19:52.000Z | examples/PagePostCommentsEdge.py | GDGSNF/facebook-python-business-sdk | 95e64a10d987d7a53963d17036b6730d07f84ab5 | [
"CNRI-Python"
] | 323 | 2018-05-01T20:32:26.000Z | 2022-03-29T07:05:12.000Z | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | 38.210526 | 76 | 0.783747 |
79b503dcc89e695afad1d0092dc342f0d64e7b7f | 257 | py | Python | numpy_test/numpy_c.py | linyang23/AI-Python-Code-Implementations-with-Notes | af729c652a301b199d568d5989adc5ed6413dcf9 | [
"MIT"
] | null | null | null | numpy_test/numpy_c.py | linyang23/AI-Python-Code-Implementations-with-Notes | af729c652a301b199d568d5989adc5ed6413dcf9 | [
"MIT"
] | null | null | null | numpy_test/numpy_c.py | linyang23/AI-Python-Code-Implementations-with-Notes | af729c652a301b199d568d5989adc5ed6413dcf9 | [
"MIT"
] | null | null | null | # coding=utf-8
import numpy as np
nd5=np.random.random([3,3]) #生成3行3列的矩阵
print(nd5)
print(type(nd5))
'''输出
[[0.30996243 0.70525938 0.23778251]
[0.36607574 0.07691564 0.25879282]
[0.78231402 0.64058363 0.44167507]]
<class 'numpy.ndarray'>
''' | 21.416667 | 50 | 0.673152 |
b0c6d7c62d22da661257a7c455f120a52cb537f0 | 948 | py | Python | SmartAPI/rdf/List.py | Kreastr/SmartAPI-HEILA | 97dbe9e6e27267c60a4f94f60692d5f391e2ef7f | [
"BSD-2-Clause"
] | null | null | null | SmartAPI/rdf/List.py | Kreastr/SmartAPI-HEILA | 97dbe9e6e27267c60a4f94f60692d5f391e2ef7f | [
"BSD-2-Clause"
] | null | null | null | SmartAPI/rdf/List.py | Kreastr/SmartAPI-HEILA | 97dbe9e6e27267c60a4f94f60692d5f391e2ef7f | [
"BSD-2-Clause"
] | null | null | null | """
A compatibility class that emulates an RDF List
"""
import sys
try:
from rdflib import Graph
from rdflib import BNode
except:
print "RDFLib is missing from your Python installation"
print "Install it with"
print "> pip install rdflib"
sys.exit()
class List(object):
def __init__(self)... | 21.545455 | 59 | 0.605485 |
c073538d8eb1c5c49f5d5903d2591edbbf218e0e | 5,562 | py | Python | models/model_zoo/modify_DeepLabV3plus.py | chansoopark98/hole-detection | 76e47057b1e186d4e2f5db2b5b2bb1074b849078 | [
"MIT"
] | null | null | null | models/model_zoo/modify_DeepLabV3plus.py | chansoopark98/hole-detection | 76e47057b1e186d4e2f5db2b5b2bb1074b849078 | [
"MIT"
] | null | null | null | models/model_zoo/modify_DeepLabV3plus.py | chansoopark98/hole-detection | 76e47057b1e186d4e2f5db2b5b2bb1074b849078 | [
"MIT"
] | null | null | null | from tensorflow.keras.layers import (AveragePooling2D,
MaxPooling2D, SeparableConv2D, UpSampling2D, Activation, BatchNormalization,
GlobalAveragePooling2D, Conv2D, Dropout, Concatenate, multiply, Add, concatenate,
DepthwiseConv2D, Reshape, ZeroPadding2D, Dense, GlobalMaxPooling2D, Permute, Lambda, Subtract)... | 41.819549 | 123 | 0.645811 |
f58626e3b57cd4ed8f5785a2dcc4cbd481159d28 | 506 | py | Python | lib/ansiblelint/rules/LineTooLongRule.py | eahlstrom/ansible-lint | abc946f378a3690a4cb06eb9a7e9d60fb46fb35d | [
"MIT"
] | 1 | 2020-11-09T09:32:08.000Z | 2020-11-09T09:32:08.000Z | lib/ansiblelint/rules/LineTooLongRule.py | eahlstrom/ansible-lint | abc946f378a3690a4cb06eb9a7e9d60fb46fb35d | [
"MIT"
] | 1 | 2019-03-23T14:17:22.000Z | 2019-03-23T14:17:22.000Z | lib/ansiblelint/rules/LineTooLongRule.py | eahlstrom/ansible-lint | abc946f378a3690a4cb06eb9a7e9d60fb46fb35d | [
"MIT"
] | 1 | 2019-03-20T13:25:24.000Z | 2019-03-20T13:25:24.000Z | # Copyright (c) 2016, Will Thames and contributors
# Copyright (c) 2018, Ansible Project
from ansiblelint import AnsibleLintRule
class LineTooLongRule(AnsibleLintRule):
id = '204'
shortdesc = 'Lines should be no longer than 160 chars'
description = (
'Long lines make code harder to read and '
... | 25.3 | 58 | 0.660079 |
e5ba210fa9c2281972ddb38c9ec5957d10b22d22 | 38,618 | py | Python | discord/app_commands/tree.py | Ryomen-Sukuna/discord.py | 0bcb0d0e3ce395d42a5b1dae61b0090791ee018d | [
"MIT"
] | null | null | null | discord/app_commands/tree.py | Ryomen-Sukuna/discord.py | 0bcb0d0e3ce395d42a5b1dae61b0090791ee018d | [
"MIT"
] | null | null | null | discord/app_commands/tree.py | Ryomen-Sukuna/discord.py | 0bcb0d0e3ce395d42a5b1dae61b0090791ee018d | [
"MIT"
] | null | null | null | """
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... | 36.990421 | 125 | 0.597856 |
8bbf20eb5b4992ca2bfa33ae48b09b8b29d4a7dc | 715 | py | Python | nodes/Input/MaterialInput.py | kant/RenderStackNode | 19876fc75a03edf36ae27837d193509907adbd4a | [
"Apache-2.0"
] | null | null | null | nodes/Input/MaterialInput.py | kant/RenderStackNode | 19876fc75a03edf36ae27837d193509907adbd4a | [
"Apache-2.0"
] | null | null | null | nodes/Input/MaterialInput.py | kant/RenderStackNode | 19876fc75a03edf36ae27837d193509907adbd4a | [
"Apache-2.0"
] | null | null | null | import bpy
from bpy.props import *
from ...nodes.BASE.node_tree import RenderStackNode
# from ...utility import source_attr
from mathutils import Color, Vector
def update_node(self, context):
self.update_parms()
class RenderNodeObjectInput(RenderStackNode):
bl_idname = 'RenderNodeMaterialInput'
bl_label... | 23.064516 | 56 | 0.735664 |
f06bc2106e8b9a64eb3a8979f4267138b34906d1 | 483 | py | Python | events/contrib/plugins/form_elements/fields/text/apps.py | mansonul/events | 4f6ca37bc600dcba3f74400d299826882d53b7d2 | [
"MIT"
] | null | null | null | events/contrib/plugins/form_elements/fields/text/apps.py | mansonul/events | 4f6ca37bc600dcba3f74400d299826882d53b7d2 | [
"MIT"
] | null | null | null | events/contrib/plugins/form_elements/fields/text/apps.py | mansonul/events | 4f6ca37bc600dcba3f74400d299826882d53b7d2 | [
"MIT"
] | null | null | null | __title__ = 'fobi.contrib.plugins.form_elements.fields.text.apps'
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2014-2017 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'
__all__ = ('Config',)
try:
from django.apps import AppConfig
class Config(AppConfig):
"""Config."... | 26.833333 | 65 | 0.720497 |
c7f3ff1c8591be846553ec4cb59b6ac74cd7c11d | 2,959 | py | Python | activemri/experimental/cvpr19_models/util/common.py | qinliuliuqin/active-mri-acquisition | b561f838667f4bc7753b1f89dfbdd545d0f00ada | [
"MIT"
] | 32 | 2020-10-05T19:46:56.000Z | 2022-02-15T10:37:13.000Z | activemri/experimental/cvpr19_models/util/common.py | qinliuliuqin/active-mri-acquisition | b561f838667f4bc7753b1f89dfbdd545d0f00ada | [
"MIT"
] | 2 | 2020-12-28T21:05:57.000Z | 2022-01-22T17:56:50.000Z | activemri/experimental/cvpr19_models/util/common.py | qinliuliuqin/active-mri-acquisition | b561f838667f4bc7753b1f89dfbdd545d0f00ada | [
"MIT"
] | 9 | 2020-11-22T18:15:04.000Z | 2022-02-11T06:07:38.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
import os
from typing import Dict, Optional
import matplotlib.pyplot as plt
import numpy as np
import skimage.measure
import to... | 28.180952 | 88 | 0.650896 |
01065da7bc8387efa4d9672a50480c45b32ed9b1 | 871 | py | Python | regreg/atoms/setup.py | sroet/regreg | 299ff18b8680872d4d85447953793bf438f78bba | [
"BSD-3-Clause"
] | 9 | 2015-07-14T12:39:10.000Z | 2022-02-03T11:13:03.000Z | regreg/atoms/setup.py | sroet/regreg | 299ff18b8680872d4d85447953793bf438f78bba | [
"BSD-3-Clause"
] | 2 | 2015-02-24T18:05:58.000Z | 2020-12-29T11:58:58.000Z | regreg/atoms/setup.py | sroet/regreg | 299ff18b8680872d4d85447953793bf438f78bba | [
"BSD-3-Clause"
] | 8 | 2015-07-13T07:59:16.000Z | 2021-06-23T09:21:43.000Z | """
RegReg: A package to solve regularized regression problems
"""
import os, sys
import string
from Cython.Compiler import Main
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('atoms',parent_package,top_path)
config.add_exten... | 26.393939 | 60 | 0.58209 |
718fabbb99761f63996fa7200e11fe550908e4ae | 6,866 | py | Python | ForgeShortUrl/forgeshorturl/tests/functional/test.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 113 | 2015-03-25T10:33:37.000Z | 2022-02-16T20:55:06.000Z | ForgeShortUrl/forgeshorturl/tests/functional/test.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 4 | 2017-08-04T16:19:07.000Z | 2020-06-08T19:01:33.000Z | ForgeShortUrl/forgeshorturl/tests/functional/test.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 36 | 2015-08-14T16:27:39.000Z | 2022-02-16T20:54:35.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 (t... | 40.869048 | 105 | 0.593941 |
77dc6b3205ee1b7d61b6351c223c1619c795588c | 6,593 | py | Python | analyze.py | venkyr77/FCN-Project | ff23e0087680df422705b436c75ba19c4bc2c58f | [
"Apache-2.0"
] | null | null | null | analyze.py | venkyr77/FCN-Project | ff23e0087680df422705b436c75ba19c4bc2c58f | [
"Apache-2.0"
] | null | null | null | analyze.py | venkyr77/FCN-Project | ff23e0087680df422705b436c75ba19c4bc2c58f | [
"Apache-2.0"
] | null | null | null | import json
import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import functools
from scipy import stats
from os import walk
from pylab import *
abr_algo_types = ["Bola - E", "Dynamic", "Throughput"]
network_profiles = ["PROFILE_CASCADE", "PROFILE_INTRA_CASCADE", "PROFILE_SPIKE", "PROFILE... | 29.832579 | 138 | 0.677688 |
d9abec5e7863d9f381bb3c73fbb8ca42d03bc591 | 10,984 | py | Python | FirmsLocations/Preprocess/firms_preprocessor.py | tgquintela/Firms_locations | 476680cbc3eb1308811633d24810049e215101a0 | [
"MIT"
] | null | null | null | FirmsLocations/Preprocess/firms_preprocessor.py | tgquintela/Firms_locations | 476680cbc3eb1308811633d24810049e215101a0 | [
"MIT"
] | null | null | null | FirmsLocations/Preprocess/firms_preprocessor.py | tgquintela/Firms_locations | 476680cbc3eb1308811633d24810049e215101a0 | [
"MIT"
] | null | null | null |
"""
Module oriented to group the classes and functions which tasks are to
preprocess the data and prepare new data and structuctures to be use in the
processes we want to perform.
TODO:
-----
- Reverse process
- Processor class
"""
import numpy as np
import pandas as pd
import os
#import pandas as pd
import shelve
#... | 41.606061 | 92 | 0.642753 |
0bde7cc4a42695e68bcdc268df4bfdd6257cd39d | 1,572 | py | Python | driver/pullBuzzfeed.py | georgetown-analytics/team-buzzfeed | a0b1d0481ec3ff3b3134b281865825aaf5effe07 | [
"MIT"
] | 4 | 2016-05-21T19:28:14.000Z | 2019-12-23T04:29:53.000Z | driver-final/pullBuzzfeed.py | georgetown-analytics/team-buzzfeed | a0b1d0481ec3ff3b3134b281865825aaf5effe07 | [
"MIT"
] | 5 | 2016-06-23T18:20:10.000Z | 2016-07-11T21:14:30.000Z | driver/pullBuzzfeed.py | georgetown-analytics/team-buzzfeed | a0b1d0481ec3ff3b3134b281865825aaf5effe07 | [
"MIT"
] | 1 | 2020-03-04T01:21:38.000Z | 2020-03-04T01:21:38.000Z |
import urllib2
import json
import datetime
def getfeed (country, data):
webUrl = urllib2.urlopen(data)
jsonfeed = "initialized"
if webUrl.getcode() == 200:
jsonfeed = webUrl.read()
else:
jsonfeed = "Received an error from server, cannot get feeds.\n"
now = datetime.datetime.now()
... | 33.446809 | 74 | 0.673028 |
ce14b61ea206b2dc95c8719eadf03b5e016e0936 | 12,587 | py | Python | RandomWorkflowSpecGenerator.py | loicmiller/policy-analysis | 2c52513440633962b997cf8958ed69d63aabb643 | [
"MIT"
] | null | null | null | RandomWorkflowSpecGenerator.py | loicmiller/policy-analysis | 2c52513440633962b997cf8958ed69d63aabb643 | [
"MIT"
] | null | null | null | RandomWorkflowSpecGenerator.py | loicmiller/policy-analysis | 2c52513440633962b997cf8958ed69d63aabb643 | [
"MIT"
] | null | null | null | ###############################################################################
# Imports
import sys
import argparse # Argument parser
import networkx as nx
import matplotlib.pyplot as plt
import random
from sympy import to_dnf
from sympy.parsing.sympy_parser import parse_expr
import ast # String to dict
from impo... | 42.523649 | 226 | 0.617304 |
aa95d1b7da74ee198ba6235e775d017d8825bf17 | 4,261 | py | Python | src/oscar/apps/catalogue/search_handlers.py | frmdstryr/django-oscar | 32bf8618ebb688df6ba306dc7703de8e61b4e78c | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/catalogue/search_handlers.py | frmdstryr/django-oscar | 32bf8618ebb688df6ba306dc7703de8e61b4e78c | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/catalogue/search_handlers.py | frmdstryr/django-oscar | 32bf8618ebb688df6ba306dc7703de8e61b4e78c | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.utils.module_loading import import_string
from django.views.generic.list import MultipleObjectMixin
from oscar.core.loading import get_class, get_model
BrowseCategoryForm = get_class('search.forms', 'BrowseCategoryForm')
SearchHandler = get_class('search.search_handlers', ... | 38.387387 | 87 | 0.710631 |
69449388b68572adf5a23cbaa318947049736303 | 45 | py | Python | src/toolkit/scripts/__init__.py | pombredanne/fabric8-analytics-nvd-toolkit | c0e2b963f0fda974007fa56809a87b5d4eb63ffb | [
"Apache-2.0"
] | 5 | 2018-05-17T10:09:41.000Z | 2020-12-13T15:04:12.000Z | src/toolkit/scripts/__init__.py | pombredanne/fabric8-analytics-nvd-toolkit | c0e2b963f0fda974007fa56809a87b5d4eb63ffb | [
"Apache-2.0"
] | 68 | 2018-04-17T20:26:19.000Z | 2021-06-01T22:08:36.000Z | src/toolkit/scripts/__init__.py | pombredanne/fabric8-analytics-nvd-toolkit | c0e2b963f0fda974007fa56809a87b5d4eb63ffb | [
"Apache-2.0"
] | 6 | 2018-04-17T10:09:24.000Z | 2020-12-02T17:56:35.000Z | """Package containing executable scripts."""
| 22.5 | 44 | 0.755556 |
64180f8bb2778b4afc038c8e233d2c7c887c4cbd | 1,471 | py | Python | cc2ai/scripts/make_cube_difference.py | jcartus/SCFInitialGuess | e4a9280e8cbabb126946e47affa652243b74753c | [
"MIT"
] | 1 | 2020-03-02T02:36:59.000Z | 2020-03-02T02:36:59.000Z | cc2ai/scripts/make_cube_difference.py | jcartus/SCFInitialGuess | e4a9280e8cbabb126946e47affa652243b74753c | [
"MIT"
] | null | null | null | cc2ai/scripts/make_cube_difference.py | jcartus/SCFInitialGuess | e4a9280e8cbabb126946e47affa652243b74753c | [
"MIT"
] | null | null | null | """This script will create the difference between two cube files
for the same molecule
Author:
Johannes Cartus, QCIEP, TU Graz
"""
import numpy as np
import argparse
def main(cube_1, cube_2, outfile):
with open(cube_1, 'r') as f1:
lines1 = f1.readlines()
with open(cube_2, 'r') as f2:
... | 20.150685 | 79 | 0.560843 |
82c31e3b1cf6f9d2aec1edf5770f21944be99374 | 8,361 | py | Python | esque/cli/commands/produce.py | real-digital/esque | 0b779fc308ce8bce45c1903f36c33664b2e832e7 | [
"MIT"
] | 29 | 2019-05-10T21:12:38.000Z | 2021-08-24T08:09:49.000Z | esque/cli/commands/produce.py | real-digital/esque | 0b779fc308ce8bce45c1903f36c33664b2e832e7 | [
"MIT"
] | 103 | 2019-05-17T07:21:41.000Z | 2021-12-02T08:29:00.000Z | esque/cli/commands/produce.py | real-digital/esque | 0b779fc308ce8bce45c1903f36c33664b2e832e7 | [
"MIT"
] | 2 | 2019-05-28T06:45:14.000Z | 2019-11-21T00:33:15.000Z | import pathlib
import click
from esque.cli.autocomplete import list_contexts, list_topics
from esque.cli.helpers import ensure_approval
from esque.cli.options import State, default_options
from esque.cli.output import blue_bold, green_bold
from esque.cluster import Cluster
from esque.io.handlers import BaseHandler, K... | 37.662162 | 120 | 0.723478 |
8f2ca07c7c4719c6c2f39842c73446bf1b49bff3 | 572 | py | Python | app/modules/passthroughs/__init__.py | karenc/houston | 4eaaaf11d61394035e34b55bb847ea7eb4099c61 | [
"Apache-2.0"
] | 6 | 2021-04-06T19:50:52.000Z | 2022-01-19T17:42:33.000Z | app/modules/passthroughs/__init__.py | WildMeOrg/houston | 8102229421388e44234c07ee6cb73bf705b6fba0 | [
"Apache-2.0"
] | 491 | 2021-01-20T01:10:00.000Z | 2022-03-31T19:30:48.000Z | app/modules/passthroughs/__init__.py | karenc/houston | 4eaaaf11d61394035e34b55bb847ea7eb4099c61 | [
"Apache-2.0"
] | 2 | 2021-03-12T02:33:55.000Z | 2021-03-16T20:18:43.000Z | # -*- coding: utf-8 -*-
"""
Passthroughs module
============
"""
from app.extensions.api import api_v1
def init_app(app, **kwargs):
# pylint: disable=unused-argument,unused-variable
"""
Init Passthroughs module.
"""
api_v1.add_oauth_scope(
'passthroughs:read', 'Provide access to EDM and A... | 22 | 80 | 0.657343 |
4310583468769ebfb9a3a5ed254cd4b4a68662b8 | 737 | py | Python | metacritic/metacritic/metacritic/pipelines.py | hellozeyu/Web-Scraping-AMA | ee9951e5a34b93b35d5f53f999d807199e8754a2 | [
"MIT"
] | null | null | null | metacritic/metacritic/metacritic/pipelines.py | hellozeyu/Web-Scraping-AMA | ee9951e5a34b93b35d5f53f999d807199e8754a2 | [
"MIT"
] | null | null | null | metacritic/metacritic/metacritic/pipelines.py | hellozeyu/Web-Scraping-AMA | ee9951e5a34b93b35d5f53f999d807199e8754a2 | [
"MIT"
] | 2 | 2020-04-14T13:14:03.000Z | 2021-02-14T20:39:35.000Z | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
from scrapy.exporters import CsvItemExporter
class MetacriticPipeline(object):
def __init__(self):
self.filename... | 26.321429 | 65 | 0.690638 |
224f74c7bc5844cea43da1bfb758a57c68f76b02 | 619 | py | Python | sceptre/resolvers/no_value.py | ericabrauer/sceptre | b44797ae712e1e57c2421f2d93c35a4e8104c5ee | [
"Apache-2.0"
] | null | null | null | sceptre/resolvers/no_value.py | ericabrauer/sceptre | b44797ae712e1e57c2421f2d93c35a4e8104c5ee | [
"Apache-2.0"
] | null | null | null | sceptre/resolvers/no_value.py | ericabrauer/sceptre | b44797ae712e1e57c2421f2d93c35a4e8104c5ee | [
"Apache-2.0"
] | null | null | null | from sceptre.resolvers import Resolver
class NoValue(Resolver):
"""This resolver resolves to nothing, functioning just like the AWS::NoValue special value. When
assigned to a resolvable Stack property, it will remove the config key/value from the stack or
the container on the stack where it has been assig... | 41.266667 | 100 | 0.741519 |
cda9a51eec4a42bce192dba762ea269e4ee25af6 | 33,659 | py | Python | tests/app/celery/test_letters_pdf_tasks.py | davidbgk/notification-api | 0ede6a61b48289236d1873124965d2bc22a9b27b | [
"MIT"
] | 1 | 2021-08-13T13:46:04.000Z | 2021-08-13T13:46:04.000Z | tests/app/celery/test_letters_pdf_tasks.py | davidbgk/notification-api | 0ede6a61b48289236d1873124965d2bc22a9b27b | [
"MIT"
] | null | null | null | tests/app/celery/test_letters_pdf_tasks.py | davidbgk/notification-api | 0ede6a61b48289236d1873124965d2bc22a9b27b | [
"MIT"
] | 1 | 2021-09-29T18:25:48.000Z | 2021-09-29T18:25:48.000Z | from unittest.mock import Mock, call, ANY
import base64
import boto3
from PyPDF2.utils import PdfReadError
from moto import mock_s3
from flask import current_app
from freezegun import freeze_time
import pytest
import requests_mock
from botocore.exceptions import ClientError
from celery.exceptions import MaxRetriesExce... | 41.760546 | 118 | 0.7103 |
e05acdd6b42cc495a8e5051ad2a98041c85ee74f | 86,975 | py | Python | python/paddle/fluid/tests/unittests/op_test.py | jc19chaoj/Paddle | d89f246ccdcbaeb6d790333aef43295854863a2d | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/op_test.py | jc19chaoj/Paddle | d89f246ccdcbaeb6d790333aef43295854863a2d | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/op_test.py | jc19chaoj/Paddle | d89f246ccdcbaeb6d790333aef43295854863a2d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 44.465746 | 297 | 0.546329 |
46561f3d9b2863db5d1903e9cf0fcf5b52bafd2d | 163 | py | Python | tfsnippet/variational/__init__.py | Feng37/tfsnippet | 70c7dc5c8c8f6314f9d9e44697f90068417db5cd | [
"MIT"
] | null | null | null | tfsnippet/variational/__init__.py | Feng37/tfsnippet | 70c7dc5c8c8f6314f9d9e44697f90068417db5cd | [
"MIT"
] | null | null | null | tfsnippet/variational/__init__.py | Feng37/tfsnippet | 70c7dc5c8c8f6314f9d9e44697f90068417db5cd | [
"MIT"
] | 1 | 2020-02-08T15:33:41.000Z | 2020-02-08T15:33:41.000Z | from . import chain, inference
__all__ = sum(
[m.__all__ for m in [
chain, inference,
]],
[]
)
from .chain import *
from .inference import *
| 13.583333 | 30 | 0.588957 |
6caa7f8cacc261c277ebce603fae98affa55d5ba | 3,196 | py | Python | moto/__init__.py | jzucker2/moto | ba3c9db8a76f1428892e867c68c1e2f4c04c1fa1 | [
"Apache-2.0"
] | null | null | null | moto/__init__.py | jzucker2/moto | ba3c9db8a76f1428892e867c68c1e2f4c04c1fa1 | [
"Apache-2.0"
] | null | null | null | moto/__init__.py | jzucker2/moto | ba3c9db8a76f1428892e867c68c1e2f4c04c1fa1 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import logging
# logging.getLogger('boto').setLevel(logging.CRITICAL)
__title__ = 'moto'
__version__ = '1.3.2'
from .acm import mock_acm # flake8: noqa
from .apigateway import mock_apigateway, mock_apigateway_deprecated # flake8: noqa
from .autoscaling import mock_autoscaling... | 55.103448 | 116 | 0.811952 |
acf2c0aa1f088833625b011a16bc9d7260c0cecb | 1,046 | py | Python | examples/http/hello_world.py | viatoriche/microservices | 3510563edd15dc6131b8a948d6062856cd904ac7 | [
"MIT"
] | 18 | 2016-04-04T03:01:37.000Z | 2020-08-18T03:03:40.000Z | examples/http/hello_world.py | viatoriche/microservices | 3510563edd15dc6131b8a948d6062856cd904ac7 | [
"MIT"
] | 7 | 2016-05-06T14:23:16.000Z | 2019-11-20T11:16:35.000Z | examples/http/hello_world.py | viatoriche/microservices | 3510563edd15dc6131b8a948d6062856cd904ac7 | [
"MIT"
] | 5 | 2016-05-06T08:20:40.000Z | 2019-07-13T01:34:38.000Z | from microservices.http.service import Microservice
from microservices.http.resources import ResourceMarker, ResourceSchema, BrowserResourceSchema
from flask import request
import datetime
app = Microservice(__name__)
app.config['SCHEMA'] = ResourceSchema(
response='result',
response_update=False,
status... | 23.244444 | 94 | 0.644359 |
88786442e40ed64abe2702788507b077a6669033 | 5,748 | py | Python | src/ggrc/login/__init__.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-01-12T23:46:00.000Z | 2019-01-12T23:46:00.000Z | src/ggrc/login/__init__.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc/login/__init__.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""ggrc.login
Provides basic login and session management using Flask-Login with various
backends
"""
import datetime
import json
import logging
import re
from functools import wraps
from werkzeug.exceptio... | 28.455446 | 79 | 0.727731 |
c816b4599286dff28045a91ba0f130043214e147 | 12,796 | py | Python | tools/eval.py | scoyer/DDMN | a604ac8c12627327aacf70ae0cd1c70e083870f1 | [
"Apache-2.0"
] | 9 | 2020-12-15T10:56:19.000Z | 2021-11-25T02:54:49.000Z | tools/eval.py | scoyer/DDMN | a604ac8c12627327aacf70ae0cd1c70e083870f1 | [
"Apache-2.0"
] | 2 | 2021-03-03T02:56:37.000Z | 2021-05-12T15:22:40.000Z | tools/eval.py | scoyer/DDMN | a604ac8c12627327aacf70ae0cd1c70e083870f1 | [
"Apache-2.0"
] | 3 | 2021-02-08T16:03:32.000Z | 2021-05-24T10:54:01.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
File: eval.py
"""
import argparse
import json
import numpy as np
from source.utils.metrics import moses_multi_bleu
from source.utils.metrics import compute_prf, compute_f1
def eval_bleu(eval_fp):
hyps = []
refs = []
with open(eval_fp, 'r') as fr:
f... | 38.197015 | 109 | 0.598312 |
d63a344d0eacb576c0431df08ddc18bfa27626ae | 1,038 | py | Python | interface/fake_tracking_object.py | hywel1994/RosPerception | 27f3284ad4a587eb7168e4ba9e9f37e18642fe5e | [
"MIT"
] | null | null | null | interface/fake_tracking_object.py | hywel1994/RosPerception | 27f3284ad4a587eb7168e4ba9e9f37e18642fe5e | [
"MIT"
] | null | null | null | interface/fake_tracking_object.py | hywel1994/RosPerception | 27f3284ad4a587eb7168e4ba9e9f37e18642fe5e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# for ros
import rospy
from helper.msg import BaseSensor
from helper.msg import ObjectArray
from helper.msg import Object
import math
def sensorCallback(msg):
d_object = Object()
d_object.semantic_name = 'boat'
d_object.semantic_id = 76
d_object.world_pose.point.x = msg.x_target... | 29.657143 | 86 | 0.728324 |
965edee3130c58375821db630aa53182ac0489f5 | 2,799 | py | Python | tests/test_soft_label_loss.py | jiansowa/PaddleSlim | a45431c99a775782b7fe5633f313d36ff582e797 | [
"Apache-2.0"
] | null | null | null | tests/test_soft_label_loss.py | jiansowa/PaddleSlim | a45431c99a775782b7fe5633f313d36ff582e797 | [
"Apache-2.0"
] | 1 | 2020-07-14T09:50:51.000Z | 2020-07-14T09:50:51.000Z | tests/test_soft_label_loss.py | jiansowa/PaddleSlim | a45431c99a775782b7fe5633f313d36ff582e797 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 41.161765 | 75 | 0.629511 |
4a372b24b584f8430924d32fc436f92f6eef6206 | 383 | py | Python | TWT/wsgi.py | avibn/twtcodejam.net | 938b9a536dc6407dd86651697abde4f167fc52a8 | [
"MIT"
] | null | null | null | TWT/wsgi.py | avibn/twtcodejam.net | 938b9a536dc6407dd86651697abde4f167fc52a8 | [
"MIT"
] | null | null | null | TWT/wsgi.py | avibn/twtcodejam.net | 938b9a536dc6407dd86651697abde4f167fc52a8 | [
"MIT"
] | null | null | null | """
WSGI config for TWT project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_... | 22.529412 | 78 | 0.780679 |
13295be4d0016d9a2f022227735a1b0904a9269f | 2,405 | py | Python | print_info.py | typ1c/AutoHS | b9e610e1e1301d630cca5acf1ae735890148631b | [
"MIT"
] | 49 | 2020-11-24T08:54:31.000Z | 2022-03-28T13:28:19.000Z | print_info.py | Huangyan0804/AutoHS | e5dbdb3b5366fa8d06926c9f205b32d24d5ed778 | [
"MIT"
] | 14 | 2021-07-06T14:16:01.000Z | 2022-02-24T05:01:13.000Z | print_info.py | Huangyan0804/AutoHS | e5dbdb3b5366fa8d06926c9f205b32d24d5ed778 | [
"MIT"
] | 15 | 2021-01-29T02:44:33.000Z | 2022-03-24T09:46:59.000Z | from constants.constants import *
import os
import time
error_file_handle = None
warn_file_handle = None
debug_file_handle = None
sys_file_handle = None
info_file_handle = None
def print_info_init():
global error_file_handle
global warn_file_handle
global debug_file_handle
global sys_file_handle
... | 25.860215 | 73 | 0.692308 |
5ba97a28f8525f6f2700e0c64246386b7e557a57 | 365 | py | Python | aether/api/urls.py | katajakasa/aetherguild4 | a7e294f0cff11e2508751f1013e6648fdc56bb94 | [
"MIT"
] | null | null | null | aether/api/urls.py | katajakasa/aetherguild4 | a7e294f0cff11e2508751f1013e6648fdc56bb94 | [
"MIT"
] | 1 | 2021-06-10T17:36:11.000Z | 2021-06-10T17:36:11.000Z | aether/api/urls.py | katajakasa/aetherguild4 | a7e294f0cff11e2508751f1013e6648fdc56bb94 | [
"MIT"
] | null | null | null | from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .viewsets import ForumPostViewSet
app_name = 'api'
router = DefaultRouter()
router.register(r'posts', ForumPostViewSet, 'forumpost')
urlpatterns = [
path('', include(router.urls)),
path('api-auth/', include('rest_fra... | 24.333333 | 81 | 0.753425 |
a400e2c004a9fa928335bd9b83369a17f4076353 | 154 | py | Python | website/addons/googledrive/exceptions.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | null | null | null | website/addons/googledrive/exceptions.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | 1 | 2019-08-16T13:45:12.000Z | 2019-08-16T13:45:12.000Z | website/addons/googledrive/exceptions.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | null | null | null | from website.addons.base.exceptions import AddonError
class GoogleDriveError(AddonError):
pass
class ExpiredAuthError(GoogleDriveError):
pass
| 15.4 | 53 | 0.798701 |
0fa251d632470886435bd69b33d9b2c2eb61ed88 | 11,173 | py | Python | google/cloud/dataproc_v1/services/cluster_controller/transports/base.py | medb/python-dataproc | 6a2a9afb3d0fc81b9abffa70c31746f6ca428aba | [
"Apache-2.0"
] | 34 | 2020-06-12T05:25:02.000Z | 2022-03-13T22:14:12.000Z | google/cloud/dataproc_v1/services/cluster_controller/transports/base.py | medb/python-dataproc | 6a2a9afb3d0fc81b9abffa70c31746f6ca428aba | [
"Apache-2.0"
] | 104 | 2020-02-05T12:35:54.000Z | 2022-03-30T23:17:03.000Z | google/cloud/dataproc_v1/services/cluster_controller/transports/base.py | medb/python-dataproc | 6a2a9afb3d0fc81b9abffa70c31746f6ca428aba | [
"Apache-2.0"
] | 23 | 2020-02-05T23:13:14.000Z | 2022-03-29T22:56:44.000Z | # -*- 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... | 36.275974 | 101 | 0.594558 |
147049094514e67bb8cdeca4e38bc758ed5db155 | 7,545 | py | Python | linux_utils/fstab.py | JAvito-GC/Linux-Utils | 41d8905063380f0e27475063ffaaf1a9edca6867 | [
"MIT"
] | 4 | 2018-10-20T15:49:07.000Z | 2020-12-03T03:44:52.000Z | linux_utils/fstab.py | JAvito-GC/Linux-Utils | 41d8905063380f0e27475063ffaaf1a9edca6867 | [
"MIT"
] | null | null | null | linux_utils/fstab.py | JAvito-GC/Linux-Utils | 41d8905063380f0e27475063ffaaf1a9edca6867 | [
"MIT"
] | 4 | 2017-10-18T12:49:42.000Z | 2022-03-09T16:21:09.000Z | # linux-utils: Linux system administration tools for Python.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: February 9, 2020
# URL: https://linux-utils.readthedocs.io
"""
Parsing of `/etc/fstab`_ configuration files.
.. _/etc/fstab: https://manpages.debian.org/fstab
"""
# Standard library modules.
i... | 33.986486 | 114 | 0.599867 |
ff695aff415cf94cdec11ee32b5178b9e886efe0 | 1,028 | py | Python | theano/compile/__init__.py | mrgloom/Theano | 018c7fa9a292858486b92e03a5d0a36cb3e45e1f | [
"BSD-3-Clause"
] | 1 | 2020-12-27T13:50:59.000Z | 2020-12-27T13:50:59.000Z | theano/compile/__init__.py | mrgloom/Theano | 018c7fa9a292858486b92e03a5d0a36cb3e45e1f | [
"BSD-3-Clause"
] | null | null | null | theano/compile/__init__.py | mrgloom/Theano | 018c7fa9a292858486b92e03a5d0a36cb3e45e1f | [
"BSD-3-Clause"
] | null | null | null | from theano.compile.ops import (
DeepCopyOp, deep_copy_op, register_deep_copy_op_c_code,
Shape, shape, register_shape_c_code,
Shape_i, register_shape_i_c_code,
ViewOp, view_op, register_view_op_c_code, FromFunctionOp,
as_op, Rebroadcast, register_rebroadcast_c_code,
Spec... | 32.125 | 69 | 0.774319 |
93dbe87c3fd25e67aa0d3bbea326d20f9b3882e0 | 23,069 | py | Python | rpyc/utils/server.py | odarr/rpyc | ed0c9090d942e628fb3069feade66bec904f7127 | [
"MIT"
] | 1 | 2021-07-11T09:10:58.000Z | 2021-07-11T09:10:58.000Z | rpyc/utils/server.py | odarr/rpyc | ed0c9090d942e628fb3069feade66bec904f7127 | [
"MIT"
] | null | null | null | rpyc/utils/server.py | odarr/rpyc | ed0c9090d942e628fb3069feade66bec904f7127 | [
"MIT"
] | null | null | null | """
rpyc plug-in server (threaded or forking)
"""
import sys
import os
import socket
import time
import threading # noqa: F401
import errno
import logging
from contextlib import closing
try:
import Queue
except ImportError:
import queue as Queue
from rpyc.core import SocketStream, Channel
from rpyc.utils.regis... | 40.401051 | 154 | 0.601153 |
13edad565e957adbe01f25b6814992fa151b1da3 | 2,428 | py | Python | cloudbaseinit/utils/network.py | noma4i/cloudbase-init | cf2dec9dc108b574e2b5da954151fbd347adff60 | [
"Apache-2.0"
] | 1 | 2019-04-16T11:40:36.000Z | 2019-04-16T11:40:36.000Z | cloudbaseinit/utils/network.py | noma4i/cloudbase-init | cf2dec9dc108b574e2b5da954151fbd347adff60 | [
"Apache-2.0"
] | null | null | null | cloudbaseinit/utils/network.py | noma4i/cloudbase-init | cf2dec9dc108b574e2b5da954151fbd347adff60 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 Cloudbase Solutions Srl
#
# 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 l... | 36.787879 | 78 | 0.593493 |
0e608e72f8ff463b75d345fd24b754bfbe49af12 | 1,242 | py | Python | __init__.py | nonebot/nonebot-alarm | 11cc74b90a0a0dd954bb529bec208b43a1a55035 | [
"MIT"
] | 4 | 2020-04-20T13:21:23.000Z | 2021-12-08T12:47:01.000Z | __init__.py | nonebot/nonebot-alarm | 11cc74b90a0a0dd954bb529bec208b43a1a55035 | [
"MIT"
] | 1 | 2022-02-18T05:31:55.000Z | 2022-02-18T05:31:55.000Z | __init__.py | nonebot/nonebot-alarm | 11cc74b90a0a0dd954bb529bec208b43a1a55035 | [
"MIT"
] | 2 | 2020-08-16T11:26:58.000Z | 2022-02-23T15:05:53.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@Author : yanyongyu
@Date : 2020-04-14 20:45:51
@LastEditors: yanyongyu
@LastEditTime: 2020-04-14 21:40:51
@Description : None
@GitHub : https://github.com/yanyongyu
"""
__author__ = "yanyongyu"
from nonebot import get_bot
__plugin_name__... | 28.883721 | 79 | 0.626409 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.