repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
TL4/deploy | refs/heads/master | config.py | 816 | # coding: utf-8
|
nikhilraog/boto | refs/heads/develop | boto/ec2/securitygroup.py | 150 | # Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2011, Eucalyptus Systems, Inc.
#
# 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
# w... |
projectcalico/calico-nova | refs/heads/calico-readme | nova/keymgr/single_key_mgr.py | 8 | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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/... |
shermanng10/superathletebuilder | refs/heads/master | env/lib/python2.7/site-packages/wheel/signatures/__init__.py | 565 | """
Create and verify jws-js format Ed25519 signatures.
"""
__all__ = [ 'sign', 'verify' ]
import json
from ..util import urlsafe_b64decode, urlsafe_b64encode, native, binary
ed25519ll = None
ALG = "Ed25519"
def get_ed25519ll():
"""Lazy import-and-test of ed25519 module"""
global ed25519ll
if not ... |
getstackd/stackd | refs/heads/master | vendor/boost-context/tools/build/v2/test/direct_request_test.py | 44 | #!/usr/bin/python
import BoostBuild
t = BoostBuild.Tester(use_test_config=False)
# First check some startup.
t.write("jamroot.jam", "")
t.write("jamfile.jam", """\
exe a : a.cpp b ;
lib b : b.cpp ;
""")
t.write("a.cpp", """\
void
# ifdef _WIN32
__declspec(dllimport)
# endif
foo();
int main() { foo(); }
""")
t.wri... |
chdecultot/erpnext | refs/heads/develop | erpnext/hr/doctype/travel_request/__init__.py | 12133432 | |
brain-research/mirage-rl-qprop | refs/heads/master | rllab/q_functions/__init__.py | 12133432 | |
kapari/django-oscar | refs/heads/master | src/oscar/apps/analytics/migrations/__init__.py | 12133432 | |
bq/bitbloq-offline | refs/heads/master | app/res/web2board/linux32/Test/resources/__init__.py | 12133432 | |
goodmase/django-bitfield-manager | refs/heads/master | docs/conf.py | 1 | # -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 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.
#
# ... |
lupyuen/RaspberryPiImage | refs/heads/master | home/pi/GrovePi/Software/Python/others/temboo/Library/LittleSis/__init__.py | 12133432 | |
manqala/erpnext | refs/heads/develop | erpnext/docs/user/manual/en/accounts/__init__.py | 12133432 | |
badock/nova | refs/heads/master | nova/tests/virt/libvirt/test_fakelibvirt.py | 11 | # Copyright 2010 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 l... |
aml-development/ozp-backend | refs/heads/master | ozpcenter/migrations/0006_notification__peer.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('ozpcenter', '0005_notification_agency'),
]
operations = [
migrations.AddField(
model_name='notification',
... |
metapolator/mutatormathtools | refs/heads/master | python_modules/lib/python/robofab/test/runAll.py | 10 | import os
import glob
import unittest
import robofab.test
if __name__ == "__main__":
testDir = os.path.dirname(robofab.test.__file__)
testFiles = glob.glob1(testDir, "test_*.py")
loader = unittest.TestLoader()
suites = []
for fileName in testFiles:
modName = "robofab.test." + fileName[:-3]
print "importing... |
discretelogics/TeaFiles.Py | refs/heads/master | setup.py | 1 | from distutils.core import setup
setup(
name='teafiles',
version='0.7.4',
author='discretelogics',
author_email='pythonapi@discretelogics.com',
url='http://discretelogics.com',
download_url='http://pypi.python.org/packages/source/t/teafiles',
description='Time Series storage in flat files.'... |
40223134/w16b_test | refs/heads/master | static/Brython3.1.3-20150514-095342/Lib/xml/sax/xmlreader.py | 824 | """An XML Reader is the SAX 2 name for an XML parser. XML Parsers
should be based on this code. """
from . import handler
from ._exceptions import SAXNotSupportedException, SAXNotRecognizedException
# ===== XMLREADER =====
class XMLReader:
"""Interface for reading an XML document using callbacks.
XMLReade... |
kbrebanov/ansible | refs/heads/devel | lib/ansible/modules/network/avi/avi_gslbhealthmonitor.py | 45 | #!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... |
obi-two/Rebelion | refs/heads/master | data/scripts/templates/object/mobile/shared_borgle.py | 2 | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_borgle.iff"
result.attribute_template_id = 9
result.stfName("... |
nickpack/django-oscar | refs/heads/master | src/oscar/apps/order/reports.py | 23 | import datetime
from oscar.core.loading import get_model
from django.utils.translation import ugettext_lazy as _
from oscar.core.loading import get_class
ReportGenerator = get_class('dashboard.reports.reports', 'ReportGenerator')
ReportCSVFormatter = get_class('dashboard.reports.reports',
... |
ogenstad/ansible | refs/heads/devel | lib/ansible/plugins/action/net_system.py | 648 | # (c) 2017, 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.
#
# Ansible is di... |
google-research/google-research | refs/heads/master | caql/dual_method_test.py | 1 | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... |
dfdx2/django | refs/heads/master | tests/model_fields/test_uuid.py | 67 | import json
import uuid
from django.core import exceptions, serializers
from django.db import IntegrityError, models
from django.test import (
SimpleTestCase, TestCase, TransactionTestCase, skipUnlessDBFeature,
)
from .models import (
NullableUUIDModel, PrimaryKeyUUIDModel, RelatedToUUIDModel, UUIDGrandchild,... |
barma1309/Kalista | refs/heads/master | .virtualenvs/Kalista/lib/python3.4/site-packages/django/contrib/sessions/models.py | 347 | from __future__ import unicode_literals
from django.contrib.sessions.base_session import (
AbstractBaseSession, BaseSessionManager,
)
class SessionManager(BaseSessionManager):
use_in_migrations = True
class Session(AbstractBaseSession):
"""
Django provides full support for anonymous sessions. The s... |
pabloborrego93/edx-platform | refs/heads/master | lms/djangoapps/notes/models.py | 13 | from django.db import models
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.core.exceptions import ValidationError
from django.utils.html import strip_tags
import json
from openedx.core.djangoapps.xmodule_django.models import CourseKeyField
class Note(models.Mode... |
Nolski/olympia | refs/heads/master | apps/reviews/tests/test_views.py | 10 | # -*- coding: utf-8 -*-
import json
from nose.tools import eq_
from pyquery import PyQuery as pq
import mock
import amo.tests
from amo import helpers
from access.models import Group, GroupUser
from addons.models import Addon, AddonUser
from devhub.models import ActivityLog
from reviews.models import Review, ReviewFla... |
imjonsnooow/vivisect | refs/heads/master | visgraph/cli.py | 7 | '''
A package for a basic command interpreter for the graph.
(and graph db...)
'''
import sys
import cmd
import visgraph.dbcore as vg_dbcore
import visgraph.pathcore as vg_pcore
import visgraph.graphcore as vg_gcore
class GraphCli(cmd.Cmd):
def __init__(self, graph=None):
cmd.Cmd.__init__(self)
... |
KMarshland/MusicSync | refs/heads/master | gmusicapi/protocol/locker_pb2.py | 8 | # Generated by the protocol buffer compiler. DO NOT EDIT!
from google.protobuf import descriptor
from google.protobuf import message
from google.protobuf import reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
import uits_pb2
DESCRIPTOR = descriptor.FileDescriptor(
name='... |
MetalDestructor/MyTwitterClient | refs/heads/master | start.py | 1 | import client
app = client.MyApp(0)
app.MainLoop() |
hacktoberfest17/programming | refs/heads/master | web_server/web_server.py | 3 | import socket
HOST, PORT = ("", 8080)
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind((HOST, PORT))
server.listen()
print("Serving on PORT {}".format(PORT))
while True:
connection, address = server.accept() # accept the connection
req = connection.recv(1024) # recieve the request, ma... |
jaredweiss/nupic | refs/heads/master | tests/unit/nupic/algorithms/tp10x2_test.py | 12 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# 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 ... |
jaredly/pyjamas | refs/heads/master | library/__mozilla__/__init__.py | 12133432 | |
monikagrabowska/osf.io | refs/heads/develop | api/nodes/__init__.py | 12133432 | |
stevekew/oakleydb | refs/heads/master | infra/oakleydb/__init__.py | 12133432 | |
Y3K/django | refs/heads/master | tests/migrations/test_migrations_order/__init__.py | 12133432 | |
emedinaa/contentbox | refs/heads/master | third_party/django/contrib/auth/handlers/__init__.py | 12133432 | |
jantoniomartin/machiavelli | refs/heads/master | templatetags/__init__.py | 12133432 | |
boooka/GeoPowerOff | refs/heads/master | venv/lib/python2.7/site-packages/django/contrib/gis/__init__.py | 65 | from django.utils import six
if six.PY3:
memoryview = memoryview
else:
memoryview = buffer
default_app_config = 'django.contrib.gis.apps.GISConfig'
|
gilmrjc/generator-django-reload | refs/heads/master | app/templates/manage.py | 1 | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "<%= projectName %>.settings.development")
from django.core.management import execute_from_command_line
if 'livereload' in sys.argv:
from django.core.wsgi import get_wsgi_applicat... |
juliomenendez/django-gears | refs/heads/develop | tests/test_serve/__init__.py | 12133432 | |
abhishek-ch/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/empty/no_models/__init__.py | 12133432 | |
Yuriy-Leonov/nova | refs/heads/master | nova/tests/virt/xenapi/image/__init__.py | 12133432 | |
mohammed-alfatih/servo | refs/heads/master | tests/wpt/web-platform-tests/referrer-policy/generic/tools/__init__.py | 12133432 | |
MalmoUniversity-DA366A/calvin-base | refs/heads/master | calvin/runtime/south/plugins/async/__init__.py | 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson 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 ... |
ksachs/invenio | refs/heads/prod | modules/webauthorprofile/lib/webauthorprofile_cli.py | 18 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2011 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) a... |
MoguCloud/shadowsocks | refs/heads/master | shadowsocks/crypto/table.py | 1044 | # !/usr/bin/env python
#
# 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 by applicable law or... |
rajadhva/servo | refs/heads/master | components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py | 276 | def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
interface VoidArgument1 {
void foo(void arg2);
};
""")
results = parser.finish()
except:
threw = True
harness.ok(threw, "Should have thrown.")
|
sunscrapers/djet | refs/heads/master | testproject/testapp/__init__.py | 12133432 | |
yanlend/scikit-learn | refs/heads/master | sklearn/tree/tests/__init__.py | 12133432 | |
whs/django | refs/heads/master | django/conf/locale/de_CH/__init__.py | 12133432 | |
wwj718/ANALYSE | refs/heads/master | common/djangoapps/reverification/tests/factories.py | 33 | """
verify_student factories
"""
from reverification.models import MidcourseReverificationWindow
from factory.django import DjangoModelFactory
import pytz
from datetime import timedelta, datetime
from opaque_keys.edx.locations import SlashSeparatedCourseKey
# Factories don't have __init__ methods, and are self docume... |
aviciimaxwell/odoo | refs/heads/8.0 | addons/sale/report/sale_report.py | 111 | # -*- 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... |
PyWavelets/pywt | refs/heads/master | pywt/_utils.py | 3 | # Copyright (c) 2017 The PyWavelets Developers
# <https://github.com/PyWavelets/pywt>
# See COPYING for license details.
import inspect
import numpy as np
import sys
from collections.abc import Iterable
from ._extensions._pywt import (Wavelet, ContinuousWavelet,
Discr... |
cadencewatches/frappe | refs/heads/master | frappe/templates/pages/desk.py | 39 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
no_sitemap = 1
no_cache = 1
base_template_path = "templates/pages/desk.html"
import frappe, os
def get_context(context):
hooks = frappe.get_hooks()
return {
"build_versi... |
mateor/pants | refs/heads/master | tests/python/pants_test/backend/jvm/tasks/test_jvm_dependency_usage_integration.py | 13 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import json
import o... |
xiandiancloud/ji | refs/heads/master | common/lib/capa/capa/tests/test_shuffle.py | 196 | """Tests the capa shuffle and name-masking."""
import unittest
import textwrap
from . import test_capa_system, new_loncapa_problem
from capa.responsetypes import LoncapaProblemError
class CapaShuffleTest(unittest.TestCase):
"""Capa problem tests for shuffling and choice-name masking."""
def setUp(self):
... |
jessstrap/servotk | refs/heads/master | tests/wpt/harness/wptrunner/browsers/chrome.py | 99 | # 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 .base import Browser, ExecutorBrowser, require_arg
from ..webdriver_server import ChromeDriverServer
from ..executo... |
willzhang05/postgrestesting1 | refs/heads/master | postgrestesting1/lib/python3.5/site-packages/django/contrib/sessions/serializers.py | 587 | from django.core.signing import JSONSerializer as BaseJSONSerializer
try:
from django.utils.six.moves import cPickle as pickle
except ImportError:
import pickle
class PickleSerializer(object):
"""
Simple wrapper around pickle to be used in signing.dumps and
signing.loads.
"""
def dumps(se... |
rghe/ansible | refs/heads/devel | lib/ansible/plugins/action/ce.py | 21 | #
# (c) 2016 Red Hat 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.
#
# Ansible is d... |
dineshsg/spoken-website | refs/heads/eventsV2 | events/events_email.py | 1 | from django.core.mail import EmailMultiAlternatives
def send_email(status, to = None, instance = None, cc = None, bcc = None):
subject = None
### Mail 1
if status == 'Fix a date for your first training':
subject = 'Important : Fix a date for your first Training'
message = '''Dear Organiser... |
charlesjolley/SublimeNodeTools | refs/heads/master | jslint.py | 1 | import os
import re
import sublime
import sublime_plugin
from statusprocess import *
from asyncprocess import *
from output_panel import *
PROMPT = "jshint:\n"
SUPPORTED_SELECTORS = ('source.js', 'source.json', 'source.coffee')
###############################################
# Support Functions
#
def is_supported_vi... |
3v1n0/pywws | refs/heads/cwop | src/pywws/regulartasks.py | 1 | # pywws - Python software for USB Wireless Weather Stations
# http://github.com/jim-easterbrook/pywws
# Copyright (C) 2008-18 pywws contributors
# 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;... |
smalley/python | refs/heads/master | exercises/octal/octal.py | 7 | def parse_octal(digits):
pass
|
synconics/odoo | refs/heads/8.0 | openerp-wsgi.py | 363 | # WSGI Handler sample configuration file.
#
# Change the appropriate settings below, in order to provide the parameters
# that would normally be passed in the command-line.
# (at least conf['addons_path'])
#
# For generic wsgi handlers a global application is defined.
# For uwsgi this should work:
# $ uwsgi_python --... |
ashvina/heron | refs/heads/master | heronpy/api/state/state.py | 5 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# 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... |
maciek123/pyage-forams | refs/heads/master | pyage_forams/solutions/distributed/requests/migrate.py | 1 | from pyage_forams.solutions.distributed.request import Request
class MigrateRequest(Request):
def __init__(self, agent_address, cell_address, foram):
super(MigrateRequest, self).__init__(agent_address)
self.cell_address = cell_address
self.foram = foram
def execute(self, agent):
... |
jtobin/libjq-haskell | refs/heads/jt-initial | include/jq-jq-1.5/scripts/gen_utf8_tables.py | 1 | #!/usr/bin/python
# This program was used to generate jv_utf8_tables.gen.h
mask = lambda n: (1 << n) - 1
def print_table(type, name, t):
print("static const %s %s[] =" % (type, name))
first = True
for i in range(0,len(t),16):
print ((" {" if i == 0 else " ") +
", ".join("0x%02x"%... |
tangyiyong/odoo | refs/heads/8.0 | openerp/addons/test_documentation_examples/tests/test_inheritance.py | 366 | # -*- coding: utf-8 -*-
from openerp.tests import common
class TestBasicInheritance(common.TransactionCase):
def test_inherit_method(self):
env = self.env
a = env['inheritance.0'].create({'name': 'A'})
b = env['inheritance.1'].create({'name': 'B'})
self.assertEqual(
a.call... |
pdellaert/ansible | refs/heads/devel | lib/ansible/module_utils/network/eos/providers/cli/__init__.py | 12133432 | |
avanov/django | refs/heads/master | django/contrib/gis/db/__init__.py | 12133432 | |
brainstorm/bcbio-nextgen | refs/heads/master | bcbio/server/__init__.py | 16 | """Provide a web server allowing remote execution and status query.
"""
|
arante/pyloc | refs/heads/master | py2/lpthw/ex33.py | 2 | #!/usr/bin/env python
#
# ex33.py
#
# Author: Billy Wilson Arante
# Created: 2016/05/08 PHT
# Citation: http://learnpythonthehardway.org/book/ex33.html
#
def main():
"""Exercise 33: While Loops"""
i = 0
numbers = []
while i < 6:
print "At the top i is %d" % i
numbers.append(i)
... |
wstcpyt/gmock | refs/heads/master | gtest/test/gtest_filter_unittest.py | 2826 | #!/usr/bin/env python
#
# Copyright 2005 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... |
vikatory/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/test/test_importlib/test_windows.py | 84 | from . import util
frozen_machinery, source_machinery = util.import_importlib('importlib.machinery')
import sys
import unittest
@unittest.skipUnless(sys.platform.startswith('win'), 'requires Windows')
class WindowsRegistryFinderTests:
# XXX Need a test that finds the spec via the registry.
def test_find_sp... |
truhoang/3d-coverage-solo | refs/heads/master | src/mavros/param.py | 1 | # -*- coding: utf-8 -*-
# vim:set ts=4 sw=4 et:
#
# Copyright 2014 Vladimir Ermakov.
#
# This file is part of the mavros package and subject to the license terms
# in the top-level LICENSE file of the mavros repository.
# https://github.com/mavlink/mavros/tree/master/LICENSE.md
import csv
import time
import rospy
impo... |
marclaporte/clearskies_core | refs/heads/master | tools/gyp/test/variables/commands/gyptest-commands.py | 311 | #!/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.
"""
Test variable expansion of '<!()' syntax commands.
"""
import os
import TestGyp
test = TestGyp.TestGyp(format='gypd')
expect = test.... |
groschovskiy/personfinder | refs/heads/master | app/pytz/zoneinfo/Europe/Belgrade.py | 9 | '''tzinfo timezone information for Europe/Belgrade.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i
class Belgrade(DstTzInfo):
'''Europe/Belgrade timezone definition. See datetime.tzinfo for details'''
zone = 'Europe/Belgrade'
... |
craigderington/studentloan5 | refs/heads/master | studentloan5/Lib/site-packages/django/contrib/admin/migrations/__init__.py | 12133432 | |
salguarnieri/intellij-community | refs/heads/master | plugins/hg4idea/testData/bin/mercurial/scmutil.py | 90 | # scmutil.py - Mercurial core utility functions
#
# Copyright Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from i18n import _
from mercurial.node import nullrev
import util, error, osutil, revset... |
MattNolanLab/ei-attractor | refs/heads/master | grid_cell_model/simulations/007_noise/figures/paper/i_surround/figure_gamma_pastoll_et_al_pc_weight_3.py | 1 | #!/usr/bin/env python
'''I-surround gamma plots with the Pastoll et al. settings.'''
from __future__ import absolute_import, print_function
import copy
import matplotlib
from grid_cell_model.submitting import flagparse
import noisefigs
from noisefigs.env import NoiseEnvironment
import config_pastoll_pc_weight_3 as c... |
tchellomello/home-assistant | refs/heads/dev | homeassistant/components/ovo_energy/__init__.py | 6 | """Support for OVO Energy."""
from datetime import datetime, timedelta
import logging
from typing import Any, Dict
import aiohttp
import async_timeout
from ovoenergy import OVODailyUsage
from ovoenergy.ovoenergy import OVOEnergy
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF... |
mbaijal/incubator-mxnet | refs/heads/master | example/gluon/dcgan.py | 7 | # 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... |
Gagaro/django | refs/heads/master | django/template/__init__.py | 165 | """
Django's support for templates.
The django.template namespace contains two independent subsystems:
1. Multiple Template Engines: support for pluggable template backends,
built-in backends and backend-independent APIs
2. Django Template Language: Django's own template engine, including its
built-in loaders, ... |
taylor-oconnell/SEED_Servers_Python | refs/heads/master | test/rast.py | 2 | import sys
import os
from servers.RAST import RASTserver
import getpass
username = getpass.getuser()
sys.stdout.write("Please enter your username [" + username + "]: ")
testun = sys.stdin.readline()
testun = testun.strip()
if (len(testun) > 0):
username = testun
password = getpass.getpass()
rast = RASTserver(us... |
stackimpact/stackimpact-python | refs/heads/master | tests/frame_cache_test.py | 1 | import unittest
import sys
import threading
import os
import stackimpact
class FrameCacheTestCase(unittest.TestCase):
def test_skip_stack(self):
stackimpact._agent = None
agent = stackimpact.start(
dashboard_address = 'http://localhost:5001',
agent_key = 'key1',
... |
ahmadio/edx-platform | refs/heads/master | pavelib/utils/cmd.py | 159 | """
Helper functions for constructing shell commands.
"""
def cmd(*args):
"""
Concatenate the arguments into a space-separated shell command.
"""
return " ".join([str(arg) for arg in args])
def django_cmd(sys, settings, *args):
"""
Construct a Django management command.
`sys` is either ... |
kaushik94/httpie | refs/heads/master | httpie/context.py | 2 | import sys
from requests.compat import is_windows
from httpie.config import DEFAULT_CONFIG_DIR, Config
class Environment(object):
"""
Information about the execution context
(standard streams, config directory, etc).
By default, it represents the actual environment.
All of the attributes can be... |
timm/timmnix | refs/heads/master | pypy3-v5.5.0-linux64/lib-python/3/plat-sunos5/DLFCN.py | 186 | # Generated by h2py from /usr/include/dlfcn.h
from TYPES import *
RTLD_LAZY = 0x00001
RTLD_NOW = 0x00002
RTLD_NOLOAD = 0x00004
RTLD_GLOBAL = 0x00100
RTLD_LOCAL = 0x00000
RTLD_PARENT = 0x00200
RTLD_GROUP = 0x00400
RTLD_WORLD = 0x00800
RTLD_NODELETE = 0x01000
RTLD_CONFGEN = 0x10000
RTLD_REL_RELATIVE = 0x00001
RTLD_REL_EX... |
AtnNn/rethinkdb | refs/heads/next | external/gtest-1.6.0/test/gtest_uninitialized_test.py | 2901 | #!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
atsuyim/theHarvester | refs/heads/master | discovery/exaleadsearch.py | 23 | import string
import httplib
import sys
import myparser
import re
import time
class search_exalead:
def __init__(self, word, limit, start):
self.word = word
self.files = "pdf"
self.results = ""
self.totalresults = ""
self.server = "www.exalead.com"
self.hostname = ... |
blackbliss/callme | refs/heads/master | flask/lib/python2.7/site-packages/flask/testsuite/__init__.py | 564 | # -*- coding: utf-8 -*-
"""
flask.testsuite
~~~~~~~~~~~~~~~
Tests Flask itself. The majority of Flask is already tested
as part of Werkzeug.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from __future__ import print_function
import os
import sys
im... |
MERegistro/meregistro | refs/heads/master | django/contrib/localflavor/fr/__init__.py | 12133432 | |
eltonsantos/django | refs/heads/master | tests/expressions_regress/__init__.py | 12133432 | |
eesatfan/openpli-enigma2 | refs/heads/master | lib/python/Plugins/PLi/__init__.py | 12133432 | |
takis/django | refs/heads/master | tests/migrations/test_migrations_fake_split_initial/__init__.py | 12133432 | |
jk1/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/core/cache/backends/locmem.py | 229 | "Thread-safe in-memory cache backend."
import time
try:
import cPickle as pickle
except ImportError:
import pickle
from django.core.cache.backends.base import BaseCache
from django.utils.synch import RWLock
# Global in-memory store of cache data. Keyed by name, to provide
# multiple named local memory caches... |
CongSmile/tp-qemu | refs/heads/master | qemu/tests/rv_vdagent.py | 9 | """
rv_vdagent.py - basic tests to verify, vdagent status, starting, stopping,
and restarting correctly.
Requires: connected binaries remote-viewer, Xorg, gnome session
"""
from autotest.client.shared import error
from virttest import utils_spice
def run(test, params, env):
"""
Tests spice vdagent (startin... |
OneTesseractInMultiverse/Thrive | refs/heads/master | thrive/models/course.py | 1 | import datetime
import uuid
import nacl.pwhash
from mongoengine import *
from werkzeug.security import safe_str_cmp
from nacl.pwhash import verify_scryptsalsa208sha256
from thrive import app
from thrive.extensions.security.crypto.entropy import gen_salt
from thrive.extensions.security.crypto.message_integrity import ... |
waytai/django | refs/heads/master | django/contrib/admin/migrations/0001_initial.py | 419 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django.contrib.admin.models
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('conten... |
Erianafranky/andela_bootcamp | refs/heads/master | Week1/Self_Learning_Clinic/Primes/prime_numbers_test.py | 1 | import unittest
from prime_numbers import get_primes
class TestPrimeNumbers(unittest.TestCase):
def test_assert_input_is_not_string(self):
self.assertRaises(TypeError,get_primes('a_string'))
def test_assert_input_is_not_list(self):
self.assertRaises(TypeError,get_primes([1,3]))
def test_assert_input_is_not_flo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.