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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ce6c850b3c6bae5c57c3673251b1a4ff0dc96d09 | 6,880 | py | Python | PythonCode/BoxDrawing.py | sirmurphalot/VisualDisturbances | a32ffc607cb888100b6f9382d1cf41933d265a56 | [
"Apache-2.0"
] | null | null | null | PythonCode/BoxDrawing.py | sirmurphalot/VisualDisturbances | a32ffc607cb888100b6f9382d1cf41933d265a56 | [
"Apache-2.0"
] | null | null | null | PythonCode/BoxDrawing.py | sirmurphalot/VisualDisturbances | a32ffc607cb888100b6f9382d1cf41933d265a56 | [
"Apache-2.0"
] | null | null | null | """
Drawing the aggregate box and points between clips for each film.
Author: Alexander Murph
2/14/2018
"""
##########################################################################################################
########################################################################################... | 31.851852 | 106 | 0.6125 |
903b73a1feff7174c18e76664e86ccffcca2773f | 2,669 | py | Python | test-suite/generated-src/python/dh__list_map_string_int64_t.py | trafi/trafi-djinni | 47cd2c849782e2ab4b38e5dc6a5a3104cc87f673 | [
"Apache-2.0"
] | 3 | 2020-12-15T06:44:50.000Z | 2022-01-24T13:27:31.000Z | test-suite/generated-src/python/dh__list_map_string_int64_t.py | trafi/trafi-djinni | 47cd2c849782e2ab4b38e5dc6a5a3104cc87f673 | [
"Apache-2.0"
] | null | null | null | test-suite/generated-src/python/dh__list_map_string_int64_t.py | trafi/trafi-djinni | 47cd2c849782e2ab4b38e5dc6a5a3104cc87f673 | [
"Apache-2.0"
] | 2 | 2020-12-01T18:39:26.000Z | 2021-02-04T03:55:31.000Z | # AUTOGENERATED FILE - DO NOT MODIFY!
# This file generated by Djinni from map.djinni
from djinni.support import MultiSet # default imported in all files
from djinni.exception import CPyException # default imported in all files
from djinni.pycffi_marshal import CPyObject, CPyObject, CPyObjectProxy, CPyPrimitive, CPySt... | 43.754098 | 132 | 0.766579 |
d526dace33831c195f9fa6e9645d2c3d3ee64615 | 1,956 | py | Python | model-optimizer/extensions/front/caffe/correlation_ext_test.py | JOCh1958/openvino | 070201feeec5550b7cf8ec5a0ffd72dc879750be | [
"Apache-2.0"
] | 1 | 2021-04-06T03:32:12.000Z | 2021-04-06T03:32:12.000Z | model-optimizer/extensions/front/caffe/correlation_ext_test.py | JOCh1958/openvino | 070201feeec5550b7cf8ec5a0ffd72dc879750be | [
"Apache-2.0"
] | 28 | 2021-09-24T09:29:02.000Z | 2022-03-28T13:20:46.000Z | model-optimizer/extensions/front/caffe/correlation_ext_test.py | JOCh1958/openvino | 070201feeec5550b7cf8ec5a0ffd72dc879750be | [
"Apache-2.0"
] | 1 | 2020-08-30T11:48:03.000Z | 2020-08-30T11:48:03.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
from unittest.mock import patch
from extensions.front.caffe.correlation_ext import CorrelationFrontExtractor
from extensions.ops.correlation import CorrelationOp
from mo.ops.op import Op
from mo.utils.unittest.extractors... | 30.092308 | 82 | 0.629346 |
c74684c93d65269c96058e8403d0f1ace1d3f735 | 4,710 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_operations.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | 1 | 2021-09-07T18:35:07.000Z | 2021-09-07T18:35:07.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_operations.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_operations.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | null | null | null | # 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 ... | 42.818182 | 133 | 0.655202 |
ec9ee088c990aee214817587fbdd26bd42f1fd59 | 909 | py | Python | config/m600/avionics_sensor.py | leozz37/makani | c94d5c2b600b98002f932e80a313a06b9285cc1b | [
"Apache-2.0"
] | 1,178 | 2020-09-10T17:15:42.000Z | 2022-03-31T14:59:35.000Z | config/m600/avionics_sensor.py | leozz37/makani | c94d5c2b600b98002f932e80a313a06b9285cc1b | [
"Apache-2.0"
] | 1 | 2020-05-22T05:22:35.000Z | 2020-05-22T05:22:35.000Z | config/m600/avionics_sensor.py | leozz37/makani | c94d5c2b600b98002f932e80a313a06b9285cc1b | [
"Apache-2.0"
] | 107 | 2020-09-10T17:29:30.000Z | 2022-03-18T09:00:14.000Z | # Copyright 2020 Makani Technologies LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 34.961538 | 79 | 0.712871 |
0c08d4dc18d66f3f6aa58df64e4a34fb3f877e62 | 2,822 | py | Python | gifmaker/random_32nodes.py | SPE-MD/SPMD-Simulations | e5d592262ff290e07ffb1664acbfa7eab86b0b55 | [
"MIT"
] | 3 | 2021-03-27T04:15:40.000Z | 2022-03-21T11:16:36.000Z | gifmaker/random_32nodes.py | SPE-MD/SPMD-Simulations | e5d592262ff290e07ffb1664acbfa7eab86b0b55 | [
"MIT"
] | null | null | null | gifmaker/random_32nodes.py | SPE-MD/SPMD-Simulations | e5d592262ff290e07ffb1664acbfa7eab86b0b55 | [
"MIT"
] | 1 | 2021-03-22T16:00:14.000Z | 2021-03-22T16:00:14.000Z | #! /usr/bin/env python3
import sys
import string
import struct
import math
import re
import numpy as np
import argparse
from os.path import dirname
import os.path
sys.path.append(dirname(__file__)) #adds this file's director to the path
import imageio
import subprocess
import shutil
#make the gif file name correspon... | 23.714286 | 74 | 0.57158 |
d7907451aa742dce70891c14049e1ae264c028ce | 616 | py | Python | convnet/validate.py | Prayogkarki/prog-eval | 461302a9776c4a5f051469c48d1b4228b604ba4d | [
"MIT"
] | 4 | 2019-07-16T13:41:59.000Z | 2021-04-09T03:51:26.000Z | convnet/validate.py | Prayogkarki/prog-eval | 461302a9776c4a5f051469c48d1b4228b604ba4d | [
"MIT"
] | 4 | 2019-07-09T20:28:48.000Z | 2019-09-03T16:32:33.000Z | convnet/validate.py | Prayogkarki/prog-eval | 461302a9776c4a5f051469c48d1b4228b604ba4d | [
"MIT"
] | 12 | 2019-07-03T19:12:35.000Z | 2020-03-25T18:12:15.000Z | #!/usr/bin/env python
"""
convnet/validate.py
"""
import sys
import json
import numpy as np
ACC_THRESHOLD = 0.95
if __name__ == '__main__':
y_test = np.load('data/cifar2/y_test.npy')
y_pred = np.array([int(xx) for xx in open('results/preds').read().splitlines()])
test_acc = (y_test == y_pred).m... | 21.241379 | 84 | 0.594156 |
858b5fcc5b3e990e8cdea19386bb68377c8019ca | 57 | py | Python | django15_project/my_django15_project/invokerHTMLDOM.py | ijhajj/Django-RestApi-Celery-RabbitMQ-Redis | 4b6fb7f8dd26ccafe4a00fc64b687c7450504a8f | [
"MIT"
] | null | null | null | django15_project/my_django15_project/invokerHTMLDOM.py | ijhajj/Django-RestApi-Celery-RabbitMQ-Redis | 4b6fb7f8dd26ccafe4a00fc64b687c7450504a8f | [
"MIT"
] | 4 | 2020-06-05T23:43:38.000Z | 2022-03-02T14:59:34.000Z | django15_project/my_django15_project/invokerHTMLDOM.py | ijhajj/Django-RestApi-Celery-RabbitMQ-Redis | 4b6fb7f8dd26ccafe4a00fc64b687c7450504a8f | [
"MIT"
] | 1 | 2021-02-10T14:57:52.000Z | 2021-02-10T14:57:52.000Z | from tasks import data_extractor
data_extractor.delay()
| 14.25 | 32 | 0.842105 |
517edbe1b1af68e808c495f3b12b1cedc5060b1f | 683 | py | Python | publiapp_api/migrations/0015_auto_20201024_1703.py | KevinPercy/PubliAppAPI | 262fe66eaf2ac1d895681b0e611f6d7633e2353e | [
"MIT"
] | null | null | null | publiapp_api/migrations/0015_auto_20201024_1703.py | KevinPercy/PubliAppAPI | 262fe66eaf2ac1d895681b0e611f6d7633e2353e | [
"MIT"
] | 6 | 2020-06-30T02:38:05.000Z | 2021-09-22T19:21:35.000Z | publiapp_api/migrations/0015_auto_20201024_1703.py | KevinPercy/PubliAppAPI | 262fe66eaf2ac1d895681b0e611f6d7633e2353e | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-10-24 17:03
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('publiapp_api', '0014_auto_20201004_1752'),
]
operations = [
migrations.RemoveField(
model_name=... | 27.32 | 147 | 0.635432 |
f80a7991b7fb1c3ef1e9249a42766494dacff883 | 2,667 | py | Python | server/auvsi_suas/models/gps_position_test.py | dcat52/interop | b016b2c25e468e21649bdb7475d828198b5e6958 | [
"Apache-2.0"
] | null | null | null | server/auvsi_suas/models/gps_position_test.py | dcat52/interop | b016b2c25e468e21649bdb7475d828198b5e6958 | [
"Apache-2.0"
] | null | null | null | server/auvsi_suas/models/gps_position_test.py | dcat52/interop | b016b2c25e468e21649bdb7475d828198b5e6958 | [
"Apache-2.0"
] | null | null | null | """Tests for the gps_position model."""
from auvsi_suas.models.gps_position import GpsPosition
from django.test import TestCase
class TestGpsPositionModel(TestCase):
"""Tests the GpsPosition model."""
def test_unicode(self):
"""Tests the unicode method executes."""
pos = GpsPosition(latitude... | 38.1 | 77 | 0.587552 |
38eab051222f714e07f185ea7d42f0e14b87e4c8 | 1,082 | py | Python | utils/s3dis_utils/collect_indoor3d_data.py | LaureenK/JSNet_LK | ece95891f17224b59185cc2beeb0512f56248d1e | [
"MIT"
] | null | null | null | utils/s3dis_utils/collect_indoor3d_data.py | LaureenK/JSNet_LK | ece95891f17224b59185cc2beeb0512f56248d1e | [
"MIT"
] | null | null | null | utils/s3dis_utils/collect_indoor3d_data.py | LaureenK/JSNet_LK | ece95891f17224b59185cc2beeb0512f56248d1e | [
"MIT"
] | null | null | null | import os
import sys
FILE_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_DIR = os.path.dirname(os.path.dirname(FILE_DIR))
sys.path.append(BASE_DIR)
from utils import indoor3d_util
anno_paths = [line.rstrip() for line in open(os.path.join(BASE_DIR, 'meta/anno_paths.txt'))]
anno_paths = [os.path.join(indoor3d_... | 34.903226 | 104 | 0.713494 |
bf7587756b349716473f432e0ea66da521498693 | 66,527 | py | Python | electrumx/lib/coins.py | rootSig/electrumx-atom | c11b36cdf5acdb9129d7d4507a79cdd7d1408bcb | [
"MIT"
] | null | null | null | electrumx/lib/coins.py | rootSig/electrumx-atom | c11b36cdf5acdb9129d7d4507a79cdd7d1408bcb | [
"MIT"
] | null | null | null | electrumx/lib/coins.py | rootSig/electrumx-atom | c11b36cdf5acdb9129d7d4507a79cdd7d1408bcb | [
"MIT"
] | 1 | 2018-09-11T23:55:55.000Z | 2018-09-11T23:55:55.000Z | # Copyright (c) 2016-2017, Neil Booth
# Copyright (c) 2017, the ElectrumX authors
#
# All rights reserved.
#
# The MIT License (MIT)
#
# 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 ... | 31.043864 | 79 | 0.652742 |
e051083f0d3ca23207055b9c6147a664e2256190 | 5,956 | py | Python | asyncqt/_windows.py | razaqq/PotatoAlertpy | 0ae472e73109f85bea01ca1b45b8f2f1cfd64e63 | [
"MIT"
] | null | null | null | asyncqt/_windows.py | razaqq/PotatoAlertpy | 0ae472e73109f85bea01ca1b45b8f2f1cfd64e63 | [
"MIT"
] | null | null | null | asyncqt/_windows.py | razaqq/PotatoAlertpy | 0ae472e73109f85bea01ca1b45b8f2f1cfd64e63 | [
"MIT"
] | null | null | null | # © 2018 Gerard Marull-Paretas <gerard@teslabs.com>
# © 2014 Mark Harviston <mark.harviston@gmail.com>
# © 2014 Arve Knudsen <arve.knudsen@gmail.com>
# BSD License
"""Windows specific Quamash functionality."""
import asyncio
import sys
try:
import _winapi
from asyncio import windows_events
import _overla... | 32.194595 | 94 | 0.608294 |
8a5fffaa1545e3cb9cf7f05b8bf32022ecedfce5 | 12,700 | py | Python | perfkitbenchmarker/linux_benchmarks/multichase_benchmark.py | parsa-epfl/PerfKitBenchmarker | 7a7981100ebf68d6a24a8a347464800f40c47aa5 | [
"Apache-2.0"
] | 1 | 2016-12-07T19:49:58.000Z | 2016-12-07T19:49:58.000Z | perfkitbenchmarker/linux_benchmarks/multichase_benchmark.py | parsa-epfl/PerfKitBenchmarker | 7a7981100ebf68d6a24a8a347464800f40c47aa5 | [
"Apache-2.0"
] | null | null | null | perfkitbenchmarker/linux_benchmarks/multichase_benchmark.py | parsa-epfl/PerfKitBenchmarker | 7a7981100ebf68d6a24a8a347464800f40c47aa5 | [
"Apache-2.0"
] | 1 | 2021-12-07T13:29:48.000Z | 2021-12-07T13:29:48.000Z | # Copyright 2016 PerfKitBenchmarker 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 appli... | 39.197531 | 80 | 0.729134 |
23e3a60f63c2b3a239446868840ede320a8c1440 | 10,600 | py | Python | pex/util.py | maguro/pex | b9217232a913e8d32fb78e8c1625f7b56e05f613 | [
"Apache-2.0"
] | null | null | null | pex/util.py | maguro/pex | b9217232a913e8d32fb78e8c1625f7b56e05f613 | [
"Apache-2.0"
] | null | null | null | pex/util.py | maguro/pex | b9217232a913e8d32fb78e8c1625f7b56e05f613 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import
import contextlib
import os
import sys
import tempfile
from hashlib import sha1
from site import makepath # type: ignore[attr-defined]
from pex.co... | 43.089431 | 104 | 0.613868 |
7b1e569200abb9fb67afb43860516b2b61009c30 | 1,498 | py | Python | CCU/air/code.py | andrew-jolley/leventhorpe-cansat | 5410bd73d114667ccdebf3ec93be3b2f04f91e5b | [
"MIT"
] | null | null | null | CCU/air/code.py | andrew-jolley/leventhorpe-cansat | 5410bd73d114667ccdebf3ec93be3b2f04f91e5b | [
"MIT"
] | null | null | null | CCU/air/code.py | andrew-jolley/leventhorpe-cansat | 5410bd73d114667ccdebf3ec93be3b2f04f91e5b | [
"MIT"
] | null | null | null | # importing other information
import digitalio
import board
import time
#import bmp280
import radio
import carbon
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
led.value = True
packet_count = 0
while True:
led.value = not led.value
print("Radio message sent")
new_ca... | 31.87234 | 245 | 0.686248 |
3e684a39e0854e31aa30394b2315832d4f05e2d5 | 2,740 | py | Python | dateparser/data/date_translation_data/ff.py | bsekiewicz/dateparser | babc677372376d933de5542010af3097c26e49e9 | [
"BSD-3-Clause"
] | 1,804 | 2015-01-01T23:01:54.000Z | 2022-03-30T18:36:16.000Z | dateparser/data/date_translation_data/ff.py | bsekiewicz/dateparser | babc677372376d933de5542010af3097c26e49e9 | [
"BSD-3-Clause"
] | 948 | 2015-01-04T22:18:39.000Z | 2022-03-31T16:29:41.000Z | dateparser/data/date_translation_data/ff.py | bsekiewicz/dateparser | babc677372376d933de5542010af3097c26e49e9 | [
"BSD-3-Clause"
] | 463 | 2015-01-10T08:53:39.000Z | 2022-03-18T12:45:49.000Z | info = {
"name": "ff",
"date_order": "DMY",
"january": [
"sii",
"siilo"
],
"february": [
"col",
"colte"
],
"march": [
"mbo",
"mbooy"
],
"april": [
"see",
"seeɗto"
],
"may": [
"duu",
"duujal"
]... | 15.222222 | 27 | 0.260219 |
28ee0fb47b9ca9d59962b829d8e3a018a11b2500 | 859 | py | Python | tests/test_ptz.py | delin/zm-py | 3b209185991e8ae7dfe3dde8c2f8462f134afb9f | [
"Apache-2.0"
] | 10 | 2018-09-27T06:33:56.000Z | 2021-07-10T09:49:57.000Z | tests/test_ptz.py | delin/zm-py | 3b209185991e8ae7dfe3dde8c2f8462f134afb9f | [
"Apache-2.0"
] | 21 | 2018-09-15T18:59:05.000Z | 2021-11-29T23:53:52.000Z | tests/test_ptz.py | delin/zm-py | 3b209185991e8ae7dfe3dde8c2f8462f134afb9f | [
"Apache-2.0"
] | 11 | 2019-01-26T23:08:00.000Z | 2021-11-26T04:40:16.000Z | """Tests to verify ControlType."""
from pytest import mark, raises
from zoneminder.monitor import ControlType
from zoneminder.exceptions import ControlTypeError
@mark.parametrize(
"source,want",
[
("right", ControlType.RIGHT),
("LEFT", ControlType.LEFT),
("UP_LEFT", ControlType.UP_LE... | 25.264706 | 62 | 0.678696 |
828c63715d6a138157178598a5879f2e7874fba2 | 1,102 | py | Python | geodj/genre_parser.py | teopeurt/GeoDJ | 2bc7da9f10ea17ed22565fb9cad197601cce950d | [
"MIT"
] | 1 | 2018-07-23T16:57:36.000Z | 2018-07-23T16:57:36.000Z | geodj/genre_parser.py | teopeurt/GeoDJ | 2bc7da9f10ea17ed22565fb9cad197601cce950d | [
"MIT"
] | null | null | null | geodj/genre_parser.py | teopeurt/GeoDJ | 2bc7da9f10ea17ed22565fb9cad197601cce950d | [
"MIT"
] | null | null | null | import re
from django.utils.encoding import smart_str
class GenreParser:
@staticmethod
def parse(genre):
genre = smart_str(genre).lower()
if re.search(r"\b(jazz|blues)\b", genre):
return "jazz"
if re.search(r"\b(ska|reggae|ragga|dub)\b", genre):
return "ska"
... | 39.357143 | 151 | 0.588022 |
3d7c1c2950009fc1a152d2059faaa2389e7ac3e7 | 19,373 | py | Python | concil/image.py | ruema/concil | da6b0aa8297addbf003f3670050256a5ee7e3c70 | [
"MIT"
] | 3 | 2020-11-09T06:53:26.000Z | 2022-02-23T22:07:15.000Z | concil/image.py | ruema/concil | da6b0aa8297addbf003f3670050256a5ee7e3c70 | [
"MIT"
] | null | null | null | concil/image.py | ruema/concil | da6b0aa8297addbf003f3670050256a5ee7e3c70 | [
"MIT"
] | null | null | null | import os
import json
import tempfile
import base64
import gzip
import subprocess
import shutil
import io
from hashlib import sha256, sha512
from pathlib import Path
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
from cryptography.ha... | 37.911937 | 114 | 0.599288 |
b0c0a2ed76ea1d7c31d6387f912d7c42e56ac0f4 | 1,858 | py | Python | dev/python/2018-09-01 stim class redesign.py | konung-yaropolk/pyABF | b5620e73ac5d060129b844da44f8b2611536ac56 | [
"MIT"
] | 74 | 2017-11-06T17:53:48.000Z | 2022-03-27T12:14:46.000Z | dev/python/2018-09-01 stim class redesign.py | konung-yaropolk/pyABF | b5620e73ac5d060129b844da44f8b2611536ac56 | [
"MIT"
] | 116 | 2018-01-16T21:36:29.000Z | 2022-03-31T11:46:04.000Z | dev/python/2018-09-01 stim class redesign.py | konung-yaropolk/pyABF | b5620e73ac5d060129b844da44f8b2611536ac56 | [
"MIT"
] | 30 | 2018-06-28T13:19:53.000Z | 2022-03-25T02:52:48.000Z | """
see if a simpler stimulus class can be designed
"""
import os
import sys
PATH_HERE = os.path.abspath(os.path.dirname(__file__))
PATH_DATA = os.path.abspath(PATH_HERE+"../../../data/abfs/")
PATH_SRC = os.path.abspath(PATH_HERE+"../../../src/")
sys.path.insert(0, PATH_SRC)
import pyabf
import glob
import numpy as np... | 26.927536 | 71 | 0.614639 |
d8549f9b91e11b983fae2416aa0c3afbd2946ff4 | 309 | py | Python | Simple Django Project/comment8or/admin.py | petrenkonikita112263/Python_Professional_Portfolio_Projects | 60180daf163067851886ee49aea810bc09bd8bee | [
"MIT"
] | 1 | 2021-09-13T00:54:29.000Z | 2021-09-13T00:54:29.000Z | Simple Django Project/comment8or/admin.py | petrenkonikita112263/Python_Professional_Portfolio_Projects | 60180daf163067851886ee49aea810bc09bd8bee | [
"MIT"
] | null | null | null | Simple Django Project/comment8or/admin.py | petrenkonikita112263/Python_Professional_Portfolio_Projects | 60180daf163067851886ee49aea810bc09bd8bee | [
"MIT"
] | null | null | null | from django.contrib import admin
class Comment8orAdminSite(admin.AdminSite):
"""Custom admin site for Comment8or application."""
title_header = "c8 site admin"
site_header = "Comment8or administration"
index_title = "Comment8or site admin"
logout_template = "comment8or/logged_out.html"
| 30.9 | 55 | 0.750809 |
82e6597da25277e90edc5910bfae026c4afc9d25 | 4,819 | py | Python | SHM prototype/inputTime.py | acharaakshit/Structural-Health-Monitoring | 51c0dc935eb7c361252f7416a860bd7be73361c4 | [
"MIT"
] | 1 | 2019-05-26T06:31:59.000Z | 2019-05-26T06:31:59.000Z | SHM prototype/inputTime.py | acharaakshit/Structural-Health-Monitoring | 51c0dc935eb7c361252f7416a860bd7be73361c4 | [
"MIT"
] | null | null | null | SHM prototype/inputTime.py | acharaakshit/Structural-Health-Monitoring | 51c0dc935eb7c361252f7416a860bd7be73361c4 | [
"MIT"
] | 1 | 2018-11-12T10:59:38.000Z | 2018-11-12T10:59:38.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'inputTime.ui'
#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
import FFT_inputTime
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
... | 45.037383 | 135 | 0.687902 |
ceade3e4f8b87656052ab2924cccc6407c414d11 | 1,519 | py | Python | tests/bugs/core_3737_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2022-02-05T11:37:13.000Z | 2022-02-05T11:37:13.000Z | tests/bugs/core_3737_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-09-03T11:47:00.000Z | 2021-09-03T12:42:10.000Z | tests/bugs/core_3737_test.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-06-30T14:14:16.000Z | 2021-06-30T14:14:16.000Z | #coding:utf-8
#
# id: bugs.core_3737
# title: EXECUTE BLOCK parameters definitions are not respected and may cause wrong behavior related to character sets
# decription:
# tracker_id: CORE-3737
# min_versions: ['3.0']
# versions: 3.0
# qmid: None
import pytest
from firebird.qa import ... | 23.369231 | 125 | 0.637261 |
f105573b3c94ac7e6c0561f0b4de0d08a012b50b | 7,950 | py | Python | ipython_histories/avagraph3.py | teolisitza/turtleart | 925423ccaebede0a347a7182ae0aa61fe686ccc3 | [
"Apache-2.0"
] | null | null | null | ipython_histories/avagraph3.py | teolisitza/turtleart | 925423ccaebede0a347a7182ae0aa61fe686ccc3 | [
"Apache-2.0"
] | 1 | 2017-02-06T22:02:28.000Z | 2017-02-06T22:02:28.000Z | ipython_histories/avagraph3.py | teolisitza/turtleart | 925423ccaebede0a347a7182ae0aa61fe686ccc3 | [
"Apache-2.0"
] | null | null | null | Last login: Mon Mar 30 19:49:46 on ttys000
MBPro ~> cd kids_sessions/
MBPro kids_sessions> ls
ava.eps ava_3_3_15.out ava_graph2.out
ava2.eps ava_advanced.png avagraph.out
ava3.eps ava_graph.eps avagraph2.out
ava4.eps ava_graph.png cohen_crazy_square.out
MBPro kids_sessio... | 28.804348 | 102 | 0.617862 |
a05be0718b137f679f40f707035c2dd4721ab58d | 123 | py | Python | declare_qtquick/widgets/api/qt/labs/platform/__init__.py | likianta/declare-qtquick | 93c2ce49d841ccdeb0272085c5f731139927f0d7 | [
"MIT"
] | 3 | 2021-11-02T03:45:27.000Z | 2022-03-27T05:33:36.000Z | declare_qtquick/widgets/api/qt/labs/platform/__init__.py | likianta/declare-qtquick | 93c2ce49d841ccdeb0272085c5f731139927f0d7 | [
"MIT"
] | null | null | null | declare_qtquick/widgets/api/qt/labs/platform/__init__.py | likianta/declare-qtquick | 93c2ce49d841ccdeb0272085c5f731139927f0d7 | [
"MIT"
] | null | null | null | from __declare_qtquick_internals__ import qml_imports
qml_imports.add("Qt.labs.platform")
from .__list__ import * # noqa
| 24.6 | 53 | 0.813008 |
3ec0cec4e93bbe623670435f5018ff132cd707b3 | 765 | py | Python | cdi/shop/migrations/0005_auto_20210505_2317.py | fouadsan/cdi_web | e443370a65cac6ce729d353e574afa2b74856192 | [
"MIT"
] | null | null | null | cdi/shop/migrations/0005_auto_20210505_2317.py | fouadsan/cdi_web | e443370a65cac6ce729d353e574afa2b74856192 | [
"MIT"
] | null | null | null | cdi/shop/migrations/0005_auto_20210505_2317.py | fouadsan/cdi_web | e443370a65cac6ce729d353e574afa2b74856192 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-05-05 22:17
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('shop', '0004_auto_20210505_2317'),
]
operations = [
migrations.AlterField(
model_name='product',
... | 30.6 | 149 | 0.639216 |
643332bd26fb3bf9777348daad0990b6d4a57eaf | 1,505 | py | Python | recipe_scrapers/tastykitchen.py | B-Evans99/recipe-scrapers | 9c96e91691fe0519967d4d0519be5443b81c30fe | [
"MIT"
] | null | null | null | recipe_scrapers/tastykitchen.py | B-Evans99/recipe-scrapers | 9c96e91691fe0519967d4d0519be5443b81c30fe | [
"MIT"
] | null | null | null | recipe_scrapers/tastykitchen.py | B-Evans99/recipe-scrapers | 9c96e91691fe0519967d4d0519be5443b81c30fe | [
"MIT"
] | null | null | null | from ._abstract import AbstractScraper
from ._utils import get_minutes, normalize_string, get_yields
class TastyKitchen(AbstractScraper):
@classmethod
def host(self):
return 'tastykitchen.com'
def title(self):
return self.soup.find(
'h1',
{'itemprop': 'name'}
... | 23.515625 | 61 | 0.499668 |
01fe6652347a98ac34b317802ec25d9a9ce70bba | 7,147 | py | Python | src/encoded/tests/test_types_biosample.py | KCL-ORG/encoded | 5a1904e948bfd652e8a8d52c6717d7fc0b56b681 | [
"MIT"
] | null | null | null | src/encoded/tests/test_types_biosample.py | KCL-ORG/encoded | 5a1904e948bfd652e8a8d52c6717d7fc0b56b681 | [
"MIT"
] | null | null | null | src/encoded/tests/test_types_biosample.py | KCL-ORG/encoded | 5a1904e948bfd652e8a8d52c6717d7fc0b56b681 | [
"MIT"
] | null | null | null | import pytest
@pytest.fixture
def human_donor(testapp, award, lab, human):
item = {
'award': award['@id'],
'lab': lab['@id'],
'organism': human['@id'],
}
return testapp.post_json('/human_donor', item).json['@graph'][0]
@pytest.fixture
def mouse_donor(testapp, award, lab, mouse):
... | 43.054217 | 111 | 0.614104 |
d5c9d13433880f81b26c0e41ac0b5a984698c5b8 | 2,393 | py | Python | dev/profiles/models.py | saurabhrautela/django_boilerplate | a5f6e1d2d444b8a7b0db9eca228a633ce529f5fb | [
"MIT"
] | null | null | null | dev/profiles/models.py | saurabhrautela/django_boilerplate | a5f6e1d2d444b8a7b0db9eca228a633ce529f5fb | [
"MIT"
] | 3 | 2019-12-04T22:30:37.000Z | 2021-04-08T18:49:32.000Z | dev/profiles/models.py | saurabhrautela/django_sample | a5f6e1d2d444b8a7b0db9eca228a633ce529f5fb | [
"MIT"
] | null | null | null | from django.db import models
# `AbstractBaseUser` and `PermissionMixin` are base classes used for customizing the Django User Model
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
# `BaseUserManager` is extended by custom user manager to customize how user... | 36.257576 | 105 | 0.700376 |
94cd9d564d8d8a3355af8699a25007f149ce3ead | 2,353 | py | Python | signal_transformation/voice/lrtr.py | Ilyushin/signal-transformation | 3e67fd0d8c005243bbe9d325303117b4e3dab505 | [
"MIT"
] | 1 | 2019-08-12T12:56:51.000Z | 2019-08-12T12:56:51.000Z | signal_transformation/voice/lrtr.py | Ilyushin/signal-transformation | 3e67fd0d8c005243bbe9d325303117b4e3dab505 | [
"MIT"
] | 5 | 2019-08-12T09:56:02.000Z | 2020-02-28T09:21:49.000Z | signal_transformation/voice/lrtr.py | Ilyushin/signal-transformation | 3e67fd0d8c005243bbe9d325303117b4e3dab505 | [
"MIT"
] | null | null | null | '''
Transformation of a signal which based on Librosa
'''
import librosa
def wav_to_pcm(wav_file, sample_rate=16000, trimmed=False):
'''
Transform a waf file to PCM
:param wav_file: Path to a wav file
:param sample_rate:
:param trimmed:
:return: PCM
'''
pcm, sr = librosa.core.load(
... | 18.975806 | 77 | 0.59881 |
ba1277d4b45b04d5d47d1e994a13895ab03329cf | 1,124 | py | Python | app.py | KiwiXR/WhoMovedMyGPU | efd438ea8d5c53d0d23eda7e0f26505d929a9f0b | [
"MIT"
] | 1 | 2021-11-15T14:20:05.000Z | 2021-11-15T14:20:05.000Z | app.py | KiwiXR/WhoMovedMyGPU | efd438ea8d5c53d0d23eda7e0f26505d929a9f0b | [
"MIT"
] | null | null | null | app.py | KiwiXR/WhoMovedMyGPU | efd438ea8d5c53d0d23eda7e0f26505d929a9f0b | [
"MIT"
] | null | null | null | import threading
from flask import Flask, render_template
import ssh
from gevent import pywsgi
app = Flask(__name__)
host_info = {}
cfg_dict = {}
@app.before_first_request
def start_ssh():
global cfg_dict, host_info
ssh_pool, cfg_dict = ssh.init()
for (ssh_id, (host, ssh_cfg)) in enumerate(ssh_pool.ite... | 23.914894 | 113 | 0.658363 |
6bbf08cea0b4b30c730af8e4338936ae7bbc046d | 695 | py | Python | baselines/DMCNN_BiLSTM_(CRF)/model/layers/embedding.py | fliingelephant/MAVEN-dataset | 72a431cc579b13958ec93dfe21a7c5f89133ae47 | [
"MIT"
] | 91 | 2020-10-06T06:51:52.000Z | 2022-03-26T11:05:24.000Z | baselines/DMCNN_BiLSTM_(CRF)/model/layers/embedding.py | xianhuaxizi/MAVEN-dataset | a80f6ece6552261edf7bf28a0befa655e5b8fb1d | [
"MIT"
] | 13 | 2020-10-24T02:08:40.000Z | 2022-02-17T15:13:34.000Z | baselines/DMCNN_BiLSTM_(CRF)/model/layers/embedding.py | xianhuaxizi/MAVEN-dataset | a80f6ece6552261edf7bf28a0befa655e5b8fb1d | [
"MIT"
] | 27 | 2020-12-20T20:48:14.000Z | 2022-03-07T02:37:53.000Z | import torch
import torch.nn as nn
import numpy as np
from utils.global_variables import Global
class Embedding(nn.Module):
def __init__(self, config):
super(Embedding, self).__init__()
if Global.word2vec_mat is None:
weight = None
self.vocab_size = config.getint("runtime", ... | 34.75 | 76 | 0.657554 |
a1ffe5fda893d931bb50fe6de7e7b3c8677f2d86 | 2,916 | py | Python | manimlib/mobject/shape_matchers.py | sunkisser/manim | 39673a80d7bbbea258c35ce5a1d37a0911aae4f1 | [
"MIT"
] | 1 | 2022-03-23T06:27:22.000Z | 2022-03-23T06:27:22.000Z | manimlib/mobject/shape_matchers.py | sunkisser/manim | 39673a80d7bbbea258c35ce5a1d37a0911aae4f1 | [
"MIT"
] | null | null | null | manimlib/mobject/shape_matchers.py | sunkisser/manim | 39673a80d7bbbea258c35ce5a1d37a0911aae4f1 | [
"MIT"
] | null | null | null | from __future__ import annotations
from manimlib.constants import *
from manimlib.mobject.geometry import Line
from manimlib.mobject.geometry import Rectangle
from manimlib.mobject.types.vectorized_mobject import VGroup
from manimlib.mobject.types.vectorized_mobject import VMobject
from manimlib.utils.color import Col... | 29.454545 | 77 | 0.648148 |
861ff46a450f9bcb522c72a98b2d404d6010ab89 | 16,079 | py | Python | log_mito/model_683.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_mito/model_683.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_mito/model_683.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', 'BaxA'])
M... | 87.863388 | 710 | 0.80347 |
91fc6bbf1c855d13b11b4ea9033a2fc5cce6f17d | 12,167 | py | Python | src/poliastro/earth/atmosphere/coesa62.py | tomaszmrugalski/poliastro | 463cade72eb26e4db09ef613fc5d7cc972581617 | [
"MIT"
] | null | null | null | src/poliastro/earth/atmosphere/coesa62.py | tomaszmrugalski/poliastro | 463cade72eb26e4db09ef613fc5d7cc972581617 | [
"MIT"
] | 1 | 2020-10-05T08:24:31.000Z | 2020-10-05T08:24:31.000Z | src/poliastro/earth/atmosphere/coesa62.py | tomaszmrugalski/poliastro | 463cade72eb26e4db09ef613fc5d7cc972581617 | [
"MIT"
] | null | null | null | """ The U.S. Standard Atmosphere 1966 depicts idealized middle-latitude
year-round mean conditions for the range of solar activity that occurs between
sunspot minimum and sunspot maximum.
+--------+---------+---------+-----------+---------------+---------------+
| Z (km) | H (km) | T (K) | p (mbar) | rho (kg / m3)... | 36.758308 | 87 | 0.449577 |
79587dec57730be24ebf60f67a20c57c2b0d57f5 | 1,716 | py | Python | tests/test_cryptocurrencychart.py | gdoermann/cryptocurrencychart | 713dae89304c86599f4a14a6dbd40f2e21c77048 | [
"MIT"
] | 1 | 2021-04-16T19:25:46.000Z | 2021-04-16T19:25:46.000Z | tests/test_cryptocurrencychart.py | gdoermann/cryptocurrencychart | 713dae89304c86599f4a14a6dbd40f2e21c77048 | [
"MIT"
] | null | null | null | tests/test_cryptocurrencychart.py | gdoermann/cryptocurrencychart | 713dae89304c86599f4a14a6dbd40f2e21c77048 | [
"MIT"
] | 1 | 2020-11-12T12:14:22.000Z | 2020-11-12T12:14:22.000Z | import datetime
import unittest
from cryptocurrencychart.api import CryptoCurrencyChartApi
class TestApi(unittest.TestCase):
def setUp(self) -> None:
self.reset()
def reset(self):
self.api = CryptoCurrencyChartApi()
def test_api_connection(self):
currencies = self.api.get_base_cu... | 37.304348 | 107 | 0.666084 |
f70261b694fca9802548a912f945ff89a5035eca | 2,782 | py | Python | src/state.py | xeust/Method-Draw | a8b264e37fdc3a3a8b629178d62ecb6c8008760b | [
"MIT"
] | 7 | 2021-07-25T23:38:31.000Z | 2021-12-04T23:11:57.000Z | src/state.py | xeust/Method-Draw | a8b264e37fdc3a3a8b629178d62ecb6c8008760b | [
"MIT"
] | null | null | null | src/state.py | xeust/Method-Draw | a8b264e37fdc3a3a8b629178d62ecb6c8008760b | [
"MIT"
] | 5 | 2021-08-11T12:02:10.000Z | 2022-02-24T04:41:09.000Z | import os
from deta import Deta
from datetime import date, datetime
from fastapi import HTTPException
import urllib
import base64
deta = Deta()
base = deta.Base("drawings")
drive = deta.Drive("drawings")
def get_all(db, query):
blob_gen = db.fetch(query)
blobs = []
for stored_blob in blob_gen:
... | 27.82 | 127 | 0.62509 |
cb8d53a3ab59cdae86918dbce66c63400639164e | 3,478 | py | Python | test_intensity.py | gfzriesgos/deus | afa2b64d85a2da61025c9c7bfd253ea9572cfaed | [
"Apache-2.0"
] | 1 | 2019-08-13T05:19:07.000Z | 2019-08-13T05:19:07.000Z | test_intensity.py | gfzriesgos/deus | afa2b64d85a2da61025c9c7bfd253ea9572cfaed | [
"Apache-2.0"
] | 19 | 2019-10-16T12:50:57.000Z | 2022-03-11T23:58:20.000Z | test_intensity.py | gfzriesgos/deus | afa2b64d85a2da61025c9c7bfd253ea9572cfaed | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright © 2021 Helmholtz Centre Potsdam GFZ German Research Centre for Geosciences, Potsdam, Germany
#
# 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.ap... | 32.203704 | 307 | 0.646636 |
72d6e33e9aea04291de93db45045ada6e05f8668 | 3,702 | py | Python | NoteBooks/Curso de Python/Python/Examples/High_Patterns/ex36.py | Alejandro-sin/Learning_Notebooks | 161d6bed4c7b1d171b45f61c0cc6fa91e9894aad | [
"MIT"
] | 1 | 2021-02-26T13:12:22.000Z | 2021-02-26T13:12:22.000Z | NoteBooks/Curso de Python/Python/Examples/High_Patterns/ex36.py | Alejandro-sin/Learning_Notebooks | 161d6bed4c7b1d171b45f61c0cc6fa91e9894aad | [
"MIT"
] | null | null | null | NoteBooks/Curso de Python/Python/Examples/High_Patterns/ex36.py | Alejandro-sin/Learning_Notebooks | 161d6bed4c7b1d171b45f61c0cc6fa91e9894aad | [
"MIT"
] | null | null | null | #Designing and Debuggin
# 1. Tod if debe llevar un else
# 2.No nestear mas de 2 if
# 3. Tratar los if como parrrafos. donde el if elif else son juntamos como una serie de sentencias.
# 4. MI LÓGICA BOLEANA ENTRE MÁS SIMPLE DE ENTENDER MEJOR.
# No usar mucho el while-loop,
# El debugger es como un scan entero de una ... | 35.257143 | 146 | 0.619395 |
35d2f48900071cbafbeae60dcd2f92fde37c5f3a | 1,002 | py | Python | dataset/scannetv2/scannet_util.py | Hao-FANG-92/PointGroup | 62b2371a1ca3acf313357011ecf85543b03a12ec | [
"Apache-2.0"
] | 219 | 2020-05-02T07:36:34.000Z | 2021-05-19T07:24:51.000Z | dataset/scannetv2/scannet_util.py | dongzhenwhu/PointGroup | a41c2cd22808861f0d4986b2825875c10bb661e5 | [
"Apache-2.0"
] | 41 | 2020-05-06T10:17:42.000Z | 2021-05-13T07:46:30.000Z | dataset/scannetv2/scannet_util.py | dongzhenwhu/PointGroup | a41c2cd22808861f0d4986b2825875c10bb661e5 | [
"Apache-2.0"
] | 46 | 2020-05-07T02:18:39.000Z | 2021-05-18T07:55:37.000Z | g_label_names = ['unannotated', 'wall', 'floor', 'chair', 'table', 'desk', 'bed', 'bookshelf', 'sofa', 'sink', 'bathtub', 'toilet', 'curtain', 'counter', 'door', 'window', 'shower curtain', 'refridgerator', 'picture', 'cabinet', 'otherfurniture']
def get_raw2scannetv2_label_map():
lines = [line.rstrip() for line i... | 41.75 | 246 | 0.620758 |
0c9d70c2e8df4dabb2d109b1e65bf75d52483e28 | 32,368 | py | Python | moe/optimal_learning/python/cpp_wrappers/knowledge_gradient_mcmc.py | misokg/Cornell-MOE | 1547d6b168b7fc70857d522baa0d5d45c41d3cdf | [
"Apache-2.0"
] | 218 | 2017-10-14T03:54:00.000Z | 2022-03-25T14:48:38.000Z | moe/optimal_learning/python/cpp_wrappers/knowledge_gradient_mcmc.py | Tracy3370/Cornell-MOE | df299d1be882d2af9796d7a68b3f9505cac7a53e | [
"Apache-2.0"
] | 45 | 2017-09-27T14:33:31.000Z | 2020-12-16T09:32:50.000Z | moe/optimal_learning/python/cpp_wrappers/knowledge_gradient_mcmc.py | Tracy3370/Cornell-MOE | df299d1be882d2af9796d7a68b3f9505cac7a53e | [
"Apache-2.0"
] | 63 | 2017-09-25T14:23:57.000Z | 2022-03-17T01:41:42.000Z | # -*- coding: utf-8 -*-
"""Tools to compute KnowledgeGradient and optimize the next best point(s) to sample using KG through C++ calls.
This file contains a class to compute Knowledge Gradient + derivatives and a functions to solve the q,p-KG optimization problem.
The :class:`moe.optimal_learning.python.cpp_wrappers.k... | 51.871795 | 170 | 0.703473 |
338984409a4af271a4908270ea8774dda7a749a1 | 5,872 | py | Python | sem/wapiti.py | YoannDupont/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 22 | 2016-11-13T21:08:58.000Z | 2021-04-26T07:04:54.000Z | sem/wapiti.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 15 | 2016-11-15T10:21:07.000Z | 2021-11-08T10:08:05.000Z | sem/wapiti.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 8 | 2016-11-15T10:21:41.000Z | 2022-03-04T21:28:05.000Z | # -*- coding: utf-8 -*-
"""
file: wapiti.py
Description: a very simple wrapper for calling wapiti. Provides train
and test procedures.
TODO: add every option for train and test
TODO: add support for other modes, such as dump and update (1.5.0+)
author: Yoann Dupont
MIT License
Copyright (c) 2018 Yoann Dupont
Perm... | 34.339181 | 177 | 0.65923 |
adb0599909d9a08e0e8a2aec9f300b741c0cd42f | 8,436 | py | Python | playground/examples/tf_simple_rule.py | minfawang/cs221-pommerman | e57126e3596a06144b8e9a83a1f4f6ff5404ee48 | [
"MIT"
] | 1 | 2020-10-28T09:36:55.000Z | 2020-10-28T09:36:55.000Z | playground/examples/tf_simple_rule.py | minfawang/cs221-pommerman | e57126e3596a06144b8e9a83a1f4f6ff5404ee48 | [
"MIT"
] | null | null | null | playground/examples/tf_simple_rule.py | minfawang/cs221-pommerman | e57126e3596a06144b8e9a83a1f4f6ff5404ee48 | [
"MIT"
] | null | null | null | '''An example to show how to set up an pommerman game programmatically
Explanation of rewards:
# Suppose we have 4 agents, below may be a sequence of rewards after each step.
# Essentially the reward of an agent is: 0 if alive, -1 if dead, and +1 if
# you are the only one alive.
# reward = [0, 0, 0, 0]
# reward = [0, ... | 29.291667 | 93 | 0.671171 |
f160539d829cf341ab0064f6c09eef07b89da372 | 134 | py | Python | .history/myblog/feeds_20200416203822.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | .history/myblog/feeds_20200416203822.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | .history/myblog/feeds_20200416203822.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | from django.contrib.syndication.views import Feed
from django.template.defaultfilters import truncatewords
from .models import Post
| 22.333333 | 56 | 0.850746 |
dcd5bdb960f41d5cf65e795e4d1de6c2a224eac4 | 1,832 | py | Python | data_structures/tree_traversal.py | johnnydevriese/python_fun | 01fc5fcc82c7c27e25eabff85a2e88f3554129fe | [
"MIT"
] | null | null | null | data_structures/tree_traversal.py | johnnydevriese/python_fun | 01fc5fcc82c7c27e25eabff85a2e88f3554129fe | [
"MIT"
] | null | null | null | data_structures/tree_traversal.py | johnnydevriese/python_fun | 01fc5fcc82c7c27e25eabff85a2e88f3554129fe | [
"MIT"
] | null | null | null | # three traversals we will usual look at are:
# PREORDER: visit root node first, then recursively do a a preorder traversal of the left subtree.
# followed by a recursive preorder traversal of the right subtree.
# INORDER: we recursively do an inorder traversal on the left subtree, visit the root node,
# and finally d... | 30.533333 | 107 | 0.674127 |
810832ea2251a4e521c850c82844a70c9c8d0e1c | 1,215 | py | Python | src/address_gen.py | hexuscoin/hexus | 2ae02b8764776c67181e41b3f29c38da78e27095 | [
"MIT"
] | null | null | null | src/address_gen.py | hexuscoin/hexus | 2ae02b8764776c67181e41b3f29c38da78e27095 | [
"MIT"
] | null | null | null | src/address_gen.py | hexuscoin/hexus | 2ae02b8764776c67181e41b3f29c38da78e27095 | [
"MIT"
] | null | null | null | # pip install base58 / ecdsa
# tested in python 3.6.5
import os, binascii, hashlib, base58, ecdsa
def ripemd160(x):
d = hashlib.new('ripemd160')
d.update(x)
return d
for n in range(1): # number of key pairs to generate`
# generate private key, uncompressed bitcoin WIF starts with "5"
priv_key ... | 39.193548 | 87 | 0.692181 |
0760f11c1b3fe8d109fd363f1000d5d8adef67e2 | 26,235 | py | Python | bigbench/bbseqio/bigbench_bridge_test.py | sarahadlerrous/BIG-bench | e71e63598538674cece60f8457475f8ddbdf785a | [
"Apache-2.0"
] | null | null | null | bigbench/bbseqio/bigbench_bridge_test.py | sarahadlerrous/BIG-bench | e71e63598538674cece60f8457475f8ddbdf785a | [
"Apache-2.0"
] | null | null | null | bigbench/bbseqio/bigbench_bridge_test.py | sarahadlerrous/BIG-bench | e71e63598538674cece60f8457475f8ddbdf785a | [
"Apache-2.0"
] | null | null | null | # 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... | 38.524229 | 80 | 0.614332 |
1851d1b593a6a3bc41bc2d9d9385352696b7f8c1 | 124 | py | Python | mmdet3d/models/fusion_layers/__init__.py | Discover304/MMDetection3D-Explainable | 265be9eba643a253a0d0bd24fb1f74a3f43a0b45 | [
"Apache-2.0"
] | null | null | null | mmdet3d/models/fusion_layers/__init__.py | Discover304/MMDetection3D-Explainable | 265be9eba643a253a0d0bd24fb1f74a3f43a0b45 | [
"Apache-2.0"
] | null | null | null | mmdet3d/models/fusion_layers/__init__.py | Discover304/MMDetection3D-Explainable | 265be9eba643a253a0d0bd24fb1f74a3f43a0b45 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
from .x_net_fusion_layers import XNetFusion
__all__ = [
'XNetFusion'
]
| 17.714286 | 47 | 0.741935 |
c86c01e73ecc82f48a5b4c144a80bb2abe093de1 | 20,197 | py | Python | Lib/ntpath.py | w0xel/python2.7-mingw32 | a7978642b17cb05b3edd04116db0fe993637ef20 | [
"PSF-2.0"
] | 3 | 2018-12-25T15:33:48.000Z | 2019-12-04T20:32:32.000Z | Lib/ntpath.py | w0xel/python2.7-mingw32 | a7978642b17cb05b3edd04116db0fe993637ef20 | [
"PSF-2.0"
] | null | null | null | Lib/ntpath.py | w0xel/python2.7-mingw32 | a7978642b17cb05b3edd04116db0fe993637ef20 | [
"PSF-2.0"
] | 1 | 2020-11-04T07:54:34.000Z | 2020-11-04T07:54:34.000Z | # Module 'ntpath' -- common operations on WinNT/Win95 pathnames
"""Common pathname manipulations, WindowsNT/95 version.
Instead of importing this module directly, import os and refer to this
module as os.path.
"""
import os
import sys
import stat
import genericpath
import warnings
from genericpath import *
from gene... | 35.433333 | 84 | 0.580779 |
643dce6c91ba9b91d2b4aaf389bcd9f480d3d2a3 | 2,758 | py | Python | tests/test_cli.py | samwellzuk/py-lambda-packer | 380d0b748d5e83dbdd58c87de532a26cccbb8ec8 | [
"MIT"
] | null | null | null | tests/test_cli.py | samwellzuk/py-lambda-packer | 380d0b748d5e83dbdd58c87de532a26cccbb8ec8 | [
"MIT"
] | null | null | null | tests/test_cli.py | samwellzuk/py-lambda-packer | 380d0b748d5e83dbdd58c87de532a26cccbb8ec8 | [
"MIT"
] | null | null | null | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import pytest
from plpacker.cli import parse_args
class TestParseArgs(object):
def test_defaults(self, source_fs):
# pylint: disable=unused-argument, no-self-use
args = vars(parse_args([]... | 31.340909 | 66 | 0.531907 |
0cdffd28a71cdc789ba10aa76d4054852271f582 | 2,450 | py | Python | hugin/hugin/minlf.py | MetaphorExtractionTools/metaphor-search | ca0ba6cda8d83eb9274eb2b9d7977df4a5374b18 | [
"MIT"
] | 2 | 2018-05-25T01:47:50.000Z | 2021-11-26T19:03:07.000Z | hugin/hugin/minlf.py | MetaphorExtractionTools/metaphor-search | ca0ba6cda8d83eb9274eb2b9d7977df4a5374b18 | [
"MIT"
] | null | null | null | hugin/hugin/minlf.py | MetaphorExtractionTools/metaphor-search | ca0ba6cda8d83eb9274eb2b9d7977df4a5374b18 | [
"MIT"
] | 1 | 2020-02-06T16:04:07.000Z | 2020-02-06T16:04:07.000Z | #!/usr/bin/env python
# coding: utf-8
# Copyright (C) USC Information Sciences Institute
# Author: Vladimir M. Zaytsev <zaytsev@usc.edu>
# URL: <http://nlg.isi.edu/>
# For more information, see README.md
# For license information, see LICENSE
import re
import logging
class MinBoxerLFSParser(object):
LF_COMMENT_... | 35 | 86 | 0.522857 |
8705954edd0c17a163ce67d6ec2eca8f04129afd | 2,757 | py | Python | google/cloud/tpu/v1/tpu-v1-py/google/cloud/tpu/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/tpu/v1/tpu-v1-py/google/cloud/tpu/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/tpu/v1/tpu-v1-py/google/cloud/tpu/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 41.772727 | 78 | 0.80885 |
f82cea7121c043fbc857651858a2025fdc679994 | 7,718 | py | Python | google/cloud/compute_v1/services/node_types/transports/base.py | Ctfbuster/python-compute | 7a9e8324e08c46a93050908760b2b5aca054a863 | [
"Apache-2.0"
] | 19 | 2021-02-10T21:17:20.000Z | 2022-02-20T03:16:36.000Z | google/cloud/compute_v1/services/node_types/transports/base.py | Ctfbuster/python-compute | 7a9e8324e08c46a93050908760b2b5aca054a863 | [
"Apache-2.0"
] | 121 | 2021-01-08T23:46:58.000Z | 2022-03-26T04:34:36.000Z | google/cloud/compute_v1/services/node_types/transports/base.py | Ctfbuster/python-compute | 7a9e8324e08c46a93050908760b2b5aca054a863 | [
"Apache-2.0"
] | 20 | 2021-01-08T23:14:16.000Z | 2022-02-25T01:27:20.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 37.833333 | 103 | 0.663125 |
7d2bdc2f07997479c78032972837c72a46be4c2f | 5,617 | py | Python | doc/examples/kfold_xval.py | JohnGriffiths/dipy | 5fb38e9b77547cdaf5eb140730444535733ae01d | [
"BSD-3-Clause"
] | 2 | 2018-07-25T14:04:20.000Z | 2021-02-10T07:10:10.000Z | doc/examples/kfold_xval.py | JohnGriffiths/dipy | 5fb38e9b77547cdaf5eb140730444535733ae01d | [
"BSD-3-Clause"
] | null | null | null | doc/examples/kfold_xval.py | JohnGriffiths/dipy | 5fb38e9b77547cdaf5eb140730444535733ae01d | [
"BSD-3-Clause"
] | 2 | 2018-07-24T21:20:54.000Z | 2018-08-27T04:08:24.000Z | """
============================================
K-fold cross-validation for model comparison
============================================
Different models of diffusion MRI can be compared based on their accuracy in
fitting the diffusion signal. Here, we demonstrate this by comparing two
models: the diffusion tensor ... | 31.734463 | 89 | 0.729927 |
879def8bcdffacdb417aa75fa825f10199e879e7 | 58,286 | py | Python | moto/elbv2/responses.py | STRRL/mono-ext | dbaa6143508eeacd24d46e897b1d764af9ac107e | [
"Apache-2.0"
] | null | null | null | moto/elbv2/responses.py | STRRL/mono-ext | dbaa6143508eeacd24d46e897b1d764af9ac107e | [
"Apache-2.0"
] | null | null | null | moto/elbv2/responses.py | STRRL/mono-ext | dbaa6143508eeacd24d46e897b1d764af9ac107e | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from moto.core.exceptions import RESTError
from moto.core.utils import amzn_request_id
from moto.core.responses import BaseResponse
from .models import elbv2_backends
from .exceptions import DuplicateTagKeysError
from .exceptions import LoadBalancerNotFoundError
from .exceptions ... | 39.569586 | 175 | 0.63511 |
6bcf16277d93f63bfb2613355b3f905595dbca57 | 48 | py | Python | blackpearl/__init__.py | offmessage/blackpearl | ffbba460fe7fc7fe4d7e3466f5ff13ea0c081fc5 | [
"MIT"
] | null | null | null | blackpearl/__init__.py | offmessage/blackpearl | ffbba460fe7fc7fe4d7e3466f5ff13ea0c081fc5 | [
"MIT"
] | null | null | null | blackpearl/__init__.py | offmessage/blackpearl | ffbba460fe7fc7fe4d7e3466f5ff13ea0c081fc5 | [
"MIT"
] | null | null | null | """
Black Pearl: For twisted little pirates
"""
| 12 | 39 | 0.6875 |
d9fe585cd611ea27625ebe1b79ce87160bd612c9 | 13,334 | py | Python | bybit_backtest/bybit_backtest.py | 10mohi6/bybit-backtest-python | cea62f3c18d3c92bdb94efe9ccec95813002d74e | [
"MIT"
] | 10 | 2020-10-24T18:12:57.000Z | 2022-03-12T07:34:18.000Z | bybit_backtest/bybit_backtest.py | 10mohi6/bybit-backtest-python | cea62f3c18d3c92bdb94efe9ccec95813002d74e | [
"MIT"
] | null | null | null | bybit_backtest/bybit_backtest.py | 10mohi6/bybit-backtest-python | cea62f3c18d3c92bdb94efe9ccec95813002d74e | [
"MIT"
] | 3 | 2021-11-02T05:30:13.000Z | 2022-02-01T21:24:42.000Z | from typing import Tuple
import numpy as np
import pandas as pd
import os
import matplotlib.pyplot as plt
import requests
from bs4 import BeautifulSoup
from sqlalchemy import create_engine
import urllib.request
import gzip
import datetime
class Backtest(object):
def __init__(
self,
*,
symb... | 37.455056 | 88 | 0.480051 |
aeab1d7f98630f88aff5e7258cb58c92ac9871c1 | 17,989 | py | Python | hoomd/cite.py | kmoskovtsev/HOOMD-Blue-fork | 99560563a5ba9e082b513764bae51a84f48fdc70 | [
"BSD-3-Clause"
] | null | null | null | hoomd/cite.py | kmoskovtsev/HOOMD-Blue-fork | 99560563a5ba9e082b513764bae51a84f48fdc70 | [
"BSD-3-Clause"
] | null | null | null | hoomd/cite.py | kmoskovtsev/HOOMD-Blue-fork | 99560563a5ba9e082b513764bae51a84f48fdc70 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2009-2016 The Regents of the University of Michigan
# This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.
# Maintainer: mphoward / All Developers are free to add commands for new features
""" Commands to support automatic citation generation.
Certain features of HOOM... | 38.686022 | 162 | 0.613097 |
b20ad9c57fce551c584bcd44f01d9d83a5b776dd | 29,336 | py | Python | pythran/tests/test_base.py | PierreBlancfat/pythran2 | 37869bc73aae1054253c2b1643aee5c63f11b7e8 | [
"BSD-3-Clause"
] | null | null | null | pythran/tests/test_base.py | PierreBlancfat/pythran2 | 37869bc73aae1054253c2b1643aee5c63f11b7e8 | [
"BSD-3-Clause"
] | null | null | null | pythran/tests/test_base.py | PierreBlancfat/pythran2 | 37869bc73aae1054253c2b1643aee5c63f11b7e8 | [
"BSD-3-Clause"
] | null | null | null | import numpy
import sys
import unittest
from pythran.tests import TestEnv
from pythran.typing import *
class TestBase(TestEnv):
def test_pass(self):
self.run_test("def pass_(a):pass", 1, pass_=[int])
def test_empty_return(self):
self.run_test("def empty_return(a,b,c):return", 1,1.,True, empty... | 37.658537 | 178 | 0.602502 |
b23e6d4e545d26512ac52fab1fbe21332cf2a5d5 | 448 | py | Python | Youcheng/most_common_words.py | xiaoli-chen/Godel | 181b347aa88220b0e3e9ae628089f5acd1e6f170 | [
"Apache-2.0"
] | null | null | null | Youcheng/most_common_words.py | xiaoli-chen/Godel | 181b347aa88220b0e3e9ae628089f5acd1e6f170 | [
"Apache-2.0"
] | null | null | null | Youcheng/most_common_words.py | xiaoli-chen/Godel | 181b347aa88220b0e3e9ae628089f5acd1e6f170 | [
"Apache-2.0"
] | null | null | null | import sys
from collections import Counter
try:
num_words = int(sys.argv[1])
except:
print("usage: most_common_words.py num_words")
sys.exit(1)
counter = Counter(word.lower()
for line in sys.stdin
for word in line.strip().split()
if word)
for word, count in counter.most_commo... | 21.333333 | 50 | 0.651786 |
5f80df8b2f6a1306ba4ced7b23038f77a2b9108a | 1,018 | py | Python | apps/auth0login/models.py | Mohitkaushal97/File | 0bc5cca9a557e242861a289af74dfe8b905bc3bd | [
"MIT"
] | null | null | null | apps/auth0login/models.py | Mohitkaushal97/File | 0bc5cca9a557e242861a289af74dfe8b905bc3bd | [
"MIT"
] | null | null | null | apps/auth0login/models.py | Mohitkaushal97/File | 0bc5cca9a557e242861a289af74dfe8b905bc3bd | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.db.models import CharField
from django.utils.translation import ugettext_lazy as _
# Create your models here.
# from django.contrib.auth.models import User
class User(AbstractUser):
# See fields: https://docs... | 42.416667 | 124 | 0.749509 |
7667bd27d5d686a250330875b5578144581681e9 | 4,336 | py | Python | verellen/retailers/views.py | bitblueprint/verellen.biz | f9b26f783f94518314b12e360b0b297b08ad85c0 | [
"MIT"
] | null | null | null | verellen/retailers/views.py | bitblueprint/verellen.biz | f9b26f783f94518314b12e360b0b297b08ad85c0 | [
"MIT"
] | null | null | null | verellen/retailers/views.py | bitblueprint/verellen.biz | f9b26f783f94518314b12e360b0b297b08ad85c0 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.db.models import Q
import re
from retailers.models import Retailer
def home(request):
all = Retailer.objects.all()
matches = all
showing_all = True
query = ""
boutiques = Retailer.objects.filter(partner__is_boutique=True)
if 'query' i... | 48.719101 | 130 | 0.411439 |
176daf48afeb4fdcde520342fb501399fcff4f24 | 4,181 | py | Python | Generalized 'Monty Hall' Problem Simulation .py | tameemalaa/General-Monty-Hall-Problem-Simulation | 63c98bb235bb1de527936310bfb9e3f231668ad0 | [
"MIT"
] | 2 | 2021-07-24T04:25:47.000Z | 2021-07-24T17:07:16.000Z | Generalized 'Monty Hall' Problem Simulation .py | tameemalaa/Generalized-Monty-Hall-Problem-Simulation | 63c98bb235bb1de527936310bfb9e3f231668ad0 | [
"MIT"
] | null | null | null | Generalized 'Monty Hall' Problem Simulation .py | tameemalaa/Generalized-Monty-Hall-Problem-Simulation | 63c98bb235bb1de527936310bfb9e3f231668ad0 | [
"MIT"
] | null | null | null | from math import floor
from random import choice
import matplotlib.pyplot as plt
from prettytable import PrettyTable
class door :
def __init__(self):
self.status=True
self.hascar=False
def play(num_doors = 3, num_cars=1 , num_opened= 1):
doors = [door() for i in range (num_doors)]
i = 0
... | 41.39604 | 152 | 0.58718 |
643a13731e8ae0e8dc5ca500748a37ec2d44ea51 | 851 | py | Python | apps/api/registration/serializers.py | Failjak/constructCompany_DRF | 458a8e33d7bca72db883745388065a05c42bbd1f | [
"BSD-3-Clause"
] | null | null | null | apps/api/registration/serializers.py | Failjak/constructCompany_DRF | 458a8e33d7bca72db883745388065a05c42bbd1f | [
"BSD-3-Clause"
] | null | null | null | apps/api/registration/serializers.py | Failjak/constructCompany_DRF | 458a8e33d7bca72db883745388065a05c42bbd1f | [
"BSD-3-Clause"
] | null | null | null | from rest_framework import serializers
from rest_framework_simplejwt.tokens import RefreshToken, AccessToken
from django.contrib.auth import get_user_model
UserModel = get_user_model()
class UserSerializer(serializers.ModelSerializer):
"""Serializer for creating user objects."""
password = serializers.Char... | 25.029412 | 69 | 0.635723 |
fc156ec457d51a315b92d549de5a63e6cbff78df | 7,570 | py | Python | sdk/python/pulumi_azure_native/web/v20180201/get_web_app_deployment_slot.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20180201/get_web_app_deployment_slot.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20180201/get_web_app_deployment_slot.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 33.201754 | 202 | 0.610832 |
0d40aa68476092dd0241c88acb0af1f688de8058 | 569 | py | Python | rollyourown/seo/__init__.py | Arvada13/SEO-Marketing-Reseller-White-Label-Hosting | 2a088f53c8c04b423072a78d7a0b9db48c6ea8c8 | [
"BSD-3-Clause"
] | 137 | 2015-01-15T04:53:39.000Z | 2022-02-14T06:04:32.000Z | rollyourown/seo/__init__.py | Arvada13/SEO-Marketing-Reseller-White-Label-Hosting | 2a088f53c8c04b423072a78d7a0b9db48c6ea8c8 | [
"BSD-3-Clause"
] | 14 | 2015-02-23T20:13:57.000Z | 2017-07-05T13:59:47.000Z | rollyourown/seo/__init__.py | Arvada13/SEO-Marketing-Reseller-White-Label-Hosting | 2a088f53c8c04b423072a78d7a0b9db48c6ea8c8 | [
"BSD-3-Clause"
] | 69 | 2015-01-04T14:00:35.000Z | 2022-03-01T14:12:00.000Z | VERSION = (1, 0, 0, 'beta', 1)
__authors__ = ["Will Hardy <django-seo@willhardy.com.au>"]
from rollyourown.seo.base import Metadata, Tag, KeywordTag, MetaTag, Raw, Literal, get_metadata, get_linked_metadata
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s... | 35.5625 | 116 | 0.618629 |
ca3ad1d76446cab073bda27095ee14bb7e3f6f54 | 1,687 | py | Python | hb_quant/huobi/model/account/account_update.py | wenli135/Binance-volatility-trading-bot | 75a03ad61df0e95492128fb6f1f419d4dc256ab3 | [
"MIT"
] | 611 | 2019-07-10T08:17:50.000Z | 2022-03-21T18:56:39.000Z | hb_quant/huobi/model/account/account_update.py | wenli135/Binance-volatility-trading-bot | 75a03ad61df0e95492128fb6f1f419d4dc256ab3 | [
"MIT"
] | 105 | 2019-07-12T03:43:41.000Z | 2022-03-30T10:33:06.000Z | hb_quant/huobi/model/account/account_update.py | wenli135/Binance-volatility-trading-bot | 75a03ad61df0e95492128fb6f1f419d4dc256ab3 | [
"MIT"
] | 325 | 2019-07-12T02:46:54.000Z | 2022-03-21T18:56:41.000Z | from huobi.constant import *
class AccountUpdate:
"""
The account change information received by subscription of account.
:member
currency: The currency of the change.
accountId: The account id.
balance: Account balance (only exists when account balance changed)
available:... | 46.861111 | 198 | 0.7131 |
124b340722a2beeb1d46622fb5139cec3a4d9667 | 92 | py | Python | Codeforces/240/gen.py | Mindjolt2406/Competitive-Programming | d000d98bf7005ee4fb809bcea2f110e4c4793b80 | [
"MIT"
] | 2 | 2018-12-11T14:37:24.000Z | 2022-01-23T18:11:54.000Z | Codeforces/240/gen.py | Mindjolt2406/Competitive-Programming | d000d98bf7005ee4fb809bcea2f110e4c4793b80 | [
"MIT"
] | null | null | null | Codeforces/240/gen.py | Mindjolt2406/Competitive-Programming | d000d98bf7005ee4fb809bcea2f110e4c4793b80 | [
"MIT"
] | null | null | null | from random import *
print 20
for i in range(2**20): print randint(1,100),
print ""
print 0 | 15.333333 | 44 | 0.695652 |
e72774f091e49dd4ccf0fc704ad3d23d5076d816 | 11,538 | py | Python | test/hummingbot/core/web_assistant/connections/test_ws_connection.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 542 | 2021-12-17T22:34:31.000Z | 2022-03-31T14:36:23.000Z | test/hummingbot/core/web_assistant/connections/test_ws_connection.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 291 | 2021-12-17T20:07:53.000Z | 2022-03-31T11:07:23.000Z | test/hummingbot/core/web_assistant/connections/test_ws_connection.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 220 | 2021-12-17T12:41:23.000Z | 2022-03-31T23:03:22.000Z | import asyncio
import json
import unittest
from typing import Awaitable, List
from unittest.mock import AsyncMock, patch
import aiohttp
from hummingbot.core.web_assistant.connections.ws_connection import WSConnection
from hummingbot.core.web_assistant.connections.data_types import WSRequest, WSResponse
from test.humm... | 45.604743 | 117 | 0.744583 |
375775783257a261414f75f3fb58b3b78bf7fe51 | 393 | py | Python | app/models.py | luucasaraujoo/devops-ac08 | c57617ca6d716e9858ef22df2268b98420628eeb | [
"MIT"
] | null | null | null | app/models.py | luucasaraujoo/devops-ac08 | c57617ca6d716e9858ef22df2268b98420628eeb | [
"MIT"
] | 28 | 2018-10-25T00:42:21.000Z | 2018-10-26T23:19:19.000Z | app/models.py | luucasaraujoo/devops-ac08 | c57617ca6d716e9858ef22df2268b98420628eeb | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Curso(models.Model):
nome = models.CharField(max_length=200)
periodo = models.CharField(max_length=50)
instituicao = models.CharField(max_length=200)
class Vestibular(models.Model):
nome = models.CharField(max_length=200)
class Ins... | 21.833333 | 50 | 0.725191 |
eba76c22292a1fc47eb7324c4300630b8a6eb41c | 1,540 | py | Python | Dodgeball/Dodgeball2.py | Software-Cat/Python-Mini-Projects | 3e8a150758eddfc2b21a5e8c665fd6eca850e55d | [
"MIT"
] | null | null | null | Dodgeball/Dodgeball2.py | Software-Cat/Python-Mini-Projects | 3e8a150758eddfc2b21a5e8c665fd6eca850e55d | [
"MIT"
] | null | null | null | Dodgeball/Dodgeball2.py | Software-Cat/Python-Mini-Projects | 3e8a150758eddfc2b21a5e8c665fd6eca850e55d | [
"MIT"
] | null | null | null | import pygame
import sys
def vertical_dashed_line(screen, color, startPos, length, width, dashLength):
segments = []
dashes = int(length/dashLength)
startY = startPos[1]
for i in range(dashes):
if i%2 == 0:
segments.append([[startPos[0], startY+i*dashLength], [startPos[0], startY+(... | 25.245902 | 105 | 0.597403 |
a899aa019ae04c0d57546c200c2faaa07cd18e3e | 2,648 | py | Python | SmartObjectFramework/ObjectService/rdflib/plugins/serializers/trig.py | OSIOT/OBSOLETE-IoT-Toolkit | f6cfb116a9f115d5ce288d990b57e0f6855283cc | [
"Apache-2.0"
] | 1 | 2019-06-12T19:37:58.000Z | 2019-06-12T19:37:58.000Z | SmartObjectFramework/ObjectService/rdflib/plugins/serializers/trig.py | OSIOT/OBSOLETE-IoT-Toolkit | f6cfb116a9f115d5ce288d990b57e0f6855283cc | [
"Apache-2.0"
] | null | null | null | SmartObjectFramework/ObjectService/rdflib/plugins/serializers/trig.py | OSIOT/OBSOLETE-IoT-Toolkit | f6cfb116a9f115d5ce288d990b57e0f6855283cc | [
"Apache-2.0"
] | null | null | null | """
Trig RDF graph serializer for RDFLib.
See <http://www.w3.org/2010/01/Trig/Trig> for syntax specification.
"""
from rdflib.plugins.serializers.turtle import TurtleSerializer
from rdflib.plugins.serializers.turtle import _GEN_QNAME_FOR_DT
from rdflib.plugins.serializers.turtle import VERB
from rdflib.term import BN... | 30.090909 | 81 | 0.596677 |
504c2899262df11b36c35502bc994aff22b34dca | 30,739 | py | Python | fastapi/applications.py | Future-Position-X/fastapi | 4d3f781bcf7bad93b41482bb24b5b29f39778b76 | [
"MIT"
] | null | null | null | fastapi/applications.py | Future-Position-X/fastapi | 4d3f781bcf7bad93b41482bb24b5b29f39778b76 | [
"MIT"
] | null | null | null | fastapi/applications.py | Future-Position-X/fastapi | 4d3f781bcf7bad93b41482bb24b5b29f39778b76 | [
"MIT"
] | null | null | null | from typing import Any, Callable, Dict, List, Optional, Sequence, Type, Union
from fastapi import routing
from fastapi.concurrency import AsyncExitStack
from fastapi.encoders import DictIntStrAny, SetIntStr
from fastapi.exception_handlers import (
http_exception_handler,
request_validation_exception_handler,
)... | 42.050616 | 88 | 0.632324 |
8e2a4f61243636e0bedfbd8d8fa519c9b6aa992b | 3,168 | py | Python | src/LightCNN/evaluation/feature_extraction/layer.py | willyspinner/High-Performance-Face-Recognition | c5caad61be97fd20f9c47a727278ff938dc5cc8f | [
"MIT"
] | 300 | 2019-01-28T07:37:53.000Z | 2022-03-09T02:17:28.000Z | src/LightCNN/evaluation/feature_extraction/layer.py | willyspinner/High-Performance-Face-Recognition | c5caad61be97fd20f9c47a727278ff938dc5cc8f | [
"MIT"
] | 15 | 2019-04-22T14:23:01.000Z | 2021-11-24T09:52:32.000Z | src/LightCNN/evaluation/feature_extraction/layer.py | willyspinner/High-Performance-Face-Recognition | c5caad61be97fd20f9c47a727278ff938dc5cc8f | [
"MIT"
] | 67 | 2019-01-29T05:42:09.000Z | 2021-12-28T11:09:44.000Z | import tensorflow as tf
import numpy as np
def weight(shape):
return tf.get_variable('weight', shape, initializer=tf.contrib.layers.xavier_initializer())
def bias(shape, value=0.1):
return tf.get_variable('bias', shape, initializer=tf.constant_initializer(value))
def Fcnn(x,insize,outsize,name,activation=None,nob... | 29.886792 | 94 | 0.722854 |
23fb5eed02e074131c3e4705d23fbafabdca78c7 | 426 | py | Python | Python/Strings/Capitalize/solution.py | aesavas/HackerRank | c1ffecc92e3e3db923f94594b9115f650dc2983a | [
"MIT"
] | null | null | null | Python/Strings/Capitalize/solution.py | aesavas/HackerRank | c1ffecc92e3e3db923f94594b9115f650dc2983a | [
"MIT"
] | null | null | null | Python/Strings/Capitalize/solution.py | aesavas/HackerRank | c1ffecc92e3e3db923f94594b9115f650dc2983a | [
"MIT"
] | null | null | null | """
author : Ali Emre SAVAS
Link : https://www.hackerrank.com/challenges/capitalize/problem
"""
# If you want to use in Hackerrank, just copy the function. Main section is different in Hackerrank.
def solve(s):
name = s.split(" ")
for i in range(len(name)):
name[i] = name[i].capitalize()
r... | 22.421053 | 100 | 0.626761 |
ee9c15ada17990d87fc7d4136efd5734dea4b021 | 1,794 | py | Python | backend/pyrogram/types/messages_and_media/message_reply_header.py | appheap/social-media-analyzer | 0f9da098bfb0b4f9eb38e0244aa3a168cf97d51c | [
"Apache-2.0"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/types/messages_and_media/message_reply_header.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/types/messages_and_media/message_reply_header.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | import pyrogram
from pyrogram import types, raw
from ..object import Object
class MessageReplyHeader(Object):
"""
"""
def __init__(
self,
*,
client: "pyrogram.Client" = None,
reply_to_message_id: int = None,
reply_to_user: "types.User" = None,
... | 33.849057 | 100 | 0.62932 |
941ba32cd0bf9012dec28acabf8badddce0b4e84 | 107,640 | py | Python | sympy/printing/pretty/tests/test_pretty.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 1 | 2016-02-22T22:46:50.000Z | 2016-02-22T22:46:50.000Z | sympy/printing/pretty/tests/test_pretty.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 7 | 2017-05-01T14:15:32.000Z | 2017-09-06T20:44:24.000Z | sympy/printing/pretty/tests/test_pretty.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 1 | 2016-04-06T15:05:37.000Z | 2016-04-06T15:05:37.000Z | # -*- coding: utf-8 -*-
from sympy import (
Add, And, Basic, Derivative, Dict, Eq, Equivalent, FF,
FiniteSet, Function, Ge, Gt, I, Implies, Integral,
Lambda, Le, Limit, Lt, Matrix, Mul, Nand, Ne, Nor, Not, O, Or,
Pow, Product, QQ, RR, Rational, Ray, rootof, RootSum, S,
Segment, Subs, Sum, Symbol, Tu... | 20.271186 | 114 | 0.407618 |
c58cf1573ea394f3f7f6f92e6017b6f5931cd078 | 1,156 | py | Python | account/migrations/0003_likes.py | AngleMAXIN/nomooc | 0c06b8af405b8254c242b34e85b7cba99c8f5737 | [
"MIT"
] | 1 | 2019-12-04T03:20:16.000Z | 2019-12-04T03:20:16.000Z | account/migrations/0003_likes.py | AngleMAXIN/NoMooc | 0c06b8af405b8254c242b34e85b7cba99c8f5737 | [
"MIT"
] | null | null | null | account/migrations/0003_likes.py | AngleMAXIN/NoMooc | 0c06b8af405b8254c242b34e85b7cba99c8f5737 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2020-01-10 10:12
import django.utils.timezone
from django.db import migrations, models
import utils.models
class Migration(migrations.Migration):
dependencies = [
('account', '0002_adminoperationrecord'),
]
operations = [
migrations.CreateModel(
... | 37.290323 | 114 | 0.605536 |
48340246c107552f568488a0ba0bd90ed9aae452 | 2,483 | py | Python | flask_unchained/bundles/security/models/user.py | achiang/flask-unchained | 12788a6e618904a25ff2b571eb05ff1dc8f1840f | [
"MIT"
] | null | null | null | flask_unchained/bundles/security/models/user.py | achiang/flask-unchained | 12788a6e618904a25ff2b571eb05ff1dc8f1840f | [
"MIT"
] | null | null | null | flask_unchained/bundles/security/models/user.py | achiang/flask-unchained | 12788a6e618904a25ff2b571eb05ff1dc8f1840f | [
"MIT"
] | null | null | null | from flask_unchained.bundles.sqlalchemy import db
from flask_unchained import unchained, injectable, lazy_gettext as _
from .user_role import UserRole
from ..validators import EmailValidator
MIN_PASSWORD_LENGTH = 8
class User(db.Model):
"""
Base :class:`User` model. Includes :attr:`email`, :attr:`password`,... | 34.486111 | 87 | 0.654048 |
d1f90735af6620889a2d262e91ca5d5ac8d2931b | 1,034 | py | Python | kubernetes/test/test_v1beta1_controller_revision.py | Prahladk09/python-1 | 2dfb3035535e4be52ba549f1ff47acbe573b73f6 | [
"Apache-2.0"
] | 1 | 2020-04-13T09:54:21.000Z | 2020-04-13T09:54:21.000Z | kubernetes/test/test_v1beta1_controller_revision.py | Prahladk09/python-1 | 2dfb3035535e4be52ba549f1ff47acbe573b73f6 | [
"Apache-2.0"
] | 1 | 2019-08-15T14:27:17.000Z | 2019-08-15T14:28:07.000Z | kubernetes/test/test_v1beta1_controller_revision.py | Prahladk09/python-1 | 2dfb3035535e4be52ba549f1ff47acbe573b73f6 | [
"Apache-2.0"
] | 2 | 2020-08-05T03:06:48.000Z | 2020-08-05T16:08:21.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 22.977778 | 105 | 0.729207 |
29fd048ab56cf47db084fa79e7a28b31124b4d17 | 1,636 | py | Python | fragscapy/modlist.py | Fratso/Fragscapy | b824db6fa67a743a91c26f6239c7ee9dc86ea7fe | [
"MIT"
] | 56 | 2019-09-19T09:09:19.000Z | 2022-02-07T01:48:48.000Z | fragscapy/modlist.py | Fratso/Fragscapy | b824db6fa67a743a91c26f6239c7ee9dc86ea7fe | [
"MIT"
] | 5 | 2020-01-30T15:32:32.000Z | 2021-05-27T20:01:52.000Z | fragscapy/modlist.py | Fratso/Fragscapy | b824db6fa67a743a91c26f6239c7ee9dc86ea7fe | [
"MIT"
] | 13 | 2019-09-20T16:11:58.000Z | 2021-11-23T06:33:42.000Z | """Defines a list of `Mod` objects."""
class ModList(list):
"""A list modifications.
Use the `ModList` as a classic python list, the only difference is the
`.apply(packet_list)` method available to apply the list of modifications
on a `PacketList` object.
Examples:
Assuming the all the mo... | 25.968254 | 77 | 0.521394 |
650209b2898ad68af7fe85802546e74cd326bf7d | 3,165 | py | Python | tests/test_classes/groups.py | dialogs/python-bot-sdk | 737152e5ef8406af0b22600ef7cefa78da9035e8 | [
"Apache-2.0"
] | 9 | 2019-01-22T09:59:12.000Z | 2021-05-08T10:59:00.000Z | tests/test_classes/groups.py | dialogs/python-bot-sdk | 737152e5ef8406af0b22600ef7cefa78da9035e8 | [
"Apache-2.0"
] | 29 | 2018-10-08T17:10:49.000Z | 2021-04-28T18:46:30.000Z | tests/test_classes/groups.py | dialogs/python-bot-sdk | 737152e5ef8406af0b22600ef7cefa78da9035e8 | [
"Apache-2.0"
] | 8 | 2019-01-22T09:49:32.000Z | 2022-01-26T18:55:52.000Z | from dialog_api.groups_pb2 import RequestCreateGroup, ResponseCreateGroup, RequestLoadMembers, ResponseLoadMembers, \
RequestKickUser, RequestInviteUser, RequestEditGroupBasePermissions, RequestEditMemberPermissions, \
RequestGetGroupMemberPermissions, ResponseGetGroupMemberPermissions, RequestEditGroupTitle, \... | 41.103896 | 121 | 0.747551 |
a9dc797815d0be1cbd84f8ef4f62959ca932aea9 | 11,365 | py | Python | pyNNsMD/models/mlp_eg.py | aimat-lab/NNsForMD | e52c19f39c2039580b9ab4e5b7f78a35a3300bac | [
"MIT"
] | 2 | 2021-08-03T09:45:09.000Z | 2022-03-04T08:39:05.000Z | pyNNsMD/models/mlp_eg.py | aimat-lab/NNsForMD | e52c19f39c2039580b9ab4e5b7f78a35a3300bac | [
"MIT"
] | null | null | null | pyNNsMD/models/mlp_eg.py | aimat-lab/NNsForMD | e52c19f39c2039580b9ab4e5b7f78a35a3300bac | [
"MIT"
] | 1 | 2021-07-21T01:22:50.000Z | 2021-07-21T01:22:50.000Z | """
Tensorflow keras model definitions for energy and gradient.
There are two definitions: the subclassed EnergyGradientModel and a precomputed model to
multiply with the feature derivative for training, which overwrites training/predict step.
"""
import numpy as np
import tensorflow as tf
import tensorflow.keras as... | 40.589286 | 116 | 0.580994 |
f805f742c5aab1dd1aee6ac09777cd63a2f29af9 | 476 | py | Python | 2 - Continuous Control -DDPG/continuous_control_ddpg_reacher20.py | lalopey/drl | 4cc28158be70d06113dc680644c0b3d3241b7b51 | [
"MIT"
] | null | null | null | 2 - Continuous Control -DDPG/continuous_control_ddpg_reacher20.py | lalopey/drl | 4cc28158be70d06113dc680644c0b3d3241b7b51 | [
"MIT"
] | null | null | null | 2 - Continuous Control -DDPG/continuous_control_ddpg_reacher20.py | lalopey/drl | 4cc28158be70d06113dc680644c0b3d3241b7b51 | [
"MIT"
] | null | null | null | from drltools.utils import trainer, ddpgmulti_config
from drltools.agent.agent import DDPGMultiAgent
from unityagents import UnityEnvironment
env = UnityEnvironment(file_name="unity_environments/Reacher20_mac.app", worker_id=1)
config = ddpgmulti_config
agent_class = DDPGMultiAgent
n_episodes = 2000
max_t = 1000
solv... | 25.052632 | 85 | 0.802521 |
b2521dbb21208019f472923eee6f6c27f6653193 | 2,017 | py | Python | lib/notification_service/notification_service/cli/commands/db_command.py | SteNicholas/ai-flow | 2c70547981f1516f0e37bbe6936a1b7cccd31822 | [
"Apache-2.0"
] | null | null | null | lib/notification_service/notification_service/cli/commands/db_command.py | SteNicholas/ai-flow | 2c70547981f1516f0e37bbe6936a1b7cccd31822 | [
"Apache-2.0"
] | null | null | null | lib/notification_service/notification_service/cli/commands/db_command.py | SteNicholas/ai-flow | 2c70547981f1516f0e37bbe6936a1b7cccd31822 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.672727 | 104 | 0.729301 |
2589125ec5e5791900ed3487f08d45753a916bf6 | 1,794 | py | Python | spgg_dialog.py | euriconicacio/SPGG-Plugin | 84f350bd1343add2c634e9bb07c7d27c8be66f42 | [
"MIT"
] | null | null | null | spgg_dialog.py | euriconicacio/SPGG-Plugin | 84f350bd1343add2c634e9bb07c7d27c8be66f42 | [
"MIT"
] | null | null | null | spgg_dialog.py | euriconicacio/SPGG-Plugin | 84f350bd1343add2c634e9bb07c7d27c8be66f42 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
/***************************************************************************
SPGGDialog
A QGIS plugin
Single-Point GEM Generator
-------------------
begin : 2016-10-03
git sha : $Forma... | 41.72093 | 77 | 0.424192 |
8f5587a5a567d41f88b86e95608b449b9b14997d | 551 | py | Python | update_supply_chain_information/supply_chains/migrations/0018_alter_supplychain_vulnerability_status.py | uktrade/update-supply-chain-information | 5cdcc795257b8351cf11b57487b194012ee8886d | [
"MIT"
] | null | null | null | update_supply_chain_information/supply_chains/migrations/0018_alter_supplychain_vulnerability_status.py | uktrade/update-supply-chain-information | 5cdcc795257b8351cf11b57487b194012ee8886d | [
"MIT"
] | 204 | 2021-05-26T16:15:04.000Z | 2022-02-14T05:10:44.000Z | update_supply_chain_information/supply_chains/migrations/0018_alter_supplychain_vulnerability_status.py | uktrade/defend-data-capture | 5cdcc795257b8351cf11b57487b194012ee8886d | [
"MIT"
] | 1 | 2021-06-26T10:28:30.000Z | 2021-06-26T10:28:30.000Z | # Generated by Django 3.2.2 on 2021-06-16 10:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("supply_chains", "0017_alter_strategicaction_supporting_organisations"),
]
operations = [
migrations.AlterField(
model_name="supp... | 25.045455 | 81 | 0.573503 |
195c636230da06644dca8e5d7daaa3a470fbbe83 | 1,641 | py | Python | move.py | Conundrum4/Group-robotics-project | 8df5bdc03bf1a2c065e59a3ba7ff2edbc77751a9 | [
"MIT"
] | null | null | null | move.py | Conundrum4/Group-robotics-project | 8df5bdc03bf1a2c065e59a3ba7ff2edbc77751a9 | [
"MIT"
] | null | null | null | move.py | Conundrum4/Group-robotics-project | 8df5bdc03bf1a2c065e59a3ba7ff2edbc77751a9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import math
from math import sin, cos, pi
import rospy
import tf
from nav_msgs.msg import Odometry
from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3
rospy.init_node('odometry_publisher')
odom_pub = rospy.Publisher("odom", Odometry, queue_size=50)
odom_broadcaster = tf.Trans... | 23.442857 | 73 | 0.656307 |
c4e1e6239d9ed489cbf9d5bca310929b63843ac9 | 67,692 | py | Python | IntelFsp2Pkg/Tools/GenCfgOpt.py | mjg59/edk2 | 6a34c1ce705470124d35d6ce6ee85e3f098f8fd5 | [
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | 1 | 2019-09-28T22:17:53.000Z | 2019-09-28T22:17:53.000Z | IntelFsp2Pkg/Tools/GenCfgOpt.py | mjg59/edk2 | 6a34c1ce705470124d35d6ce6ee85e3f098f8fd5 | [
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | null | null | null | IntelFsp2Pkg/Tools/GenCfgOpt.py | mjg59/edk2 | 6a34c1ce705470124d35d6ce6ee85e3f098f8fd5 | [
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | null | null | null | ## @ GenCfgOpt.py
#
# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
import os
import re
import sys
import struct
from datetime import date
from functools import reduce
# Generated file copyright header
__copyright_txt__ = ... | 43.672258 | 171 | 0.44308 |
925efe3c2928301477b98f3cd1b22f0bd9394b4f | 8,178 | py | Python | src/falconpy/_endpoint/_ioc.py | aneisch/falconpy | d6b9f96dce964919dced2628dbf0c6adc55b4952 | [
"Unlicense"
] | null | null | null | src/falconpy/_endpoint/_ioc.py | aneisch/falconpy | d6b9f96dce964919dced2628dbf0c6adc55b4952 | [
"Unlicense"
] | null | null | null | src/falconpy/_endpoint/_ioc.py | aneisch/falconpy | d6b9f96dce964919dced2628dbf0c6adc55b4952 | [
"Unlicense"
] | null | null | null | """
_______ __ _______ __ __ __
| _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----.
|. 1___| _| _ | | | | _ | 1___| _| _| | <| -__|
|. |___|__| |_____|________|_____|____ |____|__| |__|__|__|_____|
|: 1 | |: 1 |
|::.. ... | 28.694737 | 118 | 0.532282 |
9797dc33b44e1c82fb5aa299b30429399deef5d1 | 831 | py | Python | code-pool/insertion-sort7.py | ColorOfLight/kaist-musynth | 98bf12cfac0722e15db2e9a8e01275b002e7bdf3 | [
"MIT"
] | 1 | 2021-09-06T03:09:40.000Z | 2021-09-06T03:09:40.000Z | code-pool/insertion-sort7.py | ColorOfLight/kaist-musynth | 98bf12cfac0722e15db2e9a8e01275b002e7bdf3 | [
"MIT"
] | null | null | null | code-pool/insertion-sort7.py | ColorOfLight/kaist-musynth | 98bf12cfac0722e15db2e9a8e01275b002e7bdf3 | [
"MIT"
] | null | null | null | # Insertion Sort - Part 2
# The method insertionSort takes in one parameter: ar, an unsorted array. Use an Insertion Sort Algorithm to sort the entire array.
#!/bin/python
import sys
# Head ends here
def insertionSort(ar):
output = ""
i = 1
done = False
ar[0] = int(ar[0])
while i < len(ar):
done... | 21.868421 | 132 | 0.602888 |
74fc781574d5e235a9556c565751f7a97df29bd0 | 9,409 | py | Python | chroma/cache.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | chroma/cache.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | chroma/cache.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | '''chroma.cache: On-disk geometry and bounding volume hierarchy cache.
The ``Cache`` class is used to manage an on-disk cache of geometry and
BVH objects, which are slow to calculate. By default, the cache is in
$HOME/.chroma.
Currently this cache is not thread or process-safe when a writing
process is present.
'''
... | 38.093117 | 82 | 0.631098 |
42e84bee6485327a161eaad33ceb8910443d897f | 1,876 | py | Python | bases_2021_1S/Grupo 01/UNION/Server/Parser/analizer/statement/instructions/truncate.py | dadu0699/tytus | e1920f6932c840859e3e79eb8756a1d3da88bd77 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | bases_2021_1S/Grupo 01/UNION/Server/Parser/analizer/statement/instructions/truncate.py | dadu0699/tytus | e1920f6932c840859e3e79eb8756a1d3da88bd77 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | bases_2021_1S/Grupo 01/UNION/Server/Parser/analizer/statement/instructions/truncate.py | dadu0699/tytus | e1920f6932c840859e3e79eb8756a1d3da88bd77 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | from Parser.analizer.reports import Nodo
from Parser.storage.storageManager import jsonMode
from Parser.analizer.abstract import instruction
class Truncate(instruction.Instruction):
def __init__(self, name, row, column):
instruction.Instruction.__init__(self, row, column)
self.name = name
def... | 37.52 | 86 | 0.520256 |
cd8d89817a8a9c1b017d5d84023ef64f99a4c532 | 1,114 | py | Python | modules/sdl2/audio/__init__.py | rave-engine/rave | 0eeb956363f4d7eda92350775d7d386550361273 | [
"BSD-2-Clause"
] | 5 | 2015-03-18T01:19:56.000Z | 2020-10-23T12:44:47.000Z | modules/sdl2/audio/__init__.py | rave-engine/rave | 0eeb956363f4d7eda92350775d7d386550361273 | [
"BSD-2-Clause"
] | null | null | null | modules/sdl2/audio/__init__.py | rave-engine/rave | 0eeb956363f4d7eda92350775d7d386550361273 | [
"BSD-2-Clause"
] | null | null | null | """
rave audio backend using the SDL2 library.
"""
import sys
import sdl2
import sdl2.ext
import sdl2.sdlmixer as sdl2mixer
import rave.log
import rave.events
import rave.backends
import rave.resources
from ..common import fs_to_rwops
from . import formats
__author__ = 'Shiz'
__provides__ = [ 'audio' ]
BACKEND_PRIOR... | 18.566667 | 78 | 0.728007 |
398e8b0aa3a55b3a35ca9c3bb819815021496a9a | 5,166 | py | Python | example/timeline_example.py | Chaos-Chou/pyecharts | 7c510015e5bfecf28bc7ec2945a987e03e168d64 | [
"MIT"
] | 1 | 2020-02-10T04:56:33.000Z | 2020-02-10T04:56:33.000Z | example/timeline_example.py | Chaos-Chou/pyecharts | 7c510015e5bfecf28bc7ec2945a987e03e168d64 | [
"MIT"
] | null | null | null | example/timeline_example.py | Chaos-Chou/pyecharts | 7c510015e5bfecf28bc7ec2945a987e03e168d64 | [
"MIT"
] | null | null | null | from pyecharts.commons.utils import JsCode
from pyecharts import options as opts
from pyecharts.charts import Bar, Map, Page, Pie, Sankey, Timeline
from pyecharts.faker import Collector, Faker
C = Collector()
@C.funcs
def timeline_bar() -> Timeline:
x = Faker.choose()
tl = Timeline()
for i in range(2015... | 31.888889 | 87 | 0.428765 |
2aa433ffe89df068aaa06b0e7dbd4f839ceb7dde | 8,093 | py | Python | desktop/libs/libanalyze/src/libanalyze/models.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | desktop/libs/libanalyze/src/libanalyze/models.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | desktop/libs/libanalyze/src/libanalyze/models.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | #!/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... | 43.983696 | 347 | 0.701594 |
b162a41145e7b31467785d742834f28630ea3fcb | 11,470 | py | Python | cloudmonkey/requester.py | mrehman29/cloudmonkey-interoute | 9ca30487f60ca328ee33415dc1f125f57978f93a | [
"Apache-2.0"
] | null | null | null | cloudmonkey/requester.py | mrehman29/cloudmonkey-interoute | 9ca30487f60ca328ee33415dc1f125f57978f93a | [
"Apache-2.0"
] | 1 | 2021-02-02T23:02:09.000Z | 2021-02-02T23:02:09.000Z | cloudmonkey/requester.py | mrehman29/cloudmonkey-interoute | 9ca30487f60ca328ee33415dc1f125f57978f93a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Ve... | 34.341317 | 105 | 0.593287 |
f096ac21d626174df3732a272c5dfdfe83ad3677 | 2,324 | py | Python | onnxmltools/convert/xgboost/convert.py | xhochy/onnxmltools | cb2782b155ff67dc1e586f36a27c5d032070c801 | [
"Apache-2.0"
] | 1 | 2022-01-28T04:59:37.000Z | 2022-01-28T04:59:37.000Z | onnxmltools/convert/xgboost/convert.py | xhochy/onnxmltools | cb2782b155ff67dc1e586f36a27c5d032070c801 | [
"Apache-2.0"
] | null | null | null | onnxmltools/convert/xgboost/convert.py | xhochy/onnxmltools | cb2782b155ff67dc1e586f36a27c5d032070c801 | [
"Apache-2.0"
] | 1 | 2021-07-05T23:51:56.000Z | 2021-07-05T23:51:56.000Z | # SPDX-License-Identifier: Apache-2.0
from uuid import uuid4
import xgboost
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
import onnx
from ..common._topology import convert_topology
from ._parse import parse_xgboost, WrappedBooster
# Invoke the registration of all our converters and shape calcu... | 51.644444 | 119 | 0.755164 |
01f5cd14fa2560392a0804beb892d9c40e0ee401 | 3,610 | py | Python | src/scripts/training/lgb_baseline_fillna_999.py | arnabbiswas1/k_tab_sept_roc_auc_binary_classification_KFold | 7a5a91e52d460fd25133b76d5241462a4aedc474 | [
"Apache-2.0"
] | null | null | null | src/scripts/training/lgb_baseline_fillna_999.py | arnabbiswas1/k_tab_sept_roc_auc_binary_classification_KFold | 7a5a91e52d460fd25133b76d5241462a4aedc474 | [
"Apache-2.0"
] | null | null | null | src/scripts/training/lgb_baseline_fillna_999.py | arnabbiswas1/k_tab_sept_roc_auc_binary_classification_KFold | 7a5a91e52d460fd25133b76d5241462a4aedc474 | [
"Apache-2.0"
] | null | null | null | """
LGB benchmark KFold-5 fillna 99999
"""
import os
from timeit import default_timer as timer
from datetime import datetime
import pandas as pd
from sklearn.model_selection import KFold
import src.common as common
import src.config.constants as constants
import src.munging as process_data
import src.modeling as mod... | 25.422535 | 91 | 0.749584 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.