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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
205195453564dfb12dd43dd630b3ac86bfdd8b65 | 6,077 | py | Python | flask_occam/mixins.py | bprinty/Flask-Occam | 4ceae0d810656c187c37eaf78ef323b7d06c6b51 | [
"MIT"
] | 2 | 2020-04-25T12:40:39.000Z | 2021-06-03T08:21:17.000Z | flask_occam/mixins.py | bprinty/Flask-Occam | 4ceae0d810656c187c37eaf78ef323b7d06c6b51 | [
"MIT"
] | 5 | 2019-10-25T04:40:32.000Z | 2021-05-26T15:07:40.000Z | flask_occam/mixins.py | bprinty/Flask-Occam | 4ceae0d810656c187c37eaf78ef323b7d06c6b51 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Database mixins
#
# ------------------------------------------------
# imports
# -------
from flask import current_app
# helpers
# -------
# mixins
# ------
| 27.008889 | 89 | 0.53974 |
2052bb06764e5c0224b0e6c8510fd80835c27b0c | 392 | py | Python | crm/inv/migrations/0007_auto_20200407_1034.py | javvadigithub/apicrm | 285e248b33a3f4cfe29522940f1c3a669efa041f | [
"MIT"
] | null | null | null | crm/inv/migrations/0007_auto_20200407_1034.py | javvadigithub/apicrm | 285e248b33a3f4cfe29522940f1c3a669efa041f | [
"MIT"
] | null | null | null | crm/inv/migrations/0007_auto_20200407_1034.py | javvadigithub/apicrm | 285e248b33a3f4cfe29522940f1c3a669efa041f | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-04-07 10:34
from django.db import migrations, models
| 20.631579 | 60 | 0.596939 |
2053a68db0bd72f652dee47d009977bcd39210e3 | 2,577 | py | Python | ephios/core/signals.py | garinm90/ephios | 7d04d3287ae16ee332e31add1f25829b199f29a5 | [
"MIT"
] | null | null | null | ephios/core/signals.py | garinm90/ephios | 7d04d3287ae16ee332e31add1f25829b199f29a5 | [
"MIT"
] | null | null | null | ephios/core/signals.py | garinm90/ephios | 7d04d3287ae16ee332e31add1f25829b199f29a5 | [
"MIT"
] | null | null | null | from django.db.models.signals import post_save
from django.dispatch import receiver
from ephios.core import mail
from ephios.core.models import LocalParticipation
from ephios.core.plugins import PluginSignal
# PluginSignals are only send out to enabled plugins.
register_consequence_handlers = PluginSignal()
"""
This... | 35.30137 | 108 | 0.788902 |
2053e2387ca9e5237b938400a0d5fb3550ced8c5 | 401 | py | Python | onetest4.py | Kupets77/Testing1 | 93e0c6f0960d878b491f46c4b6c3ea80574e7394 | [
"Apache-2.0"
] | null | null | null | onetest4.py | Kupets77/Testing1 | 93e0c6f0960d878b491f46c4b6c3ea80574e7394 | [
"Apache-2.0"
] | null | null | null | onetest4.py | Kupets77/Testing1 | 93e0c6f0960d878b491f46c4b6c3ea80574e7394 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
from group import Group
from application import Application
| 23.588235 | 85 | 0.730673 |
20556093e3cbd97c50d9535880c7159834951ef0 | 2,116 | py | Python | byceps/services/shop/order/actions/create_ticket_bundles.py | GyBraLAN/byceps | b53087849c10a531b66d08999116fa1bef312a7f | [
"BSD-3-Clause"
] | null | null | null | byceps/services/shop/order/actions/create_ticket_bundles.py | GyBraLAN/byceps | b53087849c10a531b66d08999116fa1bef312a7f | [
"BSD-3-Clause"
] | null | null | null | byceps/services/shop/order/actions/create_ticket_bundles.py | GyBraLAN/byceps | b53087849c10a531b66d08999116fa1bef312a7f | [
"BSD-3-Clause"
] | null | null | null | """
byceps.services.shop.order.actions.create_ticket_bundles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from .....typing import UserID
from ....ticketing.dbmodels.ticket_bundle import TicketBundle
from... | 29.388889 | 75 | 0.71172 |
2055e8ec591e899da3b0c94d3770cf3dfa0e07d4 | 450 | py | Python | apps/track/migrations/0006_auto_20200611_0101.py | martinlehoux/django_bike | 05373d2649647fe8ebadb0aad54b9a7ec1900fe7 | [
"MIT"
] | 1 | 2020-08-12T17:53:37.000Z | 2020-08-12T17:53:37.000Z | apps/track/migrations/0006_auto_20200611_0101.py | martinlehoux/django_bike | 05373d2649647fe8ebadb0aad54b9a7ec1900fe7 | [
"MIT"
] | 12 | 2020-07-03T03:52:00.000Z | 2021-09-22T18:00:44.000Z | apps/track/migrations/0006_auto_20200611_0101.py | martinlehoux/django_bike | 05373d2649647fe8ebadb0aad54b9a7ec1900fe7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-06-11 01:01
from django.db import migrations
| 20.454545 | 47 | 0.56 |
205660960327a896bf31bd564783248e520146a9 | 1,108 | py | Python | dexter/admin/widgets.py | CodeForAfrica/mma-dexter | 10d7f0c51bb935399c708a432699e06418049a33 | [
"Apache-2.0"
] | 12 | 2015-06-14T05:50:39.000Z | 2021-09-12T17:03:47.000Z | dexter/admin/widgets.py | CodeForAfrica/mma-dexter | 10d7f0c51bb935399c708a432699e06418049a33 | [
"Apache-2.0"
] | 32 | 2019-07-25T06:17:31.000Z | 2019-08-05T02:41:42.000Z | dexter/admin/widgets.py | CodeForAfricaLabs/mma-dexter | 10d7f0c51bb935399c708a432699e06418049a33 | [
"Apache-2.0"
] | 9 | 2016-04-04T03:08:22.000Z | 2020-02-19T09:55:45.000Z | from cgi import escape
from wtforms import widgets
from wtforms.compat import text_type
from wtforms.widgets.core import html_params, HTMLString
| 33.575758 | 138 | 0.620036 |
2059823110054469bda0c1cbc025a00aa2057e4b | 6,702 | py | Python | openspeech/lm/transformer_lm.py | CanYouImagine/openspeech | 095d78828a9caed0151727897f35534231947846 | [
"Apache-2.0",
"MIT"
] | 207 | 2021-07-22T02:04:47.000Z | 2022-03-31T07:24:12.000Z | openspeech/lm/transformer_lm.py | tqslj2/openspeech | 10307587f08615224df5a868fb5249c68c70b12d | [
"Apache-2.0",
"MIT"
] | 81 | 2021-07-21T16:52:22.000Z | 2022-03-31T14:56:54.000Z | openspeech/lm/transformer_lm.py | tqslj2/openspeech | 10307587f08615224df5a868fb5249c68c70b12d | [
"Apache-2.0",
"MIT"
] | 43 | 2021-07-21T16:33:27.000Z | 2022-03-23T09:43:49.000Z | # MIT License
#
# Copyright (c) 2021 Soohwan Kim and Sangchun Ha and Soyoung Cho
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights... | 38.965116 | 119 | 0.661594 |
2059a11952c6bb57e1ddde4398fa3d4afdd9f065 | 4,540 | py | Python | app.py | Mohitsharma44/uodashboard | 9654511817b06c6ce73f7cbcdd1415ba0a78004f | [
"MIT"
] | null | null | null | app.py | Mohitsharma44/uodashboard | 9654511817b06c6ce73f7cbcdd1415ba0a78004f | [
"MIT"
] | 1 | 2017-07-21T14:41:51.000Z | 2017-07-21T16:19:55.000Z | app.py | Mohitsharma44/uodashboard | 9654511817b06c6ce73f7cbcdd1415ba0a78004f | [
"MIT"
] | null | null | null | import os
import json
import time
import base64
from io import StringIO
from tornado import websocket, web, ioloop, gen, escape
# list of clients to push the data to
clients = []
settings = {
'login_url': '/login',
'cookie_secret': 'L8LwECiNRxq2N0N2eGxx9MZlrpmuMEimlydNX/vt1LM=',
'template_path': 'te... | 27.515152 | 73 | 0.581278 |
6443f914d5d0b5b31f9340a5022b1d6bb4a641d5 | 11,233 | py | Python | orcoursetrion/tests/base.py | kboots-mit/orcoursetrion | 06f62a903077a1ddfe662e2b7214ba1f97933eb0 | [
"BSD-2-Clause"
] | 2 | 2015-06-13T16:14:26.000Z | 2015-10-27T17:19:12.000Z | orcoursetrion/tests/base.py | kboots-mit/orcoursetrion | 06f62a903077a1ddfe662e2b7214ba1f97933eb0 | [
"BSD-2-Clause"
] | 43 | 2015-02-16T17:06:14.000Z | 2018-09-07T15:33:14.000Z | orcoursetrion/tests/base.py | kboots-mit/orcoursetrion | 06f62a903077a1ddfe662e2b7214ba1f97933eb0 | [
"BSD-2-Clause"
] | 4 | 2015-05-27T19:43:59.000Z | 2022-03-17T19:01:11.000Z | # -*- coding: utf-8 -*-
"""
Test base class with commonly used methods and variables
"""
import json
import re
import unittest
import httpretty
| 30.691257 | 78 | 0.517404 |
6444fc949f84882592e7af529a265c5ac81da84e | 4,799 | py | Python | evm/scripts/bench_evm384.py | jnordberg/benchmarking | f212eeda06210e64a71e6180091a279342f6f215 | [
"Apache-2.0"
] | 21 | 2018-12-10T18:46:12.000Z | 2021-11-22T04:42:49.000Z | evm/scripts/bench_evm384.py | jnordberg/benchmarking | f212eeda06210e64a71e6180091a279342f6f215 | [
"Apache-2.0"
] | 94 | 2018-12-11T22:52:12.000Z | 2021-02-02T23:07:25.000Z | evm/scripts/bench_evm384.py | jnordberg/benchmarking | f212eeda06210e64a71e6180091a279342f6f215 | [
"Apache-2.0"
] | 7 | 2018-12-11T22:45:58.000Z | 2021-11-22T04:42:03.000Z | #!/usr/bin/env python3
import re
import subprocess
import nanodurationpy as durationpy
import csv
import time
import datetime
import os
import shutil
import shlex
import json
# output paths should be mounted docker volumes
RESULT_CSV_OUTPUT_PATH = "/evmraceresults"
RESULT_CSV_FILENAME = "evm_benchmarks_evmone384.csv... | 43.234234 | 339 | 0.709731 |
64482cc0c9d8191912e52468d78f9daed36c3761 | 17,755 | py | Python | etsin_finder_search/catalog_record_converter.py | CSCfi/etsin-finder-search | c76888de65a3c32d98f78f863850a374606420c1 | [
"MIT"
] | null | null | null | etsin_finder_search/catalog_record_converter.py | CSCfi/etsin-finder-search | c76888de65a3c32d98f78f863850a374606420c1 | [
"MIT"
] | 9 | 2017-11-11T10:35:41.000Z | 2021-01-21T10:58:50.000Z | etsin_finder_search/catalog_record_converter.py | CSCfi/etsin-finder-search | c76888de65a3c32d98f78f863850a374606420c1 | [
"MIT"
] | 2 | 2018-03-06T08:19:48.000Z | 2019-03-20T06:55:16.000Z | # This file is part of the Etsin service
#
# Copyright 2017-2018 Ministry of Education and Culture, Finland
#
# :author: CSC - IT Center for Science Ltd., Espoo Finland <servicedesk@csc.fi>
# :license: MIT
from etsin_finder_search.reindexing_log import get_logger
from etsin_finder_search.utils import \
catalog_rec... | 45.293367 | 148 | 0.610926 |
6448339d56590e86a2c7d522cbb83b6740c5c6f1 | 3,350 | py | Python | ndb/src/google/cloud/ndb/exceptions.py | juan-rael/google-cloud-python | 1d762a11ec8d76a7413aecdc4748699e662c4976 | [
"Apache-2.0"
] | null | null | null | ndb/src/google/cloud/ndb/exceptions.py | juan-rael/google-cloud-python | 1d762a11ec8d76a7413aecdc4748699e662c4976 | [
"Apache-2.0"
] | null | null | null | ndb/src/google/cloud/ndb/exceptions.py | juan-rael/google-cloud-python | 1d762a11ec8d76a7413aecdc4748699e662c4976 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 31.603774 | 79 | 0.707164 |
6448a7050ade05bceafdf46782f6495e4df28414 | 5,074 | py | Python | sourcecode.py | hansalemaos/PDFImage2TXT | cb85c8d3496595128c2985f028dc001c525611c1 | [
"Apache-2.0",
"MIT"
] | 3 | 2021-12-08T22:46:39.000Z | 2022-02-22T02:51:00.000Z | sourcecode.py | hansalemaos/PDFImage2TXT | cb85c8d3496595128c2985f028dc001c525611c1 | [
"Apache-2.0",
"MIT"
] | null | null | null | sourcecode.py | hansalemaos/PDFImage2TXT | cb85c8d3496595128c2985f028dc001c525611c1 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-12-18T02:38:43.000Z | 2021-12-18T02:38:43.000Z | # coding: utf-8 -*-
import pathlib
from tkinter.filedialog import askopenfilename
from tkinter import Tk
import os
import re
import textwrap
import easyocr
import string
reader = easyocr.Reader(['de','en', 'pt'])
erlaubtezeichen = string.ascii_letters+string.digits
from pdf2jpg import pdf2jpg
wrapper = textwrap.TextWra... | 40.269841 | 163 | 0.631257 |
64495a18dcefc4b3378d128ce25affb7b2d24c94 | 8,371 | py | Python | arspb/policies.py | jadenvc/ARS | f4082b3a71b1f8255e8d74ebfe4aa4bda668145f | [
"BSD-2-Clause"
] | null | null | null | arspb/policies.py | jadenvc/ARS | f4082b3a71b1f8255e8d74ebfe4aa4bda668145f | [
"BSD-2-Clause"
] | null | null | null | arspb/policies.py | jadenvc/ARS | f4082b3a71b1f8255e8d74ebfe4aa4bda668145f | [
"BSD-2-Clause"
] | null | null | null | # Lint as: python3
'''
Policy class for computing action from weights and observation vector.
Horia Mania --- hmania@berkeley.edu
Aurelia Guy
Benjamin Recht
'''
"""Policy class for computing action from weights and observation vector.
It is a modified policy class from third_party/py/ARS/code/policies.py.
"""
i... | 35.470339 | 87 | 0.699797 |
644ac38694b94344139cb74290d5bfa4af1b100b | 1,363 | py | Python | app/post/migrations/0003_auto_20200418_1922.py | FinalProject-Team4/Server_DaangnMarket | 258eb8c79fcbed69d516f521e6194cac7b315a58 | [
"MIT"
] | 1 | 2020-06-20T12:52:07.000Z | 2020-06-20T12:52:07.000Z | app/post/migrations/0003_auto_20200418_1922.py | FinalProject-Team4/Server_DaangnMarket | 258eb8c79fcbed69d516f521e6194cac7b315a58 | [
"MIT"
] | 34 | 2020-03-16T12:09:14.000Z | 2021-04-08T20:23:42.000Z | app/post/migrations/0003_auto_20200418_1922.py | FinalProject-Team4/Server_DaangnMarket | 258eb8c79fcbed69d516f521e6194cac7b315a58 | [
"MIT"
] | 2 | 2020-03-22T06:45:39.000Z | 2020-03-22T06:55:11.000Z | # Generated by Django 3.0.4 on 2020-04-18 10:22
import core.managers
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| 34.948718 | 149 | 0.592076 |
644c0eea66543b024562d743d76998786e9627ec | 1,657 | py | Python | tests/operators/test_dbt_operator.py | jennybrown8/airflow-dbt | bd63ae8317770dfb490ae32548ce0e96834c7b3c | [
"MIT"
] | 2 | 2020-08-12T20:01:35.000Z | 2020-08-12T20:01:38.000Z | tests/operators/test_dbt_operator.py | jennybrown8/airflow-dbt | bd63ae8317770dfb490ae32548ce0e96834c7b3c | [
"MIT"
] | 1 | 2021-04-22T23:52:00.000Z | 2021-04-22T23:52:00.000Z | tests/operators/test_dbt_operator.py | jennybrown8/airflow-dbt | bd63ae8317770dfb490ae32548ce0e96834c7b3c | [
"MIT"
] | 1 | 2021-03-12T20:51:54.000Z | 2021-03-12T20:51:54.000Z | import datetime
from unittest import TestCase, mock
from airflow import DAG, configuration
from airflow_dbt.hooks.dbt_hook import DbtCliHook
from airflow_dbt.operators.dbt_operator import (
DbtSeedOperator,
DbtSnapshotOperator,
DbtRunOperator,
DbtTestOperator
)
| 29.070175 | 56 | 0.640314 |
644c508da3f4fdfb9ed54fd1fe16c13cf801464e | 4,122 | py | Python | Ashcraft-rsa-algorithm.py | Chillica/Algorithms | ece45ec5b05640f795de56b7e2b8bf6836659a9e | [
"MIT"
] | null | null | null | Ashcraft-rsa-algorithm.py | Chillica/Algorithms | ece45ec5b05640f795de56b7e2b8bf6836659a9e | [
"MIT"
] | null | null | null | Ashcraft-rsa-algorithm.py | Chillica/Algorithms | ece45ec5b05640f795de56b7e2b8bf6836659a9e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Jacob Ashcraft
RSA Algorithm 2
Advanced Algorithms
Professor Teichert
"""
import math
###################### Constants ######################
primes = [110487089277121433970806926710031676468486143869889341376537597422615205558243704080712263653321436167325483283204907700784269778678235765... | 38.886792 | 320 | 0.737506 |
644d64204bad398a95c41f4ac02a80097e324fcd | 2,966 | py | Python | tasks/NamedEntityRecognition.py | cmathx/transformers-tutorial | 1d27100eda528c58952ff96935effa5fbf784422 | [
"MIT"
] | 1 | 2021-01-19T00:45:36.000Z | 2021-01-19T00:45:36.000Z | tasks/NamedEntityRecognition.py | cmathx/transformers-tutorial | 1d27100eda528c58952ff96935effa5fbf784422 | [
"MIT"
] | null | null | null | tasks/NamedEntityRecognition.py | cmathx/transformers-tutorial | 1d27100eda528c58952ff96935effa5fbf784422 | [
"MIT"
] | null | null | null | from transformers import pipeline
nlp = pipeline("ner")
sequence = """Hugging Face Inc. is a company based in New York City. Its headquarters are in DUMBO, therefore very
close to the Manhattan Bridge which is visible from the window."""
print(nlp(sequence))
#[
# {'word': 'Hu', 'score': 0.999563276767730... | 57.038462 | 541 | 0.608227 |
644dcbddb7fdd16f064ac3d720197b1d882c7b29 | 476 | py | Python | tests/misc/mtcnn/mtcnn_test.py | indiradutta/PyVision | cf74da32a3469ddcce9917ac1f2fcaaeefdeacdf | [
"BSD-3-Clause"
] | 31 | 2020-05-03T07:03:01.000Z | 2022-01-29T15:29:22.000Z | tests/misc/mtcnn/mtcnn_test.py | indiradutta/PyVision | cf74da32a3469ddcce9917ac1f2fcaaeefdeacdf | [
"BSD-3-Clause"
] | 13 | 2020-05-25T14:23:46.000Z | 2021-08-04T10:38:02.000Z | tests/misc/mtcnn/mtcnn_test.py | indiradutta/PyVision | cf74da32a3469ddcce9917ac1f2fcaaeefdeacdf | [
"BSD-3-Clause"
] | 12 | 2020-05-24T22:26:59.000Z | 2021-08-03T18:30:51.000Z | from pyvision.misc.mtcnn import MTCNN
from pyvision.misc.mtcnn.utils.visualize import show_boxes, _show_boxes
from PIL import Image
import cv2
from glob import glob
a = [glob("tests/misc/mtcnn/images/*.{}".format(s)) for s in ["jpg", "jpeg", "png"]]
imgs = [i for ai in a for i in ai]
mtcnn = MTCNN()
for img in imgs:... | 23.8 | 84 | 0.653361 |
644f0bed868677fe86feb9405b9bdbfa79b1d42d | 2,723 | py | Python | poet_distributed/niches/minigrid/minigrid.py | gdicker1/poet | 388a239d957e719eff1e774f5a8587496ca15474 | [
"Apache-2.0"
] | null | null | null | poet_distributed/niches/minigrid/minigrid.py | gdicker1/poet | 388a239d957e719eff1e774f5a8587496ca15474 | [
"Apache-2.0"
] | null | null | null | poet_distributed/niches/minigrid/minigrid.py | gdicker1/poet | 388a239d957e719eff1e774f5a8587496ca15474 | [
"Apache-2.0"
] | null | null | null | from ..core import Niche
from .model import Model, simulate
from .env import minigridhard_custom, Env_config
from collections import OrderedDict
DEFAULT_ENV = Env_config(
name='default_env',
lava_prob=[0., 0.1],
obstacle_lvl=[0., 1.],
box_to_ball_prob=[0., 0.3],
door_prob=[0., 0... | 35.363636 | 106 | 0.614763 |
644fa421d3fdee3839ddd205617f6c42dc3bfce9 | 704 | py | Python | machine/qemu/sources/u-boot/tools/binman/etype/intel_cmc.py | muddessir/framework | 5b802b2dd7ec9778794b078e748dd1f989547265 | [
"MIT"
] | 1 | 2021-11-21T19:56:29.000Z | 2021-11-21T19:56:29.000Z | machine/qemu/sources/u-boot/tools/binman/etype/intel_cmc.py | muddessir/framework | 5b802b2dd7ec9778794b078e748dd1f989547265 | [
"MIT"
] | null | null | null | machine/qemu/sources/u-boot/tools/binman/etype/intel_cmc.py | muddessir/framework | 5b802b2dd7ec9778794b078e748dd1f989547265 | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2016 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
#
# Entry-type module for Intel Chip Microcode binary blob
#
from binman.etype.blob_ext import Entry_blob_ext
| 30.608696 | 73 | 0.724432 |
6451a5afeb68d14a7e51707380bfe62ee1b2d8cf | 697 | py | Python | data/addresses.py | katwyp/python_training | 0dc4b8ed146ff6322864039a9e77fbd5cd62ef85 | [
"Apache-2.0"
] | null | null | null | data/addresses.py | katwyp/python_training | 0dc4b8ed146ff6322864039a9e77fbd5cd62ef85 | [
"Apache-2.0"
] | null | null | null | data/addresses.py | katwyp/python_training | 0dc4b8ed146ff6322864039a9e77fbd5cd62ef85 | [
"Apache-2.0"
] | null | null | null | from model.address import Address
testdata = [
Address(firstname="", lastname="", address="", homephone="", mobile="", workphone="", secondaryphone="",
email="", email2="", email3=""),
Address(firstname="address1", lastname="address1", address="address1",
homephone="address1", mobile="... | 49.785714 | 108 | 0.652798 |
6451d0079ea88137df36988360ef50d249625cbd | 447 | py | Python | main/urls.py | Kadweka/STUDENTS-award | b679bb9cc240b0e56feba4bea780da24ad61a31b | [
"MIT"
] | null | null | null | main/urls.py | Kadweka/STUDENTS-award | b679bb9cc240b0e56feba4bea780da24ad61a31b | [
"MIT"
] | 4 | 2021-03-19T08:32:26.000Z | 2022-03-12T00:05:33.000Z | main/urls.py | hussein18149/STUDENTS-award | b679bb9cc240b0e56feba4bea780da24ad61a31b | [
"MIT"
] | null | null | null | from . import views
from django.conf.urls import url
from django.conf.urls.static import static
from django.conf import settings
urlpatterns=[
url(r'^$', views.home,name='home'),
url(r'^award/',views.add_student, name='student'),
url(r'^awards/',views.awards,name='awards'),
url(r'students/',views.my_st... | 29.8 | 80 | 0.727069 |
6454be3091761768943878624a7f7adabf1b301c | 7,176 | py | Python | converters/usfm2html_converter.py | unfoldingWord-dev/tx-job-handler | 5364ed079bbd5b6528eeb6d12f2ca5c696e84f4f | [
"MIT"
] | 1 | 2020-11-25T04:07:37.000Z | 2020-11-25T04:07:37.000Z | converters/usfm2html_converter.py | unfoldingWord-dev/tx-job-handler | 5364ed079bbd5b6528eeb6d12f2ca5c696e84f4f | [
"MIT"
] | 52 | 2018-10-25T05:49:30.000Z | 2022-03-16T22:31:57.000Z | converters/usfm2html_converter.py | unfoldingWord-dev/tx-job-handler | 5364ed079bbd5b6528eeb6d12f2ca5c696e84f4f | [
"MIT"
] | null | null | null | import os
import tempfile
import string
from bs4 import BeautifulSoup
from shutil import copyfile
from rq_settings import prefix, debug_mode_flag
from app_settings.app_settings import AppSettings
from general_tools.file_utils import write_file, remove_tree, get_files
from converters.converter import Converter
from tx_... | 61.862069 | 226 | 0.636148 |
6456d6157ce3260e6b735493caaee1a68c6e74f6 | 11,764 | py | Python | xen-4.6.0/tools/python/xen/migration/legacy.py | StanPlatinum/VMI-as-a-Service | 5828a9c73815ad7e043428e7e56dc0715aaa60a1 | [
"MIT"
] | 3 | 2019-08-31T19:58:24.000Z | 2020-10-02T06:50:22.000Z | xen-4.6.0/tools/python/xen/migration/legacy.py | StanPlatinum/VMI-as-a-Service | 5828a9c73815ad7e043428e7e56dc0715aaa60a1 | [
"MIT"
] | 1 | 2020-10-16T19:13:49.000Z | 2020-10-16T19:13:49.000Z | xen-4.6.0/tools/python/xen/migration/legacy.py | StanPlatinum/ROP-detection-inside-VMs | 7b39298dd0791711cbd78fd0730b819b755cc995 | [
"MIT"
] | 1 | 2021-06-06T21:10:21.000Z | 2021-06-06T21:10:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Legacy migration stream information.
Documentation and record structures for legacy migration, for both libxc
and libxl.
"""
"""
Libxc:
SAVE/RESTORE/MIGRATE PROTOCOL
=============================
The general form of a stream of chunks is a header followed by a
body... | 37.227848 | 82 | 0.650714 |
645788a314377b0b95dd2d2eb4ba83dae9fbf763 | 2,102 | py | Python | aoc2018/dec10/solve.py | robfalck/AoC2018 | 9cc6a94d11d70ea11df4999df2fdf955cc5c155a | [
"Apache-2.0"
] | null | null | null | aoc2018/dec10/solve.py | robfalck/AoC2018 | 9cc6a94d11d70ea11df4999df2fdf955cc5c155a | [
"Apache-2.0"
] | null | null | null | aoc2018/dec10/solve.py | robfalck/AoC2018 | 9cc6a94d11d70ea11df4999df2fdf955cc5c155a | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function, division, absolute_import
import re
import numpy as np
re_posvel = re.compile(r'position=<(.+),(.+)> velocity=<(.+),(.+)>')
np.set_printoptions(linewidth=1024, edgeitems=1000)
def parse(s):
"""
Parse out the positions and velocities.
"""
match = (re_posvel.sear... | 26.275 | 91 | 0.5647 |
64586d11389e7cde5b3da86656bab0ca595bc703 | 179 | py | Python | rockstarUse.py | druv777/TensorFlow-clone | 70940acd8ef63455990522093c5642008e979415 | [
"MIT"
] | null | null | null | rockstarUse.py | druv777/TensorFlow-clone | 70940acd8ef63455990522093c5642008e979415 | [
"MIT"
] | null | null | null | rockstarUse.py | druv777/TensorFlow-clone | 70940acd8ef63455990522093c5642008e979415 | [
"MIT"
] | null | null | null | from rockstar import RockStar
swift_code = "print('Hello world')"
rock_it_bro = RockStar(days=1900, file_name='hello.swift', code=swift_code)
rock_it_bro.make_me_a_rockstar() | 35.8 | 76 | 0.782123 |
6458a243324d7ff5c0c4b5c43474456bdfc889fa | 476 | py | Python | mmedit/core/evaluation/__init__.py | KKIEEK/mmediting | e3e3c934049c7e2067334074c535f80c8f4795cc | [
"Apache-2.0"
] | null | null | null | mmedit/core/evaluation/__init__.py | KKIEEK/mmediting | e3e3c934049c7e2067334074c535f80c8f4795cc | [
"Apache-2.0"
] | null | null | null | mmedit/core/evaluation/__init__.py | KKIEEK/mmediting | e3e3c934049c7e2067334074c535f80c8f4795cc | [
"Apache-2.0"
] | 1 | 2022-03-10T01:00:24.000Z | 2022-03-10T01:00:24.000Z | # Copyright (c) OpenMMLab. All rights reserved.
from .eval_hooks import DistEvalIterHook, EvalIterHook
from .inceptions import FID, KID, InceptionV3
from .metrics import (L1Evaluation, connectivity, gradient_error, mse, niqe,
psnr, reorder_image, sad, ssim)
__all__ = [
'mse', 'sad', 'psnr', '... | 39.666667 | 76 | 0.689076 |
645a955508585ae81c1238e16367225f63eb2ee3 | 9,638 | py | Python | fun/regexp.py | jburgy/blog | 60ecb19069916fe7718f0f90c946d2d6af836d3e | [
"Apache-2.0"
] | 1 | 2019-05-06T12:43:33.000Z | 2019-05-06T12:43:33.000Z | fun/regexp.py | jburgy/blog | 60ecb19069916fe7718f0f90c946d2d6af836d3e | [
"Apache-2.0"
] | null | null | null | fun/regexp.py | jburgy/blog | 60ecb19069916fe7718f0f90c946d2d6af836d3e | [
"Apache-2.0"
] | 1 | 2021-03-14T16:50:51.000Z | 2021-03-14T16:50:51.000Z | # -*-coding:utf8;-*-
""" `Regular Expression Search Algorithm`_
After playing with `Thompson's construction`_ in `C`_ and `x86`_, I decided to take
another look in python many years later. Tokenization and conversion to postfix are
lifted almost verbatim from the C implementation apart for the fact they rely on
pytho... | 34.92029 | 103 | 0.534862 |
645ad370c4b50b933af7d6c182f859d5bc0ad82b | 2,785 | py | Python | python/v1/buyers/publisher_profiles/get_publisher_profiles.py | googleads/authorized-buyers-marketplace-api-samples | 73ae731785a19aa418fe5561831605b7c209c651 | [
"Apache-2.0"
] | null | null | null | python/v1/buyers/publisher_profiles/get_publisher_profiles.py | googleads/authorized-buyers-marketplace-api-samples | 73ae731785a19aa418fe5561831605b7c209c651 | [
"Apache-2.0"
] | null | null | null | python/v1/buyers/publisher_profiles/get_publisher_profiles.py | googleads/authorized-buyers-marketplace-api-samples | 73ae731785a19aa418fe5561831605b7c209c651 | [
"Apache-2.0"
] | 1 | 2022-01-09T18:06:59.000Z | 2022-01-09T18:06:59.000Z | #!/usr/bin/python
#
# Copyright 2021 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 b... | 34.382716 | 80 | 0.694434 |
645b06e11f7e29a48f1983c1170a67c3611f1666 | 404 | py | Python | epicteller/core/model/campaign.py | KawashiroNitori/epicteller | 264b11e7e6eb58beb0f67ecbbb811d268a533f7a | [
"MIT"
] | null | null | null | epicteller/core/model/campaign.py | KawashiroNitori/epicteller | 264b11e7e6eb58beb0f67ecbbb811d268a533f7a | [
"MIT"
] | null | null | null | epicteller/core/model/campaign.py | KawashiroNitori/epicteller | 264b11e7e6eb58beb0f67ecbbb811d268a533f7a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import Optional
from pydantic import BaseModel
from epicteller.core.util.enum import CampaignState
| 18.363636 | 51 | 0.693069 |
645cc29f9d18857355b0d43483ff2c2db043bdbd | 2,206 | py | Python | polls/views.py | biljiang/mysite | 15c0a0d7bb6bd46587f4cf805ce43f4c570de1be | [
"BSD-3-Clause"
] | null | null | null | polls/views.py | biljiang/mysite | 15c0a0d7bb6bd46587f4cf805ce43f4c570de1be | [
"BSD-3-Clause"
] | null | null | null | polls/views.py | biljiang/mysite | 15c0a0d7bb6bd46587f4cf805ce43f4c570de1be | [
"BSD-3-Clause"
] | null | null | null | #from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse,HttpResponseRedirect
#from django.template import loader
from django.shortcuts import get_object_or_404,render
from django.urls import reverse
from django.views import generic
from .models import Question, Cho... | 31.971014 | 84 | 0.679964 |
645d11df00b3707ac1991bf8fa1726c7105c09fb | 152 | py | Python | codeforces/anirudhak47/616/E.py | anirudhakulkarni/codes | d7a907951033b57314dfc0b837123aaa5c25a39a | [
"MIT"
] | 3 | 2020-07-09T16:15:42.000Z | 2020-07-17T13:19:42.000Z | codeforces/anirudhak47/616/E.py | anirudhakulkarni/codes | d7a907951033b57314dfc0b837123aaa5c25a39a | [
"MIT"
] | null | null | null | codeforces/anirudhak47/616/E.py | anirudhakulkarni/codes | d7a907951033b57314dfc0b837123aaa5c25a39a | [
"MIT"
] | 1 | 2020-07-17T13:19:48.000Z | 2020-07-17T13:19:48.000Z | n,m=map(int,input().split())
mod=10**9+7
sum=(n%mod)*(m%mod)
i=1
j=1
res=0
while j<=n:
res+=(n//j)*j
i+=1
j=i
print((sum-res)%mod) | 13.818182 | 29 | 0.493421 |
645d51e83bcc360907f671643926a45eb101ea1a | 5,103 | py | Python | tests/test_binning_process_sketch.py | jensgk/optbinning | 5ccd892fa4ee0a745ab539cee10a2069b35de6da | [
"Apache-2.0"
] | 207 | 2020-01-23T21:32:59.000Z | 2022-03-30T06:33:21.000Z | tests/test_binning_process_sketch.py | jensgk/optbinning | 5ccd892fa4ee0a745ab539cee10a2069b35de6da | [
"Apache-2.0"
] | 133 | 2020-01-23T22:14:35.000Z | 2022-03-29T14:05:04.000Z | tests/test_binning_process_sketch.py | jensgk/optbinning | 5ccd892fa4ee0a745ab539cee10a2069b35de6da | [
"Apache-2.0"
] | 50 | 2020-01-27T15:37:08.000Z | 2022-03-30T06:33:25.000Z | """
BinningProcessSketch testing.
"""
# Guillermo Navas-Palencia <g.navas.palencia@gmail.com>
# Copyright (C) 2021
import pandas as pd
from pytest import approx, raises
from optbinning import BinningProcessSketch
from optbinning import OptimalBinningSketch
from optbinning.exceptions import NotSolvedError
from optbi... | 27.435484 | 79 | 0.692926 |
645d92fe6f4202711d6029dad6f5b119f8748065 | 8,798 | py | Python | src/game/bt.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | 1 | 2017-06-30T00:35:05.000Z | 2017-06-30T00:35:05.000Z | src/game/bt.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | null | null | null | src/game/bt.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | null | null | null | from math import pi, sin, cos
from direct.showbase.DirectObject import DirectObject
from direct.showbase.ShowBase import ShowBase
from direct.gui.DirectGui import *
from direct.interval.IntervalGlobal import *
from panda3d.core import lookAt
from panda3d.core import GeomVertexFormat, GeomVertexData
from panda3d.core i... | 29.424749 | 84 | 0.591725 |
64605d81e5e5b09d3d13c2dc37b69d44bd06c958 | 8,485 | py | Python | Martel/convert_re.py | eoc21/biopython | c0f8db8f55a506837c320459957a0ce99b0618b6 | [
"PostgreSQL"
] | 3 | 2017-10-23T21:53:57.000Z | 2019-09-23T05:14:12.000Z | Martel/convert_re.py | eoc21/biopython | c0f8db8f55a506837c320459957a0ce99b0618b6 | [
"PostgreSQL"
] | null | null | null | Martel/convert_re.py | eoc21/biopython | c0f8db8f55a506837c320459957a0ce99b0618b6 | [
"PostgreSQL"
] | 6 | 2020-02-26T16:34:20.000Z | 2020-03-04T15:34:00.000Z | # Copyright 2000-2001, Dalke Scientific Software, LLC
# Distributed under the Biopython License Agreement (see the LICENSE file).
"""Converts a regular expression pattern string into an Expression tree.
This is not meant to be an externally usable module.
This works by using msre_parse.py to parse the pattern. The ... | 35.061983 | 79 | 0.649971 |
646093a875532db734c0ea4b2ff24388f33c4f32 | 2,633 | py | Python | Paper_Specific_Versions/2019_DTI/Code/subjects_lists/lists_stats_dMRI.py | adamwild/AD-ML | e4ac0b7d312ab482b9b52bb3f5c6745cc06431e9 | [
"MIT"
] | null | null | null | Paper_Specific_Versions/2019_DTI/Code/subjects_lists/lists_stats_dMRI.py | adamwild/AD-ML | e4ac0b7d312ab482b9b52bb3f5c6745cc06431e9 | [
"MIT"
] | null | null | null | Paper_Specific_Versions/2019_DTI/Code/subjects_lists/lists_stats_dMRI.py | adamwild/AD-ML | e4ac0b7d312ab482b9b52bb3f5c6745cc06431e9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = ["Junhao Wen", "Simona Bottani", "Jorge Samper-Gonzalez"]
__copyright__ = "Copyright 2016-2018 The Aramis Lab Team"
__credits__ = ["Junhao Wen"]
__license__ = "See LICENSE.txt file"
__version__ = "0.1.0"
__status__ = "Development"
import numpy as np
import pandas as pd
import os
d... | 46.192982 | 126 | 0.567793 |
64614e9f6807adb4c793f96caabf995d3909e4b8 | 162 | py | Python | idManager/model/integration/message_data.py | lgarciasbr/idm-api | 3517d29d55eb2a06fb5b4b21359b6cf6d11529a0 | [
"Apache-2.0"
] | 2 | 2018-01-14T22:43:43.000Z | 2018-01-14T22:43:48.000Z | idManager/model/integration/message_data.py | lgarciasbr/idm-api | 3517d29d55eb2a06fb5b4b21359b6cf6d11529a0 | [
"Apache-2.0"
] | null | null | null | idManager/model/integration/message_data.py | lgarciasbr/idm-api | 3517d29d55eb2a06fb5b4b21359b6cf6d11529a0 | [
"Apache-2.0"
] | null | null | null | from flask import current_app
| 18 | 67 | 0.679012 |
64619e0950043d9a2114890655d9f9071818e09f | 1,301 | py | Python | tests/view/glprograms/test_shaderprogram.py | gsanhueza/BlastSight | 4b5c48e7ea5f67b737429f05d5213e9ff1fd399d | [
"MIT"
] | null | null | null | tests/view/glprograms/test_shaderprogram.py | gsanhueza/BlastSight | 4b5c48e7ea5f67b737429f05d5213e9ff1fd399d | [
"MIT"
] | 1 | 2022-03-13T17:35:35.000Z | 2022-03-13T17:35:35.000Z | tests/view/glprograms/test_shaderprogram.py | gsanhueza/BlastSight | 4b5c48e7ea5f67b737429f05d5213e9ff1fd399d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pytest
from blastsight.model.elements.nullelement import NullElement
from blastsight.view.glprograms.shaderprogram import ShaderProgram
from blastsight.view.drawables import GLDrawable
def test_program(self, program):
assert program.shader_program is None
program.in... | 22.824561 | 66 | 0.685626 |
6462624a7ae5dc8c88954bd7349a57466f638697 | 2,102 | py | Python | tests/diffraction/test_diffraction_r_vortex.py | VasilyevEvgeny/self-focusing_3D | c90b4d78d2d72365566f8a49b325bd48127b1e44 | [
"MIT"
] | null | null | null | tests/diffraction/test_diffraction_r_vortex.py | VasilyevEvgeny/self-focusing_3D | c90b4d78d2d72365566f8a49b325bd48127b1e44 | [
"MIT"
] | null | null | null | tests/diffraction/test_diffraction_r_vortex.py | VasilyevEvgeny/self-focusing_3D | c90b4d78d2d72365566f8a49b325bd48127b1e44 | [
"MIT"
] | null | null | null | from numpy.random import randint
from core import BeamR, Propagator, SweepDiffractionExecutorR, BeamVisualizer, xlsx_to_df
from tests.diffraction.test_diffraction import TestDiffraction
NAME = 'diffraction_r_vortex'
| 33.365079 | 103 | 0.540913 |
6465246c84a3f23d3c843ed1a4eac86a1553e332 | 22 | py | Python | filters/__init__.py | mouradmourafiq/data-analysis | 1df2ca020a554f1fdab7cc9e53115e249cc199ac | [
"BSD-2-Clause"
] | 17 | 2015-04-01T12:11:31.000Z | 2022-03-15T16:44:01.000Z | filters/__init__.py | mouradmourafiq/data-analysis | 1df2ca020a554f1fdab7cc9e53115e249cc199ac | [
"BSD-2-Clause"
] | null | null | null | filters/__init__.py | mouradmourafiq/data-analysis | 1df2ca020a554f1fdab7cc9e53115e249cc199ac | [
"BSD-2-Clause"
] | 17 | 2015-01-14T14:59:40.000Z | 2021-07-01T05:46:14.000Z | __author__ = 'mourad'
| 11 | 21 | 0.727273 |
6465d405858eb834ed1583ad68a1aa90c937d20f | 506 | py | Python | NGASpider/nga_topic_wordcloud.py | liamcraft118/PythonLearning | 65949b7972afb13231f4f8d842a1b561a02072fb | [
"MIT"
] | null | null | null | NGASpider/nga_topic_wordcloud.py | liamcraft118/PythonLearning | 65949b7972afb13231f4f8d842a1b561a02072fb | [
"MIT"
] | null | null | null | NGASpider/nga_topic_wordcloud.py | liamcraft118/PythonLearning | 65949b7972afb13231f4f8d842a1b561a02072fb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from DB import DB
from wordcloud import WordCloud
import jieba
# class WordCloud(object):
if __name__ == '__main__':
db = DB()
db.connect()
result = db.readAllTitle()
titles = ''
for title in result:
titles += title[0]
words = " ".join(jieba.cut(titles))
... | 20.24 | 65 | 0.63834 |
6465e979caebd8c2c3c49bbbfea16b8f79b275ca | 6,611 | py | Python | granola/main.py | metergroup/GRANOLA | 24abcf9e6429d81047cda24a4343af5563d4e353 | [
"Apache-2.0"
] | 3 | 2022-02-13T02:38:28.000Z | 2022-03-22T16:59:15.000Z | granola/main.py | metergroup/GRANOLA | 24abcf9e6429d81047cda24a4343af5563d4e353 | [
"Apache-2.0"
] | 27 | 2022-02-13T18:22:48.000Z | 2022-03-31T18:18:41.000Z | granola/main.py | metergroup/GRANOLA | 24abcf9e6429d81047cda24a4343af5563d4e353 | [
"Apache-2.0"
] | null | null | null | """
This module is deprecated and will be removed in version 1.0. Please use :mod:`~granola.breakfast_cereal` instead
"""
from granola.breakfast_cereal import Cereal
from granola.utils import deprecation
| 48.255474 | 114 | 0.638179 |
6465fab1a57ae1dcc41f4c7c95793b6cf4866599 | 261 | py | Python | example/mysite/polls/admin.py | jAlpedrinha/DeclRY | f6f1f18a0cc38d0b502945a6f8baec64c3b9a6fa | [
"BSD-3-Clause"
] | 1 | 2015-08-12T12:02:54.000Z | 2015-08-12T12:02:54.000Z | example/mysite/polls/admin.py | jAlpedrinha/DeclRY | f6f1f18a0cc38d0b502945a6f8baec64c3b9a6fa | [
"BSD-3-Clause"
] | null | null | null | example/mysite/polls/admin.py | jAlpedrinha/DeclRY | f6f1f18a0cc38d0b502945a6f8baec64c3b9a6fa | [
"BSD-3-Clause"
] | null | null | null | from declry import site
from declry.apps import Application
| 29 | 83 | 0.716475 |
646688417f53dbf07f161490bad6ae8969e89fe1 | 1,998 | py | Python | rdr_service/alembic/versions/20e98a16ad20_requests_log.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 39 | 2017-10-13T19:16:27.000Z | 2021-09-24T16:58:21.000Z | rdr_service/alembic/versions/20e98a16ad20_requests_log.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 312 | 2017-09-08T15:42:13.000Z | 2022-03-23T18:21:40.000Z | rdr_service/alembic/versions/20e98a16ad20_requests_log.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 19 | 2017-09-15T13:58:00.000Z | 2022-02-07T18:33:20.000Z | """requests_log
Revision ID: 20e98a16ad20
Revises: 8fa4d8f2277c
Create Date: 2019-07-30 13:49:17.702589
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = "20e98a16ad20"
down_revision = "8fa4d8f2277c"
branch_labels = None
depen... | 30.738462 | 77 | 0.657658 |
64674b3e9d685bb7486a3ad36e0717025f9ccb1e | 7,156 | py | Python | Mydesktop/TriptoGif/test.py | gzyszuuow/BusBunching | e9b01a62e422ae6525d9287bdf46c25aacdf9c6c | [
"Apache-2.0"
] | null | null | null | Mydesktop/TriptoGif/test.py | gzyszuuow/BusBunching | e9b01a62e422ae6525d9287bdf46c25aacdf9c6c | [
"Apache-2.0"
] | null | null | null | Mydesktop/TriptoGif/test.py | gzyszuuow/BusBunching | e9b01a62e422ae6525d9287bdf46c25aacdf9c6c | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pandas as pd
from pandas import DataFrame, Series
import random
import time
import math
import datetime as dt
import random
import copy
from datetime import datetime
from time import mktime
import os
import json
from functools import cmp_to_key
import numpy as np
import matp... | 30.194093 | 256 | 0.675238 |
646d2f100cf042a92479d99756359693194052c5 | 4,654 | py | Python | fuelmenu/fuelmenu/modules/rootpw.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | 1 | 2021-04-06T16:13:35.000Z | 2021-04-06T16:13:35.000Z | fuelmenu/fuelmenu/modules/rootpw.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | fuelmenu/fuelmenu/modules/rootpw.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2013 Mirantis, 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 a... | 35.257576 | 78 | 0.56489 |
646d72d43695b19e055ac78f71a7b68738a02570 | 6,314 | py | Python | train.py | yhgon/cmtf | 7a3ffc3a59a7c546a00d3b73be58f7d1c2f1f0cf | [
"MIT"
] | null | null | null | train.py | yhgon/cmtf | 7a3ffc3a59a7c546a00d3b73be58f7d1c2f1f0cf | [
"MIT"
] | null | null | null | train.py | yhgon/cmtf | 7a3ffc3a59a7c546a00d3b73be58f7d1c2f1f0cf | [
"MIT"
] | null | null | null | from cmtf import CompressiveTransformer
from cmtf_ar_wrapper import AutoregressiveWrapper
import argparse
import random
import tqdm
import gzip
import numpy as np
import torch
import torch.optim as optim
from torch.nn import functional as F
from torch.utils.data import DataLoader, Dataset
# constants
def parse_args(... | 34.883978 | 127 | 0.63478 |
646eb195f8628e5692003244f139891bc4d4d41e | 1,094 | py | Python | scripts/template_file.py | Aracthor/cpp-maker | 6e5f2fb553ecfb849704629f37c57f801fdd072f | [
"MIT"
] | null | null | null | scripts/template_file.py | Aracthor/cpp-maker | 6e5f2fb553ecfb849704629f37c57f801fdd072f | [
"MIT"
] | null | null | null | scripts/template_file.py | Aracthor/cpp-maker | 6e5f2fb553ecfb849704629f37c57f801fdd072f | [
"MIT"
] | null | null | null | #!/usr/bin/python3
## template_file.py for cpp-maker in /home/aracthor/programs/projects/cpp-maker
##
## Made by Aracthor
##
## Started on Mon Sep 7 12:03:26 2015 Aracthor
## Last Update Wed Sep 9 10:27:36 2015 Aracthor
##
from files import File
| 34.1875 | 95 | 0.617916 |
646f4083f45e56bf5ee8cc0ae6f1cddc67c84556 | 179 | py | Python | testdust/settling/__init__.py | ibackus/testdust | 29e78e4cd2f3466dd503ce863c6db9014da07a04 | [
"MIT"
] | null | null | null | testdust/settling/__init__.py | ibackus/testdust | 29e78e4cd2f3466dd503ce863c6db9014da07a04 | [
"MIT"
] | null | null | null | testdust/settling/__init__.py | ibackus/testdust | 29e78e4cd2f3466dd503ce863c6db9014da07a04 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 19 15:32:04 2016
@author: ibackus
"""
import utils
import randomNormalSnap
import ppdgrid
import analyze
import makeICs
import plot | 14.916667 | 35 | 0.73743 |
646f4a42fb873d3bd01eab1b106d9d7f66a19490 | 6,692 | py | Python | devilry/project/common/settings.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | null | null | null | devilry/project/common/settings.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | null | null | null | devilry/project/common/settings.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | null | null | null | ########################################################################
#
# Defaults for django settings
# - See: https://docs.djangoproject.com/en/dev/ref/settings/
#
########################################################################
import os
import devilry
from .projectspecific_settings import * # noqa
from... | 32.328502 | 98 | 0.648237 |
646f4de2404f5c182fc0c6f326f3e3a2142d6fe1 | 75 | py | Python | write_all_proofs.py | dwhalen/holophrasm | 0d971428f9879ad3d6c0a781f1a021cff73fb1ce | [
"MIT"
] | 33 | 2016-09-23T15:05:24.000Z | 2021-08-30T11:13:35.000Z | write_all_proofs.py | dwhalen/holophrasm | 0d971428f9879ad3d6c0a781f1a021cff73fb1ce | [
"MIT"
] | 4 | 2016-12-14T03:41:55.000Z | 2020-05-27T20:27:55.000Z | write_all_proofs.py | david-a-wheeler/holophrasm | aea14ea846c7c8980219216859868cc6d2c45422 | [
"MIT"
] | 12 | 2016-08-20T10:40:21.000Z | 2022-01-03T09:47:01.000Z | import write_proof
write_proof.reset()
write_proof.write_all_known_proofs() | 25 | 36 | 0.88 |
64709e39f1c3abfd144073c9040d15f4940e15fc | 592 | py | Python | tests/test_gym_registers.py | domingoesteban/robolearn_envs | 1e10f315abcbb034e613b3b5a7a48662a839c81b | [
"BSD-3-Clause"
] | 2 | 2020-08-20T15:46:55.000Z | 2022-02-16T13:45:59.000Z | tests/test_gym_registers.py | domingoesteban/robolearn_envs | 1e10f315abcbb034e613b3b5a7a48662a839c81b | [
"BSD-3-Clause"
] | null | null | null | tests/test_gym_registers.py | domingoesteban/robolearn_envs | 1e10f315abcbb034e613b3b5a7a48662a839c81b | [
"BSD-3-Clause"
] | 1 | 2020-10-03T11:28:15.000Z | 2020-10-03T11:28:15.000Z | import gym
import numpy as np
from context import robolearn_envs
all_envs = gym.envs.registry.all()
robolearn_env_ids = [env_spec.id for env_spec in all_envs
if env_spec.id.startswith('RoboLearn-')]
for env_id in robolearn_env_ids:
print('-'*15)
print("Environment: %s" % env_id)
env ... | 23.68 | 63 | 0.613176 |
6470d5944c522fadb85e8b00e6d96b7ccc8e434e | 7,468 | py | Python | xor_nn/genetic_algorithm.py | sgalella/GeneticAlgorithm-XOR | 2e7de2e2fc6dfd8bb27d9e09c7be86f75c6db87c | [
"MIT"
] | null | null | null | xor_nn/genetic_algorithm.py | sgalella/GeneticAlgorithm-XOR | 2e7de2e2fc6dfd8bb27d9e09c7be86f75c6db87c | [
"MIT"
] | null | null | null | xor_nn/genetic_algorithm.py | sgalella/GeneticAlgorithm-XOR | 2e7de2e2fc6dfd8bb27d9e09c7be86f75c6db87c | [
"MIT"
] | null | null | null | import numpy as np
from tqdm import tqdm
from . import mutation, recombination, selection
| 40.150538 | 144 | 0.635913 |
6470e5d0deee719aa79c71b3de4aad355884b9c7 | 87 | py | Python | e7gzly/apps.py | naderabdalghani/e7gzly-api | a5c8afba1c4f118d56742c147d8f79be5241f66a | [
"Apache-2.0"
] | null | null | null | e7gzly/apps.py | naderabdalghani/e7gzly-api | a5c8afba1c4f118d56742c147d8f79be5241f66a | [
"Apache-2.0"
] | null | null | null | e7gzly/apps.py | naderabdalghani/e7gzly-api | a5c8afba1c4f118d56742c147d8f79be5241f66a | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
| 14.5 | 33 | 0.747126 |
647564ba63394f150f2633cb8c189e18207d6ab2 | 2,185 | py | Python | ps_tree/views.py | ITCase/ps_tree | a2152feb53d5f041b43203ee8ccaae65cb9d13e4 | [
"MIT"
] | null | null | null | ps_tree/views.py | ITCase/ps_tree | a2152feb53d5f041b43203ee8ccaae65cb9d13e4 | [
"MIT"
] | 12 | 2015-06-15T11:50:48.000Z | 2015-07-07T09:03:37.000Z | ps_tree/views.py | ITCase/ps_tree | a2152feb53d5f041b43203ee8ccaae65cb9d13e4 | [
"MIT"
] | null | null | null | import transaction
from pyramid.httpexceptions import HTTPInternalServerError
from pyramid.view import view_config
from pyramid_sacrud.security import (PYRAMID_SACRUD_DELETE,
PYRAMID_SACRUD_UPDATE)
from sacrud.common import pk_to_list
from . import CONFIG_MODELS, PS_TREE_GET_TREE,... | 29.931507 | 77 | 0.667277 |
647674bcd02180e2d4d59bf2cb132ab346717ae5 | 1,068 | py | Python | Contests/Facebook Hacker Cup 2018/Qualification/Tourist/tourist.py | PK-100/Competitive_Programming | d0863feaaa99462b2999e85dcf115f7a6c08bb8d | [
"MIT"
] | 70 | 2018-06-25T21:20:15.000Z | 2022-03-24T03:55:17.000Z | Contests/Facebook Hacker Cup 2018/Qualification/Tourist/tourist.py | An3sha/Competitive_Programming | ee7eadf51939a360d0b004d787ebabda583e92f0 | [
"MIT"
] | 4 | 2018-09-04T13:12:20.000Z | 2021-06-20T08:29:12.000Z | Contests/Facebook Hacker Cup 2018/Qualification/Tourist/tourist.py | An3sha/Competitive_Programming | ee7eadf51939a360d0b004d787ebabda583e92f0 | [
"MIT"
] | 24 | 2018-12-26T05:15:32.000Z | 2022-01-23T23:04:54.000Z | '''
Author: Amitrajit Bose
Problem: Facebook HackerCup Qualification Round
'''
with open("Output.txt", "w") as text_file:
testcase=int(input())
for _ in range(testcase):
#entire program will be contained here now
n,k,v=[int(x) for x in input().strip().split()]
citynames=[]
#citydict={}
out=[]
for i in ra... | 22.723404 | 61 | 0.647004 |
64769871d7651c4fe09490ae9be564a6303ec7ff | 904 | py | Python | code-solutions/Solution_005.py | Am4teur/Daily-Coding-Problems | 80b7c0efee4a5599feefe16972246baa8c19c334 | [
"MIT"
] | null | null | null | code-solutions/Solution_005.py | Am4teur/Daily-Coding-Problems | 80b7c0efee4a5599feefe16972246baa8c19c334 | [
"MIT"
] | null | null | null | code-solutions/Solution_005.py | Am4teur/Daily-Coding-Problems | 80b7c0efee4a5599feefe16972246baa8c19c334 | [
"MIT"
] | 1 | 2022-01-22T21:56:01.000Z | 2022-01-22T21:56:01.000Z |
if(__name__ == "__main__"):
s = MaxStack()
s.push(5)
s.push(6)
s.push(7)
s.push(6)
print(s.max())
# 7
s.pop()
s.pop()
print(s.max())
# 6
s.pop()
print(s.max())
# 5
s.pop()
print(s.max())
# None
print(s.pop())
# None | 20.088889 | 71 | 0.506637 |
647716fe60d32877837b9b44ced048b662a0498e | 1,635 | py | Python | src/cli.py | jconradhanson/BEAT | 47a828c486e674323782c11b78be63aae003c45d | [
"MIT"
] | null | null | null | src/cli.py | jconradhanson/BEAT | 47a828c486e674323782c11b78be63aae003c45d | [
"MIT"
] | null | null | null | src/cli.py | jconradhanson/BEAT | 47a828c486e674323782c11b78be63aae003c45d | [
"MIT"
] | null | null | null | import logging
import argparse
from beat import beat
from definitions import path_log
# LOGGING CONFIGURATION
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s %(message)s',
datefmt='%m/%d/%Y %I:%M:%S %p'
)
logging.root.addHandler(logging.FileHandler(path_log, mode='w', encoding='UTF-8'))
loggin... | 35.543478 | 105 | 0.687462 |
6477ef9e1d25e92daab6a18794994b24710c4290 | 5,678 | py | Python | tests/payments/four/request_apm_payments_four_integration_test.py | riaz-bordie-cko/checkout-sdk-python | d9bc073306c1a98544c326be693ed722576ea895 | [
"MIT"
] | null | null | null | tests/payments/four/request_apm_payments_four_integration_test.py | riaz-bordie-cko/checkout-sdk-python | d9bc073306c1a98544c326be693ed722576ea895 | [
"MIT"
] | null | null | null | tests/payments/four/request_apm_payments_four_integration_test.py | riaz-bordie-cko/checkout-sdk-python | d9bc073306c1a98544c326be693ed722576ea895 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import os
import pytest
import checkout_sdk
from checkout_sdk.common.common import Address, CustomerRequest, Phone
from checkout_sdk.common.common_four import Product
from checkout_sdk.common.enums import Currency, Country
from checkout_sdk.payments.payment_apm_four import Requ... | 36.397436 | 104 | 0.646178 |
64798a1c5f79aa151808ffe15d53f046862e60f3 | 1,877 | py | Python | DQM/TrackingMonitorSource/python/TrackerCollisionTrackingMonitor_cff.py | malbouis/cmssw | 16173a30d3f0c9ecc5419c474bb4d272c58b65c8 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | DQM/TrackingMonitorSource/python/TrackerCollisionTrackingMonitor_cff.py | gartung/cmssw | 3072dde3ce94dcd1791d778988198a44cde02162 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | DQM/TrackingMonitorSource/python/TrackerCollisionTrackingMonitor_cff.py | gartung/cmssw | 3072dde3ce94dcd1791d778988198a44cde02162 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from DQM.TrackingMonitorSource.pset4GenericTriggerEventFlag_cfi import *
# Clone for TrackingMonitor for all PDs but MinBias ###
from DQM.TrackingMonitor.TrackerCollisionTrackingMonitor_cfi import *
TrackerCollisionTrackMonCommon = TrackerCollisionTrackMon.clone(
genericTr... | 45.780488 | 95 | 0.85349 |
6479a772a0aa85678bea2bbb58a2808af7469318 | 4,524 | py | Python | sandbox/lib/jumpscale/Jumpscale/clients/ssh/SSHClientFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | sandbox/lib/jumpscale/Jumpscale/clients/ssh/SSHClientFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | sandbox/lib/jumpscale/Jumpscale/clients/ssh/SSHClientFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | from Jumpscale import j
from .SSHClient import SSHClient
from .SSHClientParamiko import SSHClientParamiko
from .SSHClientBase import SSHClientBase
| 31.2 | 122 | 0.556366 |
6479e45e219721aaae6c4905f1adba39680d17b1 | 2,094 | py | Python | tilecloud/lib/sqlite3_.py | wendymhelson/tilecloud | 70f54d24d05e4e350317b12defd56e4eebe1f2c1 | [
"Unlicense"
] | null | null | null | tilecloud/lib/sqlite3_.py | wendymhelson/tilecloud | 70f54d24d05e4e350317b12defd56e4eebe1f2c1 | [
"Unlicense"
] | null | null | null | tilecloud/lib/sqlite3_.py | wendymhelson/tilecloud | 70f54d24d05e4e350317b12defd56e4eebe1f2c1 | [
"Unlicense"
] | null | null | null | from collections import MutableMapping as DictMixin
| 26.846154 | 90 | 0.644222 |
647c690b82071beffb86046caafc6c207204c7e0 | 4,316 | py | Python | taxcalc_arp/taxcalc/validation/taxsim27/prepare_taxcalc_input.py | hdoupe/Tax-Cruncher-ARP | c8c960c085d0883915f99ac2ea4630c928af4c16 | [
"MIT"
] | 1 | 2021-10-01T14:22:32.000Z | 2021-10-01T14:22:32.000Z | taxcalc_arp/taxcalc/validation/taxsim27/prepare_taxcalc_input.py | hdoupe/Tax-Cruncher-ARP | c8c960c085d0883915f99ac2ea4630c928af4c16 | [
"MIT"
] | 1 | 2021-03-16T13:57:36.000Z | 2021-03-16T13:57:36.000Z | taxcalc_arp/taxcalc/validation/taxsim27/prepare_taxcalc_input.py | hdoupe/Tax-Cruncher-ARP | c8c960c085d0883915f99ac2ea4630c928af4c16 | [
"MIT"
] | 1 | 2021-03-16T13:44:38.000Z | 2021-03-16T13:44:38.000Z | """
Translates TAXSIM-27 input file to Tax-Calculator tc input file.
"""
# CODING-STYLE CHECKS:
# pycodestyle prepare_tc_input.py
# pylint --disable=locally-disabled prepare_tc_input.py
import argparse
import os
import sys
import numpy as np
import pandas as pd
def main():
"""
High-level logic.
"""
#... | 37.530435 | 78 | 0.599398 |
647cfe0af9da296040c33beb3819d628a1608217 | 1,510 | py | Python | tests/integration_tests/resources/plugins/mock-rest-plugin/setup.py | TS-at-WS/cloudify-manager | 3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc | [
"Apache-2.0"
] | 124 | 2015-01-22T22:28:37.000Z | 2022-02-26T23:12:06.000Z | tests/integration_tests/resources/plugins/mock-rest-plugin/setup.py | TS-at-WS/cloudify-manager | 3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc | [
"Apache-2.0"
] | 345 | 2015-01-08T15:49:40.000Z | 2022-03-29T08:33:00.000Z | tests/integration_tests/resources/plugins/mock-rest-plugin/setup.py | TS-at-WS/cloudify-manager | 3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc | [
"Apache-2.0"
] | 77 | 2015-01-07T14:04:35.000Z | 2022-03-07T22:46:00.000Z | # ***************************************************************************
# * Copyright (c) 2013 GigaSpaces Technologies Ltd. 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 ... | 33.555556 | 79 | 0.619868 |
647d0967c28ab126510ff860ff2d966577a5da6f | 520 | py | Python | WebDECIMER/segmentation/migrations/0008_uploadedarticle_zippedextractedimages.py | Kohulan/DECIMER-Image-Segmentation | 68ee9a9693e5bad5c41826d28e2d6558a20fe21f | [
"MIT"
] | 29 | 2021-01-08T13:48:18.000Z | 2022-01-17T08:29:00.000Z | WebDECIMER/segmentation/migrations/0008_uploadedarticle_zippedextractedimages.py | Kohulan/DECIMER-Image-Segmentation | 68ee9a9693e5bad5c41826d28e2d6558a20fe21f | [
"MIT"
] | 23 | 2021-01-07T21:43:21.000Z | 2022-03-14T21:52:17.000Z | WebDECIMER/segmentation/migrations/0008_uploadedarticle_zippedextractedimages.py | Kohulan/DECIMER-Image-Segmentation | 68ee9a9693e5bad5c41826d28e2d6558a20fe21f | [
"MIT"
] | 8 | 2021-01-08T05:39:21.000Z | 2022-02-14T10:06:38.000Z | # Generated by Django 3.1.3 on 2020-12-09 13:41
from django.db import migrations, models
import segmentation.models
| 26 | 117 | 0.673077 |
647d10de27c79bcb57ed12505d2e4cdc3b96770f | 914 | py | Python | python/privatelink-rds/stacks/vpc_stack.py | aarondodd/aws-cdk-examples | 7ac382fe99656df19a4f96159c11e0aa546acaf4 | [
"Apache-2.0"
] | null | null | null | python/privatelink-rds/stacks/vpc_stack.py | aarondodd/aws-cdk-examples | 7ac382fe99656df19a4f96159c11e0aa546acaf4 | [
"Apache-2.0"
] | null | null | null | python/privatelink-rds/stacks/vpc_stack.py | aarondodd/aws-cdk-examples | 7ac382fe99656df19a4f96159c11e0aa546acaf4 | [
"Apache-2.0"
] | 1 | 2022-01-31T03:13:37.000Z | 2022-01-31T03:13:37.000Z | from aws_cdk import (
core,
aws_ec2 as ec2
) | 29.483871 | 91 | 0.503282 |
647db96c9aaf141903504ac8bd588d3cfc6e9c13 | 112,783 | py | Python | api/source/main/python/datacube/api/query.py | alex-ip/agdc | 9e9eb556c33792440a3736f64cd5f628cf3a1385 | [
"BSD-3-Clause"
] | null | null | null | api/source/main/python/datacube/api/query.py | alex-ip/agdc | 9e9eb556c33792440a3736f64cd5f628cf3a1385 | [
"BSD-3-Clause"
] | null | null | null | api/source/main/python/datacube/api/query.py | alex-ip/agdc | 9e9eb556c33792440a3736f64cd5f628cf3a1385 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# ===============================================================================
# Copyright (c) 2014 Geoscience Australia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
... | 35.861049 | 162 | 0.636967 |
647ed57ed963f5240abc63291aaba067a117c593 | 2,266 | py | Python | lifesaver/bot/config.py | slice/discord.py-lifesaver | 00c38112a512efd964cbbf0533096eff0a29f79f | [
"MIT"
] | 12 | 2017-12-21T03:44:52.000Z | 2021-02-05T02:09:13.000Z | lifesaver/bot/config.py | slice/lifesaver | 00c38112a512efd964cbbf0533096eff0a29f79f | [
"MIT"
] | 9 | 2017-12-21T01:56:07.000Z | 2020-12-31T00:01:20.000Z | lifesaver/bot/config.py | slice/lifesaver | 00c38112a512efd964cbbf0533096eff0a29f79f | [
"MIT"
] | 2 | 2017-12-21T01:52:07.000Z | 2019-12-17T01:51:50.000Z | # encoding: utf-8
__all__ = ["BotConfig", "BotLoggingConfig"]
from typing import Any, Dict, List, Optional, Union
from lifesaver.config import Config
YES_EMOJI = "\N{WHITE HEAVY CHECK MARK}"
NO_EMOJI = "\N{CROSS MARK}"
OK_EMOJI = "\N{OK HAND SIGN}"
DEFAULT_EMOJIS = {
"generic": {"yes": YES_EMOJI, "no": NO_EMOJ... | 27.634146 | 83 | 0.660194 |
647f1a2745d409d408f040287d5811bb8c5667a4 | 1,788 | py | Python | tests/test_inf_dim_rosenbrock.py | jungtaekkim/bayeso-benchmarks | 3650aaeeaa123da14f0f839da664b071ee17bf9a | [
"MIT"
] | 20 | 2019-12-17T09:01:59.000Z | 2022-01-17T02:06:28.000Z | tests/test_inf_dim_rosenbrock.py | jungtaekkim/bayeso-benchmarks | 3650aaeeaa123da14f0f839da664b071ee17bf9a | [
"MIT"
] | null | null | null | tests/test_inf_dim_rosenbrock.py | jungtaekkim/bayeso-benchmarks | 3650aaeeaa123da14f0f839da664b071ee17bf9a | [
"MIT"
] | 5 | 2019-12-18T08:41:36.000Z | 2020-11-06T07:25:57.000Z | #
# author: Jungtaek Kim (jtkim@postech.ac.kr)
# last updated: February 8, 2021
#
import numpy as np
import pytest
from bayeso_benchmarks.inf_dim_rosenbrock import *
class_fun = Rosenbrock
TEST_EPSILON = 1e-5
| 24.493151 | 78 | 0.599553 |
647f55fab23ad506dc4f355454eebadf13262216 | 26,314 | py | Python | pgoapi/protos/POGOProtos/Data/Battle_pb2.py | neoz/pgoapi | fd462be412ac347ab517b68f269e2342a7226909 | [
"MIT"
] | 1,457 | 2016-07-19T00:35:05.000Z | 2022-02-05T15:19:44.000Z | pgoapi/protos/POGOProtos/Data/Battle_pb2.py | neoz/pgoapi | fd462be412ac347ab517b68f269e2342a7226909 | [
"MIT"
] | 196 | 2016-07-19T00:23:53.000Z | 2018-06-07T16:12:27.000Z | pgoapi/protos/POGOProtos/Data/Battle_pb2.py | neoz/pgoapi | fd462be412ac347ab517b68f269e2342a7226909 | [
"MIT"
] | 501 | 2016-07-19T00:31:16.000Z | 2022-03-25T06:31:59.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: POGOProtos.Data.Battle.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf impor... | 44.751701 | 3,275 | 0.764802 |
64808ef89b84bb0c8f0cd239793909c476cae64b | 1,162 | py | Python | function_zoo.py | RamiroFuentes/Procesos-de-separacion-II | d68873f8ee3e9eb081f1040f9510335746b1a0b4 | [
"MIT"
] | null | null | null | function_zoo.py | RamiroFuentes/Procesos-de-separacion-II | d68873f8ee3e9eb081f1040f9510335746b1a0b4 | [
"MIT"
] | null | null | null | function_zoo.py | RamiroFuentes/Procesos-de-separacion-II | d68873f8ee3e9eb081f1040f9510335746b1a0b4 | [
"MIT"
] | null | null | null | # Librerias
import numpy as np
from numpy import poly1d,polyfit
import matplotlib.pyplot as plt
from sympy import Symbol
import pandas as pd
# Para imprimir en formato LaTex
from sympy.interactive import printing
printing.init_printing(use_latex=True)
| 24.208333 | 168 | 0.557659 |
6480abc07da7997c5213c7de64b16b108725ed90 | 840 | py | Python | Python/lc_523_continuous_subarray_sum.py | cmattey/leetcode_problems | fe57e668db23f7c480835c0a10f363d718fbaefd | [
"MIT"
] | 6 | 2019-07-01T22:03:25.000Z | 2020-04-06T15:17:46.000Z | Python/lc_523_continuous_subarray_sum.py | cmattey/leetcode_problems | fe57e668db23f7c480835c0a10f363d718fbaefd | [
"MIT"
] | null | null | null | Python/lc_523_continuous_subarray_sum.py | cmattey/leetcode_problems | fe57e668db23f7c480835c0a10f363d718fbaefd | [
"MIT"
] | 1 | 2020-04-01T22:31:41.000Z | 2020-04-01T22:31:41.000Z | # Time: O(n)
# Space: O(n) , min(n,k) since only storing num%k element in map.
| 30 | 122 | 0.492857 |
648156a0f59f1f2c08d7464a8925a30d4b6a2f12 | 1,180 | py | Python | api/routers/gifs.py | janaSunrise/AIO-API-discord-bots | e280959f7023bb9d745c843e823b980ccf627438 | [
"Apache-2.0"
] | 2 | 2021-02-13T08:08:23.000Z | 2021-05-09T13:10:54.000Z | api/routers/gifs.py | janaSunrise/AIO-API-discord-bots | e280959f7023bb9d745c843e823b980ccf627438 | [
"Apache-2.0"
] | null | null | null | api/routers/gifs.py | janaSunrise/AIO-API-discord-bots | e280959f7023bb9d745c843e823b980ccf627438 | [
"Apache-2.0"
] | 1 | 2021-04-17T19:44:52.000Z | 2021-04-17T19:44:52.000Z | from fastapi import APIRouter, Request
from api.core import log_error
router = APIRouter(
prefix="/gifs",
tags=["GIF generation endpoints"],
responses={
404: {"description": "Not found"},
},
)
# -- Router paths --
| 24.081633 | 88 | 0.64322 |
6483fef3d85844e7f3c1dc2eb3bf6958fc1d4faa | 565 | py | Python | feature_extract_pc/demo.py | zzc-1998/NR-3DQA | 4773b598a92f707892fabafd7061b758dfb37508 | [
"MIT"
] | 5 | 2021-08-04T08:24:28.000Z | 2022-02-16T15:30:18.000Z | feature_extract_pc/demo.py | zzc-1998/NR-QA-for-point-cloud | 4773b598a92f707892fabafd7061b758dfb37508 | [
"MIT"
] | null | null | null | feature_extract_pc/demo.py | zzc-1998/NR-QA-for-point-cloud | 4773b598a92f707892fabafd7061b758dfb37508 | [
"MIT"
] | null | null | null | from feature_extract import get_feature_vector
import time
#demo
objpath = "models/hhi_5.ply"
start = time.time()
features = get_feature_vector(objpath)
end = time.time()
time_cost = end-start
#show the features
cnt = 0
for feature_domain in ['l','a','b','curvature','anisotropy','linearity','planarity','sphericity']... | 29.736842 | 106 | 0.661947 |
64850fc8936473f12079768631779f5e9426371c | 784 | py | Python | docs/pyxamples/glyphs.py | JuliaPackageMirrors/Bokeh.jl | 47ec974a2759f81069e5143d74c22876e60f8ec2 | [
"MIT",
"BSD-3-Clause"
] | 31 | 2015-02-23T03:21:48.000Z | 2017-05-13T13:10:22.000Z | docs/pyxamples/glyphs.py | JuliaPackageMirrors/Bokeh.jl | 47ec974a2759f81069e5143d74c22876e60f8ec2 | [
"MIT",
"BSD-3-Clause"
] | 35 | 2015-01-03T16:38:01.000Z | 2017-05-19T19:55:14.000Z | docs/pyxamples/glyphs.py | JuliaPackageMirrors/Bokeh.jl | 47ec974a2759f81069e5143d74c22876e60f8ec2 | [
"MIT",
"BSD-3-Clause"
] | 13 | 2015-01-06T12:38:32.000Z | 2017-05-16T05:54:38.000Z | import numpy as np
from bokeh.plotting import *
N = 100
x = np.linspace(0, 4*np.pi, N)
y = np.sin(x)
output_file("glyphs.html", title="glyphs.py example")
TOOLS = "pan,wheel_zoom,box_zoom,reset,save,box_select"
p2 = figure(title="Another Legend Example", tools=TOOLS)
p2.circle(x, y, legend="sin(x)")
p2.line(x, y... | 23.757576 | 56 | 0.690051 |
64855ec485719a4209443f6e47f00e7cc576af85 | 2,103 | py | Python | unit_tests/test_main.py | cloverleaf/npm | 4845bc7e483291f2a2a847c242613bae2c6a11d2 | [
"MIT"
] | null | null | null | unit_tests/test_main.py | cloverleaf/npm | 4845bc7e483291f2a2a847c242613bae2c6a11d2 | [
"MIT"
] | 4 | 2021-01-29T11:17:53.000Z | 2021-09-04T16:01:28.000Z | unit_tests/test_main.py | cloverleaf/npm | 4845bc7e483291f2a2a847c242613bae2c6a11d2 | [
"MIT"
] | 1 | 2021-11-23T09:59:36.000Z | 2021-11-23T09:59:36.000Z | import pytest
import json
import subprocess
defaultMinLength = 4
defaultMaxLength = 512
sites = {}
with open("../data/sites.json", 'r') as json_file:
sites = json.load(json_file)
| 31.38806 | 136 | 0.555873 |
6486381637823d2233cc5e2e755dff8914311f6f | 5,841 | py | Python | third-party/rlimit/scripts/codegen.py | capyloon/api-daemon | ab4e4b60aa9bb617734c64655c0b8940fff098bc | [
"Apache-2.0"
] | 4 | 2022-02-08T05:32:15.000Z | 2022-03-29T22:35:33.000Z | third-party/rlimit/scripts/codegen.py | capyloon/api-daemon | ab4e4b60aa9bb617734c64655c0b8940fff098bc | [
"Apache-2.0"
] | null | null | null | third-party/rlimit/scripts/codegen.py | capyloon/api-daemon | ab4e4b60aa9bb617734c64655c0b8940fff098bc | [
"Apache-2.0"
] | 1 | 2022-03-20T11:14:51.000Z | 2022-03-20T11:14:51.000Z | from typing import Optional, Dict, List
import json
import os
import re
from pprint import pprint
LIBC_REPO_PATH = os.getenv("LIBC_REPO_PATH", "libc")
PREDICATES = {
"fuchsia/mod.rs": {"os": ["fuchsia"]},
"unix/bsd/apple/mod.rs": {"os": ["macos", "ios"]},
"unix/bsd/freebsdlike/dragonfly/mod.rs": {"os": ["... | 34.56213 | 104 | 0.541174 |
64866e488fcf4d0cd9c082174609e3027b9764d4 | 686 | py | Python | pyaviso/custom_exceptions.py | mpejcoch/aviso | 250b5646220fae85725278b3ca80fed4e15a103a | [
"Apache-2.0"
] | 6 | 2021-02-03T17:55:05.000Z | 2022-02-20T08:05:42.000Z | pyaviso/custom_exceptions.py | mpejcoch/aviso | 250b5646220fae85725278b3ca80fed4e15a103a | [
"Apache-2.0"
] | 1 | 2021-04-26T14:42:39.000Z | 2021-04-26T14:42:39.000Z | pyaviso/custom_exceptions.py | mpejcoch/aviso | 250b5646220fae85725278b3ca80fed4e15a103a | [
"Apache-2.0"
] | 2 | 2021-02-09T15:07:41.000Z | 2021-08-13T09:55:30.000Z | # (C) Copyright 1996- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernment... | 21.4375 | 78 | 0.771137 |
64879ceed73b3f3ed843d40690f61395ac4530f2 | 13,389 | py | Python | deepatari/tools/statistics.py | cowhi/deepatari | 3b676ca4fc66266d766cd2366226f3e10213bc78 | [
"MIT"
] | 10 | 2016-06-10T01:13:44.000Z | 2017-10-15T10:47:09.000Z | deepatari/tools/statistics.py | cowhi/deepatari | 3b676ca4fc66266d766cd2366226f3e10213bc78 | [
"MIT"
] | null | null | null | deepatari/tools/statistics.py | cowhi/deepatari | 3b676ca4fc66266d766cd2366226f3e10213bc78 | [
"MIT"
] | 2 | 2016-06-10T14:38:08.000Z | 2020-08-29T03:11:06.000Z | import logging
_logger = logging.getLogger(__name__)
import sys
import os
import csv
import time
import numpy as np
| 44.481728 | 276 | 0.56778 |
6488b1c28baaff292669122a86d2163e41ff8cf6 | 1,284 | py | Python | cmskit/products/views.py | ozgurgunes/django-cmskit | 19d14fbb57702a6c56b6b3a5d859c93533ff1535 | [
"MIT"
] | 1 | 2015-09-28T10:10:34.000Z | 2015-09-28T10:10:34.000Z | cmskit/products/views.py | ozgurgunes/django-cmskit | 19d14fbb57702a6c56b6b3a5d859c93533ff1535 | [
"MIT"
] | null | null | null | cmskit/products/views.py | ozgurgunes/django-cmskit | 19d14fbb57702a6c56b6b3a5d859c93533ff1535 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.utils.translation import get_language
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from django.http import Http404
from cmskit.products.models import Category, Product
| 41.419355 | 80 | 0.662773 |
648919faa81c812b312bc58cbd08e8cc789afe5f | 307 | py | Python | main.py | baifengbai/xlart | d4568dcc3c221b25a9227af1ae022c4f0a5b3476 | [
"MIT"
] | 1 | 2022-03-12T02:40:51.000Z | 2022-03-12T02:40:51.000Z | main.py | baifengbai/xlart | d4568dcc3c221b25a9227af1ae022c4f0a5b3476 | [
"MIT"
] | null | null | null | main.py | baifengbai/xlart | d4568dcc3c221b25a9227af1ae022c4f0a5b3476 | [
"MIT"
] | null | null | null | from time import time
import xlart
if __name__ == '__main__':
start = time()
xlart.resize_image('picture.jpg', 'picture_resized.jpg', 200, 200)
xlart.image_to_xlsx('picture_resized.jpg', 'demo.xlsx')
end = time()
print('An xlart file has been generated in ' + str(end - start) + 's.')
| 27.909091 | 75 | 0.664495 |
6489d5635a822fcdc10fe744a26044fe5cedea48 | 528 | py | Python | tests/units/Vault/test_withdraw_all.py | benber86/alcom_contracts | 57136d97d0d30088679e358a2fc3345e82ccb0f7 | [
"MIT"
] | 2 | 2021-07-14T16:26:14.000Z | 2021-08-01T22:24:51.000Z | tests/units/Vault/test_withdraw_all.py | benber86/alcom_contracts | 57136d97d0d30088679e358a2fc3345e82ccb0f7 | [
"MIT"
] | null | null | null | tests/units/Vault/test_withdraw_all.py | benber86/alcom_contracts | 57136d97d0d30088679e358a2fc3345e82ccb0f7 | [
"MIT"
] | null | null | null | import brownie
AMOUNT = 10 ** 18
| 27.789474 | 64 | 0.717803 |
648a4501d473d939e72e3971c0c63e4c5c253da2 | 34 | py | Python | sigcom/__main__.py | dcic/signature-commons-controller | b69c4063235d927da27891e8a30d2822c6768a66 | [
"Apache-2.0"
] | null | null | null | sigcom/__main__.py | dcic/signature-commons-controller | b69c4063235d927da27891e8a30d2822c6768a66 | [
"Apache-2.0"
] | 2 | 2020-06-09T14:52:34.000Z | 2020-11-06T18:02:49.000Z | sigcom/__main__.py | dcic/signature-commons-controller | b69c4063235d927da27891e8a30d2822c6768a66 | [
"Apache-2.0"
] | null | null | null | from sigcom.cli import main
main() | 17 | 27 | 0.794118 |
648aec550e075b1bc9c41b89b9001500027781fb | 221 | py | Python | mentorship_api/views.py | brickfaced/mentorship-app | b2fd44f2689bd0e613f2f4836c81aa1de9ecf0b3 | [
"MIT"
] | null | null | null | mentorship_api/views.py | brickfaced/mentorship-app | b2fd44f2689bd0e613f2f4836c81aa1de9ecf0b3 | [
"MIT"
] | null | null | null | mentorship_api/views.py | brickfaced/mentorship-app | b2fd44f2689bd0e613f2f4836c81aa1de9ecf0b3 | [
"MIT"
] | null | null | null | from rest_framework.decorators import api_view
from rest_framework.response import Response
| 24.555556 | 48 | 0.746606 |
648b823acfa1c931f329b120da5595b30d0999f3 | 685 | py | Python | tests/test_constituency_parsing.py | jayten42/pororo | 0b02e6a633b9a32ec4241b8ed96745e6592db317 | [
"Apache-2.0"
] | 1,137 | 2021-02-02T02:09:06.000Z | 2022-03-29T03:10:40.000Z | tests/test_constituency_parsing.py | jayten42/pororo | 0b02e6a633b9a32ec4241b8ed96745e6592db317 | [
"Apache-2.0"
] | 57 | 2021-02-02T03:29:54.000Z | 2022-03-31T16:20:00.000Z | tests/test_constituency_parsing.py | jayten42/pororo | 0b02e6a633b9a32ec4241b8ed96745e6592db317 | [
"Apache-2.0"
] | 216 | 2021-02-02T02:49:02.000Z | 2022-03-28T01:19:58.000Z | """Test Constituency Parsing module"""
import unittest
from pororo import Pororo
if __name__ == "__main__":
unittest.main()
| 25.37037 | 77 | 0.640876 |
648bc0fbcc9b572dd1e815e182903fd435d432c6 | 6,120 | py | Python | goat_scraper.py | Joseph1337/Snkr-Findr-API | 7caf2eef5beb487d1a5446dafec796c37c7e6be4 | [
"MIT"
] | 4 | 2021-03-03T17:14:25.000Z | 2022-01-22T14:52:49.000Z | goat_scraper.py | Joseph1337/Snkr-Trakr-API | 7caf2eef5beb487d1a5446dafec796c37c7e6be4 | [
"MIT"
] | null | null | null | goat_scraper.py | Joseph1337/Snkr-Trakr-API | 7caf2eef5beb487d1a5446dafec796c37c7e6be4 | [
"MIT"
] | null | null | null | import json
import requests
import pprint
from time import sleep
import random
#extracts all user-agents from the provided 'ua_file.txt' into a list then randomly selects a user-agent
#function to get all sneakers from 'Shop All' page
def getAllSneakers(keyword=''):
sneakersList = []
#api call to retrieve ... | 39.483871 | 244 | 0.584967 |
648cfa630e52c9714c4474f00133814086416c14 | 585 | py | Python | src/ChapterTwo/insertionSort.py | Ivehui/Algorithms | 3f5e183100f84f59cf62fe35422128490b7be0cb | [
"MIT"
] | null | null | null | src/ChapterTwo/insertionSort.py | Ivehui/Algorithms | 3f5e183100f84f59cf62fe35422128490b7be0cb | [
"MIT"
] | null | null | null | src/ChapterTwo/insertionSort.py | Ivehui/Algorithms | 3f5e183100f84f59cf62fe35422128490b7be0cb | [
"MIT"
] | null | null | null | import numpy as np
if __name__ == '__main__':
#
array = np.random.rand(10)
print array
solution = InsertionSort()
print solution.insertionSort(array) | 24.375 | 44 | 0.495726 |
648e62a712e9527d4e41e9d0aa25cde0e47d754b | 4,674 | py | Python | src/morsecoder.py | PyMorseCoder/MorseCoder | 3266f2ec7c0563affd0c6d7a71a621245fb890e4 | [
"Apache-2.0"
] | 7 | 2021-06-20T22:57:36.000Z | 2021-07-05T21:43:24.000Z | src/morsecoder.py | HestStudio/MorseCoder | 3266f2ec7c0563affd0c6d7a71a621245fb890e4 | [
"Apache-2.0"
] | null | null | null | src/morsecoder.py | HestStudio/MorseCoder | 3266f2ec7c0563affd0c6d7a71a621245fb890e4 | [
"Apache-2.0"
] | 2 | 2021-07-30T04:28:14.000Z | 2022-01-02T07:45:30.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Update time: 2021/6/19
if __name__ == '__main__':
#
myCode = Morsecoder(text='Hello World', sep='/')
for values in myCode.getEncode():
print(values, end='')
print()
#
myCode.setArgs(text='...././.-../.-../---/ /.--/---/.-./.... | 22.257143 | 78 | 0.384467 |
648f3c72677968d9346724e918ca2c01342d3bfb | 6,629 | py | Python | third_party/chromite/scripts/sysmon/puppet_metrics_unittest.py | zipated/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | third_party/chromite/scripts/sysmon/puppet_metrics_unittest.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | third_party/chromite/scripts/sysmon/puppet_metrics_unittest.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for puppet_metrics."""
# pylint: disable=protected-access
from __future__ import absolute_import
from __future__ i... | 33.821429 | 77 | 0.607633 |
6490cc9b76431e255aeab4722b02c97b8014ad01 | 5,628 | py | Python | src/flocker/blueprints/mvg-frame/__init__.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | src/flocker/blueprints/mvg-frame/__init__.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | src/flocker/blueprints/mvg-frame/__init__.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | import os
import time
from flask import Blueprint, render_template, redirect, url_for, request, current_app
from . import mvg
from . import displays
from PIL import Image, ImageFont, ImageDraw | 39.083333 | 122 | 0.555792 |
649106bcf86144f6cc9ff5c528dd98e420f849a0 | 4,770 | py | Python | friendly/runtime_errors/value_error.py | MrGreenTea/friendly | 091f6af1d3c2be8fee078e52db6e16074d5518e5 | [
"MIT"
] | null | null | null | friendly/runtime_errors/value_error.py | MrGreenTea/friendly | 091f6af1d3c2be8fee078e52db6e16074d5518e5 | [
"MIT"
] | null | null | null | friendly/runtime_errors/value_error.py | MrGreenTea/friendly | 091f6af1d3c2be8fee078e52db6e16074d5518e5 | [
"MIT"
] | null | null | null | """value_error.py
Collection of functions useful in parsing ValueError messages and
providing a more detailed explanation.
"""
import re
from ..my_gettext import current_lang, no_information, internal_error
from .. import info_variables
from .. import debug_helper
from .. import utils
convert_type = info_variables.... | 31.176471 | 87 | 0.639832 |
64925ae9eca3932ebf1ffc775b41ccb44e8ec05b | 874 | py | Python | tests/api_test.py | pierscin/battleships | 1014c6c87769c687838f43644d534d5f034e53bc | [
"MIT"
] | null | null | null | tests/api_test.py | pierscin/battleships | 1014c6c87769c687838f43644d534d5f034e53bc | [
"MIT"
] | null | null | null | tests/api_test.py | pierscin/battleships | 1014c6c87769c687838f43644d534d5f034e53bc | [
"MIT"
] | null | null | null | import jwt
from flask import json
| 28.193548 | 95 | 0.509153 |
6492a201029a7d225176b66fd3ca085b9340bf5b | 5,951 | py | Python | bctree/bctree.py | lad/bctree | 7f99917fab9071af8ad870ba39304bd804e78e12 | [
"Apache-2.0"
] | 1 | 2016-02-16T20:07:34.000Z | 2016-02-16T20:07:34.000Z | bctree/bctree.py | lad/bctree | 7f99917fab9071af8ad870ba39304bd804e78e12 | [
"Apache-2.0"
] | null | null | null | bctree/bctree.py | lad/bctree | 7f99917fab9071af8ad870ba39304bd804e78e12 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""BeatCleaver Unsorted Tree Implementation."""
from collections import deque
# pylint: disable-msg=W0212
# pylint can't figure out that we're accessing a protected member of our own
# class.
| 33.621469 | 77 | 0.584104 |
6493ad91016eb24320a1dda1bde3e1ebc624f532 | 324 | py | Python | pypheus/__init__.py | xod442/pypheus | 11988d7c0efe2772bca80c2d40a71cc8ba707153 | [
"Apache-2.0"
] | null | null | null | pypheus/__init__.py | xod442/pypheus | 11988d7c0efe2772bca80c2d40a71cc8ba707153 | [
"Apache-2.0"
] | null | null | null | pypheus/__init__.py | xod442/pypheus | 11988d7c0efe2772bca80c2d40a71cc8ba707153 | [
"Apache-2.0"
] | null | null | null | """
Information
==================
pypheus is a Python binding for Morpheus a prominent Cloud Management Platform.
This application will abstract the the Morpheus API and allow users to make simple python requests.
wookieware 2022
version 0.1.0 - init release
"""
from pypheus import (auth, network, storage, monitori... | 24.923077 | 99 | 0.743827 |
64949fc4b1f9f8284a4942246dab5340df67e65c | 773 | py | Python | src/main.py | juhovan/stuk-dose-rate-exporter | 7eec62cc3c9dad48a0a2868dcb55e9a9b4bd569e | [
"MIT"
] | null | null | null | src/main.py | juhovan/stuk-dose-rate-exporter | 7eec62cc3c9dad48a0a2868dcb55e9a9b4bd569e | [
"MIT"
] | 1 | 2022-03-08T20:52:02.000Z | 2022-03-08T20:52:02.000Z | src/main.py | juhovan/stuk-dose-rate-exporter | 7eec62cc3c9dad48a0a2868dcb55e9a9b4bd569e | [
"MIT"
] | null | null | null | #!/bin/python
import datetime
from http.server import HTTPServer, BaseHTTPRequestHandler
import dose_rates
httpd = HTTPServer(('0.0.0.0', 8080), SimpleHTTPRequestHandler)
httpd.serve_forever()
| 26.655172 | 75 | 0.609314 |
64964ba79d274a79f8d5db3be6c5c4e25679a0db | 824 | py | Python | trpg/views/auth.py | jffifa/trpg | d808e5ce208a164154d93b177cb0c013a0d5f742 | [
"MIT"
] | 2 | 2018-08-01T16:02:10.000Z | 2018-08-11T05:08:14.000Z | trpg/views/auth.py | jffifa/trpg | d808e5ce208a164154d93b177cb0c013a0d5f742 | [
"MIT"
] | 5 | 2018-08-01T12:59:03.000Z | 2018-08-10T19:32:20.000Z | trpg/views/auth.py | jffifa/trpg | d808e5ce208a164154d93b177cb0c013a0d5f742 | [
"MIT"
] | null | null | null | from .base import JSONView
from django.contrib.auth import authenticate, login, logout
from django.urls import reverse
from ..registration.utility import decrypt as password_decrypt
| 28.413793 | 79 | 0.639563 |
6496e828b7afe578a9d14aa5a0c97a8185b15a63 | 7,487 | py | Python | service/api.py | psorianom/csv_detective_api | 7c96f497374d842226a95a26cb6627ac22cd799b | [
"MIT"
] | 2 | 2020-02-04T05:24:56.000Z | 2021-05-05T17:22:55.000Z | service/api.py | psorianom/csv_detective_api | 7c96f497374d842226a95a26cb6627ac22cd799b | [
"MIT"
] | 10 | 2019-10-24T13:29:59.000Z | 2022-02-26T17:06:15.000Z | service/api.py | psorianom/csv_detective_api | 7c96f497374d842226a95a26cb6627ac22cd799b | [
"MIT"
] | 2 | 2019-12-30T23:26:53.000Z | 2020-03-27T17:23:28.000Z | #!flask/bin/python
import os
import sys
from collections import defaultdict
sys.path.append("./csv_detective_ml") # horrible hack to load my features class to load my ML pipeline :/
from flask import Flask
from flask import request
from flask import jsonify
from flask_restplus import Api, Resource, fields
from flask_... | 33.573991 | 112 | 0.625351 |
6497557f12dce30fe9d34eda6e562520909cd934 | 624 | py | Python | Python-code-snippets-001-100/080-crop image and save.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-001-100/080-crop image and save.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-001-100/080-crop image and save.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | '''
80-Crop Image
Source: vars sources and shambleized
pip install opencv-python
'''
import cv2
# Load image to crop.
img = cv2.imread('weird.jpg', cv2.IMREAD_UNCHANGED)
# Set crop dimensions
# We first supply the startY and endY coordinates,
#followed by the startX and endX coordinates to the slice.
#top-line-230 ... | 20.8 | 61 | 0.740385 |