repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
openstack/glance | glance/api/v2/tasks.py | 1 | 16834 | # Copyright 2013 IBM Corp.
# All Rights Reserved.
#
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | apache-2.0 | 6,334,792,962,047,081,000 | 35.595652 | 78 | 0.580908 | false |
rwl/PyDyn | pydyn/Pdoption.py | 1 | 1057 | # Copyright (C) 2009 Stijn Cole
# Copyright (C) 2010-2011 Richard Lincoln
#
# 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 require... | apache-2.0 | 4,938,374,857,737,423,000 | 30.088235 | 74 | 0.634816 | false |
chfoo/wpull | wpull/application/tasks/conversion.py | 1 | 2011 | import asyncio
from typing import Optional
from wpull.database.base import NotFound
from wpull.pipeline.item import URLRecord
from wpull.pipeline.pipeline import ItemTask, ItemSource
from wpull.pipeline.app import AppSession
class LinkConversionSetupTask(ItemTask[AppSession]):
@asyncio.coroutine
def process(... | gpl-3.0 | -686,150,176,005,659,400 | 28.144928 | 79 | 0.655395 | false |
lcoandrade/DsgTools | core/Factories/DbCustomizationFactory/defaultCustomization.py | 1 | 2468 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
DsgTools
A QGIS plugin
Brazilian Army Cartographic Production Tools
-------------------
begin : 2016-07-31
git sha ... | gpl-2.0 | -3,361,011,689,052,593,000 | 49.387755 | 177 | 0.468395 | false |
mono9lith/rss-email | src/rss.py | 1 | 33035 | #! /usr/bin/env python
# -*- coding: UTF-8 -*-
#
"""Отправка RSS на E-mail
Требования:
- Python версии 3.0 и выше.
- config.py
- typo.py
Рекомендации:
- наличие в системе локали ru_RU.UTF-8
Использование:
- создать config.json
- (опционально) mkdir archive_<config name>; ARCHIVE -> True
- $ nohup nice -19 python3 rs... | gpl-3.0 | -8,024,633,454,508,756,000 | 34.374408 | 115 | 0.531987 | false |
AdamBSteele/yournewhomepage | fbone/modules/frontend/forms.py | 1 | 4310 | # -*- coding: utf-8 -*-
from flask import Markup, current_app
from flask.ext.wtf import Form
from flask.ext.wtf.html5 import URLField, EmailField, TelField
from wtforms import (ValidationError, BooleanField, TextField, HiddenField, PasswordField,
SubmitField, TextAreaField, IntegerField, RadioField,FileField,
... | bsd-3-clause | -8,060,816,719,266,212,000 | 38.181818 | 111 | 0.660325 | false |
AutorestCI/azure-sdk-for-python | azure-batch/azure/batch/models/pool_remove_nodes_options.py | 1 | 3080 | # 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 ... | mit | -2,259,469,980,075,833,300 | 49.491803 | 191 | 0.692532 | false |
endlessm/chromium-browser | third_party/chromite/cbuildbot/afdo_unittest.py | 1 | 29295 | # -*- coding: utf-8 -*-
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Sometimes we poke 'private' AFDO methods, since that's the most direct way to
# test what we're looking to test. That's OK.
#
# ... | bsd-3-clause | 5,869,353,235,322,691,000 | 36.082278 | 80 | 0.625772 | false |
nakagami/reportlab | src/reportlab/lib/normalDate.py | 1 | 20963 | #!/usr/bin/env python
# normalDate.py - version 1.0 - 20000717
#hacked by Robin Becker 10/Apr/2001
#major changes include
# using Types instead of type(0) etc
# BusinessDate class
# __radd__, __rsub__ methods
# formatMS stuff
# derived from an original version created
# by Jeff Bauer of Rubicon Research and us... | bsd-3-clause | -4,366,325,312,494,363,000 | 32.81129 | 101 | 0.569146 | false |
GoogleCloudPlatform/sap-deployment-automation | third_party/github.com/ansible/awx/awx/main/tests/functional/commands/test_oauth2_token_revoke.py | 2 | 2720 | # Python
import datetime
import pytest
import string
import random
from io import StringIO
# Django
from django.core.management import call_command
from django.core.management.base import CommandError
# AWX
from awx.main.models import RefreshToken
from awx.main.models.oauth import OAuth2AccessToken
from awx.api.versi... | apache-2.0 | 7,834,790,525,911,286,000 | 33.43038 | 104 | 0.610294 | false |
wglass/lighthouse | tests/haproxy/control_tests.py | 1 | 15691 | import errno
import socket
import subprocess
import sys
try:
import unittest2 as unittest
except ImportError:
import unittest
from mock import patch, Mock, mock_open
from lighthouse.haproxy.control import (
HAProxyControl,
UnknownCommandError, PermissionError, UnknownServerError
)
if sys.version_inf... | apache-2.0 | 8,366,356,421,827,712,000 | 29.408915 | 79 | 0.558983 | false |
nschaetti/EchoTorch | echotorch/transforms/text/Transformer.py | 1 | 2127 | # -*- coding: utf-8 -*-
#
# Imports
import torch
# Base class for text transformers
class Transformer(object):
"""
Base class for text transformers
"""
# Constructor
def __init__(self):
"""
Constructor
"""
# Properties
self.symbols = self.generate_symbols(... | gpl-3.0 | 7,657,291,632,524,109,000 | 21.62766 | 54 | 0.41796 | false |
dstufft/warehouse | warehouse/migrations/versions/f404a67e0370_disable_legacy_file_types_unless_a_.py | 1 | 1518 | # 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, software
# distributed under the Li... | apache-2.0 | 6,441,794,969,805,481,000 | 29.755102 | 74 | 0.58925 | false |
wangyum/beam | sdks/python/apache_beam/runners/dataflow/internal/apiclient_test.py | 1 | 10147 | #
# 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 "License"); you may not us... | apache-2.0 | -1,636,396,044,485,334,300 | 43.504386 | 80 | 0.666995 | false |
Azure/azure-sdk-for-python | sdk/recoveryservices/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/aio/operations/_replication_usages_operations.py | 1 | 5558 | # 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 may ... | mit | -4,773,754,817,970,686,000 | 46.504274 | 187 | 0.644476 | false |
half0wl/simon | simon/simon.py | 1 | 4207 | from Foundation import NSTimer, NSRunLoop
from AppKit import NSApplication, NSStatusBar, NSMenu, NSMenuItem, \
NSEventTrackingRunLoopMode
from .stats import cpu_usage, ram_usage, available_memory, disk_read, \
disk_written, network_recv, network_sent
class Simon(NSApplication):
def finishLaunching(self)... | mit | -2,908,278,978,923,838,500 | 33.203252 | 78 | 0.589018 | false |
dmlc/tvm | tests/python/unittest/test_target_codegen_c_host.py | 1 | 4402 | # 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
# "License"); you may not u... | apache-2.0 | 8,880,396,732,525,257,000 | 34.216 | 98 | 0.597001 | false |
openstack/designate | designate/scheduler/filters/fallback_filter.py | 1 | 1584 | # Copyright 2016 Hewlett Packard Enterprise Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | 272,423,216,452,741,820 | 32 | 79 | 0.684975 | false |
crslade/HomeAPI | devices.py | 1 | 8689 | from utilities import ParameterException, get_table_ref
import os
import boto3
import json
from datetime import datetime
from uuid import uuid4 as uuid
from boto3.dynamodb.conditions import Key
#Actions
#create
def create_device(deviceData,roomID):
print("Creating Device")
#ValidateInput
if not 'deviceNam... | mit | -7,731,628,886,154,534,000 | 30.146953 | 151 | 0.659454 | false |
room77/py77 | pylib/monitor/haproxy/conditions.py | 1 | 1403 | """
Conditions for sending alert emails for HAProxy Monitor
A condition is a callable that takes a ProxyStats object and
returns an error string or None for success
"""
from datetime import datetime
__copyright__ = '2013, Room 77, Inc.'
__author__ = 'Kyle Konrad <kyle@room77.com>'
def more_than_n_down(n):
"""
A... | mit | -4,863,717,034,792,221,000 | 28.229167 | 72 | 0.655025 | false |
kernelci/kernelci-backend | app/handlers/tests/test_upload_handler.py | 1 | 3108 | # Copyright (C) Linaro Limited 2015
# Author: Milo Casagrande <milo.casagrande@linaro.org>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your... | lgpl-2.1 | -8,388,358,542,386,236,000 | 34.724138 | 79 | 0.651223 | false |
PrognosisML/ConvNet-Prostate | Malignancy Diagnosis/Process.py | 1 | 4723 | import os
import sys
import tensorflow as tf
import Input
import os, re
FLAGS = tf.app.flags.FLAGS
TOWER_NAME = 'tower'
tf.app.flags.DEFINE_integer('batch_size', 1, "hello")
def _activation_summary(x):
with tf.device('/cpu:0'):
tensor_name = re.sub('%s_[0-9]*/' % TOWER_NAME, '', x.op.name)
tf.s... | lgpl-3.0 | 7,402,761,261,317,179,000 | 40.069565 | 121 | 0.635613 | false |
hbp-brain-charting/public_protocols | spatial_navigation/protocol/py/genRndSequences.py | 1 | 2221 | # _*_ coding: utf-8 _*_
import itertools
import random
from csv_io import write_to_csv as writeToFile
import cPickle
'''
Sequences will be generated as lists, containing all possible combinations of intersections (4), directions (4) and targets (2)
The sequences are encoded as follows: (intersection, direction (st... | bsd-3-clause | 7,523,443,422,153,598,000 | 21.642857 | 154 | 0.673727 | false |
ntymtsiv/tempest | tempest/tests/test_compute_xml_common.py | 1 | 2919 | # Copyright 2013 IBM Corp.
#
# 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 t... | apache-2.0 | 8,565,960,721,395,748,000 | 42.567164 | 79 | 0.643714 | false |
yusufm/mobly | mobly/records.py | 1 | 11891 | #!/usr/bin/env python3.4
#
# Copyright 2016 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... | apache-2.0 | 3,069,121,730,700,974,600 | 32.877493 | 80 | 0.593558 | false |
DayGitH/Python-Challenges | DailyProgrammer/DP20170929C.py | 1 | 2063 | """
[2017-09-29] Challenge #333 [Hard] Build a Web API-driven Data Site
https://www.reddit.com/r/dailyprogrammer/comments/739j8c/20170929_challenge_333_hard_build_a_web_apidriven/
# Description
A common theme in present-day programming are web APIs. We've had a previous challenge where you had to _consume_ an
API, to... | mit | 5,035,554,185,857,980,000 | 53.289474 | 119 | 0.768299 | false |
Asurada2015/TFAPI_translation | NeuralNekworks_function/Activefunction/tf_sigmoid.py | 1 | 1199 | """tf.sigmoid(x, name = None)
解释:这个函数的作用是计算 x 的 sigmoid 函数。具体计算公式为 y = 1 / (1 + exp(-x))。
函数的返回值位于区间[0.0 , 1.0]中,当输入值较大时,tf.sigmoid将返回一个接近于1.0的值,而当输入值较小时,返回值将接近于0.0.
对于在真实输出位于[0.0,1.0]的样本上训练的神经网络,sigmoid函数可将输出保持在[0.0,1.0]内的能力非常有用.
当输出接近于饱和或者剧烈变化是,对输出返回的这种缩减会带来一些不利影响.
当输入为0时,sigmoid函数的输出为0.5,即sigmoid函数值域的中间点
使用例子:"""
i... | apache-2.0 | 2,380,927,556,128,051,000 | 30.347826 | 75 | 0.676838 | false |
willingc/succulent-pups | config/settings/production.py | 1 | 5159 | # -*- coding: utf-8 -*-
'''
Production Configurations
- Use djangosecure
- Use Amazon's S3 for storing static files and uploaded media
- Use mailgun to send emails
- Use Redis on Heroku
'''
from __future__ import absolute_import, unicode_literals
from boto.s3.connection import OrdinaryCallingFormat
from django.utils... | bsd-3-clause | 3,801,262,370,812,564,500 | 36.115108 | 117 | 0.62706 | false |
InsightSoftwareConsortium/ITKExamples | src/Core/Common/ObserveAnEvent/Code.py | 1 | 1028 | #!/usr/bin/env python
# Copyright NumFOCUS
#
# 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.txt
#
# Unless required by applicable law or ... | apache-2.0 | 7,537,944,320,815,879,000 | 25.358974 | 74 | 0.747082 | false |
zasdfgbnm/tensorflow | tensorflow/python/estimator/util.py | 1 | 1811 | # Copyright 2017 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... | apache-2.0 | -1,776,816,529,995,017,500 | 30.224138 | 80 | 0.680287 | false |
gkonstantyno/construct | construct/protocols/layer3/dhcpv4.py | 1 | 6429 | """
Dynamic Host Configuration Protocol for IPv4
http://www.networksorcery.com/enp/protocol/dhcp.htm
http://www.networksorcery.com/enp/protocol/bootp/options.htm
"""
from binascii import unhexlify
from construct import *
from ipv4 import IpAddress
dhcp_option = Struct("dhcp_option",
Enum(Byte("code"),
P... | mit | -2,805,672,608,556,438,000 | 31.969231 | 76 | 0.605226 | false |
gtalarico/pyrevitplus | pyRevitPlus.tab/Smart Align.panel/smartalign.stack/Lib/smartalign/distribute.py | 1 | 3365 | """
Smart Align
Provides Aligning functionality for various Revit Objects.
TESTED REVIT API: 2015 | 2016
Copyright (c) 2014-2016 Gui Talarico
github.com/gtalarico | @gtalarico
This script is part of PyRevitPlus: Extensions for PyRevit
github.com/gtalarico | @gtalarico
-------------------------------------... | gpl-3.0 | -8,550,756,224,317,934,000 | 31.316832 | 82 | 0.653492 | false |
ludoo/wpkit | attic/wpfrontman/wp_frontman/tests/test_cache.py | 1 | 1227 | import unittest
import time
from django.core.cache import cache
from wp_frontman.cache import get_key, get_object_key, get_object_value, set_object_value, cache_timestamps
class DummyObject(object):
def __init__(self, id):
self.id = id
def __eq__(self, other):
if isinstance(other, self... | bsd-3-clause | 3,687,988,769,116,285,400 | 29.7 | 107 | 0.607172 | false |
boknilev/diacritization | extract_data.py | 1 | 7629 | __author__ = 'belinkov'
import sys
import os
import codecs
import re
from data_utils import DIACS, REGEX_DIACS
REGEX_SOLUTION_DIAC = re.compile(r'\((.+?)\)') # for gold diacritized word
class WordAnalysis(object):
"""
A simplified pos analysis from treebank pos/before-treebank files.
Attributes:
... | mit | 4,356,671,307,383,967,000 | 38.528497 | 119 | 0.565998 | false |
tpouyer/nova-lxd | nova_lxd/tests/session/test_profile.py | 1 | 2791 | # Copyright 2015 Canonical Ltd
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | apache-2.0 | -6,601,287,437,658,835,000 | 34.329114 | 76 | 0.626657 | false |
Sout/sigrok-meter | sigrok_meter/util.py | 1 | 3572 | ##
## This file is part of the sigrok-meter project.
##
## Copyright (C) 2015 Jens Steinhauser <jens.steinhauser@gmail.com>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2... | gpl-3.0 | 1,200,301,977,577,231,000 | 41.023529 | 76 | 0.4972 | false |
RudolfCardinal/crate | crate_anon/nlp_manager/parse_biochemistry.py | 1 | 65975 | #!/usr/bin/env python
"""
crate_anon/nlp_manager/parse_biochemistry.py
===============================================================================
Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com).
This file is part of CRATE.
CRATE is free software: you can redistribute it and/or modify
... | gpl-3.0 | -816,009,918,376,030,600 | 32.329965 | 101 | 0.502608 | false |
transientlunatic/minke | minke/antenna.py | 1 | 3841 | """
This module provides functions to calculate antenna factors for a given time, a given sky location and a given detector.
Adapted from the implementation in pylal
"""
import sys
from math import *
import lal
import lalsimulation
__author__ = "Alexander Dietz <Alexander.Dietz@astro.cf.ac.uk>; Daniel Williams <danie... | isc | 5,938,514,258,122,833,000 | 30.743802 | 120 | 0.67899 | false |
20tab/twentytab-seo | seo/template_context/context_processors.py | 1 | 2841 | from seo.models import MetaPage, MetaSite
class MetaContent(object):
"""
MetaContent class define an object that contain informations about page or publication.
These informations are included in template.
"""
def __init__(self):
self.title = ""
self.description = ""
self... | mit | -8,941,388,902,364,435,000 | 31.284091 | 118 | 0.571278 | false |
dogukantufekci/supersalon | config/wsgi.py | 1 | 1452 | """
WSGI config for supersalon project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION... | bsd-3-clause | -7,566,110,440,660,778,000 | 36.230769 | 79 | 0.791322 | false |
citrix-openstack-build/python-saharaclient | saharaclient/openstack/common/importutils.py | 1 | 2367 | # Copyright 2011 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 req... | apache-2.0 | 5,951,684,899,121,669,000 | 31.424658 | 78 | 0.667934 | false |
rfyiamcool/TimeCost | timecost.py | 1 | 1310 | import time
import functools
class TimeCost(object):
def __init__(self, unit='s', precision=4, logger=None):
self.start = None
self.end = None
self.total = 0
self.unit = unit
self.precision = precision
self.__unitfactor = {'s': 1,
'ms': 1000,
... | mit | 9,133,844,000,565,606,000 | 29.465116 | 78 | 0.529008 | false |
ahartoto/lendingclub2 | lendingclub2/request.py | 1 | 2731 | # Filename: request.py
"""
LendingClub2 Request Module
Interface functions:
get
post
"""
# Standard libraries
import datetime
import time
# Requests
import requests
# Lending Club
from lendingclub2.authorization import Authorization
from lendingclub2.config import REQUEST_LIMIT_PER_SEC
from lendingclub2.er... | mit | -9,145,021,347,564,711,000 | 26.585859 | 75 | 0.671183 | false |
zyga/arrowhead | xkcd518.py | 1 | 3193 | #!/usr/bin/env python3
from arrowhead import Flow, step, arrow, main
def ask(prompt):
answer = None
while answer not in ('yes', 'no'):
answer = input(prompt + ' ')
return answer
class XKCD518(Flow):
"""
https://xkcd.com/518/
"""
@step(initial=True, level=1)
@arrow('do_you_un... | bsd-3-clause | -9,054,405,839,265,277,000 | 21.173611 | 62 | 0.509239 | false |
erykoff/redmapper | redmapper/calibration/prepmembers.py | 1 | 3678 | """Classes related to preparing members for the next calibration iteration
"""
import os
import numpy as np
import esutil
from ..catalog import Entry, Catalog
from ..galaxy import GalaxyCatalog
from ..utilities import read_members
from ..configuration import Configuration
class PrepMembers(object):
"""
Class ... | apache-2.0 | -1,909,251,253,028,138,500 | 32.743119 | 111 | 0.467374 | false |
rchatterjee/nocrack | newcode/dte/honey_vault.py | 1 | 12274 | import json
import math
import os
import sys
BASE_DIR = os.getcwd()
sys.path.append(BASE_DIR)
from .honey_enc import DTE, DTE_random
from pcfg.pcfg import TrainedGrammar
import honeyvault_config as hny_config
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from Crypto.Protocol.KDF import PBKDF1
from Crypt... | mit | -92,666,579,949,946,460 | 39.242623 | 108 | 0.538374 | false |
EconForge/dolo | dolo/linter.py | 1 | 17659 | # import ast
# import json
# import ruamel.yaml as ry
# from ruamel.yaml.comments import CommentedSeq
# from dolo.compiler.symbolic import check_expression
# from dolo.compiler.recipes import recipes
# from dolo.misc.termcolor import colored
# class Compare:
# def __init__(self):
# self.d = {}
# def ... | bsd-2-clause | -5,633,091,538,059,207,000 | 33.693517 | 81 | 0.482474 | false |
smurfix/HomEvenT | irrigation/rainman/migrations/0031_auto.py | 1 | 20462 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding M2M table for field xdays on 'Group'
db.create_table('rainman_group_xdays', (
('id', mo... | gpl-3.0 | 4,006,488,282,154,659,000 | 77.402299 | 182 | 0.537973 | false |
rwl/PyCIM | CIM14/ENTSOE/Dynamics/IEC61970/Dynamics/DynamicsMetaBlockParameterReference.py | 1 | 4926 | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit | -4,645,534,073,048,918,000 | 49.783505 | 150 | 0.75944 | false |
jvce92/web-tdd | lists/tests/testView.py | 1 | 4453 | from django.test import TestCase
from django.core.urlresolvers import resolve
from lists.views import homePage
from django.http import HttpRequest
from django.template.loader import render_to_string
from lists.models import Item, List
from django.utils.html import escape
# Create your tests here.
#
# class smokeTest(T... | gpl-3.0 | 5,634,385,062,296,922,000 | 33.789063 | 91 | 0.650573 | false |
radical-cybertools/radical.repex | old/misc/experimental_async/async_with_pipeline_suspend.py | 1 | 9815 | #!/usr/bin/env python
import radical.utils as ru
#import radical.analytics as ra
import radical.entk as re
from radical.entk import Pipeline, Stage, Task, AppManager
import os
import tarfile
import writeInputs
import time
import git
#import replica
#os.environ['RADICAL_SAGA_VERBOSE'] = 'INFO'
os.environ['R... | mit | -1,247,269,295,089,884,200 | 34.690909 | 130 | 0.563423 | false |
FrederichCheng/incubator-superset | superset/sql_lab.py | 1 | 8776 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from time import sleep
from datetime import datetime
import json
import logging
import uuid
import pandas as pd
import sqlalchemy
from sqlalchemy.pool import NullPool
fr... | apache-2.0 | -4,792,927,945,449,039,000 | 33.825397 | 97 | 0.634458 | false |
dextervip/rpv | GerenDisponibilidade/setup.py | 1 | 1613 | from distutils.core import setup
from distutils.command.install import INSTALL_SCHEMES
import os
VERSION = '0.3'
# Fazendo os dados irem para o lugar correto. [Make data go to the right place.]
# http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
for scheme in INST... | gpl-3.0 | -2,980,506,392,158,818,300 | 37.404762 | 104 | 0.688779 | false |
ella/mypage | mypage/pages/migrations/0008_dupe_sites.py | 1 | 3621 |
from south.db import db
from django.db import models
from django.db.models import F
from mypage.pages.models import *
import datetime
class Migration:
def forwards(self, orm):
'''
if not db.dry_run:
orm.UserPage.objects.update(site_copy=F('site'))
orm.SessionPage.objec... | bsd-3-clause | -4,512,450,370,742,625,300 | 45.423077 | 145 | 0.495996 | false |
cupy/cupy | tests/cupyx_tests/scipy_tests/linalg_tests/test_decomp_lu.py | 1 | 4936 | import unittest
import warnings
import numpy
import cupy
from cupy import testing
import cupyx.scipy.linalg
if cupyx.scipy._scipy_available:
import scipy.linalg
@testing.gpu
@testing.parameterize(*testing.product({
'shape': [(1, 1), (2, 2), (3, 3), (5, 5), (1, 5), (5, 1), (2, 5), (5, 2)],
}))
@testing.fix_ra... | mit | 3,208,808,118,296,692,700 | 36.112782 | 78 | 0.595421 | false |
bailabs/bench-v7 | bench/commands/update.py | 1 | 7760 | import click
import sys, os
from bench.config.common_site_config import get_config
from bench.app import pull_all_apps, is_version_upgrade
from bench.utils import (update_bench, validate_upgrade, pre_upgrade, post_upgrade, before_update,
update_requirements, backup_all_sites, patch_sites, build... | gpl-3.0 | 4,466,500,918,880,796,700 | 38.794872 | 160 | 0.677835 | false |
Maleus/Enumerator | enumerator/lib/generic_service.py | 1 | 2366 | #!/usr/bin/env python
"""GenericService encapsulates any
methods which are common across all
service modules.
@author: Steve Coward (steve<at>sugarstack.io)
@version 1.0
"""
import os
import re
class GenericService(object):
static_path = '%s/../static' % os.path.dirname(os.path.realpath(__file__))
compiled_... | mit | -7,374,674,132,465,793,000 | 34.313433 | 97 | 0.569315 | false |
buguen/pylayers | pylayers/util/cone.py | 1 | 20331 | #-*- coding:Utf-8 -*-
r"""
Class Cone
==========
The following conventions are adopted
+ A cone has an **apex** which is a point in the plane.
+ A cone has two vectors which define the cone aperture. The order of those two vectors
matters (u) is the starting vector (u) and (v) the ending vector.
The cone region is... | lgpl-3.0 | 8,532,794,341,175,884,000 | 27.395251 | 128 | 0.4471 | false |
ulif/dropafile | tests/test_dropafile.py | 1 | 14193 | # tests for dropafile module.
import base64
import math
import os
import pytest
import re
import shutil
import subprocess
import tempfile
from contextlib import contextmanager
from io import BytesIO
from werkzeug.datastructures import Headers
from werkzeug.test import Client, create_environ, EnvironBuilder
from werkzeu... | gpl-3.0 | -2,058,787,176,074,779,000 | 35.579897 | 76 | 0.60551 | false |
danylaksono/inasafe | safe/messaging/item/row.py | 1 | 2919 | """
InaSAFE Disaster risk assessment tool developed by AusAid - **Row**
Contact : ole.moller.nielsen@gmail.com
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of... | gpl-3.0 | 1,648,468,602,593,973,200 | 24.605263 | 78 | 0.578623 | false |
robin900/sqlalchemy | test/orm/test_lockmode.py | 2 | 8088 | from sqlalchemy.engine import default
from sqlalchemy.databases import *
from sqlalchemy.orm import mapper
from sqlalchemy.orm import Session
from sqlalchemy.testing import AssertsCompiledSQL, eq_
from sqlalchemy.testing import assert_raises_message
from sqlalchemy import exc
from test.orm import _fixtures
class Lega... | mit | -4,054,647,636,213,751,300 | 32.7 | 95 | 0.61004 | false |
rahulunair/nova | nova/tests/unit/api/openstack/compute/test_serversV21.py | 1 | 378354 | # Copyright 2010-2011 OpenStack Foundation
# Copyright 2011 Piston Cloud Computing, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www... | apache-2.0 | 1,245,279,963,337,041,000 | 43.045867 | 79 | 0.557206 | false |
hansehe/Wind-Blade-Inspection | TestUnits/Test_src/Test_DroneVision/Test_DroneVision_src/Test_imgProcessing/Test_Heading/Test_EdgeHeading.py | 1 | 4905 | '''
Author: Hans Erik Heggem
Email: hans.erik.heggem@gmail.com
Project: Master's Thesis - Autonomous Inspection Of Wind Blades
Repository: Master's Thesis - CV (Computer Vision)
'''
################### UNIT TEST ########################
import unittest
from Settings.TestData import TestData
from TestUnits.Test_ma... | mit | 4,514,450,617,151,839,000 | 42.035088 | 244 | 0.707441 | false |
lddias/python-avs | debug.py | 1 | 1030 | import time
def fake_mic(logger, q, mic_stopped):
time.sleep(60)
logger.debug("TRIGGERED")
class StoppableAudioStreamLike:
def __init__(self, file):
self._f = file
self._eof = False
self._last_byte = None
def read(self, size=-1):
if mic_sto... | mit | -3,517,990,759,981,812,000 | 27.611111 | 95 | 0.495146 | false |
tristandb/CaDaBata | cadabata.py | 1 | 1545 | from eca import *
from eca.generators import start_offline_tweets
import datetime
@event('init')
def setup(ctx, e):
'''The code that will be executed at initialization: starting the offline tweet stream.'''
start_offline_tweets('cadabata_static/batatweets.txt', 'tweet', time_factor=100000, arff_file='classi... | mit | 3,844,286,205,517,304,000 | 27.090909 | 138 | 0.604531 | false |
jeffposnick/chromium-dashboard | common.py | 1 | 6649 | # -*- coding: utf-8 -*-
# Copyright 2013 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 or... | apache-2.0 | 5,276,832,687,915,904,000 | 30.813397 | 80 | 0.630772 | false |
sdrdis/iarpa_contest_submission | lib_exec/StereoPipeline/libexec/asp_cmd_utils.py | 1 | 6816 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# __BEGIN_LICENSE__
# Copyright (c) 2009-2013, United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration. All
# rights reserved.
#
# The NGT platform is licensed under the Apache License, Version 2.0 (the
# "Lic... | mit | -4,660,527,434,852,196,000 | 37.948571 | 119 | 0.59375 | false |
f-frhs/queequeg | document.py | 1 | 5023 | #!/usr/bin/env python
## $Id: document.py,v 1.2 2003/07/27 13:54:05 euske Exp $
##
## document.py - Document analyzer (HTML/TeX/PlainText)
##
import re, sys
from texparser import TexParser, TexTokenizer
from sgmllib_rev import SGMLParser
from abstfilter import AbstractFeeder, AbstractFilter, AbstractConsumer
clas... | gpl-2.0 | 445,269,795,249,341,760 | 18.93254 | 71 | 0.614175 | false |
kayhayen/Nuitka | tests/programs/absolute_import/foobar/foobar.py | 1 | 1043 | # Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python tests originally created or extracted from other peoples work. The
# parts were too small to be protected.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the ... | apache-2.0 | -9,060,150,200,861,828,000 | 32.645161 | 79 | 0.710451 | false |
akelm/YAMS | yams/wzm_layer.py | 1 | 3735 | import numpy as np
from scipy import special
from sum_conv import sum_conv
def wzm_layer(ME1,MM1, MEdd, MMdd,Lambda,odl, Ceps,pin, taun, bn1mat,settings):
## wzmocnienie pola w srodku warstwy
# (Cst{1}.ME,Cst{1}.MM, Cst{dd}.ME, Cst{dd}.MM,...
# lambda, dip_pos ,Cepsilon{dd},theta,stPinTaun )
nNbtheta=pi... | gpl-3.0 | -6,966,585,909,532,253,000 | 37.90625 | 90 | 0.538956 | false |
nrocco/pycli-tools | test/test_ask_user_yesno.py | 1 | 1624 | import os
import sys
from pycli_tools import rawinput
def test_default_yes_yes():
def raw_input_mock(prompt):
return 'y'
rawinput.raw_input = raw_input_mock
assert True == rawinput.ask_user_yesno()
def test_default_yes_no():
def raw_input_mock(prompt):
return 'n'
rawinput.raw_i... | mit | 4,690,743,906,382,569,000 | 23.238806 | 63 | 0.649015 | false |
epam/DLab | infrastructure-provisioning/src/general/scripts/azure/ssn_create_vpc.py | 1 | 1571 | #!/usr/bin/python
# *****************************************************************************
#
# Copyright (c) 2016, EPAM 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
#
#... | apache-2.0 | 2,222,215,809,739,852,500 | 37.317073 | 106 | 0.623806 | false |
arunchandramouli/fanofpython | code/features/datatypes/dicts.py | 1 | 3592 |
'''
Aim :: To demonstrate the use of a dictionary
Define a simple dictionary , add values to it and iterate and print it
Dictionary works based on hashing principle ... simply said key,value pairs
** A dictionary object is a mutable datatype which means it couldnt be hashed
Anything that cant be hashed can... | gpl-3.0 | -2,898,241,896,216,891,000 | 19.179775 | 125 | 0.599109 | false |
samshara/Stock-Market-Analysis-and-Prediction | smap_nepse/preprocessing/visualization.py | 1 | 6795 | import pandas as pd
import numpy as np
import csv
import os
import matplotlib.pyplot as plt
import cufflinks as cf
import plotly
import plotly.offline as py
from plotly.offline.offline import _plot_html
import plotly.graph_objs as go
from plotly.tools import FigureFactory as FF
cf.set_config_file(world_readable=False,... | mit | 210,266,800,827,579,520 | 45.541096 | 179 | 0.647976 | false |
markreidvfx/pyaaf2 | tests/test_mobid.py | 1 | 1392 | from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
from aaf2.mobid import MobID
from uuid import UUID
from aaf2.auid import AUID
import uuid
import unittest
class MobIDTests(unittest.TestCase):
def test_mob_id(self):
m = MobID.new()
material... | mit | 3,974,100,127,361,442,000 | 22.59322 | 104 | 0.564655 | false |
michael-lazar/mailcap_fix | tests/test_mailcap_python.py | 1 | 10329 | ###############################################################################
# This file was copied from cpython/Lib/tests/test_mailcap.py
# Some lines have been modified to work without the python test runner
###############################################################################
import os
import copy
impo... | unlicense | 7,113,809,215,644,407,000 | 41.336066 | 104 | 0.538871 | false |
Jinwithyoo/han | tests/por.py | 1 | 6384 | # -*- coding: utf-8 -*-
from tests import HangulizeTestCase
from hangulize.langs.por import Portuguese
class PortugueseTestCase(HangulizeTestCase):
""" http://korean.go.kr/09_new/dic/rule/rule_foreign_0219.jsp """
lang = Portuguese()
def test_1st(self):
"""제1항
c, g는 a, o, u 앞에서는 각각 ‘ㅋ, ㄱ... | bsd-3-clause | 2,189,456,993,221,242,600 | 23.818182 | 69 | 0.392428 | false |
LittleBirdLiu/Flask_WebDev | config.py | 1 | 1391 | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
MAIL_SERVER = 'smtp.126.com'
MAIL_PORT = 25
MAIL_USE_TLS = True
MAIL_USERNAME = os.environ.get('MAIL_USERNAME') ... | mit | 1,774,406,381,036,137,500 | 31.348837 | 73 | 0.667865 | false |
PKRoma/httpie | tests/test_compress.py | 1 | 3882 | """
We test against httpbin which doesn't return the request data in a
consistent way:
1. Non-form requests: the `data` field contains base64 encoded version of
our zlib-encoded request data.
2. Form requests: `form` contains a messed up version of the data.
"""
import base64
import zlib
from .fixtures import FILE_... | bsd-3-clause | 5,335,729,547,268,975,000 | 26.728571 | 73 | 0.607161 | false |
alirizakeles/tendenci | tendenci/apps/accountings/management/commands/correct_membership_acct_number.py | 1 | 2067 | from django.core.management.base import BaseCommand
from django.contrib.contenttypes.models import ContentType
class Command(BaseCommand):
"""
Correct the account_number of AcctTran records for the memberships
for those that are wrongly assigned with the event's account_number.
Usage: python manage.p... | gpl-3.0 | 4,600,237,004,960,355,300 | 42.0625 | 72 | 0.50895 | false |
schleichdi2/OpenNfr_E2_Gui-6.0 | lib/python/Plugins/Extensions/MediaPortal/additions/mediatheken/youtube.py | 1 | 66866 | # -*- coding: utf-8 -*-
import json
from Plugins.Extensions.MediaPortal.plugin import _
from Plugins.Extensions.MediaPortal.resources.imports import *
from Plugins.Extensions.MediaPortal.resources.choiceboxext import ChoiceBoxExt
from Plugins.Extensions.MediaPortal.resources.keyboardext import VirtualKeyBoardExt
from... | gpl-2.0 | -8,659,979,360,545,974,000 | 35.764026 | 405 | 0.650682 | false |
south-coast-science/scs_core | src/scs_core/position/nmea/gpgga.py | 1 | 4215 | """
Created on 30 Dec 2016
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
Global positioning system fix data
$xxGGA,time,lat,NS,long,EW,quality,numSV,HDOP,alt,M,sep,M,diffAge,diffStation*cs
example sentence:
$GPGGA,092725.00,4717.11399,N,00833.91590,E,1,08,1.01,499.6,M,48.0,M,,*5B
example values:
GPGGA:... | mit | 7,338,479,952,412,405,000 | 27.869863 | 118 | 0.474259 | false |
knights-lab/SHOGUN | shogun/utils/tree.py | 1 | 2735 | from collections import defaultdict
import csv
class Taxonomy:
def __init__(self, filename: str):
self.tax = self.parse_taxonomy(filename)
@classmethod
def parse_taxonomy(cls, filename: str) -> dict:
with open(filename) as inf:
csv_inf = csv.reader(inf, delimiter='\t')
... | agpl-3.0 | -8,318,682,223,261,966,000 | 34.064103 | 124 | 0.564534 | false |
google-research/task_adaptation | task_adaptation/data/caltech_test.py | 1 | 2376 | # coding=utf-8
# Copyright 2019 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 | 1,945,133,791,800,647,400 | 32.464789 | 79 | 0.659512 | false |
ramovsky/lunch | tests/test_config.py | 1 | 1313 | import unittest
from tempfile import NamedTemporaryFile
from lunch.session import Session, SessionFinished, Config, User
class TestConfig(unittest.TestCase):
def test_add_place(self):
config = Config()
config.add_place('Sisaket')
self.assertAlmostEqual(1, len(config))
config.add_... | mit | -7,776,214,906,230,288,000 | 29.534884 | 64 | 0.621478 | false |
jpfairbanks/streaming | moving_average.py | 1 | 2010 | from __future__ import print_function
"""
This module produces a stream of random variables from a moving average model.
The first command line argument is the number of samples negative means infinite.
The second argument is the window size. The moving average is uniform over the window.
The third argument is the fi... | bsd-3-clause | -7,765,423,684,961,808,000 | 29.923077 | 86 | 0.687562 | false |
MarkusHackspacher/unknown-horizons | horizons/world/building/settler.py | 1 | 19857 | # ###################################################
# Copyright (C) 2008-2017 The Unknown Horizons Team
# team@unknown-horizons.org
# This file is part of Unknown Horizons.
#
# Unknown Horizons is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-2.0 | -3,310,390,831,025,852,400 | 42.737885 | 156 | 0.733646 | false |
petry/django-press | press/migrations/0008_auto__add_field_author_photo.py | 1 | 9023 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Author.photo'
db.add_column(u'press_author', 'photo',
self.gf('django.... | bsd-3-clause | 4,100,511,375,027,724,300 | 74.2 | 187 | 0.548155 | false |
wtbarnes/synthesizAR | synthesizAR/analysis/eis.py | 1 | 9639 | """
Helpers for analyzing synthetic EIS data
"""
import os
import numpy as np
from sunpy.util.metadata import MetaDict
from sunpy.map import Map
from sunpy.io.fits import get_header
from sunpy.visualization.colormaps.cm import hinodexrt
import astropy.units as u
import astropy.io.fits
import h5py
__all__ = ['EISCube'... | gpl-3.0 | 2,225,193,771,007,478,800 | 38.504098 | 118 | 0.5651 | false |
sridevikoushik31/nova | nova/tests/test_imagebackend.py | 1 | 18280 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Grid Dynamics
# 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/l... | apache-2.0 | -7,723,475,165,103,364,000 | 37.242678 | 78 | 0.611543 | false |
t3dev/odoo | addons/website_slides/tests/test_statistics.py | 1 | 5815 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import math
from odoo.addons.website_slides.tests import common
from odoo.exceptions import AccessError, UserError
from odoo.tests import tagged
from odoo.tests.common import users
from odoo.tools import m... | gpl-3.0 | 6,279,237,426,971,799,000 | 42.721805 | 145 | 0.663629 | false |
gonzalolarralde/FakeARMVE | fake_firmware/messages.py | 1 | 8599 | # -*- coding: utf-8 -*-
import platform
import struct
from construct import Container
from construct.core import FieldError
from datetime import datetime
from time import sleep
from zlib import crc32
from constants import *
from structs import *
from helpers import *
MESSAGE_HANDLERS = []
DEBUG = True
def prepare_... | agpl-3.0 | 1,663,717,867,268,342,800 | 34.979079 | 180 | 0.674148 | false |
justas-/pyledbat | pyledbat/ledbat/baseledbat.py | 1 | 6716 | """
Copyright 2017, J. Poderys, Technical University of Denmark
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 ... | apache-2.0 | 1,560,566,274,252,504,300 | 38.274854 | 99 | 0.599315 | false |
xdlinux/xidian-scripts | Python/get_xidian_news.py | 1 | 4476 | # Copyright (C) 2020 by the XiDian Open Source Community.
#
# This file is part of xidian-scripts.
#
# xidian-scripts is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or ... | lgpl-3.0 | -4,134,377,156,185,125,400 | 24.333333 | 141 | 0.669441 | false |
dutradda/myreco | tests/integration/engine_objects/test_engine_objects_integration.py | 1 | 27200 | # MIT License
# Copyright (c) 2016 Diogo Dutra <dutradda@gmail.com>
# 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, co... | mit | 4,970,314,107,579,558,000 | 36.935844 | 127 | 0.575846 | false |
ashleywaite/django-more | django_enum/operations.py | 1 | 17196 |
from enum import Enum
from operator import attrgetter
from django.db import models
from django.db.models import sql
from django.db.models.deletion import Collector
from django.utils import six
from django_types.operations import CustomTypeOperation
from .fields import EnumField
"""
Use a symbol = value style as... | bsd-3-clause | 4,471,117,172,481,644,500 | 44.734043 | 133 | 0.573447 | false |
fukun07/neural-image-captioning | codes/pycoco/bleu/bleu.py | 1 | 1260 | #!/usr/bin/env python
#
# File Name : bleu.py
#
# Description : Wrapper for BLEU scorer.
#
# Creation Date : 06-01-2015
# Last Modified : Thu 19 Mar 2015 09:13:28 PM PDT
# Authors : Hao Fang <hfang@uw.edu> and Tsung-Yi Lin <tl483@cornell.edu>
from bleu_scorer import BleuScorer
class Bleu:
def __init__(self, n=4... | mit | -4,045,538,868,026,867,700 | 26.391304 | 79 | 0.569841 | false |
silly-wacky-3-town-toon/SOURCE-COD | toontown/catalog/CatalogChatItem.py | 1 | 5689 | from panda3d.core import *
from panda3d.direct import *
import CatalogItem
from toontown.toonbase import ToontownGlobals
from otp.otpbase import OTPLocalizer
from toontown.toonbase import TTLocalizer
bannedPhrases = [11009]
class CatalogChatItem(CatalogItem.CatalogItem):
def makeNewItem(self, customIndex):
... | apache-2.0 | 6,819,379,785,983,695,000 | 37.181208 | 168 | 0.683951 | false |
PierreRaybaut/PythonQwt | qwt/plot_directpainter.py | 1 | 10691 | # -*- coding: utf-8 -*-
#
# Licensed under the terms of the Qwt License
# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
# (see LICENSE file for more details)
"""
QwtPlotDirectPainter
--------------------
.. autoclass:... | lgpl-2.1 | 2,105,900,071,676,100,600 | 34.363946 | 117 | 0.575437 | false |
Audaces/ml | src/po2ml/__main__.py | 1 | 3322 | #!/usr/bin/env python3
'''{executable_name}: Importer for .po files to Audaces ML new translation format.
Usage:
{executable_name}: [--mark <mark>] [<file>]
This program imports .po (gettext translation) files to Audaces ML .tra format.
If a custom mark is set through --mark, it wil be placed on both ends of th... | mit | 3,981,279,307,848,930,000 | 29.759259 | 82 | 0.664359 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.