repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
wakatime/sublime-wakatime
refs/heads/master
packages/wakatime/packages/py27/ipaddress.py
30
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ from __future__ import unicode_literals import itertools import struct __version...
chairmanmeow50/Brainspawn
refs/heads/master
examples/combining.py
1
import nengo import numpy as np model = nengo.Model('Combining') A = nengo.Ensemble(nengo.LIF(100), dimensions=1) B = nengo.Ensemble(nengo.LIF(100), dimensions=1) output = nengo.Ensemble(nengo.LIF(200), dimensions=2, label='2D Population') sin = nengo.Node(output=np.sin) cos = nengo.Node(output=np.cos) nengo.Conne...
mikefitz888/owtf
refs/heads/develop
framework/http/proxy/cache_handler.py
2
#!/usr/bin/env python ''' # Inbound Proxy Module developed by Bharadwaj Machiraju (blog.tunnelshade.in) # as a part of Google Summer of Code 2013 ''' import re import os import json import base64 import hashlib import datetime from framework.lib.filelock import FileLock import tornado.httputil cla...
SpaceKatt/CSPLN
refs/heads/master
apps/scaffolding/linux/web2py/gluon/messageboxhandler.py
43
import logging import os try: import Tkinter except: Tkinter = None class MessageBoxHandler(logging.Handler): def __init__(self): logging.Handler.__init__(self) def emit(self, record): if Tkinter: msg = self.format(record) root = Tkinter.Tk() root....
DrewRWx/snooword
refs/heads/master
snooword.py
1
#!/usr/bin/python # SnooWord # Written by DrewRWx . # !!! # These values need to be set! USERNAME = None SUBREDDIT = None KEYWORDS = [] # !!! import praw import re import tempfile from subprocess import call import os # This is optional and not recommended, but streamlines running the script. PASSWORD = None ...
CocoMake7/CocoBlockly
refs/heads/master
ardublocklyserver/gui.py
2
# -*- coding: utf-8 -*- # # Receives and responds to the HTTP request from the Python server. # # Copyright (c) 2015 carlosperate https://github.com/carlosperate/ # Licensed under the Apache License, Version 2.0 (the "License"): # http://www.apache.org/licenses/LICENSE-2.0 # from __future__ import unicode_literals, a...
opoplawski/ansible
refs/heads/devel
lib/ansible/plugins/lookup/credstash.py
131
# (c) 2015, Ensighten <infra@ensighten.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) any later version...
jhesketh/zookeepr
refs/heads/master
zkpylons/controllers/checkin.py
3
import logging import datetime from pylons import request, response, session, tmpl_context as c from zkpylons.lib.helpers import redirect_to from pylons.decorators import validate from pylons.decorators.rest import dispatch_on from pylons.decorators import jsonify from formencode import validators, htmlfill, ForEach,...
sanguinariojoe/FreeCAD
refs/heads/master
src/Mod/Path/PathScripts/PathDressupPathBoundaryGui.py
12
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2019 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
pudo/spendb
refs/heads/master
spendb/validation/model.py
5
from babbage.validation import validate_model as babbage_validate from spendb.core import db TYPES = { 'string': db.Unicode, 'integer': db.BigInteger, 'boolean': db.Boolean, 'number': db.Float, # FIXME: add proper support for dates # 'date': db.Date 'date': db.Unicode } def validate_mod...
jlongever/redfish-client-python
refs/heads/master
on_http_redfish_1_0/models/physical_context_1_0_0_physical_context.py
1
# coding: utf-8 """ Copyright 2015 SmartBear Software 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...
youprofit/shogun
refs/heads/develop
applications/tapkee/samples/la.py
26
import modshogun as sg import data import numpy as np # load data feature_matrix = data.swissroll() # create features instance features = sg.RealFeatures(feature_matrix) # create Laplacian Eigenmaps converter instance converter = sg.LaplacianEigenmaps() # set target dimensionality converter.set_target_dim(2) # set n...
prat0318/bravado-core
refs/heads/master
tests/spec/Spec/build_test.py
3
from mock import patch import pytest from bravado_core.spec import Spec from swagger_spec_validator.common import SwaggerValidationError def assert_validate_call_count(expected_call_count, config, petstore_dict): spec = Spec(petstore_dict, config=config) with patch('bravado_core.spec.validator20.validate_spe...
ivan-fedorov/intellij-community
refs/heads/master
python/testData/mover/exceptElse_afterUp.py
83
try: print(zoo(1).foo(2)) print<caret>(zoo(0).foo(2)) # <- move statement up here except: pass else: a = 1
dcorio/l10n-italy
refs/heads/8.0
setup/l10n_it_fiscalcode/setup.py
7073
import setuptools setuptools.setup( setup_requires=['setuptools-odoo'], odoo_addon=True, )
katerina7479/pypdflite
refs/heads/master
pypdflite/pdfobjects/pdffont.py
1
from .fontref import pdf_character_widths import copy CORE_FONTS = { 'courier': 'Courier', 'courier_bold': 'Courier-Bold', 'courier_italic': 'Courier-Oblique', 'courier_bold_italic': 'Courier-BoldOblique', 'helvetica': 'Helvetica', 'helvetica_bold': 'Helvetica-Bold', 'helvetica_it...
Kentzo/Power
refs/heads/develop
tests/observer.py
1
# coding=utf-8 import power class TestObserver(power.PowerManagementObserver): def on_power_sources_change(self, power_management): print("on_power_sources_change") def on_time_remaining_change(self, power_management): print("on_time_remaining_change") if __name__ == "__main__": o = Tes...
bdoner/SickRage
refs/heads/master
sickbeard/notifiers/nmjv2.py
16
# Author: Jasper Lanting # Based on nmj.py by Nico Berlee: http://nico.berlee.nl/ # URL: http://code.google.com/p/sickbeard/ # # 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 ...
sthiele/pyasp
refs/heads/master
pyasp/misc.py
1
# Copyright (c) 2012, Sven Thiele <sthiele78@gmail.com> # # This file is part of pyasp. # # pyasp 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 late...
pfnet/chainer
refs/heads/master
chainer/functions/math/ndtr.py
8
import math import warnings import numpy import chainer from chainer.backends import cuda from chainer import function_node from chainer.functions.math import exponential from chainer import utils from chainer.utils import type_check _ndtr_cpu = None def _slow_ndtr_cpu(x): return 0.5 * math.erfc(-x / 2 ** 0.5...
yury-s/v8-inspector
refs/heads/master
Source/chrome/tools/gyp/pylib/gyp/flock_tool.py
1835
#!/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. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
telefonicaid/fiware-cosmos-ambari
refs/heads/master
ambari-client/src/main/python/ambari_client/ambari_api.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 m...
grap/OpenUpgrade
refs/heads/8.0
addons/account/wizard/account_report_common_partner.py
385
# -*- 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...
haoyuchen1992/osf.io
refs/heads/develop
website/addons/box/tests/utils.py
8
# -*- coding: utf-8 -*- import mock from contextlib import contextmanager from modularodm import storage from framework.mongo import set_up_storage from website.addons.base.testing import AddonTestCase from website.addons.box import MODELS from website.addons.box.tests.factories import BoxAccountFactory def init_s...
eezee-it/server-tools
refs/heads/8.0
base_module_doc_rst/report/report_proximity_graph.py
14
# -*- 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...
realsaiko/odoo
refs/heads/8.0
openerp/tools/config.py
5
#openerp.loggers.handlers. -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program...
JingJunYin/tensorflow
refs/heads/master
tensorflow/python/platform/build_info_test.py
71
# 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...
luwensu/autotest-docker
refs/heads/master
subtests/docker_cli/images_all/images_all.py
1
r""" Summary ---------- This test is focused on `docker images --all` specific behavior. It checks the difference between ``docker images`` and ``docker images --all``. Operational Summary ---------------------- #. Create image test_a #. Create image test_a1 with parent test_a #. Create image test_b #. Create im...
incuna/django-configurations
refs/heads/master
configurations/values.py
7
import ast import copy import decimal import os import sys from django.core import validators from django.core.exceptions import ValidationError, ImproperlyConfigured from django.utils import six from .utils import import_by_path, getargspec def setup_value(target, name, value): actual_value = value.setup(name)...
mcmoots/mybots
refs/heads/master
lucky_sqrt2/main.py
1
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # import twitterbot import yaml import random import sys import re import time import identify_contests as ic import tweepy from httplib import IncompleteRead class MyTwitterBot(twitterbot.TwitterBot): def bot_init(self, home='./'): """ Initialize and...
ESMG/ESMG-configs
refs/heads/dev/esmg
ocean_only/dumbbell/z/create_bcs.py
1
# IPython log file import netCDF4 as nc import numpy as np e=nc.Dataset('east_new.nc','w',format='NETCDF3_CLASSIC') w=nc.Dataset('west_new.nc','w',format='NETCDF3_CLASSIC') p=nc.Dataset('prog.nc','r') grd=nc.Dataset('ocean_geometry.nc','r') ic=nc.Dataset('MOM_IC.nc','r') yh=p.variables['yh'][:] yq=p.variables['yq'][...
maxking/hamper
refs/heads/master
hamper/plugins/suggest.py
3
from hamper.interfaces import ChatCommandPlugin, Command import requests import json class Suggest(ChatCommandPlugin): name = 'suggest' priority = 2 short_desc = 'suggest <something> - suggest a phrase given something' long_desc = ( 'suggest <number> <something> - suggest the <number>th phra...
SerCeMan/intellij-community
refs/heads/master
python/testData/typesFromAttributes/resultsOrdering/module.py
79
class OtherClassA(object): def sort(self): pass class OtherClassB(object): def sort(self): pass
mackong/gitql
refs/heads/master
setup.py
1
from setuptools import setup, find_packages import os import gitql def extra_dependencies(): import sys ret = [] if sys.version_info < (2, 7): ret.append('argparse') if sys.version_info < (3, 4): ret.append('enum34') if sys.platform == 'win32': ret.append('pyreadline') ...
xasos/crowdsource-platform
refs/heads/develop2
crowdsourcing/migrations/0056_submodule_taskworkers.py
4
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0055_auto_20150914_1647'), ] operations = [ migrations.AddField( model_name='submodule', ...
dfdx2/django
refs/heads/master
tests/forms_tests/tests/test_media.py
26
from django.forms import CharField, Form, Media, MultiWidget, TextInput from django.template import Context, Template from django.test import SimpleTestCase, override_settings @override_settings( STATIC_URL='http://media.example.com/static/', ) class FormsMediaTestCase(SimpleTestCase): """Tests for the media ...
Stocastico/AI_MOOC
refs/heads/master
Exercises/Exercise_2/src/GameManager_3.py
1
from Grid_3 import Grid from ComputerAI_3 import ComputerAI from PlayerAI_3 import PlayerAI from Displayer_3 import Displayer from random import randint import time defaultInitialTiles = 2 defaultProbability = 0.9 actionDic = { 0: "UP", 1: "DOWN", 2: "LEFT", 3: "RIGHT" } (PLAYER_TURN, ...
slayerjain/servo
refs/heads/master
tests/wpt/web-platform-tests/XMLHttpRequest/resources/auth9/auth.py
1282
import imp import os here = os.path.split(os.path.abspath(__file__))[0] def main(request, response): auth = imp.load_source("", os.path.join(here, "..", "authentication.py")) return auth.main(request, response)
hellkite500/HydroQGIS
refs/heads/master
HydroData/tools/NWISsearch.py
1
# -*- coding: utf-8 -*- """ /*************************************************************************** NWIS station search tool. A QGIS plugin This plugin seraches for stations with NWIS data in a particular bounding box. ------------------- beg...
jeremiahmarks/sl4a
refs/heads/master
python/src/Lib/json/tests/test_unicode.py
51
from unittest import TestCase import json class TestUnicode(TestCase): def test_encoding1(self): encoder = json.JSONEncoder(encoding='utf-8') u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}' s = u.encode('utf-8') ju = encoder.encode(u) js = encoder.encode(s...
jjkoletar/panda3d
refs/heads/master
direct/src/showbase/EventGroup.py
11
"""Undocumented Module""" __all__ = ['EventGroup'] from direct.showbase import DirectObject from direct.showbase.PythonUtil import SerialNumGen, Functor class EventGroup(DirectObject.DirectObject): """This class allows you to group together multiple events and treat them as a single event. The EventGroup wil...
40423144/2016fallcadp_hw
refs/heads/gh-pages
plugin/liquid_tags/soundcloud.py
273
""" Soundcloud Tag -------------- This implements a Liquid-style soundcloud tag for Pelican. It asks the official Soundcloud-API for the widget html code. Syntax ------ `{% soundcloud track_url %}` Example ------- `{% soundcloud https://soundcloud.com/luftmentsh/hakotel %}` Output ------ `<iframe width="100%" heigh...
eloquence/unisubs
refs/heads/staging
apps/videos/migrations/0110_make_sub_draft_unique.py
5
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): count = orm.SubtitleDraft.objects.count() i = 0 for d in orm.SubtitleDraft.objects.all(): i += ...
kmad1729/website
refs/heads/master
django/core/mail/utils.py
1315
""" Email message and email sending related helper functions. """ import socket # Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of # seconds, which slows down the restart of the server. class CachedDnsName(object): def __str__(self): return self.get_fqdn() def get_fqdn(sel...
tdsymonds/codeeval
refs/heads/master
python/easy/(140) data-recovery.py
1
import string import sys def main(filepath): with open(filepath, 'r') as f: for line in f.readlines(): if line: line = line.strip() line = line.split(';') hints = map(int, line[1].split(' ')) sentance = line[0].split(...
alebcay/namebench
refs/heads/master
nb_third_party/jinja2/optimizer.py
1401
# -*- coding: utf-8 -*- """ jinja2.optimizer ~~~~~~~~~~~~~~~~ The jinja optimizer is currently trying to constant fold a few expressions and modify the AST in place so that it should be easier to evaluate it. Because the AST does not contain all the scoping information and the compiler has to ...
Opshun/API
refs/heads/master
venv/lib/python2.7/site-packages/jinja2/optimizer.py
1401
# -*- coding: utf-8 -*- """ jinja2.optimizer ~~~~~~~~~~~~~~~~ The jinja optimizer is currently trying to constant fold a few expressions and modify the AST in place so that it should be easier to evaluate it. Because the AST does not contain all the scoping information and the compiler has to ...
ZeroClover/shadowsocksr
refs/heads/manyuser
shadowsocks/lru_cache.py
5
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
Pontianak/Python-For-Informatics-Assignments
refs/heads/master
7.2.py
1
# Copyright (c) 2015 Pontianak """ 7.2 Write a program that prompts for a file name, then opens that file and reads through the file, looking for lines of the form: X-DSPAM-Confidence: 0.8475 Count these lines and extract the floating point values from each of the lines and compute the average of those values an...
merelcoin/merelcoin
refs/heads/master
test/functional/mempool_packages.py
23
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test descendant package tracking code.""" from decimal import Decimal from test_framework.messages im...
mikewiebe-ansible/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/elb_application_lb_info.py
13
#!/usr/bin/python # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
crissmoldovan/tisip
refs/heads/master
iphone/pjsip/src/tests/pjsua/scripts-sendto/121_sdp_with_video_static_2.py
59
# $Id: 121_sdp_with_video_static_2.py 2081 2008-06-27 21:59:15Z bennylp $ import inc_sip as sip import inc_sdp as sdp # Video uses static payload type which will cause failure # when session.c looks-up the codec in codec manager sdp = \ """ v=0 o=- 0 0 IN IP4 127.0.0.1 s=- c=IN IP4 127.0.0.1 t=0 0 m=video 4000 RTP/AVP...
edry/edx-platform
refs/heads/master
common/djangoapps/track/tests/test_contexts.py
114
# pylint: disable=missing-docstring import ddt from unittest import TestCase from track import contexts @ddt.ddt class TestContexts(TestCase): COURSE_ID = 'test/course_name/course_run' SPLIT_COURSE_ID = 'course-v1:test+course_name+course_run' ORG_ID = 'test' @ddt.data( (COURSE_ID, ''), ...
ejona86/grpc
refs/heads/master
examples/python/errors/test/_error_handling_example_test.py
8
# Copyright 2019 The gRPC Authors # # 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 writ...
russel1237/scikit-learn
refs/heads/master
examples/bicluster/bicluster_newsgroups.py
142
""" ================================================================ Biclustering documents with the Spectral Co-clustering algorithm ================================================================ This example demonstrates the Spectral Co-clustering algorithm on the twenty newsgroups dataset. The 'comp.os.ms-windows...
cdubz/babybuddy
refs/heads/master
manage.py
1
#!/usr/bin/env python import sys from dotenv import load_dotenv, find_dotenv if __name__ == "__main__": # Environment variables # Check for and load environment variables from a .env file. load_dotenv(find_dotenv()) try: from django.core.management import execute_from_command_line except...
blondegeek/pymatgen
refs/heads/master
pymatgen/apps/battery/plotter.py
5
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module provides plotting capabilities for battery related applications. """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ =...
yotaseki/ROSpkg_Robosys2016
refs/heads/master
src/ImageMessage/scripts/ImageMessage.py
1
#!/usr/bin/env python import numpy as np import rospy import cv2 from std_msgs.msg import String from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError class ImageMessage: def __init__(self): self.im_pub = rospy.Publisher("img_message", Image, queue_size=1) self.bridge = C...
mattmccarthy11/vidly-development
refs/heads/master
mediadrop/bk/lib/services/tests/youtube_client_test.py
10
# -*- coding: utf-8 -*- # This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2015 MediaDrop contributors # For the exact contribution history, see the git revision log. # The source code contained in this file is licensed under the GPLv3 or # (at your option) any later version. # See LICENSE....
qizdyyt/CPLogProgram
refs/heads/master
HebcaLog/Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/test/win/gyptest-cl-runtime-checks.py
344
#!/usr/bin/env python # Copyright (c) 2012 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. """ Make sure RTC setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.TestGyp(forma...
wfarner/aurora
refs/heads/master
src/main/python/apache/thermos/core/helper.py
7
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
legalsylvain/OpenUpgrade
refs/heads/master
addons/project_timesheet/project_timesheet.py
35
# -*- 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...
dushu1203/chromium.src
refs/heads/nw12
build/android/gyp/create_standalone_apk.py
126
#!/usr/bin/env python # # Copyright 2013 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. """Combines stripped libraries and incomplete APK into single standalone APK. """ import optparse import os import shutil import sy...
chuan9/chromium-crosswalk
refs/heads/master
third_party/google_input_tools/update.py
37
#!/usr/bin/python # Copyright 2014 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. """Performs pull of google-input-tools from local clone of GitHub repository.""" import json import logging import optparse import os impo...
pombredanne/capstone
refs/heads/master
bindings/python/test_x86.py
32
#!/usr/bin/env python # Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com> from __future__ import print_function from capstone import * from capstone.x86 import * from xprint import to_hex, to_x, to_x_32 X86_CODE64 = b"\x55\x48\x8b\x05\xb8\x13\x00\x00" X86_CODE16 = b"\x8d\x4c\x32\x08\x01\xd8\x81\xc6\x...
erikriver/eduIntelligent-cynin
refs/heads/master
src/ubify.viewlets/ubify/viewlets/utils.py
4
############################################################################### #cyn.in is an open source Collaborative Knowledge Management Appliance that #enables teams to seamlessly work together on files, documents and content in #a secure central environment. # #cyn.in v2 an open source appliance is distributed ...
KohlsTechnology/ansible
refs/heads/devel
test/units/modules/packaging/os/test_rhn_register.py
44
import contextlib import json import os from ansible.compat.tests.mock import mock_open from ansible.module_utils import basic from ansible.module_utils._text import to_native import ansible.module_utils.six from ansible.module_utils.six.moves import xmlrpc_client from ansible.modules.packaging.os import rhn_register ...
sahiljain/catapult
refs/heads/master
telemetry/telemetry/web_perf/metrics/trace_event_stats_unittest.py
16
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from collections import namedtuple from telemetry.testing import test_page_test_results from telemetry.timeline import model as model_module...
chirilo/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py
126
# Copyright (C) 2011 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 ...
fernandozamoraj/py_sandbox
refs/heads/master
py101/strings.py
1
# 111111111122222222223333333333444 # 0123456789012345678901234567890123456789012 # this process is called slicing # slicing has the following values target[start:end] # target: this can be anything that is a collection such as a list or a string # start: this is the starting index of the sub...
oasiswork/odoo
refs/heads/8.0
addons/l10n_cr/__init__.py
438
# -*- encoding: utf-8 -*- ############################################################################## # # __init__.py # l10n_cr_account # First author: Carlos Vásquez <carlos.vasquez@clearcorp.co.cr> (ClearCorp S.A.) # Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved....
alexmorozov/django-attachments
refs/heads/master
runtests.py
1
#!/usr/bin/env python import sys import os from django import setup from django.conf import settings from django.test.runner import DiscoverRunner TESTAPP_DIR = os.path.join( os.path.dirname(__file__), 'attachments', 'tests', 'testapp', ) SETTINGS = { 'DATABASES': { 'default': { ...
crcresearch/GOS
refs/heads/master
gos-archive.py
2
import numpy as np import pandas as pd import gc from multiprocessing import Pool, cpu_count from functools import partial class Globe: """ Globe is used to store and process information about the word and an array of generated agents. """ def __init__(self, df, processes=cpu_count() - 1, splits=1...
revmischa/boto
refs/heads/develop
boto/cloudsearch/layer2.py
153
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
indashnet/InDashNet.Open.UN2000
refs/heads/master
android/external/protobuf/python/google/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
Jionglun/w17test_2
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/browser/markdown.py
623
# -*- coding: utf-8 -*- try: import _jsre as re except: import re import random import time letters = 'abcdefghijklmnopqrstuvwxyz' letters += letters.upper()+'0123456789' class URL: def __init__(self,src): elts = src.split(maxsplit=1) self.href = elts[0] self.alt = '' if ...
popazerty/blackhole-vuplus
refs/heads/master
lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
17
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.Console import Console from Components.ActionMap import ActionMap, NumberActionMap from Components.Pixmap import Pixmap from Components.Label import Label from Components.Sources.StaticText import StaticText from Components.MenuLis...
chromium2014/src
refs/heads/master
content/test/gpu/gpu_tests/webgl_conformance.py
1
# 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. import json import optparse import os import sys import webgl_conformance_expectations from telemetry import benchmark as benchmark_module from telemetr...
CenterForOpenScience/osf.io
refs/heads/develop
osf/migrations/0144_merge_20181113_1420.py
11
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-11-13 14:20 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('osf', '0143_merge_20181023_1807'), ('osf', '0142_remove_waffle_analytics_flags'), ] ...
AbdealiJK/file-metadata
refs/heads/master
tests/mixins_test.py
2
# -*- coding: utf-8 -*- from __future__ import (division, absolute_import, unicode_literals, print_function) from file_metadata._compat import which from file_metadata.generic_file import GenericFile from file_metadata.mixins import is_svg, FFProbeMixin from tests import fetch_file, mock, unit...
soumide1102/pycbc
refs/heads/master
pycbc/events/trigger_fits.py
1
""" Tools for maximum likelihood fits to single trigger statistic values For some set of values above a threshold, e.g. trigger SNRs, the functions in this module perform maximum likelihood fits with 1-sigma uncertainties to various simple functional forms of PDF, all normalized to 1. You can also obtain the fitted fu...
ksrajkumar/openerp-6.1
refs/heads/master
openerp/addons/itara_account_journal/acc_journ.py
1
# -*- 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...
PyCAOS/CAOS
refs/heads/master
CAOS/mechanisms/acid_base.py
1
"""The acid base mechanism implementation.""" from __future__ import print_function, division, unicode_literals, \ absolute_import from copy import deepcopy __requirements__ = ('pka',) def _get_ideal_hydrogen(acid): # Todo: Actually compute this here instead of relying on an instance # variable re...
codeforamerica/Change-By-Us
refs/heads/master
framework/file_server.py
1
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ import cStringIO import traceback import framework.util as util import os from framework.s3uploader import S3Uploader from framework.log import log from framework.controller import Contro...
75651/kbengine_cloud
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/pip/commands/__init__.py
476
""" Package containing all pip commands """ from pip.commands.bundle import BundleCommand from pip.commands.completion import CompletionCommand from pip.commands.freeze import FreezeCommand from pip.commands.help import HelpCommand from pip.commands.list import ListCommand from pip.commands.search import SearchComman...
miing/mci_migo
refs/heads/master
identityprovider/management/commands/upload_fobs.py
1
import csv import logging import textwrap from django.core.management.base import BaseCommand from optparse import make_option from identityprovider.models import ( AuthenticationDevice, Person, ) class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--keys', dest='k...
mcansky/cabotapp
refs/heads/master
cabot/cabotapp/migrations/0001_initial.py
16
# -*- 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 'Service' db.create_table('cabotapp_service', ( ('id', self.gf('django.db.models....
pscholz/presto
refs/heads/master
python/binresponses/monte_short.py
2
from time import clock from math import * from Numeric import * from presto import * from miscutils import * from Statistics import * import Pgplot # Some admin variables showplots = 0 # True or false showsumplots = 0 # True or false debugout = 0 # True or false outfiledir = '/home/ransom' outfil...
sixninetynine/pex
refs/heads/master
tests/test_pep425.py
4
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import pytest from pex.interpreter import PythonIdentity from pex.pep425 import PEP425, PEP425Extras def test_platform_iterator(): # non macosx assert list(PEP425Extras.platform_ite...
mbr/tinyrpc
refs/heads/master
tinyrpc/dispatch/__init__.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Dispatcher ========== Given an RPC request the dispatcher will try to locate a server function that implements the request and will call that function returning its return value to the caller. """ import inspect from typing import Callable, Any, Dict, List, Union fro...
bbbenja/SickRage
refs/heads/master
lib/unidecode/x015.py
253
data = ( 'swa', # 0x00 'swa', # 0x01 'swaa', # 0x02 'swaa', # 0x03 'swaa', # 0x04 's', # 0x05 's', # 0x06 'sw', # 0x07 's', # 0x08 'sk', # 0x09 'skw', # 0x0a 'sW', # 0x0b 'spwa', # 0x0c 'stwa', # 0x0d 'skwa', # 0x0e 'scwa', # 0x0f 'she', # 0x10 'shi', # 0x11 'shii',...
meismyles/python-engineio
refs/heads/master
engineio/async_threading.py
4
import importlib try: queue = importlib.import_module('queue') except ImportError: # pragma: no cover queue = importlib.import_module('Queue') # pragma: no cover async = { 'threading': importlib.import_module('threading'), 'thread_class': 'Thread', 'queue': queue, 'queue_class': 'Queue', ...
samliu/servo
refs/heads/master
python/servo/bootstrap.py
15
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import absolute_import, print_function from distutils.spawn import find_executable import json import o...
gth158a/experience
refs/heads/master
python/pandas.py
1
# content from # https://gist.githubusercontent.com/bsweger/e5817488d161f37dcbd2/raw/d7f39aa69e0818d56206b3d0e8660543d6ad64f3/useful_pandas_snippets.py # List unique values in a DataFrame column pd.unique(df.column_name.ravel()) # Convert Series datatype to numeric, getting rid of any non-numeric values df['col'] = ...
PaulKinlan/cli-caniuse
refs/heads/master
site/app/scripts/bower_components/jsrepl-build/extern/python/unclosured/lib/python2.7/encodings/cp775.py
593
""" Python Character Mapping Codec cp775 generated from 'VENDORS/MICSFT/PC/CP775.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_map) def decode(self,input,errors='strict...
mindofmatthew/three.js
refs/heads/master
utils/converters/msgpack/msgpack/__init__.py
659
# coding: utf-8 from msgpack._version import version from msgpack.exceptions import * from collections import namedtuple class ExtType(namedtuple('ExtType', 'code data')): """ExtType represents ext type in msgpack.""" def __new__(cls, code, data): if not isinstance(code, int): raise TypeE...
sinbazhou/odoo
refs/heads/8.0
addons/portal_claim/portal_claim.py
315
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
sfjro/aufs3-linux
refs/heads/master
Documentation/networking/cxacru-cf.py
14668
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # This program i...
costypetrisor/scikit-learn
refs/heads/master
sklearn/metrics/base.py
231
""" Common code for all metrics """ # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Arnaud Joly <a.joly@ulg.ac.be> # Jochen Wersdorfer <jochen@wersdoerfer.de> # Lars Buitinck ...
Venturi/cms
refs/heads/master
env/lib/python2.7/site-packages/aldryn_people/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion import djangocms_text_ckeditor.fields import filer.fields.image from django.conf import settings import sortedm2m.fields class Migration(migrations.Migration): dependencies =...