repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
chiefspace/udemy-rest-api
refs/heads/master
udemy_rest_flask1/env/lib/python3.4/site-packages/flask/ctx.py
170
# -*- coding: utf-8 -*- """ flask.ctx ~~~~~~~~~ Implements the objects required to keep the context. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys from functools import update_wrapper from werkzeug.exceptions import HTTPException from .globa...
sriprasanna/django-1.3.1
refs/heads/master
django/contrib/gis/tests/geo3d/__init__.py
12133432
michath/ConMonkey
refs/heads/master
python/mozbuild/mozpack/chrome/__init__.py
12133432
py-geek/City-Air
refs/heads/master
venv/lib/python2.7/site-packages/allauth/socialaccount/providers/openid/migrations/__init__.py
12133432
sctigercat1/panda3d
refs/heads/master
direct/src/directnotify/LoggerGlobal.py
12
"""instantiate global Logger object""" import Logger defaultLogger = Logger.Logger()
apanju/odoo
refs/heads/8.0
addons/website_instantclick/__init__.py
12133432
Tejal011089/med2-app
refs/heads/master
selling/doctype/customer_discount/__init__.py
12133432
alforro/sgpa2015
refs/heads/master
autenticacion/__init__.py
12133432
rvmoura96/projeto-almoxarifado
refs/heads/master
myvenv/Lib/site-packages/django/conf/locale/ml/__init__.py
12133432
CalebBell/thermo
refs/heads/master
tests/test_property_package_eos.py
1
# -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2018, Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal...
Dineshs91/youtube-dl
refs/heads/master
youtube_dl/extractor/iprima.py
96
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from random import random from math import floor from .common import InfoExtractor from ..compat import ( compat_urllib_request, ) from ..utils import ( ExtractorError, remove_end, ) class IPrimaIE(InfoExtractor): _VALID_URL =...
jpopelka/docker-py
refs/heads/master
docker/ssladapter/__init__.py
87
from .ssladapter import SSLAdapter # flake8: noqa
chemelnucfin/tensorflow
refs/heads/master
tensorflow/contrib/kernel_methods/python/kernel_estimators.py
5
# 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...
naresh21/synergetics-edx-platform
refs/heads/oxa/master.fic
openedx/core/djangoapps/micro_masters/migrations/0006_auto_20170712_1019.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('micro_masters', '0005_programcertificatehtmlviewconfiguration_programcertificatesignatories_programgeneratedcertificate'), ] operati...
wheelcms/wheelcms_categories
refs/heads/master
setup.py
1
from setuptools import setup, find_packages import os version = '0.9' setup(name='wheelcms_categories', version=version, description="WheelCMS category implementation", long_description=open("README.txt").read(), classifiers=[ "Programming Language :: Python", ], keywords...
Crystalnix/house-of-life-chromium
refs/heads/master
third_party/tlslite/tlslite/integration/AsyncStateMachine.py
121
""" A state machine for using TLS Lite with asynchronous I/O. """ class AsyncStateMachine: """ This is an abstract class that's used to integrate TLS Lite with asyncore and Twisted. This class signals wantsReadsEvent() and wantsWriteEvent(). When the underlying socket has become readable or write...
jparker/therminator_server
refs/heads/master
therminator/models.py
1
from . import app, db, bcrypt from flask_login import UserMixin from functools import wraps from sqlalchemy.orm import validates import sqlalchemy.dialects.postgresql as psql def validates_presence(f): @wraps(f) def validator(self, key, value): if value is None: raise ValueError("{} can't b...
bearing/radwatch-analysis
refs/heads/master
NAA_Isotopes.py
1
import numpy as np class NAA_source(object): sources = [] def __init__(self, Symbol, A, lam, energies): self.Symbol = Symbol self.A = A self.lam = lam self.energies = energies NAA_source.sources.append(self) def __repr__(self): return '{0}_{1}'.format(self....
tshlabs/tunic
refs/heads/master
test/unit/test_api.py
1
# -*- coding: utf-8 -*- import tunic.api def test_public_exports(): exports = set([item for item in dir(tunic.api) if not item.startswith('_')]) declared = set(tunic.api.__all__) assert exports == declared, 'Exports and __all__ members should match'
Zhongqilong/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_importlib/test_locks.py
84
from . import util frozen_init, source_init = util.import_importlib('importlib') frozen_bootstrap = frozen_init._bootstrap source_bootstrap = source_init._bootstrap import sys import time import unittest import weakref from test import support try: import threading except ImportError: threading = None else: ...
rspavel/spack
refs/heads/develop
var/spack/repos/builtin/packages/miniqmc/package.py
3
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Miniqmc(CMakePackage): """A simplified real space QMC code for algorithm development, ...
sephii/django
refs/heads/master
django/contrib/gis/db/backends/postgis/base.py
5
from django.conf import settings from django.db.backends import NO_DB_ALIAS from django.db.backends.postgresql_psycopg2.base import ( DatabaseWrapper as Psycopg2DatabaseWrapper, DatabaseFeatures as Psycopg2DatabaseFeatures ) from django.contrib.gis.db.backends.base import BaseSpatialFeatures from django.contrib...
alsrgv/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/bias_op_test.py
6
# Copyright 2015 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...
jordan8037310/CouchPotatoServer
refs/heads/master
libs/xmpp/auth.py
196
## auth.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## ## 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, or (at your option) ## any later version. ##...
CamelBackNotation/CarnotKE
refs/heads/master
jyhton/Lib/test/bugs/pr144.py
31
from java.lang import * Class.isArray(Thread)
tkanemoto/kombu
refs/heads/master
kombu/utils/encoding.py
39
# -*- coding: utf-8 -*- """ kombu.utils.encoding ~~~~~~~~~~~~~~~~~~~~~ Utilities to encode text, and to safely emit text from running applications without crashing with the infamous :exc:`UnicodeDecodeError` exception. """ from __future__ import absolute_import import sys import traceback from kombu.five import tex...
jtux270/translate
refs/heads/master
FreeIPA/freeipa-3.0.0/tests/util.py
2
# Authors: # Jason Gerard DeRose <jderose@redhat.com> # # Copyright (C) 2008 Red Hat # see file 'COPYING' for use and warranty information # # 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, ei...
saideepchandg/oracle-r12-accounting
refs/heads/master
lib/django/conf/locale/lv/formats.py
115
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'Y. \g\a\d\a j. F' TIME_FORMAT = ...
seattle-biomed/ontap-api-wrapper
refs/heads/master
examples/backup-vmware-netapp/backup-vmware-netapp.py
2
#!/opt/virtualenv/admintools/bin/python import argparse import functools import pysphere import re import socket import sys import time import yaml # Load NetApp API wrapper: sys.path.append('/opt/netapp-manageability-sdk-4.1/lib/python/NetApp') import Ontap def clean_vm_snaps(servers, vms_by_ds, datastore, skip_vm...
ericdill/bokeh
refs/heads/master
examples/charts/server/line_animate.py
37
# The plot server must be running # Go to http://localhost:5006/bokeh to view this plot from collections import OrderedDict import time import numpy as np from bokeh.charts import Line, curdoc, cursession, output_server, show from bokeh.models import GlyphRenderer N = 80 x = np.linspace(0, 4*np.pi, N) xyvalues = O...
silenceli/nova
refs/heads/master
nova/api/openstack/compute/views/__init__.py
12133432
teemulehtinen/a-plus
refs/heads/master
external_services/migrations/__init__.py
12133432
Tejal011089/huntercamp_erpnext
refs/heads/develop
erpnext/buying/report/supplier_addresses_and_contacts/__init__.py
12133432
leapp-to/prototype
refs/heads/master
tests/data/workflow-tests/actors/firstactor/actor.py
1
import os from leapp.actors import Actor from leapp.dialogs import Dialog from leapp.dialogs.components import BooleanComponent from leapp.tags import FirstPhaseTag, UnitTestWorkflowTag class FirstActor(Actor): name = 'first_actor' description = 'No description has been provided for the first_actor actor.' ...
FlintHill/SUAS-Competition
refs/heads/master
env/lib/python2.7/site-packages/pip/__main__.py
38
from __future__ import absolute_import import os import sys # If we are running from a wheel, add the wheel to sys.path # This allows the usage python pip-*.whl/pip install pip-*.whl if __package__ == '': # __file__ is pip-*.whl/pip/__main__.py # first dirname call strips of '/__main__.py', second strips off ...
forblackking/PyBiu
refs/heads/master
run.py
1
#!/usr/bin/env python # -*- coding:utf-8 -*- # @author:Hieda no Chiaki <i@wind.moe> import getopt import os import sys import logging from src.init import init, usage from src.md5 import md5 from src.post import post_biu, confirm from src.dir import que try: import configparser import queue except ImportError...
Innovahn/odoo.old
refs/heads/master
addons/web_tests_demo/__init__.py
423
from openerp.osv import orm, fields class TestObject(orm.TransientModel): _name = 'web_tests_demo.model' _columns = { 'name': fields.char("Name", required=True), 'thing': fields.char("Thing"), 'other': fields.char("Other", required=True) } _defaults = { 'other': "bob" ...
auready/django
refs/heads/master
django/utils/baseconv.py
129
# Copyright (c) 2010 Guilherme Gondim. All rights reserved. # Copyright (c) 2009 Simon Willison. All rights reserved. # Copyright (c) 2002 Drew Perttula. All rights reserved. # # License: # Python Software Foundation License version 2 # # See the file "LICENSE" for terms & conditions for usage, and a DISCLAIMER OF # ...
sdale28/Habitica-App
refs/heads/master
node_modules/accessibility-developer-tools/lib/closure-library/closure/bin/build/depswriter.py
76
#!/usr/bin/env python # # Copyright 2009 The Closure Library 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 ...
fstagni/DIRAC
refs/heads/v7r0-fixes27
WorkloadManagementSystem/Client/WMSClient.py
6
""" DIRAC Workload Management System Client class encapsulates all the methods necessary to communicate with the Workload Management System """ import os import StringIO import time from DIRAC import S_OK, S_ERROR, gLogger from DIRAC.Core.DISET.RPCClient import RPCClient from DIRAC.Core.Utilities.ClassAd.ClassAd...
aasensio/pyiacsun
refs/heads/master
pyiacsun/sparse/proxes_rank1/prox_rank1_l1.py
2
__all__ = ["prox_rank1_l1"] from .prox_rank1_generic import prox_rank1_generic import numpy as np def prox_rank1_l1(*args, **kwargs): """ PROX_RANK1_L1 returns the scaled proximity operator for the l1 norm x = prox_rank1_l1( x0, D, u ) where x = argmin_{x} h(x) + 1/2||x-x0||^2_{V} and V^{-1} ...
feinheit/zipfelchappe
refs/heads/master
tests/cod/__init__.py
4
# coding: utf-8 from __future__ import absolute_import, unicode_literals
ashemedai/ansible
refs/heads/devel
lib/ansible/modules/files/ini_file.py
54
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Jan-Piet Mens <jpmens () gmail.com> # (c) 2015, Ales Nosek <anosek.nosek () gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
gioman/QGIS
refs/heads/master
src/plugins/grass/qgis_grass_test.py
7
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------- # # Copyright (C) 2012 Radim Blazek # EMAIL: radim.blazek (at) gmail.com # # ----------------------------------------------------------- # # licensed under the terms of GNU GPL 2 # # This program is free softwar...
RachitKansal/scikit-learn
refs/heads/master
sklearn/decomposition/tests/test_dict_learning.py
69
import numpy as np from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_raises...
knowsis/django
refs/heads/nonrel-1.6
django/template/smartif.py
239
""" Parser and utilities for the smart 'if' tag """ # Using a simple top down parser, as described here: # http://effbot.org/zone/simple-top-down-parsing.htm. # 'led' = left denotation # 'nud' = null denotation # 'bp' = binding power (left = lbp, right = rbp) class TokenBase(object): """ Base class for ope...
jmesteve/openerpseda
refs/heads/master
openerp/addons_extra/base_extend/__openerp__.py
2
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2013 jmesteve All Rights Reserved # https://github.com/jmesteve # <jmesteve@me.com> # # This program is...
robotarium/vizier
refs/heads/master
vizier/mqttinterface.py
1
import paho.mqtt.client as mqtt import queue import threading import string import random import enum import vizier.log as log # CountDownLatch for some MQTT client checking class _CountDownLatch(): """This class handles some synchronization behind starting the paho MQTT client Attributes: _cv (threa...
tillahoffmann/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/estimators/dynamic_rnn_estimator.py
46
# 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...
cul-it/Invenio
refs/heads/master
modules/bibharvest/lib/oai_repository_regression_tests.py
3
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## ...
hastexo/edx-platform
refs/heads/master
openedx/core/djangoapps/debug/__init__.py
12133432
spectrumone/online-shop-template
refs/heads/master
myshop/coupons/migrations/__init__.py
12133432
LethusTI/supportcenter
refs/heads/master
vendor/django/tests/regressiontests/null_fk_ordering/__init__.py
12133432
nirmeshk/oh-mainline
refs/heads/master
vendor/packages/Django/tests/modeltests/raw_query/__init__.py
12133432
abertschi/postcards
refs/heads/master
postcards/plugin_folder_yaml/postcards_folder_yaml.py
1
#!/usr/bin/env python # encoding: utf-8 from postcards.plugin_folder.postcards_folder import PostcardsFolder import sys import random import ntpath import os import yaml class PostcardsFolderYaml(PostcardsFolder): """ Send postcards with images from a yaml config """ def can_handle_command(self, co...
hbrunn/OpenUpgrade
refs/heads/master
addons/hr_timesheet_invoice/report/account_analytic_profit.py
96
# -*- 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...
mwilliamson/python-mammoth
refs/heads/master
tests/zips_tests.py
1
from nose.tools import istest, assert_equal from mammoth import zips @istest def split_path_splits_zip_paths_on_last_forward_slash(): assert_equal(("a", "b"), zips.split_path("a/b")) assert_equal(("a/b", "c"), zips.split_path("a/b/c")) assert_equal(("/a/b", "c"), zips.split_path("/a/b/c")) @istest def ...
krisys/django
refs/heads/master
django/contrib/admin/sites.py
3
from functools import update_wrapper from django.apps import apps from django.conf import settings from django.contrib.admin import ModelAdmin, actions from django.contrib.auth import REDIRECT_FIELD_NAME from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.db.models.base import ModelBa...
wlanslovenija/django-tastypie
refs/heads/master
tastypie/contrib/contenttypes/__init__.py
12133432
mmalyska/eve-wspace
refs/heads/develop
evewspace/API/management/__init__.py
12133432
0--key/lib
refs/heads/master
portfolio/2010_Guns/guns/__init__.py
12133432
yask123/django
refs/heads/master
tests/test_discovery_sample/__init__.py
12133432
manthey/girder
refs/heads/master
plugins/curation/plugin_tests/__init__.py
12133432
msebire/intellij-community
refs/heads/master
python/testData/pyi/inspections/hiddenPyiImports/m2.py
31
foo = 1 bar = 2 baz = 3
AnCh7/sweetshot
refs/heads/master
python3-src/graphenebase/types.py
1
from binascii import hexlify, unhexlify import time from calendar import timegm from datetime import datetime import struct from collections import OrderedDict import json from .objecttypes import object_type timeformat = '%Y-%m-%dT%H:%M:%S%Z' def varint(n): """ Varint encoding """ data = b'' while ...
matips/iosr-2015
refs/heads/master
sahara/tests/unit/service/validation/test_ng_template_validation_update.py
7
# Copyright (c) 2013 Mirantis 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 agreed to in writ...
Fiware/cloud.PaaS
refs/heads/master
test/acceptance/integration/environments/get_environment_details/__init__.py
86
# -*- coding: utf-8 -*- # Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE 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: # # h...
mpalop/nekane
refs/heads/master
foo.py
1
__author__ = 'manel' from DietaNekane import Plato, Sentada, Periodo p1 = Plato.Plato(u'primer plato', hc=10, calorias=20) p2 = Plato.Plato(u'segundo plato', hc=11, calorias=21) p3 = Plato.Plato(u'tercer plato', hc=13, calorias=23) d = Sentada.Desayuno(p1) m = Sentada.Merienda(p2) c = Sentada.Comida(primero=p1, segu...
rafinkarki/wifite
refs/heads/master
wifite.py
56
#!/usr/bin/python # -*- coding: utf-8 -*- """ wifite author: derv82 at gmail Licensed under the GNU General Public License Version 2 (GNU GPL v2), available at: http://www.gnu.org/licenses/gpl-2.0.txt (C) 2011 Derv Merkler ----------------- TODO: ignore root check when -cracked (afterward) (nee...
peerster/CouchPotatoServer
refs/heads/master
libs/suds/umx/attrlist.py
211
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
czhengsci/pymatgen
refs/heads/master
dev_scripts/chemenv/explicit_permutations.py
14
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ Development script of the ChemEnv utility to get the explicit permutations for coordination environments identified with the explicit permutations algorith...
GbalsaC/bitnamiP
refs/heads/master
venv/lib/python2.7/site-packages/numpy/testing/print_coercion_tables.py
23
#!/usr/bin/env python """Prints type-coercion tables for the built-in NumPy types""" import numpy as np # Generic object that can be added, but doesn't do anything else class GenericObject: def __init__(self, v): self.v = v def __add__(self, other): return self def __radd__(self, other):...
littlstar/chromium.src
refs/heads/nw
chrome/test/chromedriver/embed_extension_in_cpp.py
158
#!/usr/bin/env python # 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. """Embeds Chrome user data files in C++ code.""" import base64 import optparse import os import StringIO import sys import zipfile im...
IAMATinyCoder/SocialEDU
refs/heads/master
node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/tools/pretty_sln.py
806
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Prints the information in a sln file in a diffable way. It first outputs each projects in alphabetical order with their dependenci...
hclivess/Stallion
refs/heads/master
nuitka/Cryptodome/Hash/RIPEMD.py
7
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
cernops/nova
refs/heads/master
nova/tests/unit/cells/test_cells_messaging.py
2
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # Copyright 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/license...
ecaldwe1/zika
refs/heads/master
website/tests/__init__.py
17
# Copyright (C) 2016, University of Notre Dame # All rights reserved
saapooch/Carl-Chandra-Analysis
refs/heads/master
strategies/base.py
1
import random class Decision(object): def __init__(self, ticker=None, action=None, amount=None, error=None): self.ticker = ticker self.action = action self.amount = amount self.error = error def __repr__(self): return 'Decision(%s, %s, %s, %s)' % (self.ticker, self.act...
DavideCanton/Python3
refs/heads/master
prove_igraph/__init__.py
27
__author__ = 'davide'
PaoloMissier/IoT-tracking
refs/heads/master
VAUGHN/broker/mosquitto-1.4.10_CASS/test/lib/01-no-clean-session.py
10
#!/usr/bin/env python # Test whether a client produces a correct connect with clean session not set. # The client should connect to port 1888 with keepalive=60, clean session not # set, and client id 01-no-clean-session. import inspect import os import socket import sys # From http://stackoverflow.com/questions/279...
Microvellum/Fluid-Designer
refs/heads/master
win64-vc/2.78/Python/bin/2.78/scripts/addons/presets/operator/mesh.primitive_xyz_function_surface/klein.py
3
import bpy op = bpy.context.active_operator op.x_eq = '(3*(1+sin(v)) + 2*(1-cos(v)/2)*cos(u))*cos(v)' op.y_eq = '(4+2*(1-cos(v)/2)*cos(u))*sin(v)' op.z_eq = '-2*(1-cos(v)/2)*sin(u)' op.range_u_min = 0.0 op.range_u_max = 6.2831854820251465 op.range_u_step = 32 op.wrap_u = True op.range_v_min = 0.0 op.range_v_max = 6.28...
sanctuaryaddon/sanctuary
refs/heads/master
script.module.liveresolver/lib/liveresolver/resolvers/iguide.py
2
# -*- coding: utf-8 -*- import re,urlparse,json from liveresolver.modules import client,constants from liveresolver.modules.log_utils import log def resolve(url): #try: try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0] except: referer = url try: ...
brokenjacobs/ansible
refs/heads/devel
lib/ansible/modules/net_tools/basics/__init__.py
12133432
reinout/django
refs/heads/master
tests/migrations/test_migrations_squashed_complex/__init__.py
12133432
wf4ever/ro-manager
refs/heads/master
src/roweb/__init__.py
12133432
ismk/Python-Examples
refs/heads/master
learn python the hard way/ex34.py
12133432
sgzsh269/django
refs/heads/master
tests/template_backends/apps/good/__init__.py
12133432
thnee/ansible
refs/heads/devel
lib/ansible/module_utils/network/vyos/config/__init__.py
12133432
sbarakat/graph-partitioning
refs/heads/master
graph_partitioning/partitioners/__init__.py
12133432
Event38/MissionPlanner
refs/heads/master
Lib/unittest/main.py
53
"""Unittest main program""" import sys import os import types from . import loader, runner from .signals import installHandler __unittest = True FAILFAST = " -f, --failfast Stop on first failure\n" CATCHBREAK = " -c, --catch Catch control-C and display results\n" BUFFEROUTPUT = " -b, --...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/django/contrib/sitemaps/apps.py
590
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class SiteMapsConfig(AppConfig): name = 'django.contrib.sitemaps' verbose_name = _("Site Maps")
Elettronik/SickRage
refs/heads/master
lib/stevedore/sphinxext.py
34
# 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 writing, software # d...
nieyb/yuanhe
refs/heads/master
deb_tmp/wifi-pumpkin_20171031_all/usr/share/WiFi-Pumpkin/plugins/external/scripts/__init__.py
8
#from http://stackoverflow.com/questions/1057431/loading-all-modules-in-a-folder-in-python import os import glob __all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py")]
shssoichiro/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/_stream_hybi.py
628
# Copyright 2012, 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...
jbedorf/tensorflow
refs/heads/master
tensorflow/tools/docs/generate_lib.py
18
# Copyright 2015 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...
silvahaberl/Jezici-gramatike-automati-
refs/heads/master
proba.py
1
import random import string from random import randint Σ=set() Σ.add('0') Σ.add('1') print("lista(Σ)",list(Σ)) duljinaRiječi = len(list(Σ)) def random_string(length): return ''.join(random.choice(list(Σ)) for i in range(length)) print(random_string(randint(1,duljinaRiječi))) print("duljinaRiječi:", duljinaRiječ...
CyberReboot/vent-plugins
refs/heads/master
pcap_to_node_pcap/pcap_to_node_pcap.py
1
""" Plugin that takes pcap files and splits them by server and client ip addresses Created on 17 July 2017 @author: Blake Pagon """ # TODO: https://github.com/PyCQA/bandit/issues/333 for bandit false positive on subprocess. import argparse import datetime import ipaddress import json import os import re import shlex...
Big-B702/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/lib2to3/pgen2/conv.py
68
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Convert graminit.[ch] spit out by pgen to Python code. Pgen is the Python parser generator. It is useful to quickly create a parser from a grammar file in Python's grammar notation. But I don't wa...
smoitra87/gerbil
refs/heads/master
deepnet/load_mat_to_model.py
1
"""Write a model protocol buffer to mat file.""" from deepnet import util import numpy as np import sys import scipy.io import scipy.io as sio import gzip import os def Convert(args, dirpath, mat_file, dump_npy = False, out_file = 'rbm_mrf', model_file=None): """ Create the necesarry things""" matfile = sio....
jaredestroud/AutoMailer
refs/heads/master
AutoMailer.py
1
#!/usr/bin/env python ''' Author: Jared Stroud Date: January 2016 Purpose: Automate mailing users after events occur. ''' import random import smtplib class emailReqs(): def __init__(self, fromaddress, to, smtpProvider="smtp.gmail.com:587"): self.fromaddr = fromaddress self.toaddr = to s...