code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
# -*- coding: utf-8 -*-
'''Kontalk XMPP s2s component.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
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, eithe... | [
[
8,
0,
0.0078,
0.0039,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0428,
0.0661,
0,
0.66,
0.0909,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0856,
0.0039,
0,
0.66,
... | [
"'''Kontalk XMPP s2s component.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either versio... |
# -*- coding: utf-8 -*-
"""Storage modules."""
"""
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
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... | [
[
8,
0,
0.0037,
0.0019,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0204,
0.0316,
0,
0.66,
0.0435,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0409,
0.0019,
0,
0.66,
... | [
"\"\"\"Storage modules.\"\"\"",
"\"\"\"\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version ... |
# -*- coding: utf-8 -*-
'''Keyring functions.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
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... | [
[
8,
0,
0.0043,
0.0022,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0239,
0.037,
0,
0.66,
0.125,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0457,
0.0022,
0,
0.66,
... | [
"'''Keyring functions.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of th... |
# -*- coding: utf-8 -*-
'''Interface to database.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
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 ver... | [
[
8,
0,
0.0114,
0.0057,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0629,
0.0971,
0,
0.66,
0.0833,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.12,
0.0057,
0,
0.66,
... | [
"'''Interface to database.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 o... |
# -*- coding: utf-8 -*-
"""Utilities for everybody."""
"""
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
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 v... | [
[
8,
0,
0.013,
0.0065,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0714,
0.1104,
0,
0.66,
0.037,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1364,
0.0065,
0,
0.66,
... | [
"\"\"\"Utilities for everybody.\"\"\"",
"\"\"\"\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either ... |
# -*- coding: utf-8 -*-
'''Twisted logging to Python loggin bridge.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
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 Foun... | [
[
8,
0,
0.0299,
0.0149,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.1642,
0.2537,
0,
0.66,
0.0769,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3284,
0.0149,
0,
0.66,
... | [
"'''Twisted logging to Python loggin bridge.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, ... |
# -*- coding: utf-8 -*-
'''Push notifications support.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
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, eithe... | [
[
8,
0,
0.0144,
0.0072,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0791,
0.1223,
0,
0.66,
0.0833,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1583,
0.0072,
0,
0.66,
... | [
"'''Push notifications support.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either versio... |
# -*- coding: utf-8 -*-
'''Version information.'''
'''
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
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 versi... | [
[
8,
0,
0.0667,
0.0333,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.3667,
0.5667,
0,
0.66,
0.1667,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.7,
0.0333,
0,
0.66,
... | [
"'''Version information.'''",
"'''\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of ... |
# -*- coding: utf-8 -*-
"""TLS powered by GnuTLS."""
"""
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
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 ver... | [
[
8,
0,
0.026,
0.013,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.1429,
0.2208,
0,
0.66,
0.125,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2857,
0.013,
0,
0.66,
0.... | [
"\"\"\"TLS powered by GnuTLS.\"\"\"",
"\"\"\"\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either ve... |
# -*- coding: utf-8 -*-
"""XMPP stream compression."""
"""
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
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 v... | [
[
8,
0,
0.0075,
0.0038,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0415,
0.0642,
0,
0.66,
0.0714,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0849,
0.0151,
0,
0.66,
... | [
"\"\"\"XMPP stream compression.\"\"\"",
"\"\"\"\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either ... |
# -*- coding: utf-8 -*-
"""Client registration providers."""
"""
Kontalk XMPP server
Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>
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, ei... | [
[
8,
0,
0.0071,
0.0035,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0389,
0.0601,
0,
0.66,
0.1,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0777,
0.0035,
0,
0.66,
0... | [
"\"\"\"Client registration providers.\"\"\"",
"\"\"\"\n Kontalk XMPP server\n Copyright (C) 2011 Kontalk Devteam <devteam@kontalk.org>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, e... |
# -*- coding: utf-8 -*-
''' This code is under Public Domain. '''
import urllib
import urllib2
import urlparse
import json
BASEURL = "https://rest.nexmo.com"
class NexmoMessage:
def __init__(self, details):
self.sms = details
if 'type' not in self.sms:
self.sms['type'] = 'text'
... | [
[
8,
0,
0.0104,
0.0052,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0208,
0.0052,
0,
0.66,
0.1667,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.026,
0.0052,
0,
0.66,... | [
"''' This code is under Public Domain. '''",
"import urllib",
"import urllib2",
"import urlparse",
"import json",
"BASEURL = \"https://rest.nexmo.com\"",
"class NexmoMessage:\n\n def __init__(self, details):\n self.sms = details\n if 'type' not in self.sms:\n self.sms['type']... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | [
[
14,
0,
0.0281,
0.0017,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0347,
0.0017,
0,
0.66,
0.0303,
509,
0,
1,
0,
0,
509,
0,
0
],
[
8,
0,
0.0364,
0.0017,
0,
0... | [
"__author__ = 'afshar@google.com (Ali Afshar)'",
"import sys",
"sys.path.insert(0, 'lib')",
"import os",
"import httplib2",
"import sessions",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from google.appengine.ext import db",
"from google... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | [
[
14,
0,
0.0557,
0.0033,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0689,
0.0033,
0,
0.66,
0.0333,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0721,
0.0033,
0,
0... | [
"__author__ = 'afshar@google.com (Ali Afshar)'",
"import os",
"import httplib2",
"import sessions",
"from google.appengine.ext import db",
"from google.appengine.ext.webapp import template",
"from apiclient.discovery import build_from_document",
"from apiclient.http import MediaUpload",
"from oauth2... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | [
[
14,
0,
0.1667,
0.0556,
0,
0.66,
0,
189,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3889,
0.0556,
0,
0.66,
0.3333,
295,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.6111,
0.0556,
0,
0... | [
"manual_verstr = \"1.5\"",
"auto_build_num = \"211\"",
"verstr = manual_verstr + \".\" + auto_build_num",
"try:\n from pyutil.version_class import Version as pyutil_Version\n __version__ = pyutil_Version(verstr)\nexcept (ImportError, ValueError):\n # Maybe there is no pyutil installed.\n from dist... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | [
[
8,
0,
0.3,
0.575,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.625,
0.025,
0,
0.66,
0.3333,
311,
0,
1,
0,
0,
311,
0,
0
],
[
1,
0,
0.65,
0.025,
0,
0.66,
0.6... | [
"\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | [
[
8,
0,
0.2927,
0.561,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.6098,
0.0244,
0,
0.66,
0.25,
311,
0,
1,
0,
0,
311,
0,
0
],
[
1,
0,
0.6341,
0.0244,
0,
0.66,
... | [
"\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | [
[
8,
0,
0.0437,
0.0741,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0847,
0.0026,
0,
0.66,
0.0588,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0899,
0.0026,
0,
0.66,... | [
"\"\"\"Multi-credential file store with lock support.\n\nThis module implements a JSON credential store where multiple\ncredentials can be stored in one file. That file supports locking\nboth in a single process and across processes.\n\nThe credential themselves are keyed off of:\n* client_id",
"__author__ = 'jb... |
# Copyright (C) 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 law or agreed to in writ... | [
[
8,
0,
0.0145,
0.0035,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0176,
0.0009,
0,
0.66,
0.0244,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0193,
0.0009,
0,
0.66,... | [
"\"\"\"An OAuth 2.0 client.\n\nTools for interacting with OAuth 2.0 protected resources.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import base64",
"import clientsecrets",
"import copy",
"import datetime",
"import httplib2",
"import logging",
"import os",
"import sys",
"im... |
# Copyright (C) 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 law or agreed to in writ... | [
[
8,
0,
0.1604,
0.0472,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1981,
0.0094,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.217,
0.0094,
0,
0.66,
... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 2.0\ncredentials.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import os",
"import stat",
"import threading",
"from anyjson import simplejson",
"from client import Storage as BaseStorage",
"from clien... |
# Copyright (C) 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 law or agreed to in writ... | [
[
8,
0,
0.1371,
0.0403,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1694,
0.0081,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1855,
0.0081,
0,
0.66,... | [
"\"\"\"OAuth 2.0 utilities for Django.\n\nUtilities for using OAuth 2.0 in conjunction with\nthe Django datastore.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import oauth2client",
"import base64",
"import pickle",
"from django.db import models",
"from oauth2client.client import St... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 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 ... | [
[
1,
0,
0.0738,
0.0041,
0,
0.66,
0,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.0779,
0.0041,
0,
0.66,
0.0625,
154,
0,
1,
0,
0,
154,
0,
0
],
[
1,
0,
0.082,
0.0041,
0,
0... | [
"import base64",
"import hashlib",
"import logging",
"import time",
"from OpenSSL import crypto",
"from anyjson import simplejson",
"CLOCK_SKEW_SECS = 300 # 5 minutes in seconds",
"AUTH_TOKEN_LIFETIME_SECS = 300 # 5 minutes in seconds",
"MAX_TOKEN_LIFETIME_SECS = 86400 # 1 day in seconds",
"cla... |
# Copyright (C) 2011 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 agreed to in writ... | [
[
8,
0,
0.1619,
0.0476,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2,
0.0095,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2286,
0.0095,
0,
0.66,
... | [
"\"\"\"Utilities for reading OAuth 2.0 client secret files.\n\nA client_secrets.json file contains all the information needed to interact with\nan OAuth 2.0 protected service.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from anyjson import simplejson",
"TYPE_WEB = 'web'",
"TYPE_INSTALL... |
__version__ = "1.0c2"
| [
[
14,
0,
1,
1,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__ = \"1.0c2\""
] |
# Copyright (C) 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 law or agreed to in writ... | [
[
8,
0,
0.5312,
0.1562,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6562,
0.0312,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.875,
0.2812,
0,
0.66,
... | [
"\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n # Should work for Python2.6 and higher.\n import json as simplejson\nexcept ImportError: #... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | [
[
1,
0,
0.006,
0.006,
0,
0.66,
0,
32,
0,
1,
0,
0,
32,
0,
0
],
[
1,
0,
0.0119,
0.006,
0,
0.66,
0.1,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0179,
0.006,
0,
0.66,
... | [
"import Cookie",
"import datetime",
"import time",
"import email.utils",
"import calendar",
"import base64",
"import hashlib",
"import hmac",
"import re",
"import logging",
"class LilCookies:\n\n @staticmethod\n def _utf8(s):\n if isinstance(s, unicode):\n return s.encode(\"utf-8\")\n ... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | [
[
8,
0,
0.0814,
0.1105,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1453,
0.0058,
0,
0.66,
0.0833,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1512,
0.0058,
0,
0.66... | [
"\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1",
"__v... |
# Copyright (C) 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 law or agreed to in writ... | [
[
8,
0,
0.0342,
0.0083,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0414,
0.0021,
0,
0.66,
0.0476,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0476,
0.0021,
0,
0.66,... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import copy",
"import httplib2",
"import logging",
"import oauth2 as oauth",
"import urllib",
"import urlparse",
"from anyjson import simplejson",
"tr... |
#!/usr/bin/python2.4
#
# Copyright (C) 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 l... | [
[
8,
0,
0.0519,
0.0182,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0649,
0.0026,
0,
0.66,
0.0625,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0701,
0.0026,
0,
0.66,... | [
"\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import... |
# Copyright (C) 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 law or agreed to in writ... | [
[
8,
0,
0.2619,
0.0635,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3175,
0.0159,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3492,
0.0159,
0,
0.66,
... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"import threading",
"from apiclient.oauth import Storage as BaseStorage",
"class Storage(BaseStorage):\n \"\"\"Store and retr... |
# Copyright (C) 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 law or agreed to in writ... | [
[
1,
0,
0.2679,
0.0179,
0,
0.66,
0,
629,
0,
1,
0,
0,
629,
0,
0
],
[
1,
0,
0.2857,
0.0179,
0,
0.66,
0.2,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.3036,
0.0179,
0,
0.6... | [
"import apiclient",
"import base64",
"import pickle",
"from django.db import models",
"class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):",
" __metaclass__ = models.SubfieldBase",
" def db_t... |
# Copyright (C) 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 law or agreed to in writ... | [
[
8,
0,
0.1259,
0.037,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1556,
0.0074,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1704,
0.0074,
0,
0.66,
... | [
"\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"from google.appengine.ext import db",
"from apiclient.oauth import OAuthCredentials",
"... |
#!/usr/bin/python2.4
#
# Copyright (C) 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 l... | [
[
8,
0,
0.1545,
0.0407,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.187,
0.0081,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2114,
0.0081,
0,
0.66,
... | [
"\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from oauth2client.anyjson import simplejson",
"class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass",
" \"\"\"Base... |
__version__ = "1.0c2"
| [
[
14,
0,
1,
1,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__ = \"1.0c2\""
] |
# Copyright (C) 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 law or agreed to in writ... | [
[
8,
0,
0.1205,
0.1452,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2046,
0.0033,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2112,
0.0033,
0,
0.66,
... | [
"\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
... |
# Copyright (C) 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 law or agreed to in writ... | [
[
8,
0,
0.5312,
0.1562,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6562,
0.0312,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.875,
0.2812,
0,
0.66,
... | [
"\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | [
[
1,
0,
0.0204,
0.0068,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0272,
0.0068,
0,
0.66,
0.0833,
614,
0,
1,
0,
0,
614,
0,
0
],
[
14,
0,
0.0408,
0.0068,
0,
... | [
"import re",
"import urllib",
"RESERVED = \":/?#[]@!$&'()*+,;=\"",
"OPERATOR = \"+./;?|!@\"",
"EXPLODE = \"*+\"",
"MODIFIER = \":^\"",
"TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)",
"VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | [
[
8,
0,
0.1818,
0.0267,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2032,
0.0053,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
3,
0,
0.2219,
0.0107,
0,
0.66,
... | [
"\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"",
"__author__ = 'olexiy@google.com (Olexiy Oryeshko)'",
"class Error(Exception):\n \"\"\"Thrown If val... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | [
[
8,
0,
0.0365,
0.0708,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0845,
0.0205,
0,
0.66,
0.04,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0982,
0.0023,
0,
0.66,
... | [
"\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | [
[
8,
0,
0.0318,
0.0545,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0636,
0.0091,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0727,
0.0091,
0,
0.66... | [
"\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"",
"__author__ = \"Joe Gregorio (joe@bitworking.org)\"",
"__copyright__ = \"Copyright 2006, Joe Gregorio\"",
"__contributors__ = []",
"__version__ = \"1.0.0\"",
"__license__ = \"MIT\"",
"__history__ = \"\"\"\n\"\"\"",
"import urlparse",
"escape_... |
#!/usr/bin/env python
# encoding: UTF-8
import sys
import logging
try:
import json
except ImportError:
import simplejson as json
import onering
logging.basicConfig(level=logging.DEBUG)
def app(environ, start_response):
start_response('200 OK', [])
path = environ['PATH_INFO']
if path == '/init':
... | [
[
1,
0,
0.0976,
0.0244,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.122,
0.0244,
0,
0.66,
0.1429,
715,
0,
1,
0,
0,
715,
0,
0
],
[
7,
0,
0.1829,
0.0976,
0,
0... | [
"import sys",
"import logging",
"try:\n import json\nexcept ImportError:\n import simplejson as json",
" import json",
" import simplejson as json",
"import onering",
"logging.basicConfig(level=logging.DEBUG)",
"def app(environ, start_response):\n start_response('200 OK', [])\n path ... |
import os, sys
from setuptools import setup, Extension
if sys.platform == 'darwin':
include_dirs = ['/Library/Frameworks/OneRing.framework/Headers/']
library_dirs = []
libraries = []
extra_link_args = ['-framework', 'OneRing']
else:
include_dirs = [os.path.join('..', '..', 'include')]
library_d... | [
[
1,
0,
0.0294,
0.0294,
0,
0.66,
0,
688,
0,
2,
0,
0,
688,
0,
0
],
[
1,
0,
0.0588,
0.0294,
0,
0.66,
0.1667,
182,
0,
2,
0,
0,
182,
0,
0
],
[
4,
0,
0.2647,
0.3235,
0,
... | [
"import os, sys",
"from setuptools import setup, Extension",
"if sys.platform == 'darwin':\n include_dirs = ['/Library/Frameworks/OneRing.framework/Headers/']\n library_dirs = []\n libraries = []\n extra_link_args = ['-framework', 'OneRing']\nelse:\n include_dirs = [os.path.join('..', '..', 'incl... |
import logging
from cStringIO import StringIO
try:
import json
except ImportError:
import simplejson as json
import _onering
__all__ = ['register_wsgi_app', 'loop', 'publish']
logger = logging.getLogger('onering')
def register_wsgi_app(appname, app):
def callback(method, url, body=None):
respons... | [
[
1,
0,
0.0208,
0.0208,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0417,
0.0208,
0,
0.66,
0.125,
764,
0,
1,
0,
0,
764,
0,
0
],
[
7,
0,
0.0938,
0.0833,
0,
0... | [
"import logging",
"from cStringIO import StringIO",
"try:\n import json\nexcept ImportError:\n import simplejson as json",
" import json",
" import simplejson as json",
"import _onering",
"__all__ = ['register_wsgi_app', 'loop', 'publish']",
"logger = logging.getLogger('onering')",
"def ... |
from distutils.core import setup
from glob import glob
import sys, os
from demo import __version__ as version
def gen_data_files(topdir):
for dirpath, dirnames, filenames in os.walk(topdir):
filenames = [x for x in filenames if not x.startswith('.')]
yield dirpath, [os.path.join(dirpath, fn) for fn... | [
[
1,
0,
0.0172,
0.0172,
0,
0.66,
0,
152,
0,
1,
0,
0,
152,
0,
0
],
[
1,
0,
0.0345,
0.0172,
0,
0.66,
0.0909,
958,
0,
1,
0,
0,
958,
0,
0
],
[
1,
0,
0.0517,
0.0172,
0,
... | [
"from distutils.core import setup",
"from glob import glob",
"import sys, os",
"from demo import __version__ as version",
"def gen_data_files(topdir):\n for dirpath, dirnames, filenames in os.walk(topdir):\n filenames = [x for x in filenames if not x.startswith('.')]\n yield dirpath, [os.pa... |
#!/usr/bin/env python
# encoding: UTF-8
__author__ = "Qiangning Hong <hongqn@gmail.com>"
__version__ = "$Revision$"
__date__ = "$Date$"
import sys, os
import logging
import commands
import re
import shutil
from subprocess import check_call
logger = logging.getLogger()
def get_qt_dir():
onering = '/Library/Frame... | [
[
14,
0,
0.0367,
0.0092,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0459,
0.0092,
0,
0.66,
0.0588,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.055,
0.0092,
0,
0.... | [
"__author__ = \"Qiangning Hong <hongqn@gmail.com>\"",
"__version__ = \"$Revision$\"",
"__date__ = \"$Date$\"",
"import sys, os",
"import logging",
"import commands",
"import re",
"import shutil",
"from subprocess import check_call",
"logger = logging.getLogger()",
"def get_qt_dir():\n onering... |
'''
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 | [
[
8,
0,
0.1905,
0.3333,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
3,
0,
0.7143,
0.619,
0,
0.66,
1,
229,
0,
2,
0,
0,
186,
0,
1
],
[
8,
1,
0.5238,
0.1429,
1,
0.98,
... | [
"'''\nModule which prompts the user for translations and saves them.\n\nTODO: implement\n\n@author: Rodrigo Damazio\n'''",
"class Translator(object):\n '''\n classdocs\n '''\n\n def __init__(self, language):\n '''\n Constructor",
" '''\n classdocs\n '''",
" def __init__(self, language):\n '''... |
'''
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... | [
[
8,
0,
0.0319,
0.0532,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0745,
0.0106,
0,
0.66,
0.1429,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0851,
0.0106,
0,
0.66... | [
"'''\nModule which brings history information about files from Mercurial.\n\n@author: Rodrigo Damazio\n'''",
"import re",
"import subprocess",
"REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*')",
"def _GetOutputLines(args):\n '''\n Runs an external process and returns its output as a list of lines... |
'''
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... | [
[
8,
0,
0.0261,
0.0435,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0609,
0.0087,
0,
0.66,
0.3333,
573,
0,
1,
0,
0,
573,
0,
0
],
[
1,
0,
0.0696,
0.0087,
0,
0.66... | [
"'''\nModule which parses a string XML file.\n\n@author: Rodrigo Damazio\n'''",
"from xml.parsers.expat import ParserCreate",
"import re",
"class StringsParser(object):\n '''\n Parser for string XML files.\n\n This object is not thread-safe and should be used for parsing a single file at\n a time, only.\n... |
#!/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... | [
[
8,
0,
0.0417,
0.0521,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0833,
0.0104,
0,
0.66,
0.125,
640,
0,
1,
0,
0,
640,
0,
0
],
[
1,
0,
0.0938,
0.0104,
0,
0.66,... | [
"'''\nEntry point for My Tracks i18n tool.\n\n@author: Rodrigo Damazio\n'''",
"import mytracks.files",
"import mytracks.translate",
"import mytracks.validate",
"import sys",
"def Usage():\n print('Usage: %s <command> [<language> ...]\\n' % sys.argv[0])\n print('Commands are:')\n print(' cleanup')\n p... |
'''
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... | [
[
8,
0,
0.0304,
0.0522,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0696,
0.0087,
0,
0.66,
0.25,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0783,
0.0087,
0,
0.66,
... | [
"'''\nModule which compares languague files to the master file and detects\nissues.\n\n@author: Rodrigo Damazio\n'''",
"import os",
"from mytracks.parser import StringsParser",
"import mytracks.history",
"class Validator(object):\n\n def __init__(self, languages):\n '''\n Builds a strings file valida... |
'''
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... | [
[
8,
0,
0.0667,
0.1111,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1333,
0.0222,
0,
0.66,
0.125,
79,
0,
1,
0,
0,
79,
0,
0
],
[
1,
0,
0.1556,
0.0222,
0,
0.66,
... | [
"'''\nModule for dealing with resource files (but not their contents).\n\n@author: Rodrigo Damazio\n'''",
"import os.path",
"from glob import glob",
"import re",
"MYTRACKS_RES_DIR = 'MyTracks/res'",
"ANDROID_MASTER_VALUES = 'values'",
"ANDROID_VALUES_MASK = 'values-*'",
"def GetMyTracksDir():\n '''\n... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sympy
from sympy.core import mul
from sympy.core import add
from sympy.core import power
from sympy.parsing.sympy_parser import parse_expr
import utils
def graficar(request):
#TODO valuar en un punto
#TODO permitir valores como pi en el desde y... | [
[
1,
0,
0.0968,
0.0323,
0,
0.66,
0,
533,
0,
1,
0,
0,
533,
0,
0
],
[
1,
0,
0.129,
0.0323,
0,
0.66,
0.1667,
637,
0,
1,
0,
0,
637,
0,
0
],
[
1,
0,
0.1613,
0.0323,
0,
0... | [
"import sympy",
"from sympy.core import mul",
"from sympy.core import add",
"from sympy.core import power",
"from sympy.parsing.sympy_parser import parse_expr",
"import utils",
"def graficar(request):\n #TODO valuar en un punto\n #TODO permitir valores como pi en el desde y hasta\n res = utils... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import math, wave, array
import sympy
import StringIO
import base64
from sympy.parsing.sympy_parser import parse_expr
import ast
import utils
def safeEval(s,x):
tree = ast.parse(s, mode='eval')
whitelist = (ast.Expression, ast.Call, ast.Name, ast.Lo... | [
[
1,
0,
0.0288,
0.0096,
0,
0.66,
0,
526,
0,
3,
0,
0,
526,
0,
0
],
[
1,
0,
0.0385,
0.0096,
0,
0.66,
0.1111,
533,
0,
1,
0,
0,
533,
0,
0
],
[
1,
0,
0.0481,
0.0096,
0,
... | [
"import math, wave, array",
"import sympy",
"import StringIO",
"import base64",
"from sympy.parsing.sympy_parser import parse_expr",
"import ast",
"import utils",
"def safeEval(s,x):\n tree = ast.parse(s, mode='eval')\n whitelist = (ast.Expression, ast.Call, ast.Name, ast.Load,\n ast... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sympy
from sympy.parsing.sympy_parser import parse_expr
import utils
def recorrer(request):
#TODO permitir valores como pi en el desde y hasta
res = utils.processRequest(request)
results=[]
if res.get("error"):
results.append(r... | [
[
1,
0,
0.1034,
0.0345,
0,
0.66,
0,
533,
0,
1,
0,
0,
533,
0,
0
],
[
1,
0,
0.1379,
0.0345,
0,
0.66,
0.3333,
140,
0,
1,
0,
0,
140,
0,
0
],
[
1,
0,
0.2069,
0.0345,
0,
... | [
"import sympy",
"from sympy.parsing.sympy_parser import parse_expr",
"import utils",
"def recorrer(request):\n #TODO permitir valores como pi en el desde y hasta\n res = utils.processRequest(request)\n results=[]\n if res.get(\"error\"):\n results.append(res.get(\"error\"))\n return ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sympy
from sympy.core import mul
from sympy.core import add
from sympy.core import power
from sympy.parsing.sympy_parser import parse_expr
import utils
def valuar(request):
res = utils.processRequest(request)
results=[]
if res.get("error"... | [
[
1,
0,
0.1304,
0.0435,
0,
0.66,
0,
533,
0,
1,
0,
0,
533,
0,
0
],
[
1,
0,
0.1739,
0.0435,
0,
0.66,
0.1667,
637,
0,
1,
0,
0,
637,
0,
0
],
[
1,
0,
0.2174,
0.0435,
0,
... | [
"import sympy",
"from sympy.core import mul",
"from sympy.core import add",
"from sympy.core import power",
"from sympy.parsing.sympy_parser import parse_expr",
"import utils",
"def valuar(request):\n res = utils.processRequest(request)\n results=[]\n if res.get(\"error\"):\n results.app... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sympy
from sympy.core import mul
from sympy.core import add
from sympy.core import power
from sympy.parsing.sympy_parser import parse_expr
import utils
def graficar(request):
#TODO valuar en un punto
#TODO permitir valores como pi en el desde y... | [
[
1,
0,
0.0968,
0.0323,
0,
0.66,
0,
533,
0,
1,
0,
0,
533,
0,
0
],
[
1,
0,
0.129,
0.0323,
0,
0.66,
0.1667,
637,
0,
1,
0,
0,
637,
0,
0
],
[
1,
0,
0.1613,
0.0323,
0,
0... | [
"import sympy",
"from sympy.core import mul",
"from sympy.core import add",
"from sympy.core import power",
"from sympy.parsing.sympy_parser import parse_expr",
"import utils",
"def graficar(request):\n #TODO valuar en un punto\n #TODO permitir valores como pi en el desde y hasta\n res = utils... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sympy
from sympy.core import mul
from sympy.core import add
from sympy.core import power
from sympy.parsing.sympy_parser import parse_expr
import utils
def analisis(request):
res = utils.processRequest(request)
results=[]
if res.get("er... | [
[
1,
0,
0.0533,
0.0133,
0,
0.66,
0,
533,
0,
1,
0,
0,
533,
0,
0
],
[
1,
0,
0.0667,
0.0133,
0,
0.66,
0.1667,
637,
0,
1,
0,
0,
637,
0,
0
],
[
1,
0,
0.08,
0.0133,
0,
0.... | [
"import sympy",
"from sympy.core import mul",
"from sympy.core import add",
"from sympy.core import power",
"from sympy.parsing.sympy_parser import parse_expr",
"import utils",
"def analisis(request):\n res = utils.processRequest(request)\n results=[]\n if res.get(\"error\"):\n results.a... |
from flask import Flask, request, session, g, redirect, url_for, jsonify
import random, threading, webbrowser
import recorrer
import audio
import graficar
import analisis
import valuar
# create our little application :)
app = Flask(__name__,static_folder='static', static_url_path='')
@app.route("/")
def... | [
[
1,
0,
0.0172,
0.0172,
0,
0.66,
0,
782,
0,
7,
0,
0,
782,
0,
0
],
[
1,
0,
0.0345,
0.0172,
0,
0.66,
0.0526,
715,
0,
3,
0,
0,
715,
0,
0
],
[
1,
0,
0.069,
0.0172,
0,
0... | [
"from flask import Flask, request, session, g, redirect, url_for, jsonify",
"import random, threading, webbrowser",
"import recorrer",
"import audio",
"import graficar",
"import analisis",
"import valuar",
"app = Flask(__name__,static_folder='static', static_url_path='')",
"def index():\n return ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sympy
from sympy.core import mul
from sympy.core import add
from sympy.core import power
from sympy.parsing.sympy_parser import parse_expr
import utils
def analisis(request):
res = utils.processRequest(request)
results=[]
if res.get("er... | [
[
1,
0,
0.0533,
0.0133,
0,
0.66,
0,
533,
0,
1,
0,
0,
533,
0,
0
],
[
1,
0,
0.0667,
0.0133,
0,
0.66,
0.1667,
637,
0,
1,
0,
0,
637,
0,
0
],
[
1,
0,
0.08,
0.0133,
0,
0.... | [
"import sympy",
"from sympy.core import mul",
"from sympy.core import add",
"from sympy.core import power",
"from sympy.parsing.sympy_parser import parse_expr",
"import utils",
"def analisis(request):\n res = utils.processRequest(request)\n results=[]\n if res.get(\"error\"):\n results.a... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sympy
from sympy.core import mul
from sympy.core import add
from sympy.core import power
from sympy.parsing.sympy_parser import parse_expr
import utils
def valuar(request):
res = utils.processRequest(request)
results=[]
if res.get("error"... | [
[
1,
0,
0.1304,
0.0435,
0,
0.66,
0,
533,
0,
1,
0,
0,
533,
0,
0
],
[
1,
0,
0.1739,
0.0435,
0,
0.66,
0.1667,
637,
0,
1,
0,
0,
637,
0,
0
],
[
1,
0,
0.2174,
0.0435,
0,
... | [
"import sympy",
"from sympy.core import mul",
"from sympy.core import add",
"from sympy.core import power",
"from sympy.parsing.sympy_parser import parse_expr",
"import utils",
"def valuar(request):\n res = utils.processRequest(request)\n results=[]\n if res.get(\"error\"):\n results.app... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template
import json
import audio
import analisis
import valuar
import recorrer
import graficar
class Home(webapp.RequestHandler):
... | [
[
1,
0,
0.0385,
0.0192,
0,
0.66,
0,
167,
0,
1,
0,
0,
167,
0,
0
],
[
1,
0,
0.0577,
0.0192,
0,
0.66,
0.0625,
327,
0,
1,
0,
0,
327,
0,
0
],
[
1,
0,
0.0769,
0.0192,
0,
... | [
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from google.appengine.ext.webapp import template",
"import json",
"import audio",
"import analisis",
"import valuar",
"import recorrer",
"import graficar",
"class Home(webapp.RequestHandler):\n... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import math, wave, array
import sympy
import StringIO
import base64
from sympy.parsing.sympy_parser import parse_expr
import ast
import utils
def safeEval(s,x):
tree = ast.parse(s, mode='eval')
whitelist = (ast.Expression, ast.Call, ast.Name, ast.Lo... | [
[
1,
0,
0.0288,
0.0096,
0,
0.66,
0,
526,
0,
3,
0,
0,
526,
0,
0
],
[
1,
0,
0.0385,
0.0096,
0,
0.66,
0.1111,
533,
0,
1,
0,
0,
533,
0,
0
],
[
1,
0,
0.0481,
0.0096,
0,
... | [
"import math, wave, array",
"import sympy",
"import StringIO",
"import base64",
"from sympy.parsing.sympy_parser import parse_expr",
"import ast",
"import utils",
"def safeEval(s,x):\n tree = ast.parse(s, mode='eval')\n whitelist = (ast.Expression, ast.Call, ast.Name, ast.Load,\n ast... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sympy
from sympy.parsing.sympy_parser import parse_expr
import utils
def recorrer(request):
#TODO permitir valores como pi en el desde y hasta
res = utils.processRequest(request)
results=[]
if res.get("error"):
results.append(r... | [
[
1,
0,
0.1034,
0.0345,
0,
0.66,
0,
533,
0,
1,
0,
0,
533,
0,
0
],
[
1,
0,
0.1379,
0.0345,
0,
0.66,
0.3333,
140,
0,
1,
0,
0,
140,
0,
0
],
[
1,
0,
0.2069,
0.0345,
0,
... | [
"import sympy",
"from sympy.parsing.sympy_parser import parse_expr",
"import utils",
"def recorrer(request):\n #TODO permitir valores como pi en el desde y hasta\n res = utils.processRequest(request)\n results=[]\n if res.get(\"error\"):\n results.append(res.get(\"error\"))\n return ... |
# Django settings for accession project.
from os import path
# Root Path to File-Based Database
# for now it is in the accession directory
FILE_DB_ROOT = path.join(path.abspath(path.dirname(__file__)), 'filedb/')
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGER... | [
[
1,
0,
0.0219,
0.0073,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.0511,
0.0073,
0,
0.66,
0.0435,
407,
3,
2,
0,
0,
933,
10,
3
],
[
14,
0,
0.0657,
0.0073,
0,
... | [
"from os import path",
"FILE_DB_ROOT = path.join(path.abspath(path.dirname(__file__)), 'filedb/')",
"DEBUG = True",
"TEMPLATE_DEBUG = DEBUG",
"ADMINS = (\n # ('Your Name', 'your_email@domain.com'),\n)",
"MANAGERS = ADMINS",
"DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlit... |
from django.db import models
from lab.models import Lab
from common.models import AccessionModel
from datetime import datetime
from django.contrib.auth.models import User
from lab.models import Researcher
import os
from django.core.exceptions import ValidationError
from django.core.files.storage import FileSystemStorag... | [
[
1,
0,
0.007,
0.007,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0141,
0.007,
0,
0.66,
0.0588,
454,
0,
1,
0,
0,
454,
0,
0
],
[
1,
0,
0.0211,
0.007,
0,
0.66,
... | [
"from django.db import models",
"from lab.models import Lab",
"from common.models import AccessionModel",
"from datetime import datetime",
"from django.contrib.auth.models import User",
"from lab.models import Researcher",
"import os",
"from django.core.exceptions import ValidationError",
"from djan... |
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
... | [
[
8,
0,
0.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
0,
0.66... | [
"\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_a... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Revision.user'
db.add_column('protocol_revision', 'user', self.gf('django.db.models.fields... | [
[
1,
0,
0.015,
0.0075,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0226,
0.0075,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0301,
0.0075,
0,
0.6... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding field 'Revision.user'\n db.add_column('protocol_revision', 'user', self.gf('django.db.mo... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'RevisionFiles'
db.delete_table('protocol_revisionfiles')
# Adding model 'Revisi... | [
[
1,
0,
0.0139,
0.0069,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0208,
0.0069,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0278,
0.0069,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Deleting model 'RevisionFiles'\n db.delete_table('protocol_revisionfiles')\n\n # Adding ... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'RevisionFiles'
db.create_table('protocol_revisionfiles', (
('id', self.gf('dja... | [
[
1,
0,
0.0152,
0.0076,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0227,
0.0076,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0303,
0.0076,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'RevisionFiles'\n db.create_table('protocol_revisionfiles', (\n ('id', ... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Protocol.path'
db.add_column('protocol_protocol', 'path', self.gf('django.db.models.fields... | [
[
1,
0,
0.0328,
0.0164,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0492,
0.0164,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0656,
0.0164,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding field 'Protocol.path'\n db.add_column('protocol_protocol', 'path', self.gf('django.db.mo... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ProtocolEvent'
db.create_table('protocol_protocolevent', (
('id', self.gf('dja... | [
[
1,
0,
0.0179,
0.0089,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0268,
0.0089,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0357,
0.0089,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'ProtocolEvent'\n db.create_table('protocol_protocolevent', (\n ('id', ... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'ProtocolEvent'
db.delete_table('protocol_protocolevent')
# Deleting model 'Prot... | [
[
1,
0,
0.0101,
0.005,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0151,
0.005,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0201,
0.005,
0,
0.66,... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Deleting model 'ProtocolEvent'\n db.delete_table('protocol_protocolevent')\n\n # Deletin... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'Revision', fields ['version', 'year']
db.create_unique('protocol_revision',... | [
[
1,
0,
0.0159,
0.0079,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0238,
0.0079,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0317,
0.0079,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding unique constraint on 'Revision', fields ['version', 'year']\n db.create_unique('protocol... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'Revision', fields ['version', 'year']
db.delete_unique('protocol_revision... | [
[
1,
0,
0.0141,
0.007,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0211,
0.007,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0282,
0.007,
0,
0.66,... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Removing unique constraint on 'Revision', fields ['version', 'year']\n db.delete_unique('protoc... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Committee'
db.create_table('protocol_committee', (
('id', self.gf('django.db.m... | [
[
1,
0,
0.0238,
0.0119,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0357,
0.0119,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0476,
0.0119,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'Committee'\n db.create_table('protocol_committee', (\n ('id', self.gf(... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding M2M table for field researchers on 'Protocol'
db.create_table('protocol_protocol_researchers', (
... | [
[
1,
0,
0.0144,
0.0072,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0216,
0.0072,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0288,
0.0072,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding M2M table for field researchers on 'Protocol'\n db.create_table('protocol_protocol_resea... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Revision.user'
db.delete_column('protocol_revision', 'user_id')
# Adding field ... | [
[
1,
0,
0.0144,
0.0072,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0216,
0.0072,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0288,
0.0072,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Deleting field 'Revision.user'\n db.delete_column('protocol_revision', 'user_id')\n\n # ... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'RevisionFile.name'
db.delete_column('protocol_revisionfile', 'name')
# Adding f... | [
[
1,
0,
0.0152,
0.0076,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0227,
0.0076,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0303,
0.0076,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Deleting field 'RevisionFile.name'\n db.delete_column('protocol_revisionfile', 'name')\n\n ... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Protocol.protocol_status'
db.alter_column('protocol_protocol', 'protocol_status', self.g... | [
[
1,
0,
0.0364,
0.0182,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0545,
0.0182,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0727,
0.0182,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Changing field 'Protocol.protocol_status'\n db.alter_column('protocol_protocol', 'protocol_stat... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ProtocolRevisionName'
db.create_table('protocol_protocolrevisionname', (
('id'... | [
[
1,
0,
0.0143,
0.0071,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0214,
0.0071,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0286,
0.0071,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'ProtocolRevisionName'\n db.create_table('protocol_protocolrevisionname', (\n ... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'Event'
db.delete_table('protocol_event')
# Adding field 'Protocol.investigator'... | [
[
1,
0,
0.0143,
0.0071,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0214,
0.0071,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0286,
0.0071,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Deleting model 'Event'\n db.delete_table('protocol_event')\n\n # Adding field 'Protocol.... |
# Create your views here.
| [] | [] |
from protocol.models import Committee, Institution, Protocol, Revision, RevisionName, RevisionFile
from django.contrib import admin
from reversion.admin import VersionAdmin
class CommitteeAdmin(VersionAdmin):
"""Add Documentation"""
class InstitutionAdmin(VersionAdmin):
"""Add Documentation"""
class Protocol... | [
[
1,
0,
0.0217,
0.0217,
0,
0.66,
0,
902,
0,
6,
0,
0,
902,
0,
0
],
[
1,
0,
0.0435,
0.0217,
0,
0.66,
0.0714,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.0652,
0.0217,
0,
... | [
"from protocol.models import Committee, Institution, Protocol, Revision, RevisionName, RevisionFile",
"from django.contrib import admin",
"from reversion.admin import VersionAdmin",
"class CommitteeAdmin(VersionAdmin):\n \"\"\"Add Documentation\"\"\"",
" \"\"\"Add Documentation\"\"\"",
"class Instit... |
from django.db import models
from common.models import AccessionModel
from django.contrib.auth.models import User
# Create your models here.
class Lab(AccessionModel):
"""
TODO:
- add restriction to only allow one lab at a time!
"""
PATH_DEFAULT = "{{ obj.name }}"
PATH_TYPE_DEFAULT = Acces... | [
[
1,
0,
0.0278,
0.0278,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0556,
0.0278,
0,
0.66,
0.25,
379,
0,
1,
0,
0,
379,
0,
0
],
[
1,
0,
0.0833,
0.0278,
0,
0.66... | [
"from django.db import models",
"from common.models import AccessionModel",
"from django.contrib.auth.models import User",
"class Lab(AccessionModel):\n \"\"\"\n TODO:\n - add restriction to only allow one lab at a time!\n \"\"\"\n \n PATH_DEFAULT = \"{{ obj.name }}\"\n PATH_TYPE_DEFAULT ... |
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
... | [
[
8,
0,
0.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
0,
0.66... | [
"\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_a... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'Lab', fields ['name']
db.create_unique('lab_lab', ['name'])
def backw... | [
[
1,
0,
0.0274,
0.0137,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0411,
0.0137,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0548,
0.0137,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding unique constraint on 'Lab', fields ['name']\n db.create_unique('lab_lab', ['name'])",
... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Lab'
db.create_table('lab_lab', (
('id', self.gf('django.db.models.fields.Auto... | [
[
1,
0,
0.0606,
0.0303,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0909,
0.0303,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.1212,
0.0303,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'Lab'\n db.create_table('lab_lab', (\n ('id', self.gf('django.db.models... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Lab.path'
db.add_column('lab_lab', 'path', self.gf('django.db.models.fields.FilePathField'... | [
[
1,
0,
0.0541,
0.027,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0811,
0.027,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.1081,
0.027,
0,
0.66,... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding field 'Lab.path'\n db.add_column('lab_lab', 'path', self.gf('django.db.models.fields.Fil... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Researcher'
db.create_table('lab_researcher', (
('id', self.gf('django.db.mode... | [
[
1,
0,
0.0238,
0.0119,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0357,
0.0119,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0476,
0.0119,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'Researcher'\n db.create_table('lab_researcher', (\n ('id', self.gf('dj... |
# Create your views here.
| [] | [] |
from lab.models import Lab, Researcher
from django.contrib import admin
from reversion.admin import VersionAdmin
class LabAdmin(VersionAdmin):
"""Add Documentation"""
class ResearcherAdmin(VersionAdmin):
"""Add Documentation"""
admin.site.register(Lab, LabAdmin)
admin.site.register(Researcher, ResearcherAdm... | [
[
1,
0,
0.0769,
0.0769,
0,
0.66,
0,
454,
0,
2,
0,
0,
454,
0,
0
],
[
1,
0,
0.1538,
0.0769,
0,
0.66,
0.1667,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.2308,
0.0769,
0,
... | [
"from lab.models import Lab, Researcher",
"from django.contrib import admin",
"from reversion.admin import VersionAdmin",
"class LabAdmin(VersionAdmin):\n \"\"\"Add Documentation\"\"\"",
" \"\"\"Add Documentation\"\"\"",
"class ResearcherAdmin(VersionAdmin):\n \"\"\"Add Documentation\"\"\"",
" ... |
from django.conf.urls.defaults import *
import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
# Testing django databrowse
from django.contrib import databrowse
from django.contrib.admin.views.decorators import staff_member_required
from lab.models im... | [
[
1,
0,
0.0192,
0.0192,
0,
0.66,
0,
341,
0,
1,
0,
0,
341,
0,
0
],
[
1,
0,
0.0385,
0.0192,
0,
0.66,
0.0345,
168,
0,
1,
0,
0,
168,
0,
0
],
[
1,
0,
0.0962,
0.0192,
0,
... | [
"from django.conf.urls.defaults import *",
"import settings",
"from django.contrib import admin",
"admin.autodiscover()",
"from django.contrib import databrowse",
"from django.contrib.admin.views.decorators import staff_member_required",
"from lab.models import Lab, Researcher",
"from protocol.models ... |
from django.db import models
from common.models import AccessionModel
from protocol.models import Protocol
from lab.models import Researcher
import django.contrib.localflavor.us.models as us_models
from django.core.files.storage import FileSystemStorage
from settings import FILE_DB_ROOT
class Experiment(AccessionModel... | [
[
1,
0,
0.0053,
0.0053,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0107,
0.0053,
0,
0.66,
0.05,
379,
0,
1,
0,
0,
379,
0,
0
],
[
1,
0,
0.016,
0.0053,
0,
0.66,... | [
"from django.db import models",
"from common.models import AccessionModel",
"from protocol.models import Protocol",
"from lab.models import Researcher",
"import django.contrib.localflavor.us.models as us_models",
"from django.core.files.storage import FileSystemStorage",
"from settings import FILE_DB_RO... |
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
... | [
[
8,
0,
0.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
0,
0.66... | [
"\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_a... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Contact.active_date'
db.add_column('experiment_contact', 'active_date', self.gf('django.db... | [
[
1,
0,
0.0104,
0.0052,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0155,
0.0052,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0207,
0.0052,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding field 'Contact.active_date'\n db.add_column('experiment_contact', 'active_date', self.gf... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'SubjectSession.copy_consent'
db.add_column('experiment_subjectsession', 'copy_consent', se... | [
[
1,
0,
0.0108,
0.0054,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0162,
0.0054,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0216,
0.0054,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding field 'SubjectSession.copy_consent'\n db.add_column('experiment_subjectsession', 'copy_c... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'SubjectSessionFile'
db.create_table('experiment_subjectsessionfile', (
('id', ... | [
[
1,
0,
0.0084,
0.0042,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0126,
0.0042,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0168,
0.0042,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'SubjectSessionFile'\n db.create_table('experiment_subjectsessionfile', (\n ... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Experiment.project_leader'
db.add_column('experiment_experiment', 'project_leader', self.g... | [
[
1,
0,
0.0102,
0.0051,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0153,
0.0051,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0204,
0.0051,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding field 'Experiment.project_leader'\n db.add_column('experiment_experiment', 'project_lead... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'SubjectSession.time_tested'
db.add_column('experiment_subjectsession', 'time_tested', self... | [
[
1,
0,
0.0104,
0.0052,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0156,
0.0052,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0208,
0.0052,
0,
0.... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding field 'SubjectSession.time_tested'\n db.add_column('experiment_subjectsession', 'time_te... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'CompensationSource'
db.create_table('experiment_compensationsource', (
('id', ... | [
[
1,
0,
0.01,
0.005,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0149,
0.005,
0,
0.66,
0.25,
545,
0,
1,
0,
0,
545,
0,
0
],
[
1,
0,
0.0199,
0.005,
0,
0.66,
... | [
"import datetime",
"from south.db import db",
"from south.v2 import SchemaMigration",
"from django.db import models",
"class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'CompensationSource'\n db.create_table('experiment_compensationsource', (\n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.