hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8f3161bc48499c5e3b47f9e512eb3ef3e528496a | 97 | py | Python | py_tdlib/constructors/set_network_type.py | Mr-TelegramBot/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 24 | 2018-10-05T13:04:30.000Z | 2020-05-12T08:45:34.000Z | py_tdlib/constructors/set_network_type.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 3 | 2019-06-26T07:20:20.000Z | 2021-05-24T13:06:56.000Z | py_tdlib/constructors/set_network_type.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 5 | 2018-10-05T14:29:28.000Z | 2020-08-11T15:04:10.000Z | from ..factory import Method
| 16.166667 | 35 | 0.731959 |
8f32b28ef06f4c9691ebde7eacf5ccd2c60aace0 | 163 | py | Python | Ex 06.py | brunobendel/Exercicios-python-Pycharm | 145ded6cb5533aeef1b89f0bce20f0a90e37216c | [
"MIT"
] | null | null | null | Ex 06.py | brunobendel/Exercicios-python-Pycharm | 145ded6cb5533aeef1b89f0bce20f0a90e37216c | [
"MIT"
] | null | null | null | Ex 06.py | brunobendel/Exercicios-python-Pycharm | 145ded6cb5533aeef1b89f0bce20f0a90e37216c | [
"MIT"
] | null | null | null | import math
a = int(input('digite um numero:'))
print('O dobro do valor digitado : {}\nO triplo : {}\nA Raiz quadrada : {}'.format((a*2),(a*3),(math.sqrt(a))))
| 40.75 | 114 | 0.631902 |
8f3522751074b59b6cbb9d1db44c15311f2cfb48 | 3,863 | py | Python | .install/.backup/platform/gcutil/lib/google_compute_engine/gcutil_lib/windows_password_test.py | bopopescu/google-cloud-sdk | b34e6a18f1e89673508166acce816111c3421e4b | [
"Apache-2.0"
] | null | null | null | .install/.backup/platform/gcutil/lib/google_compute_engine/gcutil_lib/windows_password_test.py | bopopescu/google-cloud-sdk | b34e6a18f1e89673508166acce816111c3421e4b | [
"Apache-2.0"
] | null | null | null | .install/.backup/platform/gcutil/lib/google_compute_engine/gcutil_lib/windows_password_test.py | bopopescu/google-cloud-sdk | b34e6a18f1e89673508166acce816111c3421e4b | [
"Apache-2.0"
] | 1 | 2020-07-24T20:04:47.000Z | 2020-07-24T20:04:47.000Z | # Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 35.118182 | 80 | 0.738027 |
8f355f448595d8a52940fc414efb21acc4ef2430 | 5,564 | py | Python | src/prepare_data.py | morrigan/user-behavior-anomaly-detector | 2cca2b04429d14cde6cfc21eb31a73194ff680a4 | [
"MIT"
] | 35 | 2017-11-01T09:47:43.000Z | 2021-10-10T21:14:27.000Z | src/prepare_data.py | morrigan/user-behavior-anomaly-detector | 2cca2b04429d14cde6cfc21eb31a73194ff680a4 | [
"MIT"
] | 1 | 2020-05-19T08:03:25.000Z | 2020-05-19T08:03:25.000Z | src/prepare_data.py | morrigan/user-behavior-anomaly-detector | 2cca2b04429d14cde6cfc21eb31a73194ff680a4 | [
"MIT"
] | 7 | 2017-07-23T15:12:10.000Z | 2021-05-19T10:02:07.000Z | #!/usr/bin/python
import os, csv
import tensorflow as tf
import numpy as np
import pandas as pd
import helpers
# fix random seed for reproducibility
np.random.seed(7)
#-------------------------- Constants --------------------------#
FLAGS = tf.flags.FLAGS
tf.flags.DEFINE_string(
"input_dir", os.path.abspath("../d... | 32.348837 | 117 | 0.67793 |
8f376a5c10bb4f329ffb90c603ae5e573f13044c | 888 | py | Python | rgpy/tests/test_rbm.py | jqhoogland/rgpy | a2a45d3347e55554efe16b4f68bdc03ee19cc9c8 | [
"MIT"
] | 4 | 2019-06-25T11:34:58.000Z | 2020-12-08T17:49:20.000Z | rgpy/tests/test_rbm.py | jqhoogland/rgpy | a2a45d3347e55554efe16b4f68bdc03ee19cc9c8 | [
"MIT"
] | null | null | null | rgpy/tests/test_rbm.py | jqhoogland/rgpy | a2a45d3347e55554efe16b4f68bdc03ee19cc9c8 | [
"MIT"
] | null | null | null | import os
from tfrbm.bbrbm import BBRBM
from tfrbm import visualize
try:
import _pickle as pickle
except:
import pickle
sample_descriptors = ['cold', ]
lattice_width = 16
n_visible = 256
samples = get_samples(sample_descriptors[0])
visualize.draw_samples(samples, (lattice_width, lattice_width), (25, 40),
... | 29.6 | 83 | 0.710586 |
8f38228c5f10a4b1bfb3ff3d3be495b938c13abf | 1,063 | py | Python | tests/unit/rules/contexts/count.py | translationexchange/tml-python | d09e36f0319f5d3ac0b83ee84b8848d2b2e8e481 | [
"MIT"
] | 1 | 2017-05-16T18:54:18.000Z | 2017-05-16T18:54:18.000Z | tests/unit/rules/contexts/count.py | translationexchange/tml-python | d09e36f0319f5d3ac0b83ee84b8848d2b2e8e481 | [
"MIT"
] | 2 | 2021-03-22T16:55:59.000Z | 2021-12-13T19:35:12.000Z | tests/unit/rules/contexts/count.py | translationexchange/tml-python | d09e36f0319f5d3ac0b83ee84b8848d2b2e8e481 | [
"MIT"
] | 1 | 2016-08-15T14:41:18.000Z | 2016-08-15T14:41:18.000Z | # encoding: UTF-8
""" Test rules built-in functions """
from __future__ import absolute_import
import unittest
from tml.rules.contexts.count import *
import six
if __name__ == '__main__':
unittest.main()
| 25.926829 | 85 | 0.648166 |
8f38235907b9eb58f5cbcd6b95c8ecc50d95b91f | 309 | py | Python | chat/urls.py | Rutujakadam0204/video_conferencing | 7c0ea87d16195bc565fc7fd7f389a431a3e47df2 | [
"MIT"
] | null | null | null | chat/urls.py | Rutujakadam0204/video_conferencing | 7c0ea87d16195bc565fc7fd7f389a431a3e47df2 | [
"MIT"
] | null | null | null | chat/urls.py | Rutujakadam0204/video_conferencing | 7c0ea87d16195bc565fc7fd7f389a431a3e47df2 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path
# from django.contrib.auth.decorators import login_required
# from rest_framework.urlpatterns import format_suffix_patterns
from . views import *
urlpatterns = [
# path('admin/', admin.site.urls),
path('', main_view, name='main_view'),
]
| 28.090909 | 63 | 0.757282 |
8f38956818d7d26413d81247226d22c1605a0678 | 6,153 | py | Python | chrome/common/extensions/docs/server2/app_yaml_helper_test.py | iplo/Chain | 8bc8943d66285d5258fffc41bed7c840516c4422 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 231 | 2015-01-08T09:04:44.000Z | 2021-12-30T03:03:10.000Z | chrome/common/extensions/docs/server2/app_yaml_helper_test.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2017-02-14T21:55:58.000Z | 2017-02-14T21:55:58.000Z | chrome/common/extensions/docs/server2/app_yaml_helper_test.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 268 | 2015-01-21T05:53:28.000Z | 2022-03-25T22:09:01.000Z | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from app_yaml_helper import AppYamlHelper
from extensions_paths import SERVER2
from host_file_system_provider import H... | 34.183333 | 79 | 0.674955 |
8f3b95bb082f7edc9e12b17194be13f8386224a1 | 10,259 | py | Python | bot.py | HOTNSPICY12/Bot.py | 049221a4ac3a19f3d75229ae536c2466d6b96d5e | [
"MIT"
] | null | null | null | bot.py | HOTNSPICY12/Bot.py | 049221a4ac3a19f3d75229ae536c2466d6b96d5e | [
"MIT"
] | null | null | null | bot.py | HOTNSPICY12/Bot.py | 049221a4ac3a19f3d75229ae536c2466d6b96d5e | [
"MIT"
] | null | null | null | import os
import random
from os import system
import urllib
import json
from json import dumps, load
import argparse
from urllib.request import urlopen
from time import sleep
import threading
system("pip install gtts")
system("pip install requests")
import amino
import time
from gtts import gTTS
import r... | 36.123239 | 302 | 0.594892 |
8f3c2e629963bc70f94465c23784f0672d567edb | 894 | py | Python | tensorstream/finance/supertrend_spec.py | clems4ever/tensorstream | 61bff14f65f71bdd4ab58aefbd6eda79ec5863cb | [
"Apache-2.0"
] | 5 | 2019-04-10T03:51:13.000Z | 2020-07-12T10:50:24.000Z | tensorstream/finance/supertrend_spec.py | clems4ever/tensorstream | 61bff14f65f71bdd4ab58aefbd6eda79ec5863cb | [
"Apache-2.0"
] | null | null | null | tensorstream/finance/supertrend_spec.py | clems4ever/tensorstream | 61bff14f65f71bdd4ab58aefbd6eda79ec5863cb | [
"Apache-2.0"
] | null | null | null | import numpy as np
import tensorflow as tf
from tensorstream.finance.supertrend import Supertrend
from tensorstream.tests import TestCase
| 27.090909 | 54 | 0.692394 |
8f3c5e333599fdc4cb51a82f876ae8020f57a096 | 167 | py | Python | critters/fac-rec.py | vagoff/shootout | e2f085436cdfb6945db55dc92a9de46e925b8f39 | [
"MIT"
] | null | null | null | critters/fac-rec.py | vagoff/shootout | e2f085436cdfb6945db55dc92a9de46e925b8f39 | [
"MIT"
] | null | null | null | critters/fac-rec.py | vagoff/shootout | e2f085436cdfb6945db55dc92a9de46e925b8f39 | [
"MIT"
] | null | null | null | import sys
import math
sys.setrecursionlimit(999000)
print(math.log10( fac(int(sys.argv[1])) ))
| 15.181818 | 42 | 0.616766 |
8f3d42e4319e4d469d3130e2ebbeefda3a9be8b3 | 553 | py | Python | whyis/autonomic/global_change_service.py | tolulomo/whyis | eb50ab3301eb7efd27a1a3f6fb2305dedd910397 | [
"Apache-2.0"
] | 31 | 2018-05-30T02:41:23.000Z | 2021-10-17T01:25:20.000Z | whyis/autonomic/global_change_service.py | tolulomo/whyis | eb50ab3301eb7efd27a1a3f6fb2305dedd910397 | [
"Apache-2.0"
] | 115 | 2018-04-07T00:59:11.000Z | 2022-03-02T03:06:45.000Z | whyis/autonomic/global_change_service.py | tolulomo/whyis | eb50ab3301eb7efd27a1a3f6fb2305dedd910397 | [
"Apache-2.0"
] | 25 | 2018-04-07T00:49:55.000Z | 2021-09-28T14:29:18.000Z | from builtins import str
import sadi
import rdflib
import setlr
from datetime import datetime
from .service import Service
from nanopub import Nanopublication
from datastore import create_id
import flask
from flask import render_template
from flask import render_template_string
import logging
import sys, traceback
i... | 18.433333 | 42 | 0.824593 |
8f3e50bd5495e771b0b5e77abe9b70e0f79cbf65 | 668 | py | Python | config.py | nejcv1998/koncna-locila | ffe2b7e7bb6640cbbb347ca108192571eae52766 | [
"MIT"
] | null | null | null | config.py | nejcv1998/koncna-locila | ffe2b7e7bb6640cbbb347ca108192571eae52766 | [
"MIT"
] | null | null | null | config.py | nejcv1998/koncna-locila | ffe2b7e7bb6640cbbb347ca108192571eae52766 | [
"MIT"
] | null | null | null | from transformers import *
# special tokens indices in different models available in transformers
TOKEN_IDX = {
'bert': {
'START_SEQ': 101,
'PAD': 0,
'END_SEQ': 102,
'UNK': 100
},
'roberta': {
'START_SEQ': 0,
'PAD': 1,
'END_SEQ': 2,
'UNK': 3
... | 23.857143 | 86 | 0.577844 |
8f43dbe7723d636ba742a7cadd179d52baf09618 | 256 | py | Python | SBaaS_rnasequencing/stage01_rnasequencing_softwareParameters_execute.py | dmccloskey/SBaaS_rnasequencing | 521ad0b671b0bca02e9cebfc1b372f2265955418 | [
"MIT"
] | null | null | null | SBaaS_rnasequencing/stage01_rnasequencing_softwareParameters_execute.py | dmccloskey/SBaaS_rnasequencing | 521ad0b671b0bca02e9cebfc1b372f2265955418 | [
"MIT"
] | null | null | null | SBaaS_rnasequencing/stage01_rnasequencing_softwareParameters_execute.py | dmccloskey/SBaaS_rnasequencing | 521ad0b671b0bca02e9cebfc1b372f2265955418 | [
"MIT"
] | null | null | null |
from .stage01_rnasequencing_softwareParameters_io import stage01_rnasequencing_softwareParameters_io | 42.666667 | 100 | 0.765625 |
8f43e3e6f7f121edfb38de58b78076177425cdf7 | 330 | py | Python | APIServer/database/schema.py | gcallah/SOCNET | dd8f0894e8ed071df7f78f3b61dddc7d5cf7be61 | [
"MIT"
] | 1 | 2021-02-04T19:16:16.000Z | 2021-02-04T19:16:16.000Z | APIServer/database/schema.py | gcallah/SOCNET | dd8f0894e8ed071df7f78f3b61dddc7d5cf7be61 | [
"MIT"
] | null | null | null | APIServer/database/schema.py | gcallah/SOCNET | dd8f0894e8ed071df7f78f3b61dddc7d5cf7be61 | [
"MIT"
] | 1 | 2021-02-12T21:27:25.000Z | 2021-02-12T21:27:25.000Z | from APIServer.database.models import Alert, Thread, Comment
from marshmallow_sqlalchemy import ModelSchema
| 18.333333 | 60 | 0.721212 |
8f442c4dff20e1a2d3696a395f23c798d880790c | 3,801 | py | Python | application.py | lucadalmedico/Pomodoro-timer | 989f43310bfaad404b025828aa282bdf651f3dda | [
"MIT"
] | null | null | null | application.py | lucadalmedico/Pomodoro-timer | 989f43310bfaad404b025828aa282bdf651f3dda | [
"MIT"
] | null | null | null | application.py | lucadalmedico/Pomodoro-timer | 989f43310bfaad404b025828aa282bdf651f3dda | [
"MIT"
] | null | null | null | #!/usr/bin/python
from Tkinter import *
from notifier import Notifier
from configurationReader import Configuration
| 25.172185 | 76 | 0.684557 |
8f4500663b0ad6d27211dab5ca564eae9ced6c6d | 1,032 | py | Python | gsfarc/test/test_datatype_double.py | geospatial-services-framework/gsfpyarc | 5ef69299fbc0b763ad4c1857ceac3ff087c0dc14 | [
"MIT"
] | 1 | 2021-11-06T18:36:28.000Z | 2021-11-06T18:36:28.000Z | gsfarc/test/test_datatype_double.py | geospatial-services-framework/gsfpyarc | 5ef69299fbc0b763ad4c1857ceac3ff087c0dc14 | [
"MIT"
] | null | null | null | gsfarc/test/test_datatype_double.py | geospatial-services-framework/gsfpyarc | 5ef69299fbc0b763ad4c1857ceac3ff087c0dc14 | [
"MIT"
] | null | null | null | """
"""
import unittest
import arcpy
from numpy import pi
from gsfarc.test import config
def test_datatype_double_negative(self):
"""Tests the double datatype with a negative value."""
input = -pi
result = arcpy.QA_IDLTaskEngine_DataType_Double_GSF(input)
self.assertAlmostEqual(fl... | 27.891892 | 92 | 0.697674 |
8f4510db9231d70738882f88514bb8736ee90d71 | 67 | py | Python | pymt_sedflux3d/bmi.py | mcflugen/pymt_sedflux3d | 136c9c2dfffbb3c389f8dacaf002fa0962c7dc48 | [
"MIT"
] | null | null | null | pymt_sedflux3d/bmi.py | mcflugen/pymt_sedflux3d | 136c9c2dfffbb3c389f8dacaf002fa0962c7dc48 | [
"MIT"
] | 1 | 2020-04-04T02:09:38.000Z | 2020-04-04T02:09:38.000Z | pymt_sedflux3d/bmi.py | mcflugen/pymt_sedflux3d | 136c9c2dfffbb3c389f8dacaf002fa0962c7dc48 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from .lib import Sedflux3D
| 16.75 | 38 | 0.850746 |
8f487ccac25c1f508943b7e960c4b0049246f6d5 | 1,483 | py | Python | app.py | wbigger/2021-tris | 381bea2788be2502b83aa7bc93610567acad0263 | [
"MIT"
] | null | null | null | app.py | wbigger/2021-tris | 381bea2788be2502b83aa7bc93610567acad0263 | [
"MIT"
] | null | null | null | app.py | wbigger/2021-tris | 381bea2788be2502b83aa7bc93610567acad0263 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
print("Gioco del tic tac toe")
board = [
['-','-','-'],
['-','-','-'],
['-','-','-']
]
symList = ['X','O']
winner=False
for idx in range(9):
symbol = symList[idx%2]
mostra_tabellone()
print("Il tuo simbolo : "+symbol)
while True:... | 21.185714 | 79 | 0.462576 |
8f4ba346a7b60b16317500756cb9e4bb6701d348 | 2,467 | py | Python | tests/get_function_memory_usage.py | clement-masson/aiarena | 5e9f6ffa23ae6acd5fd1d415254f94e66f05d3c8 | [
"MIT"
] | null | null | null | tests/get_function_memory_usage.py | clement-masson/aiarena | 5e9f6ffa23ae6acd5fd1d415254f94e66f05d3c8 | [
"MIT"
] | null | null | null | tests/get_function_memory_usage.py | clement-masson/aiarena | 5e9f6ffa23ae6acd5fd1d415254f94e66f05d3c8 | [
"MIT"
] | 1 | 2020-04-22T13:38:57.000Z | 2020-04-22T13:38:57.000Z | import psutil
import os
import time
def get_function_memory_usage(function, iterations=100, max_time=None,
max_mem_usage=90, verbose=False, display_period=0.2):
'''
Cette fonction execute <iterations> fois <function> et renvoit la difference
de mmoire virtuelle utilise par ... | 37.953846 | 97 | 0.62951 |
8f4c3111c8c10c0ec0a5b5dafc3f8b0dec13623f | 105 | py | Python | tiatoolbox/__main__.py | adamshephard/tiatoolbox | 28c32648bc1f3e842c7b241637fd25af290386e6 | [
"BSD-3-Clause"
] | null | null | null | tiatoolbox/__main__.py | adamshephard/tiatoolbox | 28c32648bc1f3e842c7b241637fd25af290386e6 | [
"BSD-3-Clause"
] | null | null | null | tiatoolbox/__main__.py | adamshephard/tiatoolbox | 28c32648bc1f3e842c7b241637fd25af290386e6 | [
"BSD-3-Clause"
] | null | null | null | """__main__ file invoked with `python -m tiatoolbox` command"""
from tiatoolbox.cli import main
main()
| 17.5 | 63 | 0.742857 |
8f4c733b84d84a0351bf8d9d1333251f23372afb | 2,507 | py | Python | test_extra_credit.py | robertavram/tournament | ec77d898006f15aa2c1bd1836cfc7655c6587b01 | [
"MIT"
] | null | null | null | test_extra_credit.py | robertavram/tournament | ec77d898006f15aa2c1bd1836cfc7655c6587b01 | [
"MIT"
] | null | null | null | test_extra_credit.py | robertavram/tournament | ec77d898006f15aa2c1bd1836cfc7655c6587b01 | [
"MIT"
] | null | null | null | from tournament import *
from random import randint
from math import log, ceil
def registerPlayers(tournament="Default Tournament", tplayers=10):
"""Registers a list of randomly generated names. """
# Potential first names:
pFN = ["Eden ", "Sharilyn ", "Merissa ", "Dalia ",
"Ema ", "Dede ", "... | 29.494118 | 88 | 0.618269 |
8f4d8e9c469beff91ba244881b1a589e7e632122 | 12,932 | py | Python | python/prizes.py | camfindlay/govhackaustralia.github.io | 3e4c1eb7d04a922ba7e6853ee5411af1c5d0b193 | [
"CC-BY-4.0"
] | 1 | 2020-06-20T21:50:06.000Z | 2020-06-20T21:50:06.000Z | python/prizes.py | camfindlay/govhackaustralia.github.io | 3e4c1eb7d04a922ba7e6853ee5411af1c5d0b193 | [
"CC-BY-4.0"
] | null | null | null | python/prizes.py | camfindlay/govhackaustralia.github.io | 3e4c1eb7d04a922ba7e6853ee5411af1c5d0b193 | [
"CC-BY-4.0"
] | 1 | 2020-06-20T21:50:09.000Z | 2020-06-20T21:50:09.000Z | import fnmatch
import codecs
import tablib
import os
import requests
import urlparse
import shutil
import frontmatter
import yaml
import io
# Config
datadir = "python/data/prizes"
prizesdir = "_prizes/2016/"
organisationsdir = "_organisations/"
eventsdir = "_locations/"
# tmpdir = "python/tmp/"
# Init
# For seeing i... | 37.484058 | 335 | 0.565496 |
8f503e25fa8ba64b0a369b2aaaa138d8e45ad961 | 20 | py | Python | tests/core_symbol.py | cubetrain/CubeTrain | b930a3e88e941225c2c54219267f743c790e388f | [
"MIT"
] | null | null | null | tests/core_symbol.py | cubetrain/CubeTrain | b930a3e88e941225c2c54219267f743c790e388f | [
"MIT"
] | null | null | null | tests/core_symbol.py | cubetrain/CubeTrain | b930a3e88e941225c2c54219267f743c790e388f | [
"MIT"
] | null | null | null | CORE_SYMBOL='SEAT'
| 10 | 19 | 0.75 |
8f51b1f418a90f98dcafef44fa8b0b18f313cb00 | 64,106 | py | Python | pytorch2caffe/caffe_pb2.py | wgggSg/pytorch2caffe | b22ce80339dd5f5fcec5a53f65fbf3b1c1d938ea | [
"MIT"
] | null | null | null | pytorch2caffe/caffe_pb2.py | wgggSg/pytorch2caffe | b22ce80339dd5f5fcec5a53f65fbf3b1c1d938ea | [
"MIT"
] | null | null | null | pytorch2caffe/caffe_pb2.py | wgggSg/pytorch2caffe | b22ce80339dd5f5fcec5a53f65fbf3b1c1d938ea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: caffe.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from... | 83.254545 | 30,057 | 0.800471 |
8f51d2a0ec979865686042df3864ca787e25c4cd | 738 | py | Python | tests/CRAFT/MFW/lambdaV1.py | idaholab/SR2ML | 2aa5e0be02786523cdeaf898d42411a7068d30b7 | [
"Apache-2.0"
] | 5 | 2021-01-25T02:01:22.000Z | 2021-12-27T03:14:49.000Z | tests/CRAFT/MFW/lambdaV1.py | idaholab/SR2ML | 2aa5e0be02786523cdeaf898d42411a7068d30b7 | [
"Apache-2.0"
] | 32 | 2021-01-12T18:43:29.000Z | 2022-02-17T19:45:27.000Z | tests/CRAFT/testMC_timeDep/lambdaV1.py | idaholab/SR2ML | 2aa5e0be02786523cdeaf898d42411a7068d30b7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020, Battelle Energy Alliance, LLC
# ALL RIGHTS RESERVED
import numpy as np
import math
import random
from scipy.integrate import quad
| 28.384615 | 110 | 0.666667 |
8f5244861e35b37680ebe7662e6a373a96a4672b | 4,443 | py | Python | minpair/generator.py | brandonlim-hs/minpair | f8ea7fcab0bfc4a6b9bc45dd2b1f0aeb089b365e | [
"MIT"
] | 1 | 2020-12-29T04:25:55.000Z | 2020-12-29T04:25:55.000Z | minpair/generator.py | brandonlim-hs/minpair | f8ea7fcab0bfc4a6b9bc45dd2b1f0aeb089b365e | [
"MIT"
] | null | null | null | minpair/generator.py | brandonlim-hs/minpair | f8ea7fcab0bfc4a6b9bc45dd2b1f0aeb089b365e | [
"MIT"
] | null | null | null | from collections import defaultdict
from minpair import arpabet
from minpair.corpus import require as corpus_require
from nltk.corpus import brown
from nltk.corpus import cmudict
from nltk.corpus import words
import re
| 37.336134 | 79 | 0.582939 |
8f55227cf0237dd09fda9cb47b6ed01106b23c08 | 734 | py | Python | shop/migrations/0004_auto_20191223_1511.py | majestylink/majestyAccencis | 41bdde6f9982980609f93a8b44bcaf06cc5f6ea6 | [
"MIT"
] | null | null | null | shop/migrations/0004_auto_20191223_1511.py | majestylink/majestyAccencis | 41bdde6f9982980609f93a8b44bcaf06cc5f6ea6 | [
"MIT"
] | null | null | null | shop/migrations/0004_auto_20191223_1511.py | majestylink/majestyAccencis | 41bdde6f9982980609f93a8b44bcaf06cc5f6ea6 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2019-12-23 14:11
from django.db import migrations, models
| 29.36 | 162 | 0.588556 |
8f5557f7dd0f99e58bd8d3d50e1268a74723c4cc | 37,656 | py | Python | vjemmie/cogs/sound_cog.py | PederHA/vjemmie | e3742380d3ea06de90f8227a0934569f8fd02b5c | [
"MIT"
] | 1 | 2018-07-30T02:43:27.000Z | 2018-07-30T02:43:27.000Z | vjemmie/cogs/sound_cog.py | PederHA/vjemmie | e3742380d3ea06de90f8227a0934569f8fd02b5c | [
"MIT"
] | 5 | 2020-09-20T14:07:28.000Z | 2022-01-13T01:18:23.000Z | vjemmie/cogs/sound_cog.py | PederHA/vjemmie | e3742380d3ea06de90f8227a0934569f8fd02b5c | [
"MIT"
] | null | null | null | import asyncio
import glob
import os
import random
import subprocess
import sys
import wave
from collections import defaultdict
from contextlib import suppress
from datetime import datetime
from functools import partial
from itertools import count, islice
from pathlib import Path
from typing import Default... | 37.731463 | 140 | 0.568143 |
8f55a41e038080f5e759107ce256226edf627325 | 356 | py | Python | train/demo.py | Ethan16/python_misc | 29cf2fdbd7529a05bcf35768e0244e634fe2ae7a | [
"Apache-2.0"
] | 1 | 2019-05-04T09:26:29.000Z | 2019-05-04T09:26:29.000Z | train/demo.py | Ethan16/python_misc | 29cf2fdbd7529a05bcf35768e0244e634fe2ae7a | [
"Apache-2.0"
] | null | null | null | train/demo.py | Ethan16/python_misc | 29cf2fdbd7529a05bcf35768e0244e634fe2ae7a | [
"Apache-2.0"
] | null | null | null |
if __name__== '__main__':
demo=Demo('int a','int b','int_c',d='init_d')
print demo.get_a()
print demo.b | 23.733333 | 50 | 0.539326 |
8f5f9cab8b025be393a6ac21f1fd3992d3e0fe2a | 15,619 | py | Python | solidata_api/_core/queries_db/query_stats.py | co-demos/solidata-backend | 2c67aecbd457cdec78b0772d78dcf699e20dd3dc | [
"MIT"
] | 2 | 2019-12-17T22:27:53.000Z | 2020-06-22T12:47:37.000Z | solidata_api/_core/queries_db/query_stats.py | co-demos/solidata-backend | 2c67aecbd457cdec78b0772d78dcf699e20dd3dc | [
"MIT"
] | 13 | 2019-06-16T15:42:33.000Z | 2022-02-26T05:12:34.000Z | solidata_api/_core/queries_db/query_stats.py | co-demos/solidata-backend | 2c67aecbd457cdec78b0772d78dcf699e20dd3dc | [
"MIT"
] | 1 | 2019-12-17T22:27:58.000Z | 2019-12-17T22:27:58.000Z | # -*- encoding: utf-8 -*-
"""
_core/queries_db/query_stats.py
"""
import re
import random
import pandas as pd
import numpy as np
from pandas.io.json import json_normalize
from log_config import log, pformat
log.debug("... _core.queries_db.query_stats.py ..." )
from bson.objectid import ObjectId
from flask_r... | 27.498239 | 138 | 0.526154 |
8f60bc6b4774a3f78cd60474a678f333df241cec | 2,451 | py | Python | mindsdb_impl/predictor.py | mindsdb/mindsdb-sagemaker-container | d00ab75383d3e1ec48af671558cda24b4e8d2cb0 | [
"MIT"
] | 7 | 2020-02-20T16:59:14.000Z | 2021-12-15T08:54:18.000Z | mindsdb_impl/predictor.py | mindsdb/mindsdb-sagemaker-container | d00ab75383d3e1ec48af671558cda24b4e8d2cb0 | [
"MIT"
] | 6 | 2020-02-25T12:56:20.000Z | 2020-03-13T09:41:31.000Z | mindsdb_impl/predictor.py | mindsdb/mindsdb-sagemaker-container | d00ab75383d3e1ec48af671558cda24b4e8d2cb0 | [
"MIT"
] | 1 | 2020-03-12T17:10:51.000Z | 2020-03-12T17:10:51.000Z | # This is the file that implements a flask server to do inferences.
import os
import json
import flask
import pandas as pd
from io import StringIO, BytesIO
import mindsdb
# Define the path
prefix = '/opt/ml/'
model_path = os.path.join(prefix, 'model')
def parse_data(content_type, data):
'''
Get the request c... | 31.025316 | 89 | 0.650755 |
8f60d5589f22109caa7cbc2207de226e44672691 | 2,418 | py | Python | Exam preparation/Python Advanced Exam - 14 February 2021/02_collecting_coins.py | milenpenev/Python_Advanced | 2f32012dd682fa9541bbf5fa155f6bdbcfa946de | [
"MIT"
] | null | null | null | Exam preparation/Python Advanced Exam - 14 February 2021/02_collecting_coins.py | milenpenev/Python_Advanced | 2f32012dd682fa9541bbf5fa155f6bdbcfa946de | [
"MIT"
] | null | null | null | Exam preparation/Python Advanced Exam - 14 February 2021/02_collecting_coins.py | milenpenev/Python_Advanced | 2f32012dd682fa9541bbf5fa155f6bdbcfa946de | [
"MIT"
] | null | null | null | from math import floor
n = int(input())
result = 0
game_over = False
path = []
directions = {
"up": (-1, 0),
"down": (1, 0),
"left": (0, -1),
"right": (0, 1)
}
matrix = []
for row in range(n):
matrix.append(input().split())
while not game_over:
movement = input()
if movement_is_va... | 26.866667 | 91 | 0.561621 |
8f6104c5631aa5c8f3d8bff0f3c726144661c948 | 708 | py | Python | ball.py | mrmphys/pong | d07d07bf0e7a6bc955554be781045c0ebc335a9d | [
"MIT"
] | null | null | null | ball.py | mrmphys/pong | d07d07bf0e7a6bc955554be781045c0ebc335a9d | [
"MIT"
] | null | null | null | ball.py | mrmphys/pong | d07d07bf0e7a6bc955554be781045c0ebc335a9d | [
"MIT"
] | null | null | null | from turtle import Turtle
import time
| 21.454545 | 41 | 0.542373 |
8f62c6cee92460f2bc1d289c73585eb313eeb447 | 5,190 | py | Python | knowledge/SSHExec.py | procter-gamble-tech/pentest-report | f9e9d8f5dc76316fd5a1fe43956d60d1efd1aacc | [
"MIT"
] | 2 | 2021-02-18T13:46:06.000Z | 2021-04-30T05:11:19.000Z | knowledge/SSHExec.py | procter-gamble-tech/pentest-report | f9e9d8f5dc76316fd5a1fe43956d60d1efd1aacc | [
"MIT"
] | null | null | null | knowledge/SSHExec.py | procter-gamble-tech/pentest-report | f9e9d8f5dc76316fd5a1fe43956d60d1efd1aacc | [
"MIT"
] | 1 | 2021-02-18T13:45:37.000Z | 2021-02-18T13:45:37.000Z | #!/usr/bin/python3
from StateAction import StateAction
import paramiko
import socket
import argparse
parser = argparse.ArgumentParser(description='Executes ssh commands against all known hosts / credentials')
parser.add_argument('-m', '--mode', dest='mode', type=str, default='foreach_host', choices=['foreach_host', 'f... | 55.806452 | 342 | 0.634489 |
8f6301e568b46695bce9375036b933bc0658726c | 4,687 | py | Python | python/opscore/RO/Wdg/Sound.py | sdss/opscore | dd4f2b2ad525fe3dfe3565463de2c079a7e1232e | [
"BSD-3-Clause"
] | null | null | null | python/opscore/RO/Wdg/Sound.py | sdss/opscore | dd4f2b2ad525fe3dfe3565463de2c079a7e1232e | [
"BSD-3-Clause"
] | 1 | 2021-08-17T21:08:14.000Z | 2021-08-17T21:08:14.000Z | python/opscore/RO/Wdg/Sound.py | sdss/opscore | dd4f2b2ad525fe3dfe3565463de2c079a7e1232e | [
"BSD-3-Clause"
] | null | null | null |
"""Simple sound players.
All sound players are based on Tkinter and some will use
the "pygame" sound package if it is available.
History:
2003-11-17 ROwen
2004-08-11 ROwen Define __all__ to restrict import.
2005-06-08 ROwen Changed BellPlay, SoundPlayer, NoPLay to new-style classes.
2009-10-22 ROwen Modifie... | 31.884354 | 97 | 0.616386 |
8f638937c2cb97ce5860a50ae48850cbdd9da7dc | 1,550 | py | Python | Probability-of-the-loan-defaulters/code.py | tbhuwan14/ga-learner-dsb-repo | 1d2271037214e6203a0ff92bae75aff32964263e | [
"MIT"
] | null | null | null | Probability-of-the-loan-defaulters/code.py | tbhuwan14/ga-learner-dsb-repo | 1d2271037214e6203a0ff92bae75aff32964263e | [
"MIT"
] | null | null | null | Probability-of-the-loan-defaulters/code.py | tbhuwan14/ga-learner-dsb-repo | 1d2271037214e6203a0ff92bae75aff32964263e | [
"MIT"
] | null | null | null | # --------------
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# code starts here
df=pd.read_csv(path)
p_a=len(df[df['fico']>700])/len(df)
print(p_a)
p_b=len(df[df['purpose']=='debt_consolidation'])/len(df)
print(p_b)
df0=df[df['purpose']=='debt_consolidation']
df1=pd.DataFrame(df0['purpose']... | 19.135802 | 96 | 0.649032 |
8f63a5304c263db8cd4106423faef2227b9b49fb | 1,803 | py | Python | tf_quant_finance/rates/swap_curve_common.py | slowy07/tf-quant-finance | 0976f720fb58a2d7bfd863640c12a2425cd2f94f | [
"Apache-2.0"
] | 3,138 | 2019-07-24T21:43:17.000Z | 2022-03-30T12:11:09.000Z | tf_quant_finance/rates/swap_curve_common.py | slowy07/tf-quant-finance | 0976f720fb58a2d7bfd863640c12a2425cd2f94f | [
"Apache-2.0"
] | 63 | 2019-09-07T19:16:03.000Z | 2022-03-29T19:29:40.000Z | tf_quant_finance/rates/swap_curve_common.py | slowy07/tf-quant-finance | 0976f720fb58a2d7bfd863640c12a2425cd2f94f | [
"Apache-2.0"
] | 423 | 2019-07-26T21:28:05.000Z | 2022-03-26T13:07:44.000Z | # Lint as: python3
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 34.673077 | 80 | 0.749861 |
8f644f6734e040c6ba15713aebdfb20814872df6 | 140 | py | Python | submissions/abc058/b.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 1 | 2021-05-10T01:16:28.000Z | 2021-05-10T01:16:28.000Z | submissions/abc058/b.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 3 | 2021-05-11T06:14:15.000Z | 2021-06-19T08:18:36.000Z | submissions/abc058/b.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | null | null | null | o = input()
e = input()
ans = ''
for i in range(len(e)):
ans += o[i]
ans += e[i]
if len(o)-len(e) == 1:
ans += o[-1]
print(ans)
| 14 | 23 | 0.457143 |
8f66133575ba5eaf993451dbd859e1f29cf63dd0 | 1,637 | py | Python | src/datasets/imagenet_r.py | mmatena/wise-ft | 2630c366d252ad32db82ea886f7ab6a752142792 | [
"MIT"
] | 79 | 2021-10-01T22:29:51.000Z | 2022-03-30T04:19:58.000Z | src/datasets/imagenet_r.py | mmatena/wise-ft | 2630c366d252ad32db82ea886f7ab6a752142792 | [
"MIT"
] | 2 | 2021-11-18T19:50:59.000Z | 2022-01-08T00:57:24.000Z | src/datasets/imagenet_r.py | mmatena/wise-ft | 2630c366d252ad32db82ea886f7ab6a752142792 | [
"MIT"
] | 10 | 2021-10-14T18:29:59.000Z | 2022-03-27T12:40:18.000Z | import os
import torch
import torchvision.datasets as datasets
from .imagenet import ImageNetSubsample, ImageNetSubsampleValClasses
import numpy as np
CLASS_SUBLIST = [
1, 2, 4, 6, 8, 9, 11, 13, 22, 23, 26, 29, 31, 39, 47, 63, 71, 76, 79, 84, 90, 94, 96, 97, 99, 100, 105, 107,
113, 122,
125, 130, 132, 14... | 41.974359 | 112 | 0.635919 |
8f68092c43111010d91daed55ced2e0e10bc28e4 | 7,619 | py | Python | HujiBot/extendblock.py | PersianWikipedia/fawikibot | 30b2e2aa824753cd0927573fa2f7fdb907cb15d2 | [
"MIT"
] | 12 | 2015-07-06T09:51:40.000Z | 2020-07-05T21:27:12.000Z | HujiBot/extendblock.py | PersianWikipedia/fawikibot | 30b2e2aa824753cd0927573fa2f7fdb907cb15d2 | [
"MIT"
] | 3 | 2017-01-08T01:12:00.000Z | 2020-09-15T04:25:19.000Z | HujiBot/extendblock.py | PersianWikipedia/fawikibot | 30b2e2aa824753cd0927573fa2f7fdb907cb15d2 | [
"MIT"
] | 6 | 2015-07-06T09:53:39.000Z | 2021-07-07T09:12:52.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This bot retreives a list of long term IP blocks on the wiki and tries to
identify if any of them are proxies. If so, it extends the block for another
year.
"""
#
# (C) User:Mensis Mirabilis, 2019
# (C) User:Huji, 2019
#
# Distributed under the terms of the CC-BY-SA license... | 31.483471 | 79 | 0.52986 |
8f68bd4cd8c7ddae1a307e6f5557f4856f4eafdd | 71 | py | Python | src/backend/main.py | fellowmate/docs-storage | a55929e3f94f121a8382b9bc0bd2d226646d4627 | [
"MIT"
] | null | null | null | src/backend/main.py | fellowmate/docs-storage | a55929e3f94f121a8382b9bc0bd2d226646d4627 | [
"MIT"
] | null | null | null | src/backend/main.py | fellowmate/docs-storage | a55929e3f94f121a8382b9bc0bd2d226646d4627 | [
"MIT"
] | null | null | null | from backend.create_app import create_app
application = create_app()
| 14.2 | 41 | 0.816901 |
8f6b79727ab29b5b63cc9dd751d6412c518b2feb | 557 | py | Python | Module2/myprg1.py | vishalnalwa/DAT210x-master---Old | 0cbe91636285fd55059b5059cb131811ea207850 | [
"MIT"
] | null | null | null | Module2/myprg1.py | vishalnalwa/DAT210x-master---Old | 0cbe91636285fd55059b5059cb131811ea207850 | [
"MIT"
] | null | null | null | Module2/myprg1.py | vishalnalwa/DAT210x-master---Old | 0cbe91636285fd55059b5059cb131811ea207850 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 19 17:14:36 2017
@author: m037382
"""
import pandas as pd
df = pd.read_html('http://www.espn.com/nhl/statistics/player/_/stat/points/sort/points/year/2015/seasontype/2')
df1 = pd.concat(df)
df1.columns = ['RK', 'PLAYER', 'TEAM', 'GP','G','A','PTS','+/-',' PIM','PTS/G','... | 29.315789 | 125 | 0.61939 |
8f6eca7563e2ddd3d0e7e1f65939a98d7d6facd2 | 598 | py | Python | tests/basic_test.py | LE-LOY/socialsims | b1eb0413d3ce52886e41679024974f5d7c1dc32f | [
"MIT"
] | null | null | null | tests/basic_test.py | LE-LOY/socialsims | b1eb0413d3ce52886e41679024974f5d7c1dc32f | [
"MIT"
] | null | null | null | tests/basic_test.py | LE-LOY/socialsims | b1eb0413d3ce52886e41679024974f5d7c1dc32f | [
"MIT"
] | null | null | null | # from ..sims.deprecated.cat_mouse import data_visualizer as cat_mouse_vis
# from ..sims.deprecated.route_choice import data_visualizer as route_choice_vis
# from ..sims.deprecated.simple_migration import data_visualizer as simple_mig_vis
"""
@pytest.mark.skip(reason="deprecated")
def test_cat_mouse_visualizer():
... | 31.473684 | 82 | 0.804348 |
8f6ed425538892edaa66f47cc3a79d0c10f0877d | 6,821 | py | Python | loldib/getratings/models/NA/na_pantheon/na_pantheon_bot.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_pantheon/na_pantheon_bot.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_pantheon/na_pantheon_bot.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | from getratings.models.ratings import Ratings
| 16.357314 | 46 | 0.776133 |
8f6f097ed22afd9da28edc935495bcc39f167a3f | 1,094 | py | Python | backend/tests/unit/client/models/test_utils.py | sdediego/blockchain | 786246c3fc4d80a827d5a6f54e2257b836cc1cf3 | [
"MIT"
] | null | null | null | backend/tests/unit/client/models/test_utils.py | sdediego/blockchain | 786246c3fc4d80a827d5a6f54e2257b836cc1cf3 | [
"MIT"
] | null | null | null | backend/tests/unit/client/models/test_utils.py | sdediego/blockchain | 786246c3fc4d80a827d5a6f54e2257b836cc1cf3 | [
"MIT"
] | null | null | null | # encoding: utf-8
from unittest.mock import Mock, patch
from src.client.models import utils
from src.exceptions import WalletError
from tests.unit.logging import LoggingMixin
| 33.151515 | 80 | 0.713894 |
8f723ee40ee156f57850ed45220076a4ad35f8dd | 5,475 | py | Python | assemblyline/al_ui/apiv3/hash_search.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 46 | 2017-05-15T11:15:08.000Z | 2018-07-02T03:32:52.000Z | assemblyline/al_ui/apiv3/hash_search.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | null | null | null | assemblyline/al_ui/apiv3/hash_search.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 24 | 2017-05-17T03:26:17.000Z | 2018-07-09T07:00:50.000Z | from flask import request
from assemblyline.common.concurrency import execute_concurrently
from assemblyline.common.importing import module_attribute_by_name
from al_ui.api_base import api_login, make_api_response
from al_ui.apiv3 import core
from al_ui.config import LOGGER, config
from assemblyline.al.datasource.comm... | 31.831395 | 109 | 0.586484 |
8f751c06b143e725cfe778cbe9ed3c2d667f4adc | 907 | py | Python | Plugins/Aspose-Slides-Java-for-Jython/asposeslides/WorkingWithPresentation/Zoom.py | tienph91/Aspose.Slides-for-Java | 874a8245c6e1ae227393644d9bd35d5e65e07d52 | [
"MIT"
] | 27 | 2016-10-25T13:19:25.000Z | 2022-03-03T04:13:53.000Z | Plugins/Aspose-Slides-Java-for-Jython/asposeslides/WorkingWithPresentation/Zoom.py | tienph91/Aspose.Slides-for-Java | 874a8245c6e1ae227393644d9bd35d5e65e07d52 | [
"MIT"
] | 9 | 2017-03-14T13:02:17.000Z | 2021-11-25T13:22:20.000Z | Plugins/Aspose-Slides-Java-for-Jython/asposeslides/WorkingWithPresentation/Zoom.py | tienph91/Aspose.Slides-for-Java | 874a8245c6e1ae227393644d9bd35d5e65e07d52 | [
"MIT"
] | 38 | 2016-04-07T16:37:29.000Z | 2022-01-17T06:35:14.000Z | from asposeslides import Settings
from com.aspose.slides import Presentation
from com.aspose.slides import SaveFormat
from com.aspose.slides import XpsOptions
if __name__ == '__main__':
Zoom() | 34.884615 | 127 | 0.693495 |
8f756bbac4c052378681c55dcc9f676225f387d1 | 3,924 | py | Python | lidardet/models/trajectory_predictor/header.py | Jiaolong/trajectory-prediction | 3fd4e6253b44dfdc86e7c08e93c002baf66f2e46 | [
"Apache-2.0"
] | 6 | 2021-05-10T09:42:01.000Z | 2022-01-04T08:03:42.000Z | lidardet/models/trajectory_predictor/header.py | Jiaolong/trajectory-prediction | 3fd4e6253b44dfdc86e7c08e93c002baf66f2e46 | [
"Apache-2.0"
] | 3 | 2021-08-16T02:19:10.000Z | 2022-01-10T02:05:48.000Z | lidardet/models/trajectory_predictor/header.py | Jiaolong/trajectory-prediction | 3fd4e6253b44dfdc86e7c08e93c002baf66f2e46 | [
"Apache-2.0"
] | 1 | 2021-07-15T00:51:58.000Z | 2021-07-15T00:51:58.000Z | import torch
from torch import nn
from .mtp import MTP
from .covernet import CoverNet
from .backbone import conv3x3
| 33.827586 | 93 | 0.566259 |
8f761f9b1a63b478f7def6358beb9a531669d672 | 6,297 | py | Python | lib/gen_robot_valid.py | hyche/openbmc-test-automation | 1e656463b8db4fc55dc1a2bf7650d1bca845f958 | [
"Apache-2.0"
] | null | null | null | lib/gen_robot_valid.py | hyche/openbmc-test-automation | 1e656463b8db4fc55dc1a2bf7650d1bca845f958 | [
"Apache-2.0"
] | null | null | null | lib/gen_robot_valid.py | hyche/openbmc-test-automation | 1e656463b8db4fc55dc1a2bf7650d1bca845f958 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
r"""
This file contains functions useful for validating variables in robot.
"""
import gen_robot_print as grp
import gen_valid as gv
from robot.libraries.BuiltIn import BuiltIn
from robot.api import logger
def rvalid_value(var_name,
invalid_values=[],
valid_v... | 34.037838 | 79 | 0.54518 |
8f76e085c8945f356c1b5166c9e3418d881f3e6b | 3,649 | py | Python | python/common/fileIO/pcsPath.py | CountZer0/PipelineConstructionSet | 0aa73a8a63c72989b2d1c677efd78dad4388d335 | [
"BSD-3-Clause"
] | 21 | 2015-04-27T05:01:36.000Z | 2021-11-22T13:45:14.000Z | python/common/fileIO/pcsPath.py | 0xb1dd1e/PipelineConstructionSet | 621349da1b6d1437e95d0c9e48ee9f36d59f19fd | [
"BSD-3-Clause"
] | null | null | null | python/common/fileIO/pcsPath.py | 0xb1dd1e/PipelineConstructionSet | 621349da1b6d1437e95d0c9e48ee9f36d59f19fd | [
"BSD-3-Clause"
] | 7 | 2015-04-11T11:37:19.000Z | 2020-05-22T09:49:04.000Z | '''
Author: Jason.Parks
Created: April 17, 2012
Module: common.fileIO.Path
Purpose: custom Path class wrapper
'''
from common.fileIO.path import *
import os, stat
import sys
def makeWritable(self, _dir=False):
''' make file(s) non-readOnly
Params:
_dir: if process entire directory
Returns: True/False
... | 20.272222 | 121 | 0.624007 |
8f76ff8ae8ab18e5eeebc131dc129ca13d672832 | 666 | py | Python | server.py | Tythos/tox | 52c9629b910abf42ffb3dba08cf9019fa1932666 | [
"MIT"
] | null | null | null | server.py | Tythos/tox | 52c9629b910abf42ffb3dba08cf9019fa1932666 | [
"MIT"
] | null | null | null | server.py | Tythos/tox | 52c9629b910abf42ffb3dba08cf9019fa1932666 | [
"MIT"
] | null | null | null | import cherrypy
import os
hostIp = "127.0.0.1"
portNumber = 1337
conf = {
'global': {
'server.socket_host': hostIp,
'server.socket_port': portNumber,
},
'/': {
'tools.sessions.on': True,
'tools.staticdir.root': os.path.abspath(os.getcwd()),
'tools.staticdir.on': True,
'tools.staticdir.dir': ".",
}
}... | 20.181818 | 73 | 0.66967 |
8f795a3f9c2e33d11d493a5b0b1f404f4f905de8 | 1,620 | py | Python | BacklogPy/api/stars.py | koxudaxi/BacklogPy | 5afc843e0fc73f91d6c62afd853347aa2eba3aac | [
"MIT"
] | 4 | 2018-02-28T07:59:36.000Z | 2021-05-26T09:49:58.000Z | BacklogPy/api/stars.py | koxudaxi/BacklogPy | 5afc843e0fc73f91d6c62afd853347aa2eba3aac | [
"MIT"
] | 11 | 2020-01-29T12:38:33.000Z | 2022-02-06T23:40:42.000Z | BacklogPy/api/stars.py | koxudaxi/BacklogPy | 5afc843e0fc73f91d6c62afd853347aa2eba3aac | [
"MIT"
] | 1 | 2021-05-21T08:12:26.000Z | 2021-05-21T08:12:26.000Z | # coding: utf-8
"""
This file was created by Backlog APIGenerator
"""
from __future__ import unicode_literals, absolute_import
from BacklogPy.base import BacklogBase, SUFFIX_JP
| 25.3125 | 69 | 0.595062 |
8f7a0f29fa7d80aa64bab6447a69727decdd8222 | 29,583 | py | Python | Projects/Continuous_Control/data_handling.py | whiterabbitobj/udacity-deep-reinforcement-learning | ede648f94c81f36aae68e3c9859280bf1e3a01eb | [
"MIT"
] | 1 | 2019-05-19T23:02:25.000Z | 2019-05-19T23:02:25.000Z | Projects/Continuous_Control/data_handling.py | whiterabbitobj/udacity-deep-reinforcement-learning | ede648f94c81f36aae68e3c9859280bf1e3a01eb | [
"MIT"
] | 8 | 2020-03-24T16:48:32.000Z | 2022-01-13T01:06:11.000Z | Projects/Continuous_Control/data_handling.py | whiterabbitobj/udacity-deep-reinforcement-learning | ede648f94c81f36aae68e3c9859280bf1e3a01eb | [
"MIT"
] | 1 | 2019-02-14T10:02:45.000Z | 2019-02-14T10:02:45.000Z | # -*- coding: utf-8 -*-
import sys
import numpy as np
import time
from utils import print_bracketing, check_dir
import argparse
import torch
import os.path
import re
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
def gather_args(manual_args=None):
"""
Generate arg... | 38.670588 | 109 | 0.590305 |
8f7a5cb0eb1d44c1a8768d02ea571d4cb3b2f950 | 110 | py | Python | ariadne_django/__init__.py | drewsynan/ariadne_django | 836b783a7240eed0ee03b7db1bbb7c5ff2843fb4 | [
"BSD-3-Clause"
] | 34 | 2021-04-08T15:36:14.000Z | 2022-03-22T14:30:28.000Z | ariadne_django/__init__.py | drewsynan/ariadne_django | 836b783a7240eed0ee03b7db1bbb7c5ff2843fb4 | [
"BSD-3-Clause"
] | 34 | 2021-04-08T02:17:25.000Z | 2022-03-22T12:25:41.000Z | ariadne_django/__init__.py | drewsynan/ariadne_django | 836b783a7240eed0ee03b7db1bbb7c5ff2843fb4 | [
"BSD-3-Clause"
] | 11 | 2021-04-08T16:47:36.000Z | 2022-03-26T23:25:39.000Z | import django
if django.VERSION < (3, 2):
default_app_config = "ariadne_django.apps.AriadneDjangoConfig"
| 22 | 66 | 0.763636 |
8f7a753bbb8c7d230421f16a2061f1d3d9d0a028 | 143 | py | Python | extension/__init__.py | Gilgamesh666666/Dgr-ncnet | 3ad2d0fdb35ba0d23e5040d74347c600b1a8b72b | [
"MIT"
] | null | null | null | extension/__init__.py | Gilgamesh666666/Dgr-ncnet | 3ad2d0fdb35ba0d23e5040d74347c600b1a8b72b | [
"MIT"
] | null | null | null | extension/__init__.py | Gilgamesh666666/Dgr-ncnet | 3ad2d0fdb35ba0d23e5040d74347c600b1a8b72b | [
"MIT"
] | null | null | null | from extension.knn import knnModule
from extension.sms import soft_mutual_score_Module
from extension.sms_On import soft_mutual_score_Module_On | 47.666667 | 56 | 0.902098 |
8f7c29f9a92e05ecd92699cd4528d8f8ee852948 | 1,324 | py | Python | pytorch_forecasting/metrics/__init__.py | smetam/pytorch-forecasting | 0a5e13fc9eefab00f43b002d08808b235582ed3d | [
"MIT"
] | null | null | null | pytorch_forecasting/metrics/__init__.py | smetam/pytorch-forecasting | 0a5e13fc9eefab00f43b002d08808b235582ed3d | [
"MIT"
] | 2 | 2020-07-26T11:38:16.000Z | 2020-08-16T21:08:53.000Z | pytorch_forecasting/metrics/__init__.py | smetam/pytorch-forecasting | 0a5e13fc9eefab00f43b002d08808b235582ed3d | [
"MIT"
] | null | null | null | """
Metrics for (mulit-horizon) timeseries forecasting.
"""
from pytorch_forecasting.metrics.base_metrics import (
DistributionLoss,
Metric,
MultiHorizonMetric,
MultiLoss,
MultivariateDistributionLoss,
convert_torchmetric_to_pytorch_forecasting_metric,
)
from pytorch_forecasting.metrics.distrib... | 27.020408 | 114 | 0.755287 |
8f7cae42cf9619d05771935af6675e6136c79cb5 | 644 | py | Python | 0x11-python-network_1/8-json_api.py | coding-max/holbertonschool-higher_level_programming | 392fed1ae686642b6cca6bb6752050882bbf79fc | [
"MIT"
] | 1 | 2021-04-26T03:45:12.000Z | 2021-04-26T03:45:12.000Z | 0x11-python-network_1/8-json_api.py | coding-max/holbertonschool-higher_level_programming | 392fed1ae686642b6cca6bb6752050882bbf79fc | [
"MIT"
] | null | null | null | 0x11-python-network_1/8-json_api.py | coding-max/holbertonschool-higher_level_programming | 392fed1ae686642b6cca6bb6752050882bbf79fc | [
"MIT"
] | 1 | 2022-02-02T02:44:35.000Z | 2022-02-02T02:44:35.000Z | #!/usr/bin/python3
"""sends a POST request to http://0.0.0.0:5000/search_user
with a passed letter as a parameter"""
from sys import argv
from requests import post
if __name__ == '__main__':
q = ""
if len(argv) == 2:
q = argv[1]
try:
request = post('http://0.0.0.0:5000/search_user', dat... | 28 | 73 | 0.546584 |
8f7fd280f59517d4cbc989bc26eb77bef14be853 | 1,885 | py | Python | tests/events/test_consumer.py | promulo/pinga | 185e8fc533882106f4f263a141d6ce829f6d3c39 | [
"MIT"
] | null | null | null | tests/events/test_consumer.py | promulo/pinga | 185e8fc533882106f4f263a141d6ce829f6d3c39 | [
"MIT"
] | 21 | 2020-12-20T02:00:45.000Z | 2020-12-24T14:32:54.000Z | tests/events/test_consumer.py | promulo/pinga | 185e8fc533882106f4f263a141d6ce829f6d3c39 | [
"MIT"
] | null | null | null | import json
from unittest.mock import ANY, MagicMock, call, patch
from pinga.events.consumer import Consumer
| 29.920635 | 91 | 0.690716 |
8f811772607d70e3af7a7de51769e5089a396767 | 7,789 | py | Python | data_processing.py | husmen/NaiveBayesClassifier | 95ca329f5aac0356f2bf8f021461c4a6278434fd | [
"MIT"
] | null | null | null | data_processing.py | husmen/NaiveBayesClassifier | 95ca329f5aac0356f2bf8f021461c4a6278434fd | [
"MIT"
] | null | null | null | data_processing.py | husmen/NaiveBayesClassifier | 95ca329f5aac0356f2bf8f021461c4a6278434fd | [
"MIT"
] | null | null | null | """ DOCSTRING """
import os
import re
import io
# Simport math as calc
#from itertools import izip, islice, tee
from random import randint
import sys
import jpype
from snowballstemmer import stemmer
#import nltk
from nltk.util import ngrams
sys.path.append('./turkish-stemmer-python')
from TurkishStemmer import Turkis... | 36.740566 | 92 | 0.583644 |
56a94cc89c825f037700e7180841e56e0181dd33 | 17,192 | py | Python | pydebloatx/app.py | space9bug/PyDebloatX | 5be683027f30d39b7c2eeb9b44beb97999cc7825 | [
"MIT"
] | null | null | null | pydebloatx/app.py | space9bug/PyDebloatX | 5be683027f30d39b7c2eeb9b44beb97999cc7825 | [
"MIT"
] | null | null | null | pydebloatx/app.py | space9bug/PyDebloatX | 5be683027f30d39b7c2eeb9b44beb97999cc7825 | [
"MIT"
] | null | null | null | from PySide6.QtCore import Qt, QThread, Signal, QPoint, QRect, QLocale, QTranslator, QCoreApplication, QThreadPool, \
QObject, QRunnable
from PySide6.QtGui import QCursor, QPixmap, QIcon, QFont
from PySide6.QtWidgets import QApplication, QMessageBox
from gui_about import Ui_AboutWindow
from gui_main import Ui_MainW... | 42.03423 | 157 | 0.633434 |
56aa412eb4fa20f25f4afa728aa77bbba3f50f72 | 969 | py | Python | bot/channel_class.py | CodeM01/Discordio | 4bf47483d9ee295fff2bbd5ed0b36895ccf9a5d2 | [
"Apache-2.0"
] | null | null | null | bot/channel_class.py | CodeM01/Discordio | 4bf47483d9ee295fff2bbd5ed0b36895ccf9a5d2 | [
"Apache-2.0"
] | null | null | null | bot/channel_class.py | CodeM01/Discordio | 4bf47483d9ee295fff2bbd5ed0b36895ccf9a5d2 | [
"Apache-2.0"
] | null | null | null | import json_and_dictionary_constructor
| 35.888889 | 177 | 0.713106 |
56aae3ce39e45ae664cb8e11f9aa791ba0cca5ce | 2,860 | py | Python | software/python/addons/remote_console/server_demo.py | ltstein/SCUTTLE | dea3c35a5c3404c3f6d9b133515593e869fef96c | [
"MIT"
] | null | null | null | software/python/addons/remote_console/server_demo.py | ltstein/SCUTTLE | dea3c35a5c3404c3f6d9b133515593e869fef96c | [
"MIT"
] | null | null | null | software/python/addons/remote_console/server_demo.py | ltstein/SCUTTLE | dea3c35a5c3404c3f6d9b133515593e869fef96c | [
"MIT"
] | null | null | null | # This file is just a basic example of the server comunication structure to a client program.
# The server is run on the embedded computer and passes data to a client on your local pc
# over a direct wifi connection. This can be used to display telemetry.
import time
import json
import socket
ip = "0.0.0.0" # 0... | 37.631579 | 105 | 0.561888 |
56ab7d0346fa799e4242a0128b30e9f645ddbf24 | 14,413 | py | Python | session.py | unidavemeyer/web-adventure | 5ebbe40dbe8ba42ace27507808abee1ada20cd70 | [
"MIT"
] | null | null | null | session.py | unidavemeyer/web-adventure | 5ebbe40dbe8ba42ace27507808abee1ada20cd70 | [
"MIT"
] | null | null | null | session.py | unidavemeyer/web-adventure | 5ebbe40dbe8ba42ace27507808abee1ada20cd70 | [
"MIT"
] | null | null | null | # session-related machinery (tracks player state)
import collections
import glob
import hashlib
import os
import random
import secrets
import server
import yaml
if __name__ == '__main__':
# test driver for session stuff
group = Group()
group.Load('sampleSessions')
print("Finished loading sample sessio... | 33.518605 | 126 | 0.571429 |
56ad466c1721bdb3df1b95c1a6b4d9ea52519888 | 13,251 | py | Python | src/f451_comms/providers/mailgun.py | mlanser/f451-comms | 0ea2cb7944ee133859de2c35c396d7681afe6205 | [
"MIT"
] | null | null | null | src/f451_comms/providers/mailgun.py | mlanser/f451-comms | 0ea2cb7944ee133859de2c35c396d7681afe6205 | [
"MIT"
] | null | null | null | src/f451_comms/providers/mailgun.py | mlanser/f451-comms | 0ea2cb7944ee133859de2c35c396d7681afe6205 | [
"MIT"
] | null | null | null | """Mailgun (email) class for f451 Communications module.
This module adds an abstraction layer for the Mailgun email services and the main
purpose is to provide a standard interface for some core methods for sending
emails (with or without attachments) to one or more recipients.
Note:
- This module assumes that w... | 31.032787 | 93 | 0.573919 |
56ae8dd61b1ca2359d4320007e8cf692e7b80936 | 3,437 | py | Python | q1pulse/lang/loops.py | sldesnoo-Delft/q1pulse | f5123b5c1e0dfbb59512d282ec7e3fb833e58b95 | [
"MIT"
] | 1 | 2021-11-12T09:40:14.000Z | 2021-11-12T09:40:14.000Z | q1pulse/lang/loops.py | sldesnoo-Delft/q1pulse | f5123b5c1e0dfbb59512d282ec7e3fb833e58b95 | [
"MIT"
] | null | null | null | q1pulse/lang/loops.py | sldesnoo-Delft/q1pulse | f5123b5c1e0dfbb59512d282ec7e3fb833e58b95 | [
"MIT"
] | null | null | null | from numbers import Number
from .math_expressions import get_dtype
from .register import Register
from .exceptions import Q1ValueError, Q1TypeError
class RangeLoop(Loop):
def __repr__(self):
return f'loop_range({self._start}, {self._stop}, {self._step}):{self.loopvar}'
class LinspaceLoop(Loop):
d... | 30.6875 | 95 | 0.600233 |
56aec273c1b97b8c1ab583670c01450173ce02ba | 383 | py | Python | modules/lib/colors.py | OSSSP/pyrecon | 8a73fdfcafe59a7e7aa63a0a6839f40931067200 | [
"MIT"
] | 2 | 2019-01-21T14:58:21.000Z | 2021-03-15T07:41:13.000Z | modules/lib/colors.py | sandwichi/pyrecon | 6c02cc357e67e49409c1138c888c4ec5a33aafa2 | [
"MIT"
] | 6 | 2021-01-20T07:23:25.000Z | 2021-06-25T15:41:46.000Z | modules/lib/colors.py | OSSSP/pyrecon | 8a73fdfcafe59a7e7aa63a0a6839f40931067200 | [
"MIT"
] | 2 | 2019-01-21T14:33:13.000Z | 2020-12-05T20:46:57.000Z | #!/usr/bin/python3
| 27.357143 | 69 | 0.655352 |
56b0ae473eaa877406bacaa1f58eac9a2aa1929e | 301 | py | Python | cloudrail/knowledge/context/aws/networking_config/inetwork_configuration.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | cloudrail/knowledge/context/aws/networking_config/inetwork_configuration.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | cloudrail/knowledge/context/aws/networking_config/inetwork_configuration.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | from abc import abstractmethod
from typing import List
from cloudrail.knowledge.context.aws.networking_config.network_configuration import NetworkConfiguration
| 27.363636 | 104 | 0.82392 |
56b14293ce8e3f37b76431fb8d2ed7001e30c62e | 563 | py | Python | apis/betterself/v1/signout/views.py | jeffshek/betterself | 51468253fc31373eb96e0e82189b9413f3d76ff5 | [
"MIT"
] | 98 | 2017-07-29T14:26:36.000Z | 2022-02-28T04:10:15.000Z | apis/betterself/v1/signout/views.py | jeffshek/betterself | 51468253fc31373eb96e0e82189b9413f3d76ff5 | [
"MIT"
] | 1,483 | 2017-05-30T00:05:56.000Z | 2022-03-31T12:37:06.000Z | apis/betterself/v1/signout/views.py | lawrendran/betterself | 51468253fc31373eb96e0e82189b9413f3d76ff5 | [
"MIT"
] | 13 | 2017-11-08T00:02:35.000Z | 2022-02-28T04:10:32.000Z | from django.contrib.auth import logout
from django.views.generic import RedirectView
| 28.15 | 79 | 0.664298 |
56b1a39eecd8544f9fa1124badbeb1b3120df993 | 2,372 | py | Python | mayan/apps/common/tests/test_classes.py | atitaya1412/Mayan-EDMS | bda9302ba4b743e7d829ad118b8b836221888172 | [
"Apache-2.0"
] | 343 | 2015-01-05T14:19:35.000Z | 2018-12-10T19:07:48.000Z | mayan/apps/common/tests/test_classes.py | atitaya1412/Mayan-EDMS | bda9302ba4b743e7d829ad118b8b836221888172 | [
"Apache-2.0"
] | 191 | 2015-01-03T00:48:19.000Z | 2018-11-30T09:10:25.000Z | mayan/apps/common/tests/test_classes.py | atitaya1412/Mayan-EDMS | bda9302ba4b743e7d829ad118b8b836221888172 | [
"Apache-2.0"
] | 114 | 2015-01-08T20:21:05.000Z | 2018-12-10T19:07:53.000Z | from django.db import models
from mayan.apps.testing.tests.base import BaseTestCase
from ..classes import QuerysetParametersSerializer
| 32.493151 | 81 | 0.679174 |
56b32592db57c796f644f76466ec52bddfc8edc0 | 1,094 | py | Python | exp_figure/figure_2(grey).py | qqxx6661/LDSM | b2be6fdfdac00fc4a469a72b3a10686fa0f4bd80 | [
"MIT"
] | 4 | 2019-06-04T06:19:01.000Z | 2021-04-16T15:50:30.000Z | exp_figure/figure_2(grey).py | qqxx6661/LDSM | b2be6fdfdac00fc4a469a72b3a10686fa0f4bd80 | [
"MIT"
] | 1 | 2019-09-10T10:33:18.000Z | 2021-02-08T14:51:39.000Z | exp_figure/figure_2(grey).py | qqxx6661/LDSM | b2be6fdfdac00fc4a469a72b3a10686fa0f4bd80 | [
"MIT"
] | 2 | 2019-06-04T06:19:08.000Z | 2021-09-06T07:30:44.000Z | import matplotlib.pyplot as plt
import numpy as np
text = ["10.65x", "57.62x", "54.44x"]
size = 3
x = np.arange(size)
total_width = 0.8
n = 3
width = total_width / n
x = x - (total_width - width) / 2
mingwen = [0.000124, 0.000151, 0.000154] # 6
miwen = [0.00132, 0.0087, 0.0084] # 6
error = [0.00001, ] * 3 # n0.... | 28.789474 | 114 | 0.656307 |
56b435f46c5ee55aafcf27499a7bc4b5f465331b | 5,894 | py | Python | benchmarks/benchmark_functions/machine_learning.py | PennyLaneAI/benchmark | 80939287367781a76183768eb9c6448062c1f5ef | [
"Apache-2.0"
] | 2 | 2021-01-06T04:10:39.000Z | 2021-03-29T14:45:51.000Z | benchmarks/benchmark_functions/machine_learning.py | PennyLaneAI/benchmark | 80939287367781a76183768eb9c6448062c1f5ef | [
"Apache-2.0"
] | 18 | 2021-02-02T20:49:56.000Z | 2021-05-20T13:50:42.000Z | benchmarks/benchmark_functions/machine_learning.py | PennyLaneAI/benchmark | 80939287367781a76183768eb9c6448062c1f5ef | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2021 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or... | 35.293413 | 109 | 0.682728 |
56b4a1d9e88e438a1a646637bff86e026e3985e3 | 564 | py | Python | service_catalog/tables/global_hook_tables.py | LaudateCorpus1/squest | 98304f20c1d966fb3678d348ffd7c5be438bb6be | [
"Apache-2.0"
] | 112 | 2021-04-21T08:52:55.000Z | 2022-03-01T15:09:19.000Z | service_catalog/tables/global_hook_tables.py | LaudateCorpus1/squest | 98304f20c1d966fb3678d348ffd7c5be438bb6be | [
"Apache-2.0"
] | 216 | 2021-04-21T09:06:47.000Z | 2022-03-30T14:21:28.000Z | service_catalog/tables/global_hook_tables.py | LaudateCorpus1/squest | 98304f20c1d966fb3678d348ffd7c5be438bb6be | [
"Apache-2.0"
] | 21 | 2021-04-20T13:53:54.000Z | 2022-03-30T21:43:04.000Z | from django_tables2 import TemplateColumn
from service_catalog.models import GlobalHook
from Squest.utils.squest_table import SquestTable
| 37.6 | 102 | 0.753546 |
56b532a63744e31c6a636400a74ee6dcf3696e2b | 5,343 | py | Python | tests/console/input/testinput.py | LowieHuyghe/scriptcore | 0c9d94b353d4d149db9492eb4ae0aa87cc1e082c | [
"Apache-2.0"
] | null | null | null | tests/console/input/testinput.py | LowieHuyghe/scriptcore | 0c9d94b353d4d149db9492eb4ae0aa87cc1e082c | [
"Apache-2.0"
] | 6 | 2017-02-23T13:22:31.000Z | 2018-07-06T04:51:06.000Z | tests/console/input/testinput.py | LowieHuyghe/scriptcore | 0c9d94b353d4d149db9492eb4ae0aa87cc1e082c | [
"Apache-2.0"
] | null | null | null |
from scriptcore.testing.testcase import TestCase
from scriptcore.console.input.input import Input
import mock
import sys
| 25.564593 | 100 | 0.561669 |
56b6f5d648b635feba668eb6da3c0a9f3f8d3fbc | 388 | py | Python | django/axf/app/migrations/0004_remove_usermodel_ticket.py | zhang15780/web_project | 820708ae68f4d1bc06cdde4a86e40a5457c11df8 | [
"Apache-2.0"
] | null | null | null | django/axf/app/migrations/0004_remove_usermodel_ticket.py | zhang15780/web_project | 820708ae68f4d1bc06cdde4a86e40a5457c11df8 | [
"Apache-2.0"
] | null | null | null | django/axf/app/migrations/0004_remove_usermodel_ticket.py | zhang15780/web_project | 820708ae68f4d1bc06cdde4a86e40a5457c11df8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-05-08 01:38
from __future__ import unicode_literals
from django.db import migrations
| 19.4 | 46 | 0.610825 |
56b75ef23d2d9521f225d7b6e9979fd3d8a0367b | 2,566 | py | Python | keras/layers/reshaping/up_sampling1d.py | itsraina/keras | 5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35 | [
"Apache-2.0"
] | null | null | null | keras/layers/reshaping/up_sampling1d.py | itsraina/keras | 5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35 | [
"Apache-2.0"
] | null | null | null | keras/layers/reshaping/up_sampling1d.py | itsraina/keras | 5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 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... | 30.188235 | 80 | 0.617693 |
56b95aef4c51bc2cb8ee77c4f2107d9a962b6662 | 288 | py | Python | app/User/index.py | OpenHill/OpenHi | 92279362b6513e066dd10f6ccbff8ab8a30b066e | [
"Apache-2.0"
] | null | null | null | app/User/index.py | OpenHill/OpenHi | 92279362b6513e066dd10f6ccbff8ab8a30b066e | [
"Apache-2.0"
] | null | null | null | app/User/index.py | OpenHill/OpenHi | 92279362b6513e066dd10f6ccbff8ab8a30b066e | [
"Apache-2.0"
] | null | null | null | from app.models.DB.mainDB import Post, User
from . import user
from flask import render_template
| 20.571429 | 43 | 0.690972 |
56ba9df1e46f3fe8842a6fd8b7e03ed6ef1c69ed | 1,313 | py | Python | gfg/hashing/print_tree_vertically.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | 1 | 2019-04-18T03:29:02.000Z | 2019-04-18T03:29:02.000Z | gfg/hashing/print_tree_vertically.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | null | null | null | gfg/hashing/print_tree_vertically.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | null | null | null | """
Given a binary tree, print it vertically. e.g.
1
/ \
2 3
/ \ / \
4 5 6 7
/ \
8 9
The output of print this tree vertically will be:
4
2
1 5 6
3 8
7
9
"""
from typing import Optional
from collections import defaultdic... | 19.893939 | 53 | 0.552171 |
56bb6e027a6dbdead08ed1b439c286d109ad9a29 | 3,347 | py | Python | main.py | NilaiVemula/empty-my-fridge | 0a9e7c214126e8d6e658f0a1e5d3bf50d5e2618c | [
"MIT"
] | null | null | null | main.py | NilaiVemula/empty-my-fridge | 0a9e7c214126e8d6e658f0a1e5d3bf50d5e2618c | [
"MIT"
] | null | null | null | main.py | NilaiVemula/empty-my-fridge | 0a9e7c214126e8d6e658f0a1e5d3bf50d5e2618c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Main script for Empty My Fridge project. Provides a CLI for the Spoonacular API.
"""
import requests
from rich.console import Console
import config
def get_missing_ingredients(available_ingredients, amount_recipes):
"""
:param available_ingredients: comma ... | 34.505155 | 119 | 0.679414 |
56bd7fdd6caf6376c1fc4fab1089d4ae75cad328 | 272 | py | Python | tests/test_mparser.py | Dih5/zadeh | 3cc0d2a4803a77d8d4d0a90c0012eea0397ee9ca | [
"MIT"
] | 2 | 2020-11-24T14:37:05.000Z | 2021-06-16T20:02:41.000Z | tests/test_mparser.py | Dih5/zadeh | 3cc0d2a4803a77d8d4d0a90c0012eea0397ee9ca | [
"MIT"
] | null | null | null | tests/test_mparser.py | Dih5/zadeh | 3cc0d2a4803a77d8d4d0a90c0012eea0397ee9ca | [
"MIT"
] | null | null | null | import zadeh
import os
def test_parse():
"""Load an external .fis file"""
fis = zadeh.FIS.from_matlab(os.path.join(os.path.dirname(os.path.abspath(__file__)), "data", "tipper.fis"))
assert isinstance(fis.get_crisp_output({"food": 5, "service": 5}), float)
| 24.727273 | 111 | 0.680147 |
56bddc7ff90f6f303a067f1c01fe8ff1781f3e94 | 2,288 | py | Python | rest/availability.py | DITAS-Project/DUE-VDC | 7a70b97dccaed1174e24c7f1417925cd6867c60c | [
"Apache-2.0"
] | null | null | null | rest/availability.py | DITAS-Project/DUE-VDC | 7a70b97dccaed1174e24c7f1417925cd6867c60c | [
"Apache-2.0"
] | null | null | null | rest/availability.py | DITAS-Project/DUE-VDC | 7a70b97dccaed1174e24c7f1417925cd6867c60c | [
"Apache-2.0"
] | null | null | null | import json
from flask import Blueprint
from metrics import availability as avail
from metrics import utils as ut
from elasticsearch.exceptions import ConnectionError
avail_page = Blueprint('availability', __name__)
QUERY_CONTENT = '*'
| 34.666667 | 114 | 0.618444 |
56c168093636ad747cd8d9d2679221987f674267 | 875 | py | Python | src/main/python/format-thresh-grid.py | utcompling/textgrounder | 45d664b3a8ec1bdef54acadbde6eb4ce83c75e33 | [
"Apache-2.0"
] | 40 | 2015-01-06T07:38:15.000Z | 2021-02-16T19:14:39.000Z | src/main/python/format-thresh-grid.py | utcompling/textgrounder | 45d664b3a8ec1bdef54acadbde6eb4ce83c75e33 | [
"Apache-2.0"
] | null | null | null | src/main/python/format-thresh-grid.py | utcompling/textgrounder | 45d664b3a8ec1bdef54acadbde6eb4ce83c75e33 | [
"Apache-2.0"
] | 10 | 2015-01-06T01:19:10.000Z | 2021-11-11T14:33:22.000Z | #!/usr/bin/env python
from nlputil import *
import fileinput
import re
switch_thresh_and_grid = True
errdists = dictdict()
for line in fileinput.input():
line = line.strip()
m = re.match(r'.*thresh: ([0-9.]*), grid: ([0-9.]*),.*true error distance.*\(([0-9.]*) km.*', line)
if not m:
errprint("Can't parse ... | 25 | 101 | 0.589714 |
56c407bfcd2ed5ebef40aab5ddeb784178957418 | 804 | py | Python | instructions/docker_build.py | gnubyte/publicServerAutomator | b26828519b72702119013061cdf881a4a353e9ed | [
"MIT"
] | null | null | null | instructions/docker_build.py | gnubyte/publicServerAutomator | b26828519b72702119013061cdf881a4a353e9ed | [
"MIT"
] | 1 | 2019-10-25T20:13:29.000Z | 2019-10-25T20:13:29.000Z | instructions/docker_build.py | gnubyte/publicServerAutomator | b26828519b72702119013061cdf881a4a353e9ed | [
"MIT"
] | null | null | null | # @Author: Patrick Hastings
# @Date 4-13-2018
# ----------------
import server
dockerInstructions = [
"apt-get update -y",
"apt-get install apt-transport-https -y",
"apt-get install software-properties-common -y",
"apt-get install curl -y",
"apt-get install gnupg2 -y",
"apt-get install git -... | 28.714286 | 115 | 0.672886 |
56c5a8cf4cfd02c84dde21b4def9e05ee3a6e235 | 2,300 | py | Python | .github/workflows/scripts/check_java_version.py | cezary986/hello-github-actions | 3f178fbc32c8b60d598e2fb0361f31c356ea7b66 | [
"MIT"
] | null | null | null | .github/workflows/scripts/check_java_version.py | cezary986/hello-github-actions | 3f178fbc32c8b60d598e2fb0361f31c356ea7b66 | [
"MIT"
] | 3 | 2020-05-12T10:39:35.000Z | 2020-05-12T11:24:05.000Z | .github/workflows/scripts/check_java_version.py | cezary986/hello-github-actions | 3f178fbc32c8b60d598e2fb0361f31c356ea7b66 | [
"MIT"
] | null | null | null | import sys
import os
import re
import json
import base64
REFERENCE_BRANCH_NAME = 'master'
GRADLE_FILE_PATH = './build.gradle'
GET_GRADLE_COMMAND = f'git show {REFERENCE_BRANCH_NAME} HEAD:{GRADLE_FILE_PATH}'
if __name__ == "__main__":
build_gradle_file = open(GRADLE_FILE_PATH, "r")
my_build_gradle_content = buil... | 28.04878 | 105 | 0.70087 |
56c5ef70296bb382eed3a3fbbc17a3fb2e997fc6 | 1,718 | py | Python | core/model.py | vab9/is-projekt-2016 | 538f5702b5c5f7eb4ddfb6a2330ed6b0a466db33 | [
"MIT"
] | null | null | null | core/model.py | vab9/is-projekt-2016 | 538f5702b5c5f7eb4ddfb6a2330ed6b0a466db33 | [
"MIT"
] | null | null | null | core/model.py | vab9/is-projekt-2016 | 538f5702b5c5f7eb4ddfb6a2330ed6b0a466db33 | [
"MIT"
] | null | null | null | from sqlalchemy.dialects.postgresql import JSONB
from serious_game import db
from flask import json
| 28.633333 | 64 | 0.608265 |
56c67af805accf44e8f758d5853f747ef0bec3dd | 87 | py | Python | Chapter 07/Chap07_Example7.96.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | Chapter 07/Chap07_Example7.96.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | Chapter 07/Chap07_Example7.96.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | myfruits = {"Apple", "Banana", "Grapes", "Litchi", "Mango"}
myfruits.remove('Guava')
| 29 | 60 | 0.632184 |
56c8d3f9c7f70d5f71a78b77175d41c19a277842 | 1,136 | py | Python | code/flask-final-project/toy_recommender.py | NargesEl/montessory_toy_recommender | 02e4fe3a5a748ae9ded5f28e5132eddd74ec18b7 | [
"MIT"
] | null | null | null | code/flask-final-project/toy_recommender.py | NargesEl/montessory_toy_recommender | 02e4fe3a5a748ae9ded5f28e5132eddd74ec18b7 | [
"MIT"
] | null | null | null | code/flask-final-project/toy_recommender.py | NargesEl/montessory_toy_recommender | 02e4fe3a5a748ae9ded5f28e5132eddd74ec18b7 | [
"MIT"
] | null | null | null | from sklearn.metrics.pairwise import cosine_similarity
import pandas as pd
import numpy as np
cs = cosine_similarity
df=pd.read_csv("df_final.csv")
def get_recommender(user_input):
""" This function produces the 5 top recommendations depending on user_input.
The user_input is the age group and skills selecte... | 29.894737 | 85 | 0.654049 |
56c8eb2e6f84e1fd36221e4ea22949db09e7aa25 | 194 | py | Python | config/context_processors.py | YaroslavChyhryn/WeatherReminder | 868e2956da2a4aa294471ceb8ea5b72289522491 | [
"MIT"
] | null | null | null | config/context_processors.py | YaroslavChyhryn/WeatherReminder | 868e2956da2a4aa294471ceb8ea5b72289522491 | [
"MIT"
] | 1 | 2017-04-22T22:45:17.000Z | 2017-08-13T14:52:01.000Z | config/context_processors.py | YaroslavChyhryn/WeatherReminder | 868e2956da2a4aa294471ceb8ea5b72289522491 | [
"MIT"
] | null | null | null | from django.conf import settings
| 21.555556 | 56 | 0.716495 |
56c8ffa3a63d380ce2bd61c7ed9d04022011894e | 793 | py | Python | evaluation/bin/utils/time_utils.py | ckorzen/pdf-text-extraction-benchmark | 47b456f7c5c445b5087200d2ce4051647a9cbbf6 | [
"MIT"
] | 34 | 2018-05-16T17:50:10.000Z | 2021-09-12T19:40:40.000Z | evaluation/bin/utils/time_utils.py | e-sim/pdf-text-extraction-benchmark | 42eede9867e5795a6fc040b0a7ce92da3ddd3120 | [
"MIT"
] | 1 | 2017-06-20T10:31:15.000Z | 2017-08-08T20:10:16.000Z | evaluation/bin/utils/time_utils.py | e-sim/pdf-text-extraction-benchmark | 42eede9867e5795a6fc040b0a7ce92da3ddd3120 | [
"MIT"
] | 10 | 2018-07-07T15:37:45.000Z | 2021-01-28T07:06:27.000Z | from datetime import datetime
time_pattern = "%H:%M:%S.%f (%Y-%m-%d)"
def format_time(time_in_ms):
"""
Formats the given time to human readable string.
"""
return datetime.fromtimestamp(time_in_ms / 1000).strftime(time_pattern)
def format_time_delta(time_in_ms):
"""
Formats the given time ... | 22.657143 | 75 | 0.616646 |
56ca1e265ad52858ba29fd79aa5275c28f935321 | 1,452 | py | Python | UmrConf.py | pzia/useful-meeting-reminder | 41b1bf6b0d57f8930700999503c1f0a66d78f0a6 | [
"MIT"
] | 2 | 2018-03-26T05:25:03.000Z | 2019-12-15T18:18:54.000Z | UmrConf.py | pzia/useful-meeting-reminder | 41b1bf6b0d57f8930700999503c1f0a66d78f0a6 | [
"MIT"
] | null | null | null | UmrConf.py | pzia/useful-meeting-reminder | 41b1bf6b0d57f8930700999503c1f0a66d78f0a6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#config
import configparser
#sys & os
import sys
import os.path
#set logging
import logging
logging.basicConfig(filename=os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), 'umr.log'),level=logging.DEBUG)
#Set locale
#FIXME : force French, should be in conf ?
import locale
locale.set... | 28.470588 | 120 | 0.685262 |
56ca763bb9fa3b6b3fb0286e4da0963af3f62d4c | 1,469 | py | Python | booking/models.py | thanderoy/HotelBookingSys | 5e2f769f75158ba271dfd10ed3850c4ca1364df3 | [
"BSD-2-Clause"
] | null | null | null | booking/models.py | thanderoy/HotelBookingSys | 5e2f769f75158ba271dfd10ed3850c4ca1364df3 | [
"BSD-2-Clause"
] | 1 | 2021-11-23T08:44:21.000Z | 2021-11-23T08:44:21.000Z | booking/models.py | thanderoy/HotelBookingSys | 5e2f769f75158ba271dfd10ed3850c4ca1364df3 | [
"BSD-2-Clause"
] | null | null | null | from django.db import models
from django.conf import settings
from django.urls import reverse
# Create your models here.
| 36.725 | 127 | 0.6855 |
56cac111416fbff81a0da1ddcab9b744748f8dba | 1,553 | py | Python | openstack-congress-9.0.0/congress/tests/datasources/test_datasource_utils.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 50 | 2015-04-21T14:12:01.000Z | 2020-06-01T06:23:13.000Z | congress/tests/datasources/test_datasource_utils.py | openstack-archive/congress | 85243abf63dfc7c086e28e9bdb3fb0b7c9d2ad94 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | congress/tests/datasources/test_datasource_utils.py | openstack-archive/congress | 85243abf63dfc7c086e28e9bdb3fb0b7c9d2ad94 | [
"Apache-2.0"
] | 25 | 2015-05-22T04:02:33.000Z | 2020-01-14T12:15:12.000Z | # Copyright (c) 2018 Canonical 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 ... | 39.820513 | 78 | 0.677399 |
56cafe9ab6961cde99a8cbe0764b3c9e232ee107 | 708 | py | Python | src/HABApp/openhab/connection_logic/connection.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 44 | 2018-12-13T08:46:44.000Z | 2022-03-07T03:23:21.000Z | src/HABApp/openhab/connection_logic/connection.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 156 | 2019-03-02T20:53:31.000Z | 2022-03-23T13:13:58.000Z | src/HABApp/openhab/connection_logic/connection.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 18 | 2019-03-08T07:13:21.000Z | 2022-03-22T19:52:31.000Z | from HABApp.openhab.connection_handler import http_connection
from ._plugin import on_connect, on_disconnect, setup_plugins
log = http_connection.log
| 26.222222 | 94 | 0.778249 |
56cc5909d4a0b0fbd45f01c0174498fa60e7dac7 | 2,349 | py | Python | src/operations/mouse.py | kbiters/infram | dcba92670e10046126a7ac2f97e2ee8c8da9d255 | [
"Apache-2.0"
] | 19 | 2021-08-03T12:30:37.000Z | 2021-08-30T14:00:16.000Z | src/operations/mouse.py | kbiters/infram | dcba92670e10046126a7ac2f97e2ee8c8da9d255 | [
"Apache-2.0"
] | null | null | null | src/operations/mouse.py | kbiters/infram | dcba92670e10046126a7ac2f97e2ee8c8da9d255 | [
"Apache-2.0"
] | 1 | 2021-08-12T22:06:01.000Z | 2021-08-12T22:06:01.000Z | import json
from random import randint, uniform
from time import sleep
import pyautogui
from src.service.constants import Config, Data, Message
from src.service.translator import translate
| 36.138462 | 98 | 0.55215 |
56cf63f6be5f6939930d8a50e929022411806fe2 | 5,051 | py | Python | userbot/plugins/Gban.py | techyminati/DeOXy | 014efbf6ba4ba31525f996e935279e8918c8ba96 | [
"Apache-2.0"
] | 1 | 2020-08-27T12:54:28.000Z | 2020-08-27T12:54:28.000Z | userbot/plugins/Gban.py | techyminati/DeOXy | 014efbf6ba4ba31525f996e935279e8918c8ba96 | [
"Apache-2.0"
] | null | null | null | userbot/plugins/Gban.py | techyminati/DeOXy | 014efbf6ba4ba31525f996e935279e8918c8ba96 | [
"Apache-2.0"
] | 6 | 2020-08-17T16:11:18.000Z | 2020-11-03T16:06:46.000Z | #Imported to DeOXy
from userbot import bot, BOTLOG_CHATID, ALIVE_NAME, CMD_LIST
import asyncio
from telethon import events
from telethon.tl.functions.channels import EditBannedRequest
from telethon.tl.types import (PeerChat, PeerChannel,ChannelParticipantsAdmins, ChatAdminRights,ChatBannedRights, MessageEntityMentionN... | 42.445378 | 276 | 0.586814 |
56d1baae92a4487b5f8b787ab8c93cbca8be0d2f | 3,063 | py | Python | tensorflow/10_cnn_mnist.py | zyf668/ml_code | fdd2d6c48550860fd481f7d128d41d95d946539b | [
"Apache-2.0"
] | 98 | 2017-12-29T13:14:29.000Z | 2021-12-19T06:00:11.000Z | tensorflow/10_cnn_mnist.py | zyf668/ml_code | fdd2d6c48550860fd481f7d128d41d95d946539b | [
"Apache-2.0"
] | 2 | 2017-12-06T06:20:35.000Z | 2021-09-29T09:03:49.000Z | tensorflow/10_cnn_mnist.py | zyf668/ml_code | fdd2d6c48550860fd481f7d128d41d95d946539b | [
"Apache-2.0"
] | 55 | 2018-01-08T04:00:18.000Z | 2022-03-25T02:45:56.000Z | # -*- coding: utf-8 -*-
# convolutional neural network
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('MNIST_data', one_hot=True)
# create weights
# create biases
# convolution
# pooling
# define placeholder for inputs to net... | 38.772152 | 96 | 0.680052 |
56d2522a49e86b2e4728adce4840ad5a7057579c | 2,355 | py | Python | main.py | jojotrujillo/in-office-light | 1e0d97db29338d5a9107a0d31b91485637539152 | [
"MIT"
] | null | null | null | main.py | jojotrujillo/in-office-light | 1e0d97db29338d5a9107a0d31b91485637539152 | [
"MIT"
] | null | null | null | main.py | jojotrujillo/in-office-light | 1e0d97db29338d5a9107a0d31b91485637539152 | [
"MIT"
] | null | null | null | import bluetooth
import time
import RPi.GPIO as GPIO
from bt_rssi import BluetoothRSSI
search_time = 10
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
THRESHOLD = (-13, 38)
# You can hardcode the desired device ID here as a string to skip the discovery stage
addr = "F4:AF:E7:72:CB:19"
b = BluetoothRSSI(addr=addr)
pr... | 35.149254 | 116 | 0.644586 |
56d37e60f98d9b7857b1ca2883f68f6edaeb8a1b | 6,514 | py | Python | mtuq/dataset/sac.py | junxie01/mtuq | 6adf9e983c221e788daf1dec26d028bc406ce4e6 | [
"BSD-2-Clause"
] | 1 | 2020-09-28T18:06:40.000Z | 2020-09-28T18:06:40.000Z | mtuq/dataset/sac.py | junxie01/mtuq | 6adf9e983c221e788daf1dec26d028bc406ce4e6 | [
"BSD-2-Clause"
] | null | null | null | mtuq/dataset/sac.py | junxie01/mtuq | 6adf9e983c221e788daf1dec26d028bc406ce4e6 | [
"BSD-2-Clause"
] | null | null | null |
import glob
import os
import warnings
import numpy as np
import obspy
import mtuq.dataset.base
from copy import deepcopy
from os.path import join
from obspy.core import Stream
from obspy.core.event import Origin
from obspy.geodetics import gps2dist_azimuth
from mtuq.util.signal import check_time_sampling
from mtuq.u... | 30.58216 | 79 | 0.576911 |
56d7a4f6c041d520526f4cef6be3c1d4315058cc | 5,259 | py | Python | clockngpn/cli/server.py | junquera/c-lock | 382f03fd81c1826bdf5c4ea05e8c7384dbbb571e | [
"MIT"
] | 13 | 2019-03-28T22:30:37.000Z | 2022-03-28T04:48:02.000Z | clockngpn/cli/server.py | junquera/toc-toc-ssh | 382f03fd81c1826bdf5c4ea05e8c7384dbbb571e | [
"MIT"
] | 2 | 2019-03-12T06:10:01.000Z | 2019-03-16T21:58:35.000Z | clockngpn/cli/server.py | junquera/toc-toc-ssh | 382f03fd81c1826bdf5c4ea05e8c7384dbbb571e | [
"MIT"
] | 2 | 2020-07-02T03:38:51.000Z | 2021-06-26T23:34:35.000Z | import clockngpn.totp as totp
from clockngpn.proc_worker import Event, Broker, ProcWorkerEvent
from clockngpn.ttp import TocTocPorts, TocTocPortsWorker
from queue import Queue
import time
import os
import logging
from clockngpn.bidi import OTPBidi
import signal
import argparse
log = logging.getLogger(__name__)
# ... | 28.427027 | 128 | 0.637003 |
56d9ce9e3fcbd7a37b87e6ee3644f57b43b23284 | 3,110 | py | Python | mopidy_frontend_for_adafruit_charlcdplate/Frontend.py | 9and3r/mopidy-frontend-for-adafruit-charlcdplate | 696e5f1c9174371907ef38ab3e00347ec7fb28e7 | [
"Apache-2.0"
] | null | null | null | mopidy_frontend_for_adafruit_charlcdplate/Frontend.py | 9and3r/mopidy-frontend-for-adafruit-charlcdplate | 696e5f1c9174371907ef38ab3e00347ec7fb28e7 | [
"Apache-2.0"
] | null | null | null | mopidy_frontend_for_adafruit_charlcdplate/Frontend.py | 9and3r/mopidy-frontend-for-adafruit-charlcdplate | 696e5f1c9174371907ef38ab3e00347ec7fb28e7 | [
"Apache-2.0"
] | null | null | null | import threading
from time import sleep
from mopidy import core
from MainScreen import MainScreen
from InputManager import InputManager
from DisplayObject import DisplayObject
import pykka
| 29.339623 | 104 | 0.668167 |