repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
chatcannon/numpy | refs/heads/master | numpy/matlib.py | 161 | from __future__ import division, absolute_import, print_function
import numpy as np
from numpy.matrixlib.defmatrix import matrix, asmatrix
# need * as we're copying the numpy namespace
from numpy import *
__version__ = np.__version__
__all__ = np.__all__[:] # copy numpy namespace
__all__ += ['rand', 'randn', 'repmat... |
viswimmer1/PythonGenerator | refs/heads/master | data/python_files/32935198/browseProjects.py | 18 | import hierlist, string, regutil, os
import win32con, win32ui, win32api
import commctrl
from pywin.mfc import dialog
import glob
import pyclbr
import pywin.framework.scriptutils
import afxres
class HLIErrorItem(hierlist.HierListItem):
def __init__(self, text):
self.text = text
hierlist.HierListItem.__init__(self)... |
t3dev/odoo | refs/heads/master | addons/sale_coupon_delivery/models/__init__.py | 14 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import sale_order
from . import sale_coupon_program
from . import sale_coupon_reward |
pombredanne/teamwork | refs/heads/master | wsgi/static/Brython2.1.0-20140419-113919/Lib/threading.py | 730 | """Thread module emulating a subset of Java's threading model."""
import sys as _sys
import _thread
from time import sleep as _sleep
try:
from time import monotonic as _time
except ImportError:
from time import time as _time
from traceback import format_exc as _format_exc
from _weakrefset import WeakSet
# No... |
blaedd/logsnarf | refs/heads/master | src/logsnarf/test/__init__.py | 12133432 | |
LinuxIsCool/unearthed | refs/heads/master | Unearthed/__init__.py | 12133432 | |
Lektorium-LLC/edx-platform | refs/heads/master | lms/djangoapps/badges/events/__init__.py | 12133432 | |
robovm/robovm-studio | refs/heads/master | python/lib/Lib/site-packages/django/contrib/localflavor/de/__init__.py | 12133432 | |
jtg-gg/blink | refs/heads/dev12-m41 | Tools/Scripts/webkitpy/formatter/__init__.py | 12133432 | |
marc-sensenich/ansible | refs/heads/devel | lib/ansible/module_utils/network/aireos/__init__.py | 12133432 | |
MatthewWilkes/django | refs/heads/master | tests/http_utils/__init__.py | 12133432 | |
awyrough/make-the-country | refs/heads/master | make-the-country/population_client.py | 1 | """
BigQuery Client for Recreating US Census Data, census block by census block.
Alexander Penn Hill Wyrough
3/17/2015
https://github.com/awyrough/make-the-country
"""
# SYSTEM IMPORTS
import logging, os, httplib2
# GOOGLE IMPORTS
from apiclient.discovery import build
from oauth2client.client import SignedJwtAsserti... |
jameshiew/mws | refs/heads/master | mws/future_utils/__init__.py | 1 | from .collections import unique_list_order_preserved
from .crypto import calc_md5
from .params import (
clean_bool,
clean_date,
clean_string,
clean_value,
dict_keyed_param,
enumerate_keyed_param,
enumerate_param,
enumerate_params,
flat_param_dict,
)
from .parsers import (
DataWra... |
affo/nova | refs/heads/master | nova/cmd/serialproxy.py | 4 | # 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 agreed to in... |
veasy/easy-remote-control | refs/heads/master | erc-server/erc_server/sockets/keyboard_socket.py | 1 | from pyunicon.UCScreen import UCScreen
from erc_server import socketio
from flask.ext.socketio import emit
from pyunicon.UCMouse import UCMouse
from erc_server.erc_util import get_key_by_text, press_key
__author__ = 'cansik'
DEFAULT_NAMESPACE = '/text'
__mouse = UCMouse()
__screen = UCScreen()
@socketio.on('connec... |
KiCad/kicad-python | refs/heads/master | doc/source/conf.py | 4 | # -*- coding: utf-8 -*-
#
# KiCad Python API documentation build configuration file, created by
# sphinx-quickstart on Fri Jan 23 20:40:38 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fi... |
sourcesimian/pySkype | refs/heads/master | skype/__init__.py | 12133432 | |
RevelSystems/django | refs/heads/master | tests/m2m_signals/__init__.py | 12133432 | |
b0ttl3z/SickRage | refs/heads/master | sickbeard/providers/kat.py | 5 | # coding=utf-8
# Author: Dustyn Gibson <miigotu@gmail.com>
# URL: http://sickrage.github.io
#
# This file is part of SickRage.
#
# SickRage 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... |
kressi/erpnext | refs/heads/develop | erpnext/patches/v7_1/add_account_user_role_for_timesheet.py | 52 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
if not frappe.db.get_value('DocPerm', {'parent': 'Timesheet', 'role': 'Accounts User', 'permlevel': 1}):
doc = frappe.g... |
paplorinc/intellij-community | refs/heads/master | python/testData/copyPaste/multiLine/IndentInnerFunction.after.py | 83 | class C:
def foo(self):
def foo(self):
x = 1
y = 2
y = 2
|
billonahill/heron | refs/heads/master | integration-test/src/python/integration_test/topology/all_grouping/__init__.py | 8 | """All grouping integration test topology"""
__all__ = ['all_grouping']
from .all_grouping import all_grouping_buidler
|
h4r5h1t/django-hauthy | refs/heads/hauthy | django/utils/itercompat.py | 712 | """
Providing iterator functions that are not in all version of Python we support.
Where possible, we try to use the system-native version and only fall back to
these implementations if necessary.
"""
def is_iterable(x):
"A implementation independent way of checking for iterables"
try:
iter(x)
exc... |
vicaya/hypertable | refs/heads/master | src/py/ThriftClient/client_test.py | 2 | import sys
from hypertable.thriftclient import *
from hyperthrift.gen.ttypes import *
try:
client = ThriftClient("localhost", 38080)
print "HQL examples"
res = client.hql_query("show tables")
print res
res = client.hql_query("select * from thrift_test")
print res
print "mutator examples";
mutator = cl... |
zchking/odoo | refs/heads/8.0 | addons/l10n_in_hr_payroll/report/report_payslip_details.py | 374 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... |
40223250/w16b_test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/unittest/test/testmock/support.py | 829 | import sys
def is_instance(obj, klass):
"""Version of is_instance that doesn't access __class__"""
return issubclass(type(obj), klass)
class SomeClass(object):
class_attribute = None
def wibble(self):
pass
class X(object):
pass
def examine_warnings(func):
def wrapper():
w... |
ESS-LLP/erpnext | refs/heads/develop | erpnext/manufacturing/doctype/manufacturing_settings/__init__.py | 12133432 | |
edevil/django | refs/heads/master | tests/absolute_url_overrides/__init__.py | 12133432 | |
sveinugu/gtrackcore | refs/heads/master | gtrackcore/test/track/random/__init__.py | 12133432 | |
ormnv/os_final_project | refs/heads/master | django/contrib/gis/db/backends/spatialite/__init__.py | 12133432 | |
yasoob/PythonRSSReader | refs/heads/master | venv/lib/python2.7/dist-packages/reportlab/platypus/tableofcontents.py | 1 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/tableofcontents.py
__version__=''' $Id$ '''
__doc__="""Experimental class to generate Tables of Contents easily
This module defines a single... |
lheagy/casingResearch | refs/heads/master | tests/test_SimulationRun.py | 2 | import unittest
import numpy as np
import os
import shutil
import casingSimulations
plotIt = False
TOL = 1e-4
ZERO = 1e-7
class ForwardSimulationTestCyl2D(unittest.TestCase):
dir2D = './sim2D'
def setUp(self):
sigma_back = 1e-1 # wholespace
modelParameters = casingSimulations.model.Casin... |
amaringarcia/AliPhysics | refs/heads/master | PWGMM/MC/aligenqa/aligenqa/plotting.py | 41 | from pprint import pprint
from rootpy import asrootpy, log, collection
from rootpy.plotting import Hist2D
from rootpy.io import root_open
from data_extractors import \
get_dNdeta_in_classifier_bin_interval,\
get_identified_vs_mult,\
get_correlation_histogram,\
get_PNch_vs_estmult,\
get_meanpt_vs_e... |
angr/angr | refs/heads/master | angr/engines/pcode/arch/ArchPcode_tricore_LE_32_default.py | 1 | ###
### This file was automatically generated
###
from archinfo.arch import register_arch, Endness, Register
from .common import ArchPcode
class ArchPcode_tricore_LE_32_default(ArchPcode):
name = 'tricore:LE:32:default'
pcode_arch = 'tricore:LE:32:default'
description = 'Siemens Tricore Embedded Process... |
okulikov/modeshape | refs/heads/master | bin/markdown2.py | 17 | #!/usr/bin/env python
# Copyright (c) 2007-2008 ActiveState Corp.
# License: MIT (http://www.opensource.org/licenses/mit-license.php)
r"""A fast and complete Python implementation of Markdown.
[from http://daringfireball.net/projects/markdown/]
> Markdown is a text-to-HTML filter; it translates an easy-to-read /
> ea... |
jdfekete/progressivis | refs/heads/master | tests/test_03_join3.py | 1 | from . import ProgressiveTest, skip
from progressivis import Print, Every
from progressivis.stats import Stats
from progressivis.io import CSVLoader
from progressivis.datasets import get_dataset
from progressivis.table.bin_join import BinJoin
from progressivis.table.constant import Constant
from progressivis.table.tab... |
minhphung171093/OpenERP_V8 | refs/heads/master | openerp/addons/hr_timesheet_sheet/report/hr_timesheet_report.py | 194 | # -*- 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... |
vcaen/personalwebsite | refs/heads/master | app/controller/__init__.py | 2 | __author__ = 'vcaen'
|
krisys/django | refs/heads/master | tests/view_tests/app0/__init__.py | 12133432 | |
emakis/erpnext | refs/heads/develop | erpnext/schools/doctype/student_group/__init__.py | 12133432 | |
CylonicRaider/Instant | refs/heads/master | script/deanimate.py | 1 | #!/usr/bin/env python3
# -*- coding: ascii -*-
"""
A script removing animations from SVG graphics.
"""
import sys, os, re
# etree fails utterly at producing nice-looking XML
from xml.dom import minidom
def process(inpt, outp):
def traverse(node):
for child in node.childNodes:
if child.nodeTy... |
y12uc231/edx-platform | refs/heads/master | lms/djangoapps/courseware/tests/__init__.py | 101 | """
integration tests for xmodule
Contains:
1. BaseTestXmodule class provides course and users
for testing Xmodules with mongo store.
"""
from django.test.utils import override_settings
from django.core.urlresolvers import reverse
from django.test.client import Client
from edxmako.shortcuts import render_to... |
yxtj/Neuron | refs/heads/master | dataAnalysis/activation.py | 2 | import math
import process_base as base
import myalgorithm as alg
def cal_dif_pair(line_from,line_to,n_dig=4):
res=[]
length_f=len(line_from)
length_t=len(line_to)
if length_f==0 or length_t==0:
return res
j=0
start_p=0
while start_p<length_f and line_from[start_p]<line_to[0]:
start_p+=1
for i in range(sta... |
dcramer/django-compositepks | refs/heads/master | tests/modeltests/update/models.py | 8 | """
Tests for the update() queryset method that allows in-place, multi-object
updates.
"""
from django.db import models
class DataPoint(models.Model):
name = models.CharField(max_length=20)
value = models.CharField(max_length=20)
another_value = models.CharField(max_length=20, blank=True)
def __unico... |
jazkarta/edx-platform | refs/heads/master | lms/djangoapps/class_dashboard/tests/test_views.py | 133 | """
Tests for class dashboard (Metrics tab in instructor dashboard)
"""
import json
from django.test.client import RequestFactory
from mock import patch
from nose.plugins.attrib import attr
from xmodule.modulestore.tests.factories import CourseFactory
from xmodule.modulestore.tests.django_utils import ModuleStoreTestC... |
orion1024/Sick-Beard | refs/heads/master | lib/hachoir_parser/game/__init__.py | 90 | from lib.hachoir_parser.game.zsnes import ZSNESFile
from lib.hachoir_parser.game.spider_man_video import SpiderManVideoFile
from lib.hachoir_parser.game.laf import LafFile
from lib.hachoir_parser.game.blp import BLP1File, BLP2File |
cecep-edu/edx-platform | refs/heads/eucalyptus.2 | common/djangoapps/microsite_configuration/tests/backends/test_base.py | 38 | """
Test Microsite base backends.
"""
import logging
from mock import patch
from django.conf import settings
from django.test import TestCase
from microsite_configuration import microsite
from microsite_configuration.backends.base import (
AbstractBaseMicrositeBackend,
BaseMicrositeBackend
)
log = logging.ge... |
hisato-kawaji/pyrowork-core | refs/heads/master | app/functions/sample/__init__.py | 12133432 | |
centwave/jg82ksgvqkuan | refs/heads/master | django/conf/locale/es_AR/__init__.py | 12133432 | |
richardcs/ansible | refs/heads/devel | test/units/modules/network/nxos/__init__.py | 12133432 | |
ncliam/serverpos | refs/heads/master | openerp/addons/crm/report/report_businessopp.py | 377 | # -*- 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... |
fanout/django-eventstream | refs/heads/master | setup.py | 1 | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as f:
readme = f.read()
install_requires = []
install_requires.extend(['PyJWT>=1.5,<3', 'gripcontrol>=4.0,<5', 'django_grip>=3.0,<4', 'Werkzeug>=0.12,<1', 'six>=1.10,<2'])
setup(
name='django-eventstream',
versio... |
ondra-novak/blink | refs/heads/nw | LayoutTests/http/tests/websocket/fragmented-binary-frames_wsh.py | 53 | from mod_pywebsocket import common
from mod_pywebsocket import stream
def web_socket_do_extra_handshake(request):
pass
def web_socket_transfer_data(request):
messages_to_send = [['Hello, ', 'world!'],
['', 'Hello, ', '', 'world!', ''],
['', '', ''],
... |
topazproject/topaz | refs/heads/master | topaz/utils/cache.py | 3 | from rpython.rlib.objectmodel import specialize
class Cache(object):
def __init__(self, space):
self.space = space
self.contents = {}
@specialize.memo()
def getorbuild(self, key):
try:
return self.contents[key]
except KeyError:
builder = self._build... |
ninjaotoko/dynaform | refs/heads/master | dynaform/models.py | 1 | # *-* coding=utf-8 *-*
import StringIO
from django import forms
from django.conf import settings
from django.db import models
from django.db.models import Q
from django.contrib.sites.models import Site
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import Conte... |
neoascetic/cmsplugin-filer | refs/heads/develop | cmsplugin_filer_teaser/migrations/0006_fix_migration_mess.py | 28 | # 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):
# Deleting field 'FilerTeaser.external_image'
db.delete_column('cmsplugin_filerteaser', 'external_image')
... |
charbeljc/project-service | refs/heads/8.0 | __unported__/analytic_hours_block/__openerp__.py | 21 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Vincent Renaville, ported by Joel Grand-Guillaume
# Copyright 2010-2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... |
zack3241/incubator-airflow | refs/heads/master | tests/dags/test_retry_handling_job.py | 38 | # -*- coding: utf-8 -*-
#
# 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
... |
mshafiq9/django | refs/heads/master | django/conf/locale/sq/__init__.py | 12133432 | |
ttsubo/ryu | refs/heads/master | ryu/app/gui_topology/__init__.py | 12133432 | |
melon-li/openstack-dashboard | refs/heads/master | openstack_dashboard/management/commands/__init__.py | 12133432 | |
DengueTim/linux-rockchip | refs/heads/master | scripts/gdb/linux/__init__.py | 2010 | # nothing to do for the initialization of this package
|
bohlian/frappe | refs/heads/develop | frappe/website/doctype/blogger/blogger.py | 73 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
class Blogger(Document):
def validate(self):
... |
talishte/ctigre | refs/heads/master | env/lib/python2.7/site-packages/mezzanine/blog/migrations/0005_auto__del_comment__add_field_blogpost_comments_count__chg_field_blogpo.py | 8 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
try:
from django.contrib.auth import get_user_model
except ImportError: # django < 1.5
from django.contrib.auth.models import User
else:
User = get_user_model()
user_orm_label = '%s... |
ironbox360/django | refs/heads/master | django/forms/fields.py | 63 | """
Field classes.
"""
from __future__ import unicode_literals
import copy
import datetime
import os
import re
import sys
import uuid
from decimal import Decimal, DecimalException
from io import BytesIO
from django.core import validators
from django.core.exceptions import ValidationError
# Provide this import for ba... |
mensler/ansible | refs/heads/devel | lib/ansible/module_utils/bigswitch_utils.py | 73 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... |
Johnzero/OE7 | refs/heads/master | openerp/addons-modules/report_webkit/header.py | 7 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
# All Right Reserved
#
# Author : Nicolas Bessi (Camptocamp)
#
# WARNING: This program as such is intended to be used by professional
# programmers who... |
strongswan/swidGenerator | refs/heads/master | swid_generator/environments/common.py | 1 | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import os
import stat
import platform
import distro
from distutils.spawn import find_executable
from swid_generator.package_info import FileInfo
from swid_generator.exceptions import RequirementsNotInstalledError... |
iiman/mytardis | refs/heads/master | tardis/apps/oaipmh/provider/base.py | 5 | import oaipmh.error
import oaipmh.interfaces
class BaseProvider(oaipmh.interfaces.IOAI, object):
"""
A base provider which roughly implements the PyOAI interface for OAI-PMH
servers.
Extend this if you're writing your own provider for a new type or a
different metadata format.
"""
def __i... |
svendavison/mablog2 | refs/heads/master | gen2.py | 1 | #!/usr/bin/python
#
# written by @eric_capuano
# https://github.com/ecapuano/web-traffic-generator
#
# published under MIT license :) do what you want.
#
import requests, re, time, random, config
def doRequest(url):
global dataMeter
global goodRequests
global badRequests
sleepTime = random.randrange(config.minW... |
robiame/AndroidGeodata | refs/heads/master | pil/GribStubImagePlugin.py | 1 | #
# The Python Imaging Library
# $Id$
#
# GRIB stub adapter
#
# Copyright (c) 1996-2003 by Fredrik Lundh
#
# See the README file for information on usage and redistribution.
#
import Image, ImageFile
_handler = None
##
# Install application-specific GRIB image handler.
#
# @param handler Handler ob... |
emedinaa/contentbox | refs/heads/master | third_party/unidecode/x06f.py | 4 | data = (
'Qing ', # 0x00
'Yu ', # 0x01
'Piao ', # 0x02
'Ji ', # 0x03
'Ya ', # 0x04
'Jiao ', # 0x05
'Qi ', # 0x06
'Xi ', # 0x07
'Ji ', # 0x08
'Lu ', # 0x09
'Lu ', # 0x0a
'Long ', # 0x0b
'Jin ', # 0x0c
'Guo ', # 0x0d
'Cong ', # 0x0e
'Lou ', # 0x0f
'Zhi ', ... |
s3team/loop | refs/heads/master | libtracewrap/libtrace/protobuf/python/google/protobuf/internal/message_test.py | 223 | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... |
ingokegel/intellij-community | refs/heads/master | python/testData/editing/firstParamMetaClass.py | 83 | class A(type):
@classmethod
def f<caret>
|
serapio/kwaras | refs/heads/master | src/conf/__init__.py | 2 | __author__ = 'Lucien'
|
synergeticsedx/deployment-wipro | refs/heads/oxa/master.fic | lms/djangoapps/lms_xblock/migrations/0001_initial.py | 87 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operati... |
hwstreaming/flink | refs/heads/master | flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/connection/Iterator.py | 21 | # ###############################################################################
# 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 fi... |
alheinecke/tensorflow-xsmm | refs/heads/master | tensorflow/python/training/input_test.py | 18 | # Copyright 2015 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... |
Suwmlee/XX-Net | refs/heads/python3 | Python3/lib/encodings/iso8859_6.py | 37 | """ Python Character Mapping Codec iso8859_6 generated from 'MAPPINGS/ISO8859/8859-6.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,i... |
DailyActie/Surrogate-Model | refs/heads/master | 01-codes/pyOpt-1.2.0/examples/rosenbrock.py | 1 | #!/usr/bin/env python
'''
Solves Rosenbrock's Unconstrained Problem.
min 100*(x2-x1^2)**2 + (1-x1)^2
s.t.: -10 <= xi <= 10, i = 1,2
f* = 0 , x* = [1, 1]
'''
# =============================================================================
# Standard Python modules
# ==================================... |
MarkusH/pelican-plugins | refs/heads/master | better_tables/__init__.py | 57 | # Copyright (c) 2015 Alex Waite
# 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, distribute... |
provaleks/o8 | refs/heads/8.0 | addons/auth_oauth/res_config.py | 292 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
evaschalde/odoo | refs/heads/master | addons/account_anglo_saxon/product.py | 384 | ##############################################################################
#
# 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 Affero General Publ... |
Aalto-LeTech/a-plus | refs/heads/master | external_services/api/authentication.py | 1 | import datetime
import logging
import oauthlib.oauth1.rfc5849
from rest_framework.authentication import BaseAuthentication
from rest_framework.exceptions import AuthenticationFailed
from external_services.models import LTIService
from .oauth_nonce_cache import OAuthNonceCache
from .parsers import parse_sourced_id
fro... |
atsidaev/gdb-z80 | refs/heads/master | gdb/contrib/excheck.py | 41 | # Copyright 2011-2014 Free Software Foundation, Inc.
#
# This 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 prog... |
datacratic/StarCluster | refs/heads/vanilla_improvements | starcluster/tests/templates/sge_balancer.py | 19 | # Copyright 2009-2014 Justin Riley
#
# This file is part of StarCluster.
#
# StarCluster 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 (at your option) any
# later ... |
li-yuntao/PoemWorld | refs/heads/master | ReadingAssistant/search/CentralEnt.py | 2 | # -*- coding:utf-8 -*-
from ReadingAssistant.models import *
from .GraphMaker import *
from django.db.models import Q
class CentralEnt:
def __init__(self, content, record):
self.nodeId = -1
self.content = content
self.record = record
def getContent(self):
return self.content
... |
DBernardes/ProjetoECC | refs/heads/master | Ruido_de_Leitura/Codigo/CCDinfo.py | 1 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
Criado em 18 de Outubro de 2016
Descricao: este modulo tem como entrada o cabecalho de uma imagen fits e a quantidade de imagens da serie obtidam retornado uma string com as principais informacoes do CCD.
@author: Denis Varise Bernardes & Eder Martioli
... |
vishalpant/Banking-management-system | refs/heads/master | Application.py | 1 |
import Tkinter as tk
|
chouseknecht/ansible | refs/heads/devel | lib/ansible/module_utils/k8s/scale.py | 22 | #
# Copyright 2018 Red Hat | Ansible
#
# 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.
#
# ... |
crmccreary/openerp_server | refs/heads/master | openerp/tools/float_utils.py | 151 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... |
shenyy/lily2-gem5 | refs/heads/master | src/cpu/ExeTracer.py | 19 | # Copyright (c) 2007 The Regents of The University of Michigan
# 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 ... |
afandria/sky_engine | refs/heads/master | tools/valgrind/asan/asan_symbolize.py | 51 | #!/usr/bin/env python
# Copyright (c) 2012 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.
from third_party import asan_symbolize
import argparse
import base64
import json
import os
import platform
import re
import subpr... |
yg257/Pangea | refs/heads/master | lib/boto-2.34.0/boto/mashups/server.py | 153 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# 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, modi... |
AloneRoad/Inforlearn | refs/heads/1.0-rc3 | vendor/gdata/oauth/__init__.py | 157 | import cgi
import urllib
import time
import random
import urlparse
import hmac
import binascii
VERSION = '1.0' # Hi Blaine!
HTTP_METHOD = 'GET'
SIGNATURE_METHOD = 'PLAINTEXT'
# Generic exception class
class OAuthError(RuntimeError):
def __init__(self, message='OAuth error occured.'):
self.m... |
Bleno/teste_api | refs/heads/master | ambiente/lib/python2.7/posixpath.py | 4 | /usr/lib/python2.7/posixpath.py |
jiaaro/pydub | refs/heads/master | pydub/playback.py | 1 | """
Support for playing AudioSegments. Pyaudio will be used if it's installed,
otherwise will fallback to ffplay. Pyaudio is a *much* nicer solution, but
is tricky to install. See my notes on installing pyaudio in a virtualenv (on
OSX 10.10): https://gist.github.com/jiaaro/9767512210a1d80a8a0d
"""
import subprocess
fr... |
JTCunning/sentry | refs/heads/master | tests/sentry/auth/test_access.py | 13 | from __future__ import absolute_import
from mock import Mock
from sentry.auth import access
from sentry.models import AuthProvider
from sentry.testutils import TestCase
class FromUserTest(TestCase):
def test_no_access(self):
organization = self.create_organization()
team = self.create_team(organ... |
unomena/pyxero | refs/heads/master | xero/manager.py | 1 | from __future__ import unicode_literals
import requests
import six
import json
from xml.dom.minidom import parseString
from xml.etree.ElementTree import tostring, SubElement, Element
from datetime import datetime
from dateutil.parser import parse
from decimal import Decimal
from six.moves.urllib.parse import parse_qs... |
Sing-Li/go-buildpack | refs/heads/master | builds/runtimes/python-2.7.6/lib/python2.7/test/test_future4.py | 137 | from __future__ import unicode_literals
import unittest
from test import test_support
class TestFuture(unittest.TestCase):
def assertType(self, obj, typ):
self.assertTrue(type(obj) is typ,
"type(%r) is %r, not %r" % (obj, type(obj), typ))
def test_unicode_strings(self):
self.asser... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.