code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# Airy function Bi(z) in the complex plane cplot(airybi, [-8,8], [-8,8], points=50000)
pducks32/intergrala
python/sympy/doc/src/modules/mpmath/plots/bi_c.py
Python
mit
86
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hs_access_control', '0016_auto_enforce_constraints'), ] operations = [ migrations.AddField( model_name='groupaccess', name='auto_approve', ...
hydroshare/hydroshare
hs_access_control/migrations/0017_groupaccess_auto_approve.py
Python
bsd-3-clause
455
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-08 18:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ordini', '0004_auto_20151208_1509'), ] operations = [ migrations.AddField( ...
Byx69/SMes
ordini/migrations/0005_auto_20151208_1902.py
Python
gpl-2.0
626
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2012 Zhang ZY<http://idupx.blogspot.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/L...
bufferx/tqueue
src/www/action/queue_pop.py
Python
apache-2.0
1,828
# -*-coding:UTF-8-*- import re class Model(object): ''' example __rules__ = { 'username': { 'label': '用户名', '_need': True, 'type': unicode, 'max_length': 36, 'min_length': 1, 'pattern': ur'^[a-zA-Z0-9_\-\u4e00-\u9fa5]+$' ...
Hanaasagi/Ushio
ushio/_model.py
Python
mit
2,398
'''Functions for python 2/3 compatibility.''' from __future__ import division, print_function, unicode_literals import sys IS_PYTHON3 = sys.version_info >= (3,) if IS_PYTHON3: def is_string(s): return isinstance(s, (str, bytes)) else: def is_string(s): return isinstance(s, basestring)
tboggs/fretboard
fretboard/utils.py
Python
gpl-3.0
313
import sys import os import cgi import datetime import urllib import logging from os.path import isdir from os.path import join as dj import sketch from sketch.util import hasmethod, hasvar, getmethattr class BaseController(sketch.RequestHandler): """BaseController default application controller that is inherited ...
nikcub/Sketch
sketch/controllers.py
Python
bsd-2-clause
9,864
from bento.commands.build_wininst \ import \ BuildWininstCommand from bento.commands.build_egg \ import \ BuildEggCommand
abadger/Bento
bento/commands/tests/test_misc.py
Python
bsd-3-clause
146
#MenuTitle: Case: Lowercase # -*- coding: utf-8 -*- """Converts the selected text to lowercase.""" Font = Glyphs.font Doc = Glyphs.currentDocument TextStoreage = Doc.windowController().activeEditViewController().graphicView().textStorage() String = TextStoreage.text().string() Range = Doc.windowController().activeEdi...
weiweihuanghuang/wei-glyphs-scripts
Text/Case-Lowercase.py
Python
apache-2.0
1,409
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015 Dag Wieers <dag@wieers.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 Lice...
dbhirko/ansible-modules-extras
cloud/vmware/vsphere_copy.py
Python
gpl-3.0
6,194
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, json import frappe.widgets.form.meta import frappe.widgets.form.load from frappe import _ @frappe.whitelist() def remove_attach(): """remove attachment""" im...
rohitwaghchaure/New_Theme_frappe
frappe/widgets/form/utils.py
Python
mit
4,058
# Copyright (c) 2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
Intel-Corp/CPU-Manager-for-Kubernetes
intel/webhook.py
Python
apache-2.0
10,123
import sqlite3 # How often this save saveStep = 1 num = 0 # connection conn = None c = None def getFormat(data): if type(data) is str: return 'TEXT' if type(data) is float: return 'REAL' if type(data) is int: return 'INTEGER' return 'TEXT' def insertRecord(data, name): try: del data['_id'] # mongo surp...
adibalcan/PySave
pysave.py
Python
gpl-2.0
1,196
#!/usr/bin/env python # Script to generate the nth Fibonacci term (https://thecodeaddict.wordpress.com/2012/01/03/fibonacci-sequence-part-2/) from math import sqrt #Iterative method def F_iter(n) : if n == 0 or n == 1: return n a, b = 0, 1 for i in range(n-1): a, b = b, (a + b) return b #Recu...
rohitjha/thecodeaddict
Fibonacci_Sequence/generate.py
Python
unlicense
854
# 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...
seanli9jan/tensorflow
tensorflow/contrib/distribute/__init__.py
Python
apache-2.0
2,776
from django.core.exceptions import ValidationError from django.db import models from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from libya_elections.abstract import AbstractTimestampTrashBinModel from libya_elections.constants import INCOMING, OUTGOING from libya_elections.libya...
SmartElect/SmartElect
audit/models.py
Python
apache-2.0
7,335
# Copyright (C) 2011-2012, Luis Pedro Coelho <luis@luispedro.org> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # License: MIT (see COPYING file) import numpy as np def _get_output(array, out, fname, dtype=None, output=None): ''' output = _get_output(array, out, fname, dtype=None, output=None) Imple...
fabianvaccaro/pygums
pythonLibs/mahotas-1.1.0/mahotas/internal.py
Python
gpl-2.0
5,299
from __future__ import unicode_literals from future.utils import python_2_unicode_compatible import collections import itertools @python_2_unicode_compatible class Word(object): def __init__(self, wordform, lemma, tag, prob, offset, length): self.wordform = wordform if isinstance(wordform, list) else [wo...
max-ionov/rucoref
anaphoralib/utils.py
Python
lgpl-3.0
6,938
""" Unit tests for Edx Proctoring feature flag in new instructor dashboard. """ import ddt from django.apps import apps from django.conf import settings from django.urls import reverse from edx_proctoring.api import create_exam from edx_proctoring.backends.tests.test_backend import TestBackendProvider from mock impor...
cpennington/edx-platform
lms/djangoapps/instructor/tests/test_proctoring.py
Python
agpl-3.0
5,817
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-02-15 23:16 from __future__ import unicode_literals from django.db import migrations import image_cropping.fields class Migration(migrations.Migration): dependencies = [ ('gardens', '0023_auto_20180215_2314'), ] operations = [ ...
bengosney/rhgd3
gardens/migrations/0024_auto_20180215_2316.py
Python
gpl-3.0
759
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
qma/pants
src/python/pants/bin/goal_runner.py
Python
apache-2.0
16,202
import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression def plot_linear_regression(): a = 0.5 b = 1.0 # x from 0 to 10 x = 30 * np.random.random(20) # y = a*x + b with noise y = a * x + b + np.random.normal(size=x.shape) # create a linear reg...
janusnic/21v-python
unit_20/parallel_ml/notebooks/figures/linear_regression.py
Python
mit
735
from oslo.config import cfg rootwrap_opts = [ cfg.StrOpt('root_helper', default='sudo nova-rootwrap /etc/nova/rootwrap.conf', help='root helper for none-root users'), ] CONF = cfg.CONF CONF.register_opts(rootwrap_opts) def root_helper(): return CONF.root_helper
zhangwenyu/packages
virtman/virtman/utils/rootwrap.py
Python
apache-2.0
316
from index import Index fmap = { '/': Index(), }
the1337guy/using-python-to-develop-clientside
src/url.py
Python
mit
52
__author__ = 'Lorenzo Argentieri' import pymel.core as pm from mayaLib.rigLib.utils import common from mayaLib.rigLib.utils import name from mayaLib.rigLib.utils import skin def invertSelection(shape, faces): pm.select(shape + '.f[*]') pm.select(faces, deselect=True) # mel.eval('InvertSelection;') r...
Aiacos/DevPyLib
mayaLib/rigLib/utils/proxyGeo.py
Python
agpl-3.0
2,997
# -*- coding: utf-8 -*- """ SALTS XBMC Addon Copyright (C) 2014 tknorris This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) a...
azumimuo/family-xbmc-addon
plugin.video.salts/scrapers/sezonlukdizi_scraper.py
Python
gpl-2.0
7,069
#!/usr/bin/env python # encoding: utf-8 """ :: Copyright 2010 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ """ Module which parses an icegrid XML file for configuration settings. see ticket:800 see ticket:2213 - Replacing Java Preferences API """ imp...
hflynn/openmicroscopy
components/tools/OmeroPy/src/omero/config.py
Python
gpl-2.0
11,484
import chainer import chainer.links as L import chainer.functions as F class SimpleCNN(chainer.Chain): """ Simple Convolutional Neural Network for training the MNIST dataset. Input dimensions are 28, 28, 1 where 1 represent the single grayscale channel. """ def __init__(self): super(SimpleCNN...
hvy/chainer-mnist
models/simplecnn.py
Python
mit
995
#!/usr/bin/env python # Copyright (c) 2015 IBM. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
cloudant/python-cloudant
tests/integration/document_test.py
Python
apache-2.0
1,701
#!/usr/bin/python #! -*- coding:utf-8 -*- from sqlalchemy import Column, Integer, String from database import Base class Message(Base): __tablename__ = 'message' MessageId = Column(Integer, primary_key=True) DeviceId = Column(String(50)) MessageBody = Column(String(1000)) MessageType = Column(Inte...
HalfLike/qc-web-server
app/models.py
Python
apache-2.0
1,467
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
The-Compiler/qutebrowser
qutebrowser/browser/shared.py
Python
gpl-3.0
11,830
#!/usr/bin/python # # A Python module to control an Open-E DSS Filer. # Copyright (C) 2013 Andreas Thienemann <andreas@bawue.net> # # This program is free software: you can redistribute it and/or modify # it under the terms of the version 2 of the GNU General Public License # as published by the Free So...
ixs/dss_cli
DSS_Scraper.py
Python
gpl-2.0
28,370
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2013 Jérémie DECOCK (http://www.jdhp.org) # See: # - http://docs.python.org/2/library/threading.html # - http://www.tutorialspoint.com/python/python_multithreading.htm import threading import time class Foo(threading.Thread): def __init__(self, itera...
jeremiedecock/snippets
python/threading/hello_meth1.py
Python
mit
1,086
# @package regularizer_context # Module caffe2.python.regularizer_context from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import context from caffe2.python.modifier_context import ( ModifierConte...
ryfeus/lambda-packs
pytorch/source/caffe2/python/regularizer_context.py
Python
mit
1,179
# Copyright 2009-2012 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Tests for branch contexts.""" __metaclass__ = type from zope.security.proxy import removeSecurityProxy from lp.app.enums import InformationType from lp.code.enums import...
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/code/model/tests/test_branchtarget.py
Python
agpl-3.0
25,140
from Queue import Queue, Empty import contextlib from logging import getLogger import random import time from gevent.monkey import saved LOG = getLogger(__name__) if bool(saved): LOG.info('using zmq.green...') import zmq.green as zmq else: import zmq class ZMQConnection(object): def __init__(self...
Livefyre/protobuf-rpc
python/protobuf_rpc/connection.py
Python
mit
3,673
""" pypackgen_test.py """ import unittest class TestPyPackGen(unittest.TestCase): """ TestPyPackGen Test Case """ def test_phil(self): """ TestPhil adds numbers """ self.assertEqual(3 + 2, 5) if __name__ == '__main__': unittest.main()
predatorian3/pypackgen
test/pypackgen/pypackgen_test.py
Python
mit
281
# -*- coding: utf-8 -*- """ Plot oscilloscope files from MultiSim """ import numpy as np import matplotlib.pyplot as plt import sys import os from matplotlib import rc rc('font',family="Consolas") files=["real_zad5_1f.txt", "real_zad5_05f_p2.txt", "real_zad5_033f.txt", "real_zad9_1f.txt", "real_zad9_05f.txt", "real_za...
Monika319/EWEF-1
Cw2Rezonans/Karolina/Oscyloskop/StosunkiAmplitud.py
Python
gpl-2.0
1,392
"""Descriptor utilities. Utilities to support special Python descriptors [1,2], in particular the use of a useful pattern for properties we call 'one time properties'. These are object attributes which are declared as properties, but become regular attributes once they've been read the first time. They can thus be e...
cloud9ers/gurumate
environment/lib/python2.7/site-packages/IPython/utils/autoattr.py
Python
lgpl-3.0
4,985
# -*- coding: utf-8 -*- """ *************************************************************************** las2lasPro_filter.py --------------------- Date : October 2014 Copyright : (C) 2014 by Martin Isenburg Email : martin near rapidlasso point com *********...
dakcarto/QGIS
python/plugins/processing/algs/lidar/lastools/las2lasPro_filter.py
Python
gpl-2.0
2,378
"""write formatter: area_write_shiny_format.py Resulting serialized output will look like the following string (but obviously with actual data in the place of <data>): [ShinyMUD Version "X.X"] [Area] <data> [End Area] [Scripts] <data> [End Scripts] [Items] <data> [End Items] [Item Types] <data> [End Item Types] ...
shinymud/ShinyMUD
src/shinymud/lib/sport_plugins/formatters/area_write_shiny_format.py
Python
mit
3,608
# Test for Documanager's forms from django.test import TestCase from django import forms from documanager.forms import MarkdownForm from documanager.models import Stationary class MarkdownFormTestCase(TestCase): def setUp(self): self.form = MarkdownForm() def test_should_exist(self): self.ass...
elbasti/prettymarkdown
documanager/tests/forms.py
Python
mit
938
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.utils.timezone from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [ ('orchestra', '0023_assignment_failed'), ] operations = [ migrations.AddFiel...
b12io/orchestra
orchestra/migrations/0024_auto_20160325_1916.py
Python
apache-2.0
1,224
import itertools from sympy import (Add, Pow, Symbol, exp, sqrt, symbols, sympify, cse, Matrix, S, cos, sin, Eq, Function, Tuple, RootOf, IndexedBase, Idx, Piecewise, O) from sympy.simplify.cse_opts import sub_pre, sub_post from sympy.functions.special.hyper import meijerg from sy...
Shaswat27/sympy
sympy/simplify/tests/test_cse.py
Python
bsd-3-clause
12,960
# -*- coding: utf-8 -*- # # Copyright 2014 Nicolas Thauvin. 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, th...
orgrim/pgpouch
pouch/forms.py
Python
bsd-2-clause
3,412
# -*- coding: utf-8 -*- #------------------------------------------------------------ # streamondemand-pureita # Copyright 2015 tvalacarta@gmail.com # # Distributed under the terms of GNU General Public License v3 (GPLv3) # http://www.gnu.org/licenses/gpl-3.0.html #------------------------------------------------------...
orione7/Italorione
window_channels.py
Python
gpl-3.0
4,911
from Sire.Vol import * from Sire.Maths import * from Sire.Units import * r = RegularGrid( Vector(1,2,3), 5, 2 * angstrom ) print(r) print(r.center()) print(r.gridSpacing()) print(r.points()) r = r.rotate( Quaternion( 32*degrees, Vector(1,0,0) ), r.center() ) print(r) print(r.center()) print(r.gridSpacing()) print(...
chryswoods/SireTests
unittests/SireVol/testgrid.py
Python
gpl-2.0
333
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Cloudscaling Group, 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/LI...
tomasdubec/openstack-cinder
cinder/openstack/common/rpc/matchmaker.py
Python
apache-2.0
12,224
# -*- coding: utf-8 -*- """Startup utilities""" # pylint:skip-file import os import sys import urllib2 import paste.script.command import werkzeug.script from functools import partial etc = partial(os.path.join, 'parts', 'etc') DEPLOY_INI = etc('deploy.ini') DEPLOY_CFG = etc('deploy.cfg') DEBUG_INI = etc('debug.ini...
stxnext-kindergarten/presence-analyzer-mlobocki
src/presence_analyzer/script.py
Python
mit
3,512
# Copyright 2013 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 agree...
tytso/compute-image-packages
gcimagebundle/gcimagebundlelib/manifest.py
Python
apache-2.0
2,400
# 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 # distributed under t...
ctrlaltdel/neutrinator
vendor/openstack/tests/functional/compute/v2/test_extension.py
Python
gpl-3.0
1,005
# coding=utf-8 ''' tagsPlorer package entry point (C) 2021-2021 Arne Bachmann https://github.com/ArneBachmann/tagsplorer ''' from tagsplorer import tp tp.Main().parse_and_run()
ArneBachmann/tagsplorer
tagsplorer/__main__.py
Python
mpl-2.0
183
from mmse15project.model.ClientMeeting import * from mmse15project.model.DBInterface import DBInterface from mmse15project.model.GenericMethods import * class ClientMeetingDBInterface(DBInterface): def __init__(self,database): self.database = database def add(self,meeting): values = meeting....
rssalessio/MMSE15Project-RussoJohansson
mmse15project/model/ClientMeetingDBInterface.py
Python
gpl-2.0
1,291
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, fields, models from odoo.exceptions import UserError class ServerActions(models.Model): """ Add email option in server actions. """ _name = 'ir.actions.server' _inherit = ['ir.actio...
chienlieu2017/it_management
odoo/addons/mail/models/ir_actions.py
Python
gpl-3.0
2,512
import math target_number = 3310000 def is_prime(n): if n == 2 or n == 3: return True if n < 2 or n % 2 == 0: return False if n < 9: return True if n % 3 == 0: return False r = int(n ** 0.5) f = 5 while f <= r: if n % f == 0: return False if n % (f + 2) == 0: return False ...
aarestad/advent-of-code-2015
2015/20.py
Python
gpl-3.0
1,648
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Station.visible' db.add_column('stations_station', 'visible', self.gf(...
idan/telostats
telostats/stations/migrations/0006_auto__add_field_station_visible.py
Python
bsd-3-clause
1,631
#!/usr/bin/python3 # -*- coding: utf-8 -*- # #%L # %% # Copyright (C) 2021 BMW Car IT GmbH # %% # 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...
bmwcarit/joynr
dependency-lock/write.py
Python
apache-2.0
1,676
import os import sys from sea.utils import import_string from sea.local import Proxy from sea.signals import post_ready from ._version import get_versions __version__ = get_versions()['version'] del get_versions _app = None def create_app(root_path=None): global _app if _app is not None: return _ap...
shanbay/sea
sea/__init__.py
Python
mit
951
#!/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. # ...
drmrd/ansible
lib/ansible/modules/cloud/amazon/ec2_ami_copy.py
Python
gpl-3.0
7,355
import vtk from vtk.util.vtkAlgorithm import VTKPythonAlgorithmBase from vtk.util import numpy_support from vtk.numpy_interface import dataset_adapter as dsa import numpy as np from timeit import default_timer as timer import logging class FilterDepthImage(VTKPythonAlgorithmBase): """ Create a depth image o...
lucasplus/MABDI
mabdi/FilterDepthImage.py
Python
bsd-3-clause
6,891
#!/usr/bin/env python # This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import os import platform import subprocess import...
Ayrx/cryptography
setup.py
Python
bsd-3-clause
10,521
# -*- coding: utf-8 -*- """Statistical functions for binary cloud masks. """ import numpy as np import scipy as sc from skimage import measure from scipy.spatial.distance import pdist __all__ = [ "filter_cloudmask", "get_cloudproperties", "neighbor_distance", "iorg", "scai", "cloudfraction", ...
atmtools/typhon
typhon/cloudmask/cloudstatistics.py
Python
mit
6,609
#!/usr/bin/env python # # https://launchpad.net/wxbanker # analyzers.py: Copyright 2007-2010 Mike Rooney <mrooney@ubuntu.com> # # This file is part of wxBanker. # # wxBanker is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # ...
mrooney/wxbanker
wxbanker/analyzers.py
Python
gpl-3.0
2,227
''' Created on Aug 3, 2011 @author: sean ''' from graphlab.meta.asttools.visitors import Visitor import ast class SymbolVisitor(Visitor): def __init__(self, ctx_types=(ast.Load, ast.Store)): if not isinstance(ctx_types, (list, tuple)): ctx_types = (ctx_types,) self.ctx_types = tuple(...
ypkang/Dato-Core
src/unity/python/graphlab/meta/asttools/visitors/symbol_visitor.py
Python
agpl-3.0
1,536
#!/usr/bin/env python """ Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import os from xml.etree import ElementTree as et from lib.core.data import conf from lib.core.data import logger from lib.core.data import paths from lib.core.datatype impo...
V11/volcano
server/sqlmap/lib/parse/payloads.py
Python
mit
3,204
from django.db import models class Reporter(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) email = models.EmailField() facebook_user_id = models.BigIntegerField(null=True) def __unicode__(self): return u"%s %s" % (self.first_name, s...
LethusTI/supportcenter
vendor/django/tests/regressiontests/introspection/models.py
Python
gpl-3.0
596
#============================================================================= # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) ...
hdlj/MongooseOS
Resource/Example3/app1.py
Python
gpl-3.0
1,003
import pytest import xarray from databroker.core import BlueskyRun from ..projector import ( get_run_projection, project_xarray, get_xarray_config_field, project_summary_dict ) EVENT_FIELD = 'event_field_name' EVENT_CONFIGURATION_FIELD = 'event_configuration_name' START_DOC_FIELD = 'start_doc_metada...
ericdill/databroker
databroker/tests/test_projector.py
Python
bsd-3-clause
7,348
HOST = "ip-172-31-29-102.us-west-2.compute.internal:27017,ip-172-31-29-103.us-west-2.compute.internal:27017,ip-172-31-29-104.us-west-2.compute.internal:27017,ip-172-31-29-105.us-west-2.compute.internal:27017,ip-172-31-29-101.us-west-2.compute.internal:27017,ip-172-31-29-106.us-west-2.compute.internal:27017,ip-172-31-29...
elainenaomi/sciwonc-dataflow-examples
dissertation2017/Experiment 1A/instances/11_1_workflow_full_10files_secondary_w1_3sh_3rs_with_annot_with_proj_3s_hash/calculateratio_4/ConfigDB_Calc_TaskEvent_4.py
Python
gpl-3.0
996
from PyQt5.QtCore import QStandardPaths from API.CurseAPI import CurseAPI from traceback import format_tb from platform import platform from locale import getdefaultlocale from os import path from time import time from GUI.ErrorDialogWrapper import ErrorDialog from Utils.Config import Config, Setting from Utils.Ana...
OpenMineMods/OpenMineMods
Utils/ErrorHandler.py
Python
agpl-3.0
1,723
# -* encoding: utf-8 *- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from typing import Any, List import configargparse import gopythongo.shared.aptly_args as _aptl...
gopythongo/gopythongo
src/py/gopythongo/shared/aptly_base.py
Python
mpl-2.0
4,146
# this program corresponds to special.py ### Means test is not done yet # E Means test is giving error (E) # F Means test is failing (F) # EF Means test is giving error and Failing #! Means test is segfaulting # 8 Means test runs forever ### test_besselpoly ### test_mathieu_a ### test_mathieu_even_coef ##...
niknow/scipy
scipy/special/tests/test_basic.py
Python
bsd-3-clause
129,612
import os import datetime import pytz import memdam import memdam.common.timeutils import memdam.recorder.collector.folder class Narrative(memdam.recorder.collector.folder.Folder): """ Handles special narrative folder structure to get the time out, because it is not stored in the EXIF headers :( """ ...
joshalbrecht/memdam
memdam/recorder/collector/personal/narrative.py
Python
gpl-2.0
1,490
# Copyright 2004-2015 Tom Rothamel <pytom@bishoujo.us> # # 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, m...
joxer/Baka-No-Voltron
tmp/android.dist/private/renpy/display/joystick.py
Python
gpl-2.0
3,790
#!/usr/bin/env python # -*- coding: utf-8 -*- import os, sys, datetime SlqBlogSettings = { 'post_types': ('post', 'page'), # deprecated 'allow_registration': os.environ.get('allow_registration', 'false').lower() == 'true', 'allow_su_creation': os.environ.get('allow_su_creation', 'false').lower() == 'true'...
shawnlinq/SlqBlog2
SlqBlog/config.py
Python
gpl-2.0
4,859
# # 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 # distributed under...
Juniper/ceilometer
ceilometer/event/storage/impl_elasticsearch.py
Python
apache-2.0
11,518
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Darryl Stoflet <stoflet@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 Li...
gaqzi/ansible-modules-extras
monitoring/monit.py
Python
gpl-3.0
5,726
# -*- coding: utf-8 -*- """ Subliminal uses `click <http://click.pocoo.org>`_ to provide a powerful :abbr:`CLI (command-line interface)`. """ from __future__ import division from collections import defaultdict from datetime import timedelta import glob import json import logging import os import re from appdirs impor...
neo1691/subliminal
subliminal/cli.py
Python
mit
19,817
import copy import warnings from collections.abc import Iterable, Iterator, Generator import numpy as np import scipy import scipy.optimize import scipy.stats from astropy import log import matplotlib.pyplot as plt from stingray.exceptions import StingrayError from stingray.gti import bin_intervals_from_gtis, check_g...
abigailStev/stingray
stingray/crossspectrum.py
Python
mit
97,663
import argparse import datetime import json import os import math import random import re import shutil import sys import subprocess import tempfile class FileInfo(object): mb = 1000000 # we use os.stat that gives the file size in kb @staticmethod def normalize_name(name): """ :param n...
ofreshy/ojo
ojo/ooo.py
Python
mit
11,777
# Copyright (c) 2015 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 writing, so...
SVilgelm/CloudFerry
cloudferry/lib/base/migration.py
Python
apache-2.0
3,610
import json import os from utils import get_relative_filename class Parser(object): """ Parse config.pb and modify it with respect to the value in the predefined_values.json """ def __init__(self, old_filename='config.pb', new_filename='config_new.pb', ...
louishenrifranc/spearmint-for-neural-network
script/parser.py
Python
mit
6,317
# # 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 # ...
gonzolino/heat
heat/engine/resources/openstack/keystone/user.py
Python
apache-2.0
9,047
#!/usr/bin/python3 import cv2 import cve import sys import os import os.path import argparse as ap import re parser = ap.ArgumentParser("Run background subtraction on frames in a folder.") parser.add_argument("in_folder") parser.add_argument("mask_file") parser.add_argument("-o", "--out_folder", default="") parser.ad...
Algomorph/AMBR
apply_mask_to_frames.py
Python
apache-2.0
1,510
def foo(): '>>> print("docstring")' def foo(): ">>> print('docstring')" def : meta.function.python, source.python, storage.type.function.python : meta.function.python, source.python foo : entity.name.function.python, meta.function.python, source.python ( : meta.f...
MagicStack/MagicPython
test/docstrings/oneline3.py
Python
mit
1,895
#! coding:utf-8 """ Django settings for shop project. Generated by 'django-admin startproject' using Django 1.11.6. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ "...
delitamakanda/jobboard
shop/settings.py
Python
mit
4,060
import unittest import clusto_query.lexer from clusto_query.exceptions import StringParseError class LexerTest(unittest.TestCase): def test_consume(self): self.assertEqual(clusto_query.lexer.consume('nom', 'nomnomnom'), 'nomnom') def test_lex_string_inner_quoted_basic(self): ...
uber/clusto-query
test/test_lexer.py
Python
isc
3,315
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import print_function, unicode_literals import os import platform import sys from distutils.spawn impor...
dsandeephegde/servo
python/mach_bootstrap.py
Python
mpl-2.0
9,878
''' main issue here was to global patforrec. youll probs forget. ''' import matplotlib import matplotlib.pyplot as plt import matplotlib.ticker as mticker import matplotlib.dates as mdates import numpy as np from numpy import loadtxt import time totalStart = time.time() date,bid,ask = np.loadtxt('GBPUSD1d.txt', u...
PythonProgramming/Pattern-Recognition-for-Forex-Trading
machFX8.py
Python
mit
6,608
# Copyright (C) 2017 The YaCo Authors # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is ...
DGA-MI-SSI/YaCo
tests/tests/test_operands.py
Python
gpl-3.0
1,508
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Consultoria YarosLab (<http://www.yaroslab.com> - info@yaroslab.com). # # This program is free software: you can redistribute it and/or modif...
h3nrygr/version80
l10n_pe_yaros/sale/sale_typedocument.py
Python
gpl-3.0
1,825
# 514. Freedom Trail # DescriptionHintsSubmissionsDiscussSolution # DiscussPick One # In the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring", and use the dial to spell a specific keyword in order to open the door. # # Given a string ring, which r...
shawncaojob/LC
PY/514_freedom_trial.py
Python
gpl-3.0
4,396
# # Python Imaging Library # $Id$ # # stuff to read GIMP palette files # # History: # 1997-08-23 fl Created # 2004-09-07 fl Support GIMP 2.0 palette files. # # Copyright (c) Secret Labs AB 1997-2004. All rights reserved. # Copyright (c) Fredrik Lundh 1997-2004. # # See the README file for information on usage ...
ppizarror/Hero-of-Antair
data/images/pil/GimpPaletteFile.py
Python
gpl-2.0
1,337
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Taneli Leppä <taneli@crasman.fi> # # This file is part of Ansible (sort of) # # 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 o...
bcoca/ansible-modules-extras
system/gluster_volume.py
Python
gpl-3.0
16,136
# @ 2019 Akretion - www.akretion.com.br - # Magno Costa <magno.costa@akretion.com.br> # Renato Lima <renato.lima@akretion.com.br> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from .test_l10n_br_sale import L10nBrSaleBaseTest class TestL10nBrSaleSN(L10nBrSaleBaseTest): def setUp(self)...
kmee/l10n-brazil
l10n_br_sale/tests/test_l10n_br_sale_sn.py
Python
agpl-3.0
653
""" Construct headers for HTTP requests. """ def common_headers(token): """ Common headers sent to OpenStack's API's. """ headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': token } return headers def auth_headers(): """ ...
xnoder/osreporter
osreporter/http/headers.py
Python
mit
507
from django.conf.urls import url from django.contrib import admin from .views import ( post_list, post_create, post_detail, post_update, post_delete, ) urlpatterns = [ url(r'^$', post_list, name='list'), url(r'^create/$', post_create, name='create'), url(r'^(?P<slug>[\w-]+)/$', post_detail, name='detai...
DJMedhaug/BizSprint
posts/urls.py
Python
bsd-3-clause
516
import logging from twisted.internet import reactor from Tribler.community.market.core.tick import Tick from Tribler.pyipv8.ipv8.taskmanager import TaskManager class TickEntry(TaskManager): """Class for representing a tick in the order book""" def __init__(self, tick, price_level): """ :par...
Captain-Coder/tribler
Tribler/community/market/core/tickentry.py
Python
lgpl-3.0
4,941
import bpy import os # join them together ctrl+j bpy.ops.object.join() def get_override(area_type, region_type): for area in bpy.context.screen.areas: if area.type == area_type: for region in area.regions: if region.type == region_type: ...
22i/minecraft-voxel-blender-models
models/extra/blender-scripting/lib/iron_golem.py
Python
gpl-3.0
1,325
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ Clone of Nmap's first generation OS fingerprinting. """ import os from scapy.data import KnowledgeBase from scapy.c...
mytliulei/DCNRobotInstallPackages
windows/win32/scapy-2/scapy/modules/nmap.py
Python
apache-2.0
6,574