text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
from sqlalchemy import * from migrate import * meta = MetaData() def upgrade(migrate_engine): meta.bind = migrate_engine nodes_table = Table('nodes', meta, autoload=True) nodes_table_is_deleted = Column('is_deleted', Integer, default=False) nodes_table_is_deleted.create(nodes_table) def downgrade(mig...
kevenli/scrapydd
scrapydd/migrates/versions/018_nodes_is_deleted.py
Python
apache-2.0
458
0.002183
"""Constants for the Bluesound HiFi wireless speakers and audio integrations component.""" DOMAIN = "bluesound" SERVICE_CLEAR_TIMER = "clear_sleep_timer" SERVICE_JOIN = "join" SERVICE_SET_TIMER = "set_sleep_timer" SERVICE_UNJOIN = "unjoin"
nkgilley/home-assistant
homeassistant/components/bluesound/const.py
Python
apache-2.0
240
0.004167
#!/usr/bin/env python # -*- coding: utf-8 -*- ###################################################################### # Copyright (C) 2015 Canux CHENG # # All rights reserved # # Name: base.py # Author: Canux canuxcheng@gmail.com ...
crazy-canux/xomnibus
omnibus/base.py
Python
apache-2.0
6,156
0.000162
# Copyright 2020 Google 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 in writing, ...
google/gae-secure-scaffold-python3
src/securescaffold/factory.py
Python
apache-2.0
3,574
0
bl_info = { "name" : "text objects to-from xml", "author" : "chebhou", "version" : (1, 0), "blender" : (2, 7, 3), "location" : "file->export->text to-from xml", "discription" : "copys an text objectx from-to xml file", "wiki_url" : " https://github.com/chebhou", "tracker_url" : "https://...
chebhou/Text-from-to-.XML
text_io_xml.py
Python
gpl-2.0
3,503
0.015701
from rest_framework import serializers class MailTestSerializer(serializers.Serializer): EMAIL_HOST = serializers.CharField(max_length=1024, required=True) EMAIL_PORT = serializers.IntegerField(default=25) EMAIL_HOST_USER = serializers.CharField(max_length=1024) EMAIL_HOST_PASSWORD = serializers.CharF...
eli261/jumpserver
apps/settings/serializers.py
Python
gpl-2.0
1,295
0.003089
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. 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 # # U...
sunqm/pyscf
pyscf/mcscf/test/test_n2_df.py
Python
apache-2.0
10,791
0.00834
from django.core.management.base import BaseCommand from stream_analysis.utils import cleanup class Command(BaseCommand): """ Removes streaming data we no longer need. """ help = "Removes streaming data we no longer need." def handle(self, *args, **options): cleanup()
michaelbrooks/django-stream-analysis
stream_analysis/management/commands/cleanup_streams.py
Python
mit
300
0.003333
from vt_manager.models import * import os import xmlrpclib am = xmlrpclib.Server("https://expedient:expedient@192.168.254.193:8445/xmlrpc/plugin") #xml = open("/opt/ofelia/vt_manager/src/python/vt_manager/tests/xmltest.xml", "r").read() xml = open(os.path.join(os.path.dirname(__file__), "xmltest.xml"), "r").read() am...
dana-i2cat/felix
vt_manager/src/python/vt_manager/tests/testcreatesync.py
Python
apache-2.0
407
0.012285
from moment_plots import * np.random.seed(1) ts = test_series() s = ts.cumsum() ts2 = test_series() s2 = ts2.cumsum() s[20:50] = np.NaN s[120:150] = np.NaN fig, axes = plt.subplots(3, 1, figsize=(8, 10), sharex=True) ax0, ax1, ax2 = axes ax0.plot(s.index, s.values) ax0.plot(s2.index, s2.values) ax0.set_title('time...
Ziqi-Li/bknqgis
pandas/doc/plots/stats/moments_rolling_binary.py
Python
gpl-2.0
617
0
""" Repository for the basic Projection types, without any special dependencies or requirements. $Id$ """ __version__ = "$Revision$" from copy import copy from numpy import exp,ones,zeros,array,nonzero import param # So all Projections are present in this package from topo.base.projection import Projection from t...
jesuscript/topo-mpi
topo/projection/basic.py
Python
bsd-3-clause
15,525
0.012367
# 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. import BaseHTTPServer import os import threading class Responder(object): """Sends a HTTP response. Used with TestWebServer.""" def __init__(self, han...
s20121035/rk3288_android5.1_repo
external/chromium_org/chrome/test/chromedriver/test/webserver.py
Python
gpl-3.0
6,705
0.00865
from openerp.tests.common import TransactionCase class TestTax(TransactionCase): """Tests for taxes (account.tax) We don't really need at this point to link taxes to tax codes (account.tax.code) nor to companies (base.company) to check computation results. """ def setUp(self): super(T...
diogocs1/comps
web/addons/account/tests/test_tax.py
Python
apache-2.0
1,740
0.000575
# -*- coding: utf-8 -*- """ *************************************************************************** ConfigDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **************************...
NINAnor/QGIS
python/plugins/processing/gui/ConfigDialog.py
Python
gpl-2.0
10,846
0.00083
#!/usr/bin/env python # parse and construct FlightGear NET FDM packets # Andrew Tridgell, November 2011 # released under GNU GPL version 2 or later import struct, math class fgFDMError(Exception): '''fgFDM error class''' def __init__(self, msg): Exception.__init__(self, msg) self.message = 'fg...
kanjie128/test
pymavlink/fgFDM.py
Python
lgpl-3.0
9,572
0.007522
#!/usr/bin/env python # -*- coding: UTF-8 -*- import tornado from multiprocessing import Process from tornado.httpclient import AsyncHTTPClient repeat = 5 def handle_response(response): global repeat repeat -= 1 if response.error: print "err:%s"%(response.error,) else: print response...
shanghaiyangming/trouter
test/t.py
Python
gpl-3.0
1,035
0.018357
########################################################################## # # Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved. # Copyright (c) 2012, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
lucienfostier/gaffer
python/GafferUI/PathVectorDataPlugValueWidget.py
Python
bsd-3-clause
4,045
0.026452
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Ri...
adam111316/SickGear
lib/chardet/langgreekmodel.py
Python
gpl-3.0
12,867
0.343514
#!/usr/bin/env python # Copyright (c) 2013. Mark E. Madsen <mark@pytransmission.org> # # This work is licensed under the terms of the Apache Software License, Version 2.0. See the file LICENSE for details. """ Description here """ import unittest if __name__ == '__main__': # use the default shared TestLoader ...
mmadsen/pytransmission
runtests.py
Python
apache-2.0
709
0.002821
def mult(a, b): return a * b def div(a, b): return a / b
esquires/lvdb
test/temp2.py
Python
bsd-3-clause
66
0.015152
import sys from os.path import abspath, dirname, join import mongoengine sys.path.insert(0, '../..') DEBUG = True TEMPLATE_DEBUG = DEBUG ROOT_PATH = abspath(dirname(__file__)) ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.d...
hsr-ba-fs15-dat/python-social-auth
examples/django_me_example/example/settings.py
Python
bsd-3-clause
7,162
0.000279
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2014-2015, GEM Foundation # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the ...
g-weatherill/oq-risklib
openquake/calculators/scenario_risk.py
Python
agpl-3.0
5,466
0
# -*- coding: utf-8 -*- # Resource object code # # Created: Fri Dec 2 16:03:48 2011 # by: The Resource Compiler for PyQt (Qt v4.7.3) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x09\xbc\ \x2f\ \x2a\x6a\x73\x6c\x69\x6e\x74\x20\x73\x6c\x6f\x70\x7...
kanzure/pyphantomjs
pyphantomjs/resources.py
Python
gpl-3.0
354,476
0.000014
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011 Andrey Golovizin # # 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, ...
rybesh/pybtex
pybtex/database/output/bibtexml.py
Python
mit
3,696
0.001623
# coding=utf-8 # Author: Dennis Lutter <lad1337@gmail.com> # # # This file is part of SickRage. # # SickRage 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 opti...
Thraxis/pymedusa
sickbeard/blackandwhitelist.py
Python
gpl-3.0
6,272
0.001435
# Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? # Find all unique triplets in the array which gives the sum of zero. # Elements in a triplet (a,b,c) must be in non-descending order. (ie, a <= b <= c) # The solution set must not contain duplicate triplets. # Solution: # This ...
asraf209/leetcode
src/3SumClosest/main.py
Python
gpl-3.0
2,156
0.005102
# -*- coding: utf-8 -*- """ Test suite for the util module ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import unittest from pygments import util class FakeLexer(object): def analyse(text)...
djanowski/pygmentize
vendor/pygments/tests/test_util.py
Python
mit
5,303
0.001131
# import numpy as np import cv2 as cv if __name__ == "__main__": faceCascade = cv.CascadeClassifier(cv.data.haarcascades + 'haarcascade_frontalface_default.xml') eyeCascade = cv.CascadeClassifier(cv.data.haarcascades + 'haarcascade_eye.xml') # img = cv.imread('sachin.jpg') video_capture = cv.VideoCapt...
iproduct/course-social-robotics
09-image-recognition-opencv-dnn/cv2_haar_cascade_demo.py
Python
gpl-2.0
1,513
0.001983
""" Advanced Examples ================= In this section, we demonstrate how to go from the inner product to the discrete approximation for some special cases. We also show how all necessary operators are constructed for each case. """ #################################################### # # Import Packages # -...
simpeg/discretize
tutorials/inner_products/4_advanced.py
Python
mit
6,674
0.002248
import random class Zoo: noOfAnimals = 0 noOfZoos = 0 def __init__(self, animals, ticketPrice): Zoo.noOfAnimals += len(animals) Zoo.noOfZoos += 1 self.ticketPrice = ticketPrice self.animals = animals def __iter__(self): for animal in self.animals: ...
developerQuinnZ/this_will_work
student-work/JacobJanak/class_lessons/zoo.py
Python
mit
1,060
0.004717
# This file is part of the Hotwire Shell project API. # Copyright (C) 2007 Colin Walters <walters@verbum.org> # 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, includin...
desirable-objects/hotwire-shell
hotwire/builtins/pyeval.py
Python
gpl-2.0
4,083
0.008327
# -*- coding: utf-8 -*- import json from .entity import * class JubaManagerConfig(object): def __init__(self): self._global_zookeeper = '' self._visors = [] self._clusters = [] self._servers = [] self._proxies = [] @classmethod def from_json(cls, data): # TODO handle errors cfg = ...
kmaehashi/jubamgr
controller/lib/jubamgr/controller/config.py
Python
lgpl-2.1
1,500
0.009333
# -*- coding: utf-8 -*- """ Created on Fri Mar 17 10:48:09 2017 keras as tf api always use as an tf api In this case, we use Keras only as a syntactical shortcut to generate an op that maps some tensor(s) input to some tensor(s) output, and that's it. @author: hongbin """ import tensorflow as tf from keras import...
trhongbinwang/data_science_journey
deep_learning/keras/keras_as_tf_api.py
Python
apache-2.0
2,218
0.006763
#!/usr/bin/env python2 # -*- coding: utf8 -*- # from __future__ import unicode_literals ''' This file is part of FIXME Screen Calendar. FIXME Events 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...
gcmalloc/screen-calendar
screen.py
Python
gpl-3.0
5,346
0.001122
from django.conf.urls import patterns, url urlpatterns = patterns('fpuf.utils.views', url(r'^about/$', 'about', name ="varis_about_about" ) , url(r'^missatges/$', 'about', name ="varis_missatges_veure" ) , url(r'^condicions/$', 'condicions', name ="va...
ctrl-alt-d/fpuf
fpuf/utils/urls.py
Python
gpl-3.0
381
0.041995
# # Python class library loaded when the interpreter # is installed by PythonEmbed #-------------------------------------------------- # API for accessing GC data #-------------------------------------------------- # basic activity data def __GCactivity(join="repeat", activity=None): rd={} for x in range(0,GC.s...
amtriathlon/GoldenCheetah
src/Resources/python/library.py
Python
gpl-2.0
3,658
0.030618
# pylint: disable=missing-docstring, unused-variable, pointless-statement, too-few-public-methods class WrapperClass(object): def method(self): var = +4294967296 self.method.__code__.co_consts
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/pylint/test/functional/test_compile.py
Python
apache-2.0
214
0.004673
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
uclouvain/OSIS-Louvain
attribution/tests/views/charge_repartition/common.py
Python
agpl-3.0
4,717
0.00212
import hashlib from datetime import datetime from flask import request from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from . import db, login_manager #pylint: disable-msg=E1101 @login_manager.user_loader def load_user(user_id): return User.query.get(in...
finnurtorfa/aflafrettir.is
app/models.py
Python
mit
8,023
0.018576
#!/usr/bin/env python # # git-p4.py -- A tool for bidirectional operation between a Perforce depot and git. # # Author: Simon Hausmann <simon@lst.de> # Copyright: 2007 Simon Hausmann <simon@lst.de> # 2007 Trolltech ASA # License: MIT <http://www.opensource.org/licenses/mit-license.php> # import optparse, sy...
TextusData/Mover
thirdparty/git-1.7.11.3/git-p4.py
Python
gpl-3.0
110,533
0.003655
import numpy as np import random import networkx as nx from operator import itemgetter import pandas as pd import sys import json import optparse ############################################################### #### CONCORDANCE, DISCORDANCE AND CREDIBILITY FUNCTIONS ###### #############################################...
enricopal/snowball_decision
decision_algorithm.py
Python
apache-2.0
25,944
0.026287
# -*- coding: utf-8 -*- # # Copyright (C) 2006 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.com/license.html. # # This software consists of vo...
Puppet-Finland/trac
files/spam-filter/tracspamfilter/filters/registration.py
Python
bsd-2-clause
4,192
0.000954
""" Interface for an output. """ from abc import ABCMeta, abstractmethod from typing import Optional, TextIO from prompt_toolkit.data_structures import Size from prompt_toolkit.styles import Attrs from .color_depth import ColorDepth __all__ = [ "Output", "DummyOutput", ] class Output(metaclass=ABCMeta): ...
jonathanslenders/python-prompt-toolkit
prompt_toolkit/output/base.py
Python
bsd-3-clause
7,955
0
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/identity.py
Python
mit
1,517
0
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
skosukhin/spack
var/spack/repos/builtin/packages/scons/package.py
Python
lgpl-2.1
1,645
0.000608
# Copyright 2018 - Nokia # # 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, sof...
openstack/vitrage
vitrage/tests/unit/datasources/prometheus/test_prometheus_transformer.py
Python
apache-2.0
6,042
0
#!/usr/bin/env python2 # Copyright (c) 2014 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 re-org scenarios with a mempool that contains transactions # that spend (directly or indirectly) coin...
wederw/bitcoin
qa/rpc-tests/mempool_coinbase_spends.py
Python
mit
3,823
0.004708
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@opencraft.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Soft...
brousch/opencraft
instance/models/server.py
Python
agpl-3.0
9,912
0.001917
# TODO: provide a transition checker that prevents a feedback loop, inconsistent state. # in user db that way user can eliminate store step on the receive side. from charm.core.engine.util import * from charm.toolbox.enum import Enum from math import log, ceil debug = False # standardize responses between client and ...
JHUISI/charm
charm/core/engine/protocol.py
Python
lgpl-3.0
10,994
0.011825
import time import json import os # Returns the list of reminders as dict. # @return reminders - Python Dictionary def get_reminders(): file = "{}/reminders.json".format(os.path.dirname(os.path.realpath(__file__))) with open(file, "r") as data_file: reminders = json.load(data_file) return reminders...
svimanet/IRC-Bob
modules/reminders.py
Python
unlicense
1,220
0.005738
"""Copyright 2008 Orbitz WorldWide 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...
criteo-forks/graphite-web
webapp/graphite/user_util.py
Python
apache-2.0
1,975
0
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=1> # Intercity Python API Development # <codecell> from bs4 import BeautifulSoup import requests import pickle loadSite = requests.get('http://www.intercity.co.nz/') siteData = loadSite.content blehData = siteData.split() blehData[0:20] siteD...
wcmckee/wcmckee-notebook
webData.py
Python
gpl-2.0
3,474
0.006621
# -*- coding: utf-8 -*- """ Created on Thu Jun 28 20:30:11 2018 @author: danielgodinez """ import numpy as np import random from astropy.io import fits from sklearn import decomposition import os from LIA import simulate from LIA import noise_models from LIA import quality_check from LIA import extract_features ...
dg7541/MicrolensingLCOGT
LIA/training_set.py
Python
gpl-3.0
12,474
0.00978
# -*- coding: utf-8 -*- # Author: Vincent Dubourg <vincent.dubourg@gmail.com> # (mostly translation, see implementation details) # License: BSD 3 clause from __future__ import print_function import numpy as np from scipy import linalg, optimize from ..base import BaseEstimator, RegressorMixin from ..metrics...
potash/scikit-learn
sklearn/gaussian_process/gaussian_process.py
Python
bsd-3-clause
35,041
0.000114
from unittest import TestCase from pydigmips import instructions, loaders class HexaLoaderTestCase(TestCase): def testAdd(self): i = ['1510', # 000 101 010 001 0000 '1C60', '2C60'] # 001 011 000 110 0000 o = [instructions.Add(5, 2, 1), instructions.Add(7, 0, 6), ...
ProgVal/pydigmips
tests/test_loaders.py
Python
mit
1,378
0.006531
#!/usr/bin/env python ''' Loader for all 2009 Dorado missions written for Monique's notice of bad depths in Dorado389_2009_084_02_084_02_decim.nc. Mike McCann MBARI 15 January 2013 @var __date__: Date of last svn commit @undocumented: __doc__ parser @status: production @license: GPL ''' import os import sys import d...
duane-edgington/stoqs
stoqs/loaders/MolecularEcology/load_dorado2009.py
Python
gpl-3.0
4,550
0.006813
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
rajalokan/nova
nova/policies/console_output.py
Python
apache-2.0
1,106
0
# -*- coding: utf-8 -*- """ This is part of WebScout software Docs EN: http://hack4sec.pro/wiki/index.php/WebScout_en Docs RU: http://hack4sec.pro/wiki/index.php/WebScout License: MIT Copyright (c) Anton Kuzmin <http://anton-kuzmin.ru> (ru) <http://anton-kuzmin.pro> (en) Job class for FormBruter module """ from class...
hack4sec/ws-cli
classes/jobs/FormBruterJob.py
Python
mit
479
0.006263
import os import requests import logging import json import redo log = logging.getLogger(__name__) PLATFORM_MAP = json.load(open( os.path.join(os.path.dirname(__file__), 'data', 'platform_map.json'))) def _retry_on_http_errors(url, auth, verify, params, errors): for _ in redo.retrier(sleeptime=5, max_sleept...
petemoore/funsize
funsize/balrog.py
Python
mpl-2.0
2,557
0
import fechbase class Records(fechbase.RecordsBase): def __init__(self): fechbase.RecordsBase.__init__(self) self.fields = [ {'name': 'FORM TYPE', 'number': '1'}, {'name': 'FILER COMMITTEE ID NUMBER', 'number': '2'}, {'name': 'ENTITY TYPE', 'number': '3'}, ...
h4ck3rm1k3/FEC-Field-Documentation
fec/version/v8_0/F9.py
Python
unlicense
2,852
0.000701
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # --------------------------------------------------------------------------...
dsgouda/autorest
Samples/2a-validation/Python/storage/storage_management_client.py
Python
mit
3,693
0.000542
# Copyright 2010 OpenStack Foundation # (c) Copyright 2012-2013 Hewlett-Packard Development Company, L.P. # # 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...
Metaswitch/calico-nova
nova/tests/unit/test_linuxscsi.py
Python
apache-2.0
5,951
0
__author__ = 'kiruba' import pandas as pd import matplotlib.pyplot as plt import mpld3 as m from mpl_toolkits.mplot3d import axes3d, Axes3D from matplotlib import rc from scipy.interpolate import griddata import numpy as np from matplotlib import cm from matplotlib.path import * from matplotlib.collections import PolyC...
Kirubaharan/hydrology
ch_591/ch_591_stage_area.py
Python
gpl-3.0
18,373
0.003973
# coding: utf-8 """ Kipartman Kipartman api specifications OpenAPI spec version: 1.0.0 Contact: -- Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class Part(object): """ NOTE: This class is auto gener...
turdusmerula/kipartman
kipartman/swagger_client/models/part.py
Python
gpl-3.0
13,785
0.001378
# Copyright 2013-2021 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 Xdotool(MakefilePackage): """fake keyboard/mouse input, window management, and more""" ...
LLNL/spack
var/spack/repos/builtin/packages/xdotool/package.py
Python
lgpl-2.1
1,385
0.004332
# Copyright (C) 2012 Vivek Haldar # # Take in a dict containing fetched RSS data, and output to printable files in # the current directory. # # Dict looks like: # feed_title -> [list of articles] # each article has (title, body). # # Author: Vivek Haldar <vh@vivekhaldar.com> import codecs import escpos from datetime i...
vivekhaldar/fetch_rss
output_prn.py
Python
gpl-3.0
928
0.001078
from setuptools import setup, find_packages XMODULES = [ "abtest = xmodule.abtest_module:ABTestDescriptor", "book = xmodule.backcompat_module:TranslateCustomTagDescriptor", "chapter = xmodule.seq_module:SequenceDescriptor", "combinedopenended = xmodule.combined_open_ended_module:CombinedOpenEndedDescri...
pku9104038/edx-platform
common/lib/xmodule/setup.py
Python
agpl-3.0
3,169
0.000947
import logging from google.appengine.api import channel from . import memc log = logging.getLogger(__name__) PUBSUB_PREFIX = 'pubsub' def _build_group_key(channel_id): return "%s:%s" % (PUBSUB_PREFIX, channel_id) def add_client(channel_id, client_id, time=channel.MAXIMUM_TOKEN_DURATION_MINUTES * 60): g...
pawciobiel/fgpst-gae
fgpst/utils/pubsub.py
Python
gpl-3.0
1,412
0.000708
import json import time def parseSearches(searchesFile, begintimeframe = 0, endtimeframe = int(time.time())) : searches = json.load(open(searchesFile, 'r')) listOfsearches = [] for search in searches["event"]: #a query can contain several timestap so special measurments need te be implemented in...
LeanVel/TakeoutsTimelining
SearchesParser.py
Python
gpl-3.0
857
0.014002
# 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...
karllessard/tensorflow
tensorflow/python/data/kernel_tests/window_test.py
Python
apache-2.0
10,592
0.005004
""" EGADS transforms algorithms. See EGADS Algorithm Documentation for more info. """ __author__ = "mfreer, ohenry" __date__ = "2017-01-08 11:42" __version__ = "1.2" import logging try: from interpolation_linear import * from isotime_to_elements import * from isotime_to_seconds import * from seconds_t...
eufarn7sp/egads-eufar
egads/algorithms/transforms/__init__.py
Python
bsd-3-clause
547
0.003656
class A: def __init__(self): self.x = 1 self.y = None def foo(self): a = self.y
IllusionRom-deprecated/android_platform_tools_idea
python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromMethod_after.py
Python
apache-2.0
97
0.020619
#!/usr/bin/env python3 # This file is a part of Templ # Copyright (C) 2012 Zachary Dziura # # 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...
jncormier24/Templ
templ/parser.py
Python
gpl-3.0
4,028
0.0072
############################################################################## # # Copyright (c) 2008-2011 Alistek Ltd (http://www.alistek.com) All Rights Reserved. # General contacts <info@alistek.com> # # WARNING: This program as such is intended to be used by professional # programmers who take th...
kailIII/emaresa
trunk.pe/report_aeroo_sample/report/parser.py
Python
agpl-3.0
1,951
0.003075
class Song(object): def __init__(self, lyrics): self.lyrics = lyrics def sing_me_a_song(self): for line in self.lyrics: print line happy_bday = Song(["Happy birthday to you", "I don't want to get sued", "So I'll stop right here"]) bulls_on_pa...
mshcruz/LearnPythonTheHardWay
ex40.py
Python
gpl-2.0
484
0.002066
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-10-14 01:45 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('home', '0005_instagrampointofinterest_cached_response'), ...
qpfiffer/blackdog
home/migrations/0006_textpointofinterest.py
Python
gpl-2.0
745
0.002685
''' (*)~--------------------------------------------------------------------------- Pupil - eye tracking platform Copyright (C) 2012-2017 Pupil Labs Distributed under the terms of the GNU Lesser General Public License (LGPL v3.0). See COPYING and COPYING.LESSER for license details. -----------------------------------...
fsxfreak/esys-pbi
src/pupil/pupil_src/player/vis_eye_video_overlay.py
Python
mit
12,941
0.017232
# $Id$ # import inc_const as const PJSUA = ["--null-audio --max-calls=1 --auto-answer=200 --no-tcp --srtp-secure 0 --use-srtp 2 --srtp-keying=0"] PJSUA_EXPECTS = [[0, "SRTP uses keying method SDES", ""], [0, "SRTP uses keying method DTLS-SRTP", ""] ]
asterisk/pjproject
tests/pjsua/scripts-sipp/uac-srtp-sdes-reinv-dtls.py
Python
gpl-2.0
258
0.01938
#!/usr/bin/env python """ Copyright 2012 GroupDocs. 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...
liosha2007/temporary-groupdocs-python3-sdk
groupdocs/models/UpdateQuestionnaireExecutionResult.py
Python
apache-2.0
944
0.006356
"""Threads to be used by the SCRP server""" # Copyright (C) 2015 Zhang NS, Zifan Li, Zichao Li # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your o...
GCC15/tcp-chatroom
server/python/core/threads.py
Python
gpl-2.0
5,338
0.000187
"""A spectral clusterer class to perform clustering.""" import numpy as np from spectralcluster import constraint from spectralcluster import custom_distance_kmeans from spectralcluster import laplacian from spectralcluster import refinement from spectralcluster import utils RefinementName = refinement.RefinementName...
wq2012/SpectralCluster
spectralcluster/spectral_clusterer.py
Python
apache-2.0
8,653
0.004969
# Copyright The PyTorch Lightning team. # # 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...
williamFalcon/pytorch-lightning
tests/accelerators/ddp_model.py
Python
apache-2.0
2,010
0.000498
import re from collections import namedtuple import sqlparse from django.db.backends.base.introspection import ( BaseDatabaseIntrospection, FieldInfo as BaseFieldInfo, TableInfo, ) from django.db.models.indexes import Index FieldInfo = namedtuple('FieldInfo', BaseFieldInfo._fields + ('pk',)) field_size_re = re....
sametmax/Django--an-app-at-a-time
ignore_this_directory/django/db/backends/sqlite3/introspection.py
Python
mit
18,775
0.001704
import numpy as np from .distribution import Distribution from scipy.stats import multivariate_normal from scipy.optimize import minimize class GaussianDistribution(Distribution): """ Gaussian distribution with fixed covariance matrix. The parameters vector represents only the mean. """ def __init...
carloderamo/mushroom
mushroom_rl/distributions/gaussian.py
Python
mit
14,862
0.005517
import subprocess import logging import os, sys, traceback import urllib from fluxclient import check_platform from .misc import BinaryUploadHelper, BinaryHelperMixin, OnTextMessageMixin logger = logging.getLogger("API.SLICING") StlSlicer = None StlSlicerCura = None def get_default_cura(): return os.environ["c...
flux3dp/fluxghost
fluxghost/api/stl_slicing_parser.py
Python
agpl-3.0
13,536
0.002512
from unittest import mock import pytest import stripe from model_mommy import mommy from rest_framework.reverse import reverse from restframework_stripe import models from restframework_stripe.test import get_mock_resource @mock.patch("stripe.Customer.save") @mock.patch("stripe.Customer.retrieve") @pytest.mark.dja...
andrewyoung1991/django-restframework-stripe
tests/test_customer.py
Python
bsd-2-clause
4,147
0.001929
import os import sys from optparse import make_option from django.core.management.base import BaseCommand from django.core.management.color import no_style try: set except NameError: from sets import Set as set # For Python 2.3 def compile_messages(locale=None): basedirs = (os.path.join('conf', 'local...
diofeher/django-nfa
django/core/management/commands/compilemessages.py
Python
bsd-3-clause
2,462
0.004468
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Nils Weiss <nils@we155.de> # This program is published under a GPLv2 license # scapy.contrib.description = ISO-TP (ISO 15765-2) Native Socket Library # scapy.contrib.status = library import ctypes from ctypes....
gpotter2/scapy
scapy/contrib/isotp/isotp_native_socket.py
Python
gpl-2.0
14,939
0
############################## ### ALGO MODULE SETUP TOOL ### ############################## from distutils.core import setup setup(name='algo', version='1.0', python_modules=['alg...
MicBrain/Python-algo-Module
setup.py
Python
apache-2.0
2,077
0.029851
#------------------------------------------------------------------------------ # Copyright 2013 Esri # 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...
JudTown17/solutions-geoprocessing-toolbox
capability/test/test_erg_tools/TestUtilities.py
Python
apache-2.0
1,365
0.003663
# parser2.py # parses sentences from the CSV files # J. Hassler Thurston # RocHack Hackathon December 7, 2013 # Modified December 11, 2013 import nltk from random import choice cfg_file = 'upenn_grammar.cfg' tbank_productions = [] nonterminals = [] rightside = [] def get_initial_rules(): global tbank_productions, n...
jthurst3/newspeeches
parser2.py
Python
mit
1,487
0.019502
############################################################################## # # Copyright (C) 2019-2020 Compassion CH (http://www.compassion.ch) # @author: Christopher Meier <dev@c-meier.ch> # # The licence is in the file __manifest__.py # ####################################################################...
CompassionCH/compassion-switzerland
website_compassion/controllers/cms_form.py
Python
agpl-3.0
1,098
0
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import matplotlib.cbook as cbook import matplotlib.pyplot as plt import matplotlib.axes as maxes #import matplotlib.colorbar as mcolorbar from . import colorbar as mcolorbar import matplotlib as mp...
Reagankm/KnockKnock
venv/lib/python3.4/site-packages/mpl_toolkits/axes_grid1/axes_grid.py
Python
gpl-2.0
31,905
0.001254
#!/usr/bin/env python """ moveit_attached_object_demo.py - Version 0.1 2014-01-14 Attach an object to the end-effector and then move the arm to test collision avoidance. Created for the Pi Robot Project: http://www.pirobot.org Copyright (c) 2014 Patrick Goebel. All rights reserved. This...
fujy/ROS-Project
src/rbx2/rbx2_arm_nav/scripts/moveit_attached_object_demo.py
Python
mit
4,719
0.008264
# -*- coding: utf-8 -*- """ This scripts sets an initial layout for the ProEMOnline software. It uses the PyQtGraph dockarea system and was designed from the dockarea.py example. Contains: Left column: Observing Log Center column: Plots Right column: Images and Process Log Menu bar """ import pyqtgraph as pg from p...
ccd-utexas/ProEMOnline
layout.py
Python
mit
7,341
0.016347
__author__ = "Harish Narayanan" __copyright__ = "Copyright (C) 2009 Simula Research Laboratory and %s" % __author__ __license__ = "GNU GPL Version 3 or any later version" from cbc.twist import * from sys import argv """ DEMO - Twisting of a hyperelastic cube """ class Twist(StaticHyperelasticity): """ Definition...
hnarayanan/twist
demo/static/twist.py
Python
gpl-3.0
2,606
0.02878
from . import statuscodes from .exceptions import * from . import basedatamodel
Zashel/zrest
zrest/__init__.py
Python
apache-2.0
80
0
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-05-15 06:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pages', '0002_auto_20160512_0259'), ] operations = [ migrations.CreateModel(...
samdowd/drumm-farm
pages/migrations/0003_auto_20160515_0618.py
Python
mit
2,802
0.002855
#!/usr/bin/env python """ This file is part of piPi project. Copyright (C) 2015 CSIOM, http://www.csiom.com Authors: The Csiom Team piPi 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...
CSIOM/piPi
src/managers/models.py
Python
gpl-3.0
2,864
0.005587
from pik.flights import Flight import csv import sys reader = csv.reader(sys.stdin) for flight in Flight.generate_from_csv(reader): print flight
tazle/pik-laskutin
import-flights.py
Python
gpl-2.0
151
0