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
"""Elliptical geometrical entities. Contains * Ellipse * Circle """ from sympy.core import S, C, sympify, pi, Dummy from sympy.core.logic import fuzzy_bool from sympy.simplify import simplify, trigsimp from sympy.functions.elementary.miscellaneous import sqrt, Max, Min from sympy.functions.elementary.complexes impor...
amitjamadagni/sympy
sympy/geometry/ellipse.py
Python
bsd-3-clause
34,601
# # (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 d...
alxgu/ansible
lib/ansible/plugins/cliconf/__init__.py
Python
gpl-3.0
21,463
#!/usr/bin/env python import os from collections import defaultdict # gemini imports import GeminiQuery from GeminiQuery import select_formatter from gemini_constants import * from gemini_region import add_region_to_query from gemini_subjects import (get_subjects, get_subjects_in_family, g...
brentp/gemini
gemini/gemini_query.py
Python
mit
5,251
import datetime from app import db from flask.ext.restless import ProcessingException class TransactionLog(db.Model): __tablename__ = 'transaction_log' id = db.Column('id', db.Integer, primary_key=True) user_id = db.Column('user_id', db.Integer, db.ForeignKey('user.id')) type = db.Column('type', db.St...
FakeYou/voerr
src/backend/app/api/models/transaction_log.py
Python
mit
1,290
#!/usr/bin/env python3 from pathlib import Path import rdflib from pyontutils.utils import rowParse, relative_path from pyontutils.namespaces import ilxtr from neurondm.lang import * from neurondm.phenotype_namespaces import BBP class NeuronMarkram2015(NeuronEBM): owlClass = ilxtr.NeuronMarkram2015 shortname...
tgbugs/pyontutils
neurondm/neurondm/models/ma2015.py
Python
mit
5,398
# flake8: noqa: F403, F405 from tests.core import mock from trakt import Trakt from datetime import datetime from dateutil.tz import tzutc from hamcrest import * from httmock import HTTMock def test_basic(): with HTTMock(mock.fixtures, mock.unknown): with Trakt.configuration.auth('mock', 'mock'): ...
fuzeman/trakt.py
tests/sync/playback/test_shows.py
Python
mit
1,798
''' Copyright Adam Young 2012-2016 ''' import logging from osc_lib import exceptions """ At the start of an application, the factories used to create instances of the various types of classes get registered with an associated scope. Scope and Resolvers are tightly coupled objects. The clients of the resolver c...
admiyo/ossipee
depend.py
Python
apache-2.0
5,025
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
unomena/suds
suds/client.py
Python
lgpl-3.0
25,982
# This file is part of Radicale Server - Calendar Server # Copyright © 2008 Nicolas Kandel # Copyright © 2008 Pascal Halter # Copyright © 2008-2017 Guillaume Ayoub # # This library 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...
jaesivsm/Radicale
radicale/tests/helpers.py
Python
gpl-3.0
1,174
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-08-14 17:25 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("popolo", "0009_move_extra_person_data_to_base"), ("candidates", "0045_delete_membership_extr...
DemocracyClub/yournextrepresentative
ynr/apps/candidates/migrations/0046_delete_person_extra.py
Python
agpl-3.0
394
# $Id: 161_err_replaces_dlg_not_found.py 369517 2012-07-01 17:28:57Z file $ import inc_sip as sip import inc_sdp as sdp sdp = \ """ v=0 o=- 0 0 IN IP4 127.0.0.1 s=pjmedia c=IN IP4 127.0.0.1 t=0 0 m=audio 4000 RTP/AVP 0 """ pjsua_args = "--null-audio --auto-answer 200" extra_headers = "Replaces: abcd;from_tag=1\r\n" i...
fluentstream/asterisk-p2p
res/pjproject/tests/pjsua/scripts-sendto/161_err_replaces_dlg_not_found.py
Python
gpl-2.0
503
from sqlalchemy.orm.session import Session, sessionmaker import transaction from sqlalchemy.orm.scoping import scoped_session from zope.sqlalchemy.datamanager import ZopeTransactionExtension from sqlalchemy.ext.declarative.api import declarative_base class MySession(Session): """This allow us to use the flask-admi...
ArneBab/gamification-engine
gengine/metadata.py
Python
mit
1,091
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-06-05 13:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('models', '0002_auto_20170604_0404'), ] operations = [ migrations.AddField( ...
eHattori/django-model-architecture
api/models/migrations/0003_user_other_name.py
Python
mit
461
import numpy as np import matplotlib.pyplot as plt from neupy import algorithms, environment environment.reproducible() plt.style.use('ggplot') input_train = np.reshape(np.linspace(0, 2 * np.pi, 100), (100, 1)) input_test = np.reshape(np.sort(2 * np.pi * np.random.random(50)), (50, 1)) target_train = np.sin(input_...
stczhc/neupy
examples/memory/cmac_basic.py
Python
mit
673
"""Container and Namespace classes""" import beaker.util as util if util.py3k: try: import dbm as anydbm except: import dumbdbm as anydbm else: import anydbm import cPickle import logging import os import time from beaker.exceptions import CreationAbortedError, MissingCacheParameter from b...
abdesslem/malwareHunter
web/controller/beaker/container.py
Python
gpl-2.0
23,351
from __future__ import absolute_import from . import mnist from . import imdb from . import reuters from . import cifar10 from . import cifar100 from . import boston_housing
baojianzhou/DLReadingGroup
keras/keras/datasets/__init__.py
Python
apache-2.0
175
class Team: def __init__(self, title=None, score=None, founder=None, member_count=None, year=None, team_type=None, location=None): self.title = title if score is None: self.score = 0 else: self.score = score self.founder = founder if member_cou...
itucsdb1510/itucsdb1510
team.py
Python
gpl-3.0
597
from gi.repository import Gtk # help from http://python-gtk-3-tutorial.readthedocs.org/en/latest/builder.html #import Gtk.builder #For The Node Controls import subprocess builder = Gtk.Builder() builder.add_from_file("MainWindow.glade") MainWindow = builder.get_object("MainWindow") ToggleServerBtn = builder.get_o...
acronamydesign/Foxhole
Main.py
Python
mit
1,252
class X: def stuff(self): pass x = X() f = getattr(x, "stuff") print f fu = getattr(X, "stuff") print fu
ArcherSys/ArcherSys
skulpt/test/run/t228.py
Python
mit
117
from pysqlite2 import dbapi2 as sqlite3 class Point(object): def __init__(self, x, y): self.x, self.y = x, y def __conform__(self, protocol): if protocol is sqlite3.PrepareProtocol: return "%f;%f" % (self.x, self.y) con = sqlite3.connect(":memory:") cur = con.cursor() p = Point(4...
waqasbhatti/astroph-coffee
pysqlite/doc/includes/sqlite3/adapter_point_1.py
Python
mit
384
from orphics.tools.curvedSky import slowRotatorGtoC import healpy as hp import sys inFile = sys.argv[1] outFile = sys.argv[2] randHp = hp.read_map(inFile) retMap = slowRotatorGtoC(randHp,hp.get_nside(randHp)) hp.write_map(outFile,retMap)
msyriac/orphics
scripts/rotateMapGtoC.py
Python
bsd-2-clause
243
# -*- coding: utf-8 -*- # Author: Leonardo Pistone # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or...
hurrinico/stock-logistics-workflow
stock_dropshipping_dual_invoice/__openerp__.py
Python
agpl-3.0
1,232
#!/usr/bin/env python2.7 # Copyright 2015 gRPC authors. # # 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 l...
endlessm/chromium-browser
third_party/grpc/src/src/c-ares/gen_build_yaml.py
Python
bsd-3-clause
5,867
from sympy import print_gtk, sin, raises from sympy.utilities.pytest import XFAIL # this test fails if python-libxml2 isn't installed. We don't want to depend on # anything with SymPy @XFAIL def test_1(): from sympy.abc import x print_gtk(x**2, start_viewer=False) print_gtk(x**2+sin(x)/4, start_viewer=Fals...
mattpap/sympy-polys
sympy/printing/tests/test_gtk.py
Python
bsd-3-clause
429
from django.contrib import admin from . import models @admin.register(models.Pingback) class PingbackAdmin(admin.ModelAdmin): list_display = ('package_name', 'unique_count', 'count', 'last_seen', 'first_seen', 'blocked', 'first_seen_blocked') list_filter = ('repository', 'last_seen', 'blocked') @admin.reg...
benjaoming/pytosquatting
pingback/admin.py
Python
gpl-3.0
446
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache/incubator-singa
examples/gan/lsgan.py
Python
apache-2.0
6,650
""" Cached, database-backed sessions. """ import logging from django.conf import settings from django.contrib.sessions.backends.db import SessionStore as DBStore from django.core.cache import caches from django.core.exceptions import SuspiciousOperation from django.utils import timezone from django.utils.encoding imp...
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/Django-1.9-py2.7.egg/django/contrib/sessions/backends/cached_db.py
Python
artistic-2.0
2,861
''' This module subclasses CmdGdb to provide a GDB command processor for the Leon core. It assumes a lower-level transport, such as that provided by leonmem. When you construct the CmdProcessor object, pass it the low-level transport object as the ahb. Copyright (C) 2011 by Patrick Maupin. All rights reserved. Lice...
E3V3A/playtag
playtag/leon3/gdbproc.py
Python
mit
9,236
# This program computes the delay between the different gene segments using the # convolved Gaussian process framework for RNA pol-II dynamics # # Ciira wa Maina, 2013 # Dedan Kimathi University of Technology. # Nyeri-Kenya import sys import numpy as np import pylab as pb import conv_gp_funcs as cgf import scipy a...
ciiram/PyPol_II
PyPolII.py
Python
bsd-3-clause
5,281
""" Nodes that use web services to do something. """ import json import httplib2 import urllib from BeautifulSoup import BeautifulSoup from nodetree import node, exceptions from . import base from .. import stages class WebServiceNodeError(exceptions.NodeError): pass class BaseWebService(node.Node, base.TextW...
mikesname/python-ocrlab
ocrsite/ocrlab/nodes/web.py
Python
mit
3,561
# encoding: 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 'LatestEntriesPlugin.tagged' db.add_column('cmsplugin_latestentriesplugin', 'tagged', self.gf('djan...
divio/cmsplugin-blog
cmsplugin_blog/migrations/0015_auto__add_field_latestentriesplug.py
Python
bsd-3-clause
7,566
#Import accel module from rstem import accel from time import sleep #Initialze accelerometer on i2c bus 1, on early Pi's this may be 0 instead accel.init(1) #Loop to display values while True: force = accel.read() #Returns a tuple of the form (x, y, z) acceleration angles = accel.angles() #Returns a...
scottsilverlabs/raspberrystem
rstem/projects/accel_basics/accel_readout.py
Python
apache-2.0
606
import logging import sys import os.path import json from pysam import AlignmentFile from PyMaSC import entrypoint, logging_version from PyMaSC.utils.parsearg import get_plot_parser from PyMaSC.utils.logfmt import set_rootlogger from PyMaSC.utils.calc import filter_chroms from PyMaSC.pymasc import prepare_output, PLO...
ronin-gw/PyMaSC
PyMaSC/plot.py
Python
mit
9,324
# Copyright (c) Mathias Kaerlev 2011-2012. # This file is part of pyspades. # pyspades 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...
Lensman/pysnip
examples/test_serverbrowser.py
Python
gpl-3.0
872
from django.conf import settings from django.contrib import admin from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.gis.db import models from django.utils.translation import ugettext as _ from leaflet.admin import LeafletGeoAdmin from modeltranslation.admin import TranslationAdmin from...
aapris/linkedevents
events/admin.py
Python
bsd-3-clause
3,122
# 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 https://mozilla.org/MPL/2.0/. from selenium.webdriver.common.by import By from pages.base import BasePage class FirefoxWelcomePage12(BasePage): ...
mozilla/bedrock
tests/pages/firefox/welcome/page12.py
Python
mpl-2.0
579
class Solution(object): def isNumber(self, s): """ :type s: str :rtype: bool """ begin, last = 0, len(s) - 1 # while begin <= last and s[begin] == ' ': begin += 1 while begin <= last and s[last] == ' ': last -= 1 # ...
youhusky/Facebook_Prepare
Wepay and OfferUp/065. Valid Number.py
Python
mit
1,119
import gc import numpy as np import xarray as xr from xarray.ufuncs import sign as xr_sign from . import dc_utilities as utilities from .dc_utilities import create_default_clean_mask from datetime import datetime import warnings def _tsmi(dataset): out = (dataset.red + dataset.green) * 0.0001 / 2 return out.w...
ceos-seo/data_cube_utilities
data_cube_utilities/dc_water_quality.py
Python
apache-2.0
3,611
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individuals, # list...
ganeshgore/myremolab
server/src/voodoo/gen/coordinator/CoordAddress.py
Python
bsd-2-clause
5,387
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-10-15 00:01 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('geonode_client', '0004_auto_20180416_1319'), ] operations = [ migrations.RemoveField( model_name='geonodethem...
tomkralidis/geonode
geonode/client/migrations/0005_auto_20181015_1201.py
Python
gpl-3.0
543
## Copyright (C) 2010 Miguel Gonzalez <enoelrocotiv@gmail.com> ## Copyright (C) 2010 Oscar Iglesias <osc.iglesias@gmail.com> ## ## This file is part of rs232-obd-sim.py. ## ## rs232-obd-sim.py is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public L...
mykoch/rs232-obd-sim
lib/IC.py
Python
gpl-3.0
5,598
# 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 ...
SUSE/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/compute/v2015_06_15/models/diagnostics_profile.py
Python
mit
1,117
def get_default(): return { "path": "", "description": "", "method": "GET", "postdata": None }
jeroanan/Gyroscope
Config/PageDefaults.py
Python
mit
134
""" Use lldb Python API to disassemble raw machine code bytes """ from __future__ import print_function import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class Disassemble_VST1_64(TestBase): mydir = TestBase.compute_mydir(__file__) ...
apple/swift-lldb
packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
Python
apache-2.0
1,898
""" WSGI config for d3matt project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "d3matt.settings") from django.core.wsg...
d3matt/d3matt.com
src/d3matt/d3matt/wsgi.py
Python
bsd-2-clause
387
#!/usr/bin/env python # -*- coding: utf-8 -*- # # baudline.py # # Copyright 2013 Balint Seeber <balint@crawfish> # # 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 th...
latincom2015/gr-baz
python/baudline.py
Python
gpl-3.0
5,680
from routersploit.modules.creds.cameras.arecont.ssh_default_creds import Exploit def test_check_success(target): """ Test scenario - testing against SSH server """ exploit = Exploit() assert exploit.target == "" assert exploit.port == 22 assert exploit.threads == 1 assert exploit.defaults == ...
dasseclab/dasseclab
clones/routersploit/tests/creds/cameras/arecont/test_ssh_default_creds.py
Python
gpl-2.0
594
import re from unicodedata import normalize import string from urllib.request import urlopen from urllib.parse import urlencode import json from rdflib import Literal from rdflib.namespace import RDF, FOAF from ns import ns_party def str2id(s): s = normalize('NFD', s.lower()) s = s.replace('-', '_').replace(...
hsoft/dgeq-rdf
util.py
Python
bsd-3-clause
1,571
from pydevd_constants import * import pydevd_tracing import sys import pydev_log import pydevd_import_class _original_excepthook = None _handle_exceptions = None import _pydev_threading as threading threadingCurrentThread = threading.currentThread from pydevd_comm import GetGlobalDebugger class ExceptionBreakpoin...
dannyperry571/theapprentice
script.module.pydevd/lib/pydevd_breakpoints.py
Python
gpl-2.0
5,233
from django.contrib.postgres.fields import ArrayField from django.utils import timezone from django.db import models from osf.utils.fields import NonNaiveDateTimeField from website import settings from osf.models.base import BaseModel, ObjectIDMixin from osf.utils.datetime_aware_jsonfield import DateTimeAwareJSONField...
laurenrevere/osf.io
osf/models/archive.py
Python
apache-2.0
6,191
import awsgi import json from flask import Flask, url_for with open('.context', 'r') as f: gordon_context = json.loads(f.read()) app = Flask(__name__) @app.route('/') def index(): return 'hello world! <a href="%s">foo</a>' % url_for('foo'), 200 @app.route('/foo') def foo(): return 'baaaaa!', 200 # The ...
jorgebastida/gordon
examples/flask/helloworld/app/main.py
Python
bsd-3-clause
892
N, C = map(int, input().split()) L = [int(input()) for _ in range(N)] L.sort(reverse=True) count = 0 j = N - 1 for i in range(N): if i == j: count += 1 if i >= j: break if L[i] + L[j] + 1 <= C: count += 1 j -= 1 else: count += 1 print(count)
y-sira/atcoder
ddcc2017-qual/c.py
Python
mit
304
# Copyright 2011 Justin Santa Barbara # 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 requ...
luzheqi1987/nova-annotation
nova/tests/unit/integrated/integrated_helpers.py
Python
apache-2.0
5,399
# Copyright (c) 2010-2012 OpenStack Foundation # # 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...
nadeemsyed/swift
swift/common/ring/ring.py
Python
apache-2.0
20,114
import unittest, os, subprocess,fnmatch from igf_data.utils.fileutils import get_temp_dir,remove_dir from igf_data.process.singlecell_seqrun.mergesinglecellfastq import MergeSingleCellFastq class MergeSingleCellFastq_testA(unittest.TestCase): def setUp(self): try: self.samplesheet_file='data/singlecell_dat...
imperial-genomics-facility/data-management-python
test/process/mergesinglecellfastq_test.py
Python
apache-2.0
1,878
# Copyright (c) 2009 Bea Lam. All rights reserved. # # This file is part of LightBlue. # # LightBlue 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 l...
Navdy/lightblue-0.4
src/mac/_lightblue.py
Python
gpl-3.0
20,544
""" Utility methods to print system info for debugging adapted from :func:`pandas.show_versions` """ # License: BSD 3 clause import platform import sys import importlib def _get_sys_info(): """System information Return ------ sys_info : dict system and Python version information """ ...
vortex-ape/scikit-learn
sklearn/utils/_show_versions.py
Python
bsd-3-clause
2,551
import sys # check python version if sys.version_info < (3, 4, 0): print("CloudBot requires Python 3.4 or newer.") sys.exit(1) import json import logging import logging.config import os __version__ = "1.0.9" __all__ = ["clients", "util", "bot", "client", "config", "event", "hook", "permissions", "plugin", "...
valesi/CloudBot
cloudbot/__init__.py
Python
gpl-3.0
3,034
############### Attention! ############## # This lib is only to test-hack your # # possession. Dont hack other files / # # servers without written approval!! # # # # I am not get any damage!!! # ######################################### # This program is...
letsCodeMyLife/hackLib
hackLib/__init__.py
Python
gpl-3.0
15,048
"""Tools for spectral analysis. """ import numpy as np from scipy import fft as sp_fft from . import _signaltools from .windows import get_window from ._spectral import _lombscargle from ._arraytools import const_ext, even_ext, odd_ext, zero_ext import warnings __all__ = ['periodogram', 'welch', 'lombscargle', 'csd'...
zerothi/scipy
scipy/signal/_spectral_py.py
Python
bsd-3-clause
74,381
#!/usr/bin/env python # -*- encoding: utf-8 -*- class AuthorizationError(Exception): """ The client encountered an HTTP 403 error and is passing it on to the user. The url property will contain the url in question, the reason property will contain the excuse the server sent. """ url = None ...
n3storm/caldav
caldav/lib/error.py
Python
gpl-3.0
714
# -*- coding: utf-8 -*- from flask import Flask, request, session from flask_login import LoginManager from flask_wtf.csrf import CSRFProtect from flask_sqlalchemy import SQLAlchemy from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from flask_babel import Babel from flask_babel import ...
lyshie/afc-github
app/__init__.py
Python
gpl-3.0
6,042
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/contrib/lite/toco/toco_flags.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from goog...
ryfeus/lambda-packs
Keras_tensorflow_nightly/source2.7/tensorflow/contrib/lite/toco/toco_flags_pb2.py
Python
mit
8,125
#!/usr/bin/python # -*- coding: utf-8 -*- #Script by: Jesús Redondo García #Date: 28-10-2014 #Script to get the needed metadata. import sys import codecs print '\nFill the following fields about the catalog.' print 'If you need info about each field please visit: https://github.com/jesusredondo/ckanext-federatedato...
jesusredondo/ckanext-federgob
ckanext/federgob/FDG/config.py
Python
mit
2,344
# -*- coding: utf-8 -*- # Copyright 2022 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...
googleapis/python-video-stitcher
tests/unit/gapic/stitcher_v1/test_video_stitcher_service.py
Python
apache-2.0
260,806
#!/bin/env python import urllib2 import os import stat import commands import sys import signal class CFG: """ DIRAC independent version of the CFG class to interpret cfg files """ def __init__( self, cfgData = "" ): self.__data = {} self.__children = {} if cfgData: self.parse( cfgData ) d...
hgiemza/DIRAC
Core/scripts/dirac-install-client.py
Python
gpl-3.0
16,948
import os import unittest os.environ.setdefault('HRZ_CONFIG', 'conf.py') from hrz import hrz class HrzTestCase(unittest.TestCase): """ Horizon test base class """ def setUp(self): self.app = hrz.app.test_client()
TeamHrz/website
tests/__init__.py
Python
mit
240
# 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. DEPS = [ 'git', 'recipe_engine/context', 'recipe_engine/path', 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine/raw_io', 'r...
Shouqun/node-gn
tools/depot_tools/recipes/recipe_modules/git/examples/full.py
Python
mit
5,612
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2021 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...
forkbong/qutebrowser
qutebrowser/browser/hints.py
Python
gpl-3.0
44,174
# -*- coding: utf-8 -*- # # django-registration documentation build configuration file, created by # sphinx-quickstart on Mon Jun 22 02:57:42 2009. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated f...
rulz/django-registration
docs/conf.py
Python
bsd-3-clause
6,469
import tensorflow as tf import numpy import scipy.io #from tensorflow.python.client import timeline import time percorsoDati = "/home/protoss/Documenti/TESI/wn100bkp/data/dati9mesi108HWI.mat" #percorsoDati = "/home/iurilarosa/dati/dati9mesi108HWI.mat" tFft = 8192 #tFft = 4096 tObs = 9 #mesi tObs = tObs*30*24*60*60 #...
iurilarosa/thesis
codici/Archiviati/solohough.py
Python
gpl-3.0
5,443
import os import socket from flask import Flask, render_template, url_for, json, jsonify, request from datetime import datetime import pytz app = Flask(__name__) @app.route("/") def index(): try: myopenaps_dir = os.environ['OPENAPS_DIR'] except KeyError: myopenaps_dir = "/root/myopenaps/" d...
PieterGit/oref0
www/app.py
Python
mit
3,864
#!/usr/bin/env python3 # Copyright (c) 2015-2019 Savoir-faire Linux Inc. # Author: Adrien Béraud <adrien.beraud@savoirfairelinux.com> # # 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 ver...
savoirfairelinux/opendht
python/tools/pingpong.py
Python
gpl-3.0
2,106
from django.apps import AppConfig class ConversationConfig(AppConfig): name = 'conversation' def ready(self): import conversation.signals
jeromecc/doctoctocbot
src/conversation/apps.py
Python
mpl-2.0
156
#!/usr/bin/env python #import pygtk #pygtk.require('2.0') #import gtk from gi.repository import Gtk from gi.repository import Gdk #from gi.repository import GObject import getopt import sys import liblo import math import threading import time import signal Gdk.threads_init() #gtk.gdk.threads_init() def db_to_coeff(...
voidseg/jack-volume
jvctl.py
Python
gpl-2.0
12,441
############################################################################## # # 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
assessments/business/score_encoding_sheet.py
Python
agpl-3.0
12,770
# Phatch - Photo Batch Processor # Copyright (C) 2007-2008 www.stani.be # # 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...
anish/phatch
phatch/actions/color_to_alpha.py
Python
gpl-3.0
14,634
# coding=utf-8 # This file is part of SickChill. # # URL: https://sickchill.github.io # Git: https://github.com/SickChill/SickChill.git # # SickChill 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 vers...
dfalt974/SickRage
sickchill/media/GenericMedia.py
Python
gpl-3.0
3,435
# Twenty-five-shades-of-random: an exploration of algorithmic composition # Copyright (C) 2013 stefaan.himpe@gmail.com # # 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 L...
shimpe/twenty-five-shades-of-random
midiobj.py
Python
gpl-3.0
1,713
from distutils.core import setup setup( name='lex-dependency-tracker', version='0.0.1', packages=[''], url='https://github.com/caspervg/lex-dependency-tracker', license='MIT', author='Casper "caspervg" Van Gheluwe', author_email='caspervg@gmail.com', description='Python tool that attemp...
caspervg/lex-dependency-tracker
setup.py
Python
mit
442
import os import numpy as np import theano.tensor as T import theano from scipy import misc from autoencoder_1obj import Autoencoder_1obj from transform import * from scene import * from shader import * from optimize import * if not os.path.exists('output'): os.makedirs('output') train_data = np.array([misc.imre...
lebek/reversible-raytracer
test_1ball.py
Python
mit
1,798
""" This module computes similarity between ingredients. """ import random import warnings import statistics.ingredients_table as ingredients_table import chef_global.debug as debug from statistics.recipe import Recipe import statistics.recipe_table as recipe_table import pandas from tqdm import tqdm import math impor...
MaxStrange/swedish_chef
statistics/similar.py
Python
apache-2.0
13,249
#-*- coding: utf8 -*- from __future__ import with_statement from contextlib import closing import sys import time import logging class SendConpon(object): def __init__(self): self.logger = logging.getLogger("click") pass def __call__(self, client, api, url='', **kw): ...
emop/webrobot
guang/libs/actions.py
Python
gpl-2.0
4,188
#!/usr/bin/env python # -*- coding: utf-8 -*- from nose.tools import assert_equals import morse_talk as mtalk from morse_talk.tree import MorseBinaryTree mt = mtalk.tree.MorseBinaryTree() def test_tree_pretty(): print(mt) # printing tree shouldn't raises exception def test_tree_getitem_len1(): assert_eq...
scls19fr/morse-talk
morse_talk/tests/test_tree.py
Python
gpl-2.0
709
# ROOT should be the absolute path of the Imalse installation directory # ROOT = '/home/wangjing/Dropbox/GSOC/code/imalse' # ROOT = '/Users/wangjing/Dropbox/GSOC/code/imalse' ROOT = '/home/josh/Documents/GSOC/imalse' # ROOT = '/home/wangjing/Apps/imalse' import sys sys.path.insert(0, ROOT) # NS3_PATH should be the ab...
JBonsink/GSOC-2013
settings.py
Python
gpl-3.0
626
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <kiall@hpe.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/...
openstack/designate
designate/mdns/service.py
Python
apache-2.0
2,653
# 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...
manipopopo/tensorflow
tensorflow/contrib/distribute/python/step_fn.py
Python
apache-2.0
4,263
#!/bin/env python # # Copyright (c) 2012, Ryan Kelly. # All rights reserved; available under the terms of the MIT License. if __name__ == "__main__": import sys import playitagainsam res = playitagainsam.main(sys.argv) sys.exit(res)
rfk/playitagainsam
playitagainsam/__main__.py
Python
mit
252
import pytest import shutil from tempfile import mkdtemp import os """Each test class creates a context subclasses _baseVisualTest to run a series of tests on a single graphics context (e.g. pyglet with shaders) To add a new stimulus test use _base so that it gets tested in all contexts """ import psychopy from psy...
psychopy/psychopy
psychopy/tests/test_app/test_builder/test_CompileFromBuilder.py
Python
gpl-3.0
4,962
# coding=utf-8 import time __author__ = 'Dirk Dittert' class IllegalOrderException(Exception): """ Signals that some of the methods were called in an unexpected order. """ pass class Iteration(object): def __init__(self, period): """ :type period: int """ if peri...
dittert/pyprobe
src/pyprobe/iteration.py
Python
apache-2.0
1,270
""" tknorris shared module Copyright (C) 2016 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) any later version. ...
mrquim/mrquimrepo
script.module.salts/lib/CustomProgressDialog.py
Python
gpl-2.0
3,968
#!/usr/bin/env python # # tcl2py.py - try to Pythonize a vtk tcl script # # This code is based on tcl2py.py from VTK 3.2 which was written by # Randy Heiland. # # Changes: # # (21/12/2002) -- Prabhu Ramachandran # Made to work with re instead of regex. Superficial cleanup of the # code, fixed a few issues, using ne...
SimVascular/VTK
Utilities/tcl2py.py
Python
bsd-3-clause
8,336
#!/usr/bin/python # # Filename: # # Version: 1.0.0 # # Author: Joe Gervais (TryCatchHCF) # # Summary: # # Part of the DumpsterFire Toolset. See documentation at https://github.com/TryCatchHCF/DumpsterFire # # # Description: # # # Example: # # import os, sys from FireModules.fire_module_base_class import * class n...
TryCatchHCF/DumpsterFire
FireModules/NetworkScans/nmap_database_probes.py
Python
mit
1,825
""" Copyright 2011-13 Attila Zseder Email: zseder@gmail.com This file is part of hunmisc project url: https://github.com/zseder/hunmisc hunmisc 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 versi...
zseder/hunmisc
hunmisc/wikipedia/anchorize.py
Python
gpl-3.0
1,395
#!/usr/bin/env python # -*- coding: utf-8 -*- #****************************************************************************** # # download_modis_data.py # --------------------------------------------------------- # Download MODIS data # More: http://github.com/nextgis/dhi # # Usage: # download_modis_data.py [-h]...
nextgis/dhi
general/download_modis_data.py
Python
mit
6,762
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
polyaxon/polyaxon
core/polyaxon/polyflow/run/utils.py
Python
apache-2.0
829
from pyfcm import FCMNotification firebase_api_key = "AIzaSyDLRmJBE2Os4c5S13fBCx1NaxiItxynChc" push_service = FCMNotification(api_key=firebase_api_key) CLICK_ACTION = "fcm.ACTION.HELLO" def send_notification(firebase_id,request,title,body,info): data ={ "title": title, "body": body,...
tweiss1234/Vehicle-security-server
firebase_actions.py
Python
apache-2.0
798
""" WSGI config for ecommerce project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`...
DMLoy/ECommerceBasic
src/ecommerce/wsgi.py
Python
mit
1,428
# -*- coding: utf-8 -*- # Copyright (c) 2012 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. # # Pycroft documentation build configuration file, created by # sphinx-quickstart on Th...
lukasjuhrich/pycroft
doc/conf.py
Python
apache-2.0
7,272
#!/usr/bin/env python # coding=utf-8 # DrUPC Copyright (C) 2015 vjudge1 (vjudge404@gmail.com) # 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 ...
upclinux/DrUPC
Tester.py
Python
gpl-2.0
7,258