repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
playfire/django-email-from-template | refs/heads/master | setup.py | 1 | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-email-from-template',
description="Send emails generated entirely from Django templates.",
version='0.1',
url='http://code.playfire.com/',
author='Playfire.com',
author_email='tech@playfire.com',
license... |
diablo1281/MissionPlanner | refs/heads/master | ExtLibs/Mavlink/pymavlink/generator/mavgen_csharp.py | 6 | #!/usr/bin/env python
'''
parse a MAVLink protocol XML file and generate a C# implementation
Copyright Michael Oborne 2016
Released under GNU GPL version 3 or later
'''
import sys, textwrap, os, time, re
from . import mavparse, mavtemplate
t = mavtemplate.MAVTemplate()
def generate_message_header(f, xml):
... |
ChristineLaMuse/mozillians | refs/heads/master | vendor-local/lib/python/tablib/packages/odf/elementtypes.py | 83 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2008 Søren Roug, European Environment Agency
#
# This library 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 Licens... |
qbj/git_FuXiaotong | refs/heads/master | Projects/House_Price/house_price_RF_v2/evaluation.py | 1 |
import pandas as pd
import numpy as np
from sklearn.ensemble import RandomForestRegressor
from sklearn.preprocessing import LabelEncoder
import matplotlib.pyplot as plt
########################################################################
# DATA
######################################################... |
qiuzhong/crosswalk-test-suite | refs/heads/master | tools/build/pack_deb.py | 4 | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... |
SurfasJones/icecream-info | refs/heads/master | icecream/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/eucjpprober.py | 2918 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
xingyepei/edx-platform | refs/heads/release | common/test/acceptance/pages/lms/video/__init__.py | 12133432 | |
mrunge/horizon | refs/heads/master | openstack_dashboard/dashboards/project/routers/extensions/routerrules/__init__.py | 12133432 | |
chubbymaggie/amoco | refs/heads/release | amoco/ui/graphics/kivy_/__init__.py | 12133432 | |
johnnykv/heralding | refs/heads/master | heralding/reporting/__init__.py | 12133432 | |
DalikarFT/CFVOP | refs/heads/master | venv/Lib/site-packages/pip/commands/search.py | 343 | from __future__ import absolute_import
import logging
import sys
import textwrap
from pip.basecommand import Command, SUCCESS
from pip.compat import OrderedDict
from pip.download import PipXmlrpcTransport
from pip.models import PyPI
from pip.utils import get_terminal_size
from pip.utils.logging import indent_log
from... |
PhillipNordwall/FileXor | refs/heads/master | setup.py | 1 | """The setup for File Xor Stream"""
import setuptools
import codecs
import os
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, 'README.rst'), encoding='UTF-8') as f:
long_description = f.read()
setuptools.setup(
name='FileXor',
version='0.2.2a1',
description='',
... |
slackhq/python-slackclient | refs/heads/main | slack_sdk/socket_mode/builtin/__init__.py | 1 | from .client import SocketModeClient # noqa
|
wagtail/wagtail | refs/heads/stable/2.13.x | wagtail/contrib/simple_translation/forms.py | 4 | from django import forms
from django.urls import reverse
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy, ngettext
from wagtail.core.models import Locale, Page
class CheckboxSelectMultipleWithDisabledOptions(forms.CheckboxSelectMultiple):
option_template_name = "si... |
Noviat/odoo | refs/heads/8.0 | addons/hw_escpos/escpos/printer.py | 101 | #!/usr/bin/python
import usb.core
import usb.util
import serial
import socket
from escpos import *
from constants import *
from exceptions import *
from time import sleep
class Usb(Escpos):
""" Define USB printer """
def __init__(self, idVendor, idProduct, interface=0, in_ep=0x82, out_ep=0x01):
"""
... |
refeed/coala-bears | refs/heads/master | tests/python/vulture_test_files/used_variable.py | 7 | x = 2
print(x)
|
lukasjuhrich/sipa | refs/heads/develop | manage.py | 1 | """Python helper for generic sipa tasks
The purpose of this module is to provide a generic interface of
often-used functions which usually require some sort of setup or are
accessible at many different locations.
It somewhat is like a makefile, but the usage of Flask-Script makes
the usage of python-like commands (ru... |
uglyboxer/linear_neuron | refs/heads/master | net-p3/lib/python3.5/site-packages/scipy/special/generate_ufuncs.py | 14 | #!/usr/bin/python
"""
generate_ufuncs.py
Generate Ufunc definition source files for scipy.special. Produces
files '_ufuncs.c' and '_ufuncs_cxx.c' by first producing Cython.
This will generate both calls to PyUFunc_FromFuncAndData and the
required ufunc inner loops.
The syntax in the ufunc signature list is
<li... |
overtherain/scriptfile | refs/heads/master | software/googleAppEngine/google/appengine/_internal/django/core/management/commands/startproject.py | 23 | from google.appengine._internal.django.core.management.base import copy_helper, CommandError, LabelCommand
from google.appengine._internal.django.utils.importlib import import_module
import os
import re
from random import choice
class Command(LabelCommand):
help = "Creates a Django project directory structure for ... |
kuza55/dns-digger | refs/heads/master | src/core/archiver.py | 1 | __author__ = "Kevin Warrick"
__email__ = "kwarrick@uga.edu"
import sys
import json
import logging
import logging.handlers
import collections
import pika
class Archiver(object):
"""Write JSON responses to disk as CSV file.
Archiver is a simple consumer which uses Python's logging module and the
TimeRotatingFi... |
joram/sickbeard-orange | refs/heads/ThePirateBay | lib/bs4/element.py | 438 | import collections
import re
import sys
import warnings
from bs4.dammit import EntitySubstitution
DEFAULT_OUTPUT_ENCODING = "utf-8"
PY3K = (sys.version_info[0] > 2)
whitespace_re = re.compile("\s+")
def _alias(attr):
"""Alias one attribute name to another for backward compatibility"""
@property
def alias... |
nojhan/weboob-devel | refs/heads/master | modules/allrecipes/test.py | 1 | # -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# 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 op... |
edhuckle/statsmodels | refs/heads/master | docs/source/plots/var_plot_fevd.py | 39 | from var_plots import plot_fevd
plot_fevd()
|
ging/keystone | refs/heads/master | keystone/openstack/common/config/__init__.py | 12133432 | |
raoanirudh/rmtk | refs/heads/master | rmtk/vulnerability/capacity.py | 12133432 | |
izonder/intellij-community | refs/heads/master | python/testData/formatter/alignListComprehensionInDict.py | 80 | def foo():
return {field.key: field for key, field in inspect.getmembers(instance)
if isinstance(field, QueryableAttribute)
and isinstance(field.property, ColumnProperty)
or field.foreign_keys} |
mmolero/pcloudpy | refs/heads/master | pcloudpy/gui/MainWindowBase.py | 1 | """
Template MainWindowBase.py
"""
#Author: Miguel Molero <miguel.molero@gmail.com>
import sys
import os
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import pyqtSignal as Signal
import markdown2
import yaml
import pprint
#own components
from pcloudpy.gui.reso... |
cburbridge/mongodb_store | refs/heads/hydro-devel | mongodb_store/scripts/mongodb_server.py | 4 | #!/usr/bin/env python
import rospy
import subprocess
import sys
import os
import re
import signal
import errno
from std_srvs.srv import *
import mongodb_store.util
if not mongodb_store.util.check_for_pymongo():
sys.exit(1)
MongoClient = mongodb_store.util.import_MongoClient()
import pymongo
def is_socket_... |
kuiwei/edx-platform | refs/heads/master | common/djangoapps/status/status.py | 86 | """
A tiny app that checks for a status message.
"""
from django.conf import settings
import json
import logging
import os
log = logging.getLogger(__name__)
def get_site_status_msg(course_id):
"""
Look for a file settings.STATUS_MESSAGE_PATH. If found, read it,
parse as json, and do the following:
... |
grazor/ftwatch | refs/heads/master | web.py | 1 | #!/usr/bin/env python
import os
from ftwatch import app, base_path
from ftwatch.util import init_db
if __name__ == '__main__':
if not os.path.isfile(app.config['DB_PATH']):
fname = os.path.join(base_path,'schema.sql')
init_db(fname)
# Set app port here
app.run(host='0.0.0.0', port=8000)... |
Brainiq7/Ananse | refs/heads/master | ananse_dl/extractor/crunchyroll.py | 1 | # encoding: utf-8
from __future__ import unicode_literals
import re
import json
import base64
import zlib
import xml.etree.ElementTree
from hashlib import sha1
from math import pow, sqrt, floor
from .subtitles import SubtitlesInfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urllib_request,
)
f... |
pvtodorov/indra | refs/heads/master | indra/tests/test_preassembler.py | 2 | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import os
from collections import OrderedDict
from indra.preassembler import Preassembler, render_stmt_graph, \
flatten_evidence, flatten_stmts
from indra.preassembler.hierarchy_manag... |
AdamantLife/alcustoms | refs/heads/master | alcustoms/winregistry.py | 1 | ## Builtin
import binascii
import functools
import struct
from winreg import *
VALUE_TYPES = {
REG_BINARY:"REG_BINARY",
REG_DWORD:"REG_DWORD",
REG_DWORD_LITTLE_ENDIAN:"REG_DWORD_LITTLE_ENDIAN",
REG_DWORD_BIG_ENDIAN:"REG_DWORD_BIG_ENDIAN",
REG_EXPAND_SZ:"REG_EXPAND_SZ",
REG_LINK:"REG_LINK",
... |
everettjf/iOSBlog | refs/heads/master | web/x123/migrations/0002_auto_20160222_0145.py | 4 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-22 01:45
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('x123', '0001_initial'),
]
operations = [
migrations.AddField(
mo... |
wuxianghou/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/main.py | 177 | # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and... |
DimensionDataCBUSydney/plumbery | refs/heads/master | plumbery/actions/information.py | 2 | # 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 ... |
raildo/nova | refs/heads/master | nova/tests/unit/virt/libvirt/test_compat.py | 80 | # 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 u... |
maxamillion/ansible | refs/heads/devel | lib/ansible/modules/template.py | 24 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# This is a virtual module that is entirely implemented as an action plugin and runs on the controller
from __future__ import absolute_import, ... |
palerdot/calibre | refs/heads/master | src/calibre/ebooks/mobi/writer2/serializer.py | 9 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import re, uni... |
jose36/jmdl5 | refs/heads/master | servers/zinwa.py | 43 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para zinwa
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from core import ... |
agutieda/QuantEcon.py | refs/heads/master | examples/cauchy_samples.py | 7 |
import numpy as np
from scipy.stats import cauchy
import matplotlib.pyplot as plt
n = 1000
distribution = cauchy()
fig, ax = plt.subplots()
data = distribution.rvs(n)
if 0:
ax.plot(list(range(n)), data, 'bo', alpha=0.5)
ax.vlines(list(range(n)), 0, data, lw=0.2)
ax.set_title("{} observations from the Ca... |
ehashman/oh-mainline | refs/heads/master | vendor/packages/django-registration/registration/urls.py | 39 | """
URLConf for Django user registration and authentication.
If the default behavior of the registration views is acceptable to
you, simply use a line like this in your root URLConf to set up the
default URLs for registration::
(r'^accounts/', include('registration.urls')),
This will also automatically set up th... |
Beeblio/django | refs/heads/master | tests/migrations/migrations_test_apps/with_package_model/models/__init__.py | 12133432 | |
UIKit0/marsyas | refs/heads/master | src/django/birdsong/application/birdsong/orchive/__init__.py | 12133432 | |
ChristosChristofidis/bokeh | refs/heads/master | examples/plotting/file/ajax_source_realtime.py | 22 | import numpy as np
from bokeh.plotting import figure, show, output_file
from bokeh.models.sources import AjaxDataSource
output_file("ajax_source_realtime.html", title="ajax_source_realtime.py example")
source = AjaxDataSource(data_url='http://localhost:5050/data', mode="append",
if_modified=Tr... |
desecho/tickets | refs/heads/master | tickets_project/tickets/admin.py | 1 | from django.contrib import admin
from .models import (UserProfile, Department, Team, SubscriberType, Type,
Urgence, Ticket, Reason)
class TeamAdmin(admin.ModelAdmin):
def queryset(self, request):
qs = self.model.all.get_query_set()
return qs
admin.site.register(UserProfile)
... |
Stormwolves/stormwolves-generator | refs/heads/master | stormwolves/plugins/tipuesearch/__init__.py | 371 | from .tipue_search import *
|
socialpercon/anki-1 | refs/heads/master | oldanki/template/__init__.py | 20 | from oldanki.template.template import Template
from oldanki.template.view import View
def render(template, context=None, **kwargs):
context = context and context.copy() or {}
context.update(kwargs)
return Template(template, context).render()
|
arpitn30/open-event-orga-server | refs/heads/development | app/views/sitemap.py | 8 | from math import ceil
from flask import url_for, render_template, make_response, request, \
Blueprint, abort
from app.settings import get_settings
from app.helpers.data_getter import DataGetter
from app.models.event import Event
from app.models.setting import Environment
sitemaps = Blueprint('sitemaps', __name__... |
gkadillak/rockstor-core | refs/heads/master | src/rockstor/smart_manager/taplib/probe_config.py | 6 | """
Copyright (c) 2012 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor 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 v... |
rickmendes/ansible-modules-core | refs/heads/devel | network/nxos/nxos_igmp_interface.py | 15 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distribut... |
meisamhe/GPLshared | refs/heads/master | Programming/MPI — AMath 483 583, Spring 2013 1.0 documentation_files/inorder_traversal_with_parent.py | 1 | from binary_tree_with_parent_prototype import BinaryTreeNode
# @include
def inorder_traversal(tree):
prev, result = None, []
while tree:
if prev is tree.parent:
# We came down to tree from prev.
if tree.left: # Keep going left.
next = tree.left
else... |
dudeness/webAppSite | refs/heads/development | application/settings/statics.py | 1 | from base import *
from modules import *
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FIND... |
devincornell/semanticanlysis | refs/heads/master | __init__.py | 1 | from .documents import *
from .semanticnetwork import *
from .topicmodels import *
from .preprocessing import *
from .visualize import *
from .timelines import *
from .concordance import *
from .dictionary import *
from .util import *
if __name__ == '__main__':
print('This is the semanticanlysis library.')
|
stonegithubs/odoo | refs/heads/8.0 | openerp/models.py | 20 | # -*- 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... |
felipenaselva/felipe.repository | refs/heads/master | plugin.video.atto.filmes/tv5.py | 67 |
import base64
import zlib, urllib,urllib2,re
key=base64.b64decode("ZXQgb3VhaSBtZWMh")
def getUrl(url, cookieJar=None,post=None, timeout=20, headers=None):
cookie_handler = urllib2.HTTPCookieProcessor(cookieJar)
opener = urllib2.build_opener(cookie_handler, urllib2.HTTPBasicAuthHandler(), urllib2.HTTPHandler()... |
liberorbis/libernext | refs/heads/master | apps/erpnext/erpnext/accounts/report/customer_account_head/__init__.py | 12133432 | |
shurihell/testasia | refs/heads/test1 | cms/lib/__init__.py | 12133432 | |
ain7/www.ain7.org | refs/heads/master | ain7/voyages/migrations/__init__.py | 12133432 | |
youprofit/django-cms | refs/heads/develop | cms/south_migrations/0073_auto__chg_field_cmsplugin_path__chg_field_page_path.py | 49 | # -*- 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):
# Changing field 'CMSPlugin.path'
db.alter_column(u'cms_cmsplugin', 'pat... |
hyOzd/kicad-python | refs/heads/master | kicad/__init__.py | 1 | # Copyright 2015 Miguel Angel Ajo Pelayo <miguelangel@ajo.es>
#
# 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.
#
#... |
fiji-flo/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/pytest/doc/en/example/nonpython/conftest.py | 24 | # content of conftest.py
import pytest
def pytest_collect_file(parent, path):
if path.ext == ".yml" and path.basename.startswith("test"):
return YamlFile(path, parent)
class YamlFile(pytest.File):
def collect(self):
import yaml # we need a yaml parser, e.g. PyYAML
raw = yaml.safe_load... |
jinshana/otp | refs/heads/maint | lib/asn1/test/asn1_SUITE_data/P-Record.py | 97 | P-Record DEFINITIONS ::=
BEGIN
PersonnelRecord ::= [APPLICATION 0] SET
{ name Name,
title VisibleString,
number EmployeeNumber,
dateOfHire Date,
nameOfSpouse [1] Name,
children SEQUENCE OF ChildInformation DEFAULT {}
}
ChildInformation ::= SET
{ name Name,
dateOfBirth Date
}
Name ::=... |
tbeadle/django | refs/heads/master | tests/forms_tests/field_tests/test_choicefield.py | 18 | from __future__ import unicode_literals
from django.forms import ChoiceField, Form, ValidationError
from django.test import SimpleTestCase
from . import FormFieldAssertionsMixin
class ChoiceFieldTest(FormFieldAssertionsMixin, SimpleTestCase):
def test_choicefield_1(self):
f = ChoiceField(choices=[('1',... |
hubsaysnuaa/odoo | refs/heads/8.0 | addons/base_iban/__init__.py | 447 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... |
OddEssay/ansible | refs/heads/devel | lib/ansible/playbook/base.py | 17 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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) an... |
AudriusButkevicius/TurboVNC | refs/heads/master | unix/Xvnc/extras/freetype2/src/tools/docmaker/tohtml.py | 4 | from sources import *
from content import *
from formatter import *
import time
# The following defines the HTML header used by all generated pages.
#
html_header_1 = """\
<html>
<header>
<title>"""
html_header_2= """ API Reference</title>
<basefont face="Verdana,Geneva,Arial,Helvetica">
<style content="text/css">
... |
gylian/sickrage | refs/heads/master | autoProcessTV/lib/requests/packages/chardet/chardistribution.py | 2754 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
manuzhang/beam | refs/heads/master | sdks/python/apache_beam/examples/cookbook/bigquery_tornadoes_test.py | 16 | #
# 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... |
reinhrst/ycmd | refs/heads/master | cpp/ycm/tests/gmock/gtest/xcode/Scripts/versiongenerate.py | 3088 | #!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
stbka/ansible | refs/heads/devel | lib/ansible/plugins/inventory/ini.py | 81 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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) an... |
evansde77/cirrus | refs/heads/develop | tests/__init__.py | 12133432 | |
sjkingo/fantail | refs/heads/master | fantail/plugins/__init__.py | 12133432 | |
phenoxim/cinder | refs/heads/master | cinder/tests/unit/brick/__init__.py | 12133432 | |
Lujeni/ansible | refs/heads/devel | lib/ansible/module_utils/network/ordnance/__init__.py | 12133432 | |
freezmeinster/avagata-site | refs/heads/dev | django/templatetags/__init__.py | 12133432 | |
nesdis/djongo | refs/heads/master | tests/django_tests/tests/v22/tests/gis_tests/gdal_tests/__init__.py | 12133432 | |
Petr-Kovalev/nupic-win32 | refs/heads/master | external/linux32/lib/python2.6/site-packages/matplotlib/numerix/_sp_imports.py | 70 | try:
from numpy.oldnumeric import Int8, UInt8, \
Int16, UInt16, \
Int32, UInt32, \
Float32, Float64, \
Complex32, Complex64, \
Float, Int, Complex
except ImportError:
from numpy import Int8, UInt8, \
Int16, UInt16, \
Int32, UInt32, \
Float3... |
yanlend/scikit-learn | refs/heads/master | examples/cluster/plot_lena_compress.py | 271 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=========================================================
Vector Quantization Example
=========================================================
The classic image processing example, Lena, an 8-bit grayscale
bit-depth, 512 x 512 sized image, is used here to illustrate
how ... |
jdmcbr/Shapely | refs/heads/master | tests/test_coords.py | 8 | from . import unittest, numpy
from shapely import geometry
class CoordsTestCase(unittest.TestCase):
"""
Shapely assumes contiguous C-order float64 data for internal ops.
Data should be converted to contiguous float64 if numpy exists.
c9a0707 broke this a little bit.
"""
@unittest.skipIf(not n... |
anhstudios/swganh | refs/heads/develop | data/scripts/templates/object/draft_schematic/instrument/shared_instrument_nalargon.py | 2 | #### 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 = Intangible()
result.template = "object/draft_schematic/instrument/shared_instrument_nalargon.iff"
result.attribut... |
liamgh/liamgreenhughes-sl4a-tf101 | refs/heads/master | python/src/Lib/distutils/unixccompiler.py | 33 | """distutils.unixccompiler
Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
* macros defined with -Dname[=value]
* macros undefined with -Uname
* include search directories specified with -Idir
* libraries specified with -lllib
* library... |
team-xue/xue | refs/heads/master | xue/accounts/migrations/0008_auto__add_field_dmuserprofile_gender__add_field_dmuserprofile_phone.py | 1 | # encoding: 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 'DMUserProfile.gender'
db.add_column('accounts_dmuserprofile', 'gender', self.gf... |
BaichuanWu/Blog_on_django | refs/heads/master | site-packages/django/contrib/gis/tests/geogapp/__init__.py | 12133432 | |
runekaagaard/django-contrib-locking | refs/heads/master | django/contrib/admin/views/__init__.py | 12133432 | |
bjwbell/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/handshake/hybi.py | 506 | # Copyright 2012, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
Changaco/oh-mainline | refs/heads/master | vendor/packages/gdata/tests/gdata_tests/contacts/profiles/live_client_test.py | 39 | #!/usr/bin/env python
#
# Copyright (C) 2009 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 ... |
jamesmcm/luigi | refs/heads/master | test/mock_test.py | 4 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... |
tboyce021/home-assistant | refs/heads/dev | tests/components/tellduslive/test_config_flow.py | 9 | # flake8: noqa pylint: skip-file
"""Tests for the TelldusLive config flow."""
import asyncio
from unittest.mock import Mock, patch
import pytest
from homeassistant import data_entry_flow
from homeassistant.components.tellduslive import (
APPLICATION_NAME,
DOMAIN,
KEY_SCAN_INTERVAL,
SCAN_INTERVAL,
... |
OpenData-NC/open-data-nc | refs/heads/master | opendata/catalog/forms.py | 2 | from django import forms
from django.contrib.admin import site
from django.contrib.admin import widgets
from django.template.defaultfilters import slugify
from secure_input.fields import MiniWYSIWYGField
from .models import (Category, DataType, Department, Division, Resource,
UpdateFrequency)
fro... |
simongoffin/my_odoo_tutorial | refs/heads/master | addons/l10n_multilang/__init__.py | 438 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
kovidgoyal/html5-parser | refs/heads/master | genattrs.py | 1 | #!/usr/bin/env python
# vim:fileencoding=utf-8
# License: Apache 2.0 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import re
import subprocess
from lxml import html
self_path = os.path.abspath(__file__)
HEADER = ''... |
equalitie/highpass | refs/heads/master | src/utils.py | 1 | import re, sys, math, random, csv, types, networkx as nx
from collections import defaultdict
def parse(filename, isDirected):
reader = csv.reader(open(filename, 'r'), delimiter=',')
data = [row for row in reader]
print "Reading and parsing the data into memory..."
if isDirected:
return parse_j... |
Darkmer/masterchief | refs/heads/master | CourseBuilderenv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py | 12133432 | |
mbauskar/tele-frappe | refs/heads/develop | frappe/core/doctype/block_module/__init__.py | 12133432 | |
vaughamhong/gmock | refs/heads/master | scripts/generator/cpp/__init__.py | 12133432 | |
350dotorg/Django | refs/heads/master | tests/regressiontests/null_fk_ordering/models.py | 92 | """
Regression tests for proper working of ForeignKey(null=True). Tests these bugs:
* #7512: including a nullable foreign key reference in Meta ordering has un
xpected results
"""
from django.db import models
# The first two models represent a very simple null FK ordering case.
class Author(models.Model):
n... |
andela-engmkwalusimbi/Picha | refs/heads/master | api/views.py | 1 | import urllib
import cStringIO
import os
from django.contrib.auth.models import User
from django.contrib.auth import login, logout
from django.views.decorators.csrf import csrf_exempt
from rest_framework import generics, permissions, status
from rest_framework.response import Response
from rest_framework.decorators i... |
xq262144/hue | refs/heads/master | desktop/libs/libsentry/src/libsentry/tests.py | 2 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
ajgallegog/gem5_arm | refs/heads/master | src/arch/x86/isa/insts/simd128/integer/data_reordering/shuffle.py | 91 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.