hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a2410a6907ec667eed452981eab3e772b943241 | 2,478 | py | Python | src/lsi.py | lzakharov/lsi | 227cdffc2b1d4187cc7e0e439b6e08fa4e76f01d | [
"MIT"
] | 9 | 2018-10-10T20:17:03.000Z | 2022-01-24T07:41:47.000Z | src/lsi.py | lzakharov/lsi | 227cdffc2b1d4187cc7e0e439b6e08fa4e76f01d | [
"MIT"
] | null | null | null | src/lsi.py | lzakharov/lsi | 227cdffc2b1d4187cc7e0e439b6e08fa4e76f01d | [
"MIT"
] | 5 | 2019-09-19T18:37:59.000Z | 2022-01-24T07:41:54.000Z | import string
from typing import List, Type, Tuple, Union
import numpy as np
from .models import TermCountModel, AbstractModel
class LSI:
"""Latent Semantic Indexing.
"""
def __init__(self, docs: List[str], query: str, model: Type[AbstractModel] = TermCountModel,
rank_approximation: in... | 32.605263 | 96 | 0.589992 |
4a24110cab388c12c8d47cf7dd42770baf915f1c | 384 | py | Python | TRANSFORM/Resources/Scripts/jModelica/Units/Conversions/Functions/Distance_m/Examples/check_cm.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 29 | 2018-04-24T17:06:19.000Z | 2021-11-21T05:17:28.000Z | TRANSFORM/Resources/Scripts/jModelica/Units/Conversions/Functions/Distance_m/Examples/check_cm.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 13 | 2018-04-05T08:34:27.000Z | 2021-10-04T14:24:41.000Z | TRANSFORM/Resources/Scripts/jModelica/Units/Conversions/Functions/Distance_m/Examples/check_cm.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 17 | 2018-08-06T22:18:01.000Z | 2022-01-29T21:38:17.000Z | from pymodelica import compile_fmu
from pyfmi import load_fmu
libPath = r'C:\Users\vmg\Documents\Modelica\TRANSFORM-Library/TRANSFORM'
modelName = 'TRANSFORM.Units.Conversions.Functions.Distance_m.Examples.check_cm'
fmu = compile_fmu(modelName,libPath,target='cs')
model = load_fmu(fmu)
opts = model.simulate_options(... | 27.428571 | 80 | 0.802083 |
4a241165a17f63178ca79f5adba1ef7b37d3dba0 | 9,683 | py | Python | apps/beeswax/src/beeswax/conf.py | landier/hue | 5d8d2fb238772a26c28b17b0c0e559da8c27a419 | [
"Apache-2.0"
] | null | null | null | apps/beeswax/src/beeswax/conf.py | landier/hue | 5d8d2fb238772a26c28b17b0c0e559da8c27a419 | [
"Apache-2.0"
] | null | null | null | apps/beeswax/src/beeswax/conf.py | landier/hue | 5d8d2fb238772a26c28b17b0c0e559da8c27a419 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 32.712838 | 159 | 0.737891 |
4a2411b523f7130c7f471c509bab5841e8151e3c | 1,850 | py | Python | det3d/models/detectors/voxelnet.py | reinforcementdriving/CIA-SSD | f7b4a9ed4a2b852845303efc6c972125438817a6 | [
"Apache-2.0"
] | 382 | 2020-12-05T06:46:28.000Z | 2022-03-29T17:40:58.000Z | det3d/models/detectors/voxelnet.py | reinforcementdriving/CIA-SSD | f7b4a9ed4a2b852845303efc6c972125438817a6 | [
"Apache-2.0"
] | 28 | 2020-12-08T07:50:57.000Z | 2022-03-20T03:54:43.000Z | det3d/models/detectors/voxelnet.py | reinforcementdriving/CIA-SSD | f7b4a9ed4a2b852845303efc6c972125438817a6 | [
"Apache-2.0"
] | 57 | 2020-12-10T02:19:03.000Z | 2022-03-19T09:49:38.000Z | from ..registry import DETECTORS
from .single_stage import SingleStageDetector
@DETECTORS.register_module
class VoxelNet(SingleStageDetector):
def __init__(self, reader, backbone, neck, bbox_head, train_cfg=None, test_cfg=None, pretrained=None,):
super(VoxelNet, self).__init__(reader, backbone, neck, bbo... | 45.121951 | 123 | 0.618378 |
4a2411fbc32cbeb1ebb91ede59b2290e07f9893b | 214 | py | Python | src/blib/__init__.py | Niklas-Seppala/blib | 4364761ae5ce1cbb79ea6b800365a701b670bcd7 | [
"MIT"
] | null | null | null | src/blib/__init__.py | Niklas-Seppala/blib | 4364761ae5ce1cbb79ea6b800365a701b670bcd7 | [
"MIT"
] | null | null | null | src/blib/__init__.py | Niklas-Seppala/blib | 4364761ae5ce1cbb79ea6b800365a701b670bcd7 | [
"MIT"
] | null | null | null | from .banner import Banner
from .utils import Files
from .index import index
def blib_init(out='', src=''):
if out:
Files.set_out_path(out)
if src:
Files.set_in_path(src)
index.load() | 17.833333 | 31 | 0.64486 |
4a24120be95592f979c0339ed2e35251ee905347 | 2,520 | py | Python | homeassistant/components/homematicip_cloud/__init__.py | TheDatNik/home-assistant | 12b451adf5e5e894cb0707b61535218260411189 | [
"Apache-2.0"
] | 2 | 2019-02-04T15:05:30.000Z | 2019-03-04T16:31:32.000Z | homeassistant/components/homematicip_cloud/__init__.py | TheDatNik/home-assistant | 12b451adf5e5e894cb0707b61535218260411189 | [
"Apache-2.0"
] | 2 | 2022-01-13T04:00:03.000Z | 2022-03-12T01:02:40.000Z | homeassistant/components/homematicip_cloud/__init__.py | TheDatNik/home-assistant | 12b451adf5e5e894cb0707b61535218260411189 | [
"Apache-2.0"
] | 3 | 2016-08-26T12:32:49.000Z | 2020-02-26T21:01:35.000Z | """Support for HomematicIP Cloud devices."""
import logging
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_NAME
from homeassistant.helpers import device_registry as dr
import homeassistant.helpers.config_validation as cv
from .config_flow import configured_haps... | 31.898734 | 75 | 0.674603 |
4a2412b6139195a714a1e6ea98557e835a9b3425 | 200 | py | Python | Pacote Dawload/Projeto progamas Python/ex1113 Crescente e Decrescente For.py | wagnersistemalima/Exercicios-Python-URI-Online-Judge-Problems---Contests | d839a344b899c08f4199ff1ae22dd6ee931df6a2 | [
"MIT"
] | 1 | 2020-12-11T23:22:20.000Z | 2020-12-11T23:22:20.000Z | Pacote Dawload/Projeto progamas Python/ex1113 Crescente e Decrescente For.py | wagnersistemalima/Exercicios-Python-URI-Online-Judge-Problems---Contests | d839a344b899c08f4199ff1ae22dd6ee931df6a2 | [
"MIT"
] | null | null | null | Pacote Dawload/Projeto progamas Python/ex1113 Crescente e Decrescente For.py | wagnersistemalima/Exercicios-Python-URI-Online-Judge-Problems---Contests | d839a344b899c08f4199ff1ae22dd6ee931df6a2 | [
"MIT"
] | null | null | null | # ex1113 Crescente e Decrescente For
while True:
x, y = map(int, input().split())
if x > y:
print('Decrescente')
elif x < y:
print('Crescente')
if x == y:
break | 22.222222 | 36 | 0.53 |
4a241364e55f8675908cfb2e3eda5c97a8be4673 | 7,430 | py | Python | lingvo/core/early_stop_test.py | allenwang28/lingvo | 26d3d6672d3f46d8f281c2aa9f57166ef6296738 | [
"Apache-2.0"
] | 2,611 | 2018-10-16T20:14:10.000Z | 2022-03-31T14:48:41.000Z | lingvo/core/early_stop_test.py | allenwang28/lingvo | 26d3d6672d3f46d8f281c2aa9f57166ef6296738 | [
"Apache-2.0"
] | 249 | 2018-10-27T06:02:29.000Z | 2022-03-30T18:00:39.000Z | lingvo/core/early_stop_test.py | allenwang28/lingvo | 26d3d6672d3f46d8f281c2aa9f57166ef6296738 | [
"Apache-2.0"
] | 436 | 2018-10-25T05:31:45.000Z | 2022-03-31T07:26:03.000Z | # Lint as: python3
# Copyright 2018 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 ... | 35.721154 | 80 | 0.693271 |
4a2414a04cb50d5ac13e24bdace34839948079f8 | 1,008 | py | Python | wagtail/contrib/modeladmin/forms.py | kurtrwall/wagtail | fcea4ee30da388ebeb071c5b47285526928998e4 | [
"BSD-3-Clause"
] | 3 | 2016-08-17T13:56:36.000Z | 2019-04-23T19:59:25.000Z | wagtail/contrib/modeladmin/forms.py | kurtrwall/wagtail | fcea4ee30da388ebeb071c5b47285526928998e4 | [
"BSD-3-Clause"
] | 11 | 2016-08-05T15:43:06.000Z | 2016-12-16T13:32:23.000Z | wagtail/contrib/modeladmin/forms.py | potatolondon/wagtail-gae | 79800b0439bffeb9eb840e70c32d62f5b3487f9c | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, unicode_literals
from django import forms
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from wagtail.wagtailcore.models import Page
class PageChoiceField(forms.ModelChoiceField):
def label_from_instance(self, obj):
... | 32.516129 | 82 | 0.708333 |
4a2414a901d79c5d2a5bcdc6218370409f2f257c | 909 | py | Python | Day 9/day_9.py | yuhao-lin007/Advent-of-Code-2020 | 78f42be051bd6693d150048ae2e8c50c0298a127 | [
"Unlicense"
] | 3 | 2020-12-20T01:56:35.000Z | 2020-12-31T11:29:19.000Z | Day 9/day_9.py | yuhao-lin007/Advent-of-Code-2020 | 78f42be051bd6693d150048ae2e8c50c0298a127 | [
"Unlicense"
] | null | null | null | Day 9/day_9.py | yuhao-lin007/Advent-of-Code-2020 | 78f42be051bd6693d150048ae2e8c50c0298a127 | [
"Unlicense"
] | 2 | 2020-12-23T16:23:19.000Z | 2021-03-03T05:26:09.000Z | def get_valid_contiguous_set(numbers, total):
for length in range(2, len(numbers)+1):
for offset in range(len(numbers)-length+1):
contiguous_set = numbers[offset:offset+length]
if sum(contiguous_set) == total:
return contiguous_set
with open("input.txt", "r") as file:
numbers = list(map(int, file.read().... | 28.40625 | 72 | 0.738174 |
4a2414d58a6797dbb1035dc9b6d2915610fd7e56 | 629 | py | Python | nevergrad/functions/images/test_core.py | mehrdad-shokri/nevergrad | 7b68b00c158bf60544bc45997560edf733fb5812 | [
"MIT"
] | 1 | 2021-01-15T01:55:39.000Z | 2021-01-15T01:55:39.000Z | nevergrad/functions/images/test_core.py | OregonWebSells/nevergrad | c2b2a0efdca29830ccc9182d8a7ba4d8695f698d | [
"MIT"
] | null | null | null | nevergrad/functions/images/test_core.py | OregonWebSells/nevergrad | c2b2a0efdca29830ccc9182d8a7ba4d8695f698d | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
from . import core
def test_images() -> None:
func = core.Image()
x = 7 * np.fabs(np.random.... | 33.105263 | 87 | 0.704293 |
4a2415bbab4fa2ae57216c3146e2d11a81035d5b | 3,479 | py | Python | netsim/graphlib/algorithms/spf.py | networmix/NetSim | 9a2804112895826c58399fbd47f496817916cd49 | [
"MIT"
] | null | null | null | netsim/graphlib/algorithms/spf.py | networmix/NetSim | 9a2804112895826c58399fbd47f496817916cd49 | [
"MIT"
] | 12 | 2021-11-20T22:50:46.000Z | 2022-01-07T02:00:38.000Z | netsim/graphlib/algorithms/spf.py | networmix/NetSim | 9a2804112895826c58399fbd47f496817916cd49 | [
"MIT"
] | null | null | null | from heapq import heappop, heappush
from typing import Tuple, List, Dict, Callable
from netsim.graphlib.graph import MultiDiGraph
DEFAULT_COST_ATTRIBUTE = "metric"
def min_cost_edges_func_fabric(attr_to_use: str) -> Callable:
"""
Fabric producing a function to find the min-cost edges between a pair of adja... | 37.010638 | 107 | 0.661972 |
4a241796f5fc6483411704dc8ffbed36257a96b5 | 444 | py | Python | try/try2.py | laashub-sua/picker | 1adae754a8dbd8b927ccce52a94dd5bf72d2909c | [
"Apache-2.0"
] | 1 | 2020-07-25T15:03:16.000Z | 2020-07-25T15:03:16.000Z | try/try2.py | laashub-sua/picker | 1adae754a8dbd8b927ccce52a94dd5bf72d2909c | [
"Apache-2.0"
] | null | null | null | try/try2.py | laashub-sua/picker | 1adae754a8dbd8b927ccce52a94dd5bf72d2909c | [
"Apache-2.0"
] | null | null | null | import ctypes
import win32con
def get_window():
'''Returns windows in z-order (top first)'''
user32 = ctypes.windll.user32
lst = []
top = user32.GetTopWindow(None)
if not top:
return lst
lst.append(top)
while True:
next = user32.GetWindow(lst[-1], win32con.GW_HWNDNEXT)
... | 18.5 | 62 | 0.617117 |
4a24181937d272d414bf4a02b45ca57357c12fa2 | 3,562 | py | Python | src/programy/clients/polling/xmpp/client.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | null | null | null | src/programy/clients/polling/xmpp/client.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | null | null | null | src/programy/clients/polling/xmpp/client.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | 4 | 2019-04-01T15:42:23.000Z | 2020-11-05T08:14:27.000Z | """
Copyright (c) 2016-2019 Keith Sterling http://www.keithsterling.com
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, m... | 38.717391 | 120 | 0.722347 |
4a2418e1b0dabc3c262aac125f1851f3fce02786 | 993 | py | Python | tests_runner/__main__.py | RainingComputers/ShnooTalk | 714f6648363a99e011e329ed1a3f800e6fe65f39 | [
"MIT"
] | 6 | 2021-07-17T16:02:07.000Z | 2022-02-05T16:33:51.000Z | tests_runner/__main__.py | RainingComputers/ShnooTalk | 714f6648363a99e011e329ed1a3f800e6fe65f39 | [
"MIT"
] | 1 | 2021-07-16T07:14:31.000Z | 2021-07-16T07:22:10.000Z | tests_runner/__main__.py | RainingComputers/ShnooTalk | 714f6648363a99e011e329ed1a3f800e6fe65f39 | [
"MIT"
] | 2 | 2021-07-16T02:54:27.000Z | 2022-03-29T20:51:57.000Z | import sys
from tests_runner.utils.config import CLI_ARG, BUILD_TYPE_MAP
from tests_runner.utils.coverage import prepare_coverage_report
from tests_runner.utils.result import ResultPrinter
from tests_runner import compiler_tests, llc_tests, cli_tests, parser_tests, ir_tests
def print_usage() -> None:
print("🙁 ... | 21.586957 | 85 | 0.663646 |
4a24194725b788ea6d3137ad5779a89952168033 | 97 | py | Python | tests/internal_bench/var-1-constant.py | sebastien-riou/micropython | 116c15842fd48ddb77b0bc016341d936a0756573 | [
"MIT"
] | 13,648 | 2015-01-01T01:34:51.000Z | 2022-03-31T16:19:53.000Z | tests/internal_bench/var-1-constant.py | sebastien-riou/micropython | 116c15842fd48ddb77b0bc016341d936a0756573 | [
"MIT"
] | 7,092 | 2015-01-01T07:59:11.000Z | 2022-03-31T23:52:18.000Z | tests/internal_bench/var-1-constant.py | sebastien-riou/micropython | 116c15842fd48ddb77b0bc016341d936a0756573 | [
"MIT"
] | 4,942 | 2015-01-02T11:48:50.000Z | 2022-03-31T19:57:10.000Z | import bench
def test(num):
i = 0
while i < 20000000:
i += 1
bench.run(test)
| 8.818182 | 23 | 0.525773 |
4a241960aae06d33a36d3865af8f208dedeecfe2 | 1,838 | py | Python | scipy/maxentropy/examples/bergerexample.py | lesserwhirls/scipy-cwt | ee673656d879d9356892621e23ed0ced3d358621 | [
"BSD-3-Clause"
] | 8 | 2015-10-07T00:37:32.000Z | 2022-01-21T17:02:33.000Z | scipy/maxentropy/examples/bergerexample.py | lesserwhirls/scipy-cwt | ee673656d879d9356892621e23ed0ced3d358621 | [
"BSD-3-Clause"
] | null | null | null | scipy/maxentropy/examples/bergerexample.py | lesserwhirls/scipy-cwt | ee673656d879d9356892621e23ed0ced3d358621 | [
"BSD-3-Clause"
] | 8 | 2015-05-09T14:23:57.000Z | 2018-11-15T05:56:00.000Z | #!/usr/bin/env python
""" Example use of the maximum entropy module:
Machine translation example -- English to French -- from the paper 'A
maximum entropy approach to natural language processing' by Berger et
al., 1996.
Consider the translation of the English word 'in' into French. We
notice in ... | 26.637681 | 81 | 0.6284 |
4a241973ce7a049a5fbb70001eef91f44c2702d9 | 19,216 | py | Python | nyangco.py | cauTheBattleCat/nyangco | 82d97cd98e0e2a30937e94d88b2b0c8f6e76a96a | [
"MIT"
] | null | null | null | nyangco.py | cauTheBattleCat/nyangco | 82d97cd98e0e2a30937e94d88b2b0c8f6e76a96a | [
"MIT"
] | null | null | null | nyangco.py | cauTheBattleCat/nyangco | 82d97cd98e0e2a30937e94d88b2b0c8f6e76a96a | [
"MIT"
] | 2 | 2020-12-06T12:57:22.000Z | 2021-12-06T00:33:34.000Z | from bangtal import *
import time
import threading
import random
setGameOption(GameOption.ROOM_TITLE, False)
setGameOption(GameOption.INVENTORY_BUTTON, False)
setGameOption(GameOption.MESSAGE_BOX_BUTTON, False)
mainScene = Scene("메인", "res/wallpaper/main.png")
mapScene = Scene("지도", "res/wallpaper/ingame2.png")
star... | 31.043619 | 274 | 0.670847 |
4a2419d84a45cfd2694fdb4d8de3a0dca18843f9 | 4,734 | py | Python | daisy_workflows/image_import/freebsd/translate.py | collabora-gce/compute-image-tools | 20a7f19be80b4920f8b369384beb161ed580550b | [
"Apache-2.0"
] | null | null | null | daisy_workflows/image_import/freebsd/translate.py | collabora-gce/compute-image-tools | 20a7f19be80b4920f8b369384beb161ed580550b | [
"Apache-2.0"
] | 2 | 2018-05-25T19:19:28.000Z | 2018-06-21T02:31:47.000Z | daisy_workflows/image_import/freebsd/translate.py | collabora-gce/compute-image-tools | 20a7f19be80b4920f8b369384beb161ed580550b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 27.523256 | 76 | 0.679341 |
4a241a606013e077c3c1e81c8d5bf13b399e8132 | 1,073 | py | Python | django_extauth/urls.py | aiakos/aiakos | a591e7ef13ab9e8e14b4d3569d43fce694c4150a | [
"BSD-2-Clause",
"MIT"
] | 4 | 2017-04-28T19:09:17.000Z | 2018-07-03T04:43:54.000Z | django_extauth/urls.py | aiakos/aiakos | a591e7ef13ab9e8e14b4d3569d43fce694c4150a | [
"BSD-2-Clause",
"MIT"
] | 2 | 2020-06-05T17:46:47.000Z | 2021-06-10T17:22:58.000Z | django_extauth/urls.py | aiakos/aiakos | a591e7ef13ab9e8e14b4d3569d43fce694c4150a | [
"BSD-2-Clause",
"MIT"
] | 2 | 2017-08-14T07:15:14.000Z | 2019-03-04T14:02:05.000Z | from django.conf.urls import url
from django.contrib.auth import views as django_auth_views
from . import user, views
app_name = 'extauth'
urlpatterns = [
url(r'^$', views.SelectAccountView.as_view(), name='select-account'),
url(r'^u/(?P<account_id>[^/]+)/$', views.AccountHomeView.as_view(), name='account-home'),
... | 39.740741 | 133 | 0.698043 |
4a241aee863f358e8285b974fc1413c9965210c0 | 15,101 | py | Python | sdk/python/pulumi_aws/elb/listener_policy.py | jen20/pulumi-aws | 172e00c642adc03238f89cc9c5a16b914a77c2b1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/elb/listener_policy.py | jen20/pulumi-aws | 172e00c642adc03238f89cc9c5a16b914a77c2b1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/elb/listener_policy.py | jen20/pulumi-aws | 172e00c642adc03238f89cc9c5a16b914a77c2b1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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... | 42.658192 | 173 | 0.623998 |
4a241b813cf573ce8fe4bb80e59a334ad129a353 | 8,857 | py | Python | pylabnet/gui/pyqt/gui_windowbuilder.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 10 | 2020-01-07T23:28:49.000Z | 2022-02-02T19:09:17.000Z | pylabnet/gui/pyqt/gui_windowbuilder.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 249 | 2019-12-28T19:38:49.000Z | 2022-03-28T16:45:32.000Z | pylabnet/gui/pyqt/gui_windowbuilder.py | wi11dey/pylabnet | a6e3362f727c45aaa60e61496e858ae92e85574d | [
"MIT"
] | 5 | 2020-11-17T19:45:10.000Z | 2022-01-04T18:07:04.000Z | import sys
from PyQt5 import QtCore, QtWidgets, QtGui
import qdarkstyle
from PyQt5.QtWidgets import QMainWindow, QLabel, QGridLayout, QWidget, QHBoxLayout
from pylabnet.utils.helper_methods import load_script_config
from pylabnet.network.core.client_base import ClientBase
class GUIWindowFromConfig(QMainWindow):
... | 47.363636 | 164 | 0.643446 |
4a241f279ad7c12fbea960db94bdfa55c229f948 | 3,772 | py | Python | semanticmapping/networks/gridcells.py | nsdumont/SemanticMapping | af97a452b3de30a9670536c7fa92c28a70fae44d | [
"MIT"
] | null | null | null | semanticmapping/networks/gridcells.py | nsdumont/SemanticMapping | af97a452b3de30a9670536c7fa92c28a70fae44d | [
"MIT"
] | null | null | null | semanticmapping/networks/gridcells.py | nsdumont/SemanticMapping | af97a452b3de30a9670536c7fa92c28a70fae44d | [
"MIT"
] | null | null | null | import nengo
import numpy as np
def GridCellEncoders(n_G, ssp_space):
def fractional_bind(basis, position):
return np.fft.ifft(np.prod(np.fft.fft(basis, axis=0)**position, axis=1), axis=0)
d = ssp_space.ssp_dim
N = ssp_space.num_grids
sub_dim=ssp_space.grid_basis_dim
G_pos = np.random.uni... | 42.382022 | 135 | 0.651909 |
4a241f3056882e0514d55dff241f6d58a3dfa212 | 335 | py | Python | src/main/smarthooks/worker.py | eightnoteight/smarthooks | 0496a2420f48f78a1ca3c0ab2f52d8c5551b4872 | [
"MIT"
] | null | null | null | src/main/smarthooks/worker.py | eightnoteight/smarthooks | 0496a2420f48f78a1ca3c0ab2f52d8c5551b4872 | [
"MIT"
] | 1 | 2021-06-01T21:53:08.000Z | 2021-06-01T21:53:08.000Z | src/main/smarthooks/worker.py | eightnoteight/smarthooks | 0496a2420f48f78a1ca3c0ab2f52d8c5551b4872 | [
"MIT"
] | null | null | null | import celery
import os
app = celery.Celery('smarthooks',
broker=os.environ['REDIS_URL'],
include=['smarthooks.geeksforgeeksbot.worker'])
# note: if results are to be stored
# app.conf.update(BROKER_URL=os.environ['REDIS_URL'],
# CELERY_RESULT_BACKEND=os.environ... | 30.454545 | 67 | 0.638806 |
4a24209a790e10703e22ef85a82e7cfe2185247b | 395 | py | Python | cogs/status_tracker.py | danya02/discord-logbot | a02cd660124319d3f7474fa90a8e4d0932555809 | [
"MIT"
] | null | null | null | cogs/status_tracker.py | danya02/discord-logbot | a02cd660124319d3f7474fa90a8e4d0932555809 | [
"MIT"
] | null | null | null | cogs/status_tracker.py | danya02/discord-logbot | a02cd660124319d3f7474fa90a8e4d0932555809 | [
"MIT"
] | null | null | null | from database import BotReadyTimeSeries
from discord.ext import commands, tasks
from .common import *
INTERVAL = 10
class StatusTracker(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.check_loop.start()
@tasks.loop(seconds=INTERVAL)
async def check_loop(self):
await as... | 24.6875 | 89 | 0.718987 |
4a2420dd5e94122d4ab348b39d921b43570f7b69 | 8,282 | py | Python | helper.py | blockchainhelppro/Neon-Core-Code-Update | 459aeed16a833b53222a8a6d47e9ae8c2c4a3373 | [
"MIT"
] | null | null | null | helper.py | blockchainhelppro/Neon-Core-Code-Update | 459aeed16a833b53222a8a6d47e9ae8c2c4a3373 | [
"MIT"
] | null | null | null | helper.py | blockchainhelppro/Neon-Core-Code-Update | 459aeed16a833b53222a8a6d47e9ae8c2c4a3373 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2016 Red Hat, Inc.
#
# Authors:
# Thomas Woerner <twoerner@redhat.com>
#
# 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 Li... | 35.393162 | 80 | 0.575706 |
4a24210d36ebd26ac7195e218dc06191634a5aa2 | 3,571 | py | Python | harvest-cloud/scripts/BW_PGS/calculate_GRS.py | PerinatalLab/metaGWAS | ba5de9bc8440685bb2bfa159d85a4beee3fe3ed3 | [
"MIT"
] | 1 | 2022-03-07T20:32:08.000Z | 2022-03-07T20:32:08.000Z | harvest-cloud/scripts/MR_repr_phenos/calculate_GRS.py | PerinatalLab/metaGWAS | ba5de9bc8440685bb2bfa159d85a4beee3fe3ed3 | [
"MIT"
] | null | null | null | harvest-cloud/scripts/MR_repr_phenos/calculate_GRS.py | PerinatalLab/metaGWAS | ba5de9bc8440685bb2bfa159d85a4beee3fe3ed3 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
def remove_palindromic(d, REF, EFF):
return(d.loc[~(((d[REF]== 'T') & (d[EFF]== 'A')) | ((d[REF]== 'A') & (d[EFF]== 'T')) | ((d[REF]== 'C') & (d[EFF]== 'G')) | ((d[REF]== 'G') & (d[EFF]== 'C'))), :])
def flip_alleles(x):
x= x.str.upper()
x= x.str.replace(... | 52.514706 | 353 | 0.557267 |
4a242172502e3e82267f6db9a3aabcf63826e93e | 6,987 | py | Python | src/quart/testing/utils.py | pgjones/quart | 68a5bc4e98a07d903e7bfe148c1b7faa260f4334 | [
"MIT"
] | 1,085 | 2017-11-12T10:56:50.000Z | 2022-03-31T15:14:26.000Z | src/quart/testing/utils.py | pgjones/quart | 68a5bc4e98a07d903e7bfe148c1b7faa260f4334 | [
"MIT"
] | 139 | 2017-12-04T09:22:48.000Z | 2022-03-26T08:34:07.000Z | src/quart/testing/utils.py | pgjones/quart | 68a5bc4e98a07d903e7bfe148c1b7faa260f4334 | [
"MIT"
] | 92 | 2017-12-08T09:55:02.000Z | 2022-03-29T20:45:44.000Z | from __future__ import annotations
from typing import Any, AnyStr, cast, Dict, Optional, overload, Tuple, TYPE_CHECKING, Union
from urllib.parse import unquote, urlencode
from hypercorn.typing import HTTPScope, Scope, WebsocketScope
from werkzeug.datastructures import Authorization, Headers
from werkzeug.sansio.multi... | 33.113744 | 94 | 0.646629 |
4a2421cda7328b4f55ea24d020652e927f856f11 | 625 | py | Python | examples/test_cmult.py | daniil-lyakhov/QArithmetic | 7a5df9504e17c1979107c119bbaf0c5b2750a619 | [
"Apache-2.0"
] | 34 | 2019-03-01T02:45:45.000Z | 2022-02-21T22:10:55.000Z | examples/test_cmult.py | supersimple33/QArithmetic | 0925f87f8d86922e9cfc3826b98b1c64c95cbf5f | [
"Apache-2.0"
] | 3 | 2019-12-22T09:34:00.000Z | 2021-09-20T15:14:56.000Z | examples/test_cmult.py | supersimple33/QArithmetic | 0925f87f8d86922e9cfc3826b98b1c64c95cbf5f | [
"Apache-2.0"
] | 9 | 2019-04-02T14:30:54.000Z | 2022-02-09T16:55:59.000Z | # Import the Qiskit SDK
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute, Aer
from QArithmetic import cmult
# Input N
N = 3
c = QuantumRegister(1)
a = QuantumRegister(N)
b = QuantumRegister(N)
m = QuantumRegister(2*N)
cm = ClassicalRegister(2*N)
qc = QuantumCircuit(c,... | 17.857143 | 69 | 0.7072 |
4a24225cbcb4b6f58a0db5912f5f67ec86df5fc2 | 21,953 | py | Python | src/natcap/invest/carbon.py | hkotaro1215/invest | 1ba08bd746977bfa8a4600ad8c821fc43598c421 | [
"BSD-3-Clause"
] | null | null | null | src/natcap/invest/carbon.py | hkotaro1215/invest | 1ba08bd746977bfa8a4600ad8c821fc43598c421 | [
"BSD-3-Clause"
] | null | null | null | src/natcap/invest/carbon.py | hkotaro1215/invest | 1ba08bd746977bfa8a4600ad8c821fc43598c421 | [
"BSD-3-Clause"
] | null | null | null | """Carbon Storage and Sequestration."""
from __future__ import absolute_import
import collections
import logging
import os
import time
from osgeo import gdal
from osgeo import ogr
import numpy
import natcap.invest.pygeoprocessing_0_3_3
from . import validation
from . import utils
LOGGER = logging.getL... | 43.906 | 99 | 0.633945 |
4a242372b3fd27fd7c6756b4936f0173e794c91a | 242 | py | Python | tests/test_general.py | ArtellaPipe/artellapipe-libs-arnold | b807e37c245531e554b331d8462d93e36d130556 | [
"MIT"
] | null | null | null | tests/test_general.py | ArtellaPipe/artellapipe-libs-arnold | b807e37c245531e554b331d8462d93e36d130556 | [
"MIT"
] | null | null | null | tests/test_general.py | ArtellaPipe/artellapipe-libs-arnold | b807e37c245531e554b331d8462d93e36d130556 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains general tests for artellapipe-libs-arnold
"""
import pytest
from artellapipe.libs.arnold import __version__
def test_version():
assert __version__.get_version()
| 16.133333 | 62 | 0.727273 |
4a2423783d1180aac3412b74e5159e45505c5afd | 419 | py | Python | jcasts/podcasts/migrations/0094_podcast_websub_url.py | danjac/jcasts | 04f5ef1f536d51962c0433d092817c0153acb6af | [
"MIT"
] | 13 | 2021-09-17T07:41:00.000Z | 2022-02-10T10:00:48.000Z | jcasts/podcasts/migrations/0094_podcast_websub_url.py | danjac/jcasts | 04f5ef1f536d51962c0433d092817c0153acb6af | [
"MIT"
] | 167 | 2021-07-17T09:41:38.000Z | 2021-08-31T06:03:34.000Z | jcasts/podcasts/migrations/0094_podcast_websub_url.py | danjac/jcasts | 04f5ef1f536d51962c0433d092817c0153acb6af | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-17 06:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("podcasts", "0093_podcast_websub_exception"),
]
operations = [
migrations.AddField(
model_name="podcast",
name="websu... | 22.052632 | 73 | 0.615752 |
4a24237e1a15128bcece004e7469caa941ad490e | 1,104 | py | Python | worker/messaging/fcm/external/fcm/legacy.py | pjongy/jraze | 8c7c0abebcb973f87c8fc36b9c7bf7fa76f445f3 | [
"MIT"
] | 5 | 2020-07-31T02:18:29.000Z | 2021-11-22T02:25:07.000Z | worker/messaging/fcm/external/fcm/legacy.py | pjongy/jraze | 8c7c0abebcb973f87c8fc36b9c7bf7fa76f445f3 | [
"MIT"
] | 13 | 2020-08-03T07:36:19.000Z | 2020-11-26T12:02:57.000Z | worker/messaging/fcm/external/fcm/legacy.py | pjongy/jraze | 8c7c0abebcb973f87c8fc36b9c7bf7fa76f445f3 | [
"MIT"
] | 1 | 2020-08-19T07:48:30.000Z | 2020-08-19T07:48:30.000Z | from typing import List, Tuple
import httpx
from common.logger.logger import get_logger
from worker.messaging.fcm.external.fcm.abstract import AbstractFCM
logger = get_logger(__name__)
class FCMClientLegacy(AbstractFCM):
FCM_API_HOST = 'https://fcm.googleapis.com'
def __init__(self, server_key):
s... | 27.6 | 73 | 0.594203 |
4a2423dc88e10af5cbdd6313411828638800fbad | 3,353 | py | Python | utilities/test_backup_encryption.py | davemungo/various | ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce | [
"MIT"
] | 1 | 2020-01-19T01:21:56.000Z | 2020-01-19T01:21:56.000Z | utilities/test_backup_encryption.py | davemungo/various | ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce | [
"MIT"
] | null | null | null | utilities/test_backup_encryption.py | davemungo/various | ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce | [
"MIT"
] | 1 | 2021-07-02T14:40:01.000Z | 2021-07-02T14:40:01.000Z | import backup_encryption as be
import base64 as b64
import os
from datetime import datetime
### SETUP NOTES
# Many tests require existence of 'development.key' file
### TESTS
def test_create_key():
# Results should look like this
# key: b'5jApZKjlxj4SjH5FU05tHx4abfUkzHxgYc3LxFmf4HM='
... | 30.761468 | 90 | 0.612288 |
4a24265f19b851642fa69080d4864042d7e85b9e | 6,331 | py | Python | tacker/tests/unit/objects/test_vnf_deployment_flavour.py | takahashi-tsc/tacker | a0ae01a13dcc51bb374060adcbb4fd484ab37156 | [
"Apache-2.0"
] | 116 | 2015-10-18T02:57:08.000Z | 2022-03-15T04:09:18.000Z | tacker/tests/unit/objects/test_vnf_deployment_flavour.py | takahashi-tsc/tacker | a0ae01a13dcc51bb374060adcbb4fd484ab37156 | [
"Apache-2.0"
] | 6 | 2016-11-07T22:15:54.000Z | 2021-05-09T06:13:08.000Z | tacker/tests/unit/objects/test_vnf_deployment_flavour.py | takahashi-tsc/tacker | a0ae01a13dcc51bb374060adcbb4fd484ab37156 | [
"Apache-2.0"
] | 166 | 2015-10-20T15:31:52.000Z | 2021-11-12T08:39:49.000Z | # Copyright (c) 2019 NTT DATA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 43.363014 | 78 | 0.6991 |
4a2427755dfc4c430e953c94ba135ba78c561978 | 1,323 | py | Python | galaxy/common/survey.py | SamyCoenen/galaxy | 7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e | [
"Apache-2.0"
] | null | null | null | galaxy/common/survey.py | SamyCoenen/galaxy | 7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e | [
"Apache-2.0"
] | null | null | null | galaxy/common/survey.py | SamyCoenen/galaxy | 7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e | [
"Apache-2.0"
] | null | null | null | # (c) 2012-2019, Ansible by Red Hat
#
# This file is part of Ansible Galaxy
#
# Ansible Galaxy is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by
# the Apache Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
... | 28.148936 | 77 | 0.671958 |
4a2427b6c26801774b60ecda22b9f031fbef9a8c | 2,004 | py | Python | test/lint/check-doc.py | mkscoin/mkscoin | a4436857087a727a5d1b03f8380764b04d954f04 | [
"MIT"
] | null | null | null | test/lint/check-doc.py | mkscoin/mkscoin | a4436857087a727a5d1b03f8380764b04d954f04 | [
"MIT"
] | null | null | null | test/lint/check-doc.py | mkscoin/mkscoin | a4436857087a727a5d1b03f8380764b04d954f04 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The mkscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
This checks if all command line args are documented.
Return value is 0 to indicate no error.
Author:... | 37.811321 | 112 | 0.694112 |
4a2427bf4622071edd8b829f2e418142b40b1b7f | 6,608 | py | Python | robin_stocks/tda/authentication.py | qtcwt/robin_stocks | 5672a2c3e16fb00ab46e03aa5894dce54adcb005 | [
"MIT"
] | 1,339 | 2018-08-29T03:10:09.000Z | 2022-03-31T15:54:58.000Z | robin_stocks/tda/authentication.py | qtcwt/robin_stocks | 5672a2c3e16fb00ab46e03aa5894dce54adcb005 | [
"MIT"
] | 290 | 2018-09-21T00:34:30.000Z | 2022-03-25T02:30:51.000Z | robin_stocks/tda/authentication.py | qtcwt/robin_stocks | 5672a2c3e16fb00ab46e03aa5894dce54adcb005 | [
"MIT"
] | 419 | 2018-11-03T17:32:19.000Z | 2022-03-27T04:37:48.000Z | import pickle
from datetime import datetime, timedelta
from pathlib import Path
from cryptography.fernet import Fernet
from robin_stocks.tda.globals import DATA_DIR_NAME, PICKLE_NAME
from robin_stocks.tda.helper import (request_data, set_login_state,
update_session)
from robin_stoc... | 47.539568 | 152 | 0.677209 |
4a242ab3d53dc21308ecd6772159b5142f853617 | 4,554 | py | Python | autots/tools/impute.py | mreismendes/AutoTS | a874b531ae1f06db69fdd1211ddc0ca908d033c9 | [
"MIT"
] | null | null | null | autots/tools/impute.py | mreismendes/AutoTS | a874b531ae1f06db69fdd1211ddc0ca908d033c9 | [
"MIT"
] | null | null | null | autots/tools/impute.py | mreismendes/AutoTS | a874b531ae1f06db69fdd1211ddc0ca908d033c9 | [
"MIT"
] | null | null | null | """Fill NA."""
# import numpy as np
import pandas as pd
def fill_zero(df):
"""Fill NaN with zero."""
df = df.fillna(0)
return df
def fill_forward(df):
"""Fill NaN with previous values."""
df = df.fillna(method='ffill')
df = df.fillna(method='bfill')
return df
def fill_mean(df):
"""... | 27.269461 | 99 | 0.608037 |
4a242ba538f60c5032ce44def55d98f342f10daa | 4,265 | py | Python | tasks/release.py | Enzime/pipenv | d4f710be4a39e09a82a5133b7b3a277ee9bfb13a | [
"MIT"
] | 2 | 2018-11-06T04:53:13.000Z | 2018-11-08T22:10:20.000Z | tasks/release.py | Enzime/pipenv | d4f710be4a39e09a82a5133b7b3a277ee9bfb13a | [
"MIT"
] | null | null | null | tasks/release.py | Enzime/pipenv | d4f710be4a39e09a82a5133b7b3a277ee9bfb13a | [
"MIT"
] | 1 | 2018-07-17T07:39:47.000Z | 2018-07-17T07:39:47.000Z | # -*- coding=utf-8 -*-
import datetime
import invoke
import sys
from pipenv.__version__ import __version__
from parver import Version
from .vendoring import _get_git_root, drop_dir
VERSION_FILE = 'pipenv/__version__.py'
def log(msg):
print('[release] %s' % msg)
def get_version_file(ctx):
return _get_git_r... | 31.131387 | 128 | 0.6483 |
4a242bd051c57a1e7f9cd1d9cb1118b4e0ec55d8 | 2,179 | py | Python | code/tools/external/python/pygccxml/declarations/call_invocation.py | jgresula/jagpdf | 6c36958b109e6522e6b57d04144dd83c024778eb | [
"MIT"
] | 54 | 2015-02-16T14:25:16.000Z | 2022-03-16T07:54:25.000Z | code/tools/external/python/pygccxml/declarations/call_invocation.py | jgresula/jagpdf | 6c36958b109e6522e6b57d04144dd83c024778eb | [
"MIT"
] | null | null | null | code/tools/external/python/pygccxml/declarations/call_invocation.py | jgresula/jagpdf | 6c36958b109e6522e6b57d04144dd83c024778eb | [
"MIT"
] | 30 | 2015-03-05T08:52:25.000Z | 2022-02-17T13:49:15.000Z | # Copyright 2004 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
"""
free function call parser
This module implements all functionality necessary to parse C++ free function
invocation. In other ... | 27.582278 | 80 | 0.69665 |
4a242cd26d5ed94f6bd3331a858fbb10da84919b | 391 | py | Python | auditlog/migrations/0004_logentry_detailed_object_repr.py | shawnrobb/django-auditlog | 87aeba2bdb02a0e35994ea08a67261f5b1d0c3a9 | [
"MIT"
] | 252 | 2020-09-23T13:32:49.000Z | 2022-03-29T18:38:59.000Z | auditlog/migrations/0004_logentry_detailed_object_repr.py | shawnrobb/django-auditlog | 87aeba2bdb02a0e35994ea08a67261f5b1d0c3a9 | [
"MIT"
] | 121 | 2020-09-23T12:56:39.000Z | 2022-03-31T06:59:09.000Z | auditlog/migrations/0004_logentry_detailed_object_repr.py | shawnrobb/django-auditlog | 87aeba2bdb02a0e35994ea08a67261f5b1d0c3a9 | [
"MIT"
] | 89 | 2020-09-25T07:22:52.000Z | 2022-03-29T07:59:35.000Z | import jsonfield.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("auditlog", "0003_logentry_remote_addr"),
]
operations = [
migrations.AddField(
model_name="logentry",
name="additional_data",
fie... | 21.722222 | 68 | 0.624041 |
4a242ecfbdd21a87fbf108aac4e3e78ea94c4e37 | 913 | py | Python | __init__.py | nbons/baseclasses | 25a7feef901f7bb73696a1b2860a1e83d467d883 | [
"Apache-2.0"
] | null | null | null | __init__.py | nbons/baseclasses | 25a7feef901f7bb73696a1b2860a1e83d467d883 | [
"Apache-2.0"
] | null | null | null | __init__.py | nbons/baseclasses | 25a7feef901f7bb73696a1b2860a1e83d467d883 | [
"Apache-2.0"
] | null | null | null | from .python.pyAero_problem import AeroProblem
from .python.pyTransi_problem import TransiProblem
from .python.pyStruct_problem import StructProblem
from .python.pyAeroStruct_problem import AeroStructProblem
from .python.pyAero_solver import AeroSolver
from .python.BaseSolver import BaseSolver
from .python.pyMission_... | 36.52 | 70 | 0.875137 |
4a242f2d3fade073b50b80cc76923eaa76d4bef6 | 11,308 | py | Python | v1.0.0.test/toontown/shtiker/HtmlView.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-01T15:46:43.000Z | 2021-07-23T16:26:48.000Z | v1.0.0.test/toontown/shtiker/HtmlView.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 1 | 2019-06-29T03:40:05.000Z | 2021-06-13T01:15:16.000Z | v1.0.0.test/toontown/shtiker/HtmlView.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-28T21:18:46.000Z | 2021-02-25T06:37:25.000Z | import array, sys
from direct.showbase.DirectObject import DirectObject
from direct.task.Task import Task
from direct.directnotify import DirectNotifyGlobal
from panda3d.core import Texture, CardMaker, NodePath, Point3, Vec3, Vec4, VBase4D, Point2, PNMImage, TextureStage, Texture, WindowProperties, AwWebView, AwWebCore... | 41.12 | 163 | 0.628493 |
4a242f425e51fd7f35811a5211725736592140d9 | 29,113 | py | Python | plasmapy/diagnostics/tests/test_charged_particle_radiography.py | lucianogsilvestri/PlasmaPy | 3e234246d9218208f20aaf5e83845049bc6f1584 | [
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-1-Clause",
"BSD-3-Clause"
] | null | null | null | plasmapy/diagnostics/tests/test_charged_particle_radiography.py | lucianogsilvestri/PlasmaPy | 3e234246d9218208f20aaf5e83845049bc6f1584 | [
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-1-Clause",
"BSD-3-Clause"
] | null | null | null | plasmapy/diagnostics/tests/test_charged_particle_radiography.py | lucianogsilvestri/PlasmaPy | 3e234246d9218208f20aaf5e83845049bc6f1584 | [
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-1-Clause",
"BSD-3-Clause"
] | null | null | null | """
Tests for proton radiography functions
"""
import astropy.constants as const
import astropy.units as u
import numpy as np
import os
import pytest
from scipy.special import erf
from plasmapy.diagnostics import charged_particle_radiography as cpr
from plasmapy.plasma.grids import CartesianGrid
def _test_grid(
... | 33.734647 | 88 | 0.592828 |
4a242f59c45f3b57ad76aca9df5feeed19a826c8 | 14,902 | py | Python | mmdet/models/detectors/two_stage_mask_assis.py | Gitgigabyte/mmd | 02cf37884d3ac9a6018656d1871695669966dfb3 | [
"Apache-2.0"
] | 1 | 2020-03-13T08:37:35.000Z | 2020-03-13T08:37:35.000Z | mmdet/models/detectors/two_stage_mask_assis.py | Gitgigabyte/mmd | 02cf37884d3ac9a6018656d1871695669966dfb3 | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/two_stage_mask_assis.py | Gitgigabyte/mmd | 02cf37884d3ac9a6018656d1871695669966dfb3 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from mmdet.core import bbox2result, bbox2roi, build_assigner, build_sampler
from .. import builder
from ..registry import DETECTORS
from .base import BaseDetector
from .test_mixins import BBoxTestMixin, MaskTestMixin, RPNTestMixin
@DETECTORS.regist... | 40.275676 | 107 | 0.549255 |
4a242f99cafd9dd2c7691cf6df7a3fd333fedba3 | 527 | py | Python | trabalho-numerico/contorno.py | heissonwillen/tcm | 71da46489f12e64b50436b17447721cb8f7eaf09 | [
"MIT"
] | null | null | null | trabalho-numerico/contorno.py | heissonwillen/tcm | 71da46489f12e64b50436b17447721cb8f7eaf09 | [
"MIT"
] | null | null | null | trabalho-numerico/contorno.py | heissonwillen/tcm | 71da46489f12e64b50436b17447721cb8f7eaf09 | [
"MIT"
] | null | null | null | import numpy as np
from constantes import INTERVALOS, DELTA_X
'''Problema 0
'''
p_0 = np.zeros(INTERVALOS+1, float)
p_0[-1] = 1
'''Problema 1
T(0, t) = 0 e T(1, t) = 0, t ≥ 0
T(x, 0) = 1, 0 < x < 1
'''
p_1 = np.linspace(1, 1, INTERVALOS+1)
p_1[0] = 0
p_1[-1] = 0
'''Problema 2
T(0, t) = 0 e T(1, t) = 0, t ≥ 0
T(x, 0)... | 17.566667 | 45 | 0.529412 |
4a24305aac801a70470ffd33b06e1045d6d3a986 | 9,260 | py | Python | bigbench/seqio/tasks_test.py | SafeRoboticsLab/BIG-bench | ba5569eb3579efaeaa3df1b93d71eceb2b542def | [
"Apache-2.0"
] | 1 | 2021-10-07T20:52:41.000Z | 2021-10-07T20:52:41.000Z | bigbench/seqio/tasks_test.py | SafeRoboticsLab/BIG-bench | ba5569eb3579efaeaa3df1b93d71eceb2b542def | [
"Apache-2.0"
] | null | null | null | bigbench/seqio/tasks_test.py | SafeRoboticsLab/BIG-bench | ba5569eb3579efaeaa3df1b93d71eceb2b542def | [
"Apache-2.0"
] | 1 | 2021-09-24T17:27:41.000Z | 2021-09-24T17:27:41.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | 40.26087 | 88 | 0.558315 |
4a24335a2137933438ce5640a47cf8d7c1a859b7 | 8,111 | py | Python | papers/cats/utility/get_online_results.py | Ark-kun/vowpal_wabbit | d811c93fa6adbb513729698202984e3662a3d8df | [
"BSD-3-Clause"
] | 4,332 | 2015-01-01T10:26:51.000Z | 2018-10-01T14:05:43.000Z | papers/cats/utility/get_online_results.py | chrinide/vowpal_wabbit | 40e1fef676ca6a461d71cf0631ab5c63d1af5d8a | [
"BSD-3-Clause"
] | 1,004 | 2015-01-01T12:00:54.000Z | 2018-09-30T22:13:42.000Z | papers/cats/utility/get_online_results.py | chrinide/vowpal_wabbit | 40e1fef676ca6a461d71cf0631ab5c63d1af5d8a | [
"BSD-3-Clause"
] | 1,182 | 2015-01-02T20:38:55.000Z | 2018-09-26T02:47:37.000Z | import sys
import getopt
from confidence_interval import ConfidenceInterval
def nextword(target, source):
for i, w in enumerate(source):
if w == target:
return source[i + 1]
class LossStructOn:
def __init__(
self, model, n, h, loss, time, max_cost, nb_examples, ci_lower, ci_upper... | 33.241803 | 88 | 0.496116 |
4a2433cb874833c3e46561d215afaed7b8e308fb | 30,727 | py | Python | MinkowskiEngine/MinkowskiSparseTensor.py | Geomni/MinkowskiEngine | 0d06bd4ed183a28386464102e6b48acae80a99b3 | [
"MIT"
] | null | null | null | MinkowskiEngine/MinkowskiSparseTensor.py | Geomni/MinkowskiEngine | 0d06bd4ed183a28386464102e6b48acae80a99b3 | [
"MIT"
] | null | null | null | MinkowskiEngine/MinkowskiSparseTensor.py | Geomni/MinkowskiEngine | 0d06bd4ed183a28386464102e6b48acae80a99b3 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 NVIDIA CORPORATION.
# Copyright (c) 2018-2020 Chris Choy (chrischoy@ai.stanford.edu).
#
# 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 wit... | 41.748641 | 142 | 0.619227 |
4a2434dc1167710d7bdccd36174db529c93b8201 | 2,089 | py | Python | EstruturaDeRepeticao/37.py | TheCarvalho/atividades-wikipython | 9163d5de40dbed0d73917f6257e64a651a77e085 | [
"Unlicense"
] | null | null | null | EstruturaDeRepeticao/37.py | TheCarvalho/atividades-wikipython | 9163d5de40dbed0d73917f6257e64a651a77e085 | [
"Unlicense"
] | null | null | null | EstruturaDeRepeticao/37.py | TheCarvalho/atividades-wikipython | 9163d5de40dbed0d73917f6257e64a651a77e085 | [
"Unlicense"
] | null | null | null | '''
37. Uma academia deseja fazer um senso entre seus clientes para descobrir o mais alto, o mais baixo, a mais gordo e o mais
magro, para isto você deve fazer um programa que pergunte a cada um dos clientes da academia seu código, sua altura e
seu peso. O final da digitação de dados deve ser dada quando o usuário digi... | 34.816667 | 122 | 0.622786 |
4a24355f74ac48eb59fed1ffd8cf07b934daaebd | 468 | py | Python | canvasapi/course_epub_export.py | eriktews/canvasapi | 132146395ecf55227cae69dc4d5f6d94545172b9 | [
"MIT"
] | null | null | null | canvasapi/course_epub_export.py | eriktews/canvasapi | 132146395ecf55227cae69dc4d5f6d94545172b9 | [
"MIT"
] | null | null | null | canvasapi/course_epub_export.py | eriktews/canvasapi | 132146395ecf55227cae69dc4d5f6d94545172b9 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
from six import python_2_unicode_compatible
from canvasapi.canvas_object import CanvasObject
@python_2_unicode_compatible
class CourseEpubExport(CanvasObject):
def __str__(self):
return "{} course_id:({}) epub_id:({}) {} ... | 27.529412 | 82 | 0.681624 |
4a24366ab3818325a847f3f11b61fc9e377ed009 | 53,980 | py | Python | src/gui/main_widget.py | JARVIS-AI/The-Witcher-3-Mod-manager-1 | fdc4763e29bc3cef6f7b4df51a1c4e286da0fe06 | [
"BSD-2-Clause"
] | null | null | null | src/gui/main_widget.py | JARVIS-AI/The-Witcher-3-Mod-manager-1 | fdc4763e29bc3cef6f7b4df51a1c4e286da0fe06 | [
"BSD-2-Clause"
] | null | null | null | src/gui/main_widget.py | JARVIS-AI/The-Witcher-3-Mod-manager-1 | fdc4763e29bc3cef6f7b4df51a1c4e286da0fe06 | [
"BSD-2-Clause"
] | null | null | null | '''Main Widget'''
# pylint: disable=invalid-name,superfluous-parens,wildcard-import,bare-except,broad-except,wildcard-import,unused-wildcard-import,missing-docstring,too-many-lines
from sys import platform
from os import path
from PySide2.QtCore import QFileInfo, QMetaObject, QRect, QSize, QThread, Qt, Signal
from Py... | 42.807296 | 277 | 0.620267 |
4a2436a8f2130642fbe3761141728de744cd5399 | 420 | py | Python | model-optimizer/extensions/front/tf/select_ext.py | NikDemoShow/openvino | 31907e51e96f1603753dc69811bdf738374ca5e6 | [
"Apache-2.0"
] | 3 | 2021-12-20T16:22:38.000Z | 2022-01-11T09:46:37.000Z | model-optimizer/extensions/front/tf/select_ext.py | NikDemoShow/openvino | 31907e51e96f1603753dc69811bdf738374ca5e6 | [
"Apache-2.0"
] | 105 | 2020-06-04T00:23:29.000Z | 2022-02-21T13:04:33.000Z | model-optimizer/extensions/front/tf/select_ext.py | v-Golubev/openvino | 26936d1fbb025c503ee43fe74593ee9d7862ab15 | [
"Apache-2.0"
] | 4 | 2021-04-02T08:48:38.000Z | 2021-07-01T06:59:02.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from extensions.ops.select import Select
from mo.front.extractor import FrontExtractorOp
from mo.graph.graph import Node
class SelectExtractor(FrontExtractorOp):
op = 'Select'
enabled = True
@classmethod
def extract(cl... | 24.705882 | 56 | 0.721429 |
4a24373a4e28877b52b323f588d5c3b78e11b74f | 806 | py | Python | bip_utils/bip/bip32/__init__.py | MIPPLTeam/bip_utils | c66446e7ac3879d2cf6308c5b8eb7f7705292660 | [
"MIT"
] | 149 | 2020-05-15T08:11:43.000Z | 2022-03-29T16:34:42.000Z | bip_utils/bip/bip32/__init__.py | MIPPLTeam/bip_utils | c66446e7ac3879d2cf6308c5b8eb7f7705292660 | [
"MIT"
] | 41 | 2020-04-03T15:57:56.000Z | 2022-03-31T08:25:11.000Z | bip_utils/bip/bip32/__init__.py | MIPPLTeam/bip_utils | c66446e7ac3879d2cf6308c5b8eb7f7705292660 | [
"MIT"
] | 55 | 2020-04-03T17:05:15.000Z | 2022-03-24T12:43:42.000Z | from bip_utils.bip.bip32.bip32_base import Bip32Base
from bip_utils.bip.bip32.bip32_const import Bip32Const
from bip_utils.bip.bip32.bip32_ed25519_slip import Bip32Ed25519Slip
from bip_utils.bip.bip32.bip32_ed25519_blake2b_slip import Bip32Ed25519Blake2bSlip
from bip_utils.bip.bip32.bip32_nist256p1 import Bip32Nist256p... | 57.571429 | 98 | 0.87469 |
4a2437df996ef3ed713b8cb583c50c823a114268 | 4,171 | py | Python | examples/switch/smm2_ninji.py | kinnay/NintendoClients | 8d264ea4d5eccb9ef8f212b1ddb4d22634dc4e3f | [
"MIT"
] | 144 | 2020-12-05T21:56:41.000Z | 2022-03-27T20:25:48.000Z | examples/switch/smm2_ninji.py | kinnay/NintendoClients | 8d264ea4d5eccb9ef8f212b1ddb4d22634dc4e3f | [
"MIT"
] | 28 | 2020-12-03T17:48:06.000Z | 2022-03-25T20:27:48.000Z | examples/switch/smm2_ninji.py | kinnay/NintendoClients | 8d264ea4d5eccb9ef8f212b1ddb4d22634dc4e3f | [
"MIT"
] | 22 | 2020-12-06T11:42:23.000Z | 2022-03-22T06:17:00.000Z |
from nintendo.baas import BAASClient
from nintendo.dauth import DAuthClient
from nintendo.aauth import AAuthClient
from nintendo.switch import ProdInfo, KeySet
from nintendo.nex import backend, authentication, \
datastore_smm2 as datastore, settings
from nintendo.games import SMM2
from anynet import http
imp... | 30.896296 | 88 | 0.714936 |
4a2437f2a581c5b9dc92f758babc0ca06eba66d7 | 4,107 | py | Python | example/jclient/__init__.py | lega911/job_server | e65ff359d16217de7a67413aa1a295a551eaee99 | [
"MIT"
] | 16 | 2015-09-15T14:47:14.000Z | 2017-08-10T07:41:25.000Z | example/jclient/__init__.py | lega911/job_server | e65ff359d16217de7a67413aa1a295a551eaee99 | [
"MIT"
] | 4 | 2015-09-07T17:15:42.000Z | 2015-09-15T07:19:48.000Z | example/jclient/__init__.py | lega911/job_server | e65ff359d16217de7a67413aa1a295a551eaee99 | [
"MIT"
] | null | null | null |
import socket
from .utils import int_to_b3, b3_to_int, UnknownMethod, Error, WorkerException, recvall, byte_to_int
try:
import queue
except ImportError:
import Queue as queue
class WorkerHandler(object):
"""
Example:
rpc = WorkerHandler('localhost', 8011)
rpc.add('ping', ping)
... | 29.335714 | 100 | 0.521305 |
4a2439079bf37857d229e0281efa9dcd7fdbafd4 | 7,640 | py | Python | GAE/main.py | World4AI/reinforcement-learning | 21267d12a19f9982baca003e4b976b19d3d8866c | [
"MIT"
] | null | null | null | GAE/main.py | World4AI/reinforcement-learning | 21267d12a19f9982baca003e4b976b19d3d8866c | [
"MIT"
] | null | null | null | GAE/main.py | World4AI/reinforcement-learning | 21267d12a19f9982baca003e4b976b19d3d8866c | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.distributions import Categorical
import numpy as np
import argparse
import gym
class ActorCritic(nn.Module):
def __init__(self, num_features, num_actions, name):
super(ActorCritic, self).__init__()
self.path = name + '.pth'
self.model = nn.Seq... | 38.781726 | 157 | 0.603141 |
4a243979a54311a8583844e7428741d8457499f2 | 6,794 | py | Python | soba/agents/roomsOccupant.py | GGP00/soba | c193f323f26eccf579a454b8bb4bec4e80644444 | [
"MIT"
] | 1 | 2017-03-06T12:33:02.000Z | 2017-03-06T12:33:02.000Z | soba/agents/roomsOccupant.py | GGP00/soba | c193f323f26eccf579a454b8bb4bec4e80644444 | [
"MIT"
] | 3 | 2017-04-26T08:57:35.000Z | 2019-04-24T08:28:24.000Z | soba/agents/roomsOccupant.py | GGP00/soba | c193f323f26eccf579a454b8bb4bec4e80644444 | [
"MIT"
] | 1 | 2019-01-20T17:39:00.000Z | 2019-01-20T17:39:00.000Z | import random
import soba.agents.resources.aStar as aStar
from soba.agents.occupant import Occupant
class RoomsOccupant(Occupant):
"""
This class enables to create occupants that are modelled with a simplified models based on a discrete space associated with rooms.
The occupants are agents with their activit... | 36.138298 | 143 | 0.686047 |
4a243985db34b35c9f3fc54456b857956b202c84 | 2,578 | py | Python | lib/spack/spack/test/util/util_gpg.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-05-24T15:23:12.000Z | 2020-05-24T15:23:12.000Z | lib/spack/spack/test/util/util_gpg.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 6 | 2022-02-26T11:44:34.000Z | 2022-03-12T12:14:50.000Z | lib/spack/spack/test/util/util_gpg.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-09-15T02:37:59.000Z | 2020-09-21T04:34:38.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import spack.util.gpg as gpg
def test_parse_gpg_output_case_one():
# Two keys, fingerprint for primary keys, but not... | 42.262295 | 76 | 0.72886 |
4a2439b36006b8b5505bcacd9d9953c3010cad1a | 176,433 | py | Python | psx/_dump_/28/_dump_ida_/make_psx.py | maoa3/scalpel | 2e7381b516cded28996d290438acc618d00b2aa7 | [
"Unlicense"
] | 15 | 2018-06-28T01:11:25.000Z | 2021-09-27T15:57:18.000Z | psx/_dump_/28/_dump_ida_/make_psx.py | maoa3/scalpel | 2e7381b516cded28996d290438acc618d00b2aa7 | [
"Unlicense"
] | 7 | 2018-06-29T04:08:23.000Z | 2019-10-17T13:57:22.000Z | psx/_dump_/28/_dump_ida_/make_psx.py | maoa3/scalpel | 2e7381b516cded28996d290438acc618d00b2aa7 | [
"Unlicense"
] | 7 | 2018-06-28T01:11:34.000Z | 2020-05-23T09:21:48.000Z | set_name(0x8007B9B4, "GetTpY__FUs", SN_NOWARN)
set_name(0x8007B9D0, "GetTpX__FUs", SN_NOWARN)
set_name(0x8007B9DC, "Remove96__Fv", SN_NOWARN)
set_name(0x8007BA14, "AppMain", SN_NOWARN)
set_name(0x8007BB2C, "MAIN_RestartGameTask__Fv", SN_NOWARN)
set_name(0x8007BB58, "GameTask__FP4TASK", SN_NOWARN)
set_name(0x8007BC40, "... | 53.351376 | 94 | 0.831358 |
4a243a0e5213c7d873bd91b7a8941e0f0f1300e8 | 1,778 | py | Python | scripts/select_ref_by_ANI/parse_closest_ANI.py | nickp60/riboSeed | 636eaf78a1bbe4517c43ddb120e5ca5bb2b97212 | [
"MIT"
] | 7 | 2017-02-04T14:33:36.000Z | 2021-02-14T21:03:33.000Z | scripts/select_ref_by_ANI/parse_closest_ANI.py | nickp60/riboSeed | 636eaf78a1bbe4517c43ddb120e5ca5bb2b97212 | [
"MIT"
] | 11 | 2017-03-13T15:23:20.000Z | 2020-06-30T17:34:56.000Z | scripts/select_ref_by_ANI/parse_closest_ANI.py | nickp60/riboSeed | 636eaf78a1bbe4517c43ddb120e5ca5bb2b97212 | [
"MIT"
] | 3 | 2017-08-10T12:14:22.000Z | 2022-03-27T14:35:12.000Z | import sys
counter = 0
matrix = []
with open(sys.argv[1], 'r') as inf:
for line in inf:
thisline = line.strip().split("\t")
matrix.append(thisline)
# for i,x in enumerate(thisline):
# if x == "contigs" or x == "scaffolds":
# print(i + 2) # unix indexes at 1, and l... | 42.333333 | 166 | 0.673228 |
4a243a51f1c3704674b477f2c65030fc5b33c2c9 | 563 | py | Python | setup.py | gsgoncalves/K-NRM | b7bc8c44ddf6c8d0bc14a399beb05c9c1956fe2f | [
"BSD-3-Clause"
] | 198 | 2017-11-02T18:11:44.000Z | 2022-03-26T00:03:03.000Z | setup.py | gsgoncalves/K-NRM | b7bc8c44ddf6c8d0bc14a399beb05c9c1956fe2f | [
"BSD-3-Clause"
] | 18 | 2017-11-14T08:04:21.000Z | 2022-01-14T09:09:45.000Z | setup.py | gsgoncalves/K-NRM | b7bc8c44ddf6c8d0bc14a399beb05c9c1956fe2f | [
"BSD-3-Clause"
] | 43 | 2017-11-02T16:43:35.000Z | 2021-06-13T09:22:13.000Z | # Copyright (c) 2017, Carnegie Mellon University. All rights reserved.
#
# Use of the K-NRM package is subject to the terms of the software license set
# forth in the LICENSE file included with this software, and also available at
# https://github.com/AdeDZY/K-NRM/blob/master/LICENSE
from setuptools import setup
from ... | 31.277778 | 78 | 0.719361 |
4a243ac384738f4049463481ea23f2ed51c9119f | 88,475 | py | Python | modules/templates/RLPPTM/helpers.py | nursix/gims | 6401aa82726bf79986c266a4f7a98a5de83e6c13 | [
"MIT"
] | null | null | null | modules/templates/RLPPTM/helpers.py | nursix/gims | 6401aa82726bf79986c266a4f7a98a5de83e6c13 | [
"MIT"
] | null | null | null | modules/templates/RLPPTM/helpers.py | nursix/gims | 6401aa82726bf79986c266a4f7a98a5de83e6c13 | [
"MIT"
] | null | null | null | """
Helper functions and classes for RLPPTM
License: MIT
"""
import json
from dateutil import rrule
from gluon import current, Field, \
CRYPT, IS_EMAIL, IS_IN_SET, IS_LOWER, IS_NOT_IN_DB, \
SQLFORM, A, DIV, H4, H5, I, INPUT, LI, P, SPAN, TABLE, TD, TH, TR, UL
from core i... | 35.733037 | 100 | 0.462809 |
4a243b15325c39b2498d3d1e7b1745b0b83ec269 | 14,649 | py | Python | wxpy/api/bot.py | bluedazzle/wxpy | c9e623c2fd2c16443227c2eaf19617c319c24936 | [
"MIT"
] | 3 | 2017-05-21T01:34:36.000Z | 2021-02-18T03:08:16.000Z | wxpy/api/bot.py | bluedazzle/wxpy | c9e623c2fd2c16443227c2eaf19617c319c24936 | [
"MIT"
] | 2 | 2017-05-17T04:52:19.000Z | 2017-05-29T07:39:19.000Z | wxpy/api/bot.py | bluedazzle/wxpy | c9e623c2fd2c16443227c2eaf19617c319c24936 | [
"MIT"
] | 1 | 2021-02-18T03:08:17.000Z | 2021-02-18T03:08:17.000Z | # coding: utf-8
from __future__ import unicode_literals
import atexit
import functools
import logging
import os.path
import queue
import tempfile
from pprint import pformat
from threading import Thread
import itchat
from ..api.chats import Chat, Chats, Friend, Group, MP, User
from ..api.consts import SYSTEM
from ..a... | 27.902857 | 109 | 0.56468 |
4a243b58bf19dcff418dc05419da731d417457c7 | 2,428 | py | Python | env/lib/python3.6/site-packages/openpyxl/utils/dataframe.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 6 | 2018-05-15T05:08:52.000Z | 2021-12-23T12:31:28.000Z | env/lib/python3.6/site-packages/openpyxl/utils/dataframe.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 4 | 2021-03-11T04:02:00.000Z | 2022-03-27T08:31:56.000Z | env/lib/python3.6/site-packages/openpyxl/utils/dataframe.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 5 | 2018-06-26T11:57:17.000Z | 2021-03-28T06:52:15.000Z | from __future__ import absolute_import
# Copyright (c) 2010-2018 openpyxl
import operator
from openpyxl.compat import accumulate, zip
def dataframe_to_rows(df, index=True, header=True):
"""
Convert a Pandas dataframe into something suitable for passing into a worksheet.
If index is True then the index wi... | 28.564706 | 92 | 0.568369 |
4a243cc423712106ddcd73878c64d711ecf9130d | 19,118 | py | Python | localstack/services/generic_proxy.py | ap0/localstack | 56fc6e0e606d1777d1982e91a9bb13d22da1a124 | [
"Apache-2.0"
] | null | null | null | localstack/services/generic_proxy.py | ap0/localstack | 56fc6e0e606d1777d1982e91a9bb13d22da1a124 | [
"Apache-2.0"
] | null | null | null | localstack/services/generic_proxy.py | ap0/localstack | 56fc6e0e606d1777d1982e91a9bb13d22da1a124 | [
"Apache-2.0"
] | null | null | null | import re
import os
import sys
import ssl
import json
import socket
import inspect
import logging
import traceback
import click
import requests
from ssl import SSLError
from flask_cors import CORS
from requests.structures import CaseInsensitiveDict
from requests.models import Response, Request
from six import iteritems... | 41.925439 | 116 | 0.619992 |
4a243cc6298393af428b5de5bebdd9a02cfc0b67 | 18,569 | py | Python | scripts/pocketAnalysis/generateVoxels.py | demattox/lec_gly_binding | 44a12445d3ed89029a21bed1c516a67bd86e0c68 | [
"MIT"
] | null | null | null | scripts/pocketAnalysis/generateVoxels.py | demattox/lec_gly_binding | 44a12445d3ed89029a21bed1c516a67bd86e0c68 | [
"MIT"
] | null | null | null | scripts/pocketAnalysis/generateVoxels.py | demattox/lec_gly_binding | 44a12445d3ed89029a21bed1c516a67bd86e0c68 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jul 17 10:44:57 2020
@author: dmattox
"""
import os
import glob
import dill
import time
# import itertools, collections
import numpy as np
import Bio.PDB
# import pliptool.plip.modules.plipxml as plipxml
from scipy.spatial import ConvexHull
from sklear... | 58.028125 | 320 | 0.540632 |
4a243ce0e588f5151b77f3129b17030782a65102 | 218 | py | Python | ymir/command/mir/tools/settings.py | Zhang-SJ930104/ymir | dd6481be6f229ade4cf8fba64ef44a15357430c4 | [
"Apache-2.0"
] | 64 | 2021-11-15T03:48:00.000Z | 2022-03-25T07:08:46.000Z | ymir/command/mir/tools/settings.py | Zhang-SJ930104/ymir | dd6481be6f229ade4cf8fba64ef44a15357430c4 | [
"Apache-2.0"
] | 35 | 2021-11-23T04:14:35.000Z | 2022-03-26T09:03:43.000Z | ymir/command/mir/tools/settings.py | Aryalfrat/ymir | d4617ed00ef67a77ab4e1944763f608bface4be6 | [
"Apache-2.0"
] | 57 | 2021-11-11T10:15:40.000Z | 2022-03-29T07:27:54.000Z | PRODUCER_KEY = 'producer'
PRODUCER_NAME = 'ymir'
EXECUTOR_CONFIG_KEY = 'executor_config'
TASK_CONTEXT_KEY = 'task_context'
TASK_CONTEXT_PARAMETERS_KEY = 'task_parameters'
EXECUTOR_OUTLOG_NAME = 'ymir-executor-out.log'
| 31.142857 | 47 | 0.821101 |
4a243d31661e67e09041f4c9610293d0ad355158 | 6,927 | py | Python | backend/suvfitness_31834/settings.py | crowdbotics-apps/suvfitness-31834 | cb9a281a2d4da3a967a40143cd5a68a76d062c11 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/suvfitness_31834/settings.py | crowdbotics-apps/suvfitness-31834 | cb9a281a2d4da3a967a40143cd5a68a76d062c11 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/suvfitness_31834/settings.py | crowdbotics-apps/suvfitness-31834 | cb9a281a2d4da3a967a40143cd5a68a76d062c11 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for suvfitness_31834 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
imp... | 29.602564 | 112 | 0.730908 |
4a243da212ef1733b25871da62ebf7bea851b059 | 207 | py | Python | crcsolver/__init__.py | lwerdna/crc_cracker | 8fcf4d154866895d8c96cb856eee114ae8215bd0 | [
"Unlicense"
] | 2 | 2020-05-02T04:09:48.000Z | 2020-05-08T13:53:56.000Z | crcsolver/__init__.py | lwerdna/crc_cracker | 8fcf4d154866895d8c96cb856eee114ae8215bd0 | [
"Unlicense"
] | null | null | null | crcsolver/__init__.py | lwerdna/crc_cracker | 8fcf4d154866895d8c96cb856eee114ae8215bd0 | [
"Unlicense"
] | 1 | 2020-05-02T04:14:19.000Z | 2020-05-02T04:14:19.000Z | name = "crcsolver"
from . import main
def solve(data, unknowns, desired, crc_func):
return main.solve(data, unknowns, desired, crc_func)
def compute(data, crc_name):
return main.compute(data, crc_name)
| 20.7 | 53 | 0.748792 |
4a243fe2af2fbe44d02f53e675c2978288c6452b | 1,609 | py | Python | test/test_inline_response_200_18.py | scubawhere/scubawhere-api-python-client | 9f8578e251492c7667f785df7b7c9d66e71f5c8e | [
"Apache-2.0"
] | null | null | null | test/test_inline_response_200_18.py | scubawhere/scubawhere-api-python-client | 9f8578e251492c7667f785df7b7c9d66e71f5c8e | [
"Apache-2.0"
] | null | null | null | test/test_inline_response_200_18.py | scubawhere/scubawhere-api-python-client | 9f8578e251492c7667f785df7b7c9d66e71f5c8e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Scubawhere API Documentation
This is the documentation for scubawhere's RMS API. This API is only to be used by authorized parties with valid auth tokens. [Learn about scubawhere](http://www.scubawhere.com) to become an authorized consumer of our API
OpenAPI spec version: 1.0.0
... | 29.796296 | 227 | 0.735861 |
4a24427a1d322bbd6f815b1d9c1ab6937a06e3f0 | 3,280 | py | Python | scripts/parse_pants_targets_and_keywords.py | pantsbuild/vim-pants | 6112addaeee02963aa1ed3cf180b5b3fea56c9d3 | [
"MIT"
] | 1 | 2015-04-27T13:14:40.000Z | 2015-04-27T13:14:40.000Z | scripts/parse_pants_targets_and_keywords.py | pantsbuild/vim-pants | 6112addaeee02963aa1ed3cf180b5b3fea56c9d3 | [
"MIT"
] | null | null | null | scripts/parse_pants_targets_and_keywords.py | pantsbuild/vim-pants | 6112addaeee02963aa1ed3cf180b5b3fea56c9d3 | [
"MIT"
] | null | null | null | # Prints all targets and keywords used in Pants BUILD dsl.
# $ cd commons/src/python/twitter/pants
# $ cat __init__.py targets/*.py|python parse_pants_targets_and_keywords.py -t|sort|uniq|awk '{print " \\ "$1}'
import sys
import ast
from optparse import OptionParser
class ClassHierarchyResolver(ast.NodeVisitor):
... | 29.54955 | 112 | 0.685976 |
4a2443a01ac21f2354289338d3d83d25c62cd881 | 23,706 | py | Python | DEEP LEARNING/segmentation/Kaggle TGS Salt Identification Challenge/v1/main.py | Diyago/ML-DL-scripts | 40718a9d4318d6d6531bcea5998c0a18afcd9cb3 | [
"Apache-2.0"
] | 142 | 2018-09-02T08:59:45.000Z | 2022-03-30T17:08:24.000Z | DEEP LEARNING/segmentation/Kaggle TGS Salt Identification Challenge/v1/main.py | jerinka/ML-DL-scripts | eeb5c3c7c5841eb4cdb272690e14d6718f3685b2 | [
"Apache-2.0"
] | 4 | 2019-09-08T07:27:11.000Z | 2021-10-19T05:50:24.000Z | DEEP LEARNING/segmentation/Kaggle TGS Salt Identification Challenge/v1/main.py | jerinka/ML-DL-scripts | eeb5c3c7c5841eb4cdb272690e14d6718f3685b2 | [
"Apache-2.0"
] | 75 | 2018-10-04T17:08:40.000Z | 2022-03-08T18:50:52.000Z | import argparse
from data_loader import *
from data_process.transform import *
from loss.bce_losses import *
from loss.cyclic_lr import *
from loss.lovasz_losses import *
from model.model import (
model34_DeepSupervion,
model50A_DeepSupervion,
model101A_DeepSupervion,
)
from utils import create_submission... | 37.450237 | 116 | 0.497216 |
4a244403a5d8e917f59000c35cf32c0f8b15ebb8 | 2,187 | py | Python | src/classifier/classifier_training/classifier_utils.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 14 | 2021-08-24T12:36:37.000Z | 2022-03-18T12:14:36.000Z | src/classifier/classifier_training/classifier_utils.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | null | null | null | src/classifier/classifier_training/classifier_utils.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 1 | 2021-10-21T20:22:55.000Z | 2021-10-21T20:22:55.000Z | import torch
import numpy as np
import xgboost as xgb
from sklearn.ensemble import RandomForestClassifier
from src.classifier.lstm.lstm_classifier import RegardLSTM
from src.classifier.sent_transformer.sbert_classifier import RegardBERT
def get_classifier(model_params, model_type, n_embed, weight_vector=None, classe... | 34.714286 | 88 | 0.652492 |
4a24446690a779077dd492cb8d3a91fd00b48c1b | 1,548 | py | Python | hard-gists/5167728/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/5167728/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/5167728/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | from PySide import QtGui, QtCore
def findDagWidget():
stack = QtGui.QApplication.topLevelWidgets()
while stack:
widget = stack.pop()
if widget.windowTitle() == 'Node Graph':
# You should probably be a little safer with this return, but the actual DAG widget
# seems to be here... | 28.666667 | 94 | 0.643411 |
4a2444a6382ff028cc19207870615e5e73417b21 | 631 | py | Python | icefuzz/export.py | jaxnb/icestorm | 0794aa3afa3776b5b0e7c408cfecc94823ca617e | [
"ISC"
] | 612 | 2015-07-18T12:15:58.000Z | 2020-06-23T13:01:53.000Z | icefuzz/export.py | jaxnb/icestorm | 0794aa3afa3776b5b0e7c408cfecc94823ca617e | [
"ISC"
] | 154 | 2015-07-29T14:06:23.000Z | 2020-06-22T12:41:25.000Z | icefuzz/export.py | jaxnb/icestorm | 0794aa3afa3776b5b0e7c408cfecc94823ca617e | [
"ISC"
] | 170 | 2015-07-20T01:45:20.000Z | 2020-06-23T07:36:54.000Z | #!/usr/bin/env python3
import os
device_class = os.getenv("ICEDEVICE")
with open("../icebox/iceboxdb.py", "w") as f:
files = [ "database_io", "database_logic", "database_ramb", "database_ramt", "database_ipcon_5k"]
for device_class in ["8k"]:
files.append("database_ramb_" + device_class)
files.app... | 33.210526 | 101 | 0.586371 |
4a2444c37838587b50a2ad44d0e8c3a91c7ae6e4 | 16,141 | py | Python | myprojectenv/lib/python3.5/site-packages/ansible/modules/files/lineinfile.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | myprojectenv/lib/python3.5/site-packages/ansible/modules/files/lineinfile.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | myprojectenv/lib/python3.5/site-packages/ansible/modules/files/lineinfile.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com>
# (c) 2014, Ahti Kitsik <ak@ahtik.com>
#
# 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 S... | 34.197034 | 131 | 0.631621 |
4a2445ef1fb580ebee59da97c581bc90275fd5dd | 20,113 | py | Python | Adafruit_CharLCD/Adafruit_CharLCD.py | jfabi/infomini | bddfc52d0068bccf4e7827cc7730c5ecd6cc7806 | [
"MIT"
] | null | null | null | Adafruit_CharLCD/Adafruit_CharLCD.py | jfabi/infomini | bddfc52d0068bccf4e7827cc7730c5ecd6cc7806 | [
"MIT"
] | 1 | 2017-10-13T00:25:50.000Z | 2017-11-10T01:53:14.000Z | Adafruit_CharLCD/Adafruit_CharLCD.py | jfabi/infomini | bddfc52d0068bccf4e7827cc7730c5ecd6cc7806 | [
"MIT"
] | null | null | null | # Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
#
# 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, c... | 44.399558 | 105 | 0.600855 |
4a2446bb9234625f2c07ed3cfa35889ba9ca2347 | 5,902 | py | Python | Chapter06/02_dqn_pong.py | feiwang20/DRLHandsOn-Playground | b940c4959993d3ad7c6a2b0429b155d21cafe845 | [
"MIT"
] | 2,497 | 2018-05-25T09:45:54.000Z | 2022-03-31T14:30:28.000Z | Chapter06/02_dqn_pong.py | feiwang20/DRLHandsOn-Playground | b940c4959993d3ad7c6a2b0429b155d21cafe845 | [
"MIT"
] | 94 | 2018-09-02T11:53:00.000Z | 2022-03-02T07:36:31.000Z | Chapter06/02_dqn_pong.py | feiwang20/DRLHandsOn-Playground | b940c4959993d3ad7c6a2b0429b155d21cafe845 | [
"MIT"
] | 1,254 | 2018-05-23T11:21:24.000Z | 2022-03-30T16:56:13.000Z | #!/usr/bin/env python3
from lib import wrappers
from lib import dqn_model
import argparse
import time
import numpy as np
import collections
import torch
import torch.nn as nn
import torch.optim as optim
from tensorboardX import SummaryWriter
DEFAULT_ENV_NAME = "PongNoFrameskip-v4"
MEAN_REWARD_BOUND = 19.5
GAMMA =... | 34.115607 | 113 | 0.648085 |
4a2446e4cc733549054fe6fb812377fd1ce310bf | 4,727 | py | Python | site-packages/pskf/tools/plot/pa/iterative.py | jjokella/pyshemkf | 61a6329f7aa5739a38a68504fd6a44568fcd833b | [
"MIT"
] | 5 | 2019-02-06T10:52:52.000Z | 2021-05-21T09:32:45.000Z | site-packages/pskf/tools/plot/pa/iterative.py | jjokella/pyshemkf | 61a6329f7aa5739a38a68504fd6a44568fcd833b | [
"MIT"
] | null | null | null | site-packages/pskf/tools/plot/pa/iterative.py | jjokella/pyshemkf | 61a6329f7aa5739a38a68504fd6a44568fcd833b | [
"MIT"
] | 1 | 2018-12-04T11:39:10.000Z | 2018-12-04T11:39:10.000Z | # Iterative
wavewell_dats = {50: '2018_03_21', 70: '2018_03_21',
100: '2018_03_21', 250: '2018_03_21',
500: '2018_03_21', 1000: '2018_03_21',
2000: '2018_03_21'}
wavewell_lets = {50: 'b', 70: 'aln', 100: 'bxz', 250: 'dkl',
500: 'ewx', 1000: 'gjj', 2000... | 53.11236 | 70 | 0.507933 |
4a244732363134901b2b46efd4e2bfaa9bb190c0 | 7,378 | py | Python | Leak #5 - Lost In Translation/windows/fuzzbunch/figlet.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 9 | 2019-11-22T04:58:40.000Z | 2022-02-26T16:47:28.000Z | Python.Fuzzbunch/fuzzbunch/figlet.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | Python.Fuzzbunch/fuzzbunch/figlet.py | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | 8 | 2017-09-27T10:31:18.000Z | 2022-01-08T10:30:46.000Z | """
Port of the C figlet driver to Python. Ugly, gross, not fully working, but
does what I need to display a simple banner with a hand selected set of fonts.
"""
import sys
import os
import random
__all__ = ['newbanner']
def newbanner(fontdir, msg):
"""
Returns msg converted to a random ascii art font from t... | 29.394422 | 92 | 0.485904 |
4a24474fbc565803357accfc254952e1dc6364bf | 84 | py | Python | project/settings.py | Divye02/cse599G1_HW | 7357d9f79fda887e2ce0ba58601fbc432d2b53fd | [
"Apache-2.0"
] | null | null | null | project/settings.py | Divye02/cse599G1_HW | 7357d9f79fda887e2ce0ba58601fbc432d2b53fd | [
"Apache-2.0"
] | null | null | null | project/settings.py | Divye02/cse599G1_HW | 7357d9f79fda887e2ce0ba58601fbc432d2b53fd | [
"Apache-2.0"
] | null | null | null | from local_settings import *
import os
RES_DIR = os.path.join(MAIN_DIR, 'results')
| 16.8 | 43 | 0.761905 |
4a2447acde75859fb7635e5971e432791a07f80d | 3,398 | py | Python | src/pyams_zmi/interfaces/viewlet.py | Py-AMS/pyams-zmi | 0073d12062728efad3dc2b5cb40b0f75eacaaa1d | [
"ZPL-2.1"
] | null | null | null | src/pyams_zmi/interfaces/viewlet.py | Py-AMS/pyams-zmi | 0073d12062728efad3dc2b5cb40b0f75eacaaa1d | [
"ZPL-2.1"
] | null | null | null | src/pyams_zmi/interfaces/viewlet.py | Py-AMS/pyams-zmi | 0073d12062728efad3dc2b5cb40b0f75eacaaa1d | [
"ZPL-2.1"
] | null | null | null | #
# Copyright (c) 2015-2020 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRAN... | 27.403226 | 89 | 0.723955 |
4a2447da11d183836fb555d74770ee3439a2b2a9 | 1,437 | py | Python | pipeline_web/drawing_new/constants.py | springborland/bk-sops | a9057672c10efb5f2414a805a30ead4092429c76 | [
"Apache-2.0"
] | 1 | 2021-05-19T04:31:34.000Z | 2021-05-19T04:31:34.000Z | pipeline_web/drawing_new/constants.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | pipeline_web/drawing_new/constants.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 37.815789 | 115 | 0.759221 |
4a24493380aa30a02108219e98ce85c1f1ae9e7f | 1,871 | py | Python | kubernetes/test/test_scheduling_v1alpha1_api.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | 1 | 2019-02-17T15:28:39.000Z | 2019-02-17T15:28:39.000Z | kubernetes/test/test_scheduling_v1alpha1_api.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_scheduling_v1alpha1_api.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 18.524752 | 105 | 0.616248 |
4a24497e2b4d133283e35fd56e7a3f5fa915e87c | 4,416 | py | Python | minio_storage/files.py | brianhelba/django-minio-storage | 7ebc10be0cf07c9c5709bb976a8df40d231f0433 | [
"Apache-2.0",
"MIT"
] | null | null | null | minio_storage/files.py | brianhelba/django-minio-storage | 7ebc10be0cf07c9c5709bb976a8df40d231f0433 | [
"Apache-2.0",
"MIT"
] | null | null | null | minio_storage/files.py | brianhelba/django-minio-storage | 7ebc10be0cf07c9c5709bb976a8df40d231f0433 | [
"Apache-2.0",
"MIT"
] | null | null | null | import tempfile
import typing as T
from logging import getLogger
from django.core.files.base import File
from minio import error as merr
from minio_storage.errors import minio_error
if T.TYPE_CHECKING:
from minio_storage.storage import Storage
logger = getLogger("minio_storage")
class ReadOnlyMixin:
"""Fil... | 29.245033 | 83 | 0.581748 |
4a244a264ccd8efbff6eaac69d084b59c9cdcd0e | 3,797 | py | Python | native/pca/GPU/base_pca.py | PokhodenkoSA/dpbench | b22970237a7d550f7b0514481797247edcb4f190 | [
"BSD-2-Clause"
] | null | null | null | native/pca/GPU/base_pca.py | PokhodenkoSA/dpbench | b22970237a7d550f7b0514481797247edcb4f190 | [
"BSD-2-Clause"
] | null | null | null | native/pca/GPU/base_pca.py | PokhodenkoSA/dpbench | b22970237a7d550f7b0514481797247edcb4f190 | [
"BSD-2-Clause"
] | null | null | null | # *****************************************************************************
# Copyright (c) 2020, Intel Corporation All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of sou... | 37.22549 | 98 | 0.643666 |
4a244aedf8bf66f0aeb54e8378f8348808b4ad54 | 1,331 | py | Python | mqtt_wrapper.py | alpsayin/keyboard-interceptor-esp | e3b25f03d2a541f002f068a3a49b5c7603ffd51e | [
"MIT"
] | null | null | null | mqtt_wrapper.py | alpsayin/keyboard-interceptor-esp | e3b25f03d2a541f002f068a3a49b5c7603ffd51e | [
"MIT"
] | null | null | null | mqtt_wrapper.py | alpsayin/keyboard-interceptor-esp | e3b25f03d2a541f002f068a3a49b5c7603ffd51e | [
"MIT"
] | 2 | 2020-12-21T13:04:59.000Z | 2021-06-13T02:04:16.000Z | import time
from umqtt.simple import MQTTClient
# Publish test messages e.g. with:
# mosquitto_pub -t foo_topic -m hello
blocking_wait = False
mqtt_client = None
# Received messages from subscriptions will be delivered to this callback
def simple_sub_cb(topic, msg):
print((topic, msg))
def init(client_id, host... | 27.729167 | 93 | 0.66867 |
4a244b915a4e8e59fb7724430734e5b842e91d02 | 4,699 | py | Python | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 45.621359 | 200 | 0.676314 |
4a244b9bb63e706df8c4ff57367dfaa23cd39310 | 9,668 | py | Python | parser/team28/main.py | Lenin201/tytus | cace7587b0274ceb26327b583201493bd1048b96 | [
"MIT"
] | null | null | null | parser/team28/main.py | Lenin201/tytus | cace7587b0274ceb26327b583201493bd1048b96 | [
"MIT"
] | null | null | null | parser/team28/main.py | Lenin201/tytus | cace7587b0274ceb26327b583201493bd1048b96 | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import ttk
from tkinter.filedialog import askopenfilename
from tkinter.filedialog import asksaveasfilename
from tkinter import messagebox
from tkinter import scrolledtext
from tkinter.font import Font
import os
import json
from utils.analyzers.syntactic import *
from controllers.err... | 44.146119 | 139 | 0.571473 |
4a244bc85448579584e18926043ee1fbf60fdeb0 | 1,394 | py | Python | src/utils/image.py | paulwarkentin/pytorch-neural-doodle | 4b0c8da17351ef1662a0ce0bf5979027bafb130e | [
"MIT"
] | 15 | 2018-10-07T14:54:33.000Z | 2021-10-09T11:22:14.000Z | src/utils/image.py | paulwarkentin/pytorch-neural-doodle | 4b0c8da17351ef1662a0ce0bf5979027bafb130e | [
"MIT"
] | null | null | null | src/utils/image.py | paulwarkentin/pytorch-neural-doodle | 4b0c8da17351ef1662a0ce0bf5979027bafb130e | [
"MIT"
] | 2 | 2019-05-31T19:27:38.000Z | 2020-01-08T15:02:12.000Z | ##
## pytorch-neural-doodle/src/utils/image.py
##
## Created by Bastian Boll <mail@bbboll.com> on 29/08/2018.
## Updated by Bastian Boll <mail@bbboll.com> on 06/10/2018.
import os.path
import numpy as np
import sys
import torch
from skimage import io
__exec_dir = sys.path[0]
while os.path.basename(__exec_dir) != "src... | 27.88 | 79 | 0.699426 |
4a244c075211f46d8a2f7dfb71c69fcd811f42c5 | 12,855 | py | Python | utils/smiles_similarity_new_weighted.py | BioSysLab/TF-platform | 358bf8846d32bc3b69e86332f476a8211364546b | [
"MIT"
] | null | null | null | utils/smiles_similarity_new_weighted.py | BioSysLab/TF-platform | 358bf8846d32bc3b69e86332f476a8211364546b | [
"MIT"
] | null | null | null | utils/smiles_similarity_new_weighted.py | BioSysLab/TF-platform | 358bf8846d32bc3b69e86332f476a8211364546b | [
"MIT"
] | 1 | 2020-06-09T13:59:25.000Z | 2020-06-09T13:59:25.000Z | import urllib
import os
import numpy as np
import pandas as pd
import sys
from sys import getsizeof
import scipy
from scipy import stats
import csv
#import rdkit
from rdkit import Chem
from rdkit import DataStructs
from rdkit.Chem import Draw
from rdkit.Chem.rdmolfiles import SDMolSupplier
from rdkit.Chem.Fingerprint... | 40.297806 | 244 | 0.620848 |
4a244c7b006e588ac9cf717b8459619195de02f0 | 216 | py | Python | core/cart/__init__.py | yezz123/Apollo | f27a655a6a5ee9186867b380840411feca21290f | [
"MIT"
] | 18 | 2021-07-28T22:01:48.000Z | 2022-02-07T10:57:21.000Z | core/cart/__init__.py | yezz123/Apollo | f27a655a6a5ee9186867b380840411feca21290f | [
"MIT"
] | null | null | null | core/cart/__init__.py | yezz123/Apollo | f27a655a6a5ee9186867b380840411feca21290f | [
"MIT"
] | 5 | 2021-07-29T01:47:28.000Z | 2022-01-05T02:04:54.000Z | #!/usr/bin/python3
from sqlalchemy.orm import Session
from fastapi import APIRouter, Depends, HTTPException
from data import database
from schemas import schemas
from api import crud
from data.database import get_db
| 27 | 53 | 0.833333 |
4a244e27d6565925596281b8723ef145ef127aa6 | 2,614 | py | Python | telegram_gcloner/handlers/contact.py | winkxx/telegram_gcloner | ab0c0e28fb09fc475bd4dd69677c0a4b29b24e56 | [
"MIT"
] | 213 | 2020-06-25T08:58:06.000Z | 2022-03-24T12:44:18.000Z | telegram_gcloner/handlers/contact.py | winkxx/telegram_gcloner | ab0c0e28fb09fc475bd4dd69677c0a4b29b24e56 | [
"MIT"
] | 4 | 2020-06-26T22:52:28.000Z | 2020-09-29T20:22:44.000Z | telegram_gcloner/handlers/contact.py | winkxx/telegram_gcloner | ab0c0e28fb09fc475bd4dd69677c0a4b29b24e56 | [
"MIT"
] | 101 | 2020-06-25T10:42:34.000Z | 2022-01-16T13:22:36.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import html
import logging
from telegram import ParseMode
from telegram.ext import Dispatcher, CommandHandler
from telegram.utils.helpers import mention_html
from utils.callback import callback_delete_message
from utils.config_loader import config
from utils.restricted impor... | 48.407407 | 117 | 0.625096 |
4a244edf6966017a575d46b9c42d92c7e0f53396 | 7,282 | py | Python | jni-build/jni/include/tensorflow/contrib/metrics/__init__.py | rcelebi/android-elfali | 4ea14a58a18356ef9e16aba2e7dae84c02afba12 | [
"Apache-2.0"
] | 680 | 2016-12-03T14:38:28.000Z | 2022-02-16T04:06:45.000Z | jni-build/jni/include/tensorflow/contrib/metrics/__init__.py | rcelebi/android-elfali | 4ea14a58a18356ef9e16aba2e7dae84c02afba12 | [
"Apache-2.0"
] | 38 | 2016-11-17T08:43:51.000Z | 2019-11-12T12:27:04.000Z | jni-build/jni/include/tensorflow/contrib/metrics/__init__.py | rcelebi/android-elfali | 4ea14a58a18356ef9e16aba2e7dae84c02afba12 | [
"Apache-2.0"
] | 250 | 2016-12-05T10:37:17.000Z | 2022-03-18T21:26:55.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 42.337209 | 94 | 0.815298 |
4a2450ee7d2b0696e758438da41654d8a76519f4 | 2,116 | py | Python | index_data.py | tonystratum/FashionShopApp | 34d34fc5855ab7b593855c2f07a4808689365e09 | [
"MIT"
] | 30 | 2020-06-22T11:46:41.000Z | 2021-12-17T11:29:35.000Z | index_data.py | tonystratum/FashionShopApp | 34d34fc5855ab7b593855c2f07a4808689365e09 | [
"MIT"
] | 3 | 2020-07-15T12:51:42.000Z | 2021-06-10T18:25:47.000Z | index_data.py | tonystratum/FashionShopApp | 34d34fc5855ab7b593855c2f07a4808689365e09 | [
"MIT"
] | 16 | 2020-06-22T13:01:25.000Z | 2021-06-15T10:18:31.000Z | # Test for search function
import csv
# data_list = [["id","title","description","price","image_file","type"],
# [1,"Shirt 1", "Shirt for men",11, 'img-1.jpg',"Women"],
# [2,"Shirt 2", "Shirt for men",12, 'img-1.jpg',"Women"],
# [3,"Shirt 3", "Shirt for men",13, 'img-1.jpg'... | 48.090909 | 87 | 0.548677 |
4a2454c44f1143fdf77f448f7aea9d2d18a0bc79 | 50,213 | py | Python | scripts/compute_tides_ICESat2_ATL03.py | mcuttler/pyTMD | 40ec2ec4c170c821a2558f52c1aeac6c5f9dfeff | [
"MIT"
] | null | null | null | scripts/compute_tides_ICESat2_ATL03.py | mcuttler/pyTMD | 40ec2ec4c170c821a2558f52c1aeac6c5f9dfeff | [
"MIT"
] | null | null | null | scripts/compute_tides_ICESat2_ATL03.py | mcuttler/pyTMD | 40ec2ec4c170c821a2558f52c1aeac6c5f9dfeff | [
"MIT"
] | null | null | null | #!/usr/bin/env python
u"""
compute_tides_ICESat2_ATL03.py
Written by Tyler Sutterley (06/2021)
Calculates tidal elevations for correcting ICESat-2 photon height data
Calculated at ATL03 segment level using reference photon geolocation and time
Segment level corrections can be applied to the individual photon events (PE... | 53.876609 | 111 | 0.646247 |
4a2457632fc33589a39c9bb9defa5606260590bc | 1,786 | py | Python | plugins/dbnd-docker/src/dbnd_docker/docker/docker_task_run_ctrl.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 224 | 2020-01-02T10:46:37.000Z | 2022-03-02T13:54:08.000Z | plugins/dbnd-docker/src/dbnd_docker/docker/docker_task_run_ctrl.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 16 | 2020-03-11T09:37:58.000Z | 2022-01-26T10:22:08.000Z | plugins/dbnd-docker/src/dbnd_docker/docker/docker_task_run_ctrl.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 24 | 2020-03-24T13:53:50.000Z | 2022-03-22T11:55:18.000Z | from dbnd_docker.docker_ctrl import DockerRunCtrl
class LocalDockerRunCtrl(DockerRunCtrl):
def __init__(self, **kwargs):
super(LocalDockerRunCtrl, self).__init__(**kwargs)
self.runner_op = None
@property
def docker_config(self):
# type: (LocalDockerRunCtrl) -> DockerEngineConfig
... | 31.892857 | 71 | 0.614222 |
4a2457b9db06e896d8f76449cd46184604a6cc81 | 2,682 | py | Python | meerkat/tools/lazy_loader.py | HazyResearch/meerkat | e3b437d47809ef8e856a5f732ac1e11a1176ba1f | [
"Apache-2.0"
] | 65 | 2021-06-25T06:51:15.000Z | 2022-02-08T22:25:27.000Z | meerkat/tools/lazy_loader.py | HazyResearch/meerkat | e3b437d47809ef8e856a5f732ac1e11a1176ba1f | [
"Apache-2.0"
] | 111 | 2021-06-24T01:16:36.000Z | 2022-03-07T17:54:58.000Z | terra/tools/lazy.py | seyuboglu/terra | 7d5f8d8cdfbf819b52fb997b5b9746746d86b295 | [
"Apache-2.0"
] | 4 | 2021-08-03T18:24:22.000Z | 2022-03-09T21:06:07.000Z | # coding=utf-8
# Copyright 2020 The TF-Agents Authors.
#
# 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 la... | 31.186047 | 84 | 0.66965 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.