code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
from django.conf import settings from django.core.management import call_command from django.db import connection from django.test.utils import _set_autocommit, TEST_DATABASE_PREFIX import os, re, sys def getstatusoutput(cmd): "A simpler version of getstatusoutput that works on win32 platforms." stdin, stdout,...
paulsmith/geodjango
django/contrib/gis/db/backend/postgis/creation.py
Python
bsd-3-clause
9,184
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse class CustomHelpAction(argparse.Action): '''Allows defining custom help actions. Help actions can run even when the parser would oth...
ric2b/Vivaldi-browser
chromium/build/android/pylib/utils/argparse_utils.py
Python
bsd-3-clause
1,695
# proxy module from __future__ import absolute_import from chaco.base import *
enthought/etsproxy
enthought/chaco/base.py
Python
bsd-3-clause
79
#!/usr/bin/env python # -*- coding: utf-8 -*- """Exercise 9.5 from Kane 1985.""" from __future__ import division from sympy import sin, cos, pi, solve, symbols from sympy.physics.mechanics import ReferenceFrame, Point from sympy.physics.mechanics import dynamicsymbols from util import msprint, subs, partial_velocities...
nouiz/pydy
examples/Kane1985/Chapter5/Ex9.5.py
Python
bsd-3-clause
2,089
#!/bin/python3 from Canopto import Canopto import pygame from pygame import * from pygame.locals import * import time from colorsys import * import sys import json import datetime # scroll text across canopto. blocks. fg & bg are colors def scrollText (canopto, text, fg = (0xFF, 0x33, 0xFF), bg = (0x00, 0x00, 0x00, 0...
fenceFoil/canopto
text.py
Python
bsd-3-clause
3,088
"""make password hash field bigger Revision ID: 46a9c4fb9560 Revises: 5c84d7260c5 Create Date: 2011-12-20 17:59:16.961112 """ from __future__ import unicode_literals import sqlalchemy as sa from alembic import op # downgrade revision identifier, used by Alembic. revision = "46a9c4fb9560" down_revision = "5c84d7260c...
ergo/ziggurat_foundations
ziggurat_foundations/migrations/versions/46a9c4fb9560_pass_col_sizes.py
Python
bsd-3-clause
594
import sys import os.path import os def add_to_python_path(path): if path not in sys.path: sys.path.append(path) add_to_python_path('/var/canvas/website') from settings_sentry_common import * from configuration import Config CONF_ROOT = os.path.dirname(__file__) DATABASES = { 'default': { #...
drawquest/drawquest-web
website/sentry.conf.py
Python
bsd-3-clause
4,246
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Copyright (c) 2014, Kersten Doering <kersten.doering@gmail.com>, Bjoern Gruening <bjoern.gruening@gmail.com> """ #Kersten Doering 17.06.2014 #check http://xapian.org/docs/queryparser.html for syntax and functions import xappy conn = xappy.SearchConnection("xapian...
KerstenDoering/PubMed2Go
full_text_index/search_not_title_or_text.py
Python
isc
3,389
#### 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 = Ship() result.template = "object/ship/player/shared_player_z95.iff" result.attribute_template_id = -1 result.stf...
obi-two/Rebelion
data/scripts/templates/object/ship/player/shared_player_z95.py
Python
mit
434
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-13 11:29 from __future__ import unicode_literals from django.db import migrations, models import jsonfield.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( ...
barseghyanartur/django-admin-tools-stats
admin_tools_stats/migrations/0001_initial.py
Python
mit
3,865
"""Interface for package data stored in the "data" folder """ import os def get_path(data_path): return os.path.dirname(os.path.realpath(__file__)) + os.sep + data_path def get_text(data_path): p = get_full_path(data_path) f = open(p, 'r') content = f.read() f.close() return content
Tythos/hypyr
data/__init__.py
Python
mit
294
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function from asn1crypto import pem, x509 from ._errors import pretty_message from ._types import byte_cls, type_name from .errors import DuplicateCertificateError class ValidationPath(): """ Represents a path going to...
wbond/certvalidator
certvalidator/path.py
Python
mit
6,777
# -*- coding: utf-8 -*- # # phys_pkg.py # # Copyright (C) 2013 Steve Canny scanny@cisco.com # # This module is part of opc-diag and is released under the MIT License: # http://www.opensource.org/licenses/mit-license.php """Interface to a physical OPC package, either a zip archive or directory""" import os import shut...
pombredanne/opc-diag
opcdiag/phys_pkg.py
Python
mit
5,859
import numpy from chainer import cuda, Function def _cu_conv_sum(y, x, n): # Convolutional sum # TODO(beam2d): Use scan computation rdim = x.size / (x.shape[0] * x.shape[1]) cuda.elementwise( 'float* y, const float* x, int rdim, int N, int n_', ''' int half_n = n_ / 2; ...
nushio3/chainer
chainer/functions/local_response_normalization.py
Python
mit
4,265
#!/usr/bin/env python3 """tests.test_io.test_read_gfa.py: tests for exfi.io.read_gfa.py""" from unittest import TestCase, main from exfi.io.read_gfa import read_gfa1 from tests.io.gfa1 import \ HEADER, \ SEGMENTS_EMPTY, SEGMENTS_SIMPLE, SEGMENTS_COMPLEX, \ SEGMENTS_COMPLEX_SOFT, SEGMENTS_COMPLEX_HARD, ...
jlanga/exfi
tests/test_io/test_read_gfa.py
Python
mit
2,975
# -*- coding: utf-8 -*- """ flask.module ~~~~~~~~~~~~ Implements a class that represents module blueprints. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from .helpers import _PackageBoundObject, _endpoint_from_view_func def _register_module(module, st...
wxue/xiakelite
libs/flask/module.py
Python
mit
8,422
import numpy from chainer.backends import cuda from chainer import initializer # Original code forked from MIT licensed keras project # https://github.com/fchollet/keras/blob/master/keras/initializations.py class Orthogonal(initializer.Initializer): """Initializes array with an orthogonal system. This init...
aonotas/chainer
chainer/initializers/orthogonal.py
Python
mit
2,709
# -*- coding: utf-8 -*- from __future__ import (division, absolute_import, unicode_literals, print_function) import os from file_metadata.image.jpeg_file import JPEGFile from tests import fetch_file, unittest class JPEGFileTest(unittest.TestCase): def test_filename_zxing(self): ...
pywikibot-catfiles/file-metadata
tests/image/jpeg_file_test.py
Python
mit
1,837
import b3 import unittest from common import * class TestRunner(unittest.TestCase): def test_category(self): self.assertEqual(b3.Runner.category, b3.ACTION) def test_tick(self): node = b3.Runner() status = node._execute(TickStub()) self.assertEqual(status, b3.RUNNING) if __nam...
renatopp/behavior3py
tests/test_runner.py
Python
mit
358
import os import logging import numpy as np import theano from pandas import DataFrame, read_hdf from blocks.extensions import Printing, SimpleExtension from blocks.main_loop import MainLoop from blocks.roles import add_role logger = logging.getLogger('main.utils') def shared_param(init, name, cast_float32, role, ...
arasmus/ladder
utils.py
Python
mit
5,079
#### 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 = Tangible() result.template = "object/tangible/wearables/armor/mandalorian/shared_armor_mandalorian_belt.iff" resu...
anhstudios/swganh
data/scripts/templates/object/tangible/wearables/armor/mandalorian/shared_armor_mandalorian_belt.py
Python
mit
490
#!/usr/bin/env python3 import sys class ProgressBar: ''' 进度条类定义 默认格式 [###### ] 43% ''' def __init__(self,fill = '#',empty = ' ',width = 50): self.fill = fill self.empty = empty self.width = width def update(self,percent): ''' 更新 ''' length = int(percent*self.width) s = '[%s%s] %d%%\r' % ...
lcplj123/video-dl
progressbar.py
Python
mit
630
# Note for contributors: # This example code is referred to from "Chainer at a Glance" tutorial. # If this file is to be modified, please also update the line numbers in # `docs/source/glance.rst` accordingly. import chainer as ch from chainer import datasets import chainer.functions as F import chainer.links as L fro...
ktnyt/chainer
examples/glance/glance.py
Python
mit
2,943
#!/usr/bin/env python2 # Copyright (C) 2013-: # Gabes Jean, naparuba@gmail.com # Pasche Sebastien, sebastien.pasche@leshop.ch # # 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 withou...
naparuba/check-linux-by-ssh
check_disks_by_ssh.py
Python
mit
7,141
#!/usr/bin/env python # coding=utf-8 import errno import os import sys import fileinput import string import logging import traceback import hashlib import time import re from datetime import date, timedelta import datetime from subprocess import call import redis from datasource import DataSource class Items(Dat...
junneyang/simplepbrpc
homedir/items.py
Python
mit
8,104
""" Module containing many types of independence testing methods. """ __author__ = 'wittawat' from abc import ABCMeta, abstractmethod from data import PairedData #import matplotlib.pyplot as plt import numpy as np #from numba import jit import data as data import util as util import feature as fea #from fsic.util imp...
Diviyan-Kalainathan/dependency_criteria
lib/fsic/indtest.py
Python
mit
56,584
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test block processing.""" import copy import struct import time from test_framework.blocktools import ...
r8921039/bitcoin
test/functional/feature_block.py
Python
mit
64,773
# 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 ...
Azure/azure-sdk-for-python
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/__init__.py
Python
mit
1,034
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors # License: MIT. See LICENSE # import frappe from frappe.model.document import Document class WebTemplateField(Document): pass
frappe/frappe
frappe/website/doctype/web_template_field/web_template_field.py
Python
mit
212
#!/usr/bin/python2.7 import os import sys import zlib import base64 import socket import os.path import argparse from datetime import datetime import debug import module import config as CFG from poetsocket import * __version__ = '0.4.4' POSH_PROMPT = 'posh > ' FAKEOK = """HTTP/1.1 200 OK\r Date: Tue, 19 Mar 2013 2...
khanhnnvn/poet
server.py
Python
mit
10,080
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Tests data."""
inveniosoftware/invenio-oaiserver
tests/data/v5/__init__.py
Python
mit
253
from __future__ import absolute_import from collections import deque import contextlib import errno import locale # we have a submodule named 'logging' which would shadow this if we used the # regular name: import logging as std_logging import re import os import posixpath import shutil import stat import subprocess i...
ncoghlan/pip
pip/utils/__init__.py
Python
mit
25,452
# -*- coding: utf-8 -*- import numpy as np import cv2, os, lda if __name__ == "__main__": # set parameter for experiment nTopics = 8 # create folder for saving result if not os.path.exists("result"): os.mkdir("result") # create folder for showing fitting process if not os.path.exists("visualization"): os...
kyoheiotsuka/Latent-Dirichlet-Allocation-Variational-Implementation-
sample.py
Python
mit
976
try: from builtins import object except ImportError: pass from transitions import MachineError from transitions.extensions import HierarchicalMachine as Machine from transitions.extensions import NestedState from .utils import Stuff from unittest import TestCase try: from unittest.mock import MagicMock e...
imp/transitions
tests/test_reuse.py
Python
mit
7,652
# Code for performing minimal parsing of libmagic-compatible signature files. # This allows for building a single signature file from multiple other signature files, # and for parsing out the initial magic signature bytes for each signature (used for # pre-processing of data to limit the number of actual calls into lib...
17twenty/binwalk
src/binwalk/core/parser.py
Python
mit
13,154
import pickle commits = {} def main(): output = "" for commit in range(0,3): output += "c*\n" for file in range(0,2): smells = str(commit+file*2) output += "class"+str(file)+" smells="+smells+"\n" result = open("mockpmdresult.txt","w") result.write(output) result.close() if __name__ == "__main__...
UBC-Victorious-410/project
tools/mock_pmd_parser.py
Python
mit
330
import json import re import uuid from django.utils.translation import ugettext as _ from ide.utils.project import APPINFO_MANIFEST, PACKAGE_MANIFEST, InvalidProjectArchiveException __author__ = 'katharine' def manifest_name_for_project(project): if project.is_standard_project_type and project.sdk_version == '...
thunsaker/cloudpebble
ide/utils/sdk/manifest.py
Python
mit
11,537
from logging import debug, info, error from datetime import date, timedelta import services from data.models import Stream import reddit def main(config, db, **kwargs): reddit.init_reddit(config) has_new_episode = [] # Check services for new episodes enabled_services = db.get_services(enabled=True) for servi...
andrewhillcode/holo
src/module_find_episodes.py
Python
mit
7,279
import sys from pathlib import Path from setuptools import find_packages, setup long_description = Path('README.rst').read_text() # Populates __version__ without importing the package __version__ = None with open('flexget/_version.py', encoding='utf-8') as ver_file: exec(ver_file.read()) # pylint: disable=W0122...
ianstalk/Flexget
setup.py
Python
mit
2,280
# 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 ...
lmazuel/azure-sdk-for-python
azure-mgmt-storage/azure/mgmt/storage/v2016_01_01/models/storage_account_regenerate_key_parameters.py
Python
mit
957
# -*- coding: utf-8 -*- """Form and cookie based authentication middleware As with all the other AuthKit middleware, this middleware is described in detail in the AuthKit manual and should be used via the ``authkit.authenticate.middleware`` function. The option form.status can be set to "200 OK" if the Pylons error ...
cedadev/AuthKit
authkit/authenticate/form.py
Python
mit
10,231
#### 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 = Tangible() result.template = "object/tangible/furniture/all/shared_frn_all_potted_plants_sml_s03.iff" result.attr...
obi-two/Rebelion
data/scripts/templates/object/tangible/furniture/all/shared_frn_all_potted_plants_sml_s03.py
Python
mit
476
# 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 ...
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2015_06_15/models/virtual_network_paged.py
Python
mit
962
#!/usr/bin/env python # -*- coding: UTF-8 -*- import logging from time import sleep from sanji.core import Sanji from sanji.connection.mqtt import Mqtt REQ_RESOURCE = "/system/firmware" class View(Sanji): # This function will be executed after registered. def run(self): for count in xrange(0, 10...
Sanji-IO/sanji-firmware
tests/test_e2e/view_firmware.py
Python
gpl-2.0
4,216
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,sys,re from waflib import Utils,Build from waflib.Configure import conf def get_extensions(lst): ret=[] for x in Utils.to_list(lst): try: if not isinstance(x,...
oli-kester/advanced-av-examples
amp-osc-lv2/.waf-1.8.5-3556be08f33a5066528395b11fed89fa/waflib/Tools/c_aliases.py
Python
gpl-2.0
1,334
#!/usr/bin/env python """ This class implements the Quine-McCluskey algorithm for minimization of boolean functions. Based on code from Robert Dick <dickrp@eecs.umich.edu> and Pat Maupin <pmaupin@gmail.com>. Most of the original code was re-written for performance reasons. NOTE: The author stated that this code was ...
kickstandproject/asterisk-testsuite-temporary
lib/python/qm.py
Python
gpl-2.0
7,358
# Copyright (C) 2006-2011 Canonical Ltd # # 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 the License, or # (at your option) any later version. # # This program is distribute...
stewartsmith/bzr
bzrlib/plugins/weave_fmt/test_bzrdir.py
Python
gpl-2.0
26,897
# # Copyright (c) 2008--2020 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
shastah/spacewalk
spacewalk/certs-tools/rhn_bootstrap_strings.py
Python
gpl-2.0
16,095
# # Copyright (C) 2008-2013 by Nicolas Piganeau # npi@m4x.org # # 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 the License, or # (at your option) any later versi...
Sharpe49/ts2
ts2/routing/route.py
Python
gpl-2.0
12,444
# -*- coding: utf-8 -*- """ Tests of managing ESX hypervisors directly. If another direct ones will be supported, it should not be difficult to extend the parametrizer. """ import pytest from cfme.infrastructure.provider.virtualcenter import VMwareProvider from cfme.common.provider import DefaultEndpoint from utils i...
dajohnso/cfme_tests
cfme/tests/infrastructure/test_esx_direct_host.py
Python
gpl-2.0
3,559
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QGradient(): # skipped bases: <type 'sip.simplewrapper'> """ QGradient() QGradient(QGradient) """ def coordinateMode(se...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/PyQt4/QtGui/__init__/QGradient.py
Python
gpl-2.0
2,965
"""Backport of OrderedDict() class Runs on Python 2.4, 2.5, 2.6, 2.7, 3.x and pypy. Passes Python2.7's test suite and incorporates all the latest updates. Copyright 2009 Raymond Hettinger, released under the MIT License. http://code.activestate.com/recipes/576693/ """ from __future__ import absolute_import, division...
Vdragon/git-cola
cola/ordered_dict.py
Python
gpl-2.0
8,796
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para vimple.ru # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re from core import config from core import logger...
MoRgUiJu/morguiju.repo
plugin.video.pelisalacarta/servers/vimpleru.py
Python
gpl-2.0
1,920
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016 CERN. # # Invenio 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 the # License, or (at your option) any later...
hachreak/invenio-previewer
invenio_previewer/utils.py
Python
gpl-2.0
1,963
# -*- coding: utf-8 -*- """ Multi Touch Plugin Copyright (C) 2013 Olaf Lüke <olaf@tinkerforge.com> __init__.py: package initialization 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 ...
Tinkerforge/brickv
src/brickv/plugin_system/plugins/multi_touch/__init__.py
Python
gpl-2.0
922
# -*- 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 model 'UploadedFile' db.create_table(u'cicu_uploadedfile', ( (u'id', self.gf('django.db...
meletakis/collato
esn/cicu/migrations/0003_initial.py
Python
gpl-2.0
1,222
#!/usr/bin/python # Rekall Memory Forensics # Copyright 2013 Google Inc. All Rights Reserved. # # 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 the License, or (at # your op...
google/rekall
rekall-core/rekall/plugins/windows/privileges.py
Python
gpl-2.0
3,105
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Robin Wen # Date: 2014-11-18 # Desc: Connect to MySQL using MySQLdb package, and insert test data. import MySQLdb as mdb con = mdb.connect(host='10.10.3.121', user='robin', passwd='robin89@DBA', db='testdb', unix_socket='/tmp/mysql5173.sock', port=5173) with con: ...
dbarobin/pytools
py-practice/insert_data.py
Python
gpl-2.0
868
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013) # # This file is part of SeisMon # # SeisMon 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 3 of the License, or # (at your option)...
gwpy/seismon
utils/version.py
Python
gpl-3.0
5,922
""" Tools to read and write georeferenced pointclouds such as output from Pix4D, based on the plyfile module. """ import collections import itertools import json import tempfile import warnings import numpy as np import plyfile UTM_COORD = collections.namedtuple( 'UTMCoord', ['easting', 'northing', 'zone', 'nor...
Zac-HD/3D-tools
src/geoply.py
Python
gpl-3.0
8,980
class ParserError(Exception): """ Raised when a text parser fails to understand a file it been passed or the resulting parsed text is invalid """ pass class ParserUnknownFile(Exception): pass
appsembler/mayan_appsembler
apps/ocr/parsers/exceptions.py
Python
gpl-3.0
218
repr(1)
juanjux/python-driver
fixtures/repr.py
Python
gpl-3.0
8
# -*- coding: utf-8 -*- # # Copyright (C) 2011 Tiger Soldier # # This file is part of OSD Lyrics. # # OSD Lyrics 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 3 of the License, or # (at your ...
osdlyrics/osdlyrics
python/metadata.py
Python
gpl-3.0
13,271
# coding: utf-8 from flask import Blueprint __author__ = 'Jux.Liu' user = Blueprint('user', __name__) from . import views
MOOOWOOO/Q400K
app/user/__init__.py
Python
gpl-3.0
125
# -*- coding: utf-8 -*- # Copyright (C) 1998-2012 by the Free Software Foundation, Inc. # # This file is part of HyperKitty. # # HyperKitty 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 3 of t...
khushboo9293/Hyperkitty
hyperkitty/tests/views/test_thread.py
Python
gpl-3.0
12,397
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-7 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
scwhitehouse/rose
lib/python/rose/config_editor/valuewidget/combobox.py
Python
gpl-3.0
3,038
from gain import Css, Item, Parser, Spider class Post(Item): title = Css('.ph') async def save(self): print(self.title) class MySpider(Spider): start_url = 'http://blog.sciencenet.cn/home.php?mod=space&uid=40109&do=blog&view=me&from=space' concurrency = 1 headers = {'User-Agent': 'Googl...
babykick/gain
example/sciencenet_spider.py
Python
gpl-3.0
521
# -*- encoding: utf-8 -*- from abjad import * def test_pitchtools_PitchSegment___min___01(): pitch_segment = pitchtools.PitchSegment([-2, -1.5, 6, 7, -1.5, 7]) assert min(pitch_segment) == NamedPitch(-2)
mscuthbert/abjad
abjad/tools/pitchtools/test/test_pitchtools_PitchSegment___min__.py
Python
gpl-3.0
214
# coding: utf-8 import numpy as np from common.functions import * from common.util import im2col, col2im class Relu: def __init__(self): self.mask = None def forward(self, x): self.mask = (x <= 0) out = x.copy() out[self.mask] = 0 return out def backward(self, do...
Takasudo/studyPython
deep/common/layers.py
Python
gpl-3.0
7,810
# Copyright 2012 Karim Sumun # # This file is part of Simple Census Plotter. # # Simple Census Plotter 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 3 of the License, or # (at your option) any...
trooble/census_plot
demo1/demo1/__init__.py
Python
gpl-3.0
726
# -*- coding: utf-8 -*- # # Copyright (c) 2010-2012 Cidadania S. Coop. Galega # # This file is part of e-cidadania. # # e-cidadania 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 3 of the Licen...
DROPCitizenShip/e-cidadania
tests/unit_tests/helpers/test_cache.py
Python
gpl-3.0
2,101
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 3 of the # License, or (a...
nop33/indico
indico/modules/cephalopod/blueprint.py
Python
gpl-3.0
1,345
# 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
kenorb/BitTorrent
BitTorrent/DownloadRateLimiter.py
Python
gpl-3.0
4,752
import serial,time ser = serial.Serial(2, baudrate=9600) print(ser.name) file = open("Output.txt","w") ser.write(b"M04\n") ser.flush() ser.readline().decode(); t = time.clock() while t <= 180: ser.write(b"M105\n") ser.flush() resp = ser.readline().decode(); t = time.clock() resp =...
OhmNomNom/Michelangelo
TempLogger/prog.py
Python
gpl-3.0
534
# -*- coding: utf-8 -*- #------------------------------------------------------------ # beta.1 EPG FórmulaTV.com # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) #------------------------------------------------------------ # Gracias a la librería plugintools de Jesús (www.mimediacenter.info) #----------------...
iptvgratis/TUPLAY
resources/tools/epg_formulatv.py
Python
gpl-3.0
24,492
# file: runme.py # This file illustrates the proxy class C++ interface generated # by SWIG. import example # ----- Object creation ----- print "Creating some objects:" cc = example.Circle(10) c = example.ShapePtr(cc) print " Created circle", c ss = example.Square(10) s = example.ShapePtr(ss) print " Created ...
jrversteegh/softsailor
deps/swig-2.0.4/Examples/python/smartptr/runme.py
Python
gpl-3.0
1,069
import unittest import tempfile import os import openglider import openglider.plots import openglider.plots.glider from common import TestCase TEMPDIR = tempfile.gettempdir() class TestPlots(TestCase): def setUp(self, complete=True): self.glider_2d = self.import_glider_2d() self.glider_3d = sel...
hiaselhans/OpenGlider
tests/test_patterns.py
Python
gpl-3.0
1,407
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django_extensions.db.fields import django.db.models.deletion from django.conf import settings import uuid class Migration(migrations.Migration): dependencies = [ ("importer", "0001_initial"), ...
hzlf/openbroadcast.org
website/apps/massimporter/migrations/0001_initial.py
Python
gpl-3.0
4,610
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sun Mar 27 01:20:46 2016 @author: caioau """ import matplotlib.pyplot as plt import networkx as nx from networkx.drawing.nx_agraph import graphviz_layout def main(): G = nx.Graph() # G eh um grafo direcionado # gera o grafo apartir de suas arest...
caioau/personal
fluxos/lista 2/grafo-6.py
Python
gpl-3.0
1,795
# Copyright (C) 2013 ABRT Team # Copyright (C) 2013 Red Hat, Inc. # # This file is part of faf. # # faf 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 3 of the License, or # (at your option) ...
patriczek/faf
src/pyfaf/actions/pull_components.py
Python
gpl-3.0
6,262
from __future__ import division import pygame from core.components.menu.menu import PopUpMenu from core.components.ui.text import TextArea class DialogState(PopUpMenu): """ Game state with a graphic box and some text in it Pressing the action button: * if text is being displayed, will cause text speed ...
ChillyCider/Tuxemon
tuxemon/core/states/dialog/__init__.py
Python
gpl-3.0
1,325
# coding=utf-8 from spec.python import db_connection import operator import pytest from datetime import datetime from sam.pages.rules import Rules, RulesApply, RulesEdit, RulesNew from sam.models.security import rules, rule_template, ruling_process from sam import errors db = db_connection.db sub_id = db_connection.de...
JoePelz/SAM
spec/python/pages/test_rules.py
Python
gpl-3.0
19,920
######################################################################################################################## # VECNet CI - Prototype # Date: 4/5/2013 # Institution: University of Notre Dame # Primary Authors: # Robert Jones <Robert.Jones.428@nd.edu> ########################################################...
tph-thuering/vnetsource
ts_emod/models/models.py
Python
mpl-2.0
7,690
"""Mixins to add caching to Django REST Framework viewsets.""" from django.http import Http404 from rest_framework.generics import get_object_or_404 from .models import CachedQueryset class CachedViewMixin(object): """Mixin to add caching to a DRF viewset. A user should either define cache_class or overrid...
pombredanne/drf-cached-instances
drf_cached_instances/mixins.py
Python
mpl-2.0
2,480
# encoding: utf-8 # # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # # THIS THREADING MODULE IS PERMEATED BY THE p...
klahnakoski/ActiveData
vendor/mo_threads/queues.py
Python
mpl-2.0
18,763
#!/usr/bin/env python """ Offline validation of submission.yaml and YAML data files. Call this script from the directory containing these files: ./check.py Or specify the directory as an additional argument: ./check.py directory Or specify a single YAML file to validate: ./check.py single_yaml_file """ import s...
HEPData/hepdata_submission
scripts/check.py
Python
mpl-2.0
6,439
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.core import validators from django.core.mail import send_mail from django.conf import settings from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, UserManager, Group from djan...
GustavoVS/timtec
accounts/models.py
Python
agpl-3.0
4,252
# -*- coding: utf-8 -*- # © 2014-2015 Avanzosc # © 2014-2015 Pedro M. Baeza # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from . import models
Endika/manufacture
mrp_production_real_cost/__init__.py
Python
agpl-3.0
165
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution Addon # Copyright (C) 2009-2013 IRSID (<http://irsid.ru>), # Paul Korotkov (korotkov.paul@gmail.com). # # This program is free software: you can redistribute it...
prospwro/odoo
addons/irsid_edu_training/models/order.py
Python
agpl-3.0
17,286
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
ahu-odoo/odoo
openerp/models.py
Python
agpl-3.0
274,326
class Result(object): AC = 0 WA = 1 << 0 RTE = 1 << 1 TLE = 1 << 2 MLE = 1 << 3 IR = 1 << 4 SC = 1 << 5 OLE = 1 << 6 IE = 1 << 30 def __init__(self): self.result_flag = 0 self.execution_time = 0 self.r_execution_time = 0 self.max_memory = 0 ...
buhe/judge
result.py
Python
agpl-3.0
368
# -*- coding: utf-8 -*- # Copyright(C) 2014 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
sputnick-dev/weboob
modules/bred/bred/browser.py
Python
agpl-3.0
5,970
# Generated by Django 2.1 on 2018-08-28 16:35 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('conversations', '0019_conversationmessage_latest_message'), ] operations = [ migrations.RemoveField( model_name='conversation', ...
yunity/foodsaving-backend
karrot/conversations/migrations/0020_remove_conversation_group.py
Python
agpl-3.0
353
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'HistoricalArticle' db.create_table(u'core_historicalartic...
1flow/1flow
oneflow/core/migrations/0101_auto__add_historicalarticle.py
Python
agpl-3.0
62,707
# This file is part of Shuup. # # Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.utils.translation import ugettext_lazy as _ from shuup.admin.dashboard import...
shoopio/shoop
shuup/admin/modules/customers_dashboard/dashboard.py
Python
agpl-3.0
802
''' searx is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. searx is distributed in the hope that it will be useful, but WITHOUT ANY W...
misnyo/searx
searx/engines/__init__.py
Python
agpl-3.0
8,109
# -*- coding: utf-8 -*- # Copyright 2017 Rooms For (Hong Kong) Limited T/A OSCG # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from . import account_analytic_line
rfhk/tks-custom
account_analytic_line_sale/models/__init__.py
Python
agpl-3.0
181
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-Today Serpent Consulting Services Pvt. Ltd. (<http://www.serpentcs.com>) # Copyright (C) 2004 OpenERP SA (<http://www.openerp.com>) # # T...
eneldoserrata/marcos_openerp
marcos_addons/hotel-7.0/hotel_reservation/report/__init__.py
Python
agpl-3.0
1,163
from django.db import models from django.utils import timezone import json CHARFIELD_LEN_SMALL=128 CHARFIELD_LEN_LONG = 1024 class CreatedModel(models.Model): #When it was created/modified modified=models.DateTimeField(auto_now=True) created=models.DateTimeField(auto_now_add=True) #Properties of the ...
vdt/ml-service-api
ml_grading/models.py
Python
agpl-3.0
2,344
# encoding: utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility...
stifoon/navitia
source/sindri/sindri/saver/edsaver.py
Python
agpl-3.0
4,169