hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a97495d358eb2989aea339e577a00af31af80ef4 | 2,992 | py | Python | app/content/lesson4.py | Mandhiraj/codingblind | fccb2b9124cbe3a2c07654d45806294f140ff5cc | [
"MIT"
] | null | null | null | app/content/lesson4.py | Mandhiraj/codingblind | fccb2b9124cbe3a2c07654d45806294f140ff5cc | [
"MIT"
] | null | null | null | app/content/lesson4.py | Mandhiraj/codingblind | fccb2b9124cbe3a2c07654d45806294f140ff5cc | [
"MIT"
] | null | null | null | section0 = {
'subheading' : 'Loops',
'content' : """Welcome to Lesson 4. In this lesson we will introduce loop structures. Loops allow you to
count the number of times something happens, or iterate through lists. They use a similar structure to
if statements. Everything you want done in a loop must be tabbed an a... | 49.04918 | 148 | 0.694519 |
d9bcb8c2dbdfa55286d36557daa1a092f20d0f75 | 1,656 | py | Python | async/001_async_threads_processes/01_asyncio/04_web_scraping/2_async_scrape.py | AleksNeStu/projects | 1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb | [
"Apache-2.0"
] | 2 | 2022-01-19T18:01:35.000Z | 2022-02-06T06:54:38.000Z | async/001_async_threads_processes/01_asyncio/04_web_scraping/2_async_scrape.py | AleksNeStu/projects | 1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb | [
"Apache-2.0"
] | null | null | null | async/001_async_threads_processes/01_asyncio/04_web_scraping/2_async_scrape.py | AleksNeStu/projects | 1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb | [
"Apache-2.0"
] | null | null | null | import asyncio
import datetime
import aiohttp
import bs4
from colorama import Fore
# Make this available more easily.
global loop
async def get_html(episode_number: int) -> str:
print(Fore.YELLOW + f"Getting HTML for episode {episode_number}", flush=True)
url = f'https://talkpython.fm/{episode_number}'
... | 24.352941 | 89 | 0.653382 |
9346908d639e21377fc635efe7328d78799a494a | 3,536 | py | Python | basis_set_exchange/writers/fhiaims.py | BasisSetExchange/basis_set_exchange | 1054817a0a898800897354b003e23b5222d54d21 | [
"BSD-3-Clause"
] | 4 | 2018-03-21T20:33:56.000Z | 2018-05-28T02:07:39.000Z | basis_set_exchange/writers/fhiaims.py | BasisSetExchange/basis_set_exchange | 1054817a0a898800897354b003e23b5222d54d21 | [
"BSD-3-Clause"
] | 20 | 2018-02-15T15:15:40.000Z | 2018-05-22T19:54:58.000Z | basis_set_exchange/writers/fhiaims.py | BasisSetExchange/basis_set_exchange | 1054817a0a898800897354b003e23b5222d54d21 | [
"BSD-3-Clause"
] | 1 | 2018-03-15T02:12:55.000Z | 2018-03-15T02:12:55.000Z | # Copyright (c) 2017-2022 The Molecular Sciences Software Institute, Virginia Tech
#
# 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 l... | 39.288889 | 107 | 0.658937 |
484e5ba8ad487d82f1203cfbd08a8aafa3b7c385 | 1,414 | py | Python | fixture/session.py | katieden/python_training | 6e3fc33b2d9ac6be72f404b55fc78d75bccd8ceb | [
"Apache-2.0"
] | null | null | null | fixture/session.py | katieden/python_training | 6e3fc33b2d9ac6be72f404b55fc78d75bccd8ceb | [
"Apache-2.0"
] | null | null | null | fixture/session.py | katieden/python_training | 6e3fc33b2d9ac6be72f404b55fc78d75bccd8ceb | [
"Apache-2.0"
] | null | null | null | class SessionHelper:
def __init__(self, app):
self.app = app
def login(self, username, password):
driver = self.app.driver
self.app.open_url()
driver.find_element_by_name("login").click()
driver.find_element_by_name("login").clear()
driver.find_element_by_name("... | 35.35 | 85 | 0.641443 |
931ed54d3282ea6b410b77426e364db9c15fc153 | 279 | py | Python | uberlearner/accounts/admin.py | Uberlearner/uberlearner | 421391c3c838bf8f88eed47646226fe8dc22d061 | [
"MIT"
] | 1 | 2020-10-17T04:41:47.000Z | 2020-10-17T04:41:47.000Z | uberlearner/accounts/admin.py | Uberlearner/uberlearner | 421391c3c838bf8f88eed47646226fe8dc22d061 | [
"MIT"
] | null | null | null | uberlearner/accounts/admin.py | Uberlearner/uberlearner | 421391c3c838bf8f88eed47646226fe8dc22d061 | [
"MIT"
] | null | null | null | from django.contrib import admin
from accounts.models import UserProfile
class UserProfileAdmin(admin.ModelAdmin):
fieldsets = (
('Basic Information', {
'fields': ('user', 'summary'),
}),
)
admin.site.register(UserProfile, UserProfileAdmin)
| 23.25 | 50 | 0.663082 |
af4adce057e6d2bc1e68e98050dd0c880c8b8516 | 761 | py | Python | src/pandashape/PandaShaper.py | jammerware/pandashape | 37e45e830cf71b28486aa4949f1ba7106ae6ed56 | [
"MIT"
] | null | null | null | src/pandashape/PandaShaper.py | jammerware/pandashape | 37e45e830cf71b28486aa4949f1ba7106ae6ed56 | [
"MIT"
] | null | null | null | src/pandashape/PandaShaper.py | jammerware/pandashape | 37e45e830cf71b28486aa4949f1ba7106ae6ed56 | [
"MIT"
] | null | null | null | import pandas as pd
from .enums.Columns import Columns
from .describers import CategoricalDescriber, GeneralDescriber, DistributionDescriber, DTypesDescriber
from .internal import DescriberExecutor, TransformerExecutor
class PandaShaper:
def __init__(self, df, inplace=False):
assert(isinstance(df, pd.Data... | 40.052632 | 137 | 0.760841 |
0ac9074c1ca7e7fca9805bbad6d3e3dedcebb438 | 5,827 | py | Python | common/page_object.py | aelnahas/automation-quandl | eadc773e45f2b3427fe8f865e517565a924a1d2c | [
"MIT"
] | null | null | null | common/page_object.py | aelnahas/automation-quandl | eadc773e45f2b3427fe8f865e517565a924a1d2c | [
"MIT"
] | null | null | null | common/page_object.py | aelnahas/automation-quandl | eadc773e45f2b3427fe8f865e517565a924a1d2c | [
"MIT"
] | null | null | null | # A common base page object to be used by all the page object
import time
from selenium.common.exceptions import TimeoutException, StaleElementReferenceException, NoSuchElementException
from selenium.webdriver.support.expected_conditions import visibility_of_element_located, element_to_be_clickable
from selenium.webdri... | 41.920863 | 117 | 0.647675 |
66b5aeee5d54b40d277ea30d60e81dd06db8bab6 | 12,641 | py | Python | PRDARTS_search/get_cell_based_tiny_net.py | salesforce/PR-DARTS | 732bf438244b50c6fde84a8f103394fd034becad | [
"MIT"
] | 9 | 2021-01-22T05:06:43.000Z | 2021-11-18T22:50:08.000Z | PRDARTS_search/get_cell_based_tiny_net.py | salesforce/PR-DARTS | 732bf438244b50c6fde84a8f103394fd034becad | [
"MIT"
] | 1 | 2021-01-21T01:49:58.000Z | 2021-01-22T05:06:27.000Z | PRDARTS_search/get_cell_based_tiny_net.py | salesforce/PR-DARTS | 732bf438244b50c6fde84a8f103394fd034becad | [
"MIT"
] | 1 | 2021-04-19T14:05:37.000Z | 2021-04-19T14:05:37.000Z | ##################################################
# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019 #
##################################################
from os import path as osp
import numpy as np
from typing import List, Text
import torch
import pdb
# __all__ = ['change_key', 'get_cell_based_tiny_net', 'get_search_s... | 48.064639 | 181 | 0.668618 |
7d2514f7779018f0dcca91c40370827d716cdff4 | 571 | py | Python | test/test_cms.py | mverleg/svsite | 5c9dbcacf81020cf0c1960e337bdd33113acd597 | [
"BSD-3-Clause"
] | null | null | null | test/test_cms.py | mverleg/svsite | 5c9dbcacf81020cf0c1960e337bdd33113acd597 | [
"BSD-3-Clause"
] | 142 | 2015-06-05T07:53:09.000Z | 2020-03-31T18:37:07.000Z | test/test_cms.py | mdilli/svsite | 5c9dbcacf81020cf0c1960e337bdd33113acd597 | [
"BSD-3-Clause"
] | null | null | null |
from io import StringIO
from os import devnull
from pytest import mark
from django.core.management import call_command, CommandError
@mark.django_db
def test_cms_check():
"""
Test django-cms with it's build-in command `cms check`.
The `call_command` will raise an error when it fails, no need for asserts.
"""
... | 23.791667 | 76 | 0.704028 |
dc42c3558450c1245923d54844bb6287df95b01c | 470 | py | Python | loguru_db_handler.py | shoytov/django-dblog | 0fdc1a695605ed2fccea3f19b6293c1dfb37ca14 | [
"MIT"
] | 2 | 2020-07-07T10:03:07.000Z | 2020-09-04T21:32:26.000Z | loguru_db_handler.py | shoytov/django-dblog | 0fdc1a695605ed2fccea3f19b6293c1dfb37ca14 | [
"MIT"
] | null | null | null | loguru_db_handler.py | shoytov/django-dblog | 0fdc1a695605ed2fccea3f19b6293c1dfb37ca14 | [
"MIT"
] | null | null | null | from .models import ErrorLog
class LoguruDbHandler(object):
"""
handler to save logs into db
"""
def __init__(self, endpoint: str):
self.url = endpoint
def write(self, message):
"""
save loguru message into db
"""
new_error = ErrorLog()
new_error.url = self.url
new_error.exception_name = message.... | 21.363636 | 61 | 0.697872 |
0d82af61d013c07028aff465c6af502cd2f19073 | 5,819 | py | Python | services/restore.py | jonti09/postgresql-manager | b41dab209b3b655c71c5e0f36699e63ddba1ad06 | [
"MIT"
] | null | null | null | services/restore.py | jonti09/postgresql-manager | b41dab209b3b655c71c5e0f36699e63ddba1ad06 | [
"MIT"
] | null | null | null | services/restore.py | jonti09/postgresql-manager | b41dab209b3b655c71c5e0f36699e63ddba1ad06 | [
"MIT"
] | null | null | null | import gzip
import os
import shutil
import subprocess
from configparser import ConfigParser
import psycopg2
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
from services import logger, tmp_dir
from services.helpers import S3Client
from services.list import ListStorageBackup
class Postgres:
def __init... | 34.229412 | 115 | 0.573982 |
43622721e24152178c0a0b2f569f6477e7721ea0 | 9,316 | py | Python | resources/lib/database/db_base_sqlite.py | mediabrasiltv/plugin.video.netflix | 48c7ccc0492d877bd21076140fcd5b1f8a1b31b2 | [
"MIT"
] | null | null | null | resources/lib/database/db_base_sqlite.py | mediabrasiltv/plugin.video.netflix | 48c7ccc0492d877bd21076140fcd5b1f8a1b31b2 | [
"MIT"
] | null | null | null | resources/lib/database/db_base_sqlite.py | mediabrasiltv/plugin.video.netflix | 48c7ccc0492d877bd21076140fcd5b1f8a1b31b2 | [
"MIT"
] | 1 | 2020-04-04T08:00:04.000Z | 2020-04-04T08:00:04.000Z | # -*- coding: utf-8 -*-
"""
Copyright (C) 2017 Sebastian Golasch (plugin.video.netflix)
Copyright (C) 2019 Stefano Gottardo - @CastagnaIT (original implementation module)
Main functions for access to SQLite database
SPDX-License-Identifier: MIT
See LICENSES/MIT.md for more information.
"""
from __f... | 39.142857 | 100 | 0.584156 |
ef8a516fc647f8a94a47d20abdb2e648f36ba29f | 37,824 | py | Python | acl_loader/main.py | rdarbha/sonic-utilities | 40377d399e7dcbd8b92179926e17ee5b55d5e49b | [
"Apache-2.0"
] | null | null | null | acl_loader/main.py | rdarbha/sonic-utilities | 40377d399e7dcbd8b92179926e17ee5b55d5e49b | [
"Apache-2.0"
] | null | null | null | acl_loader/main.py | rdarbha/sonic-utilities | 40377d399e7dcbd8b92179926e17ee5b55d5e49b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import click
import ipaddr
import json
import syslog
import openconfig_acl
import tabulate
import pyangbind.lib.pybindJSON as pybindJSON
from natsort import natsorted
from sonic_py_common import device_info
from swsssdk import ConfigDBConnector, SonicDBConfig
from swsscommon.swsscommon import So... | 38.01407 | 143 | 0.617624 |
bdaba97592b8bc106f8b2189164f434e48b2fc6d | 6,579 | py | Python | constructing_sql_qs.py | shwotherspoon/census-data | 4a91fb7cb7672a326e3ae08d314eee562f07454c | [
"MIT"
] | null | null | null | constructing_sql_qs.py | shwotherspoon/census-data | 4a91fb7cb7672a326e3ae08d314eee562f07454c | [
"MIT"
] | null | null | null | constructing_sql_qs.py | shwotherspoon/census-data | 4a91fb7cb7672a326e3ae08d314eee562f07454c | [
"MIT"
] | null | null | null | import sqlite3
import numpy as np
from pie_charts import draw_chart
def get_data(input_args):
'''
input args looks like this !
[["housing",["buy",10000], 5],["family","no_family",4],["location","N",3],["education","high","2"],["median_household_income","high",1],["walk_score","high",1]]
'''... | 43 | 418 | 0.570451 |
984897cf56bcd186115da7fa7d00e79ce34880fb | 300 | py | Python | BEGIN/DAY_02/001-type-convertor.py | thakopian/100-DAYS-OF-PYTHON-PROJECT | 81615e3f42a259bdda00e0129c9a0890b07e9282 | [
"MIT"
] | null | null | null | BEGIN/DAY_02/001-type-convertor.py | thakopian/100-DAYS-OF-PYTHON-PROJECT | 81615e3f42a259bdda00e0129c9a0890b07e9282 | [
"MIT"
] | 4 | 2021-01-17T07:57:33.000Z | 2021-02-06T07:16:00.000Z | BEGIN/DAY_02/001-type-convertor.py | thakopian/100-DAYS-OF-PYTHON-PROJECT | 81615e3f42a259bdda00e0129c9a0890b07e9282 | [
"MIT"
] | null | null | null | # num_char = len(input("this is my name"))
# new_num_char = str(num_char)
# print("your name is " + new_num_char + " characters")
a = float(123)
# use type function to figure out the data type you are using
print(type(a))
# use str command to convert an object in python
print(str(70) + str(100))
| 25 | 61 | 0.696667 |
f1e4cdfb008a4132172f73bcc8b5656dd54c56c1 | 6,124 | py | Python | generative_pytorch_version/source/models/dssm.py | imguozhen/proactive-chat | 80d13e28cb93c26a65ace0a028c53fd0bafcdbf9 | [
"Apache-2.0"
] | null | null | null | generative_pytorch_version/source/models/dssm.py | imguozhen/proactive-chat | 80d13e28cb93c26a65ace0a028c53fd0bafcdbf9 | [
"Apache-2.0"
] | null | null | null | generative_pytorch_version/source/models/dssm.py | imguozhen/proactive-chat | 80d13e28cb93c26a65ace0a028c53fd0bafcdbf9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
######################################################################
#
# Copyright (c) 2019 Baidu.com, Inc. All Rights Reserved
#
# @file source/models/dssm.py
#
######################################################################
import torch
import torch.nn as nn
im... | 37.341463 | 90 | 0.568909 |
a39fee15c94b392b56059279375abd6987607baf | 38,007 | py | Python | learn/utils/data.py | omry/dynamicslearn | fdc19728da95ba9566722b28da40f32f5c4d250e | [
"MIT"
] | null | null | null | learn/utils/data.py | omry/dynamicslearn | fdc19728da95ba9566722b28da40f32f5c4d250e | [
"MIT"
] | null | null | null | learn/utils/data.py | omry/dynamicslearn | fdc19728da95ba9566722b28da40f32f5c4d250e | [
"MIT"
] | null | null | null | # file for data utilities
import numpy as np
from sklearn.preprocessing import StandardScaler
from datetime import datetime
from datetime import timedelta
import struct
import os
import matplotlib.pyplot as plt
import pandas as pd
import matplotlib
import seaborn as sns
import csv
from scipy.signal import butter, lfilt... | 35.553789 | 125 | 0.440656 |
b175e9e6411ec23afe75738a8599e333a9d2b848 | 6,285 | py | Python | plugins/labels/labels.py | jimtje/fake-electrum-real-malware | ed4b15a8721e142d5d867c5883df4aeab8555ffe | [
"MIT"
] | null | null | null | plugins/labels/labels.py | jimtje/fake-electrum-real-malware | ed4b15a8721e142d5d867c5883df4aeab8555ffe | [
"MIT"
] | null | null | null | plugins/labels/labels.py | jimtje/fake-electrum-real-malware | ed4b15a8721e142d5d867c5883df4aeab8555ffe | [
"MIT"
] | null | null | null | import hashlib
import requests
import threading
import json
import sys
import traceback
import base64
import electrum
from electrum.plugins import BasePlugin, hook
from electrum.i18n import _
class LabelsPlugin(BasePlugin):
def __init__(self, parent, config, name):
BasePlugin.__init__(self, parent, con... | 37.410714 | 92 | 0.582975 |
b03f4f44382517161e07a7b93f930412ac186ded | 3,618 | py | Python | chia/helpers/better_ioqueue.py | cabrust/chia | 3eaf815b261dc8a85d64fd698e0079515ec0dde9 | [
"BSD-3-Clause"
] | null | null | null | chia/helpers/better_ioqueue.py | cabrust/chia | 3eaf815b261dc8a85d64fd698e0079515ec0dde9 | [
"BSD-3-Clause"
] | 2 | 2021-10-06T13:19:09.000Z | 2021-10-20T17:32:36.000Z | chia/helpers/better_ioqueue.py | cabrust/chia | 3eaf815b261dc8a85d64fd698e0079515ec0dde9 | [
"BSD-3-Clause"
] | null | null | null | import queue
import threading
import time
from typing import Any, Callable, Generator
from chia import instrumentation
END_MARKER = "THIS_IS_THE_END"
def _fancy_job_producer(
job_queue: queue.Queue,
job_generator: Callable[..., Generator[Any, None, None]],
end_count: int,
observable: instrumentation... | 27.618321 | 95 | 0.613046 |
762db4f4e25d1e12612d4a66e02260e654aa36da | 2,911 | py | Python | student.py | FujouHisui/libraryProject | b2469c55fcf81234b8b0a2fb2f0d8c61a179faee | [
"MIT"
] | null | null | null | student.py | FujouHisui/libraryProject | b2469c55fcf81234b8b0a2fb2f0d8c61a179faee | [
"MIT"
] | null | null | null | student.py | FujouHisui/libraryProject | b2469c55fcf81234b8b0a2fb2f0d8c61a179faee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'student.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGu... | 42.808824 | 75 | 0.680179 |
b90d4167e9bffe066ad02b66fd5d0f2c71643455 | 1,915 | py | Python | configs_hsi/_base_/datasets/hsic60.py | dkswxd/nnUnet-HSI | 9053bfeece43eda2be9ef679153e600906802548 | [
"Apache-2.0"
] | 1 | 2021-11-14T05:25:00.000Z | 2021-11-14T05:25:00.000Z | configs_hsi/_base_/datasets/hsic60.py | dkswxd/nnUnet-HSI | 9053bfeece43eda2be9ef679153e600906802548 | [
"Apache-2.0"
] | null | null | null | configs_hsi/_base_/datasets/hsic60.py | dkswxd/nnUnet-HSI | 9053bfeece43eda2be9ef679153e600906802548 | [
"Apache-2.0"
] | null | null | null | # dataset settings
dataset_type = 'HSIDataset'
data_root = 'data/HSI'
img_norm_cfg = dict(
mean=[128]*3, std=[16]*3, to_rgb=False)
crop_size = (512, 512)
train_pipeline = [
dict(type='LoadENVIHyperSpectralImageFromFile',channel_select=range(60)),
dict(type='LoadAnnotations'),
dict(type='Resize', img_sca... | 33.017241 | 77 | 0.61671 |
738f4cba21784219533cc0b59b445e704925cd60 | 17,758 | py | Python | non_semantic_speech_benchmark/distillation/compression_lib/compression_op.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-19T04:26:12.000Z | 2022-03-19T04:26:12.000Z | non_semantic_speech_benchmark/distillation/compression_lib/compression_op.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | non_semantic_speech_benchmark/distillation/compression_lib/compression_op.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 33.760456 | 80 | 0.701656 |
19515944f69ff24fbfb6f24bc397ce06638cbe28 | 6,450 | py | Python | src/utils.py | StoneYeY/Beat-Detection | 969619fe04b3e96428e560d604406a3d0cdfcc74 | [
"MIT"
] | null | null | null | src/utils.py | StoneYeY/Beat-Detection | 969619fe04b3e96428e560d604406a3d0cdfcc74 | [
"MIT"
] | null | null | null | src/utils.py | StoneYeY/Beat-Detection | 969619fe04b3e96428e560d604406a3d0cdfcc74 | [
"MIT"
] | null | null | null | import os
import librosa
import numpy as np
import yaml
import sys
def AdjustLearningRate(optimizer, lr):
for param_group in optimizer.param_groups:
print('param_group',param_group['lr'])
param_group['lr'] = lr
# import config
with open('config.yaml', 'r') as f:
config = yaml.load(f, Loader=ya... | 30.424528 | 92 | 0.590388 |
fe052ca8da5dd81a0aba42d1ce6c0d894ab06126 | 2,037 | py | Python | examples/colorful.py | muyr/dayu_widgets_tag | 2150eac1a87eda55e759f9451878320a38869b6a | [
"MIT"
] | 10 | 2019-08-27T01:28:30.000Z | 2022-03-21T07:10:06.000Z | examples/colorful.py | muyr/dayu_widgets_tag | 2150eac1a87eda55e759f9451878320a38869b6a | [
"MIT"
] | null | null | null | examples/colorful.py | muyr/dayu_widgets_tag | 2150eac1a87eda55e759f9451878320a38869b6a | [
"MIT"
] | 4 | 2020-03-25T04:07:53.000Z | 2022-02-16T14:18:01.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################################################
# Author: Mu yanru
# Date : 2019.8
# Email : muyanru345@163.com
###################################################################
# Import third-party modules
from dayu_widgets import MFlowLayout
from d... | 31.828125 | 77 | 0.557192 |
8c40696193028c7ef055d85cb6db119c2052a8cb | 1,982 | py | Python | backend/backend/core/management/commands/sync_countries.py | vreaxe/travel-expense-manager | b9245ab04f6e2df2ffcb505db9902158c2779f63 | [
"MIT"
] | 22 | 2019-08-19T14:36:54.000Z | 2022-03-19T16:21:35.000Z | backend/backend/core/management/commands/sync_countries.py | abdulwahed-dev/travel-expense-manager | b9245ab04f6e2df2ffcb505db9902158c2779f63 | [
"MIT"
] | 123 | 2019-10-02T06:04:17.000Z | 2021-06-10T18:51:06.000Z | backend/backend/core/management/commands/sync_countries.py | abdulwahed-dev/travel-expense-manager | b9245ab04f6e2df2ffcb505db9902158c2779f63 | [
"MIT"
] | 5 | 2020-05-17T15:48:58.000Z | 2022-03-19T16:21:37.000Z | import os
import json
import logging
from django.core.management.base import BaseCommand
from backend.core.models import Currency, Country
class Command(BaseCommand):
help = 'Create or update countries from JSON file'
log = logging.getLogger(__name__)
def add_arguments(self, parser):
parser.add... | 42.170213 | 117 | 0.558022 |
392e384a5fd07f0834966a9d18f585ba9b9b16b4 | 5,927 | py | Python | zhihu_user/zhihu_user/settings.py | Ry1ynn/Zhihu_user | 2552a91e4dc219ba3eab04e60ee9ea477ef27644 | [
"Apache-2.0"
] | null | null | null | zhihu_user/zhihu_user/settings.py | Ry1ynn/Zhihu_user | 2552a91e4dc219ba3eab04e60ee9ea477ef27644 | [
"Apache-2.0"
] | null | null | null | zhihu_user/zhihu_user/settings.py | Ry1ynn/Zhihu_user | 2552a91e4dc219ba3eab04e60ee9ea477ef27644 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for zhihu_user project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/lat... | 43.580882 | 195 | 0.730386 |
824559f16f34aa0ee165bce06fd9bf7a0fa99749 | 73 | py | Python | src/base/__init__.py | Gloryness/tassomai-automation | 2deef60f6b1a7640afe8c78937f1fd0088e6051c | [
"MIT"
] | 34 | 2020-09-20T12:02:00.000Z | 2022-03-22T01:46:28.000Z | src/base/__init__.py | Gloryness/tassomai-automation | 2deef60f6b1a7640afe8c78937f1fd0088e6051c | [
"MIT"
] | 65 | 2020-11-11T17:04:15.000Z | 2022-03-25T15:41:15.000Z | src/base/__init__.py | Gloryness/tassomai-automation | 2deef60f6b1a7640afe8c78937f1fd0088e6051c | [
"MIT"
] | 13 | 2020-11-08T11:26:53.000Z | 2022-03-22T01:46:29.000Z |
__title__ = 'base'
__author__ = 'Gloryness'
__license__ = 'MIT License'
| 14.6 | 27 | 0.726027 |
f78ab4e6628d8595c2b71c03c5cd100ccfb05f4c | 3,600 | py | Python | setup.py | PLPeeters/reppy | 7a1aceb273c25b47908a6f81cdd894da72798b45 | [
"MIT"
] | null | null | null | setup.py | PLPeeters/reppy | 7a1aceb273c25b47908a6f81cdd894da72798b45 | [
"MIT"
] | null | null | null | setup.py | PLPeeters/reppy | 7a1aceb273c25b47908a6f81cdd894da72798b45 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2011-2017 SEOmoz, Inc.
#
# 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, mo... | 33.333333 | 77 | 0.671389 |
e7a6db58bd989250d67d9b6d1bd522f8427ded91 | 63 | py | Python | Chapter 9 - File IO/03_write.py | alex-dsouza777/Python-Basics | 8f1c406f2319cd65b5d54dfea990d09fa69d9adf | [
"MIT"
] | null | null | null | Chapter 9 - File IO/03_write.py | alex-dsouza777/Python-Basics | 8f1c406f2319cd65b5d54dfea990d09fa69d9adf | [
"MIT"
] | null | null | null | Chapter 9 - File IO/03_write.py | alex-dsouza777/Python-Basics | 8f1c406f2319cd65b5d54dfea990d09fa69d9adf | [
"MIT"
] | 1 | 2021-04-21T10:23:08.000Z | 2021-04-21T10:23:08.000Z | f = open('another.txt', 'w')
f.write("I am writing")
f.close() | 21 | 28 | 0.603175 |
bd625f33769cfa0e668b63064f8c670976a9f138 | 2,906 | py | Python | utils/data.py | VChristlein/textsegment | 301b5dc3df18e007f88c7fbcae8fce19a7ee2551 | [
"MIT"
] | null | null | null | utils/data.py | VChristlein/textsegment | 301b5dc3df18e007f88c7fbcae8fce19a7ee2551 | [
"MIT"
] | null | null | null | utils/data.py | VChristlein/textsegment | 301b5dc3df18e007f88c7fbcae8fce19a7ee2551 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import os
import io
from six.moves import urllib
from PIL import Image
import tensorflow as tf
def maybe_download(url, data_dir, force=False):
if not os.path.exists(data_dir):
os.makedev(da... | 29.06 | 75 | 0.675499 |
9ec2f69d2d79d375a44db7e30a288219edd2d782 | 20,550 | py | Python | flux_combined_high_binding/model_350.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_combined_high_binding/model_350.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_combined_high_binding/model_350.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', '... | 95.138889 | 798 | 0.804136 |
0b75124fa2e122d31c9261356fbb5819b8ab08c6 | 1,938 | py | Python | tests/test_putty.py | damani42/plumbum | 55a5058ccc20745bae77db7b29ec7f1c1f9daef5 | [
"MIT"
] | null | null | null | tests/test_putty.py | damani42/plumbum | 55a5058ccc20745bae77db7b29ec7f1c1f9daef5 | [
"MIT"
] | null | null | null | tests/test_putty.py | damani42/plumbum | 55a5058ccc20745bae77db7b29ec7f1c1f9daef5 | [
"MIT"
] | null | null | null | """Test that PuttyMachine initializes its SshMachine correctly"""
import pytest
from plumbum import PuttyMachine, SshMachine
@pytest.fixture(params=["default", "322"])
def ssh_port(request):
return request.param
class TestPuttyMachine:
def test_putty_command(self, mocker, ssh_port):
local = mocker... | 28.5 | 70 | 0.588235 |
6336e29e89fa95d27717dbed4d0beaa8bd6cd25c | 2,004 | py | Python | stubs/micropython-v1_16-esp8266/lwip.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_16-esp8266/lwip.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_16-esp8266/lwip.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | """
Module: 'lwip' on micropython-v1.16-esp8266
"""
# MCU: {'ver': 'v1.16', 'port': 'esp8266', 'arch': 'xtensa', 'sysname': 'esp8266', 'release': '1.16', 'name': 'micropython', 'mpy': 9733, 'version': '1.16', 'machine': 'ESP module with ESP8266', 'build': '', 'nodename': 'esp8266', 'platform': 'esp8266', 'family': 'mic... | 21.094737 | 278 | 0.507485 |
aec1a5f1a5a9bdbc46b2614a52899ec13d688698 | 11,848 | py | Python | Shared_Reward/SharedReward_practice.py | Ezgiecem/istart | 0f7855a00ea87231e71cec81cd0c80eb93532366 | [
"MIT"
] | null | null | null | Shared_Reward/SharedReward_practice.py | Ezgiecem/istart | 0f7855a00ea87231e71cec81cd0c80eb93532366 | [
"MIT"
] | null | null | null | Shared_Reward/SharedReward_practice.py | Ezgiecem/istart | 0f7855a00ea87231e71cec81cd0c80eb93532366 | [
"MIT"
] | null | null | null | ###SRNDNA
###shared reward, block design
from psychopy import visual, core, event, gui, data, sound, logging
import csv
import datetime
import random
import numpy
import os
#maindir = os.getcwd()
#parameters
useFullScreen = True
useDualScreen=1
DEBUG = False
frame_rate=1
instruct_dur=3
initial_fixation_dur = 4
#fi... | 34.744868 | 498 | 0.619261 |
58e9449150e4e1b2fe629aa8634099bc6929072f | 630 | py | Python | service_1/application/__init__.py | Jortuk/SFIA-2 | 0742333bc45ac62b28ac098e23dc66ba8c03b604 | [
"MIT"
] | 1 | 2020-06-22T00:57:22.000Z | 2020-06-22T00:57:22.000Z | service_1/application/__init__.py | Jortuk/SFIA-2 | 0742333bc45ac62b28ac098e23dc66ba8c03b604 | [
"MIT"
] | 3 | 2020-06-07T15:24:40.000Z | 2020-06-12T09:45:15.000Z | service_1/application/__init__.py | Jortuk/SFIA-2 | 0742333bc45ac62b28ac098e23dc66ba8c03b604 | [
"MIT"
] | null | null | null | from flask import Flask, request, render_template
import requests
from flask_sqlalchemy import SQLAlchemy
from os import getenv
import random
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI']=getenv('SFIA2_DB_URI')
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['SECRET_KEY'] = getenv('SECRET... | 31.5 | 90 | 0.747619 |
6a25997c0904a5b951d54edfed3c6a4d26ddf9c5 | 18,729 | py | Python | tempest/clients.py | davidboybob/tempest | ad8f599b32e875c438bd49b8d81bfcd9d4eb8ead | [
"Apache-2.0"
] | null | null | null | tempest/clients.py | davidboybob/tempest | ad8f599b32e875c438bd49b8d81bfcd9d4eb8ead | [
"Apache-2.0"
] | null | null | null | tempest/clients.py | davidboybob/tempest | ad8f599b32e875c438bd49b8d81bfcd9d4eb8ead | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# 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 requ... | 51.880886 | 79 | 0.700198 |
e0dd49b8138bca6afeeef863c406b87d907df401 | 1,096 | py | Python | backend/users/views.py | crowdbotics-apps/aeonboard2-33515 | 4f28b0de12a4181463423d1d75106b6ed2741a69 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/users/views.py | crowdbotics-apps/aeonboard2-33515 | 4f28b0de12a4181463423d1d75106b6ed2741a69 | [
"FTL",
"AML",
"RSA-MD"
] | 15 | 2021-08-30T03:24:39.000Z | 2022-03-13T17:39:16.000Z | backend/users/views.py | crowdbotics-apps/aeonboard2-33515 | 4f28b0de12a4181463423d1d75106b6ed2741a69 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from .models import User
from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import LoginRequiredMixin
from django.urls import reverse
from django.views.generic import (
UpdateView,
CreateView,
ListView,
DetailView,
RedirectView,
)
User = get_user_model()
class UserDeta... | 21.92 | 87 | 0.740876 |
ac64d25a051df96ea62e6c654ef01a70b665a34f | 2,727 | py | Python | src/dms-preview/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_sql_db_sync_task_properties_py3.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | 1 | 2019-05-10T19:58:09.000Z | 2019-05-10T19:58:09.000Z | src/dms-preview/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_sql_db_sync_task_properties_py3.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | 1 | 2018-11-29T14:46:42.000Z | 2018-11-29T14:46:42.000Z | src/dms-preview/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_sql_db_sync_task_properties_py3.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 41.953846 | 82 | 0.646131 |
6d224c25c65b8a2267ba191450a9328d85a7a5d8 | 3,293 | py | Python | cfgov/v1/tests/jinja2tags/test_datetimes.py | higs4281/cfgov-refresh | a02b193fb2373d443265c21845adf8a196e05675 | [
"CC0-1.0"
] | null | null | null | cfgov/v1/tests/jinja2tags/test_datetimes.py | higs4281/cfgov-refresh | a02b193fb2373d443265c21845adf8a196e05675 | [
"CC0-1.0"
] | 8 | 2021-03-11T00:55:51.000Z | 2022-02-13T21:10:14.000Z | cfgov/v1/tests/jinja2tags/test_datetimes.py | higs4281/cfgov-refresh | a02b193fb2373d443265c21845adf8a196e05675 | [
"CC0-1.0"
] | null | null | null | from datetime import date, datetime
from unittest import TestCase
from django.template import engines
from pytz import timezone
class DatetimesExtensionTests(TestCase):
def setUp(self):
self.engine = engines['wagtail-env']
def test_date_filter(self):
tmpl = self.engine.from_string('{{ d | d... | 31.066038 | 72 | 0.502885 |
a7379928435f2577046f3c8e72bd18ff7d30a331 | 540 | py | Python | dice.py | hhimmmmii/Python-for-Beginners | 82d1fecb5174d2d36dc8b547de13af8ed8a6ef70 | [
"MIT"
] | 6 | 2020-10-02T13:18:33.000Z | 2020-11-07T20:42:39.000Z | dice.py | virendrasingal/Python-for-Beginners | a8dc40c169fab921f55c1b5aa818a59a316caf34 | [
"MIT"
] | 5 | 2020-10-03T10:01:44.000Z | 2020-10-30T16:56:35.000Z | dice.py | virendrasingal/Python-for-Beginners | a8dc40c169fab921f55c1b5aa818a59a316caf34 | [
"MIT"
] | 42 | 2020-09-30T18:47:49.000Z | 2021-10-01T04:10:31.000Z | # Random module is imported here to generate random numbers.
import random as rm
condition = True
while condition:
rand_num = rm.randrange(1,7)
print("Dice's output",rand_num)
user_choice = input("Hey,do you want to roll the dice again.(Y/N):")
if user_choice == 'N' or user_choice == 'n':
... | 24.545455 | 72 | 0.62037 |
921ec576dac11461f7ae3d16bc1389c3538ecba8 | 3,954 | py | Python | src/oci/core/models/topology_associated_with_entity_relationship.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/core/models/topology_associated_with_entity_relationship.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/core/models/topology_associated_with_entity_relationship.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 42.06383 | 245 | 0.709155 |
0c92b80dc5e3cc6ab2c28689ddaf15a5d37d11c2 | 1,568 | py | Python | tests/kb_gen/test_kb_gen_core.py | KarrLab/rand_wc_model_gen | 4b48a3acea96fca01e3930ab024e8352166a12a5 | [
"MIT"
] | 1 | 2021-07-05T17:47:54.000Z | 2021-07-05T17:47:54.000Z | tests/kb_gen/test_kb_gen_core.py | KarrLab/rand_wc_model_gen | 4b48a3acea96fca01e3930ab024e8352166a12a5 | [
"MIT"
] | 4 | 2018-08-09T15:08:25.000Z | 2020-04-29T22:01:55.000Z | tests/kb_gen/test_kb_gen_core.py | KarrLab/rand_wc_model_gen | 4b48a3acea96fca01e3930ab024e8352166a12a5 | [
"MIT"
] | null | null | null | """ Tests of knowledge base generation
:Author: Jonathan Karr <karr@mssm.edu>
:Date: 2018-06-11
:Copyright: 2018, Karr Lab
:License: MIT
"""
from rand_wc_model_gen import kb_gen
import obj_tables
import os
import shutil
import tempfile
import unittest
import wc_kb
import wc_utils.util.string
@unittest.skip("broken_l... | 28 | 94 | 0.600765 |
20aadb00c3b8c9aa33d4a57db9cc51ef0eb62f5c | 10,110 | py | Python | airflow/contrib/operators/spark_jdbc_operator.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 2 | 2021-07-30T17:37:15.000Z | 2021-08-03T13:50:56.000Z | airflow/contrib/operators/spark_jdbc_operator.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 20 | 2017-04-18T19:47:46.000Z | 2020-01-13T04:19:24.000Z | airflow/contrib/operators/spark_jdbc_operator.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 2 | 2018-09-15T07:13:01.000Z | 2021-03-26T07:27:38.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 47.023256 | 89 | 0.644214 |
5b89fe845c2e25def6fb57ed80710fac0129e088 | 16,891 | py | Python | django/contrib/auth/models.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | 1 | 2019-02-10T19:33:27.000Z | 2019-02-10T19:33:27.000Z | django/contrib/auth/models.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | null | null | null | django/contrib/auth/models.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | 1 | 2020-10-01T08:23:34.000Z | 2020-10-01T08:23:34.000Z | from __future__ import unicode_literals
from django.core.mail import send_mail
from django.core import validators
from django.db import models
from django.db.models.manager import EmptyManager
from django.utils.crypto import get_random_string
from django.utils import six
from django.utils.translation import ugettext_l... | 34.826804 | 107 | 0.659345 |
66c1908c68ba372bc8bf92fc345bb359bdbc5ac8 | 1,914 | py | Python | src/gui.py | IAmNotIsaac/random-name-generator | 0413edc63cabb293ef2e2fe9b1d60a83b0862a8e | [
"MIT"
] | 1 | 2021-07-30T21:50:12.000Z | 2021-07-30T21:50:12.000Z | src/gui.py | IAmNotIsaac/random-name-generator | 0413edc63cabb293ef2e2fe9b1d60a83b0862a8e | [
"MIT"
] | null | null | null | src/gui.py | IAmNotIsaac/random-name-generator | 0413edc63cabb293ef2e2fe9b1d60a83b0862a8e | [
"MIT"
] | null | null | null | import tkinter as tk
import generator as gen
from tkinter import ttk
class App(tk.Frame):
def __init__(self, master=None):
super().__init__(master)
self.pack()
self.create_widgets()
def create_widgets(self):
self.name_list = tk.Listbox(self, yscrollcommand=set(), width=30)
self.syl_name_list = tk.Listb... | 25.864865 | 80 | 0.712644 |
31f15148aec115f0a356aee16140837a914d6fc6 | 56 | py | Python | src/importer/excel/__init__.py | HenrikPilz/BMEcatConverter | 28c6840fc70a3f04e3eae5fc7be32c7bc779c1da | [
"BSD-3-Clause"
] | 1 | 2021-03-14T08:20:51.000Z | 2021-03-14T08:20:51.000Z | src/importer/excel/__init__.py | HenrikPilz/BMEcatConverter | 28c6840fc70a3f04e3eae5fc7be32c7bc779c1da | [
"BSD-3-Clause"
] | 1 | 2021-11-29T09:56:18.000Z | 2021-12-01T22:01:13.000Z | src/importer/excel/__init__.py | HenrikPilz/BMEcatConverter | 28c6840fc70a3f04e3eae5fc7be32c7bc779c1da | [
"BSD-3-Clause"
] | 2 | 2021-08-30T08:14:34.000Z | 2021-09-28T15:10:23.000Z | from importer.excel.excelImporter import ExcelImporter
| 28 | 55 | 0.875 |
3bac90a692839a753d261064d60a326e24ddea67 | 548 | py | Python | src/mysite/urls.py | Rezwanul-Haque/NotIMDB-Project | 8ddbf513b0a5b6808ecb027b1a626d175ecf7ca4 | [
"MIT"
] | null | null | null | src/mysite/urls.py | Rezwanul-Haque/NotIMDB-Project | 8ddbf513b0a5b6808ecb027b1a626d175ecf7ca4 | [
"MIT"
] | null | null | null | src/mysite/urls.py | Rezwanul-Haque/NotIMDB-Project | 8ddbf513b0a5b6808ecb027b1a626d175ecf7ca4 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('', include('pages.urls')),
path('accounts/', include('accounts.urls')),
path('movies/', include('movies.urls', namespace='movies')),
... | 28.842105 | 65 | 0.702555 |
ffb3944cd51f233234e91e1508fe56383e0f2779 | 2,327 | py | Python | agentclpr/infer/system.py | AgentMaker/AgentCLPR | 3dfa6a2390176493965f432be38990fee9f4a931 | [
"Apache-2.0"
] | 14 | 2021-09-30T01:53:11.000Z | 2022-02-28T01:27:41.000Z | agentclpr/infer/system.py | AgentMaker/AgentCLPR | 3dfa6a2390176493965f432be38990fee9f4a931 | [
"Apache-2.0"
] | null | null | null | agentclpr/infer/system.py | AgentMaker/AgentCLPR | 3dfa6a2390176493965f432be38990fee9f4a931 | [
"Apache-2.0"
] | 2 | 2021-11-17T04:00:39.000Z | 2022-01-24T16:11:15.000Z | import cv2
import json
import numpy as np
from agentocr import OCRSystem
from .detector import CLPDetector
from .utility import clp_det_model, det_model, cls_model, rec_model, rec_char_dict_path, base64_to_cv2
class CLPSystem:
def __init__(
self,
clp_det_model=clp_det_model,
... | 36.359375 | 102 | 0.544478 |
e6dbfe629772b3d98810dbbe3e1be5887795c0ac | 722 | py | Python | core/queue_test.py | 54070356/python-tutorial | e2434d7cbbbe8a9431b4adbd4049dbe7539e7fc4 | [
"Apache-2.0"
] | null | null | null | core/queue_test.py | 54070356/python-tutorial | e2434d7cbbbe8a9431b4adbd4049dbe7539e7fc4 | [
"Apache-2.0"
] | null | null | null | core/queue_test.py | 54070356/python-tutorial | e2434d7cbbbe8a9431b4adbd4049dbe7539e7fc4 | [
"Apache-2.0"
] | null | null | null | import logging
import unittest
from queue import Queue
class MyTestCase(unittest.TestCase):
def test_something(self):
#logging.basicConfig(level=logging.INFO)
queue = Queue(maxsize=2)
try:
queue.put('a', False)
queue.put('b', False)
queue.put('c', False)... | 24.896552 | 56 | 0.591413 |
6b815f1b7b7709017df090ba9660f0ae2d1b0762 | 11,670 | py | Python | cs231n/classifiers/neural_net.py | IbrahimEl-Shal/Mobile_Signature | 1e76c187f67ad43139d93e352c4375d1e840f788 | [
"MIT"
] | null | null | null | cs231n/classifiers/neural_net.py | IbrahimEl-Shal/Mobile_Signature | 1e76c187f67ad43139d93e352c4375d1e840f788 | [
"MIT"
] | 6 | 2020-11-18T22:08:27.000Z | 2022-03-11T23:59:00.000Z | cs231n/classifiers/neural_net.py | IbrahimEl-Shal/CS231N-CNN-2017 | 1e76c187f67ad43139d93e352c4375d1e840f788 | [
"MIT"
] | null | null | null | from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
from past.builtins import xrange
#X = np.array([[ 16.24345364, -6.11756414, -5.28171752, -10.72968622],
# [ 8.65407629, -23.01538697, 17.44811764, -7.61206901],
# [ 3.19039096, -2.49370375, 14.62107937, ... | 44.884615 | 91 | 0.516795 |
69a6496c43d048ae000dea0f6a211514fe834e72 | 20,356 | py | Python | python/ccxt/async_support/coinone.py | gabvladov/ccxt | c26ba54afe1617d7314bf6714427a4db6d0c6381 | [
"MIT"
] | 3 | 2019-07-19T04:50:54.000Z | 2020-04-06T08:44:10.000Z | python/ccxt/async_support/coinone.py | gabvladov/ccxt | c26ba54afe1617d7314bf6714427a4db6d0c6381 | [
"MIT"
] | null | null | null | python/ccxt/async_support/coinone.py | gabvladov/ccxt | c26ba54afe1617d7314bf6714427a4db6d0c6381 | [
"MIT"
] | 4 | 2020-04-11T00:07:10.000Z | 2021-06-30T02:13:52.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import base64
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.bas... | 43.310638 | 369 | 0.497593 |
7674a8e129906482207a61a78a981b308889f113 | 22,455 | py | Python | cloudcix_rest/controllers.py | CloudCIX/framework | 321b4b953a2b2083c069fff133e538ea1ecca4a7 | [
"Apache-2.0"
] | null | null | null | cloudcix_rest/controllers.py | CloudCIX/framework | 321b4b953a2b2083c069fff133e538ea1ecca4a7 | [
"Apache-2.0"
] | null | null | null | cloudcix_rest/controllers.py | CloudCIX/framework | 321b4b953a2b2083c069fff133e538ea1ecca4a7 | [
"Apache-2.0"
] | null | null | null | # stdlib
import re
from collections import deque
from typing import Any, Callable, cast, Deque, Dict, List, Optional, Tuple, Type
# libs
from django.conf import settings
from django.db.models import Model
from django.db.models.fields import Field
from jaeger_client import Span
from rest_framework.request import QueryDi... | 49.789357 | 119 | 0.586684 |
7f269d00f83ec78305f4ecd4a7f44c9a21ce01f1 | 25,924 | py | Python | test/functional/wallet_basic.py | minblock/cureoptedcoin | 72909b7b1df261f840d24ecd8aa083fc9b7b7b49 | [
"MIT"
] | null | null | null | test/functional/wallet_basic.py | minblock/cureoptedcoin | 72909b7b1df261f840d24ecd8aa083fc9b7b7b49 | [
"MIT"
] | null | null | null | test/functional/wallet_basic.py | minblock/cureoptedcoin | 72909b7b1df261f840d24ecd8aa083fc9b7b7b49 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet."""
from decimal import Decimal
import time
from test_framework.test_framework import ... | 50.046332 | 193 | 0.649938 |
3244219fecc439f9293c3d1e5ab474c3bd1ec990 | 6,374 | py | Python | task2/task2_city.py | haoxiangzhx/bdcode | bd07a4879d5390da1988b577378ac29e738fd399 | [
"Apache-2.0"
] | 3 | 2019-12-11T12:46:44.000Z | 2020-01-21T06:14:54.000Z | task2/task2_city.py | haoxiangzhx/bdcode | bd07a4879d5390da1988b577378ac29e738fd399 | [
"Apache-2.0"
] | null | null | null | task2/task2_city.py | haoxiangzhx/bdcode | bd07a4879d5390da1988b577378ac29e738fd399 | [
"Apache-2.0"
] | null | null | null | import sys
import pyspark
from pyspark import SparkContext
from pyspark.sql import SparkSession,SQLContext
from pyspark.sql.types import *
from pyspark.sql import functions as F
import pickle
import pandas as pd
import csv
from functools import reduce
from string import printable
sc = SparkContext()
... | 30.941748 | 440 | 0.645591 |
11154eba06671abf3858a17abed1d365bb489ac6 | 1,906 | py | Python | tests/unit/bokeh/models/util/test_structure.py | Suicoleiro/bokeh | a212acdf091a7a4df639fa9d443be6ade0018039 | [
"BSD-3-Clause"
] | 15,193 | 2015-01-01T05:11:45.000Z | 2022-03-31T19:30:20.000Z | tests/unit/bokeh/models/util/test_structure.py | Suicoleiro/bokeh | a212acdf091a7a4df639fa9d443be6ade0018039 | [
"BSD-3-Clause"
] | 9,554 | 2015-01-01T03:16:54.000Z | 2022-03-31T22:59:39.000Z | tests/unit/bokeh/models/util/test_structure.py | Suicoleiro/bokeh | a212acdf091a7a4df639fa9d443be6ade0018039 | [
"BSD-3-Clause"
] | 4,829 | 2015-01-02T03:35:32.000Z | 2022-03-30T16:40:26.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 38.897959 | 78 | 0.246065 |
7a94edb80ab9276ce196e3fae542a5ab2008da30 | 9,266 | py | Python | tests/test_stream_roster.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 86 | 2016-07-04T13:26:02.000Z | 2022-02-19T10:26:21.000Z | tests/test_stream_roster.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 10 | 2016-09-30T18:55:41.000Z | 2020-05-01T14:22:47.000Z | tests/test_stream_roster.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 45 | 2016-09-30T18:48:41.000Z | 2022-03-18T21:39:33.000Z | # -*- encoding:utf-8 -*-
from __future__ import unicode_literals
import unittest
from slixmpp.exceptions import IqTimeout
from slixmpp.test import SlixTest
import time
import threading
class TestStreamRoster(SlixTest):
"""
Test handling roster updates.
"""
def tearDown(self):
self.stream_clo... | 29.698718 | 101 | 0.48964 |
b65b8a4affd94479a6fc332d2d687ad7a3a48fcc | 5,719 | py | Python | Geolocation/Data/Design2a/design2a_11k_test5/pilot.0000/rp_install/share/radical.pilot/examples/data_staging/io_staging_pipeline.py | radical-experiments/iceberg_escience | e5c230a23395a71a4adf554730ea3d77f923166c | [
"MIT"
] | 1 | 2019-05-24T02:19:29.000Z | 2019-05-24T02:19:29.000Z | Geolocation/Data/Design2a/design2a_11k_test5/pilot.0000/rp_install/share/radical.pilot/examples/data_staging/io_staging_pipeline.py | radical-experiments/iceberg_escience | e5c230a23395a71a4adf554730ea3d77f923166c | [
"MIT"
] | null | null | null | Geolocation/Data/Design2a/design2a_11k_test5/pilot.0000/rp_install/share/radical.pilot/examples/data_staging/io_staging_pipeline.py | radical-experiments/iceberg_escience | e5c230a23395a71a4adf554730ea3d77f923166c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__copyright__ = "Copyright 2013-2014, http://radical.rutgers.edu"
__license__ = "MIT"
import os
import sys
import radical.pilot as rp
INPUT_FILE = 'input_file.txt'
INTERMEDIATE_FILE = 'intermediate_file.txt'
OUTPUT_FILE = 'output_file.txt'
#---------------------------------------------------... | 33.25 | 87 | 0.573527 |
3c1df1cb7057f8ec46a2c3400bd7ae9e2b86f797 | 3,107 | py | Python | server/controler.py | n-vcs/solidity-fl | 04e944da48d47e4f14b1243e2585fc78f03562de | [
"MIT"
] | 3 | 2021-11-20T12:54:38.000Z | 2021-12-23T06:33:35.000Z | server/controler.py | omar-rifai/solidity-fl | 04e944da48d47e4f14b1243e2585fc78f03562de | [
"MIT"
] | null | null | null | server/controler.py | omar-rifai/solidity-fl | 04e944da48d47e4f14b1243e2585fc78f03562de | [
"MIT"
] | null | null | null | from data_processing import *
from federation import *
import numpy as np
import network as nn
import matplotlib.pyplot as plt
import data_processing as dp
n_simulations = 1
n_global_updates = 1
n_local_updates = 10
n_edges = 10
federate = 0
n_inputs_network = 8
n_outputs_network = 1
hidden_layers_sizes = [32, 16]
... | 28.245455 | 86 | 0.681043 |
7d87bbffa7df526e50e41e62d9bc4b996bd6fa1a | 5,298 | py | Python | scripts/slave/recipe_modules/auto_bisect/local_bisect.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | null | null | null | scripts/slave/recipe_modules/auto_bisect/local_bisect.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | null | null | null | scripts/slave/recipe_modules/auto_bisect/local_bisect.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | 1 | 2020-07-22T09:16:32.000Z | 2020-07-22T09:16:32.000Z | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import base64
import collections
import json
from . import bisect_exceptions
def perform_bisect(api, **flags):
# Try catch all the exceptions thrown in b... | 40.753846 | 80 | 0.713099 |
bb7da2490a1c2aae01a47d99dc6c4fc82bb1645e | 2,138 | py | Python | setup.py | htyxz8802/pyelliptic | 48531494901dad809b7b0dad0e05d5c068312916 | [
"BSD-2-Clause"
] | null | null | null | setup.py | htyxz8802/pyelliptic | 48531494901dad809b7b0dad0e05d5c068312916 | [
"BSD-2-Clause"
] | null | null | null | setup.py | htyxz8802/pyelliptic | 48531494901dad809b7b0dad0e05d5c068312916 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 Yann GUIBET <yannguibet@gmail.com>.
# 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 cod... | 38.872727 | 79 | 0.712348 |
42656a3c16f7b1122055244f9241617622e12746 | 1,193 | py | Python | test/record/parser/test_response_whois_registre_ma_ma_status_available.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | test/record/parser/test_response_whois_registre_ma_ma_status_available.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | test/record/parser/test_response_whois_registre_ma_ma_status_available.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null |
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
# spec/fixtures/responses/whois.registre.ma/ma/status_available
#
# and regenerate the tests with the following script
#
# $ scripts/generate_tests.py
#
from nose.tools import *
from dateutil.parser import... | 29.097561 | 90 | 0.702431 |
35c7cba11e52609958faff6e87456daa4a7c5db0 | 1,937 | py | Python | test/pyzombie/ZombieConfigTestCase.py | lanhel/pyzombie | dba35d98152e5d99d4231ab9124727ae47b3bf72 | [
"Apache-2.0"
] | null | null | null | test/pyzombie/ZombieConfigTestCase.py | lanhel/pyzombie | dba35d98152e5d99d4231ab9124727ae47b3bf72 | [
"Apache-2.0"
] | 1 | 2019-12-30T19:30:01.000Z | 2019-12-30T19:30:29.000Z | test/pyzombie/ZombieConfigTestCase.py | lanhel/pyzombie | dba35d98152e5d99d4231ab9124727ae47b3bf72 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#-------------------------------------------------------------------------------
"""pyzombie HTTP RESTful server."""
__author__ = ('Lance Finn Helsten',)
__version__ = '1.0.1'
__copyright__ = """Copyright 2009 Lance Finn Helsten (helsten@acm.org)"""
__license__ = """
Licens... | 42.108696 | 98 | 0.69334 |
c433181447be76f34df5a2fbdbec1126176d2867 | 2,223 | py | Python | doc/module2rst.py | Hertin/espnet | a0f2175df08b4750a9f0305c20b8c11f6e941867 | [
"Apache-2.0"
] | 5 | 2020-10-26T11:28:04.000Z | 2021-12-17T07:49:11.000Z | doc/module2rst.py | Hertin/espnet | a0f2175df08b4750a9f0305c20b8c11f6e941867 | [
"Apache-2.0"
] | 2 | 2020-10-26T15:22:48.000Z | 2021-01-15T10:17:57.000Z | doc/module2rst.py | Hertin/espnet | a0f2175df08b4750a9f0305c20b8c11f6e941867 | [
"Apache-2.0"
] | 1 | 2021-04-09T09:10:03.000Z | 2021-04-09T09:10:03.000Z | #!/usr/bin/env python3
from glob import glob
import importlib
import os
import configargparse
# parser
parser = configargparse.ArgumentParser(
description='generate RST files from <root> module recursively into <dst>/_gen',
config_file_parser_class=configargparse.YAMLConfigFileParser,
formatter_class=con... | 23.4 | 84 | 0.591993 |
5203a5db5eb855f0ae2e2a5efc5b54666b8315da | 258 | py | Python | 3.3.1/se34euca/se34euca/runtest_utility.py | eucalyptus/se34euca | af5da36754fccca84b7f260ba7605b8fdc30fa55 | [
"BSD-2-Clause"
] | 8 | 2015-01-08T21:06:08.000Z | 2019-10-26T13:17:16.000Z | 3.3.1/se34euca/se34euca/runtest_utility.py | eucalyptus/se34euca | af5da36754fccca84b7f260ba7605b8fdc30fa55 | [
"BSD-2-Clause"
] | null | null | null | 3.3.1/se34euca/se34euca/runtest_utility.py | eucalyptus/se34euca | af5da36754fccca84b7f260ba7605b8fdc30fa55 | [
"BSD-2-Clause"
] | 7 | 2016-08-31T07:02:21.000Z | 2020-07-18T00:10:36.000Z | #!/usr/bin/python
import se34euca
from se34euca.testcase.testcase_utility import testcase_utility
class Utility(se34euca.TestRunner):
testcase = "change_password"
testclass = testcase_utility
if __name__ == "__main__":
Utility().start_test()
| 19.846154 | 63 | 0.763566 |
09b7e900f9caa4a1655d06bed0ec43af8c8e7d61 | 320 | py | Python | level7.py | jhasse/tudi | 743d4d90e6d4fa939f0abee11dcdd78fd557b174 | [
"Zlib"
] | null | null | null | level7.py | jhasse/tudi | 743d4d90e6d4fa939f0abee11dcdd78fd557b174 | [
"Zlib"
] | null | null | null | level7.py | jhasse/tudi | 743d4d90e6d4fa939f0abee11dcdd78fd557b174 | [
"Zlib"
] | null | null | null | from star import Star
from levelbase import LevelBase
import jngl
class Level(LevelBase):
def __init__(self):
LevelBase.__init__(self)
self.stars = [Star(280, 190, "red"), Star(480, 190, "red"), Star(680, 190, "red")]
for x in range(170, 770, 80):
self.stars.append(Star(x, 400)) | 32 | 90 | 0.628125 |
33465fa2abcb41aac71d6e509f1d9301a780324e | 5,824 | py | Python | interfaces/python/test/compiled_model_test.py | shawncal/ELL | aa491f053692f985c79335d2f3f95de754ff1349 | [
"MIT"
] | 1 | 2020-09-18T04:38:45.000Z | 2020-09-18T04:38:45.000Z | interfaces/python/test/compiled_model_test.py | awesomemachinelearning/ELL | cb897e3aec148a1e9bd648012b5f53ab9d0dd20c | [
"MIT"
] | null | null | null | interfaces/python/test/compiled_model_test.py | awesomemachinelearning/ELL | cb897e3aec148a1e9bd648012b5f53ab9d0dd20c | [
"MIT"
] | null | null | null | import ell
import os
import time
import numpy as np
from testing import Testing
def test_bitcode(testing):
# Load the map created by proton trainer test and compile it
map = ell.model.Map("protonnTestData.ell")
compiledMap = map.Compile("host", "protonn", "predict")
compiledMap.WriteBitcode("protonnTe... | 35.512195 | 118 | 0.659341 |
4d8c2eb940d59118bbcc61578d4f22cd31c9ff7f | 20,860 | py | Python | tests/unit/states/test_boto_iot.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | null | null | null | tests/unit/states/test_boto_iot.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | null | null | null | tests/unit/states/test_boto_iot.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
import logging
import random
import string
# Import Salt libs
import salt.config
import salt.loader
import salt.states.boto_iot as boto_iot
# Import 3rd-party libs
from salt.ext.six.moves import ran... | 37.450628 | 133 | 0.648226 |
206105cbbf028e84288d06c365488fe919b1270f | 5,093 | py | Python | consul/twisted.py | ashwini-balnaves/python-consul | 4ddec9b57eb5284b58967ce1a9b2422519f88cc2 | [
"MIT"
] | 469 | 2015-01-02T18:36:39.000Z | 2022-03-10T09:18:13.000Z | consul/twisted.py | ashwini-balnaves/python-consul | 4ddec9b57eb5284b58967ce1a9b2422519f88cc2 | [
"MIT"
] | 249 | 2015-01-21T19:06:34.000Z | 2022-01-12T09:12:58.000Z | consul/twisted.py | ashwini-balnaves/python-consul | 4ddec9b57eb5284b58967ce1a9b2422519f88cc2 | [
"MIT"
] | 279 | 2015-01-17T04:25:04.000Z | 2022-03-11T22:06:46.000Z | from __future__ import absolute_import
from six import b
# noinspection PyUnresolvedReferences
from treq.client import HTTPClient as TreqHTTPClient
from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks, returnValue
from twisted.internet.error import ConnectError
from twisted.internet.... | 36.905797 | 78 | 0.647555 |
5d7a290180b2932f2e1158a167b95901ae4ae740 | 18,107 | py | Python | src/m4_sequences.py | lauterja/20-Exam3Practice | fa0723c1dc50164f94ca82ae9abc389af1e9b64e | [
"MIT"
] | null | null | null | src/m4_sequences.py | lauterja/20-Exam3Practice | fa0723c1dc50164f94ca82ae9abc389af1e9b64e | [
"MIT"
] | null | null | null | src/m4_sequences.py | lauterja/20-Exam3Practice | fa0723c1dc50164f94ca82ae9abc389af1e9b64e | [
"MIT"
] | null | null | null | """
PRACTICE Exam 3.
This problem provides practice at:
*** SEQUENCES. ***
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues,
and Jacob Lauteri.
""" # TODONE: 1. PUT YOUR NAME IN THE ABOVE LINE.
########################... | 42.207459 | 83 | 0.472414 |
ec105fd697ddcf72ec99bf8a3f9501b7688f1479 | 2,245 | py | Python | sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2020-07-31T16:33:36.000Z | 2020-07-31T16:33:36.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 36.209677 | 79 | 0.602227 |
e23c670b07647a9fc767d519a39c50e2fa148252 | 3,392 | py | Python | visibility/test/test_viz_and_range/TemplateConfigTest.py | conklinbd/solutions-geoprocessing-toolbox | 7afab793ea34b7e7cb7e32757e8a150b6637ffd2 | [
"Apache-2.0"
] | null | null | null | visibility/test/test_viz_and_range/TemplateConfigTest.py | conklinbd/solutions-geoprocessing-toolbox | 7afab793ea34b7e7cb7e32757e8a150b6637ffd2 | [
"Apache-2.0"
] | null | null | null | visibility/test/test_viz_and_range/TemplateConfigTest.py | conklinbd/solutions-geoprocessing-toolbox | 7afab793ea34b7e7cb7e32757e8a150b6637ffd2 | [
"Apache-2.0"
] | 1 | 2018-10-25T15:52:41.000Z | 2018-10-25T15:52:41.000Z | #------------------------------------------------------------------------------
# Copyright 2013 Esri
# 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/LICENS... | 34.612245 | 125 | 0.626474 |
e4a3c9221fc20e3494a230ac40fbbe084e19fb6e | 1,010 | py | Python | botc/gamemodes/sectsandviolets/TownCrier.py | BlueLenz/Blood-on-the-Clocktower-Storyteller-Discord-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2022-02-18T00:42:14.000Z | 2022-02-18T00:42:14.000Z | botc/gamemodes/sectsandviolets/TownCrier.py | BlueLenz/Blood-on-the-Clocktower-Storyteller-Discord-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2020-07-07T03:47:44.000Z | 2020-07-07T03:47:44.000Z | botc/gamemodes/sectsandviolets/TownCrier.py | BlueLenz/Blood-on-the-Clocktower-Storyteller-Discord-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2022-02-18T00:42:19.000Z | 2022-02-18T00:42:19.000Z | """Contains the Town Crier Character class"""
import json
from botc import Character, Townsfolk
from ._utils import SectsAndViolets, SnVRole
with open('botc/gamemodes/sectsandviolets/character_text.json') as json_file:
character_text = json.load(json_file)[SnVRole.towncrier.value.lower()]
class TownCrier(Townsf... | 33.666667 | 97 | 0.723762 |
e430be72ac3fa65dfc68e56da3de3bc75f2de591 | 5,003 | py | Python | twisted-client-7/get-poetry.py | TinaTong-avi/twisted-intro | 5e694d173126c30a2c28c2457d6a5a2fd2d5e5db | [
"MIT"
] | 430 | 2015-01-04T05:38:08.000Z | 2022-02-23T04:12:46.000Z | twisted-client-7/get-poetry.py | TinaTong-avi/twisted-intro | 5e694d173126c30a2c28c2457d6a5a2fd2d5e5db | [
"MIT"
] | 4 | 2016-02-15T03:53:15.000Z | 2020-06-20T20:16:28.000Z | twisted-client-7/get-poetry.py | TinaTong-avi/twisted-intro | 5e694d173126c30a2c28c2457d6a5a2fd2d5e5db | [
"MIT"
] | 284 | 2015-01-11T18:41:58.000Z | 2022-02-23T04:12:53.000Z | # This is the Twisted Get Poetry Now! client, version 7.0
import optparse, sys
from twisted.internet import defer
from twisted.internet.protocol import Protocol, ClientFactory
from twisted.protocols.basic import NetstringReceiver
def parse_args():
usage = """usage: %prog [options] [hostname]:port ...
This is t... | 25.140704 | 68 | 0.65041 |
38f147481fbfb5ad87af14ab5789ada2cf69bcd8 | 9,015 | py | Python | jack/train_reader.py | takuma-ynd/jack | f0dac5f07b0cddf6cd33b632f62c2c687047bc22 | [
"MIT"
] | 1 | 2019-12-02T02:23:17.000Z | 2019-12-02T02:23:17.000Z | jack/train_reader.py | takuma-ynd/jack | f0dac5f07b0cddf6cd33b632f62c2c687047bc22 | [
"MIT"
] | null | null | null | jack/train_reader.py | takuma-ynd/jack | f0dac5f07b0cddf6cd33b632f62c2c687047bc22 | [
"MIT"
] | 1 | 2019-03-13T18:26:48.000Z | 2019-03-13T18:26:48.000Z | # -*- coding: utf-8 -*-
import logging
import math
import os
import random
import shutil
import tensorflow as tf
from jack import readers
from jack.core.tensorflow import TFReader
from jack.eval import evaluate_reader, pretty_print_results
from jack.util.hooks import LossHook, ExamplesPerSecHook, ETAHook
logger = l... | 40.245536 | 114 | 0.694287 |
e8d91332ea85de68c786c968b1d478263164af90 | 1,825 | py | Python | libs/Node Source/DICOM_Resample.py | pd3d/Houdini-DICOM-Toolset | abc3dbfe57134ed1e98a0ad330772c2ae718a3c4 | [
"MIT"
] | 3 | 2020-04-04T18:27:42.000Z | 2020-09-17T13:08:55.000Z | libs/Node Source/DICOM_Resample.py | pd3d/Houdini-DICOM-Toolset | abc3dbfe57134ed1e98a0ad330772c2ae718a3c4 | [
"MIT"
] | 1 | 2021-04-23T15:22:33.000Z | 2021-10-20T00:55:58.000Z | libs/Node Source/DICOM_Resample.py | pd3d/Houdini-DICOM-Toolset | abc3dbfe57134ed1e98a0ad330772c2ae718a3c4 | [
"MIT"
] | 1 | 2019-08-22T03:13:28.000Z | 2019-08-22T03:13:28.000Z | import hou
import math
import numpy as np
node = hou.pwd()
geo = node.geometry()
# Program key parameters
newSpacing = [1, 1, 1] # TODO: make this into a parameter call
sliceThickness = geo.floatAttribValue('SliceThickness')
pixelSpacing = geo.floatListAttribValue('PixelSpacing')
# Get source volume and its reesolut... | 32.589286 | 131 | 0.702466 |
d8ea3eb7303e351d61bb748937f7fcc71b89b679 | 554 | py | Python | setup.py | shelion/civomega-mod-rating | 94cd17c99c79526231f6a1aeedae38e4378a6c21 | [
"MIT"
] | null | null | null | setup.py | shelion/civomega-mod-rating | 94cd17c99c79526231f6a1aeedae38e4378a6c21 | [
"MIT"
] | null | null | null | setup.py | shelion/civomega-mod-rating | 94cd17c99c79526231f6a1aeedae38e4378a6c21 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(name='civomega-mod-rating',
version='2.0-alpha.3', # http://semver.org/
description="",
long_description="",
classifiers=[],
keywords='',
author='',
author_email='',
url='',
license='MIT',
packages=find_packag... | 24.086957 | 72 | 0.545126 |
33b77607f9515e9a49cfb9ad6ef769444a621ffa | 1,002 | py | Python | tests/extras.py | edyan/python-anyconfig | d237909a6e4848737539b80951b710238c72052f | [
"MIT"
] | null | null | null | tests/extras.py | edyan/python-anyconfig | d237909a6e4848737539b80951b710238c72052f | [
"MIT"
] | null | null | null | tests/extras.py | edyan/python-anyconfig | d237909a6e4848737539b80951b710238c72052f | [
"MIT"
] | null | null | null | #
# Copyright (C) 2016 Satoru SATOH <ssato @ redhat.com>
# License: MIT
#
# pylint: disable=missing-docstring
from __future__ import absolute_import
import unittest
import sys
class TestImportErrors(unittest.TestCase):
def test_10_ac_compat(self):
fun = "NullHandler"
sys.modules["logging"] = Non... | 25.692308 | 68 | 0.652695 |
038b54a8f6d233704bb69d6a03c6a8b5054cba0f | 539 | py | Python | apps/Aeon_Avatar/migrations/0003_auto_20191101_1900.py | kprsajuuk/Aeon-Citadel | c6ceae23bc3902de19aa8b7689e88bae81082e88 | [
"MIT"
] | null | null | null | apps/Aeon_Avatar/migrations/0003_auto_20191101_1900.py | kprsajuuk/Aeon-Citadel | c6ceae23bc3902de19aa8b7689e88bae81082e88 | [
"MIT"
] | 4 | 2020-02-11T22:27:00.000Z | 2021-04-08T19:04:22.000Z | apps/Aeon_Avatar/migrations/0003_auto_20191101_1900.py | kprsajuuk/Aeon-Citadel | c6ceae23bc3902de19aa8b7689e88bae81082e88 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2019-11-01 11:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Aeon_Avatar', '0002_auto_20191018_1456'),
]
operations = [
migrations.RemoveField(
model_name='avatar',
name='id',
... | 23.434783 | 99 | 0.588126 |
984733a27b255f609d3644c1ade3721ba88b285f | 22,556 | py | Python | lib/taurus/qt/qtgui/plot/arrayedit.py | mrosanes/taurus_deb | 119bf27193af0bbaaececf054eefb78beb6f117a | [
"CC-BY-3.0"
] | 1 | 2016-10-19T13:54:08.000Z | 2016-10-19T13:54:08.000Z | lib/taurus/qt/qtgui/plot/arrayedit.py | mrosanes/taurus_deb | 119bf27193af0bbaaececf054eefb78beb6f117a | [
"CC-BY-3.0"
] | 27 | 2016-05-25T08:56:58.000Z | 2019-01-21T09:18:08.000Z | lib/taurus/qt/qtgui/plot/arrayedit.py | mrosanes/taurus_deb | 119bf27193af0bbaaececf054eefb78beb6f117a | [
"CC-BY-3.0"
] | 8 | 2015-07-24T09:16:50.000Z | 2018-06-12T12:33:59.000Z | #!/usr/bin/env python
#############################################################################
##
# This file is part of Taurus
##
# http://taurus-scada.org
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Taurus is free software: you can redistribute it and/or modify
# it under the terms of t... | 40.788427 | 143 | 0.622717 |
1994c8bdb491edb602aa0043a30909c9522ee582 | 1,353 | py | Python | Github/utils.py | h7ml/Workflows-Cleaner | d174014cae4f36ff50fd893e5b7beed68dcdd4d3 | [
"MIT"
] | 5 | 2021-07-05T06:53:57.000Z | 2021-11-13T20:58:33.000Z | Github/utils.py | h7ml/Workflows-Cleaner | d174014cae4f36ff50fd893e5b7beed68dcdd4d3 | [
"MIT"
] | 1 | 2022-01-05T21:16:42.000Z | 2022-01-05T21:16:42.000Z | Github/utils.py | h7ml/Workflows-Cleaner | d174014cae4f36ff50fd893e5b7beed68dcdd4d3 | [
"MIT"
] | 1 | 2021-12-10T05:53:33.000Z | 2021-12-10T05:53:33.000Z | import datetime
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
def getUrl(url: str, headers=None, retry=5, timeout=10):
retry_strategy = Retry(total=retry, backoff_factor=0.1)
adapter = HTTPAdapter(max_retries=retry_strategy)
http = reque... | 24.160714 | 65 | 0.676275 |
6b3313fa50e3ea588d72d8a1e1a79305d0907813 | 7,759 | py | Python | cartridge/shop/managers.py | jerivas/cartridge | 29fb54cbcae8d3e838253e5384c79d353e47d3ae | [
"BSD-2-Clause"
] | null | null | null | cartridge/shop/managers.py | jerivas/cartridge | 29fb54cbcae8d3e838253e5384c79d353e47d3ae | [
"BSD-2-Clause"
] | null | null | null | cartridge/shop/managers.py | jerivas/cartridge | 29fb54cbcae8d3e838253e5384c79d353e47d3ae | [
"BSD-2-Clause"
] | null | null | null | from __future__ import unicode_literals
from future.builtins import str
from future.builtins import zip
from collections import defaultdict
from datetime import datetime, timedelta
from django.db.models import Manager, Q
from django.utils.datastructures import SortedDict
from django.utils.timezone import now
from me... | 33.017021 | 79 | 0.595695 |
7d85f0f6b0837036c51f01c35cebc08fc0bd3745 | 3,196 | py | Python | server/app.py | iulian-rusu/rpi-image-processing | e075d1c91a0cdb6788c1dcfeac21a85ce2dbe6b1 | [
"MIT"
] | null | null | null | server/app.py | iulian-rusu/rpi-image-processing | e075d1c91a0cdb6788c1dcfeac21a85ce2dbe6b1 | [
"MIT"
] | null | null | null | server/app.py | iulian-rusu/rpi-image-processing | e075d1c91a0cdb6788c1dcfeac21a85ce2dbe6b1 | [
"MIT"
] | null | null | null | import threading
import subprocess
import time
from flask import Flask, render_template, request, Response
from image_handle import ImageHandle
import socket
from protocol import Command
class CONFIG:
PORT = 6060
FPS = 60
DELAY_SECONDS = 1.0 / FPS
CAMERA_PORT = 3333
MESSAGE_LENGTH = 1024
IMAGE... | 26.196721 | 81 | 0.642053 |
335dc3d3f442d6df2e67794a3a3fca872ff4a58c | 67 | py | Python | nautilus/network/http/__init__.py | AlecAivazis/python | 70e2acef27a2f87355590be1a6ca60ce3ab4d09c | [
"MIT"
] | 9 | 2019-02-17T01:33:43.000Z | 2022-02-03T02:14:12.000Z | nautilus/network/http/__init__.py | AlecAivazis/python | 70e2acef27a2f87355590be1a6ca60ce3ab4d09c | [
"MIT"
] | 59 | 2016-03-14T15:55:50.000Z | 2016-07-17T15:22:56.000Z | nautilus/network/http/__init__.py | AlecAivazis/python | 70e2acef27a2f87355590be1a6ca60ce3ab4d09c | [
"MIT"
] | 3 | 2017-08-03T20:18:59.000Z | 2018-07-18T02:03:41.000Z | from .requestHandler import RequestHandler
from .responses import * | 33.5 | 42 | 0.850746 |
dd7b84d71dcf4da38e9ff16649d934c1b4775e96 | 7,109 | py | Python | logFermentation/blescan.py | KasperSkytte/KaspbeeryPi | b1666f8da56ab8b3512e3d026c1efb4b8787efc2 | [
"MIT"
] | null | null | null | logFermentation/blescan.py | KasperSkytte/KaspbeeryPi | b1666f8da56ab8b3512e3d026c1efb4b8787efc2 | [
"MIT"
] | null | null | null | logFermentation/blescan.py | KasperSkytte/KaspbeeryPi | b1666f8da56ab8b3512e3d026c1efb4b8787efc2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from __future__ import print_function
# BLE iBeaconScanner based on https://github.com/adamf/BLE/blob/master/ble-scanner.py
# SwitchDoc Lab December 2020
from builtins import range
DEBUG = False
# BLE scanner based on https://github.com/adamf/BLE/blob/master/ble-scanner.py
# BLE scanner, based o... | 37.415789 | 123 | 0.632719 |
042e19e4f6504a6ecadbaec35f050eeb46d22927 | 2,991 | py | Python | pipeline/builder/flow/data.py | springborland/bk-sops | a9057672c10efb5f2414a805a30ead4092429c76 | [
"Apache-2.0"
] | 1 | 2021-05-19T04:31:34.000Z | 2021-05-19T04:31:34.000Z | pipeline/builder/flow/data.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | pipeline/builder/flow/data.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 30.835052 | 115 | 0.658643 |
066843faeffd3d407e61981713ae6706c8867df9 | 7,596 | py | Python | tensorflow/contrib/learn/python/learn/monitors.py | breandan/tensorflow | 7509bad95200e1baed4eb488dbeaaa2c505a2824 | [
"Apache-2.0"
] | 4 | 2016-09-26T08:55:23.000Z | 2019-05-06T15:26:03.000Z | tensorflow/contrib/learn/python/learn/monitors.py | breandan/tensorflow | 7509bad95200e1baed4eb488dbeaaa2c505a2824 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/learn/python/learn/monitors.py | breandan/tensorflow | 7509bad95200e1baed4eb488dbeaaa2c505a2824 | [
"Apache-2.0"
] | 4 | 2017-01-17T10:19:15.000Z | 2019-05-13T02:23:07.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 30.629032 | 80 | 0.682596 |
d4e03922fd6efd1c7ff423de558d4409361a23f8 | 236 | py | Python | cornflow-dags/DAG/tsp/core/solution.py | ggsdc/corn | 4c17c46a70f95b8882bcb6a55ef7daa1f69e0456 | [
"MIT"
] | 2 | 2020-07-09T20:58:47.000Z | 2020-07-20T20:40:46.000Z | cornflow-dags/DAG/tsp/core/solution.py | baobabsoluciones/cornflow | bd7cae22107e5fe148704d5f41d4f58f9c410b40 | [
"Apache-2.0"
] | 2 | 2022-03-31T08:42:10.000Z | 2022-03-31T12:05:23.000Z | cornflow-dags/DAG/tsp/core/solution.py | ggsdc/corn | 4c17c46a70f95b8882bcb6a55ef7daa1f69e0456 | [
"MIT"
] | null | null | null | import os
from cornflow_client import SolutionCore
from cornflow_client.core.tools import load_json
class Solution(SolutionCore):
schema = load_json(
os.path.join(os.path.dirname(__file__), "../schemas/output.json")
)
| 23.6 | 73 | 0.745763 |
c3466961c4f5a8d8d2423ecaf6e2825906e4707f | 375 | py | Python | oop/classmethod/class_date.py | levs72/pyneng-examples | d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9 | [
"MIT"
] | 11 | 2021-04-05T09:30:23.000Z | 2022-03-09T13:27:56.000Z | oop/classmethod/class_date.py | levs72/pyneng-examples | d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9 | [
"MIT"
] | null | null | null | oop/classmethod/class_date.py | levs72/pyneng-examples | d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9 | [
"MIT"
] | 11 | 2021-04-06T03:44:35.000Z | 2022-03-04T21:20:40.000Z | class Date:
def __init__(self, day, month, year):
self.day = day
self.month = month
self.year = year
@classmethod
def from_str(cls, date_as_str):
day, month, year = list(map(int, date_as_str.split(":")))
return cls(day, month, year)
def __repr__(self):
r... | 26.785714 | 65 | 0.578667 |
533f732e595e9eabf5577bb50403f4e505dfbd9a | 14,907 | py | Python | chapter_3_featurization/spacy_features.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | 1 | 2020-03-05T01:19:17.000Z | 2020-03-05T01:19:17.000Z | chapter_3_featurization/spacy_features.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | chapter_3_featurization/spacy_features.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | '''
================================================
## VOICEBOOK REPOSITORY ##
================================================
repository name: voicebook
repository version: 1.0
repository link: https://github.com/jim-schwoebel/voicebook
author: Jim Schwoebel
author contact: js@neur... | 38.820313 | 121 | 0.522842 |
cd57425a6aab4fbd9891303be451a2a62ada9bb8 | 2,812 | py | Python | tests/admin/test_radius.py | scottwedge/ucsc_apis | c7d0de17cb969fb43984035be2dee630fcb1f610 | [
"Apache-2.0"
] | 1 | 2018-08-15T15:13:43.000Z | 2018-08-15T15:13:43.000Z | tests/admin/test_radius.py | scottwedge/ucsc_apis | c7d0de17cb969fb43984035be2dee630fcb1f610 | [
"Apache-2.0"
] | 8 | 2017-02-13T09:09:02.000Z | 2017-12-27T04:05:26.000Z | tests/admin/test_radius.py | scottwedge/ucsc_apis | c7d0de17cb969fb43984035be2dee630fcb1f610 | [
"Apache-2.0"
] | 3 | 2016-11-22T09:49:01.000Z | 2020-10-14T01:23:40.000Z | # Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 33.47619 | 77 | 0.739331 |
9db6a2709696137f0d36927340c9452973a6c8e7 | 616 | py | Python | backend/registry/xmlmapper/namespaces.py | Don-King-Kong/mrmap | f58a77bf979142876c38b98de0b7514c475b9905 | [
"MIT"
] | 10 | 2021-03-12T17:46:38.000Z | 2022-03-11T10:59:01.000Z | backend/registry/xmlmapper/namespaces.py | Don-King-Kong/mrmap | f58a77bf979142876c38b98de0b7514c475b9905 | [
"MIT"
] | 214 | 2021-03-10T19:24:17.000Z | 2022-03-15T07:34:24.000Z | backend/registry/xmlmapper/namespaces.py | Don-King-Kong/mrmap | f58a77bf979142876c38b98de0b7514c475b9905 | [
"MIT"
] | 9 | 2021-03-16T19:47:54.000Z | 2022-03-11T11:01:22.000Z | NS_WC = "*[local-name()='" # Namespace wildcard. Example usage: f'{NS_WC}MD_Metadata']'
GMD_NAMESPACE = "http://www.isotc211.org/2005/gmd"
GCO_NAMESPACE = "http://www.isotc211.org/2005/gco"
GMX_NAMESPACE = "http://www.isotc211.org/2005/gmx"
SRV_NAMESPACE = "http://www.isotc211.org/2005/srv"
GML_3_1_1_NAMESPACE = "htt... | 47.384615 | 88 | 0.73539 |
542e8368b88e7235f7dbdd710766f66e019e9dd5 | 5,478 | py | Python | Stacking.py | ProblemTryer/MachineLearning | e3a75d787078da2a03ca1b824a0c319e3020a4cd | [
"Apache-2.0"
] | 1 | 2021-05-11T05:05:29.000Z | 2021-05-11T05:05:29.000Z | Stacking.py | ProblemTryer/MachineLearning | e3a75d787078da2a03ca1b824a0c319e3020a4cd | [
"Apache-2.0"
] | null | null | null | Stacking.py | ProblemTryer/MachineLearning | e3a75d787078da2a03ca1b824a0c319e3020a4cd | [
"Apache-2.0"
] | null | null | null | """
@ Filename: Stacking.py
@ Author: Danc1elion
@ Create Date: 2019-05-05
@ Update Date: 2019-05-05
@ Description: Implement Stacking
"""
from sklearn.model_selection import StratifiedKFold, train_test_split
from Perceptron import *
import numpy as np
import preProcess
import pickle
import rando... | 38.041667 | 105 | 0.615553 |
1766de35b5afaa2cf72f08f7e0a4cde9a2d3718f | 125 | py | Python | src/anchorpy/utils/__init__.py | SpaceMonkeyForever/anchorpy | 9035d46316fb15936f2dcf8946c1191a1eb31d2b | [
"MIT"
] | 87 | 2021-09-26T18:14:07.000Z | 2022-03-28T08:22:24.000Z | src/anchorpy/utils/__init__.py | SpaceMonkeyForever/anchorpy | 9035d46316fb15936f2dcf8946c1191a1eb31d2b | [
"MIT"
] | 15 | 2021-10-07T16:12:23.000Z | 2022-03-20T21:04:40.000Z | src/anchorpy/utils/__init__.py | SpaceMonkeyForever/anchorpy | 9035d46316fb15936f2dcf8946c1191a1eb31d2b | [
"MIT"
] | 16 | 2021-10-16T04:40:28.000Z | 2022-03-18T16:49:40.000Z | """Various utility functions."""
from anchorpy.utils import rpc
from anchorpy.utils import token
__all__ = ["rpc", "token"]
| 20.833333 | 32 | 0.736 |
658bb6ba691a049d7b84b53483c53395b97da998 | 7,121 | py | Python | scripts/artifacts/textnow.py | Krypterry/ALEAPP | 970b2e62742603336fe791b7c02e12e1f1e77375 | [
"MIT"
] | 187 | 2020-02-22T23:35:32.000Z | 2022-03-31T13:46:24.000Z | scripts/artifacts/textnow.py | Krypterry/ALEAPP | 970b2e62742603336fe791b7c02e12e1f1e77375 | [
"MIT"
] | 65 | 2020-02-25T18:22:47.000Z | 2022-03-27T21:41:21.000Z | scripts/artifacts/textnow.py | Krypterry/ALEAPP | 970b2e62742603336fe791b7c02e12e1f1e77375 | [
"MIT"
] | 47 | 2020-02-24T22:33:35.000Z | 2022-03-11T05:19:42.000Z | import sqlite3
import datetime
from scripts.artifact_report import ArtifactHtmlReport
from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, open_sqlite_db_readonly
def get_textnow(files_found, report_folder, seeker, wrap_text):
source_file_msg = ''
for file_found in files_found:
... | 42.386905 | 211 | 0.532509 |
e824a2304b67991b0655341f5b6cf60669f496d5 | 8,694 | py | Python | src/calcium_activity/HarvardLab.py | lpbsscientist/targettrack | dbe261f84c60b5beb1de28ef88693fe56bff0ac6 | [
"MIT"
] | null | null | null | src/calcium_activity/HarvardLab.py | lpbsscientist/targettrack | dbe261f84c60b5beb1de28ef88693fe56bff0ac6 | [
"MIT"
] | null | null | null | src/calcium_activity/HarvardLab.py | lpbsscientist/targettrack | dbe261f84c60b5beb1de28ef88693fe56bff0ac6 | [
"MIT"
] | null | null | null | import numpy as np
import scipy.spatial as spat
from tqdm import tqdm
import warnings
class HarvardLab:
def __init__(self,dataset,settings):
self.settings=settings
self.frame_num = len(dataset.frames)
self.channel_num=dataset.nb_channels
self.sh= dataset.frame_shape
self.n... | 46 | 214 | 0.608351 |
8b2bfb70e5c9c3cb441ce8e908469fdddecdb178 | 5,771 | py | Python | settings/common/mod_sessions.py | krishnagkashyap/robotframework101 | 0f267610194d6575e6cb8f09ea7ed40263e70af8 | [
"MIT"
] | null | null | null | settings/common/mod_sessions.py | krishnagkashyap/robotframework101 | 0f267610194d6575e6cb8f09ea7ed40263e70af8 | [
"MIT"
] | null | null | null | settings/common/mod_sessions.py | krishnagkashyap/robotframework101 | 0f267610194d6575e6cb8f09ea7ed40263e70af8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# NAME
# build_run_robot.py
#
# DESCRIPTION
# Compile and run robot test
#
# Changelog
#
# MODIFIED (MM/DD/YY)
# Norman Wang 07/20/16 v0.1 Creation
# ... | 45.801587 | 163 | 0.68411 |
b4faa03879278d6914ae5c0ce65d129f4b9cf8a0 | 15,623 | py | Python | google_appengine/google/appengine/tools/devappserver2/static_files_handler.py | iTrollYou/WEB_Spotify_Youtube | 5315cdf78361942bba0b52daa8b65d74998d2db5 | [
"MIT"
] | 26 | 2015-01-20T08:02:38.000Z | 2020-06-10T04:57:41.000Z | google_appengine/google/appengine/tools/devappserver2/static_files_handler.py | iTrollYou/WEB_Spotify_Youtube | 5315cdf78361942bba0b52daa8b65d74998d2db5 | [
"MIT"
] | 4 | 2016-02-28T05:53:54.000Z | 2017-01-03T07:39:50.000Z | google/appengine/tools/devappserver2/static_files_handler.py | fullstorydev/goappengine | a508ebb77930bef26785baf2f3278c95e6b63ffc | [
"Apache-2.0"
] | 13 | 2016-02-28T00:14:23.000Z | 2021-05-03T15:47:36.000Z | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | 37.286396 | 80 | 0.668118 |
8feb25b8b7ba81cf40ba818e2d0d8193b7528478 | 2,937 | py | Python | lotus-crawler/yulin_crawler/yulin_crawler/dbutil.py | nicee/xshirmp | c5c2b0b2aa1fedc408b364adb2942d22a3007d3e | [
"Apache-2.0"
] | null | null | null | lotus-crawler/yulin_crawler/yulin_crawler/dbutil.py | nicee/xshirmp | c5c2b0b2aa1fedc408b364adb2942d22a3007d3e | [
"Apache-2.0"
] | null | null | null | lotus-crawler/yulin_crawler/yulin_crawler/dbutil.py | nicee/xshirmp | c5c2b0b2aa1fedc408b364adb2942d22a3007d3e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import date
from itertools import chain
import pymysql
from DBUtils import PooledDB
from dateutil.relativedelta import relativedelta
from scrapy import Item
__mysql_connection_pool = None
host = '127.0.0.1'
port = 3306
user = 'root'
password = 'ipampas'
db = 'stock'
trade_quote... | 31.244681 | 108 | 0.662921 |
7c9f29754a91179bdcbb486ae0f3bac542ef1d4a | 919 | py | Python | lstmdata/read_index.py | arcada-uas/LSTMVis | e0628caf16265feb61193251dc1c9b3e1af444ad | [
"BSD-3-Clause"
] | 1,146 | 2016-06-27T05:23:54.000Z | 2022-03-31T05:35:13.000Z | lstmdata/read_index.py | arcada-uas/LSTMVis | e0628caf16265feb61193251dc1c9b3e1af444ad | [
"BSD-3-Clause"
] | 40 | 2016-06-29T14:06:28.000Z | 2021-10-03T10:39:26.000Z | lstmdata/read_index.py | arcada-uas/LSTMVis | e0628caf16265feb61193251dc1c9b3e1af444ad | [
"BSD-3-Clause"
] | 275 | 2016-06-27T08:54:41.000Z | 2022-01-10T05:58:32.000Z | from whoosh.fields import Schema, NUMERIC, TEXT
from whoosh.highlight import HtmlFormatter
from whoosh.index import open_dir
from whoosh.qparser import QueryParser
__author__ = 'Hendrik Strobelt'
schema = Schema(index=NUMERIC(stored=True), content=TEXT(stored=True))
def query_index(_query, no_results=20, htmlFormat... | 36.76 | 87 | 0.632209 |
7befa56cf5a9f12b77eb3cb1289174004581dc26 | 697 | py | Python | registry/utils.py | sausages-of-the-future/registry | 7d0f82b9867e4ce31b181d2e861f99e519b06aef | [
"MIT"
] | null | null | null | registry/utils.py | sausages-of-the-future/registry | 7d0f82b9867e4ce31b181d2e861f99e519b06aef | [
"MIT"
] | null | null | null | registry/utils.py | sausages-of-the-future/registry | 7d0f82b9867e4ce31b181d2e861f99e519b06aef | [
"MIT"
] | null | null | null | from datetime import datetime
from flask import request
from registry.auth import AuthUser, AuthUserLog
def log_access(person_uri, path):
auth_user = AuthUser.objects.get(person_uri=person_uri)
user_log = AuthUserLog()
user_log.user = auth_user
user_log.action = 'accessed %s' % path
user_log.occur... | 31.681818 | 76 | 0.718795 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.