hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
759bf327009e2a0d20028cd808a8ae5f1f115897 | 429 | py | Python | generate_target.py | jmpmulter/coolon-pipeline | 8e92aa717e89d4ec901366a20da58e4fab14f778 | [
"MIT"
] | null | null | null | generate_target.py | jmpmulter/coolon-pipeline | 8e92aa717e89d4ec901366a20da58e4fab14f778 | [
"MIT"
] | null | null | null | generate_target.py | jmpmulter/coolon-pipeline | 8e92aa717e89d4ec901366a20da58e4fab14f778 | [
"MIT"
] | null | null | null | #generate_target.py
#Generates a list of target genes from a flybase output
import os
import sys
def main():
in_path = sys.argv[1]
out_path = sys.argv[2]
infile = open(in_path, "r")
outfile = open(out_path, "x")
for l0 in infile:
l0s = l0.split(",")
for item in l0s:
if "... | 23.833333 | 55 | 0.575758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.249417 |
759bf36e0615b479286d04e29a2aa057689eab17 | 3,512 | py | Python | pgAdmin/utils/master_password.py | WeilerWebServices/PostgreSQL | ae594ed077bebbad1be3c1d95c38b7c2c2683e8c | [
"PostgreSQL"
] | null | null | null | pgAdmin/utils/master_password.py | WeilerWebServices/PostgreSQL | ae594ed077bebbad1be3c1d95c38b7c2c2683e8c | [
"PostgreSQL"
] | 3 | 2021-09-02T15:51:44.000Z | 2022-03-02T09:53:17.000Z | win64-postgresql/pgAdmin 4/web/pgadmin/utils/master_password.py | vnetcon/curvy | ed3749bd5d298c7ab6c0625de91c211d6da4c762 | [
"Apache-2.0"
] | null | null | null | import config
from flask import current_app
from flask_login import current_user
from pgadmin.model import db, User, Server
from pgadmin.utils.crypto import encrypt, decrypt
MASTERPASS_CHECK_TEXT = 'ideas are bulletproof'
def set_crypt_key(_key, _new_login=True):
"""
Set the crypt key
:param _key: The k... | 29.266667 | 77 | 0.691913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,205 | 0.343109 |
759c9c03daed3987b022572f95ef159fbf48d6f3 | 238 | py | Python | hrsalespipes/dashboard/urls.py | hanztura/hrsalespipes | 77accf3132726ced05d84fa2a41891b841f310b8 | [
"Apache-2.0"
] | 3 | 2020-03-26T12:43:43.000Z | 2021-05-10T14:35:51.000Z | hrsalespipes/dashboard/urls.py | hanztura/hrsalespipes | 77accf3132726ced05d84fa2a41891b841f310b8 | [
"Apache-2.0"
] | 5 | 2021-04-08T21:15:15.000Z | 2022-02-10T11:03:12.000Z | hrsalespipes/dashboard/urls.py | hanztura/hrsalespipes | 77accf3132726ced05d84fa2a41891b841f310b8 | [
"Apache-2.0"
] | 1 | 2022-01-30T19:24:48.000Z | 2022-01-30T19:24:48.000Z | from django.urls import path
from .views import DashboardTemplateView, DashboardView
app_name = 'dashboard'
urlpatterns = [
path('test/', DashboardView.as_view(), name='test'),
path('', DashboardView.as_view(), name='index'),
]
| 23.8 | 56 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.138655 |
759ce6e746deead9ce63c2abe9211efd40789622 | 904 | py | Python | tests/test_group_deletion.py | igoldin74/python_for_testers | c992f85f7b08487e79c4c45ab86e0fdeb2c47b20 | [
"Apache-2.0"
] | null | null | null | tests/test_group_deletion.py | igoldin74/python_for_testers | c992f85f7b08487e79c4c45ab86e0fdeb2c47b20 | [
"Apache-2.0"
] | null | null | null | tests/test_group_deletion.py | igoldin74/python_for_testers | c992f85f7b08487e79c4c45ab86e0fdeb2c47b20 | [
"Apache-2.0"
] | null | null | null | import random
from model.group import Group
def test_group_removal(app, db, check_ui):
old_group_list = db.get_group_list()
group = random.choice(old_group_list)
if len(db.get_group_list()) == 0:
app.group.create(Group(name="test_group_random_name", header="random_header", footer="random_footer"))... | 45.2 | 110 | 0.713496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.170354 |
759d23943bc7a51dc76aa89f5a85cc113775bdad | 1,946 | py | Python | projects/wizard_of_wikipedia_ko/generator/train_end2end.py | kimsan0622/anonymous_kowow | 25f55add8e657b2186dfdedca3e5035b567b235e | [
"MIT"
] | 2 | 2021-09-06T16:58:53.000Z | 2022-01-14T04:17:48.000Z | projects/wizard_of_wikipedia_ko/generator/train_end2end.py | kimsan0622/anonymous_kowow | 25f55add8e657b2186dfdedca3e5035b567b235e | [
"MIT"
] | null | null | null | projects/wizard_of_wikipedia_ko/generator/train_end2end.py | kimsan0622/anonymous_kowow | 25f55add8e657b2186dfdedca3e5035b567b235e | [
"MIT"
] | 1 | 2022-01-14T09:01:41.000Z | 2022-01-14T09:01:41.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai.scripts.train_model import setup_args, TrainLoop
if __name__ == '__main__':
parser = setup_args()
p... | 48.65 | 424 | 0.722508 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,176 | 0.604317 |
759dbd8419466a5b58d9ed3efce98d055fc109cf | 37,914 | py | Python | notebooks/__code/normalization/normalization_with_simplify_selection.py | mabrahamdevops/python_notebooks | 6d5e7383b60cc7fd476f6e85ab93e239c9c32330 | [
"BSD-3-Clause"
] | null | null | null | notebooks/__code/normalization/normalization_with_simplify_selection.py | mabrahamdevops/python_notebooks | 6d5e7383b60cc7fd476f6e85ab93e239c9c32330 | [
"BSD-3-Clause"
] | null | null | null | notebooks/__code/normalization/normalization_with_simplify_selection.py | mabrahamdevops/python_notebooks | 6d5e7383b60cc7fd476f6e85ab93e239c9c32330 | [
"BSD-3-Clause"
] | null | null | null | import os
import collections
import numpy as np
from ipywidgets import widgets
from IPython.core.display import display, HTML
import logging
from NeuNorm.normalization import Normalization
from __code import file_handler
from __code.ipywe import myfileselector
from __code.normalization.get import Get
from __code.norm... | 51.304465 | 175 | 0.579786 | 37,297 | 0.983726 | 0 | 0 | 0 | 0 | 0 | 0 | 7,358 | 0.194071 |
759e0a9f6bfd13dc1e30f52a13990d9895e8e99e | 12,719 | py | Python | backups_manager_lib_test_util.py | cantstopthesignal/backups_lib | dec602fc90d285b8581af35e514eb90309b6da89 | [
"Apache-2.0"
] | null | null | null | backups_manager_lib_test_util.py | cantstopthesignal/backups_lib | dec602fc90d285b8581af35e514eb90309b6da89 | [
"Apache-2.0"
] | null | null | null | backups_manager_lib_test_util.py | cantstopthesignal/backups_lib | dec602fc90d285b8581af35e514eb90309b6da89 | [
"Apache-2.0"
] | null | null | null | import contextlib
import io
import os
import re
import subprocess
from . import backups_manager_lib
from . import backups_main
from . import lib
from .test_util import AssertEquals
from .test_util import AssertLinesEqual
from .test_util import CreateDir
from .test_util import CreateFile
from .test_util import DoBacku... | 40.123028 | 103 | 0.676232 | 0 | 0 | 192 | 0.015096 | 219 | 0.017218 | 0 | 0 | 1,825 | 0.143486 |
759e1233cd5221eb7c3d3a4d3d8e9c2c06bf7609 | 234 | py | Python | backend/templatetags/back_tag.py | h1gfun4/h1gfun4.github.io | e460467cb505b525ecd5b01b9eb3fd73de7ec6e1 | [
"MIT"
] | null | null | null | backend/templatetags/back_tag.py | h1gfun4/h1gfun4.github.io | e460467cb505b525ecd5b01b9eb3fd73de7ec6e1 | [
"MIT"
] | null | null | null | backend/templatetags/back_tag.py | h1gfun4/h1gfun4.github.io | e460467cb505b525ecd5b01b9eb3fd73de7ec6e1 | [
"MIT"
] | null | null | null | from django import template
from backend.models import Back
register = template.Library()
@register.inclusion_tag('backend/tags/scrollMenuB.html')
def get_back():
scrollB = Back.objects.all()
return {"scrollMenuB": scrollB } | 26 | 56 | 0.75641 | 0 | 0 | 0 | 0 | 142 | 0.606838 | 0 | 0 | 44 | 0.188034 |
759fec04ca6bf4fd01f099c1761a43c8c03c98c7 | 9,116 | py | Python | ecommerce/views.py | umarmughal824/bootcamp-ecommerce | 681bcc788a66867b8f240790c0ed33680b73932b | [
"BSD-3-Clause"
] | 2 | 2018-06-20T19:37:03.000Z | 2021-01-06T09:51:40.000Z | ecommerce/views.py | mitodl/bootcamp-ecommerce | ba7d6aefe56c6481ae2a5afc84cdd644538b6d50 | [
"BSD-3-Clause"
] | 1,226 | 2017-02-23T14:52:28.000Z | 2022-03-29T13:19:54.000Z | ecommerce/views.py | umarmughal824/bootcamp-ecommerce | 681bcc788a66867b8f240790c0ed33680b73932b | [
"BSD-3-Clause"
] | 3 | 2017-03-20T03:51:27.000Z | 2021-03-19T15:54:31.000Z | """Views for ecommerce"""
from decimal import Decimal
import logging
from django.conf import settings
from django.contrib.auth import get_user_model
from django.http.response import Http404
from django.shortcuts import get_object_or_404
from django.urls import reverse
from ipware import get_client_ip
from rest_framewo... | 34.793893 | 111 | 0.691751 | 7,267 | 0.79717 | 0 | 0 | 0 | 0 | 0 | 0 | 2,154 | 0.236288 |
75a10f7c8bb2269ffd29a74f44cb282618db5d67 | 3,334 | py | Python | sagemaker-python-sdk/pytorch_lstm_word_language_model/source/generate.py | BluePilgrim/amazon-sagemaker-examples | e20c855dd912331a9380980712f2fef7d05d3d2d | [
"Apache-2.0"
] | 7 | 2018-10-25T16:35:54.000Z | 2022-02-12T15:24:11.000Z | sagemaker-python-sdk/pytorch_lstm_word_language_model/source/generate.py | vlordier/amazon-sagemaker-examples | 6c59b6e435f040bdbe6a7c346fc0ce397f7746d8 | [
"Apache-2.0"
] | 1 | 2019-04-10T20:21:18.000Z | 2019-04-10T20:21:18.000Z | sagemaker-python-sdk/pytorch_lstm_word_language_model/source/generate.py | vlordier/amazon-sagemaker-examples | 6c59b6e435f040bdbe6a7c346fc0ce397f7746d8 | [
"Apache-2.0"
] | 2 | 2020-02-19T03:10:18.000Z | 2022-03-16T12:49:31.000Z | import json
import logging
import os
import torch
from rnn import RNNModel
import data
JSON_CONTENT_TYPE = 'application/json'
logger = logging.getLogger(__name__)
def model_fn(model_dir):
logger.info('Loading the model.')
model_info = {}
with open(os.path.join(model_dir, 'model_info.pth'), 'rb') as f:... | 39.223529 | 107 | 0.654469 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 820 | 0.245951 |
75a2597adcdcae122cb7a9e4d78b3707b95ae319 | 889 | py | Python | get_data.py | fromdatavistodatascience/Boston-Airpot-Traffic-Visualisation | 9f30e89e68c25e6fbcf13d84fee561b53ff70d84 | [
"MIT"
] | null | null | null | get_data.py | fromdatavistodatascience/Boston-Airpot-Traffic-Visualisation | 9f30e89e68c25e6fbcf13d84fee561b53ff70d84 | [
"MIT"
] | null | null | null | get_data.py | fromdatavistodatascience/Boston-Airpot-Traffic-Visualisation | 9f30e89e68c25e6fbcf13d84fee561b53ff70d84 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import json
import requests
#Retrieving my api keys information to access the Google API.
def get_keys(path):
with open(path) as f:
return json.load(f)
keys = get_keys("/Users/jjherranzsarrion/.secret/google_blog2_api.json")
api_key = keys['api_key']
url = 'http... | 31.75 | 130 | 0.743532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 506 | 0.569179 |
75a4801e3fd9b2dd8d7fd997f38c4f96f2672de6 | 1,807 | py | Python | openslides_protocol/apps.py | OpenSlides/openslides-protocol | 71366a4f251165384dd359a31fdc0fab79a652a1 | [
"MIT"
] | null | null | null | openslides_protocol/apps.py | OpenSlides/openslides-protocol | 71366a4f251165384dd359a31fdc0fab79a652a1 | [
"MIT"
] | 11 | 2017-08-02T10:48:24.000Z | 2018-10-19T13:53:51.000Z | openslides_protocol/apps.py | OpenSlides/openslides-protocol | 71366a4f251165384dd359a31fdc0fab79a652a1 | [
"MIT"
] | 2 | 2017-05-10T14:11:34.000Z | 2018-01-10T11:44:10.000Z | from django.apps import AppConfig
from openslides.utils.collection import Collection
from . import (
__description__,
__license__,
__url__,
__verbose_name__,
__version__,
)
class ProtocolAppConfig(AppConfig):
name = 'openslides_protocol'
verbose_name = __verbose_name__
description = _... | 34.09434 | 104 | 0.722191 | 1,610 | 0.89098 | 191 | 0.1057 | 0 | 0 | 0 | 0 | 378 | 0.209186 |
75a4a4e7e2bdd3feb7c08bb48946dfcce4709039 | 701 | py | Python | roster/migrations/0040_auto_20200428_0914.py | ankanb240/otis-web | 45eda65b419705c65c02b15872a137969d53d8e9 | [
"MIT"
] | 15 | 2021-08-28T18:18:37.000Z | 2022-03-13T07:48:15.000Z | roster/migrations/0040_auto_20200428_0914.py | ankanb240/otis-web | 45eda65b419705c65c02b15872a137969d53d8e9 | [
"MIT"
] | 65 | 2021-08-20T02:37:27.000Z | 2022-02-07T17:19:23.000Z | roster/migrations/0040_auto_20200428_0914.py | ankanb240/otis-web | 45eda65b419705c65c02b15872a137969d53d8e9 | [
"MIT"
] | 31 | 2020-01-09T02:35:29.000Z | 2022-03-13T07:48:18.000Z | # Generated by Django 3.0.3 on 2020-04-28 13:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('roster', '0039_unlock_units'),
]
operations = [
migrations.AlterField(
model_name='student',
name='num_units_done',
... | 29.208333 | 144 | 0.621969 | 608 | 0.867332 | 0 | 0 | 0 | 0 | 0 | 0 | 243 | 0.346648 |
75a691a31ac0f85d25914cc8c58acb2e67e97fd0 | 9,700 | py | Python | scripts/gen_report.py | twjang/korea_apartment_price | cd1414dfe6fe46e7d47625d2f65abe07f7c2db75 | [
"MIT"
] | 1 | 2021-12-14T13:03:38.000Z | 2021-12-14T13:03:38.000Z | scripts/gen_report.py | twjang/korea_apartment_price | cd1414dfe6fe46e7d47625d2f65abe07f7c2db75 | [
"MIT"
] | null | null | null | scripts/gen_report.py | twjang/korea_apartment_price | cd1414dfe6fe46e7d47625d2f65abe07f7c2db75 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import json
from typing import List, Optional, Tuple
import datetime
import re
import io
import base64
import os
import sys
import argparse
from plotly.missing_ipywidgets import FigureWidget
from tqdm import tqdm
import minify_html
ROOT=os.path.realpath(os.path.join(os.path.dirname(__file__), '.... | 34.767025 | 199 | 0.66299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,403 | 0.347316 |
75a788822e459f07f9a702bbea56e3b4f3a259e6 | 16,405 | py | Python | select-utxos.py | The-New-Fork/python-blocknotify | 56733218c0231044e859a967f767a6674b4ac85e | [
"Apache-2.0"
] | 1 | 2021-10-01T15:54:51.000Z | 2021-10-01T15:54:51.000Z | select-utxos.py | The-New-Fork/python-blocknotify | 56733218c0231044e859a967f767a6674b4ac85e | [
"Apache-2.0"
] | null | null | null | select-utxos.py | The-New-Fork/python-blocknotify | 56733218c0231044e859a967f767a6674b4ac85e | [
"Apache-2.0"
] | 1 | 2021-07-22T08:11:50.000Z | 2021-07-22T08:11:50.000Z | from lib import rpclib
from slickrpc import Proxy
from lib import transaction, bitcoin, util
from lib.util import bfh, bh2u
from lib.transaction import Transaction
import requests
import pytest
import subprocess
import json
import sys
import os
from dotenv import load_dotenv
load_dotenv(verbose=True)
IMPORT_API_HOST... | 132.298387 | 13,219 | 0.820055 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11,901 | 0.72545 |
75a9038ac82fdcf9e0ab0266716bd2dfcbf5e311 | 52 | py | Python | pynito/__init__.py | qdonohue/pynito | bcd7eeb3cdcdb63af2b43dca53b2e7899772e518 | [
"MIT"
] | null | null | null | pynito/__init__.py | qdonohue/pynito | bcd7eeb3cdcdb63af2b43dca53b2e7899772e518 | [
"MIT"
] | null | null | null | pynito/__init__.py | qdonohue/pynito | bcd7eeb3cdcdb63af2b43dca53b2e7899772e518 | [
"MIT"
] | 1 | 2020-11-21T12:32:27.000Z | 2020-11-21T12:32:27.000Z | from pynito.cognitodecryptor import CognitoDecryptor | 52 | 52 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
75ac67c019d243b02047c3a4e50c8d709addc5ed | 5,241 | py | Python | examples/qt/barcode-reader.py | claire-chan/python | 9a22ab20a8d0171f491730199edfd7ce7e4d806c | [
"MIT"
] | 12 | 2020-01-08T13:43:19.000Z | 2022-03-09T08:35:45.000Z | examples/qt/barcode-reader.py | claire-chan/python | 9a22ab20a8d0171f491730199edfd7ce7e4d806c | [
"MIT"
] | 2 | 2020-09-10T07:06:50.000Z | 2022-01-04T17:29:54.000Z | examples/qt/barcode-reader.py | claire-chan/python | 9a22ab20a8d0171f491730199edfd7ce7e4d806c | [
"MIT"
] | 11 | 2020-03-16T18:22:13.000Z | 2022-01-07T08:23:08.000Z | import sys
from PySide2.QtGui import QPixmap, QImage
from PySide2.QtWidgets import QApplication, QLabel, QPushButton, QVBoxLayout, QWidget, QFileDialog, QTextEdit, QSizePolicy, QMessageBox, QHBoxLayout
from PySide2.QtCore import Slot, Qt, QStringListModel, QSize, QTimer
from dbr import DynamsoftBarcodeReader
dbr = Dy... | 31.011834 | 148 | 0.577752 | 4,717 | 0.900019 | 0 | 0 | 0 | 0 | 0 | 0 | 838 | 0.159893 |
75af09b693b1a39a86476d750fe6c76d93b99535 | 6,820 | py | Python | mdetsims/dbsim/erins_code/util.py | kaiwen-kakuiii/metadetect-sims | a0fd133ca5bc946c6ce769e8657ef2ce10226953 | [
"BSD-3-Clause"
] | 2 | 2021-07-12T09:41:51.000Z | 2022-01-27T08:13:33.000Z | mdetsims/dbsim/erins_code/util.py | kaiwen-kakuiii/metadetect-sims | a0fd133ca5bc946c6ce769e8657ef2ce10226953 | [
"BSD-3-Clause"
] | 6 | 2019-04-04T23:53:27.000Z | 2021-07-30T11:35:20.000Z | mdetsims/dbsim/erins_code/util.py | kaiwen-kakuiii/metadetect-sims | a0fd133ca5bc946c6ce769e8657ef2ce10226953 | [
"BSD-3-Clause"
] | 2 | 2020-10-30T18:14:29.000Z | 2021-07-22T16:34:56.000Z | import sys
import logging
import numpy as np
logger = logging.getLogger(__name__)
class TryAgainError(Exception):
"""
signal to skip this image(s) and try a new one
"""
def __init__(self, message):
# Call the base class constructor with the parameters it needs
Exception.__init__(self,... | 23.680556 | 96 | 0.523167 | 929 | 0.136217 | 0 | 0 | 0 | 0 | 0 | 0 | 1,620 | 0.237537 |
75b16b8f307524cf047b1b8450582a6ea17185b4 | 1,470 | py | Python | utilities/thumbnail-creation/thumbnail from category.py | DASdaNen4f/microsoftw | 0ff9e052738e0effb9a484210ac27990f0f14f6f | [
"CC-BY-4.0",
"MIT"
] | 97 | 2019-05-07T15:43:30.000Z | 2022-03-30T01:43:47.000Z | utilities/thumbnail-creation/thumbnail from category.py | DASdaNen4f/microsoftw | 0ff9e052738e0effb9a484210ac27990f0f14f6f | [
"CC-BY-4.0",
"MIT"
] | 7 | 2020-05-05T17:12:08.000Z | 2022-03-11T23:41:25.000Z | utilities/thumbnail-creation/thumbnail from category.py | DASdaNen4f/microsoftw | 0ff9e052738e0effb9a484210ac27990f0f14f6f | [
"CC-BY-4.0",
"MIT"
] | 29 | 2019-05-30T22:23:25.000Z | 2022-02-24T15:13:51.000Z | import pandas as pd
from PIL import Image
import requests
from io import BytesIO
import os
import math
df = pd.read_csv('C:\\Users\\v-ngdian\\Documents\\utilities\\thumbnail creator\\MetArtworksAugmented.csv')
size = 512, 512
ids = []
def make_thumbnail(objectID, url, foldername):
try:
response = requests... | 29.4 | 106 | 0.622449 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 260 | 0.176871 |
75b207a985e8fc2e2ac54f7ef3b3b97efd0e8a7f | 1,050 | py | Python | examples/tcp.py | promisedio/uv | b2da55e28da4a3185d810055468389822ec94f2b | [
"MIT"
] | null | null | null | examples/tcp.py | promisedio/uv | b2da55e28da4a3185d810055468389822ec94f2b | [
"MIT"
] | null | null | null | examples/tcp.py | promisedio/uv | b2da55e28da4a3185d810055468389822ec94f2b | [
"MIT"
] | null | null | null | import ssl
import certifi
from promisedio import loop, ns, promise, timer
async def example1():
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
context.verify_mode = ssl.CERT_REQUIRED
context.check_hostname = True
context.load_default_certs()
context.load_verify_locations(
cafile=certifi... | 26.25 | 119 | 0.648571 | 0 | 0 | 0 | 0 | 0 | 0 | 918 | 0.874286 | 69 | 0.065714 |
75b2d9cf0513bac35f38ddd5680c08dee820e7ca | 3,232 | py | Python | sahara/tests/unit/service/validation/edp/test_job.py | hortonworksqe/sahara | b8edeaf2b6a475728bf9fd2ddc3a860dc6c23270 | [
"Apache-2.0"
] | 1 | 2016-04-13T17:07:05.000Z | 2016-04-13T17:07:05.000Z | sahara/tests/unit/service/validation/edp/test_job.py | hortonworksqe/sahara | b8edeaf2b6a475728bf9fd2ddc3a860dc6c23270 | [
"Apache-2.0"
] | null | null | null | sahara/tests/unit/service/validation/edp/test_job.py | hortonworksqe/sahara | b8edeaf2b6a475728bf9fd2ddc3a860dc6c23270 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 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 agreed to in writ... | 35.130435 | 76 | 0.552599 | 2,505 | 0.775062 | 0 | 0 | 0 | 0 | 0 | 0 | 1,029 | 0.318379 |
75b2e04cb5f586ec15b752e5cc06367509fd6133 | 1,004 | py | Python | RecoLocalCalo/HGCalRecProducers/python/hgcalLayerClusters_cff.py | bisnupriyasahu/cmssw | 6cf37ca459246525be0e8a6f5172c6123637d259 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | RecoLocalCalo/HGCalRecProducers/python/hgcalLayerClusters_cff.py | bisnupriyasahu/cmssw | 6cf37ca459246525be0e8a6f5172c6123637d259 | [
"Apache-2.0"
] | 3 | 2018-08-23T13:40:24.000Z | 2019-12-05T21:16:03.000Z | RecoLocalCalo/HGCalRecProducers/python/hgcalLayerClusters_cff.py | bisnupriyasahu/cmssw | 6cf37ca459246525be0e8a6f5172c6123637d259 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | import FWCore.ParameterSet.Config as cms
from RecoLocalCalo.HGCalRecProducers.hgcalLayerClusters_cfi import hgcalLayerClusters as hgcalLayerClusters_
from RecoLocalCalo.HGCalRecProducers.HGCalRecHit_cfi import dEdX, HGCalRecHit
from RecoLocalCalo.HGCalRecProducers.HGCalUncalibRecHit_cfi import HGCalUncalibRecHit
fr... | 50.2 | 110 | 0.878486 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.013944 |
75b2efb0dac87ecec2330f57bb9b5abeb2ef6c62 | 1,705 | py | Python | modules/AzureBridge/main.py | open-edge-insights/eii-azure-bridge | 346da9d56be78c6e06a470dfbaf808d568427679 | [
"MIT"
] | null | null | null | modules/AzureBridge/main.py | open-edge-insights/eii-azure-bridge | 346da9d56be78c6e06a470dfbaf808d568427679 | [
"MIT"
] | null | null | null | modules/AzureBridge/main.py | open-edge-insights/eii-azure-bridge | 346da9d56be78c6e06a470dfbaf808d568427679 | [
"MIT"
] | 2 | 2022-02-07T09:05:54.000Z | 2022-03-17T04:32:50.000Z | # Copyright (c) 2020 Intel Corporation.
#
# 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 to use, copy, modify, merge, publish, ... | 34.1 | 78 | 0.70088 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,232 | 0.722581 |
75b2fe433461c1164efd99a7fb0d0c61b5a14512 | 8,033 | py | Python | src/spaceone/inventory/manager/bigquery/sql_workspace_manager.py | spaceone-dev/plugin-google-cloud-inven-collector | 3e103412e7598ee9fa5f68b6241a831a40e8b9bc | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/manager/bigquery/sql_workspace_manager.py | spaceone-dev/plugin-google-cloud-inven-collector | 3e103412e7598ee9fa5f68b6241a831a40e8b9bc | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/manager/bigquery/sql_workspace_manager.py | spaceone-dev/plugin-google-cloud-inven-collector | 3e103412e7598ee9fa5f68b6241a831a40e8b9bc | [
"Apache-2.0"
] | null | null | null | import logging
import time
from spaceone.inventory.libs.manager import GoogleCloudManager
from spaceone.inventory.libs.schema.base import ReferenceModel
from spaceone.inventory.connector.bigquery.sql_workspace import SQLWorkspaceConnector
from spaceone.inventory.model.bigquery.sql_workspace.cloud_service import BigQue... | 42.957219 | 119 | 0.578115 | 7,465 | 0.929292 | 0 | 0 | 848 | 0.105565 | 0 | 0 | 1,794 | 0.223329 |
75b72dca2e43b5612d13506d6b92693bca1eea41 | 192 | py | Python | 1_Python/Aulas/Aula13a.py | guilhermebaos/Curso-em-Video-Python | 0e67f6f59fa3216889bd2dde4a26b532c7c545fd | [
"MIT"
] | null | null | null | 1_Python/Aulas/Aula13a.py | guilhermebaos/Curso-em-Video-Python | 0e67f6f59fa3216889bd2dde4a26b532c7c545fd | [
"MIT"
] | null | null | null | 1_Python/Aulas/Aula13a.py | guilhermebaos/Curso-em-Video-Python | 0e67f6f59fa3216889bd2dde4a26b532c7c545fd | [
"MIT"
] | null | null | null | for a in range(0,6):
print('Olá!', a)
print('Parei. \n')
for b in range(6, 0, -1):
print('Olá1', b)
print('Parei. \n')
for c in range(0, 6, 2):
print('Olá!', c)
print('Parei. \n')
| 19.2 | 25 | 0.53125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.276923 |
75b763c3212f1f5ddcadc048b167842b24fdff2e | 1,732 | py | Python | worker_zeromq/resource.py | espang/projects | 3a4d93592bc3427a6abd8d2170081155862754a8 | [
"MIT"
] | null | null | null | worker_zeromq/resource.py | espang/projects | 3a4d93592bc3427a6abd8d2170081155862754a8 | [
"MIT"
] | null | null | null | worker_zeromq/resource.py | espang/projects | 3a4d93592bc3427a6abd8d2170081155862754a8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 26 09:11:06 2016
@author: eikes
"""
import ConfigParser
from components import Component
from result import VariableResult
_config = ConfigParser.ConfigParser()
_config.read('scenario.cfg')
_section = 'MySection'
_results = 'results'
def _create_comp(index):
glob... | 27.0625 | 90 | 0.663972 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 341 | 0.196882 |
75b8a1f71cb2c99f52c326ad6e518a675e652f84 | 466 | py | Python | sub-array-algorithm-frustated-coders.py | annukamat/My-Competitive-Journey | adb13a5723483cde13e5f3859b3a7ad840b86c97 | [
"MIT"
] | 7 | 2018-11-08T11:39:27.000Z | 2020-09-10T17:50:57.000Z | sub-array-algorithm-frustated-coders.py | annukamat/My-Competitive-Journey | adb13a5723483cde13e5f3859b3a7ad840b86c97 | [
"MIT"
] | null | null | null | sub-array-algorithm-frustated-coders.py | annukamat/My-Competitive-Journey | adb13a5723483cde13e5f3859b3a7ad840b86c97 | [
"MIT"
] | 2 | 2019-09-16T14:34:03.000Z | 2019-10-12T19:24:00.000Z | ncoders = int(input("enter no. of coders : "))
l=map(int,input().split(" "))
sl=[]
l = sorted(list(l))
top = 1
for rotator in range(1,ncoders):
sl = l[:rotator]
if(top != ncoders):
if(max(sl) < l[top]):
l[l.index(max(sl))] = 0
top = top +1
elif(max(... | 18.64 | 47 | 0.44206 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.05794 |
75ba91add5ced077993a147299ed8098ccb69a59 | 8,081 | py | Python | source/soca/cluster_web_ui/api/v1/dcv/image.py | cfsnate/scale-out-computing-on-aws | 1cc316e988dca3200811ff5527a088a1706901e5 | [
"Apache-2.0"
] | 77 | 2019-11-14T22:54:48.000Z | 2022-02-09T06:06:39.000Z | source/soca/cluster_web_ui/api/v1/dcv/image.py | cfsnate/scale-out-computing-on-aws | 1cc316e988dca3200811ff5527a088a1706901e5 | [
"Apache-2.0"
] | 47 | 2020-01-15T18:51:32.000Z | 2022-03-08T19:46:39.000Z | source/soca/cluster_web_ui/api/v1/dcv/image.py | cfsnate/scale-out-computing-on-aws | 1cc316e988dca3200811ff5527a088a1706901e5 | [
"Apache-2.0"
] | 50 | 2019-11-14T22:51:28.000Z | 2022-03-14T22:49:53.000Z | ######################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... | 45.655367 | 205 | 0.516891 | 5,978 | 0.73976 | 0 | 0 | 5,939 | 0.734934 | 0 | 0 | 4,471 | 0.553273 |
75bb6e08d53656c02653379a24d3bf7833708bba | 807 | py | Python | Day 5/python/main.py | BenBMoore/leetcode-challenges | 97359abbeb24daf8cc33fe2bf1d5748ac824aab4 | [
"MIT"
] | null | null | null | Day 5/python/main.py | BenBMoore/leetcode-challenges | 97359abbeb24daf8cc33fe2bf1d5748ac824aab4 | [
"MIT"
] | null | null | null | Day 5/python/main.py | BenBMoore/leetcode-challenges | 97359abbeb24daf8cc33fe2bf1d5748ac824aab4 | [
"MIT"
] | null | null | null | import argparse
from typing import List
class Solution:
def max_profit(self, prices: List[int]) -> int:
best_profit = 0
for idx in range(0, len(prices) - 1):
# If the price is not greater, then "sell at the peak", else buy/hold
if prices[idx + 1] > prices[idx]:
... | 27.827586 | 85 | 0.619579 | 353 | 0.437423 | 0 | 0 | 0 | 0 | 0 | 0 | 174 | 0.215613 |
75bdd147dbc8647c0747f11af9d4431656daa233 | 947 | py | Python | ex2.py | timwuu/AnaPoker | 7cb125c4639a5cd557a6b45c92b5793dcc39def8 | [
"MIT"
] | null | null | null | ex2.py | timwuu/AnaPoker | 7cb125c4639a5cd557a6b45c92b5793dcc39def8 | [
"MIT"
] | null | null | null | ex2.py | timwuu/AnaPoker | 7cb125c4639a5cd557a6b45c92b5793dcc39def8 | [
"MIT"
] | null | null | null | import calcWinRate as cwr
def pp( a, b, table, k):
result = cwr.calc_win_rate( a, b, table, k)
print( "{} vs {} with {}".format( cwr.card_lst(a), cwr.card_lst(b), cwr.card_lst(table)))
print( "{:2.2%} vs {:2.2%}\n".format(result[0], result[1]))
k= 10000 # simulate k times
# --- example 0 ---
# --- 1... | 22.023256 | 93 | 0.62302 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 259 | 0.273495 |
75bf78052e28e2d4673d9f69709a11b7958bfff3 | 1,085 | py | Python | Utils/Permission.py | koi312500/Koi_Bot_Discord | 9d7a70f42cdb1110e6382125ade39d3aec21b3b9 | [
"MIT"
] | null | null | null | Utils/Permission.py | koi312500/Koi_Bot_Discord | 9d7a70f42cdb1110e6382125ade39d3aec21b3b9 | [
"MIT"
] | 1 | 2021-06-23T01:16:36.000Z | 2021-06-23T01:16:36.000Z | Utils/Permission.py | koi312500/Koi_Bot_Discord | 9d7a70f42cdb1110e6382125ade39d3aec21b3b9 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from Utils.UserClass import UserClass as User
permission_message = ["Guest [Permission Level : 0]", "User [Permission Level : 1]", "Developer [Permission Level : 2]", "Owner [Permission Level : 3]"]
async def check_permission(ctx, level):
now_user = User(ctx.author)... | 57.105263 | 161 | 0.682028 | 0 | 0 | 0 | 0 | 0 | 0 | 896 | 0.782533 | 494 | 0.431441 |
75bfcbaef981a9d2b8f3eecff56d9741a7a40637 | 436 | py | Python | 10.py | seanmanson/euler | b01418cf44c1113a0c574b5158aa5b89d725cca2 | [
"MIT"
] | null | null | null | 10.py | seanmanson/euler | b01418cf44c1113a0c574b5158aa5b89d725cca2 | [
"MIT"
] | null | null | null | 10.py | seanmanson/euler | b01418cf44c1113a0c574b5158aa5b89d725cca2 | [
"MIT"
] | null | null | null | import math
test = []
def testPrime(num):
sq = int(math.sqrt(num))
for i, factor in enumerate(test):
if (i > sq):
break
if (num % factor == 0):
return False
test.append(num)
return True
sumPrimes = 2
for i in range(3, 2000000, 2):
if not testPrime(i):
... | 18.166667 | 42 | 0.538991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.029817 |
75c33edb1fb71d6cd1c893b5ce0674035ed9e6dd | 37,403 | py | Python | clangelscript.py | gwihlidal/Clangelscript | e83f77d78bf57c25f67922b65aad2f8e74ce2699 | [
"MIT"
] | 1 | 2019-06-21T06:37:16.000Z | 2019-06-21T06:37:16.000Z | clangelscript.py | gwihlidal/clangelscript | e83f77d78bf57c25f67922b65aad2f8e74ce2699 | [
"MIT"
] | null | null | null | clangelscript.py | gwihlidal/clangelscript | e83f77d78bf57c25f67922b65aad2f8e74ce2699 | [
"MIT"
] | null | null | null | import sys
import re
import json
import os.path
import copy
from mako.template import Template
from clang import cindex
configfile = "clangelscript.json"
f = open(configfile)
data = f.read()
data = re.sub(r"//[^n]*n", "\n", data)
config = json.loads(data)
f.close()
if "ObjectTypes" in config:
arr = config["Obje... | 35.252592 | 221 | 0.558859 | 19,502 | 0.521402 | 0 | 0 | 0 | 0 | 0 | 0 | 6,529 | 0.174558 |
75c4b53c5b63ac8649c46b0cdcaee35a32ddb87c | 573 | py | Python | www/test.py | Lneedy/pyBlobDemo | 19ff1d9b5478f62bbc7f510bffa81adc7915a73b | [
"MIT"
] | null | null | null | www/test.py | Lneedy/pyBlobDemo | 19ff1d9b5478f62bbc7f510bffa81adc7915a73b | [
"MIT"
] | null | null | null | www/test.py | Lneedy/pyBlobDemo | 19ff1d9b5478f62bbc7f510bffa81adc7915a73b | [
"MIT"
] | null | null | null | '''
测试数据库存储数据demo
>> mysql -u root -p < schema.sql
'''
import orm
from models import User, Blog, Comment
import asyncio
async def test (loop):
await orm.create_pool(loop, user='www-data', password='www-data', db='awesome')
# u = User(id='2', name='Test1', email='test1@example.com', passwd='1234567890', imag... | 23.875 | 105 | 0.65445 | 0 | 0 | 0 | 0 | 0 | 0 | 300 | 0.507614 | 266 | 0.450085 |
75c58beec52cc06cb6843a182d38d84b973164ec | 1,358 | py | Python | serializers_test/avro_avg.py | lioritan/Side-Projects | 647bdbf0d3b71ea113739fb7ad2b299aea28c653 | [
"MIT"
] | null | null | null | serializers_test/avro_avg.py | lioritan/Side-Projects | 647bdbf0d3b71ea113739fb7ad2b299aea28c653 | [
"MIT"
] | null | null | null | serializers_test/avro_avg.py | lioritan/Side-Projects | 647bdbf0d3b71ea113739fb7ad2b299aea28c653 | [
"MIT"
] | null | null | null | import avro.schema
import json
import fastavro
SCHEMA = {
"namespace": "avg_obj",
"type": "record",
"name": "Meme",
"fields": [
{"name": "user", "type": {
"type": "record",
"name": "PostUser",
"fields": [
{"name": "user_id", "type": "string"}... | 38.8 | 89 | 0.401325 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 634 | 0.466863 |
75c61bdb0e5516f5f220ea06ae4eb78827a719a4 | 210 | py | Python | naloga002.py | pzi-si/pzi-src-2 | 819069db98873becf8c8ff93bb1e8fb9dca3036c | [
"CC0-1.0"
] | null | null | null | naloga002.py | pzi-si/pzi-src-2 | 819069db98873becf8c8ff93bb1e8fb9dca3036c | [
"CC0-1.0"
] | null | null | null | naloga002.py | pzi-si/pzi-src-2 | 819069db98873becf8c8ff93bb1e8fb9dca3036c | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Program, ki vas vpraša po imenu, nato pa vas pozdravi. """
# povprašamo po imenu
ime = input("Kako ti je ime? ")
# pozdravimo
print(f"Pozdravljen_a, {ime}!") | 21 | 62 | 0.642857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.863208 |
75ca90abf615365ec5eda2bc92c9c7ddc159748c | 3,699 | py | Python | cookbook/3 Linear Regression/lin_reg_l1_l2_loss.py | keetsky/tensorflow_learn | 77205434c2e3d70d482a756f5f679622d10f49b2 | [
"Apache-2.0"
] | null | null | null | cookbook/3 Linear Regression/lin_reg_l1_l2_loss.py | keetsky/tensorflow_learn | 77205434c2e3d70d482a756f5f679622d10f49b2 | [
"Apache-2.0"
] | null | null | null | cookbook/3 Linear Regression/lin_reg_l1_l2_loss.py | keetsky/tensorflow_learn | 77205434c2e3d70d482a756f5f679622d10f49b2 | [
"Apache-2.0"
] | null | null | null | '''
# Linear Regression: understanding loss function in linear regression
#----------------------------------
#
# This function shows how to use Tensorflow to
# solve linear regression.
# y = Ax + b
#
# We will use the iris data, specifically:
# y = Sepal Length
# x = Petal Width
'''
import matplotlib.pyplot as plt
i... | 30.073171 | 92 | 0.711544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,174 | 0.315846 |
75caae991e7575297539a0a5755bf9b4493ee335 | 3,258 | py | Python | pysh.py | tri-llionaire/tri-llionaire.github.io | 5134d3ec0ff1e3b7eab469ea05300b505895212f | [
"MIT"
] | 1 | 2018-04-24T14:53:23.000Z | 2018-04-24T14:53:23.000Z | pysh.py | tri-llionaire/tri-llionaire.github.io | 5134d3ec0ff1e3b7eab469ea05300b505895212f | [
"MIT"
] | null | null | null | pysh.py | tri-llionaire/tri-llionaire.github.io | 5134d3ec0ff1e3b7eab469ea05300b505895212f | [
"MIT"
] | 1 | 2018-08-25T21:15:07.000Z | 2018-08-25T21:15:07.000Z | #pysh: shell in python
import sys
cmdlist = ['start','exit','cd','md','ls','pd','cf','cl']
convert = []
waiting = 0
print 'pysh 1.0.5 19.03.11 #6. type start to enter, exit to leave.'
paths = ['pysh/']
direct = 'pysh/'
added = []
entered = raw_input(': ')
if entered == 'start':
while entered != ['exit']:
en... | 40.222222 | 90 | 0.329343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 398 | 0.122161 |
75cd39985df9ba1fac685c50b84e7d3ed1571cd1 | 3,813 | py | Python | Scripts/IDA_SyncDecompiledFuncs.py | THEONLYDarkShadow/alive_reversing | 680d87088023f2d5f2a40c42d6543809281374fb | [
"MIT"
] | 208 | 2018-06-06T13:14:03.000Z | 2022-03-30T02:21:27.000Z | Scripts/IDA_SyncDecompiledFuncs.py | THEONLYDarkShadow/alive_reversing | 680d87088023f2d5f2a40c42d6543809281374fb | [
"MIT"
] | 537 | 2018-06-06T16:50:45.000Z | 2022-03-31T16:41:15.000Z | Scripts/IDA_SyncDecompiledFuncs.py | THEONLYDarkShadow/alive_reversing | 680d87088023f2d5f2a40c42d6543809281374fb | [
"MIT"
] | 42 | 2018-06-06T00:40:08.000Z | 2022-03-23T08:38:55.000Z | from idautils import *
from idaapi import *
from idc import *
import urllib2
def ida_set_function_colour(function_address, colour):
idc.set_color(function_address, CIC_FUNC, colour)
def ida_get_function_colour(function_address):
function = idaapi.get_func(function_address)
if not function:
... | 30.504 | 193 | 0.620771 | 780 | 0.204563 | 0 | 0 | 0 | 0 | 0 | 0 | 681 | 0.1786 |
75cdec8d921818ac60703e7cb57923284eb229e2 | 2,499 | py | Python | alipay/aop/api/domain/AlipayCommerceEducateTuitioncodeMonitorCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceEducateTuitioncodeMonitorCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceEducateTuitioncodeMonitorCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayCommerceEducateTuitioncodeMonitorCreateModel(object):
def __init__(self):
self._bank_type = None
self._login_account = None
self._out_apply_id = None
self._p... | 29.05814 | 77 | 0.605442 | 2,382 | 0.953181 | 0 | 0 | 1,086 | 0.434574 | 0 | 0 | 312 | 0.12485 |
75d0eb05faa1f187e229cf597a3a8352882ca242 | 2,888 | py | Python | tests/tests_tabu.py | Antash696/VRP | 386b84adbe34be37aabc1e638515ce722849a952 | [
"MIT"
] | 33 | 2017-10-18T01:18:27.000Z | 2021-10-04T14:17:52.000Z | tests/tests_tabu.py | dj-boy/VRP | 386b84adbe34be37aabc1e638515ce722849a952 | [
"MIT"
] | 1 | 2020-12-21T01:59:21.000Z | 2020-12-21T01:59:21.000Z | tests/tests_tabu.py | dj-boy/VRP | 386b84adbe34be37aabc1e638515ce722849a952 | [
"MIT"
] | 19 | 2017-06-26T15:02:00.000Z | 2022-03-31T08:44:20.000Z | import unittest
from code import instance as i
from code import datamapping as dm
from code import greedyfirst as gf
from code import algorithm as a
from code import baseobjects as bo
from code import tabu
class TestTabuSpecific(unittest.TestCase):
def setUp(self):
raw_data = dm.Importer()
# ra... | 39.027027 | 146 | 0.674169 | 2,625 | 0.908934 | 0 | 0 | 0 | 0 | 0 | 0 | 721 | 0.249654 |
75d24f00bd3d394aa053d2de0806888649ac3eca | 381 | py | Python | hedge_hog/metric/__init__.py | otivedani/hedge_hog | 62026e63b6bdc72cc4f0c984136712e6ee090f68 | [
"MIT"
] | null | null | null | hedge_hog/metric/__init__.py | otivedani/hedge_hog | 62026e63b6bdc72cc4f0c984136712e6ee090f68 | [
"MIT"
] | null | null | null | hedge_hog/metric/__init__.py | otivedani/hedge_hog | 62026e63b6bdc72cc4f0c984136712e6ee090f68 | [
"MIT"
] | null | null | null | """
examples on scikit-image :
call :
from skimage.feature import blob_dog, blob_log, blob_doh
structure :
skimage
feature
__init__.py (from .blob import blob_dog, blob_log, blob_doh)
blob.py (contains blob_dog, blob_log, blob_doh)
conclusion :
module imported because it was defin... | 20.052632 | 69 | 0.692913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 343 | 0.900262 |
75d35dd0f6991525937dfc89b52855e73f47aaa9 | 1,941 | py | Python | Chapter07/python/com/sparksamples/gradientboostedtrees/GradientBoostedTreesUtil.py | quguiliang/Machine-Learning-with-Spark-Second-Edition | 0ba131e6c15a3de97609c6cb5d976806ccc14f09 | [
"MIT"
] | 112 | 2017-05-13T15:44:29.000Z | 2022-02-19T20:14:14.000Z | Chapter07/python/com/sparksamples/gradientboostedtrees/GradientBoostedTreesUtil.py | tophua/Machine-Learning-with-Spark-Second-Edition | 0d93e992f6c79d55ad5cdcab735dbe6674143974 | [
"MIT"
] | 1 | 2017-05-25T00:10:43.000Z | 2017-05-25T00:10:43.000Z | Chapter07/python/com/sparksamples/gradientboostedtrees/GradientBoostedTreesUtil.py | tophua/Machine-Learning-with-Spark-Second-Edition | 0d93e992f6c79d55ad5cdcab735dbe6674143974 | [
"MIT"
] | 115 | 2017-05-06T10:49:00.000Z | 2022-03-08T07:48:54.000Z | import numpy as np
from com.sparksamples.util import get_records
from com.sparksamples.util import get_mapping
from com.sparksamples.util import extract_features
from com.sparksamples.util import extract_label
from com.sparksamples.util import extract_features_dt
#from pyspark.mllib.tree import DecisionTree
from pysp... | 41.297872 | 107 | 0.714065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 364 | 0.187532 |
75d4809609a0cd8b60448ab7ac5fccbe7bba640b | 5,010 | py | Python | maze.py | vcxsd/muck-builder | 12c1defbb816395a119da1992c1352d614d5507b | [
"MIT"
] | null | null | null | maze.py | vcxsd/muck-builder | 12c1defbb816395a119da1992c1352d614d5507b | [
"MIT"
] | null | null | null | maze.py | vcxsd/muck-builder | 12c1defbb816395a119da1992c1352d614d5507b | [
"MIT"
] | null | null | null |
import random
import yaml
class Grammar:
""" A simpler version of Tracery's ideas. """
def __init__( self, rules = None ):
self.rules = rules or { }
# To be pop()'d off by the caller.
self.saved = [ ]
def parse( self, string ):
if "[" in string or "]" in string:
... | 35.531915 | 282 | 0.48982 | 1,831 | 0.365469 | 0 | 0 | 0 | 0 | 0 | 0 | 2,188 | 0.436727 |
75d6d6a2674761306d18d16bf5fb2a0d2ba911d3 | 543 | py | Python | kratos/apps/trigger/views.py | cipher-ops/backend-kts | 7ea54d7f56bcb0da54b901ac8f3cfbfbb0b12319 | [
"MIT"
] | 1 | 2020-11-30T09:53:40.000Z | 2020-11-30T09:53:40.000Z | kratos/apps/trigger/views.py | cipher-ops/backend-kts | 7ea54d7f56bcb0da54b901ac8f3cfbfbb0b12319 | [
"MIT"
] | null | null | null | kratos/apps/trigger/views.py | cipher-ops/backend-kts | 7ea54d7f56bcb0da54b901ac8f3cfbfbb0b12319 | [
"MIT"
] | null | null | null | from rest_framework import viewsets
from kratos.apps.trigger import models, serializers
class TriggerViewSet(viewsets.GenericViewSet):
'''
Trigger信息
'''
serializer_class = serializers.TriggerRecordSerializer
queryset = models.TriggerRecord.objects.all()
def list(self, request):
'''
Trigger调用记录列表
... | 30.166667 | 92 | 0.762431 | 469 | 0.838998 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.118068 |
75d7637d4de985450afeaf8267ea59deab8e6e61 | 478 | py | Python | Module_04/ex00/test.py | CristinaFdezBornay/PythonPiscine | 143968c2e26f5ddddb5114f3bcdddd0b1f00d153 | [
"MIT"
] | 1 | 2021-11-17T10:04:30.000Z | 2021-11-17T10:04:30.000Z | Module_04/ex00/test.py | CristinaFdezBornay/PythonPiscine | 143968c2e26f5ddddb5114f3bcdddd0b1f00d153 | [
"MIT"
] | null | null | null | Module_04/ex00/test.py | CristinaFdezBornay/PythonPiscine | 143968c2e26f5ddddb5114f3bcdddd0b1f00d153 | [
"MIT"
] | null | null | null | from FileLoader import FileLoader
tests = [
"non_existing_file.csv",
"empty_file.csv",
"../data/athlete_events.csv",
]
if __name__=="__main__":
for test in tests:
print(f"==> TESTING {test}")
fl = FileLoader()
print(f"\n=> Loading file")
df = fl.load(test)
pri... | 20.782609 | 43 | 0.541841 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.387029 |
75d9805219c61b5aa264d0f163f779ea93a814b4 | 492 | py | Python | lib/watchlists.py | nickcamel/IgApi | 19717cb8f3aea88adf060d8dad4762f8cd81e584 | [
"MIT"
] | 1 | 2021-10-02T00:30:17.000Z | 2021-10-02T00:30:17.000Z | lib/watchlists.py | nickcamel/IgApi | 19717cb8f3aea88adf060d8dad4762f8cd81e584 | [
"MIT"
] | null | null | null | lib/watchlists.py | nickcamel/IgApi | 19717cb8f3aea88adf060d8dad4762f8cd81e584 | [
"MIT"
] | null | null | null | # REF: https://labs.ig.com/rest-trading-api-reference
class Watchlists:
"""
DO NOT CHANGE
Adding is ok ... and encouraged ;)
"""
base = {
'path': 'watchlists',
'GET': {
'version': '1',
'tokens': True,
}
# Not supported yet: 'POST'
}
... | 18.923077 | 53 | 0.422764 | 435 | 0.884146 | 0 | 0 | 0 | 0 | 0 | 0 | 271 | 0.550813 |
75d9f90c2f975ea4a2ae0b3fd9a26571c68ea1e6 | 21,236 | py | Python | MBC_ER_status/Ulz_pipeline/downloads/run_tf_analyses_from_bam.py | adoebley/Griffin_analyses | 94a8246b45c3ebbf255cffaa60b97e7e05d5de78 | [
"BSD-3-Clause-Clear"
] | 6 | 2021-10-05T10:32:32.000Z | 2022-03-03T15:38:38.000Z | MBC_ER_status/Ulz_pipeline/downloads/run_tf_analyses_from_bam.py | adoebley/Griffin_analyses | 94a8246b45c3ebbf255cffaa60b97e7e05d5de78 | [
"BSD-3-Clause-Clear"
] | null | null | null | MBC_ER_status/Ulz_pipeline/downloads/run_tf_analyses_from_bam.py | adoebley/Griffin_analyses | 94a8246b45c3ebbf255cffaa60b97e7e05d5de78 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-11-03T07:19:16.000Z | 2021-11-03T07:19:16.000Z | #!/usr/bin/env python
# coding: utf-8
#AL - the above code is new for the griffin paper version
#modified print commands for python3
# Analyze all possible things from BAM-file
import sys
import argparse
from subprocess import call
import numpy
import scipy
import scipy.stats
import os.path
import os
import glob
# ... | 71.743243 | 290 | 0.638915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,425 | 0.585091 |
75da6f1e542a2683ea21908b7c192b05e4167dbd | 1,094 | py | Python | Day 3/login-registrasi.py | adamsaparudin/python-datascience | 1b4164bb8a091f88def950f07108fe023737399c | [
"MIT"
] | null | null | null | Day 3/login-registrasi.py | adamsaparudin/python-datascience | 1b4164bb8a091f88def950f07108fe023737399c | [
"MIT"
] | null | null | null | Day 3/login-registrasi.py | adamsaparudin/python-datascience | 1b4164bb8a091f88def950f07108fe023737399c | [
"MIT"
] | null | null | null | import sys
def registrasi():
username = input("Masukan username: ")
password = input("Masukan password: ")
return username, password
def login(username, password): # list_user,
input_user = input("Masukan username: ")
input_pass = input("Masukan password: ")
if username == input_user and passw... | 27.35 | 76 | 0.576782 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 372 | 0.340037 |
75db1e4b6ac368d1004f97e5c6edf9221b06b01a | 7,631 | py | Python | lagen/nu/regeringenlegacy.py | redhog/ferenda | 6935e26fdc63adc68b8e852292456b8d9155b1f7 | [
"BSD-2-Clause"
] | 18 | 2015-03-12T17:42:44.000Z | 2021-12-27T10:32:22.000Z | lagen/nu/regeringenlegacy.py | redhog/ferenda | 6935e26fdc63adc68b8e852292456b8d9155b1f7 | [
"BSD-2-Clause"
] | 13 | 2016-01-27T10:19:07.000Z | 2021-12-13T20:24:36.000Z | lagen/nu/regeringenlegacy.py | redhog/ferenda | 6935e26fdc63adc68b8e852292456b8d9155b1f7 | [
"BSD-2-Clause"
] | 6 | 2016-11-28T15:41:29.000Z | 2022-01-08T11:16:48.000Z | # -*- coding: utf-8 -*-
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
# this repo overrides ferenda.sources.legal.se.Regeringen to work
# against old downloaded
import re
import codecs
# from urllib.parse import urljoin
from rdflib ... | 40.375661 | 135 | 0.576727 | 6,912 | 0.905542 | 0 | 0 | 0 | 0 | 0 | 0 | 1,934 | 0.253374 |
75de5bb6fec2ff1e86bf17bc2c0b9b36441cdf30 | 211 | py | Python | reverse_geocode_test.py | falcaopetri/trajectory-data | 7f81343086ccd00d3d9f52899a7032d987fc0a66 | [
"MIT"
] | 1 | 2019-05-21T15:52:28.000Z | 2019-05-21T15:52:28.000Z | reverse_geocode_test.py | falcaopetri/trajectory-data | 7f81343086ccd00d3d9f52899a7032d987fc0a66 | [
"MIT"
] | null | null | null | reverse_geocode_test.py | falcaopetri/trajectory-data | 7f81343086ccd00d3d9f52899a7032d987fc0a66 | [
"MIT"
] | 1 | 2020-08-18T14:38:52.000Z | 2020-08-18T14:38:52.000Z | import reverse_geocode
reverse_geocode.search([(35.6963860567411,139.686436661882)])
reverse_geocode.search([(-33.8236171057086,151.021885871887)])
reverse_geocode.search([(47.3111740195794,8.52681624913163)])
| 35.166667 | 62 | 0.824645 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
75e1a861f6479f18e30cc2201832823b09eb3ea9 | 803 | py | Python | src/data.py | voschezang/ABM | 523fcf30000057e73ba93f5a500d8896c945a35f | [
"MIT"
] | null | null | null | src/data.py | voschezang/ABM | 523fcf30000057e73ba93f5a500d8896c945a35f | [
"MIT"
] | null | null | null | src/data.py | voschezang/ABM | 523fcf30000057e73ba93f5a500d8896c945a35f | [
"MIT"
] | null | null | null | from mesa.datacollection import DataCollector
### datacollection functions
def density(model):
"""Density: number of cars per unit length of road."""
return len(model.schedule.agents) / model.space.length
def flow(model):
"""Flow: number of cars passing a reference point per unit of time."""
# get... | 25.903226 | 74 | 0.674969 | 308 | 0.383562 | 0 | 0 | 0 | 0 | 0 | 0 | 271 | 0.337484 |
75e2178969612f0c7284d059eb5edd0c7915d7e5 | 2,850 | py | Python | lambda_assistant/mysql/client_handler.py | matiasvallejosdev/py-aws-lambda-handlers | 4643042bc02e557bb4a2953118de5f4eb5320d70 | [
"Apache-2.0"
] | null | null | null | lambda_assistant/mysql/client_handler.py | matiasvallejosdev/py-aws-lambda-handlers | 4643042bc02e557bb4a2953118de5f4eb5320d70 | [
"Apache-2.0"
] | null | null | null | lambda_assistant/mysql/client_handler.py | matiasvallejosdev/py-aws-lambda-handlers | 4643042bc02e557bb4a2953118de5f4eb5320d70 | [
"Apache-2.0"
] | null | null | null | import pymysql
import logging
from lambda_assistant.handlers.event_handler import EventHandler
from lambda_assistant.errors import *
logger = logging.getLogger()
logger.setLevel(logging.INFO)
class Select():
def Select(self, handler: EventHandler, conn: pymysql.connections.Connection, sql: str):
... | 35.185185 | 135 | 0.565965 | 2,630 | 0.922807 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0.063158 |
75e66488020f917b36c64a0fe8d0a2a1ac18f43c | 1,280 | py | Python | yatube/posts/models.py | PabloKor/Yatube | 5c835e9d66a29e95781f08a87a102ec017fbc91b | [
"MIT"
] | null | null | null | yatube/posts/models.py | PabloKor/Yatube | 5c835e9d66a29e95781f08a87a102ec017fbc91b | [
"MIT"
] | null | null | null | yatube/posts/models.py | PabloKor/Yatube | 5c835e9d66a29e95781f08a87a102ec017fbc91b | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.db import models
# Create your models here.
User = get_user_model()
class Post(models.Model):
text = models.TextField(verbose_name='Текст')
pub_date = models.DateTimeField(auto_now_add=True, verbose_name="date published")
author = models.ForeignK... | 34.594595 | 87 | 0.670313 | 1,154 | 0.893881 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.090627 |
75e695aeba900a9af2ded444426e995f02d6bb1e | 1,508 | py | Python | deep-rl/lib/python2.7/site-packages/OpenGL/GL/AMD/blend_minmax_factor.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 210 | 2016-04-09T14:26:00.000Z | 2022-03-25T18:36:19.000Z | deep-rl/lib/python2.7/site-packages/OpenGL/GL/AMD/blend_minmax_factor.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 72 | 2016-09-04T09:30:19.000Z | 2022-03-27T17:06:53.000Z | deep-rl/lib/python2.7/site-packages/OpenGL/GL/AMD/blend_minmax_factor.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 64 | 2016-04-09T14:26:49.000Z | 2022-03-21T11:19:47.000Z | '''OpenGL extension AMD.blend_minmax_factor
This module customises the behaviour of the
OpenGL.raw.GL.AMD.blend_minmax_factor to provide a more
Python-friendly API
Overview (from the spec)
The EXT_blend_minmax extension extended the GL's blending functionality
to allow the blending equation to be specified by t... | 40.756757 | 79 | 0.812334 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,116 | 0.740053 |
75e72372c73d69ec71d6ae230b03dd3710c4e2a3 | 2,506 | py | Python | examples/building.py | jbermudezcabrera/campos | df34f93dd37b435a82663fb72ef37f669832af22 | [
"MIT"
] | null | null | null | examples/building.py | jbermudezcabrera/campos | df34f93dd37b435a82663fb72ef37f669832af22 | [
"MIT"
] | null | null | null | examples/building.py | jbermudezcabrera/campos | df34f93dd37b435a82663fb72ef37f669832af22 | [
"MIT"
] | null | null | null | """This example demonstrates the basics on building complete forms using campos.
It creates several fields, marking some of them as required and adding some
custom validation.
Finally fields are added to a CreationForm which have several buttons and a
custom callback connected to one of them. After added, some relate... | 33.413333 | 80 | 0.634876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 956 | 0.381332 |
75e9882a624cfcf705ab7744f64aca22cda52bfb | 8,452 | py | Python | ai.py | LHGames-2017/nospace | 1f36fb980ee51cdc576b765eff2c4ad5533ea0e3 | [
"MIT"
] | null | null | null | ai.py | LHGames-2017/nospace | 1f36fb980ee51cdc576b765eff2c4ad5533ea0e3 | [
"MIT"
] | null | null | null | ai.py | LHGames-2017/nospace | 1f36fb980ee51cdc576b765eff2c4ad5533ea0e3 | [
"MIT"
] | null | null | null | from flask import Flask, request
from structs import *
import json
import numpy as np
import sys
import random, time
app = Flask(__name__)
dx=0
dy=0
def create_action(action_type, target):
actionContent = ActionContent(action_type, target.__dict__)
#print(actionContent)
return json.dumps(actionContent.__di... | 30.959707 | 172 | 0.565192 | 0 | 0 | 0 | 0 | 149 | 0.017629 | 0 | 0 | 2,417 | 0.285968 |
75ecad4259bc7591e4a570004208ede9470250fd | 92 | py | Python | src/__init__.py | jmknoll/ig-autofriend | 8de322b59c13346d21d6b11775cbad51b4e4920f | [
"MIT"
] | null | null | null | src/__init__.py | jmknoll/ig-autofriend | 8de322b59c13346d21d6b11775cbad51b4e4920f | [
"MIT"
] | null | null | null | src/__init__.py | jmknoll/ig-autofriend | 8de322b59c13346d21d6b11775cbad51b4e4920f | [
"MIT"
] | null | null | null | from InstaFriend import InstaFriend
friend = InstaFriend('bonesaw')
friend.say_something() | 18.4 | 35 | 0.815217 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.097826 |
75ee6ab2f29331c5f95dba4b6e05f4612d407042 | 3,004 | py | Python | sierra_adapter/sierra_progress_reporter/src/interval_arithmetic.py | wellcomecollection/catalogue-pipeline | 360fa432a006f5e197a5b22d72cced7d6735d222 | [
"MIT"
] | 8 | 2019-08-02T09:48:40.000Z | 2019-12-20T14:06:58.000Z | sierra_adapter/sierra_progress_reporter/src/interval_arithmetic.py | wellcomecollection/catalogue | 17dcf7f1977f953fbaf35c60aa166aaa1413fdd2 | [
"MIT"
] | 329 | 2020-02-18T07:43:08.000Z | 2021-04-23T10:45:33.000Z | sierra_adapter/sierra_progress_reporter/src/interval_arithmetic.py | wellcomecollection/catalogue-pipeline | 360fa432a006f5e197a5b22d72cced7d6735d222 | [
"MIT"
] | 1 | 2019-08-22T11:44:34.000Z | 2019-08-22T11:44:34.000Z | import datetime as dt
import os
import attr
@attr.s(repr=False)
class Interval:
start = attr.ib()
end = attr.ib()
key = attr.ib()
def __repr__(self):
return "%s(start=%r, end=%r, key=%r)" % (
type(self).__name__,
self.start.isoformat(),
self.end.isoformat(... | 29.165049 | 78 | 0.508655 | 311 | 0.103529 | 2,454 | 0.816911 | 331 | 0.110186 | 0 | 0 | 1,141 | 0.379827 |
75eea75e6047e89d14c6be50606878240e707caf | 41 | py | Python | tests/components/mqtt_json/__init__.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/mqtt_json/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/mqtt_json/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Tests for the mqtt_json component."""
| 20.5 | 40 | 0.707317 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.97561 |
75efb0136dccedb3a2615588ac4efa68a29d7748 | 414 | py | Python | wxpy/utils/__init__.py | frkhit/bl_wxpy | b03bc63d51592d32ee218ef6fd1022df6ef75069 | [
"MIT"
] | 3 | 2019-06-24T02:19:19.000Z | 2021-02-14T05:27:16.000Z | wxpy/utils/__init__.py | frkhit/bl_wxpy | b03bc63d51592d32ee218ef6fd1022df6ef75069 | [
"MIT"
] | null | null | null | wxpy/utils/__init__.py | frkhit/bl_wxpy | b03bc63d51592d32ee218ef6fd1022df6ef75069 | [
"MIT"
] | 1 | 2021-02-08T03:50:05.000Z | 2021-02-08T03:50:05.000Z | from .console import embed, shell_entry
from .misc import decode_webwx_emoji, enhance_connection, ensure_list, get_raw_dict, get_receiver, \
get_text_without_at_bot, get_username, match_attributes, match_name, match_text, new_local_msg_id, repr_message, \
smart_map, start_new_thread
from .puid_map import PuidMa... | 59.142857 | 118 | 0.84058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
75efc068bea2e00c99851509afc17f84c017599e | 123 | py | Python | src/compiler/handler.py | neolang/neopy | 92f328ed6c2f3c40ec04b889477aa8fe916711f1 | [
"MIT"
] | 1 | 2018-11-18T08:01:28.000Z | 2018-11-18T08:01:28.000Z | src/compiler/handler.py | neolang/neopy | 92f328ed6c2f3c40ec04b889477aa8fe916711f1 | [
"MIT"
] | 2 | 2018-11-18T08:02:07.000Z | 2018-11-19T06:20:35.000Z | src/compiler/handler.py | neolang/neopy | 92f328ed6c2f3c40ec04b889477aa8fe916711f1 | [
"MIT"
] | null | null | null | def compile_files(fp_list):
for fp in fp_list:
__compile_file(fp)
def __compile_file(file_pointer):
pass
| 15.375 | 33 | 0.699187 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
75f1634c6e371274f9060f7f9a480ee9c930fa89 | 1,082 | py | Python | userbot/plugins/hpdiwali.py | yu9ohde/Marshmellow | 145c90470701c972ab458483ac1b9320d1a44e8e | [
"MIT"
] | 2 | 2020-12-06T03:46:08.000Z | 2022-02-19T20:34:52.000Z | userbot/plugins/hpdiwali.py | pro-boy/Marshmello | 4cf6d96b69a7e0617ba5ced96eb5ee557b318b4c | [
"MIT"
] | 4 | 2020-11-07T07:39:51.000Z | 2020-11-10T03:46:41.000Z | userbot/plugins/hpdiwali.py | pro-boy/Marshmello | 4cf6d96b69a7e0617ba5ced96eb5ee557b318b4c | [
"MIT"
] | 9 | 2020-11-28T11:30:44.000Z | 2021-06-01T07:11:57.000Z | # Plugin made by Dark cobra
# For Dark cobra
# Made by Shivam Patel(Team Cobra)
# Kang with credits..
import random
from userbot import CMD_HELP
from userbot.events import register
from userbot.utils import admin_cmd
from telethon import events, types, functions, utils
import asyncio
def choser(cmd, pack, blacklist... | 28.473684 | 134 | 0.621072 | 0 | 0 | 0 | 0 | 677 | 0.625693 | 609 | 0.562847 | 155 | 0.143253 |
75f227cf59ba67118be0d4f419b2d0cc15fd93df | 1,024 | py | Python | scripts/parse-weka-results.py | jholewinski/ics-12-overlapped-tiling | af2b39bc957d33f68d4617865431ca731b18430a | [
"MIT"
] | 3 | 2015-12-31T11:19:50.000Z | 2017-11-30T03:14:56.000Z | scripts/parse-weka-results.py | jholewinski/ics-12-overlapped-tiling | af2b39bc957d33f68d4617865431ca731b18430a | [
"MIT"
] | null | null | null | scripts/parse-weka-results.py | jholewinski/ics-12-overlapped-tiling | af2b39bc957d33f68d4617865431ca731b18430a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
maximum = 0.0
selected = 0.0
results = []
for line in sys.stdin.readlines()[5:]:
line = line.strip()
if len(line) == 0:
continue
(inst, actual, predicted, error) = line.split()
results.append([inst, actual, predicted, error])
predicted = float(predicted... | 26.947368 | 79 | 0.630859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.12207 |
75f3476923aa5142454f8d9f4ed05a21bd8875d9 | 941 | py | Python | symtuner/logger.py | audxo14/symtuner | 741e4e14cfcf09b7c7a71ce34cf28f1858f1f476 | [
"MIT"
] | null | null | null | symtuner/logger.py | audxo14/symtuner | 741e4e14cfcf09b7c7a71ce34cf28f1858f1f476 | [
"MIT"
] | 1 | 2022-01-26T12:51:32.000Z | 2022-01-26T12:51:32.000Z | symtuner/logger.py | audxo14/symtuner | 741e4e14cfcf09b7c7a71ce34cf28f1858f1f476 | [
"MIT"
] | 1 | 2022-01-26T12:42:24.000Z | 2022-01-26T12:42:24.000Z | '''Logging module for symtuner library
Logging module for symtuner library. All loggings in symtuner library use this module.
'''
import logging as _logging
_LOGGER = None
def get_logger():
'''Get a logger.
Get a singleton `Logger`. If `Logger` not defined make one and return. If `get_logger` called
... | 28.515152 | 98 | 0.631243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 441 | 0.46865 |
75f57c3ebdfa5b1c58a1a40cbcfe56a933e80e69 | 3,326 | py | Python | config/eval.py | XiaLiPKU/RESCAN-for-Deraining | e28d1d7cd3d8b276ce88de730de1603bafa30e23 | [
"MIT"
] | 292 | 2018-07-17T01:11:53.000Z | 2022-03-31T13:06:50.000Z | config/eval.py | XiaLiPKU/RESCAN-for-Deraining | e28d1d7cd3d8b276ce88de730de1603bafa30e23 | [
"MIT"
] | 18 | 2018-08-02T13:33:06.000Z | 2022-01-26T15:54:27.000Z | config/eval.py | XiaLiPKU/RESCAN-for-Deraining | e28d1d7cd3d8b276ce88de730de1603bafa30e23 | [
"MIT"
] | 87 | 2018-07-17T18:02:09.000Z | 2021-12-19T08:21:57.000Z | import os
import sys
import cv2
import argparse
import numpy as np
import torch
from torch import nn
from torch.nn import MSELoss
from torch.optim import Adam
from torch.optim.lr_scheduler import MultiStepLR
from torch.autograd import Variable
from torch.utils.data import DataLoader
from tensorboardX import SummaryWri... | 28.672414 | 81 | 0.613049 | 1,834 | 0.551413 | 0 | 0 | 0 | 0 | 0 | 0 | 192 | 0.057727 |
75f5ca0e1019fe3f64db390c86a601c2f8792420 | 6,371 | py | Python | FastEMRIWaveforms/few/utils/modeselector.py | basuparth/ICERM_Workshop | ebabce680fc87e90ff1de30246dcda9beb384bb4 | [
"MIT"
] | null | null | null | FastEMRIWaveforms/few/utils/modeselector.py | basuparth/ICERM_Workshop | ebabce680fc87e90ff1de30246dcda9beb384bb4 | [
"MIT"
] | null | null | null | FastEMRIWaveforms/few/utils/modeselector.py | basuparth/ICERM_Workshop | ebabce680fc87e90ff1de30246dcda9beb384bb4 | [
"MIT"
] | null | null | null | # Online mode selection for FastEMRIWaveforms Packages
# Copyright (C) 2020 Michael L. Katz, Alvin J.K. Chua, Niels Warburton, Scott A. Hughes
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, ... | 38.149701 | 95 | 0.622822 | 5,414 | 0.849788 | 0 | 0 | 139 | 0.021818 | 0 | 0 | 4,330 | 0.679642 |
75f7e09f370f1d9746b214f2177f7c3fe2f5c339 | 81 | py | Python | coreapi/models/__init__.py | recentfahim/smartbusinessbd | 61a74ae629f2c6e2317c41da23476c8780446e84 | [
"Apache-2.0"
] | null | null | null | coreapi/models/__init__.py | recentfahim/smartbusinessbd | 61a74ae629f2c6e2317c41da23476c8780446e84 | [
"Apache-2.0"
] | null | null | null | coreapi/models/__init__.py | recentfahim/smartbusinessbd | 61a74ae629f2c6e2317c41da23476c8780446e84 | [
"Apache-2.0"
] | null | null | null | from .city import City
from .company import Company
from .country import Country
| 20.25 | 28 | 0.814815 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
75f9dd3819053deb8e0d3dbd4dc28b348322030d | 2,113 | py | Python | shared-data/python/opentrons_shared_data/deck/dev_types.py | Opentrons/protocol_framework | ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f | [
"Apache-2.0"
] | null | null | null | shared-data/python/opentrons_shared_data/deck/dev_types.py | Opentrons/protocol_framework | ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f | [
"Apache-2.0"
] | null | null | null | shared-data/python/opentrons_shared_data/deck/dev_types.py | Opentrons/protocol_framework | ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f | [
"Apache-2.0"
] | null | null | null | """
opentrons_shared_data.deck.dev_types: types for deck defs
This should only be imported if typing.TYPE_CHECKING is True
"""
from typing import Any, Dict, List, NewType, Union
from typing_extensions import Literal, TypedDict
from ..module.dev_types import ModuleType
DeckSchemaVersion3 = Literal[3]
DeckSchemaVers... | 19.564815 | 88 | 0.730715 | 1,436 | 0.679602 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.079981 |
75f9e56ae6c6a091caa3997bff09abbf8201e9db | 2,803 | py | Python | source/hsicbt/model/vgg.py | tongjian121/PK-HBaR | c564e0f08c2c09e0023384adecfcf25e2d53a8a3 | [
"MIT"
] | 9 | 2021-11-04T16:53:04.000Z | 2022-03-28T10:27:44.000Z | source/hsicbt/model/vgg.py | tongjian121/PK-HBaR | c564e0f08c2c09e0023384adecfcf25e2d53a8a3 | [
"MIT"
] | null | null | null | source/hsicbt/model/vgg.py | tongjian121/PK-HBaR | c564e0f08c2c09e0023384adecfcf25e2d53a8a3 | [
"MIT"
] | null | null | null | import math
import torch
import torch.nn as nn
from torch.autograd import Variable
from torchvision import models
defaultcfg = {
11 : [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512],
13 : [64, 64, 'M', 128, 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512],
16 : [64, 64, 'M', 128, 128, 'M', 256... | 32.593023 | 108 | 0.567249 | 1,615 | 0.576168 | 0 | 0 | 0 | 0 | 0 | 0 | 176 | 0.06279 |
75faae9bc5c91a63ded3c9f4f2e51213df5e1730 | 11,555 | py | Python | src/out/ICFP18evaluation/evaluationTreeLSTM/PyTorch/scripts/preprocess-sst.py | faradaym/Lantern | 536e48da79ee374527c669f77ad9e0a0776a0bb8 | [
"BSD-3-Clause"
] | 158 | 2018-03-28T21:58:07.000Z | 2022-02-22T00:49:46.000Z | src/out/ICFP18evaluation/evaluationTreeLSTM/PyTorch/scripts/preprocess-sst.py | douxiansheng/Lantern | f453de532da638c1f467953b32bbe49a3dedfa45 | [
"BSD-3-Clause"
] | 35 | 2018-09-03T21:27:15.000Z | 2019-05-11T02:17:49.000Z | src/out/ICFP18evaluation/evaluationTreeLSTM/PyTorch/scripts/preprocess-sst.py | douxiansheng/Lantern | f453de532da638c1f467953b32bbe49a3dedfa45 | [
"BSD-3-Clause"
] | 36 | 2017-06-30T00:28:59.000Z | 2022-01-24T12:20:42.000Z | """
Preprocessing script for Stanford Sentiment Treebank data.
"""
import os
import glob
#
# Trees and tree loading
#
class ConstTree(object):
def __init__(self):
self.left = None
self.right = None
def size(self):
self.size = 1
if self.left is not None:
self.size... | 32.457865 | 87 | 0.539766 | 1,864 | 0.161315 | 0 | 0 | 0 | 0 | 0 | 0 | 1,061 | 0.091822 |
75fc997c30736fa87f40fddc061010fa3c1f2c9f | 12,703 | py | Python | models/relevance/relevance_google_net.py | sanglee/XAI-threshold-calibration | 24ddd5213b02d4fb919bca191392fe8b1a30aa88 | [
"Apache-2.0"
] | null | null | null | models/relevance/relevance_google_net.py | sanglee/XAI-threshold-calibration | 24ddd5213b02d4fb919bca191392fe8b1a30aa88 | [
"Apache-2.0"
] | null | null | null | models/relevance/relevance_google_net.py | sanglee/XAI-threshold-calibration | 24ddd5213b02d4fb919bca191392fe8b1a30aa88 | [
"Apache-2.0"
] | null | null | null | import warnings
from collections import namedtuple
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
import torch.utils.model_zoo as model_zoo
from typing import Optional, Tuple, List, Callable, Any
from modules.layers import *
__all__ = ['GoogLeNet', 'googlenet', "GoogLeNetO... | 32.994805 | 119 | 0.581831 | 10,414 | 0.819806 | 0 | 0 | 0 | 0 | 0 | 0 | 3,597 | 0.283161 |
75fe3189c125c3919b270ac5067d6ecc73d03252 | 375 | py | Python | University Codesprint Contest/seperaenos.py | ukirderohit/Python-Hacker-rank-solutions | de3b60b00d864c15a452977225b33ead19c878a5 | [
"MIT"
] | null | null | null | University Codesprint Contest/seperaenos.py | ukirderohit/Python-Hacker-rank-solutions | de3b60b00d864c15a452977225b33ead19c878a5 | [
"MIT"
] | null | null | null | University Codesprint Contest/seperaenos.py | ukirderohit/Python-Hacker-rank-solutions | de3b60b00d864c15a452977225b33ead19c878a5 | [
"MIT"
] | null | null | null | q = int(raw_input().strip())
for a0 in xrange(q):
s=raw_input().strip()
# if s.startswith('0'):
# print "No"
# print s.find('1')
# print s.rfind(s,a0,a0-1)
# posof1 = s.find('1')
digits = [str(x) for x in str(s)]
print digits
for digit in len(digits):
if digits[digit]-dig... | 26.785714 | 46 | 0.512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.285333 |
75fe4ffed842895823f432c3592116337d923fac | 8,457 | py | Python | polyglotdb/client/client.py | michaelhaaf/PolyglotDB | 7640212c7062cf44ae911081241ce83a26ced2eb | [
"MIT"
] | 25 | 2016-01-28T20:47:07.000Z | 2021-11-29T16:13:07.000Z | polyglotdb/client/client.py | michaelhaaf/PolyglotDB | 7640212c7062cf44ae911081241ce83a26ced2eb | [
"MIT"
] | 120 | 2016-04-07T17:55:09.000Z | 2022-03-24T18:30:10.000Z | polyglotdb/client/client.py | PhonologicalCorpusTools/PolyglotDB | 7640212c7062cf44ae911081241ce83a26ced2eb | [
"MIT"
] | 10 | 2015-12-03T20:06:58.000Z | 2021-02-11T03:02:48.000Z | import requests
from ..exceptions import ClientError
class PGDBClient(object):
"""
Simple client for interacting with ISCAN servers.
"""
def __init__(self, host, token=None, corpus_name=None):
self.host = host
self.token = token
if self.host.endswith('/'):
self.hos... | 33.295276 | 108 | 0.537898 | 8,401 | 0.993378 | 0 | 0 | 0 | 0 | 0 | 0 | 3,516 | 0.41575 |
75fefd40d863da1697a3900b9bc8d32e531394bf | 2,745 | py | Python | python/plotCSV.py | lrquad/LoboScripts | 04d2de79d2d83e781e3f4a3de2531dc48e4013a6 | [
"MIT"
] | null | null | null | python/plotCSV.py | lrquad/LoboScripts | 04d2de79d2d83e781e3f4a3de2531dc48e4013a6 | [
"MIT"
] | null | null | null | python/plotCSV.py | lrquad/LoboScripts | 04d2de79d2d83e781e3f4a3de2531dc48e4013a6 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
import matplotlib.animation as animation
from matplotlib import rcParams
import matplotlib.patches as patches
rcParams['font.family'] = 'Times New Roman'
rcParams['font.size'] = 20
rcParams['axes.edgecolor'] = (0.0, 0.0, ... | 30.5 | 151 | 0.665938 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 394 | 0.143534 |
2f01f5d13c019c855d7b51b2b4f48b63f6f7275b | 12,327 | py | Python | wrappers/python/virgil_crypto_lib/foundation/_c_bridge/_vscf_rsa.py | odidev/virgil-crypto-c | 3d5d5cb19fdcf81eab08cdc63647f040117ecbd8 | [
"BSD-3-Clause"
] | 26 | 2018-12-17T13:45:25.000Z | 2022-01-16T20:00:04.000Z | wrappers/python/virgil_crypto_lib/foundation/_c_bridge/_vscf_rsa.py | odidev/virgil-crypto-c | 3d5d5cb19fdcf81eab08cdc63647f040117ecbd8 | [
"BSD-3-Clause"
] | 4 | 2019-01-03T12:08:52.000Z | 2021-12-02T05:21:13.000Z | wrappers/python/virgil_crypto_lib/foundation/_c_bridge/_vscf_rsa.py | odidev/virgil-crypto-c | 3d5d5cb19fdcf81eab08cdc63647f040117ecbd8 | [
"BSD-3-Clause"
] | 8 | 2019-01-24T08:22:06.000Z | 2022-02-07T11:37:00.000Z | # Copyright (C) 2015-2021 Virgil Security, Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# (1) Redistributions of source code must retain the above copyright
# notice, this li... | 49.705645 | 124 | 0.736108 | 10,343 | 0.839052 | 0 | 0 | 0 | 0 | 0 | 0 | 3,969 | 0.321976 |
2f028c07302e47df287d4dc5d37f771ec2181806 | 30,394 | py | Python | tb_api_client/swagger_client/apis/user_controller_api.py | MOSAIC-LoPoW/oss7-thingsboard-backend-example | 9b289dd7fdbb6e932ca338ad497a7bb1fc84d010 | [
"Apache-2.0"
] | 5 | 2017-11-27T15:48:16.000Z | 2020-09-21T04:18:47.000Z | tb_api_client/swagger_client/apis/user_controller_api.py | MOSAIC-LoPoW/oss7-thingsboard-backend-example | 9b289dd7fdbb6e932ca338ad497a7bb1fc84d010 | [
"Apache-2.0"
] | null | null | null | tb_api_client/swagger_client/apis/user_controller_api.py | MOSAIC-LoPoW/oss7-thingsboard-backend-example | 9b289dd7fdbb6e932ca338ad497a7bb1fc84d010 | [
"Apache-2.0"
] | 6 | 2018-01-14T17:23:46.000Z | 2019-06-24T13:38:54.000Z | # coding: utf-8
"""
Thingsboard REST API
For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>.
OpenAPI spec version: 2.0
Contact: info@thingsboard.io
Generated by: https://github.com/swagger-api/swagger-co... | 40.471372 | 149 | 0.560012 | 29,875 | 0.982924 | 0 | 0 | 0 | 0 | 0 | 0 | 13,287 | 0.437159 |
2f03da5c972d890701aa5588b07be7bd754ca560 | 5,268 | py | Python | bulk-image-optimizer.py | carzam87/python-bulk-image-optimizer | 1e9e9396de84de3651b963fc3b8b569893296dde | [
"MIT"
] | 8 | 2020-01-28T10:33:28.000Z | 2022-01-28T12:51:50.000Z | bulk-image-optimizer.py | carzam87/python-bulk-image-optimizer | 1e9e9396de84de3651b963fc3b8b569893296dde | [
"MIT"
] | null | null | null | bulk-image-optimizer.py | carzam87/python-bulk-image-optimizer | 1e9e9396de84de3651b963fc3b8b569893296dde | [
"MIT"
] | 5 | 2020-09-29T08:26:35.000Z | 2021-11-15T20:07:20.000Z | import os
import subprocess
from pathlib import Path
from PIL import Image
import errno
import time
from re import search
CONVERT_PNG_TO_JPG = False
TOTAL_ORIGINAL = 0
TOTAL_COMPRESSED = 0
TOTAL_GAIN = 0
TOTAL_FILES = 0
QUALITY = 85
def compress(location):
for r, d, f in os.walk(location):
for item in d:... | 44.644068 | 123 | 0.44609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,144 | 0.21716 |
2f03ebf048e5859cb54e5897517da48e3b0f38d0 | 16,968 | py | Python | interpretdl/interpreter/lime.py | Tyihou/InterpretDL | df8894f8703634df4bfcbdcc495a3d12b220028c | [
"Apache-2.0"
] | 1 | 2021-03-11T02:38:51.000Z | 2021-03-11T02:38:51.000Z | interpretdl/interpreter/lime.py | Tyihou/InterpretDL | df8894f8703634df4bfcbdcc495a3d12b220028c | [
"Apache-2.0"
] | null | null | null | interpretdl/interpreter/lime.py | Tyihou/InterpretDL | df8894f8703634df4bfcbdcc495a3d12b220028c | [
"Apache-2.0"
] | null | null | null | import os
import typing
from typing import Any, Callable, List, Tuple, Union
import numpy as np
from ..data_processor.readers import preprocess_image, read_image, restore_image
from ..data_processor.visualizer import show_important_parts, visualize_image, save_image
from ..common.paddle_utils import init_checkpoint, t... | 39.277778 | 184 | 0.552393 | 16,665 | 0.975817 | 0 | 0 | 0 | 0 | 0 | 0 | 8,216 | 0.481087 |
2f042e06fed341e6137967c14ffb3b319a432271 | 2,106 | py | Python | opendc-web/opendc-web-api/opendc/api/v2/portfolios/portfolioId/scenarios/endpoint.py | Koen1999/opendc | f9b43518d2d50f33077734537a477539fca9f5b7 | [
"MIT"
] | null | null | null | opendc-web/opendc-web-api/opendc/api/v2/portfolios/portfolioId/scenarios/endpoint.py | Koen1999/opendc | f9b43518d2d50f33077734537a477539fca9f5b7 | [
"MIT"
] | 4 | 2020-11-27T16:27:58.000Z | 2020-12-28T23:00:08.000Z | opendc-web/opendc-web-api/opendc/api/v2/portfolios/portfolioId/scenarios/endpoint.py | Koen1999/opendc | f9b43518d2d50f33077734537a477539fca9f5b7 | [
"MIT"
] | null | null | null | from opendc.models.portfolio import Portfolio
from opendc.models.scenario import Scenario
from opendc.models.topology import Topology
from opendc.util.rest import Response
def POST(request):
"""Add a new Scenario for this Portfolio."""
request.check_required_parameters(path={'portfolioId': 'string'},
... | 42.12 | 91 | 0.45679 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 418 | 0.198481 |
f92e0d9330578dc947fa3c0cecc40a9523ecca24 | 1,906 | py | Python | Python/pymd/md/core/box.py | ryanlopezzzz/ABPTutorial | 923fa89f1959cd71b28ecf4628ecfbfce6a6206c | [
"MIT"
] | 8 | 2020-05-05T00:41:50.000Z | 2021-11-04T20:54:43.000Z | Python/pymd/md/core/box.py | ryanlopezzzz/ABPTutorial | 923fa89f1959cd71b28ecf4628ecfbfce6a6206c | [
"MIT"
] | null | null | null | Python/pymd/md/core/box.py | ryanlopezzzz/ABPTutorial | 923fa89f1959cd71b28ecf4628ecfbfce6a6206c | [
"MIT"
] | 5 | 2020-05-04T16:37:13.000Z | 2021-08-18T07:53:58.000Z | # Copyright 2020 Rastko Sknepnek, University of Dundee, r.skepnek@dundee.ac.uk
#
# 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 ... | 45.380952 | 114 | 0.693599 | 732 | 0.38405 | 0 | 0 | 0 | 0 | 0 | 0 | 1,575 | 0.826338 |
f92f4eea713aeec6532cc3eed5da737cef8d020e | 884 | py | Python | dot_vim/plugged/vim-devicons/pythonx/vim_devicons/powerline/segments.py | gabefgonc/san-francisco-rice-dotfiles | 60ff3539f34ecfff6d7bce895497e2a3805910d4 | [
"MIT"
] | 4,897 | 2015-07-12T17:52:02.000Z | 2022-03-31T16:07:01.000Z | dot_vim/plugged/vim-devicons/pythonx/vim_devicons/powerline/segments.py | gabefgonc/san-francisco-rice-dotfiles | 60ff3539f34ecfff6d7bce895497e2a3805910d4 | [
"MIT"
] | 337 | 2015-07-12T17:14:35.000Z | 2022-03-05T17:27:24.000Z | dot_vim/plugged/vim-devicons/pythonx/vim_devicons/powerline/segments.py | gabefgonc/san-francisco-rice-dotfiles | 60ff3539f34ecfff6d7bce895497e2a3805910d4 | [
"MIT"
] | 365 | 2015-07-20T07:51:11.000Z | 2022-02-22T05:00:56.000Z | # -*- coding: utf-8 -*-
# vim:se fenc=utf8 noet:
from __future__ import (unicode_literals, division, absolute_import, print_function)
try:
import vim
except ImportError:
vim = {}
from powerline.bindings.vim import (vim_get_func, buffer_name)
from powerline.theme import requires_segment_info
@requires_segment_info
... | 30.482759 | 84 | 0.777149 | 0 | 0 | 0 | 0 | 584 | 0.660633 | 0 | 0 | 227 | 0.256787 |
f93060fe13dca91fd46628410cdb2477c1e8f235 | 2,844 | py | Python | app/api/auth.py | ergo-pad/paideia-api | 7ffc78366567c72722d107f06ad37aa7557b05be | [
"MIT"
] | null | null | null | app/api/auth.py | ergo-pad/paideia-api | 7ffc78366567c72722d107f06ad37aa7557b05be | [
"MIT"
] | null | null | null | app/api/auth.py | ergo-pad/paideia-api | 7ffc78366567c72722d107f06ad37aa7557b05be | [
"MIT"
] | null | null | null | from fastapi.security import OAuth2PasswordRequestForm
from fastapi import APIRouter, Depends, HTTPException, status
from datetime import timedelta
from starlette.responses import JSONResponse
from db.crud.users import blacklist_token
from db.session import get_db
from core import security
from core.auth import authe... | 33.857143 | 130 | 0.654008 | 0 | 0 | 0 | 0 | 2,428 | 0.853727 | 2,372 | 0.834037 | 348 | 0.122363 |
f9306dd6abfdca80dd6982ef5b08247263dd7576 | 5,530 | py | Python | src/gui_occluder/custom/sr_occluder.py | hgiesel/anki-multiple-choice | 1a9a22480eb6c0e7f421dc08d36d14920e43dd3e | [
"MIT"
] | 5 | 2019-12-26T08:08:52.000Z | 2021-11-21T03:34:27.000Z | src/gui_occluder/custom/sr_occluder.py | hgiesel/anki-set-randomizer | 1a9a22480eb6c0e7f421dc08d36d14920e43dd3e | [
"MIT"
] | 84 | 2019-08-01T20:36:17.000Z | 2019-10-26T16:16:33.000Z | src/gui_occluder/custom/sr_occluder.py | hgiesel/anki_set_randomizer | 1a9a22480eb6c0e7f421dc08d36d14920e43dd3e | [
"MIT"
] | null | null | null | import os
import enum
from aqt.qt import QDialog, QGraphicsScene, QGraphicsRectItem, QGraphicsEllipseItem, QApplication
from aqt.qt import Qt, QPen, QGraphicsItem, QPixmap, QRectF, QPainter
from aqt.qt import QPointF, QBrush, QColor, QPainterPath, QIcon, QSize, QPalette
from aqt.utils import showInfo
from ..sr_occlu... | 34.5625 | 97 | 0.674141 | 5,047 | 0.912658 | 0 | 0 | 0 | 0 | 0 | 0 | 309 | 0.055877 |
f930eb0037c9a1f7c847f03ac1f6289fad3453d4 | 13,371 | py | Python | gen3config/config.py | uc-cdis/gen3config | fe340c0ce8ef3367f13c4f6040ec605e5fa7bc0c | [
"Apache-2.0"
] | null | null | null | gen3config/config.py | uc-cdis/gen3config | fe340c0ce8ef3367f13c4f6040ec605e5fa7bc0c | [
"Apache-2.0"
] | null | null | null | gen3config/config.py | uc-cdis/gen3config | fe340c0ce8ef3367f13c4f6040ec605e5fa7bc0c | [
"Apache-2.0"
] | null | null | null | """
Configuration class for handling configs with a given default.
If you need custom functionality or need to apply post_processing to parsed config,
simply extend this class.
Example:
```
class FenceConfig(Config):
def __init__(self, *args, **kwargs):
super(FenceConfig, self).__init__(*args, **kwargs)
... | 35.943548 | 99 | 0.615362 | 5,598 | 0.418667 | 104 | 0.007778 | 0 | 0 | 0 | 0 | 7,264 | 0.543265 |
f931949a583110bdf77e537bf67ef0dfdd9aeae4 | 8,150 | py | Python | src/ReinforcementLearning/Modules/carlaUtils.py | B-C-WANG/ReinforcementLearningInAutoPilot | 8d3c0b81e3db2fb4be0e52e25b700c54f5e569dc | [
"MIT"
] | 27 | 2019-05-14T01:06:05.000Z | 2022-03-06T03:12:40.000Z | src/ReinforcementLearning/Modules/carlaUtils.py | B-C-WANG/ReinforcementLearningInAutoPilot | 8d3c0b81e3db2fb4be0e52e25b700c54f5e569dc | [
"MIT"
] | null | null | null | src/ReinforcementLearning/Modules/carlaUtils.py | B-C-WANG/ReinforcementLearningInAutoPilot | 8d3c0b81e3db2fb4be0e52e25b700c54f5e569dc | [
"MIT"
] | 10 | 2020-01-20T09:39:51.000Z | 2022-03-31T18:30:53.000Z | # coding:utf-8
# Type: Public
import numpy as np
import common.Math as cMath
import math
class CarlrUtils(object):
Author = "BaoChuan Wang"
AllowImport = False
@staticmethod
def get_direction_vector_series_and_car_to_next_waypoint_ratio(
carla_engine,
start_waypoint_xy_array... | 40.346535 | 141 | 0.640613 | 9,008 | 0.989673 | 0 | 0 | 8,912 | 0.979125 | 0 | 0 | 3,840 | 0.421885 |
f932dbe3d5afcee0aae3f946f59a3b66e3f2fb59 | 2,413 | py | Python | models.py | abhishekyana/CycleGANs-PyTorch | ebbd7d6dbed642577cc37a3e741f4233b9cbbd7a | [
"MIT"
] | 12 | 2019-07-27T09:54:57.000Z | 2021-04-23T23:34:25.000Z | models.py | abhishekyana/CycleGANs-PyTorch | ebbd7d6dbed642577cc37a3e741f4233b9cbbd7a | [
"MIT"
] | 5 | 2020-11-13T15:40:12.000Z | 2022-03-11T23:53:51.000Z | models.py | abhishekyana/CycleGANs-PyTorch | ebbd7d6dbed642577cc37a3e741f4233b9cbbd7a | [
"MIT"
] | 2 | 2021-03-11T10:45:33.000Z | 2021-04-23T23:34:29.000Z | import torch.nn as nn
import torch.nn.functional as F
class ResBlock(nn.Module):
def __init__(self, inFeatures):
super(ResBlock, self).__init__()
self.conv = nn.Sequential(nn.ReflectionPad2d(1),
nn.Conv2d(inFeatures, inFeatures, 3),
nn.InstanceNorm2d(inFeatures),
nn.ReLU(inplace=True),... | 30.544304 | 100 | 0.642768 | 2,353 | 0.975135 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.019063 |
f933130df8fe669a9af1c9efd51088775e210fbc | 99 | py | Python | stable_baselines3/bear/__init__.py | mjyoo2/stable-baselines3 | ef7a580219df6d977b56fb99e503890bd5211195 | [
"MIT"
] | null | null | null | stable_baselines3/bear/__init__.py | mjyoo2/stable-baselines3 | ef7a580219df6d977b56fb99e503890bd5211195 | [
"MIT"
] | null | null | null | stable_baselines3/bear/__init__.py | mjyoo2/stable-baselines3 | ef7a580219df6d977b56fb99e503890bd5211195 | [
"MIT"
] | null | null | null | from stable_baselines3.bear.policies import BearPolicy
from stable_baselines3.bear.bear import BEAR | 49.5 | 54 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f9347e37b52fec0692880a203b911075b279ecba | 5,194 | py | Python | file-io-and-other-io/modfile/test_ip_gen.py | eda-ricercatore/python-sandbox | 741d23e15f22239cb5df8af6e695cd8e3574be50 | [
"MIT"
] | null | null | null | file-io-and-other-io/modfile/test_ip_gen.py | eda-ricercatore/python-sandbox | 741d23e15f22239cb5df8af6e695cd8e3574be50 | [
"MIT"
] | null | null | null | file-io-and-other-io/modfile/test_ip_gen.py | eda-ricercatore/python-sandbox | 741d23e15f22239cb5df8af6e695cd8e3574be50 | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
This is written by Zhiyang Ong to modify text (non-binary) files.
Synopsis:
Script to modify text (non-binary) files.
Revision History:
1) November 11, 2014. Initial working version.
The MIT License (MIT)
Copyright (c) <2014> <Zhiyang Ong>
Permission is hereby granted, f... | 57.076923 | 980 | 0.701579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,435 | 0.85387 |
f934993945194bcd3e81f89c7b932f03bda5ad14 | 8,771 | py | Python | aux_lib.py | paulokuriki/dcmtag2table | e9f7f366ffe64653aa2fab9bffd88669f1ed7f3f | [
"Apache-2.0"
] | null | null | null | aux_lib.py | paulokuriki/dcmtag2table | e9f7f366ffe64653aa2fab9bffd88669f1ed7f3f | [
"Apache-2.0"
] | null | null | null | aux_lib.py | paulokuriki/dcmtag2table | e9f7f366ffe64653aa2fab9bffd88669f1ed7f3f | [
"Apache-2.0"
] | null | null | null | import pydicom
from tqdm import tqdm
import pandas as pd
import os
import time
import glob
import numpy as np
from pydicom import _dicom_dict as dc
from constants import *
import string
def dcmtag2df(folder: str, list_of_tags: list):
"""
# Create a Pandas DataFrame with the <list_of_tags> DICOM tags
# from... | 37.165254 | 115 | 0.551248 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,734 | 0.197697 |
f9368f4ecdf91a5437237dc760bad64780ffdbe1 | 430 | py | Python | eve_swagger/__init__.py | Annakan/eve-swagger | 34b91a335e0e2c471fc552800751e9d702a7f260 | [
"BSD-3-Clause"
] | null | null | null | eve_swagger/__init__.py | Annakan/eve-swagger | 34b91a335e0e2c471fc552800751e9d702a7f260 | [
"BSD-3-Clause"
] | null | null | null | eve_swagger/__init__.py | Annakan/eve-swagger | 34b91a335e0e2c471fc552800751e9d702a7f260 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
eve-swagger
~~~~~~~~~~~
swagger.io extension for Eve-powered REST APIs.
:copyright: (c) 2015 by Nicola Iarocci.
:license: BSD, see LICENSE for more details.
"""
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict # no... | 23.888889 | 55 | 0.676744 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 254 | 0.590698 |
f936f234615d9bcf0427f9ba2eb780c873f4aa17 | 9,005 | py | Python | 2018_Epoch_Spectra.py | chunders/EpochAnalysis | b5d83d9608692e3bf5f9947bb3627e04a54a312f | [
"MIT"
] | null | null | null | 2018_Epoch_Spectra.py | chunders/EpochAnalysis | b5d83d9608692e3bf5f9947bb3627e04a54a312f | [
"MIT"
] | null | null | null | 2018_Epoch_Spectra.py | chunders/EpochAnalysis | b5d83d9608692e3bf5f9947bb3627e04a54a312f | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
_
/ | | __ _ __ _
/ | / |_||_|| ||
/ | / | |\ | ||_
/____ |__/\ . | | \|_|\_|
__________________________ .
███████╗██████╗ ██████╗ ██████... | 31.596491 | 125 | 0.4804 | 0 | 0 | 349 | 0.037108 | 0 | 0 | 0 | 0 | 4,434 | 0.471451 |
f937303cbe2bd1ca99e6bfd681984ef1eb1f4844 | 35 | py | Python | first-homework.py | Hexotical/Astr119 | 34a638d29f33c8fde9245cd7c5869bf3f9e7366b | [
"MIT"
] | null | null | null | first-homework.py | Hexotical/Astr119 | 34a638d29f33c8fde9245cd7c5869bf3f9e7366b | [
"MIT"
] | 2 | 2020-10-01T18:51:01.000Z | 2020-10-06T14:15:37.000Z | first-homework.py | Hexotical/astr-119 | 34a638d29f33c8fde9245cd7c5869bf3f9e7366b | [
"MIT"
] | null | null | null | print("Lukas Ho, pronouns: he/him") | 35 | 35 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.8 |
f93933ebd7cddbd101cc7daf0772e4787528a6a9 | 2,965 | py | Python | server/swagger_server/models/people_patch.py | fabric-testbed/fabric-core-api | 8ce79fd16e1020271487967743a89b7a2346bf45 | [
"MIT"
] | null | null | null | server/swagger_server/models/people_patch.py | fabric-testbed/fabric-core-api | 8ce79fd16e1020271487967743a89b7a2346bf45 | [
"MIT"
] | null | null | null | server/swagger_server/models/people_patch.py | fabric-testbed/fabric-core-api | 8ce79fd16e1020271487967743a89b7a2346bf45 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server.models.preferences import Preferences # noqa: F401,E501
from swagger_server import util
class... | 25.560345 | 101 | 0.601349 | 2,649 | 0.893423 | 0 | 0 | 1,624 | 0.547723 | 0 | 0 | 1,620 | 0.546374 |
f9393f537340aad0fcc03fb7b4478b7455578c86 | 14,649 | py | Python | Code/src/models/optim/DMSAD_trainer.py | antoine-spahr/Contrastive-Deep-Semi-Supervised-Anomaly-Detection | e84c28ce4dd28671d39752a7d21c674e05fcb495 | [
"MIT"
] | 8 | 2021-02-19T17:30:00.000Z | 2022-02-21T05:55:06.000Z | Code/src/models/optim/DMSAD_trainer.py | antoine-spahr/Contrastive-Deep-Semi-Supervised-Anomaly-Detection | e84c28ce4dd28671d39752a7d21c674e05fcb495 | [
"MIT"
] | 1 | 2021-05-03T14:04:53.000Z | 2021-05-03T14:48:01.000Z | Code/src/models/optim/DMSAD_trainer.py | antoine-spahr/Contrastive-Deep-Semi-Supervised-Anomaly-Detection | e84c28ce4dd28671d39752a7d21c674e05fcb495 | [
"MIT"
] | 5 | 2021-02-18T22:43:40.000Z | 2021-05-03T14:01:49.000Z | import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import time
import logging
from sklearn.metrics import roc_auc_score
from sklearn.cluster import KMeans
from sklearn.manifold import TSNE
from src.models.optim.Loss_Functions import DMSADLoss
from src.utils.utils import print_progessbar
... | 42.708455 | 123 | 0.558263 | 14,327 | 0.978019 | 0 | 0 | 0 | 0 | 0 | 0 | 6,034 | 0.411905 |
f93b09d7873482279865a3e138f9e289b66d1ef0 | 7,600 | py | Python | escher/tests/test_plots.py | phantomas1234/escher | 47f3291beefd7cc90207755c717e83f385262956 | [
"MIT"
] | null | null | null | escher/tests/test_plots.py | phantomas1234/escher | 47f3291beefd7cc90207755c717e83f385262956 | [
"MIT"
] | null | null | null | escher/tests/test_plots.py | phantomas1234/escher | 47f3291beefd7cc90207755c717e83f385262956 | [
"MIT"
] | null | null | null | from __future__ import print_function, unicode_literals
from escher import __schema_version__
import escher.server
from escher import Builder, get_cache_dir, clear_cache
from escher.plots import (_load_resource, local_index, server_index,
model_json_for_name, map_json_for_name)
from escher.u... | 37.073171 | 133 | 0.644342 | 0 | 0 | 0 | 0 | 1,882 | 0.247632 | 0 | 0 | 2,261 | 0.2975 |
f93b74e758fc59e8cc9ffa0d3c99de08f971b204 | 656 | py | Python | setup.py | HiteshSachdev/casualty | 7d3878bea7bc503a3cc5eb6046aa658608164e0f | [
"MIT"
] | 14 | 2018-10-07T12:05:24.000Z | 2022-03-01T01:58:21.000Z | setup.py | treebohotels/corelated-logs | 13926c97a473bc63c7b18e22870d1760089f30d1 | [
"MIT"
] | 6 | 2018-10-07T09:07:59.000Z | 2019-06-08T09:23:45.000Z | setup.py | treebohotels/corelated-logs | 13926c97a473bc63c7b18e22870d1760089f30d1 | [
"MIT"
] | 2 | 2019-01-23T06:14:31.000Z | 2021-06-21T04:02:26.000Z | from setuptools import find_packages, setup
setup(
name="casualty",
version="0.1.9",
packages=find_packages(exclude=["tests"]),
install_requires=[
"structlog==18.2.0",
"wrapt==1.10.11",
"pre-commit-hooks==1.4.0",
"mock==2.0.0",
"pytest==3.8.2",
"pytest-m... | 26.24 | 105 | 0.568598 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 324 | 0.493902 |
f93db1c837037edf147a1adf0e6c511aadcb0960 | 5,321 | py | Python | isaactest/tests/user_progress_access.py | jsharkey13/isaac-selenium-testing | fc57ec57179cf7d9f0bb5ef46d759792b2af3bc8 | [
"MIT"
] | null | null | null | isaactest/tests/user_progress_access.py | jsharkey13/isaac-selenium-testing | fc57ec57179cf7d9f0bb5ef46d759792b2af3bc8 | [
"MIT"
] | 1 | 2016-01-15T11:28:06.000Z | 2016-01-25T17:09:18.000Z | isaactest/tests/user_progress_access.py | jsharkey13/isaac-selenium-testing | fc57ec57179cf7d9f0bb5ef46d759792b2af3bc8 | [
"MIT"
] | 1 | 2019-05-14T16:53:49.000Z | 2019-05-14T16:53:49.000Z | import time
from ..utils.log import log, INFO, ERROR, PASS
from ..utils.isaac import submit_login_form, assert_logged_in
from ..utils.i_selenium import assert_tab, image_div
from ..utils.i_selenium import wait_for_xpath_element, wait_for_invisible_xpath
from ..tests import TestWithDependency
from selenium.common.except... | 47.088496 | 141 | 0.64236 | 0 | 0 | 0 | 0 | 4,885 | 0.918061 | 0 | 0 | 2,104 | 0.395414 |
f93dfe9bacfa4bd9cb38fd01bfa6466399547497 | 423 | py | Python | insert_loc_code.py | dspshin/house-bot | 1e2755abae114c3284d7d95d81c40fadb0ab9b43 | [
"MIT"
] | null | null | null | insert_loc_code.py | dspshin/house-bot | 1e2755abae114c3284d7d95d81c40fadb0ab9b43 | [
"MIT"
] | null | null | null | insert_loc_code.py | dspshin/house-bot | 1e2755abae114c3284d7d95d81c40fadb0ab9b43 | [
"MIT"
] | null | null | null | import re
import sqlite3
conn = sqlite3.connect('loc.db')
c = conn.cursor()
c.execute('CREATE TABLE IF NOT EXISTS location(loc text PRIMARY KEY, code text)')
conn.commit()
f = open('loc_code.txt')
for d in f.readlines():
data = re.sub(r'\s{2}', '|', d.strip()).split('|')
print data[1].strip(), data[0]
c.... | 24.882353 | 84 | 0.63357 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 148 | 0.349882 |
f94108d55467d7dc2d4d0a83034f5df29403a946 | 33,479 | py | Python | python/valkka/nv/valkka_nv.py | xiaoxoxin/valkka-nv | 48b8fd5b1293c6e4f96f4798e6d327e209b83bce | [
"WTFPL"
] | 1 | 2021-03-03T13:25:22.000Z | 2021-03-03T13:25:22.000Z | python/valkka/nv/valkka_nv.py | xiaoxoxin/valkka-nv | 48b8fd5b1293c6e4f96f4798e6d327e209b83bce | [
"WTFPL"
] | null | null | null | python/valkka/nv/valkka_nv.py | xiaoxoxin/valkka-nv | 48b8fd5b1293c6e4f96f4798e6d327e209b83bce | [
"WTFPL"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_im... | 41.179582 | 138 | 0.729532 | 26,766 | 0.799486 | 0 | 0 | 0 | 0 | 0 | 0 | 1,761 | 0.0526 |