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
# This file is part of kernelconfig. # -*- coding: utf-8 -*- import abc import collections.abc import os.path from . import parser __all__ = [ "ConfigOptionConditionContext", "IncludeFileConditionContext" ] class BaseConditionContext(collections.abc.Mapping): @abc.abstractproperty def COND_OPS(cl...
dywisor/kernelconfig
kernelconfig/lang/cond.py
Python
gpl-2.0
3,328
#################################################### # Calculate Mandelbrot set and save it as a bmp image # # Data parallel version using Pycuda # Create string with cuda code and let the graphics # card farm out the work to each warp. # #################################################### import bmp import pycu...
grajasumant/ducking-octo-cyril
misctests/mandelbrot_cuda.py
Python
gpl-2.0
1,857
#!/usr/bin/env python # UFO-launcher - A multi-platform virtual machine launcher for the UFO OS # # Copyright (c) 2008-2009 Agorabox, Inc. # # This 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 versi...
vienin/vlaunch
src/createrawvmdk.py
Python
gpl-2.0
3,765
''' Created on Dec 23, 2011 @author: ajju ''' from common.DataObjects import VideoHostingInfo, VideoInfo, VIDEO_QUAL_SD from common import HttpUtils, AddonUtils import re def getVideoHostingInfo(): video_hosting_info = VideoHostingInfo() video_hosting_info.set_video_hosting_image('') video_hosting_info.se...
dknlght/dkodi
src/script.module.turtle/lib/snapvideo/VidXden.py
Python
gpl-2.0
1,841
#!/usr/bin/python ''' # Andrei Costin <zveriu@gmail.com>, 2011 # pm3_eml2mfd.py # Converts PM3 Mifare Classic emulator EML text file to MFD binary dump file ''' from __future__ import with_statement import sys import binascii def main(argv): argc = len(argv) if argc < 3: print 'Usage:', argv[0], 'inp...
iceman1001/proxmark3
client/pm3_eml2mfd.py
Python
gpl-2.0
661
class Letras: """ - Contenedor de letras (no incluye la enie). - Tiene tres set(): - vocales. - consonantes. - letras. - Tener en cuenta que al ser Set(), no tienen orden, por lo que de ser necesario, se deben castear a list() y ordenar el nuevo objeto con ...
pepitogithub/PythonScripts
Letras.py
Python
gpl-2.0
550
# # awesome.py # # Copyright (C) 2014 Fabio Erculiani # # 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...
Sabayon/anaconda
pyanaconda/installclasses/awesome.py
Python
gpl-2.0
1,507
#!/usr/bin/env python # -*- coding: UTF-8 -*- import datetime import random import unittest import dateutil.tz import MySQLdb import MySQLdb.cursors import _mysql_exceptions import basetranslate import config class ShortDBConn(object): """Connection to Short database. Args: data_table_name: name of...
dandersson/shortweb
swlib/dbinteraction.py
Python
gpl-2.0
12,341
import datetime from src import ModuleManager, utils PRUNE_TIMEDELTA = datetime.timedelta(weeks=4) SETTING_NAME = "inactive-prune" SETTING = utils.IntRangeSetting(0, None, SETTING_NAME, "Amount of days of inactivity before we leave a channel") MODE_SETTING_NAME = "inactive-prune-modes" MODE_SETTING = utils.BoolS...
jesopo/bitbot
modules/inactive_channels.py
Python
gpl-2.0
2,786
import os from config import config from incremental_upload_handler import IncrementalUploadHandler from Utils.util import FileUtil from file_entity import FileEntity def gen_test_data(): server_file = os.path.join(config.server_folder,'test.txt') client_file = os.path.join(config.client_folder,'test.txt') ...
JasonJDong/CompressBinary
IncrementalUpdate/IncrementalUpdate/main.py
Python
gpl-2.0
1,595
#!/usr/bin/python2 # -*- coding: utf-8 -*- """ doc2md.py generates Python documentation in the Markdown (md) format. It was written to automatically generate documentation that can be put on Github or Bitbucket wiki pages. It is initially based on Ferry Boender's pydocmd. It is as of yet not very complete and is more...
blasterbug/doc2md.py
doc2md.py
Python
gpl-2.0
7,823
# -*- coding: utf-8 -*- # # Développement d'une application web de création de quiz documentation build configuration file, created by # sphinx-quickstart on Mon Dec 29 18:28:40 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values...
csudmath/ma3ecg
source/conf.py
Python
gpl-2.0
7,658
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup APP = ['aggregate.py'] DATA_FILES = [] OPTIONS = {'argv_emulation': True} setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], )
mtnman38/Aggregate
aggForFoundation/setup.py
Python
gpl-2.0
311
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Doug Blank <doug.blank@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 ...
dermoth/gramps
gramps/gui/editors/editlink.py
Python
gpl-2.0
9,653
# -*- coding: utf-8 -*- ''' script.screensaver.football.panel - A Football Panel for Kodi RSS Feeds, Livescores and League tables as a screensaver or program addon Copyright (C) 2016 enen92 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Gener...
enen92/script.screensaver.football.panel
resources/lib/common_addon.py
Python
gpl-2.0
2,346
#!/usr/bin/env python def main(l): maximum = l[-1] profits = [] for i in range(len(l)-1, -1, -1): if l[i] > maximum: maximum = l[i] else: profits.append(maximum - l[i]) return sum(profits) import sys T = int(sys.stdin.next()) for i in range(T): N = int(sys.stdin.next()) l = map(int,sys...
ryota-sugimoto/hackerrank
dynamic_programming/stock_maximize/stock_maximize_2.py
Python
gpl-2.0
359
# -*- coding: utf-8 -*- # # This file is part of CERN Analysis Preservation Framework. # Copyright (C) 2016 CERN. # # CERN Analysis Preservation Framework 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...
xchen101/analysis-preservation.cern.ch
cap/modules/records/ext.py
Python
gpl-2.0
1,715
# -*- coding: utf-8 -*- ##--------------------------------------## # Barre d'outils pour la géométrie # ##--------------------------------------## # WxGeometrie # Dynamic geometry, graph plotter, and more for french mathematic teachers. # Copyright (C) 2005-2013 Nicolas Pourcelot ...
wxgeo/geophar
wxgeometrie/modules/exercice_equations_droites/barre_outils_ex_eq_dte.py
Python
gpl-2.0
2,243
import nltk import string import os from nltk.corpus import stopwords from collections import Counter from nltk.stem.porter import * def get_tokens(): with open('F:\\paper\\myPython\\py2.7\\text_data\\obama_msg.txt', 'r') as shakes: text = shakes.read() lowers = text.lower() #Punctuation Removal ...
lele94218/social_network_paper
facebook/getdata/Tf-Idf.py
Python
gpl-2.0
852
from networkx.algorithms.flow.maxflow import * from networkx.algorithms.flow.mincost import *
azlanismail/prismgames
examples/games/car/networkx/algorithms/flow/__init__.py
Python
gpl-2.0
98
# -*- coding: utf-8 -*- import platform __all__ = ['IS_WINDOWS', 'IS_OSX', 'IS_LINUX', 'Phonon', 'GeoIP2Reader', 'winsound'] IS_WINDOWS = False IS_OSX = False IS_LINUX = False _platform = platform.system() if _platform == 'Windows': IS_WINDOWS = True elif _platform == 'Darwin': IS_OSX = True elif _platform =...
doctorguile/pyqtggpo
ggpo/common/runtime.py
Python
gpl-2.0
647
# coding: utf-8 from qgis.gui import QgsDualView from qgis.utils import iface layer = iface.activeLayer() canvas = iface.mapCanvas() dv = QgsDualView() dv.init(layer, canvas) # The active layer is a vector layer dv.setView(QgsDualView.AttributeEditor) # It could be QgsDualView.AttributeTable instead dv.show()
webgeodatavore/pyqgis-samples
gui/qgis-sample-QgsDualView.py
Python
gpl-2.0
314
#C:\Python34\python.exe # -*- coding: utf-8 -*- import random from structs import * BLOCK, VOID = True, False foret = { 'stone': ['s'], 'snow': ['I'], 'grass': ['h'], 'dirt': ['U'] } desert = { 'stone': ['s'], 'snow': ['d'], 'grass': ['d'], 'dirt': ['d'] } noman_land = { 'stone': ...
Loodoor/UrWorld-Alpha-3.x
server/gentest.py
Python
gpl-2.0
6,381
# -*- coding:utf-8 -*- # Copyright 2014 CRS4 # All Rights Reserved. # # Licensed under the GNU General Public License, version 2 (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.gnu.org/licenses/gpl-2.0.html # ...
crs4/orchestrator
dispatcher/components/api.py
Python
gpl-2.0
1,535
from adsws.testsuite import make_test_suite, \ run_test_suite, AdsWSAppTestCase, FlaskAppTestCase, AdsWSTestCase import os import inspect import tempfile class FactoryTest(FlaskAppTestCase): @property def config(self): return { 'SQLALCHEMY_DATABASE_URI' : 'sqlite://', '...
ehenneken/adsws
adsws/tests/test_factory.py
Python
gpl-2.0
1,777
#!/usr/bin/evn python # Start a network import time import os import re import sys import commands import libvirt from libvirt import libvirtError from src import sharedmod required_params = ('networkname',) optional_params = {} def start(params): """activate a defined network""" global logger logger ...
ryanmiao/libvirt-test-API
repos/network/start.py
Python
gpl-2.0
1,786
import sys from typing import List from .device import Device from .enumeratehelper import EnumerateHelper class DeviceManager(object): __instance = None @classmethod def instance(cls): if cls.__instance is None: helper = EnumerateHelper() cls.__instance = cls(helper) ...
FrodeSolheim/fs-uae-launcher
fsgamesys/input/devicemanager.py
Python
gpl-2.0
2,793
# encoding: utf8 # # This file is part of JsQt. # # Copyright (C) Arskom Ltd. www.arskom.com.tr # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your o...
arskom/JsQt
src/jsqt/il/qt/gui.py
Python
gpl-2.0
7,372
import threading from .app.crawl import getArticle, rucrawler import pymongo INTERVAL_SECONDS = 30*60 MONGO_HOST = '52.54.134.145' MONGO_PORT = 27017 MONGO_DATABASE = 'mizzychan' def get_db(): connection = pymongo.MongoClient(MONGO_HOST, MONGO_PORT) database = getattr(connection, MONGO_DATABASE) return co...
Jolopy/GimpHub
runPeriodic.py
Python
gpl-2.0
1,892
#!/usr/bin/env python # # Provides simple functionallity to download pdb files using python. # Returns the path to the downloaded file import os, urllib2, gzip def get_pdb(pdb_id): fname = 'pdb/'+pdb_id+'.pdb' #check if pdb is present if os.path.exists(fname): return fname #check for pdb dir if not os.path.ex...
Alicimo/codon_optimality_code
legacy_code/latest_version/get_pdb.py
Python
gpl-2.0
730
#coding=utf-8 import string, random, time from django.http import Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User import os def upload(request): file_path='%s_' %(st...
ShanghaitechGeekPie/LBlogger
LBlogger/LBlogger/part_upload.py
Python
gpl-2.0
809
from collections import OrderedDict class LRUCache(object): def __init__(self, capacity): self.max_capacity = capacity self.cached = OrderedDict() def __contains__(self, k): return k in self.cached def __getitem__(self, item): return self.get(item) def __setitem__(sel...
ucsb-seclab/ictf-framework
scoring_ictf/scoring_ictf/simple_lru_cache.py
Python
gpl-2.0
1,388
#! /usr/bin/env python __author__ = "Cathy Lozupone" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Catherine Lozupone", "Greg Caporaso", "Jose Antonio Navas Molina"] __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "Cathy Lozupone" __email__ = "lozupone@colorado.edu" ...
wasade/qiime
scripts/convert_unifrac_sample_mapping_to_otu_table.py
Python
gpl-2.0
457
#!/usr/bin/env python ''' W celu poprawniego dzialania ponizszego skryptu, trzeba skonigurowac logowanie RSA / DSA na maszynie na ktora, bedziemy przenosic nasza kopie zapasowa. Sposob konfiguracji mozna znalezc tutaj http://www.nerdokracja.pl/linux-logowanie-ssh-klucze-rsa/ ''' import os import os.path print ('Tw...
laszewsm/backuper
backup.py
Python
gpl-2.0
1,456
from django.shortcuts import render_to_response from issue.views import get_current_squiggle, get_upcoming_squiggles def home(request): return render_to_response('base.html',{ 'csquig':get_current_squiggle(), 'upcoming_squiggles': get_upcoming_squiggles()})
badrihippo/sirius
sirius/views.py
Python
gpl-2.0
278
from imageupload.security import BaseAuth from pyramid.security import ( DENY_ALL, Deny, Everyone, Allow, ) class HomeAuth(object): @staticmethod def home(request): class HomePage(BaseAuth): def __acl__(self): return [ (Allow, Everyone,...
asif-mahmud/Pyramid-Apps
imageupload/imageupload/views/home/security/__init__.py
Python
gpl-2.0
381
from bottle import request, redirect from passlib.hash import pbkdf2_sha256 from libraries.template import view from sqlalchemy import exc from sqlalchemy.sql import select from libraries.regex import email as EmailRegex,\ username as UsernameRegex from libraries.database import users, engine as db from libraries.f...
evrom/genitag
controllers/site_root/login.py
Python
gpl-2.0
2,373
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (C) 2009-2010 Nicolas P. Rougier # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #---------------...
Flavsditz/projects
eyeTracking/pupil/pupil_src/shared_modules/atb/constants.py
Python
gpl-2.0
1,491
# -*- coding: utf-8 -*- """Page model for Cloud Intel / Reports / Dashboards""" from navmazing import NavigateToAttribute, NavigateToSibling from widgetastic.widget import Text, Checkbox from widgetastic_manageiq import SummaryFormItem, DashboardWidgetsPicker from widgetastic_patternfly import Button, Input from utils...
dajohnso/cfme_tests
cfme/intelligence/reports/dashboards.py
Python
gpl-2.0
10,188
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under th...
kain88-de/mdanalysis
package/MDAnalysis/core/topologyobjects.py
Python
gpl-2.0
33,789
from django.http import HttpResponse from django.shortcuts import redirect, render from lists.models import Item, List # Create your views here. def home_page(request): return render(request, 'home.html') def view_list(request, list_id): list_ = List.objects.get(id=list_id) return render(request, 'list.html', ...
javierLiarte/tdd-goat-python
lists/views.py
Python
gpl-2.0
687
"""Add reports field to project Revision ID: 1640c7d75e5f Revises: 1d18843a1994 Create Date: 2016-09-09 16:11:28.099423 """ # revision identifiers, used by Alembic. revision = '1640c7d75e5f' down_revision = '1d18843a1994' from alembic import op import sqlalchemy as sa def upgrade(): ''' Add the column _report...
pypingou/pagure
alembic/versions/1640c7d75e5f_add_reports_field_to_project.py
Python
gpl-2.0
579
import numpy def write_pnm_to(img, f, maxval=255): if len(img.shape) == 1: raise 'write_pnm: img is one-dimensional: must be 2 or 3.' elif len(img.shape) == 2: #pnmtype = 'G' pnmcode = 5 (h,w) = img.shape elif len(img.shape) == 3: (h,w,planes) = img.shape #pnmtype = 'P' pnmcode = 6 if planes != 3: ...
blackball/an-test6
util/imageutils.py
Python
gpl-2.0
1,081
# Copyright (C) 2005-2006 Joe Wreschnig # Copyright (C) 2006-2007 Lukas Lalinsky # # 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 la...
quodlibet/mutagen
mutagen/asf/__init__.py
Python
gpl-2.0
9,848
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015, 2016 CERN. # # Invenio 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...
hachreak/invenio-pages
setup.py
Python
gpl-2.0
4,023
# Copyright (C) 2010-2012 Red Hat, Inc. # This work is licensed under the GNU GPLv2 or later. # To test "virsh hostname" command from libvirttestapi.utils import process required_params = () optional_params = {} VIRSH_HOSTNAME = "virsh hostname" def hostname(params): """check virsh hostname command """ ...
libvirt/libvirt-test-API
libvirttestapi/repos/domain/hostname.py
Python
gpl-2.0
1,070
versions = { '7.1.1': ['2022-03-04', { 'fix': { '1649': 'Minor label error in model image', '1650': 'Obsolete database version in install SQL'}}], '7.1.0': ['2022-02-15', { 'feature': { '1506': 'Update CIDOC CRM to 7.1.1', '1285': 'Improved value t...
craws/OpenAtlas
openatlas/util/changelog.py
Python
gpl-2.0
26,790
import collections import os import subprocess import sys from contextlib import contextmanager from PyQt5.QtWidgets import QScroller from qgis.core import QgsProject, QgsFeatureRequest, QgsGeometry, NULL, Qgis, QgsExpressionContext, \ QgsExpressionContextScope, QgsExpression, QgsFeature from roam.structs import ...
DMS-Aus/Roam
src/roam/api/utils.py
Python
gpl-2.0
8,657
# -*- coding: UTF-8 -*- ''' series9 scraper for Exodus forks. Nov 9 2018 - Checked Updated and refactored by someone. Originally created by others. ''' import re,traceback,urllib,urlparse from resources.lib.modules import cleantitle from resources.lib.modules import client from resources.lib.modules i...
RuiNascimento/krepo
script.module.lambdascrapers/lib/lambdascrapers/sources_ lambdascrapers/en/series9.py
Python
gpl-2.0
7,221
#! /usr/bin/env python3 # Copyright 2007 Google 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 2 # of the License, or (at your option) any later version. # # This program...
itensionanders/distcc
include_server/cache_basics.py
Python
gpl-2.0
37,214
# # # Copyright 2012-2019 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 (...
gppezzi/easybuild-framework
easybuild/toolchains/mpi/psmpi.py
Python
gpl-2.0
1,693
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2002 Ben Escoto <ben@emerose.org> # Copyright 2007 Kenneth Loafman <kenneth@loafman.com> # Copyright 2010 Marcel Pennewiss <opensource@pennewiss.de> # Copyright 2014 Edgar Soldin # - webdav, fish, sftp support # - htt...
mjuric/duplicity
duplicity/backends/lftpbackend.py
Python
gpl-2.0
9,388
from django.contrib import admin from .models import * class CategoryAdmin(admin.ModelAdmin): list_display = ('id', 'title') class ReviewCategoryAdmin(admin.ModelAdmin): list_display = ('id', 'title') class BlogCategoryAdmin(admin.ModelAdmin): list_display = ('id', 'title') class CardAdmin(admin.Mode...
BijoySingh/HomePage
homepage/admin.py
Python
gpl-2.0
1,571
# -*- coding: utf-8 -*- """ /*************************************************************************** Openlayers Overview - A QGIS plugin to show map in browser(google maps and others) ------------------- begin : 2011-03-01 copyright : (C) 2011 by Luiz Mott...
sourcepole/qgis-openlayers-plugin
openlayers/openlayers_overview.py
Python
gpl-2.0
2,585
# Copyright (C) 2008-2010 Adam Olsen # # 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, or (at your option) # any later version. # # This program is distributed in the hope that...
Zarokka/exaile
xlgui/preferences/plugin.py
Python
gpl-2.0
11,952
#!/usr/bin/env python # -*- coding: <utf-8> -*- """ This file is part of Spartacus project Copyright (C) 2016 CSE 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, o...
CommunicationsSecurityEstablishment/spartacus
CapuaEnvironment/Instruction/Instruction.py
Python
gpl-2.0
4,253
"""Gestión de controlador con comunicación OPC UA. """ __author__="José A. Casares" __date__="2016-02-14" __version__="1.3" from threading import Thread from TagModule import * import time from opcua import ua, Client class OPCPLC(PLC): """PLC con comunicación OPC UA. Args:: address (str): Dirección I...
josecasares/UWS
OPCPLCModule.py
Python
gpl-3.0
6,469
# -*- coding: utf-8 -*- # Copyright © 2014-2018 GWHAT Project Contributors # https://github.com/jnsebgosselin/gwhat # # This file is part of GWHAT (Ground-Water Hydrograph Analysis Toolbox). # Licensed under the terms of the GNU General Public License. # ---- Standard library imports import os import csv import sys ...
jnsebgosselin/WHAT
gwhat/brf_mod/kgs_brf.py
Python
gpl-3.0
4,831
#decorator1.py def foo(f): """foo fucntion Docstring""" def wrapper(*x, **y): """wrapper fucntion Docstring""" print('调用函数:', f.__name__) return f(*x, **y) return wrapper @foo def bar(x): """bar fucntion Docstring""" return x**2 #测试代码 if __name__ == '__main__': print(bar(...
GH1995/tools
archives/Python_江老师给的代码/chapter08/decorator1.py
Python
gpl-3.0
389
import ConfigParser import os class Config_manager: def __init__(self): self.config = ConfigParser.ConfigParser() self.out_folder = None def set_current_folder(self,t): self.cwd = t def set_config(self,file_cfg): self.config.read(file_cfg) output_folder_cfg = self....
cltl/lexical_pattern_extractor
lib/config_manager_indexer.py
Python
gpl-3.0
2,820
# coding=utf-8 from django.views.generic.edit import CreateView, DeleteView from proposal_subscriptions.models import SearchSubscription from django.contrib.auth.mixins import LoginRequiredMixin from pytimeparse.timeparse import timeparse from django.forms import ModelForm from django.http import JsonResponse from djan...
lfalvarez/votai
proposal_subscriptions/views.py
Python
gpl-3.0
3,370
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 Lic...
amenonsen/ansible
lib/ansible/modules/network/fortios/fortios_system_ntp.py
Python
gpl-3.0
13,372
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # streamondemand.- XBMC Plugin # Canal para itafilmtv # http://blog.tvalacarta.info/plugin-xbmc/streamondemand. # By Costaplus # ------------------------------------------------------------ import re import urlparse impor...
dentaku65/plugin.video.sod
channels/leserietv.py
Python
gpl-3.0
12,830
from model.component.component_model import ComponentModel from model.component.component_specification import ComponentSpecification from model.computation_unit.computation_unit_model import ComputationUnitModel from model.graph.graph_model import GraphModel class ViewscreenListener: """ Receives requests fr...
MichSchli/Mindblocks
controller/viewscreen_controller/viewscreen_listener.py
Python
gpl-3.0
4,045
import gym import numpy as np import random import pickle import os class ReplayMemory(object): def __init__(self, max_size, observation_dims, observation_dtype, action_space: gym.Space, history: int, discount, use_priority=False): assert len(list(observation_dims)) == 3 or len(list(obser...
davidenitti/ML
RL/agent/buffers.py
Python
gpl-3.0
7,628
extension = None #httpDirectory = None omlCitation = None
OsirisSPS/osiris-sps
client/data/extensions/5B1D133CA24D2B5B93B675279CB60C9CB7E47502/scripts/globalvars.py
Python
gpl-3.0
57
""" Bob is a honest user. Bob creates transactions and smart contracts, like Alice. Thread for sync must be started separately, wallet must be already created. """ from hodl import block import logging as log def main(wallet, keys=None): log.info("Bob's main started") log.debug("Bob's money: " + str(wallet.bc...
leofnch/kc
tests/testnet/roles/Bob.py
Python
gpl-3.0
526
import unittest from collections import OrderedDict from base64 import b64encode from antigate import AntiGate API_KEY = "2e9651d71c10def49389f40f9feb8794" IMAGE1 = "captcha/123.jpg" IMAGE2 = "captcha/456.jpg" class TestAnigateCase(unittest.TestCase): def test_balance(self): balance = AntiGate(API_KEY)....
gotlium/antigate
test_cases.py
Python
gpl-3.0
3,949
""" Collection of pySPACE system and unit tests .. note:: The section with :mod:`~pySPACE.tests` is not really complete, but there is a script to run all unittests automatically. """
pyspace/test
pySPACE/tests/__init__.py
Python
gpl-3.0
191
# -*- coding: utf-8 -*- from flask import Blueprint from ..models import Permission main = Blueprint('main', __name__) from . import views, errors, my_test # app_context_processor # let the variable Permission can accessed by all templates @main.app_context_processor def inject_permissions(): return dict(Permi...
yelongyu/chihu
app/main/__init__.py
Python
gpl-3.0
338
#!/usr/bin/python # Copyright (c) 2017-2018 Utrecht University # GNU General Public License v3.0 ANSIBLE_METADATA = { 'metadata_version': '1.1', 'supported_by': 'community', 'status': ['preview'] } from ansible.module_utils.basic import * IRODSCLIENT_AVAILABLE = False try: from irods.session import ...
UtrechtUniversity/yoda-ansible
library/irods_moduser.py
Python
gpl-3.0
1,822
# -*- coding: utf-8 -*- """ """ import logging import logging.handlers import sys STANDARD_FORMAT = '%(name)s [%(levelname)s] %(message)s' MESSAGE_ONLY_FORMAT = '%(message)s' def get_level(level_string): """ Returns an appropriate logging level integer from a string name """ levels = {'debug': loggi...
SavinaRoja/npyscreen2
npyscreen2/logs.py
Python
gpl-3.0
1,956
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('account', '0001_initial'), ] operations = [ migrations.CreateModel( name='mail_server', fields=[ ...
yangxianbo/jym
account/migrations/0002_mail_server.py
Python
gpl-3.0
834
def shortestPalindrome(str): if str is None: return strlen = len(str) for x in xrange(strlen): print str[x] def main(): print "Hello, world" str = 'aacecaaa' shortestPalindrome(str) if __name__ == '__main__': main()
ruchikd/Algorithms
Python/ShortestPalindrome/shortestPalindrome.py
Python
gpl-3.0
230
# Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above...
aslab/rct
higgs/branches/ros-groovy/higgs_gazebo_simulation/rqt_robot_plugins/rqt_robot_monitor/src/rqt_robot_monitor/abst_status_widget.py
Python
gpl-3.0
2,584
# Copyright 2017 DT42 # # This file is part of BerryNet. # # BerryNet 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. # # BerryNet is d...
DT42/BerryNet
berrynet/engine/tensorflow_engine.py
Python
gpl-3.0
3,670
#################################################################################################### # # PyResistorColorCode - Python Electronic Tools. # Copyright (C) 2012 Salvaire Fabrice # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
FabriceSalvaire/PyResistorColorCode
PyResistorColorCode/ConfigInstall.py
Python
gpl-3.0
1,206
def get_stack_elements(stack): return stack[1:stack.top].elements def get_queue_elements(queue): if queue.head <= queue.tail: return queue[queue.head:queue.tail - 1].elements return queue[queue.head:queue.length].elements + queue[1:queue.tail - 1].elements
wojtask/CormenPy
test/queue_util.py
Python
gpl-3.0
279
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('lizard_efcis', '0081_auto_20151203_1518'), ] operations = [ migrations.AlterField( model_name='mappingfield', ...
lizardsystem/lizard-efcis
lizard_efcis/migrations/0082_auto_20151203_1542.py
Python
gpl-3.0
527
from django.shortcuts import render def index(request): return render(request, 'backbone_ajax/index.html')
zmetcalf/django-webdev
backbone_ajax/views.py
Python
gpl-3.0
112
# import the ERPXE core API import core # Global variables TFTPBOOT_DIR = "/tftpboot" PLUGINS_DIR = TFTPBOOT_DIR + "/er/plugins" # try to Load configuration from file system or use defaults def load_configuration(): # try to fetch configuration from file try: config = core.get_configuration() exce...
ERPXE/erpxe
erpxe/cli.py
Python
gpl-3.0
2,519
# 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, os, json from frappe.custom.doctype.custom_field.custom_field import create_custom_fields from frappe.permissions import add_permission ...
tfroehlich82/erpnext
erpnext/regional/india/setup.py
Python
gpl-3.0
7,127
#!/usr/bin/env python """ MaTiSSe.py, Markdown To Impressive Scientific Slides """ __appname__ = "MaTiSSe.py" __description__ = "MaTiSSe.py, Markdown To Impressive Scientific Slides" __long_description__ = "MaTiSSe.py, Markdown To Impressive Scientific Slides. It is a very simple and stupid-to-use (KISS) presentation m...
szaghi/MaTiSSe
release/MaTiSSe-0.3.3/matisse/matisse.py
Python
gpl-3.0
6,252
# -*- coding: utf-8 -*- """ """ # Copyright (C) 2015 ZetaOps Inc. # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. # # Yeni Personel Ekle WF adimlarini icerir. from pyoko.model import field from pyoko import form from zengine.lib.forms import JsonForm from ze...
hiorws/ulakbus
ulakbus/views/personel/yeni_ekle.py
Python
gpl-3.0
8,289
#!/usr/bin/env python # Copyright (C) 2010 Douglas Eck # # This file is part of Gordon. # # Gordon 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 la...
bmcfee/gordon
gordon/db/gordon_db.py
Python
gpl-3.0
29,325
#!/usr/bin/env python import sys,os,random,errno import numpy as np import argparse from argparse import RawTextHelpFormatter # ---------------- Arguments parser = argparse.ArgumentParser(description='''Take as input time serial data (one locus). The output can be either mles or likelihood surface over a grid or the ...
sapfo/ancientselection
ancientselection/ancientselection.py
Python
gpl-3.0
12,851
s = raw_input().lower() score1 = score2 = 0 for i in xrange(len(s)): if s[i] == 'a' or s[i] == 'e' or s[i] == 'i' or s[i] == 'o' or s[i] == 'u': score2 += len(s)-i else: score1 += len(s)-i if score1 > score2: print 'Stuart ' + str(score1) elif score1 < score2: print 'Kevin ' + str(score2...
shree-shubham/Unitype
The Minion Game.py
Python
gpl-3.0
345
# module baseline.py # # Copyright (c) 2015 Rafael Reis # """ baseline module - Functions to produce the Baseline System's features. """ __version__="1.0" __author__ = "Rafael Reis <rafael2reis@gmail.com>" import re #import globoquotes def boundedChunk(s): """Indetifies the Bounded Chunk. Assigns a 1 to the...
rafael2reis/iqextractor
qextractor/preprocessing/baseline.py
Python
gpl-3.0
8,010
# -*- coding: utf-8 -*- # Dioptas - GUI program for fast processing of 2D X-ray diffraction data # Principal author: Clemens Prescher (clemens.prescher@gmail.com) # Copyright (C) 2014-2019 GSECARS, University of Chicago, USA # Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany ...
erangre/Dioptas
dioptas/model/util/smooth_bruckner_python.py
Python
gpl-3.0
2,059
#!/usr/bin/env python # -*- coding: utf-8 -*- # from httpwookiee.config import ConfigFactory from httpwookiee.core.tools import Tools, outmsg, inmsg from httpwookiee.http.parser.responses import Responses import socket import ipaddress import ssl import six class ClosedSocketError(Exception): """Raise this when...
regilero/HTTPWookiee
httpwookiee/http/client.py
Python
gpl-3.0
6,832
''' inherit_docstrings.py - this file is part of S3QL (http://s3ql.googlecode.com) Copyright © 2008 Nikolaus Rath <Nikolaus@rath.org> This program can be distributed under the terms of the GNU GPLv3. --- This module defines a metaclass and function decorator that allows to inherit the docstring for a function from ...
krnflake/s3ql
src/s3ql/inherit_docstrings.py
Python
gpl-3.0
4,064
#!/usr/bin/python # # Copyright 2011 Thomas Bollmeier # # This file is part of GObjectCreator2. # # GObjectCreator2 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 you...
ThomasBollmeier/GObjectCreator2
src/bin/gobject_creator2.py
Python
gpl-3.0
10,957
# -*- coding: utf-8 -*- # Mathmaker creates automatically maths exercises sheets # with their answers # Copyright 2006-2017 Nicolas Hainaux <nh.techn@gmail.com> # This file is part of Mathmaker. # Mathmaker is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
nicolashainaux/mathmaker
mathmaker/lib/old_style_sheet/AlgebraMiniTest0.py
Python
gpl-3.0
2,680
""" This subpackage contains nodes and trainers for gradient based learning. Its purpose is to automate backpropagation and gradient calculation for models that can be trained using gradient methods. This allows complex architectures to be trained using external optimizers that can use gradient and loss information. ...
npinto/Oger
Oger/gradient/__init__.py
Python
gpl-3.0
1,376
#!/usr/bin/env python3 import os from settings import JSONDIR, logging from defs import load_data, dump_data def sort_storage_records(records, sorted_systems): try: records.sort(key=lambda x: sorted_systems.index(x['Storage'])) except: pass return records def sum_3par(): capD = {} ...
tulsluper/sanscript
apps/da/scripts/form_capacity.py
Python
gpl-3.0
6,110
#!/usr/bin/env python # -*- coding: utf-8 -*- import MySQLdb, sys # for ide if False: from gluon import * def clumusuario(email): """consulto usuario tabla clave unificada""" dbmysql = MySQLdb.connect( host=myconf.take('datos.clum_srv'), port=int(myconf.take('datos.clum_port')), ...
redondomarco/useradm
src/models/unificada.py
Python
gpl-3.0
16,421
# 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): # Deleting field 'GeoImage.name' db.delete_column('lizard_damage_geoimage', 'name') # Adding fiel...
lizardsystem/lizard-damage
lizard_damage/migrations/0004_auto__del_field_geoimage_name__add_field_damageevent_landuse_slugs__ad.py
Python
gpl-3.0
10,066
#!/usr/bin/env python #This is a runtime-configurable implementation of the #linear congruentialpseudo-random number generator, #using the following formula: #y = (a*z+b) mod m #where: #z = the last generate result (or the seed at startup) #a,b,m = parameters (defaults generated randomly) # #Numbers created by the LC a...
ulikoehler/entropy-analysis-tools
RandGen/scripts/lc.py
Python
gpl-3.0
1,933
################################################################################ # # # Copyright (C) 2010-2018 The ESPResSo project # # ...
mkuron/espresso
doc/tutorials/06-active_matter/EXERCISES/flow_field.py
Python
gpl-3.0
5,548
############################################################################## # # Copyright (c) 2001, 2002 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # T...
Donkyhotay/MoonPy
zope/app/dtmlpage/interfaces.py
Python
gpl-3.0
1,715