code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
"""
Forms and validation code for user registration.
"""
from django.contrib.auth.models import User
from django import forms
from django.utils.translation import ugettext_lazy as _
from registration.models import RegistrationProfile
# I put this on all required fields, because it's easier to pick up
# on them wit... | Python |
"""
Unit tests for django-registration.
These tests assume that you've completed all the prerequisites for
getting django-registration running in the default setup, to wit:
1. You have ``registration`` in your ``INSTALLED_APPS`` setting.
2. You have created all of the templates mentioned in this
application's doc... | Python |
"""
URLConf for Django user registration and authentication.
If the default behavior of the registration views is acceptable to
you, simply use a line like this in your root URLConf to set up the
default URLs for registration::
(r'^accounts/', include('registration.urls')),
This will also automatically set up th... | Python |
"""
A management command which deletes expired accounts (e.g.,
accounts which signed up but never activated) from the database.
Calls ``RegistrationProfile.objects.delete_expired_users()``, which
contains the actual logic for determining which accounts are deleted.
"""
from django.core.management.base import NoArgsC... | Python |
"""
Views which allow users to create and activate accounts.
"""
from django.contrib.auth.decorators import login_required
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template imp... | Python |
from django.contrib import admin
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'activation_key_expired')
search_fields = ('user__username', 'user__first_name')
admin.site.register(RegistrationProfile, RegistrationAdmin)
| Python |
from django.dispatch import Signal
# A new user has registered.
user_registered = Signal(providing_args=["user"])
# A user has activated his or her account.
user_activated = Signal(providing_args=["user"])
| Python |
"""Implementation of JSONDecoder
"""
import re
import sys
import struct
from simplejson.scanner import make_scanner
try:
from simplejson._speedups import scanstring as c_scanstring
except ImportError:
c_scanstring = None
__all__ = ['JSONDecoder']
FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
def _floatconst... | Python |
"""JSON token scanner
"""
import re
try:
from simplejson._speedups import make_scanner as c_make_scanner
except ImportError:
c_make_scanner = None
__all__ = ['make_scanner']
NUMBER_RE = re.compile(
r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?',
(re.VERBOSE | re.MULTILINE | re.DOTALL))
def py_make_scan... | Python |
"""Implementation of JSONEncoder
"""
import re
try:
from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
try:
from simplejson._speedups import make_encoder as c_make_encoder
except ImportError:
c_make_encoder = None
... | Python |
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... | Python |
r"""Using simplejson from the shell to validate and
pretty-print::
$ echo '{"json":"obj"}' | python -msimplejson.tool
{
"json": "obj"
}
$ echo '{ 1.2:3.4}' | python -msimplejson.tool
Expecting property name: line 1 column 2 (char 2)
"""
import simplejson
def main():
import sys
if l... | Python |
# -*- coding: utf-8 -*-
import os, sys
COMMON_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
PROJECT_DIR = os.path.dirname(COMMON_DIR)
ZIP_PACKAGES_DIRS = (os.path.join(PROJECT_DIR, 'zip-packages'),
os.path.join(COMMON_DIR, 'zip-packages'))
# Overrides for os.environ
env_ext = {... | Python |
#!/usr/bin/env python
if __name__ == '__main__':
from common.appenginepatch.aecmd import setup_env
setup_env(manage_py_env=True)
# Recompile translation files
from mediautils.compilemessages import updatemessages
updatemessages()
# Generate compressed media files for manage.py update
impor... | Python |
# -*- coding: utf-8 -*-
import os, sys
# Add current folder to sys.path, so we can import aecmd.
# App Engine causes main.py to be reloaded if an exception gets raised
# on the first request of a main.py instance, so don't add current_dir multiple
# times.
current_dir = os.path.abspath(os.path.dirname(__file__))
if cu... | Python |
# Empty file neeed to make this a Django app.
| Python |
#!/usr/bin/python2.4
#
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | Python |
# -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from google.appengine.ext import db
| Python |
# -*- coding: utf-8 -*-
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext as _
from ragendja.template import render_to_response
| Python |
#!/usr/bin/python2.4
#
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | Python |
# -*- coding: utf-8 -*-
from django.db.models import signals
from django.test import TestCase
from ragendja.dbutils import cleanup_relations
from ragendja.testutils import ModelTestCase
from google.appengine.ext import db
from google.appengine.ext.db.polymodel import PolyModel
from datetime import datetime
# Test clas... | Python |
# -*- coding: utf-8 -*-
# Unfortunately, we have to fix a few App Engine bugs here because otherwise
# not all of our features will work. Still, we should keep the number of bug
# fixes to a minimum and report everything to Google, please:
# http://code.google.com/p/googleappengine/issues/list
from google.appengine.ex... | Python |
from google.appengine.api import apiproxy_stub_map
from google.appengine.ext import db
from django.dispatch import Signal
from django.db.models import signals
from django.utils._threading_local import local
from functools import wraps
# Add signals which can be run after a transaction has been committed
signals.post_... | Python |
from google.appengine.api import apiproxy_stub_map
import os, sys
have_appserver = bool(apiproxy_stub_map.apiproxy.GetStub('datastore_v3'))
if have_appserver:
appid = os.environ.get('APPLICATION_ID')
else:
try:
from google.appengine.tools import dev_appserver
from aecmd import PROJECT_DIR
... | Python |
from google.appengine.api.memcache import *
| Python |
from ragendja.settings_post import settings
from appenginepatcher import have_appserver, on_production_server
if have_appserver and not on_production_server and \
settings.MEDIA_URL.startswith('/'):
if settings.ADMIN_MEDIA_PREFIX.startswith(settings.MEDIA_URL):
settings.ADMIN_MEDIA_PREFIX = '/genera... | Python |
# -*- coding: utf-8 -*-
from django.conf import settings
from django.utils.simplejson import dumps
from os.path import getmtime
import os, codecs, shutil, logging, re
path_re = re.compile(r'/[^/]+/\.\./')
MEDIA_VERSION = unicode(settings.MEDIA_VERSION)
COMPRESSOR = os.path.join(os.path.dirname(__file__), '.yuicompres... | Python |
# -*- coding: utf-8 -*-
from os.path import getmtime
import codecs, os
def updatemessages():
from django.conf import settings
if not settings.USE_I18N:
return
from django.core.management.commands.compilemessages import compile_messages
if any([needs_update(path) for path in settings.LOCALE_PATH... | Python |
# -*- coding: utf-8 -*-
"""
This app combines media files specified in the COMBINE_MEDIA setting into one
single file. It's a dictionary mapping the combined name to a tuple of files
that should be combined:
COMBINE_MEDIA = {
'global/js/combined.js': (
'global/js/main.js',
'app/js/other.js',
),... | Python |
# -*- coding: utf-8 -*-
from django.core.management.base import NoArgsCommand, CommandError
from optparse import make_option
import os, cStringIO, gzip, mimetypes
class Command(NoArgsCommand):
help = 'Uploads your _generated_media folder to Amazon S3.'
option_list = NoArgsCommand.option_list + (
make_o... | Python |
# -*- coding: utf-8 -*-
from django.http import HttpResponse, Http404
from django.views.decorators.cache import cache_control
from mediautils.generatemedia import get_targets, get_copy_targets, \
get_target_content, get_media_dirs
from mimetypes import guess_type
from ragendja.template import render_to_response
@c... | Python |
# -*- coding: utf-8 -*-
from django.conf import settings
from mediautils.views import get_file
class MediaMiddleware(object):
"""Returns media files.
This is a middleware, so it can handle the request as early as possible
and thus with minimum overhead."""
def process_request(self, request):
... | Python |
from django.conf import settings
from django.core.cache import cache
from django.contrib.sites.models import Site
from ragendja.dbutils import db_create
from ragendja.pyutils import make_tls_property
_default_site_id = getattr(settings, 'SITE_ID', None)
SITE_ID = settings.__class__.SITE_ID = make_tls_property()
class... | Python |
# -*- coding: utf-8 -*-
"""
Imports urlpatterns from apps, so we can have nice plug-n-play installation. :)
"""
from django.conf.urls.defaults import *
from django.conf import settings
IGNORE_APP_URLSAUTO = getattr(settings, 'IGNORE_APP_URLSAUTO', ())
check_app_imports = getattr(settings, 'check_app_imports', None)
u... | Python |
from django.conf import settings
import os
def import_module(module_name):
return __import__(module_name, {}, {}, [''])
def import_package(package_name):
package = [import_module(package_name)]
if package[0].__file__.rstrip('.pyc').rstrip('.py').endswith('__init__'):
package.extend([import_module(... | Python |
# -*- coding: utf-8 -*-
from django.utils._threading_local import local
def make_tls_property(default=None):
"""Creates a class-wide instance property with a thread-specific value."""
class TLSProperty(object):
def __init__(self):
self.local = local()
def __get__(self, instance, cl... | Python |
# -*- coding: utf-8 -*-
from django.test import TestCase
from google.appengine.ext import db
from pyutils import object_list_to_table, equal_lists
import os
class ModelTestCase(TestCase):
"""
A test case for models that provides an easy way to validate the DB
contents against a given list of row-values.
... | Python |
from copy import deepcopy
import re
from django import forms
from django.utils.datastructures import SortedDict, MultiValueDict
from django.utils.html import conditional_escape
from django.utils.encoding import StrAndUnicode, smart_unicode, force_unicode
from django.utils.safestring import mark_safe
from django.forms.... | Python |
# -*- coding: utf-8 -*-
from copy import deepcopy
from django.forms.forms import NON_FIELD_ERRORS
from django.template import Library
from django.utils.datastructures import SortedDict
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from ragendja.dbutils import prefetch_... | Python |
# -*- coding: utf-8 -*-
from django.conf import settings
from django.template import Library
from django.utils.html import escape
from google.appengine.api import users
register = Library()
@register.simple_tag
def google_login_url(redirect=settings.LOGIN_REDIRECT_URL):
return escape(users.create_login_url(redire... | Python |
from django.contrib.auth.models import *
from django.contrib.auth.models import DjangoCompatibleUser as User
| Python |
# -*- coding: utf-8 -*-
"""
Provides basic set of auth urls.
"""
from django.conf.urls.defaults import *
from django.conf import settings
urlpatterns = patterns('')
LOGIN = '^%s$' % settings.LOGIN_URL.lstrip('/')
LOGOUT = '^%s$' % settings.LOGOUT_URL.lstrip('/')
# If user set a LOGOUT_REDIRECT_URL we do a redirect.
... | Python |
# -*- coding: utf-8 -*-
from google.appengine.api import users
def google_user(request):
return {'google_user': users.get_current_user()}
| Python |
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from google.appengine.api import users
from google.appengine.ext import db
from ragendja.auth.models import EmailUserTraits
class GoogleUserTraits(EmailUserTraits):
@classmethod
def get_djangouser_for_user(cls, user):
... | Python |
# -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from functools import wraps
from ragendja.auth.views import google_redirect_to_login
from ragendja.template import render_to_response
def staff_only(view):
"""
Decorator that requires user.is_staff. Otherwise renders no_access.ht... | Python |
# -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.views import login, logout
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext as _
from google.appengine.api import users
from ragendja.template i... | Python |
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
class UserAdmin(admin.ModelAdmin):
fieldsets = (
(_('Personal info'), {'fields': ('user',)}),
(_('Permissions'), {'fields': ('is_active', 'is_staff', 'is_superuser', 'user_permissions')}),
(_('Important... | Python |
# Parts of this code are taken from Google's django-helper (license: Apache 2)
class LazyGoogleUser(object):
def __init__(self, middleware_class):
self._middleware_class = middleware_class
def __get__(self, request, obj_type=None):
if not hasattr(request, '_cached_user'):
from djan... | Python |
from django.utils.translation import ugettext_lazy as _
from google.appengine.ext import db
from ragendja.auth.google_models import GoogleUserTraits
class User(GoogleUserTraits):
"""User class that provides support for Django and Google Accounts."""
user = db.UserProperty()
username = db.StringProperty(req... | Python |
# -*- coding: utf-8 -*-
"""
This is a set of utilities for faster development with Django templates.
render_to_response() and render_to_string() use RequestContext internally.
The app_prefixed_loader is a template loader that loads directly from the app's
'templates' folder when you specify an app prefix ('app/templa... | Python |
# -*- coding: utf-8 -*-
from django.conf import settings
from django.core.serializers.json import DjangoJSONEncoder
from django.http import HttpResponse
from django.utils import simplejson
from django.utils.encoding import force_unicode
from django.utils.functional import Promise
class LazyEncoder(DjangoJSONEncoder):
... | Python |
# -*- coding: utf-8 -*-
from django.http import HttpRequest
class RegisterVars(dict):
"""
This class provides a simplified mechanism to build context processors
that only add variables or functions without processing a request.
Your module should have a global instance of this class called 'regist... | Python |
# -*- coding: utf-8 -*-
from appenginepatcher import on_production_server, have_appserver
import os
DEBUG = not on_production_server
# The MEDIA_VERSION will get integrated via %d
MEDIA_URL = '/media/%d/'
# The MEDIA_URL will get integrated via %s
ADMIN_MEDIA_PREFIX = '%sadmin_media/'
ADMINS = ()
DATABASE_ENGINE = '... | Python |
from django.conf import settings
from django.http import HttpResponseServerError
from ragendja.template import render_to_string
def server_error(request, *args, **kwargs):
debugkey = request.REQUEST.get('debugkey')
if debugkey and debugkey == getattr(settings, 'DEBUGKEY', None):
import sys
from... | Python |
# -*- coding: utf-8 -*-
from django.conf import settings
from django.utils.cache import patch_cache_control
from google.appengine.runtime.apiproxy_errors import CapabilityDisabledError
from google.appengine.ext import db
from ragendja.template import render_to_response
from ragendja.views import server_error, maintenan... | Python |
# -*- coding: utf-8 -*-
from settings import *
import sys
if '%d' in MEDIA_URL:
MEDIA_URL = MEDIA_URL % MEDIA_VERSION
if '%s' in ADMIN_MEDIA_PREFIX:
ADMIN_MEDIA_PREFIX = ADMIN_MEDIA_PREFIX % MEDIA_URL
TEMPLATE_DEBUG = DEBUG
MANAGERS = ADMINS
# You can override Django's or some apps' locales with these folder... | Python |
# -*- coding: utf-8 -*-
from django.db.models import signals
from django.http import Http404
from django.utils import simplejson
from google.appengine.ext import db
from ragendja.pyutils import getattr_by_path
from random import choice
from string import ascii_letters, digits
def get_filters(*filters):
"""Helper m... | Python |
#!/usr/bin/env python
if __name__ == '__main__':
from common.appenginepatch.aecmd import setup_env
setup_env(manage_py_env=True)
# Recompile translation files
from mediautils.compilemessages import updatemessages
updatemessages()
# Generate compressed media files for manage.py update
impor... | Python |
from ragendja.settings_post import settings
settings.add_app_media('combined-%(LANGUAGE_CODE)s.js',
'jquery/jquery.js',
'jquery/jquery.fixes.js',
'jquery/jquery.ajax-queue.js',
'jquery/jquery.bgiframe.js',
'jquery/jquery.livequery.js',
'jquery/jquery.form.js',
)
| Python |
#!/usr/bin/env python
if __name__ == '__main__':
from common.appenginepatch.aecmd import setup_env
setup_env(manage_py_env=True)
# Recompile translation files
from mediautils.compilemessages import updatemessages
updatemessages()
# Generate compressed media files for manage.py update
impor... | Python |
#!/usr/bin/env python
# -*- Python -*-
import sys
import time
sys.path.append(".")
# Import RTM module
import OpenRTM_aist
import RTC
import socket
import httplib
from time import sleep
# Import Service implementation class
# <rtc-template block="service_impl">
# </rtc-template>
# Import Service stub modules
# <r... | Python |
#!/usr/bin/env python
# -*- Python -*-
import sys
import time
sys.path.append(".")
# Import RTM module
import OpenRTM_aist
import RTC
import socket
import httplib
from time import sleep
# Import Service implementation class
# <rtc-template block="service_impl">
# </rtc-template>
# Import Service stub modules
# <r... | Python |
# -*- coding: utf-8 -*-
#!/bin/env python
import socket
import urllib
import urllib2
#########################################################################
##-backup_csvスクリプトの使用方法について-
##
##以下で実行されます。
##>backup("ID","PASS", min, max )
## 各パラメータについて
## ID,PASS
## 100uhacoプロジェクトに使用しているもの
## ... | Python |
# -*- coding: utf-8 -*-
#!/bin/env python
import socket
import urllib
import urllib2
import xml.dom.minidom
#########################################################################
##-backupスクリプトの使用方法について-
##
##以下で実行されます。
##>backup("ID","PASS", min, max )
## 各パラメータについて
## ID,PASS
## 100uhaco... | 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 |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | Python |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-#
#
# Copyright 2007 The Python-Twitter Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | Python |
#!/usr/bin/python2.4
'''Load the latest update for a Twitter user and leave it in an XHTML fragment'''
__author__ = 'dewitt@google.com'
import codecs
import getopt
import sys
import twitter
TEMPLATE = """
<div class="twitter">
<span class="twitter-user"><a href="http://twitter.com/%s">Twitter</a>: </span>
<span... | Python |
#!/usr/bin/python2.4
'''Post a message to twitter'''
__author__ = 'dewitt@google.com'
import ConfigParser
import getopt
import os
import sys
import twitter
USAGE = '''Usage: tweet [options] message
This script posts a message to Twitter.
Options:
-h --help : print this help
--consumer-key : the twit... | Python |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | Python |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | Python |
"""Implementation of JSONDecoder
"""
import re
import sys
import struct
from simplejson.scanner import make_scanner
try:
from simplejson._speedups import scanstring as c_scanstring
except ImportError:
c_scanstring = None
__all__ = ['JSONDecoder']
FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
def _floatconst... | Python |
"""JSON token scanner
"""
import re
try:
from simplejson._speedups import make_scanner as c_make_scanner
except ImportError:
c_make_scanner = None
__all__ = ['make_scanner']
NUMBER_RE = re.compile(
r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?',
(re.VERBOSE | re.MULTILINE | re.DOTALL))
def py_make_scan... | Python |
"""Implementation of JSONEncoder
"""
import re
try:
from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
try:
from simplejson._speedups import make_encoder as c_make_encoder
except ImportError:
c_make_encoder = None
... | Python |
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... | Python |
r"""Using simplejson from the shell to validate and
pretty-print::
$ echo '{"json":"obj"}' | python -msimplejson.tool
{
"json": "obj"
}
$ echo '{ 1.2:3.4}' | python -msimplejson.tool
Expecting property name: line 1 column 2 (char 2)
"""
import simplejson
def main():
import sys
if l... | Python |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | Python |
#lots to do here
##[Unit11213]
##Name=NONE
##Direction=2
##NumAtoms=11
##NumCells=11
##UnitNumber=11213
##UnitType=3
##NumberBlocks=1
##
##[Unit11213_Block1]
##Name=SRS_LIKE26_s_at
##BlockNumber=1
##NumAtoms=11
##NumCells=11
##StartPosition=0
##StopPosition=10
##CellHeader=X Y PROBE FEAT QUAL EXPOS POS CBASE ... | Python |
import csv, os, glob
import sys
import numpy
class affycel:
def _int_(self, filename, version, header, intensityCells, intensity, maskscells, masks, outlierCells, outliers, modifiedCells, modified):
self.filename = filename
self.version = version
self.header = {}
self.intensityCel... | Python |
#!/usr/bin/env python
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | Python |
#!/usr/bin/env python
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | Python |
#!/usr/bin/env python
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | Python |
#!/usr/bin/env python
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Ivan Fontarensky
@license: GNU General Public License 3.0
@contact: ivan.fontarensky_at_gmail.com
"""
import os, sys
import platform
import subprocess
from distutils.core import setup
from distutils.cmd import Command
from distutils.log impo... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Ivan Fontarensky
@license: GNU General Public License 3.0
@contact: ivan.fontarensky_at_gmail.com
"""
import string
import pickle
import logging
import sys, os, traceback
from yaraeditor.constante import *
from PyQt4 import *
from PyQt4 imp... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Ivan Fontarensky
@license: GNU General Public License 3.0
@contact: ivan.fontarensky_at_gmail.com
"""
from PyQt4 import QtGui
from PyQt4 import QtCore
from PyQt4.QtCore import (QObject, Qt, SIGNAL, SLOT)
class YaraHighlighter(Qt... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Ivan Fontarensky
@license: GNU General Public License 3.0
@contact: ivan.fontarensky_at_gmail.com
"""
import string
import pickle
import logging
import sys, os, traceback
from yaraeditor.constante import *
from PyQt4 import *
from PyQt4 imp... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Ivan Fontarensky
@license: GNU General Public License 3.0
@contact: ivan.fontarensky_at_gmail.com
"""
__all__ = []
# vim:ts=4:expandtab:sw=4
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Ivan Fontarensky
@license: GNU General Public License 3.0
@contact: ivan.fontarensky_at_gmail.com
"""
import string
import pickle
import logging
import sys, os, re, traceback
from yaraeditor.constante import *
from yaraeditor.core.highlighte... | Python |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created: Sat Nov 24 16:28:52 2012
# by: The Resource Compiler for PyQt (Qt v4.8.1)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x00\x04\x8b\
\xff\
\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x... | Python |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'yaraeditor.ui'
#
# Created: Tue Feb 26 07:52:45 2013
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attr... | Python |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'rules_generator.ui'
#
# Created: Tue Feb 26 07:52:45 2013
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Ivan Fontarensky
@license: GNU General Public License 3.0
@contact: ivan.fontarensky_at_gmail.com
"""
__all__ = []
# vim:ts=4:expandtab:sw=4
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Ivan Fontarensky
@license: GNU General Public License 3.0
@contact: ivan.fontarensky_at_gmail.com
"""
__all__ = []
# vim:ts=4:expandtab:sw=4
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Ivan Fontarensky
@license: GNU General Public License 3.0
@contact: ivan.fontarensky_at_gmail.com
"""
import os
VERSION = "0.1.5"
DEBUG = 1
AUTHOR = "Ivan Fontarensky"
NAME = "yara-editor"
LOG_FILE = "./%s.log" % (NAME)
CONF_PATH = "%s/.yar... | Python |
Subsets and Splits
SQL Console for ajibawa-2023/Python-Code-Large
Provides a useful breakdown of language distribution in the training data, showing which languages have the most samples and helping identify potential imbalances across different language groups.