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
from __future__ import unicode_literals from django.utils.encoding import python_2_unicode_compatible from django.db import models from django.contrib.auth.models import User from django.contrib.auth.models import Group from django.db.models.signals import post_save from django.dispatch import receiver from eveonline....
iAddz/allianceauth
groupmanagement/models.py
Python
gpl-2.0
4,177
# # Copyright 2012 IBM, Inc. # Copyright 2012-2014 Red Hat, 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. # # T...
txomon/vdsm
tests/configNetworkTests.py
Python
gpl-2.0
7,351
from tastypie import fields from tastypie.authentication import SessionAuthentication, MultiAuthentication from account.authentication import MultiApiKeyAuthentication from tastypie.validation import FormValidation from tastypie.resources import ModelResource from tastypie.authorization import Authorization from tastyp...
ipernet/RatticWeb
cred/api.py
Python
gpl-2.0
4,527
# # Copyright (C) 2014 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 2 as published by # the Free Software Foundation. # # This program is distributed in the hope...
sigmunau/nav
python/nav/web/navlets/error.py
Python
gpl-2.0
900
#!/usr/bin/python # -*- coding: latin1 -*- # $Id$ # # Author: Vasilis.Vlachoudis@cern.ch # Date: 20-Aug-2015 __author__ = "Vasilis Vlachoudis" __email__ = "Vasilis.Vlachoudis@cern.ch" __name__ = "Gear" from ToolsPage import DataBase import math from bmath import Vector from CNC import CNC,Block from ToolsPage impo...
Sci33/bCNC
plugins/gear.py
Python
gpl-2.0
4,988
# -*- coding: utf-8 -*- # # Atizo - The Open Innovation Platform # http://www.atizo.com/ # # Copyright (c) 2008-2010 Atizo AG. 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 Foundati...
atizo/djangojames
djangojames/forms/fields.py
Python
gpl-2.0
2,436
import sys import csv def intersect(a, b): """ return the intersection of two lists """ return list(set(a) & set(b)) def union(a, b): """ return the union of two lists """ return list(set(a) | set(b)) def combinarA(x,y): return (x,y,"A") def combinarB(x,y): return (x,y,"B") def printCSV(list,file...
fpradah/change_data_structure
src/cyclomatic.py
Python
gpl-2.0
1,610
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
pvint/Blender2MS3d
io_mesh_ms3d/export_ms3d.py
Python
gpl-2.0
11,954
from django import forms from evesch.egroup.models import UserGroup class UserGroupForm(forms.ModelForm): group_desc = forms.CharField( widget=forms.Textarea(attrs = {'cols': '30', 'rows': '5'})) class Meta: model = UserGroup exclude = ['org_name','group_removable','group_hash','meta'...
JoeJasinski/evesch
evesch/egroup/forms.py
Python
gpl-2.0
1,123
#!/usr/bin/env python # angelus.py - John Burnett & Will Johnson (c)2015 # # Angelus does the following: # -FFT analysis # -Partial tracking # -Modal analysis # -Resynthesis # # Angelus will eventually do the following: # -FFT Analysis -> Notation # -Modal Analysis -> 3D mesh (and reverse?) from FFT_Analyzer import ...
johncburnett/Angelus
src/angelus.py
Python
gpl-2.0
953
def mn(i): if (i == 1): return [1] elif (i == 0): return [10] else: j = [] m = 0 while (i != 1): ap = False for m in range(9,1,-1): if (i % m == 0): j.append(m) i /= m ...
volumo/timus
1000/1014.py
Python
gpl-2.0
555
##################################################################### # # core.py # # Copyright (c) 2015, Eran Egozy # # Released under the MIT License (http://opensource.org/licenses/MIT) # ##################################################################### import kivy from kivy.app import App from kivy.core.window...
eflynch/pygamelan
pygamelan/core.py
Python
gpl-2.0
2,581
# vim:set encoding=utf8: # (C) 2010-2012 Frank-Rene Schäfer from quex.engine.analyzer.mega_state.target import TargetByStateKey from quex.engine.analyzer.transition_map import TransitionMap from itertools import chain def do(ATm, AStateN, ASchemeN, BTm, BStateN, BSchemeN): """*Tm -- transitio...
dkopecek/amplify
third-party/quex-0.65.2/quex/engine/analyzer/mega_state/template/gain_transition_map.py
Python
gpl-2.0
4,059
# Copyright 2013 The Distro Tracker Developers # See the COPYRIGHT file at the top-level directory of this distribution and # at http://deb.li/DTAuthors # # This file is part of Distro Tracker. It is subject to the license terms # in the LICENSE file found in the top-level directory of this # distribution and at http:/...
sa2ajj/DistroTracker
pts/mail/management/commands/pts_dispatch.py
Python
gpl-2.0
2,039
# -*- coding: utf-8 -*- # Copyright: (c) 2018, SylvainCecchetto # GNU General Public License v2.0+ (see LICENSE.txt or https://www.gnu.org/licenses/gpl-2.0.txt) # This file is part of Catch-up TV & More from __future__ import unicode_literals import re from codequick import Resolver import urlquick from resources.l...
Catch-up-TV-and-More/plugin.video.catchuptvandmore
resources/lib/channels/it/paramountchannel_it.py
Python
gpl-2.0
775
#!/usr/bin/python import urllib2 import json, csv import subprocess import sys import platform import getopt all_flag = False download_flag = False filename=None offcore_events=[] try: opts, args = getopt.getopt(sys.argv[1:],'a,f:,d',['all','file=','download']) for o, a in opts: if o i...
jcmcclurg/serverpower
utilities/intel_pcm/pmu-query.py
Python
gpl-2.0
3,641
# 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 distributed in the hope that it will be useful, # but...
pierg75/pier-sosreport
sos/plugins/nis.py
Python
gpl-2.0
1,203
from Bio.Align import MultipleSeqAlignment from Bio import AlignIO import u2py u2py.initContext('./') inputAlignments = [] inputFile = open('../../data/samples/CLUSTALW/COI_copy1.sto', 'rU') inputAlignments.append(AlignIO.read(inputFile, 'stockholm')) inputFile.close() inputFile = open('../../data/samples/CLUSTALW/HI...
ugeneunipro/ugene
src/corelibs/U2Script/src/python/samples/test_muscle.py
Python
gpl-2.0
671
import pytest class TestDmypy: @pytest.mark.complete( "dmypy ", require_cmd=True, xfail="! dmypy --help &>/dev/null" ) def test_commands(self, completion): assert "help" in completion assert not any("," in x for x in completion) @pytest.mark.complete("dmypy -", require_cmd=Tru...
algorythmic/bash-completion
test/t/test_dmypy.py
Python
gpl-2.0
423
def do(A, B): """Computes 'gain' with respect to entry actions, if two states are combined. """ # Every different command list requires a separate door. # => Entry cost is proportional to number of unique command lists. # => Gain = number of unique command lists of A an B each # ...
dkopecek/amplify
third-party/quex-0.65.2/quex/engine/analyzer/mega_state/template/gain_entry.py
Python
gpl-2.0
865
__author__ = 'Bram + Frank + Ricardo + Kevin + Jouke-bouwe' import csv from tkinter import * from MiniprojectProgrammerenWeek3 import FilmsOphalen, Aankoop #Verwijst naar de csv bestanden die gebruikt worden. Moet worden aangepast als deze op een andere pc wordt uitgevoerd csvKlantBestand = 'C:/Users/Rica/PycharmProje...
zothor/software
MiniprojectProgrammerenWeek3/buttons.py
Python
gpl-2.0
17,539
#!/usr/bin/env python3 """ monitor -- connection monitoring process This process is spawned as a child of the daemon, and is responsible for monitoring connection status and initiating autoreconnection when appropriate. """ # # Copyright (C) 2007 - 2009 Adam Blackburn # Copyright (C) 2007 - 2009 Dan O'Reilly # #...
JulienPalard/wicd
wicd/monitor.py
Python
gpl-2.0
14,528
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Basic message object for the email package object model.""" __all__ = ['Message'] import re from cStringIO import StringIO # Intrapackage imports import bongo.external.email.charset from bongo.external.ema...
bongo-project/bongo
src/libs/python/bongo/external/email/message.py
Python
gpl-2.0
32,690
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2014, 2015 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 l...
zenodo/invenio
invenio/modules/pages/admin.py
Python
gpl-2.0
3,432
# # PySTDF - The Pythonic STDF Parser # Copyright (C) 2006 Casey Marshall # # 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 versi...
cmars/pystdf
pystdf/OoHelpers.py
Python
gpl-2.0
955
#------------------------------------------------------------------------------- # Name: ModSlaveSettingsRTU # Purpose: # # Author: ElBar # # Created: 17/04/2012 # Copyright: (c) ElBar 2012 # Licence: <your licence> #------------------------------------------------------------------------------- #...
zhanglongqi/pymodslave
ModSlaveSettingsRTU.py
Python
gpl-2.0
2,993
#! /usr/bin/env python # Filename: odroidw_meter.py # -*- coding: utf-8 -*- """Smart meter application module for Odroid W. Setup Description ################# This application module utilizes the external 12-bit MCP3208 ADC connected to the Odroid W via SPI to be used as a real-time smart-power-meter. Current clamps i...
vschw/smartmeter_release
odroidw_meter.py
Python
gpl-2.0
10,958
#!/usr/bin/env python # # $File: statGenoFreq.py $ # # This file is part of simuPOP, a forward-time population genetics # simulation environment. Please visit http://simupop.sourceforge.net # for details. # # Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org) # # This program is free software: you can redistribu...
BoPeng/simuPOP
docs/statGenoFreq.py
Python
gpl-2.0
1,692
# Copyright (C) 2008-2011 Dejan Muhamedagic <dmuhamedagic@suse.de> # Copyright (C) 2013 Kristoffer Gronlund <kgronlund@suse.com> # See COPYING for license information. import os import sys import time import re import bz2 from . import config from . import command from . import completers as compl from . import utils ...
ingted/crmsh
modules/ui_history.py
Python
gpl-2.0
23,658
#!/usr/bin/env python import sys import os sdir = sys.argv[1] def file_includes(path): incs = filter(lambda x: x.startswith('#include'), open(path)) if not incs: return None incs = map(lambda x: x.strip().split()[1], incs) incs = filter(lambda x: x.startswith('"') and x.endswith('"'), incs) if not incs: r...
xemul/criu-scripts
hdr-scan.py
Python
gpl-2.0
1,679
# -*- coding: utf-8 -*- # # Copyright (c) 2016-2018 Kevin Deldycke <kevin@deldycke.com> # and contributors. # 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 F...
torkelsson/meta-package-manager
meta_package_manager/tests/case.py
Python
gpl-2.0
3,430
""" Publishes the Referee Box's messages as a ROS topic named "refbox" with type "referee" """ from referee_pb2 import SSL_Referee import rospy # Substitute "ekbots" here with your ROS package name from ekbots.msg import referee, team_info from socket import socket, inet_aton, IPPROTO_IP, IP_ADD_MEMBERSHIP from soc...
eagle-knights-ITAM/ssl-refbox-ros
scripts/refbox.py
Python
gpl-2.0
1,934
from servo_control.summit_pwm import SummitPWM import servo_control.servos as servos class CarAttributes(object): def __init__(self): self.pwm = SummitPWM() # Servo-data self.servo_transmission = servos.Transmission() self.servo_rear_locker = servos.RearLocker() self.servo...
LinuCC/sturo
src/car_attributes.py
Python
gpl-2.0
1,918
from functools import reduce def deep_ord(l): if l == []: return 1 return reduce(lambda a, b: deep_ord(a) + deep_ord(b), l) def shallow_ord(l): return len(l) class Num: def __init__(self): self.val = [] def shallow_ord(self): return shallow_ord(self.val) def deep_ord(self): return deep_ord(se...
ltlollo/misc
trash/num.py
Python
gpl-2.0
486
import glob import os from pprint import pprint import shlex import shutil import sys import tempfile import unittest from unittest.mock import patch # from context.EM_scripts import Micrograph_renamer as m from scripts_EM.Mass_rename_micrographs_argparse import Micrograph_renamer as m class test_rename_files(unitt...
AGMMGA/EM_scripts
EM_scripts/tests/Mass_rename_micrographs_argparse_tests.py
Python
gpl-2.0
12,315
#!/usr/bin/python from copy import copy, deepcopy import sys import numpy as np # (c) 2015 Sandip De (1sandipde@gmail.com) def main(): a=np.loadtxt('input.test') # a=np.random.random((100,100)) costs=k_best_costs(20,a) for x in costs: print x def k_best_costs(nbest,matrix): hun=linear_assignment(matri...
sandipde/Hungarian-Murty
Hungarian-Murty.py
Python
gpl-2.0
11,755
# # Copyright (c) 2008--2010 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
colloquium/spacewalk
backend/server/rhnUser.py
Python
gpl-2.0
28,422
# StationPlaylist Track Tool # An app module for NVDA # Copyright 2014-2021 Joseph Lee, released under gPL. # Functionality is based on JFW scripts for SPL Track Tool by Brian Hartgen. # Track Tool allows a broadcaster to manage track intros, cues and so forth. # Each track is a list item with descriptions such as tit...
josephsl/stationPlaylist
addon/appModules/tracktool.py
Python
gpl-2.0
3,301
#!/usr/bin/env python #Demo code # # simple demonstration script showing real-time thermal Imaging # using the MLX90620 16x4 thermopile array and the mlxd daemon # # Copyright (C) 2015 Chuck Werbick # # # # This program is free software; you can redistribute it and/or modify # it under the terms of the G...
alphacharlie/mlxd
mlxview.py
Python
gpl-2.0
3,859
## Does "land_surface_air__latent_heat_flux" make sense? (2/5/13) # Copyright (c) 2001-2014, Scott D. Peckham # # Sep 2014. Fixed sign error in update_bulk_richardson_number(). # Ability to compute separate P_snow and P_rain. # Aug 2014. New CSDMS Standard Names and clean up. # Nov 2013. Con...
mperignon/component_creator
topoflow_creator/topoflow/met_base.py
Python
gpl-2.0
109,509
''' Created on Oct 29, 2015 @author: Apocalyptic Octopus ''' from subprocess import Popen, PIPE msbuild_path = "C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\amd64\\MSBuild.exe" def build(path): cmd = '"' + msbuild_path + '" "' + path + '"' print(cmd) p = Popen(cmd, stdout=PIPE, stderr=PIPE) stdout, ...
ApocalypticOctopus/automaticat
msbuild.py
Python
gpl-2.0
345
import core.task import urllib2 class ExchangeFileWithRemoteTask(core.task.Task): def execute_task(self, parameters=None): self._check_mandatory_parameters(['path', 'remote_path'], parameters) path = parameters['path'] remote_path = parameters['remote_path'] with open(path, 'w+') as file_handle: response...
turekj/iDK
tasks/exchange_file_remote_task.py
Python
gpl-2.0
413
import os.path from twisted.trial import unittest from allmydata.util import configutil from allmydata.test.no_network import GridTestMixin from ..scripts import create_node from .. import client class ConfigUtilTests(GridTestMixin, unittest.TestCase): def test_config_utils(self): self.basedir = "cli/C...
david415/tahoe-lafs
src/allmydata/test/test_configutil.py
Python
gpl-2.0
3,451
# xorn.geda.netlist - gEDA Netlist Extraction and Generation # Copyright (C) 1998-2010 Ales Hvezda # Copyright (C) 1998-2010 gEDA Contributors (see ChangeLog for details) # Copyright (C) 2013-2017 Roland Lutz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Genera...
bert/geda-gaf
xorn/src/python/geda/netlist/pp_hierarchy.py
Python
gpl-2.0
6,338
import unittest from flask import Flask from simple_flask_blueprint.rest.blueprint_rest import bp class SimpleBlueprintRestTest(unittest.TestCase): def setUp(self): self.app = Flask(__name__) self.app.register_blueprint(bp, url_prefix='/test') self.tester = self.app.test_client(self) ...
Kalimaha/simple_flask_blueprint
simple_flask_blueprint_test/rest/blueprint_rest_test.py
Python
gpl-2.0
729
import shutil import os, errno import hashlib import tempfile import math import urllib import urllib2 from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest, QueryDict from django.shortcuts import render_to_response, get_object_or_404, redirect, render from django.template import Context, ...
blackball/an-test6
net/views/album.py
Python
gpl-2.0
4,432
# -*- coding: utf-8 -*- import fauxfactory import pytest from cfme import test_requirements from cfme.infrastructure.provider import InfraProvider from cfme.markers.env_markers.provider import ONE from cfme.markers.env_markers.provider import ONE_PER_TYPE from cfme.services.service_catalogs import ServiceCatalogs from...
Yadnyawalkya/integration_tests
cfme/tests/services/test_service_catalogs.py
Python
gpl-2.0
16,850
# This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU General Public License. # # See the LICENSE file in the source distribution ...
nijinashok/sos
sos/plugins/dbus.py
Python
gpl-2.0
745
#!/usr/bin/python #-*- coding: UTF-8 -*- #************************************************************** # # °æÈ¨ËùÓÐ (C), 2001-2012,»ªÎª¼¼ÊõÓÐÏÞ¹«Ë¾ # #************************************************************** #ÎļþÃû transfer_sh.py #°æ±¾ºÅ £º³õ¸å #×÷Õß £ºl00167020 #Éú³ÉÈÕÆÚ £º2013Ä...
gabry3795/android_kernel_huawei_mt7_l09
drivers/vendor/hisi/build/scripts/transfer_sh.py
Python
gpl-2.0
3,462
import unittest from modeller import Alignment, Model from mdt_test import MDTTest import mdt import mdt.features import math import os class TableTests(MDTTest): restyps = "ACDEFGHIKLMNPQRSTVWY" def __mdt_restyp(self, a): """Convert a one-letter residue code into the MDT bin number""" ind =...
salilab/mdt
test/test_mdt.py
Python
gpl-2.0
47,693
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2004 Robert Kaye # Copyright (C) 2006 Lukáš Lalinský # # 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; ...
mwiencek/picard
picard/tagger.py
Python
gpl-2.0
23,746
"""main.py - Main window.""" import os import shutil import threading import gtk import gobject from mcomix import constants from mcomix import cursor_handler from mcomix import i18n from mcomix import icons from mcomix import enhance_backend from mcomix import event from mcomix import file_handler from mcomix import...
benoit-pierre/mcomix
mcomix/main.py
Python
gpl-2.0
48,018
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('applicants', '0010_auto_20151126_0525'), ] operations = [ migrations.AddField( model_name='applicant', ...
shailr/vms
applicants/migrations/0011_applicant_number_of_missed_calls.py
Python
gpl-2.0
421
#Joshua Pepperman class Batters: def __init__(self): self.batters = [] def __iter__(self): return iter(self.batters) def __getitem__(self, key): return self.batters[key] def __len__(self): return len(self.batters) def indexOf(self, player): index = 0 for p in self.batters: if p == player: r...
jdpepperman/baseballStats
Batters.py
Python
gpl-2.0
2,886
"""winshell - convenience functions to access Windows shell functionality Certain aspects of the Windows user interface are grouped by Microsoft as Shell functions. These include the Desktop, shortcut icons, special folders (such as My Documents) and a few other things. These are mostly available via the shell modu...
lebauce/artub
winshell.py
Python
gpl-2.0
12,268
#!/usr/bin/env python # Tag Highlighter: # Author: A. S. Budden <abudden _at_ gmail _dot_ com> # Copyright: Copyright (C) 2009-2011 A. S. Budden # Permission is hereby granted to use and distribute this code, # with or without modifications, provided that this copyright # notice is c...
radio-ho0/dotfiles
_vim/plugin/TagHighlight/module/utilities.py
Python
gpl-2.0
5,265
from os.path import join import pytest from cobra.io import load_json_model, write_sbml_model def test_load_json_model_valid(data_directory, tmp_path): """Test loading a valid annotation from JSON.""" path_to_file = join(data_directory, "valid_annotation_format.json") model = load_json_model(path_to_fil...
opencobra/cobrapy
src/cobra/test/test_io/test_annotation_format.py
Python
gpl-2.0
944
# -*- coding: utf-8 -*- # ********************************************************************** # # Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ***********************************...
ljx0305/ice
scripts/tests/Ice/properties.py
Python
gpl-2.0
1,004
""" @date : 2017-06-20 13:11:20 @author : Aaron Kitzmiller (aaron_kitzmiller@harvard.edu) @cersion : $Id$ @copyright : 2017 The Presidents and Fellows of Harvard College. All rights reserved. """ import logging from .config import Config __version__ = "0.2.0" DEFAULT_PDEF_PATH = "./config" logging.basicConfig() c...
harvardinformatics/hex
hex/__init__.py
Python
gpl-2.0
1,265
""" AUTHOR: Dr. Andrew David Burbanks, 2005 This software is Copyright (C) 2004-2008 Bristol University and is released under the GNU General Public License version 2. MODULE: CoordinateChange PURPOSE: Compute the coordinate changes relating complex diagonal to complex normal form coordinates. NOTES: For paralle...
Peter-Collins/NormalForm
src/py/CoordinateChange.py
Python
gpl-2.0
3,820
from __future__ import print_function, division, absolute_import # Copyright (c) 2010-2016 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or F...
Lorquas/subscription-manager
src/rhsmlib/dbus/facts/client.py
Python
gpl-2.0
2,191
import chimera.core.log from chimera.core.remoteobject import RemoteObject from chimera.core.exceptions import ChimeraException from chimera.core.version import _chimera_name_, _chimera_long_description_ from chimera.util.coord import Coord from chimera.util.position import Position from chimera.util.filenamesequenc...
wschoenell/chimera_imported_googlecode
src/chimera/util/image.py
Python
gpl-2.0
13,397
''' Created on 23/mag/2015 @author: koala ''' import Cript key = b'dfdfjdnjnjvnfkjn vnfj vjfk d nvkfd j' plaintext = b'jfghksdjfghksdjfgksdhgljdkghjh fgh fhg jfhgdkjfkjg hkdfjg hkdfj ghkdf ghfdjk ghfdjkg hkdfjg h' testoCriptato, seme, orLen = Cript.criptIt(plaintext, key) testoDecriptato = Cript.deCriptIt(testoCript...
koalakoker/knote_gcrypt
GCryptNote/PyMyPackage.py
Python
gpl-2.0
807
# -*- coding: utf-8 -*- """Error controller""" from tg import request, expose from wiki20.lib.base import BaseController __all__ = ['ErrorController'] class ErrorController(BaseController): """ Generates error documents as and when they are required. The ErrorDocuments middleware forwards to ErrorContro...
tdsticks/crontab
py/wiki20/wiki20/controllers/error.py
Python
gpl-2.0
1,250
# -*- coding: utf-8 -*- from Plugins.Extensions.MediaPortal.plugin import _ from Plugins.Extensions.MediaPortal.resources.imports import * def flyflv(self, data): parse = re.search('config: "(.*?)"', data, re.I) if parse: urlparts = re.findall("http://www.flyflv.com(.*?)\?e=(\d+)&ip=(.*?)$", parse.group(1)) if ...
n3wb13/OpenNfrGui-5.0-1
lib/python/Plugins/Extensions/MediaPortal/resources/hosters/flyflv.py
Python
gpl-2.0
6,496
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 ve...
labordoc/labordoc-next
modules/bibformat/lib/elements/bfe_ILO_conventions_link.py
Python
gpl-2.0
1,688
import numpy as np from numpy import all from numpy.testing import assert_almost_equal from nose.tools import ok_ from ..blas import * def ndrange(shape, dtype=np.double, order='C'): return np.arange(np.prod(shape), dtype=dtype).reshape(shape).copy(order) def assert_dgemm(dgemm_func, A_order, B_order, C_order): ...
wavemoth/wavemoth
wavemoth/test/test_blas.py
Python
gpl-2.0
812
# common.py: global variables # arch-tag: global variables # author: Alberto Griggio <agriggio@users.sourceforge.net> # license: GPL import wx import os, sys, locale, Image import threading __version__ = '0.6.1' if os.path.expanduser('~') != '~': bookmarks_file = os.path.expanduser('~/.cornice/bookmarks') co...
labordus/cornice
common.py
Python
gpl-2.0
8,653
import gtk import treetohtml from mensajes import info, yesno from datetime import date, datetime from articulos import DlgArticulo from articulos_produccion import ArticulosEnProduccion from modelo import Model from comunes import punto_coma, coma_punto, caracter_a_logico, logico_a_caracter, calcular_iva_venta, calcul...
jehomez/pymeadmin
actualizacion_de_precios.py
Python
gpl-2.0
1,494
class BaiduSearch(object): def __init__(self): pass def __call__(self, client, api, **kw): """ client -- client api -- """ client.driver.get("http://www.baidu.com") input = client.e("#kw") input.cle...
emop/webrobot
hello_baidu/libs/actions.py
Python
gpl-2.0
725
#!/usr/bin/env python # Copyright (c) 2003 Phil Gregory # # 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 pro...
yuxans/badgirl
src/coin.py
Python
gpl-2.0
1,861
import numpy as np from scipy import sparse from scipy.integrate import odeint import matplotlib.pyplot as plt import math as mt # this is the transfer function def phi(x,theta,uc): myphi=nu*(x-theta) myphi[x>uc]=nu*(uc-theta) myphi[theta>x]=0. return myphi def phi_brunel(x,theta,uc): myphi=nu_brunel*((x-theta...
ulisespereira/LearningSequences
fixedConnectivity/popModel/sequences_random.py
Python
gpl-2.0
4,644
#!/usr/bin/env python import pyemma import numpy as np import mdtraj import time import os # Source directory source_directory = '/cbio/jclab/projects/fah/fah-data/munged3/no-solvent/11401' # Src ensembler ################################################################################ # Load reference topology ####...
jchodera/MSMs
jchodera/src-11401/pyemma/cluster.py
Python
gpl-2.0
3,309
#------------------------------------------------------------------------------ # Copyright (c) 2007, Riverbank Computing Limited # All rights reserved. # # This software is provided without warranty under the terms of the BSD license. # However, when used with the GPL version of PyQt the additional terms described in ...
enthought/traitsbackendqt
enthought/traits/ui/qt4/menu.py
Python
gpl-2.0
10,680
#!/usr/bin/env python # Basic getaddrinfo() basic example import sys import socket result = socket.getaddrinfo(sys.argv[1], None) print result[0][4]
yekeqiang/mypython
getaddrinfo.py
Python
gpl-2.0
151
#!/usr/bin/env python # # $Id: decrypt2.py 363 2006-01-01 18:03:07Z valos $ # # PyXMLSec example: Decrypting an encrypted file using keys manager. # # Decrypts encrypted XML file using keys manager and a list of # DES key from a binary file # # Usage: # decrypt2.py <xml-enc> <des-key-file1> [<des-key-file2> [...]] #...
aricaldeira/pyxmlsec
examples/decrypt2.py
Python
gpl-2.0
5,179
__author__ = 'Nataly' import re class SignupHelper: def __init__(self, app): self.app = app def new_user(self, username, email, password): wd = self.app.wd wd.get(self.app.base_url + "/signup_page.php") wd.find_element_by_name("username").send_keys(username) wd.find_e...
simonenkong/python_training_mantis
fixture/signup.py
Python
gpl-2.0
928
"""This is (more-or-less) the example experiment described in the getting started section of the manual. In this experiment we simply measure the number of packets received as we ramp up the amount of traffic generated. """ import sys import random from network_tester import Experiment, to_csv # Take the SpiNNaker ...
project-rig/network_tester
examples/getting_started_example.py
Python
gpl-2.0
1,458
#!/usr/bin/env python import logging from .HTMLElement import HTMLElement from .HTMLFormControlsCollection import HTMLFormControlsCollection from .attr_property import attr_property log = logging.getLogger("Thug") class HTMLFormElement(HTMLElement): name = attr_property("name") acceptCharset = att...
buffer/thug
thug/DOM/W3C/HTML/HTMLFormElement.py
Python
gpl-2.0
1,891
# Rock-paper-scissors-lizard-Spock import random # helper functions def name_to_number(name): if name == "rock": name = 0 elif name == "Spock": name = 1 elif name == "paper": name = 2 elif name == "lizard": name = 3 elif name == "scissors": name = 4 els...
reneisrael/coursera
Rock-paper-scissors-lizard-Spock.py
Python
gpl-2.0
1,947
import os import ycm_core from clang_helpers import PrepareClangFlags # Set this to the absolute path to the folder (NOT the file!) containing the # compile_commands.json file to use that instead of 'flags'. See here for # more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html # Most projects will NOT n...
matthiasvegh/LazyIterator
.ycm_extra_conf.py
Python
gpl-2.0
3,363
# -*- coding: utf-8 -*- # Copyright 2004-2009 Joe Wreschnig, Michael Urman, Iñigo Serna, # Steven Robertson # 2011-2017 Nick Boultbee # 2013 Christoph Reiter # 2014 Jan Path # # This program is free software; you can redistribute it and/or modify # it under th...
elbeardmorez/quodlibet
quodlibet/quodlibet/qltk/prefs.py
Python
gpl-2.0
31,084
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import social.apps.django_app.default.fields import django.core.validators class Migration(migrations.Migration): dependencies = [ ('replays', '0035_auto_20160326_1121'), ] operations = [ ...
rocket-league-replays/rocket-league-replays
rocket_league/apps/replays/migrations/0036_auto_20160409_1246.py
Python
gpl-3.0
1,383
__author__ = 'quentin' import cv2 import unittest import os from ethoscope.roi_builders.target_roi_builder import SleepMonitorWithTargetROIBuilder, TargetGridROIBuilder try: from cv2.cv import CV_AA as LINE_AA except ImportError: from cv2 import LINE_AA images = {"bright_targets":"../static_files/img/bright...
gilestrolab/ethoscope
src/ethoscope/tests/unittests/test_target_roi_builder.py
Python
gpl-3.0
1,055
# -*- coding: utf-8 -*- from __future__ import unicode_literals from colour import Color from django.contrib.auth.decorators import user_passes_test from django.urls import reverse from django.db.models import Sum from django.http import HttpResponse, HttpResponseRedirect, StreamingHttpResponse from django.shortcuts ...
artoonie/RedStatesBlueStates
redblue/viewsenators/views.py
Python
gpl-3.0
6,895
###################### TREE###################### class node(): __parent = None __left = None __right = None __data = None def __init__(self, value): self.__data = value self.__parent = None self.__left = None self.__right = None def get_parent(self...
junaart/Structure_data
Code/tree.py
Python
gpl-3.0
9,097
# Config overrides for `test_convert2to3.py` # The decam conversion tests use stripped data from `ap_verify_ci_hits2015` in # testdata_decam, with two refcats in the repo. config.refCats = ['gaia', 'panstarrs'] # Need to specify runs for each refcat for refcat in config.refCats: config.runs[refcat] = "refcats"
lsst/obs_decam
tests/config/convert2to3Config.py
Python
gpl-3.0
318
#!/bin/env python # -*- coding: utf-8 -*- process_count = 1 start_server_port =8600 log_file ='../log/pyserver.log' db_host ='192.168.17.153' db_port =3306 db_username ='root' db_passwd ='tm' db_database ='test' db_connection_pool_size =16 coroutine_pool_size_per_process =100000 tcp_backlog =1024 tcp_listen_on_ip ...
dungeonsnd/test-code
dev_examples/pyserver/conf/pyserverconf.py
Python
gpl-3.0
779
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2018) # # This file is part of GWSumm. # # GWSumm 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) ...
gwpy/gwsumm
gwsumm/plot/guardian/__main__.py
Python
gpl-3.0
6,353
"""API integration tests factories.""" import factory from django_common.auth_backends import User from factory.django import DjangoModelFactory from samaritan.models import Address, ChurchRole, MembershipType, ChurchGroup, Member class UserFactory(DjangoModelFactory): """Factory for users.""" username = f...
Silvian/samaritan
api/tests/integration/__init__.py
Python
gpl-3.0
2,353
# this example aims at showing ability of ESMF to regrid on ROMS grid import os import ESMF from brushcutter import fill_msg_grid as fill import matplotlib.pylab as plt import numpy as np # This call enables debug logging ESMF.Manager(debug=True) # Use example provided with ESMPy srcdir = '/Users/raphael/tmp_install...
raphaeldussin/brushcutter
examples/dev/example_interp_to_roms.py
Python
gpl-3.0
3,077
from unittest.mock import Mock from django.db.models import QuerySet from datagrowth.resources import HttpResource from core.tests.mocks.requests import MockRequests MockErrorQuerySet = Mock(QuerySet) MockErrorQuerySet.count = Mock(return_value=0) class HttpResourceMock(HttpResource): URI_TEMPLATE = "http://...
fako/datascope
src/core/tests/mocks/http.py
Python
gpl-3.0
3,044
# coding: utf-8 # # Copyright (C) 2015 ycmd contributors # # This file is part of ycmd. # # ycmd 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...
volkhin/ycmd
ycmd/tests/python/get_completions_test.py
Python
gpl-3.0
5,570
# Copyright (C) 2003-2014 Yann Leboulanger <asterix AT lagaule.org> # Copyright (C) 2005-2007 Nikos Kouremenos <kourem AT gmail.com> # Copyright (C) 2006 Dimitur Kirov <dkirov AT gmail.com> # Copyright (C) 2008-2009 Julien Pivotto <roidelapluie AT gmail.com> # # This file is part of Gajim. # # Gajim is free software; y...
gajim/gajim
gajim/gtk/message_input.py
Python
gpl-3.0
10,223
# -*- coding: utf-8 -*- # Author: Mikhail Polyanskiy # Last modified: 2017-04-02 # Original data: Rakić et al. 1998, https://doi.org/10.1364/AO.37.005271 import numpy as np import matplotlib.pyplot as plt # Lorentz-Drude (LD) model parameters ωp = 9.03 #eV f0 = 0.760 Γ0 = 0.053 #eV f1 = 0.024 Γ1 = 0.241 #eV ω1 = 0....
polyanskiy/refractiveindex.info-scripts
scripts/Rakic 1998 - Au (LD model).py
Python
gpl-3.0
2,100
#!/usr/bin/python # # lcd_i2c.py # lcd1602 class for character display initialization and usage via micropython # Supports 16x2 and 20x4 screens. # # Author : gr4vion # Date : 28-10-2016 # # On the base of: Matt Hawkins # http://www.raspberrypi-spy.co.uk/ # and 2013-2015 Danilo Bargen RPILCD # # Copyright 2015 Mat...
gr4viton/gr4Dalek
spine/dd/spine/lcd_i2c.py
Python
gpl-3.0
7,727
# -*- coding: utf-8 -*- from tespy.networks import network from tespy.components import sink, source, solar_collector from tespy.connections import connection import numpy as np from matplotlib import pyplot as plt import pandas as pd from mpl_toolkits.mplot3d import Axes3D # %% network fluid_list = ['H2O'] nw = net...
oemof/examples
oemof_examples/tespy/solar_collector/solar_collector.py
Python
gpl-3.0
2,858
#!/usr/bin/env python """This is a game called Tetros made with Tkinter graphics (quite similar to Tetris).""" # Import modules from tkinter import * from tkinter import filedialog from tkinter import messagebox from tkinter.ttk import * import random import math import time import cmath import copy import sys import w...
Advait-M/Tetros
src/Tetros.py
Python
gpl-3.0
64,805
#!/usr/bin/python # -*- coding: utf-8 -*- # # author: Gökmen Görgen # license: GPLv3 (Read COPYING file.) # from os import getenv LOCALE = "/usr/share/locale" VERSION = "0.2" HOME = "%s/.puding" % getenv("HOME") SYSLINUX = "/usr/lib/syslinux" URL = "http://www.gokmengorgen.net/puding" CORE_DEVELOPER = u"Gökmen Görgen...
gkmngrgn/puding
puding/constants.py
Python
gpl-3.0
1,582
"""Unearthed URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/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-...
LinuxIsCool/unearthed
Unearthed/urls.py
Python
gpl-3.0
1,847