code
stringlengths
1
1.72M
language
stringclasses
1 value
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^wartime', include('Wartime.wartime.urls')), (r'^wild', include('Wartime.wild.urls')), # Uncomment this for admin: # (r'^admin/', include('django.contrib.admin.urls')), ) import sys sys.path.append("H:\StuphMUD\lib\python\suppl...
Python
# Django settings for Wartime project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. DATABASE_NAME = 'H:\My Projects\Wartime\wartime.db' ...
Python
#!/usr/bin/python # Copyright 2011 Google, Inc. All Rights Reserved. # simple script to walk source tree looking for third-party licenses # dumps resulting html page to stdout import os, re, mimetypes, sys # read source directories to scan from command line SOURCE = sys.argv[1:] # regex to find /* */ style commen...
Python
#!/usr/bin/python import sys agl = [] agltab = [] aglmap = {} print "/*" f = open("glyphlist.txt", "r") for line in f.readlines(): if line[0] == '#': print line.strip() continue line = line[:-1] name, list = line.split(';') list = map(lambda x: int(x, 16), list.split(' ')) agl.append((name, list)) for nam...
Python
import sys, os, re HEADER="""<head> <style> body { background-color:#fffff0; color:black; margin:16pt; } a { text-decoration:none; color:darkblue; } a.line { position:relative; padding-top:300px; } .comment { color:green; font-style:italic; } .comment a { color:darkgreen; } </style> </head> <body><pre><pre>""" FOOTER...
Python
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
Python
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the argume...
Python
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time...
Python
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' p...
Python
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @para...
Python
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTrac...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
from sage.all import * def examples(): r""" Some more examples of xxx_rankbound() on high rank curves. (See source for more.) EXAMPLES: We make sure that the examples all work. :: sage: from psage.ellcurve.xxx.rankbound_examples import examples sage: examples() # LONG TIME ...
Python
#
Python
################################################################################# # # (c) Copyright 2011 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
from sage.all import polygen, NumberField, EllipticCurve from psage.modform.hilbert.sqrt5.tables import primes_of_bounded_norm, F a = F.gen() import psage.ellcurve.lseries.sqrt5 as sqrt5 import psage.modform.hilbert.sqrt5.sqrt5_fast as sqrt5_fast def test_ap_via_enumeration(B=1000): a4 = 6912*a - 5643 a6 = ...
Python
#
Python
################################################################################# # # (c) Copyright 2011 William Stein # # This file is part of PSAGE. # # PSAGE 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...
Python
def test_nonsurj(v=range(1,50)): """ For each non CM curve of conductor in the list v, compute the primes where the representation isn't surjective using both galrep and Sage, and make sure the answers agree. """ from sage.all import cremona_curves, Integer from wrapper import GalRep G =...
Python
# Galrep from wrapper import GalRep
Python
from wrapper import GalRep
Python
#
Python
#
Python
#***************************************************************************** # Copyright (C) 2008 Nils-Peter Skoruppa <nils.skoruppa@uni-siegen.de> # # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.org/licenses/ #******************************************...
Python
# from vector_complex_dense import Vector_complex_dense from finite_quadratic_module import FiniteQuadraticModule,FiniteQuadraticModuleRandom from weil_module import WeilModule,sigma_cocycle,kubota_cocycle
Python
# libs
Python
def SmallJac(f): try: d = f.degree() except TypeError: d = f.degree(f.variables()[0]) g = (d - 1) // 2 if g == 1: import wrapper1 return wrapper1.SmallJac(f) elif g == 2: import wrapper2 return wrapper2.SmallJac(f) elif g == 3: import wrapp...
Python
def test1(B=10**4): from sage.all import polygen, primes, QQ, EllipticCurve import psage.libs.smalljac.wrapper x = polygen(QQ, 'x') J = psage.libs.smalljac.wrapper.SmallJac(x**3 + 17*x + 3) E = EllipticCurve([17,3]) N = E.conductor() for p in primes(B): if N%p: assert E....
Python
# smalljac -- Drew Sutherland's code for point counting on Jacobians of curves over finite fields
Python
from sage.all import prime_range, I class J_E: def __init__(self, E, N, K): self.E = E self.ap = [K(ap) for ap in E.aplist(N)] self.N = N self.primes = [K(p) for p in prime_range(N)] self.K = K self.log_primes = [p.log() for p in self.primes] self.I = K(I) ...
Python
################################################################################# # # (c) Copyright 2011 William Stein # # This file is part of PSAGE. # # PSAGE 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...
Python
# Code related to the expository book on the Riemann Hypothesis # by Mazur-Stein
Python
################################################################################# # # (c) Copyright 2011 William Stein # # This file is part of PSAGE. # # PSAGE 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...
Python
# Code related to the Riemann Hypothesis
Python
""" Triple product L-series. WARNING: The code in here gets the algorithm down, but is (1) pure Python, and (2) runs into a limit since in order to actually use it in even the first example, one needs to send a huge number of coefficients to GP/PARI over a ptty, which results in a crash. So currently this code does no...
Python
# Triple Product L-functions (e.g., like in Gross-Kudla)
Python
""" General L-series AUTHOR: - William Stein TODO: - Symmetric powers (and modular degree -- see trac 9758) - Triple product L-functions: Gross-Kudla, Zhang, etc -- see the code in triple_prod/triple.py - Support L-calc L-function - Make it so we use exactly one GP session for *all* of the Dokchit...
Python
# L series
Python
from mpc_extras import *
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
r""" We provide methods to create Fourier expansions of (weak) Jacobi forms `\mathrm{mod} p`. """ #=============================================================================== # # Copyright (C) 2010 Martin Raum # # This program is free software; you can redistribute it and/or # modify it under the terms of the GN...
Python
r""" Classes describing the Fourier expansion of Jacobi forms of degree `1` with indices in `\mathbf{N}`. AUTHOR : - Martin Raum (2010 - 04 - 04) Initial version """ #=============================================================================== # # Copyright (C) 2010 Martin Raum # # This program is free soft...
Python
""" Types of Jacobi forms of fixed index and weight. AUTHOR : - Martin Raum (2010 - 04 - 07) Initial version. """ #=============================================================================== # # Copyright (C) 2010 Martin Raum # # This program is free software; you can redistribute it and/or # modify it unde...
Python
from jacobiformd1nn_types import JacobiFormsD1NN, JacobiFormD1NN_Gamma
Python
""" We provide methods to create Fourier expansions of (weak) Jacobi forms. """ #=============================================================================== # # Copyright (C) 2010 Martin Raum # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public L...
Python
import sqrt5, sqrt5_fast from sage.misc.all import cputime from sage.rings.all import Integer, ZZ F = sqrt5.F def ideals_of_bounded_norm(B): return sum([v for n, v in F.ideals_of_bdd_norm(B).iteritems() if n != 1], []) def ideals_of_norm(v): try: v = list(v) except TypeError: v = [Int...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
####################################################################################### # Compute local splitting at 2 by successive lifting argument. ####################################################################################### """ This is on pages 9-10 of my research notes on 2010-11-07. The mod-2 splitti...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
""" Theta constants """ def _compute_theta_char_poly(char_dict, f): r""" Return the coefficient at ``f`` of the Siegel modular form .. math: \sum_{l \in\text{char_dict}} \alpha[l] * \prod_i \theta_l[i](8Z). INPUT: - ``char_dict`` -- a dictionary whose keys are *tuples* of theta ...
Python
r""" Siegel modular forms Implementation of a class describing (scalar and vector valued) Siegel modular forms of degree 2 and arbitrary group and weight. AUTHORS: - CC: Craig Citro - MR: Martin Raum - NR: Nathan Ryan - NS: Nils-Peter Skoruppa HISTORY: - NS: Class SiegelModularForm_class. - NS: Factory funct...
Python
from sage.categories.functor import Functor from sage.categories.basic import * from sage.structure.parent import CoercionException # TODO, think through the rankings, and override pushout where necessary. class ConstructionFunctor(Functor): def __mul__(self, other): if not isinstance(self, Constructio...
Python
from siegel_modular_form import SiegelModularForm, SiegelModularForm_class, SMF_DEFAULT_PREC from sage.algebras.algebra import Algebra from sage.misc.all import cached_method from sage.rings.all import ZZ from sage.structure.factory import UniqueFactory class SiegelModularFormsAlgebraFactory(UniqueFactory): """ ...
Python
""" Precision for Fourier expansions of Siegel modular forms """ from copy import deepcopy import operator from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ from sage.functions.other import floor from sage.functions.other import ceil from sage.misc.functional import isqrt from sage.struct...
Python
from siegel_modular_form import SiegelModularForm from siegel_modular_forms_algebra import SiegelModularFormsAlgebra
Python
""" The implementation of a type of modular forms, that implements all potential features. It is meant to be used in doctests. AUTHOR : - Martin Raum (2010 - 09 - 26) Initial version. """ #=============================================================================== # # Copyright (C) 2010 Martin Raum # # This...
Python
r""" Rings of orthogonal modular forms. AUTHOR : -- Martin Raum (2009 - 07 - 30) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it and/or # modify it under the terms o...
Python
r""" An abstract class for modular form types. AUTHOR : -- Martin Raum (2009 - 07 - 30) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it and/or # modify it under the ...
Python
r""" A functor creating rings of orthogonal modular forms. AUTHOR : -- Martin Raum (2009 - 07 - 30) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it and/or # modify i...
Python
r""" Submodules of rings of orthogonal modular forms. AUTHOR : -- Martin Raum (2009 - 07 - 30) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it and/or # modify it und...
Python
from modularform_ambient import ModularFormsAmbient
Python
from psage.modform.fourier_expansion_framework.gradedexpansions.gradedexpansion_ambient import GradedExpansionAmbient_abstract r""" A orthogonal modular form, namely a graded expansion providing additional features. AUTHOR : -- Martin Raum (2009 - 07 - 30) Initial version """ #====================================...
Python
""" Interfaces for modular forms which admit Hecke actions or ring which have Maass lifts. AUTHOR : -- Martin Raum (2009 - 07 - 30) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can r...
Python
""" Rings of monoid power series and rings of equivariant monoid power series. AUTHOR : -- Martin Raum (2009 - 07 - 25) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute ...
Python
""" Functor creating rings or modules of (equivariant) monoid power series. AUTHOR : -- Martin Raum (2009 - 07 - 25) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it...
Python
r""" An equivariant monoid power series with lazy evaluation. AUTHOR : -- Martin Raum (2009 - 08 - 05) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it and/or # modif...
Python
""" Implementation of base classes used as parameters for a ring of monoid power series. AUTHOR : -- Martin Raum (2009 - 07 - 25) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can re...
Python
r""" Monoid power series and equivariant monoid power series. AUTHOR : -- Martin Raum (2009 - 07 - 25) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it and/or # modif...
Python
""" Modules of monoid power series and modules of equivariant monoid power series. AUTHOR : -- Martin Raum (2010 - 02 - 10) Initial version """ #=============================================================================== # # Copyright (C) 2010 Martin Raum # # This program is free software; you can redistrib...
Python
""" Ambients of monoid power series and ambients of equivariant monoid power series. AUTHOR : -- Martin Raum (2010 - 02 - 10) Initial version """ #=============================================================================== # # Copyright (C) 2010 Martin Raum # # This program is free software; you can redistr...
Python
from monoidpowerseries_ring import MonoidPowerSeriesRing, \ EquivariantMonoidPowerSeriesRing from monoidpowerseries_module import MonoidPowerSeriesModule, \ EquivariantMonoidPowerSeriesModule from monoidpowerseries_element import MonoidPowerSeries,...
Python
""" Finite dimensional submodules of a ring or module of graded expansions. AUTHOR : -- Martin Raum (2009 - 07 - 27) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it...
Python
r""" Interface for elements which provide a Fourier expansion. AUTHOR : -- Martin Raum (2009 - 08 - 03) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it and/or # modi...
Python
r""" Gradings of a polynomial quotient ring. AUTHOR : -- Martin Raum (2009 - 07 - 27) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it and/or # modify it under the te...
Python
""" Functors for ring and modules of graded expansions. AUTHOR : -- Martin Raum (2009 - 07 - 27) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it and/or # modify it u...
Python
""" Ambients of elements with Fourier expansion and partially known relations. AUTHOR : -- Martin Raum (2010 - 03 - 10) Initial version """ #=============================================================================== # # Copyright (C) 2010 Martin Raum # # This program is free software; you can redistribute ...
Python
""" Elements wrapping a Fourier expansion which partially known relations. AUTHOR : -- Martin Raum (2009 - 07 - 27) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it a...
Python
""" Modules of elements with Fourier expansion and partially known relations. AUTHOR : -- Martin Raum (2009 - 10 - 30) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute ...
Python
from expansion_module import ExpansionModule from gradedexpansion_grading import DegreeGrading
Python
""" Rings of elements with Fourier expansion and partially known relations. AUTHOR : -- Martin Raum (2009 - 07 - 27) Initial version """ #=============================================================================== # # Copyright (C) 2009 Martin Raum # # This program is free software; you can redistribute it...
Python
""" Module abstractly spanned by Fourier expansions. AUTHOR : -- Martin Raum (2010 - 05 - 15) Initial version """ #=============================================================================== # # Copyright (C) 2010 Martin Raum # # This program is free software; you can redistribute it and/or # modify it und...
Python
""" Lazy monoid power series which wrap graded expansions. AUTHOR : -- Martin Raum (2010 - 05 - 23) Initial version """ #=============================================================================== # # Copyright (C) 2010 Martin Raum # # This program is free software; you can redistribute it and/or # modify i...
Python
from monoidpowerseries import * from gradedexpansions import * from modularforms import *
Python
# -*- coding: utf-8 -*- r""" p-adic L-series of modular Jacobians with ordinary reduction at p. REFERENCES: - [MTT] B. Mazur, J. Tate, and J. Teitelbaum, On `p`-adic analogues of the conjectures of Birch and Swinnerton-Dyer, Inventiones mathematicae 84, (1986), 1-48. - [SW] William Stein and Christia...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2011 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
################################################################################# # # (c) Copyright 2010 William Stein # # This file is part of PSAGE # # PSAGE 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 Foundatio...
Python
#import maass from maass import * import rational import hilbert from siegel import SiegelModularForm, SiegelModularFormsAlgebra import fourier_expansion_framework
Python
# -*- coding: utf-8 -*- # cython: profile=True r""" A general class for subgroups of the (projective) modular group, PSL(2,Z). Extends the standard classes with methods needed for Maass waveforms. AUTHORS: - Fredrik Strömberg EXAMPLES:: sage: P=Permutations(6) sage: pS=P([2,1,4,3,6,5]) sage: pR=P([3,1,2...
Python