hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
58004c27d165d6df826a554942ad5fe8b353a09a | 990 | py | Python | methods_configuration/function_configuration.py | ekkrym/CovidTrendModel | 26f49b0e3bf18ef2de5f9ec15f85e8148618c135 | [
"MIT"
] | null | null | null | methods_configuration/function_configuration.py | ekkrym/CovidTrendModel | 26f49b0e3bf18ef2de5f9ec15f85e8148618c135 | [
"MIT"
] | null | null | null | methods_configuration/function_configuration.py | ekkrym/CovidTrendModel | 26f49b0e3bf18ef2de5f9ec15f85e8148618c135 | [
"MIT"
] | null | null | null | from autoregression import fit_forecasting_loglog, fit_forecasting_ar7_daily, fit_forecast_7ahead, fit_ar_7, fit_ar_log
from misc_methods import fit_spline_linear_extrapolation
from smoothing import simple_mirroring
from poly import poly_fit
from linearfit import linear_model_fit_predict
from poisson import poisso... | 45 | 120 | 0.735354 |
0bd216ea8924fb714f7118a26bfc04a4eb6e1a27 | 1,678 | py | Python | pygenomeworks/test/test_overlap_generator.py | pb-cdunn/GenomeWorks | 84f22f7e72c0fe8e5554d7ddfebf22c93ffb4610 | [
"Apache-2.0"
] | 160 | 2019-07-02T03:35:10.000Z | 2020-05-05T09:08:26.000Z | pygenomeworks/test/test_overlap_generator.py | pb-cdunn/GenomeWorks | 84f22f7e72c0fe8e5554d7ddfebf22c93ffb4610 | [
"Apache-2.0"
] | 253 | 2019-07-02T13:08:28.000Z | 2020-05-07T18:47:08.000Z | pygenomeworks/test/test_overlap_generator.py | pb-cdunn/GenomeWorks | 84f22f7e72c0fe8e5554d7ddfebf22c93ffb4610 | [
"Apache-2.0"
] | 54 | 2019-07-02T14:33:48.000Z | 2020-05-01T16:04:21.000Z | #
# Copyright 2019-2020 NVIDIA CORPORATION.
#
# 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 ... | 22.078947 | 74 | 0.581049 |
71cf70b25797c12f682b465a6d35b9c8b1dec4ee | 1,530 | py | Python | banco de dados/comparação.py | RutyRibeiro/bancoDeDados | 51d7789cd635b07417b2be56433d83837c32b66d | [
"MIT"
] | null | null | null | banco de dados/comparação.py | RutyRibeiro/bancoDeDados | 51d7789cd635b07417b2be56433d83837c32b66d | [
"MIT"
] | null | null | null | banco de dados/comparação.py | RutyRibeiro/bancoDeDados | 51d7789cd635b07417b2be56433d83837c32b66d | [
"MIT"
] | null | null | null | import mysql.connector
import csv
lista = []
with open('escolas.csv', encoding='utf-8', newline='') as csvfile:
spamreader = csv.reader(csvfile, delimiter=';', quotechar='|')
for row in spamreader:
dicionario={}
dicionario["grupo"]="A1_GRPECON = '{}'".format(row[0].strip())
dicionario["e... | 27.818182 | 133 | 0.508497 |
f3cff0c5990440235e8f6ce4e9fcdb51e657cc2b | 1,253 | py | Python | Advanced/pianoTilesBot/PianoTilesBot.py | Sanjulata19/Hacktoberfest_2021-1 | 720855c9e7e3d1ca04d409cc7defb29381e4a16a | [
"Apache-2.0"
] | 1 | 2021-10-31T14:33:09.000Z | 2021-10-31T14:33:09.000Z | Advanced/pianoTilesBot/PianoTilesBot.py | Sanjulata19/Hacktoberfest_2021-1 | 720855c9e7e3d1ca04d409cc7defb29381e4a16a | [
"Apache-2.0"
] | 4 | 2021-10-31T14:16:14.000Z | 2021-10-31T16:56:12.000Z | Advanced/pianoTilesBot/PianoTilesBot.py | Sanjulata19/Hacktoberfest_2021-1 | 720855c9e7e3d1ca04d409cc7defb29381e4a16a | [
"Apache-2.0"
] | 19 | 2021-10-30T06:23:49.000Z | 2021-10-31T14:51:04.000Z | # install all dependency with pip install -r requirements.txt
import mss
import pyautogui as gui
import time
# globals
x1, x2, x3, x4 = 874, 977, 1078, 1151
y = 360 # constant for mss function
start_y = 500
y2 = y # increse as the game speed increases
x_cords = [0, x2-x1, x3-x1, x4-x1]
score = 0
def screenShot(): # S... | 25.571429 | 73 | 0.593775 |
c12ce8a6f195238c1f4e1b04a353480b2c433230 | 110 | py | Python | second.py | ilsung98/coding-exam | 55bc41cd3be3c07c39a26aa5ab229377936394dc | [
"MIT"
] | null | null | null | second.py | ilsung98/coding-exam | 55bc41cd3be3c07c39a26aa5ab229377936394dc | [
"MIT"
] | null | null | null | second.py | ilsung98/coding-exam | 55bc41cd3be3c07c39a26aa5ab229377936394dc | [
"MIT"
] | null | null | null | num_list = list(map(int, input().split()))
high=max(num_list)
low=min(num_list)
print(low,sum(num_list),high) | 22 | 42 | 0.727273 |
333a67cbeb4fba8c24f2efb9b0145f4b2bf88118 | 6,327 | py | Python | src/pytestqt/plugin.py | cafhach/pytest-qt | 435efd2222c3454eaf05c2853d5efd01a83f84a1 | [
"MIT"
] | 252 | 2015-03-15T23:18:27.000Z | 2022-03-29T01:41:41.000Z | src/pytestqt/plugin.py | cafhach/pytest-qt | 435efd2222c3454eaf05c2853d5efd01a83f84a1 | [
"MIT"
] | 318 | 2015-03-25T04:05:01.000Z | 2022-03-11T23:01:06.000Z | src/pytestqt/plugin.py | cafhach/pytest-qt | 435efd2222c3454eaf05c2853d5efd01a83f84a1 | [
"MIT"
] | 84 | 2015-03-17T20:10:50.000Z | 2022-03-04T15:25:25.000Z | import pytest
from pytestqt.exceptions import (
_is_exception_capture_enabled,
_QtExceptionCaptureManager,
)
from pytestqt.logging import QtLoggingPlugin, _QtMessageCapture
from pytestqt.qt_compat import qt_api
from pytestqt.qtbot import QtBot, _close_widgets
@pytest.fixture(scope="session")
def qapp_args():... | 29.156682 | 83 | 0.691165 |
75227c5b9f54492db7e68b5ce6b021752e9e4a5a | 611 | py | Python | docs/src/db_mongodb.py | nullhack/fastapi-users | e850871e7935c460e9c169385dd7d42b45e0320c | [
"MIT"
] | null | null | null | docs/src/db_mongodb.py | nullhack/fastapi-users | e850871e7935c460e9c169385dd7d42b45e0320c | [
"MIT"
] | null | null | null | docs/src/db_mongodb.py | nullhack/fastapi-users | e850871e7935c460e9c169385dd7d42b45e0320c | [
"MIT"
] | null | null | null | import motor.motor_asyncio
from fastapi import FastAPI
from fastapi_users import models
from fastapi_users.db import MongoDBUserDatabase
class User(models.BaseUser):
pass
class UserCreate(User, models.BaseUserCreate):
pass
class UserUpdate(User, models.BaseUserUpdate):
pass
class UserDB(User, models... | 17.457143 | 49 | 0.772504 |
40d065fff07276c673745dfa8851569744730062 | 824 | py | Python | openpnm/algorithms/__init__.py | xu-kai-xu/OpenPNM | 61d5fc4729a0a29291cf6c53c07c4246e7a13714 | [
"MIT"
] | 2 | 2019-08-24T09:17:40.000Z | 2020-07-05T07:21:21.000Z | openpnm/algorithms/__init__.py | xu-kai-xu/OpenPNM | 61d5fc4729a0a29291cf6c53c07c4246e7a13714 | [
"MIT"
] | null | null | null | openpnm/algorithms/__init__.py | xu-kai-xu/OpenPNM | 61d5fc4729a0a29291cf6c53c07c4246e7a13714 | [
"MIT"
] | null | null | null | r"""
Collection of pre-defined algorithms
====================================
The ``algorithms`` module contains classes for conducting transport
simulations on pore networks.
"""
from ._mixins import *
from ._generic_algorithm import *
from ._generic_transport import *
from ._reactive_transport import *
from ._tr... | 22.888889 | 67 | 0.774272 |
9dcee743dd6f265714bbbdd6e4422b0d3fcb8730 | 4,545 | bzl | Python | internal/pkg_web/pkg_web.bzl | ankitects/rules_nodejs | 9a50cb694e39fba8874f991675ae7ca585108df5 | [
"Apache-2.0"
] | null | null | null | internal/pkg_web/pkg_web.bzl | ankitects/rules_nodejs | 9a50cb694e39fba8874f991675ae7ca585108df5 | [
"Apache-2.0"
] | 6 | 2021-09-02T20:32:14.000Z | 2022-03-02T10:59:15.000Z | internal/pkg_web/pkg_web.bzl | ankitects/rules_nodejs | 9a50cb694e39fba8874f991675ae7ca585108df5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 33.91791 | 133 | 0.663146 |
2c6d18cc4467f8a5079b79db81775e64851d230b | 199 | py | Python | ifitwala_ed/stock/doctype/price_list_country/price_list_country.py | mohsinalimat/ifitwala_ed | 8927695ed9dee36e56571c442ebbe6e6431c7d46 | [
"MIT"
] | 13 | 2020-09-02T10:27:57.000Z | 2022-03-11T15:28:46.000Z | ifitwala_ed/stock/doctype/price_list_country/price_list_country.py | mohsinalimat/ifitwala_ed | 8927695ed9dee36e56571c442ebbe6e6431c7d46 | [
"MIT"
] | 43 | 2020-09-02T07:00:42.000Z | 2021-07-05T13:22:58.000Z | ifitwala_ed/stock/doctype/price_list_country/price_list_country.py | mohsinalimat/ifitwala_ed | 8927695ed9dee36e56571c442ebbe6e6431c7d46 | [
"MIT"
] | 6 | 2020-10-19T01:02:18.000Z | 2022-03-11T15:28:47.000Z | # Copyright (c) 2021, ifitwala and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PriceListCountry(Document):
pass
| 22.111111 | 49 | 0.798995 |
21f937569de3b71d27acdafc0c848194a9caaca7 | 403 | py | Python | usage/middleware.py | jef79m/django-usage | b793609dd1bb58e85ecf4e70b712b7aa852ba666 | [
"BSD-3-Clause"
] | null | null | null | usage/middleware.py | jef79m/django-usage | b793609dd1bb58e85ecf4e70b712b7aa852ba666 | [
"BSD-3-Clause"
] | null | null | null | usage/middleware.py | jef79m/django-usage | b793609dd1bb58e85ecf4e70b712b7aa852ba666 | [
"BSD-3-Clause"
] | null | null | null | from .models import PageHit
from django.contrib.auth import get_user
class UsageMiddleware(object):
def process_request(self, request):
if request.user.is_authenticated():
PageHit.objects.create(
user=get_user(request),
requested_page=request.path_info,
... | 28.785714 | 59 | 0.632754 |
c7615f64d597953206ec47837640a1d4a62f35eb | 1,691 | py | Python | ceilometer/agent/discovery/tenant.py | Missxiaoguo/stx-ceilometer | a226b47216e76ec209818b900253d3c1f1ffc3aa | [
"Apache-2.0"
] | null | null | null | ceilometer/agent/discovery/tenant.py | Missxiaoguo/stx-ceilometer | a226b47216e76ec209818b900253d3c1f1ffc3aa | [
"Apache-2.0"
] | 1 | 2018-08-16T15:18:09.000Z | 2018-08-16T20:51:45.000Z | ceilometer/agent/discovery/tenant.py | Missxiaoguo/stx-ceilometer | a226b47216e76ec209818b900253d3c1f1ffc3aa | [
"Apache-2.0"
] | 3 | 2018-08-15T14:35:23.000Z | 2019-01-11T15:57:02.000Z | # Copyright 2014 Red Hat, 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 agreed to in writing... | 37.577778 | 79 | 0.674749 |
5c709e6229d8d873549e5d12febdc6ae7665de36 | 628 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/EXT/texture_mirror_clamp_to_edge.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/EXT/texture_mirror_clamp_to_edge.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/EXT/texture_mirror_clamp_to_edge.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GLES2 import _types as _cs
# End users want this...
from OpenGL.raw.GLES2._types import *
from OpenGL.raw.GLES2 import _errors
from OpenGL.constant import Constant as _C
... | 39.25 | 136 | 0.800955 |
06fb7423513e4f1479bde925b2dc6fc149745581 | 2,824 | py | Python | parlai/mturk/tasks/image_chat/igc_evals/task_configs/task_config_responses.py | ricsinaruto/ParlAI | 733b627ae456d6b11a2fc4624088a781bc6c1d03 | [
"MIT"
] | 258 | 2020-04-10T07:01:06.000Z | 2022-03-26T11:49:30.000Z | parlai/mturk/tasks/image_chat/igc_evals/task_configs/task_config_responses.py | ricsinaruto/ParlAI | 733b627ae456d6b11a2fc4624088a781bc6c1d03 | [
"MIT"
] | 33 | 2020-04-10T04:28:51.000Z | 2022-03-31T02:52:02.000Z | parlai/mturk/tasks/image_chat/igc_evals/task_configs/task_config_responses.py | ricsinaruto/ParlAI | 733b627ae456d6b11a2fc4624088a781bc6c1d03 | [
"MIT"
] | 43 | 2020-04-14T10:43:33.000Z | 2022-03-13T02:27:54.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
task_config = {}
"""A short and descriptive title about the kind of task the HIT contains.
On the Amazon Mechanical Turk web site, the HIT titl... | 37.157895 | 88 | 0.734773 |
47ae2f1b73ae062e4dd7d024d1a9e91742574254 | 14,196 | py | Python | mlg1categories/views.py | willianz7/mlg1noticias | b8793dd00835c477363d22f1be3b0ab939e9833e | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | null | null | null | mlg1categories/views.py | willianz7/mlg1noticias | b8793dd00835c477363d22f1be3b0ab939e9833e | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | null | null | null | mlg1categories/views.py | willianz7/mlg1noticias | b8793dd00835c477363d22f1be3b0ab939e9833e | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import render
import matplotlib.pyplot as plt
from sklearn.feature_extraction.text import TfidfVectorizer
import io
from PIL import Image
#cd django-dev
#source my_env/bin/activate
#alias python=python3
#python manage.py runserver localhost:8000
#abra o firefox e digite localhost:8000/MachineLearn... | 42.25 | 373 | 0.67998 |
4421abba8aec220a65f57b01107e36b13ad018f2 | 2,532 | py | Python | common/utils/requests.py | shapeshift-legacy/watchtower | c9cd5150f8549145f7de9b1ea820d548959350fe | [
"MIT"
] | null | null | null | common/utils/requests.py | shapeshift-legacy/watchtower | c9cd5150f8549145f7de9b1ea820d548959350fe | [
"MIT"
] | null | null | null | common/utils/requests.py | shapeshift-legacy/watchtower | c9cd5150f8549145f7de9b1ea820d548959350fe | [
"MIT"
] | null | null | null | import logging
import urllib3
import certifi
import json
logger = logging.getLogger('watchtower.common.utils.requests')
class HTTPError(Exception):
"""An error status was returned from the http request"""
pass
class RequestsUtil:
def get_multiple(self, urls):
responses = []
for url in url... | 36.171429 | 112 | 0.621643 |
41414affbe31372bebb2d733d02827b3ea84635c | 2,091 | py | Python | elkserver/docker/redelk-base/redelkinstalldata/scripts/modules/msteams/module.py | MikeKMiller/RedELK | 669794e81cbbccee40dfa8371c1312d5ed8fd211 | [
"BSD-3-Clause"
] | 1,863 | 2018-10-05T04:29:59.000Z | 2022-03-31T23:55:51.000Z | elkserver/docker/redelk-base/redelkinstalldata/scripts/modules/msteams/module.py | MikeKMiller/RedELK | 669794e81cbbccee40dfa8371c1312d5ed8fd211 | [
"BSD-3-Clause"
] | 164 | 2018-10-17T18:12:26.000Z | 2022-03-24T08:30:02.000Z | elkserver/docker/redelk-base/redelkinstalldata/scripts/modules/msteams/module.py | MikeKMiller/RedELK | 669794e81cbbccee40dfa8371c1312d5ed8fd211 | [
"BSD-3-Clause"
] | 332 | 2018-10-05T15:30:33.000Z | 2022-03-30T13:21:37.000Z | #!/usr/bin/python3
"""
Part of RedELK
This connector sends RedELK alerts via Microsoft Teams
Authors:
- Lorenzo Bernardi (@fastlorenzo)
"""
import logging
import pymsteams
import config
from modules.helpers import get_value, pprint
info = {
'version': 0.1,
'name': 'msteams connector',
'description': 'Th... | 33.190476 | 116 | 0.550454 |
c2b0468041d4fb0c9b739f521048cc076793d186 | 1,559 | py | Python | UnleashClient/periodic_tasks/send_metrics.py | hellohaptik/unleash-client-python | 8bd06318bcab0fc2ff0cd450d5a9416c228ccdc1 | [
"MIT"
] | null | null | null | UnleashClient/periodic_tasks/send_metrics.py | hellohaptik/unleash-client-python | 8bd06318bcab0fc2ff0cd450d5a9416c228ccdc1 | [
"MIT"
] | 10 | 2021-04-28T09:47:51.000Z | 2022-02-17T07:32:10.000Z | UnleashClient/periodic_tasks/send_metrics.py | hellohaptik/unleash-client-python | 8bd06318bcab0fc2ff0cd450d5a9416c228ccdc1 | [
"MIT"
] | 1 | 2022-02-15T19:21:29.000Z | 2022-02-15T19:21:29.000Z | import redis
import pickle
from collections import ChainMap
from datetime import datetime, timezone
from UnleashClient.api import send_metrics
from UnleashClient.constants import METRIC_LAST_SENT_TIME
def aggregate_and_send_metrics(url: str,
app_name: str,
... | 30.568627 | 70 | 0.56703 |
630901d09cc699aa8fe7e1647d81331dd6f0f673 | 322 | py | Python | test/test_onnx.py | fangyu1006/Lightweight-Face-Detector-With-Landmarks | e15e7f009d21e0b7098d75154bc0176c3cf44f71 | [
"MIT"
] | 12 | 2020-07-01T09:12:11.000Z | 2021-06-13T18:31:05.000Z | test/test_onnx.py | fangyu1006/Lightweight-Face-Detector-With-Landmarks | e15e7f009d21e0b7098d75154bc0176c3cf44f71 | [
"MIT"
] | null | null | null | test/test_onnx.py | fangyu1006/Lightweight-Face-Detector-With-Landmarks | e15e7f009d21e0b7098d75154bc0176c3cf44f71 | [
"MIT"
] | 2 | 2020-09-08T07:22:25.000Z | 2021-01-28T02:32:19.000Z | import onnxruntime as nxrun
import numpy as np
ximg = np.random.rand(1,3,240,320).astype(np.float32)
sess = nxrun.InferenceSession("./converted_models/mobilenet/mobilenet_sim.onnx")
input_name = sess.get_inputs()[0].name
output_name = sess.get_outputs()[0].name
result = sess.run(None, {input_name: ximg})
print(result... | 29.272727 | 80 | 0.767081 |
776d99a65ec0c6ee5b270dc369c217ad8fab0640 | 1,731 | py | Python | test/test_board.py | kirbysebastian/TicTacToe | 192c4e98127eedcf42844a24cd5577e773b6eab8 | [
"MIT"
] | 1 | 2021-01-31T08:00:22.000Z | 2021-01-31T08:00:22.000Z | test/test_board.py | kirbysebastian/TicTacToe | 192c4e98127eedcf42844a24cd5577e773b6eab8 | [
"MIT"
] | null | null | null | test/test_board.py | kirbysebastian/TicTacToe | 192c4e98127eedcf42844a24cd5577e773b6eab8 | [
"MIT"
] | null | null | null | import pytest
from tic_tac_toe.board import Board
def test_board_place_with_integer_pos():
board = Board()
out = board.place('*', 4)
assert out == False
def test_board_place_with_invalid_pos():
board = Board()
out = board.place('*', '0')
assert out == False
def test_board_place():
board... | 25.835821 | 58 | 0.590988 |
a53a6d8b85b3ce981d9dafeaacaf343245c82551 | 336 | py | Python | common_settings.py | avinassh/Reddit-GoodReads-Bot | 45d40920fa84d21f1b5f5893e9c8985c2495dfed | [
"MIT"
] | 35 | 2015-07-17T17:07:58.000Z | 2021-07-29T23:10:42.000Z | common_settings.py | avinassh/Reddit-GoodReads-Bot | 45d40920fa84d21f1b5f5893e9c8985c2495dfed | [
"MIT"
] | 3 | 2016-01-03T05:21:42.000Z | 2017-12-06T10:07:24.000Z | common_settings.py | avinassh/Reddit-GoodReads-Bot | 45d40920fa84d21f1b5f5893e9c8985c2495dfed | [
"MIT"
] | 8 | 2015-07-28T20:06:49.000Z | 2017-12-06T10:00:14.000Z | # Common, non secret settings
# Used in both for Docker and non-Docker deployments
# Check `settings_sample.py` or `docker_settings.py`
supported_subreddits = 'india+indianbooks+52in52+indianreaders'
user_agent = ('Goodreads, v0.1. Gives info of the book whenever goodreads'
'link to a book is posted. (by... | 42 | 74 | 0.738095 |
0530b9058c8c780742ff39b99f743d03a3a86075 | 22,465 | py | Python | instruments.py | rocketsaurus/pyemi | 24d733b5a2ff475964a31ff87c7b112e9c9831ad | [
"MIT"
] | null | null | null | instruments.py | rocketsaurus/pyemi | 24d733b5a2ff475964a31ff87c7b112e9c9831ad | [
"MIT"
] | null | null | null | instruments.py | rocketsaurus/pyemi | 24d733b5a2ff475964a31ff87c7b112e9c9831ad | [
"MIT"
] | null | null | null | import logging
from pathlib import Path
import time
import glob
import numpy as np
import pandas as pd
from ruamel.yaml import YAML
import visa
class BaseInstrument:
driver_folder = Path(__file__).parent.absolute() / Path('drivers')
def __init__(self, resource=None, driver=None, log_level=logging.CRITICAL, ... | 31.865248 | 115 | 0.590608 |
c04354b8e88e69033d83d96abfc37f58e5bbf4c8 | 7,453 | py | Python | adbutils/extra/minicap/__init__.py | hakaboom/adb-utils | deb6d62fc636be2969a641df613c1348ea889d6c | [
"Apache-2.0"
] | 24 | 2021-07-27T05:23:57.000Z | 2022-03-31T17:54:43.000Z | adbutils/extra/minicap/__init__.py | yundouguai/adb-utils | 1932f57cd45b14412b4894264f9aa237a09b3f32 | [
"Apache-2.0"
] | 13 | 2021-08-11T09:50:14.000Z | 2021-12-20T11:37:50.000Z | adbutils/extra/minicap/__init__.py | yundouguai/adb-utils | 1932f57cd45b14412b4894264f9aa237a09b3f32 | [
"Apache-2.0"
] | 12 | 2021-08-17T07:35:46.000Z | 2022-02-07T02:36:11.000Z | # -*- coding: utf-8 -*-
import time
import threading
from loguru import logger
from adbutils.constant import (ANDROID_TMP_PATH, MNC_REMOTE_PATH, MNC_SO_REMOTE_PATH, MNC_CMD, MNC_CAP_LOCAL_PATH,
MNC_LOCAL_NAME, MNC_LOCAL_PATH, MNC_SO_LOCAL_PATH)
from adbutils.extra.minicap.exceptions impo... | 31.447257 | 114 | 0.587012 |
94d506bdd976bd930b419b039ccab407e9d29abf | 6,099 | py | Python | catalyst/rl/offpolicy/algorithms/critic.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | 1 | 2019-11-26T06:41:33.000Z | 2019-11-26T06:41:33.000Z | catalyst/rl/offpolicy/algorithms/critic.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | null | null | null | catalyst/rl/offpolicy/algorithms/critic.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | 1 | 2021-12-20T07:32:25.000Z | 2021-12-20T07:32:25.000Z | from typing import Dict, Union # isort:skip
import copy
from catalyst.rl import utils
from catalyst.rl.core import (
ActorSpec, AlgorithmSpec, CriticSpec, EnvironmentSpec
)
from catalyst.rl.registry import AGENTS
class OffpolicyCritic(AlgorithmSpec):
def __init__(
self,
critic: CriticSpec,
... | 32.967568 | 78 | 0.606329 |
5fdf048733391e31248a0a83599c0cf14cfd3f2a | 11,452 | py | Python | tensorflow/python/eager/def_function_xla_jit_test.py | Mithilesh1609/tensorflow | 63f70b5611d7f50512ea26295d26016c2704901b | [
"Apache-2.0"
] | 8 | 2020-07-29T18:50:45.000Z | 2021-07-25T07:06:43.000Z | tensorflow/python/eager/def_function_xla_jit_test.py | 3ecurityy/tensorflow | f8c0e68a8aa5d575a19129ec67c9ed6262652082 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:14:36.000Z | 2022-02-10T05:39:47.000Z | tensorflow/python/eager/def_function_xla_jit_test.py | 3ecurityy/tensorflow | f8c0e68a8aa5d575a19129ec67c9ed6262652082 | [
"Apache-2.0"
] | 11 | 2020-05-31T13:14:56.000Z | 2021-12-14T04:39:25.000Z | # Copyright 2019 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.867925 | 80 | 0.668442 |
ec456a9461cfa53a2f0be8a212d2c2b9b280fe49 | 12,504 | py | Python | projectinfo/test.py | lifecake/Project-build-info | 6594c41933af3351d5ad62510cd84f004f675f9a | [
"Apache-2.0"
] | null | null | null | projectinfo/test.py | lifecake/Project-build-info | 6594c41933af3351d5ad62510cd84f004f675f9a | [
"Apache-2.0"
] | null | null | null | projectinfo/test.py | lifecake/Project-build-info | 6594c41933af3351d5ad62510cd84f004f675f9a | [
"Apache-2.0"
] | null | null | null | import json
#
# {
# "applicationId":"com.neulion.f",
# "applicationName":"f",
# "applicationVersion":"8.0602",
# "librarys": [
# {
# "libraryName":"track-core",
# "libraryVersion":"6"
# },{
# "libraryName":"track-ga",
# "libraryVersion":"6"
# },{
# "libraryNam... | 142.090909 | 9,437 | 0.678183 |
9e5c52b6cf5d1d4f09346b9729877dfc22605e0d | 922 | py | Python | src/cpapi/_api/__init__.py | cpcgskill/cpapi | 50ebd86637aec5aab47dff5561f1f1b54e967d64 | [
"Apache-2.0"
] | 1 | 2021-09-11T08:06:59.000Z | 2021-09-11T08:06:59.000Z | src/cpapi/_api/__init__.py | cpcgskill/cpapi | 50ebd86637aec5aab47dff5561f1f1b54e967d64 | [
"Apache-2.0"
] | null | null | null | src/cpapi/_api/__init__.py | cpcgskill/cpapi | 50ebd86637aec5aab47dff5561f1f1b54e967d64 | [
"Apache-2.0"
] | null | null | null | # -*-coding:utf-8 -*-
u"""
:创建时间: 2021/11/28 0:17
:作者: 苍之幻灵
:我的主页: https://cpcgskill.com
:QQ: 2921251087
:爱发电: https://afdian.net/@Phantom_of_the_Cang
:aboutcg: https://www.aboutcg.org/teacher/54335
:bilibili: https://space.bilibili.com/351598127
"""
import os
from . import _run_lib
from . import (OpenMaya,
... | 24.263158 | 47 | 0.52603 |
6cc12c1f2dfd67def08699f3e820417935576ccb | 342 | py | Python | app/migrations/0024_remove_submittedplaylist_playlist.py | kindweb223/React-Django-M3U8 | ee3edfabcf4e4423e96591df7cf42f8d89813292 | [
"Apache-2.0"
] | 1 | 2020-12-28T07:54:05.000Z | 2020-12-28T07:54:05.000Z | app/migrations/0024_remove_submittedplaylist_playlist.py | kindweb223/React-Django-M3U8 | ee3edfabcf4e4423e96591df7cf42f8d89813292 | [
"Apache-2.0"
] | 11 | 2020-06-05T17:35:01.000Z | 2022-02-26T07:00:16.000Z | app/migrations/0024_remove_submittedplaylist_playlist.py | kindweb223/React-Django-M3U8 | ee3edfabcf4e4423e96591df7cf42f8d89813292 | [
"Apache-2.0"
] | 1 | 2021-11-02T11:35:45.000Z | 2021-11-02T11:35:45.000Z | # Generated by Django 2.0.6 on 2018-06-10 13:04
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0023_remove_channel_playlist'),
]
operations = [
migrations.RemoveField(
model_name='submittedplaylist',
name='playli... | 19 | 48 | 0.608187 |
a1b794740acbca6a99e4484cd005846cd5cb76ca | 1,093 | py | Python | iotbx/regression/tst_reindex.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | iotbx/regression/tst_reindex.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | iotbx/regression/tst_reindex.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import division
import libtbx.load_env
from libtbx.test_utils import approx_equal
from libtbx.utils import null_out
import os
def exercise():
hkl_file = libtbx.env.find_in_repositories(
relative_path="phenix_regression/reflection_files/1yjp.mtz",
test=os.path.isfile)
if (hkl_file is None):... | 35.258065 | 74 | 0.73559 |
19bb171a1474b58de771aad125a56f8f720398f4 | 2,605 | py | Python | test/integration/ggrc/models/mixins/test_stateful.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-01-12T23:46:00.000Z | 2019-01-12T23:46:00.000Z | test/integration/ggrc/models/mixins/test_stateful.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/integration/ggrc/models/mixins/test_stateful.py | MikalaiMikalalai/ggrc-core | f0f83b3638574bb64de474f3b70ed27436ca812a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Integration test for Stateful mixin."""
import ddt
from integration.ggrc import api_helper
from integration.ggrc.query_helper import WithQueryApi
from integration.ggrc import TestCase
from integration.g... | 26.05 | 78 | 0.651056 |
c885f0065000b73ac53a35b722ccb4a73be07dd2 | 460 | py | Python | askbotopenmooc/wsgi.py | OpenMOOC/askbot-openmooc | 8534e435247b6217d5cbc62b9eac15c8f75eba62 | [
"Apache-2.0"
] | 3 | 2015-03-17T09:17:43.000Z | 2017-02-06T21:18:42.000Z | askbotopenmooc/wsgi.py | OpenMOOC/askbot-openmooc | 8534e435247b6217d5cbc62b9eac15c8f75eba62 | [
"Apache-2.0"
] | null | null | null | askbotopenmooc/wsgi.py | OpenMOOC/askbot-openmooc | 8534e435247b6217d5cbc62b9eac15c8f75eba62 | [
"Apache-2.0"
] | 2 | 2016-08-02T15:44:30.000Z | 2017-07-17T05:11:35.000Z | import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'askbotopenmooc.settings'
try:
localsettings = os.environ['LOCAL_SETTINGS_PATH']
sys.path.insert(0, localsettings)
except:
sys.path.insert(0, '/etc/openmooc/askbot')
sys.path.insert(0, os.getcwd())
def application(environ, start_response):
... | 27.058824 | 64 | 0.752174 |
9053ec91cc1458d45f6bb059cae38cde098208b5 | 3,540 | py | Python | plenum/test/view_change/test_catchup_to_next_view_during_view_change_by_primary.py | Toktar/indy-plenum | 2f1f838332b0506f8dd8837ac341cba0cd3f7ff4 | [
"Apache-2.0"
] | null | null | null | plenum/test/view_change/test_catchup_to_next_view_during_view_change_by_primary.py | Toktar/indy-plenum | 2f1f838332b0506f8dd8837ac341cba0cd3f7ff4 | [
"Apache-2.0"
] | null | null | null | plenum/test/view_change/test_catchup_to_next_view_during_view_change_by_primary.py | Toktar/indy-plenum | 2f1f838332b0506f8dd8837ac341cba0cd3f7ff4 | [
"Apache-2.0"
] | null | null | null | import pytest
from plenum.common.constants import DOMAIN_LEDGER_ID
from plenum.test.delayers import delay_for_view
from plenum.test.helper import checkViewNoForNodes, sdk_send_random_and_check, waitForViewChange, view_change_timeout
from plenum.test.node_catchup.helper import ensure_all_nodes_have_same_data
from plenu... | 49.859155 | 117 | 0.716384 |
004554929c99fa509481a37e5de1141e0426118d | 290 | py | Python | tag/player.py | kendase3/every | 83b543c54a2dd071f0a34f128c5baa20a7e58def | [
"BSD-2-Clause"
] | 1 | 2017-06-12T18:36:20.000Z | 2017-06-12T18:36:20.000Z | tag/player.py | kendase3/every | 83b543c54a2dd071f0a34f128c5baa20a7e58def | [
"BSD-2-Clause"
] | null | null | null | tag/player.py | kendase3/every | 83b543c54a2dd071f0a34f128c5baa20a7e58def | [
"BSD-2-Clause"
] | null | null | null |
# remember that ord('@') trick
class Player:
def __init__(self, id, color, isIt, x, y):
self.id = id
self.color = color
self.isIt = isIt
self.x = x
self.y = y
def __repr__(self):
return "hi!"
#return "number=%d" % self.number
def __str__(self):
return repr(self)
| 16.111111 | 43 | 0.617241 |
860fefe5014696d7380eb92e0af086e6a1d8085e | 272 | py | Python | packages/task-scheduler/task_scheduler/models/pydantic_models.py | baviera08/romi-dashboard | ac3a15014ad3c3bdac523a6550934a06653cfba1 | [
"Apache-2.0"
] | null | null | null | packages/task-scheduler/task_scheduler/models/pydantic_models.py | baviera08/romi-dashboard | ac3a15014ad3c3bdac523a6550934a06653cfba1 | [
"Apache-2.0"
] | 1 | 2020-12-01T20:25:32.000Z | 2020-12-01T20:25:32.000Z | packages/task-scheduler/task_scheduler/models/pydantic_models.py | baviera08/romi-dashboard | ac3a15014ad3c3bdac523a6550934a06653cfba1 | [
"Apache-2.0"
] | null | null | null | from tortoise.contrib.pydantic import pydantic_model_creator
from .tortoise_models import ScheduledTask, TaskRule
TaskRule_Pydantic = pydantic_model_creator(TaskRule, name="TaskRule")
ScheduledTask_Pydantic = pydantic_model_creator(ScheduledTask, name="ScheduledTask")
| 34 | 84 | 0.860294 |
88bb448b81e46bbc9a0dae96a3587159507bff06 | 1,724 | py | Python | detect_scale.py | PBrockmann/StripesCounter | cd1d3daf8da335308659c24facaa373917e8942f | [
"MIT"
] | 2 | 2021-02-05T17:40:25.000Z | 2021-12-01T02:45:38.000Z | detect_scale.py | PBrockmann/StripesCounter | cd1d3daf8da335308659c24facaa373917e8942f | [
"MIT"
] | 8 | 2021-04-06T19:47:41.000Z | 2021-05-17T15:08:21.000Z | detect_scale.py | PBrockmann/StripesCounter | cd1d3daf8da335308659c24facaa373917e8942f | [
"MIT"
] | 1 | 2021-04-06T18:29:35.000Z | 2021-04-06T18:29:35.000Z | #!/usr/bin/env python
#=================================================================
# Author: Patrick Brockmann CEA/DRF/LSCE - Feb 2021
#=================================================================
# Test detection of the scale
# Usage: ./detect_scale.py BEL17-2-2_1.35x_haut0001.png
#----------------------... | 32.528302 | 68 | 0.486079 |
6d8e8c6647762a04790ce5563cba9ab7ff98c2d8 | 150 | py | Python | python/json_/json_example.py | SnoopJeDi/playground | 73fab4a38ceeff3da23683e3dd1cb1b3a74cf4cf | [
"MIT"
] | null | null | null | python/json_/json_example.py | SnoopJeDi/playground | 73fab4a38ceeff3da23683e3dd1cb1b3a74cf4cf | [
"MIT"
] | null | null | null | python/json_/json_example.py | SnoopJeDi/playground | 73fab4a38ceeff3da23683e3dd1cb1b3a74cf4cf | [
"MIT"
] | null | null | null | import json
from pprint import pprint
if __name__ == "__main__":
with open("data.json", "r") as f:
data = json.load(f)
pprint(data)
| 16.666667 | 37 | 0.62 |
b68ca9021b65b1f601a184f6b0131e7bc2195fe9 | 14,306 | py | Python | tests/api/v3_1_1/test_sg_vn_mapping.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 36 | 2021-05-18T16:24:19.000Z | 2022-03-05T13:44:41.000Z | tests/api/v3_1_1/test_sg_vn_mapping.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 15 | 2021-06-08T19:03:37.000Z | 2022-02-25T14:47:33.000Z | tests/api/v3_1_1/test_sg_vn_mapping.py | CiscoISE/ciscoisesdk | 860b0fc7cc15d0c2a39c64608195a7ab3d5f4885 | [
"MIT"
] | 6 | 2021-06-10T09:32:01.000Z | 2022-01-12T08:34:39.000Z | # -*- coding: utf-8 -*-
"""IdentityServicesEngineAPI sg_vn_mapping API fixtures and tests.
Copyright (c) 2021 Cisco and/or its affiliates.
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 ... | 30.117895 | 109 | 0.707815 |
a719325853ab2aeab1138ecb6282d2dccae7971f | 1,171 | py | Python | test/test_validation.py | rpgoldman/pySBOL3 | 0f1ea8d56466206d38561d0cca8207bda1bc96bc | [
"MIT"
] | 14 | 2020-09-14T20:28:08.000Z | 2022-01-23T13:04:31.000Z | test/test_validation.py | rpgoldman/pySBOL3 | 0f1ea8d56466206d38561d0cca8207bda1bc96bc | [
"MIT"
] | 203 | 2020-05-13T16:15:21.000Z | 2022-03-24T17:40:09.000Z | test/test_validation.py | rpgoldman/pySBOL3 | 0f1ea8d56466206d38561d0cca8207bda1bc96bc | [
"MIT"
] | 8 | 2020-07-29T16:37:19.000Z | 2022-03-23T12:22:55.000Z | import unittest
import sbol3
class TestValidationReport(unittest.TestCase):
def test_boolean(self):
# False if no errors or warnings
report = sbol3.ValidationReport()
self.assertEqual(False, bool(report))
# True if any errors
report.addError(None, None, 'Fake error')
... | 31.648649 | 57 | 0.643894 |
8d0a0b143a8fb9def345f5930ec29e2c2448ea79 | 24,363 | py | Python | opentelemetry-exporter-gcp-monitoring/tests/test_cloud_monitoring.py | manojpandey/opentelemetry-operations-python | d4ca1f1ff7186bf76ea53e2ee3fdfb97f897e84b | [
"Apache-2.0"
] | null | null | null | opentelemetry-exporter-gcp-monitoring/tests/test_cloud_monitoring.py | manojpandey/opentelemetry-operations-python | d4ca1f1ff7186bf76ea53e2ee3fdfb97f897e84b | [
"Apache-2.0"
] | null | null | null | opentelemetry-exporter-gcp-monitoring/tests/test_cloud_monitoring.py | manojpandey/opentelemetry-operations-python | d4ca1f1ff7186bf76ea53e2ee3fdfb97f897e84b | [
"Apache-2.0"
] | null | null | null | # pylint: disable=too-many-statements
# Copyright 2021 The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 34.121849 | 79 | 0.547962 |
b2e17f23a4ec1b82369713ea51c54e2366ce05e0 | 3,103 | py | Python | test/unit/applications/lang/java.py | devnexen/unit | d65a66f9d813294917822554311281c5e1a7126b | [
"Apache-2.0"
] | 1 | 2021-03-08T05:11:13.000Z | 2021-03-08T05:11:13.000Z | test/unit/applications/lang/java.py | devnexen/unit | d65a66f9d813294917822554311281c5e1a7126b | [
"Apache-2.0"
] | null | null | null | test/unit/applications/lang/java.py | devnexen/unit | d65a66f9d813294917822554311281c5e1a7126b | [
"Apache-2.0"
] | null | null | null | import glob
import os
import shutil
import subprocess
import pytest
from unit.applications.proto import TestApplicationProto
from unit.option import option
class TestApplicationJava(TestApplicationProto):
application_type = "java"
def prepare_env(self, script):
app_path = option.temp_dir + '/java'
... | 28.731481 | 76 | 0.461811 |
c1343b86c95800f1c2ed39765720eb12c94274c1 | 33,699 | py | Python | JSSPproblem.py | zangzelin/HDNNMv2.0 | 6704119f9354986cf16dff267c754db0bf78d640 | [
"MIT"
] | 6 | 2019-03-12T05:35:17.000Z | 2020-02-13T18:27:13.000Z | JSSPproblem.py | Chupeng24/HDNNMv2.0 | 6704119f9354986cf16dff267c754db0bf78d640 | [
"MIT"
] | null | null | null | JSSPproblem.py | Chupeng24/HDNNMv2.0 | 6704119f9354986cf16dff267c754db0bf78d640 | [
"MIT"
] | 4 | 2019-03-12T05:36:06.000Z | 2021-03-09T13:41:00.000Z | import copy
import random
import time
# from __future__ import print_function
from itertools import combinations, permutations
# import guchoose
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# Import Python wrapper for or-tools constraint solver.
from ortools.constraint_solver import pywrapcp... | 38.513143 | 120 | 0.501439 |
9b5a8f1b4102d499bd26a90d822f7e95d987f48f | 45,161 | py | Python | python/akg/utils/kernel_exec.py | nn4ip/akg | 4ca2d3fa46f172246ad8275f8c171ae85d0c7dd2 | [
"Apache-2.0"
] | null | null | null | python/akg/utils/kernel_exec.py | nn4ip/akg | 4ca2d3fa46f172246ad8275f8c171ae85d0c7dd2 | [
"Apache-2.0"
] | null | null | null | python/akg/utils/kernel_exec.py | nn4ip/akg | 4ca2d3fa46f172246ad8275f8c171ae85d0c7dd2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
# Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 36.332261 | 120 | 0.615221 |
4b87eb9e4d08a1f94537f4fb14b275fbcabe4ff3 | 202 | py | Python | fbpcs/pc_pre_validation/__init__.py | joe1234wu/fbpcs | c9f57bf1b65adcbe39c6676ade5fc89e81dc5979 | [
"MIT"
] | 24 | 2021-08-24T09:30:18.000Z | 2022-03-28T20:51:01.000Z | fbpcs/pc_pre_validation/__init__.py | joe1234wu/fbpcs | c9f57bf1b65adcbe39c6676ade5fc89e81dc5979 | [
"MIT"
] | 142 | 2021-08-16T23:49:27.000Z | 2022-03-31T21:05:04.000Z | fbpcs/pc_pre_validation/__init__.py | joe1234wu/fbpcs | c9f57bf1b65adcbe39c6676ade5fc89e81dc5979 | [
"MIT"
] | 23 | 2021-09-10T22:55:04.000Z | 2022-03-25T18:11:25.000Z | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
| 33.666667 | 65 | 0.752475 |
51b8379e1c2e4cc4657663b6e8dbd0b2612b5c41 | 2,449 | py | Python | goXSS.py | filipesam/goXSS | eae5d56c3a750ba47a2b5bcf242ba6d9916dfbbd | [
"MIT"
] | null | null | null | goXSS.py | filipesam/goXSS | eae5d56c3a750ba47a2b5bcf242ba6d9916dfbbd | [
"MIT"
] | null | null | null | goXSS.py | filipesam/goXSS | eae5d56c3a750ba47a2b5bcf242ba6d9916dfbbd | [
"MIT"
] | null | null | null | import sys, random, string, httplib, requests, getopt, re
def usage():
print "goXSS.py -u <attackurl> -o <outputfile>"
#simple payloadgenerator
def generatePayload():
global varRandomString
varRandomString = "".join(random.sample(string.ascii_uppercase, 8))
print "-" * 65
print "Random string gene... | 28.811765 | 71 | 0.585953 |
5ba9fb5d05b27339d924bfe42c0e6ba0c2c68da3 | 10,985 | py | Python | models/match/multiview-simnet/model.py | seiriosPlus/PaddleRec | 2101532f8444783c68c4d545e5fc556a14a460a0 | [
"Apache-2.0"
] | null | null | null | models/match/multiview-simnet/model.py | seiriosPlus/PaddleRec | 2101532f8444783c68c4d545e5fc556a14a460a0 | [
"Apache-2.0"
] | null | null | null | models/match/multiview-simnet/model.py | seiriosPlus/PaddleRec | 2101532f8444783c68c4d545e5fc556a14a460a0 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle 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... | 36.374172 | 116 | 0.593446 |
7f797c552beb18902c986182c04e291a8f147e2e | 618 | py | Python | pymanopt/tools/autodiff/_backend.py | calincru/pymanopt | 3eb4696ea7fc62e89905409afadc3d905b36ed30 | [
"BSD-3-Clause"
] | 21 | 2020-06-18T20:35:33.000Z | 2022-03-29T16:46:08.000Z | pymanopt/tools/autodiff/_backend.py | leonbottou/pymanopt | 7d8c46f4513c3746234ba804604694b11db62d0a | [
"BSD-3-Clause"
] | null | null | null | pymanopt/tools/autodiff/_backend.py | leonbottou/pymanopt | 7d8c46f4513c3746234ba804604694b11db62d0a | [
"BSD-3-Clause"
] | 3 | 2021-03-30T09:08:57.000Z | 2022-03-24T07:53:21.000Z | from functools import wraps
def assert_backend_available(f):
@wraps(f)
def inner(backend, *args, **kwargs):
if not backend.is_available():
raise RuntimeError(
"Backend `{:s}` is not available".format(str(backend)))
return f(backend, *args, **kwargs)
return inner... | 22.888889 | 71 | 0.635922 |
607d202aba2d5ec60a2a22d9ae462f7a144a7a1d | 544 | py | Python | demo_numpy.py | gmunozhe/astr-119-session-4 | 3ee9f816587797b8a8580112b95f886e793791bd | [
"MIT"
] | null | null | null | demo_numpy.py | gmunozhe/astr-119-session-4 | 3ee9f816587797b8a8580112b95f886e793791bd | [
"MIT"
] | null | null | null | demo_numpy.py | gmunozhe/astr-119-session-4 | 3ee9f816587797b8a8580112b95f886e793791bd | [
"MIT"
] | null | null | null | import numpy as np
x = 1.0 #define a float
y = 2.0 #define another float
#trig
print(np.sin(x)) #sin(x)
print(np.cos(x)) #cos(x)
print(np.tan(x)) #tan(x)
print(np.arcsin(x)) #arcsin(x)
print(np.arccos(x)) #arccos(x)
print(np.arctan(x)) #arctan(x)
print(np.arctan2(x,y)) #arctan(x/y)
print(np.rad2deg(x)) #con... | 24.727273 | 41 | 0.654412 |
5ace0dcec041557ef65f26f30f329a4ea04e3288 | 1,084 | py | Python | dimsim/tests/test_dimsim.py | blowsfire/DimSim | d81a552f9b21a547c0b39ceffe0a596e289da9f4 | [
"Apache-2.0"
] | 82 | 2018-11-07T08:03:50.000Z | 2022-03-17T14:53:29.000Z | dimsim/tests/test_dimsim.py | blowsfire/DimSim | d81a552f9b21a547c0b39ceffe0a596e289da9f4 | [
"Apache-2.0"
] | 11 | 2019-01-24T02:57:02.000Z | 2021-03-05T06:11:10.000Z | dimsim/tests/test_dimsim.py | blowsfire/DimSim | d81a552f9b21a547c0b39ceffe0a596e289da9f4 | [
"Apache-2.0"
] | 23 | 2018-12-10T10:19:10.000Z | 2022-03-10T09:54:17.000Z | # -*- coding: utf-8 -*-
# Standard libs
import io
import os
# Dependencies
import pytest
# The module to test
from dimsim.core.model import get_distance, get_candidates
def test_distance_near():
dist = get_distance(u'大侠',u'大虾')
assert dist == 0.0002380952380952381
def test_distance_far():
di... | 27.794872 | 71 | 0.644834 |
158181450ce624f5f615bc988aaa119ded2e7b43 | 4,605 | py | Python | tenant_schemas/middleware.py | BillSchumacher/django-tenant-schemas | a4e3cdce3465fe7572f5cb8e84b7699386582c38 | [
"MIT"
] | null | null | null | tenant_schemas/middleware.py | BillSchumacher/django-tenant-schemas | a4e3cdce3465fe7572f5cb8e84b7699386582c38 | [
"MIT"
] | 1 | 2022-02-19T22:48:12.000Z | 2022-02-19T22:48:12.000Z | tenant_schemas/middleware.py | BillSchumacher/django-tenant-schemas | a4e3cdce3465fe7572f5cb8e84b7699386582c38 | [
"MIT"
] | null | null | null | import django
from django.conf import settings
from django.core.exceptions import DisallowedHost
from django.db import connection
from django.http import Http404
from tenant_schemas.utils import (
get_public_schema_name,
get_tenant_model,
remove_www,
)
"""
These middlewares should be placed at the very to... | 33.613139 | 91 | 0.692725 |
b81abac88477bd0299011f5c1591650394a83ea8 | 1,185 | py | Python | plugins/extract/detect/manual.py | RedPillGroup/RedPillFaceSwap | 2313d4fe0e6e7b579ce450d556ad4fd6bd0cbed6 | [
"MIT"
] | 1 | 2020-04-14T22:16:50.000Z | 2020-04-14T22:16:50.000Z | plugins/extract/detect/manual.py | RedPillGroup/RedPillFaceSwap | 2313d4fe0e6e7b579ce450d556ad4fd6bd0cbed6 | [
"MIT"
] | null | null | null | plugins/extract/detect/manual.py | RedPillGroup/RedPillFaceSwap | 2313d4fe0e6e7b579ce450d556ad4fd6bd0cbed6 | [
"MIT"
] | 2 | 2020-04-14T22:17:09.000Z | 2020-10-30T03:01:13.000Z | #!/usr/bin/env python3
""" Manual face detection plugin """
from ._base import Detector, dlib
class Detect(Detector):
""" Manual Detector """
def __init__(self, **kwargs):
super().__init__(**kwargs)
def set_model_path(self):
""" No model required for Manual Detector """
return No... | 30.384615 | 71 | 0.538397 |
a1cfce7bd9c169353199d420666a73fafeeb2112 | 1,511 | py | Python | alipay/aop/api/domain/AlipayDataDataserviceAntdacEasyserviceQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayDataDataserviceAntdacEasyserviceQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayDataDataserviceAntdacEasyserviceQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
class AlipayDataDataserviceAntdacEasyserviceQueryModel(object):
def __init__(self):
self._method_id = None
self._parameter_json = None
@property
def method_id(sel... | 26.982143 | 79 | 0.621443 |
68bcd8c281d7dc2f7bd7b869d529645ea319cddc | 2,128 | py | Python | utils/dpbench_datagen/kmeans/generate_data_random.py | geexie/dpbench | 7d41409ded3c816f35003bc5aea071852bceb892 | [
"BSD-2-Clause"
] | 8 | 2021-03-26T15:17:58.000Z | 2022-01-21T21:56:19.000Z | utils/dpbench_datagen/kmeans/generate_data_random.py | geexie/dpbench | 7d41409ded3c816f35003bc5aea071852bceb892 | [
"BSD-2-Clause"
] | 22 | 2021-03-30T21:20:57.000Z | 2022-02-22T13:42:17.000Z | utils/dpbench_datagen/kmeans/generate_data_random.py | geexie/dpbench | 7d41409ded3c816f35003bc5aea071852bceb892 | [
"BSD-2-Clause"
] | 7 | 2021-03-23T11:00:43.000Z | 2022-02-02T12:28:55.000Z | import numpy as np
try:
import numpy.random_intel as rnd
except:
import numpy.random as rnd
# constants used for input data generation
SEED = 7777777
XL = 1.0
XH = 5.0
# write input data to a file in binary format
def __dump_binary__(X, arrayPclusters, arrayC, arrayCsum, arrayCnumpoint):
with open("X.bin... | 31.294118 | 100 | 0.654135 |
241c12e14dbb5788f2ef3baaa2c49ec7834ffd7f | 640 | py | Python | backend/manage.py | crowdbotics-apps/solitary-scene-29128 | 2a516e2a2175f144c83f85110a3ebc7dbe364bd6 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/solitary-scene-29128 | 2a516e2a2175f144c83f85110a3ebc7dbe364bd6 | [
"FTL",
"AML",
"RSA-MD"
] | 15 | 2021-07-24T22:01:20.000Z | 2021-07-24T22:01:26.000Z | backend/manage.py | crowdbotics-apps/solitary-scene-29128 | 2a516e2a2175f144c83f85110a3ebc7dbe364bd6 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'solitary_scene_29128.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
... | 29.090909 | 84 | 0.689063 |
dbcf4cbdaa6a29b778ce2262a0a2bb25fb13a7bc | 24,816 | py | Python | solaris/files/usr/local/bin/diskmap.py | rafie/zfs-on-solaris-setup | cd777d1420b3de0af4342dedd1038e9e96509b0a | [
"MIT"
] | null | null | null | solaris/files/usr/local/bin/diskmap.py | rafie/zfs-on-solaris-setup | cd777d1420b3de0af4342dedd1038e9e96509b0a | [
"MIT"
] | null | null | null | solaris/files/usr/local/bin/diskmap.py | rafie/zfs-on-solaris-setup | cd777d1420b3de0af4342dedd1038e9e96509b0a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###########################
# Please go to https://github.com/swacquie/DiskMap
###########################
VERSION="0.11b"
import subprocess, re, os, sys, readline, cmd, pickle, glob
from pprint import pformat, pprint
pj = os.path.join
from socket import gethostname
hostname = gethostname()
... | 41.637584 | 153 | 0.507012 |
d3b6a51bcd5a4eadc3a1a9f78385e7817002eb6a | 121,919 | py | Python | tensorflow/python/framework/test_util.py | devsangwoo/tensor | 066592c9f9cdf4acdd1b9b104766271133e9088e | [
"Apache-2.0"
] | 1 | 2020-01-12T14:38:34.000Z | 2020-01-12T14:38:34.000Z | tensorflow/python/framework/test_util.py | devsangwoo/tensor | 066592c9f9cdf4acdd1b9b104766271133e9088e | [
"Apache-2.0"
] | null | null | null | tensorflow/python/framework/test_util.py | devsangwoo/tensor | 066592c9f9cdf4acdd1b9b104766271133e9088e | [
"Apache-2.0"
] | null | null | null | <<<<<<< HEAD
# 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 requir... | 35.20618 | 112 | 0.669797 |
ff86d75b923d4bd935e96a15be2d0bdef2854ae4 | 5,130 | py | Python | src/tools/tools.py | Blackdevil132/machineLearning | de048bb1473994052f8ed1afb11a15b7833b506d | [
"MIT"
] | 1 | 2019-05-04T07:28:19.000Z | 2019-05-04T07:28:19.000Z | src/tools/tools.py | Blackdevil132/machineLearning | de048bb1473994052f8ed1afb11a15b7833b506d | [
"MIT"
] | 3 | 2019-04-29T09:20:11.000Z | 2019-04-29T09:23:22.000Z | src/tools/tools.py | Blackdevil132/machineLearning | de048bb1473994052f8ed1afb11a15b7833b506d | [
"MIT"
] | null | null | null | import math
import sys
import time
def statusBar(iteration, total_episodes):
bar_len = 60
filled_len = int(round(bar_len * iteration / total_episodes))
percents = 100 * iteration / total_episodes
bar = '=' * filled_len + '-' * (bar_len - filled_len)
sys.stdout.write('\r[%s] %s%%\n' % (bar, percent... | 20.52 | 108 | 0.488499 |
c5a808700fab519b28fa025dbd65b6e1d6270430 | 1,390 | py | Python | src/osipidce/qt_gui/madym_gui_processor.py | michaelberks/OSIPI-DCE-DSC-toolbox | 60690aafab06e253601588396c2cdf683f705b82 | [
"Apache-2.0"
] | 1 | 2021-10-04T15:43:15.000Z | 2021-10-04T15:43:15.000Z | src/osipidce/qt_gui/madym_gui_processor.py | michaelberks/OSIPI-DCE-DSC-toolbox | 60690aafab06e253601588396c2cdf683f705b82 | [
"Apache-2.0"
] | null | null | null | src/osipidce/qt_gui/madym_gui_processor.py | michaelberks/OSIPI-DCE-DSC-toolbox | 60690aafab06e253601588396c2cdf683f705b82 | [
"Apache-2.0"
] | null | null | null | /*!
* @file madym_gui_processor.h
* @brief Class for GUI processing tasks that runs in separate thread to main GUI
* @details Allows processing to proceed without blocking the main GUI. Not currently used.
* @author MA Berks (c) Copyright QBI Lab, University of Manchester 2020
*/
#ifndef MADYM_GUI_PROCESSOR
#... | 19.857143 | 91 | 0.708633 |
606f684844e0cb224be1c6694d8da7084b42c693 | 24,012 | py | Python | readml/icecream/icecream.py | soumayaihihi/readml | bfda11cccf8ffe2a29a98589696769f843304309 | [
"Apache-2.0"
] | null | null | null | readml/icecream/icecream.py | soumayaihihi/readml | bfda11cccf8ffe2a29a98589696769f843304309 | [
"Apache-2.0"
] | null | null | null | readml/icecream/icecream.py | soumayaihihi/readml | bfda11cccf8ffe2a29a98589696769f843304309 | [
"Apache-2.0"
] | null | null | null | """
FBDTools library - icecream package
This module contains the main class that prepares data and draws PD/ICE/ALE plots.
"""
import os
import warnings
from typing import Any, Dict, List, Optional, Sized, Union
import numpy as np
import pandas as pd
import plotly.graph_objs as go
from plotly import offline
from .ch... | 36.162651 | 93 | 0.576837 |
a9f92d9cc611578dc7c9fd5df3952959267a1634 | 1,451 | py | Python | RiotConsts.py | nattokun/leagueOfRate | 4d5bd2e4e8256495eefce99b1e7c15589ee796cc | [
"MIT"
] | null | null | null | RiotConsts.py | nattokun/leagueOfRate | 4d5bd2e4e8256495eefce99b1e7c15589ee796cc | [
"MIT"
] | null | null | null | RiotConsts.py | nattokun/leagueOfRate | 4d5bd2e4e8256495eefce99b1e7c15589ee796cc | [
"MIT"
] | null | null | null | URL = {
'base' : 'https://global.api.pvp.net/api/{url}',
'summoner_by_name' : 'lol/na/v{version}/summoner/by-name/{names}?champData=stats',
'summoner_summonerId_rune' : 'lol/na/v{version}/summoner/{ids}/runes',
'summoner_summonerId_masteries' : 'lol/na/v{version}/summoner/{ids}/masteries',
'champion... | 32.977273 | 86 | 0.610613 |
6b377e365f6f8a257180be569b6960fd4c0f8887 | 4,478 | py | Python | experiments/gradcam_utils.py | anonymous-user-256/mlrc-cgn | 64f43fcb89b3a13c0ae46db4f19060d9f204a6b1 | [
"MIT"
] | null | null | null | experiments/gradcam_utils.py | anonymous-user-256/mlrc-cgn | 64f43fcb89b3a13c0ae46db4f19060d9f204a6b1 | [
"MIT"
] | null | null | null | experiments/gradcam_utils.py | anonymous-user-256/mlrc-cgn | 64f43fcb89b3a13c0ae46db4f19060d9f204a6b1 | [
"MIT"
] | null | null | null | """Helper functions for GradCAM analysis.
Referece: https://linuxtut.com/en/082f71b96b9aca0d5df5/
"""
import os
import sys
import argparse
import json
import numpy as np
import pandas as pd
import torch
from torchvision import transforms
import torchvision.datasets as tv_datasets
from torchvision import transforms as ... | 31.535211 | 92 | 0.685574 |
2d104e6da45af53cfc81f93a054461cd8717aa0c | 5,078 | py | Python | src/metropolisGA.py | lbenning/Knapsack | 1b06409bafc04210837b984fb638804794faada6 | [
"MIT"
] | 4 | 2015-07-26T19:59:25.000Z | 2018-12-13T15:39:44.000Z | src/metropolisGA.py | lbenning/Knapsack | 1b06409bafc04210837b984fb638804794faada6 | [
"MIT"
] | null | null | null | src/metropolisGA.py | lbenning/Knapsack | 1b06409bafc04210837b984fb638804794faada6 | [
"MIT"
] | null | null | null | import random
import numpy
from tools import *
import math
# Computes the Hamming distance between 2 bitstrings,
# which is simply the number of places where the bitstrings
# differ in value
def hammingDistance(x,y):
dist = 0
for z in range(len(x)):
if (not x[z] == y[z]):
dist += 1
return dist
# Genetic algor... | 31.540373 | 87 | 0.707562 |
cb9a97aa13bd8cca4f6601674cd746fd949a882a | 676 | py | Python | app/post/admin.py | HSAkash/Questionnaire-Docker | ee7f45ddc04e9ce72156a888255711df6a34720b | [
"MIT"
] | 1 | 2021-12-26T06:18:48.000Z | 2021-12-26T06:18:48.000Z | app/post/admin.py | HSAkash/Questionnaire_api | 95a0e4e7bc680fe27dd312dad0e2fd70ceafb8b4 | [
"MIT"
] | null | null | null | app/post/admin.py | HSAkash/Questionnaire_api | 95a0e4e7bc680fe27dd312dad0e2fd70ceafb8b4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from post import models
class QuestionAdmin(admin.ModelAdmin):
list_display = ('title', 'user', 'created_at', 'published_date')
list_filter = ('published_date',)
search_fields = ('title', 'user')
date_hierarchy = 'published_date'
ordering = ['-published_date']
... | 26 | 68 | 0.693787 |
3519a70791b2636cbd96069edb8169eb4b81d7b9 | 8,530 | py | Python | scripts/fixup_dlp_v2_keywords.py | renovate-bot/python-dlp | f329cf691bc8fa49b70ea5a443b5dc36c3b59eb9 | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | scripts/fixup_dlp_v2_keywords.py | renovate-bot/python-dlp | f329cf691bc8fa49b70ea5a443b5dc36c3b59eb9 | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | scripts/fixup_dlp_v2_keywords.py | renovate-bot/python-dlp | f329cf691bc8fa49b70ea5a443b5dc36c3b59eb9 | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | #! /usr/bin/env python3
# -*- 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 requi... | 40.619048 | 158 | 0.630832 |
c9f7aa6c5fb3a86ffed726042e9a048ca9704c49 | 12,963 | py | Python | bento/commands/tests/test_configure.py | cournape/Bento | 37de23d784407a7c98a4a15770ffc570d5f32d70 | [
"BSD-3-Clause"
] | 55 | 2015-01-20T21:12:52.000Z | 2021-11-23T12:29:32.000Z | bento/commands/tests/test_configure.py | esc/Bento | 5e13318c0a74e956f9e80fa7617fb31ffc356088 | [
"BSD-3-Clause"
] | 6 | 2015-01-16T07:01:29.000Z | 2021-08-19T20:00:17.000Z | bento/commands/tests/test_configure.py | esc/Bento | 5e13318c0a74e956f9e80fa7617fb31ffc356088 | [
"BSD-3-Clause"
] | 6 | 2015-08-12T18:11:47.000Z | 2019-01-05T08:36:05.000Z | import os
import sys
import shutil
import tempfile
import posixpath
import mock
from bento.compat.api.moves \
import \
unittest
from bento.core.options \
import \
PackageOptions
from bento.core \
import \
PackageDescription
from bento.core.node \
import \
create_root_... | 34.846774 | 117 | 0.64553 |
5dd6f8ed6415b20b8c562de190ffa03177cd0fab | 3,432 | py | Python | dace/codegen/prettycode.py | xiacijie/dace | 2d942440b1d7b139ba112434bfa78f754e10bfe5 | [
"BSD-3-Clause"
] | 1 | 2021-07-26T07:58:06.000Z | 2021-07-26T07:58:06.000Z | dace/codegen/prettycode.py | xiacijie/dace | 2d942440b1d7b139ba112434bfa78f754e10bfe5 | [
"BSD-3-Clause"
] | null | null | null | dace/codegen/prettycode.py | xiacijie/dace | 2d942440b1d7b139ba112434bfa78f754e10bfe5 | [
"BSD-3-Clause"
] | 1 | 2021-03-04T13:01:48.000Z | 2021-03-04T13:01:48.000Z | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
""" Code I/O stream that automates indentation and mapping of code to SDFG
nodes. """
from six import StringIO
from dace.config import Config
class CodeIOStream(StringIO):
""" Code I/O stream that automates indentation and mapping o... | 40.857143 | 81 | 0.550991 |
2a88d970abb658d6fe65c9795e36dc4c9fb1bfc4 | 2,329 | py | Python | legal_ner/utils/prepare_pretraining_data.py | openlegaldata/legal-ner | 3a9e8301b05f97ab159e24a3b3c7670b63ccb665 | [
"MIT"
] | 22 | 2019-02-12T09:50:40.000Z | 2021-07-05T22:00:00.000Z | legal_ner/utils/prepare_pretraining_data.py | vishenka-git/legal-ner | 3a9e8301b05f97ab159e24a3b3c7670b63ccb665 | [
"MIT"
] | null | null | null | legal_ner/utils/prepare_pretraining_data.py | vishenka-git/legal-ner | 3a9e8301b05f97ab159e24a3b3c7670b63ccb665 | [
"MIT"
] | 5 | 2019-02-08T04:34:33.000Z | 2020-05-24T01:13:34.000Z | import re
from pathlib import Path
import plac
import srsly
from legal_ner.preprocessing import HtmlConcealer
def split_paragraphs(string):
paragraph_delimiter = re.compile(r'\n')
paragraphs = []
while True:
m = re.search(paragraph_delimiter, string)
if m is None:
paragraphs ... | 40.859649 | 112 | 0.603693 |
750cda8952c7af399a41c5f53b354b95b48f5c8a | 2,367 | py | Python | models/tohinz_models.py | chunchentu/EvadeML-Zoo | dd8e85b9424871496a4dfb62f603f97e733f2433 | [
"MIT"
] | 164 | 2017-08-18T16:24:44.000Z | 2022-03-18T19:32:17.000Z | models/tohinz_models.py | chunchentu/EvadeML-Zoo | dd8e85b9424871496a4dfb62f603f97e733f2433 | [
"MIT"
] | 14 | 2018-12-19T20:58:54.000Z | 2022-03-13T14:34:41.000Z | models/tohinz_models.py | chunchentu/EvadeML-Zoo | dd8e85b9424871496a4dfb62f603f97e733f2433 | [
"MIT"
] | 74 | 2017-11-06T15:35:19.000Z | 2022-02-09T05:53:09.000Z | from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten, Lambda
from keras.layers import MaxPooling2D, Conv2D
from keras.layers.normalization import BatchNormalization
def tohinz_svhn_model(logits=False, input_range_type=2, pre_filter=lambda x:x):
input_shape=(32, 32, 3)
... | 33.814286 | 97 | 0.682298 |
1ae64f81cf524efc20569591f33ed71e16eb46a8 | 906 | py | Python | .history/extract-table-camelot_20220617141938.py | tjxj/pdf2docx | 3338a95f1a971de8caf0369fa3ce794d2d6d57cd | [
"Apache-2.0"
] | null | null | null | .history/extract-table-camelot_20220617141938.py | tjxj/pdf2docx | 3338a95f1a971de8caf0369fa3ce794d2d6d57cd | [
"Apache-2.0"
] | null | null | null | .history/extract-table-camelot_20220617141938.py | tjxj/pdf2docx | 3338a95f1a971de8caf0369fa3ce794d2d6d57cd | [
"Apache-2.0"
] | null | null | null | from os import set_inheritable
import camelot
import pandas as pd
tables = camelot.read_pdf('/Users/huhaiyang/Archives/2020.pdf',pages='1-3')
#tables.export('foo22.csv') # json, excel, html, markdown, sqlite
# tables[1]
# tables[1].parsing_report
# {
# 'accuracy': 99.02,
# 'whitespace': 12.24,
# 'order': 1... | 28.3125 | 82 | 0.661148 |
88a2a6e176f47e4a63a4beaeba9b75bd30c71ff4 | 1,368 | py | Python | eha_jsonpath/__init__.py | hughpyle/jsonpath-extensions | 0b053ac61d85d836fd3240a25b18a436a438bc15 | [
"Apache-2.0"
] | 1 | 2021-07-12T05:12:20.000Z | 2021-07-12T05:12:20.000Z | eha_jsonpath/__init__.py | hughpyle/jsonpath-extensions | 0b053ac61d85d836fd3240a25b18a436a438bc15 | [
"Apache-2.0"
] | 2 | 2019-05-16T17:31:50.000Z | 2019-05-20T15:44:23.000Z | eha_jsonpath/__init__.py | hughpyle/jsonpath-extensions | 0b053ac61d85d836fd3240a25b18a436a438bc15 | [
"Apache-2.0"
] | 1 | 2020-09-16T12:19:47.000Z | 2020-09-16T12:19:47.000Z | from jsonpath_ng.ext.parser import ExtentedJsonPathParser
from . import ext_functions as fn
# You must use this parser instead of the normal or ext one.
class JsonPathParser(ExtentedJsonPathParser):
"Aether extension of jsonpath_ng extensions..."
# register all exposed functions in this method
def p_json... | 36 | 68 | 0.590643 |
42de41a08eb9bb12f0987ac03e4da0e50b97b75a | 7,244 | py | Python | pyNetCDF/concatNetcdfFiles.py | mjsauvinen/P4US | ba7bbc77a6e482f612ba5aa5f021a41fcbb23345 | [
"MIT"
] | 4 | 2017-06-10T13:34:29.000Z | 2021-10-08T14:33:43.000Z | pyNetCDF/concatNetcdfFiles.py | mjsauvinen/P4US | ba7bbc77a6e482f612ba5aa5f021a41fcbb23345 | [
"MIT"
] | 8 | 2018-07-10T12:00:49.000Z | 2021-09-16T13:58:59.000Z | pyNetCDF/concatNetcdfFiles.py | mjsauvinen/P4US | ba7bbc77a6e482f612ba5aa5f021a41fcbb23345 | [
"MIT"
] | 6 | 2019-05-03T07:29:12.000Z | 2022-01-21T03:10:27.000Z | #!/usr/bin/env python3
from netcdfTools import *
import sys
import argparse
import numpy as np
'''
Description:
Author: Mikko Auvinen
Finnish Meteorological Institute
'''
#==========================================================#
def idBounds( cmin, cmaxL, cminL, dc, nc ):
ic1 = np.round((cminL-cmin)/dc ... | 34.331754 | 92 | 0.53037 |
c3eb0dc1e8912dc690efbd1f04f7f94a7981ce25 | 3,041 | py | Python | buildings/tests/gui/test_setup_edit_geometry_production.py | strk/nz-buildings | 8dc8ee19d322837380bb4f016b01eccee2c1bd0a | [
"PostgreSQL",
"CC-BY-4.0"
] | 2 | 2020-02-21T00:46:31.000Z | 2020-08-17T14:22:19.000Z | buildings/tests/gui/test_setup_edit_geometry_production.py | strk/nz-buildings | 8dc8ee19d322837380bb4f016b01eccee2c1bd0a | [
"PostgreSQL",
"CC-BY-4.0"
] | 243 | 2018-12-16T22:01:54.000Z | 2022-01-10T20:09:24.000Z | buildings/tests/gui/test_setup_edit_geometry_production.py | strk/nz-buildings | 8dc8ee19d322837380bb4f016b01eccee2c1bd0a | [
"PostgreSQL",
"CC-BY-4.0"
] | 1 | 2020-03-24T10:35:43.000Z | 2020-03-24T10:35:43.000Z | # -*- coding: utf-8 -*-
"""
################################################################################
#
# Copyright 2018 Crown copyright (c)
# Land Information New Zealand and the New Zealand Government.
# All rights reserved
#
# This program is released under the terms of the 3 clause BSD license. See the
# LIC... | 38.0125 | 88 | 0.62315 |
9e9b6d7f50ee4888913900942398cba4d6f17430 | 8,000 | py | Python | scripts/kconfig/kconfig.py | jaruiz/zephyr | 2a103ea67493ebcae5c5d7720f6e1a38a05faff1 | [
"Apache-2.0"
] | 2 | 2018-12-17T21:00:20.000Z | 2019-02-03T09:47:38.000Z | scripts/kconfig/kconfig.py | jaruiz/zephyr | 2a103ea67493ebcae5c5d7720f6e1a38a05faff1 | [
"Apache-2.0"
] | 6 | 2019-01-09T08:50:20.000Z | 2019-07-29T09:47:59.000Z | scripts/kconfig/kconfig.py | jaruiz/zephyr | 2a103ea67493ebcae5c5d7720f6e1a38a05faff1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Modified from: https://github.com/ulfalizer/Kconfiglib/blob/master/examples/merge_config.py
import argparse
import os
import sys
import textwrap
from kconfiglib import Kconfig, Symbol, BOOL, STRING, TRISTATE, TRI_TO_STR
# Warnings that won't be turned into errors (but that will still be print... | 37.914692 | 93 | 0.685875 |
0488b8c23e44049164a74d7969dd9273cd547974 | 23,338 | py | Python | src/skmultiflow/evaluation/evaluate_prequential_delayed.py | denisesato/scikit-multiflow | 3eb4c7262bb60d7e3f65c0d3395e4572d9a8cb95 | [
"BSD-3-Clause"
] | 663 | 2017-11-16T15:48:45.000Z | 2022-03-28T07:38:17.000Z | src/skmultiflow/evaluation/evaluate_prequential_delayed.py | denisesato/scikit-multiflow | 3eb4c7262bb60d7e3f65c0d3395e4572d9a8cb95 | [
"BSD-3-Clause"
] | 293 | 2017-12-16T12:33:49.000Z | 2022-02-22T03:34:25.000Z | src/skmultiflow/evaluation/evaluate_prequential_delayed.py | denisesato/scikit-multiflow | 3eb4c7262bb60d7e3f65c0d3395e4572d9a8cb95 | [
"BSD-3-Clause"
] | 201 | 2017-11-30T15:52:30.000Z | 2022-03-25T21:46:55.000Z | import os
import warnings
import re
import numpy as np
from timeit import default_timer as timer
from numpy import unique
from skmultiflow.evaluation.base_evaluator import StreamEvaluator
from skmultiflow.utils import constants
from skmultiflow.data import TimeManager
class EvaluatePrequentialDelayed(StreamEvaluato... | 41.306195 | 99 | 0.587197 |
dfea85318cf11eb86eda0983e81edecc22d889bf | 1,116 | py | Python | setup.py | epfl-lts2/spikexplore | 05c5ff1aa1cca3f77126c0de9a1b6b9360813afd | [
"Apache-2.0"
] | null | null | null | setup.py | epfl-lts2/spikexplore | 05c5ff1aa1cca3f77126c0de9a1b6b9360813afd | [
"Apache-2.0"
] | null | null | null | setup.py | epfl-lts2/spikexplore | 05c5ff1aa1cca3f77126c0de9a1b6b9360813afd | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
setup(
name='spikexplore',
version='0.0.11',
description='Graph exploration using inhomogeneous filtered diffusion',
url='https://github.com/epfl-lts2/spikexplore',
author='Nicolas Aspert, Benjamin Ricaud',
author_email='nicolas.aspert@epfl.ch, benjamin.ricaud@epfl.... | 33.818182 | 75 | 0.539427 |
4772f678a77321acbb602c7452561773bd46074a | 1,763 | py | Python | videointelligence/google/cloud/videointelligence_v1beta2/types.py | paoloburelli/google-cloud-python | e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd | [
"Apache-2.0"
] | 1 | 2018-06-29T17:53:28.000Z | 2018-06-29T17:53:28.000Z | videointelligence/google/cloud/videointelligence_v1beta2/types.py | paoloburelli/google-cloud-python | e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd | [
"Apache-2.0"
] | null | null | null | videointelligence/google/cloud/videointelligence_v1beta2/types.py | paoloburelli/google-cloud-python | e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd | [
"Apache-2.0"
] | null | null | null | # Copyright 2017, Google LLC 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... | 29.383333 | 79 | 0.766307 |
7d63b9efe5660d4792bf3580558dc444a5f48b8b | 2,601 | py | Python | snr_mix.py | aws-samples/asteroid-on-sagemaker | 4613b10b8f579029038cc768cef620d25a09478d | [
"MIT-0"
] | null | null | null | snr_mix.py | aws-samples/asteroid-on-sagemaker | 4613b10b8f579029038cc768cef620d25a09478d | [
"MIT-0"
] | null | null | null | snr_mix.py | aws-samples/asteroid-on-sagemaker | 4613b10b8f579029038cc768cef620d25a09478d | [
"MIT-0"
] | null | null | null | import pathlib
import numpy as np
# import soundfile as sf
# import librosa
EPS = np.finfo(float).eps
np.random.seed(0)
def is_clipped(audio, clipping_threshold=0.99):
return any(abs(audio) > clipping_threshold)
def normalize(audio, target_level=-25):
'''Normalize the signal to the target level'''
rms ... | 36.633803 | 114 | 0.688966 |
2cf2ec5b11427f2abe6dd5ce17368fa46901ed28 | 690 | py | Python | defichain/ocean/__init__.py | eric-volz/defichainLibrary | 458a8155bd595bf0fdf026651d95a5fe78dafc9c | [
"MIT"
] | 1 | 2022-03-29T15:15:17.000Z | 2022-03-29T15:15:17.000Z | defichain/ocean/__init__.py | eric-volz/defichainPythonLibrary | b01dfddbb5e16d5b3dcda8e4014bcea8d2a1832b | [
"MIT"
] | null | null | null | defichain/ocean/__init__.py | eric-volz/defichainPythonLibrary | b01dfddbb5e16d5b3dcda8e4014bcea8d2a1832b | [
"MIT"
] | 1 | 2022-03-24T12:25:44.000Z | 2022-03-24T12:25:44.000Z | # Just to be present: Ocean
from defichain.ocean.modules.address import Address
from defichain.ocean.modules.blocks import Blocks
from defichain.ocean.modules.fee import Fee
from defichain.ocean.modules.loan import Loan
from defichain.ocean.modules.masternodes import Masternodes
from defichain.ocean.modules.oracles imp... | 46 | 61 | 0.856522 |
89fa38879eebea779b1cb808e15de39e9be4db5c | 12,341 | py | Python | ReTreeingFuncs.py | JudoWill/ResearchNotebooks | 35796f7ef07361eb2926c8770e623f4e9d48ab96 | [
"MIT"
] | 1 | 2019-02-03T03:45:29.000Z | 2019-02-03T03:45:29.000Z | ReTreeingFuncs.py | JudoWill/ResearchNotebooks | 35796f7ef07361eb2926c8770e623f4e9d48ab96 | [
"MIT"
] | null | null | null | ReTreeingFuncs.py | JudoWill/ResearchNotebooks | 35796f7ef07361eb2926c8770e623f4e9d48ab96 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
from pandas import DataFrame, Series, merge, read_csv, MultiIndex, Index, concat
from subprocess import check_call
from tempfile import NamedTemporaryFile as NTF
import os, os.path
import numpy as np
from scipy.stats import ttest_ind
from itertools impor... | 30.775561 | 96 | 0.578235 |
b57bd152c99c2f1dc2584c2e2e6268b58b86bb27 | 7,937 | py | Python | src/vector_quantizer_ema.py | VictorZuanazzi/VQ-VAE-Images | cf39dccbc1cd233426fd0145ce5945574ec431d1 | [
"MIT"
] | 2 | 2019-11-23T11:46:31.000Z | 2020-02-13T15:19:55.000Z | src/vector_quantizer_ema.py | VictorZuanazzi/VQ-VAE-Images | cf39dccbc1cd233426fd0145ce5945574ec431d1 | [
"MIT"
] | null | null | null | src/vector_quantizer_ema.py | VictorZuanazzi/VQ-VAE-Images | cf39dccbc1cd233426fd0145ce5945574ec431d1 | [
"MIT"
] | null | null | null | #####################################################################################
# MIT License #
# #
# Copyright (C) 2019 Charly Lamothe ... | 52.217105 | 132 | 0.597077 |
1a908899a742f564a44112682fa2b97caa2491e6 | 6,797 | py | Python | pytorch_lightning/loggers/mlflow.py | Lucien-cs/pytorch-lightning | bf8a395a4004fa7f2ea804b6de8cececc609f9aa | [
"Apache-2.0"
] | 1 | 2021-04-06T08:47:01.000Z | 2021-04-06T08:47:01.000Z | pytorch_lightning/loggers/mlflow.py | Lucien-cs/pytorch-lightning | bf8a395a4004fa7f2ea804b6de8cececc609f9aa | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/loggers/mlflow.py | Lucien-cs/pytorch-lightning | bf8a395a4004fa7f2ea804b6de8cececc609f9aa | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 33.985 | 111 | 0.643666 |
f71a062d2b5783e4fd92b44153a453460f29e699 | 53,902 | py | Python | Lib/http/client.py | treebee/cpython | e152169da95b52fa41931572bc90857253c4a5dd | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2019-05-29T18:22:03.000Z | 2019-05-29T18:22:03.000Z | Lib/http/client.py | treebee/cpython | e152169da95b52fa41931572bc90857253c4a5dd | [
"CNRI-Python-GPL-Compatible"
] | 4 | 2022-03-30T01:50:22.000Z | 2022-03-30T01:50:28.000Z | Lib/http/client.py | treebee/cpython | e152169da95b52fa41931572bc90857253c4a5dd | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | r"""HTTP/1.1 client library
<intro stuff goes here>
<other stuff, too>
HTTPConnection goes through a number of "states", which define when a client
may legally make another request or fetch the response for a particular
request. This diagram details these state transitions:
(null)
|
| HTTPConnection(... | 37.020604 | 82 | 0.571352 |
f031e0720b0d2b724ee611831958d96caa96ff5a | 251 | py | Python | manage.py | alexfalcucc/wyd-kravov-raffle | 75b39fde050166a3883dd83dbb7046c0b8339eb3 | [
"MIT"
] | null | null | null | manage.py | alexfalcucc/wyd-kravov-raffle | 75b39fde050166a3883dd83dbb7046c0b8339eb3 | [
"MIT"
] | null | null | null | manage.py | alexfalcucc/wyd-kravov-raffle | 75b39fde050166a3883dd83dbb7046c0b8339eb3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "jmj_2016.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 22.818182 | 72 | 0.772908 |
e55eacb5ca0e7abf77d90693ac6740788b8279eb | 720 | py | Python | paddlevideo/modeling/framework/__init__.py | shippingwang/PaddleVideo | 48e6bb5f67ad44f7ef3c5cd683e8e7b8c50f0918 | [
"Apache-2.0"
] | 1 | 2021-01-13T09:14:35.000Z | 2021-01-13T09:14:35.000Z | paddlevideo/modeling/framework/__init__.py | shippingwang/PaddleVideo | 48e6bb5f67ad44f7ef3c5cd683e8e7b8c50f0918 | [
"Apache-2.0"
] | null | null | null | paddlevideo/modeling/framework/__init__.py | shippingwang/PaddleVideo | 48e6bb5f67ad44f7ef3c5cd683e8e7b8c50f0918 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle 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 applic... | 40 | 74 | 0.758333 |
c3052d4811568fb451986374c6ed89ddce5fa927 | 7,306 | py | Python | doc/conf.py | Andrea-MariaDB-2/treeio | f50ab9bae93f7a0a062b5316485a7bbeb4b6ac4e | [
"MIT"
] | 242 | 2015-01-01T15:08:23.000Z | 2022-01-19T21:14:24.000Z | doc/conf.py | J4CODE/treeio | bae3115f4015aad2cbc5ab45572232ceec990495 | [
"MIT"
] | 52 | 2015-01-05T09:13:17.000Z | 2018-12-26T14:52:43.000Z | doc/conf.py | J4CODE/treeio | bae3115f4015aad2cbc5ab45572232ceec990495 | [
"MIT"
] | 99 | 2015-01-09T23:28:14.000Z | 2021-12-30T09:19:51.000Z | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
# -*- coding: utf-8 -*-
#
# Hardtree documentation build configuration file, created by
# sphinx-quickstart on Mon Oct 25 16:15:27 2010.
#
# This file is execfile()d with the current directory set to its con... | 32.04386 | 80 | 0.722557 |
edcecde4be995e447dd2bd5858cd4169ff024caa | 2,068 | py | Python | msbapi/api.py | samuelrince/msbapi | 31dfb3780dfd562be65c27ecc35f07373dbf1251 | [
"MIT"
] | null | null | null | msbapi/api.py | samuelrince/msbapi | 31dfb3780dfd562be65c27ecc35f07373dbf1251 | [
"MIT"
] | null | null | null | msbapi/api.py | samuelrince/msbapi | 31dfb3780dfd562be65c27ecc35f07373dbf1251 | [
"MIT"
] | null | null | null | import os
import requests
from enum import Enum
from typing import Optional
from pydantic import BaseModel
from msbapi.command import add_torrent_file, add_torrent_magnet
class TorrentTypes(str, Enum):
default = 'default'
movie = 'movie'
series = 'series'
music = 'music'
class TorrentRequest(BaseM... | 28.328767 | 89 | 0.694874 |
aa2e6b3d5ecfdd80762535350b7fd9bd2734ecd7 | 14,013 | py | Python | VMBackup/main/fsfreezer.py | abhishek-goyal1/azure-linux-extensions | 8737310b9697879240a7cb1f332d75b0862f36ff | [
"Apache-2.0"
] | null | null | null | VMBackup/main/fsfreezer.py | abhishek-goyal1/azure-linux-extensions | 8737310b9697879240a7cb1f332d75b0862f36ff | [
"Apache-2.0"
] | null | null | null | VMBackup/main/fsfreezer.py | abhishek-goyal1/azure-linux-extensions | 8737310b9697879240a7cb1f332d75b0862f36ff | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# VM Backup extension
#
# Copyright 2014 Microsoft Corporation
#
# 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
#
# U... | 44.485714 | 179 | 0.596161 |
8ffec7f2be53a7b2d40e3e8c480a12532d6a7974 | 10,073 | py | Python | phpmyadmin/doc/conf.py | worttreffer/real1 | 424e896322e74179cd9f3a2689c44df6ac02bb80 | [
"MIT"
] | null | null | null | phpmyadmin/doc/conf.py | worttreffer/real1 | 424e896322e74179cd9f3a2689c44df6ac02bb80 | [
"MIT"
] | 1 | 2021-05-10T11:02:02.000Z | 2021-05-10T11:02:02.000Z | phpmyadmin/doc/conf.py | worttreffer/real1 | 424e896322e74179cd9f3a2689c44df6ac02bb80 | [
"MIT"
] | 1 | 2019-09-05T09:39:18.000Z | 2019-09-05T09:39:18.000Z | # -*- coding: utf-8 -*-
#
# phpMyAdmin documentation build configuration file, created by
# sphinx-quickstart on Wed Sep 26 14:04:48 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | 31.576803 | 82 | 0.718952 |
2f4f7cd7ffa25422c458f7b92062cf771c95af4b | 1,609 | py | Python | stubs.min/System/__init___parts/MarshalByRefObject.py | denfromufa/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2017-07-07T11:15:45.000Z | 2017-07-07T11:15:45.000Z | stubs.min/System/__init___parts/MarshalByRefObject.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/__init___parts/MarshalByRefObject.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class MarshalByRefObject(object):
""" Enables access to objects across application domain boundaries in applications that support remoting. """
def CreateObjRef(self,requestedType):
"""
CreateObjRef(self: MarshalByRefObject,requestedType: Type) -> ObjRef
Creates an object that contains all the relev... | 37.418605 | 111 | 0.724052 |
b9dbf62f9c3d8025199b3066cf74a32ffbf437fb | 156 | py | Python | hw/andrei_bondar/test_bondar.py | alexander-sidorov/qap-05 | 6db7c0a1eeadd15f7d3f826e7f0ac4be3949ec8c | [
"MIT"
] | 9 | 2021-12-10T21:30:07.000Z | 2022-02-25T21:32:34.000Z | hw/andrei_bondar/test_bondar.py | alexander-sidorov/qap-05 | 6db7c0a1eeadd15f7d3f826e7f0ac4be3949ec8c | [
"MIT"
] | 22 | 2021-12-11T08:46:58.000Z | 2022-02-02T15:56:37.000Z | hw/andrei_bondar/test_bondar.py | alexander-sidorov/qap-05 | 6db7c0a1eeadd15f7d3f826e7f0ac4be3949ec8c | [
"MIT"
] | 8 | 2021-12-11T09:15:45.000Z | 2022-02-02T08:09:09.000Z | def test_example() -> None:
assert True, "not True"
assert 1 + 1 == 2
assert 4 / 2 == 2
assert 2 * 2 == 4
assert "ab" + "bc" == "abbc"
| 19.5 | 32 | 0.49359 |
ef9c889ac241646a46b25de312e4e463611176e7 | 4,420 | py | Python | src/OTLMOW/PostenMapping/Model/Post060344470.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/PostenMapping/Model/Post060344470.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/PostenMapping/Model/Post060344470.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | # coding=utf-8
from OTLMOW.PostenMapping.StandaardPost import StandaardPost
from OTLMOW.PostenMapping.StandaardPostMapping import StandaardPostMapping
# Generated with PostenCreator. To modify: extend, do not edit
class Post060344470(StandaardPost):
def __init__(self):
super().__init__(
nummer... | 48.571429 | 163 | 0.578054 |
ed045ae4cb6ee0e2f44f269d3dca1166314ca141 | 465 | py | Python | _pytest/test_everything.py | tzvetkoff/wee-slack | da7a9643b5d2512b749e711d5af12259f90517b7 | [
"MIT"
] | null | null | null | _pytest/test_everything.py | tzvetkoff/wee-slack | da7a9643b5d2512b749e711d5af12259f90517b7 | [
"MIT"
] | null | null | null | _pytest/test_everything.py | tzvetkoff/wee-slack | da7a9643b5d2512b749e711d5af12259f90517b7 | [
"MIT"
] | 1 | 2021-07-05T08:57:42.000Z | 2021-07-05T08:57:42.000Z | from __future__ import print_function, unicode_literals
import glob
import json
def test_everything(realish_eventrouter, team):
datafiles = glob.glob("_pytest/data/websocket/*.json")
for fname in sorted(datafiles):
data = json.loads(open(fname, 'r').read())
team.ws.add(data)
realish_... | 27.352941 | 69 | 0.724731 |
ca312ec06796627aebcdf95772d6011616f907c8 | 13,909 | py | Python | aiobotocore/endpoint.py | fraglab/aiobotocore | dec5a6324d150e8d7eff648b511c0227f30485cc | [
"Apache-2.0"
] | 2 | 2020-08-28T12:11:59.000Z | 2020-09-29T14:34:15.000Z | aiobotocore/endpoint.py | fraglab/aiobotocore | dec5a6324d150e8d7eff648b511c0227f30485cc | [
"Apache-2.0"
] | 4 | 2020-08-28T11:51:20.000Z | 2020-11-28T13:54:15.000Z | aiobotocore/endpoint.py | admdev8/aiobotocore | bddbeeec248ed25ae514c222f012e778fbd4655c | [
"Apache-2.0"
] | null | null | null | import aiohttp
import asyncio
import io
import ssl
import aiohttp.http_exceptions
from aiohttp.client import URL
from botocore.endpoint import EndpointCreator, Endpoint, DEFAULT_TIMEOUT, \
MAX_POOL_CONNECTIONS, logger, history_recorder, create_request_object
from botocore.exceptions import ConnectionClosedError
fro... | 43.330218 | 99 | 0.637573 |
de00e5f6632b7561d3897ee36a4a17c3e3bbc959 | 1,850 | py | Python | tests/nnapi/specs/Ex/transpose_conv_ex_float_4.mod.py | bogus-sudo/ONE-1 | 7052a817eff661ec2854ed2e7ee0de5e8ba82b55 | [
"Apache-2.0"
] | 255 | 2020-05-22T07:45:29.000Z | 2022-03-29T23:58:22.000Z | tests/nnapi/specs/Ex/transpose_conv_ex_float_4.mod.py | bogus-sudo/ONE-1 | 7052a817eff661ec2854ed2e7ee0de5e8ba82b55 | [
"Apache-2.0"
] | 5,102 | 2020-05-22T07:48:33.000Z | 2022-03-31T23:43:39.000Z | tests/nnapi/specs/Ex/transpose_conv_ex_float_4.mod.py | bogus-sudo/ONE-1 | 7052a817eff661ec2854ed2e7ee0de5e8ba82b55 | [
"Apache-2.0"
] | 120 | 2020-05-22T07:51:08.000Z | 2022-02-16T19:08:05.000Z | # model
batch = 1
in_chans = 1
out_chans = 1
in_rows = 4
in_cols = 4
out_rows = 8
out_cols = 8
ker_rows = 3
ker_cols = 3
stride = 2
# pad is 0 (left: 0 right: 1 top: 0 bottom: 1)
input_table = [x for x in range(batch * in_rows * in_cols * in_chans)]
kernel_table = [x for x in range(out_chans * ker_rows * ker_cols * in... | 33.636364 | 122 | 0.605946 |
1ae6e2d58397ea698b8c3ce58fd4be0a1ee56533 | 742 | py | Python | src/articles/entrypoints/rest_api/views/authentication_view.py | Tserewara/dama-rowahutu | 9f8d0ecfa8760cf25efb343472734042a4b2fa15 | [
"MIT"
] | 2 | 2021-03-19T11:19:14.000Z | 2021-05-04T19:02:34.000Z | src/articles/entrypoints/rest_api/views/authentication_view.py | Tserewara/dama-rowahutu | 9f8d0ecfa8760cf25efb343472734042a4b2fa15 | [
"MIT"
] | null | null | null | src/articles/entrypoints/rest_api/views/authentication_view.py | Tserewara/dama-rowahutu | 9f8d0ecfa8760cf25efb343472734042a4b2fa15 | [
"MIT"
] | 1 | 2021-03-03T17:33:12.000Z | 2021-03-03T17:33:12.000Z | from flask import request, jsonify, session
from flask.views import MethodView
from src.articles.domain.entities import exceptions
from src.articles.services import credential_service, unit_of_work
class AuthenticationAPI(MethodView):
@staticmethod
def post():
try:
username = credentia... | 26.5 | 67 | 0.648248 |
998082bccf447ca3705359362c8fcecc22faba19 | 1,487 | py | Python | vendor/github.com/elastic/beats/metricbeat/module/mysql/test_mysql.py | maehue/mqttbeat | 6c10f56096747732e40b70e298391eccd43d118b | [
"Apache-2.0"
] | 14 | 2019-05-07T16:12:03.000Z | 2020-07-17T12:49:42.000Z | vendor/github.com/elastic/beats/metricbeat/module/mysql/test_mysql.py | maehue/mqttbeat | 6c10f56096747732e40b70e298391eccd43d118b | [
"Apache-2.0"
] | 7 | 2019-05-14T13:46:01.000Z | 2021-01-09T08:10:59.000Z | vendor/github.com/elastic/beats/metricbeat/module/mysql/test_mysql.py | maehue/mqttbeat | 6c10f56096747732e40b70e298391eccd43d118b | [
"Apache-2.0"
] | 3 | 2019-08-19T12:22:02.000Z | 2020-07-17T12:53:43.000Z | import os
import sys
import unittest
from nose.plugins.attrib import attr
sys.path.append(os.path.join(os.path.dirname(__file__), '../../tests/system'))
import metricbeat
MYSQL_FIELDS = metricbeat.COMMON_FIELDS + ["mysql"]
MYSQL_STATUS_FIELDS = ["clients", "cluster", "cpu", "keyspace", "memory",
... | 29.156863 | 78 | 0.627438 |
d7083384b0883e4c2af5d6bb5e127cb32c8d23fb | 8,395 | py | Python | aws_deploy_package/twilio/rest/studio/v1/flow/execution/execution_context.py | anandhakrishnanh1998/Twilio-Chat-Bot | bb5cb02e363deb4c31a24cae6b0fd0b893ef2e20 | [
"MIT"
] | 1 | 2020-01-18T08:06:57.000Z | 2020-01-18T08:06:57.000Z | aws_deploy_package/twilio/rest/studio/v1/flow/execution/execution_context.py | anandhakrishnanh1998/Twilio-Chat-Bot | bb5cb02e363deb4c31a24cae6b0fd0b893ef2e20 | [
"MIT"
] | 9 | 2019-12-05T00:49:12.000Z | 2021-09-08T01:31:25.000Z | flask/lib/python3.6/site-packages/twilio/rest/studio/v1/flow/execution/execution_context.py | JOFLIX/grapevines | 34576e01184570d79cc140b42ffb71d322132da6 | [
"MIT",
"Unlicense"
] | null | null | null | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
f... | 31.092593 | 99 | 0.633234 |
f6d66c63660a566fbf18b5956e31988ff80416e4 | 3,607 | py | Python | detectron/datasets/dummy_datasets.py | gaohaidong/Detectron | cbf1b9177e3a1a3420e38c8c6e7a2e39aed604ef | [
"Apache-2.0"
] | null | null | null | detectron/datasets/dummy_datasets.py | gaohaidong/Detectron | cbf1b9177e3a1a3420e38c8c6e7a2e39aed604ef | [
"Apache-2.0"
] | null | null | null | detectron/datasets/dummy_datasets.py | gaohaidong/Detectron | cbf1b9177e3a1a3420e38c8c6e7a2e39aed604ef | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017-present, Facebook, 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 agreed... | 44.530864 | 497 | 0.641808 |
972a998e659d9d74dd29f62c346df8477136048c | 4,195 | py | Python | package_monitor/admin.py | yunojuno-archive/django-package-monitor | 5e387c1274b707050dcb441dbfd5b6c0aa7c57dc | [
"MIT"
] | 4 | 2019-07-22T18:28:26.000Z | 2020-08-03T15:06:33.000Z | package_monitor/admin.py | yunojuno-archive/django-package-monitor | 5e387c1274b707050dcb441dbfd5b6c0aa7c57dc | [
"MIT"
] | 4 | 2020-09-12T12:15:02.000Z | 2020-09-13T09:38:26.000Z | package_monitor/admin.py | yunojuno-archive/django-package-monitor | 5e387c1274b707050dcb441dbfd5b6c0aa7c57dc | [
"MIT"
] | 2 | 2019-07-22T18:50:54.000Z | 2020-06-30T03:19:03.000Z | import logging
from typing import Iterable, List, Optional, Tuple
from django.contrib import admin
from django.db.models import F
from django.db.models.query import QuerySet
from django.http.request import HttpRequest
from django.template.defaultfilters import truncatechars
from django.utils.safestring import mark_saf... | 29.542254 | 84 | 0.622884 |
d8b1294c11b87a1305f6147267ed6ca9bbc4d2ab | 3,260 | py | Python | detecting_gender/predict.py | melvinwevers/detecting_faces-medium-types-gender | eac51acdcc19b073b6a3a46275e3d47abdbc3b6f | [
"MIT"
] | null | null | null | detecting_gender/predict.py | melvinwevers/detecting_faces-medium-types-gender | eac51acdcc19b073b6a3a46275e3d47abdbc3b6f | [
"MIT"
] | null | null | null | detecting_gender/predict.py | melvinwevers/detecting_faces-medium-types-gender | eac51acdcc19b073b6a3a46275e3d47abdbc3b6f | [
"MIT"
] | null | null | null | from adabound import AdaBound
from keras.models import load_model
from keras.preprocessing.image import ImageDataGenerator
from keras.utils import CustomObjectScope
import os.path
import tensorflow as tf
import keras.backend as K
import numpy as np
import argparse
from sklearn.metrics import classification_report
def... | 33.958333 | 114 | 0.644785 |
e2a9d373c8dd89e535f964917bfa7ffc8342adea | 1,127 | py | Python | main/migrations/0013_auto_20171117_0305.py | abhishek9991/Club-Website | cadd69fe46a94c26af2035ed6ca9a3a0e4743fc9 | [
"MIT"
] | 1 | 2021-06-04T04:32:34.000Z | 2021-06-04T04:32:34.000Z | main/migrations/0013_auto_20171117_0305.py | abhishek9991/Club-Website | cadd69fe46a94c26af2035ed6ca9a3a0e4743fc9 | [
"MIT"
] | null | null | null | main/migrations/0013_auto_20171117_0305.py | abhishek9991/Club-Website | cadd69fe46a94c26af2035ed6ca9a3a0e4743fc9 | [
"MIT"
] | 1 | 2020-10-01T04:23:04.000Z | 2020-10-01T04:23:04.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-11-16 21:35
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0012_auto_20171117_0226'),
]
operations = [
migrati... | 30.459459 | 114 | 0.566105 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.