code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
## # Copyright 2009-2016 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
ocaisa/easybuild-easyblocks
easybuild/easyblocks/b/boost.py
Python
gpl-2.0
9,501
import scipy # Units in SI, i.e. not cgs RSUN = 6.955e8 MSUN = 1.9889e30 MJUP = 1.8986e27 RJUP = 7.149e7 REARTH = 6.371e6 DAY2S = 86400.0 DEG2RAD = scipy.pi/180. AU = 1.496e11 PLANCKH = 6.626e-34 BOLTZK = 1.38065e-23 C = 2.9979e8 # peed of light in vacuum in m s^-1 G = 6.673e-11 # gravitational constant in m^3 kg^-1 ...
tomevans/utils
constants.py
Python
gpl-2.0
370
"""Parallel testing, supporting arbitrary collection ordering The Workflow ------------ - Master py.test process starts up, inspects config to decide how many slave to start, if at all - env['parallel_base_urls'] is inspected first - py.test config.option.appliances and the related --appliance cmdline flag are u...
akrzos/cfme_tests
fixtures/parallelizer/__init__.py
Python
gpl-2.0
40,869
# =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # Copyright 2004-2008 eXe Project, http://eXeLearning.org/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
UstadMobile/exelearning-ustadmobile-work
exe/engine/imagemagnifieridevice.py
Python
gpl-2.0
7,602
from django import forms from django.contrib import messages from django.contrib.admin.views.decorators import staff_member_required from django.shortcuts import render from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from data.models import ImportTask class ImportTaskForm(fo...
ScienceMob/vmicroc
data/views.py
Python
gpl-2.0
1,284
import copy class Histogram( object ): '''Histogram + a few things. This class does not inherit from a ROOT class as we could want to use it with a TH1D, TH1F, and even a 2D at some point. Histogram contains the original ROOT histogram, obj, and a weighted version, weigthed, originally set equal...
cbernet/cpyroot
tools/DataMC/Histogram.py
Python
gpl-2.0
8,121
# coding=utf-8 from tornado.wsgi import WSGIContainer from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from app import app if __name__ == "__main__": http_server = HTTPServer(WSGIContainer(app)) http_server.listen(5000) IOLoop.instance().start()
levythu/swift-layerC
inapi/httpd.py
Python
gpl-2.0
287
import logging from joj.lib.base import * from paste.request import parse_querystring import urllib2 log = logging.getLogger(__name__) class LoggedinController(BaseController): def index(self): #self closes window return '<html><head></head><body onload="window.close()"></body></html>'
NERC-CEH/jules-jasmin
majic/joj/controllers/loggedin.py
Python
gpl-2.0
304
# -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2013 Vassilii Khachaturov # # 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 ...
pmghalvorsen/gramps_branch
gramps/gen/datehandler/_datestrings.py
Python
gpl-2.0
14,146
# Copyright (C) 2011, Endre Karlson # All rights reserved # # 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 pro...
ekarlso/python-zenoss-api
zenoss_api/routers/nav.py
Python
gpl-3.0
1,526
#!/usr/bin/env python """aligned_parse_reader.py: read parsed and aligned files""" __author__ = "Fabien Cromieres" __license__ = "undecided" __version__ = "1.0" __email__ = "fabien.cromieres@gmail.com" __status__ = "Development" from __future__ import absolute_import, division, print_function, unicode_literals import...
fabiencro/knmt
nmt_chainer/dataprocessing/aligned_parse_reader.py
Python
gpl-3.0
2,892
"""Subpackage with PS-specific BSMP objects."""
lnls-sirius/dev-packages
siriuspy/siriuspy/pwrsupply/bsmp/__init__.py
Python
gpl-3.0
48
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import httplib import socket import urllib2 from lib.core.data import logger from lib.core.exception import SqlmapConnectionException ssl = None try: import ssl as _ssl ...
aron-bordin/Tyrant-Sql
SQL_Map/lib/request/httpshandler.py
Python
gpl-3.0
2,072
from .models import * from django.contrib import admin class PingLogAdmin(admin.ModelAdmin): list_display = ('id','hash_key','url','ip_address','user_agent','time') admin.site.register(PingLog, PingLogAdmin)
thejeshgn/quest
quest/admin.py
Python
gpl-3.0
213
# -*- coding: utf-8 -*- # # test_import_issues.py - Test issue importing. # Copyright (C) 2008 by Drew Hess <dhess@bothan.net> # # 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 ...
dhess/lobbyists
lobbyists/tests/test_import_issues.py
Python
gpl-3.0
17,052
from PySide2.QtWidgets import QApplication __title__ = "Wordsets editor" __description__ = "A plugin to manage word sets" __long_description__ = """ <p>This plugin allows to create sets of words that can be matched with the attributes of the project's variants.</p> <p> Once the addition of a word set is started, a man...
labsquare/CuteVariant
cutevariant/gui/plugins/word_set/__init__.py
Python
gpl-3.0
1,098
""" Facilities for pyFTS Benchmark module """ import matplotlib as plt import matplotlib.cm as cmx import matplotlib.colors as pltcolors import matplotlib.pyplot as plt import numpy as np import pandas as pd import sqlite3 #from mpl_toolkits.mplot3d import Axes3D from copy import deepcopy from pyFTS.common import Ut...
petroniocandido/pyFTS
pyFTS/benchmarks/Util.py
Python
gpl-3.0
47,305
from peewee import * # no other way to reach playhouse :( from playhouse import flask_utils as peewee_flask_utils from playhouse import signals as peewee_signals database = peewee_flask_utils.FlaskDB()
thedod/boilerplate-peewee-flask
application/sitepack/db.py
Python
gpl-3.0
204
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "DjangoServer.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that...
AcroManiac/AcroLink
Server/DjangoServer/manage.py
Python
gpl-3.0
810
# coding=utf-8 import unittest """587. Erect the Fence https://leetcode.com/problems/erect-the-fence/description/ There are some trees, where each tree is represented by (x,y) coordinate in a two-dimensional garden. Your job is to fence the entire garden using the **minimum length** of rope as it is expensive. The ga...
openqt/algorithms
leetcode/python/lc587-erect-the-fence.py
Python
gpl-3.0
1,702
#! /usr/bin/env python # -*- coding: utf-8 -*- ''' Created on May 12, 2014 Model Paper fields: conf year passcode paper id status title category1 category1 keywords @author: riccardo ''' class Paper(object): __conf="" __year="" __passcode="" __pid="" __status="" __title="" ...
riccardodg/lodstuff
lremap/it.cnr.ilc.lremapowl/src/lremapobj/paper.py
Python
gpl-3.0
3,059
## pythonFlu - Python wrapping for OpenFOAM C++ API ## Copyright (C) 2010- Alexey Petrov ## Copyright (C) 2009-2010 Pebble Bed Modular Reactor (Pty) Limited (PBMR) ## ## 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 F...
alexey4petrov/pythonFlu
Foam/helper.py
Python
gpl-3.0
2,152
from src.deenuxapi.deezer.Model import Model from src.deenuxapi.deezer.model.Artist import Artist class Track(Model): """ Contains information about a track. """ def __init__(self, id: int, title: str, artist: Artist, duration: int = -1): """ Constructor of Track. :param id: ...
alexarnautu/deenux
src/deenuxapi/deezer/model/Track.py
Python
gpl-3.0
1,503
# Linktastic Module # - A python2/3 compatible module that can create hardlinks/symlinks on windows-based systems # # Linktastic is distributed under the MIT License. The follow are the terms and conditions of using Linktastic. # # The MIT License (MIT) # Copyright (c) 2012 Solipsis Development # # Permission is here...
roderickvd/nzbToMedia
nzbtomedia/linktastic/linktastic.py
Python
gpl-3.0
4,080
import mapnik import subprocess,PIL.Image,cStringIO as StringIO import time,sys,os ew = 20037508.3428 tz = 8 def make_mapnik(fn, tabpp = None, scale=None, srs=None, mp=None, avoidEdges=False, abspath=True): cc=[l for l in subprocess.check_output(['carto',fn]).split("\n") if not l.startswith('[mills...
jharris2268/osmquadtreeutils
osmquadtreeutils/rendertiles.py
Python
gpl-3.0
3,227
from django.utils.safestring import mark_safe from django.contrib.staticfiles.templatetags.staticfiles import static def locked(): return mark_safe('<img src="%s" alt="locked" style="border:0px; margin: 0px; padding: 0px"/>' % ( static('manager/padlock_close.png') )) def unlocked(): return mark...
efce/voltPy
manager/helpers/html.py
Python
gpl-3.0
458
# coding=utf-8 from qtpy import QtWidgets class MenuShortcuts(QtWidgets.QWidget): """ Window displaying the application shortcuts """ def __init__(self): QtWidgets.QWidget.__init__(self) self.setWindowTitle('Shortcuts') l = QtWidgets.QGridLayout() self.s...
radjkarl/appBase
appbase/mainWindowRessources/menuShortcuts.py
Python
gpl-3.0
1,016
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # RecSQL -- a simple mash-up of sqlite and numpy.recsql # Copyright (C) 2007-2016 Oliver Beckstein <orbeckst@gmail.com> # Released under the GNU Public License, version 3 or higher (your choi...
orbeckst/RecSQL
recsql/csv_table.py
Python
gpl-3.0
4,336
# coding=utf-8 import unittest """962. Maximum Width Ramp https://leetcode.com/problems/maximum-width-ramp/description/ Given an array `A` of integers, a _ramp_ is a tuple `(i, j)` for which `i < j` and `A[i] <= A[j]`. The width of such a ramp is `j - i`. Find the maximum width of a ramp in `A`. If one doesn't ex...
openqt/algorithms
leetcode/python/lc962-maximum-width-ramp.py
Python
gpl-3.0
1,041
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, date_diff, formatdate, add_days, today, getdate from frappe import _ from frappe.model.document import Docum...
libracore/erpnext
erpnext/hr/doctype/leave_allocation/leave_allocation.py
Python
gpl-3.0
9,271
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################# Copyright ################################ # Author: GHOSTnew # 2014 # ######################################################################## # This file is part of HelpBot. ...
GHOSTnew/HelpBot
HelpBot.py
Python
gpl-3.0
5,517
from model.flyweight import Flyweight from model.static.database import database class Service(Flyweight): def __init__(self,service_id): #prevents reinitializing if "_inited" in self.__dict__: return self._inited = None #prevents reinitializing self.service_id ...
Iconik/eve-suite
src/model/static/sta/services.py
Python
gpl-3.0
624
NAME = 'pokerserver' DESCRIPTION = 'Poker server for our Python workshop at TNG Technology Consulting.' VERSION = '2017.3.10'
MartinAltmayer/pokerserver
pokerserver/version.py
Python
gpl-3.0
126
# -*- coding: utf-8 -*- """ General description ------------------- This example shows how to perform a capacity optimization for an energy system with storage. The following energy system is modeled: input/output bgas bel | | | | | ...
oemof/oemof_examples
oemof_examples/oemof.solph/v0.4.x/storage_investment/v2_invest_optimize_only_gas_and_storage.py
Python
gpl-3.0
6,369
#!/usr/bin/env python # # Raspberry Pi Internet Radio # using an HD44780 LCD display # $Id: radio8x2.py,v 1.7 2017/07/31 07:44:26 bob Exp $ # # Author : Bob Rathbone # Site : http://www.bobrathbone.com # # This program uses Music Player Daemon 'mpd'and it's client 'mpc' # See http://mpd.wikia.com/wiki/Music_Player...
bobrathbone/piradio
radio8x2.py
Python
gpl-3.0
25,317
#!/usr/bin/env python3 # 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 pub...
fiete201/qutebrowser
scripts/asciidoc2html.py
Python
gpl-3.0
11,655
#!/usr/bin/env python # -*- coding: utf-8 -*- from frame import DStatFrame from shee.util import get_result_dir_name import matplotlib.pyplot as plt import matplotlib.dates as mdates class DStatNetwork(DStatFrame): def __init__(self, filename, frame=None, eth=None, grain=False): if frame is not None: ...
spi-x-i/shee
shee/frames/network.py
Python
gpl-3.0
2,568
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
LSIR/gsn
gsn-webui/app/urls.py
Python
gpl-3.0
712
#!/usr/bin/env python ''' access satellite map tile database some functions are based on code from mapUtils.py in gmapcatcher Andrew Tridgell May 2012 released under GNU GPL v3 or later ''' import math, cv, sys, os, mp_util, httplib2, threading, time, collections, string, hashlib, errno, tempfile class...
kd0aij/matrixpilot_old
Tools/MAVLink/MAVProxy/modules/lib/mp_tile.py
Python
gpl-3.0
18,202
from dec.grid1 import * import matplotlib.pyplot as plt N = 4 #g = Grid_1D.periodic(N) g = Grid_1D.regular(N) #g = Grid_1D.chebyshev(N) z = linspace(g.xmin, g.xmax, 100) #+ 1e-16 B0, B1, B0d, B1d = g.basis_fn() H0, H1, H0d, H1d = hodge_star_matrix(g.projection(), g.basis_fn()) H1d = linalg.inv(H0) #polynomial fit #d...
drufat/dec
doc/plot/cheb/basis_forms.py
Python
gpl-3.0
1,067
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with URL parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
hackersql/sq1map
thirdparty/bottle/bottle.py
Python
gpl-3.0
152,507
import datetime from backend import db from cruds.crud_user_type_destinations.models import UserTypeDestinations from cruds.crud_users.models import Users from cruds import format_urls_in_text class WallMessages(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) date = db.Column(db.In...
sandroandrade/emile-server
cruds/crud_wall_messages/models.py
Python
gpl-3.0
1,182
from rambutan3.check_args.seq.RRangeSizeUniqueSequenceMatcher import RRangeSizeUniqueSequenceMatcher from rambutan3.check_args.seq.RSequenceEnum import RSequenceEnum # noinspection PyPep8Naming def EXACT_SIZE_UNIQUE_TUPLE(*, exact_size: int) -> RRangeSizeUniqueSequenceMatcher: x = RRangeSizeUniqueSequenceMatcher(...
kevinarpe/kevinarpe-rambutan3
rambutan3/check_args/annotation/EXACT_SIZE_UNIQUE_TUPLE.py
Python
gpl-3.0
396
from django.contrib import admin from django.contrib.admin.widgets import AdminIntegerFieldWidget from django.core.validators import MaxValueValidator, MinValueValidator from modeltranslation.admin import TranslationAdmin from django.urls import reverse from django.utils import timezone as tz from django.utils.html imp...
erudit/eruditorg
eruditorg/erudit/admin/journal.py
Python
gpl-3.0
8,218
#!/usr/bin/env python3 from scipy.special import airy from numpy import abs def f(xinput): x0=xinput xoutput=x0 Ai=abs(airy(-xoutput)[0]) while Ai>1e-12: ai=abs(airy(-xoutput)) Ai=ai[0] Aip=ai[1] xoutput=xoutput+Ai/Aip return Ai, xoutput
fusion809/python-scripts
SLE/Airy_root_finder.py
Python
gpl-3.0
292
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + """Supports the Vesuvio instrument at ISIS b...
mganeva/mantid
scripts/Inelastic/vesuvio/__init__.py
Python
gpl-3.0
797
# read_hadamard_file.py # Reads data from a text file to create a 3D # version of a given Hadamard Matrix. # Created by Rick Henderson # Created on June 4, 2015 # Completed June 5, 2015 # Note: A "Hadamard File" is a text file containing rows # rows of + and - where the + indicates a 1 or a cube # and th...
rickhenderson/code-samples
python-blender/read_hadamard_file.py
Python
gpl-3.0
1,503
# Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import sys import os import re import csv import copy import warnings from optparse import OptionParser from gnuradio import filter, fft try: import numpy as np except ImportError:...
sdh11/gnuradio
gr-filter/python/filter/design/filter_design.py
Python
gpl-3.0
91,770
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt\ui\fontgen.ui' # # Created: Mon Jun 03 01:17:17 2013 # by: PyQt4 UI code generator 4.8.5 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except A...
ThunderGemios10/The-Super-Duper-Script-Editor
ui_fontgenerator.py
Python
gpl-3.0
13,740
# (C) British Crown Copyright 2011 - 2012, Met Office # # This file is part of cartopy. # # cartopy is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option)...
marqh/cartopy
lib/cartopy/tests/mpl/test_shapely_to_mpl.py
Python
gpl-3.0
4,821
#Function used to change all the O concepts of the words into the words themselves def changeAllO(file, out): w = open(out, "w") for line in (open(file).readlines()): v = line.split("\t") if(len(v)>1): if v[1][0:1] == "I" or v[1][0:1] == "B": w.write(line) else: w.write(v[0] + "\t" + "$-"+str(v[0])...
marcomanciniunitn/Final-LUS-project
RNN/rnn/lus_rnn_lab/rnn_slu/data/new_data/word-pos-enhanced/enhance.py
Python
gpl-3.0
467
#!/usr/bin/env python3 # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab ######################################################################### # Copyright 2019- Martin Sinn m.sinn@gmx.de ######################################################################### # T...
smarthomeNG/smarthome
lib/model/mqttplugin.py
Python
gpl-3.0
11,395
from importlib import import_module from django.apps import AppConfig as BaseAppConfig class AppConfig(BaseAppConfig): name = "gestioneide" def ready(self): import_module("gestioneide.receivers")
Etxea/gestioneide
gestioneide/apps.py
Python
gpl-3.0
217
# coding: utf-8 """Find the path to picasso dynamic library files.""" import os import platform import sys class PicassoLibraryNotFound(Exception): """Error thrown by when picasso is not found""" pass def find_lib_path(): """Find the path to picasso dynamic library files. :return: List of all found ...
jasonge27/picasso
python-package/pycasso/libpath.py
Python
gpl-3.0
1,608
import datetime import pytz from django.utils import timezone from django.contrib.auth.models import User from django.test import TestCase from gerencex.core.models import HoursBalance, Timing, Office from gerencex.core.time_calculations import DateData class HoursBalanceModelTest(TestCase): @classmethod de...
flavoso/gerencex
gerencex/core/tests/test_hoursbalance_model.py
Python
gpl-3.0
5,457
from .parameters import Parameters from .framebuffer import FrameBuffer from .actionhandler import ActionHandler, ActionPolicy
Islandman93/reinforcepy
reinforcepy/handlers/__init__.py
Python
gpl-3.0
127
from os import environ # if you set a property in SESSION_CONFIG_DEFAULTS, it will be inherited by all configs # in SESSION_CONFIGS, except those that explicitly override it. # the session config can be accessed from methods in your apps as self.session.config, # e.g. self.session.config['participation_fee'] SESSION_...
anthropo-lab/XP
EPHEMER/dill_resp_project/settings.py
Python
gpl-3.0
2,310
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-06-20 00:11 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0006_auto_20170620_0010'), ] operations = [ migrations.AlterField( ...
sandrofolk/girox
girox/blog/migrations/0007_auto_20170620_0011.py
Python
gpl-3.0
467
# -*- coding: utf-8 -*- """Unit tests for the Web Service client.""" import base64 import datetime import json import unittest from mock import patch, MagicMock from requests.exceptions import ConnectionError from genweb.serveistic.ws_client.problems import ( Client, ClientException, Problem) class TestWSClie...
UPCnet/genweb.serveistic
genweb/serveistic/tests/test_ws_client_problems.py
Python
gpl-3.0
10,661
# macgen.py script to generate a MAC address for Red Hat Virtualization guests # # from http://www.linux-kvm.com/sites/default/files/macgen.py import random def randomMAC(): mac = [ 0x00, 0x16, 0x3e, random.randint(0x00, 0x7f), random.randint(0x00, 0xff), random.randint(0x00, 0xff) ] return ':'.join(map(lambd...
dguglielmi/vmc-core
vmc/thirdparty/macgen.py
Python
gpl-3.0
343
from .async import TelnetServer
Scorched-Moon/server
server/miniboa/__init__.py
Python
gpl-3.0
32
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from functools import partial from PyQt5 import QtWidgets, QtCore from controller.gensec.dialogs.processes.information import Information from view.dialogs.base_dialog import BaseDialog from view.gensec.dialogs.processes.ui_posl ...
carlos-ferras/Sequence-ToolKit
controller/gensec/dialogs/processes/posl.py
Python
gpl-3.0
6,732
# -*-coding=utf-8-*- __author__ = 'Rocky' # -*-coding=utf-8-*- from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart import smtplib from email import encoders, utils import urllib.request, urllib.error, urllib.parse import time import re import sys import os from bs4 import BeautifulSoup ...
hjtgood/test
shihuo.py
Python
gpl-3.0
16,434
import unittest from pystan import stanc, StanModel from pystan._compat import PY2 class TestUTF8(unittest.TestCase): desired = sorted({"status", "model_cppname", "cppcode", "model_name", "model_code", "include_paths"}) def test_utf8(self): model_code = 'parameters {real y;} model {y ~ normal(0,1);}...
ariddell/pystan
pystan/tests/test_utf8.py
Python
gpl-3.0
1,618
#!/usr/bin/env python import rospy from belt_parser import BeltParser import tf import tf2_ros import math import copy from memory_definitions.srv import GetDefinition from processing_belt_interpreter.msg import * from drivers_ard_others.msg import BeltRange from geometry_msgs.msg import Pose2D, TransformStamped, Poi...
utcoupe/coupe18
ros_ws/src/processing_belt_interpreter/src/belt_interpreter_node.py
Python
gpl-3.0
9,252
#!/usr/bin/python name = raw_input("please enter your name:") address = raw_input("please enter your address:") print "my name is {} and i live in {}".format(name,address)
tuxfux-hlp-notes/python-batches
archieves/batch-65/second.py
Python
gpl-3.0
171
""" Chunk (N number of bytes at M offset to a source's beginning) provider. Primarily for file sources but usable by any iterator that has both seek and read( N ). """ import os import base64 import base import exceptions import logging log = logging.getLogger( __name__ ) # -----------------------------------------...
icaoberg/cellorganizer-galaxy-tools
datatypes/dataproviders/chunk.py
Python
gpl-3.0
2,581
#!/usr/bin/env python # -*- coding: utf-8 -*- # # STARLING PROJECT # # LIRIS - Laboratoire d'InfoRmatique en Image et Systèmes d'information # # Copyright: 2012 - 2015 Eric Lombardi (eric.lombardi@liris.cnrs.fr), LIRIS (liris.cnrs.fr), CNRS (www.cnrs.fr) # # # This program is free software: you can redistribute it...
liris-vision/starling
tools/getos.py
Python
gpl-3.0
1,475
from neobunch import Bunch import os from nltk.corpus import wordnet as wn import re from itertools import izip from definition.words.word_sampler import lemmatize_all class NLTKWordNetParser(object): def __init__(self, opt): self.opt = opt def to_list(self, entry, order_keys=['word'...
NorThanapon/dict-definition
definition/readers/wordnet.py
Python
gpl-3.0
10,980
""" Container for TaskManager plug-ins, to handle the destination of the tasks """ import six from DIRAC import gLogger from DIRAC.Core.Utilities.List import fromChar from DIRAC.Core.Utilities.SiteSEMapping import getSitesForSE from DIRAC.DataManagementSystem.Utilities.DMSHelpers import DMSHelpers from DIRAC.Configura...
DIRACGrid/DIRAC
src/DIRAC/TransformationSystem/Client/TaskManagerPlugin.py
Python
gpl-3.0
5,584
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...vml import Vml class TestWriteOidmap(unittest.TestCase): """ Test the Vml _write...
ivmech/iviny-scope
lib/xlsxwriter/test/vml/test_write_idmap.py
Python
gpl-3.0
748
from __future__ import unicode_literals import sys import os import random import matplotlib # Make sure that we are using QT5 matplotlib.use('Qt5Agg') from PyQt5 import QtCore, QtWidgets from numpy import arange, sin, pi from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib...
RyanChinSang/ECNG3020-ORSS4SCVI
BETA/TestCode/Matplotlib/mpl1.py
Python
gpl-3.0
3,865
from heppy_fcc.particles.jet import Jet as BaseJet from vertex import Vertex from ROOT import TLorentzVector import math class Jet(BaseJet): def __init__(self, fccjet): self.fccjet = fccjet self._tlv = TLorentzVector() p4 = fccjet.Core().P4 self._tlv.SetXYZM(p4.Px, p4.Py, p4.Pz...
semkiv/heppy_fcc
particles/fcc/jet.py
Python
gpl-3.0
341
import websocket import logging import json import config import threading from time import sleep from pprint import pformat class TimeOutReached(Exception): pass class EventListenerThread(threading.Thread): log = None ws = None messageStack = [] ws_uri = None authto...
AdaHeads/Coverage_Tests
src/event_stack.py
Python
gpl-3.0
5,316
# This Python file uses the following encoding: utf-8 from django.test import TestCase, RequestFactory from models import Meeting, Abstract, Author from django.core.urlresolvers import reverse from fiber.models import Page from views import AbstractCreateView from home.models import Announcement from datetime import d...
dennereed/paleoanthro
meetings/tests.py
Python
gpl-3.0
31,299
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attivita', '0012_attivita_centrale_operativa'), ] operations = [ migrations.AddField( model_name='partecipazione...
CroceRossaItaliana/jorvik
attivita/migrations/0013_partecipazione_centrale_operativa.py
Python
gpl-3.0
448
from pygame import * from key_dict import * ''' The player class ''' class Cursor: def __init__(self, x, y, size): self.x = int(x) self.y = int(y) self.size = size self.speed = 1 self.cooldown = 0 self.block = 0 self.menu_switch = {'Build' : True} se...
erikjuhani/thefortressheart
cursor.py
Python
gpl-3.0
2,603
import Log import pygame as Pygame def fillJob(screen, color, job): if hasattr(job, "fillArea"): job.fillArea(color) else: padding = 0 if hasattr(job, "border_width"): ## Workaround padding = job.border_width Pygame.draw.rect( screen, ...
UndeadMastodon/Loltris
Draw.py
Python
gpl-3.0
1,695
# -*- coding: utf-8 -*- class BankAccess(object): def __init__(self): self.pendingUids = {} pass def get(self, uid):
manuco/LayeredLighting
model/bankaccess.py
Python
gpl-3.0
160
############################################################################### # # # Peekaboo Extended Email Attachment Behavior Observation Owl # # # ...
scVENUS/PeekabooAV
peekaboo/server.py
Python
gpl-3.0
13,675
## {{{ http://code.activestate.com/recipes/496882/ (r8) ''' http://code.activestate.com/recipes/496882/ Author: Michael Palmer 13 Jul 2006 a regex-based JavaScript code compression kludge ''' import re class JSCompressor(object): def __init__(self, compressionLevel=2, measureCompression=False): ''' ...
MaxTyutyunnikov/lino
lino/utils/jscompressor.py
Python
gpl-3.0
5,152
from couchpotato import get_session from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification from couchpotato.core.settings.model import History as Hist import time log = CPLog(__name__) class History(Notification):...
Akylas/CouchPotatoServer
couchpotato/core/notifications/history/main.py
Python
gpl-3.0
732
""" Django settings for astrology project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build path...
flp9001/clevenus
clevenus/config/settings/base.py
Python
gpl-3.0
3,640
# Copyright (C) 2016 East Asian Observatory # All Rights Reserved. # # 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 option) any later # version. # #...
eaobservatory/hedwig
lib/hedwig/facility/example/control.py
Python
gpl-3.0
2,612
# -*- coding: utf-8 -*- """ ################################################################################ # # # media_editing # # ...
wdbm/media_editing
media_editing.py
Python
gpl-3.0
2,382
import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np import os from math import sqrt from os.path import expanduser def extract_patches(path, filename, out_path, patch_size, stride, visualize): img = mpimg.imread(path+filename) nRows, nCols, nColor = img.shape psx, psy = p...
shengshuyang/StanfordCNNClass
shadow_project/extract_patches.py
Python
gpl-3.0
1,314
import bpy # ----------------------------------------------------------------------------- # Draw UI, use an function to be append into 3D View Header # ----------------------------------------------------------------------------- def ui_3D(self, context): layout = self.layout row = layout.row(align=True) ...
stilobique/Icon-Header
views/header.py
Python
gpl-3.0
1,454
#!/usr/bin/env python # # Copyright 2006,2007,2010,2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
surligas/gnuradio
gnuradio-runtime/python/gnuradio/gr/qa_random.py
Python
gpl-3.0
2,171
# -*- coding:utf-8 -*- #############settings############# NAME = "1" #GitStar用户名 PASSWORD = "1" #GitStar密码 GITNAME = "1" #GitHub用户名 GITPASSWORD = "1" #GitHub密码 #############settings#############
w568w/GitHubStar
settings.py
Python
gpl-3.0
220
# -*- coding: utf-8 -*- ### required - do no delete @auth.requires_login() def plan(): return dict() def new(): form = SQLFORM.factory(db.contacts,db.groups) if form.accepts(request.vars): _id_user = db.contacts.insert(**db.contacts._filter_fields(form.vars)) form.vars.contact = _i...
withanage/HEIDIEditor
controllers/plan.py
Python
gpl-3.0
1,068
# This file is part of ArcJail. # # ArcJail 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. # # ArcJail is distributed in the hope that...
KirillMysnik/ArcJail
srcds/addons/source-python/plugins/arcjail/modules/lrs/win_reward.py
Python
gpl-3.0
4,013
from bzrc import BZRC, Command import math, numpy, argparse from numpy import dot from random import randint from time import sleep desc=''' Example: python kalman_pigeon.py -p localhost -s 57413 -t [1, 2, 3] ''' class Point(): def __init__(self, x, y): self.x = x self.y = y # self...
dnorth/BZRFlag
src/kalman_pigeon.py
Python
gpl-3.0
4,604
""" Поиск значений в последовательностях """ def second_max(num_list): if len(num_list) < 2: raise IndexError pair = (num_list.pop(), num_list.pop()) max1, max2 = max(pair), min(pair) while num_list: val = num_list.pop() if val > max1: max2 = max1 max1 =...
vladworldss/algo
connectivity/stream_search.py
Python
gpl-3.0
406
#!/usr/bin/env python # -*- coding: utf-8 -*- from supervisorclusterctl import __version__, __author__, __programm_name__, __programm_description__ import os import sys try: from setuptools import setup, find_packages except ImportError: print "supervisorclusterctl needs setuptools in order to build. " \ ...
RobWin/supervisorclusterctl
setup.py
Python
gpl-3.0
1,415
#from actstream import action from django.contrib.auth import get_user_model from django.db.models.signals import post_save from django.core.exceptions import ObjectDoesNotExist from django.dispatch import receiver from profiles.models import Organisation, OrganisationGroup, UserProfile UserModel = get_user_model() ...
AtelierSoude/shrooms
ShroomsAPI/profiles/signals.py
Python
gpl-3.0
947
from distutils.core import setup from setuptools import find_packages from ponypusher import VERSION setup( #this is the name of the package to install from pypi/chishop name='django-ponypusher', description='Pusher app library for django', author='Raymond McGinlay', author_email='ray@lvlup.us', #version number is der...
Level-Up/django-ponypusher
setup.py
Python
gpl-3.0
651
# -*- coding: utf-8 -*- from flask import Flask from flask import Flask,jsonify, request, Response, session,g,redirect, url_for,abort, render_template, flash from islem import * from bot import * import sys import time import datetime reload(sys) sys.setdefaultencoding("utf-8") app = Flask(__name__) toxbot = tox_fac...
milisarge/toxfs
webserver.py
Python
gpl-3.0
3,418
if __name__ == '__main__': print("Loading Modules...") from setuptools.command import easy_install def install_with_easyinstall(package): easy_install.main(["-U", package]) imported = False tries = 0 while not imported: try: import socket, importlib globals()['PIL'] = importlib.import_m...
TNT-Samuel/Coding-Projects
Image Test/_ImageEdit3MultiProcess.py
Python
gpl-3.0
17,506
# -*- coding: utf-8 -*- """ 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 distributed in...
wangjun/pyload
module/plugins/crypter/YoutubeBatch.py
Python
gpl-3.0
6,087
import logging from functools import wraps from requests.exceptions import HTTPError from django.utils.decorators import available_attrs from django.conf import settings from authclient import _get_user_session_key, SESSION_KEY from authclient.client import auth_client logger = logging.getLogger('authclient') def ...
PyPila/auth-client
authclient/decorators.py
Python
gpl-3.0
1,544