repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
nitin-cherian/Webapps | refs/heads/master | SimpleIsBetterThanComplex.com/myproject/.env/lib/python3.5/site-packages/django/forms/models.py | 18 | """
Helper functions for creating Form classes from Django models
and database field objects.
"""
from __future__ import unicode_literals
from collections import OrderedDict
from itertools import chain
from django.core.exceptions import (
NON_FIELD_ERRORS, FieldError, ImproperlyConfigured, ValidationError,
)
fro... |
adminq80/Interactive_estimation | refs/heads/master | game/interactive/migrations/0012_merge_20161013_0036.py | 2 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-10-13 00:36
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('interactive', '0011_merge_20161012_2314'),
('interactive', '0011_survey'),
]
operat... |
giorgiop/scikit-learn | refs/heads/master | examples/feature_selection/plot_feature_selection.py | 95 | """
===============================
Univariate Feature Selection
===============================
An example showing univariate feature selection.
Noisy (non informative) features are added to the iris data and
univariate feature selection is applied. For each feature, we plot the
p-values for the univariate feature s... |
dallaspythondojo/python | refs/heads/master | Chambers_Jess/Assignments/stars_part2.py | 2 | def draw_stars(list):
for value in list:
if type(value) is int:
print "*" * value
else:
print value[0].lower() * len(value)
draw_stars([4, "Tom", 1, "Michael", 5, 7, "Jimmy Smith"])
|
ahojjati/grr | refs/heads/master | parsers/linux_sysctl_parser.py | 8 | #!/usr/bin/env python
"""Simple parsers for configuration files."""
from grr.lib import parsers
from grr.lib.rdfvalues import protodict as rdf_protodict
from grr.parsers import config_file
class ProcSysParser(parsers.FileParser):
"""Parser for /proc/sys entries."""
output_types = ["AttributedDict"]
supported_... |
izonder/intellij-community | refs/heads/master | python/testData/refactoring/move/relativeImportsInsideMovedModule/before/src/pkg1/subpkg1/mod3.py | 12133432 | |
idea4bsd/idea4bsd | refs/heads/idea4bsd-master | python/testData/resolve/multiFile/fromPackageImport/mypackage/p.py | 12133432 | |
scottferg/web-console | refs/heads/master | django/contrib/localflavor/ar/__init__.py | 12133432 | |
BrotherPhil/django | refs/heads/master | tests/custom_migration_operations/__init__.py | 12133432 | |
Kamik423/uni_plan | refs/heads/master | plan/plan/lib/python3.4/fnmatch.py | 894 | """Filename matching with shell patterns.
fnmatch(FILENAME, PATTERN) matches according to the local convention.
fnmatchcase(FILENAME, PATTERN) always takes case in account.
The functions operate by translating the pattern into a regular
expression. They cache the compiled regular expressions for speed.
The function... |
sjorek/mediacastserver | refs/heads/master | mcs/shaper.py | 1 | #!/usr/bin/env python -B
# -*- coding: utf-8 -*-
# © copyright 2011-2013 Stephan Jorek <stephan.jorek@gmail.com>.
# See LICENSE for details.
"""Example of rate-limiting your web server.
Caveat emptor: While the transfer rates imposed by this mechanism will
look accurate with wget's rate-meter, don't forget to examine... |
westinedu/newertrends | refs/heads/master | django/contrib/auth/tests/permissions.py | 231 | try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.contrib.auth.management import create_permissions
from django.contrib.auth import models as auth_models
from django.contrib.contenttypes import models as contenttypes_models
from django.core.management import call... |
eHealthAfrica/rapidpro | refs/heads/develop | temba/schedules/views.py | 4 | from __future__ import unicode_literals
import pytz
from datetime import datetime, timedelta
from django import forms
from django.core.urlresolvers import reverse
from django.utils import timezone
from django.utils.timezone import get_current_timezone_name
from smartmin.views import SmartCRUDL, SmartUpdateView
from t... |
srz-zumix/paizaio-api | refs/heads/master | sample/sample.py | 1 | #!/usr/bin/env python
from paizaio import PaizaIO
if __name__ == '__main__':
paiza = PaizaIO()
paiza.longpoll(True)
paiza.code('#include <iostream>\nint main() { int x = 0; std::cout << "hoge" << std::endl; }')
print paiza.run()
|
ppanczyk/ansible | refs/heads/devel | lib/ansible/modules/packaging/os/pkgin.py | 29 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Shaun Zinck <shaun.zinck at gmail.com>
# Copyright (c) 2015 Lawrence Leonard Gilbert <larry@L2G.to>
# Copyright (c) 2016 Jasper Lievisse Adriaanse <j at jasper.la>
#
# Written by Shaun Zinck
# Based on pacman module written by Afterburn <http://github.com/... |
waseem18/oh-mainline | refs/heads/master | vendor/packages/Django/django/contrib/gis/tests/geoapp/test_sitemaps.py | 112 | from __future__ import absolute_import
from io import BytesIO
from xml.dom import minidom
import zipfile
from django.conf import settings
from django.contrib.sites.models import Site
from django.test import TestCase
from .models import City, Country
class GeoSitemapTest(TestCase):
urls = 'django.contrib.gis.t... |
militiaonly/spark1707 | refs/heads/master | mysite/mysite/urls.py | 1 | """mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... |
batermj/algorithm-challenger | refs/heads/master | code-analysis/programming_anguage/python/source_codes/Python3.5.9/Python-3.5.9/Lib/test/test_lib2to3.py | 29 | from lib2to3.tests import load_tests
import unittest
if __name__ == '__main__':
unittest.main()
|
dtnaylor/web-profiler | refs/heads/master | webloader/pythonrequests_loader.py | 1 | import os
import logging
import traceback
import subprocess
import requests
from collections import defaultdict
from loader import Loader, LoadResult, Timeout, TimeoutError
#TODO: disable network cache
class PythonRequestsLoader(Loader):
'''Subclass of :class:`Loader` that loads pages using Python requests.
... |
unt-libraries/pymets | refs/heads/master | pymets/metsdoc.py | 1 | from lxml.etree import iterparse
from pymets import mets_structure
class PymetsException(Exception):
"""Base exception for pymets."""
def __init__(self, value):
self.value = value
def __str__(self):
return "%s" % (self.value,)
"""
How to use pymets:
Create a METS object (attrib... |
spoik/tastypie-example | refs/heads/master | api/api/urls.py | 1 | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
from tastypie.api import Api
from blog.api import PostResource
v1_api = Api(api_name='v1')
v1_api.register(PostResource())
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^a... |
tkem/mopidy | refs/heads/develop | tests/core/test_listener.py | 14 | from __future__ import absolute_import, unicode_literals
import unittest
import mock
from mopidy.core import CoreListener, PlaybackState
from mopidy.models import Playlist, TlTrack
class CoreListenerTest(unittest.TestCase):
def setUp(self): # noqa: N802
self.listener = CoreListener()
def test_on... |
zhaozhilong1993/python-kingclient | refs/heads/master | kingclient/openstack/common/apiclient/base.py | 1 | # Copyright 2010 Jacob Kaplan-Moss
# Copyright 2011 OpenStack Foundation
# Copyright 2012 Grid Dynamics
# 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... |
dsandeephegde/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pywebsocket/src/test/testdata/handlers/sub/plain_wsh.py | 499 | # Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
kdebrab/pandas | refs/heads/master | pandas/io/json/normalize.py | 3 | # ---------------------------------------------------------------------
# JSON normalization routines
import copy
from collections import defaultdict
import numpy as np
from pandas._libs.writers import convert_json_to_lines
from pandas import compat, DataFrame
def _convert_to_line_delimits(s):
"""Helper functio... |
hyqneuron/pylearn2-maxsom | refs/heads/master | pylearn2/linear/matrixmul.py | 43 | """
.. todo::
WRITEME
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
from theano.compat.six.moves import xrange
from theano import tens... |
Leits/openprocurement.relocation.api | refs/heads/master | openprocurement/relocation/api/views/__init__.py | 12133432 | |
jnovinger/django | refs/heads/master | tests/admin_scripts/app_raising_warning/__init__.py | 12133432 | |
PepperPD/edx-pepper-platform | refs/heads/master | lms/djangoapps/user_api/__init__.py | 12133432 | |
natejgreene/pyTwinkle | refs/heads/master | pyTwinkle/__init__.py | 12133432 | |
abzaloid/maps | refs/heads/master | django-project/lib/python2.7/site-packages/django/conf/locale/et/__init__.py | 12133432 | |
karllessard/tensorflow | refs/heads/master | tensorflow/python/distribute/multi_process_runner_no_init_test.py | 11 | # 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... |
golismero/golismero-devel | refs/heads/master | thirdparty_libs/nltk/classify/naivebayes.py | 12 | # Natural Language Toolkit: Naive Bayes Classifiers
#
# Copyright (C) 2001-2012 NLTK Project
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
"""
A classifier based on the Naive Bayes algorithm. In order to find the
probability for a labe... |
w1ll1am23/home-assistant | refs/heads/dev | homeassistant/auth/permissions/models.py | 5 | """Models for permissions."""
from __future__ import annotations
from typing import TYPE_CHECKING
import attr
if TYPE_CHECKING:
from homeassistant.helpers import (
device_registry as dev_reg,
entity_registry as ent_reg,
)
@attr.s(slots=True)
class PermissionLookup:
"""Class to hold data... |
halvertoluke/edx-platform | refs/heads/default_branch | manage.py | 188 | #!/usr/bin/env python
"""
Usage: manage.py {lms|cms} [--settings env] ...
Run django management commands. Because edx-platform contains multiple django projects,
the first argument specifies which project to run (cms [Studio] or lms [Learning Management System]).
By default, those systems run in with a settings file ... |
betoesquivel/PLYpractice | refs/heads/master | env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py | 153 | '''SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.
This needs the following packages installed:
* pyOpenSSL (tested wi... |
cirrusone/phantom2 | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/port/qt_unittest.py | 113 | # Copyright (C) 2010 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 f... |
graingert/luigi | refs/heads/master | luigi/db_task_history.py | 50 | # -*- 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... |
Eric-Zhong/odoo | refs/heads/8.0 | openerp/addons/base/tests/test_mail.py | 322 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This test can be run stand-alone with something like:
# > PYTHONPATH=. python2 openerp/tests/test_misc.py
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP... |
telegram-bots/telegram-channels-feed | refs/heads/master | bot/src/exception/__init__.py | 12133432 | |
mikel-egana-aranguren/SADI-Galaxy-Docker | refs/heads/master | galaxy-dist/test/install_and_test_tool_shed_repositories/base/__init__.py | 12133432 | |
longmen21/edx-platform | refs/heads/master | lms/djangoapps/shoppingcart/management/commands/__init__.py | 12133432 | |
pwaldo2/AWPUG-Plone-Demo | refs/heads/master | src/awpug.content/PasteScript-1.7.5-py2.7.egg/tests/appsetup/__init__.py | 12133432 | |
tylergibson/upm | refs/heads/master | examples/python/grovewater.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... |
Novasoft-India/OperERP-AM-Motors | refs/heads/master | openerp/addons/survey/wizard/survey_print_answer.py | 54 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... |
nicky-ji/edx-nicky | refs/heads/master | lms/djangoapps/linkedin/management/__init__.py | 12133432 | |
joshtechnologygroup/dark-engine | refs/heads/master | engine/settings/__init__.py | 12133432 | |
dasseclab/dasseclab | refs/heads/master | clones/routersploit/tests/exploits/routers/bhu/__init__.py | 12133432 | |
SAR85/closure-linter | refs/heads/master | closure_linter/common/tokens_test.py | 126 | #!/usr/bin/env python
# Copyright 2011 The Closure Linter 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
#
#... |
danielcbit/vdt | refs/heads/master | src/mesh/test/examples-to-run.py | 196 | #! /usr/bin/env python
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
# A list of C++ examples to run in order to ensure that they remain
# buildable and runnable over time. Each tuple in the list contains
#
# (example_name, do_run, do_valgrind_run).
#
# See test.py for more i... |
sio2project/oioioi | refs/heads/master | oioioi/problems/migrations/0004_problem_main_problem_instance.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
def assign_problem_instances(apps, schema_editor):
"""Finds :class:`oioioi.contests.models.ProblemInstance` assigned to every
:class:`oioioi.problems.models.Problem`,
and makes it a main_problem... |
nirb/whatsapp | refs/heads/master | build/lib/yowsup/layers/protocol_iq/protocolentities/__init__.py | 68 | from .iq import IqProtocolEntity
from .iq_result import ResultIqProtocolEntity
from .iq_ping import PingIqProtocolEntity
from .iq_result_pong import PongResultIqProtocolEntity
from .iq_error import ErrorIqProtocolEntity
from .iq_push import PushIqProtocolEntity
from .iq_props import PropsIqProtocolEntity
from .iq_crypt... |
belmiromoreira/nova | refs/heads/master | nova/db/sqlalchemy/migrate_repo/versions/269_add_numa_node_column.py | 81 | # Copyright 2014 Intel Corporation
# 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 ag... |
shakamunyi/neutron | refs/heads/master | neutron/tests/unit/ipam/test_subnet_alloc.py | 11 | # Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
# 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/LICEN... |
Workday/OpenFrame | refs/heads/master | ui/events/ozone/evdev/capture_device_capabilities.py | 44 | #!/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.
"""Code generator DeviceCapabilities literal."""
import argparse
import ctypes
import evdev
import os
import sys
TEST_DATA_GROUP_SIZE = ... |
soarpenguin/ansible | refs/heads/devel | lib/ansible/modules/source_control/gitlab_user.py | 8 | #!/usr/bin/python
# (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl)
# 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.0',
... |
jun-wan/scilifelab | refs/heads/master | setup.py | 4 | #!/usr/bin/env python
"""Setup file and install script SciLife python scripts.
"""
from setuptools import setup, find_packages
import sys
import os
import glob
import subprocess
# Fetch version from git tags, and write to version.py.
# Also, when git is not available (PyPi package), use stored version.py.
version_py =... |
DavidAndreev/indico | refs/heads/devel | indico/modules/events/static/controllers.py | 2 | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... |
awalls-cx18/gnuradio | refs/heads/master | grc/core/utils/backports/shlex.py | 7 | # Copyright 2016 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# any later version.
#
# G... |
wbyne/QGIS | refs/heads/master | tests/src/python/test_qgis_local_server.py | 5 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for qgis_local_server.py Python test module
From build dir: ctest -R PyQgsLocalServer -V
Set the following env variables when manually running tests:
QGIS_TEST_SUITE to run specific tests (define in __main__)
QGIS_TEST_VERBOSE to output individual test summary
QGIS_TEST... |
hantempo/googletest | refs/heads/master | xcode/Scripts/versiongenerate.py | 3088 | #!/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... |
jbradberry/dxr | refs/heads/master | dxr/indexers.py | 1 | """Base classes and convenience functions for writing indexers and skimmers"""
from collections import namedtuple
from operator import itemgetter
from os.path import join, islink
from warnings import warn
from funcy import group_by, decorator, imapcat
from dxr.utils import build_offset_map, split_content_lines
STR... |
aleonliao/depot_tools | refs/heads/master | third_party/protobuf26/descriptor.py | 26 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... |
ojake/django | refs/heads/master | django/contrib/flatpages/models.py | 318 | from __future__ import unicode_literals
from django.contrib.sites.models import Site
from django.core.urlresolvers import get_script_prefix
from django.db import models
from django.utils.encoding import iri_to_uri, python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
@python_2_unicode_... |
esteluk/reinhardt | refs/heads/master | tracker/__init__.py | 12133432 | |
mcollins12321/anita | refs/heads/master | venv/lib/python2.7/site-packages/wheel/test/simple.dist/simpledist/__init__.py | 12133432 | |
lmazuel/ansible | refs/heads/devel | lib/ansible/modules/network/ordnance/__init__.py | 12133432 | |
jacquesqiao/Paddle | refs/heads/develop | doc/v2/howto/cluster/multi_cluster/src/k8s_train/start_paddle.py | 16 | #!/usr/bin/python
# Copyright (c) 2016 PaddlePaddle 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 ... |
jriguera/photoplace | refs/heads/master | photoplace/lib/sXMLTemplate/sxmltemplate.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# 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 dist... |
benracine/opencomparison | refs/heads/master | apps/grid/migrations/0001_initial.py | 3 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
depends_on = (
("package", "0016_auto__del_field_package_pypi_home_page"),
)
def forwards(self, orm):
# Ad... |
finfou/tushare | refs/heads/master | tushare/fund/__init__.py | 12133432 | |
amir-qayyum-khan/edx-platform | refs/heads/master | lms/djangoapps/courseware/features/__init__.py | 12133432 | |
AndyHelix/django-xadmin | refs/heads/master | tests/xtests/site/__init__.py | 12133432 | |
CDE-UNIBE/qcat | refs/heads/develop | apps/qcat/migrations/__init__.py | 12133432 | |
avatao-content/challenge-toolbox | refs/heads/master | templates/telnet/solvable/home/user/encr.py | 2 | import sys
def send(msg):
sys.stdout.write(msg+'\n')
sys.stdout.flush()
while (1):
send('Enter the text you want to encrypt:')
text = sys.stdin.readline().strip()
if not text:
break
send('Here\'s your encrypted text:')
bts = [ord(c) for c in text]
if len(bts)%2 == 1:
bts.append(0)
for i in range(len(bts... |
BrickText/JHROM | refs/heads/master | database/connection/database_connection.py | 1 | import sqlite3
from settings.database_settings import DB_NAME
from database.queries.create_table_queries import *
class Database:
def __init__(self, database_name=DB_NAME):
self.db_name = DB_NAME
self.create_connection()
def reset_database(self):
self.drop_tables()
self.crea... |
zhangguiyu/djangocms-cascade | refs/heads/master | docs/source/conf.py | 8 | # -*- coding: utf-8 -*-
#
# djangocms-cascade documentation build configuration file, created by
# sphinx-quickstart on Wed Oct 16 10:55:21 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 fil... |
aslihandincer/Introduction-Programming-Python | refs/heads/master | Module2DisplayingText/Module2DisplayingText/Module2DisplayingText.py | 19 | print('The capybara is the worlds largest rodent')
print('The capybara likes to live in groups')
print("The capybara can swim")
print("the capybara lives in \nSouth America")
print("""This is the strangest
way to print over multiple lines I know""")
print('here is a double quote "' + " here is a single quote '")
prin... |
ashang/calibre | refs/heads/master | src/cherrypy/wsgiserver/wsgiserver3.py | 82 | """A high-speed, production ready, thread pooled, generic HTTP server.
Simplest example on how to use this module directly
(without using CherryPy's application machinery)::
from cherrypy import wsgiserver
def my_crazy_app(environ, start_response):
status = '200 OK'
response_headers = [('... |
jon-jacky/PyModel | refs/heads/master | samples/WebApplication/fsmpy/OneUserScenarioFSM.py | 1 |
# pma.py OneUserScenario WebModel
# 7 states, 16 transitions, 4 accepting states, 0 unsafe states, 0 finished and 0 deadend states
# actions here are just labels, but must be symbols with __name__ attribute
def ReadInt(): pass
def Logout(): pass
def Initialize(): pass
def Login(): pass
def UpdateInt(): pass
# state... |
joachimmetz/dfvfs | refs/heads/main | tests/vfs/ext_file_entry.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the file entry implementation using pyfsext."""
import unittest
from dfvfs.lib import definitions
from dfvfs.path import factory as path_spec_factory
from dfvfs.resolver import context
from dfvfs.vfs import ext_file_entry
from dfvfs.vfs import ext_file_system... |
andersonresende/django | refs/heads/master | django/contrib/gis/tests/test_measure.py | 25 | """
Distance and Area objects to allow for sensible and convenient calculation
and conversions. Here are some tests.
"""
import unittest
from django.contrib.gis.measure import Distance, Area, D, A
class DistanceTest(unittest.TestCase):
"Testing the Distance object"
def testInit(self):
"Testing init... |
ahb0327/intellij-community | refs/heads/master | python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/moveToInit_after.py | 80 | __author__ = 'ktisha'
class A:
def __init__(self):
self.b = 1
self._a = 1
def foo(self):
c = 1 |
liuyiVector/androguard | refs/heads/master | androguard/core/analysis/auto.py | 38 | # This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# 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... |
benpatterson/edx-platform | refs/heads/master | lms/djangoapps/certificates/tests/test_cert_management.py | 32 | """Tests for the resubmit_error_certificates management command. """
import ddt
from contextlib import contextmanager
from django.core.management.base import CommandError
from nose.plugins.attrib import attr
from django.test.utils import override_settings
from mock import patch
from opaque_keys.edx.locator import Cour... |
diefenbach/lfc-bench | refs/heads/master | lfc_bench/management/__init__.py | 12133432 | |
devunt/hydrocarbon | refs/heads/master | board/migrations/__init__.py | 12133432 | |
liavkoren/djangoDev | refs/heads/master | django/conf/locale/cy/__init__.py | 12133432 | |
frankvdp/django | refs/heads/master | django/db/utils.py | 15 | import pkgutil
from importlib import import_module
from pathlib import Path
from threading import local
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.functional import cached_property
from django.utils.module_loading import import_string
DEFAULT_DB_ALIAS = ... |
breznak/nupic | refs/heads/master | src/nupic/swarming/exp_generator/ExpGenerator.py | 8 | #! /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... |
zooba/PTVS | refs/heads/master | Python/Tests/TestData/VirtualEnv/env/Lib/encodings/base64_codec.py | 528 | """ Python 'base64_codec' Codec - base64 content transfer encoding
Unlike most of the other codecs which target Unicode, this codec
will return Python string objects for both encode and decode.
Written by Marc-Andre Lemburg (mal@lemburg.com).
"""
import codecs, base64
### Codec APIs
def base64_encode(i... |
apyrgio/synnefo | refs/heads/release-0.16 | snf-astakos-app/astakos/im/management/commands/service-show.py | 10 | # Copyright (C) 2010-2014 GRNET S.A.
#
# 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 i... |
Galexrt/zulip | refs/heads/master | zerver/management/commands/logout_all_users.py | 2 |
from typing import Any
from argparse import ArgumentParser
from zerver.lib.management import ZulipBaseCommand
from zerver.lib.sessions import delete_all_user_sessions, \
delete_realm_user_sessions, delete_all_deactivated_user_sessions
class Command(ZulipBaseCommand):
help = "Log out all users."
def add_... |
Jorge-Rodriguez/ansible | refs/heads/devel | lib/ansible/modules/remote_management/ipmi/ipmi_boot.py | 47 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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',
... |
LabD/wagtail-personalisation | refs/heads/master | tests/site/pages/__init__.py | 12133432 | |
eranchetz/nupic | refs/heads/master | tests/unit/__init__.py | 12133432 | |
saurabh6790/omni-apps | refs/heads/master | selling/doctype/sales_order/templates/__init__.py | 12133432 | |
dnlcrl/PyScholar | refs/heads/master | src/article.py | 1 | #! /usr/bin/env python
# -*- coding: utf8 -*-
class ScholarArticle(object):
"""
A class representing articles listed on Google Scholar. The class
provides basic dictionary-like behavior.
"""
def __init__(self):
# The triplets for each keyword correspond to (1) the actual
# value... |
jpadilla/django-rest-framework | refs/heads/master | rest_framework/reverse.py | 3 | """
Provide urlresolver functions that return fully qualified URLs or view names
"""
from __future__ import unicode_literals
from django.urls import reverse as django_reverse
from django.urls import NoReverseMatch
from django.utils import six
from django.utils.functional import lazy
from rest_framework.settings impor... |
Geoion/TorCMS | refs/heads/master | torlite/handlers/bf_reply_handler.py | 2 | # -*- coding:utf-8 -*-
'''
Author: Bu Kun
E-mail: bukun@osgeo.cn
CopyRight: http://www.yunsuan.org
'''
import tornado.web
import tornado.escape
import json
from torlite.core import tools
from torlite.core.base_handler import BaseHandler
from torlite.model.mwiki import MWiki
from torlite.model.mcatalog import MCatalog
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.