repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
ramonsaraiva/sgce
refs/heads/master
sgce/sgce/unislugify.py
2
import re from django.template.defaultfilters import slugify def unique_slugify(instance, value, slug_field_name='slug', queryset=None, slug_separator='-'): """ Calculates and stores a unique slug of ``value`` for an instance. ``slug_field_name`` should be a string matching the name of ...
ahotam/micropython
refs/heads/master
tests/basics/frozenset_binop.py
76
try: frozenset except NameError: print("SKIP") import sys sys.exit() sets = [ frozenset(), frozenset({1}), frozenset({1, 2}), frozenset({1, 2, 3}), frozenset({2, 3}), frozenset({2, 3, 5}), frozenset({5}), frozenset({7}) ] for s in sets: for t in sets: print(sorted(s), '|', sorted(t)...
switchkiller/nodejs-play
refs/heads/master
node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py
1788
#!/usr/bin/env python import re import json # https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
DoubleNegativeVisualEffects/cortex
refs/heads/master
test/IECore/BGEOParticleReader.py
12
########################################################################## # # Copyright (c) 2009, Image Engine Design 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: # # * Redistribu...
40223222/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/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...
resba/gnuradio
refs/heads/master
grc/python/Param.py
6
""" Copyright 2008-2011 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 l...
Agana/MyBlogAgain
refs/heads/master
django/contrib/gis/geos/point.py
403
from ctypes import c_uint from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos import prototypes as capi class Point(GEOSGeometry): _minlength = 2 _maxlength = 3 def __init__(self, x, y=None, z=None, srid=None): ...
Rosuav/shed
refs/heads/master
channel_split.py
1
# Split the audio channel from a file into its channels # Keeps video and subtitles tracks untouched import json import subprocess import sys if len(sys.argv) < 3: sys.exit(1, "USAGE: python3 %s inputfile outputfile") _, infile, outfile, *_ = sys.argv # Determine the channel layout of the input file p = subprocess.r...
j2sol/ansible-modules-core
refs/heads/devel
database/postgresql/postgresql_user.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. #...
wangli1426/heron
refs/heads/master
heron/pyheron/src/python/component/base_component.py
8
# Copyright 2016 - Parsely, Inc. (d/b/a Parse.ly) # # 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...
ryfeus/lambda-packs
refs/heads/master
Rasterio_osgeo_shapely_PIL_pyproj_numpy/source/dateutil/parser.py
49
# -*- coding:iso-8859-1 -*- """ This module offers a generic date/time string parser which is able to parse most known formats to represent a date and/or time. This module attempts to be forgiving with regards to unlikely input formats, returning a datetime object even for dates which are ambiguous. If an element of a...
Lab603/PicEncyclopedias
refs/heads/master
jni-build/jni-build/jni/include/tensorflow/python/framework/tensor_shape.py
7
# 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...
tommyanthony/tablib
refs/heads/develop
tablib/formats/_xlsx.py
8
# -*- coding: utf-8 -*- """ Tablib - XLSX Support. """ import sys if sys.version_info[0] > 2: from io import BytesIO else: from cStringIO import StringIO as BytesIO from tablib.compat import openpyxl import tablib Workbook = openpyxl.workbook.Workbook ExcelWriter = openpyxl.writer.excel.ExcelWriter get_co...
tmpgit/intellij-community
refs/heads/master
python/testData/buildout/site.py
83
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** In earlier versions of Python (up to 1.5a3), scripts or...
ffantast/magnum
refs/heads/master
magnum/objects/__init__.py
6
# 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 by applicable law or agree...
CompPhysics/ComputationalPhysicsMSU
refs/heads/master
doc/Programs/LecturePrograms/programs/NumericalIntegration/python/program1.py
3
# -*- coding: utf-8 -*- #Example of numerical integration with Gauss-Legendre quadrature #Translated to Python by Kyrre Ness Sjøbæk import sys import numpy from computationalLib import pylib #Read input if len(sys.argv) == 1: print "Number of integration points:" n = int(sys.stdin.readline()) print "Integ...
ryanss/python-holidays
refs/heads/master
holidays/countries/india.py
2
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Author: ryanss <ryanssdev@icl...
auready/django
refs/heads/master
tests/gis_tests/geoadmin/models.py
21
from django.contrib.gis.db import models from ..admin import admin class City(models.Model): name = models.CharField(max_length=30) point = models.PointField() class Meta: app_label = 'geoadmin' required_db_features = ['gis_enabled'] def __str__(self): return self.name sit...
daviddoria/PointGraphsPhase1
refs/heads/PointGraphsPhase1
Examples/Infovis/Python/treering_view_simple.py
17
from vtk import * reader1 = vtkXMLTreeReader() reader1.SetFileName("treetest.xml") reader1.Update() view = vtkTreeRingView() view.SetRepresentationFromInput(reader1.GetOutput()) view.SetAreaSizeArrayName("size") view.SetAreaColorArrayName("level") view.SetAreaLabelArrayName("name") view.SetAreaLabelVisibility(True) v...
dnaextrim/django_adminlte_x
refs/heads/master
adminlte/static/plugins/datatables/extensions/Responsive/examples/display-control/classes.html.py
1
XXXXXXXXX XXXXX XXXXXX XXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXX X XXXXX XXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXX...
ulrichard/electrum
refs/heads/master
lib/plugins.py
1
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at y...
jonboiser/content-curation
refs/heads/develop
contentcuration/contentcuration/migrations/0066_auto_20170412_0015.py
4
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-04-12 07:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contentcuration', '0065_auto_20170411_1609'), ] operations = [ migrations.A...
af1rst/bite-project
refs/heads/master
deps/gdata-python-client/samples/apps/marketplace_sample/gdata/apps/emailsettings/data.py
23
#!/usr/bin/python # # Copyright 2010 Google 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 ...
PandaPayProject/PandaPay
refs/heads/master
qa/rpc-tests/fundrawtransaction.py
1
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * # Creat...
mvidalgarcia/indico
refs/heads/master
indico/legacy/common/cache.py
2
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import cPickle as pickle import datetime import hashlib import os import time from itertools import izip ...
smart-developerr/my-first-blog
refs/heads/master
Lib/site-packages/setuptools/command/__init__.py
101
__all__ = [ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', 'register', 'bdist_wininst', 'upload_docs', 'upload', ] from distutils.command...
sdlBasic/sdlbrt
refs/heads/master
win32/mingw/opt/lib/python2.7/re.py
131
# # Secret Labs' Regular Expression Engine # # re-compatible interface for the sre matching engine # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@py...
williamroot/opps
refs/heads/master
opps/articles/admin.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Post, PostRelated, Album, Link from .forms import PostAdminForm, AlbumAdminForm, LinkAdminForm from opps.containers.admin import ( ContainerAdmin, ContainerIma...
ar7z1/ansible
refs/heads/devel
test/units/modules/net_tools/nios/test_nios_srv_record.py
68
# 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 distributed in the hope that ...
pavlovml/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/scatter_ops_test.py
5
"""Tests for tensorflow.ops.tf.scatter.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.python.platform import numpy as np import tensorflow as tf class ScatterTest(tf.test.TestCase): def _VariableRankTest(self, np_scatter, tf_scat...
dingmingliu/quanttrade
refs/heads/master
quanttrade/__init__.py
5
__author__ = 'tyler'
Relrin/aiorest-ws
refs/heads/master
tests/db/orm/django/test_validators.py
1
# -*- coding: utf-8 -*- from django.db import models from aiorest_ws.db.orm.exceptions import ValidationError from aiorest_ws.db.orm.django.serializers import ModelSerializer from aiorest_ws.db.orm.django.validators import qs_filter, qs_exists, \ UniqueValidator from tests.db.orm.django.base import DjangoUnitTes...
catapult-project/catapult
refs/heads/master
third_party/gsutil/third_party/apitools/apitools/base/py/testing/__init__.py
38
# # Copyright 2015 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 agreed to in writing...
ruchee/vimrc
refs/heads/master
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/n/no/no_else_continue.py
2
""" Test that superfluous else return are detected. """ # pylint:disable=invalid-name,missing-docstring,unused-variable def foo1(x, y, z): for i in x: if i < y: # [no-else-continue] continue else: a = z def foo2(x, y, w, z): for i in x: if i < y: # [no-else...
ray-project/ray
refs/heads/master
rllib/agents/ppo/appo.py
2
""" Asynchronous Proximal Policy Optimization (APPO) ================================================ This file defines the distributed Trainer class for the asynchronous version of proximal policy optimization (APPO). See `appo_[tf|torch]_policy.py` for the definition of the policy loss. Detailed documentation: http...
chaowyc/youtube-dl
refs/heads/master
youtube_dl/extractor/rtp.py
99
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class RTPIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?rtp\.pt/play/p(?P<program_id>[0-9]+)/(?P<id>[^/?#]+)/?' _TESTS = [{ 'url': 'http://www.rtp.pt/play/p405/e174042/paixoes-cruzadas', ...
walkingmu/InstantVideoConverter
refs/heads/master
spatial-media-2.0/spatialmedia/mpeg/mpeg4_container.py
2
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2016 Google 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/LICENS...
emceethemouth/kernel_msm
refs/heads/master
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
yamila-moreno/django
refs/heads/master
tests/i18n/tests.py
11
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import datetime import decimal import gettext as gettext_module import os import pickle from contextlib import contextmanager from importlib import import_module from threading import local from unittest import skipUnless from django import forms from ...
bthirion/scikit-learn
refs/heads/master
examples/neighbors/plot_regression.py
349
""" ============================ Nearest Neighbors regression ============================ Demonstrate the resolution of a regression problem using a k-Nearest Neighbor and the interpolation of the target using both barycenter and constant weights. """ print(__doc__) # Author: Alexandre Gramfort <alexandre.gramfort@...
rimbalinux/LMD3
refs/heads/master
pygments/styles/trac.py
75
# -*- coding: utf-8 -*- """ pygments.styles.trac ~~~~~~~~~~~~~~~~~~~~ Port of the default trac highlighter design. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Na...
saikat007/GNOME_glib
refs/heads/master
gio/gdbus-2.0/codegen/__init__.py
33
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
palerdot/calibre
refs/heads/master
manual/latex.py
5
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os from sphinx.builders.latex import LaTeXBuilder class LaTeXHelpBuilder(La...
phihag/youtube-dl
refs/heads/master
youtube_dl/extractor/viddler.py
46
from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlencode, compat_urlparse, ) from ..utils import ( float_or_none, int_or_none, sanitized_Request, ) class ViddlerIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?viddler\....
mancoast/CPythonPyc_test
refs/heads/master
cpython/253_test_socket_ssl.py
9
# Test just the SSL support in the socket module, in a moderately bogus way. import sys from test import test_support import socket import errno # Optionally test SSL support. This requires the 'network' resource as given # on the regrtest command line. skip_expected = not (test_support.is_resource_enabled('network'...
acsone/sale-workflow
refs/heads/8.0
sale_reason_to_export/models/sale_order.py
33
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # This module copyright (C) 2015 JPJ # ( http://www.savoirfairelinux.com). # # This program is free software: you can redistribute it and/or modify # it under...
chen2aaron/SnirteneCodes
refs/heads/master
PythonCookbookPractise/chapter8/create_managed_attributes.py
1
# 8.6. Creating Managed Attributes class Person: def __init__(self, first_name): self.first_name = first_name # Getter function @property def first_name(self): return self._first_name # Setter function @first_name.setter def first_name(self, value): if not isinstanc...
pyfa-org/eos
refs/heads/master
eos/stats_container/slots.py
1
# ============================================================================== # Copyright (C) 2011 Diego Duclos # Copyright (C) 2011-2018 Anton Vorobyov # # This file is part of Eos. # # Eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as publi...
12520054/pybot
refs/heads/master
chatterbot/ext/django_chatterbot/management/commands/train.py
1
from django.core.management.base import BaseCommand class Command(BaseCommand): help = 'Trains the database used by the chat bot' can_import_settings = True def handle(self, *args, **options): from chatterbot import ChatBot from chatterbot.ext.django_chatterbot import settings ch...
hkariti/mopidy
refs/heads/develop
tests/m3u/test_translator.py
9
# encoding: utf-8 from __future__ import absolute_import, unicode_literals import os import tempfile import unittest from mopidy.internal import path from mopidy.m3u import translator from mopidy.models import Track from tests import path_to_data_dir data_dir = path_to_data_dir('') song1_path = path_to_data_dir('s...
whip112/Whip112
refs/heads/master
vendor/packages/logilab/astng/setup.py
24
#!/usr/bin/env python # pylint: disable=W0404,W0622,W0704,W0613 # copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it unde...
doismellburning/edx-platform
refs/heads/master
cms/djangoapps/contentstore/features/discussion-editor.py
153
# disable missing docstring # pylint: disable=missing-docstring from lettuce import world, step @step('I have created a Discussion Tag$') def i_created_discussion_tag(step): step.given('I am in Studio editing a new unit') world.create_component_instance( step=step, category='discussion', ...
KaranToor/MA450
refs/heads/master
google-cloud-sdk/lib/surface/genomics/variantsets/export.py
3
# Copyright 2015 Google 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 or ag...
stephen144/odoo
refs/heads/9.0
addons/mrp_repair/__openerp__.py
23
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Repairs Management', 'version': '1.0', 'sequence': 200, 'category': 'Manufacturing', 'summary': 'Repair broken or damaged products', 'description': """, The aim is to have a complete m...
berycoin-project/berycoin
refs/heads/master
contrib/devtools/test-security-check.py
119
#!/usr/bin/env python2 # 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. ''' Test script for security-check.py ''' from __future__ import division,print_function import subprocess...
Aninstance/invoicing
refs/heads/master
invoicing/signals.py
1
from django.dispatch import receiver from django.db.models.signals import post_save, pre_save from invoicing.models import * from haystack.management.commands import update_index from django.utils import timezone import invoicing.views as invoicing from invoicing import schedules from django.forms import ValidationErro...
dgies/incubator-airflow
refs/heads/master
airflow/utils/compression.py
44
# -*- coding: utf-8 -*- # # 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 ...
toolmacher/micropython
refs/heads/master
tools/gen-cpydiff.py
7
# This file is part of the MicroPython project, http://micropython.org/ # # The MIT License (MIT) # # Copyright (c) 2016 Rami Ali # # 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...
dxxb/micropython
refs/heads/upstream-tracking
tests/basics/dict_intern.py
117
# check that interned strings are compared against non-interned strings di = {"key1": "value"} # lookup interned string k = "key1" print(k in di) # lookup non-interned string k2 = "key" + "1" print(k == k2) print(k2 in di) # lookup non-interned string print("".join(['k', 'e', 'y', '1']) in di)
ol-loginov/intellij-community
refs/heads/master
python/testData/formatter/blankLineBeforeFunction_after.py
79
class C: x = 1 def foo(self): pass
stackforge/networking-mlnx
refs/heads/master
networking_mlnx/plugins/ml2/drivers/sdn/utils.py
2
# Copyright 2016 Mellanox Technologies, Ltd # # 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 applicabl...
wolverineav/horizon
refs/heads/master
openstack_dashboard/dashboards/project/access_and_security/views.py
66
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use t...
alexston/calibre-webserver
refs/heads/master
src/calibre/libwand.py
19
__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' import ctypes, os, sys from calibre import iswindows, isosx class WandException(Exception): pass _lib_name = 'CORE_RL_wand_.dll' if iswindows else 'libWand.dylib' if isosx else 'libWand.so' if iswindows and hasattr(sys, 'froze...
strummerTFIU/TFG-IsometricMaps
refs/heads/master
LAStools/ArcGIS_toolbox/scripts_production/las2demPro.py
1
# # las2demPro.py # # (c) 2013, martin isenburg - http://rapidlasso.com # rapidlasso GmbH - fast tools to catch reality # # uses las2dem.exe to raster a folder of LiDAR files # # LiDAR input: LAS/LAZ/BIN/TXT/SHP/BIL/ASC/DTM # raster output: BIL/ASC/IMG/TIF/DTM/PNG/JPG # # for licensing see http://lasto...
onyb/mooca
refs/heads/master
Udacity/UD032_Data_Wrangling_with_MongoDB/Lesson_2/Problem_Set/02-Airport_List/airports.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # All your changes should be in the 'extract_airports' function # It should return a list of airport codes, excluding any combinations like "All" from bs4 import BeautifulSoup html_page = "options.html" def extract_airports(page): data = [] with open(page, "r") a...
sclorg/s2i-python-container
refs/heads/master
3.7/test/micropipenv-test-app/setup.py
125
from setuptools import setup, find_packages setup ( name = "testapp", version = "0.1", description = "Example application to be deployed.", packages = find_packages(), install_requires = ["gunicorn"], )
datsfosure/ansible
refs/heads/devel
test/units/plugins/__init__.py
7690
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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 Free Software Foundation, either version 3 of the License, or # (at your option) an...
ParadigmaXis/dadosabertos_cmporto_pt
refs/heads/master
ckanext/dados_cmporto_pt/controller.py
1
# -*- coding: utf-8 -*- import ckan.lib.base as base from ckan.controllers import admin import json from ckan.model import Package class AdminController(admin.AdminController): def _get_config_form_items(self): items = super(AdminController, self)._get_config_form_items() items[7]['options'].appen...
ptemplier/ansible
refs/heads/devel
lib/ansible/plugins/action/asa_config.py
45
# # (c) 2017, Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is...
Stackvana/stack
refs/heads/master
bin/binaries/lib/python/microcule/__init__.py
1
import sys import json import logging import traceback import pkg_resources import wsgiref.handlers import os # open incoming connection from fd3 if sys.version_info[0] < 3: fd3 = os.fdopen(3, 'w+') else: fd3 = os.fdopen(3, 'wb+', buffering=0) class FullMicroculeJSONFormatter(logging.Formatter): def format(se...
sustainableis/python-sis
refs/heads/master
pysis/services/organizations/__init__.py
1
# -*- encoding: utf-8 -*- from pysis.services.base import Service class Organizations(Service): """Organizations Service Consumes Organizations API: <{url}/organizations> """ def __init__(self, client): """Creates Organizations object with a client""" super(Organizations, sel...
adjspecies/furrypoll-munger
refs/heads/master
bin/other/weasyl-dates.py
2
data = ( ( 2013,1,6), ( 2013,1,11), ( 2013,1,11), ( 2013,1,11), ( 2013,1,12), ( 2013,1,12), ( 2013,1,12), ( 2013,1,12), ( 2013,1,12), ( 2013,1,12), ( 2013,1,12), ( 2013,1,12), ( 2013,1,12), ( 2013,1,12), ( 2013,1,12), ( 2013,1,12), ( 2013,1,13), ( ...
google/makani
refs/heads/master
gs/monitor2/apps/plugins/layouts/estimator_layout.py
1
# Copyright 2020 Makani Technologies LLC # # 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...
ZombieNinjaPirate/pypkg
refs/heads/master
HonSSH/DailyLogs.py
1
""" Copyright (c) 2014, Are Hansen - Honeypot Development. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditi...
tmaeda11235/schroedinger_solver
refs/heads/master
tests/nelsonrun.py
1
import schrpy as sch import scipy as sci cache = sci.zeros((100, 100000)) print("cache") psi = sci.load('Huskp_v[6.5]a[1.4]b[0.2]k[2.0].npy')[:-15001] + 2 ** -50 print("psi") x = sci.arange(-60, 60, 0.005) print("x") t = sci.arange(0, 15, 0.001) print("t") init = sci.random.normal(loc=-15, size=100000, scale=3.0) prin...
bongtrop/python-btlogic
refs/heads/master
btlogic.py
1
#!/usr/bin/python import math #Minterm Maxterm class #Author: Pongsakorn Sommalai #Detail: Use for management logic term class term: def __init__(self, term=[], type="", bit=0): if type=="maxterm": self.term = term self.type = type else: self.term = term self.type = "minterm" self.bit=bit self....
shepdelacreme/ansible
refs/heads/devel
lib/ansible/utils/__init__.py
2520
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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 Free Software Foundation, either version 3 of the License, or # (at your option) an...
Kimball12/DOUAudioStreamer-master
refs/heads/master
python/setup.py
11
# vim: set ft=python fenc=utf-8 sw=4 ts=4 et: # # DOUAudioStreamer - A Core Audio based streaming audio player for iOS/Mac: # # https://github.com/douban/DOUAudioStreamer # # Copyright 2013-2014 Douban Inc. All rights reserved. # # Use and distribution licensed under the BSD license. See # the LICENSE file f...
fyffyt/scikit-learn
refs/heads/master
examples/linear_model/plot_lasso_model_selection.py
311
""" =================================================== Lasso model selection: Cross-Validation / AIC / BIC =================================================== Use the Akaike information criterion (AIC), the Bayes Information criterion (BIC) and cross-validation to select an optimal value of the regularization paramet...
qmagico/sampleappqm
refs/heads/master
src/django/contrib/localflavor/si/si_postalcodes.py
89
# *-* coding: utf-8 *-* SI_POSTALCODES = [ (1000, u'Ljubljana'), (1215, u'Medvode'), (1216, u'Smlednik'), (1217, u'Vodice'), (1218, u'Komenda'), (1219, u'Laze v Tuhinju'), (1221, u'Motnik'), (1222, u'Trojane'), (1223, u'Blagovica'), (1225, u'Lukovica'), (1230, u'Dom\u017eale...
byterom/android_external_chromium_org
refs/heads/12.1
chrome/common/extensions/docs/server2/manifest_data_source_test.py
87
#!/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. from copy import deepcopy import json import unittest from future import Future import manifest_data_source from object_store_creator ...
RTHMaK/RPGOne
refs/heads/master
Documents/scikit-image-0.12.3/skimage/scripts/skivi.py
49
"""skimage viewer""" def main(): import skimage.io as io import sys if len(sys.argv) != 2: print("Usage: skivi <image-file>") sys.exit(-1) io.use_plugin('qt') io.imshow(io.imread(sys.argv[1]), fancy=True) io.show()
laosiaudi/tensorflow
refs/heads/master
tensorflow/contrib/slim/python/slim/queues.py
35
# 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 applicable ...
albertomurillo/ansible
refs/heads/devel
lib/ansible/modules/system/aix_devices.py
44
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, 2018 Kairo Araujo <kairo@kairo.eti.br> # 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...
washort/gelato.models
refs/heads/master
gelato/__init__.py
56
try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)
home-assistant/home-assistant
refs/heads/dev
homeassistant/components/lifx/const.py
28
"""Const for LIFX.""" DOMAIN = "lifx"
paynejacob/points-tracker
refs/heads/master
migrations/versions/496d97235057_.py
2
"""empty message Revision ID: 496d97235057 Revises: ea80674a1e2 Create Date: 2015-07-15 22:29:11.424610 """ # revision identifiers, used by Alembic. revision = '496d97235057' down_revision = 'ea80674a1e2' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - pl...
hoatle/odoo
refs/heads/8.0
openerp/addons/base/res/res_config.py
243
# -*- 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...
kubeflow/pipelines
refs/heads/master
backend/api/python_http_client/kfp_server_api/models/api_run.py
2
# coding: utf-8 """ Kubeflow Pipelines API This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import s...
siosio/intellij-community
refs/heads/master
python/testData/formatter/alignInGenerators.py
83
def supprice(): if True: if True: agdrn = sum(VARS[drn + price] * md.c[drn][1] * md.c[drn][3] * exp(md.c[drn][2] * VARS['SEEPAGE'] - md.c[drn][3] * pmp) for drn in md.agdrn_nodes if drn in md.c)
ekivemark/BlueButtonFHIR_API
refs/heads/master
fhir/views/create.py
1
import sys from django.shortcuts import render from fhir.models import SupportedResourceType from collections import OrderedDict from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt import json, uuid from jsonschema import validate, ValidationError import datetime from fhir.set...
HatsuneMiku0309/2014cdag10
refs/heads/master
wsgi/static/Brython2.1.0-20140419-113919/Lib/unittest/__main__.py
737
"""Main entry point""" import sys if sys.argv[0].endswith("__main__.py"): import os.path # We change sys.argv[0] to make help message more useful # use executable without path, unquoted # (it's just a hint anyway) # (if you have spaces in your executable you get what you deserve!) executable = ...
patrickdw123/ParanoiDF
refs/heads/master
makeEmbedded.py
1
# ParanoiDF. A combination of several PDF analysis/manipulation tools to # produce one of the most technically useful PDF analysis tools. # # Idea proposed by Julio Hernandez-Castro, University of Kent, UK. # By Patrick Wragg # University of Kent # 21/07/2014 # # With thanks to: # Julio...
ridfrustum/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/modeltests/fixtures/models.py
51
""" 37. Fixtures. Fixtures are a way of loading data into the database in bulk. Fixure data can be stored in any serializable format (including JSON and XML). Fixtures are identified by name, and are stored in either a directory named 'fixtures' in the application directory, or in one of the directories named in the `...
gonzolino/heat
refs/heads/master
heat/db/sqlalchemy/migrate_repo/versions/045_stack_backup.py
13
# # 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 # ...
adrienbrault/home-assistant
refs/heads/dev
tests/components/onvif/__init__.py
21
"""Tests for the ONVIF integration."""
mfjb/scikit-learn
refs/heads/master
sklearn/neural_network/tests/test_rbm.py
142
import sys import re import numpy as np from scipy.sparse import csc_matrix, csr_matrix, lil_matrix from sklearn.utils.testing import (assert_almost_equal, assert_array_equal, assert_true) from sklearn.datasets import load_digits from sklearn.externals.six.moves import cStringIO as ...
comic/comic-django
refs/heads/master
app/tests/utils.py
1
from typing import Callable from urllib.parse import urlparse import pytest from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied from django.test import RequestFactory, Client from django.views.generic import View from grandchallenge...
yueyongyue/saltshaker
refs/heads/master
files_manager/estimate.py
1
from django import template register = template.Library() @register.filter(is_safe=True) def to_str(value): if type(value) == list: value_str = '\n'.join(value) return value_str elif type(value) == dict: value_l = [] for key in value: tmp = str(key) + '\n ' + str...
ESS-LLP/erpnext-medical
refs/heads/develop
erpnext/patches/v7_0/update_refdoc_in_landed_cost_voucher.py
54
from __future__ import unicode_literals import frappe def execute(): if "purchase_receipt" not in frappe.db.get_table_columns("Landed Cost Purchase Receipt"): return frappe.reload_doctype("Landed Cost Purchase Receipt") frappe.db.sql(""" update `tabLanded Cost Purchase Receipt` set receipt_document_type ...