code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
#!/usr/bin/python # -*- coding: iso-8859-15 -*- import sys import math from subprocess import check_call from subprocess import CalledProcessError from MCTF_parser import MCTF_parser file = "" rate = 0.0 pictures = 33 pixels_in_x = 352 pixels_in_y = 288 subband = 4 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ...
vicente-gonzalez-ruiz/QSVC
trunk/src/old_py/texture_expand_lfb_j2k.py
Python
gpl-2.0
4,853
""" instantly/main.py Defines the basic terminal interface for interacting with Instantly. Copyright (C) 2013 Timothy Edmund Crosley 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 rest...
timothycrosley/instantly
instantly/main.py
Python
gpl-2.0
8,313
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "vps_monitor.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
J22Melody/VPS-Monitor
manage.py
Python
gpl-2.0
254
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Craig J. Anderson # # 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 ...
Forage/Gramps
gramps/plugins/lib/libsubstkeyword.py
Python
gpl-2.0
48,355
#!/usr/bin/env python from __future__ import division import sys, os import numpy as np import readnew from glob import glob #import re import yaml import os.path import time # Need to wait some time if file is being written # Example: /home/jordan/sad-monte-carlo/ filename_location = sys.argv[1] # Example: data/sa...
droundy/deft
papers/histogram/figs/yaml-comparison.py
Python
gpl-2.0
4,167
# -*- coding: utf-8 -*- from distutils.core import setup from distutils.command.build import build as _build from distutils.command.install import install as _install from distutils.command.install_data import install_data as _install_data from distutils.command.sdist import sdist as _sdist from distutils.extension imp...
hedmo/compizconfig-python
setup.py
Python
gpl-2.0
5,125
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.12.1) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x04\x0a\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x17\x...
UdK-VPT/Open_eQuarter
oeq_tb/resources.py
Python
gpl-2.0
5,957
import numpy as np # import text file, which has a determined format a=open("test.dat") b=open("test2.dat","w") f=a.read() g=f.split("\n") nlines=6 nquestions=16 q1=[g[nlines*i:nlines*(i+1)] for i in range(nquestions)] # these two lines can be commented if you want to shuffle last question also last=q1[-1] q2=q1[:-1] n...
saangel/randomcoding
QuestionShuffling.py
Python
gpl-2.0
678
# This is STMcmc, for super tree mcmc. # Started 18 March 2011, first commit 22 March 2011. import pf,func from Var import var import math,random,string,sys,time,copy,os,cPickle,types,glob import numpy as np from Glitch import Glitch from TreePartitions import TreePartitions from Constraints import Constraints from Tr...
Linhua-Sun/p4-phylogenetics
p4/STMcmc.py
Python
gpl-2.0
122,106
import Gears as gears from .. import * try: from OpenGL.GL import * from OpenGL.GLU import * except: print ('ERROR: PyOpenGL not installed properly.') import random def box() : glBegin(GL_QUADS) glColor3f(0.0,1.0,0.0) glVertex3f(1.0, 1.0,-1.0) glVertex3f(-1.0, 1.0,-1.0) glVertex3f(-1.0, 1....
szecsi/Gears
GearsPy/Project/Components/Forward/Flyby.py
Python
gpl-2.0
2,803
''' Created on Apr 19, 2015 @author: bcopy ''' import os import cherrypy import sys import subprocess import random import time import threading import Queue import tempfile class ScriptMonitor(object): ''' Monitors the script execution and updates result statuses ''' def __init__(self): ...
bcopy/raspbuggy
modules/pywebide/src/main/python/raspbuggy/webide/main.py
Python
gpl-2.0
5,823
#!/usr/bin/python # # centos5.py - A webKickstart module to handle changes needed from # RHEL 5 to CentOS 5 Kickstart generation. # # Copyright 2007 NC State University # Written by Jack Neely <jjneely@ncsu.edu> # # SDG # # This program is free software; you can redistribute it and/or modify # it under the...
jjneely/webkickstart
archive/centos5.py
Python
gpl-2.0
1,227
from django.db import models from stdimage import StdImageField from django.core.validators import RegexValidator import datetime YEAR_CHOICES = [] for r in range(1980, (datetime.datetime.now().year+1)): YEAR_CHOICES.append((r,r)) S_CHOICE = [('1stYear','1stYear'),('2ndYear','2ndYear'),('3rdYear','3rdYear'),('4t...
bpain2010/kgecweb
hostels/models.py
Python
gpl-2.0
2,053
#! /usr/bin/env python3 import setuptools setuptools.setup( name='vimdecrypt', version='2.0', author='Gertjan van Zwieten', py_modules=['vimdecrypt'], scripts=['vimdecrypt'], test_suite='vimdecrypt', )
gertjanvanzwieten/vimdecrypt
setup.py
Python
gpl-2.0
216
# # Copyright (C) 2014 Tommy Winther # http://tommy.winther.nu # # Modified for FTV Guide (09/2014 onwards) # by Thomas Geppert [bluezed] - bluezed.apps@gmail.com # # This Program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
JamesLinEngineer/RKMC
addons/script.ftvguide/gui.py
Python
gpl-2.0
60,618
from Tools.Profile import profile profile("LOAD:ElementTree") import xml.etree.cElementTree import os profile("LOAD:enigma_skin") from enigma import eSize, ePoint, eRect, gFont, eWindow, eLabel, ePixmap, eWindowStyleManager, \ addFont, gRGB, eWindowStyleSkinned, getDesktop from Components.config import ConfigSubsecti...
schleichdi2/openpli-e2
skin.py
Python
gpl-2.0
35,598
# @author: Milinda Fernando # School of Computing, University of Utah. # generate all the slurm jobs for the sc16 poster, energy measurements, import argparse from subprocess import call import os if __name__ == "__main__": parser = argparse.ArgumentParser(prog='slurm_pbs') parser.add_argument('-p','--prefix', help...
paralab/Dendro4
python_scripts_sc16/csv_mat.py
Python
gpl-2.0
1,046
#!/usr/bin/env python """ @package glider_utils @file glider_utils.py @author Stuart Pearce & Chris Wingard @brief Module containing glider utiliities """ __author__ = 'Stuart Pearce & Chris Wingard' __license__ = 'Apache 2.0' import numpy as np import warnings #import pdb import re #import pygsw.vectors as gsw class...
s-pearce/glider-utilities
glider_utils/parsers/dbd_parsers.py
Python
gpl-2.0
6,823
#!/usr/bin/python import os, struct, array from fcntl import ioctl SDL_JOY_0_SELECT = 8 SDL_JOY_0_START = 9 SDL_JOY_0_TRIGGER1 = 0 SDL_JOY_0_TRIGGER2 = 1 SDL_JOY_0_ASTERISK = 2 SDL_JOY_0_HASH = 3 SDL_JOY_0_SECOND_AXIS = 2 # Iterate over the joystick devices. # print('Available devices:') devices = sorted(os.listdir...
jfroco/atari800-rpi
atari5200.py
Python
gpl-2.0
3,320
# -*- coding: utf-8 -*- # import uuid from django.shortcuts import get_object_or_404 from rest_framework.views import APIView, Response from rest_framework.generics import ( ListAPIView, get_object_or_404, RetrieveAPIView ) from common.permissions import IsOrgAdminOrAppUser, IsOrgAdmin from common.utils import ge...
sdgdsffdsfff/jumpserver
apps/perms/api/user_permission/common.py
Python
gpl-2.0
3,904
"""This module contains tests that exercise the canned VMware Automate stuff.""" from textwrap import dedent import fauxfactory import pytest from widgetastic.widget import View from widgetastic_patternfly import Dropdown from cfme import test_requirements from cfme.common import BaseLoggedInPage from cfme.infrastruc...
izapolsk/integration_tests
cfme/tests/automate/test_vmware_methods.py
Python
gpl-2.0
4,838
# coding: utf-8 ''' Created on 17/2/2015 @author: PC06 ''' from include import app from flask.templating import render_template from ec.edu.itsae.dao import PersonaDAO @app.route("/") def login(): return render_template("login.html") @app.route("/persona") def index(): x=PersonaDAO.PersonaDAO().reportarPerso...
rfedmi/reposdmpdos
davidmp/mainIndex.py
Python
gpl-2.0
385
""" Helper and server modules """
freevo/freevo1
src/helpers/__init__.py
Python
gpl-2.0
34
# -*- python -*- # Copyright (C) 2009 Free Software Foundation, Inc. # 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. # ...
GeeteshKhatavkar/gh0st_kernel_samsung_royxx
arm-2010.09/arm-none-eabi/lib/armv6-m/libstdc++.a-gdb.py
Python
gpl-2.0
2,346
import urllib from models.vipsubscriber import VipSubscriber from base import BaseHandler class Vip(BaseHandler): LOCATION = "../views/vip.html" def GetContext(self): tContext = {} tVipList = [] tVipKey = urllib.unquote(self.request.get('key')) if(tVipKey != None and le...
Kenneth-Posey/kens-old-projects
smokin-goldshop/handler/vip.py
Python
gpl-2.0
985
from django.contrib import admin from edc_registration.models import RegisteredSubject from edc_locator.admin import BaseLocatorModelAdmin from ..forms import SubjectLocatorForm from ..models import SubjectLocator class SubjectLocatorAdmin(BaseLocatorModelAdmin): form = SubjectLocatorForm fields = ( ...
botswana-harvard/bcvp
bcvp/bcvp_subject/admin/subject_locator_admin.py
Python
gpl-2.0
1,944
import glob import os from distutils.dep_util import newer from distutils.core import Command from distutils.spawn import find_executable from distutils.util import change_root class build_gschemas(Command): """build message catalog files Build message catalog (.mo) files from .po files using xgettext ...
nagisa/Feeds
gdist/gschemas.py
Python
gpl-2.0
2,161
# This file is part of MyPaint. # -*- coding: utf-8 -*- # Copyright (C) 2014-2019 by the MyPaint Development Team. # # 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 Licen...
mypaint/mypaint
gui/device.py
Python
gpl-2.0
22,624
__author__ = 'bromix' from .base_item import BaseItem class AudioItem(BaseItem): def __init__(self, name, uri, image=u'', fanart=u''): BaseItem.__init__(self, name, uri, image, fanart) self._duration = None self._track_number = None self._year = None self._genre = None ...
repotvsupertuga/tvsupertuga.repository
plugin.video.youtube/resources/lib/youtube_plugin/kodion/items/audio_item.py
Python
gpl-2.0
1,840
""" WSGI config for octo_nemesis 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/dev/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "octo_nemesis.settings") from dja...
monkeywidget/massive-octo-nemesis
octo_nemesis/octo_nemesis/wsgi.py
Python
gpl-2.0
399
from django import template from ..models import Grade register = template.Library() @register.filter def to_grade_number(year): """Returns a `Grade` object for a year.""" return Grade(year).number @register.filter def to_grade_name(year): """Returns a `Grade` object for a year.""" return Grade(ye...
tjcsl/ion
intranet/apps/users/templatetags/grades.py
Python
gpl-2.0
329
import array def read_symbol_array(path): with open(path, 'r') as f: return array.array('H', map(int, f.read().split())) def format_sequence(seq): def wrap(s): return '{' + s + '}' a, b = (seq, '') if len(seq) <= 10 else (seq[0:10], ' ...') return wrap(' '.join(map(str, a)) + b) de...
jade-cheng/Jocx
src/ziphmm/_internal.py
Python
gpl-2.0
433
import os import types from sllib.LLSD import LLSD try: os.makedirs('./httpcap') except: pass data = open('httpcap.txt','r').read() c = 0 btag = '<llsd>' etag = '</llsd>' ##mbtag = '<key>message</key><string>' ##metag = '</string>' b = data.find(btag) mnames = {} while b >= 0: e = da...
MarioVilas/secondlife-experiments
SimProxy/extract_xml.py
Python
gpl-2.0
1,050
#!/usr/bin/env python # test libvirt cpu stats import libvirt from libvirt import libvirtError from src import sharedmod from utils import utils required_params = ('cpuNum',) optional_params = {'conn': '', } STATFILE = "/proc/stat" GETCPUSTAT = "cat /proc/stat | grep cpu%s" USR_POS = 1 NI_POS = 2 SYS_POS = 3 IDLE_P...
ryanmiao/libvirt-test-API
repos/virconn/cpu_stats.py
Python
gpl-2.0
2,792
""" python bindings to flux-core, the main core of the flux resource manager """ # Import core symbols directly, allows flux.FLUX_MSGTYPE_ANY for example # pylint: disable=wildcard-import from flux.constants import * from flux.core import Flux __all__ = ['core', 'kvs', 'jsc', 'rpc', ...
lipari/flux-core
src/bindings/python/flux/__init__.py
Python
gpl-2.0
381
""" The symbols and rules for the CFG of C. I generated these myself by hand, so they're probably not perfectly correct. """ from rules_obj import * from lexer import * import tokens ### Symbols ### # Most symbols are either self-explanatory, or best understood by examining the # rules below to see how they're used....
ShivamSarodia/ShivC
rules.py
Python
gpl-2.0
15,247
''' Created on 2014. 9. 26. @author: jongyeob ''' from __future__ import absolute_import import sys import logging import re from . import utils from .utils import datetime as dt from .utils import download as dl DATA_DIR = 'data/' LOG = logging.getLogger(__name__); LOG.setLevel(0) PACKAGES = '' INST_NAME = ['m...
jongyeob/swpy
swpy/backup/ace.py
Python
gpl-2.0
7,732
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. from __future__ import absolute_import from testutil.dott import feature, sh, testtmp # noqa: F401 # Load extensions ( sh % "cat" << r"""...
facebookexperimental/eden
eden/scm/tests/test-fb-hgext-diff-since-last-submit-t.py
Python
gpl-2.0
6,148
"""Helper functions for transforming results.""" import hashlib import logging import os import re import urllib.parse from typing import Optional from docutils.core import publish_parts from dump2polarion.exporters.verdicts import Verdicts # pylint: disable=invalid-name logger = logging.getLogger(__name__) TEST_P...
mkoura/dump2polarion
dump2polarion/exporters/transform.py
Python
gpl-2.0
8,094
from django import template register = template.Library() class RepeatNode(template.Node): def __init__(self, nodelist, count): self.nodelist = nodelist self.count = template.Variable(count) def render(self, context): output = self.nodelist.render(context) return output * ...
julcollas/django-smokeping
smokeping/templatetags/repeat.py
Python
gpl-2.0
1,004
import numpy as np import pandas as pd from scipy.stats.mstats import plotting_positions from ..mapping.evaluation import after_stat from ..doctools import document from ..exceptions import PlotnineError from .distributions import get_continuous_distribution from .stat import stat # Note: distribution should be a na...
has2k1/plotnine
plotnine/stats/stat_qq.py
Python
gpl-2.0
2,879
# -*- coding: UTF-8 -*- """ this is the default settings, don't insert into your customized settings! """ DEBUG = True TESTING = True SECRET_KEY = "5L)0K%,i.;*i/s(" SECURITY_SALT = "sleiuyyao" # DB config SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db" SQLALCHEMY_ECHO = True UPLOADS_DEFAULT_DEST = 'uploads' LOG_FILE = ...
PuZheng/cloud-dashing
cloud_dashing/default_settings.py
Python
gpl-2.0
618
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, absolute_import import unittest from ..morf import analyze, disambiguate # EINO SANTANEN. Muodon vanhimmat # http://luulet6lgendus.blogspot.com/ sentences = '''KÕIGE VANEM MUDEL Pimedas luusivad robotid, originaalsed tšehhi robotid kahe...
estnltk/estnltk
estnltk/vabamorf/tests/test_disambiguate.py
Python
gpl-2.0
1,255
# Copyright (C) 2008-2014 Bastian Kleineidam # # 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. # # This program is distr...
linkcheck/linkchecker
linkcheck/htmlutil/__init__.py
Python
gpl-2.0
770
#!/usr/bin/env python """spoke -- Git plugin for GitHub integration Copyright (C) 2012 Alex Headley <aheadley@waysaboutstuff.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...
aheadley/spoke
spoke.py
Python
gpl-2.0
21,775
# -*- coding: utf-8 -*- from gi.repository import GLib, GObject, Gio from dfeet import dbus_utils def args_signature_markup(arg_signature): return '<small><span foreground="#2E8B57">%s</span></small>' % (arg_signature) def args_name_markup(arg_name): return '<small>%s</small>' % (arg_name,) class DBusNod...
GNOME/d-feet
src/dfeet/introspection_helper.py
Python
gpl-2.0
7,626
import logging from autotest_lib.client.common_lib import error import kvm_test_utils def run_timedrift_with_migration(test, params, env): """ Time drift test with migration: 1) Log into a guest. 2) Take a time reading from the guest and host. 3) Migrate the guest. 4) Take a second time readi...
ceph/autotest
client/tests/kvm/tests/timedrift_with_migration.py
Python
gpl-2.0
3,949
from django.contrib import admin from bds.models import Packet from bds.models import CT,admins # Register your models here. admin.site.register(Packet) admin.site.register(CT) admin.site.register(admins)
tremblerz/breach-detection-system
dashboard/bds/admin.py
Python
gpl-3.0
206
from glob import glob import subprocess import vagrant from fabric.api import execute, env, quiet from fabric.state import connections from logger import init_logger, debug, info VM_NAME = "default" def clear_fabric_cache(): """ Fabric caches it's connections, so it won't have to re-connect every time you...
shohamp/Gobi
runner/gobi_runner.py
Python
gpl-3.0
3,321
## $Id: tools.py 23525 2011-05-12 04:11:40Z davea $ import configxml try: # use new hashlib if available from hashlib import md5 except: import md5 import os, shutil, binascii, filecmp # from http://www.plope.com/software/uuidgen/view _urandomfd = None def urandom(n): """urandom(n) -> str Return ...
asimonov-im/boinc
py/Boinc/tools.py
Python
gpl-3.0
2,065
from django.core.management.base import BaseCommand from lizard_blockbox import import_helpers class Command(BaseCommand): args = "" help = "Merge the measure shapes to get one json." def handle(self, *args, **kwargs): import_helpers.merge_measures_blockbox(self.stdout)
lizardsystem/lizard-blockbox
lizard_blockbox/management/commands/merge_measures_blockbox.py
Python
gpl-3.0
294
""" API operations on Group objects. """ import logging from galaxy.web.base.controller import BaseAPIController, url_for from galaxy import web log = logging.getLogger( __name__ ) class GroupRolesAPIController( BaseAPIController ): @web.expose_api @web.require_admin def index( self, trans, group_id, **k...
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/lib/galaxy/webapps/galaxy/api/group_roles.py
Python
gpl-3.0
5,199
''' Python program for implementation of Merge Sort l is left index, m is middle index and r is right index L[l...m] and R[m+1.....r] are respective left and right sub-arrays ''' def merge(arr, l, m, r): n1 = m - l + 1 n2 = r-m #create temporary arrays L = [0]*(n1) R = [0]*(n2) #Copy data to temp arrays L[...
tannmay/Algorithms-1
Sorting/Codes/mergeSort.py
Python
gpl-3.0
1,313
"""Module containing helper functions that are used by other parts of worker.""" import datetime import getpass import json import logging import signal import re from contextlib import contextmanager from os import path as os_path, walk, getcwd, chdir, environ as os_environ, killpg, getpgid from queue import Queue, E...
fabric8-analytics/fabric8-analytics-worker
f8a_worker/utils.py
Python
gpl-3.0
28,130
""" S.Tomin and I.Zagorodnov, 2017, DESY/XFEL """ from ocelot.common.globals import * import logging logger = logging.getLogger(__name__) try: import numexpr as ne ne_flag = True except: logger.debug("coord_transform.py: module NUMEXPR is not installed. Install it to speed up calculation") ne_flag = F...
ocelot-collab/ocelot
ocelot/cpbd/coord_transform.py
Python
gpl-3.0
3,359
import os def post_add(conf, name): if "POST_ADD_HOOK" in conf: if "NEW_PASSWORD_NAME" in os.environ: del os.environ["NEW_PASSWORD_NAME"] passwd_dir = os.path.expanduser(os.path.expandvars(conf["PASSWD_DIR"])) hook_exec = os.path.expandvars(conf["POST_ADD_HOOK"]) os.chdir(passwd_dir) os.putenv("NEW_PA...
lkrotowski/passwdk
src/passwdk/hooks.py
Python
gpl-3.0
431
#------------------------------------------------------------------------------ # Name: test_node.py # Purpose: Test the Node class # # Author: Aleksander Vines # # Created: 2016-02-26 # Last modified:2016-02-26T16:00 # Copyright: (c) NERSC # Licence: This file is part of NANSAT. You can...
nansencenter/nansat
nansat/tests/test_node.py
Python
gpl-3.0
5,838
import soundcloud from soundcloud.tests.utils import MockResponse try: from urllib import urlencode except ImportError: from urllib.parse import urlencode from nose.tools import eq_, raises from fudge import patch def test_kwargs_parsing_valid(): """Test that valid kwargs are stored as pr...
adazey/Muzez
libs/soundcloud/tests/test_client.py
Python
gpl-3.0
5,660
import logging import re from markdown.extensions.codehilite import CodeHilite from markdown.extensions.codehilite import CodeHiliteExtension from markdown.preprocessors import Preprocessor from markdown.treeprocessors import Treeprocessor from wiki.core.markdown import add_to_registry logger = logging.getLogger(__na...
django-wiki/django-wiki
src/wiki/core/markdown/mdx/codehilite.py
Python
gpl-3.0
4,523
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
attente/snapcraft
snapcraft/tests/test_plugin_gulp.py
Python
gpl-3.0
5,389
from __future__ import absolute_import import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sugarcub.settings') from django.conf import settings # noqa app = Celery('sugarcub') # Using a string here means the worke...
bronycub/sugarcub
sugarcub/celery.py
Python
gpl-3.0
576
"""Code for finding content.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import abc import collections import os from ... import types as t from ...util import ( ANSIBLE_SOURCE_ROOT, ) from .. import ( PathProvider, ) class Layout: """Description of conte...
amenonsen/ansible
test/lib/ansible_test/_internal/provider/layout/__init__.py
Python
gpl-3.0
6,980
#!/usr/bin/env python # Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2008 # # Based on the original in EJS: # Copyright (C) Andrew Tridgell <tridge@samba.org> 2005 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General P...
gwr/samba
source4/scripting/python/samba/__init__.py
Python
gpl-3.0
11,696
CONGRESS_API_KEY = ""
wilfriedE/PoliticalMashup
settings.py
Python
gpl-3.0
21
#------------------------------------------------------------------------------- # # This file is part of pygimplib. # # Copyright (C) 2014, 2015 khalim19 <khalim19@gmail.com> # # pygimplib is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # t...
Buggaboo/gimp-plugin-export-layers
export_layers/pygimplib/pgitemdata.py
Python
gpl-3.0
14,487
#!/usr/bin/env python # """ These functions, when given a magnitude mag between cmin and cmax, return a colour tuple (red, green, blue). Light blue is cold (low magnitude) and yellow is hot (high magnitude). """ import math def floatRgb(mag, cmin, cmax, alpha=1.0): """ Return a tuple of floats between ...
cliburn/flow
src/plugins/visual/TwoDFrame/colormap.py
Python
gpl-3.0
1,367
# vim: set fileencoding=utf-8 : # GNU Solfege - free ear training software # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011 Tom Cato Amundsen # # 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...
yuanyelele/solfege
solfege/mainwin.py
Python
gpl-3.0
35,025
""" Python-packaging for synbiomts Copyright 2017 Alexander C. Reis, Howard M. Salis, all rights reserved. """ from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup(name='synbiomts', version='1.0', description='Test suite for DNA sequence-function mo...
reisalex/test-sfm
setup.py
Python
gpl-3.0
588
# -*- coding: utf-8 -*- import os """ Illustration d'un exercice de TD visant à montrer l'évolution temporelle de la densité de probabilité pour la superposition équiprobable d'un état n=1 et d'un état n quelconque (à fixer) pour le puits quantique infini. Par souci de simplicité, on se débrouille pour que E_1/hbar...
NicovincX2/Python-3.5
Physique/Physique quantique/Mécanique quantique/principe_de_superposition_lineaire.py
Python
gpl-3.0
1,519
#!/usr/bin/python import os import sys import grp import pwd import traceback import utils import hooking DEV_MAPPER_PATH = "/dev/mapper" DEV_DIRECTLUN_PATH = '/dev/directlun' def createdirectory(dirpath): # we don't use os.mkdir/chown because we need sudo command = ['/bin/mkdir', '-p', dirpath] retcod...
DragonRoman/rhevm-utils
3.0/hooks/directlun/before_vm_migrate_destination.py
Python
gpl-3.0
3,145
"""~google <search term> will return three results from the google search for <search term>""" import re import requests from random import shuffle from googleapiclient.discovery import build import logging from secret_example import GOOGLE_CUSTOM_SEARCH_ENGINE, GOOGLE_SEARCH_API """fuction to fetch data from Googl...
Eulercoder/fabulous
fabulous/services/google.py
Python
gpl-3.0
1,253
from typing import List, Tuple, Union import fwdpy11._fwdpy11 import fwdpy11._types import numpy as np def simplify(pop, samples): """ Simplify a TableCollection stored in a Population. :param pop: A :class:`fwdpy11.DiploidPopulation` :param samples: A list of samples (node indexes). :return: T...
molpopgen/fwdpy11
fwdpy11/_functions/simplify_tables.py
Python
gpl-3.0
2,314
#!/usr/bin/python # -*- coding: utf-8 -*- """ Btc plugin for Varas Author: Neon & A Sad Loner Last modified: November 2016 """ import urllib2 from plugin import Plugin name = 'Bitcoin' class Bitcoin(Plugin): def __init__(self): Plugin.__init__(self,"bitcoin","<wallet> Return current balance from a ...
GooogIe/VarasTG
plugins/btc.py
Python
gpl-3.0
751
# Copyright (C) 2013 Bernd Feige # This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING). """ Presentation utilities. """ from . import trgfile class PresLog(object): # Basic log file reading. def __init__(self,logfile,part='events'): '''part can be 'events' or 'trials' for the first or sec...
berndf/avg_q
python/avg_q/Presentation.py
Python
gpl-3.0
3,161
#!/usr/bin/env python #encoding:utf8 # # file: filter6_tests.py # author: sl0 # date: 2013-03-06 # import unittest from adm6.filter6 import IP6_Filter, Ip6_Filter_Rule from sys import stdout from os.path import expanduser as homedir from ipaddr import IPv6Network from os import getenv as get_env home_dir_replac...
sl0/adm6
tests/test_03_filter6.py
Python
gpl-3.0
102,052
#!/usr/bin/env python # # ParameterWeaver: a code generator to handle command line parameters # and configuration files for C/C++/Fortran/R/Octave # Copyright (C) 2013 Geert Jan Bex <geertjan.bex@uhasselt.be> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gener...
gjbex/parameter-weaver
src/fortran_parser_test.py
Python
gpl-3.0
2,335
sabor = input() quantidade = int(input()) if sabor.lower() == "morango" or sabor.lower() == "cereja": total = quantidade*4.50 elif sabor.lower() == "damasco" or sabor.lower() == "siriguela": total = quantidade*3.80 else: total = quantidade*2.75 print("%.2f"%total) if quantidade > 2: print ("COM CALDA"...
SANDEISON/The-Huxley
Python/Sorveteria Tropical,py.py
Python
gpl-3.0
351
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # 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,...
bckwltn/SickRage
sickbeard/providers/womble.py
Python
gpl-3.0
2,302
# -*-coding:utf-8-*- __all__ = ['database', 'guide', 'gff', 'uniprot']
wolfsonliu/crispr
pycas/utils/__init__.py
Python
gpl-3.0
72
from sqlalchemy import Column, Integer, String, DateTime, Boolean, ForeignKey from project.database import Base from project.database import db_session from sqlalchemy.orm import relationship from sqlalchemy_utils import EmailType from flask.ext.babel import lazy_gettext as _ # FIXME: move to extensions from flask.ext...
PyIran/website
project/apps/user/models.py
Python
gpl-3.0
3,333
# Generated by Django 2.1.3 on 2019-02-22 22:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0004_auto_20170418_0219'), ] operations = [ migrations.AddField( model_name='profile', name='terms_accep...
LCOGT/valhalla
valhalla/accounts/migrations/0005_profile_terms_accepted.py
Python
gpl-3.0
406
import json import os.path import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../scripts')) from flask import Flask, render_template, request from py2neo import neo4j from ollie import pipeline app = Flask(__name__) """@app.route('/render', method=['POST']) def render(): pairs = json.loads(re...
dash1291/major
webserver/app.py
Python
gpl-3.0
4,561
from __future__ import division __author__ = 'wenqihe' import sys import random import math class PLSVM: def __init__(self, feature_size, label_size, type_hierarchy, lambda_reg=0.1, max_iter=5000, threshold=0.5, batch_size=100): self._feature_size = feature_size self._label_size = label_size ...
shanzhenren/PLE
Classifier/PLSVM.py
Python
gpl-3.0
4,745
import numpy as np from data_management.database import Database from utils.utils import log, today class DataManager(object): name = "DataManager" def __init__(self, monkey, starting_point="2016-12-01", end_point=today(), database_path=None): self.db = Database(database_path) self.monkey ...
AurelienNioche/MonkeyProject
data_management/data_manager.py
Python
gpl-3.0
6,946
#!/usr/bin/env python """ crate_anon/preprocess/postcodes.py =============================================================================== Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of CRATE. CRATE is free software: you can redistribute it and/or modify it under...
RudolfCardinal/crate
crate_anon/preprocess/postcodes.py
Python
gpl-3.0
52,340
from django.contrib.auth.models import User from ws.messages import security from ws.models import Participant class PrefetchGroupsMiddleware: """Prefetch the user's groups for use in the requset. We do a lot of group-centric logic - if the user's groups aren't prefetched, then we can easily have n+1 qu...
DavidCain/mitoc-trips
ws/middleware.py
Python
gpl-3.0
1,876
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations #import tagging_autocomplete.models import datetime class Migration(migrations.Migration): dependencies = [ ('thedirectory', '0003_auto_20150525_1515'), ] operations = [ migrations.Al...
owatte/thecaribfos
apps/thedirectory/migrations/0004_auto_20150529_1416.py
Python
gpl-3.0
616
import unittest from pyicoteolib.utils import DualSortedReader from pyicoteolib.core import BED class TestUtils(unittest.TestCase): def test_dual_reader(self): reader = DualSortedReader("test_files/mini_sorted.bed", "test_files/mini_sorted2.bed", BED, False, False) merged_file = open("test_fil...
RegulatoryGenomicsUPF/pyicoteo
utest/testUtils.py
Python
gpl-3.0
566
import sys sentid_prev = 0 first_line = True first_word = True for line in sys.stdin: row = line.strip().split() if first_line: word_ix = row.index('word') sentid_ix = row.index('sentid') first_line = False else: word = row[word_ix] sentid = row[sentid_ix] i...
modelblocks/modelblocks-release
resource-general/scripts/itemmeasures2lineitems.py
Python
gpl-3.0
588
#!/usr/bin/env python3 import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arsoft.web.ddns.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
aroth-arsoft/arsoft-web-ddns
manage.py
Python
gpl-3.0
259
import numpy as np import sys import os import time from ase import Atom, Atoms from ase.visualize import view from ase.units import Bohr from ase.structure import bulk from gpaw import GPAW from gpaw.atom.basis import BasisMaker from gpaw.response.df import DF from gpaw.mpi import serial_comm, rank, size from gpaw.uti...
ajylee/gpaw-rtxs
gpaw/test/aluminum_testcell.py
Python
gpl-3.0
1,942
"""Injection control subpackage."""
lnls-sirius/dev-packages
siriuspy/siriuspy/injctrl/__init__.py
Python
gpl-3.0
36
import os CSRF_ENABLED = True ENV = os.environ.get('ENVIRONMENT', 'dev') MODEL_HASH = os.environ.get('MODEL_HASH') PROJECT_PATH = os.path.realpath(os.path.dirname(__file__)) ROOT_PATH = BASE_DIR = os.path.join(os.path.dirname(__file__), '..') SECRET_KEY = os.environ.get('SECRET_KEY') STATIC_FOLDER = os.path.join(ROOT...
opsolutely/flask-nginx-starter
app/config.py
Python
gpl-3.0
1,274
import numpy as np import torch import time from torch.autograd import Variable ''' fast beam search ''' def repackage_hidden(h): """Wraps hidden states in new Variables, to detach them from their history.""" if type(h) == Variable: return Variable(h.data) else: return tuple(repackage_hidden...
tshi04/machine-learning-codes
deliberation_network/utils.py
Python
gpl-3.0
9,232
from jabbapylib.distance.dist import lev_dist, ham_dist, similarity def test_lev_dist(): assert lev_dist('ag-tcc', 'cgctca') == 3 assert lev_dist('GUMBO', 'GAMBOL') == 2 assert lev_dist('Google', 'Yahoo!') == 6 def test_ham_dist(): assert ham_dist('toned', 'roses') == 3 def test_similarity(): ass...
jabbalaci/jabbapylib
tests/distance/test_dist.py
Python
gpl-3.0
358
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simple command line interface to pyluxafor. """ from __future__ import division, print_function, absolute_import import argparse import sys import logging from pyluxafor import Devices from pyluxafor import Wave, Pattern, Leds from pyluxafor import __version__ __auth...
mais4719/PyLuxafor
pyluxafor/cli.py
Python
gpl-3.0
9,126
''' *** Ki Renamer *** usage: kir <filter> <rule> [-p] [-r] <filter> Regex - Filter the files to rename <rule> Renaming rule Options: --version Displays the current version of Ki Renamer -h, --help Show usage and options -p, --preview Print more info...
cro-ki/ki-renamer
kir.py
Python
gpl-3.0
1,937
# -*- coding:utf-8 -*- '''Created on 2014-8-7 @author: Administrator ''' from sys import path as sys_path if not '..' in sys_path:sys_path.append("..") #用于import上级目录的模块 import web #早起的把一个文件分成多个文件,再把class导入 from login.login import (index,login,loginCheck,In,reset,register,find_password) from blog.blog imp...
lqe/EconomyCompensation
code.py
Python
gpl-3.0
2,064
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
fernandog/Sick-Beard
sickbeard/postProcessor.py
Python
gpl-3.0
41,517
# coding=utf-8 from elections.tests import VotaInteligenteTestCase as TestCase from elections.models import Election from django.core.urlresolvers import reverse from candideitorg.models import Candidate from django.core.management import call_command class PhotoLoaderCase(TestCase): def setUp(self): supe...
lfalvarez/nouabook
elections/tests/photo_loader_tests.py
Python
gpl-3.0
1,842