repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
indico/indico
refs/heads/master
indico/modules/events/util.py
1
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import json import os import random import re import warnings from collections import defaultdict from con...
wwj718/edx-platform
refs/heads/master
openedx/core/lib/tests/test_courses.py
13
""" Tests for functionality in openedx/core/lib/courses.py. """ import ddt from django.test.utils import override_settings from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from ..course...
MattJDavidson/euler-py-mjd
refs/heads/master
euler-py-mjd/003.py
1
#! /usr/bin/env python """ The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? """ import sys def prime_factors(n): """ Returns a list of the prime factors for a number """ i = 2 factors = [] while i * i <= n: if n % i: i +=...
mjzmjz/swift
refs/heads/master
swift/cli/form_signature.py
33
# Copyright (c) 2010-2012 OpenStack Foundation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
falkolab/titanium_mobile
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
1812
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions shared amongst the Windows generators.""" import copy import os # A dictionary mapping supported target types to extensions. TARGET_TYPE_EX...
koying/xbmc-vidonme
refs/heads/master
lib/gtest/test/gtest_help_test.py
2968
#!/usr/bin/env python # # Copyright 2009, 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...
kivymd/KivyMD
refs/heads/master
kivymd/tools/release/argument_parser.py
1
# Copyright (c) 2019-2021 Artem Bulgakov # # This file is distributed under the terms of the same license, # as the Kivy framework. import argparse import sys class ArgumentParserWithHelp(argparse.ArgumentParser): def parse_args(self, args=None, namespace=None): # Add help when no arguments specified ...
rohitwaghchaure/alec_frappe5_erpnext
refs/heads/develop
erpnext/setup/doctype/target_detail/target_detail.py
121
# 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 from frappe.model.document import Document class TargetDetail(Document): pass
rembo10/headphones
refs/heads/master
lib/unidecode/x0ad.py
253
data = ( 'gwan', # 0x00 'gwanj', # 0x01 'gwanh', # 0x02 'gwad', # 0x03 'gwal', # 0x04 'gwalg', # 0x05 'gwalm', # 0x06 'gwalb', # 0x07 'gwals', # 0x08 'gwalt', # 0x09 'gwalp', # 0x0a 'gwalh', # 0x0b 'gwam', # 0x0c 'gwab', # 0x0d 'gwabs', # 0x0e 'gwas', # 0x0f 'gwass', #...
imsparsh/beets
refs/heads/master
test/test_importer.py
22
# This file is part of beets. # Copyright 2015, Adrian Sampson. # # 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, ...
jelugbo/ddi
refs/heads/master
common/test/acceptance/pages/lms/tab_nav.py
19
""" High-level tab navigation. """ from bok_choy.page_object import PageObject from bok_choy.promise import Promise, EmptyPromise class TabNavPage(PageObject): """ High-level tab navigation. """ url = None def is_browser_on_page(self): return self.q(css='ol.course-tabs').present de...
gentoo/layman
refs/heads/master
layman/overlays/modules/darcs/__init__.py
1
# Copyright 2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 ''' Darcs plug-in module for layman. ''' module_spec = { 'name': 'darcs', 'description': __doc__, 'provides':{ 'darcs-module': { 'name': 'darcs', 'class': 'DarcsOverlay', ...
yongshengwang/hue
refs/heads/master
build/env/lib/python2.7/site-packages/thrift-0.9.1-py2.7-linux-x86_64.egg/thrift/transport/TZlibTransport.py
210
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
Softmotions/edx-platform
refs/heads/master
lms/djangoapps/instructor/management/commands/compute_grades.py
149
#!/usr/bin/python """ django management command: dump grades to csv files for use by batch processes """ from instructor.offline_gradecalc import offline_grade_calculation from courseware.courses import get_course_by_id from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from opaque_keys....
meecc/profitpy
refs/heads/master
profit/lib/widgets/output.py
18
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2007 Troy Melhase <troy@gci.net> # Distributed under the terms of the GNU General Public License v2 from PyQt4.QtGui import QWidget from profit.lib.widgets.ui_outputwidget import Ui_OutputWidget class OutputWidget(QWidget, Ui_OutputWidget): def __init__(s...
Arcanemagus/plexpy
refs/heads/master
lib/oauthlib/oauth1/rfc5849/endpoints/resource.py
45
# -*- coding: utf-8 -*- """ oauthlib.oauth1.rfc5849.endpoints.resource ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of the resource protection provider logic of OAuth 1.0 RFC 5849. """ from __future__ import absolute_import, unicode_literals import logging from .base import BaseEndpoin...
mwmuni/LIGGGHTS_GUI
refs/heads/master
OpenGL/GL/SUN/triangle_list.py
9
'''OpenGL extension SUN.triangle_list This module customises the behaviour of the OpenGL.raw.GL.SUN.triangle_list to provide a more Python-friendly API Overview (from the spec) OpenGL has two chained triangle primitives, TRIANGLE_STRIP and TRIANGLE_FAN. For multiple, consecutive triangle strips or triangle fa...
varunchitre15/android_kernel_sony_tianchi
refs/heads/android-5.0
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
avicizhu/Load-balancer
refs/heads/master
src/bridge/bindings/modulegen__gcc_ILP32.py
28
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
xunilrj/sandbox
refs/heads/master
courses/coursera-sandiego-algorithms/algorithms-on-strings/non_shared_substring/non_shared_substring.py
1
# python3 import sys def solve (p, q): result = p return result p = sys.stdin.readline ().strip () q = sys.stdin.readline ().strip () ans = solve (p, q) sys.stdout.write (ans + '\n')
dstockwell/catapult
refs/heads/master
third_party/mapreduce/mapreduce/tools/__init__.py
1305
#!/usr/bin/env python
hplustree/trove
refs/heads/master
trove/tests/unittests/cluster/test_cluster_models.py
3
# Copyright 2014 eBay Software Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
armon/pypred
refs/heads/master
pypred/tiler.py
2
""" This module helps with 'tiling' which is the process of pattern matching against AST trees. This can be used either for optimizations by re-writing the AST tree, or for things like expression counting and merging. """ class Pattern(object): "Base class for patterns. Always matches" def matches(self, node):...
111t8e/h2o-2
refs/heads/master
py/testdir_single_jvm/test_rf_enums_score_superset_fvec.py
9
import unittest, random, sys, time, re, math sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_rf, h2o_util, h2o_gbm # use randChars for the random chars to use def random_enum(randChars, maxEnumSize): choiceStr = randChars r = ''.join(random.choice(choice...
Rav3nPL/p2pool-rav
refs/heads/master
p2pool/networks/joulecoin.py
3
from p2pool.bitcoin import networks PARENT = networks.nets['joulecoin'] SHARE_PERIOD = 20 # seconds CHAIN_LENGTH = 12*60*60//10 # shares REAL_CHAIN_LENGTH = 12*60*60//10 # shares TARGET_LOOKBEHIND = 20 # shares SPREAD = 10 # blocks IDENTIFIER = 'ac556af4e900ca61'.decode('hex') PREFIX = '16ac009e4fa655ac'.decode('hex')...
asifmadnan/DIGITS
refs/heads/master
digits/dataset/job.py
7
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. from digits.job import Job from digits.utils import subclass, override from . import tasks # NOTE: Increment this everytime the pickled object changes PICKLE_VERSION = 1 @subclass class DatasetJob(Job): """ A Job that creates a dataset ...
kevinlu1987/hadoop-mc
refs/heads/master
src/contrib/hod/hodlib/Common/__init__.py
1638
#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 use thi...
eyaler/tensorpack
refs/heads/master
tensorpack/utils/nvml.py
1
# -*- coding: utf-8 -*- # File: nvml.py from ctypes import (byref, c_uint, c_ulonglong, CDLL, POINTER, Structure) import threading __all__ = ['NVMLContext'] NVML_ERROR_FUNCTION_NOT_FOUND = 13 NvmlErrorCodes = {"0": "NVML_SUCCESS", "1": "NVML_ERROR_UNINITIALIZED", ...
v4hn/ecto
refs/heads/master
python/ecto/sphinx/__init__.py
5
# # Copyright (c) 2011, Willow Garage, 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 co...
mihail911/nupic
refs/heads/master
examples/prediction/experiments/dutyCycle/problem/description.py
17
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
miltonruelas/cursotecnico
refs/heads/7.0
branch/hr_partner/__init__.py
4
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2013 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
blancltd/django-glitter
refs/heads/master
glitter/apps.py
2
from django.apps import AppConfig class GlittersConfig(AppConfig): name = 'glitter' label = 'glitter' def ready(self): super().ready() self.module.autodiscover()
chalkyam/Photometry_Pipeline
refs/heads/master
scripts/fullftp.py
1
#! /usr/bin/python # """ # make a file of all the fits file names # read the file and put to dummyfile # then loop through all the elements in dummyfile # """ from astropy.io import fits import os, sys import numpy as np def Index(directory, datatype): """ Indexes the files in a directory 'directory' with a ...
nazo/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_user_facts.py
49
#!/usr/bin/python # Copyright (c) 2016 Hewlett-Packard Enterprise Corporation # # This module 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 ve...
simonwydooghe/ansible
refs/heads/devel
lib/ansible/module_utils/network/iosxr/facts/lag_interfaces/lag_interfaces.py
21
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The iosxr lag_interfaces fact class It is in this file the configuration is collected from the device for a given resource, parsed, and the facts tree is populated based ...
unitpoint/oxygine-objectscript
refs/heads/master
tools/others/build_oxygine_with_sdl.py
1
import os import sys import shutil import zipfile temp = "../../temp" SDL_dest = temp + "/SDL" OXYGINE_dest = temp + "/oxygine-framework/" print "cleaning temp..." shutil.rmtree(temp, True) print "hg archive..." cmd = "hg archive " + OXYGINE_dest os.system(cmd) cmd = "hg archive -R ../../../SDL %s" % (SDL_dest, ) o...
OCA/server-tools
refs/heads/12.0
html_image_url_extractor/__manifest__.py
2
# Copyright 2016-2017 Jairo Llopis <jairo.llopis@tecnativa.com> # Copyright 2016 Tecnativa - Vicent Cubells # Copyright 2016 Tecnativa - Cristina Martin R. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Image URLs from HTML field", "summary": "Extract images found in any HTML field"...
dayaftereh/scripts
refs/heads/master
aircrack/speedport-adv.py
1
#!/usr/bin/python import sys def main(argv): if(len(argv) != 3): help() sys.exit(1) ssid, mac = argv[1], argv[2] mac = mac.replace(":", "").replace("-", "") input_key(ssid, mac) input_key(ssid.upper(), mac.upper()) input_key(ssid.lower(), mac.lower()) input_key(ssid.uppe...
stanifrolov/darkflow
refs/heads/master
darkflow/net/motnet/train.py
2
import numpy as np import tensorflow as tf def expit_tensor(x): return 1. / (1. + tf.exp(-x)) def loss(self, net_out): """ Takes net.out and placeholders value returned in batch() func above, to build train_op and loss """ # meta m = self.meta sprob = float(m['class_scale']) sconf = float(m['obj...
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/ep3/ep3_clone_relics_wookie_prisoner_01.py
85615
import sys def setup(core, object): return
AloneRoad/Inforlearn
refs/heads/1.0-rc3
vendor/django/utils/synch.py
376
""" Synchronization primitives: - reader-writer lock (preference to writers) (Contributed to Django by eugene@lazutkin.com) """ try: import threading except ImportError: import dummy_threading as threading class RWLock: """ Classic implementation of reader-writer lock with preference to writers....
intel-hpdd/intel-manager-for-lustre
refs/heads/master
chroma_core/services/job_scheduler/job_scheduler_client.py
1
# Copyright (c) 2020 DDN. All rights reserved. # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. """ The service `job_scheduler` handles both RPCs (JobSchedulerRpc) and a queue (NotificationQueue). The RPCs are used for explicit requests to modify the system or run ...
gauribhoite/personfinder
refs/heads/master
env/google_appengine/lib/grizzled/grizzled/db/__init__.py
19
# $Id: fa873c96e7b5ed23437473a2b6d0b9a3871d4a18 $ """ Introduction ============ The ``db`` module is a DB API wrapper. It provides a DB API-compliant API that wraps real underlying DB API drivers, simplifying some non-portable operations like ``connect()`` and providing some new operations. Some drivers come bundled...
flowersteam/explauto
refs/heads/master
explauto/sensorimotor_model/inverse/cmamodel.py
2
from .optimize import OptimizedInverseModel from . import cma class CMAESInverseModel(OptimizedInverseModel): """ An inverse model class using CMA-ES optimization routine, on an error function computed from the forward model. """ name = 'CMAES' desc = 'CMA-ES, Covariance Matrix Adaptation Ev...
takis/odoo
refs/heads/8.0
addons/website_sale_options/__init__.py
3964
import controllers import models
noroutine/ansible
refs/heads/devel
lib/ansible/modules/windows/win_ping.py
34
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others # # 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 ...
kamal-gade/rockstor-core
refs/heads/master
src/rockstor/storageadmin/views/clone_helpers.py
1
""" Copyright (c) 2012-2013 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 2 of the License, or (at your option) any la...
jgamblin/nocommonssids
refs/heads/master
nocommonssids.py
1
#!/usr/bin/env python # Name: nocommonssids.py # Purpose: Removes Common SSID's From OSX. # By: Jerry Gamblin # Date: 23.10.15 # Modified 23.10.15 # Rev Level 0.5 # ----------------------------------------------- from contextlib import closing from urllib import urlopen import os import re import time...
bachnx92/laravel5.1
refs/heads/master
vendor/psy/psysh/test/tools/vis.py
710
""" vis.py ====== Ctypes based module to access libbsd's strvis & strunvis functions. The `vis` function is the equivalent of strvis. The `unvis` function is the equivalent of strunvis. All functions accept unicode string as input and return a unicode string. Constants: ---------- * to select alternate encoding for...
G-Node/python-gnode-client
refs/heads/master
gnodeclient/tools.py
1
# Python G-Node Client # # Copyright (C) 2013 A. Stoewer # A. Sobolev # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License (see LICENSE.txt). """ This module defines some utility functions that provide implementati...
jazztpt/edx-platform
refs/heads/master
pavelib/quality.py
21
""" Check code quality using pep8, pylint, and diff_quality. """ from paver.easy import sh, task, cmdopts, needs, BuildFailure import os import re from .utils.envs import Env ALL_SYSTEMS = 'lms,cms,common,openedx,pavelib' def top_python_dirs(dirname): """ Find the directories to start from in order to find ...
gangadhar-kadam/adb-erp
refs/heads/master
website/doctype/style_settings/style_settings.py
5
# ERPNext - web based ERP (http://erpnext.com) # Copyright (C) 2012 Web Notes Technologies Pvt 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 3 of the License, or # (at yo...
odoousers2014/addons-yelizariev
refs/heads/8.0
import_custom/__init__.py
52
import wizard
wisfern/vnpy
refs/heads/master
setup.py
1
# encoding: UTF-8 ''' vn.py - By Traders, For Traders. The vn.py project is an open-source quantitative trading framework that is developed by traders, for traders. The project is mainly written in Python and uses C++ for low-layer and performance sensitive infrastructure. Using the vn.py project, institutional ...
wwj718/murp-edx
refs/heads/master
common/djangoapps/student/migrations/0033_auto__add_passwordhistory.py
46
# -*- 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 'PasswordHistory' db.create_table('student_passwordhistory', ( ('id', self.gf('dj...
jimmyraywv/cloud-custodian
refs/heads/master
tests/test_kinesis.py
5
# Copyright 2016-2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
lukleh/TwistedBot
refs/heads/master
twistedbot/chat.py
1
import re from collections import deque from pyparsing import ParseException, Word, OneOrMore, alphanums import config import behavior_tree as bt import logbot log = logbot.getlogger("CHAT") class Chat(object): clean_colors_re = re.compile(ur'\u00A7.', re.UNICODE) commander_name = Word(alphanums + '_').s...
svn2github/cef
refs/heads/master
tools/cef_parser.py
4
# Copyright (c) 2011 The Chromium Embedded Framework 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 date_util import * from file_util import * import os import re import shutil import string import sys import textwrap import time...
leifos/boxes
refs/heads/master
treasure-houses/asg/test_abstract_search_game.py
2
__author__ = 'leif' from abstract_search_game import ABSGame from asg_generator import RandomYieldGenerator, CueGenerator, ConstantLinearYieldGenerator, TestYieldGenerator import unittest import logging import sys class TestABSMatch(unittest.TestCase): def setUp(self): self.logger = logging.getLogger("T...
VisTrails/tej
refs/heads/master
tej/__main__.py
3
import os import sys try: from tej.main import main except ImportError: sys.path.append(os.path.dirname(os.path.dirname(__file__))) from tej.main import main if __name__ == '__main__': main()
lmcro/webserver
refs/heads/master
admin/Auth.py
5
# -*- coding: utf-8 -*- # # Cherokee-admin # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2001-2014 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free S...
5GExchange/escape
refs/heads/master
pox/pox/web/jsonrpc.py
45
# Copyright 2011,2012 James McCauley # # 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 ...
agry/NGECore2
refs/heads/master
scripts/object/tangible/lair/kaadu/lair_kaadu.py
85615
import sys def setup(core, object): return
faust64/ansible
refs/heads/devel
lib/ansible/modules/windows/win_package.py
16
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Trond Hindenes <trond@hindenes.com>, and others # # 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 versio...
lonvia/waymarked-trails-site
refs/heads/master
makedb.py
2
#!/usr/bin/python3 # This file is part of the Waymarked Trails Map Project # Copyright (C) 2011-2015 Sarah Hoffmann # # 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 2 # of the License, o...
Hoekz/hackness-monster
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/distro.py
3
# Copyright 2015,2016 Nir Cohen # # 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, s...
todaychi/hue
refs/heads/master
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/dumpscript.py
35
# -*- coding: UTF-8 -*- """ Title: Dumpscript management command Project: Hardytools (queryset-refactor version) Author: Will Hardy (http://willhardy.com.au) Date: June 2008 Usage: python manage.py dumpscript appname > scripts/scriptname.py $Revision: 217 $ Description: Generates a Py...
EliasTouil/simpleBlog
refs/heads/master
simpleBlog/Lib/encodings/euc_kr.py
816
# # euc_kr.py: Python Unicode Codec for EUC_KR # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_kr, codecs import _multibytecodec as mbc codec = _codecs_kr.getcodec('euc_kr') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrem...
tscloud/hamsalad
refs/heads/master
pygmaps.py
1
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ # Copyright (C) 2014 Tom Cloud # This program 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) ...
labordoc/labordoc-next
refs/heads/labordoc-next
modules/webjournal/web/admin/webjournaladmin.py
25
## This file is part of Invenio. ## Copyright (C) 2008, 2009, 2010, 2011, 2012 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 ...
PixelActions/cec_backend_python
refs/heads/master
cec_backend_python/__init__.py
1
# Copyright 2015 Kyriakos Toumbas # # Licensed under the MIT License, (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://opensource.org/licenses/MIT # # Unless required by applicable law or agreed to in writing, software # distrib...
dayongxie/zeroc-ice-androidndk
refs/heads/master
cpp/test/Ice/properties/run.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # ********************************************************************** # # Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # *************...
yege520/test
refs/heads/master
config.py
1
# -*- coding:utf-8 -*- import os CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' basedir = os.path.abspath(os.path.dirname(__file__)) SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db') SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository') OPENID_PROVIDERS = [ {...
turbulenz/gyp
refs/heads/master
tools/graphviz.py
25
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Using the JSON dumped by the dump-dependency-json generator, generate input suitable for graphviz to render a dependency graph of targets...
Mozta/pagina-diagnostijuego
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/gis/db/backends/spatialite/base.py
445
import sys from ctypes.util import find_library from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends.sqlite3.base import ( Database, DatabaseWrapper as SQLiteDatabaseWrapper, SQLiteCursorWrapper, ) from django.utils import six from .client import SpatiaL...
lneoe/python-social-auth
refs/heads/master
social/tests/backends/test_broken.py
80
import unittest2 as unittest from social.backends.base import BaseAuth class BrokenBackendAuth(BaseAuth): name = 'broken' class BrokenBackendTest(unittest.TestCase): def setUp(self): self.backend = BrokenBackendAuth() def tearDown(self): self.backend = None def test_auth_url(self)...
gdg-garage/knihovna-db
refs/heads/master
knihovna-server/suggest.py
1
# coding=utf-8 import logging import datetime from third_party.apiclient.errors import HttpError from google.appengine.ext import deferred from google.appengine.ext import ndb from third_party.googleapiclient.errors import HttpError as gHttpError from bigquery import BigQueryClient, BigQueryTable from book_record imp...
ake-koomsin/mapnik_nvpr
refs/heads/master
scons/scons-local-2.2.0/SCons/compat/_scons_builtins.py
14
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # 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 ...
trickdice/tjgcm
refs/heads/develop
reader2d.py
1
''' Author @HXT''' from copy import copy import MITgcmutils as mit import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl print 'reading files...\nXC/YX/W/hFacC/Depth' # MAXTIME = float(raw_input("input the maximun iteration:\n")) # read data singleiter = 150000 # temperature T = mit.rdmds('T', si...
Dino0631/RedRain-Bot
refs/heads/develop
lib/imgurpython/__init__.py
21
from .client import ImgurClient
cmvelo/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/backup.py
427
# Copyright (c) 2015 Ansible, Inc # # 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. # # Ansi...
veger/ansible
refs/heads/devel
lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py
52
#!/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) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: proxysql_replication_hostg...
jeffreymingyue/ansible
refs/heads/devel
lib/ansible/plugins/lookup/dict.py
84
# (c) 2014, Kent R. Spillner <kspillner@acm.org> # # 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 ve...
feranick/GES_AT
refs/heads/master
GridEdgeAT/gridedgeat/resultsWindow.py
1
''' ResultsWindow.py ---------------- Classes for providing a graphical user interface for the resultsWindow Copyright (C) 2017-2019 Nicola Ferralis <ferralis@mit.edu> 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 Sof...
ivanhorvath/openshift-tools
refs/heads/prod
openshift/installer/vendored/openshift-ansible-3.7.52-1/roles/openshift_health_checker/library/docker_container.py
41
#!/usr/bin/python # pylint: skip-file # flake8: noqa # TODO: remove this file once openshift-ansible requires ansible >= 2.3. # This file is a copy of # https://github.com/ansible/ansible/blob/20bf02f/lib/ansible/modules/cloud/docker/docker_container.py. # It has been temporarily vendored here due to issue https://git...
jbrendel/RESTx
refs/heads/master
src/python/restx/httpabstraction/gae_http_server.py
2
""" RESTx: Sane, simple and effective data publishing and integration. Copyright (C) 2010 MuleSoft Inc. http://www.mulesoft.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version...
abimannans/scikit-learn
refs/heads/master
sklearn/datasets/tests/test_20news.py
280
"""Test the 20news downloader, if the data is available.""" import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import SkipTest from sklearn import datasets def test_20news(): try: data = dat...
malept/youtube-dl
refs/heads/master
youtube_dl/extractor/newgrounds.py
24
from __future__ import unicode_literals from .common import InfoExtractor class NewgroundsIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?newgrounds\.com/(?:audio/listen|portal/view)/(?P<id>[0-9]+)' _TESTS = [{ 'url': 'https://www.newgrounds.com/audio/listen/549479', 'md5': 'fe6033d29759...
avati/samba
refs/heads/master
source4/heimdal/lib/wind/rfc3454.py
88
#!/usr/local/bin/python # -*- coding: iso-8859-1 -*- # $Id$ # Copyright (c) 2004 Kungliga Tekniska Högskolan # (Royal Institute of Technology, Stockholm, Sweden). # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following...
SurfasJones/djcmsrc3
refs/heads/master
venv/lib/python2.7/site-packages/cms/test_utils/fixtures/menus.py
18
# -*- coding: utf-8 -*- from __future__ import with_statement from cms.api import create_page from cms.test_utils.util.context_managers import SettingsOverride class MenusFixture(object): def create_fixtures(self): """ Tree from fixture: + P1 | + P2 ...
sanjeevtripurari/hue
refs/heads/master
desktop/core/ext-py/Paste-2.0.1/tests/test_util/test_datetimeutil.py
47
# (c) 2005 Clark C. Evans and contributors # This module is part of the Python Paste Project and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php # Some of this code was funded by: http://prometheusresearch.com from time import localtime from datetime import date from paste.util.d...
mkminer/p2pool
refs/heads/master
p2pool/test/test_data.py
276
import random import unittest from p2pool import data from p2pool.bitcoin import data as bitcoin_data from p2pool.test.util import test_forest from p2pool.util import forest def random_bytes(length): return ''.join(chr(random.randrange(2**8)) for i in xrange(length)) class Test(unittest.TestCase): def test_h...
vsajip/yowsup
refs/heads/master
yowsup/layers/network/__init__.py
70
from .layer import YowNetworkLayer
yvdriess/icnc
refs/heads/master
tests/compare.py
1
import sys import re import difflib def CompareBinFile(f1, f2): file1 = open( f1 ) lines1 = [] for line in file1.readlines(): lines1.append( line ) file1.close() file2 = open( f2 ) lines2 = [] for line in file2.readlines(): lines2.append(line) file2.close() sm = diff...
RefugeeMatchmaking/HackZurich
refs/heads/master
GAE_Playground/libs/networkx/classes/multidigraph.py
20
"""Base class for MultiDiGraph.""" # Copyright (C) 2004-2015 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. from copy import deepcopy import networkx as nx from networkx.classes.graph import Graph # for doc...
sbelharbi/structured-output-ae
refs/heads/master
sop_embed/experiments/evaluate_face_new_data_unl.py
1
from sop_embed.dataset import Dataset from sop_embed.tools import split_data_to_minibatchs_eval from sop_embed.tools import get_eval_fn from sop_embed.tools import evaluate_model from sop_embed.tools import plot_all_x_y_yhat from sop_embed.tools import ModelMLP from sop_embed.facedataset import FaceDataset import thea...
fernand/scipy
refs/heads/master
scipy/spatial/distance.py
1
""" ===================================================== Distance computations (:mod:`scipy.spatial.distance`) ===================================================== .. sectionauthor:: Damian Eads Function Reference ------------------ Distance matrix computation from a collection of raw observation vectors stored in...
csparkresearch/eyes-online
refs/heads/master
app/static/scripts/Maths/plot2.py
7
#Example plot2.py from pylab import * x = [1,2,5] y = [4,5,6] plot(x,y) show()
Yong-Lee/django
refs/heads/master
django/conf/locale/te/formats.py
619
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'g:i A' # DA...
Solinea/horizon
refs/heads/master
horizon/utils/memoized.py
66
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...