repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
slarosa/QGIS | refs/heads/master | python/plugins/sextante/parameters/Parameter.py | 4 | # -*- coding: utf-8 -*-
"""
***************************************************************************
Parameter.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*****************************... |
leo-the-manic/django-autocomplete-form | refs/heads/master | autocomplete_form/views.py | 6027 | # Create your views here.
|
puzan/ansible | refs/heads/devel | test/units/modules/cloud/amazon/test_kinesis_stream.py | 91 | import pytest
import unittest
boto3 = pytest.importorskip("boto3")
botocore = pytest.importorskip("botocore")
import ansible.modules.cloud.amazon.kinesis_stream as kinesis_stream
aws_region = 'us-west-2'
class AnsibleKinesisStreamFunctions(unittest.TestCase):
def test_convert_to_lower(self):
example =... |
chienlieu2017/it_management | refs/heads/master | odoo/odoo/cli/scaffold.py | 21 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import os
import re
import sys
import jinja2
from . import Command
class Scaffold(Command):
""" Generates an Odoo module skeleton. """
def run(self, cmdargs):
# TODO: bash completion file
parser = argparse.ArgumentParser(
... |
dylan-reeves/home_backup | refs/heads/master | backupclient-env/Lib/keyword.py | 162 | #! /usr/bin/env python3
"""Keywords (from "graminit.c")
This file is automatically generated; please don't muck it up!
To update the symbols in this file, 'cd' to the top directory of
the python source tree after building the interpreter and run:
./python Lib/keyword.py
"""
__all__ = ["iskeyword", "kwlist"]
k... |
jmcjacob/EmotionalExpressionClassifier | refs/heads/master | dataset.py | 1 | import os
import cv2
import csv
import dlib
import main
import time
import front as frontalization
import random
import shutil
import numpy as np
import skvideo.io
#import frontalization
#from skimage import feature
def build_dataset(args):
start_time = time.clock()
if args.dataset == 'CK+':
build_structure(args,... |
Jionglun/-w16b_test | refs/heads/master | static/Brython3.1.3-20150514-095342/Lib/xml/sax/_exceptions.py | 625 | """Different kinds of SAX Exceptions"""
#in brython the 4 lines below causes an $globals['Exception'] error
#import sys
#if sys.platform[:4] == "java":
# from java.lang import Exception
#del sys
# ===== SAXEXCEPTION =====
class SAXException(Exception):
"""Encapsulate an XML error or warning. This class can con... |
indictranstech/Das_Erpnext | refs/heads/develop | erpnext/controllers/website_list_for_contact.py | 32 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import json
import frappe
from frappe import _
from frappe.utils import flt
from frappe.utils.user import is_website_user
def get_list_context(context=... |
tchellomello/home-assistant | refs/heads/dev | homeassistant/components/incomfort/sensor.py | 16 | """Support for an Intergas heater via an InComfort/InTouch Lan2RF gateway."""
from typing import Any, Dict, Optional
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from homeassistant.const import (
DEVICE_CLASS_PRESSURE,
DEVICE_CLASS_TEMPERATURE,
PRESSURE_BAR,
TEMP_CELSIUS,
)
from ... |
anurag-ks/eden | refs/heads/master | modules/s3/sync_adapter/wrike.py | 8 | # -*- coding: utf-8 -*-
""" S3 Synchronization: Peer Repository Adapter
@copyright: 2014 (c) Sahana Software Foundation
@license: MIT
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 S... |
jwren/intellij-community | refs/heads/master | python/testData/codeInsight/smartEnter/multilineDictLiteralValueOnOtherLine.py | 10 | d = {
'key': <caret>
42
} |
mihaic/brainiak | refs/heads/jenkins | brainiak/funcalign/__init__.py | 7 | # Copyright 2016 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 agreed to... |
evilsocket/opensnitch | refs/heads/master | ui/opensnitch/dialogs/ruleseditor.py | 1 |
from PyQt5 import QtCore, QtGui, uic, QtWidgets
from PyQt5.QtCore import QCoreApplication as QC
from slugify import slugify
from datetime import datetime
import re
import json
import sys
import os
from opensnitch import ui_pb2
import time
import ipaddress
from opensnitch.config import Config
from opensnitch.nodes imp... |
kvar/ansible | refs/heads/seas_master_2.9.5 | lib/ansible/modules/storage/netapp/na_ontap_net_port.py | 38 | #!/usr/bin/python
# (c) 2018-2019, NetApp, Inc
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],... |
alanchavez88/theHarvester | refs/heads/master | discovery/shodan/__init__.py | 48 | from api import WebAPI
__version__ = "0.5.0"
__all__ = ['WebAPI']
|
VielSoft/odoo | refs/heads/8.0 | addons/crm_project_issue/project_issue.py | 380 |
from openerp.osv import osv, fields
class crm_lead_to_project_issue_wizard(osv.TransientModel):
""" wizard to convert a Lead into a Project Issue and move the Mail Thread """
_name = "crm.lead2projectissue.wizard"
_inherit = 'crm.partner.binding'
_columns = {
"lead_id": fields.many2one("crm.... |
vivz/meow | refs/heads/master | meow/fabfile.py | 1 | from fabric.api import *
def rs(port=8000):
local("python manage.py runserver 0.0.0.0:%s" % port, capture=False)
|
ehouarn-perret/EhouarnPerret.Python.HackerRank | refs/heads/master | 6 - Python/Sets/8 - Set Symmetric Difference.py | 1 | n = int(input())
english = set(map(int, input().split()))
b = int(input())
french = set(map(int, input().split()))
print(len(english.symmetric_difference(french)))
|
vaibhav92/linux | refs/heads/master | scripts/checkkconfigsymbols.py | 88 | #!/usr/bin/env python2
"""Find Kconfig symbols that are referenced but not defined."""
# (c) 2014-2015 Valentin Rothberg <valentinrothberg@gmail.com>
# (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de>
#
# Licensed under the terms of the GNU GPL License version 2
import difflib
import os
import re
import signal
i... |
kuznetsovin/sql-tree-perfomance | refs/heads/master | tree_app/views.py | 6445 | from django.shortcuts import render
# Create your views here.
|
svn2github/audacity | refs/heads/master | lib-src/lv2/sord/waflib/Tools/c_osx.py | 329 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import os,shutil,sys,platform
from waflib import TaskGen,Task,Build,Options,Utils,Errors
from waflib.TaskGen import taskgen_method,feature,after_method,before_method
app_info=... |
jmcorgan/gnuradio | refs/heads/master | gr-fec/python/fec/extended_tagged_encoder.py | 24 | #!/usr/bin/env python
#
# Copyright 2014 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)
# ... |
ecosoft-odoo/odoo | refs/heads/8.0 | openerp/addons/base/module/__init__.py | 462 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
srvg/ansible | refs/heads/devel | lib/ansible/config/manager.py | 5 | # Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import atexit
import io
import os
import os.path
import sys
import stat
import tempfile
import tra... |
ayys/alms | refs/heads/master | restructuredText/admin.py | 47 | # -*- coding: utf-8 -*-
from django.contrib import admin
# Register your models here.
|
Code4SA/redirects | refs/heads/master | code4sa/settings.py | 1 | """
Django settings for code4sa project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
im... |
seemoo-lab/nexmon | refs/heads/master | utilities/wireshark/tools/html2text.py | 31 | #!/usr/bin/env python
#
# html2text.py - converts HTML to text
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs
#
# 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... |
macchina-io/macchina.io | refs/heads/develop | platform/JS/V8/v8/tools/gcmole/download_gcmole_tools.py | 21 | #!/usr/bin/env python
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import re
import subprocess
GCMOLE_PATH = os.path.dirname(os.path.abspath(__file__))
SHA1_PATH = os.path.join(GCMOLE_PATH,... |
quixey/python-aliyun | refs/heads/develop | tests/__init__.py | 10 | # -*- coding:utf-8 -*-
# Copyright 2014, Quixey Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
itucsdb1739/itucsdb1739 | refs/heads/master | itupass/models/__init__.py | 1 | from .common import Database, Paginator
from .department import Department
from .user import User
from .event import Event, EventCategory
from .lecture import Lecture, LectureSchedule, UserLecture
__all__ = [
'Database',
'Department',
'User',
'Lecture',
'LectureSchedule',
'UserLecture',
'Ev... |
Teamxrtc/webrtc-streaming-node | refs/heads/master | third_party/depot_tools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/boto/tests/integration/sns/test_sns_sqs_subscription.py | 114 | # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without res... |
TomHeatwole/osf.io | refs/heads/develop | admin_tests/common_auth/test_views.py | 16 | from nose import tools as nt
import mock
from django.test import RequestFactory
from django.http import Http404
from tests.base import AdminTestCase
from tests.factories import AuthUserFactory
from admin_tests.utilities import setup_form_view
from admin.common_auth.models import MyUser
from admin.common_auth.views i... |
40223231/2015-cdb-g4-final-test-by-6-22 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/copyreg.py | 749 | """Helper to provide extensibility for pickle.
This is only useful to add pickle support for extension types defined in
C, not for instances of user-defined classes.
"""
__all__ = ["pickle", "constructor",
"add_extension", "remove_extension", "clear_extension_cache"]
dispatch_table = {}
def pickle(ob_typ... |
missionpinball/mpf | refs/heads/dev | mpf/platforms/interfaces/i2c_platform_interface.py | 1 | """Support for i2c devices on a bus."""
import abc
from typing import Any
class I2cPlatformInterface(metaclass=abc.ABCMeta):
"""Interface for a i2c device on a bus in hardware platforms."""
__slots__ = ["number"]
def __init__(self, number: Any) -> None:
"""Remember the number."""
self.n... |
cmclaughlin/cabot | refs/heads/master | cabot/cabotapp/migrations/0001_initial.py | 16 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Service'
db.create_table('cabotapp_service', (
('id', self.gf('django.db.models.... |
sovaa/backdoorme | refs/heads/master | rpyc/version.py | 14 | version = (3, 3, 0)
version_string = "3.3.0"
release_date = "2014.06.27"
|
andfoy/margffoy-tuay-server | refs/heads/master | env/lib/python2.7/site-packages/redis/sentinel.py | 21 | import os
import random
import weakref
from redis.client import StrictRedis
from redis.connection import ConnectionPool, Connection
from redis.exceptions import ConnectionError, ResponseError, ReadOnlyError
from redis._compat import iteritems, nativestr, xrange
class MasterNotFoundError(ConnectionError):
pass
... |
coufon/neon-distributed | refs/heads/master | examples/dist/ps.py | 1 | #!/usr/bin/env python
import capnp
from cap.cap_helper import *
#from model_mnist import ModelMnist
from cifar10_allcnn import ModelCifar10AllCNN
import math
import threading
import os
import db
os.system('service influxdb start')
class ReduceGrads:
def __init__(self, total_worker):
self.grad_array = [... |
pywirrarika/smtwixes | refs/heads/master | comp.py | 1 |
def compare(hypfile, reffile):
hyp = open(hypfile).read().split("\n")
ref = open(reffile).read().split("\n")
matched = 0
i = 0
for n in range(len(hyp)):
i = i + 1
if hyp[n] == ref[n]:
matched = matched + 1
else:
pass
#print(hyp[n], "!=",... |
ax003d/openerp | refs/heads/master | openerp/addons/l10n_be_invoice_bba/__init__.py | 438 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it u... |
kawamon/hue | refs/heads/master | desktop/core/ext-py/Django-1.11.29/django/contrib/postgres/apps.py | 36 | from django.apps import AppConfig
from django.db import connections
from django.db.backends.signals import connection_created
from django.db.models import CharField, TextField
from django.utils.translation import ugettext_lazy as _
from .lookups import SearchLookup, TrigramSimilar, Unaccent
from .signals import regist... |
adrianliaw/PyCuber | refs/heads/version2 | pycuber/cube/settings.py | 1 | from colorama import Back
from .constants import U, L, F, R, B, D
display_colours = {
U: Back.YELLOW,
L: Back.RED,
F: Back.GREEN,
R: Back.MAGENTA,
B: Back.BLUE,
D: Back.WHITE,
}
|
eayunstack/rally | refs/heads/product | tests/unit/task/test_context.py | 5 | # Copyright 2014: Mirantis Inc.
# 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 b... |
dayatz/taiga-back | refs/heads/stable | taiga/export_import/serializers/cache.py | 1 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# This program is free software: you can r... |
CptLemming/libsaas | refs/heads/master | libsaas/services/spotify/service.py | 4 | from libsaas.services import base
from . import resources
class Spotify(base.Resource):
"""
"""
def __init__(self):
"""
Create a Spotify service.
"""
self.apiroot = 'http://ws.spotify.com/'
self.add_filter(self.use_json)
def use_json(self, request):
re... |
AdrianaDinca/bitcoin | refs/heads/master | qa/rpc-tests/test_framework/blockstore.py | 97 | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# BlockStore: a helper class that keeps a map of blocks and implements
# helper functions for ... |
cruzegoodin/TSC-ShippingDetails | refs/heads/master | flask/lib/python2.7/site-packages/coverage/html.py | 159 | """HTML reporting for Coverage."""
import os, re, shutil, sys
import coverage
from coverage.backward import pickle
from coverage.misc import CoverageException, Hasher
from coverage.phystokens import source_token_lines, source_encoding
from coverage.report import Reporter
from coverage.results import Numbers
from cove... |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/object/mobile/vendor/bith_male.py | 85615 | import sys
def setup(core, object):
return |
alanjw/GreenOpenERP-Win-X86 | refs/heads/7.0 | python/Lib/unittest/result.py | 58 | """Test result object"""
import os
import sys
import traceback
from StringIO import StringIO
from . import util
from functools import wraps
__unittest = True
def failfast(method):
@wraps(method)
def inner(self, *args, **kw):
if getattr(self, 'failfast', False):
self.sto... |
zofuthan/edx-platform | refs/heads/master | common/test/acceptance/pages/lms/__init__.py | 410 | import os
# Get the URL of the instance under test
BASE_URL = os.environ.get('test_url', 'http://localhost:8003')
# The URL used for user auth in testing
AUTH_BASE_URL = os.environ.get('test_url', 'http://localhost:8031')
|
khchine5/opal | refs/heads/v0.9.0 | opal/management/commands/delete_all_lookup_lists.py | 1 | """
Clear the local lookup lists
"""
from django.core.management.base import BaseCommand
from opal.models import Synonym
from opal.core.lookuplists import LookupList
from opal.utils import write
class Command(BaseCommand):
"""
Management command to delete all lookuplists and related
synonyms.
"""
... |
smuzaffar/root | refs/heads/master | tutorials/pyroot/hsimple.py | 7 | #*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
#*-*
#*-* This program creates :
#*-* - a one dimensional histogram
#*-* - a two dimensional histogram
#*-* - a profile histogram
#*-* - a memory-resident ntuple
#*-*
#*-* These objects are filled with some random numbers and saved... |
leedsalim/android-omap3-2.6.32 | refs/heads/master | scripts/rt-tester/rt-tester.py | 904 | #!/usr/bin/env python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
impor... |
mwort/modelmanager | refs/heads/master | tests/test_grass.py | 1 | from __future__ import print_function, absolute_import
import unittest
import sys
import os
import subprocess
import cProfile, pstats
import shutil
import pandas as pd
from test_project import create_project
from modelmanager.plugins.grass import GrassSession, GrassAttributeTable
TEST_SETTINGS = """
grass_db = "gras... |
josesanch/django-oscar | refs/heads/master | sites/us/apps/shipping/admin.py | 38 | from oscar.apps.shipping.admin import * # noqa
|
djs55/xen-api | refs/heads/master | ocaml/idl/binding_sanity_checks/migratetoprimary.py | 34 | #!/usr/bin/env python
import XenAPI
import sanitychecklib
#Generally, we wish to announce the name of this file.
#When running in the interpreter, however, this doesn't exist, and we
#probably shouldn't log out either
try:
this_test_name = __file__
logout_after_test = True
except NameError:
this_test_name... |
alilotfi/django | refs/heads/master | django/contrib/sessions/middleware.py | 256 | import time
from importlib import import_module
from django.conf import settings
from django.utils.cache import patch_vary_headers
from django.utils.http import cookie_date
class SessionMiddleware(object):
def __init__(self):
engine = import_module(settings.SESSION_ENGINE)
self.SessionStore = eng... |
ZxlAaron/mypros | refs/heads/master | examples/src/main/python/mllib/kmeans.py | 85 | #
# 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 us... |
gordon-elliott/glod | refs/heads/master | src/glod/scripts/__init__.py | 9 | __copyright__ = 'Copyright(c) Gordon Elliott 2017'
"""
"""
|
bigzz/autotest | refs/heads/master | client/shared/git.py | 2 | """
Code that helps to deal with content from git repositories
"""
import os
import logging
import error
from autotest.client import utils, os_dep
__all__ = ["GitRepoHelper", "get_repo"]
class GitRepoHelper(object):
'''
Helps to deal with git repos, mostly fetching content from a repo
'''
def __... |
kalahbrown/HueBigSQL | refs/heads/master | desktop/core/ext-py/Pygments-1.3.1/pygments/lexers/other.py | 54 | # -*- coding: utf-8 -*-
"""
pygments.lexers.other
~~~~~~~~~~~~~~~~~~~~~
Lexers for other languages.
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, \
... |
bestvibes/neo4j-social-network | refs/heads/master | mac_env/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/etree.py | 310 | from __future__ import absolute_import, division, unicode_literals
try:
from collections import OrderedDict
except ImportError:
try:
from ordereddict import OrderedDict
except ImportError:
OrderedDict = dict
import gettext
_ = gettext.gettext
import re
from pip._vendor.six import text_typ... |
image72/browserscope | refs/heads/master | base/admin.py | 9 | #!/usr/bin/python2.5
#
# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the 'License')
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
vjpai/grpc | refs/heads/master | src/python/grpcio_tests/tests_aio/unit/client_stream_unary_interceptor_test.py | 10 | # Copyright 2020 The gRPC Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... |
farseerri/git_code | refs/heads/master | tests/system/suite_CSUP/tst_CSUP02/test.py | 4 | #############################################################################
##
## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
## Contact: http://www.qt-project.org/legal
##
## This file is part of Qt Creator.
##
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this f... |
zdary/intellij-community | refs/heads/master | python/testData/optimizeImports/referencesInFStringLiterals.after.py | 64 | import sys
from datetime import datetime
print(f'{sys.path}')
def f():
print(f'{datetime.now()}') |
atados/atados-ovp | refs/heads/master | api/docs/apps.py | 8 | from django.apps import AppConfig
class DocsConfig(AppConfig):
name = 'docs'
|
ioanpocol/superdesk-core | refs/heads/master | apps/vidible/vidible.py | 6 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
from eve.ren... |
leighpauls/k2cro4 | refs/heads/master | third_party/WebKit/Tools/Scripts/webkitpy/common/net/__init__.py | 6014 | # Required for Python to search this directory for module files
|
TangXT/edx-platform | refs/heads/master | lms/startup.py | 10 | """
Module for code that should run during LMS startup
"""
from django.conf import settings
# Force settings to run so that the python path is modified
settings.INSTALLED_APPS # pylint: disable=W0104
from django_startup import autostartup
import edxmako
import logging
import analytics
log = logging.getLogger(__nam... |
PeterWangIntel/chromium-crosswalk | refs/heads/master | tools/perf/metrics/__init__.py | 64 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Metric(object):
"""Base class for all the metrics that are used by telemetry measurements.
The Metric class represents a way of measuring somethin... |
gr-vt/gr-framers | refs/heads/master | python/qa_gr_hdlc_framer_b.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2015 Free Software Foundation, Inc
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later versi... |
Wang-OuYang/WarChess | refs/heads/master | cocos2d/tools/performance-analyze/convertor.py | 63 | #!/usr/bin/python
#-*- coding: UTF-8 -*-
# ----------------------------------------------------------------------------
# Convert the performance test result from json files to excel.
#
# Author: Bill Zhang
#
# License: MIT
# ----------------------------------------------------------------------------
'''
Convert the p... |
dushu1203/chromium.src | refs/heads/nw12 | tools/perf/page_sets/tough_pinch_zoom_cases.py | 9 | # 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.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class ToughPinchZoomCasesPage(page_module.Page):
de... |
NAU-CFL/Python_Learning_Source | refs/heads/master | scripts/your_place_in_universe.py | 1 | # Your Place in the Universe Program
# This program will determine the approximate number atoms that a
# person consists of and the percent of the universe that they comprise.
# Initialization
num_atoms_universe = 10e80
weight_avg_person = 70 # 70 Kg == (154 lbs)
num_atoms_avg_person = 7e27
# Program greeting
print(... |
cancan101/tensorflow | refs/heads/master | tensorflow/contrib/factorization/python/ops/gmm.py | 18 | # 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... |
Bysmyyr/chromium-crosswalk | refs/heads/master | tools/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/function_conditional_import_existing.py | 728 | """ $fname """
|
cloudera/hue | refs/heads/master | desktop/core/ext-py/django_celery_results-1.0.4/t/proj/settings.py | 2 | """
Django settings for Test project.
Generated by 'django-admin startproject' using Django 1.9.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
from __future__ ... |
pombredanne/pygments | refs/heads/master | Pygments/pygments-lib/pygments/plugin.py | 365 | # -*- coding: utf-8 -*-
"""
pygments.plugin
~~~~~~~~~~~~~~~
Pygments setuptools plugin interface. The methods defined
here also work if setuptools isn't installed but they just
return nothing.
lexer plugins::
[pygments.lexers]
yourlexer = yourmodule:YourLexer
formatter pl... |
bauhaus93/webcrawler | refs/heads/master | ui.py | 1 | import wx
from crawler import Crawler
from taskdata import TaskData
from ui_grid import GridTasks, GridInfo
class CrawlerFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, title="webcrawler", size=(850, 600))
self.statusbar=self.CreateStatusBar()
self.gridInfo=GridInfo(self, Craw... |
AcademicsToday/academicstoday-django | refs/heads/master | academicstoday_project/registration/admin.py | 13848 | from django.contrib import admin
# Register your models here.
|
wyc/django | refs/heads/master | django/conf/locale/__init__.py | 294 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
"""
LANG_INFO is a dictionary structure to provide meta information about languages.
About name_local: capitalize it as if your language name was appearing
inside a sentence in your language.
The 'fallback' key can be used to specify a special fallback... |
khkaminska/bokeh | refs/heads/master | examples/glyphs/line_animate.py | 42 | from __future__ import print_function
import time
from numpy import pi, sin, cos, linspace
from bokeh.browserlib import view
from bokeh.document import Document
from bokeh.models.glyphs import Line
from bokeh.models import (
Plot, DataRange1d, LinearAxis, Range1d,
ColumnDataSource, PanTool, WheelZoomTool
)
f... |
katyhuff/moose | refs/heads/devel | docs/mooseslides.py | 1 | #!/usr/bin/env python
import os
import re
import shutil
import argparse
import markdown
import markdown_include
import MooseDocs
def command_line_options():
"""
Return the command line options for the slide generator.
"""
reveal_default = os.path.join(os.getenv('HOME'), 'projects', 'reveal.js')
pa... |
jpirko/rocker_bpf | refs/heads/master | scripts/analyze_suspend.py | 1540 | #!/usr/bin/python
#
# Tool for analyzing suspend/resume timing
# Copyright (c) 2013, Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This prog... |
zhzDeveloper/Python_Study | refs/heads/master | other/selenium_ci.py | 1 |
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from PIL import Image
save_image_path = '/Users/zhz/Desktop/my.png'
def login_ci():
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
driver = webdrive... |
fillycheezstake/MissionPlanner | refs/heads/master | Lib/optparse.py | 55 | """A powerful, extensible, and easy-to-use option parser.
By Greg Ward <gward@python.net>
Originally distributed as Optik.
For support, use the optik-users@lists.sourceforge.net mailing list
(http://lists.sourceforge.net/lists/listinfo/optik-users).
Simple usage example:
from optparse import OptionPa... |
rwl/muntjac | refs/heads/master | muntjac/data/util/list_set.py | 1 | # @MUNTJAC_COPYRIGHT@
# @MUNTJAC_LICENSE@
"""ListSet is an internal Muntjac class which implements a combination of
a list and a set."""
class ListSet(list):
"""ListSet is an internal Muntjac class which implements a combination of
a List and a Set. The main purpose of this class is to provide a list with
... |
danpalmer/open-data-quality-dashboard | refs/heads/master | tools/csvkit/tests/test_join.py | 5 | #!/usr/bin/env python
import unittest
from csvkit import join
class TestJoin(unittest.TestCase):
def setUp(self):
self.tab1 = [
['id', 'name', 'i_work_here'],
[u'1', u'Chicago Reader', u'first'],
[u'2', u'Chicago Sun-Times', u'only'],
[u'3', u'Chicago Tribu... |
ssarangi/numba | refs/heads/master | numba/hsa/hsadecl.py | 4 | from __future__ import print_function, division, absolute_import
from numba import types
from numba.typing.templates import (AttributeTemplate, ConcreteTemplate,
AbstractTemplate,
MacroTemplate, signature, Registry)
from numba import hsa
registry ... |
chdecultot/frappe | refs/heads/develop | frappe/patches/v4_0/enable_scheduler_in_system_settings.py | 73 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils.scheduler import disable_scheduler, enable_scheduler
from frappe.utils import cint
def execute():
frappe.reload_doc("core", "doctype", "system_se... |
paplorinc/intellij-community | refs/heads/master | python/testData/resolve/InitOrNewReturnsInitWhenNewIsFirst.py | 31 | class MyClass(object):
def __new__(cls):
return object.__new__(cls)
def __init__(self):
self.x = 42
|
agry/NGECore2 | refs/heads/master | scripts/object/tangible/wearables/ithorian/ith_belt_s03.py | 85615 | import sys
def setup(core, object):
return |
nirs/vdsm | refs/heads/master | lib/vdsm/storage/lsof.py | 2 | #
# Copyright 2020 Red Hat, 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in th... |
cecep-edu/edx-platform | refs/heads/eucalyptus.2 | openedx/core/lib/django_courseware_routers.py | 26 | """
Database Routers for use with the coursewarehistoryextended django app.
"""
class StudentModuleHistoryExtendedRouter(object):
"""
A Database Router that separates StudentModuleHistoryExtended into its own database.
"""
DATABASE_NAME = 'student_module_history'
def _is_csmh(self, model):
... |
mclaughlin6464/pylearn2 | refs/heads/master | pylearn2/expr/tests/test_basic.py | 39 | """
Tests for pylearn2.expr.basic
"""
import numpy as np
from pylearn2.expr.basic import log_sum_exp
from pylearn2.utils import sharedX
def test_log_sum_exp_1():
"""
Tests that the stable log sum exp matches the naive one for
values near 1.
"""
rng = np.random.RandomState([2015, 2, 9])
x = ... |
autowitch/pypov | refs/heads/master | scenes/geomorphs/lib/geomorphs/corner_5x5_006.py | 1 |
from pypov.pov import Texture, Pigment
from pypov.pov import Finish, Box, Cone, Object
from pypov.pov import Union, Difference
from lib.metadata import Metadata
from pypov.common import grey, white
from lib.base import five_by_five_corner
from lib.textures import wall_texture_1, cross_hatch_2
def corner_5x5_006_inf... |
dbertha/odoo | refs/heads/8.0 | addons/website_partner/models/res_partner.py | 59 | # -*- coding: utf-8 -*-
from openerp.osv import osv, fields
class WebsiteResPartner(osv.Model):
_name = 'res.partner'
_inherit = ['res.partner', 'website.seo.metadata']
def _get_ids(self, cr, uid, ids, flds, args, context=None):
return {i: i for i in ids}
_columns = {
'website_publi... |
UdK-VPT/Open_eQuarter | refs/heads/master | mole/view/__init__.py | 1 | from oeq_dialogs import ColorPicker_dialog, Modular_dialog, ModularInfo_dialog, MainProcess_dock, ProjectDoesNotExist_dialog, ProjectSettings_form, RequestWmsUrl_dialog |
WholeGrainGoats/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/html5lib/parse.py | 420 | #!/usr/bin/env python
"""usage: %prog [options] filename
Parse a document to a tree, with optional profiling
"""
import sys
import os
import traceback
from optparse import OptionParser
from html5lib import html5parser, sanitizer
from html5lib.tokenizer import HTMLTokenizer
from html5lib import treebuilders, serializ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.