hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
91ab9f110198c60474d739970111db1ce3e591b6 | 767 | py | Python | partools/utils/cfi.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | partools/utils/cfi.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | partools/utils/cfi.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | import os.path as p
import partools as pt
from cryptography.fernet import Fernet
from . import g
from .log import log
from .string import like
from .file import load_txt
from .tools import list_to_dict
def get_confidential(decrypt_key='', raise_e=True):
if not p.exists(pt.cfg.CFI_PATH):
log(g.E_CFI)
... | 22.558824 | 55 | 0.627119 |
91aba8c046bac5c28664549b5de65a19ac9d1f13 | 2,932 | py | Python | getRedditData.py | norbertbin/subredditAnalysis | 1951267f8e1cd993a9a3aa294a9b7e8caee71545 | [
"MIT"
] | null | null | null | getRedditData.py | norbertbin/subredditAnalysis | 1951267f8e1cd993a9a3aa294a9b7e8caee71545 | [
"MIT"
] | null | null | null | getRedditData.py | norbertbin/subredditAnalysis | 1951267f8e1cd993a9a3aa294a9b7e8caee71545 | [
"MIT"
] | null | null | null | import time
import requests
import praw
import sqlite3 as lite
from submission import Submission
from comment import Comment
### define some constants
NUM_TOP_SUBMISSIONS = 1000
NUM_TOP_COMMENTS = 1000
MAX_COMMENT_LEVEL = 3 #how far down the comment tree should comments be read
SUBREDDIT = "IAmA"
USER_AGENT = ("Test ... | 31.191489 | 80 | 0.702251 |
91abba3d2adc0ce3668a924da98190df043dc094 | 3,661 | py | Python | public_data/migrations/0018_auto_20210926_2332.py | MTES-MCT/sparte | 3b8ae6d21da81ca761d64ae9dfe2c8f54487211c | [
"MIT"
] | null | null | null | public_data/migrations/0018_auto_20210926_2332.py | MTES-MCT/sparte | 3b8ae6d21da81ca761d64ae9dfe2c8f54487211c | [
"MIT"
] | 3 | 2022-02-10T11:47:58.000Z | 2022-02-23T18:50:24.000Z | public_data/migrations/0018_auto_20210926_2332.py | MTES-MCT/sparte | 3b8ae6d21da81ca761d64ae9dfe2c8f54487211c | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-09-26 23:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("public_data", "0017_auto_20210924_2219"),
]
operations = [
migrations.RemoveField(
model_name="artificielle2018",
na... | 32.114035 | 85 | 0.523627 |
91ac06cf00af50d960efb65a81303ad2b714b2e2 | 13,398 | py | Python | tests/test_tag.py | clemsciences/cltkv1 | 88bd45419e254f69c9467ce6b2543249c57d1503 | [
"MIT"
] | 2 | 2019-08-18T21:10:01.000Z | 2020-05-05T09:19:40.000Z | tests/test_tag.py | clemsciences/cltkv1 | 88bd45419e254f69c9467ce6b2543249c57d1503 | [
"MIT"
] | 62 | 2019-02-01T18:48:11.000Z | 2020-08-19T17:52:53.000Z | tests/test_tag.py | clemsciences/cltkv1 | 88bd45419e254f69c9467ce6b2543249c57d1503 | [
"MIT"
] | 8 | 2019-04-07T03:47:31.000Z | 2020-07-01T07:02:59.000Z | """Test cltk.tag."""
import os
import shutil
import unittest
from cltk.data.fetch import FetchCorpus
from cltk.stem.latin.j_v import JVReplacer
from cltk.tag import ner
from cltk.tag.ner import NamedEntityReplacer
from cltk.tag.pos import POSTag
from cltk.utils import CLTK_DATA_DIR
__license__ = "MIT License. See LI... | 39.175439 | 120 | 0.618003 |
91ac25a514f729397e86309cd58daf3171560b44 | 2,120 | py | Python | parlai/tasks/copa/agents.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 17 | 2020-03-27T17:25:52.000Z | 2021-11-19T03:46:25.000Z | parlai/tasks/copa/agents.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-11-01T10:12:52.000Z | 2021-12-10T09:06:44.000Z | parlai/tasks/copa/agents.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-05-04T04:37:42.000Z | 2021-07-19T11:09:37.000Z | #!/usr/bin/env python3
# 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.
from parlai.core.teachers import DialogTeacher
from .build import build
import xml.etree.ElementTree as ET
import os
im... | 27.532468 | 67 | 0.593396 |
91ac46a192931a453e66acbbec1ed141795731ba | 978 | py | Python | glimix_core/gp/__init__.py | Horta/limix-inference | 1ba102fc544f8d307412d361b574da9d4c166f8e | [
"MIT"
] | 7 | 2019-06-10T12:27:25.000Z | 2021-07-23T16:36:04.000Z | glimix_core/gp/__init__.py | Horta/limix-inference | 1ba102fc544f8d307412d361b574da9d4c166f8e | [
"MIT"
] | 12 | 2017-05-28T10:59:31.000Z | 2021-05-17T20:11:00.000Z | glimix_core/gp/__init__.py | Horta/limix-inference | 1ba102fc544f8d307412d361b574da9d4c166f8e | [
"MIT"
] | 5 | 2017-08-27T20:13:45.000Z | 2022-02-14T06:33:14.000Z | r"""
****************
Gaussian Process
****************
Introduction
^^^^^^^^^^^^
A GP is a statistical distribution :math:`Y_t`, :math:`t\in\mathrm T`, for
which any finite linear combination of samples has a joint Gaussian
distribution `[1]`_ `[2]`_.
An instance of such class of processes is defined via a mean func... | 25.736842 | 74 | 0.683027 |
91ac64ad70d69d6ed5359cdacf29d7f2827c4149 | 2,777 | py | Python | swim_pubsub/examples/subscriber/app.py | eurocontrol-swim/swim-pubsub | be46664c7ff919d6835ed005218841ea2ba39659 | [
"BSD-3-Clause"
] | null | null | null | swim_pubsub/examples/subscriber/app.py | eurocontrol-swim/swim-pubsub | be46664c7ff919d6835ed005218841ea2ba39659 | [
"BSD-3-Clause"
] | null | null | null | swim_pubsub/examples/subscriber/app.py | eurocontrol-swim/swim-pubsub | be46664c7ff919d6835ed005218841ea2ba39659 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright 2019 EUROCONTROL
==========================================
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions an... | 42.075758 | 121 | 0.745409 |
91ac69ee64f2675c8f8bcc692932b985f9a194cd | 25,206 | py | Python | hs_swat_modelinstance/serialization.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_swat_modelinstance/serialization.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_swat_modelinstance/serialization.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | import os
import logging
import rdflib
from django.db import transaction
from hs_core.serialization import GenericResourceMeta, HsDeserializationDependencyException
from hs_swat_modelinstance.models import ModelObjective, SimulationType, ModelMethod, \
ModelParameter, ModelInput
from hs_swat_modelinstance.forms ... | 52.5125 | 100 | 0.636317 |
91ac881b7226b71d4268a07c9626ff2dbecf975f | 18,041 | py | Python | lib/FitsKeyword.py | spacetelescope/MAST_HLSP | 48c1df2e6bef3e03f6eefe9f52808b345e1587b4 | [
"MIT"
] | 1 | 2017-10-16T15:30:08.000Z | 2017-10-16T15:30:08.000Z | lib/FitsKeyword.py | spacetelescope/MAST_HLSP | 48c1df2e6bef3e03f6eefe9f52808b345e1587b4 | [
"MIT"
] | 18 | 2018-05-11T16:07:48.000Z | 2018-11-19T19:45:40.000Z | lib/FitsKeyword.py | spacetelescope/MAST_HLSP | 48c1df2e6bef3e03f6eefe9f52808b345e1587b4 | [
"MIT"
] | 1 | 2017-10-03T19:38:59.000Z | 2017-10-03T19:38:59.000Z | """
Code here is designed to keep track of multiple .fits header keywords in
neatly-packaged objects.
..class:: FitsKeyword
:synopsis: This class attaches a number of parameters to a single .fits
header keyword.
..class:: FitsKeywordList
:synopsis: This list subclass assembles a group of FitsKeyword objec... | 30.892123 | 79 | 0.580456 |
91acd0d7823b451a75e0383161ba87aee135831e | 2,179 | py | Python | Wrapper/ccors.py | ahmadryan/TurbAn | b8866d103a2ca2f5fbad73bcd4416f19299f22b2 | [
"BSD-2-Clause-Patent"
] | null | null | null | Wrapper/ccors.py | ahmadryan/TurbAn | b8866d103a2ca2f5fbad73bcd4416f19299f22b2 | [
"BSD-2-Clause-Patent"
] | null | null | null | Wrapper/ccors.py | ahmadryan/TurbAn | b8866d103a2ca2f5fbad73bcd4416f19299f22b2 | [
"BSD-2-Clause-Patent"
] | 10 | 2019-03-22T15:30:12.000Z | 2021-02-10T02:55:50.000Z | import numpy as np
import matplotlib.pyplot as plt
import AnalysisFunctions as af
lddata=input('Load Data again? ')
if lddata == 'y':
from subs import create_object
rc=create_object()
rc.vars2load(['all'])
rcd=rc.__dict__
rc.loadenergies()
nltime=np.float(input("What nonlinear time? "))
slc=np.int(... | 33.015152 | 139 | 0.620468 |
91ace0b33572387bc53ffa7f054bcb887f09aa2d | 691 | py | Python | data/transcoder_evaluation_gfg/python/WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( n ) :
parity = 0
while n :
parity = ~ parity
n = n & ( n - 1 )
return parity
#TOFILL
... | 20.323529 | 64 | 0.53835 |
91acf8effabe2a1e3a421f58b7baae7330d76bfc | 878 | py | Python | Practica7/producto_ijk.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | 1 | 2021-09-30T20:05:41.000Z | 2021-09-30T20:05:41.000Z | Practica7/producto_ijk.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | null | null | null | Practica7/producto_ijk.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | null | null | null | #Análisis de Algoritmos 3CV2
# Alan Romero Lucero
# Josué David Hernández Ramírez
# Práctica 7 Strassen
import variables_globales as gb
def producto_ijk ( A, B ):
# Valida la condición de matrices de tamaño [2 ^ n x 2 ^ n].
assert len ( A ) == len ( A [ 0 ] ) == len ( B ) == len ( B [ 0 ] )
assert type ( ... | 28.322581 | 71 | 0.470387 |
91ad2d3b3d8ae1edee26a1c9e99956b286489f9e | 666 | py | Python | e2e/scripts/title.py | deepchatterjeevns/streamlit | 631d42877bd16bdec14ee124c936917b430f6ce4 | [
"Apache-2.0"
] | 4 | 2019-11-10T13:50:56.000Z | 2020-01-07T21:02:29.000Z | e2e/scripts/title.py | IliaLarchenko/streamlit | 9cdf4851148a43e4e0431d7633c5a5d729e5b1e3 | [
"Apache-2.0"
] | 4 | 2021-05-09T11:42:18.000Z | 2022-02-27T10:59:36.000Z | e2e/scripts/title.py | IliaLarchenko/streamlit | 9cdf4851148a43e4e0431d7633c5a5d729e5b1e3 | [
"Apache-2.0"
] | 1 | 2019-11-26T09:37:57.000Z | 2019-11-26T09:37:57.000Z | # -*- coding: utf-8 -*-
# Copyright 2018-2019 Streamlit Inc.
#
# 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 applicabl... | 35.052632 | 74 | 0.749249 |
91ad382c9d8747e326b907dcc0c03d6bb45f850f | 2,076 | py | Python | src/cmip6_data_citation_generator/__init__.py | znicholls/CMIP6-json-data-citation-generator | f7418410ce64944810b1daf2077a7d2443aad8d0 | [
"BSD-2-Clause"
] | 3 | 2018-06-28T11:55:31.000Z | 2018-07-09T07:01:14.000Z | src/cmip6_data_citation_generator/__init__.py | znicholls/CMIP6-json-data-citation-generator | f7418410ce64944810b1daf2077a7d2443aad8d0 | [
"BSD-2-Clause"
] | 23 | 2018-06-19T11:46:37.000Z | 2018-12-21T22:34:56.000Z | src/cmip6_data_citation_generator/__init__.py | znicholls/CMIP6-json-data-citation-generator | f7418410ce64944810b1daf2077a7d2443aad8d0 | [
"BSD-2-Clause"
] | null | null | null | from os import makedirs
from os.path import join, isdir
from .io_dcg import load_and_validate_yaml, write_json
from .drs_handling import _get_matching_paths_in_dir, _get_subject_path, _get_ids_path
from .utils import deep_substitute
from ._version import get_versions
__version__ = get_versions()["version"]
del get_v... | 32.952381 | 87 | 0.680154 |
91ad5f3f4142f3d14ffa136719782f6ba7ce78f0 | 397 | py | Python | LostEmpire/asgi.py | LTSana/lost-empire | 495397345f1226b025434e37c5e1703273f475a8 | [
"CC0-1.0"
] | null | null | null | LostEmpire/asgi.py | LTSana/lost-empire | 495397345f1226b025434e37c5e1703273f475a8 | [
"CC0-1.0"
] | null | null | null | LostEmpire/asgi.py | LTSana/lost-empire | 495397345f1226b025434e37c5e1703273f475a8 | [
"CC0-1.0"
] | null | null | null | """
ASGI config for LostEmpire project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
91ad600bd9695eb5ff52f432c3258b6b52e5cdbe | 1,017 | py | Python | nexus-ingest/nexus-xd-python-modules/nexusxd/normalizetimebeginningofmonth.py | dataplumber/nexus | f25a89e85eba098da9c6db1ff3d408dae8a6b310 | [
"Apache-2.0"
] | 23 | 2016-08-09T22:45:14.000Z | 2020-02-17T08:18:29.000Z | nexus-ingest/nexus-xd-python-modules/nexusxd/normalizetimebeginningofmonth.py | lewismc/incubator-sdap-nexus | ff98fa346303431542b8391cc2a1bf7561d1bd03 | [
"Apache-2.0"
] | 6 | 2017-04-27T21:22:17.000Z | 2021-06-01T21:45:52.000Z | nexus-ingest/nexus-xd-python-modules/nexusxd/normalizetimebeginningofmonth.py | dataplumber/nexus | f25a89e85eba098da9c6db1ff3d408dae8a6b310 | [
"Apache-2.0"
] | 5 | 2016-08-31T13:47:29.000Z | 2017-11-14T21:45:22.000Z | """
Copyright (c) 2016 Jet Propulsion Laboratory,
California Institute of Technology. All rights reserved
"""
import datetime
from pytz import timezone
from springxd.tcpstream import start_server, LengthHeaderTcpProcessor
import nexusproto.NexusContent_pb2 as nexusproto
from nexusproto.serialization import from_shape... | 25.425 | 71 | 0.767945 |
91ad7bd64162e2417925701320b03bcf06032bad | 4,891 | py | Python | rls/nn/dreamer/rssm.py | StepNeverStop/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 371 | 2019-04-26T00:37:33.000Z | 2022-03-31T07:33:12.000Z | rls/nn/dreamer/rssm.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 47 | 2019-07-21T11:51:57.000Z | 2021-08-31T08:45:22.000Z | rls/nn/dreamer/rssm.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 102 | 2019-06-29T13:11:15.000Z | 2022-03-28T13:51:04.000Z | import torch as th
import torch.distributions as td
import torch.nn.functional as F
from torch import nn
from rls.nn.activations import Act_REGISTER
from rls.nn.dreamer.distributions import OneHotDistFlattenSample
from rls.nn.layers import Layer_REGISTER
class RecurrentStateSpaceModel(nn.Module):
"""
This cl... | 39.443548 | 88 | 0.61194 |
91ada69bc6863f2a52f516b26039cb649e28e4fa | 35,093 | py | Python | pydm/widgets/timeplot.py | scalverson/pydm | 77f2ad84b072b62e695333dc399339bb32295cb7 | [
"BSD-3-Clause-LBNL"
] | 1 | 2017-07-23T07:11:48.000Z | 2017-07-23T07:11:48.000Z | pydm/widgets/timeplot.py | scalverson/pydm | 77f2ad84b072b62e695333dc399339bb32295cb7 | [
"BSD-3-Clause-LBNL"
] | null | null | null | pydm/widgets/timeplot.py | scalverson/pydm | 77f2ad84b072b62e695333dc399339bb32295cb7 | [
"BSD-3-Clause-LBNL"
] | null | null | null | import time
import json
from collections import OrderedDict
from typing import Optional
from pyqtgraph import BarGraphItem, ViewBox, AxisItem
import numpy as np
from qtpy.QtGui import QColor
from qtpy.QtCore import Signal, Slot, Property, QTimer
from .baseplot import BasePlot, BasePlotCurveItem
from .channel import PyD... | 36.901157 | 121 | 0.609267 |
91adb1fa856f8a29278c45cfe59f920c7acc9269 | 2,319 | py | Python | tests/test_augmentations.py | kartik4949/detectia | e62165372b2abac63239d540dfa8c3ee0eafd75c | [
"Apache-2.0"
] | 3 | 2021-02-02T10:59:26.000Z | 2021-11-20T07:56:29.000Z | tests/test_augmentations.py | kartik4949/detectia | e62165372b2abac63239d540dfa8c3ee0eafd75c | [
"Apache-2.0"
] | null | null | null | tests/test_augmentations.py | kartik4949/detectia | e62165372b2abac63239d540dfa8c3ee0eafd75c | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Kartik Sharma. 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 o... | 33.608696 | 83 | 0.651574 |
91adc3d5e4a1c2c0719fc7ba5f662cf571ff866e | 3,406 | py | Python | examples/prof_test/bag_of_tasks.py | chemlove/radical.ensemblemd | 0ec4b127760d2fee88d4eae1768fecec4bdd6b21 | [
"MIT"
] | null | null | null | examples/prof_test/bag_of_tasks.py | chemlove/radical.ensemblemd | 0ec4b127760d2fee88d4eae1768fecec4bdd6b21 | [
"MIT"
] | null | null | null | examples/prof_test/bag_of_tasks.py | chemlove/radical.ensemblemd | 0ec4b127760d2fee88d4eae1768fecec4bdd6b21 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = "Ole Weider <ole.weidner@rutgers.edu>"
__copyright__ = "Copyright 2014, http://radical.rutgers.edu"
__license__ = "MIT"
__example_name__ = "Bag of Tasks Example (generic)"
import sys
import os
import json
from radical.ensemblemd import Kernel
from radical.ensemblemd... | 35.852632 | 171 | 0.601585 |
91add2e427d0aa90245a169353a48e75cc7c6a27 | 4,779 | py | Python | tests/e2e_tests/user_registration/positive/user_registration_test.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 4 | 2019-08-12T19:36:58.000Z | 2021-09-14T18:48:27.000Z | tests/e2e_tests/user_registration/positive/user_registration_test.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 1 | 2021-06-02T00:01:00.000Z | 2021-06-02T00:01:00.000Z | tests/e2e_tests/user_registration/positive/user_registration_test.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 2 | 2019-08-12T10:06:00.000Z | 2020-12-25T05:52:40.000Z | # Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
# Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
import allure
from selenium.webdriver.support.wait import WebDriverWait
from se... | 34.630435 | 96 | 0.67964 |
91addeb7ecdbf5ffb5543e60e03df7a521befc6b | 3,834 | py | Python | src/GUI_config.py | volovodenko/English | 860ae0f971909b9aa299c193ea7d0161c88d0b22 | [
"Apache-2.0"
] | 31 | 2015-02-11T16:10:52.000Z | 2021-08-31T12:39:05.000Z | src/GUI_config.py | volovodenko/English | 860ae0f971909b9aa299c193ea7d0161c88d0b22 | [
"Apache-2.0"
] | 5 | 2015-05-26T09:38:02.000Z | 2015-11-12T20:54:32.000Z | src/GUI_config.py | volovodenko/English | 860ae0f971909b9aa299c193ea7d0161c88d0b22 | [
"Apache-2.0"
] | 9 | 2015-03-18T08:23:51.000Z | 2022-01-05T05:51:04.000Z | # -*- coding: utf-8 -*-
from Tkinter import PhotoImage
clr_stat_frame = "#E9F6FE"
clr_word_frame = "#FFFFE0"
clr_answer_frame = "#E9F6FE"
clr_success = "#348000"
clr_error = "#FC0039"
clr_black = "#000000"
clr_stat = ["#7B7B00", "#007B00", "#7B7B7B"]
def edit_image():
img = PhotoImage(format="gif",
... | 62.852459 | 104 | 0.709963 |
91ade1abdc4727c05feaaf7a3fb373d266a63f3e | 10,729 | py | Python | python/tvm/autotvm/tuner/model_based_tuner.py | Aimledge/tvm | f41c050fc681a9d9805e6c73e729df233e1acbac | [
"Apache-2.0"
] | null | null | null | python/tvm/autotvm/tuner/model_based_tuner.py | Aimledge/tvm | f41c050fc681a9d9805e6c73e729df233e1acbac | [
"Apache-2.0"
] | null | null | null | python/tvm/autotvm/tuner/model_based_tuner.py | Aimledge/tvm | f41c050fc681a9d9805e6c73e729df233e1acbac | [
"Apache-2.0"
] | null | null | null | # pylint: disable=no-else-return,invalid-name,consider-using-enumerate,abstract-method
"""Base class for model-based tuner
This type of tuner will fit a cost model and use some optimization methods to
find optimums points of cost model in space.
"""
import gc
import numpy as np
from .tuner import Tuner
class Featur... | 30.222535 | 99 | 0.580296 |
91ade2253d089970129f190fa204af5e98d112ac | 5,904 | py | Python | python/Temp/sandboxSimpleTreeModel.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 3 | 2016-01-19T10:36:09.000Z | 2021-01-29T01:14:45.000Z | python/Temp/sandboxSimpleTreeModel.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 2 | 2016-02-20T13:09:38.000Z | 2016-03-08T06:47:47.000Z | python/Temp/sandboxSimpleTreeModel.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 3 | 2016-02-19T16:52:57.000Z | 2017-05-16T03:06:43.000Z | #!/usr/bin/env python
############################################################################
##
## Copyright (C) 2005-2005 Trolltech AS. All rights reserved.
##
## This file is part of the example classes of the Qt Toolkit.
##
## This file may be used under the terms of the GNU General Public
## License version ... | 30.276923 | 101 | 0.585874 |
91ade70be541eb3ec1b6e8fd4866f75e2c78c35d | 2,524 | py | Python | twister2/tools/cli/src/python/list.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 63 | 2017-08-31T10:02:52.000Z | 2021-12-18T21:42:14.000Z | twister2/tools/cli/src/python/list.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 284 | 2017-10-20T15:35:26.000Z | 2020-09-11T15:25:40.000Z | twister2/tools/cli/src/python/list.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 44 | 2017-08-21T19:47:57.000Z | 2020-11-22T22:45:50.000Z | # Copyright 2016 Twitter. 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 agree... | 29.011494 | 100 | 0.684628 |
91ae0b7af39945fb04d10708b597252fadad75a0 | 4,320 | py | Python | stein/utilities/converters.py | JamesBrofos/Stein | 7b9487684411811e96c25b2cbd0ff4d8e275efd8 | [
"MIT"
] | 3 | 2018-04-27T21:03:25.000Z | 2020-06-15T22:44:20.000Z | stein/utilities/converters.py | JamesBrofos/Stein | 7b9487684411811e96c25b2cbd0ff4d8e275efd8 | [
"MIT"
] | null | null | null | stein/utilities/converters.py | JamesBrofos/Stein | 7b9487684411811e96c25b2cbd0ff4d8e275efd8 | [
"MIT"
] | 2 | 2019-11-05T19:28:12.000Z | 2020-06-30T08:50:16.000Z | import numpy as np
def convert_dictionary_to_array(dictionary):
"""This method takes a dictionary mapping TensorFlow variables to a matrix
where each row corresponds to a particle and each column is a value of a
parameter for that variable. This method returns a tuple consisting of a
matrix representa... | 48 | 80 | 0.697685 |
91ae3731978190893998945e6236422634361559 | 27,633 | py | Python | src/sage/categories/lie_algebras.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 1 | 2016-11-04T16:31:48.000Z | 2016-11-04T16:31:48.000Z | src/sage/categories/lie_algebras.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/categories/lie_algebras.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | r"""
Lie Algebras
AUTHORS:
- Travis Scrimshaw (07-15-2013): Initial implementation
"""
#*****************************************************************************
# Copyright (C) 2013 Travis Scrimshaw <tscrim at ucdavis.edu>
#
# This program is free software: you can redistribute it and/or modify
# it under... | 36.359211 | 104 | 0.536388 |
91ae378d6e52e04a340f25757de23b6fe3820ee7 | 1,034 | py | Python | pygama/dsp/_processors/asym_trap_filter.py | gothman5/pygama | 937cc6d516b874e5f9b48d3e4d0ba143ab743205 | [
"Apache-2.0"
] | 1 | 2022-01-19T14:31:56.000Z | 2022-01-19T14:31:56.000Z | pygama/dsp/_processors/asym_trap_filter.py | gothman5/pygama | 937cc6d516b874e5f9b48d3e4d0ba143ab743205 | [
"Apache-2.0"
] | null | null | null | pygama/dsp/_processors/asym_trap_filter.py | gothman5/pygama | 937cc6d516b874e5f9b48d3e4d0ba143ab743205 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from numba import guvectorize
@guvectorize(["void(float32[:], int32, int32, int32, float32[:])",
"void(float64[:], int32, int32, int32, float64[:])",
"void(int32[:], int32, int32, int32, int32[:])",
"void(int64[:], int32, int32, int32, int64[:])"],
... | 51.7 | 133 | 0.584139 |
91ae9a64c293fe864bc9f5e4138b6609da5290c5 | 2,676 | py | Python | tests/test_models.py | yunojuno/django-impersonate-permissions | a5381d2393abec1f40379c6d894736d42a3bcc4a | [
"MIT"
] | 1 | 2020-08-27T23:09:13.000Z | 2020-08-27T23:09:13.000Z | tests/test_models.py | yunojuno/django-impersonate-permissions | a5381d2393abec1f40379c6d894736d42a3bcc4a | [
"MIT"
] | null | null | null | tests/test_models.py | yunojuno/django-impersonate-permissions | a5381d2393abec1f40379c6d894736d42a3bcc4a | [
"MIT"
] | null | null | null | import datetime
from unittest import mock
import freezegun
import pytest
from django.contrib.auth import get_user_model
from django.http import HttpRequest
from django.utils import timezone
from impersonate_permissions.models import PermissionWindow, users_impersonable
User = get_user_model()
@pytest.mark.django_d... | 31.116279 | 79 | 0.671898 |
91aec1ccc6f7b18b32512d85596bd49f735f60cf | 7,985 | py | Python | clients/kratos/python/ory_kratos_client/model/self_service_verification_flow_state.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/kratos/python/ory_kratos_client/model/self_service_verification_flow_state.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/kratos/python/ory_kratos_client/model/self_service_verification_flow_state.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | """
Ory Kratos API
Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the admini... | 42.930108 | 446 | 0.601753 |
91aec1d1f5d11129c836cbaf5be3fefad24b61c0 | 2,132 | py | Python | msticpy/data/drivers/security_graph_driver.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | 820 | 2019-05-16T07:24:34.000Z | 2022-03-31T09:18:10.000Z | msticpy/data/drivers/security_graph_driver.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | 205 | 2019-06-24T19:24:19.000Z | 2022-03-30T23:13:46.000Z | msticpy/data/drivers/security_graph_driver.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | 171 | 2019-06-23T13:53:12.000Z | 2022-03-29T18:22:46.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Securit... | 30.028169 | 76 | 0.562852 |
91aef15cc067f3d4e7a00650db16e805b85544a1 | 60 | py | Python | dags/oss_know/libs/base_dict/options.py | ynang/airflow-jobs-1 | 857e9dfbc2444dc1d23dd2b0463fe89108f01b89 | [
"Apache-2.0"
] | 4 | 2022-01-24T11:27:39.000Z | 2022-02-25T11:44:10.000Z | dags/oss_know/libs/base_dict/options.py | linruoma/airflow-jobs-1 | 25d3996c6d11ee2d8f93ff2b73abcf83da986804 | [
"Apache-2.0"
] | 13 | 2021-12-17T12:14:11.000Z | 2022-02-24T07:01:08.000Z | dags/oss_know/libs/base_dict/options.py | linruoma/airflow-jobs-1 | 25d3996c6d11ee2d8f93ff2b73abcf83da986804 | [
"Apache-2.0"
] | 13 | 2022-01-19T09:30:03.000Z | 2022-03-02T10:45:07.000Z | GITHUB_SLEEP_TIME_MIN = 0.001
GITHUB_SLEEP_TIME_MAX = 0.002
| 20 | 29 | 0.833333 |
91af019fa37541ce65e05660b9b246b4d9652e42 | 42,947 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_agent_pools_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_agent_pools_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_11_01_preview/operations/_agent_pools_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 44.138746 | 263 | 0.673574 |
91af0ba95231c6b2d17caa90cbfcaaaa1cee6533 | 1,255 | py | Python | e2e_tests/test_workspace_templates.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | e2e_tests/test_workspace_templates.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | e2e_tests/test_workspace_templates.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | import pytest
from httpx import AsyncClient
from starlette import status
import config
from helpers import get_auth_header, get_template
from resources import strings
pytestmark = pytest.mark.asyncio
workspace_templates = [
(strings.BASE_WORKSPACE),
(strings.INNEREYE)
]
@pytest.mark.smoke
@pytest.mark.p... | 35.857143 | 180 | 0.784064 |
91af43b4ba74745321c20950ee1f8a31fc97e45b | 1,480 | py | Python | setup.py | MichaelKorn/smbprotocol | 2471c457ad33e6edf58dfdad2717ea542e12fd15 | [
"MIT"
] | null | null | null | setup.py | MichaelKorn/smbprotocol | 2471c457ad33e6edf58dfdad2717ea542e12fd15 | [
"MIT"
] | null | null | null | setup.py | MichaelKorn/smbprotocol | 2471c457ad33e6edf58dfdad2717ea542e12fd15 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
import os
from setuptools import setup
def abs_path(rel_path):
return os.path.join(os.path.dirname(__file__), rel_path)
with ... | 28.461538 | 71 | 0.620946 |
91af46d81d8add25290aeaa500f63278777faee6 | 6,881 | py | Python | dddm/recoil_rates/spectrum.py | JoranAngevaare/dddm | 3461e37984bac4d850beafecc9d1881b84fb226c | [
"MIT"
] | null | null | null | dddm/recoil_rates/spectrum.py | JoranAngevaare/dddm | 3461e37984bac4d850beafecc9d1881b84fb226c | [
"MIT"
] | 85 | 2021-09-20T12:08:53.000Z | 2022-03-30T12:48:06.000Z | dddm/recoil_rates/spectrum.py | JoranAngevaare/dddm | 3461e37984bac4d850beafecc9d1881b84fb226c | [
"MIT"
] | null | null | null | import numericalunits as nu
import numpy as np
import pandas as pd
import wimprates as wr
import dddm
from dddm import utils
import typing as ty
from .halo import SHM
from .halo_shielded import ShieldedSHM
export, __all__ = dddm.exporter()
@export
class GenSpectrum:
required_detector_fields = 'name material type... | 38.227778 | 89 | 0.532481 |
91af829ca573dd9e19de165f4e184c92f46862c4 | 8,714 | py | Python | modin/engines/dask/pandas_on_dask/frame/partition.py | gatech-sysml/modin | 76d19217bc1e33e4c47f7740b4fd2490d3ce7777 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | modin/engines/dask/pandas_on_dask/frame/partition.py | gatech-sysml/modin | 76d19217bc1e33e4c47f7740b4fd2490d3ce7777 | [
"ECL-2.0",
"Apache-2.0"
] | 57 | 2021-01-22T15:52:03.000Z | 2021-06-12T18:22:04.000Z | modin/engines/dask/pandas_on_dask/frame/partition.py | gatech-sysml/modin | 76d19217bc1e33e4c47f7740b4fd2490d3ce7777 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... | 32.274074 | 89 | 0.62302 |
91af88ec2785f82b3ad0da0813cb13fab6c66648 | 35,709 | py | Python | oscar/run_pretrain_ml.py | Junction4Nako/mvp_pytorch | 66db043d7beb1481c7a4c62908a4a46c7bfbc57a | [
"MIT"
] | 20 | 2022-02-27T16:26:57.000Z | 2022-03-23T07:09:47.000Z | oscar/run_pretrain_ml.py | Junction4Nako/mvp_pytorch | 66db043d7beb1481c7a4c62908a4a46c7bfbc57a | [
"MIT"
] | 4 | 2022-03-09T11:16:00.000Z | 2022-03-28T13:03:26.000Z | oscar/run_pretrain_ml.py | Junction4Nako/mvp_pytorch | 66db043d7beb1481c7a4c62908a4a46c7bfbc57a | [
"MIT"
] | 6 | 2022-03-05T07:28:07.000Z | 2022-03-24T09:38:10.000Z | from __future__ import absolute_import, division, print_function
import argparse
import datetime
import json
import logging
import os
import random
import sys
import time
import math
import shutil
import deepspeed
import json
from torch.distributed.distributed_c10d import barrier
sys.path.insert(0, '.')
import nump... | 46.315175 | 213 | 0.608866 |
91afa23246c8d530efa56d3558f7030a52e025fa | 23 | py | Python | gloo/__init__.py | tshauck/Gloo | 46a1f362ba0fc2d2715ebd54a486ff214c5a83d9 | [
"BSD-3-Clause"
] | 9 | 2016-01-27T17:17:20.000Z | 2018-05-30T15:52:44.000Z | gloo/__init__.py | tshauck/Gloo | 46a1f362ba0fc2d2715ebd54a486ff214c5a83d9 | [
"BSD-3-Clause"
] | null | null | null | gloo/__init__.py | tshauck/Gloo | 46a1f362ba0fc2d2715ebd54a486ff214c5a83d9 | [
"BSD-3-Clause"
] | null | null | null | from .gloo import Gloo
| 11.5 | 22 | 0.782609 |
91afb89ab99cfdf9496743c4da7237c5102504d3 | 4,747 | py | Python | homeassistant/components/powerwall/binary_sensor.py | some-guy-in-oz/core | b40bcaf1fd6ed7f2709b4d1d05ee50a8ae41f233 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/powerwall/binary_sensor.py | some-guy-in-oz/core | b40bcaf1fd6ed7f2709b4d1d05ee50a8ae41f233 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/powerwall/binary_sensor.py | some-guy-in-oz/core | b40bcaf1fd6ed7f2709b4d1d05ee50a8ae41f233 | [
"Apache-2.0"
] | null | null | null | """Support for powerwall binary sensors."""
from tesla_powerwall import GridStatus
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_BATTERY_CHARGING,
DEVICE_CLASS_CONNECTIVITY,
BinarySensorEntity,
)
from homeassistant.const import DEVICE_CLASS_POWER
from .const import (
DOMAIN,
PO... | 27.598837 | 87 | 0.689067 |
91afc3d72704911aaf10bed846a1856430d5a424 | 19,714 | py | Python | fabric_cf/actor/test/core/kernel/kernel_test.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | fabric_cf/actor/test/core/kernel/kernel_test.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | 67 | 2020-12-21T15:39:49.000Z | 2022-02-27T17:55:00.000Z | fabric_cf/actor/test/core/kernel/kernel_test.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2020 FABRIC Testbed
#
# 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 ... | 38.131528 | 98 | 0.657502 |
91afccef504de1438fcddb936c348171c95e8773 | 2,378 | py | Python | mi/dataset/driver/velpt_ab/dcl/velpt_ab_dcl_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/driver/velpt_ab/dcl/velpt_ab_dcl_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/driver/velpt_ab/dcl/velpt_ab_dcl_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
@package mi.dataset.driver.velpt_ab.dcl
@file mi-dataset/mi/dataset/driver/velpt_ab/dcl/velpt_ab_dcl_recovered_driver.py
@author Joe Padula
@brief Recovered driver for the velpt_ab_dcl instrument
Release notes:
Initial Release
"""
from mi.dataset.dataset_parser import DataSetDriverConfigKe... | 37.15625 | 108 | 0.751051 |
91afd5380dcc7082537988771eb3bfe7bb316cb3 | 6,667 | py | Python | scripts/Amram_AI_Weapon_Lists.py | dhanin/friendly-bassoon | fafcfd3921805baddc1889dc0ee2fa367ad882f8 | [
"BSD-3-Clause"
] | 2 | 2021-11-17T10:59:38.000Z | 2021-11-17T10:59:45.000Z | scripts/Amram_AI_Weapon_Lists.py | dhanin/nws | 87a3f24a7887d84b9884635064b48d456b4184e2 | [
"BSD-3-Clause"
] | null | null | null | scripts/Amram_AI_Weapon_Lists.py | dhanin/nws | 87a3f24a7887d84b9884635064b48d456b4184e2 | [
"BSD-3-Clause"
] | null | null | null | #new home for the weaponry lists, they shouldn't be in the core file
#hopefully in 1.4 the entire purpose of this file dissolves and these lists go away.
def target_flags(flag, val):
while flag > 0:
if flag == val:
return True
elif flag < val:
return False
else:
... | 40.162651 | 137 | 0.588721 |
91aff9a30d73371154d994bc4780708346d62912 | 564 | py | Python | abc/195/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/195/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/195/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
def main():
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
A, B, W = na()
W *= 1000
ans_min = float('inf')
ans_max = -1
for i in range(1, 1000 * 1000 + 1):
... | 19.448276 | 57 | 0.526596 |
91b010f53540a78cbc4ff49dcfe4586ed502287d | 1,544 | py | Python | layers/attention.py | rayding24/First-Principles-Transformers | 075b87e5dad81f66e081afb45dd3a4c3b7926bfe | [
"MIT"
] | null | null | null | layers/attention.py | rayding24/First-Principles-Transformers | 075b87e5dad81f66e081afb45dd3a4c3b7926bfe | [
"MIT"
] | null | null | null | layers/attention.py | rayding24/First-Principles-Transformers | 075b87e5dad81f66e081afb45dd3a4c3b7926bfe | [
"MIT"
] | null | null | null | import torch
import math
import torch.nn.functional as F
from torch.autograd import Variable
import torch.nn as nn
from torch import einsum
'''
Ray Ding
rayding2011@gmail.com
Sept. 2020
'''
def attention(Q, K, V, mask=None):
''' Functional implementation for scaled dot product attention formula with optional bi... | 29.132075 | 103 | 0.624352 |
91b021d79e02ebf3dfe198ffc9eb200b6749845a | 12,373 | py | Python | flask_app.py | rafaelgramoschi/warehouse.api.flask | 8d726f0fc6ce6ab4cc421c30493f03e6ae9dca52 | [
"MIT"
] | null | null | null | flask_app.py | rafaelgramoschi/warehouse.api.flask | 8d726f0fc6ce6ab4cc421c30493f03e6ae9dca52 | [
"MIT"
] | null | null | null | flask_app.py | rafaelgramoschi/warehouse.api.flask | 8d726f0fc6ce6ab4cc421c30493f03e6ae9dca52 | [
"MIT"
] | null | null | null | """
# REQUIREMENTS
pip3 install Flask
pip3 install Flask-SQLAlchemy
pip3 install psycopg2 # postgresql connector
pip3 install Flask-Migrate # used to migrate database
pip3 install Flask-Script # used to write commands & configs & scripts
superuser manages all items (units, boxes, users)
warehouse:
unit (org_id):
... | 30.400491 | 160 | 0.717611 |
91b07710c41e139db62584c0cb2e6ab4f3286626 | 185 | py | Python | tools/templates/test/src/main/python/integration/test/hashtest/input.py | shuangshuangwang/SMV | 021faece3f0fefca6051df8415789b14bc9a60ed | [
"Apache-2.0"
] | null | null | null | tools/templates/test/src/main/python/integration/test/hashtest/input.py | shuangshuangwang/SMV | 021faece3f0fefca6051df8415789b14bc9a60ed | [
"Apache-2.0"
] | null | null | null | tools/templates/test/src/main/python/integration/test/hashtest/input.py | shuangshuangwang/SMV | 021faece3f0fefca6051df8415789b14bc9a60ed | [
"Apache-2.0"
] | null | null | null | import smv
class table1(smv.SmvCsvFile):
def path(self):
return "hashtest/table.csv"
class table2(smv.SmvCsvFile):
def path(self):
return "hashtest/table.csv"
| 18.5 | 35 | 0.664865 |
91b08aa29f3a69b8d33cec6138bdafe17a8c910c | 658 | py | Python | StreamPy/tutorial_many_to_many.py | AnomalyInc/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | 2 | 2017-04-27T11:04:27.000Z | 2019-02-07T21:03:32.000Z | StreamPy/tutorial_many_to_many.py | StreamPy/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | null | null | null | StreamPy/tutorial_many_to_many.py | StreamPy/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | null | null | null | from Stream import Stream
from Operators import ef
from examples_element_wrapper import print_stream
from tutorial_split import execute
import random
"""Example illustrating multiple input stream, multiple
output streams for the tutorial.
"""
# Create streams
x = [Stream('a'), Stream('b')]
y = Stream('y')
z = Stream(... | 22.689655 | 55 | 0.724924 |
91b0ab468e85d9c1e456b0f170f9dfc565f42ff9 | 15,094 | py | Python | tests/json-fixtures/test_state.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 1 | 2019-01-21T05:44:23.000Z | 2019-01-21T05:44:23.000Z | tests/json-fixtures/test_state.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | tests/json-fixtures/test_state.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | import logging
import os
import pytest
from eth_keys import keys
from eth_utils import (
to_bytes,
to_tuple,
ValidationError,
)
from eth_hash.auto import keccak
from eth_typing.enums import (
ForkName
)
from eth.db import (
get_db_backend,
)
from eth.db.chain import ChainDB
from eth.vm.forks ... | 42.398876 | 145 | 0.727044 |
91b0b17547ca85d2df137d1badcd228d6c33635c | 1,189 | py | Python | bumpsemver/functions.py | zhaow-de/bumpsemver | 5979d7339400a0b732c795427db2c898ba600c8d | [
"MIT"
] | null | null | null | bumpsemver/functions.py | zhaow-de/bumpsemver | 5979d7339400a0b732c795427db2c898ba600c8d | [
"MIT"
] | null | null | null | bumpsemver/functions.py | zhaow-de/bumpsemver | 5979d7339400a0b732c795427db2c898ba600c8d | [
"MIT"
] | null | null | null | import re
class NumericFunction:
"""
This is a class that provides a numeric function for version parts.
It simply starts with the provided first_value (0 by default) and increases it following the sequence of integer numbers.
This function also supports alphanumeric parts, altering just the numeric ... | 36.030303 | 133 | 0.643398 |
91b0b5391d9d5c226861fd76581d82f67670c2a7 | 443 | py | Python | hifi-gan/env.py | sarmilaupadhyaya/MultiSpeaker-TTS-V1 | 4b6351f74145f254521e4946e10fa646d6ec197c | [
"MIT"
] | 1 | 2022-03-14T13:06:48.000Z | 2022-03-14T13:06:48.000Z | hifi-gan/env.py | sarmilaupadhyaya/MultiSpeaker-TTS-V1 | 4b6351f74145f254521e4946e10fa646d6ec197c | [
"MIT"
] | null | null | null | hifi-gan/env.py | sarmilaupadhyaya/MultiSpeaker-TTS-V1 | 4b6351f74145f254521e4946e10fa646d6ec197c | [
"MIT"
] | null | null | null | """ from https://github.com/jik876/hifi-gan """
import os
import shutil
class AttrDict(dict):
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
def build_env(config, config_name, path):
t_path = os.path.join(path, config_name)
if c... | 24.611111 | 64 | 0.6614 |
91b0c82cbb7f91fbe0dd632f0c0f9cdd51e55831 | 477 | py | Python | plugins/houdini/publish/collect_cache_root.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | plugins/houdini/publish/collect_cache_root.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | plugins/houdini/publish/collect_cache_root.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z |
import os
import pyblish.api
class CollectCacheRoot(pyblish.api.InstancePlugin):
"""Inject cache storage root path into instance"""
order = pyblish.api.CollectorOrder
label = "Root Path For Cache"
hosts = ["houdini"]
families = [
"reveries.vdbcache",
"reveries.pointcache",
... | 22.714286 | 66 | 0.645702 |
91b0cc02a776adcc6094d6212d0a9df1dd3dbcd7 | 2,537 | py | Python | graviti/client/label.py | wangyuqing0424/graviti-python-sdk | 66300cc1edda6a848cac094899afb3d0421c595d | [
"MIT"
] | null | null | null | graviti/client/label.py | wangyuqing0424/graviti-python-sdk | 66300cc1edda6a848cac094899afb3d0421c595d | [
"MIT"
] | null | null | null | graviti/client/label.py | wangyuqing0424/graviti-python-sdk | 66300cc1edda6a848cac094899afb3d0421c595d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2022 Graviti. Licensed under MIT License.
#
"""Interfaces about the label."""
from typing import Any, Dict, Optional
from urllib.parse import urljoin
from graviti.client.requests import URL_PATH_PREFIX, open_api_do
def get_label_statistics(
url: str,
access_key: str,
... | 29.5 | 99 | 0.475759 |
91b0dc08789cb53e5906517dac15693fd9e288bd | 1,784 | py | Python | tests/h/models/token_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | tests/h/models/token_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | 4 | 2020-03-24T17:38:24.000Z | 2022-03-02T05:45:01.000Z | tests/h/models/token_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from h.models import Token
class TestToken:
def test_ttl_is_none_if_token_has_no_expires(self):
assert Token().ttl is None
def test_ttl_when_token_does_expire(self):
expires = datetime.datetime.utcnow() + datet... | 31.298246 | 88 | 0.734865 |
91b100e7cd9e3b055878ab3368b7a64c44fad549 | 931 | py | Python | containers/test_build_compose.py | CPSSD/rabble | 88ad5f4cfd49c00037ffdd0f0b5d463dcbf299c9 | [
"MIT"
] | 3 | 2020-03-17T23:18:39.000Z | 2021-03-06T02:56:46.000Z | containers/test_build_compose.py | CPSSD/rabble | 88ad5f4cfd49c00037ffdd0f0b5d463dcbf299c9 | [
"MIT"
] | 3 | 2020-03-21T08:47:34.000Z | 2020-05-11T21:56:56.000Z | containers/test_build_compose.py | CPSSD/rabble | 88ad5f4cfd49c00037ffdd0f0b5d463dcbf299c9 | [
"MIT"
] | 1 | 2020-03-17T14:13:54.000Z | 2020-03-17T14:13:54.000Z | import unittest
from build_compose import replace_vars
class BuildComposeTest(unittest.TestCase):
def setUp(self):
pass
def test_single_var(self):
config = "who's a good boy? [[GOOD_BOY]] is!"
environ = {"RABBLE_GOOD_BOY": "Noah"}
rep = replace_vars(config, environ)
se... | 29.09375 | 59 | 0.58754 |
91b112630f9a28a379f7454097df4a81660a44f2 | 204 | py | Python | accounting/accounting/doctype/account/test_account.py | JagdishKadam95/AccountingApp | 4988b191de503712f6bd9774dee7ef66f28c12cc | [
"MIT"
] | null | null | null | accounting/accounting/doctype/account/test_account.py | JagdishKadam95/AccountingApp | 4988b191de503712f6bd9774dee7ef66f28c12cc | [
"MIT"
] | null | null | null | accounting/accounting/doctype/account/test_account.py | JagdishKadam95/AccountingApp | 4988b191de503712f6bd9774dee7ef66f28c12cc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, jack and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class Testaccount(unittest.TestCase):
pass
| 18.545455 | 43 | 0.754902 |
91b1371005ec75c8998bb398be9af99d46d0c99c | 1,030 | py | Python | talks-articles/self/odd-even-sort.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 37 | 2015-02-01T23:16:39.000Z | 2021-12-22T16:50:48.000Z | talks-articles/self/odd-even-sort.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 1 | 2017-03-02T04:55:48.000Z | 2018-01-14T10:51:11.000Z | talks-articles/self/odd-even-sort.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 15 | 2015-03-02T08:09:01.000Z | 2021-06-10T03:25:41.000Z | #!/usr/bin/env python2
import pprint
import sys
def sort_pairs_base(base, somelist):
len_somelist = len(somelist)-1
while base<len_somelist:
if somelist[base] > somelist[base+1]:
swap_temp = somelist[base]
somelist[base] = somelist[base+1]
somelist[base+1] = swap_... | 23.409091 | 55 | 0.640777 |
91b1416fccfcaf3b141cc2b4cc2e1fdacc8115ad | 2,748 | py | Python | DevelopmentNotebook.py | bkbncn/MatrixInverse | dcba9a22dc02404bdca5b103cf29656da6fc028f | [
"Unlicense"
] | 15 | 2018-11-01T04:01:22.000Z | 2022-01-16T08:01:57.000Z | DevelopmentNotebook.py | bkbncn/MatrixInverse | dcba9a22dc02404bdca5b103cf29656da6fc028f | [
"Unlicense"
] | 2 | 2020-01-27T16:11:53.000Z | 2021-04-27T18:47:52.000Z | DevelopmentNotebook.py | bkbncn/MatrixInverse | dcba9a22dc02404bdca5b103cf29656da6fc028f | [
"Unlicense"
] | 12 | 2019-07-23T13:43:46.000Z | 2021-08-28T13:08:24.000Z | #!/usr/bin/env python
# coding: utf-8
# In[1]:
def print_matrix(Title, M):
print(Title)
for row in M:
print([round(x,3)+0 for x in row])
def print_matrices(Action, Title1, M1, Title2, M2):
print(Action)
print(Title1, '\t'*int(len(M1)/2)+"\t"*len(M1), Title2)
for i in range(len(M1... | 20.507463 | 78 | 0.55131 |
91b14c17e5a296bd2c83c1b0096cccde13404e86 | 6,119 | py | Python | milestone_reader/apps/milestones/views_history.py | IQSS/milestone-reader | 2fc4c0abe3be3e242ca57a1e703cae7ec242bfd4 | [
"MIT"
] | 6 | 2015-01-06T06:55:14.000Z | 2021-05-18T18:12:15.000Z | milestone_reader/apps/milestones/views_history.py | IQSS/milestone-reader | 2fc4c0abe3be3e242ca57a1e703cae7ec242bfd4 | [
"MIT"
] | 3 | 2015-02-21T19:09:17.000Z | 2015-10-21T13:09:47.000Z | milestone_reader/apps/milestones/views_history.py | IQSS/milestone-reader | 2fc4c0abe3be3e242ca57a1e703cae7ec242bfd4 | [
"MIT"
] | 1 | 2019-10-26T03:17:49.000Z | 2019-10-26T03:17:49.000Z | from __future__ import print_function
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect, HttpResponse, Http404
from django.template import RequestContext
from django.views.decorators.cache import cache_page
from django.db.models import Q
from milestone_reader.utils.msg_uti... | 37.539877 | 150 | 0.694885 |
91b15663f82152d999a44c164051f37e12655b7c | 5,192 | py | Python | collipa/static/js/ext/jfu/server/gae-python/main.py | ywmmmw/collipa | cd0e0f102fcd60992915a2a21d39f1b91f4e39d3 | [
"WTFPL"
] | null | null | null | collipa/static/js/ext/jfu/server/gae-python/main.py | ywmmmw/collipa | cd0e0f102fcd60992915a2a21d39f1b91f4e39d3 | [
"WTFPL"
] | null | null | null | collipa/static/js/ext/jfu/server/gae-python/main.py | ywmmmw/collipa | cd0e0f102fcd60992915a2a21d39f1b91f4e39d3 | [
"WTFPL"
] | null | null | null | # -*- coding: utf-8 -*-
#
# jQuery File Upload Plugin GAE Python Example 2.0
# https://github.com/blueimp/jQuery-File-Upload
#
# Copyright 2011, Sebastian Tschan
# https://blueimp.net
#
# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT
#
from google.appengine.api import files, images
from goo... | 34.613333 | 70 | 0.555277 |
91b1af99aa9bc10aa75d2c50f7234397006fe094 | 4,999 | py | Python | rest/urls.py | istarnes/restit | 24d2805ab68696cab7718cc1164b7f716582ffb7 | [
"0BSD"
] | null | null | null | rest/urls.py | istarnes/restit | 24d2805ab68696cab7718cc1164b7f716582ffb7 | [
"0BSD"
] | null | null | null | rest/urls.py | istarnes/restit | 24d2805ab68696cab7718cc1164b7f716582ffb7 | [
"0BSD"
] | null | null | null | from django.conf.urls import *
from django.conf import settings
from django.urls import path, include
import django
from . import views
import pkgutil
import importlib
import sys
import version
import time
from datetime import datetime
import platform
import subprocess
from . import joke
from . import helpers
import t... | 26.172775 | 104 | 0.571514 |
91b1b3b3b31ba189db2da550b5add9febaca2cbc | 5,660 | py | Python | apysc/_display/fill_color_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | apysc/_display/fill_color_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | apysc/_display/fill_color_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | """Class implementation for fill color interface.
"""
from typing import Dict
from typing import Union
from apysc._animation.animation_fill_color_interface import \
AnimationFillColorInterface
from apysc._type.attr_linking_interface import AttrLinkingInterface
from apysc._type.revert_interface import Rev... | 33.690476 | 80 | 0.589223 |
91b1c7f879e0fcadaaf8a3e91ad1a4a03e9a5363 | 1,901 | py | Python | tests/constraints/test_fault_constraint.py | pnnl/SOSAT | 610f99e0bb80f2f5e7836e7e3b6b816e029838bb | [
"BSD-3-Clause"
] | null | null | null | tests/constraints/test_fault_constraint.py | pnnl/SOSAT | 610f99e0bb80f2f5e7836e7e3b6b816e029838bb | [
"BSD-3-Clause"
] | 1 | 2021-03-22T18:59:05.000Z | 2021-03-22T18:59:05.000Z | tests/constraints/test_fault_constraint.py | pnnl/SOSAT | 610f99e0bb80f2f5e7836e7e3b6b816e029838bb | [
"BSD-3-Clause"
] | null | null | null | import pytest
from scipy.stats import lognorm, uniform
import matplotlib.pyplot as plt
import pint
from SOSAT import StressState
from SOSAT.constraints import FaultConstraint
units = pint.UnitRegistry()
# depth in feet
depth = 4360 * units('ft')
# vertical stress calculated from integration of density log
sigV = 1.1... | 31.163934 | 65 | 0.669648 |
91b1c941aab1b5aa4e00bc4c457a5dba1f3e7bfc | 2,050 | py | Python | pysoa/server/middleware.py | manuelcorrales/pysoa | 60aba7ba7d8805d0b347e9218a5a6d1700f8fe64 | [
"Apache-2.0"
] | null | null | null | pysoa/server/middleware.py | manuelcorrales/pysoa | 60aba7ba7d8805d0b347e9218a5a6d1700f8fe64 | [
"Apache-2.0"
] | null | null | null | pysoa/server/middleware.py | manuelcorrales/pysoa | 60aba7ba7d8805d0b347e9218a5a6d1700f8fe64 | [
"Apache-2.0"
] | null | null | null | from __future__ import (
absolute_import,
unicode_literals,
)
class ServerMiddleware(object):
"""
Base middleware class for server middleware. Not required, but provides some helpful stubbed methods and
documentation that you should follow for creating your middleware classes. If you extend this c... | 41.836735 | 118 | 0.686829 |
91b1db952dbd37d56cb63590bf3220f67a2e600c | 748 | py | Python | train_alexnet_selfsim.py | SimuJenni/Correspondences | 384c0272e438ad3e7c936f5ae78fe6154b188c54 | [
"MIT"
] | null | null | null | train_alexnet_selfsim.py | SimuJenni/Correspondences | 384c0272e438ad3e7c936f5ae78fe6154b188c54 | [
"MIT"
] | null | null | null | train_alexnet_selfsim.py | SimuJenni/Correspondences | 384c0272e438ad3e7c936f5ae78fe6154b188c54 | [
"MIT"
] | null | null | null | from Preprocessor import Preprocessor
from datasets.ImageNet import ImageNet
from eval.AlexTrainer_sorted import CNetTrainer
from models.AlexNet_self_sim import AlexNet
from constants import LOG_DIR
import os
target_shape = [256, 256, 3]
model = AlexNet(batch_size=64)
data = ImageNet()
preprocessor = Preprocessor(targ... | 44 | 111 | 0.804813 |
91b1fd3875e1f768809cbb88902b332533254c4a | 227 | py | Python | run.py | John-Trager/Kettle | e06547c3d89988bc32005e7e4d08d4970970ab04 | [
"Apache-2.0"
] | 1 | 2021-02-08T07:17:08.000Z | 2021-02-08T07:17:08.000Z | run.py | John-Trager/Kettle | e06547c3d89988bc32005e7e4d08d4970970ab04 | [
"Apache-2.0"
] | null | null | null | run.py | John-Trager/Kettle | e06547c3d89988bc32005e7e4d08d4970970ab04 | [
"Apache-2.0"
] | null | null | null | from app import app
if __name__ == "__main__":
# TODO: if expanding upon this project or using it for something else
# I reccomend turning on debug=True to help while developing
app.run(debug=False, host='0.0.0.0') | 37.833333 | 73 | 0.713656 |
91b231c73af7a7db68db9e0974427cf545b839ab | 6,907 | py | Python | testSocialBandits.py | neu-spiral/OnlineSocialRecommendations | 089a1382855e83bfc3dc5d3022f26841ba18466e | [
"MIT"
] | null | null | null | testSocialBandits.py | neu-spiral/OnlineSocialRecommendations | 089a1382855e83bfc3dc5d3022f26841ba18466e | [
"MIT"
] | null | null | null | testSocialBandits.py | neu-spiral/OnlineSocialRecommendations | 089a1382855e83bfc3dc5d3022f26841ba18466e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
from SocialBandits import *
import matplotlib
#not using the X display
matplotlib.use('Agg',force=True)
import matplotlib.pyplot as plt
def testSocialBandits(P, U0, n, d, H, M, alpha, sigma, lam, delta, scale,\
finiteSet, sto... | 43.440252 | 134 | 0.615173 |
91b238b45a0352f204cc64c40e6beb9da08b032e | 2,299 | py | Python | extensions/nodeconf/scripts/copy_nodeconf_for_duino.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 1 | 2020-04-28T23:25:50.000Z | 2020-04-28T23:25:50.000Z | extensions/nodeconf/scripts/copy_nodeconf_for_duino.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 11 | 2020-01-30T16:27:24.000Z | 2020-08-09T06:25:06.000Z | extensions/nodeconf/scripts/copy_nodeconf_for_duino.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# copy_nodeconf_for_duino.py 21.4.2020/pekka
# Copies nodeconf library files needed for PlatformIO Arduino build
# into /coderoot/lib/arduino-platformio/nodeconf directory.
# To make this look like Arduino library all .c and .cpp
# files are copied to target root folder, and all header
# files in... | 28.7375 | 69 | 0.60983 |
91b2471fa5768a0d53f91b6e13db1c876b265ab0 | 4,223 | py | Python | ocean_lib/web3_internal/event_listener.py | araa47/ocean.py | 71549c5b28a37e394fab6376aaf4aff92ab3241b | [
"Apache-2.0"
] | null | null | null | ocean_lib/web3_internal/event_listener.py | araa47/ocean.py | 71549c5b28a37e394fab6376aaf4aff92ab3241b | [
"Apache-2.0"
] | null | null | null | ocean_lib/web3_internal/event_listener.py | araa47/ocean.py | 71549c5b28a37e394fab6376aaf4aff92ab3241b | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
import logging
import time
from datetime import datetime
from threading import Thread
from ocean_lib.web3_internal.contract_handler import ContractHandler
from ocean_lib.web3_internal.event_filter import EventFilter
logger = logging.g... | 32.992188 | 97 | 0.585603 |
91b25784681e6936c3529e897b638b1c7570f268 | 384 | py | Python | accounts/forms.py | DanielPDWalker/blacksentryclone | 6d5cb5b278e332662de9bcd5d92e8463dece93a0 | [
"MIT"
] | null | null | null | accounts/forms.py | DanielPDWalker/blacksentryclone | 6d5cb5b278e332662de9bcd5d92e8463dece93a0 | [
"MIT"
] | 5 | 2021-03-30T14:03:20.000Z | 2021-09-22T19:26:40.000Z | accounts/forms.py | DanielPDWalker/blacksentryclone | 6d5cb5b278e332662de9bcd5d92e8463dece93a0 | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth import login, authenticate
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
class RegisterForm(UserCreationForm):
email = forms.EmailField()
class Meta:
model = User
fields = ["username", "email... | 25.6 | 64 | 0.731771 |
91b270a91c2e7ce6d4c63e1c0dea19d9925ede95 | 8,126 | py | Python | alipay/aop/api/domain/AlipayFundTransUniTransferModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayFundTransUniTransferModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayFundTransUniTransferModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MutipleCurrencyDetail import MutipleCurrencyDetail
from alipay.aop.api.domain.Participant import Participant
from alipay.aop.api.domain.Participant import Participant
from alipay.ao... | 34.28692 | 97 | 0.620231 |
91b291fe43edd63b5586c4a91230e4d2e9a14bd8 | 4,078 | py | Python | tests/test_esys_get_time.py | dgptha/tpm2-pytss | 2f9ebdf5c3db233107cb0fa69137e70d38b8887e | [
"BSD-2-Clause"
] | null | null | null | tests/test_esys_get_time.py | dgptha/tpm2-pytss | 2f9ebdf5c3db233107cb0fa69137e70d38b8887e | [
"BSD-2-Clause"
] | null | null | null | tests/test_esys_get_time.py | dgptha/tpm2-pytss | 2f9ebdf5c3db233107cb0fa69137e70d38b8887e | [
"BSD-2-Clause"
] | null | null | null | from contextlib import ExitStack
from tpm2_pytss.binding import *
from tpm2_pytss.util.testing import BaseTestESYS
from tpm2_pytss.exceptions import TPM2Error
class TestGetTime(BaseTestESYS):
def test_get_time(self):
with ExitStack() as stack:
authValuePrimary = TPM2B_AUTH(size=5, buffer=[1,... | 37.072727 | 88 | 0.487739 |
91b29801cee1d84ae667393e4a8c93d9c8897ae1 | 3,584 | py | Python | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/ui/revprops.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/ui/revprops.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/ui/revprops.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | from __future__ import absolute_import
#
# This is an extension to the Nautilus file manager to allow better
# integration with the Subversion source control system.
#
# Copyright (C) 2006-2008 by Jason Field <jason@jasonfield.com>
# Copyright (C) 2007-2008 by Bruce van der Kooij <brucevdkooij@gmail.com>
# Copyright ... | 30.896552 | 83 | 0.622489 |
91b2ca446ee1b1768cbaa56b7955c5610e907ad9 | 13,516 | py | Python | python/pyspark/tests/test_taskcontext.py | xinjinhan/Spark-scheduling-huaweiTest | dfa8232e6117f87a9a4071ebb74b4c46c6d3f629 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | python/pyspark/tests/test_taskcontext.py | xinjinhan/Spark-scheduling-huaweiTest | dfa8232e6117f87a9a4071ebb74b4c46c6d3f629 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | python/pyspark/tests/test_taskcontext.py | xinjinhan/Spark-scheduling-huaweiTest | dfa8232e6117f87a9a4071ebb74b4c46c6d3f629 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 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 us... | 39.870206 | 98 | 0.623779 |
91b2df0c5025a0528011e267e8c4d22345479a47 | 183 | py | Python | starter.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | 3 | 2020-12-28T05:09:02.000Z | 2021-06-23T10:02:03.000Z | starter.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | starter.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'JDjango'))
if __name__ == "__main__":
from JDjango.apps import main
main()
| 22.875 | 77 | 0.699454 |
91b31d5a682c637b919437f391ad27b3eae45da1 | 317 | py | Python | aio_graphite_api/models/node.py | yunstanford/aio-graphite-api | 819b82c451c23ce5928e711202bde79a5399c3da | [
"Apache-2.0"
] | 1 | 2016-12-09T04:14:16.000Z | 2016-12-09T04:14:16.000Z | aio_graphite_api/models/node.py | yunstanford/aio-graphite-api | 819b82c451c23ce5928e711202bde79a5399c3da | [
"Apache-2.0"
] | 1 | 2017-02-06T22:15:07.000Z | 2017-02-06T23:01:04.000Z | aio_graphite_api/models/node.py | yunstanford/aio-graphite-api | 819b82c451c23ce5928e711202bde79a5399c3da | [
"Apache-2.0"
] | null | null | null |
class Node:
def __init__(self, path):
self.path = path
self.local = True
self.is_leaf = False
class BranchNode(Node):
pass
class LeafNode(Node):
def __init__(self, path, reader):
Node.__init__(self, path)
self.reader = reader
self.is_leaf = True
async def fetch(start_time, end_time):
pass
| 13.782609 | 39 | 0.694006 |
91b35d75a139b01af9c751da7cf1164869fdf43a | 5,236 | py | Python | util/misc_util.py | demetoir/ALLGANS | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 11 | 2018-01-25T15:31:54.000Z | 2019-12-17T06:12:57.000Z | util/misc_util.py | demetoir/ALLGANs | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 19 | 2018-01-29T16:12:09.000Z | 2018-02-15T15:56:48.000Z | util/misc_util.py | demetoir/ALLGANs | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 2 | 2018-02-06T00:31:55.000Z | 2018-02-19T15:29:10.000Z | """misc utils
pickle, import module, zip, etc ..."""
from glob import glob
from importlib._bootstrap_external import SourceFileLoader
import tarfile
import zipfile
import requests
import os
import pickle
import types
import json
import sys
def dump_pickle(path, data):
"""dump pickle
* [warni... | 25.666667 | 94 | 0.613445 |
91b378a69975348a08c1b1bff98f9e0d8376aa50 | 23,330 | py | Python | bonneville/key.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/key.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/key.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
The Salt Key backend API and interface used by the CLI. The Key class can be
used to manage salt keys directly without interfacing with the CLI.
'''
# Import python libs
from __future__ import print_function
import os
import shutil
import fnmatch
# Import bonneville libs
import bonneville.... | 34.308824 | 79 | 0.481097 |
91b38044e670528a23be474ba8355cc198feb66d | 4,094 | py | Python | tests/test_rss.py | smilers/sabnzbd | ed0e5bbf9b963113f4962e7aec297266f19d6615 | [
"MIT",
"PSF-2.0",
"0BSD"
] | 1,354 | 2015-01-02T11:53:23.000Z | 2022-03-30T01:32:46.000Z | tests/test_rss.py | smilers/sabnzbd | ed0e5bbf9b963113f4962e7aec297266f19d6615 | [
"MIT",
"PSF-2.0",
"0BSD"
] | 1,742 | 2015-01-01T20:17:35.000Z | 2022-03-30T21:05:00.000Z | tests/test_rss.py | smilers/sabnzbd | ed0e5bbf9b963113f4962e7aec297266f19d6615 | [
"MIT",
"PSF-2.0",
"0BSD"
] | 410 | 2015-01-24T05:32:46.000Z | 2022-03-20T12:56:49.000Z | #!/usr/bin/python3 -OO
# Copyright 2007-2021 The SABnzbd-Team <team@sabnzbd.org>
#
# 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 late... | 40.94 | 109 | 0.670982 |
91b3843162560f4dfc9bcccecec9b14448b5f2cb | 4,126 | py | Python | env/lib/python2.7/site-packages/guess_language/data/models/kk.py | Eric-Muthemba/qontroverse | 1f12d0e3bbdee628a88bac77dc53426ded220755 | [
"MIT"
] | null | null | null | env/lib/python2.7/site-packages/guess_language/data/models/kk.py | Eric-Muthemba/qontroverse | 1f12d0e3bbdee628a88bac77dc53426ded220755 | [
"MIT"
] | 1 | 2021-06-02T01:45:42.000Z | 2021-06-02T01:45:42.000Z | env/lib/python2.7/site-packages/guess_language/data/models/kk.py | Eric-Muthemba/qontroverse | 1f12d0e3bbdee628a88bac77dc53426ded220755 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
model = {
u'ан ': 0,
u'ен ': 1,
u'ың ': 2,
u' қа': 3,
u' ба': 4,
u'ай ': 5,
u'нда': 6,
u'ын ': 7,
u' са': 8,
u' ал': 9,
u'ді ': 10,
u'ары': 11,
u'ды ': 12,
u'ып ': 13,
u' мұ': 14,
u' бі': 15,
u'асы': 16,
u'да ': 17,
u'най': 18,
u' жа': 19,
u'мұн': 20,
u'ста': 21,
u'ған': 2... | 13.572368 | 23 | 0.453708 |
91b3a88feb9d17725494525872f1d407b5983fa6 | 129,672 | py | Python | tensorflow/python/kernel_tests/metrics_test.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 2 | 2017-11-24T04:06:38.000Z | 2018-01-07T11:30:04.000Z | tensorflow/python/kernel_tests/metrics_test.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/kernel_tests/metrics_test.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 1 | 2019-05-22T08:34:09.000Z | 2019-05-22T08:34:09.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... | 38.026979 | 80 | 0.644842 |
91b3bd980e42b9420ab76dd44e22389810b83bf5 | 431 | py | Python | Info/showGlyphsGroupedByWidth.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | 2 | 2021-02-12T20:36:29.000Z | 2021-11-03T08:04:01.000Z | Info/showGlyphsGroupedByWidth.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | Info/showGlyphsGroupedByWidth.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | # MenuTitle: Show Selected Glyphs Grouped by Width
from collections import defaultdict
Glyphs.clearLog()
widths = defaultdict(list)
for l in Glyphs.font.selectedLayers:
widths[int(l.width)].append('/' + l.parent.name)
string = 'Total Widths: {0}\n\n'.format(len(widths))
for width in sorted(widths.keys()):
x =... | 26.9375 | 52 | 0.691415 |
91b3f73b7a95067311d4d2a1c8f8cab4404f76cc | 49,948 | py | Python | oscar/lib/python2.7/site-packages/faker/providers/person/pl_PL/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/faker/providers/person/pl_PL/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/faker/providers/person/pl_PL/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as PersonProvider
def checksum_identity_card_number(characters):
"""
Calculates and returns a control digit for given list of characters basing on Identity Card Number standards.
"""
weights_for_check_digit = [7, 3... | 87.321678 | 114 | 0.569833 |
91b401ee6504a63fbda6ea5ebe86171771999a61 | 40,953 | py | Python | sympy/functions/elementary/tests/test_trigonometric.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 1 | 2015-08-31T06:55:47.000Z | 2015-08-31T06:55:47.000Z | sympy/functions/elementary/tests/test_trigonometric.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | null | null | null | sympy/functions/elementary/tests/test_trigonometric.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 3 | 2015-04-18T22:33:32.000Z | 2015-09-23T06:45:07.000Z | from sympy import (symbols, Symbol, nan, oo, zoo, I, sinh, sin, pi, atan,
acos, Rational, sqrt, asin, acot, coth, E, S, tan, tanh, cos,
cosh, atan2, exp, log, asinh, acoth, atanh, O, cancel, Matrix, re, im,
Float, Pow, gcd, sec, csc, cot, diff, simplify, Heaviside, arg,
conjugate, series... | 33.568033 | 105 | 0.53178 |
91b407527fb93b0aa3fc3d12a1f6391935886bf5 | 4,952 | py | Python | src/qtt/algorithms/allxy.py | eendebakpt/qtt | 40f002b9fb7345e0312bbe8769ab12ecb12a2606 | [
"MIT"
] | null | null | null | src/qtt/algorithms/allxy.py | eendebakpt/qtt | 40f002b9fb7345e0312bbe8769ab12ecb12a2606 | [
"MIT"
] | null | null | null | src/qtt/algorithms/allxy.py | eendebakpt/qtt | 40f002b9fb7345e0312bbe8769ab12ecb12a2606 | [
"MIT"
] | null | null | null | from typing import Dict, Any, List, Union, Optional
import numpy as np
import matplotlib.pyplot as plt
from lmfit import Model
from qcodes.data.data_set import DataSet
from qcodes.data.data_array import DataArray
from qtt.utilities.visualization import plot_vertical_line
from qtt.algorithms.fitting import extract_lmfi... | 37.801527 | 172 | 0.676494 |
91b41084208ce4d65eea9130de0fe8b332add738 | 467 | py | Python | src/components/baseComponent.py | Wombatlord/tcod-Tutorial | 0ed0276c06ebd1836691b4017750f984eefd31f9 | [
"MIT"
] | null | null | null | src/components/baseComponent.py | Wombatlord/tcod-Tutorial | 0ed0276c06ebd1836691b4017750f984eefd31f9 | [
"MIT"
] | null | null | null | src/components/baseComponent.py | Wombatlord/tcod-Tutorial | 0ed0276c06ebd1836691b4017750f984eefd31f9 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from src.engine.engine import Engine
from src.entities.entity import Entity
from src.map.gameMap import GameMap
class BaseComponent:
parent: Entity # Owning entity instance.
@property
def ga... | 22.238095 | 46 | 0.687366 |
91b424dad09dbcaf1d4d06ce69f3a355d05df044 | 801 | py | Python | pytype/tests/py2/test_tuple.py | souravbadami/pytype | 804fa97e7f9208df2711976085a96f756b3949e6 | [
"Apache-2.0"
] | 1 | 2020-04-20T02:55:21.000Z | 2020-04-20T02:55:21.000Z | pytype/tests/py2/test_tuple.py | doc22940/pytype | 4772ad6fe89f4df75ae3d08e7374f68074175d4a | [
"Apache-2.0"
] | null | null | null | pytype/tests/py2/test_tuple.py | doc22940/pytype | 4772ad6fe89f4df75ae3d08e7374f68074175d4a | [
"Apache-2.0"
] | null | null | null | """Tests of __builtin__.tuple."""
from pytype.tests import test_base
class TupleTest(test_base.TargetPython27FeatureTest):
"""Tests for __builtin__.tuple."""
def testIteration(self):
ty = self.Infer("""
class Foo(object):
mytuple = (1, "foo", 3j)
def __getitem__(self, pos):
r... | 28.607143 | 64 | 0.601748 |
91b42839f7cb04c105d5f00bcd2787968b493618 | 401 | py | Python | gameboardapp/wsgi.py | KeeganW/game-board | a80c589205ea89b18b16bb8e855161af51b0d2dc | [
"MIT"
] | 2 | 2020-02-14T03:04:09.000Z | 2020-03-13T00:43:19.000Z | gameboardapp/wsgi.py | KeeganW/game-board | a80c589205ea89b18b16bb8e855161af51b0d2dc | [
"MIT"
] | 30 | 2020-02-11T04:21:09.000Z | 2022-03-12T00:15:04.000Z | gameboardapp/wsgi.py | KeeganW/game-board | a80c589205ea89b18b16bb8e855161af51b0d2dc | [
"MIT"
] | 1 | 2020-03-13T00:43:37.000Z | 2020-03-13T00:43:37.000Z | """
WSGI config for gameboardapp 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/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | 23.588235 | 78 | 0.790524 |
91b4315df0b76e0fbfc920c397ef4cf7b0a5fbf3 | 3,905 | py | Python | bark_ml/tests/py_library_tf2rl_tests/py_gail_runner_tests.py | GAIL-4-BARK/bark-ml | c61c897842c2184ee842428e451bae3be2cd7242 | [
"MIT"
] | null | null | null | bark_ml/tests/py_library_tf2rl_tests/py_gail_runner_tests.py | GAIL-4-BARK/bark-ml | c61c897842c2184ee842428e451bae3be2cd7242 | [
"MIT"
] | 24 | 2020-05-05T13:53:17.000Z | 2020-08-13T15:58:51.000Z | bark_ml/tests/py_library_tf2rl_tests/py_gail_runner_tests.py | Brucknem/bark-ml | c61c897842c2184ee842428e451bae3be2cd7242 | [
"MIT"
] | null | null | null | import unittest
import gym
import os
import numpy as np
from gym.spaces.box import Box
from pathlib import Path
# BARK imports
from bark.runtime.commons.parameters import ParameterServer
# BARK-ML imports
from bark_ml.library_wrappers.lib_tf2rl.tf2rl_wrapper import TF2RLWrapper
from bark_ml.library_wrappers.lib_tf2rl... | 34.254386 | 82 | 0.697055 |
91b489ae9711430fea2c963b191125d78786075c | 3,681 | py | Python | script.module.transmissionrpc/lib/transmissionrpc/session.py | lsellens/script.module.transmissionrpc | b1118e5715351897c4a4937f861b8653278e7f7d | [
"MIT"
] | null | null | null | script.module.transmissionrpc/lib/transmissionrpc/session.py | lsellens/script.module.transmissionrpc | b1118e5715351897c4a4937f861b8653278e7f7d | [
"MIT"
] | null | null | null | script.module.transmissionrpc/lib/transmissionrpc/session.py | lsellens/script.module.transmissionrpc | b1118e5715351897c4a4937f861b8653278e7f7d | [
"MIT"
] | null | null | null | # Copyright (c) 2008-2014 Erik Svensson <erik.public@gmail.com>
# Licensed under the MIT license.
from transmission_rpc.utils import Field
class Session:
"""
Session is a class holding the session data for a Transmission daemon.
Access the session field can be done through attributes.
The attributes... | 32.289474 | 81 | 0.596849 |
91b4f9c839077cb7781d64e7af4dab5badbb27fc | 2,581 | py | Python | viadot/sources/uk_carbon_intensity.py | angelika233/viadot | 99a4c5b622ad099a44ab014a47ba932a747c0ae6 | [
"MIT"
] | null | null | null | viadot/sources/uk_carbon_intensity.py | angelika233/viadot | 99a4c5b622ad099a44ab014a47ba932a747c0ae6 | [
"MIT"
] | null | null | null | viadot/sources/uk_carbon_intensity.py | angelika233/viadot | 99a4c5b622ad099a44ab014a47ba932a747c0ae6 | [
"MIT"
] | null | null | null | import pandas as pd
import requests
from .base import Source
class UKCarbonIntensity(Source):
"""Fetches data of Carbon Intensity of the UK Power Grid.
Documentation for this source API is located
at: https://carbon-intensity.github.io/api-definitions/#carbon-intensity-api-v2-0-0
Parameters
---... | 29.666667 | 87 | 0.474622 |
91b505e9ac0106165807c0b38cbeb6ccc0481e32 | 683 | py | Python | qnarre.old/web/__init__.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre.old/web/__init__.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre.old/web/__init__.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2019 Quantapix 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 applicable l... | 45.533333 | 79 | 0.676428 |
91b513be6c98873aeb2e55e210e1f2cbf7bdd33e | 1,227 | py | Python | contxt/models/facilities.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | 4 | 2019-06-04T17:59:52.000Z | 2020-09-09T17:33:30.000Z | contxt/models/facilities.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | 61 | 2019-05-24T17:49:56.000Z | 2022-03-24T15:22:57.000Z | contxt/models/facilities.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | 2 | 2021-12-07T01:03:56.000Z | 2022-02-18T16:40:24.000Z | from dataclasses import dataclass
from typing import ClassVar
from . import ApiField, ApiObject, Parsers
from .contxt import Organization
@dataclass
class Facility(ApiObject):
_api_fields: ClassVar = (
ApiField("id", data_type=int),
ApiField("name"),
ApiField("address1"),
ApiField... | 25.040816 | 102 | 0.616137 |
91b51c7008aa813f8a9b86e6a2f6c472b4e92eaf | 1,199 | py | Python | xeta/programs/loot.py | xetareality/xeta-py | b3d77c17fbcffb282a1b764c3b7416e7beb76a16 | [
"MIT"
] | 5 | 2021-11-25T00:11:19.000Z | 2021-12-18T14:32:43.000Z | xeta/programs/loot.py | xetareality/xeta-py | b3d77c17fbcffb282a1b764c3b7416e7beb76a16 | [
"MIT"
] | null | null | null | xeta/programs/loot.py | xetareality/xeta-py | b3d77c17fbcffb282a1b764c3b7416e7beb76a16 | [
"MIT"
] | null | null | null | from xeta.modules import instruction
from xeta.library import utils
class Loot():
"""
Loot pool class
"""
def __init__(self, pool):
"""
Init pool
"""
self.pool = pool
def transfer(self, tx={}):
"""
Transfer to loot pool
"""
return in... | 23.057692 | 50 | 0.46372 |
91b525aae40b7438d5342dc0ed074b7b30e3feee | 6,520 | py | Python | src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/params.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/params.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 3 | 2021-03-26T00:48:20.000Z | 2022-03-29T22:05:39.000Z | src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/params.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 57.699115 | 161 | 0.655675 |
91b53bb5f196ee10dd1ac1836a799fdaa981d637 | 9,841 | py | Python | python/tvm/relay/analysis.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 2 | 2019-07-29T06:26:59.000Z | 2019-07-29T06:27:02.000Z | python/tvm/relay/analysis.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | null | null | null | python/tvm/relay/analysis.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 1 | 2019-05-01T16:57:15.000Z | 2019-05-01T16:57:15.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... | 24.913924 | 95 | 0.643735 |
91b54f6723b6750533da167e0d25af44dd75c827 | 7,314 | py | Python | tf2jax/_src/numpy_compat.py | deepmind/tf2jax | fb5388656344a7e5bb8e5635e82a3d93c7bc9d8c | [
"Apache-2.0"
] | 6 | 2022-03-18T12:09:11.000Z | 2022-03-26T14:16:35.000Z | tf2jax/_src/numpy_compat.py | deepmind/tf2jax | fb5388656344a7e5bb8e5635e82a3d93c7bc9d8c | [
"Apache-2.0"
] | null | null | null | tf2jax/_src/numpy_compat.py | deepmind/tf2jax | fb5388656344a7e5bb8e5635e82a3d93c7bc9d8c | [
"Apache-2.0"
] | 1 | 2022-03-18T12:09:23.000Z | 2022-03-18T12:09:23.000Z | # Copyright 2021 DeepMind Technologies Limited. 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 ... | 32.798206 | 80 | 0.686765 |
91b57fbe4d8565821a9c6258501f45d6f6934073 | 728 | py | Python | truthtables/table_maker.py | salt-die/tiny-math | 5eb8fcd64a76cf176d1d2ed77c22d3f3ba67e1d9 | [
"Unlicense"
] | 3 | 2020-03-05T09:59:32.000Z | 2022-01-08T03:00:04.000Z | truthtables/table_maker.py | salt-die/tiny-math | 5eb8fcd64a76cf176d1d2ed77c22d3f3ba67e1d9 | [
"Unlicense"
] | null | null | null | truthtables/table_maker.py | salt-die/tiny-math | 5eb8fcd64a76cf176d1d2ed77c22d3f3ba67e1d9 | [
"Unlicense"
] | null | null | null | def table_maker(*rows):
"""Generates an aligned table. Modified from https://github.com/salt-die/Table-Maker"""
rows = list(rows)
# Pad the length of items in each column
lengths = tuple(map(len, rows[0]))
for i, row in enumerate(rows):
for j, (item, length) in enumerate(zip(row, lengths)):... | 36.4 | 94 | 0.581044 |
91b59ab6d88cabf7c5ae79d52315ea778dda8056 | 3,984 | py | Python | src/yafs/utils.py | diegopso/YAFS | 5e9d22bcea836cb3c8caef1d3f721f889536a54e | [
"MIT"
] | 1 | 2020-03-12T13:16:09.000Z | 2020-03-12T13:16:09.000Z | src/yafs/utils.py | mikesneider/YAFS | 1b805cb0dc5ceb438ab335c347750e1cb1cdd34a | [
"MIT"
] | null | null | null | src/yafs/utils.py | mikesneider/YAFS | 1b805cb0dc5ceb438ab335c347750e1cb1cdd34a | [
"MIT"
] | null | null | null | """
Some common functions
"""
import copy
import networkx as nx
import matplotlib.pyplot as plt
import random
import numpy as np
from collections import OrderedDict
import networkx as nx
import pyproj
from shapely.ops import transform
from functools import partial
import math
#DISTRIBUTIONS
# def next_time_uniform_di... | 27.287671 | 120 | 0.654367 |
91b5a6bcd2e03edfa1e08b1c13bd128b53b339f2 | 3,647 | py | Python | tests/test_read_simple_hydrogen.py | fool65c/jupytext | 4b55d2e6ccc995c04679de0863234c60c3741a69 | [
"MIT"
] | 1 | 2019-05-06T07:39:15.000Z | 2019-05-06T07:39:15.000Z | tests/test_read_simple_hydrogen.py | royalosyin/jupytext | 72aa6c4968da714323fbd7a7c548ee4b1274c946 | [
"MIT"
] | null | null | null | tests/test_read_simple_hydrogen.py | royalosyin/jupytext | 72aa6c4968da714323fbd7a7c548ee4b1274c946 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from testfixtures import compare
import jupytext
def test_read_simple_file(script="""# ---
# title: Simple file
# ---
# %% [markdown]
# This is a markdown cell
# %% [raw]
# This is a raw cell
# %%% sub-cell title
# This is a sub-cell
# %%%% sub-sub-cell title
# This is a sub-sub-cell
# %... | 20.721591 | 75 | 0.612284 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.