hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b6009bf10043e92b8bea6578df9511b5a686b3ca | 6,446 | py | Python | doc/integrations/pytorch/parlai/agents/bert_classifier/bert_classifier.py | novium258/cortx-1 | ce5b939b33b8d24d89b31807ac3bcaa8f24096bc | [
"Apache-2.0"
] | 1 | 2020-09-27T05:00:06.000Z | 2020-09-27T05:00:06.000Z | doc/integrations/pytorch/parlai/agents/bert_classifier/bert_classifier.py | novium258/cortx-1 | ce5b939b33b8d24d89b31807ac3bcaa8f24096bc | [
"Apache-2.0"
] | 1 | 2021-08-04T11:17:39.000Z | 2021-08-04T11:17:39.000Z | doc/integrations/pytorch/parlai/agents/bert_classifier/bert_classifier.py | novium258/cortx-1 | ce5b939b33b8d24d89b31807ac3bcaa8f24096bc | [
"Apache-2.0"
] | 1 | 2021-05-03T13:27:14.000Z | 2021-05-03T13:27:14.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.
"""
BERT classifier agent uses bert embeddings to make an utterance-level classification.
"""
import os
from... | 34.655914 | 89 | 0.594322 |
53f888c37aa23c223b34894897d11ca1b48828ad | 7,871 | py | Python | fengshen/examples/pretrain_t5/pretrain_t5.py | dumpmemory/Fengshenbang-LM | 475790c2a1d9f087c8a0922c726965d635b56faa | [
"Apache-2.0"
] | 265 | 2021-11-22T11:32:24.000Z | 2022-03-31T06:42:21.000Z | fengshen/examples/pretrain_t5/pretrain_t5.py | dumpmemory/Fengshenbang-LM | 475790c2a1d9f087c8a0922c726965d635b56faa | [
"Apache-2.0"
] | 22 | 2021-11-30T12:20:29.000Z | 2022-03-06T09:04:32.000Z | fengshen/examples/pretrain_t5/pretrain_t5.py | dumpmemory/Fengshenbang-LM | 475790c2a1d9f087c8a0922c726965d635b56faa | [
"Apache-2.0"
] | 17 | 2021-11-22T11:39:22.000Z | 2022-03-19T18:48:07.000Z | import time
from fengshen.data.t5_dataloader.t5_datasets import UnsuperviseT5DataModel
from builtins import print
import sys
import os
import torch
import argparse
import json
import pytorch_lightning as pl
from transformers import MT5Tokenizer
from pytorch_lightning.callbacks import ModelCheckpoint
from pytorch_lightn... | 44.977143 | 105 | 0.649346 |
78899bba889769ba892094404283df6c29bd2a92 | 11,292 | py | Python | accelbyte_py_sdk/api/sessionbrowser/models/models_game_session_setting.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/sessionbrowser/models/models_game_session_setting.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | accelbyte_py_sdk/api/sessionbrowser/models/models_game_session_setting.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: justice_py_sdk_codegen/__main__.py
# justice-session-browser-service ()
# pylint: disab... | 38.937931 | 193 | 0.601045 |
7dab7061ea206436e5b587bfdc1b8115079bdea4 | 635 | py | Python | backend/manage.py | crowdbotics-apps/mychatapp-29550 | f6b05f9059404e696c1bc2f1e9f86d5aa0c98117 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/mychatapp-29550 | f6b05f9059404e696c1bc2f1e9f86d5aa0c98117 | [
"FTL",
"AML",
"RSA-MD"
] | 28 | 2021-08-08T19:46:02.000Z | 2022-02-13T14:10:17.000Z | backend/manage.py | crowdbotics-apps/mychatapp-29550 | f6b05f9059404e696c1bc2f1e9f86d5aa0c98117 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mychatapp_29550.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
rais... | 28.863636 | 79 | 0.686614 |
2502c3badd8ef22be4bca2569f8d92f95f95652e | 476 | py | Python | data/scripts/templates/object/tangible/ship/components/reactor/shared_rct_mandal_dxr3.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/ship/components/reactor/shared_rct_mandal_dxr3.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/ship/components/reactor/shared_rct_mandal_dxr3.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/ship/components/reactor/shared_rct_mandal_dxr3.iff"
result.attribut... | 28 | 87 | 0.739496 |
95d77ac72bb439272ba709c92522e81cf0edf819 | 1,193 | py | Python | venv/Lib/site-packages/pydnserver/gui/window/dns_config.py | avim2809/CameraSiteBlocker | bfc0434e75e8f3f95c459a4adc86b7673200816e | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/pydnserver/gui/window/dns_config.py | avim2809/CameraSiteBlocker | bfc0434e75e8f3f95c459a4adc86b7673200816e | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/pydnserver/gui/window/dns_config.py | avim2809/CameraSiteBlocker | bfc0434e75e8f3f95c459a4adc86b7673200816e | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
from uiutil.window.root import RootWindow
from uiutil.window.child import ChildWindow
from ..frame.dns_config import DNSConfigFrame
class _DNSConfigWindow(object):
def __init__(self,
zone_address_list=None,
*args,
**kwargs):
self.zone... | 28.404762 | 85 | 0.54736 |
d3974c0c243e753c245f1dd2f0d399c57620e866 | 413 | py | Python | {{cookiecutter.module_name}}/src/bio2bel_{{ cookiecutter.module_name }}/__main__.py | deeenes/bio2bel-cookiecutter | 8464a34faf3e645de20fb098ced4ec31666dd10a | [
"MIT"
] | null | null | null | {{cookiecutter.module_name}}/src/bio2bel_{{ cookiecutter.module_name }}/__main__.py | deeenes/bio2bel-cookiecutter | 8464a34faf3e645de20fb098ced4ec31666dd10a | [
"MIT"
] | null | null | null | {{cookiecutter.module_name}}/src/bio2bel_{{ cookiecutter.module_name }}/__main__.py | deeenes/bio2bel-cookiecutter | 8464a34faf3e645de20fb098ced4ec31666dd10a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Entrypoint module, in case you use `python -m bio2bel_{{ cookiecutter.module_name }}`.
Why does this file exist, and why __main__? For more info, read:
- https://www.python.org/dev/peps/pep-0338/
- https://docs.python.org/2/using/cmdline.html#cmdoption-m
- https://docs.python.org/3/usin... | 25.8125 | 89 | 0.690073 |
f1debbfc8eb85e0c564528eb3a9de10faf3cb691 | 19,391 | py | Python | sympy/physics/units/definitions.py | clyring/sympy | 54d7726c182065fc25df69b5d1030e568931d82f | [
"BSD-3-Clause"
] | 3 | 2015-01-17T23:15:04.000Z | 2015-05-26T14:11:44.000Z | sympy/physics/units/definitions.py | clyring/sympy | 54d7726c182065fc25df69b5d1030e568931d82f | [
"BSD-3-Clause"
] | 7 | 2015-03-23T23:33:02.000Z | 2019-02-09T00:19:41.000Z | sympy/physics/units/definitions.py | leosartaj/sympy | 28d913d3cead6c5646307ffa6540b21d65059dfd | [
"BSD-3-Clause"
] | null | null | null | from sympy import Rational, pi, sqrt, sympify, S
from sympy.physics.units.quantities import Quantity
from sympy.physics.units.dimensions import (
acceleration, action, amount_of_substance, capacitance, charge,
conductance, current, energy, force, frequency, information, impedance, inductance,
length, lumino... | 33.090444 | 107 | 0.797896 |
1db691e916aed59ad78c6fd068e2f5f665aef5d7 | 4,137 | py | Python | tests/mss_wms_settings.py | andreas-h/mss-chem | ae91f4f5b4c19a4ff0ce8fd342fe0aed4ce2b9ab | [
"MIT"
] | null | null | null | tests/mss_wms_settings.py | andreas-h/mss-chem | ae91f4f5b4c19a4ff0ce8fd342fe0aed4ce2b9ab | [
"MIT"
] | 8 | 2017-06-09T22:19:00.000Z | 2017-08-10T10:44:01.000Z | tests/mss_wms_settings.py | andreas-h/mss-chem | ae91f4f5b4c19a4ff0ce8fd342fe0aed4ce2b9ab | [
"MIT"
] | null | null | null | """
simple server config for demodata
"""
import os
import mslib.mswms.dataaccess
from mslib.mswms import mpl_hsec_styles
from mslib.mswms import mpl_vsec_styles
import mslib.mswms
_vt_cache = os.path.join(os.path.expanduser("~"), "tmp", "mss", "vt_cache")
mslib.mswms.dataaccess.valid_time_cache = _vt_cache
#_datapa... | 45.966667 | 110 | 0.703167 |
d0b342a36deb794d1d861786cd1fd7883e031ed6 | 39,809 | py | Python | rst2pdf/genelements.py | shakna-israel/rst2pdf | 9eb934298aeae872c652f60247bbfd9cc3da842f | [
"MIT"
] | null | null | null | rst2pdf/genelements.py | shakna-israel/rst2pdf | 9eb934298aeae872c652f60247bbfd9cc3da842f | [
"MIT"
] | null | null | null | rst2pdf/genelements.py | shakna-israel/rst2pdf | 9eb934298aeae872c652f60247bbfd9cc3da842f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#$URL: http://rst2pdf.googlecode.com/svn/trunk/rst2pdf/genelements.py $
#$Date: 2013-01-24 12:44:22 +0000 (Thu, 24 Jan 2013) $
#$Revision: 2632 $
# See LICENSE.txt for licensing terms
# Some fragments of code are copied from Reportlab under this license:
#
####################################... | 41.25285 | 166 | 0.586249 |
5dbb6dd959fd67d014bdd1f8c7602da5fb527c05 | 17,290 | py | Python | motmetrics/metrics.py | xanderchf/py-motmetrics | 7c7dde085f36311744ef8f30d9f5e66055bf6873 | [
"MIT"
] | null | null | null | motmetrics/metrics.py | xanderchf/py-motmetrics | 7c7dde085f36311744ef8f30d9f5e66055bf6873 | [
"MIT"
] | null | null | null | motmetrics/metrics.py | xanderchf/py-motmetrics | 7c7dde085f36311744ef8f30d9f5e66055bf6873 | [
"MIT"
] | null | null | null | """py-motmetrics - metrics for multiple object tracker (MOT) benchmarking.
Christoph Heindl, 2017
https://github.com/cheind/py-motmetrics
"""
from __future__ import division
from collections import OrderedDict, Iterable, defaultdict
from motmetrics.mot import MOTAccumulator
from motmetrics.lap import linear_sum_assig... | 36.787234 | 109 | 0.630249 |
78cdd8bcd6a121411651ad923701d718c2f68eb8 | 3,052 | py | Python | tests/contract_tests/KT1BgfSZizFUMBVGwbE9J8twjpTkjiMmQpKg/test_bgfszi.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 98 | 2019-02-07T16:33:38.000Z | 2022-03-31T15:53:41.000Z | tests/contract_tests/KT1BgfSZizFUMBVGwbE9J8twjpTkjiMmQpKg/test_bgfszi.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 152 | 2019-05-20T16:38:56.000Z | 2022-03-30T14:24:38.000Z | tests/contract_tests/KT1BgfSZizFUMBVGwbE9J8twjpTkjiMmQpKg/test_bgfszi.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 34 | 2019-07-25T12:03:51.000Z | 2021-11-11T22:23:38.000Z | from unittest import TestCase
from os.path import dirname, join
import json
from pytezos.michelson.micheline import get_script_section
from pytezos.michelson.types.base import MichelsonType
from pytezos.michelson.program import MichelsonProgram
from pytezos.michelson.format import micheline_to_michelson
from pytezos.m... | 41.243243 | 106 | 0.70118 |
025eae54ed18ff702f9b1315e81956148a27a1aa | 3,911 | py | Python | sleat-parse.py | porterhau5/sleat | 8b56364fc38e06bdd725caa94bdaa9055feadda2 | [
"MIT"
] | 16 | 2017-05-31T19:58:24.000Z | 2020-11-29T02:55:44.000Z | sleat-parse.py | porterhau5/sleat | 8b56364fc38e06bdd725caa94bdaa9055feadda2 | [
"MIT"
] | 1 | 2016-09-27T20:48:28.000Z | 2016-09-27T21:00:43.000Z | sleat-parse.py | porterhau5/sleat | 8b56364fc38e06bdd725caa94bdaa9055feadda2 | [
"MIT"
] | 5 | 2017-10-02T11:20:56.000Z | 2021-05-26T03:33:56.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Tom Porter (@porterhau5)
import xml.etree.ElementTree as etree
import optparse
import os
# return tag with namespace appropriately prepended
def fixtag(ns, tag, nsmap):
return '{' + nsmap[ns] + '}' + tag
# return empty string instead of None
def xstr(s):
if s is N... | 31.540323 | 99 | 0.508821 |
b5504deca0aaec12fdd11d5bad6e41f9de817e4c | 2,570 | py | Python | 2017/day14/knothash.py | tcmitchell/AdventOfCode | caaac1aa37c999d4804f9f4154bf7033a06e98af | [
"MIT"
] | null | null | null | 2017/day14/knothash.py | tcmitchell/AdventOfCode | caaac1aa37c999d4804f9f4154bf7033a06e98af | [
"MIT"
] | null | null | null | 2017/day14/knothash.py | tcmitchell/AdventOfCode | caaac1aa37c999d4804f9f4154bf7033a06e98af | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# http://adventofcode.com/2017/day/10
import functools
import operator
import sys
DATA_SIZE = 256
def insert(data, pos, length, sub_data):
data_len = len(data)
if pos + length > data_len:
# insert to end and then from beginning of data
part1_size = data_len - pos
... | 26.22449 | 79 | 0.59572 |
6ae6b05df647940f35bebb87cdd5c1db0097689d | 3,291 | py | Python | libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/client_examples/battery_daughter.py | Yarik9008/SoftAcademic | 118c9dc4620ca444c1557edd141a838820577202 | [
"MIT"
] | 2 | 2021-05-14T18:39:47.000Z | 2022-03-19T16:08:53.000Z | libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/client_examples/battery_daughter.py | Yarik9008/SoftAcademic | 118c9dc4620ca444c1557edd141a838820577202 | [
"MIT"
] | 1 | 2021-09-27T17:36:56.000Z | 2021-09-27T17:36:56.000Z | libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/client_examples/battery_daughter.py | Yarik9008/SoftAcademic | 118c9dc4620ca444c1557edd141a838820577202 | [
"MIT"
] | 3 | 2021-05-18T11:34:49.000Z | 2022-02-18T03:33:49.000Z | # SPDX-FileCopyrightText: 2021 Dylan Herrada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import board
from adafruit_lc709203f import LC709203F
import busio
from digitalio import DigitalInOut
from adafruit_esp32spi import adafruit_esp32spi
from adafruit_esp32spi import adafruit_esp32spi_wifimanag... | 27.425 | 87 | 0.760559 |
db557661304fee930cad32faf19a0e23f7ab19a2 | 749 | py | Python | PP4E/Examples/PP4E/Gui/Tour/demoAll-prg.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | PP4E/Examples/PP4E/Gui/Tour/demoAll-prg.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | PP4E/Examples/PP4E/Gui/Tour/demoAll-prg.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | """
4 demo classes run as independent program processes: command lines;
if one window is quit now, the others will live on; there is no simple way to
run all report calls here (though sockets and pipes could be used for IPC), and
some launch schemes may drop child program stdout and disconnect parent/child;
"""
... | 39.421053 | 80 | 0.70494 |
d0be0af9c10f4dad0ef9bca87a42ac4cf4302229 | 2,092 | py | Python | a10sdk/core/snmp/snmp_server_host_ipv6_host.py | deepfield/a10sdk-python | bfaa58099f51f085d5e91652d1d1a3fd5c529d5d | [
"Apache-2.0"
] | 16 | 2015-05-20T07:26:30.000Z | 2021-01-23T11:56:57.000Z | a10sdk/core/snmp/snmp_server_host_ipv6_host.py | deepfield/a10sdk-python | bfaa58099f51f085d5e91652d1d1a3fd5c529d5d | [
"Apache-2.0"
] | 6 | 2015-03-24T22:07:11.000Z | 2017-03-28T21:31:18.000Z | a10sdk/core/snmp/snmp_server_host_ipv6_host.py | deepfield/a10sdk-python | bfaa58099f51f085d5e91652d1d1a3fd5c529d5d | [
"Apache-2.0"
] | 23 | 2015-03-29T15:43:01.000Z | 2021-06-02T17:12:01.000Z | from a10sdk.common.A10BaseClass import A10BaseClass
class Ipv6Host(A10BaseClass):
"""Class Description::
Specify IPV6 hosts to receive SNMP traps.
Class ipv6-host supports CRUD Operations and inherits from `common/A10BaseClass`.
This class is the `"PARENT"` class for this module.`
:param uu... | 44.510638 | 198 | 0.626673 |
bfdc3d77c9432d30da4467f3ec0200091abe6fcf | 10,708 | py | Python | yt/frontends/chombo/io.py | saethlin/yt | 992ae71974dca933346e91008c5a50f43a0a350e | [
"BSD-3-Clause-Clear"
] | 2 | 2021-03-02T18:59:49.000Z | 2021-03-02T18:59:50.000Z | yt/frontends/chombo/io.py | saethlin/yt | 992ae71974dca933346e91008c5a50f43a0a350e | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/frontends/chombo/io.py | saethlin/yt | 992ae71974dca933346e91008c5a50f43a0a350e | [
"BSD-3-Clause-Clear"
] | null | null | null | """
The data-file handling functions
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, yt Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#----------... | 34.653722 | 93 | 0.572189 |
7230dfbf1bd4f22736c20be6f1707840ee18bad1 | 836 | py | Python | db/scripts/script_select/select_atributos.py | LeandroLFE/capmon | 9d1200301628ea4fec0e8ed09d5e9b67a426d923 | [
"MIT"
] | null | null | null | db/scripts/script_select/select_atributos.py | LeandroLFE/capmon | 9d1200301628ea4fec0e8ed09d5e9b67a426d923 | [
"MIT"
] | null | null | null | db/scripts/script_select/select_atributos.py | LeandroLFE/capmon | 9d1200301628ea4fec0e8ed09d5e9b67a426d923 | [
"MIT"
] | null | null | null | # Requer num e tipo = {"num": int, "tipo": int}
select_atributos_criatura = lambda dados = {} : """
Select atributo1, atributo 2
FROM criaturas
WHERE Num = :num
AND tipo = :tipo ;
"""
select_all_ref_atributos = lambda dados = {} : """
SELECT Distinct ref
FROM atributos
"""
# Requer tipo e r... | 26.125 | 51 | 0.632775 |
5e23ef2e0a173f6ff2f8e4b20ad4ea3c223e262a | 1,525 | py | Python | tests/TestAsteroidsMask.py | juanfdg/CES22_game | 3d5784e68582eeb85dc6fd9b29463a81ca7e566d | [
"MIT"
] | 2 | 2018-03-06T16:35:14.000Z | 2018-03-09T23:05:15.000Z | tests/TestAsteroidsMask.py | juanfdg/CES22_game | 3d5784e68582eeb85dc6fd9b29463a81ca7e566d | [
"MIT"
] | null | null | null | tests/TestAsteroidsMask.py | juanfdg/CES22_game | 3d5784e68582eeb85dc6fd9b29463a81ca7e566d | [
"MIT"
] | 1 | 2018-03-09T22:57:44.000Z | 2018-03-09T22:57:44.000Z | import pygame as pg
from models.asteroid.SmallAsteroid import SmallAsteroid
from models.asteroid.MediumAsteroid import MediumAsteroid
from models.asteroid.BigAsteroid import BigAsteroid
def change_color(screen):
color = screen.get_at((0, 0))
if color == (0, 0, 0):
return (0, 0, 255)
else:
... | 24.206349 | 61 | 0.579016 |
c3029a78c43d2007d6a5d3e8ebe77377988c0562 | 409 | py | Python | complete-python/fundamentals/dictionaries.py | alaindet/learn-python | 44d3b04188af19f4491a505a210b53cd67bae542 | [
"MIT"
] | null | null | null | complete-python/fundamentals/dictionaries.py | alaindet/learn-python | 44d3b04188af19f4491a505a210b53cd67bae542 | [
"MIT"
] | null | null | null | complete-python/fundamentals/dictionaries.py | alaindet/learn-python | 44d3b04188af19f4491a505a210b53cd67bae542 | [
"MIT"
] | null | null | null | people_age = {
'Alice': 20,
'Bob': 30,
'Charlie': 40
}
# print(people_age['Alice'])
# Add/override a key
people_age['Darlene'] = 45
friends = (
{'name': 'Alice', 'age': 20},
{'name': 'Bob', 'age': 30},
{'name': 'Charlie', 'age': 40}
)
print(friends[1]['name'])
some_data = [
('Alice', 20... | 14.103448 | 34 | 0.530562 |
997ac0ec59897542398ae51a9ae84360ad41eb9e | 56 | py | Python | fmralignbench/fetchers/__init__.py | thomasbazeille/fmralign-benchmark-mockup | 5e06751a2dfab7d8c0494dabce32a2e0aac31615 | [
"BSD-2-Clause"
] | 11 | 2020-12-10T14:46:45.000Z | 2022-01-07T12:23:54.000Z | fmralignbench/fetchers/__init__.py | thomasbazeille/fmralign-benchmark-mockup | 5e06751a2dfab7d8c0494dabce32a2e0aac31615 | [
"BSD-2-Clause"
] | null | null | null | fmralignbench/fetchers/__init__.py | thomasbazeille/fmralign-benchmark-mockup | 5e06751a2dfab7d8c0494dabce32a2e0aac31615 | [
"BSD-2-Clause"
] | 1 | 2022-01-07T12:25:04.000Z | 2022-01-07T12:25:04.000Z | from .dataset_fetcher import (fetch_ibc, fetch_ibc_surf) | 56 | 56 | 0.857143 |
4d9ddc97a65790dc23889152220c443a08b18817 | 271 | py | Python | ja/code_snippets/api-host-unmute.py | quotecenter/documentation-1 | f365703264761aa2b19d5d1d8ec55a3a6082ef4d | [
"BSD-3-Clause"
] | null | null | null | ja/code_snippets/api-host-unmute.py | quotecenter/documentation-1 | f365703264761aa2b19d5d1d8ec55a3a6082ef4d | [
"BSD-3-Clause"
] | null | null | null | ja/code_snippets/api-host-unmute.py | quotecenter/documentation-1 | f365703264761aa2b19d5d1d8ec55a3a6082ef4d | [
"BSD-3-Clause"
] | null | null | null | from datadog import initialize, api
options = {
'api_key': '<YOUR_API_KEY>',
'app_key': '<YOUR_APP_KEY>'
}
initialize(**options)
# Find a host to unmute
hosts = api.Infrastructure.search(q='hosts:')
# Unmute host
api.Host.unmute(hosts['results']['hosts'][0])
| 18.066667 | 45 | 0.678967 |
ae696105f9b05a88e2ee992dbf516919dc69301b | 1,745 | py | Python | codes/django/curso-django/playground/registration/forms.py | crisconru/snippetshell | edd97145029d0d1749845b7b1e90d89dcbfc4506 | [
"MIT"
] | 1 | 2021-12-17T02:04:16.000Z | 2021-12-17T02:04:16.000Z | codes/django/curso-django/playground/registration/forms.py | crisconru/snippetshell | edd97145029d0d1749845b7b1e90d89dcbfc4506 | [
"MIT"
] | 15 | 2019-05-27T19:23:50.000Z | 2022-03-11T23:53:17.000Z | codes/django/curso-django/playground/registration/forms.py | crisconru/snippetshell | edd97145029d0d1749845b7b1e90d89dcbfc4506 | [
"MIT"
] | 1 | 2018-09-24T12:10:19.000Z | 2018-09-24T12:10:19.000Z | from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from .models import Profile
class UserCreationFormWithEmail(UserCreationForm):
email = forms.EmailField(
required=True,
help_text='Requerido, 254 caracteres como máximo y que... | 30.086207 | 76 | 0.581662 |
c00150d8939958186db8467261208a627f81a247 | 211 | py | Python | CursoEmVideo/Mundo1_Fundamentos/desafio024.py | jacksontenorio8/python | a484f019960faa5aa29177eff44a1bb1e3f3b9d0 | [
"MIT"
] | null | null | null | CursoEmVideo/Mundo1_Fundamentos/desafio024.py | jacksontenorio8/python | a484f019960faa5aa29177eff44a1bb1e3f3b9d0 | [
"MIT"
] | null | null | null | CursoEmVideo/Mundo1_Fundamentos/desafio024.py | jacksontenorio8/python | a484f019960faa5aa29177eff44a1bb1e3f3b9d0 | [
"MIT"
] | null | null | null | """
@jacksontenorio8
Crie um prgrama que leia o nome de uma cidade e diga se ele começa ou não com a palavra: "SANTO"
"""
cid = str(input('Em que cidade você nasceu? ')).strip()
print(cid[:5].upper() == 'SANTO') | 35.166667 | 96 | 0.682464 |
b4534c81b56164ff2bc2f6c4a047a0cebcbcb963 | 80 | py | Python | HCP_DataProcessor/__init__.py | xinyuwang1209/HCP_DataProcessor | 75ecaa762a84d4070cd384452c40685d3aa162ed | [
"MIT"
] | null | null | null | HCP_DataProcessor/__init__.py | xinyuwang1209/HCP_DataProcessor | 75ecaa762a84d4070cd384452c40685d3aa162ed | [
"MIT"
] | null | null | null | HCP_DataProcessor/__init__.py | xinyuwang1209/HCP_DataProcessor | 75ecaa762a84d4070cd384452c40685d3aa162ed | [
"MIT"
] | null | null | null | from HCP_DataProcessor import Data_Process
from HCP_DataProcessor import script
| 26.666667 | 42 | 0.9 |
2e3c5e4fd841b24080ac658a8b16871e3327f688 | 985 | py | Python | ResLib.py | MrRabot/BioPhysics-energies0 | 21bc5a50c3b03895519f1d8ae4fbe3a8d0f51aa2 | [
"MIT"
] | null | null | null | ResLib.py | MrRabot/BioPhysics-energies0 | 21bc5a50c3b03895519f1d8ae4fbe3a8d0f51aa2 | [
"MIT"
] | null | null | null | ResLib.py | MrRabot/BioPhysics-energies0 | 21bc5a50c3b03895519f1d8ae4fbe3a8d0f51aa2 | [
"MIT"
] | null | null | null | #
# Residue library management
# Attypes and partial charges
# data from CMIP reslib formatted file
#
import sys
class ResiduesDataLib():
def __init__(self,fname):
self.RData={}
try:
fh = open(fname,"r")
except OSError:
print ("#ERROR while loading library file (" ,fn... | 27.361111 | 77 | 0.524873 |
68cf97c3f6eb7e8f5693b65e663a044badcb5ed4 | 6,102 | py | Python | SentenceParser.py | toposoid/toposoid-sentence-parser-english-web | 26f3b56860a2256221af8d2ab64353f5d6a636e0 | [
"Apache-2.0"
] | null | null | null | SentenceParser.py | toposoid/toposoid-sentence-parser-english-web | 26f3b56860a2256221af8d2ab64353f5d6a636e0 | [
"Apache-2.0"
] | 5 | 2021-12-14T12:07:53.000Z | 2022-01-19T10:57:29.000Z | SentenceParser.py | toposoid/toposoid-sentence-parser-english-web | 26f3b56860a2256221af8d2ab64353f5d6a636e0 | [
"Apache-2.0"
] | null | null | null | '''
Copyright 2021 Linked Ideal LLC.[https://linked-ideal.com/]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by app... | 44.217391 | 176 | 0.590298 |
8e4d1b2e3731f17b17ad5c6ac3b13349d8e2b034 | 1,089 | py | Python | tests/test_komp2_api.py | mpi2/impc-reference-harvester | bf372df3e1924355c80e7b5c83f07886d1e4c267 | [
"Apache-2.0"
] | null | null | null | tests/test_komp2_api.py | mpi2/impc-reference-harvester | bf372df3e1924355c80e7b5c83f07886d1e4c267 | [
"Apache-2.0"
] | null | null | null | tests/test_komp2_api.py | mpi2/impc-reference-harvester | bf372df3e1924355c80e7b5c83f07886d1e4c267 | [
"Apache-2.0"
] | 1 | 2018-11-27T11:38:51.000Z | 2018-11-27T11:38:51.000Z | from unittest import mock
from utils.komp2_api import get_allele2gene_map
from utils.models import Allele
import pytest
from sqlalchemy.exc import SQLAlchemyError
@mock.patch('utils.komp2_api.Session')
def test_get_allele2gene_map_one_allele(mock_session):
test_allele = Allele()
test_allele.acc = "MGI:4244706... | 35.129032 | 113 | 0.767677 |
8c03ba33ae2d633520f7c91164f4a8b21957d29e | 5,977 | py | Python | test/test_publisher.py | richardhofman6/sphinxcontrib-confluencebuilder | 617fbb99b13751feafe793773268da87a3448849 | [
"BSD-2-Clause"
] | null | null | null | test/test_publisher.py | richardhofman6/sphinxcontrib-confluencebuilder | 617fbb99b13751feafe793773268da87a3448849 | [
"BSD-2-Clause"
] | null | null | null | test/test_publisher.py | richardhofman6/sphinxcontrib-confluencebuilder | 617fbb99b13751feafe793773268da87a3448849 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
sphinxcontrib.confluencebuilder.test.test_publisher
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: Copyright 2017 by the contributors (see AUTHORS file).
:license: BSD, see LICENSE.txt for details.
"""
from sphinx.application import Sphinx
from sphinxcontri... | 38.811688 | 79 | 0.610172 |
b285892ba298dcd7f702b7eebe7f24fba1228446 | 1,118 | py | Python | lulu/extractors/facebook.py | fakegit/Lulu | 940c9344df8aab6044ec603f8e78d145b0f9bad7 | [
"MIT"
] | 922 | 2018-01-17T09:22:26.000Z | 2022-03-28T04:10:45.000Z | lulu/extractors/facebook.py | fakegit/Lulu | 940c9344df8aab6044ec603f8e78d145b0f9bad7 | [
"MIT"
] | 83 | 2018-01-16T08:33:55.000Z | 2021-06-25T06:18:24.000Z | lulu/extractors/facebook.py | fakegit/Lulu | 940c9344df8aab6044ec603f8e78d145b0f9bad7 | [
"MIT"
] | 156 | 2018-02-03T06:24:14.000Z | 2022-01-05T05:39:14.000Z | #!/usr/bin/env python
import re
from lulu.common import (
match1,
url_info,
urls_size,
unicodize,
print_info,
get_content,
download_urls,
playlist_not_supported,
)
__all__ = ['facebook_download']
site_info = 'facebook.com'
def facebook_download(
url, output_dir='.', merge=True,... | 21.921569 | 70 | 0.627013 |
e7e45920c4df09be718303e85c7d1b30582eddc4 | 3,161 | py | Python | external/sbml/bindings/python/test/sbml/TestSpeciesConcentrationRule.py | dchandran/evolvenetworks | 072f9e1292552f691a86457ffd16a5743724fb5e | [
"BSD-3-Clause"
] | 1 | 2019-08-22T17:17:41.000Z | 2019-08-22T17:17:41.000Z | external/sbml/bindings/python/test/sbml/TestSpeciesConcentrationRule.py | dchandran/evolvenetworks | 072f9e1292552f691a86457ffd16a5743724fb5e | [
"BSD-3-Clause"
] | null | null | null | external/sbml/bindings/python/test/sbml/TestSpeciesConcentrationRule.py | dchandran/evolvenetworks | 072f9e1292552f691a86457ffd16a5743724fb5e | [
"BSD-3-Clause"
] | null | null | null | #
# @file TestSpeciesConcentrationRule.py
# @brief SpeciesConcentrationRule unit tests
#
# @author Akiya Jouraku (Python conversion)
# @author Ben Bornstein
#
# $Id: TestSpeciesConcentrationRule.py 10124 2009-08-28 12:04:51Z sarahkeating $
# $HeadURL: https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/... | 35.920455 | 135 | 0.68491 |
893755511279ffa5452a7756adc0134476c7995b | 1,643 | py | Python | web_app/urls.py | kamyarkalhor/chopen | 505e1b927245e601aec140d0e61a9c6785700304 | [
"MIT"
] | null | null | null | web_app/urls.py | kamyarkalhor/chopen | 505e1b927245e601aec140d0e61a9c6785700304 | [
"MIT"
] | null | null | null | web_app/urls.py | kamyarkalhor/chopen | 505e1b927245e601aec140d0e61a9c6785700304 | [
"MIT"
] | null | null | null | """
chopen URL Configuration
"""
from django.conf.urls import include, url
from django.contrib.auth import views as auth_views
from django.conf.urls.static import static
from django.contrib import admin
from django.conf import settings
from rest_framework.documentation import include_docs_urls
import sys
# from ion_cha... | 45.638889 | 103 | 0.69933 |
d3ed0eba19dfc4ac92b0550afa46f5f368fad480 | 428 | py | Python | molsysmt/tools/pdbfixer_PDBFixer/to_mdtraj_Trajectory.py | dprada/molsysmt | 83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d | [
"MIT"
] | null | null | null | molsysmt/tools/pdbfixer_PDBFixer/to_mdtraj_Trajectory.py | dprada/molsysmt | 83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d | [
"MIT"
] | null | null | null | molsysmt/tools/pdbfixer_PDBFixer/to_mdtraj_Trajectory.py | dprada/molsysmt | 83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d | [
"MIT"
] | null | null | null | def to_mdtraj_Trajectory(item, selection='all', frame_indices='all', syntaxis='MolSysMT'):
from molsysmt.tools.pdbfixer_PDBFixer import is_pdbfixer_PDBFixer
from molsysmt.basic import convert
if not is_pdbfixer_PDBFixer(item):
raise ValueError
tmp_item = convert(item, to_form='mdtraj.Trajecto... | 30.571429 | 90 | 0.75 |
14cb4b53fef8e0215549d8ebba105d7563eea7b8 | 331 | py | Python | lang/py/rfc/12345/numlist_1-2.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/rfc/12345/numlist_1-2.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/rfc/12345/numlist_1-2.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:UTF-8 -*-
import sys
if len(sys.argv) != 2 :
print "Please supply a filename"
raise SystemExit(1)
f = open(sys.argv[1])
lines = f.readlines()
f.close()
fvalues = [ float(line) for line in lines ]
print"The minimum value is", min(fvalues)
print"The maximum value is", ma... | 19.470588 | 44 | 0.655589 |
fc8f06ad3859dd93cd467676ec9f4ced7c7a0bb4 | 1,799 | py | Python | kameramera/utils.py | Gokender/kameramera | 7ebd9a196809c1e7ab117bb11b90bcea8d1eb8e7 | [
"MIT"
] | null | null | null | kameramera/utils.py | Gokender/kameramera | 7ebd9a196809c1e7ab117bb11b90bcea8d1eb8e7 | [
"MIT"
] | null | null | null | kameramera/utils.py | Gokender/kameramera | 7ebd9a196809c1e7ab117bb11b90bcea8d1eb8e7 | [
"MIT"
] | null | null | null | import yaml
import os
import glob
from pathlib import Path
from datetime import datetime
def load_conf(filepath) -> dict:
"""Load a YAML configuration file
Args:
filepath (str): The filepath of the conf YAML file.
"""
with open(filepath, 'r') as infile:
return yaml.load(infile, Loader... | 28.555556 | 78 | 0.608671 |
a662689d9512a4396752058dc6c4ff68f14d4be7 | 1,088 | py | Python | sudoku/algorithm/base.py | tateishi/py-sudoku | 3af656b2ebe128543ed2bb9c613a6844eda868ca | [
"MIT"
] | null | null | null | sudoku/algorithm/base.py | tateishi/py-sudoku | 3af656b2ebe128543ed2bb9c613a6844eda868ca | [
"MIT"
] | null | null | null | sudoku/algorithm/base.py | tateishi/py-sudoku | 3af656b2ebe128543ed2bb9c613a6844eda868ca | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import List
from dataclasses import dataclass
from ..model import Pos
@dataclass
class SingleCandidate:
pos: Pos
number: int
reason: str = 'unkown'
def __str__(self):
return f'{self.pos.idx}, {self.number}'
@dataclass
class MultiCandidate:
... | 19.781818 | 47 | 0.582721 |
8cc5d8e9167969ff5df29002a6862563b4570b4e | 3,169 | py | Python | MNIST/cnn.py | wchyan/ailearning | 078103a4c5fd8a498f567c96be2b503bc8b9b9fa | [
"Apache-2.0"
] | null | null | null | MNIST/cnn.py | wchyan/ailearning | 078103a4c5fd8a498f567c96be2b503bc8b9b9fa | [
"Apache-2.0"
] | null | null | null | MNIST/cnn.py | wchyan/ailearning | 078103a4c5fd8a498f567c96be2b503bc8b9b9fa | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import mnist_dataset
import mnist_plt
def weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial)
def bias_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial)
def conv2d(x, W):
return tf... | 34.824176 | 130 | 0.69391 |
e340aa8d22ff79ba1355e1550d872085b98b3023 | 3,439 | py | Python | src/freetype/src/tools/docmaker/utils.py | fenollp/wex | 25d9121f61a62e8a5a008275ba3c7a978d036ecc | [
"BSD-3-Clause"
] | 39 | 2017-07-11T18:15:54.000Z | 2021-11-15T07:14:20.000Z | src/freetype/src/tools/docmaker/utils.py | fenollp/wex | 25d9121f61a62e8a5a008275ba3c7a978d036ecc | [
"BSD-3-Clause"
] | 70 | 2017-07-11T18:27:32.000Z | 2022-02-15T00:07:36.000Z | src/freetype/src/tools/docmaker/utils.py | fenollp/wex | 25d9121f61a62e8a5a008275ba3c7a978d036ecc | [
"BSD-3-Clause"
] | 25 | 2017-08-25T21:55:54.000Z | 2021-09-26T23:53:10.000Z | #
# utils.py
#
# Auxiliary functions for the `docmaker' tool (library file).
#
# Copyright 2002-2015 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
# modified, and distributed under the terms of the FreeType project
# license, LICENSE.TXT. By continuing to use, modify,... | 27.07874 | 75 | 0.644955 |
68785340452683b0f059b1d291a3099cbb0e7beb | 492 | py | Python | Bugscan_exploits-master/exp_list/exp-167.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 11 | 2020-05-30T13:53:49.000Z | 2021-03-17T03:20:59.000Z | Bugscan_exploits-master/exp_list/exp-167.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-13T03:25:18.000Z | 2020-07-21T06:24:16.000Z | Bugscan_exploits-master/exp_list/exp-167.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-30T13:53:51.000Z | 2020-12-01T21:44:26.000Z | #Referer: http://www.securityfocus.com/archive/1/534437
def assign(service, arg):
if service == "wdcp":
return True, arg
def audit(args):
payload = 'mysql/add_user.php'
verify_url = args + payload
code, head, content, errcode,finalurl = curl.curl(verify_url)
if code==200 and 'local... | 30.75 | 66 | 0.642276 |
8b0f45942982936ae72329ac14bc30feacf499e8 | 3,298 | py | Python | tests/integration/conftest.py | neuro-inc/platform-storage-api | 7564d6f353f7839962cc5dc2793ba44359eaf390 | [
"Apache-2.0"
] | null | null | null | tests/integration/conftest.py | neuro-inc/platform-storage-api | 7564d6f353f7839962cc5dc2793ba44359eaf390 | [
"Apache-2.0"
] | 2 | 2021-12-29T21:43:29.000Z | 2022-01-27T10:45:49.000Z | tests/integration/conftest.py | neuro-inc/platform-storage-api | 7564d6f353f7839962cc5dc2793ba44359eaf390 | [
"Apache-2.0"
] | null | null | null | import json
import os
from collections.abc import AsyncIterable, AsyncIterator
from dataclasses import replace
from pathlib import Path, PurePath
from typing import Any, NamedTuple
import aiohttp
import pytest
import pytest_asyncio
from platform_storage_api.api import create_app
from platform_storage_api.config impor... | 26.384 | 88 | 0.722559 |
0d5ca702e281957d115a36fde79f9f553fd1697a | 3,086 | py | Python | demo/settings.py | FlipperPA/django-draftail | de5516c53b24fcd384cd2ff463e9a4367e4ce841 | [
"MIT"
] | null | null | null | demo/settings.py | FlipperPA/django-draftail | de5516c53b24fcd384cd2ff463e9a4367e4ce841 | [
"MIT"
] | null | null | null | demo/settings.py | FlipperPA/django-draftail | de5516c53b24fcd384cd2ff463e9a4367e4ce841 | [
"MIT"
] | 1 | 2020-01-22T19:52:01.000Z | 2020-01-22T19:52:01.000Z | """
Django settings for demo project.
Generated by 'django-admin startproject' using Django 2.2.4.
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/
"""
import os
# Bu... | 26.152542 | 90 | 0.699611 |
8b6d882a0045be9a8070943527ba75978e7c857c | 1,124 | py | Python | setup.py | Patouche/pydocktors | f0d6bbe70eecdb3cf4f30596205f9c8b3ca11366 | [
"MIT"
] | 4 | 2017-06-25T10:25:48.000Z | 2020-07-19T16:01:41.000Z | setup.py | Patouche/pydocktors | f0d6bbe70eecdb3cf4f30596205f9c8b3ca11366 | [
"MIT"
] | null | null | null | setup.py | Patouche/pydocktors | f0d6bbe70eecdb3cf4f30596205f9c8b3ca11366 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup module.
"""
from setuptools import setup, find_packages
AUTHORS = {
'patralla@gmail.com': 'Patrick Allain'
}
GITHUB = dict(
user='Patouche',
repository='pydocktors'
)
VERSION = open('VERSION').readline().strip()
setup(
name=GITHUB['repository'],
... | 24.434783 | 91 | 0.599644 |
68f8c0360ff3e82d8817dc8fd34d9b8cc378b1be | 1,373 | py | Python | lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 765 | 2015-12-03T16:44:59.000Z | 2022-03-07T12:41:10.000Z | lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 1,815 | 2015-12-11T23:56:05.000Z | 2020-01-10T19:28:43.000Z | lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | 284 | 2015-12-03T16:47:25.000Z | 2022-03-12T05:39:48.000Z | """
Test that hitting a UBSan issue while running user expression doesn't break the evaluation.
"""
import lldb
from lldbsuite.test.lldbtest import *
from lldbsuite.test.decorators import *
import lldbsuite.test.lldbutil as lldbutil
class UbsanUserExpressionTestCase(TestBase):
mydir = TestBase.compute_mydir(__f... | 29.212766 | 91 | 0.637291 |
9c8bde7dd6489d27b34d3b646a6c36eedc6cc6e3 | 1,871 | py | Python | benchmark/startPyquil2778.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil2778.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil2778.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=39
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(3) # number=16
prog... | 25.283784 | 64 | 0.56387 |
dd70f3f12b434b9258e0567020e242ba8488ba09 | 74,841 | py | Python | mivisor/components/main-bak.py | likit/mivisor | 2fafb70151b8995dad60d63971db99739040cb20 | [
"MIT"
] | null | null | null | mivisor/components/main-bak.py | likit/mivisor | 2fafb70151b8995dad60d63971db99739040cb20 | [
"MIT"
] | 22 | 2019-04-20T14:36:41.000Z | 2022-03-12T01:01:53.000Z | mivisor/components/main-bak.py | likit/mivisor | 2fafb70151b8995dad60d63971db99739040cb20 | [
"MIT"
] | null | null | null | import os
import pandas
import sqlalchemy as sa
import json
import wx, wx.adv, wx.lib
from datetime import datetime
from wx.lib.wordwrap import wordwrap
from threading import Thread
from pydispatch import dispatcher
from openpyxl import load_workbook
CLOSE_DIALOG_SIGNAL = 'close-notification-dialog'
from components.d... | 46.427419 | 123 | 0.543445 |
8c821173f4ebbaa3c1322866db9d6bd01ca7cf7e | 1,846 | py | Python | src/__init__.py | DianaDI/compressedCV | 6faa7c8fd3a6edf0bf45bcafc093804a91cb0ca0 | [
"MIT"
] | null | null | null | src/__init__.py | DianaDI/compressedCV | 6faa7c8fd3a6edf0bf45bcafc093804a91cb0ca0 | [
"MIT"
] | 36 | 2019-10-19T08:11:37.000Z | 2020-02-26T23:22:42.000Z | src/__init__.py | DianaDI/compressedCV | 6faa7c8fd3a6edf0bf45bcafc093804a91cb0ca0 | [
"MIT"
] | null | null | null | from os.path import abspath, dirname
ROOT_PATH = dirname(dirname(abspath(__file__)))
# Annotations
LABELS_PATH = f'/home/ubuntu/data/annotations'
LABELS_FILTERED = f'/home/ubuntu/data/data_original/annotations_filtered2'
LABEL_MAP_PATH = ROOT_PATH + f'/TensorFlow/workspace/training_demo/annotations/label_map.pbtxt'
... | 46.15 | 113 | 0.793608 |
b68a557177a690b9697d452c44f5b85a3d4cbb4d | 1,483 | py | Python | backoffice/manager/users_login.py | MedPy-C/backend | 262834adb1f4f5714c4bd490595fdfa1f49c9675 | [
"MIT"
] | null | null | null | backoffice/manager/users_login.py | MedPy-C/backend | 262834adb1f4f5714c4bd490595fdfa1f49c9675 | [
"MIT"
] | 1 | 2021-05-20T16:08:35.000Z | 2021-05-20T16:08:35.000Z | backoffice/manager/users_login.py | MedPy-C/backend | 262834adb1f4f5714c4bd490595fdfa1f49c9675 | [
"MIT"
] | null | null | null | from django.db import models
from django.db import IntegrityError
from backoffice.utils.constant import Status
from backoffice.utils.exceptions import EntityNotFound, DuplicatedRecord, InvalidOperation
class UserLoginQuerySet(models.QuerySet):
def authenticate(self, username, password):
return self.get(u... | 33.704545 | 109 | 0.694538 |
73bc041ff8d2c6a9437df7970732d2d8d7bec41e | 15,349 | py | Python | tests/_test_old.py | hindman/optopus | daaba31c6b1bd4f56e442326e36f7b3ea0b74b15 | [
"MIT"
] | 2 | 2021-05-04T23:44:42.000Z | 2021-07-25T20:45:33.000Z | tests/_test_old.py | hindman/optopus | daaba31c6b1bd4f56e442326e36f7b3ea0b74b15 | [
"MIT"
] | null | null | null | tests/_test_old.py | hindman/optopus | daaba31c6b1bd4f56e442326e36f7b3ea0b74b15 | [
"MIT"
] | null | null | null | import pytest
from six.moves import zip_longest
from textwrap import dedent
from optopus._old import (
OptType,
SimpleSpecParser,
ExitCode,
jdump,
FormatterConfig,
Opt,
OptoPyError,
Parser,
Section,
SectionName,
)
def test_parser_using_wildcards():
args = [
'tigers'... | 26.103741 | 103 | 0.475601 |
edb644c7749d28224024aa707370c9311d4d28ef | 18,017 | py | Python | module/bio/queue/demux.py | moonwatcher/tubo | bd64844e1b2420bfd7bc7f3f35db1d215a574001 | [
"MIT"
] | null | null | null | module/bio/queue/demux.py | moonwatcher/tubo | bd64844e1b2420bfd7bc7f3f35db1d215a574001 | [
"MIT"
] | null | null | null | module/bio/queue/demux.py | moonwatcher/tubo | bd64844e1b2420bfd7bc7f3f35db1d215a574001 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import io
import logging
from ontology import Ontology
from material import Resource
from command import Command
from queue import Job, Task, Scanner
from queue import ResourceTask
from error import *
class DemuxJob(Job):
def __init__(self, queue, node):
Jo... | 46.676166 | 140 | 0.512183 |
5b27c9c071526b3aa831a004cb22b957496cb3b5 | 209 | py | Python | allowk.py | elba7r/builder | 1175ed84d27f5024eb659f203a73715485bff858 | [
"MIT"
] | null | null | null | allowk.py | elba7r/builder | 1175ed84d27f5024eb659f203a73715485bff858 | [
"MIT"
] | null | null | null | allowk.py | elba7r/builder | 1175ed84d27f5024eb659f203a73715485bff858 | [
"MIT"
] | null | null | null | stored_password ='c1cd589b3b73a87b37eda8bcd6c889dcf75fd33c8166cceb882a081b693dbb4b88478c9a9b7aa367cc095589bb8992ac6651610d73aad5adcdc362ecea0f63a53fae6060c9e0e3fe7494a09f8b5fa50136c5b1dcfda5ae41a48a1f9e81fdb'
| 104.5 | 208 | 0.976077 |
deee5ff1a528727ee4f820c22c944367f3965ad7 | 925 | py | Python | src/settings_csv.py | envoylabs/staketaxcsv | 17838eb7b27a60a8abaec7ac9fbc0433e274d863 | [
"MIT"
] | 1 | 2022-02-05T05:37:08.000Z | 2022-02-05T05:37:08.000Z | src/settings_csv.py | envoylabs/staketaxcsv | 17838eb7b27a60a8abaec7ac9fbc0433e274d863 | [
"MIT"
] | null | null | null | src/settings_csv.py | envoylabs/staketaxcsv | 17838eb7b27a60a8abaec7ac9fbc0433e274d863 | [
"MIT"
] | 1 | 2022-02-05T05:37:11.000Z | 2022-02-05T05:37:11.000Z | import os
# Environment variables (required for each respective report)
SOL_NODE = os.environ.get("SOL_NODE", "")
ATOM_NODE = os.environ.get("ATOM_NODE", "")
TERRA_LCD_NODE = os.environ.get("TERRA_LCD_NODE", "")
# Optional environment variables
TERRA_FIGMENT_KEY = os.environ.get("TERRA_FIGMENT_KEY", "")
# #########... | 30.833333 | 103 | 0.671351 |
1c605995325434beea37130c7da99bd4d8835175 | 208 | py | Python | src/pypi_registration_test/bye.py | w40141/pypi_registration_test | feabd9ce7fe851249df741422489b6d504f3889c | [
"MIT"
] | null | null | null | src/pypi_registration_test/bye.py | w40141/pypi_registration_test | feabd9ce7fe851249df741422489b6d504f3889c | [
"MIT"
] | 4 | 2020-03-24T17:51:28.000Z | 2021-06-02T00:38:30.000Z | src/pypi_registration_test/bye.py | w40141/pypi_registration_test | feabd9ce7fe851249df741422489b6d504f3889c | [
"MIT"
] | null | null | null | from .greet import Greet
class Bye(Greet):
def __init__(self, number):
super().__init__(number)
self.letter = 'Bye'
def say(self):
super().say()
print(self.letter)
| 16 | 32 | 0.572115 |
2731129c35de72ad1d689fdecaf9aa855120bdbc | 4,200 | py | Python | test/torch/nn/test_functional.py | Prtfw/PySyft | 82eede90acf09f26de389237524897e2b142f9ff | [
"Apache-2.0"
] | 1 | 2020-04-11T06:46:49.000Z | 2020-04-11T06:46:49.000Z | test/torch/nn/test_functional.py | haofanwang/PySyft | 653d31001dbc0c611d486c6c5543fce0abf9b27d | [
"Apache-2.0"
] | 1 | 2020-04-07T13:36:44.000Z | 2020-04-07T13:36:44.000Z | test/torch/nn/test_functional.py | JMBehnken/PySyft | 35012f5bf55628bb19761d5f40d03181fbbb1766 | [
"Apache-2.0"
] | 1 | 2020-03-11T09:52:47.000Z | 2020-03-11T09:52:47.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
def test_torch_nn_functional_linear():
tensor = nn.Parameter(torch.tensor([[1.0, 2], [3, 4]]), requires_grad=False).fix_prec()
weight = nn.Parameter(torch.tensor([[1.0, 2], [3, 4]]), requires_grad=True).fix_prec()
result = F.linear(tensor... | 33.070866 | 97 | 0.591667 |
dcf9a338509de5c6198dec99dd13b9107aa1264c | 7,452 | py | Python | test.py | xiahaifeng1995/FAVAE-master | 697365a5a2c066e8db08f065567fdf4e10256e16 | [
"Apache-2.0"
] | 14 | 2020-11-17T06:54:40.000Z | 2022-03-05T07:21:34.000Z | test.py | xiahaifeng1995/FAVAE-anomaly-detection-location-master | 697365a5a2c066e8db08f065567fdf4e10256e16 | [
"Apache-2.0"
] | 1 | 2021-11-01T06:55:43.000Z | 2021-11-01T06:55:43.000Z | test.py | xiahaifeng1995/FAVAE-anomaly-detection-location-master | 697365a5a2c066e8db08f065567fdf4e10256e16 | [
"Apache-2.0"
] | 3 | 2020-12-04T02:29:44.000Z | 2021-02-11T13:51:37.000Z | import os
import argparse
import matplotlib
import numpy as np
import torch
import matplotlib.pyplot as plt
import torch.nn as nn
from torch.nn import functional as F
from torchvision import models
from tqdm import tqdm
from skimage.segmentation import mark_boundaries
from sklearn.metrics import roc_auc_scor... | 42.101695 | 112 | 0.63701 |
866b2d9d5d17c9d79e313741575f668be2ee2f5c | 623 | py | Python | emotion_detection/haar.py | GrayFlash/DL | 329beb77f7898084ecb38f7e81ae58df5a248569 | [
"MIT"
] | null | null | null | emotion_detection/haar.py | GrayFlash/DL | 329beb77f7898084ecb38f7e81ae58df5a248569 | [
"MIT"
] | null | null | null | emotion_detection/haar.py | GrayFlash/DL | 329beb77f7898084ecb38f7e81ae58df5a248569 | [
"MIT"
] | null | null | null | import cv2 as cv
class haar:
def Region_OI(image):
# Takes image as input and returns biggest face detected
# returns starting point (x, y) and height, width (h, w) of face
face_classifier = cv.CascadeClassifier('haarcascade_frontalface_default.xml')
faces = face_classifier.detectMul... | 32.789474 | 85 | 0.553772 |
02c21ff0b0c44f926000ab95188778eb9f4e4d75 | 8,934 | py | Python | bin/ontobio-parse-assocs.py | alliance-genome/ontobio | 0ec3aa6fea9d4492a9873a4b9b394c4866f741b6 | [
"BSD-3-Clause"
] | null | null | null | bin/ontobio-parse-assocs.py | alliance-genome/ontobio | 0ec3aa6fea9d4492a9873a4b9b394c4866f741b6 | [
"BSD-3-Clause"
] | null | null | null | bin/ontobio-parse-assocs.py | alliance-genome/ontobio | 0ec3aa6fea9d4492a9873a4b9b394c4866f741b6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Command line wrapper to gafparser.py
Type:
ogr-parse-assocs -h
For instructions
Examples:
```
```
"""
import argparse
import networkx as nx
from networkx.algorithms.dag import ancestors, descendants
from ontobio.assoc_factory import AssociationSetFactory
from ontobio.ontol_factory ... | 37.696203 | 142 | 0.633759 |
1a39cab971023f5e46f7aed15bf70ac8497d74e9 | 9,312 | py | Python | function.py | tbullmann/hana | a3dcc52c80b15c79518741f37f2ee2c8bdae9f9e | [
"MIT"
] | null | null | null | function.py | tbullmann/hana | a3dcc52c80b15c79518741f37f2ee2c8bdae9f9e | [
"MIT"
] | null | null | null | function.py | tbullmann/hana | a3dcc52c80b15c79518741f37f2ee2c8bdae9f9e | [
"MIT"
] | null | null | null | from __future__ import division
from itertools import product, groupby
import numpy as np
import logging
from scipy.special._ufuncs import erfc
from statsmodels.stats.multitest import fdrcorrection
logging.basicConfig(level=logging.DEBUG)
def timelag_by_for_loop (timeseries1, timeseries2):
"""Returns for each e... | 45.871921 | 129 | 0.716924 |
908a81f403f3cb8d4edb9f7e3134e63df4785632 | 38,258 | py | Python | function.py | Mailhot/ledger-simple | 0635e9b61b3aa5d3639983606d0a477bbfce59b7 | [
"MIT"
] | null | null | null | function.py | Mailhot/ledger-simple | 0635e9b61b3aa5d3639983606d0a477bbfce59b7 | [
"MIT"
] | null | null | null | function.py | Mailhot/ledger-simple | 0635e9b61b3aa5d3639983606d0a477bbfce59b7 | [
"MIT"
] | null | null | null | import objects
import unittest
import csv
import datetime
import helpers
class StatementFunction():
"""This is an attempt to separate function from objects,
we also want to make code clearer."""
def find_description_amount(description):
"""take the description with potentially an amount added.... | 48.427848 | 329 | 0.489806 |
8bf9991ab1b2436003de1ff49930c46e61a9b0b2 | 7,364 | py | Python | benchmarks/benchmarks/linalg.py | avivajpeyi/scipy | dbfe06e6618232b26c241cbe8861e2ea1489b535 | [
"BSD-3-Clause"
] | 1 | 2020-07-22T17:29:25.000Z | 2020-07-22T17:29:25.000Z | benchmarks/benchmarks/linalg.py | avivajpeyi/scipy | dbfe06e6618232b26c241cbe8861e2ea1489b535 | [
"BSD-3-Clause"
] | 5 | 2020-09-01T01:19:07.000Z | 2021-10-11T01:06:05.000Z | benchmarks/benchmarks/linalg.py | avivajpeyi/scipy | dbfe06e6618232b26c241cbe8861e2ea1489b535 | [
"BSD-3-Clause"
] | 1 | 2015-08-27T02:56:27.000Z | 2015-08-27T02:56:27.000Z | import math
import numpy.linalg as nl
import numpy as np
from numpy.testing import assert_
from numpy.random import rand
try:
import scipy.linalg as sl
except ImportError:
pass
from .common import Benchmark
def random(size):
return rand(*size)
class Bench(Benchmark):
params = [
[20, 100,... | 28.992126 | 93 | 0.573873 |
38ad9b4b87124f6a5731efdc2bd17605db512727 | 19,767 | py | Python | metagraph/plugins/graphblas/types.py | paul-tqh-nguyen/metagraph | 362f97059f8344042d376edc5b470e27bd69b46e | [
"Apache-2.0"
] | 18 | 2020-08-07T19:15:46.000Z | 2022-01-25T09:24:18.000Z | metagraph/plugins/graphblas/types.py | paul-tqh-nguyen/metagraph | 362f97059f8344042d376edc5b470e27bd69b46e | [
"Apache-2.0"
] | 49 | 2020-08-07T20:05:11.000Z | 2022-03-24T20:46:31.000Z | metagraph/plugins/graphblas/types.py | paul-tqh-nguyen/metagraph | 362f97059f8344042d376edc5b470e27bd69b46e | [
"Apache-2.0"
] | 9 | 2020-08-07T19:15:56.000Z | 2022-01-19T01:45:05.000Z | from metagraph import ConcreteType, dtypes
from ..core.types import Vector, Matrix, NodeSet, NodeMap, EdgeSet, EdgeMap, Graph
from ..core.wrappers import (
NodeSetWrapper,
NodeMapWrapper,
EdgeSetWrapper,
EdgeMapWrapper,
GraphWrapper,
)
from .. import has_grblas
from typing import Set, Dict, Any
i... | 37.651429 | 116 | 0.476451 |
8cce887344de97f33c245e3f1170f299088a2cf1 | 20,524 | py | Python | chainer/functions/pooling/roi_align_2d.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | null | null | null | chainer/functions/pooling/roi_align_2d.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | null | null | null | chainer/functions/pooling/roi_align_2d.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | null | null | null | # Modified work:
# -----------------------------------------------------------------------------
# Copyright (c) 2018 Preferred Infrastructure, Inc.
# Copyright (c) 2018 Preferred Networks, Inc.
# -----------------------------------------------------------------------------
# Original work:
# -------------------------... | 37.181159 | 79 | 0.509842 |
56dd3b235db34e9042db4c32bd5192975869bbb4 | 1,030 | py | Python | Python_Test/PyFinanceApiSample/com/djs/learn/test/TestCheckXeCurrencyData.py | djsilenceboy/LearnTest | 9e4959db04f61133faafb206dcb2f7be67f8a4f4 | [
"Apache-2.0"
] | 3 | 2017-11-18T21:34:33.000Z | 2020-09-17T08:32:24.000Z | Python_Test/PyFinanceApiSample/com/djs/learn/test/TestCheckXeCurrencyData.py | djsilenceboy/LearnTest | 9e4959db04f61133faafb206dcb2f7be67f8a4f4 | [
"Apache-2.0"
] | 11 | 2020-03-04T23:04:17.000Z | 2022-03-31T18:51:08.000Z | Python_Test/PyFinanceApiSample/com/djs/learn/test/TestCheckXeCurrencyData.py | djsilenceboy/LearnTest | 9e4959db04f61133faafb206dcb2f7be67f8a4f4 | [
"Apache-2.0"
] | 3 | 2019-07-02T14:24:49.000Z | 2020-09-17T08:32:26.000Z | '''
Check XE currency data helper.
Update log: (date / version / author : comments)
2018-07-01 / 1.0.0 / Du Jiang : Creation
'''
from com.djs.learn.financeapi import CheckFinanceDataSelenium
__data_type = 1
__inventory_info_file_path = "../../../../etc/CurrencyInfo.csv"
__result_output_file_path = "../../... | 33.225806 | 198 | 0.673786 |
465a0f64a1ffec3865ea14b7e89a5a6a12d1f85b | 1,696 | py | Python | Kai/crab/NANOv7_NoveCampaign/2017/crab_cfg_2017_tt_AH-TuneCP5up.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2022-01-17T17:29:38.000Z | 2022-01-17T17:29:38.000Z | Kai/crab/NANOv7_NoveCampaign/2017/crab_cfg_2017_tt_AH-TuneCP5up.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | null | null | null | Kai/crab/NANOv7_NoveCampaign/2017/crab_cfg_2017_tt_AH-TuneCP5up.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2021-12-15T10:56:50.000Z | 2021-12-15T10:56:50.000Z | import os
from WMCore.Configuration import Configuration
from CRABClient.UserUtilities import config, getUsernameFromCRIC
config = Configuration()
config.section_("General")
config.General.requestName = '2017_tt_AH-TuneCP5up'
config.General.transferOutputs = True
config.General.transferLogs = True
config.section_("Jo... | 42.4 | 182 | 0.778302 |
d4f66bb051578df7d6cb74592d79565a402a8452 | 3,966 | py | Python | mlrun/feature_store/retrieval/dask_merger.py | zjzh/mlrun | 2f367b29838222663b1a7c6deeacbe26156071b3 | [
"Apache-2.0"
] | null | null | null | mlrun/feature_store/retrieval/dask_merger.py | zjzh/mlrun | 2f367b29838222663b1a7c6deeacbe26156071b3 | [
"Apache-2.0"
] | null | null | null | mlrun/feature_store/retrieval/dask_merger.py | zjzh/mlrun | 2f367b29838222663b1a7c6deeacbe26156071b3 | [
"Apache-2.0"
] | 1 | 2021-08-30T21:43:38.000Z | 2021-08-30T21:43:38.000Z | import dask.dataframe as dd
import pandas as pd
from dask.dataframe.multi import merge, merge_asof
from dask.distributed import Client
import mlrun
from ..feature_vector import OfflineVectorResponse
from .base import BaseMerger
class DaskFeatureMerger(BaseMerger):
def __init__(self, vector, **engine_args):
... | 31.228346 | 85 | 0.618003 |
adfd2655cfc8dff0f55441f57b211bb65a29af26 | 5,885 | py | Python | tests/test_config.py | piyushg9794/lux | f5be470f5a4837db2746c950bebe2694665c25dc | [
"Apache-2.0"
] | null | null | null | tests/test_config.py | piyushg9794/lux | f5be470f5a4837db2746c950bebe2694665c25dc | [
"Apache-2.0"
] | null | null | null | tests/test_config.py | piyushg9794/lux | f5be470f5a4837db2746c950bebe2694665c25dc | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2020 The Lux 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 30.02551 | 130 | 0.663891 |
2c9e643913e8565a9300956c9a5ae3d5e880397f | 4,176 | py | Python | apps/sitioweb/models.py | Ajerhy/proyectocoteco | d6e6bca71532cbe010a7dacd44a5263fabb0d4c2 | [
"MIT"
] | null | null | null | apps/sitioweb/models.py | Ajerhy/proyectocoteco | d6e6bca71532cbe010a7dacd44a5263fabb0d4c2 | [
"MIT"
] | 7 | 2020-06-05T23:01:01.000Z | 2021-09-22T18:55:08.000Z | apps/sitioweb/models.py | Ajerhy/proyectocoteco | d6e6bca71532cbe010a7dacd44a5263fabb0d4c2 | [
"MIT"
] | null | null | null | from django.db import models
from django.urls import reverse
import uuid
from apps.usuarios.models import EstadoModelo
class SitioWebConfiguracion(EstadoModelo):
ver_blog = models.BooleanField('Mostrar Blog', default=False)
ver_servicio = models.BooleanField('Mostrar Servicios', default=False)
ver_anuncio ... | 40.543689 | 129 | 0.627155 |
a3f2f8d9d829ae7f40bda99eabe035f38ee2f90c | 915 | py | Python | tests/update/test_update.py | MacHu-GWU/learn_pandas-project | 86d51d11d6f0a50ffcffbf743da197f4a7b12d61 | [
"MIT"
] | null | null | null | tests/update/test_update.py | MacHu-GWU/learn_pandas-project | 86d51d11d6f0a50ffcffbf743da197f4a7b12d61 | [
"MIT"
] | null | null | null | tests/update/test_update.py | MacHu-GWU/learn_pandas-project | 86d51d11d6f0a50ffcffbf743da197f4a7b12d61 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
import pandas as pd
from learn_pandas import assert_value_equal
def test():
"""
Update操作是,将新DataFrame中凡是跟原DataFrame的Index和Column有重复的位置,只要
值不是 np.nan, 就用它取代原DataFrame中的值。
**此操作只考虑原DataFrame中有的Index和Column**。
"""
df1 = pd.DataFrame({"... | 16.944444 | 61 | 0.504918 |
c042b1f357aea8e67138817c231b553107ca4bc4 | 27 | py | Python | aries_cloudagent/storage/tests/__init__.py | euroledger/aries-cloudagent-python | caf457276b19df374c16c2890e1c7e4914f46254 | [
"Apache-2.0"
] | 247 | 2019-07-02T21:10:21.000Z | 2022-03-30T13:55:33.000Z | aries_cloudagent/storage/tests/__init__.py | euroledger/aries-cloudagent-python | caf457276b19df374c16c2890e1c7e4914f46254 | [
"Apache-2.0"
] | 1,462 | 2019-07-02T20:57:30.000Z | 2022-03-31T23:13:35.000Z | aries_cloudagent/storage/tests/__init__.py | euroledger/aries-cloudagent-python | caf457276b19df374c16c2890e1c7e4914f46254 | [
"Apache-2.0"
] | 377 | 2019-06-20T21:01:31.000Z | 2022-03-30T08:27:53.000Z | """
Storage test suite
"""
| 6.75 | 18 | 0.592593 |
076bcd8799748070b4f7a938c20dcad534f3eb48 | 31,669 | py | Python | pythonocc/lib/OCC/BRepAlgoAPI.py | mbattistello/lambda_converters | 0dfef8927d3ddbc74e5c8ce1c38701ea182a27b3 | [
"MIT"
] | 2 | 2017-10-30T15:51:48.000Z | 2020-11-04T02:23:36.000Z | pythonocc/lib/OCC/BRepAlgoAPI.py | mbattistello/lambda_converters | 0dfef8927d3ddbc74e5c8ce1c38701ea182a27b3 | [
"MIT"
] | null | null | null | pythonocc/lib/OCC/BRepAlgoAPI.py | mbattistello/lambda_converters | 0dfef8927d3ddbc74e5c8ce1c38701ea182a27b3 | [
"MIT"
] | 4 | 2017-11-29T05:24:34.000Z | 2020-03-05T23:23:23.000Z | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.10
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (3,0,0):
new_instancemethod = lambda func, inst, cls: _BRepAlg... | 45.112536 | 3,313 | 0.724652 |
9107f585eaa394319e8bede9fbfff3285452b622 | 11,834 | py | Python | clients/python/lakefs_client/model/credentials_with_secret.py | adipolak/lakeFS | 798e7b7d42f20dba2261c7ecbdc56a5c9131a28c | [
"Apache-2.0"
] | 1 | 2022-02-02T08:52:15.000Z | 2022-02-02T08:52:15.000Z | clients/python/lakefs_client/model/credentials_with_secret.py | adipolak/lakeFS | 798e7b7d42f20dba2261c7ecbdc56a5c9131a28c | [
"Apache-2.0"
] | null | null | null | clients/python/lakefs_client/model/credentials_with_secret.py | adipolak/lakeFS | 798e7b7d42f20dba2261c7ecbdc56a5c9131a28c | [
"Apache-2.0"
] | null | null | null | """
lakeFS API
lakeFS HTTP API # noqa: E501
The version of the OpenAPI document: 0.1.0
Contact: services@treeverse.io
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from lakefs_client.model_utils import ( # noqa: F401
ApiTypeError,
Mo... | 43.032727 | 121 | 0.575883 |
cf7c200c24d7f180b1fc2757346bee3f14e91b73 | 1,981 | py | Python | src/robobreizh/scripts/move.py | Maelic/robocup-at-home-2021-challenge | f074d92bf21ddb68c9a0507579738aa2a1d0d30c | [
"BSD-3-Clause-Clear"
] | null | null | null | src/robobreizh/scripts/move.py | Maelic/robocup-at-home-2021-challenge | f074d92bf21ddb68c9a0507579738aa2a1d0d30c | [
"BSD-3-Clause-Clear"
] | null | null | null | src/robobreizh/scripts/move.py | Maelic/robocup-at-home-2021-challenge | f074d92bf21ddb68c9a0507579738aa2a1d0d30c | [
"BSD-3-Clause-Clear"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy
import sys
import math
from utils import *
#from Vision.vision import Vision
import time
def demo():
try:
# look down a little
move_head_tilt(-0.4)
except:
rospy.logerr('fail to init')
sys.exit()
try:
# mov... | 21.769231 | 58 | 0.569914 |
0c7265b1c238dc08fd5e7d9d6d4b328158a516a8 | 579 | py | Python | TestSpeed.py | luxu/SpeedTest | c79d0ea8d4ceff886e47ed8ca5112d40059692db | [
"MIT"
] | 153 | 2021-04-01T17:33:34.000Z | 2022-02-14T13:28:42.000Z | TestSpeed.py | luxu/SpeedTest | c79d0ea8d4ceff886e47ed8ca5112d40059692db | [
"MIT"
] | 8 | 2021-04-02T02:24:39.000Z | 2021-05-19T18:25:14.000Z | TestSpeed.py | luxu/SpeedTest | c79d0ea8d4ceff886e47ed8ca5112d40059692db | [
"MIT"
] | 58 | 2021-04-01T17:33:38.000Z | 2022-01-24T17:21:35.000Z | import speedtest
from datetime import datetime
import pandas as pd
from threading import Timer
# função para gravar dados da velocidade da internet
def internet():
df = pd.read_excel('dados.xlsx', sheet_name='base')
s = speedtest.Speedtest()
data_atual = datetime.now().strftime('%d/%m/%Y')
hora_atual =... | 27.571429 | 65 | 0.696028 |
9894ac93080114922d3ec312755b726b812f855b | 14,885 | py | Python | Metodo_2.py | lorenzoppx/Classifica-o-de-imagens | 41f2d20c03c5b291cb5593432d12b00f3ff22c76 | [
"Unlicense"
] | null | null | null | Metodo_2.py | lorenzoppx/Classifica-o-de-imagens | 41f2d20c03c5b291cb5593432d12b00f3ff22c76 | [
"Unlicense"
] | null | null | null | Metodo_2.py | lorenzoppx/Classifica-o-de-imagens | 41f2d20c03c5b291cb5593432d12b00f3ff22c76 | [
"Unlicense"
] | null | null | null | import cv2
import numpy as np
import io as lib
from imageio import imread
from matplotlib import pyplot
from Comparacao_Pascal import *
import PIL
from skimage import data, io, segmentation, color, morphology, img_as_ubyte
#Pega os nomes dos arquivos e manda para uma lista
from os import listdir
from os.p... | 41.694678 | 112 | 0.540275 |
5e0f97a951282428c7717fdab015a4ba92415a7b | 2,669 | py | Python | azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/request_rate_by_interval_input.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 43.754098 | 85 | 0.663919 |
644423ecb7ffe67ef1316b5c62cbd89e387959e8 | 5,204 | py | Python | tensorflow/python/ops/ragged/ragged_range_op_test.py | aeverall/tensorflow | 7992bf97711919f56f80bff9e5510cead4ab2095 | [
"Apache-2.0"
] | 2 | 2018-12-12T23:33:05.000Z | 2019-02-26T07:20:22.000Z | tensorflow/python/ops/ragged/ragged_range_op_test.py | aeverall/tensorflow | 7992bf97711919f56f80bff9e5510cead4ab2095 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/ragged/ragged_range_op_test.py | aeverall/tensorflow | 7992bf97711919f56f80bff9e5510cead4ab2095 | [
"Apache-2.0"
] | null | null | null | # 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 required by applica... | 38.835821 | 80 | 0.58186 |
424e937f5ecbca82830f181d1a7ff5d7074f52a4 | 159 | py | Python | Week 2 - Calculator/Vf.py | Jasleenk47/BeginnerRoom-2020 | 32903f6917a236fe685106c148b8531c62210f1f | [
"Unlicense"
] | 5 | 2021-01-19T00:31:22.000Z | 2021-03-05T02:31:10.000Z | Week 2 - Calculator/Vf.py | Jasleenk47/BeginnerRoom-2020 | 32903f6917a236fe685106c148b8531c62210f1f | [
"Unlicense"
] | 34 | 2021-01-14T21:00:18.000Z | 2021-03-11T17:57:26.000Z | Week 2 - Calculator/Vf.py | Jasleenk47/BeginnerRoom-2020 | 32903f6917a236fe685106c148b8531c62210f1f | [
"Unlicense"
] | 43 | 2021-01-14T20:40:47.000Z | 2021-03-11T02:29:30.000Z | import math
a = float(input("Mass: "))
b = float(input("Ek: "))
c = (math. sqrt(2*b/a))
print ("the final velocity " + str(c) + " Metres per Second") | 19.875 | 61 | 0.566038 |
2d4b863dca471d1ddf360d79e751da6a1c57c53b | 4,443 | py | Python | pypy/module/_minimal_curses/fficurses.py | ruby-compiler-survey/pypy | c76ed8d0979e13497786cf99eb427ef8f94ea816 | [
"Apache-2.0",
"OpenSSL"
] | 5 | 2022-02-24T00:37:44.000Z | 2022-02-24T22:05:50.000Z | pypy/module/_minimal_curses/fficurses.py | muke101/pypy-llvm-backend | bfd8164d25416e7a2c22cea7cc5f5a19c593b1b1 | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2021-03-30T18:08:41.000Z | 2021-03-30T18:08:41.000Z | pypy/module/_minimal_curses/fficurses.py | muke101/pypy-llvm-backend | bfd8164d25416e7a2c22cea7cc5f5a19c593b1b1 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | """ The ffi for rpython
"""
from rpython.rtyper.lltypesystem import rffi
from rpython.rtyper.tool import rffi_platform
from rpython.translator.tool.cbuild import ExternalCompilationInfo
def try_cflags():
yield ExternalCompilationInfo(includes=['curses.h', 'term.h'])
yield ExternalCompilationInfo(includes=['cu... | 32.669118 | 78 | 0.63133 |
c1cde5698e1b5f4355200237b88be64545954b73 | 1,843 | py | Python | SalishSea/storm-surges/new_config/runs_dec2006_restart.py | SalishSeaCast/SS-run-sets | a330ef9963defa6dc322c3f2313f76824878a58b | [
"Apache-2.0"
] | 1 | 2020-04-21T16:47:27.000Z | 2020-04-21T16:47:27.000Z | SalishSea/storm-surges/new_config/runs_dec2006_restart.py | SalishSeaCast/SS-run-sets | a330ef9963defa6dc322c3f2313f76824878a58b | [
"Apache-2.0"
] | null | null | null | SalishSea/storm-surges/new_config/runs_dec2006_restart.py | SalishSeaCast/SS-run-sets | a330ef9963defa6dc322c3f2313f76824878a58b | [
"Apache-2.0"
] | null | null | null | """Example script to define and execute a series of Salish Sea NEMO model runs.
"""
from __future__ import absolute_import
import os
import salishsea_cmd.api
def main():
runs = ('all_forcing','ssh_only')
tides= ('lateral', 'lateral')
surface=('surface','surface.nosurge')
for run_id,tide_id,surfa... | 31.237288 | 139 | 0.634292 |
6128eef573934e226ee1756bdd3d18fd9881921e | 18,298 | py | Python | mesonbuild/ast/interpreter.py | sthagen/mesonbuild-meson | f84588368e4fb215fa9d32494c0d1096f7a05cd8 | [
"Apache-2.0"
] | null | null | null | mesonbuild/ast/interpreter.py | sthagen/mesonbuild-meson | f84588368e4fb215fa9d32494c0d1096f7a05cd8 | [
"Apache-2.0"
] | null | null | null | mesonbuild/ast/interpreter.py | sthagen/mesonbuild-meson | f84588368e4fb215fa9d32494c0d1096f7a05cd8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to ... | 41.211712 | 185 | 0.597934 |
7e154039403c866526deb80d7ff6c9b4032a68c7 | 818 | py | Python | yatube/posts/migrations/0001_initial.py | mspitsyn/hw02_community | 868e550e30335675f7ed53b660d61ad6b276a3ca | [
"MIT"
] | null | null | null | yatube/posts/migrations/0001_initial.py | mspitsyn/hw02_community | 868e550e30335675f7ed53b660d61ad6b276a3ca | [
"MIT"
] | null | null | null | yatube/posts/migrations/0001_initial.py | mspitsyn/hw02_community | 868e550e30335675f7ed53b660d61ad6b276a3ca | [
"MIT"
] | null | null | null | # Generated by Django 2.2.19 on 2022-02-19 10:55
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
op... | 30.296296 | 142 | 0.634474 |
0aaf7ad60cf5e8a1ac5f6535a4d12d6e558d39fc | 6,629 | py | Python | official/nlp/textcnn/modelarts/train_start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/nlp/textcnn/modelarts/train_start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/nlp/textcnn/modelarts/train_start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | """
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 37.451977 | 96 | 0.621059 |
06ab93ab0a2c0b5b74a6740e34248c17c8876757 | 1,069 | py | Python | Packages/matplotlib-2.2.2/lib/mpl_examples/mplot3d/surface3d_3.py | NightKirie/NCKU_NLP_2108_industry3 | 23ac13644b140587e23cfeffb114c7c6f46f17a2 | [
"MIT"
] | 3 | 2020-04-09T02:35:26.000Z | 2021-02-27T17:00:21.000Z | Packages/matplotlib-2.2.2/lib/mpl_examples/mplot3d/surface3d_3.py | NightKirie/NCKU_NLP_2108_industry3 | 23ac13644b140587e23cfeffb114c7c6f46f17a2 | [
"MIT"
] | null | null | null | Packages/matplotlib-2.2.2/lib/mpl_examples/mplot3d/surface3d_3.py | NightKirie/NCKU_NLP_2108_industry3 | 23ac13644b140587e23cfeffb114c7c6f46f17a2 | [
"MIT"
] | 4 | 2018-05-19T11:31:20.000Z | 2018-07-01T20:58:29.000Z | '''
=========================
3D surface (checkerboard)
=========================
Demonstrates plotting a 3D surface colored in a checkerboard pattern.
'''
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.ticker import LinearLocator
import numpy as np
... | 24.295455 | 75 | 0.667914 |
7824ff561af5cc7fed288b672d28af02909a9caf | 15,330 | py | Python | pyiceclient/pyiceclient.py | cdsframework/pyiceclient | 35df943f39afec0f0229c40acb7cd864e6ca4a51 | [
"BSD-2-Clause"
] | null | null | null | pyiceclient/pyiceclient.py | cdsframework/pyiceclient | 35df943f39afec0f0229c40acb7cd864e6ca4a51 | [
"BSD-2-Clause"
] | null | null | null | pyiceclient/pyiceclient.py | cdsframework/pyiceclient | 35df943f39afec0f0229c40acb7cd864e6ca4a51 | [
"BSD-2-Clause"
] | 1 | 2021-11-02T02:42:13.000Z | 2021-11-02T02:42:13.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Python ICE client (pyiceclient):
A Python 3 module to convert ICE web client data structure to vMR,
send the vMR to ICE, and parse the output vMR. See test_pyiceclient.py
for a usage example.
See README for important caveats.
"""
__author__ = "HLN Consulting, L... | 40.771277 | 220 | 0.67469 |
d5710c1cff230317858530d4b21cf2d852d318a1 | 20,134 | py | Python | src/python/packages/amwg/amwg1.py | susburrows/uvcmetrics | 5a3c1266f3e5e97398a7671b01fa2816fb307c38 | [
"X11",
"MIT"
] | null | null | null | src/python/packages/amwg/amwg1.py | susburrows/uvcmetrics | 5a3c1266f3e5e97398a7671b01fa2816fb307c38 | [
"X11",
"MIT"
] | null | null | null | src/python/packages/amwg/amwg1.py | susburrows/uvcmetrics | 5a3c1266f3e5e97398a7671b01fa2816fb307c38 | [
"X11",
"MIT"
] | null | null | null | # AMWG Diagnostics, plot set 1.
# Unlike all the other plot sets, this is just a table.
# So this "plot set" calculation is completely different.
# Here's the title used by NCAR:
# DIAG Set 1 - Tables of global, tropical, and extratropical DJF, JJA, ANN means and RMSE
from pprint import pprint
from metrics.packages.a... | 51.625641 | 118 | 0.553591 |
684125067b8e7d9aacd95f29f5d55c837280f18f | 1,206 | py | Python | tests/test_models/test_feat.py | LaraFerCue/dnd_combat_simulator | 7a5139ed0518628acab91fccc52f1b104f1337e6 | [
"BSD-3-Clause"
] | null | null | null | tests/test_models/test_feat.py | LaraFerCue/dnd_combat_simulator | 7a5139ed0518628acab91fccc52f1b104f1337e6 | [
"BSD-3-Clause"
] | null | null | null | tests/test_models/test_feat.py | LaraFerCue/dnd_combat_simulator | 7a5139ed0518628acab91fccc52f1b104f1337e6 | [
"BSD-3-Clause"
] | null | null | null | from dnd.models.damage import DamageType
from dnd.models.feat import Feat, Resistance, Vulnerability
def test_get_feat_by_name():
feat = Feat.get_feat_by_name(name='Resistance', damage_type=DamageType.PIERCING)
assert feat.name == "Resistance"
def test_resistance():
resistance = Resistance(DamageType.PI... | 28.046512 | 84 | 0.74461 |
0864043f5dbeb13e39f3ed0c923f7f042bbe61e4 | 1,432 | py | Python | cmsscan/model/hardware/firewall/juniper_netscreen_backdoor.py | AGLcaicai/onlinetools | 39d90b39e97a843aee5a47cc8720169d4daa0a1a | [
"MIT"
] | 3 | 2020-07-07T10:13:50.000Z | 2021-08-31T12:21:56.000Z | cmsscan/model/hardware/firewall/juniper_netscreen_backdoor.py | AGLcaicai/onlinetools | 39d90b39e97a843aee5a47cc8720169d4daa0a1a | [
"MIT"
] | 1 | 2018-12-07T06:59:06.000Z | 2018-12-07T06:59:06.000Z | cmsscan/model/hardware/firewall/juniper_netscreen_backdoor.py | AGLcaicai/onlinetools | 39d90b39e97a843aee5a47cc8720169d4daa0a1a | [
"MIT"
] | 3 | 2019-01-17T02:48:00.000Z | 2021-09-12T07:57:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
name: juniper NetScreen防火墙后门(CVE-2015-7755)
referer: http://www.freebuf.com/news/90323.html
author: Lucifer
description: ssh后门。
'''
import sys
from pexpect import pxssh
from urllib.parse import urlparse
class juniper_netscreen_backdoor_BaseVerify:
def __init__(sel... | 27.538462 | 128 | 0.509777 |
bb29fe2436b06dcf53517ae918daab96af8924e9 | 4,067 | py | Python | setup.py | ivy-dl/gym | 5536e1274dea568d3dce0b58596ecb7dbea51ce9 | [
"Apache-2.0"
] | 13 | 2021-02-24T17:44:48.000Z | 2021-11-27T16:22:28.000Z | setup.py | ivy-dl/gym | 5536e1274dea568d3dce0b58596ecb7dbea51ce9 | [
"Apache-2.0"
] | null | null | null | setup.py | ivy-dl/gym | 5536e1274dea568d3dce0b58596ecb7dbea51ce9 | [
"Apache-2.0"
] | null | null | null | # lint as: python3
# Copyright 2021 The Ivy 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 require... | 34.466102 | 147 | 0.63044 |
cf895e022a100111dde9e4c60af0ec9c72da42ad | 47,305 | py | Python | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/__init__.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/__init__.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/__init__.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
from __future__ import absolute_import
# import models into model package
from huaweicloudsdkiam.v3.model.acl_policy_option import AclPolicyOption
from huaweicloudsdkiam.v3.model.acl_policy_result import AclPolicyResult
from huaweicloudsdkiam.v3.model.agency_all_project_role import AgencyAllProjectRol... | 96.148374 | 149 | 0.927682 |
ae85ac6e1a1913e3547825fc1a8a25269d5c47f1 | 1,488 | py | Python | boards/sam_e54_xpro/config/bsp.py | tomasz-s/bsp | 896504039fde03c08004682bf9baedc5811d58b1 | [
"0BSD"
] | null | null | null | boards/sam_e54_xpro/config/bsp.py | tomasz-s/bsp | 896504039fde03c08004682bf9baedc5811d58b1 | [
"0BSD"
] | null | null | null | boards/sam_e54_xpro/config/bsp.py | tomasz-s/bsp | 896504039fde03c08004682bf9baedc5811d58b1 | [
"0BSD"
] | null | null | null | def instantiateComponent(bspComponent):
#LED
Database.setSymbolValue("core", "PIN_72_FUNCTION_NAME", "LED")
Database.setSymbolValue("core", "PIN_72_FUNCTION_TYPE", "LED_AL")
Database.setSymbolValue("core", "PIN_72_LAT", "High")
Database.setSymbolValue("core", "PIN_72_DIR", "Out")
#Switch
D... | 48 | 88 | 0.630376 |
0038e33ff59703bc0c6f76c8846521200b16ba4b | 1,226 | py | Python | noxfile.py | adriangb/migri | 691713c8f3efbfc433a339072fba66f0b8c163de | [
"MIT"
] | null | null | null | noxfile.py | adriangb/migri | 691713c8f3efbfc433a339072fba66f0b8c163de | [
"MIT"
] | null | null | null | noxfile.py | adriangb/migri | 691713c8f3efbfc433a339072fba66f0b8c163de | [
"MIT"
] | null | null | null | import nox
def _install_dev_dependencies(session):
session.install("aiomysql")
session.install("aiosqlite")
session.install("asyncpg")
session.install("-r", "test-requirements.txt")
@nox.session(python="3.7", reuse_venv=True)
def dev(session):
"""For creating a development virtual environment. H... | 26.652174 | 87 | 0.680261 |
f62c319423f7059b3954763cc50c06e29e559604 | 1,216 | py | Python | src/sentinel/azext_sentinel/vendored_sdks/security_insights/models/threat_intelligence_granular_marking_model.py | amirjalali65/azure-cli-extensions | dcc7607afafea1815d70bc5c765b7a0be07544a7 | [
"MIT"
] | null | null | null | src/sentinel/azext_sentinel/vendored_sdks/security_insights/models/threat_intelligence_granular_marking_model.py | amirjalali65/azure-cli-extensions | dcc7607afafea1815d70bc5c765b7a0be07544a7 | [
"MIT"
] | null | null | null | src/sentinel/azext_sentinel/vendored_sdks/security_insights/models/threat_intelligence_granular_marking_model.py | amirjalali65/azure-cli-extensions | dcc7607afafea1815d70bc5c765b7a0be07544a7 | [
"MIT"
] | 1 | 2021-02-17T21:35:31.000Z | 2021-02-17T21:35:31.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | 36.848485 | 78 | 0.594572 |
32e53ade38cd702048bd27231f320e1f06c12440 | 8,475 | py | Python | src/prefect/utilities/tasks.py | LuisMuniz/prefect | bda761ff20273f5bb9013ee4a418fa595bf7fc39 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/prefect/utilities/tasks.py | LuisMuniz/prefect | bda761ff20273f5bb9013ee4a418fa595bf7fc39 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/prefect/utilities/tasks.py | LuisMuniz/prefect | bda761ff20273f5bb9013ee4a418fa595bf7fc39 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from contextlib import contextmanager
from datetime import timedelta
from functools import wraps
from typing import TYPE_CHECKING, Any, Callable, Iterator, Optional
import pendulum
from toolz import curry
import prefect
__all__ = ["tags", "as_task", "pause_task", "task", "unmapped", "defaults_from_attrs"]
if TYPE_C... | 29.736842 | 95 | 0.615811 |
8bc8b2950ac11ffbe4e9fdee4ff4b91bfc6caaf0 | 8,907 | py | Python | src/datamgr/metadata/tests/meta_sync/test_single_sync.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 84 | 2021-06-30T06:20:23.000Z | 2022-03-22T03:05:49.000Z | src/datamgr/metadata/tests/meta_sync/test_single_sync.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 7 | 2021-06-30T06:21:16.000Z | 2022-03-29T07:36:13.000Z | src/datamgr/metadata/tests/meta_sync/test_single_sync.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 40 | 2021-06-30T06:21:26.000Z | 2022-03-29T12:42:26.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
---------------------------------------------... | 38.392241 | 120 | 0.717526 |
e4460492a9f7f5ba118fe64de9cfe5d0a2edacbd | 8,213 | py | Python | qubell/tests/provider/test_route_decorators.py | storgashov/contrib-python-qubell-client | 9409c051ee4f4a7bef696dccc01edf3137affdf4 | [
"Apache-2.0"
] | null | null | null | qubell/tests/provider/test_route_decorators.py | storgashov/contrib-python-qubell-client | 9409c051ee4f4a7bef696dccc01edf3137affdf4 | [
"Apache-2.0"
] | null | null | null | qubell/tests/provider/test_route_decorators.py | storgashov/contrib-python-qubell-client | 9409c051ee4f4a7bef696dccc01edf3137affdf4 | [
"Apache-2.0"
] | null | null | null | import unittest
from mock import patch
from qubell.api.private.exceptions import ApiUnauthorizedError, ApiAuthenticationError, ApiNotFoundError, ApiError
from qubell.api.provider import route, play_auth, basic_auth
from qubell.api.provider.router import Router
json_header = {'Content-Type': 'application/json'}
d... | 40.860697 | 124 | 0.671862 |
1c74622925459294813211f56ca383396239f9a9 | 1,342 | py | Python | tests/parser_factory_test.py | antmicro/raviewer | 7529664d37e994d4c2f4c450a5577b79d73c4bb0 | [
"Apache-2.0"
] | 12 | 2021-11-18T09:38:34.000Z | 2022-03-24T19:33:44.000Z | tests/parser_factory_test.py | antmicro/raviewer | 7529664d37e994d4c2f4c450a5577b79d73c4bb0 | [
"Apache-2.0"
] | 1 | 2022-02-14T12:07:02.000Z | 2022-03-21T19:29:11.000Z | tests/parser_factory_test.py | antmicro/raviewer | 7529664d37e994d4c2f4c450a5577b79d73c4bb0 | [
"Apache-2.0"
] | null | null | null | import unittest
import numpy
import os
from unittest.mock import (Mock, patch)
from raviewer.parser.factory import ParserFactory
from raviewer.parser.common import AbstractParser
from raviewer.image.color_format import (PixelFormat, PixelPlane)
from enum import Enum
class TestParserFactoryClass(unittest.TestCase):
... | 33.55 | 77 | 0.733979 |
a7562a7e574b395cbe8dac4622c6b1f6a014d661 | 492 | py | Python | data/scripts/templates/object/draft_schematic/bio_engineer/bio_component/shared_bio_component_clothing_field_defense.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/draft_schematic/bio_engineer/bio_component/shared_bio_component_clothing_field_defense.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/draft_schematic/bio_engineer/bio_component/shared_bio_component_clothing_field_defense.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/bio_engineer/bio_component/shared_bio_component_clothing_fi... | 28.941176 | 118 | 0.75 |
086c114f9d4c7c42b0eef6e223f8a99b73b30eaa | 8,757 | py | Python | fastai/vision/models/gan.py | shafiul/fastai | 08d6de8a9a89a77569bfbccca278fc5522772100 | [
"Apache-2.0"
] | 1 | 2020-04-22T14:05:45.000Z | 2020-04-22T14:05:45.000Z | fastai/vision/models/gan.py | shafiul/fastai | 08d6de8a9a89a77569bfbccca278fc5522772100 | [
"Apache-2.0"
] | 2 | 2021-05-20T20:04:51.000Z | 2022-02-26T09:14:00.000Z | fastai/vision/models/gan.py | shafiul/fastai | 08d6de8a9a89a77569bfbccca278fc5522772100 | [
"Apache-2.0"
] | 1 | 2019-04-05T06:26:16.000Z | 2019-04-05T06:26:16.000Z | from ...torch_core import *
from ...layers import *
__all__ = ['basic_critic', 'basic_generator', 'GAN', 'CycleGAN', 'CycleGanLoss', 'AdaptiveLoss']
def AvgFlatten():
"Takes the average of the input."
return Lambda(lambda x: x.mean(0).view(1))
def basic_critic(in_size:int, n_channels:int, n_features:int=64, ... | 53.396341 | 125 | 0.679228 |
77008634e483373ffbf96e83a1408bb22b32d8a0 | 2,980 | py | Python | src/configurator.py | atareao/habits | 12084d303f64409fb35fadfca6d9b7163ee27697 | [
"MIT"
] | 23 | 2019-12-27T08:25:34.000Z | 2022-02-02T15:37:50.000Z | src/configurator.py | atareao/habits | 12084d303f64409fb35fadfca6d9b7163ee27697 | [
"MIT"
] | 2 | 2020-02-10T19:01:19.000Z | 2021-09-13T14:19:09.000Z | src/configurator.py | atareao/habits | 12084d303f64409fb35fadfca6d9b7163ee27697 | [
"MIT"
] | 7 | 2020-01-09T08:19:24.000Z | 2020-05-08T19:42:45.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is part of habits
#
# Copyright (c) 2019 Lorenzo Carbonell Cerezo <a.k.a. atareao>
#
# 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 Softwa... | 30.721649 | 79 | 0.628859 |
802b8d73d0307d27e1fd9fbe18e233af789aea35 | 1,969 | py | Python | kf_pom/kf_pom/custom_script/address/address.py | Neha0037/KF_PMS | ec760242fb3e99e25c13dd3b5d9de82d272af9cc | [
"MIT"
] | null | null | null | kf_pom/kf_pom/custom_script/address/address.py | Neha0037/KF_PMS | ec760242fb3e99e25c13dd3b5d9de82d272af9cc | [
"MIT"
] | null | null | null | kf_pom/kf_pom/custom_script/address/address.py | Neha0037/KF_PMS | ec760242fb3e99e25c13dd3b5d9de82d272af9cc | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from frappe.model.document import Document
import frappe
import json
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def user_query(doctype,txt,searchfield, start, page_len, filters):
return frappe.db.sql("""
select name from `tabUser`
where
name in (Se... | 28.128571 | 66 | 0.631285 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.