repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
alathers/projecteuler
refs/heads/master
79/79.py
12133432
onitake/ansible
refs/heads/devel
test/units/parsing/utils/__init__.py
12133432
OmeGak/indico
refs/heads/master
indico/legacy/services/interface/rpc/__init__.py
12133432
Armored-Dragon/pymineserver
refs/heads/master
commands/cmds/CommandPlugins.py
1
from commands.cmds.BaseCommand import * from packet.send import chat class cmd(BaseCommand): def process(self): self.osc = self.cmdobj['scope'] chat(self.osc, self.jsconcat(), 1) def jsconcat(self): self.plugins = self.osc.plugins self.pcount = len(self.plugins) return "...
DynamicGravitySystems/DGP
refs/heads/develop
tests/test_project_treemodel.py
1
# -*- coding: utf-8 -*- from PyQt5.QtTest import QSignalSpy from dgp.core.oid import OID from dgp.core.models.project import AirborneProject from dgp.core.controllers.flight_controller import FlightController from dgp.core.controllers.project_controllers import AirborneProjectController from dgp.core.controllers.proje...
diyseguy/wordtoys
refs/heads/master
lib/werkzeug/contrib/__init__.py
320
# -*- coding: utf-8 -*- """ werkzeug.contrib ~~~~~~~~~~~~~~~~ Contains user-submitted code that other users may find useful, but which is not part of the Werkzeug core. Anyone can write code for inclusion in the `contrib` package. All modules in this package are distributed as an add-on libra...
roadmapper/ansible
refs/heads/devel
test/units/modules/network/fortios/test_fortios_dlp_sensor.py
21
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
geekboxzone/mmallow_external_skia
refs/heads/geekbox
tools/bench_pictures_cfg_helper.py
44
# 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. """ Helper functions to be used in bench_pictures.cfg. """ def Config(**kwargs): config = {} for key in kwargs: config[key] = kwargs[key] re...
msoelch/climin
refs/heads/master
docs/source/conf.py
5
# -*- coding: utf-8 -*- # # climin documentation build configuration file, created by # sphinx-quickstart on Tue May 7 13:56:19 2013. # # 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 file. # # All ...
christiandev/l10n-brazil
refs/heads/8.0
__unported__/l10n_br_account_product_service/__init__.py
2
# -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2013 Renato Lima - Akretion # # ...
mzdaniel/oh-mainline
refs/heads/master
vendor/packages/scrapy/scrapy/tests/test_utils_serialize.py
16
import unittest import datetime from decimal import Decimal from twisted.internet import defer from scrapy.utils.serialize import SpiderReferencer, ScrapyJSONEncoder, ScrapyJSONDecoder from scrapy.utils.py26 import json from scrapy.spider import BaseSpider from scrapy.http import Request, Response class _EngineMock...
openforis/sepal
refs/heads/master
modules/google-earth-engine/docker/src/sepalinternal/sepal_api.py
1
import requests import urllib3 from .sepal_exception import SepalException urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) class SepalApi: def __init__(self, host, username, password): self.host = host self.username = username self.password = password def _get(sel...
libfann/fann
refs/heads/master
lib/googletest/googletest/test/googletest-list-tests-unittest.py
122
#!/usr/bin/env python # # Copyright 2006, 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...
anrl/gini3
refs/heads/master
backend/src/gloader/xml/xslt/XsltFunctions.py
9
######################################################################## # # File Name: XsltFunctions.py # # """ WWW: http://4suite.org/XSLT e-mail: support@4suite.org Copyright (c) 1999-2000 FourThought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information ...
omryn/grunt-aggregator
refs/heads/master
node_modules/grunt-contrib-mincss/node_modules/gzip-js/node_modules/deflate-js/test/deflate.py
177
import os from colorama import Fore from helpers import deflate, inflate, run_cmd outDirDefault = 'test-outs' testDirDefault = 'test-files' """ Run a single test @param tFile- required; the full path to the file to run @param level- optional (default: all); the compression level [1-9] @param delete- optional (defaul...
redhat-openstack/django
refs/heads/epel7-patches
django/contrib/auth/admin.py
73
from django.db import transaction from django.conf import settings from django.contrib import admin from django.contrib.admin.options import IS_POPUP_VAR from django.contrib.auth.forms import (UserCreationForm, UserChangeForm, AdminPasswordChangeForm) from django.contrib.auth.models import User, Group from django.c...
cryptickp/python-neutronclient
refs/heads/master
neutronclient/neutron/v2_0/agentscheduler.py
7
# Copyright 2013 OpenStack 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 requ...
xxsergzzxx/python-for-android
refs/heads/master
python-modules/twisted/twisted/python/randbytes.py
49
# -*- test-case-name: twisted.test.test_randbytes -*- # Copyright (c) 2007-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Cryptographically secure random implementation, with fallback on normal random. """ # System imports import warnings, os, random getrandbits = getattr(random, 'getrandbits', Non...
chrrrles/ansible
refs/heads/devel
lib/ansible/new_inventory/host.py
236
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
wangzheng0822/algo
refs/heads/master
python/31_bfs_dfs/graph.py
2
# -*- coding:utf-8 -*- class Undigraph(object): def __init__(self, vertex_num): self.v_num = vertex_num self.adj_tbl = [] for i in range(self.v_num + 1): self.adj_tbl.append([]) def add_edge(self, s, t): if s > self.v_num or t > self.v_num: return Fal...
Almaz-KG/MachineLearning
refs/heads/develop
practices/regression/stock-prices/sberp/prepare-data.py
1
def to_string(lists): s = "" for l in lists: s = s +"," + ",".join(l) return s def prepare(input_file, output_file): result = [] with open(input_file) as file: lines = file.readlines() lst = [] lastDate = None for line in lines: tokens = line.s...
tysonclugg/django
refs/heads/master
tests/admin_scripts/custom_templates/app_template/api.py
581
# your API code
40223131/W17test
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/importlib/machinery.py
635
"""The machinery of importlib: finders, loaders, hooks, etc.""" import _imp from ._bootstrap import (SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES, OPTIMIZED_BYTECODE_SUFFIXES, #BYTECODE_SUFFIXES, EXTENSION_SUFFIXES) from ._bootstrap import BuiltinImporter from ._bootstrap...
marckuz/django
refs/heads/master
tests/migration_test_data_persistence/tests.py
368
from django.test import TestCase, TransactionTestCase from .models import Book class MigrationDataPersistenceTestCase(TransactionTestCase): """ Tests that data loaded in migrations is available if we set serialized_rollback = True on TransactionTestCase """ available_apps = ["migration_test_data...
francbartoli/geonode
refs/heads/master
geonode/documents/tasks.py
1
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2017 OSGeo # # 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 ...
david-ragazzi/nupic
refs/heads/master
nupic/engine/common_networks/__init__.py
8
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
xianjunzhengbackup/Cloud-Native-Python
refs/heads/master
env/lib/python3.6/site-packages/pkg_resources/_vendor/__init__.py
12133432
AmmsA/django-latexify
refs/heads/master
latexify/migrations/__init__.py
12133432
Lektorium-LLC/edx-platform
refs/heads/master
cms/djangoapps/course_creators/tests/__init__.py
12133432
hamzehd/edx-platform
refs/heads/master
common/djangoapps/reverification/migrations/__init__.py
12133432
gogobook/wagtail
refs/heads/master
wagtail/wagtailsearch/management/__init__.py
12133432
x1101/nikola
refs/heads/master
nikola/shortcodes.py
1
# -*- coding: utf-8 -*- # Copyright © 2012-2016 Roberto Alsina and others. # 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 t...
vathpela/anaconda
refs/heads/master
pyanaconda/ui/gui/spokes/datetime_spoke.py
1
# Datetime configuration spoke class # # Copyright (C) 2012-2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program i...
chouseknecht/ansible
refs/heads/devel
lib/ansible/modules/database/postgresql/postgresql_schema.py
10
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, 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', ...
rickmendes/ansible-modules-core
refs/heads/devel
network/dellos10/dellos10_facts.py
19
#!/usr/bin/python # # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # Copyright (c) 2016 Dell 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 versi...
B-MOOC/edx-platform
refs/heads/master
openedx/core/lib/xblock_utils.py
80
""" Functions that can are used to modify XBlock fragments for use in the LMS and Studio """ import datetime import json import logging import static_replace import uuid import markupsafe from lxml import html, etree from contracts import contract from django.conf import settings from django.utils.timezone import UTC...
skycucumber/Messaging-Gateway
refs/heads/master
webapp/venv/lib/python2.7/site-packages/sqlalchemy/ext/horizontal_shard.py
32
# ext/horizontal_shard.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Horizontal sharding support. Defines a rudimental 'horizontal sharding' ...
umbrella-fabric/TouSIX-Manager
refs/heads/master
tousix_manager/Statistics_Manager/views.py
2
# Copyright 2015 Rémy Lapeyrade <remy at lapeyrade dot net> # Copyright 2015 LAAS-CNRS # # # This file is part of TouSIX-Manager. # # TouSIX-Manager 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 Founda...
fredthomsen/hyper
refs/heads/development
test/test_integration.py
1
# -*- coding: utf-8 -*- """ test/integration ~~~~~~~~~~~~~~~~ This file defines integration-type tests for hyper. These are still not fully hitting the network, so that's alright. """ import requests import threading import time import hyper import hyper.http11.connection import pytest from h2.frame_buffer import Fram...
camptocamp/c2c-rd-addons
refs/heads/8.0
chricar_stock_product_by_location/__init__.py
11
############################################## # # ChriCar Beteiligungs- und Beratungs- GmbH # created 2009-09-19 23:51:03+02 ############################################## import stock_product_by_location
calfonso/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_prioritylabels.py
41
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...
inspirehep/magpie
refs/heads/master
magpie/tests/test_api.py
2
import io import os import unittest from magpie import Magpie # This one is hacky, but I'm too lazy to do it properly! PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) DATA_DIR = os.path.join(PROJECT_DIR, 'data', 'hep-categories') class TestAPI(unittest.TestCase): """ Basic integration test...
pnedunuri/scipy
refs/heads/master
scipy/fftpack/realtransforms.py
102
""" Real spectrum tranforms (DCT, DST, MDCT) """ from __future__ import division, print_function, absolute_import __all__ = ['dct', 'idct', 'dst', 'idst'] import numpy as np from scipy.fftpack import _fftpack from scipy.fftpack.basic import _datacopied, _fix_shape, _asfarray import atexit atexit.register(_fftpack.d...
wwj718/xigua
refs/heads/master
main/templatetags/__init__.py
12133432
hectord/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/regressiontests/httpwrappers/__init__.py
12133432
UstadMobile/exelearning-ustadmobile-work
refs/heads/master
exe/jsui/mainpage.py
1
#!/usr/bin/python #-*- coding: utf-8 -*- # =========================================================================== # eXe # Copyright 2012, Pedro Peña Pérez, Open Phoenix IT # # 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...
tsabi/Odoo-tsabi-fixes
refs/heads/master
addons/gamification/tests/test_challenge.py
386
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013 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...
mm112287/2015cda-24
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_functiontestcase.py
791
import unittest from .support import LoggingResult class Test_FunctionTestCase(unittest.TestCase): # "Return the number of tests represented by the this test object. For # TestCase instances, this will always be 1" def test_countTestCases(self): test = unittest.FunctionTestCase(lambda: None) ...
gangadharkadam/v4_erp
refs/heads/develop
erpnext/patches/v4_2/default_website_style.py
27
import frappe from frappe.templates.pages.style_settings import default_properties def execute(): frappe.reload_doc('website', 'doctype', 'style_settings') style_settings = frappe.get_doc("Style Settings", "Style Settings") if not style_settings.apply_style: style_settings.update(default_properties) style_setti...
cropleyb/pentai
refs/heads/master
pentai/db/ai_factory.py
1
#!/usr/bin/env python import pentai.ai.ai_player as aip_m from pentai.ai.priority_filter import * from pentai.ai.priority_filter_2 import * import pentai.db.openings_book as ob_m import pentai.db.games_mgr from pentai.ai.ai_genome import * class AIFactory: # TODO: These are just functions def create_player(sel...
jrichte43/ProjectEuler
refs/heads/develop
Problem-0065/solutions.py
1
__problem_title__ = "Convergents of e" __problem_url___ = "https://projecteuler.net/problem=65" __problem_description__ = "The square root of 2 can be written as an infinite continued " \ "fraction. The infinite continued fraction can be written, √2 = " \ "[1;(2)], (...
sitsbeyou/Misago
refs/heads/master
misago/users/permissions/decorators.py
9
from django.core.exceptions import PermissionDenied from django.utils.translation import ugettext_lazy as _ def authenticated_only(f): def perm_decorator(user, target): if user.is_authenticated(): return f(user, target) else: messsage = _("You have to sig in to perform this...
sigwo/powerpool
refs/heads/master
powerpool/reporters/__init__.py
4
from .base import Reporter, StatReporter, QueueStatReporter from .redis_reporter import RedisReporter from .double_reporter import DoubleReporter from .celery_reporter import CeleryReporter
ORGAN-IZE/register
refs/heads/master
widget/views.py
1
from __future__ import unicode_literals import logging import django.contrib.messages import django.urls import django.forms import django.http import django.shortcuts import django.views.generic.edit import forms import emails import models logger = logging.getLogger(__name__) class WidgetCreateView(django.view...
heeraj123/oh-mainline
refs/heads/master
vendor/packages/twisted/doc/core/howto/listings/deferred/deferred_ex5.py
16
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.internet import defer from twisted.python import failure, util """ Now comes the more nuanced addCallbacks, which allows us to make a yes/no (branching) decision based on whether the result at a given point is ...
boxed/CMi
refs/heads/master
web_frontend/requests/packages/chardet/big5prober.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
bckwltn/SickRage
refs/heads/master
autoProcessTV/lib/requests/packages/chardet/big5prober.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
minhpqn/chainer
refs/heads/master
tests/chainer_tests/functions_tests/loss_tests/test_sigmoid_cross_entropy.py
14
import math import unittest import numpy import six import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import condition class TestSigmoidCrossEntropy(unittest.TestCase): def s...
adit-chandra/tensorflow
refs/heads/master
tensorflow/tools/compatibility/all_renames_v2.py
3
# Copyright 2019 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...
SantosDevelopers/sborganicos
refs/heads/master
venv/lib/python3.5/site-packages/django/urls/__init__.py
170
from .base import ( clear_script_prefix, clear_url_caches, get_script_prefix, get_urlconf, is_valid_path, resolve, reverse, reverse_lazy, set_script_prefix, set_urlconf, translate_url, ) from .exceptions import NoReverseMatch, Resolver404 from .resolvers import ( LocaleRegexProvider, LocaleRegexURLResol...
ging/horizon
refs/heads/master
openstack_dashboard/dashboards/project/images/snapshots/__init__.py
12133432
brannon/aiohttp-healthcheck
refs/heads/master
tests/__init__.py
12133432
Godiyos/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/test_zlib.py
47
import unittest from test import support import binascii import random import sys from test.support import precisionbigmemtest, _1G, _4G zlib = support.import_module('zlib') try: import mmap except ImportError: mmap = None class ChecksumTestCase(unittest.TestCase): # checksum test cases def test_crc...
reeselevine/iTerm2
refs/heads/master
tools/ply/ply-3.4/example/yply/ylex.py
165
# lexer for yacc-grammars # # Author: David Beazley (dave@dabeaz.com) # Date : October 2, 2006 import sys sys.path.append("../..") from ply import * tokens = ( 'LITERAL','SECTION','TOKEN','LEFT','RIGHT','PREC','START','TYPE','NONASSOC','UNION','CODE', 'ID','QLITERAL','NUMBER', ) states = (('code','exclusiv...
dylanjbarth/luigi
refs/heads/master
test/task_history_test.py
53
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
onfire73/pypeskg
refs/heads/master
ui/ez_setup.py
358
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
prestona/qpid-proton
refs/heads/master
examples/python/reactor/counter.py
8
#!/usr/bin/python # # 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 # "Lice...
jbedorf/tensorflow
refs/heads/master
tensorflow/contrib/memory_stats/python/kernel_tests/memory_stats_ops_test.py
55
# Copyright 2017 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...
muniri92/django-imager
refs/heads/master
imagersite/imager_images/migrations/0003_auto_20160413_0621.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-13 06:21 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('imager_images', '0002_auto_20160412_1734'), ] opera...
Mazecreator/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/kernel_tests/bijectors/chain_test.py
70
# Copyright 2016 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...
mrshu/iepy
refs/heads/develop
iepy/webui/corpus/forms.py
2
# -*- coding: utf-8 -*- from django import forms from corpus.models import EvidenceLabel DEFAULT_LABEL = EvidenceLabel._meta.get_field('label').default class EvidenceForm(forms.ModelForm): class Meta: model = EvidenceLabel fields = ["label"] widgets = { 'label': forms.RadioSe...
fnouama/intellij-community
refs/heads/master
python/testData/inspections/PyUnboundLocalVariableInspection/ForBreakElse.py
83
def f(c): for i in [1, 2, 3]: if c: x = 0 break else: x = 1 return x #pass
kissbac/upm
refs/heads/master
examples/python/gp2y0a.py
16
#!/usr/bin/python # Author: Zion Orent <zorent@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 limi...
draperjames/bokeh
refs/heads/master
bokeh/tests/test_resources.py
2
from __future__ import absolute_import import unittest import os import bokeh.resources as resources from bokeh.models import Model from bokeh.resources import _get_cdn_urls, websocket_url_for_server_url # if BOKEH_RESOURCES is set many tests in this file fail if os.environ.get("BOKEH_RESOURCES"): raise Runtime...
Suwmlee/XX-Net
refs/heads/python3
lib/common/simple_http_server.py
1
import os import urllib.parse import datetime import threading import http.client import socket import errno import sys import select import time import json import xlog logging = xlog.getLogger("simple_http_server") class HttpServerHandler(): default_request_version = "HTTP/1.1" rbufsize = -1 wbufsize ...
justathoughtor2/atomicApe
refs/heads/encaged
cygwin/lib/python2.7/chunk.py
22
"""Simple class to read IFF chunks. An IFF chunk (used in formats such as AIFF, TIFF, RMFF (RealMedia File Format)) has the following structure: +----------------+ | ID (4 bytes) | +----------------+ | size (4 bytes) | +----------------+ | data | | ... | +----------------+ The ID is a 4-byte s...
natbraun/biggraphite
refs/heads/master
tests/test_drivers_downsampling.py
1
#!/usr/bin/env python # Copyright 2016 Criteo # # 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...
wkevina/feature-requests-app
refs/heads/master
features/models.py
1
from django.db import models class Client(models.Model): """Client associated with feature request""" # Name of client name = models.CharField('Name', max_length=200, unique=True) def __str__(self): return self.name class ProductArea(models.Model): """Product Area category for feature re...
danielforsyth/keras
refs/heads/master
keras/optimizers.py
24
from __future__ import absolute_import import theano import theano.tensor as T import numpy as np from .utils.theano_utils import shared_zeros, shared_scalar, floatX from six.moves import zip def clip_norm(g, c, n): if c > 0: g = T.switch(T.ge(n, c), g * c / n, g) return g def kl_divergence(p, p_ha...
mxOBS/deb-pkg_trusty_chromium-browser
refs/heads/master
testing/gmock/scripts/generator/cpp/__init__.py
12133432
heeraj123/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/modeladmin/__init__.py
12133432
earies/ncclient
refs/heads/master
ncclient/operations/third_party/hpcomware/__init__.py
12133432
tkf/orgviz
refs/heads/master
orgviz/utils/__init__.py
12133432
Daniel-CA/odoo
refs/heads/8.0
addons/hw_proxy/controllers/main.py
27
# -*- coding: utf-8 -*- import logging import commands import simplejson import os import os.path import openerp import time import random import subprocess import simplejson import werkzeug import werkzeug.wrappers from threading import Lock _logger = logging.getLogger(__name__) from openerp import http from opener...
fawyna/odoocsv2xml
refs/heads/master
csv2xml.py
1
# -*- coding: utf-8 -*- # based on these codes # http://code.activestate.com/recipes/577423-convert-csv-to-xml/ # https://gist.github.com/bealdav/0d6f4ff4cda4b8820b22 # convert csv files from Odoo into xml files # csv is easy to maintain but xml data have noupdate feature # customer fills up the .xls sheet, then we tu...
MoisesTedeschi/python
refs/heads/master
Scripts-Python/Modulos-Diversos/python-com-scrapy/Lib/site-packages/parsel/utils.py
1
import re import six from w3lib.html import replace_entities as w3lib_replace_entities def flatten(x): """flatten(sequence) -> list Returns a single, flat list which contains all elements retrieved from the sequence and all recursively contained sub-sequences (iterables). Examples: >>> [1, 2, ...
pcabido/socorro
refs/heads/master
socorro/unittest/cron/jobs/test_weekly_reports_partitions.py
11
# 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 nose.plugins.attrib import attr from crontabber.app import CronTabber from socorro.unittest.cron.jobs.base import ...
40323240/personal-cdw11
refs/heads/master
users/b/g8/bg8_40323213.py
5
# 各組分別在各自的 .py 程式中建立應用程式 (第1步/總共3步) from flask import Blueprint, render_template, make_response # 利用 Blueprint建立 ag1, 並且 url 前綴為 /ag1, 並設定 template 存放目錄 bg8_40323213 = Blueprint('bg8_40323213', __name__, url_prefix='/bg8_40323213', template_folder='templates') @bg8_40323213.route('/task4A') def task4A(): outst...
metagriffin/svnpublish
refs/heads/master
svnpublish/util/run.py
1
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # file: $Id$ # auth: metagriffin <mg.github@uberdev.org> # date: 2013/10/16 # copy: (C) Copyright 2013-EOT metagriffin -- see LICENSE.txt #-----------------------------------------------------------------------------...
dagwieers/ansible
refs/heads/devel
lib/ansible/modules/network/cloudengine/ce_bfd_session.py
28
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
fieteboerner/dotfiles
refs/heads/master
i3/scripts/disable-standby-fs.py
3
#!/usr/bin/env python3 from argparse import ArgumentParser from subprocess import call import i3ipc i3 = i3ipc.Connection() parser = ArgumentParser(prog='disable-standby-fs', description=''' Disable standby (dpms) and screensaver when a window becomes fullscreen or exits fullscreen-mode. Requ...
kparal/anaconda
refs/heads/master
pyanaconda/ui/gui/__init__.py
1
# Base classes for the graphical user interface. # # Copyright (C) 2011-2012 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # T...
CourseTalk/edx-platform
refs/heads/master
lms/djangoapps/ccx/api/__init__.py
12133432
mozilla/zamboni
refs/heads/master
mkt/fireplace/management/__init__.py
12133432
ujenmr/ansible
refs/heads/devel
lib/ansible/modules/remote_management/manageiq/__init__.py
12133432
pescobar/easybuild-easyblocks
refs/heads/master
easybuild/easyblocks/a/__init__.py
12133432
matbu/ansible-modules-extras
refs/heads/devel
windows/win_nssm.py
23
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Heyo # # 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) a...
tunneln/CarnotKE
refs/heads/master
jyhton/out/test/tests/org/python/indexer/data/foo.py
13
def f(x): return x+1 def g(y): x = 2 return x+1
horance-liu/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/morphological_ops_test.py
138
# Copyright 2016 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...
barseghyanartur/sockjs-tornado
refs/heads/master
sockjs/tornado/transports/eventsource.py
10
# -*- coding: utf-8 -*- """ sockjs.tornado.transports.eventsource ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ EventSource transport implementation. """ from tornado.web import asynchronous from sockjs.tornado.transports import streamingbase class EventSourceTransport(streamingbase.StreamingTransportBase): ...