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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aeea4ed18f9fc992ade88cd8c98d7833688f95a4 | 9,788 | py | Python | cea/resources/radiation_daysim/radiation_main.py | pajotca/CityEnergyAnalyst | f3d0a08f7b5f5967961bf831625544a95c7702f0 | [
"MIT"
] | null | null | null | cea/resources/radiation_daysim/radiation_main.py | pajotca/CityEnergyAnalyst | f3d0a08f7b5f5967961bf831625544a95c7702f0 | [
"MIT"
] | null | null | null | cea/resources/radiation_daysim/radiation_main.py | pajotca/CityEnergyAnalyst | f3d0a08f7b5f5967961bf831625544a95c7702f0 | [
"MIT"
] | null | null | null | from __future__ import print_function
"""
Radiation engine and geometry handler for CEA
"""
from __future__ import division
import pandas as pd
import time
import math
from cea.resources.radiation_daysim import daysim_main, geometry_generator
import py4design.py3dmodel.fetch as fetch
import py4design.py2radiance as py... | 44.490909 | 119 | 0.663976 |
70c1d099051e977b23357178ea6ecbcadd1ca215 | 963 | py | Python | MyAuthTest/myauth/models.py | singleye/Grocery | d009ea4a4447c9cbb913e16a66fa9e8f3ec99ffc | [
"MIT"
] | null | null | null | MyAuthTest/myauth/models.py | singleye/Grocery | d009ea4a4447c9cbb913e16a66fa9e8f3ec99ffc | [
"MIT"
] | null | null | null | MyAuthTest/myauth/models.py | singleye/Grocery | d009ea4a4447c9cbb913e16a66fa9e8f3ec99ffc | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.contrib.auth.base_user import AbstractBaseUser
#from django.contrib.auth.models import User
from django.db import models
# Create your models here.
class MyUser(AbstractBaseUser):
username = models.CharField(unique=True,
max_length=255,
... | 28.323529 | 58 | 0.620976 |
4740a1264b57958eec5b766dd8c747a54fa340e7 | 13,529 | py | Python | src/python/pants/pantsd/pailgun_server.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | src/python/pants/pantsd/pailgun_server.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | src/python/pants/pantsd/pailgun_server.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import logging
import socket
import threading
import traceback
from contextlib import contextmanager
from socketserver import BaseRequestHandler, BaseServer, TCPServer, ThreadingMixIn
fro... | 42.278125 | 135 | 0.708774 |
913adeb8b2984043a79eab1f261439945e9aa2c4 | 10,461 | py | Python | PS2/PS2.py | ChampionApe/FinancialFriction | eb5be29c7951871972b55fd863c89b83bb50d295 | [
"MIT"
] | null | null | null | PS2/PS2.py | ChampionApe/FinancialFriction | eb5be29c7951871972b55fd863c89b83bb50d295 | [
"MIT"
] | null | null | null | PS2/PS2.py | ChampionApe/FinancialFriction | eb5be29c7951871972b55fd863c89b83bb50d295 | [
"MIT"
] | null | null | null | import sys
from scipy import optimize
import numpy as np
import math
import itertools
import scipy.stats as stats
import scipy.integrate as integrate
import logging
import matplotlib.pyplot as plt
import matplotlib as mpl
plt.style.use('seaborn-whitegrid')
mpl.style.use('seaborn')
prop_cycle = plt.rcParams["axes.prop_c... | 31.893293 | 183 | 0.680719 |
0796028f01415dfc61a440e68aebc1cd33f9c1ea | 344 | py | Python | Pages/homePage.py | SakuraSa/TenhouLoggerX | 7d6bcfb7e22d631673c61321f3af1c05ec011db5 | [
"MIT"
] | 2 | 2016-09-19T16:33:29.000Z | 2017-12-09T01:02:39.000Z | Pages/homePage.py | SakuraSa/TenhouLoggerX | 7d6bcfb7e22d631673c61321f3af1c05ec011db5 | [
"MIT"
] | null | null | null | Pages/homePage.py | SakuraSa/TenhouLoggerX | 7d6bcfb7e22d631673c61321f3af1c05ec011db5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
"""
Pages.homePage
"""
__author__ = 'Rnd495'
from UI.Manager import mapping
from UI.Page import PageBase
from UI.module.navbar import on_navbar
@on_navbar(title=u'主页', priority=0)
@mapping(r'/')
class HomePage(PageBase):
"""
HomePage
"""
def get(self):
... | 14.956522 | 38 | 0.662791 |
6896e04dc2a432b7e4ccdc33da3049f5c3e94cff | 4,691 | py | Python | tests/test_config_flow.py | CJNE/ha-sunspec | b0b749a16f07b6bed68454e92b9e7e9b9efc11c7 | [
"MIT"
] | 20 | 2021-06-21T11:52:32.000Z | 2022-03-06T01:03:47.000Z | tests/test_config_flow.py | CJNE/ha-sunspec | b0b749a16f07b6bed68454e92b9e7e9b9efc11c7 | [
"MIT"
] | 50 | 2021-06-02T10:03:07.000Z | 2022-03-18T14:59:59.000Z | tests/test_config_flow.py | CJNE/ha-sunspec | b0b749a16f07b6bed68454e92b9e7e9b9efc11c7 | [
"MIT"
] | 4 | 2021-07-07T20:40:09.000Z | 2022-02-21T11:49:12.000Z | """Test SunSpec config flow."""
from unittest.mock import patch
import pytest
from custom_components.sunspec.const import CONF_ENABLED_MODELS
from custom_components.sunspec.const import CONF_SCAN_INTERVAL
from custom_components.sunspec.const import DOMAIN
from homeassistant import config_entries
from homeassistant imp... | 38.138211 | 87 | 0.742699 |
19d4f77863acf9b664215cfe6bd49d9ab7c53207 | 1,719 | py | Python | service-router/src/test/resources/integration_tests/python/basic_integration_test.py | ollin/vert.x-microservice | ee2a25269ec6ac8057f492fe15c533a259ed8bc6 | [
"Apache-2.0"
] | null | null | null | service-router/src/test/resources/integration_tests/python/basic_integration_test.py | ollin/vert.x-microservice | ee2a25269ec6ac8057f492fe15c533a259ed8bc6 | [
"Apache-2.0"
] | null | null | null | service-router/src/test/resources/integration_tests/python/basic_integration_test.py | ollin/vert.x-microservice | ee2a25269ec6ac8057f492fe15c533a259ed8bc6 | [
"Apache-2.0"
] | null | null | null | # Simple integration test which shows tests deploying other verticles, using the Vert.x API etc
from org.vertx.testtools import VertxAssert
import vertx_tests
from core.event_bus import EventBus
import vertx
# The test methods must begin with "test"
def test_http():
# Create an HTTP server which just sends back O... | 39.976744 | 120 | 0.740547 |
9529f82283fea332dc25753f0ae4c593e5f2dc33 | 760 | py | Python | multivimbroker/manage.py | onap/multicloud-framework | 091e2b38db978bceffcd3534f797fd6fa25fa970 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2020-06-17T07:02:08.000Z | 2020-06-17T07:02:08.000Z | multivimbroker/manage.py | onap/multicloud-framework | 091e2b38db978bceffcd3534f797fd6fa25fa970 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | multivimbroker/manage.py | onap/multicloud-framework | 091e2b38db978bceffcd3534f797fd6fa25fa970 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2018-03-07T08:53:29.000Z | 2020-09-30T15:41:33.000Z | # Copyright (c) 2017 Wind River Systems, Inc.
# Copyright (c) 2017-2018 VMware, 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
#
# Un... | 36.190476 | 74 | 0.759211 |
f60db188b1e64b4e35f767b641760734db0b22b4 | 2,493 | py | Python | mdx_partial_gfm/__init__.py | rjollos/py-gfm | fb09e6c9fcef84033f875d962edd6f4802e96303 | [
"BSD-3-Clause"
] | 70 | 2016-03-04T21:16:21.000Z | 2021-08-25T10:01:54.000Z | mdx_partial_gfm/__init__.py | zopieux/py-gfm | 47723b1bb81bf224fac3e8a0cace97e282ab97b7 | [
"BSD-3-Clause"
] | 28 | 2016-03-18T00:45:43.000Z | 2020-10-25T15:00:56.000Z | mdx_partial_gfm/__init__.py | zopieux/py-gfm | 47723b1bb81bf224fac3e8a0cace97e282ab97b7 | [
"BSD-3-Clause"
] | 16 | 2016-03-15T20:05:07.000Z | 2020-11-20T15:22:11.000Z | # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
"""
:mod:`mdx_partial_gfm` -- Partial extension for GFM (READMEs, wiki)
==================================... | 36.661765 | 81 | 0.734055 |
7199ffd1f414b656b941cfbbc37b08738fe6a57f | 397 | py | Python | tests/asm_pseudo/test_asm_end.py | CyberZHG/mos-6502-restricted-assembler | a492a82dc9cc30225264fe777180aad5d0b4201a | [
"MIT"
] | null | null | null | tests/asm_pseudo/test_asm_end.py | CyberZHG/mos-6502-restricted-assembler | a492a82dc9cc30225264fe777180aad5d0b4201a | [
"MIT"
] | null | null | null | tests/asm_pseudo/test_asm_end.py | CyberZHG/mos-6502-restricted-assembler | a492a82dc9cc30225264fe777180aad5d0b4201a | [
"MIT"
] | null | null | null | from unittest import TestCase
from asm_6502 import Assembler
class TestAssembleEND(TestCase):
def setUp(self) -> None:
self.assembler = Assembler()
def test_end(self):
code = ".ORG $1000\n" \
".END"
results = self.assembler.assemble(code, add_entry=False)
self... | 22.055556 | 64 | 0.59194 |
1b5d0317f787f90497b3251def7ab6cdae060f89 | 1,481 | py | Python | src/logger.py | jroscoe5/discord-translate | 589495157f84779ecd6178eb0f4656a59d94eb5f | [
"MIT"
] | 1 | 2019-06-07T20:09:05.000Z | 2019-06-07T20:09:05.000Z | src/logger.py | jroscoe5/discord-translate | 589495157f84779ecd6178eb0f4656a59d94eb5f | [
"MIT"
] | null | null | null | src/logger.py | jroscoe5/discord-translate | 589495157f84779ecd6178eb0f4656a59d94eb5f | [
"MIT"
] | null | null | null | # python 3.7.1
from threading import Lock
from datetime import datetime
class Verbosity:
none = 0
low = 1
medium = 2
high = 3
values = [0,1,2,3]
class Logger():
def __init__(self, stream, verbosity:int):
if verbosity not in Verbosity.values:
raise Exception('Pr... | 29.039216 | 116 | 0.536124 |
200e5441a277de64ad050f2f56b314149bd59bff | 6,132 | py | Python | sheraf/attributes/files.py | yaal-fr/sheraf | 9821a53d8b0ea0aba420175e4cfa81529262f88c | [
"MIT"
] | 1 | 2020-03-18T09:54:52.000Z | 2020-03-18T09:54:52.000Z | sheraf/attributes/files.py | yaal-fr/sheraf | 9821a53d8b0ea0aba420175e4cfa81529262f88c | [
"MIT"
] | null | null | null | sheraf/attributes/files.py | yaal-fr/sheraf | 9821a53d8b0ea0aba420175e4cfa81529262f88c | [
"MIT"
] | null | null | null | import os
import sheraf
from sheraf.attributes import Attribute
from sheraf.models.base import BaseModel
from ..types import Set
FILES_ROOT_DIR = "files/"
def set_files_root_dir(path):
global FILES_ROOT_DIR
FILES_ROOT_DIR = path # pragma: no cover
class FileObject:
def __init__(self, stream=None, exte... | 28.52093 | 88 | 0.62182 |
4798ade111197a5bd06dd3afdbe5613e0ec6f15e | 1,707 | py | Python | main/model/lstm.py | upcbdipt/CDW_FedAvg | b287770f2e297c1d4130f4b5b4bf34140691c4d8 | [
"Apache-2.0"
] | 8 | 2021-07-05T13:30:40.000Z | 2022-02-28T08:58:46.000Z | main/model/lstm.py | upcbdipt/CDW_FedAvg | b287770f2e297c1d4130f4b5b4bf34140691c4d8 | [
"Apache-2.0"
] | 1 | 2021-10-30T06:47:02.000Z | 2021-10-30T06:47:02.000Z | main/model/lstm.py | upcbdipt/CDW_FedAvg | b287770f2e297c1d4130f4b5b4bf34140691c4d8 | [
"Apache-2.0"
] | 3 | 2021-07-05T13:30:42.000Z | 2022-01-10T11:17:15.000Z | # -*- coding: utf-8 -*-
# @Time : 2020/1/14 下午8:04
# @Author : updbdipt
# @Project : CDW_FedAvg
# @FileName: lstm
import numpy as np
import tensorflow as tf
import tensorflow.nn.rnn_cell as rnn
from main.model.model import Model
class LSTMModel(Model):
def __init__(self, config, seed, lr, seq_len, num_classes... | 34.14 | 116 | 0.648506 |
df29a21d542b37fff1d8444a53ffc6c35f154d42 | 53 | py | Python | mancala/__init__.py | jaywon99/mancala | 823441885faef87a45dddac93434f65baffd35aa | [
"MIT"
] | null | null | null | mancala/__init__.py | jaywon99/mancala | 823441885faef87a45dddac93434f65baffd35aa | [
"MIT"
] | null | null | null | mancala/__init__.py | jaywon99/mancala | 823441885faef87a45dddac93434f65baffd35aa | [
"MIT"
] | null | null | null | from .mancala import Mancala
__all__ = [ "Mancala" ] | 17.666667 | 28 | 0.716981 |
3fb7676690f96956372318f4b352a923bc957118 | 5,301 | py | Python | dmriprep/workflows/dwi/eddy.py | GalBenZvi/dmriprep | 7c4c0e1b01e3d941a7fafcbb6b001605cb1f2b0b | [
"Apache-2.0"
] | 53 | 2019-09-14T21:30:46.000Z | 2021-12-20T10:35:34.000Z | dmriprep/workflows/dwi/eddy.py | nipreps/dmriprep | 510ed0ea207ac3744b6afb1c4a19360f02e8a846 | [
"Apache-2.0"
] | 161 | 2019-07-23T16:30:55.000Z | 2022-03-29T10:29:15.000Z | dmriprep/workflows/dwi/eddy.py | GalBenZvi/dmriprep | 7c4c0e1b01e3d941a7fafcbb6b001605cb1f2b0b | [
"Apache-2.0"
] | 28 | 2019-09-05T21:09:53.000Z | 2022-01-02T15:29:19.000Z | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright 2021 The NiPreps Developers <nipreps@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may... | 29.287293 | 85 | 0.613469 |
9cd6b453422f4ddf072198a4f04320df9e19a122 | 343 | py | Python | panovel/filter/remove_comments.py | dickloraine/panovel | 622fc4e4bd0177e7a2d05cf0bfb67edd21b76214 | [
"MIT"
] | null | null | null | panovel/filter/remove_comments.py | dickloraine/panovel | 622fc4e4bd0177e7a2d05cf0bfb67edd21b76214 | [
"MIT"
] | 1 | 2020-09-16T19:08:06.000Z | 2020-09-16T19:08:06.000Z | panovel/filter/remove_comments.py | dickloraine/panovel | 622fc4e4bd0177e7a2d05cf0bfb67edd21b76214 | [
"MIT"
] | null | null | null | from panflute import run_filter, RawBlock, RawInline
def remove_comments(elem, doc):
if not isinstance(elem, RawBlock) and not isinstance(elem, RawInline):
return
if elem.format == "html" and elem.text[:4] == "<!--" and elem.text[-3:] == "-->":
return []
if __name__ == "__main__":
run_f... | 24.5 | 85 | 0.644315 |
298beb4d08cf022c6bbab2539428b882f4678755 | 711 | py | Python | src/stories/migrations/0014_branch_author.py | jcholton/daytell | 5bd3a4764fd41e43f25ff910b2df5ba07ea013b6 | [
"MIT"
] | null | null | null | src/stories/migrations/0014_branch_author.py | jcholton/daytell | 5bd3a4764fd41e43f25ff910b2df5ba07ea013b6 | [
"MIT"
] | null | null | null | src/stories/migrations/0014_branch_author.py | jcholton/daytell | 5bd3a4764fd41e43f25ff910b2df5ba07ea013b6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-20 00:26
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depende... | 28.44 | 141 | 0.682138 |
56a83a06b4e49322edcda7bd13885e320c0fb032 | 3,467 | py | Python | pyramid_stocks/pyramid_stocks/views/default.py | jeremyCtown/pyramid-stocks | b61adc4e059c69f64754874b89bdc3821575817d | [
"MIT"
] | null | null | null | pyramid_stocks/pyramid_stocks/views/default.py | jeremyCtown/pyramid-stocks | b61adc4e059c69f64754874b89bdc3821575817d | [
"MIT"
] | 8 | 2019-12-26T16:41:18.000Z | 2022-03-21T22:16:29.000Z | pyramid_stocks/pyramid_stocks/views/default.py | jeremyCtown/pyramid-stocks | b61adc4e059c69f64754874b89bdc3821575817d | [
"MIT"
] | null | null | null | from pyramid.view import view_config
from pyramid.response import Response
from . import DB_ERR_MSG
from sqlalchemy.exc import DBAPIError
from models import Stock
from ..sample_data import MOCK_DATA
from pyramid.httpexceptions import HTTPFound, HTTPNotFound
import requests
from pyramid.security import NO_PERMISSION_REQ... | 25.306569 | 80 | 0.608018 |
a000085b1b97f8cebca2efbf9498a6c28de62fa8 | 381 | py | Python | tests/test_examples_ex_time_vis_chart.py | KyleKing/dash_charts | 8e3644505047fa85f3175f5bc55a2421cb0a19ea | [
"Unlicense"
] | 16 | 2020-02-22T00:51:54.000Z | 2022-03-03T21:45:51.000Z | tests/test_examples_ex_time_vis_chart.py | KyleKing/dash_charts | 8e3644505047fa85f3175f5bc55a2421cb0a19ea | [
"Unlicense"
] | 29 | 2020-06-29T22:14:00.000Z | 2022-03-22T02:10:00.000Z | tests/test_examples_ex_time_vis_chart.py | KyleKing/dash_charts | 8e3644505047fa85f3175f5bc55a2421cb0a19ea | [
"Unlicense"
] | 1 | 2022-02-03T09:07:07.000Z | 2022-02-03T09:07:07.000Z | """Test the file examples/ex_time_vis_chart.py."""
import time
import pytest
from .configuration import no_log_errors
from .examples import ex_time_vis_chart
@pytest.mark.CHROME
def test_smoke_test_ex_time_vis_chart(dash_duo):
"""Test ex_time_vis_chart."""
dash_duo.start_server(ex_time_vis_chart.app.app)
... | 20.052632 | 52 | 0.774278 |
30d0fdd84545a1f8cf8aa72d13e4de2347a2dddb | 923 | py | Python | python/src/main/python/pygw/query/query.py | jhickman-prominent/geowave | fb421588e22a7c68ef13be1e57bc2c674dd1b090 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pygw/query/query.py | jhickman-prominent/geowave | fb421588e22a7c68ef13be1e57bc2c674dd1b090 | [
"Apache-2.0"
] | 2 | 2019-09-20T15:39:27.000Z | 2019-12-03T14:07:43.000Z | python/src/main/python/pygw/query/query.py | jhickman-prominent/geowave | fb421588e22a7c68ef13be1e57bc2c674dd1b090 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2013-2019 Contributors to the Eclipse Foundation
#
# See the NOTICE file distributed with this work for additional information regarding copyright
# ownership. All rights reserved. This program and the accompanying materials are made available
# under the terms of the Apache License, Version 2.0 which... | 40.130435 | 96 | 0.694475 |
799372e8d98a2236b2374704c4747b5d219a5fd4 | 76 | py | Python | python/ql/test/3/library-tests/classes/meta/test.py | vadi2/codeql | a806a4f08696d241ab295a286999251b56a6860c | [
"MIT"
] | 4,036 | 2020-04-29T00:09:57.000Z | 2022-03-31T14:16:38.000Z | python/ql/test/3/library-tests/classes/meta/test.py | vadi2/codeql | a806a4f08696d241ab295a286999251b56a6860c | [
"MIT"
] | 2,970 | 2020-04-28T17:24:18.000Z | 2022-03-31T22:40:46.000Z | python/ql/test/3/library-tests/classes/meta/test.py | ScriptBox99/github-codeql | 2ecf0d3264db8fb4904b2056964da469372a235c | [
"MIT"
] | 794 | 2020-04-29T00:28:25.000Z | 2022-03-30T08:21:46.000Z |
class Meta(type):
pass
class HasMeta(object, metaclass=Meta):
pass | 12.666667 | 38 | 0.684211 |
d3618d52334ff0ab47cf850c6757d2fc24f3d125 | 7,355 | py | Python | final/dataset.py | wuyuMk7/CSCI8980 | 9cceffcac7975ee158655f3953e27b502fc383ea | [
"MIT"
] | null | null | null | final/dataset.py | wuyuMk7/CSCI8980 | 9cceffcac7975ee158655f3953e27b502fc383ea | [
"MIT"
] | null | null | null | final/dataset.py | wuyuMk7/CSCI8980 | 9cceffcac7975ee158655f3953e27b502fc383ea | [
"MIT"
] | null | null | null | import os, random
import numpy as np
import matplotlib.pyplot as plt
from numpy.core.fromnumeric import size
from numpy.lib.function_base import _diff_dispatcher
import torch
from torch.utils.data import Dataset
from torchvision import transforms
from skimage import io
from util import image as img_util
class NoWDatas... | 43.011696 | 244 | 0.621618 |
00fefddfc4069e4700395bdb36bdad5bcdc7ec8a | 1,220 | py | Python | flask_conferences/public/forms.py | joelbcastillo/flask_conferences | e19e81ef338279ad2b6187c020895e11ed8ca3b4 | [
"MIT"
] | null | null | null | flask_conferences/public/forms.py | joelbcastillo/flask_conferences | e19e81ef338279ad2b6187c020895e11ed8ca3b4 | [
"MIT"
] | 2 | 2020-05-17T04:40:56.000Z | 2020-05-25T01:34:11.000Z | flask_conferences/public/forms.py | joelbcastillo/flask_conferences | e19e81ef338279ad2b6187c020895e11ed8ca3b4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Public forms."""
from flask_wtf import FlaskForm
from wtforms import PasswordField, StringField
from wtforms.validators import DataRequired
from flask_conferences.user.models import User
class LoginForm(FlaskForm):
"""Login form."""
username = StringField("Username", validators=[D... | 30.5 | 77 | 0.645902 |
eb9243629b8ed8f8104e08c56f4b9d7c051ede53 | 5,701 | py | Python | tftf/datasets/small_parallel_enja.py | yusugomori/tftf | e98b9ddffdbaa1fe04320437a47f12f3182ab6f3 | [
"Apache-2.0"
] | 35 | 2018-08-11T05:01:41.000Z | 2021-01-29T02:28:47.000Z | tftf/datasets/small_parallel_enja.py | yusugomori/tftf | e98b9ddffdbaa1fe04320437a47f12f3182ab6f3 | [
"Apache-2.0"
] | null | null | null | tftf/datasets/small_parallel_enja.py | yusugomori/tftf | e98b9ddffdbaa1fe04320437a47f12f3182ab6f3 | [
"Apache-2.0"
] | 4 | 2018-10-19T14:12:04.000Z | 2021-01-29T02:28:49.000Z | import os
import subprocess
import numpy as np
from .Dataset import Dataset
'''
Download 50k En/Ja Parallel Corpus
from https://github.com/odashi/small_parallel_enja
and transform words to IDs.
'''
def load_small_parallel_enja(path=None,
to_ja=True,
pad_valu... | 30.983696 | 78 | 0.513419 |
dabe27b961d7c28e63bb631e06b55237187590e2 | 5,362 | py | Python | laygo/generators/splash/BagModules/adc_sar_templates_fdsoi/sarlogic_wret.py | tinapiao/Software-IC-Automation | 74b23cd94aa6e4658b110e93b5deb635e014f3a6 | [
"BSD-3-Clause"
] | 26 | 2017-07-07T08:06:31.000Z | 2021-11-25T06:41:24.000Z | laygo/generators/splash/BagModules/adc_sar_templates_fdsoi/sarlogic_wret.py | tinapiao/Software-IC-Automation | 74b23cd94aa6e4658b110e93b5deb635e014f3a6 | [
"BSD-3-Clause"
] | 9 | 2016-12-28T03:08:29.000Z | 2019-01-30T16:00:28.000Z | laygo/generators/splash/BagModules/adc_sar_templates_fdsoi/sarlogic_wret.py | tinapiao/Software-IC-Automation | 74b23cd94aa6e4658b110e93b5deb635e014f3a6 | [
"BSD-3-Clause"
] | 10 | 2018-07-14T01:31:28.000Z | 2021-08-21T10:18:30.000Z | # -*- coding: utf-8 -*-
########################################################################################################################
#
# Copyright (c) 2014, Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are... | 46.224138 | 120 | 0.665237 |
00633238a837e398da4b8f689d3900d0719cc6d8 | 6,999 | py | Python | Tests/test_AlignInfo.py | jrozycka/biopython | 1b9f271f4485c67eaa53e928ae4ae2a178349018 | [
"BSD-3-Clause"
] | null | null | null | Tests/test_AlignInfo.py | jrozycka/biopython | 1b9f271f4485c67eaa53e928ae4ae2a178349018 | [
"BSD-3-Clause"
] | 1 | 2020-06-03T16:16:26.000Z | 2020-06-03T16:16:26.000Z | Tests/test_AlignInfo.py | jrozycka/biopython | 1b9f271f4485c67eaa53e928ae4ae2a178349018 | [
"BSD-3-Clause"
] | 3 | 2020-05-17T19:43:05.000Z | 2020-06-04T20:44:38.000Z | # Copyright 2016 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Bio.Align.AlignInfo related tests."""
import unittest
from Bio.Alphabet import DNAAlphabet, g... | 46.973154 | 105 | 0.567795 |
b62bf285fbc85a4faec5e6ad28b04cb9b7000cc8 | 14,298 | py | Python | core/controllers/learner_playlist_test.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | 5,422 | 2015-08-14T01:56:44.000Z | 2022-03-31T23:31:56.000Z | core/controllers/learner_playlist_test.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | 14,178 | 2015-08-14T05:21:45.000Z | 2022-03-31T23:54:10.000Z | core/controllers/learner_playlist_test.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | 3,574 | 2015-08-14T04:20:06.000Z | 2022-03-29T01:52:37.000Z | # Copyright 2017 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 41.323699 | 113 | 0.635893 |
d6995c5561604b77e36914e26d7dc616a1f8964a | 859 | py | Python | tests/steam/conftest.py | mtik00/steam-free-notifier | c3f5f8f14119f98f365fcf94813ea0d6bd0553f6 | [
"MIT"
] | 1 | 2021-01-27T04:44:44.000Z | 2021-01-27T04:44:44.000Z | tests/steam/conftest.py | mtik00/steam-free-notifier | c3f5f8f14119f98f365fcf94813ea0d6bd0553f6 | [
"MIT"
] | null | null | null | tests/steam/conftest.py | mtik00/steam-free-notifier | c3f5f8f14119f98f365fcf94813ea0d6bd0553f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pytest
from free_game_notifier.feed.steam import Feed
@pytest.fixture
def feed(configuration):
return Feed(url="tests/steam/files/test-feed.xml")
@pytest.fixture
def solitairica(feed, configuration):
return next((x for x in feed._feed["items"] if "solit... | 23.216216 | 88 | 0.654249 |
eb0f40a405a4b94c4230643d32cf0c1ccdc22670 | 3,059 | py | Python | students/k3340/laboratory_works/VoronovAlexey/lab2-3/project/abit/views.py | voronoff2803/ITMO_ICT_WebProgramming_2020 | c59d8b2cdefe8b821049a2716733070983d08ad2 | [
"MIT"
] | null | null | null | students/k3340/laboratory_works/VoronovAlexey/lab2-3/project/abit/views.py | voronoff2803/ITMO_ICT_WebProgramming_2020 | c59d8b2cdefe8b821049a2716733070983d08ad2 | [
"MIT"
] | null | null | null | students/k3340/laboratory_works/VoronovAlexey/lab2-3/project/abit/views.py | voronoff2803/ITMO_ICT_WebProgramming_2020 | c59d8b2cdefe8b821049a2716733070983d08ad2 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import permissions
from abit import models
from abit import serializers
# Create your views here.
class Study_Programs(APIView):
permission_classes = [permissions.IsAuthenticated]
def get(self, request... | 33.988889 | 92 | 0.672115 |
442789f96325259180d084d4820f08e4f5223db5 | 10,381 | py | Python | third_party/catapult/devil/devil/android/tools/device_status.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 1 | 2020-09-15T08:43:34.000Z | 2020-09-15T08:43:34.000Z | third_party/catapult/devil/devil/android/tools/device_status.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | third_party/catapult/devil/devil/android/tools/device_status.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright 2016 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.
"""A script to keep track of devices across builds and report state."""
import argparse
import json
import logging
import os
import re... | 33.924837 | 80 | 0.634814 |
3a64fe6749a71bd679a853b5c46ce3ba6c197505 | 2,221 | py | Python | azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/application_gateway_ip_configuration_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/application_gateway_ip_configuration_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/application_gateway_ip_configuration_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"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.12963 | 149 | 0.626294 |
489fd345be9ecf2bfde49ca9ccc62dd6b7953e98 | 2,338 | py | Python | p1/convQ.py | MultiPeden/IR2016 | c76fd5d3127a158d32fcefc4327a47bb765a7206 | [
"MIT"
] | null | null | null | p1/convQ.py | MultiPeden/IR2016 | c76fd5d3127a158d32fcefc4327a47bb765a7206 | [
"MIT"
] | null | null | null | p1/convQ.py | MultiPeden/IR2016 | c76fd5d3127a158d32fcefc4327a47bb765a7206 | [
"MIT"
] | null | null | null | from __future__ import division
import os
import re
out2 = open('queriesReRank.txt', 'w')
stopstring = ""
with open('stopwords.txt') as f:
stoppers = f.read().splitlines()
for stop in stoppers:
stopstring += "<word>"+stop+"</word>\n"
datasets=["fbis", "ft", "latimes" ]
numberRes=[2... | 37.709677 | 107 | 0.428571 |
2344ccb44df42b4b939790a37084ac226852d8c6 | 11,386 | py | Python | aib/init/tables/npch_codes.py | FrankMillman/AccInABox | fc4cd26bf525c1bbe8e541d9339c69b0adbad546 | [
"MIT"
] | 3 | 2015-02-25T19:44:43.000Z | 2020-12-18T05:49:09.000Z | aib/init/tables/npch_codes.py | FrankMillman/AccInABox | fc4cd26bf525c1bbe8e541d9339c69b0adbad546 | [
"MIT"
] | 1 | 2019-11-20T12:31:34.000Z | 2019-11-20T12:31:35.000Z | aib/init/tables/npch_codes.py | FrankMillman/AccInABox | fc4cd26bf525c1bbe8e541d9339c69b0adbad546 | [
"MIT"
] | 1 | 2020-06-07T06:25:19.000Z | 2020-06-07T06:25:19.000Z | # table definition
table = {
'table_name' : 'npch_codes',
'module_id' : 'npch',
'short_descr' : 'Pch codes - non-inventory',
'long_descr' : 'Pch codes - non-inventory',
'sub_types' : None,
'sub_trans' : None,
'sequence' : ['seq', ['group_id'], None],
'tree_params... | 30.607527 | 107 | 0.497453 |
70313781a0d8df947cb70ad495399c92e8459261 | 1,143 | py | Python | poliedro_donate/__init__.py | poliedro-polimi/PoliEdro-Donate | 63758c55db2e4ef0476723a65b332f5705339ee1 | [
"MIT"
] | 2 | 2018-03-13T18:36:33.000Z | 2019-05-01T18:00:06.000Z | poliedro_donate/__init__.py | poliedro-polimi/PoliEdro-Donate | 63758c55db2e4ef0476723a65b332f5705339ee1 | [
"MIT"
] | 1 | 2018-03-31T13:31:00.000Z | 2018-03-31T13:31:00.000Z | poliedro_donate/__init__.py | poliedro-polimi/PoliEdro-Donate | 63758c55db2e4ef0476723a65b332f5705339ee1 | [
"MIT"
] | 2 | 2018-03-14T14:32:44.000Z | 2021-01-06T05:08:08.000Z | __all__ = (
'app', 'babel', 'blueprints', 'database', 'auth', 'cli', 'config',
'errors', 'mail', 'paypal', 'strings', 'utils', 'validator'
)
import os, json
from flask import Flask, g
from flask_babel import Babel
from flask_sslify import SSLify
from poliedro_donate.config import DefaultConfig
app = Flask(__... | 23.8125 | 71 | 0.739283 |
9f998bff63178e7aa752b1745b45ee0508718d10 | 224 | py | Python | main/np-sum-and-prod/np-sum-and-prod.py | EliahKagan/old-practice-snapshot | 1b53897eac6902f8d867c8f154ce2a489abb8133 | [
"0BSD"
] | null | null | null | main/np-sum-and-prod/np-sum-and-prod.py | EliahKagan/old-practice-snapshot | 1b53897eac6902f8d867c8f154ce2a489abb8133 | [
"0BSD"
] | null | null | null | main/np-sum-and-prod/np-sum-and-prod.py | EliahKagan/old-practice-snapshot | 1b53897eac6902f8d867c8f154ce2a489abb8133 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
import numpy
n, m = map(int, input().split())
a = numpy.array([input().split() for _ in range(n)], int)
if a.shape != (n, m):
raise ValueError('wrong shape')
print(numpy.prod(numpy.sum(a, 0)))
| 18.666667 | 57 | 0.625 |
01176975844e9ac2906e8a38decc7738aafe4816 | 5,846 | py | Python | detectionGui.py | keremgure/EE393_Project | c2c481b4cc250852727a128f2570d7b4939a8b06 | [
"MIT"
] | null | null | null | detectionGui.py | keremgure/EE393_Project | c2c481b4cc250852727a128f2570d7b4939a8b06 | [
"MIT"
] | 10 | 2020-09-25T21:13:59.000Z | 2022-03-12T00:09:45.000Z | detectionGui.py | keremgure/EE393_Project | c2c481b4cc250852727a128f2570d7b4939a8b06 | [
"MIT"
] | null | null | null | # Authors: Kerem Güre, Cenker Karaörs, Ertuğrul Özvardar, Doğukan Duduoğlu
from tkinter import *
from functools import partial
from tkinter import messagebox
import os
from functools import partial
import cv2
from PIL import Image
import importlib
import numpy as np
import threading
# https://github.com/tensorflow/mo... | 34.797619 | 144 | 0.728532 |
e211197ab4ebe85dc237fb3c743354aff0e30146 | 10,438 | py | Python | toontown/minigame/MazeSuit.py | TrueBlueDogemon/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | 1 | 2021-02-25T06:22:49.000Z | 2021-02-25T06:22:49.000Z | toontown/minigame/MazeSuit.py | TrueBlueDogemon/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | null | null | null | toontown/minigame/MazeSuit.py | TrueBlueDogemon/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | 2 | 2020-11-08T03:38:35.000Z | 2021-09-02T07:03:47.000Z | from direct.showbase.DirectObject import DirectObject
from direct.interval.MetaInterval import Parallel
from direct.interval.LerpInterval import LerpPosInterval, LerpHprInterval
from direct.showbase.RandomNumGen import RandomNumGen
from pandac.PandaModules import Point3, WaitInterval
from pandac.PandaModules import Col... | 39.688213 | 334 | 0.609121 |
d7a293200ed4e2eb56a448b80f46938bd44b282d | 963 | py | Python | ceph/ceph_admin/common.py | ckulal/cephci | c494bfebeccf7965b2ffa97b66127f924cba16a7 | [
"MIT"
] | null | null | null | ceph/ceph_admin/common.py | ckulal/cephci | c494bfebeccf7965b2ffa97b66127f924cba16a7 | [
"MIT"
] | null | null | null | ceph/ceph_admin/common.py | ckulal/cephci | c494bfebeccf7965b2ffa97b66127f924cba16a7 | [
"MIT"
] | null | null | null | """Contains common functions that can used across the module."""
from typing import Dict
def config_dict_to_string(data: Dict) -> str:
"""
Convert the provided data to a string of optional arguments.
Args:
data: Key/value pairs that are CLI optional arguments
Return:
string instead... | 23.487805 | 82 | 0.602285 |
3222066c168860ac8b90fb83238aac2f77631f4e | 30,953 | py | Python | diofant/tests/polys/test_numberfields.py | skirpichev/diofant | 16e280fdd6053be10c3b60fbb66fc26b52ede27a | [
"BSD-3-Clause"
] | 57 | 2016-09-13T23:16:26.000Z | 2022-03-29T06:45:51.000Z | diofant/tests/polys/test_numberfields.py | diofant/diofant | 0677d240eb5de697f851c6c844fefc8039754edc | [
"BSD-3-Clause"
] | 402 | 2016-05-11T11:11:47.000Z | 2022-03-31T14:27:02.000Z | diofant/tests/polys/test_numberfields.py | diofant/diofant | 0677d240eb5de697f851c6c844fefc8039754edc | [
"BSD-3-Clause"
] | 20 | 2016-05-11T08:17:37.000Z | 2021-09-10T09:15:51.000Z | """Tests for computational algebraic number field theory."""
import pytest
from diofant import (QQ, Add, CoercionFailed, GoldenRatio, I, Integer,
NotAlgebraic, PurePoly, Rational, RootOf, cbrt, conjugate,
cos, degree, exp, exp_polar, expand, expand_multinomial,
... | 44.665224 | 154 | 0.576196 |
a9ba33cd27638bbd62c286b5350461c1a36d73e4 | 5,925 | py | Python | TUI/MainForm.py | snsd0805/GoogleTranslator-TUI | 35ffe9e14eaaeb0581a9381823c3b955f0fe2abe | [
"MIT"
] | 6 | 2021-04-26T13:09:34.000Z | 2021-12-23T03:41:51.000Z | TUI/MainForm.py | snsd0805/GoogleTranslator-TUI | 35ffe9e14eaaeb0581a9381823c3b955f0fe2abe | [
"MIT"
] | 2 | 2021-12-23T05:16:05.000Z | 2021-12-26T17:33:58.000Z | TUI/MainForm.py | snsd0805/GoogleTranslator-TUI | 35ffe9e14eaaeb0581a9381823c3b955f0fe2abe | [
"MIT"
] | 1 | 2021-12-23T02:01:57.000Z | 2021-12-23T02:01:57.000Z | import npyscreen
import curses
from Sound import Sound
from TUI.Box import EditBox
readme = '''
█▀▀ █▀█ █▀█ █▀▀ █░░ █▀▀ ▄▄ ▀█▀ █▀█ ▄▀█ █▄░█ █▀ █░░ ▄▀█ ▀█▀ █▀▀ ▀█▀ █░█ █
█▄█ █▄█ █▄█ █▄█ █▄▄ ██▄ ░░ ░█░ █▀▄ █▀█ █░▀█ ▄█ █▄▄ █▀█ ░█░ ██▄ ░█░ █▄█ █
This is an unofficial Google Translate c... | 32.027027 | 113 | 0.540084 |
7f5044a1570f49549fce4ede8892aa760ef5cc04 | 8,361 | py | Python | custom_components/nhl_api/sensor.py | Nag94/HomeAssistantConfig | d5f806e05be8d92bf487c58322d20cd9b08c6b98 | [
"Unlicense"
] | 65 | 2019-12-31T03:03:21.000Z | 2022-03-31T03:31:39.000Z | custom_components/nhl_api/sensor.py | Nag94/HomeAssistantConfig | d5f806e05be8d92bf487c58322d20cd9b08c6b98 | [
"Unlicense"
] | 20 | 2021-01-22T23:14:20.000Z | 2022-02-04T09:10:29.000Z | custom_components/nhl_api/sensor.py | Nag94/HomeAssistantConfig | d5f806e05be8d92bf487c58322d20cd9b08c6b98 | [
"Unlicense"
] | 10 | 2020-01-07T05:41:45.000Z | 2022-01-26T06:32:58.000Z | """"
Support for the undocumented NHL API.
For more details about this platform, please refer to the documentation at
https://github.com/JayBlackedOut/hass-nhlapi/blob/master/README.md
"""
import logging
from datetime import timedelta, datetime as dt
from pynhl import Schedule, Scoring, Linescore, Broadcasts
import vo... | 36.510917 | 95 | 0.632699 |
8ee496874ac1b4b3283e105128ea5a8a018d8337 | 336 | py | Python | Examples/simple_char.py | IstrazivackiCentarMladih/IstraziUzPython | 7115a80ed589f7e32c13ba817523cc71d3adee96 | [
"MIT"
] | null | null | null | Examples/simple_char.py | IstrazivackiCentarMladih/IstraziUzPython | 7115a80ed589f7e32c13ba817523cc71d3adee96 | [
"MIT"
] | null | null | null | Examples/simple_char.py | IstrazivackiCentarMladih/IstraziUzPython | 7115a80ed589f7e32c13ba817523cc71d3adee96 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
x = [0, 1, 2, 3, 4, 5]
y = [5, 6, 11.1, 7.2, 8.4, 7.6]
plt.plot(x, y,
marker='o', markersize=12,
linestyle='dashed', linewidth=2,
label='series 1', markerfacecolor='red')
plt.title('Position vs Time')
plt.ylabel('Position (m)')
plt.xlabel('Time (s)')
plt.lege... | 22.4 | 49 | 0.592262 |
dcc4270ad472782c768f9debabf78a2d08c9994b | 21,071 | py | Python | library/github/Requester.py | Sangraha/Github-to-S3 | e88345dc800b2b2f7ec10ee10bb864582335f1ad | [
"Apache-2.0"
] | null | null | null | library/github/Requester.py | Sangraha/Github-to-S3 | e88345dc800b2b2f7ec10ee10bb864582335f1ad | [
"Apache-2.0"
] | null | null | null | library/github/Requester.py | Sangraha/Github-to-S3 | e88345dc800b2b2f7ec10ee10bb864582335f1ad | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2012 Andrew Bettison <andrewb@zip.com.au> #
# Copyright 2012 Dima Kukushkin <dima@kukushkin.me> ... | 44.927505 | 240 | 0.597836 |
206945253e7b3e5a8462e27d2c78cd2ba65bf076 | 101,735 | py | Python | io_scene_vrm/exporter/legacy_vrm_exporter.py | 989onan/VRM_Addon_for_Blender | af894a87bdf2bc02b69842c6de082f097f1e0939 | [
"MIT"
] | null | null | null | io_scene_vrm/exporter/legacy_vrm_exporter.py | 989onan/VRM_Addon_for_Blender | af894a87bdf2bc02b69842c6de082f097f1e0939 | [
"MIT"
] | null | null | null | io_scene_vrm/exporter/legacy_vrm_exporter.py | 989onan/VRM_Addon_for_Blender | af894a87bdf2bc02b69842c6de082f097f1e0939 | [
"MIT"
] | null | null | null | """
Copyright (c) 2018 iCyP
Released under the MIT license
https://opensource.org/licenses/mit-license.php
"""
import collections
import datetime
import math
import os
import re
import secrets
import string
import struct
import traceback
from collections import OrderedDict
from math import floor
from sys import float... | 44.174989 | 187 | 0.518583 |
44576c3220cde502c6dae21c1fd220fe8a4df907 | 2,328 | py | Python | setup.py | jupyterlab-contrib/jupyterlab-recents | 82ca4e33aa77d2781a3a867838c726525df1a131 | [
"BSD-3-Clause"
] | 2 | 2022-02-23T19:54:47.000Z | 2022-02-24T18:03:49.000Z | setup.py | jupyterlab-contrib/jupyterlab-recents | 82ca4e33aa77d2781a3a867838c726525df1a131 | [
"BSD-3-Clause"
] | null | null | null | setup.py | jupyterlab-contrib/jupyterlab-recents | 82ca4e33aa77d2781a3a867838c726525df1a131 | [
"BSD-3-Clause"
] | 1 | 2021-07-30T11:52:20.000Z | 2021-07-30T11:52:20.000Z | """
jupyterlab_recents setup
"""
import json
from pathlib import Path
from jupyter_packaging import (
create_cmdclass,
install_npm,
ensure_targets,
combine_commands,
skip_if_exists
)
import setuptools
HERE = Path(__file__).parent.resolve()
# The name of the project
name = "jupyterlab_recents"
la... | 24.765957 | 80 | 0.67268 |
d08be15ac9465b7bae39b8ac16b3673e4bbc918b | 65,740 | py | Python | sdk/python/pulumi_azure_native/devices/v20191104/_inputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_native/devices/v20191104/_inputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_native/devices/v20191104/_inputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 48.696296 | 476 | 0.688211 |
0596f66f5c194ada1a892bf55fc9eda2a1f03bbb | 25,898 | py | Python | meshdynamic/meshDynamic-Flow1.py | deepkashiwa/DeepUrbanEvent | 3356ee3030893e2806d23541b2650ec73dab3075 | [
"MIT"
] | 17 | 2019-04-09T06:28:22.000Z | 2022-03-13T09:31:55.000Z | meshdynamic/meshDynamic-Flow1.py | deepkashiwa/DeepUrbanEvent | 3356ee3030893e2806d23541b2650ec73dab3075 | [
"MIT"
] | 2 | 2021-04-12T02:23:01.000Z | 2021-06-01T02:21:10.000Z | meshdynamic/meshDynamic-Flow1.py | deepkashiwa/DeepUrbanEvent | 3356ee3030893e2806d23541b2650ec73dab3075 | [
"MIT"
] | 1 | 2021-07-30T10:22:41.000Z | 2021-07-30T10:22:41.000Z | import csv
import numpy as np
import os
import sys
import time
import jismesh.utils as ju
import pandas as pd
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)
from common.datastructure.Point import Point
from common.datastructure.Mesh imp... | 36.424754 | 110 | 0.547455 |
4b2bc9c96477f63b6a5153944244e4db2a4f1d48 | 6,569 | py | Python | stage1/lib/checkTool.py | YU-Zhiyang/WEVI | 0282dc6de58722fc3ed3829a004800b035685b3a | [
"MIT"
] | 14 | 2021-08-10T06:58:07.000Z | 2022-02-25T23:03:10.000Z | stage1/lib/checkTool.py | YU-Zhiyang/WEVI | 0282dc6de58722fc3ed3829a004800b035685b3a | [
"MIT"
] | 4 | 2021-10-30T13:01:52.000Z | 2022-03-22T04:59:46.000Z | stage1/lib/checkTool.py | YU-Zhiyang/WEVI | 0282dc6de58722fc3ed3829a004800b035685b3a | [
"MIT"
] | null | null | null | import lib.imgTool_ as trans
import cv2
import imageio
from pathlib import Path
from lib.fileTool import mkPath
import numpy as np
import torch
def visualContinuousFrames(imgrendListOut, gtframeTList, path):
mkPath(path)
totalList = []
for t, (imgrendOut, gtframeT) in enumerate(zip(imgrendListOut, gtframe... | 37.323864 | 116 | 0.477546 |
1c722b5578e2db78a05fb1de0d9d8a9bdd5c3dc7 | 5,812 | py | Python | daemon.py | T4puSD/YoutubeDownloader | 7ddfa76083bbd8309db0b179372629e47d536675 | [
"MIT"
] | null | null | null | daemon.py | T4puSD/YoutubeDownloader | 7ddfa76083bbd8309db0b179372629e47d536675 | [
"MIT"
] | null | null | null | daemon.py | T4puSD/YoutubeDownloader | 7ddfa76083bbd8309db0b179372629e47d536675 | [
"MIT"
] | null | null | null | import os
import sys
import signal
import time
import pyperclip
from threading import Thread
import queue
from configparser import ConfigParser
from concurrent.futures import as_completed
from config import initConfigInstance
from debugger import logging
from advancedyvdown import reloadDownloadDirs
from advancedyvdown... | 33.402299 | 114 | 0.629043 |
c6453d4af4d16965136d19a78e0ecbae54f7d797 | 14,662 | py | Python | tensorflow_probability/python/distributions/multivariate_student_t.py | nxdao2000/probability | 33d2bc1cb0e7b6284579ea7f3692b9d056e0d700 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/multivariate_student_t.py | nxdao2000/probability | 33d2bc1cb0e7b6284579ea7f3692b9d056e0d700 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/multivariate_student_t.py | nxdao2000/probability | 33d2bc1cb0e7b6284579ea7f3692b9d056e0d700 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability 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 applicable law o... | 35.501211 | 80 | 0.654276 |
5a74db86897112dc379144c43a1765d31cf5d361 | 2,030 | py | Python | prawcore/requestor.py | zegevlier/prawcore | 209be1b65d11f86cc621508f2fdae118a8c944b7 | [
"BSD-2-Clause"
] | null | null | null | prawcore/requestor.py | zegevlier/prawcore | 209be1b65d11f86cc621508f2fdae118a8c944b7 | [
"BSD-2-Clause"
] | null | null | null | prawcore/requestor.py | zegevlier/prawcore | 209be1b65d11f86cc621508f2fdae118a8c944b7 | [
"BSD-2-Clause"
] | null | null | null | """Provides the HTTP request handling interface."""
import requests
from .const import __version__, TIMEOUT
from .exceptions import InvalidInvocation, RequestException
class Requestor(object):
"""Requestor provides an interface to HTTP requests."""
def __getattr__(self, attribute):
"""Pass all undefi... | 36.25 | 79 | 0.635961 |
166bc13fc5c80733f3f33a8552ed6f810c462b62 | 1,957 | py | Python | Tamagotchi/tamagotchi.py | Software-Cat/NCSSChallenge2020 | 68aba28781b9db0f09f06f8bc1eb47279f771574 | [
"MIT"
] | null | null | null | Tamagotchi/tamagotchi.py | Software-Cat/NCSSChallenge2020 | 68aba28781b9db0f09f06f8bc1eb47279f771574 | [
"MIT"
] | null | null | null | Tamagotchi/tamagotchi.py | Software-Cat/NCSSChallenge2020 | 68aba28781b9db0f09f06f8bc1eb47279f771574 | [
"MIT"
] | null | null | null | # Tamagotchi ASCII art.
SMALL = r'''
_____
/ ^_^ \
\_____/
'''[1:-1]
MED = r'''
_______
/ \
/ ^ _ ^ \
\_________/
U U
'''[1:-1]
BIG = r'''
___________
/ \
/ /\ /\ \
\ _ /
\___________/
\_/ \_/
'''[1:-1]
class Tamagotchi:
"""
Represents a single Tamag... | 17.954128 | 79 | 0.546244 |
7b4ee9864e77e946c87e11e5e6848db34f0d2508 | 1,603 | py | Python | parsl/tests/configs/comet_ipp_multinode.py | Lnaden/parsl | f6ad3a272fa3d62e72ac3b7c402e25f079d4ab98 | [
"Apache-2.0"
] | 2 | 2019-02-25T16:43:30.000Z | 2019-03-04T17:25:00.000Z | parsl/tests/configs/comet_ipp_multinode.py | Lnaden/parsl | f6ad3a272fa3d62e72ac3b7c402e25f079d4ab98 | [
"Apache-2.0"
] | null | null | null | parsl/tests/configs/comet_ipp_multinode.py | Lnaden/parsl | f6ad3a272fa3d62e72ac3b7c402e25f079d4ab98 | [
"Apache-2.0"
] | 2 | 2019-04-30T13:46:23.000Z | 2019-06-04T16:14:46.000Z | from parsl.channels import SSHChannel
from parsl.providers import SlurmProvider
from parsl.launchers import SrunLauncher
from parsl.config import Config
from parsl.executors.ipp import IPyParallelExecutor
from parsl.executors.ipp_controller import Controller
from parsl.tests.utils import get_rundir
# If you are a dev... | 37.27907 | 110 | 0.626949 |
8be9477040b55113d34d8bad53d0f0cf401cb21e | 2,187 | py | Python | pytorch_analyser.py | JasonDu1993/PytorchToCaffe | 48b1d6f555c77a0f67c91f6e080249781dabe4f2 | [
"MIT"
] | null | null | null | pytorch_analyser.py | JasonDu1993/PytorchToCaffe | 48b1d6f555c77a0f67c91f6e080249781dabe4f2 | [
"MIT"
] | null | null | null | pytorch_analyser.py | JasonDu1993/PytorchToCaffe | 48b1d6f555c77a0f67c91f6e080249781dabe4f2 | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import absolute_import
import torch
import argparse
import sys, os
from analysis.PytorchA import analyse
from analysis.utils import save_csv
from torch.autograd import Variable
import torch.nn as nn
"""
Supporting analyse the inheritors of torch.nn.Moudule class.
Command:`pytorch_analys... | 44.632653 | 148 | 0.699131 |
b4dc87ad4b532dc905a95386e8cad3bf4c772b36 | 25,181 | py | Python | prensilia/Exp_INPUT_OLD.py | parloma/Prensilia | e0292834b82e7046e4333ecdb0be78502fdf6dab | [
"Apache-2.0"
] | 1 | 2015-01-12T03:08:25.000Z | 2015-01-12T03:08:25.000Z | prensilia/Exp_INPUT_OLD.py | parloma/Prensilia | e0292834b82e7046e4333ecdb0be78502fdf6dab | [
"Apache-2.0"
] | null | null | null | prensilia/Exp_INPUT_OLD.py | parloma/Prensilia | e0292834b82e7046e4333ecdb0be78502fdf6dab | [
"Apache-2.0"
] | null | null | null | from cv2 import namedWindow, imshow, waitKey, cvtColor, COLOR_RGB2BGR, imwrite
from hand_grabber import PyOpenNIHandGrabber
from pose_recognizer import PyPoseRecognizer
from my_fun import *
from sklearn.externals import joblib
from SerialClient import *
import time
from random import shuffle
WIDTH = 640
HEIGHT = 480... | 177.330986 | 20,233 | 0.256106 |
c7a74cd3dfa6c98128970e6b31a4ddad4fe99756 | 14,624 | py | Python | webAppSrc/server/idCreator/idcreator.py | rdass1/IDScanningSystem | 42abf3a0bd12fef134f625ba3fdb6999b719523c | [
"Unlicense"
] | null | null | null | webAppSrc/server/idCreator/idcreator.py | rdass1/IDScanningSystem | 42abf3a0bd12fef134f625ba3fdb6999b719523c | [
"Unlicense"
] | null | null | null | webAppSrc/server/idCreator/idcreator.py | rdass1/IDScanningSystem | 42abf3a0bd12fef134f625ba3fdb6999b719523c | [
"Unlicense"
] | null | null | null | from distutils.log import error
from PIL import Image, ImageDraw, ImageFont, ImageOps
import qrcode
import random
import sys
import json
from datetime import datetime
from os.path import exists
import time
blankIDCardFront = "./server/idCreator/Slide1.PNG" # Link to the template of the front side of the ID
... | 63.034483 | 327 | 0.662404 |
4f640356033ccc255d4090335c9dc5f0351f9836 | 28,826 | py | Python | ad_related/grid_operators.py | taj004/porepy_lab | 2461aa547fafcb7a111d0ade1bbdf302f46c67ab | [
"MIT"
] | null | null | null | ad_related/grid_operators.py | taj004/porepy_lab | 2461aa547fafcb7a111d0ade1bbdf302f46c67ab | [
"MIT"
] | null | null | null | ad_related/grid_operators.py | taj004/porepy_lab | 2461aa547fafcb7a111d0ade1bbdf302f46c67ab | [
"MIT"
] | null | null | null | """ Ad representation of grid-related quantities needed to write equations. The classes
defined here are mainly wrappers that constructs Ad matrices based on grid information.
"""
from typing import Dict, List, Optional, Tuple, Union
import numpy as np
import scipy.sparse as sps
import porepy as pp
from .operators ... | 38.230769 | 94 | 0.618123 |
bbf2669ea875c263f4947281582ad58b49222edf | 3,844 | py | Python | GusPI/scraper.py | ygeszvain/GusPI | 7cfed85e1cdd77c52456374a2b4fa43dc7715138 | [
"MIT"
] | null | null | null | GusPI/scraper.py | ygeszvain/GusPI | 7cfed85e1cdd77c52456374a2b4fa43dc7715138 | [
"MIT"
] | 1 | 2020-09-10T15:45:42.000Z | 2020-09-10T15:45:42.000Z | GusPI/scraper.py | ygeszvain/GusPI | 7cfed85e1cdd77c52456374a2b4fa43dc7715138 | [
"MIT"
] | null | null | null | import numpy as np
from urllib.request import urlopen
from bs4 import BeautifulSoup
import time
import pandas as pd
def YelpBizInfo(CUISINES):
biz = []
aggregateRating = []
priceRange = []
streetAddress = []
addressLocality = []
addressRegion = []
postalCode = []
yelp = []
for nam... | 43.191011 | 163 | 0.6064 |
3d73c4ea7a6365a61c2625f9399e2b4a21b4b575 | 1,573 | py | Python | smarts-imitation/smarts_imitation/utils/env_split.py | zbzhu99/NGSIM_Imitation | 0af6ce327e4fc4da32eddb08ba0bba5403dac24e | [
"MIT"
] | 3 | 2022-01-28T01:33:04.000Z | 2022-02-21T13:43:43.000Z | smarts-imitation/smarts_imitation/utils/env_split.py | zbzhu99/NGSIM_GAIL | 0af6ce327e4fc4da32eddb08ba0bba5403dac24e | [
"MIT"
] | null | null | null | smarts-imitation/smarts_imitation/utils/env_split.py | zbzhu99/NGSIM_GAIL | 0af6ce327e4fc4da32eddb08ba0bba5403dac24e | [
"MIT"
] | null | null | null | from collections import OrderedDict, defaultdict
from functools import partial
def to_ordered_dict(origin_dict):
if not isinstance(origin_dict, dict):
return origin_dict
ordered_dict = OrderedDict()
for key, value in sorted(origin_dict.items()):
ordered_dict[key] = to_ordered_dict(value)
... | 36.581395 | 90 | 0.6726 |
4f89193acc9f00eef02b71bb02f9be9da5c03655 | 1,446 | py | Python | bot/cogs/memes.py | issuemeaname/rammus-discord-bot | 23bcb02af11b8b764d75fa974149164f0086c1ea | [
"MIT"
] | 1 | 2020-07-07T05:02:40.000Z | 2020-07-07T05:02:40.000Z | bot/cogs/memes.py | issuemeaname/rammus-discord-bot | 23bcb02af11b8b764d75fa974149164f0086c1ea | [
"MIT"
] | null | null | null | bot/cogs/memes.py | issuemeaname/rammus-discord-bot | 23bcb02af11b8b764d75fa974149164f0086c1ea | [
"MIT"
] | 2 | 2019-02-07T18:26:43.000Z | 2021-07-04T16:58:41.000Z | from typing import Union
import discord
from discord.ext import commands
class Memes(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(usage="{0}f chat\n{0}f @DJ#3333", aliases=["respect"])
async def f(self, ctx, *, reason: Union[discord.Member, str] = None):
"""
... | 29.510204 | 78 | 0.556708 |
62dae77675369ca5d6edbcf842d3ab95bb1cfb7c | 932 | py | Python | tests/integrations/django/myapp/views.py | vincenthcui/sentry-python | 09256920ea607dbe967b25a29410699a3fbcc89e | [
"BSD-2-Clause"
] | null | null | null | tests/integrations/django/myapp/views.py | vincenthcui/sentry-python | 09256920ea607dbe967b25a29410699a3fbcc89e | [
"BSD-2-Clause"
] | null | null | null | tests/integrations/django/myapp/views.py | vincenthcui/sentry-python | 09256920ea607dbe967b25a29410699a3fbcc89e | [
"BSD-2-Clause"
] | null | null | null | from django.contrib.auth import login
from django.contrib.auth.models import User
from django.http import HttpResponse, HttpResponseServerError
from django.views.generic import ListView
import sentry_sdk
def view_exc(request):
1 / 0
def message(request):
sentry_sdk.capture_message("hi")
return HttpResp... | 23.3 | 84 | 0.732833 |
7c33ae7d3540a97a70bed56afc3be406bf8a63a2 | 1,450 | py | Python | typeidea/comment/migrations/0001_initial.py | buzzzzx/typeidea | ffbf46ef8f300380637a6fc02c10c1f493761e8b | [
"MIT"
] | null | null | null | typeidea/comment/migrations/0001_initial.py | buzzzzx/typeidea | ffbf46ef8f300380637a6fc02c10c1f493761e8b | [
"MIT"
] | null | null | null | typeidea/comment/migrations/0001_initial.py | buzzzzx/typeidea | ffbf46ef8f300380637a6fc02c10c1f493761e8b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2018-02-01 08:49
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('blog', '0001_initial'),
]
oper... | 40.277778 | 148 | 0.60069 |
86800607bc6e439875386d7a88ee301c35649c45 | 2,974 | py | Python | database/logs.py | sanxiadaba/pythonBlog | f511e5db101f3a3886ffd65c3afdc0d35e8d3362 | [
"Apache-2.0"
] | 2 | 2021-12-09T16:47:37.000Z | 2021-12-10T02:34:10.000Z | database/logs.py | sanxiadaba/pythonBlog | f511e5db101f3a3886ffd65c3afdc0d35e8d3362 | [
"Apache-2.0"
] | 1 | 2021-12-09T16:45:33.000Z | 2021-12-09T16:45:33.000Z | database/logs.py | sanxiadaba/pythonBlog | f511e5db101f3a3886ffd65c3afdc0d35e8d3362 | [
"Apache-2.0"
] | null | null | null | import datetime
import time
from flask import session, request
from sqlalchemy import Table
from common.connectDb import connectDb
dbsession, md, DBase = connectDb()
class Log(DBase):
__table__ = Table("log", md, autoload=True)
# Insert log table
def insertDetail(self, type, target, credit, userid=Non... | 38.623377 | 111 | 0.607935 |
0c20622311e1f14a3c4490505a1cd74b2c631972 | 33,003 | py | Python | pandas/tests/indexing/test_indexing.py | faisal-deepsource/pandas | df91d4a9c9fee61591ebeecc851b50f7df79c83b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2017-12-14T19:50:52.000Z | 2020-04-07T16:47:23.000Z | pandas/tests/indexing/test_indexing.py | faisal-deepsource/pandas | df91d4a9c9fee61591ebeecc851b50f7df79c83b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-07-24T17:35:03.000Z | 2021-07-24T17:35:03.000Z | pandas/tests/indexing/test_indexing.py | faisal-deepsource/pandas | df91d4a9c9fee61591ebeecc851b50f7df79c83b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-08-12T01:32:36.000Z | 2020-08-12T01:32:36.000Z | """ test fancy indexing & misc """
from datetime import datetime
import re
import weakref
import numpy as np
import pytest
import pandas.util._test_decorators as td
from pandas.core.dtypes.common import (
is_float_dtype,
is_integer_dtype,
)
import pandas as pd
from pandas import (
DataFrame,
Index,... | 33.676531 | 88 | 0.522649 |
0ade3964d2a38dd4c7098601d210eb7c5e8cbdfe | 1,731 | py | Python | src/python/pants/process/xargs.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/process/xargs.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/process/xargs.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import errno
from pants.util.process_handler import subprocess
class Xargs(object):
... | 29.844828 | 98 | 0.69093 |
fab94947f0463415b711addfdeff726669066e9d | 42,602 | py | Python | neutron/tests/unit/scheduler/test_dhcp_agent_scheduler.py | hashsos/hashcloudos-neutron | 76ec5ca105043be6bf7220b5c5684190ddf14952 | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/scheduler/test_dhcp_agent_scheduler.py | hashsos/hashcloudos-neutron | 76ec5ca105043be6bf7220b5c5684190ddf14952 | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/scheduler/test_dhcp_agent_scheduler.py | hashsos/hashcloudos-neutron | 76ec5ca105043be6bf7220b5c5684190ddf14952 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 OpenStack Foundation
#
# 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 w... | 46.056216 | 79 | 0.621755 |
e15a9b14938eb2565b44bee925986ede85f57347 | 4,197 | py | Python | jogo_da_velha.py | MatheusSouza70/Exerc-cios-Python | f8878a0c9d62e49db61dcbce0ee10a161e12a894 | [
"MIT"
] | 1 | 2022-03-14T01:35:09.000Z | 2022-03-14T01:35:09.000Z | jogo_da_velha.py | MatheusSouza70/Exerc-cios-Python | f8878a0c9d62e49db61dcbce0ee10a161e12a894 | [
"MIT"
] | null | null | null | jogo_da_velha.py | MatheusSouza70/Exerc-cios-Python | f8878a0c9d62e49db61dcbce0ee10a161e12a894 | [
"MIT"
] | null | null | null |
tabela = ['_','_','_','_','_','_','_','_','_']
print(" =-=-=-=-=-= Jogo Da Velha =-=-=-=-=-=-=")
print("""
| |
1 | 2 | 3
_____|_____|_____
| |
4 | 5 | 6
_____|_____|_____
| |
7 | 8 | 9
... | 31.556391 | 88 | 0.465094 |
bae8ee3ff4678710b82ba0dd9f2e44359e3e9ca8 | 11,539 | py | Python | src/OFS/tests/testCopySupportEvents.py | MatthewWilkes/Zope | 740f934fc9409ae0062e8f0cd6dcfd8b2df00376 | [
"ZPL-2.1"
] | 1 | 2018-12-07T21:19:58.000Z | 2018-12-07T21:19:58.000Z | src/OFS/tests/testCopySupportEvents.py | MatthewWilkes/Zope | 740f934fc9409ae0062e8f0cd6dcfd8b2df00376 | [
"ZPL-2.1"
] | null | null | null | src/OFS/tests/testCopySupportEvents.py | MatthewWilkes/Zope | 740f934fc9409ae0062e8f0cd6dcfd8b2df00376 | [
"ZPL-2.1"
] | null | null | null | import unittest
import Testing
import Zope2
Zope2.startup()
import transaction
from Testing.makerequest import makerequest
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager
from OFS.SimpleItem import SimpleItem
from OFS.Folder import Folde... | 34.547904 | 77 | 0.592946 |
8e7ce0cc2f2af1e73249df7b3955225dae61b055 | 3,031 | py | Python | sci/db.py | WhiteAu/sci-pkg | b4b816d5b9a541e39b0ef167cc29adf92cd22b33 | [
"Apache-2.0"
] | 1 | 2019-01-14T11:13:32.000Z | 2019-01-14T11:13:32.000Z | sci/db.py | Bhanditz/sci-pkg | c3e376b0362d28aa4f847213325c71e5da9c1976 | [
"Apache-2.0"
] | null | null | null | sci/db.py | Bhanditz/sci-pkg | c3e376b0362d28aa4f847213325c71e5da9c1976 | [
"Apache-2.0"
] | null | null | null | # ### sci-pkg ###
# db: functions for DBMS (postgres, mysql, sqlite, mssql etc)
#
import os
class postgres:
"""
Examples:
mydb = mssql('the-bucket', 'virtual/sub/directory')
the password should be stored in ~/.pgpass
"""
def __init__(self, host, dbname, user, password, port=5432):
... | 29.715686 | 77 | 0.583306 |
9134101ac2acb36e67d0484aa9ec9442fa63d777 | 4,010 | py | Python | integrationtest/vm/perf/host/test_stub.py | sherry546/zstack-woodpecker | 54a37459f2d72ce6820974feaa6eb55772c3d2ce | [
"Apache-2.0"
] | 1 | 2021-03-21T12:41:11.000Z | 2021-03-21T12:41:11.000Z | integrationtest/vm/perf/host/test_stub.py | sherry546/zstack-woodpecker | 54a37459f2d72ce6820974feaa6eb55772c3d2ce | [
"Apache-2.0"
] | null | null | null | integrationtest/vm/perf/host/test_stub.py | sherry546/zstack-woodpecker | 54a37459f2d72ce6820974feaa6eb55772c3d2ce | [
"Apache-2.0"
] | 1 | 2017-05-19T06:40:40.000Z | 2017-05-19T06:40:40.000Z | '''
Create an unified test_stub to share test operations
@author: Carl
'''
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.operations.resource_operations as res_ops
import zstackwoodpecker.operations.co... | 38.932039 | 113 | 0.65586 |
30953b2f4ac1e9d402e096cec72e7fe2ab5e1547 | 788 | py | Python | tests/homework/b_in_proc_out/tests_in_proc_out.py | acc-cosc-1336-spring-2022/acc-cosc-1336-spring-2022-JulianCotto | 9ca01999e50c33f68e5b56af15dd2f42ab557e3a | [
"MIT"
] | null | null | null | tests/homework/b_in_proc_out/tests_in_proc_out.py | acc-cosc-1336-spring-2022/acc-cosc-1336-spring-2022-JulianCotto | 9ca01999e50c33f68e5b56af15dd2f42ab557e3a | [
"MIT"
] | null | null | null | tests/homework/b_in_proc_out/tests_in_proc_out.py | acc-cosc-1336-spring-2022/acc-cosc-1336-spring-2022-JulianCotto | 9ca01999e50c33f68e5b56af15dd2f42ab557e3a | [
"MIT"
] | null | null | null | import unittest
'''
The file at /src/homework/b_in_proc_out/output has
the function get_number.
'''
from src.homework.b_in_proc_out.output import multiply_numbers
#num1 = int(5)
#num2 = int(5)
class Test_Config(unittest.TestCase):
#def test_get_number_1(self):
#test that the function get_number return... | 24.625 | 63 | 0.704315 |
842dcacb1c0f481a010905848d849f90616b7ea2 | 4,294 | py | Python | Bot/bot.py | DevilKing89/Account_checkbot | 81e17cc3f14696bb081cf4ad7bc5064dd5c21f6d | [
"MIT"
] | null | null | null | Bot/bot.py | DevilKing89/Account_checkbot | 81e17cc3f14696bb081cf4ad7bc5064dd5c21f6d | [
"MIT"
] | null | null | null | Bot/bot.py | DevilKing89/Account_checkbot | 81e17cc3f14696bb081cf4ad7bc5064dd5c21f6d | [
"MIT"
] | null | null | null | from telegram import InlineKeyboardButton, InlineKeyboardMarkup
from telegram.ext import ( CommandHandler, Filters, MessageHandler, Updater)
from message import Editmessage, Sendmessage, logger
from Checks.Altbalaji import altbalaji_helper
from Checks.hoichoi import hoichoi_helper
from Checks.voot import Voot_helper
fr... | 34.910569 | 443 | 0.635538 |
58768bb2eadaa1c1ad98e6de87e40d0140e0352d | 44,315 | py | Python | djstripe/migrations/0002_auto_20180627_1121.py | IvanMacek/dj-stripe | 5d9787c654898ea472b40b6af4decf0dd39da7cb | [
"MIT"
] | null | null | null | djstripe/migrations/0002_auto_20180627_1121.py | IvanMacek/dj-stripe | 5d9787c654898ea472b40b6af4decf0dd39da7cb | [
"MIT"
] | null | null | null | djstripe/migrations/0002_auto_20180627_1121.py | IvanMacek/dj-stripe | 5d9787c654898ea472b40b6af4decf0dd39da7cb | [
"MIT"
] | null | null | null | # Generated by Django 2.0.6 on 2018-06-27 08:21
import django.db.models.deletion
from django.db import migrations, models
import djstripe.fields
class Migration(migrations.Migration):
dependencies = [
("djstripe", "0001_initial"),
]
operations = [
migrations.AlterField(
mod... | 59.007989 | 563 | 0.638475 |
0708247aba2fdea6604aaf9f88c83f714fe88f9b | 1,104 | py | Python | upload.py | makeralchemy/flask-upload | b077f7aac67da90662dd0ec5aa4517999578e9e1 | [
"MIT"
] | null | null | null | upload.py | makeralchemy/flask-upload | b077f7aac67da90662dd0ec5aa4517999578e9e1 | [
"MIT"
] | null | null | null | upload.py | makeralchemy/flask-upload | b077f7aac67da90662dd0ec5aa4517999578e9e1 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, url_for, abort
import os
app = Flask(__name__)
app.config['UPLOAD_PATH'] = 'uploads'
app.config['MAX_CONTENT_LENGTH'] = 10 * 1024 * 1024 # 10 MB
app.config['UPLOAD_EXTENSIONS'] = [ '.jpg', '.png', '.gif'
, '.pdf', '.csv'
... | 35.612903 | 95 | 0.538949 |
cafb40e6c05992ca842f96610b86cf9e6aea38e0 | 2,281 | py | Python | src/lbry_channel_mirror/lbry_client.py | EnigmaCurry/lbry_channel_mirror | 6e4fbcafdd4280ee2d455106934577462b8f009f | [
"MIT"
] | null | null | null | src/lbry_channel_mirror/lbry_client.py | EnigmaCurry/lbry_channel_mirror | 6e4fbcafdd4280ee2d455106934577462b8f009f | [
"MIT"
] | null | null | null | src/lbry_channel_mirror/lbry_client.py | EnigmaCurry/lbry_channel_mirror | 6e4fbcafdd4280ee2d455106934577462b8f009f | [
"MIT"
] | null | null | null | import json
import requests
import uuid
import logging
import pprint
log = logging.getLogger("lbry_client")
class LbryRpcException(Exception):
pass
class LbryRpcClient:
def __init__(self, endpoint):
self.__endpoint = endpoint
self.__pprint = pprint.PrettyPrinter(indent=2)
def __call(self... | 36.206349 | 103 | 0.599737 |
4877440649a885ca6fcabf0da292f59e50baded4 | 1,826 | py | Python | internal/notes/builtin-SAVE/packages/xf86driproto/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/xf86driproto/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/xf86driproto/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 43.47619 | 85 | 0.687842 |
7353e7dec64cb57fdfc6d03112dae7e52be51a68 | 3,502 | py | Python | plugins/holland.backup.mysqldump/holland/backup/mysqldump/mock/env.py | a5a351e7/holland | 58a12a5ce10206eed9434ab42b02217de29784bb | [
"BSD-3-Clause"
] | null | null | null | plugins/holland.backup.mysqldump/holland/backup/mysqldump/mock/env.py | a5a351e7/holland | 58a12a5ce10206eed9434ab42b02217de29784bb | [
"BSD-3-Clause"
] | null | null | null | plugins/holland.backup.mysqldump/holland/backup/mysqldump/mock/env.py | a5a351e7/holland | 58a12a5ce10206eed9434ab42b02217de29784bb | [
"BSD-3-Clause"
] | null | null | null | import logging
#For 2.7 or newer use unittest.mock
try:
from unittest.mock import MagicMock, ANY
except ImportError:
from mock import MagicMock, ANY
from . import storage
from ._subprocess import PopenMock
LOG = logging.getLogger(__name__)
class SpecialArgument(object):
"""Base for special arguments for ... | 26.330827 | 72 | 0.671616 |
211956848a5bdd68eaeb0ebb41c20e7b96d7b6da | 65,529 | py | Python | src/sage/interfaces/r.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 1,742 | 2015-01-04T07:06:13.000Z | 2022-03-30T11:32:52.000Z | src/sage/interfaces/r.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 66 | 2015-03-19T19:17:24.000Z | 2022-03-16T11:59:30.000Z | src/sage/interfaces/r.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 495 | 2015-01-10T10:23:18.000Z | 2022-03-24T22:06:11.000Z | # -*- coding: utf-8 -*-
r"""
Interfaces to R
This is the reference to the Sagemath R interface, usable from any
Sage program.
The %r interface creating an R cell in the sage
notebook is decribed in the Notebook manual.
The %R and %%R interface creating an R line or an R cell in the
Jupyter notebook are briefly decri... | 31.489188 | 205 | 0.547025 |
5d35fd2cd6da438c9e1e819ff846a959994a6c93 | 3,428 | py | Python | main_experiment.py | TheBonheurs/neural-processes | 5834bc65f406456e53c363ade1cb0f2a5f23a033 | [
"MIT"
] | null | null | null | main_experiment.py | TheBonheurs/neural-processes | 5834bc65f406456e53c363ade1cb0f2a5f23a033 | [
"MIT"
] | 1 | 2021-04-16T22:47:29.000Z | 2021-04-16T22:47:29.000Z | main_experiment.py | TheBonheurs/neural-processes | 5834bc65f406456e53c363ade1cb0f2a5f23a033 | [
"MIT"
] | null | null | null | import json
import os
import sys
import torch
import matplotlib.pyplot as plt
import numpy as np
from gru import GRUNet
from utils import context_target_split
from torch.utils.data import DataLoader
from datasets import mnist, celeba, SineData
from neural_process import NeuralProcessImg
from neural_process import Neura... | 33.281553 | 101 | 0.687865 |
8dfacc4de9fe1de0b2b1b30c3123e978400b43d1 | 449 | py | Python | data/scripts/templates/object/mobile/shared_dressed_musician_trainer_02.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/mobile/shared_dressed_musician_trainer_02.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/mobile/shared_dressed_musician_trainer_02.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_dressed_musician_trainer_02.iff"
result.attribute_template_id ... | 26.411765 | 73 | 0.732739 |
3502f5093a8e27e656f0615ab0d3dcf09e4a1456 | 5,775 | py | Python | openGaussBase/testcase/GUC/ERROR_TOLERANCE/Opengauss_Function_Guc_Error_Tolerance_Case0012.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/GUC/ERROR_TOLERANCE/Opengauss_Function_Guc_Error_Tolerance_Case0012.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/GUC/ERROR_TOLERANCE/Opengauss_Function_Guc_Error_Tolerance_Case0012.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 42.777778 | 84 | 0.581645 |
a5361802f94c053b3ee7f42770d4b3868ff56e1c | 7,434 | py | Python | qa/rpc-tests/test_framework/authproxy.py | gtacoin-dev/gtacoin | f66f063b47ba973856c200074db1b95abf5ab794 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/authproxy.py | gtacoin-dev/gtacoin | f66f063b47ba973856c200074db1b95abf5ab794 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/authproxy.py | gtacoin-dev/gtacoin | f66f063b47ba973856c200074db1b95abf5ab794 | [
"MIT"
] | null | null | null |
"""
Copyright 2011 Jeff Garzik
AuthServiceProxy has the following improvements over python-jsonrpc's
ServiceProxy class:
- HTTP connections persist for the life of the AuthServiceProxy object
(if server supports HTTP/1.1)
- sends protocol 'version', per JSON-RPC 1.1
- sends proper, incrementing 'id'
... | 39.967742 | 141 | 0.624294 |
86bf06f9c0e3a5bca1fa487aa90f28b08a947dce | 2,021 | py | Python | docs/conf.py | hugohewitt123/hugohewitt123-Programming-ECM1400-Coursework-3 | 0e1232a33a328e453dc55cc891d73d7c3b4228d5 | [
"MIT"
] | null | null | null | docs/conf.py | hugohewitt123/hugohewitt123-Programming-ECM1400-Coursework-3 | 0e1232a33a328e453dc55cc891d73d7c3b4228d5 | [
"MIT"
] | null | null | null | docs/conf.py | hugohewitt123/hugohewitt123-Programming-ECM1400-Coursework-3 | 0e1232a33a328e453dc55cc891d73d7c3b4228d5 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
... | 36.745455 | 80 | 0.653142 |
4bbfd811a5a45b45d5ae9bb633535465b6934b2d | 2,634 | py | Python | rdmo/conditions/tests/test_validator_locked.py | berkerY/rdmo | c0500f9b6caff9106a254a05e0d0e8018fc8db28 | [
"Apache-2.0"
] | 77 | 2016-08-09T11:40:20.000Z | 2022-03-06T11:03:26.000Z | rdmo/conditions/tests/test_validator_locked.py | MSpenger/rdmo | c0500f9b6caff9106a254a05e0d0e8018fc8db28 | [
"Apache-2.0"
] | 377 | 2016-07-01T13:59:36.000Z | 2022-03-30T13:53:19.000Z | rdmo/conditions/tests/test_validator_locked.py | MSpenger/rdmo | c0500f9b6caff9106a254a05e0d0e8018fc8db28 | [
"Apache-2.0"
] | 47 | 2016-06-23T11:32:19.000Z | 2022-03-01T11:34:37.000Z | import pytest
from django.core.exceptions import ValidationError
from rest_framework.exceptions import \
ValidationError as RestFameworkValidationError
from ..models import Condition
from ..serializers.v1 import ConditionSerializer
from ..validators import ConditionLockedValidator
def test_create(db):
Condit... | 21.414634 | 66 | 0.700456 |
6c45cc6f7e2cdc8789e55596cbf1c152fadaa7f5 | 10,011 | py | Python | official/vision/beta/modeling/retinanet_model_test.py | melG81/models | d9ed5232648228ad58b9d50e29d8fe3bb6aa7c4a | [
"Apache-2.0"
] | 1 | 2021-05-12T08:34:32.000Z | 2021-05-12T08:34:32.000Z | official/vision/beta/modeling/retinanet_model_test.py | melG81/models | d9ed5232648228ad58b9d50e29d8fe3bb6aa7c4a | [
"Apache-2.0"
] | 2 | 2021-05-09T07:09:43.000Z | 2021-05-09T07:11:45.000Z | official/vision/beta/modeling/retinanet_model_test.py | melG81/models | d9ed5232648228ad58b9d50e29d8fe3bb6aa7c4a | [
"Apache-2.0"
] | 2 | 2017-12-21T08:58:36.000Z | 2018-12-24T05:53:51.000Z | # Copyright 2021 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... | 33.935593 | 80 | 0.653481 |
950d3f623992f0e00948919b19b8b3ddc479b718 | 1,770 | py | Python | voltha/northbound/grpc/grpc_client.py | sathishms77/test | bf8df6fc16c41720c7d99ed1ff17a64b543e9672 | [
"Apache-2.0"
] | 72 | 2017-01-18T02:36:34.000Z | 2022-02-12T15:28:30.000Z | voltha/northbound/grpc/grpc_client.py | sathishms77/test | bf8df6fc16c41720c7d99ed1ff17a64b543e9672 | [
"Apache-2.0"
] | 11 | 2017-03-03T17:56:09.000Z | 2022-02-11T03:38:03.000Z | voltha/northbound/grpc/grpc_client.py | sathishms77/test | bf8df6fc16c41720c7d99ed1ff17a64b543e9672 | [
"Apache-2.0"
] | 120 | 2017-02-02T23:26:11.000Z | 2022-03-13T05:30:23.000Z | #
# Copyright 2017 the original author or 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 applicable law or... | 32.777778 | 79 | 0.69774 |
eb083b20d84d3d0d85345be607c01dbf51b20a6a | 440 | py | Python | djweb/dj_comp_hist/migrations/0011_auto_20190118_1714.py | ifeife123/computation_hist | 57f0165d47c0df23ffd910bb249f29c16e9c1bc1 | [
"BSD-3-Clause"
] | null | null | null | djweb/dj_comp_hist/migrations/0011_auto_20190118_1714.py | ifeife123/computation_hist | 57f0165d47c0df23ffd910bb249f29c16e9c1bc1 | [
"BSD-3-Clause"
] | 1 | 2018-12-13T02:01:02.000Z | 2018-12-13T02:01:02.000Z | djweb/dj_comp_hist/migrations/0011_auto_20190118_1714.py | ktmurray1999/computation_hist | c51a8904060517b2aa8b1056ff0c61f24c138680 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.1.5 on 2019-01-18 22:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dj_comp_hist', '0010_auto_20190118_2001'),
]
operations = [
migrations.AlterField(
model_name='text',
name='page',
... | 23.157895 | 103 | 0.620455 |
3581c2c7930178bcabcaeb6db4d31e84f68cc76d | 5,877 | py | Python | deps/mrtaskman/server/third_party/prodeagle/counter_names.py | mims2707/bite-project | d6ce4e97fcf0ce666ec92498ff2c2b77c6fe80db | [
"Apache-2.0"
] | 11 | 2015-05-27T04:07:32.000Z | 2021-05-24T11:55:59.000Z | deps/mrtaskman/server/third_party/prodeagle/counter_names.py | mims2707/bite-project | d6ce4e97fcf0ce666ec92498ff2c2b77c6fe80db | [
"Apache-2.0"
] | 1 | 2017-12-14T05:25:34.000Z | 2017-12-14T05:25:34.000Z | deps/mrtaskman/server/third_party/prodeagle/counter_names.py | katmoon/bite-project | d6ce4e97fcf0ce666ec92498ff2c2b77c6fe80db | [
"Apache-2.0"
] | 5 | 2016-03-31T13:27:39.000Z | 2019-02-25T01:18:24.000Z | #!/usr/bin/env python
#
# Copyright 2011 MiuMeet AG.
#
# 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... | 35.403614 | 79 | 0.636379 |
fd87de7444bea6b71f6cc878cfcafe977c139db6 | 1,613 | py | Python | knock.py | k3an3/iasg-ctf-bulb-api | cc51e2c4787cc0ac347c620d0d1d6c7bdeb3a977 | [
"MIT"
] | null | null | null | knock.py | k3an3/iasg-ctf-bulb-api | cc51e2c4787cc0ac347c620d0d1d6c7bdeb3a977 | [
"MIT"
] | null | null | null | knock.py | k3an3/iasg-ctf-bulb-api | cc51e2c4787cc0ac347c620d0d1d6c7bdeb3a977 | [
"MIT"
] | null | null | null | import socket
from select import select
from threading import Thread
from time import sleep
import datetime
knock_ports = (6666, 9990, 55234, 8792, 65535, 10000)
sockets = []
clients = {}
delays = {}
FLAG = b'flag{real_flag_will_appear_here}'
def return_flag():
s = socket.socket(socket.AF_INET, socket.SOCK_STRE... | 26.883333 | 89 | 0.579665 |
752654b2ec2f149a5404dc6f49e0c6a7d39804a9 | 3,492 | py | Python | squareconnect/models/catalog_category.py | kralca/connect-python-sdk | e05197ebf85cedea75511208927a7435b3a19b4d | [
"Apache-2.0"
] | null | null | null | squareconnect/models/catalog_category.py | kralca/connect-python-sdk | e05197ebf85cedea75511208927a7435b3a19b4d | [
"Apache-2.0"
] | null | null | null | squareconnect/models/catalog_category.py | kralca/connect-python-sdk | e05197ebf85cedea75511208927a7435b3a19b4d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Copyright 2017 Square, 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 la... | 27.714286 | 101 | 0.553551 |
023e1b566b9444c9ef26ffc1c219a89836941396 | 6,306 | py | Python | anime_downloader/sites/animixplay.py | Sultron/anime-downloader | 684014c8db82c7bd49d27b7b85e5dbc10d8134bf | [
"Unlicense"
] | null | null | null | anime_downloader/sites/animixplay.py | Sultron/anime-downloader | 684014c8db82c7bd49d27b7b85e5dbc10d8134bf | [
"Unlicense"
] | 2 | 2020-09-26T09:50:21.000Z | 2020-09-26T16:27:33.000Z | anime_downloader/sites/animixplay.py | Sultron/anime-downloader | 684014c8db82c7bd49d27b7b85e5dbc10d8134bf | [
"Unlicense"
] | null | null | null | from anime_downloader.sites.anime import Anime, AnimeEpisode, SearchResult
from anime_downloader.sites import helpers
import base64
import json
import logging
from anime_downloader.const import HEADERS
logger = logging.getLogger(__name__)
class AniMixPlay(Anime, sitename='animixplay'):
sitename = 'animixplay'
... | 44.408451 | 118 | 0.536949 |
1d7aa810826a58963362c9e30f1c9bedf3c4baf2 | 1,121 | py | Python | src/custom/filter_male_female.py | kittaaron/kittaaron_facenet | 706b637c9876a697b3d642d6ad3d6fd308403e66 | [
"MIT"
] | null | null | null | src/custom/filter_male_female.py | kittaaron/kittaaron_facenet | 706b637c9876a697b3d642d6ad3d6fd308403e66 | [
"MIT"
] | null | null | null | src/custom/filter_male_female.py | kittaaron/kittaaron_facenet | 706b637c9876a697b3d642d6ad3d6fd308403e66 | [
"MIT"
] | null | null | null | import os
import shutil
org_dir_name = 'D:\\education\\CASIA_V5\\CASIA-FACEV5_160'
female_dir_name = 'D:\\education\\CASIA_V5\\CASIA-FACEV5_160_FEMALE'
target_male_dir = 'D:\\education\\CASIA_V5\\CASIA-FACEV5_160_MALE'
def copy_male():
for root, dirs, files in os.walk(org_dir_name):
for subdir in dirs:
... | 32.028571 | 98 | 0.594112 |
50d79fd9e0442292c2da6244b1014a776de6b2e9 | 2,561 | py | Python | predict_raw.py | lhm30/PIDGIN | 809f36036fdefc3a718b6e83d76ef0ed82e43bd2 | [
"MIT"
] | 13 | 2015-06-03T21:01:43.000Z | 2021-12-13T17:27:07.000Z | predict_raw.py | lhm30/PIDGIN | 809f36036fdefc3a718b6e83d76ef0ed82e43bd2 | [
"MIT"
] | null | null | null | predict_raw.py | lhm30/PIDGIN | 809f36036fdefc3a718b6e83d76ef0ed82e43bd2 | [
"MIT"
] | 3 | 2015-10-26T15:06:37.000Z | 2017-02-08T20:42:39.000Z | #Author : Lewis Mervin lhm30@cam.ac.uk
#Supervisor : Dr. A. Bender
#All rights reserved 2014
#Protein Target Prediction Tool trained on SARs from PubChem (Mined 08/04/14) and ChEMBL18
#Molecular Descriptors : 2048bit Morgan Binary Fingerprints (Rdkit) - ECFP4
#Dependencies : rdkit, sklearn, numpy
#libraries
from rdkit... | 32.0125 | 108 | 0.635689 |
fc5649ce7723d7ca0735cb28dfa04749ed0f162f | 3,288 | py | Python | profiles_project/settings.py | afgv/profiles-rest-api | 04b04fda8705287907e6f33d263e23c00046b147 | [
"MIT"
] | null | null | null | profiles_project/settings.py | afgv/profiles-rest-api | 04b04fda8705287907e6f33d263e23c00046b147 | [
"MIT"
] | null | null | null | profiles_project/settings.py | afgv/profiles-rest-api | 04b04fda8705287907e6f33d263e23c00046b147 | [
"MIT"
] | null | null | null | """
Django settings for profiles_project project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
impor... | 25.292308 | 91 | 0.701338 |
71e1c072c77ba93560b8d674961e5970292f5157 | 7,201 | py | Python | Sudoku/sudoku_generator.py | voussoir/else | 7a7c17999702ade9791c30b8734e565cb9112d34 | [
"BSD-3-Clause"
] | 13 | 2015-03-17T20:21:48.000Z | 2022-02-01T10:24:26.000Z | Sudoku/sudoku_generator.py | voussoir/else | 7a7c17999702ade9791c30b8734e565cb9112d34 | [
"BSD-3-Clause"
] | null | null | null | Sudoku/sudoku_generator.py | voussoir/else | 7a7c17999702ade9791c30b8734e565cb9112d34 | [
"BSD-3-Clause"
] | 3 | 2019-05-11T14:19:09.000Z | 2020-12-11T16:53:35.000Z | #!/usr/bin/env python
#
# Sudoku Generator and Solver in 250 lines of python
# Copyright (c) 2006 David Bau. All rights reserved.
#
# Can be used as either a command-line tool or as a cgi script.
#
# As a cgi-script, generates puzzles and estimates their level of
# difficulty. Uses files sudoku-template.pdf/.ps/.... | 28.575397 | 74 | 0.648799 |
37167eeba0c0887d93a0f48667ed2a573935791b | 1,384 | py | Python | django/project/app/etherscan_app/factories.py | lucholeves/ethereum-watcher | 65dff3e14e68cbd169fcd422846f1b97f895752b | [
"MIT"
] | null | null | null | django/project/app/etherscan_app/factories.py | lucholeves/ethereum-watcher | 65dff3e14e68cbd169fcd422846f1b97f895752b | [
"MIT"
] | null | null | null | django/project/app/etherscan_app/factories.py | lucholeves/ethereum-watcher | 65dff3e14e68cbd169fcd422846f1b97f895752b | [
"MIT"
] | null | null | null | from faker import Faker
from typing import Dict, Optional
faker = Faker()
def get_block_attributes(block_number: Optional[int] = None) -> Dict:
"""Returns a block response from Etherscan"""
attributes = {
"uncles": faker.pylist(value_types=["pyint", "pybool"]),
"timeStamp": faker.pyint(),
... | 30.755556 | 69 | 0.568642 |
1a472a96da5661d9d45f74df2652051c145e3ac1 | 1,463 | py | Python | estreamer/__init__.py | nicpenning/fp-05-firepower-cef-connector-arcsight | ca8c89a22e5a4f2b2ae28bf1ee8dac5790607914 | [
"Unlicense"
] | null | null | null | estreamer/__init__.py | nicpenning/fp-05-firepower-cef-connector-arcsight | ca8c89a22e5a4f2b2ae28bf1ee8dac5790607914 | [
"Unlicense"
] | null | null | null | estreamer/__init__.py | nicpenning/fp-05-firepower-cef-connector-arcsight | ca8c89a22e5a4f2b2ae28bf1ee8dac5790607914 | [
"Unlicense"
] | null | null | null |
#********************************************************************
# File: __init__.py
# Author: Sam Strachan
#
# Description:
# estreamer package
#
# Copyright (c) 2017 by Cisco Systems, Inc.
#
# ALL RIGHTS RESERVED. THESE SOURCE FILES ARE THE SOLE PROPERTY
# OF CISCO SYST... | 38.5 | 72 | 0.720437 |
af3a902baec98ed944eb084b9d84b916043fd3d8 | 315 | py | Python | app/database.py | Felipe-e-Wendy/felipe-e-wendy-backend | a50c1206399135a84c8be23e4c6d31003426b1d1 | [
"MIT"
] | null | null | null | app/database.py | Felipe-e-Wendy/felipe-e-wendy-backend | a50c1206399135a84c8be23e4c6d31003426b1d1 | [
"MIT"
] | null | null | null | app/database.py | Felipe-e-Wendy/felipe-e-wendy-backend | a50c1206399135a84c8be23e4c6d31003426b1d1 | [
"MIT"
] | null | null | null | from os import environ
import motor.motor_asyncio
DB_URL = f"mongodb+srv://{environ['MONGODB_USER']}:{environ['MONGODB_PASSWORD']}@cluster0.2wkv6.mongodb.net/{environ['MONGODB_NAME']}?retryWrites=true&w=majority" # noqa
client = motor.motor_asyncio.AsyncIOMotorClient(DB_URL)
db = client[environ["MONGODB_NAME"]]
| 45 | 170 | 0.784127 |
79387120a31530fee9366b657b42314b3b922a36 | 6,760 | py | Python | src/models.py | RobinSatterthwaite/opengl-experiments | 3de0466e7a7937e9fe36c8dbb15b67d9739222e2 | [
"BSD-3-Clause"
] | null | null | null | src/models.py | RobinSatterthwaite/opengl-experiments | 3de0466e7a7937e9fe36c8dbb15b67d9739222e2 | [
"BSD-3-Clause"
] | null | null | null | src/models.py | RobinSatterthwaite/opengl-experiments | 3de0466e7a7937e9fe36c8dbb15b67d9739222e2 | [
"BSD-3-Clause"
] | null | null | null | #=============================================================================#
# #
# Copyright (c) 2016 #
# #
... | 35.957447 | 113 | 0.617308 |
beea365ab7f1c943fe214273d752d0ed01a87e9a | 16,925 | py | Python | tests/test_url_parsing.py | adamchainz/yarl | fa2e925ec37748f51309ef7d87c9a1828b69467d | [
"Apache-2.0"
] | 1 | 2020-06-25T05:48:36.000Z | 2020-06-25T05:48:36.000Z | tests/test_url_parsing.py | adamchainz/yarl | fa2e925ec37748f51309ef7d87c9a1828b69467d | [
"Apache-2.0"
] | null | null | null | tests/test_url_parsing.py | adamchainz/yarl | fa2e925ec37748f51309ef7d87c9a1828b69467d | [
"Apache-2.0"
] | null | null | null | import sys
import pytest
from yarl import URL
class TestScheme:
def test_scheme_path(self):
u = URL("scheme:path")
assert u.scheme == "scheme"
assert u.host is None
assert u.path == "path"
assert u.query_string == ""
assert u.fragment == ""
def test_scheme_pa... | 28.589527 | 81 | 0.519586 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.