repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
alvin319/CarnotKE
refs/heads/master
jyhton/out/production/CarnotKE/templates/gderived.py
19
# copyright 2004-2005 Samuele Pedroni import sys import os import re scriptdir = os.path.dirname(__file__) import directives import java_parser import java_templating from java_templating import JavaTemplate, jast_make, jast org_python_dir = os.path.join(os.path.dirname(os.path.abspath(scriptdir)), ...
jimgong92/allezViens
refs/heads/master
venv/lib/python2.7/site-packages/setuptools/tests/test_easy_install.py
16
"""Easy install Tests """ from __future__ import absolute_import import sys import os import shutil import tempfile import site import contextlib import tarfile import logging import itertools import pytest import mock from setuptools import sandbox from setuptools.compat import StringIO, BytesIO, urlparse from setu...
amdouglas/OpenPNM
refs/heads/master
OpenPNM/Physics/models/diffusive_conductance.py
1
r""" =============================================================================== Submodule -- diffusive_conductance =============================================================================== """ import scipy as _sp import OpenPNM.Utilities.misc as misc def bulk_diffusion(physics, phase, network, pore_molar...
tbeadle/django
refs/heads/master
tests/get_or_create/models.py
276
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Person(models.Model): first_name = models.CharField(max_length=100) last_name = models.CharField(max_length=100) birthday = models.DateFiel...
agendaTCC/AgendaTCC
refs/heads/master
tccweb/apps/monografias/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'EntregaMonografiaRevisada' db.create_table(u'monografias_...
rizumu/django
refs/heads/master
tests/migrations/test_optimizer.py
118
# -*- coding: utf-8 -*- from django.db import migrations, models from django.db.migrations.optimizer import MigrationOptimizer from django.test import SimpleTestCase from .models import CustomModelBase, EmptyManager class OptimizerTests(SimpleTestCase): """ Tests the migration autodetector. """ def...
tuxfux-hlp-notes/python-batches
refs/heads/master
archieves/batch-58/modules/sheets/lib/python2.7/site-packages/pip/baseparser.py
329
"""Base option parser setup""" import sys import optparse import os import textwrap from distutils.util import strtobool from pip.backwardcompat import ConfigParser, string_types from pip.locations import default_config_file from pip.util import get_terminal_size, get_prog from pip._vendor import pkg_resources clas...
agry/NGECore2
refs/heads/master
scripts/skillMods/incubation_time_reduction.py
1156
import sys def add(core, actor, skillMod, value): return def deduct(core, actor, skillMod, value): return
mezz64/home-assistant
refs/heads/dev
homeassistant/components/sonarr/sensor.py
5
"""Support for Sonarr sensors.""" from datetime import timedelta import logging from typing import Any, Callable, Dict, List, Optional from sonarr import Sonarr, SonarrConnectionError, SonarrError from homeassistant.config_entries import ConfigEntry from homeassistant.const import DATA_GIGABYTES from homeassistant.he...
syci/ingadhoc-odoo-addons
refs/heads/8.0
stock_move_defaults/__init__.py
2
# -*- coding: utf-8 -*- import stock
linglung/ytdl
refs/heads/master
youtube_dl/extractor/ctvnews.py
43
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import orderedSet class CTVNewsIE(InfoExtractor): _VALID_URL = r'https?://(?:.+?\.)?ctvnews\.ca/(?:video\?(?:clip|playlist|bin)Id=|.*?)(?P<id>[0-9.]+)' _TESTS = [{ 'url': 'http://www.ctvn...
blacklin/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_dbm.py
91
"""Test script for the dbm.open function based on testdumbdbm.py""" import os import unittest import glob import test.support # Skip tests if dbm module doesn't exist. dbm = test.support.import_module('dbm') try: from dbm import ndbm except ImportError: ndbm = None _fname = test.support.TESTFN # # Iterates...
mugizico/scikit-learn
refs/heads/master
examples/semi_supervised/plot_label_propagation_digits.py
268
""" =================================================== Label Propagation digits: Demonstrating performance =================================================== This example demonstrates the power of semisupervised learning by training a Label Spreading model to classify handwritten digits with sets of very few labels....
chugunovyar/factoryForBuild
refs/heads/master
env/lib/python2.7/site-packages/pybrain/rl/environments/twoplayergames/capturegameplayers/clientwrapper.py
2
__author__ = 'Tom Schaul, tom@idsia.ch' import socket from captureplayer import CapturePlayer from pybrain.rl.environments.twoplayergames import CaptureGame # TODO: allow partially forced random moves. class ClientCapturePlayer(CapturePlayer): """ A wrapper class for using external code to play the ca...
xombiemp/CouchPotatoServer
refs/heads/master
libs/qbittorrent/__init__.py
128
__version__ = '0.1'
byterom/android_external_chromium_org
refs/heads/12.1
third_party/cython/src/Cython/Compiler/Builtin.py
90
# # Builtin Definitions # from Symtab import BuiltinScope, StructOrUnionScope from Code import UtilityCode from TypeSlots import Signature import PyrexTypes import Options # C-level implementations of builtin types, functions and methods iter_next_utility_code = UtilityCode.load("IterNext", "ObjectHandling.c") ge...
vadimtk/chrome4sdp
refs/heads/master
content/test/gpu/gpu_tests/webgl_robustness.py
12
# 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. from telemetry import benchmark from telemetry.page import page from telemetry.page import page_test from telemetry.story import story_set as story_set_module...
nelson-liu/paraphrase-id-tensorflow
refs/heads/master
tests/util/test_rnn.py
1
import tensorflow as tf from numpy.testing import assert_allclose import numpy as np from duplicate_questions.util.rnn import last_relevant_output from ..common.test_case import DuplicateTestCase class TestUtilsRNN(DuplicateTestCase): def test_get_last_relevant_output(self): with tf.Session(): ...
chasertech/meteor
refs/heads/devel
examples/unfinished/python-ddp-client/ddp-client.py
169
#!/usr/bin/env python2.7 import sys import json import time import argparse import thread import threading import traceback from ws4py.client.threadedclient import WebSocketClient from cmd import Cmd DDP_VERSIONS = ["pre1"] def log(msg): """A shortcut to write to the standard error file descriptor""" sys.s...
hackerbot/DjangoDev
refs/heads/master
tests/gis_tests/test_data.py
379
""" This module has the mock object definitions used to hold reference geometry for the GEOS and GDAL tests. """ import json import os from django.utils import six from django.utils._os import upath from django.utils.functional import cached_property # Path where reference test data is located. TEST_DATA = os.path.jo...
moyogo/robofontmechanic
refs/heads/master
Mechanic.roboFontExt/lib/site-packages/requests/packages/chardet/sbcsgroupprober.py
2935
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
rohit21122012/DCASE2013
refs/heads/master
runs/2016/dnn2016largewithgraphs/src/files.py
38
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import wave import numpy import csv import cPickle as pickle import librosa import yaml def load_audio(filename, mono=True, fs=44100): """Load audio file into numpy array Supports 24-bit wav-format, and flac audio through librosa. Parameters -...
crobinso/virt-manager
refs/heads/master
virtManager/addhardware.py
2
# Copyright (C) 2006-2007, 2012-2015 Red Hat, Inc. # Copyright (C) 2006 Hugh O. Brock <hbrock@redhat.com> # # This work is licensed under the GNU GPLv2 or later. # See the COPYING file in the top-level directory. import traceback from gi.repository import Gtk from virtinst import (DeviceChannel, DeviceConsole, ...
aleksey-sinos/ardupilot
refs/heads/master
Tools/autotest/apm_unit_tests/dev/arducopter_Loiter.py
250
import arducopter def unit_test(mavproxy, mav): '''A scripted flight plan''' if ( arducopter.calibrate_level(mavproxy, mav) and arducopter.arm_motors(mavproxy, mav) and arducopter.takeoff(mavproxy,mav, alt_min=30, takeoff_throttle=1510) and arducopter.hover(mavproxy,mav, hov...
Collisio-Adolebitque/pfne-2017
refs/heads/master
pynet/appliedpy_ecourse/class10/inventory/general_functions.py
4
import re def parse_uptime(time_str): ''' Extract the uptime string from the given device. Supports: Cisco IOS Arista (very limited testing) Return the uptime in second; else null string ''' DEBUG = False years = weeks = days = hours = minutes = 0 uptime_sec = 0 ...
sclabs/sccms-nonrel
refs/heads/master
django/contrib/gis/gdal/feature.py
321
# The GDAL C library, OGR exception, and the Field object from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException, OGRIndexError from django.contrib.gis.gdal.field import Field from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType from django.contrib.gi...
adit-chandra/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/compare_and_bitpack_op_test.py
24
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
fafaman/django
refs/heads/master
tests/model_fields/test_imagefield.py
123
from __future__ import unicode_literals import os import shutil from unittest import skipIf from django.core.exceptions import ImproperlyConfigured from django.core.files import File from django.core.files.images import ImageFile from django.test import TestCase from django.test.testcases import SerializeMixin from d...
DylanSecreast/uoregon-cis-portfolio
refs/heads/master
uoregon-cis-471/project-3/ghostAgents.py
21
# ghostAgents.py # -------------- # Licensing Information: Please do not distribute or publish solutions to this # project. You are free to use and extend these projects for educational # purposes. The Pacman AI projects were developed at UC Berkeley, primarily by # John DeNero (denero@cs.berkeley.edu) and Dan Klein (k...
cjh1/tomviz
refs/heads/master
tomviz/python/HannWindow3D.py
3
def transform_scalars(dataset): from tomviz import utils import numpy as np # Get the current volume as a numpy array. array = utils.get_array(dataset) # Create 3D hanning window. for axis, axis_size in enumerate(array.shape): # Set up shape for numpy broadcasting. filter_shap...
odubno/microblog
refs/heads/master
venv/lib/python2.7/site-packages/sqlalchemy/orm/identity.py
21
# orm/identity.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import weakref from . import attributes from .. import util class IdentityMap(dict...
SecHackLabs/WebHackSHL
refs/heads/master
modules/tplmap/tests/test_php_php.py
2
import unittest import requests import os import sys import random sys.path.insert(1, os.path.join(sys.path[0], '..')) from plugins.languages.php import Php from core.channel import Channel from core.checks import detect_template_injection from basetest import BaseTest, EXTRA_DOWNLOAD class PhpTests(unittest.TestCas...
Lyrqu/papastation
refs/heads/master
tools/ColonCatcher/ColonCatcher.py
205
# Colon Locater and Reporter, by RemieRichards V1.0 - 25/10/15 # Locates the byond operator ":", which is largely frowned upon due to the fact it ignores any type safety. # This tool produces a .txt of "filenames line,line?,line totalcolons" (where line? represents a colon in a ternary operation) from all # .dm files...
Cinntax/home-assistant
refs/heads/dev
tests/components/deconz/test_light.py
3
"""deCONZ light platform tests.""" from copy import deepcopy from asynctest import patch from homeassistant.components import deconz from homeassistant.setup import async_setup_component import homeassistant.components.light as light from .test_gateway import ENTRY_CONFIG, DECONZ_WEB_REQUEST, setup_deconz_integrati...
gopal1cloud/neutron
refs/heads/master
neutron/plugins/ml2/drivers/cisco/apic/mechanism_apic.py
5
# Copyright (c) 2014 Cisco Systems 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 re...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/tangible/space/story_loot/shared_loot_tatooine_imp.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 = Tangible() result.template = "object/tangible/space/story_loot/shared_loot_tatooine_imp.iff" result.attribute_tem...
shadowgamefly/news-Digest
refs/heads/master
models/api/views.py
1
from django.shortcuts import render from django.http import HttpResponse, JsonResponse from api.models import * def index(request): return HttpResponse('success!\n') def _success(stat, data): return JsonResponse({ 'stat': stat, **data }) def _fail(stat, error_msg): return JsonResponse({ 'stat': stat, '...
klenks/jobsportal
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/findstatic.py
106
from __future__ import unicode_literals import os from django.contrib.staticfiles import finders from django.core.management.base import LabelCommand from django.utils.encoding import force_text class Command(LabelCommand): help = "Finds the absolute paths for the given static file(s)." label = 'staticfile'...
xen0l/ansible
refs/heads/devel
test/units/module_utils/common/collections.py
35
# -*- coding: utf-8 -*- # Copyright (c), Sviatoslav Sydorenko <ssydoren@redhat.com> 2018 # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) """Test low-level utility functions from ``module_utils.common.collections``.""" from __future__ import absolute_import, di...
Omegaphora/external_skia
refs/heads/lp5.1
platform_tools/android/bin/http_download.py
161
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Download a file from a URL to a file on disk. This module supports username and password with basic authentication. """ impor...
TonyThompson/fail2ban-patch
refs/heads/master
fail2ban/server/filtergamin.py
5
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
upndwn4par/android_kernel_htc_msm8974
refs/heads/lpcm3
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
JoaoCarabetta/bradata
refs/heads/master
bradata/utils.py
1
import zipfile import os import bradata # python has a built-in type checking tool in python 3.5 def _treat_inputs(value): """ Make sure that inputs are in the right type Ints and floats are converted to strings Args: value: str, int, float Returns: Ints and floats are converted to strin...
pabulumm/neighbors
refs/heads/master
lib/python3.4/site-packages/django/contrib/auth/migrations/0004_alter_user_username_opts.py
200
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0003_alter_user_email_max_length'), ] # No database changes; modifies validators and error_mes...
jtux270/translate
refs/heads/master
ovirt/3.6_source/packaging/setup/plugins/ovirt-engine-remove/websocket_proxy/__init__.py
11
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2013 Red Hat, 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 r...
egineering-llc/egat
refs/heads/master
egat/test_result.py
2
class TestResult(): class_ = None func = None environment = None configuration = None thread = None status = None selenium_webdriver = None resource_groups = None execution_groups = None exception = None traceback = None start_time = None end_time = None def __in...
tripzero/upm
refs/heads/master
examples/python/uln200xa.py
16
#!/usr/bin/python # Author: Jon Trulson <jtrulson@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 ...
naparuba/opsbro
refs/heads/master
opsbro/misc/internalyaml/ruamel/yaml/main.py
23
# coding: utf-8 from __future__ import absolute_import from ruamel.yaml.error import * # NOQA from ruamel.yaml.tokens import * # NOQA from ruamel.yaml.events import * # NOQA from ruamel.yaml.nodes import * ...
leesavide/pythonista-docs
refs/heads/master
Documentation/matplotlib/mpl_examples/mplot3d/lorenz_attractor.py
6
# Plot of the Lorenz Attractor based on Edward Lorenz's 1963 "Deterministic # Nonperiodic Flow" publication. # http://journals.ametsoc.org/doi/abs/10.1175/1520-0469%281963%29020%3C0130%3ADNF%3E2.0.CO%3B2 # # Note: Because this is a simple non-linear ODE, it would be more easily # done using SciPy's ode solver, bu...
gkadillak/rockstor-core
refs/heads/master
src/rockstor/storageadmin/migrations/0017_auto__add_field_pool_compression__add_field_pool_mnt_options.py
9
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Pool.compression' db.add_column(u'storageadmin_pool', 'co...
house4hack/openSHAC
refs/heads/master
web2py_shac/applications/enter/languages/zh-tw.py
11
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"', '%Y-%m-%d': '%Y-%m-%d', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S', '%s rows deleted': '已刪除 %s 筆', '%s rows updated': ...
glennq/scikit-learn
refs/heads/master
examples/semi_supervised/plot_label_propagation_versus_svm_iris.py
50
""" ===================================================================== Decision boundary of label propagation versus SVM on the Iris dataset ===================================================================== Comparison for decision boundary generated on iris dataset between Label Propagation and SVM. This demon...
nikhilprathapani/python-for-android
refs/heads/master
python-modules/twisted/twisted/spread/jelly.py
56
# -*- test-case-name: twisted.test.test_jelly -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ S-expression-based persistence of python objects. It does something very much like L{Pickle<pickle>}; however, pickle's main goal seems to be efficiency (both in space and time); jel...
bmanojlovic/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_snmp_user.py
8
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
plus3it/watchmaker
refs/heads/main
src/watchmaker/workers/base.py
1
# -*- coding: utf-8 -*- """Watchmaker base worker.""" from __future__ import (absolute_import, division, print_function, unicode_literals, with_statement) import abc import logging class WorkerBase(object): """Define the architecture of a Worker.""" def __init__(self, system_params, ...
Fr4ncky/git-repo
refs/heads/master
subcmds/upload.py
48
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
tempbottle/Impala
refs/heads/cdh5-trunk
tests/catalog_service/test_catalog_service_client.py
13
# Copyright (c) 2012 Cloudera, 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 by applicable law o...
infinity0n3/python-fabtotum
refs/heads/master
fabtotum/loaders/gerber/__init__.py
2
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2013-2014 Paulo Henrique Silva <ph.silva@gmail.com> # 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/lic...
onecloud/neutron
refs/heads/master
neutron/services/firewall/drivers/linux/iptables_fwaas.py
8
# Copyright 2013 Dell 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 by app...
hanlind/nova
refs/heads/master
nova/tests/functional/api_sample_tests/test_multinic.py
5
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # 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...
normanmaurer/autobahntestsuite-maven-plugin
refs/heads/master
src/main/resources/twisted/python/context.py
48
# -*- test-case-name: twisted.test.test_context -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Dynamic pseudo-scoping for Python. Call functions with context.call({key: value}, func); func and functions that it calls will be able to use 'context.get(key)' to retrieve 'value'. This is...
disqus/disqus-python
refs/heads/master
disqusapi/tests_compat.py
1
import unittest import sys if sys.version_info < (2, 7): # Stolen from unittest2 import re class _AssertRaisesBaseContext(object): def __init__(self, expected, test_case, callable_obj=None, expected_regex=None): self.expected = expected self.failureExc...
tdyas/pants
refs/heads/master
tests/python/pants_test/util/xml_test_base.py
2
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import textwrap import unittest from contextlib import contextmanager from pants.util.contextutil import temporary_file class XmlTestBase(unittest.TestCase): """Base class for tests...
goliate/sarakha63-persomov
refs/heads/master
libs/caper/group.py
81
# Copyright 2013 Dean Gardiner <gardiner91@gmail.com> # # 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 a...
Melissa-AI/Melissa-Web
refs/heads/master
GreyMatter/notes.py
1
import sqlite3 from datetime import datetime from SenseCells.tts import tts def show_all_notes(): conn = sqlite3.connect('memory.db') tts('Your notes are as follows:') cursor = conn.execute("SELECT notes FROM notes") for row in cursor: tts(row[0]) conn.commit() conn.close() def not...
openspending/ckanext-budgets
refs/heads/master
setup.py
1
from setuptools import setup, find_packages import sys, os version = '0.3.2' description = "CKAN extension for creating/distributing budget data packages" with open('README.rst') as readme: long_description = readme.read() setup( name='ckanext-budgets', version=version, description=description, l...
liorvh/Veil-Evasion
refs/heads/master
modules/payloads/python/meterpreter/rev_https_contained.py
12
""" Reads in metsrv.dll, patches it with appropriate options for a meterpreter reverse_https payload compresses/bas64 encodes it and then builds a python injection wrapper to inject the contained meterpreter dll into memory. Concept and module by @harmj0y """ import struct, string, random, sys, os from modules.com...
LMML-Team/AlexaSkills
refs/heads/master
RoastMe/roastme.py
1
from flask import Flask from flask_ask import Ask, statement, question import random as rand import requests import time import unidecode import json app = Flask(__name__) ask = Ask(app, '/') # goodbyeMsg = [] # goodbyeMsg[0] = "Later Nerds!" # goodbyeMsg[1] = "Okay, then. I see how it is." # goodbyeMsg[2] = "" @app...
odooindia/odoo
refs/heads/master
addons/stock_invoice_directly/__init__.py
374
# -*- 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...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/static/item/wp_mle_blacksun_razor.py
85615
import sys def setup(core, object): return
kikobr/projetoextintor
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/native.py
364
# -*- coding: utf-8 -*- """ pygments.styles.native ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "native" vim theme. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, ...
rahuldhote/scikit-learn
refs/heads/master
sklearn/cluster/hierarchical.py
128
"""Hierarchical Agglomerative Clustering These routines perform some hierarchical agglomerative clustering of some input data. Authors : Vincent Michel, Bertrand Thirion, Alexandre Gramfort, Gael Varoquaux License: BSD 3 clause """ from heapq import heapify, heappop, heappush, heappushpop import warnings im...
yawnosnorous/python-for-android
refs/heads/master
python-build/python-libs/gdata/build/lib/gdata/tlslite/utils/AES.py
407
"""Abstract class for AES.""" class AES: def __init__(self, key, mode, IV, implementation): if len(key) not in (16, 24, 32): raise AssertionError() if mode != 2: raise AssertionError() if len(IV) != 16: raise AssertionError() self.isBlockCipher = ...
elijah513/django
refs/heads/master
tests/serializers_regress/tests.py
144
""" A test spanning all the capabilities of all the serializers. This class defines sample data and a dynamically generated test case that is capable of testing the capabilities of the serializers. This includes all valid data values, plus forward, backwards and self references. """ from __future__ import unicode_lite...
zasdfgbnm/tensorflow
refs/heads/master
tensorflow/contrib/py2tf/pyct/qual_names_test.py
1
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Team02-TeamGuinness/BIOE421_RoboHand
refs/heads/master
ablation-GUI/CONFIG/2014-October-20/07-13-30 PM 5D-HexOpt2i-CONFIG.py
1
#File fname = '5D-HexOpt2i.gcode' f=open(fname,'w') #Laser Parameters laserPower = 10 #% max power dwellTime = 2 #ms x_start = 389 y_start = 329 z_start = 110.4 #mm above home pauseTime = 500 #ms; time paused after movement before ablation feedRate = 500 #movement speed # Rect...
GheRivero/ansible
refs/heads/devel
lib/ansible/modules/system/getent.py
104
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, Brian Coca <brian.coca+dev@gmail.com> # 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_versi...
odoousers2014/odoo
refs/heads/master
addons/delivery/stock.py
2
# -*- 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...
wegtam/weather-client
refs/heads/master
src/weather.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from os import path, access, R_OK, W_OK import urllib3 import configparser, sqlite3 from datetime import date, datetime from create_cfg import local_db, cfg_filename, date_table, PATH from create_cfg import configfile_exists, write_bricklets_into_configfile # impor...
NullSoldier/django
refs/heads/master
tests/auth_tests/test_templates.py
328
from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.contrib.auth.views import ( password_change, password_change_done, password_reset, password_reset_complete, password_reset_confirm, password_res...
Ultimaker/Cura
refs/heads/master
cura/Machines/ContainerTree.py
1
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from UM.Job import Job # For our background task of loading MachineNodes lazily. from UM.JobQueue import JobQueue # For our background task of loading MachineNodes lazily. from UM.Logger import Logger from UM.Settings.Con...
nburn42/tensorflow
refs/heads/master
tensorflow/python/data/util/random_seed.py
16
# Copyright 2018 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...
m-kuhn/QGIS
refs/heads/master
python/plugins/db_manager/__init__.py
95
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
chaosmaker/pyload
refs/heads/stable
module/plugins/hoster/HundredEightyUploadCom.py
3
# -*- coding: utf-8 -*- ############################################################################ # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU Affero General Public License as # # published by the Free Software Foundation, either version 3 of...
kntem/webdeposit
refs/heads/webdeposit-final
modules/webcomment/lib/webcomment_templates.py
5
# -*- coding: utf-8 -*- ## Comments and reviews for records. ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 ...
catapult-project/catapult-csm
refs/heads/master
third_party/py_vulcanize/third_party/rjsmin/_setup/py2/ext.py
43
# -*- coding: ascii -*- # # Copyright 2007, 2008, 2009, 2010, 2011 # Andr\xe9 Malo or his licensors, as applicable # # 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.or...
blankme/flask
refs/heads/master
tests/test_instance_config.py
157
# -*- coding: utf-8 -*- """ tests.test_instance ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by the Flask Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import os import sys import pytest import flask from flask._compat import PY2 def test_explicit_instance_paths(mo...
jokem59/heroprotocol
refs/heads/master
protocol45949.py
25
# Copyright (c) 2015 Blizzard Entertainment # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publi...
clumsy/intellij-community
refs/heads/master
python/helpers/epydoc/docwriter/html_css.py
90
# # epydoc.css: default epydoc CSS stylesheets # Edward Loper # # Created [01/30/01 05:18 PM] # $Id: html_css.py 1634 2007-09-24 15:58:38Z dvarrazzo $ # """ Predefined CSS stylesheets for the HTML outputter (L{epydoc.docwriter.html}). @type STYLESHEETS: C{dictionary} from C{string} to C{(string, string)} @var STYLESH...
sightmachine/SimpleCV
refs/heads/master
SimpleCV/examples/manipulation/GreenScreen.py
12
''' This program basically functions like a greenscreen that typically a weather or news reporter would use. It allows you to super impose anything standing in front of a "green screen" in front of another image this should even work with a camera is the user is standing in front of a green background ''' print __doc_...
papower1/nlpnet-for-korean
refs/heads/master
nlpnet/parse/__init__.py
1
from .parse_reader import DependencyReader
rooshilp/CMPUT410W15-project
refs/heads/master
testenv/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/site.py
108
def __boot(): import sys, imp, os, os.path PYTHONPATH = os.environ.get('PYTHONPATH') if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH): PYTHONPATH = [] else: PYTHONPATH = PYTHONPATH.split(os.pathsep) pic = getattr(sys,'path_importer_cache',{}) stdpath = sys....
xujb/odoo
refs/heads/8.0
addons/website/models/update.py
362
# -*- coding: utf-8 -*- from openerp.models import AbstractModel class publisher_warranty_contract(AbstractModel): _inherit = "publisher_warranty.contract" def _get_message(self, cr, uid): msg = super(publisher_warranty_contract, self)._get_message(cr, uid) msg['website'] = True return...
qtekfun/htcDesire820Kernel
refs/heads/master
external/chromium_org/tools/checkdeps/checkdeps_test.py
64
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Tests for checkdeps. """ import os import unittest import checkdeps import results class CheckDepsTest(unittest.TestCase): ...
jagguli/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/conf/locale/hr/formats.py
232
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y.' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j. E Y. H:i' YEAR_MONTH...
carlgao/lenga
refs/heads/master
images/lenny64-peon/usr/share/python-support/python-pygments/pygments/styles/native.py
1
# -*- coding: utf-8 -*- """ pygments.styles.native ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "native" vim theme. :copyright: 2006-2007 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from pygments.style import Style from pygments.token import Keyword, Name, Comment, String...
apache/incubator-mxnet
refs/heads/master
tests/python/gpu/test_rtc.py
61
# 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...
arjunbm13/youtube-dl
refs/heads/master
youtube_dl/extractor/godtube.py
177
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_duration, parse_iso8601, ) class GodTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?godtube\.com/watch/\?v=(?P<id>[\da-zA-Z]+)' _TESTS = [ { 'url': 'https://ww...
letouriste001/SmartForest_2.0
refs/heads/master
python3.4Smartforest/lib/python3.4/site-packages/django/http/cookie.py
1
from __future__ import unicode_literals import sys from django.utils import six from django.utils.encoding import force_str from django.utils.six.moves import http_cookies # Some versions of Python 2.7 and later won't need this encoding bug fix: _cookie_encodes_correctly = http_cookies.SimpleCookie().value_encode(';...
asimshankar/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/kernel_tests/bijectors/conditional_bijector_test.py
39
# 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...