code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# -*- coding: utf-8 -*- # # # File to preform some standard tasks on a neuroConstruct project # # Author: Padraig Gleeson # # This file has been developed as part of the neuroConstruct project # This work has been funded by the Medical Research Council and the # Wellcome Trust # # import sys im...
rgerkin/neuroConstruct
pythonNeuroML/nCUtils/ncutils.py
Python
gpl-2.0
66,510
from com.googlecode.fascinator.common import JsonSimple class AuthtestData: def __init__(self): pass def __activate__(self, context): request = context["request"] response = context["response"] writer = response.getPrintWriter("text/javascript; charset=UTF-8") result =...
the-fascinator/fascinator-portal
src/main/config/portal/default/default/scripts/actions/authtest.py
Python
gpl-2.0
1,050
import sys devlali = {} def sum_number(number): str_n = str(number) total = 0 for n in str_n: total += int(n) return total + number def generate_devlali(): for i in range(10001): total = sum_number(i) if (total in devlali.keys()): tmp_list = devlali[total] ...
i2c2-caj/ACM
solutions/devlali/devlali.py
Python
gpl-2.0
842
# -*- coding:utf-8 -*- # !/usr/bin/env python #import easytrader import easyhistory import pdSql_common as pds from pdSql import StockSQL import sys import datetime from pytrade_api import * from multiprocessing import Pool import os, time import file_config as fc import code stock_sql_obj=StockSQL(s...
allisnone/pytrade
position_history_update.py
Python
gpl-2.0
22,677
# -*- coding: UTF-8 -*- # ..#######.########.#######.##....#..######..######.########....###...########.#######.########..######. # .##.....#.##.....#.##......###...#.##....#.##....#.##.....#...##.##..##.....#.##......##.....#.##....## # .##.....#.##.....#.##......####..#.##......##......##.....#..##...##.##.....#....
repotvsupertuga/tvsupertuga.repository
script.module.openscrapers/lib/openscrapers/sources_openscrapers/de/tata.py
Python
gpl-2.0
8,804
import numpy as np from sklearn.metrics import mean_squared_error as MSE from sklearn.metrics import auc, roc_curve, roc_auc_score def AUC(P, X ,testX = None): score_in = [] score_out = [] for i in range(X.shape[0]): Y = X[i] predY = P[i] try: score_in.append(roc_auc_sco...
b29308188/mslab-recsys
src/evals.py
Python
gpl-2.0
2,290
import asjson from flask.views import MethodView from functools import wraps from flask.ext.mongoengine.wtf import model_form from flask import request, render_template, Blueprint, redirect, abort, session, make_response from .models import User, SessionStorage from mongoengine import DoesNotExist auth = Blueprint('au...
VeeSot/blog
auth/views.py
Python
gpl-2.0
2,792
import purchase_requisition
3dfxsoftware/cbss-addons
purchase_requisition_make_po/__init__.py
Python
gpl-2.0
28
import importlib from django.conf import settings from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from ckeditor_link import conf from django import template from django.template.defaultfilters import stringfilter try: module_name, class_name = conf.CKEDITOR_LINK_MODEL.rsplit(".", 1) ...
benzkji/django-ckeditor-link
ckeditor_link/templatetags/ckeditor_link_tags.py
Python
gpl-2.0
3,359
try: import RPi.GPIO as GPIO from lib_nrf24 import NRF24 from math import * import time import spidev import sys import os.path import numpy import pickle import sqlite3 import mat4py as m4p import os def compress(uncompressed): """Compress a string to a list of output symbols.""" # Build the dicti...
AdriaGS/MTP-Group-C
Single Mode/Semi-Final/deviceTX_wC2.py
Python
gpl-2.0
8,154
# -*- coding: utf-8 -*- """ *************************************************************************** extentSelector.py --------------------- Date : December 2010 Copyright : (C) 2010 by Giuseppe Sucameli Email : brush dot tyler at gmail dot com *********...
bstroebl/QGIS
python/plugins/GdalTools/tools/extentSelector.py
Python
gpl-2.0
7,022
# -*- coding: utf-8 -*- """ Several methods to simplify expressions involving unit objects. """ from __future__ import division from sympy.utilities.exceptions import SymPyDeprecationWarning from sympy import Add, Function, Mul, Pow, Rational, Tuple, sympify from sympy.core.compatibility import reduce, Iterable fro...
wxgeo/geophar
wxgeometrie/sympy/physics/units/util.py
Python
gpl-2.0
5,989
# Copyright 2015, Nashwan Azhari. # Licensed under the GPLv2, see LICENSE file for details. """ A pure Python implementation of the functionality of the ConvertTo-SecureString and ConvertFrom-SecureString PoweShell commandlets. Usage example: from securestring import encrypt, decrypt if __name__ == "__main__": s...
aznashwan/py-securestring
securestring.py
Python
gpl-2.0
3,385
# encoding: utf-8 # module PyQt4.QtCore # from /usr/lib/python3/dist-packages/PyQt4/QtCore.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import sip as __sip class QTextStream(): # skipped bases: <class 'sip.simplewrapper'> """ QTextStream() QTextStream(QIODevice) QTextStream...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtCore/QTextStream.py
Python
gpl-2.0
7,395
# -*- coding: utf-8 -*- # # Copyright 2018 BhaaL # # This file is part of translate. # # translate 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 lat...
unho/translate
translate/convert/flatxml2po.py
Python
gpl-2.0
3,817
"""Basic quilt-like functionality """ __copyright__ = """ Copyright (C) 2005, Catalin Marinas <catalin.marinas@gmail.com> This program 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 d...
miracle2k/stgit
stgit/stack.py
Python
gpl-2.0
40,808
# This file contains the slider widget import pygame from transcendence.graphics.widget import Box from transcendence.graphics.button import Button from transcendence.graphics.progressbar import ProgressBar import transcendence.graphics as graphics from transcendence import util class Slider(Box): """A slider wi...
Scaatis/Endgame
transcendence/graphics/slider.py
Python
gpl-2.0
8,183
import GemRB from GUIDefines import * from ie_stats import * import CharGenCommon import GUICommon import Spellbook import CommonTables import LUCommon import LUProfsSelection def Imprt(): GemRB.SetToken("NextScript","CharGen") GemRB.SetNextScript("ImportFile") #import return def setPlayer(): MyChar = GemRB.GetVa...
ObsidianBlk/GemRB--Unofficial-
gemrb/GUIScripts/bg1/CharGenGui.py
Python
gpl-2.0
11,889
from django.db import models class Institution(models.Model): name = models.CharField(max_length=50); @property def teams(self): return Team.objects.filter(institution=self) @property def judges(self): return Judge.objects.filter(institution=self) def __str__(self): ...
sarrionandia/taber
data/models.py
Python
gpl-2.0
1,662
#!/usr/bin/python2 import math, sys, time def drange(start, stop, step): #Generator for step <1, from http://stackoverflow.com/questions/477486/python-decimal-range-step-value r = start while r < stop: yield r r += step class adaline: def __init__(self, w_vec):#, bias): #absorbed ...
anirudhr/neural
adaline.py
Python
gpl-2.0
4,068
#!/usr/bin/env python #------------------------------------------------------------------------------ # Copyright (C) 2013 Albert Simenon # # 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...
simenon/pocket-query-downloader
gc_util.py
Python
gpl-2.0
5,704
#!/usr/bin/python2 -tt # Author: Milos Buncic # Date: 29.06.2014 # Description: Search for specific article on the specific web page and send an email if you found something import os import sys import re import json import smtplib import requests from telegram import Bot from bs4 import BeautifulSoup from ConfigParse...
psyhomb/malioglasi
malioglasi.py
Python
gpl-2.0
6,894
# coding=utf-8 from __future__ import absolute_import, division, print_function, unicode_literals """ Name: AnalysisWinPIRALog_LINUX Author: Andy Liu Email : andy.liu.ud@hotmail.com Created: 3/24/2015 Copyright: Copyright ©Intel Corporation. All rights reserved. Licence: Th...
asiroliu/AnalysisWinPIRALog
AnalysisWinPIRALog_LINUX.py
Python
gpl-2.0
14,575
import nltk import json import sys sys.path.append("../../") import parser from entity import Word class ModelRewriter: rewriteRules = None rewriteRuleFileName = "model.txt" @staticmethod def loadModel(): inputFile = open("model.txt") modelJsonString = inputFile.read() inputF...
cuijiaxing/nlp
rewriter/rules/rewrite_rule/generator.py
Python
gpl-2.0
4,155
__author__ = """Copyright Martin J. Bligh, 2006, Copyright IBM Corp. 2006, Ryan Harper <ryanh@us.ibm.com>""" import os, shutil, copy, pickle, re, glob from autotest_lib.client.bin import kernel, kernel_config, os_dep, test from autotest_lib.client.bin import utils class xen(kernel.kernel): def l...
yochow/autotest
client/bin/xen.py
Python
gpl-2.0
7,532
############################################################################### # This file is part of openWNS (open Wireless Network Simulator) # _____________________________________________________________________________ # # Copyright (C) 2004-2007 # Chair of Communication Networks (ComNets) # Kopernikusstr. 16, D-...
creasyw/IMTAphy
framework/scenarios/PyConfig/scenarios/placer/positionList.py
Python
gpl-2.0
2,880
# jhbuild - a build script for GNOME 1.x and 2.x # Copyright (C) 2001-2006 James Henstridge # # sanitycheck.py: check whether build environment is sane # # 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...
rpavlik/jhbuild-vrjuggler
jhbuild/commands/sanitycheck.py
Python
gpl-2.0
6,633
#!/usr/bin/python # # Copyright (C) 2012 Intel Corporation # # 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 pr...
Shao-Feng/testkit-lite
testkitlite/util/session.py
Python
gpl-2.0
86,792
#!/usr/bin/env python # -*- coding: utf-8 -*- from pwn import * import time host = "10.211.55.6" port = 8888 host = "ch41l3ng3s.codegate.kr" port = 3333 r = remote(host,port) def sell(idx): r.recvuntil(">>") r.sendline("S") r.recvuntil(">>") r.sendline(str(idx)) r.recvuntil("?") r.sendline("...
scwuaptx/CTF
2018-writeup/codegate/marimo.py
Python
gpl-2.0
1,472
from django.db import models # from django.contrib.gis.geoip import GeoIP # # g = GeoIP() # Create your models here. class TempMail(models.Model): mailfrom = models.EmailField() mailsubj = models.CharField(max_length=20) mailrcvd = models.DateTimeField() mailhdrs = models.CharField() class SavedMail(m...
bitsoffreedom/baas
baas/boem/models.py
Python
gpl-2.0
607
# Copyright (C) 2016 Robert Scott # 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...
robsco-git/spreadsheet_server
example_client.py
Python
gpl-2.0
2,456
#!/usr/bin/env python # # Crypto.py # # This program 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 that it will be useful, # but WITHOUT ANY WARRANTY; wi...
buffer/thug
thug/DOM/Crypto.py
Python
gpl-2.0
1,112
#!/usr/bin/env python3 # Copyright 2015, 2016 Endless Mobile, Inc. # This file is part of eos-event-recorder-daemon. # # eos-event-recorder-daemon 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...
endlessm/eos-event-recorder-daemon
tests/daemon/mock-server.py
Python
gpl-2.0
1,987
# # pyconsole.py # # Copyright (C) 2004-2006 by Yevgen Muntyan <muntyan@math.tamu.edu> # Portions of code by Geoffrey French. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public version 2.1 as # published by the Free Software Foundat...
jdburton/gimp-osx
src/gimp-2.6.12/plug-ins/pygimp/plug-ins/pyconsole.py
Python
gpl-2.0
20,993
## Benches from lib.inductor.rf import sp as Sp from syntax import * from functions.science import linspace @setenv(type='bench', name='sp1') class sp1(): def __init__(self, **parameters): ls = parameters.get('ls', 1e-9) rs = parameters.get('rs', 1.0) cp = parameters.get('cp', 150e-15) ...
raphaelvalentin/QTModel
examples/MyInductor/mybench.py
Python
gpl-2.0
1,574
import re import sys import copy import types import inspect import keyword import builtins import functools import _thread __all__ = ['dataclass', 'field', 'Field', 'FrozenInstanceError', 'InitVar', 'MISSING', # Helper functions. 'fields',...
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/dataclasses.py
Python
gpl-2.0
48,530
import sys import os from django.test import TestCase, override_settings, Client from django.conf import settings from ..conf import (DatabaseUndefined, validate_database, InaccessibleSettings, _load_py_file, load_py_settings, load_colab_apps, load_widgets_settings) from mock ...
colab/colab
colab/utils/tests/test_conf.py
Python
gpl-2.0
4,536
#!/usr/bin/python # CACConsole Copyright (C) 2015 foospidy # https://github.com/foospidy/CACConsole # See LICENSE for details # This software includes/uses the python-cloudatcost library which # is MIT licensed, see https://github.com/adc4392/python-cloudatcost/blob/master/LICENSE import os import sys from twisted.int...
foospidy/CACConsole
cacconsole.py
Python
gpl-2.0
1,460
from django.db import models # Create your models here. class Author(models.Model): first_name = models.CharField(max_length = 100) last_name = models.CharField(max_length = 100) date_of_birth = models.DateField() profile_photo = models.ImageField(upload_to="media") linkedin_link = models.URLField...
slonak79/MBDreamers
bios/models.py
Python
gpl-2.0
443
x = 2 cont = 0 while x >= 0: y = 0 while y <= 4: print(y)#comando qualquer y = y - 1 x = x - 1
david81brs/seaport
5.py
Python
gpl-2.0
122
import pcl p = pcl.PointCloud() p.from_file("test_pcd.pcd") fil = p.make_statistical_outlier_filter() fil.set_mean_k (50) fil.set_std_dev_mul_thresh (1.0) fil.filter().to_file("inliers.pcd")
hunter-87/binocular-dense-stereo
cpp_pcl_visualization/pcl_visualization_pcd/pcl_test.py
Python
gpl-2.0
190
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'metuly.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^accounts/login/...
kamyarg/enfame
metuly/urls.py
Python
gpl-2.0
489
#!/usr/bin/env python import freenect import signal import matplotlib.pyplot as mp from misc.demo import frame_convert mp.ion() image_rgb = None image_depth = None keep_running = True def display_depth(dev, data, timestamp): global image_depth data = frame_convert.pretty_depth(data) mp.gray() mp.f...
Dining-Engineers/left-luggage-detection
misc/demo/demo_mp_async.py
Python
gpl-2.0
1,051
#coding: utf-8 import csv from read_conf import config import MySQLdb as mysql conn = mysql.connect(host='localhost',user='root',passwd='111111111',port=3306) cur = conn.cursor() def create_db(): count = cur.execute('create database if not exists shopping;') print "create database",count result = cur.fe...
lavizhao/shopping
python/create_trans_table.py
Python
gpl-2.0
2,625
import sys from pathlib import Path from analysis.PluginBase import AnalysisBasePlugin from plugins.mime_blacklists import MIME_BLACKLIST_COMPRESSED try: from ..internal.string_eval import eval_strings except ImportError: sys.path.append(str(Path(__file__).parent.parent / 'internal')) from string_eval imp...
fkie-cad/FACT_core
src/plugins/analysis/string_evaluation/code/string_eval.py
Python
gpl-3.0
1,282
""" configuration module for awsu, contains two objects """ import boto3 import sqlite3 import logging import getpass import datetime import configparser import uuid import requests import json from dateutil.tz import tzutc from urllib.parse import urlencode, quote_plus from os import environ from bs4 import BeautifulS...
rizkidoank/awsu
awsu/config.py
Python
gpl-3.0
11,653
from distutils.core import setup from program_version import RELEASE setup(name='program', version=RELEASE, description='A self updating program example', author='Mr Snow', author_email='ninja@snow.com', url='https://github.com/mr-ninja-snow/Self-Updating-Python-Program.git', packa...
mr-ninja-snow/Self-Updating-Python-Program
setup.py
Python
gpl-3.0
334
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os import collections import mock import accurev.client import accurev.depot class TestAccuRevClient(unittest.TestCase): def setUp(self): self.client = accurev.client.Client() def test_cmd(self): self.client.chdir('somed...
grilo/pyaccurev
tests/test_client.py
Python
gpl-3.0
19,204
""" Algorithmic Thinking 1 wk 4 Aplication #2 Questions """ # imports import urllib2 import random import time import math import UPATrial import numpy from collections import deque import matplotlib.pyplot as plt ############################################ def copy_graph(graph): """ Make...
vonnenaut/computer-network-analysis
main.py
Python
gpl-3.0
10,602
# -*- coding: utf-8 -*- import pandas as pd import numpy as np from axiomatic.base import AxiomSystem from axiomatic.elementary_conditions import MinMaxAxiom # l, r, pmin, pmax params = [1, 1, -0.8, 0.8] axiom_list = [MinMaxAxiom(params)] ts = pd.DataFrame(np.random.random((10, 2))) print(ts) print(MinMaxAxiom(param...
victorshch/axiomatic
test_axiom_system.py
Python
gpl-3.0
402
# -*- coding: utf-8 -*- import os.path import re import warnings try: from setuptools import setup, find_packages except ImportError: from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages version = '0.2.1' news = os.path.join(os.path.dirname(__file__...
hozn/keepassdb
setup.py
Python
gpl-3.0
2,399
# coding=utf-8 # Title:信息加密 # 给你个小写英文字符串a和一个非负数b(0<=b<26), 将a中的每个小写字符替换成字母表中比它大b的字母。这里将字母表的z和a相连,如果超过了z就回到了a。 # 例如a="cagy", b=3, # 则输出 :fdjb # Test a, b="cagy",3 # Answer e = [] for i in range(0,len(a)): c = ord(a[i])+b # 转换成整数 if c> 122: # 如果大于z则减去26 c -= 26 e.append(chr(c)) ...
RYLF/pythontip
20.py
Python
gpl-3.0
568
from static import tools class DrawAble(object): def __init__(self,image,position,zIndex=0,activated=True): self.image=image self.position=position self._zIndex=zIndex self.__activated=None self.activated=activated def __del__(self): self.activated=False #zindex def __getZIndex(self): return...
gitlitz/pygame-with-interpreter
drawable.py
Python
gpl-3.0
750
#!/usr/bin/python class App: """ A representation of an Android app containing basic knowledge about the app """ def __init__(self, appName, appID, appVersionCode, appOfferType, appRating, appPrice, appSize): self.appName = appName self.appID = appID self.appVersionCode = appVersionCod...
aleisalem/Aion
shared/App.py
Python
gpl-3.0
464
# -*- coding: utf-8 -*- """ ctf.py -- contrast transfer function in electron tomography Copyright 2014 Holger Kohr This file is part of tomok. tomok 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 versio...
kohr-h/tomok
ctf.py
Python
gpl-3.0
3,242
bg_image_modes = ('stretch', 'tile', 'center', 'right', 'left') transitions_jquery_ui = ( 'blind', 'bounce', 'clip', 'drop', 'explode', 'fade', 'fold', 'highlight', 'puff', 'pulsate', 'scale', 'shake', 'size', 'slide' ) transitions_animatecss = ( 'bounceIn', 'bounceInDown', 'bounceInLeft', 'bo...
alandmoore/pystump
includes/lookups.py
Python
gpl-3.0
856
# coding: utf-8 """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be use...
davivcgarcia/wttd-15
eventex/core/tests/test_models_speaker_contact.py
Python
gpl-3.0
3,199
string = input() string[0] = "a"
LTKills/languages
python/data_structures/strings.py
Python
gpl-3.0
36
import os import unittest from vsg.rules import generate from vsg import vhdlFile from vsg.tests import utils sTestDir = os.path.dirname(__file__) lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_015_test_input.vhd')) lExpected = [] lExpected.append('') utils.read_file(os.path.join(sTestDir,...
jeremiah-c-leary/vhdl-style-guide
vsg/tests/generate/test_rule_015.py
Python
gpl-3.0
1,158
# # This file is part of Checkbox. # # Copyright 2008 Canonical Ltd. # # Checkbox 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. # # C...
jds2001/ocp-checkbox
plugins/final_prompt.py
Python
gpl-3.0
1,402
from enum import Enum from typing import Union, List, Optional from .space2d import * from .space3d import * class JoinTypes(Enum): """ Enumeration for Line and Segment type. """ START_START = 1 # start point coincident with start point START_END = 2 # start point coincident with end point ...
mauroalberti/gsf
pygsf/geometries/shapes/joins.py
Python
gpl-3.0
2,499
# Copyright (C) 2015-2020 The Sipwise Team - http://sipwise.com # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) # any later version. # # Th...
sipwise/repoapi
repoapi/models/__init__.py
Python
gpl-3.0
825
import csv def list_words(text): words = [] words_tmp = text.lower().split() for p in words_tmp: if p not in words and len(p) > 2: words.append(p) return words def training(texts): c_words ={} c_categories ={} c_texts = 0 c_tot_words =0 for t in texts: ...
liao1995/DataAnalysis
NaiveBayes.py
Python
gpl-3.0
2,150
import time def start(): return time.time()
Kyziridis/recommender_system
helpers/Time.py
Python
gpl-3.0
51
# -*- coding: utf-8 -*- """ This file contains the dummy for a magnet interface. Qudi 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. Qudi...
drogenlied/qudi
hardware/magnet/magnet_dummy.py
Python
gpl-3.0
26,940
# -*- coding: utf-8 -*- # gedit CodeCompletion plugin # Copyright (C) 2011 Fabio Zendhi Nagao # # 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 o...
nagaozen/my-os-customizations
home/nagaozen/.gnome2/gedit/plugins/codecompletion/utils.py
Python
gpl-3.0
1,420
from greencouriers.tests import * class TestAuthController(TestController): def test_index(self): response = self.app.get(url(controller='auth', action='index')) # Test response...
guyromm/greencouriers
greencouriers/tests/functional/test_auth.py
Python
gpl-3.0
203
# -*- coding: utf-8 -*- # #Copyright (C) 2009 kingzero, RaNaN # #This program is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 3 of the License, #or (at your option) any later version. # #This pro...
estaban/pyload
module/plugins/captcha/captcha.py
Python
gpl-3.0
9,726
""" nenga.address.migrations module """
mkouhei/nenga
nenga/address/migrations/__init__.py
Python
gpl-3.0
40
from random import randrange MAX = 100000 args = [randrange(MAX) for x in range(2 * MAX)] args1 = [randrange(MAX) for x in range(MAX)] args2 = [randrange(MAX) + MAX for x in range(MAX)] def mkdel(s): return "delete " + str(s) def mkins(s): return "insert " + str(s) def mknext(s): return "next " + str(s) pr...
zakharvoit/discrete-math-labs
Season2/BinaryTrees/Tree23/gen.py
Python
gpl-3.0
449
""" By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 7 4 2 4 6 8 5 9 3 ...
smnslwl/project_euler
18/18.py
Python
gpl-3.0
1,238
p = 'noobie' if p == 'hacking': print('Hack the planet!') else: print('Falso') ''' A condição retornou falso pq o valor atribuído em p não é igual a hacking '''
zirou30/python_student
64.py
Python
gpl-3.0
174
import jarray g = gs.open(gs.args[0]) istates = gs.associated(g, "initialState", True).getInitialStates() ssrv = gs.service("stable") def copy_path(values, coreNodes): n = len(coreNodes) path = jarray.zeros(n, 'b') i = 0 for idx in coreNodes: path[i] = values[idx] i += 1 retur...
ComputationalSystemsBiology/GINsimScripts
stable_core/stable_core.py
Python
gpl-3.0
2,265
#!/usr/bin/env python import ftplib import os.path import sys p_debug = False def ftp_rmdir(ftp, folder, remove_toplevel, dontremove): for filename, attr in ftp.mlsd(folder): if attr['type'] == 'file' and filename not in dontremove: if p_debug: print( 'rem...
veltzer/demos-python
src/examples/short/ftp/ftp_rmdir.py
Python
gpl-3.0
1,089
# Bulletproof Arma Launcher # Copyright (C) 2017 Lukasz Taczuk # # 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 hope that it will be useful, # b...
overfl0/Bulletproof-Arma-Launcher
src/utils/filecache.py
Python
gpl-3.0
1,887
from phystricks import * def QWEHooSRqSdw(): pspict,fig = SinglePicture("QWEHooSRqSdw") pspict.dilatation(3) A=Point(0,0) O=Point(0,2) B=Point(3,0) s1=Segment(A,O) s2=Segment(O,B) angle=AngleAOB(A,O,B,r=0.7) angle.put_mark(text="\( c\)",pspict=pspict) pspict.DrawGraphs(angle,s...
LaurentClaessens/phystricks
testing/demonstration/phystricksQWEHooSRqSdw.py
Python
gpl-3.0
390
### # Copyright (c) 2015, KG-Bot # 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 copyright notice, # this list of conditions, and t...
kg-bot/SupyBot
plugins/RequestBot/plugin.py
Python
gpl-3.0
11,545
import pytest import tempfile import shutil import os import music_rename from music_rename import checksum @pytest.fixture() def empty(request): dir = tempfile.mkdtemp() os.mknod(os.path.join(dir, 'empty.txt')) def cleanup(): shutil.rmtree(dir) request.addfinalizer(cleanup) return os.p...
mfinelli/music-rename
tests/test_checksum.py
Python
gpl-3.0
877
from __future__ import absolute_import, unicode_literals __author__ = 'admin' # This will make sure the app is always imported when # Django starts so that shared_task will use this app. from .celery import appautoticket as celery_app __all__ = ['celery_app']
kevinnguyeneng/django-uwsgi-nginx
app/naf_autoticket/__init__.py
Python
gpl-3.0
270
import setuptools import sys import numpy as np # NOTE: If edt.cpp does not exist: # cython -3 --fast-fail -v --cplus edt.pyx extra_compile_args = [] if sys.platform == 'win32': extra_compile_args += [ '/std:c++11', '/O2' ] else: extra_compile_args += [ '-std=c++11', '-O3', '-ffast-math', '-pthread' ...
seung-lab/euclidean-distance-transform-3d
python/setup.py
Python
gpl-3.0
779
#!/usr/bin/env python # coding=UTF-8 # import copy import time import socket import logging import vdns.common class Zone0: """ Base class for producing zone files """ def __init__(self, dt): self.dt=dt def fmttd(self, td): """ Format a timedelta value to something that's...
sharhalakis/vdns
src/vdns/zone0.py
Python
gpl-3.0
14,983
from django.core.management.base import NoArgsCommand from askbot.models import User from optparse import make_option from askbot.utils.console import choice_dialog NUM_USERS = 40 # KEEP NEXT 3 SETTINGS LESS THAN OR EQUAL TO NUM_USERS! NUM_QUESTIONS = 40 NUM_ANSWERS = 20 NUM_COMMENTS = 20 # To ensure that all the ac...
samhoo/askbot-realworld
askbot/management/commands/askbot_add_test_content.py
Python
gpl-3.0
10,587
# Generated by Django 2.2.7 on 2019-11-21 15:40 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('smmapdfs_edit', '0001_initial'), ] operations = [ migrations.AlterField( model_name='pdfsandwic...
auto-mat/klub
apps/smmapdfs_edit/migrations/0002_auto_20191121_1640.py
Python
gpl-3.0
1,078
### # Copyright (c) 2012, Valentin Lorentz # 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 copyright notice, # this list of conditi...
kg-bot/SupyBot
plugins/TwitterStream/__init__.py
Python
gpl-3.0
2,725
#import wrftools #from exceptions import ConfigError, DomainError, ConversionError #import tools #import io #__all__ = ['wrftools', 'tools', 'io']
envhyf/wrftools
wrftools/__init__.py
Python
gpl-3.0
148
#!/usr/bin/python import scapy #import scapy_ex import os,sys import printerInfo import enum from enum import Enum from scapy.all import * import time, datetime #from time import sleep class Message(Enum): AUTH = "0" DEAUTH = "1" PROBE_REQ = "2" PROBE_RESP = "3" HAND_SUCC = "4" HAND_F...
nananan/Cinnamon
analyzePackage.py
Python
gpl-3.0
39,675
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@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 Softwar...
xbmcmegapack/plugin.video.megapack.dev
resources/lib/menus/home_languages_persian.py
Python
gpl-3.0
1,111
"""Multiple EOF analysis for :py:mod:`numpy` array data.""" # (c) Copyright 2010-2012 Andrew Dawson. All Rights Reserved. # # This file is part of eof2. # # eof2 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 Found...
ajdawson/eof2
lib/eofmultisolve.py
Python
gpl-3.0
18,557
#!/usr/bin/env python # Copyright (C) 2012 Andrea Valle # # This file is part of swgit. # # swgit 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 lat...
andreav/swgit
core/ObjMail.py
Python
gpl-3.0
5,260
# -*- coding: UTF-8 -*- # pylint: disable=misplaced-comparison-constant,redefined-outer-name,no-self-use import pytest from tchart.decorators import PaperDecorator @pytest.mark.parametrize('lines,expected_lines', ( ( [ u'0', ], [ u' .---. ', u' ...
andras-tim/tchart
tests/test_decorators_paper.py
Python
gpl-3.0
1,537
"""@brief MTTT's core commands, stems from the original version created using Gtk https://github.com/roxana-lafuente/MTTT""" # !/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## # # Machine Translation Training Tool # Copyright (C) 2016 Roxan...
PaulaEstrella/MTTT-PyQT
MTTTCore.py
Python
gpl-3.0
15,580
initial_consul_data = { "update" : { "providers/va_standalone_servers" : {"username": "admin", "servers": [], "sec_groups": [], "images": [], "password": "admin", "ip_address": "127.0.0.1", "networks": [], "sizes": [], "driver_name": "generic_driver", "location": "", "defaults": {}, "provider_name": "va_sta...
VapourApps/va_master
va_master/consul_kv/initial_consul_data.py
Python
gpl-3.0
5,705
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright Martin Manns # Distributed under the terms of the GNU General Public License # -------------------------------------------------------------------- # pyspread is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
mgunyho/pyspread
pyspread/src/lib/testlib.py
Python
gpl-3.0
3,203
from math import log def make_logarithmic_function(base): return lambda x: log(x, base) My_LF = make_logarithmic_function(3) print(My_LF(9))
jinzekid/codehub
python/数据分析/func_lambda_test.py
Python
gpl-3.0
150
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.api import Environment from odoo.tools import DEFAULT_SERVER_DATE_FORMAT from datetime import date, timedelta import odoo.tests class TestUi(odoo.tests.HttpCase): def test_01_pos_basic_order(self): ...
t3dev/odoo
addons/point_of_sale/tests/test_frontend.py
Python
gpl-3.0
13,746
#!/usr/bin/env python3 from collections import namedtuple from pdfrw import PdfName, PdfDict, PdfObject, PdfString PageLabelTuple = namedtuple("PageLabelScheme", "startpage style prefix firstpagenum") defaults = {"style": "arabic", "prefix": '', "firstpagenum": 1} styles = {"arabic": PdfN...
lovasoa/pagelabels-py
pagelabels/pagelabelscheme.py
Python
gpl-3.0
2,320
#!/usr/bin/env python """ This does mostly the same as the review token commit hook, but is designed to run locally. It will echo to standard out a fixed up version of the review token given to it; this can be used to quickly apply any format changes to a token (such as new fields). It will then ...
ptroja/spark2014
docs/lrm/review/release 0_3/tn_local_check.py
Python
gpl-3.0
1,182
""" This package contains different `unittests <https://docs.python.org/3/library/unittest.html>`_ for the project. Those tests help to validate difficult pieces of the software. """ __author__ = 'Wuersch Marcel' __license__ = "GPLv3"
wursm1/eurobot-hauptsteuerung
eurobot/tests/__init__.py
Python
gpl-3.0
235
import os import binascii import json from txjsonrpc.web.jsonrpc import Proxy from txjsonrpc.web import jsonrpc from twisted.web import server from twisted.internet import reactor try: from OpenSSL import SSL from twisted.internet import ssl except: pass from .base import (get_current_blockheight, CoinSwap...
AdamISZ/CoinSwapCS
coinswap/csjson.py
Python
gpl-3.0
12,462
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2002-2014 The ProteinDF project # see also AUTHORS and README. # # This file is part of ProteinDF. # # ProteinDF 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 Softwa...
ProteinDF/QCLObot
qclobot/qcframe.py
Python
gpl-3.0
48,942