code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
"""
Utilities for creating dot output from a MachOGraph
XXX: need to rewrite this based on altgraph.Dot
"""
from collections import deque
try:
from itertools import imap
except ImportError:
imap = map
__all__ = ['itergraphreport']
def itergraphreport(nodes, describe_edge, name='G'):
edges = deque()
... | Python |
"""
Generic dylib path manipulation
"""
import re
__all__ = ['dylib_info']
_DYLIB_RE = re.compile(r"""(?x)
(?P<location>^.*)(?:^|/)
(?P<name>
(?P<shortname>\w+?)
(?:\.(?P<version>[^._]+))?
(?:_(?P<suffix>[^._]+))?
\.dylib$
)
""")
def dylib_info(filename):
"""
A dylib name can take one of the... | Python |
import os
import sys
import stat
import operator
import struct
import shutil
from macholib import mach_o
MAGIC = [
struct.pack('!L', getattr(mach_o, 'MH_' + _))
for _ in ['MAGIC', 'CIGAM', 'MAGIC_64', 'CIGAM_64']
]
FAT_MAGIC_BYTES = struct.pack('!L', mach_o.FAT_MAGIC)
MAGIC_LEN = 4
STRIPCMD = ['/usr/bin/strip... | Python |
"""
Other than changing the load commands in such a way that they do not
contain the load command itself, this is largely a by-hand conversion
of the C headers. Hopefully everything in here should be at least as
obvious as the C headers, and you should be using the C headers as a real
reference because the documentati... | Python |
"""
dyld emulation
"""
from itertools import chain
import os, sys
from macholib.framework import framework_info
from macholib.dylib import dylib_info
__all__ = [
'dyld_find', 'framework_find',
'framework_info', 'dylib_info',
]
# These are the defaults as per man dyld(1)
#
_DEFAULT_FRAMEWORK_FALLBACK = [
... | Python |
"""
Enough Mach-O to make your head spin.
See the relevant header files in /usr/include/mach-o
And also Apple's documentation.
"""
__version__ = '1.4.3'
| Python |
"""
Internal helpers for basic commandline tools
"""
from __future__ import print_function, absolute_import
import os
import sys
from macholib.util import is_platform_file
def check_file(fp, path, callback):
if not os.path.exists(path):
print('%s: %s: No such file or directory' % (sys.argv[0], path), file... | Python |
"""
This module defines packable types, that is types than can be easily converted to a binary format
as used in MachO headers.
"""
import struct
import sys
try:
from itertools import izip, imap
except ImportError:
izip, imap = zip, map
from itertools import chain, starmap
import warnings
__all__ = """
sizeof... | Python |
"""
Generic framework path manipulation
"""
import re
__all__ = ['framework_info']
_STRICT_FRAMEWORK_RE = re.compile(r"""(?x)
(?P<location>^.*)(?:^|/)
(?P<name>
(?P<shortname>[-_A-Za-z0-9]+).framework/
(?:Versions/(?P<version>[^/]+)/)?
(?P=shortname)
(?:_(?P<suffix>[^_]+))?
)$
""")
def framework_inf... | Python |
# -*- coding: latin-1 -*-
"""pefile, Portable Executable reader module
All the PE file basic structures are available with their default names
as attributes of the instance returned.
Processed elements such as the import table are made available with lowercase
names, to differentiate them from the upper case basic s... | Python |
#! /usr/bin/env python
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 1999, 2002 McMillan Enterprises, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; ei... | Python |
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 1999, 2002 McMillan Enterprises, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the... | Python |
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 1999, 2002 McMillan Enterprises, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the... | Python |
# for older Pythons, we need to set up for the import of cPickle
import string
import copy_reg
import win32com.client.gencache
x = win32com.client.gencache.EnsureDispatch('ADOR.Recordset')
print x
x = None
#raw_input("Press any key to continue...")
| Python |
# Animated Towers of Hanoi using Tk with optional bitmap file in
# background.
#
# Usage: tkhanoi [n [bitmapfile]]
#
# n is the number of pieces to animate; default is 4, maximum 15.
#
# The bitmap file can be any X11 bitmap file (look in
# /usr/include/X11/bitmaps for samples); it is displayed as the
# background of t... | Python |
#!/usr/bin/env python
# Copyright (C) 2011, Hartmut Goebel
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 1999, 2002 McMillan Enterprises, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published... | Python |
#!/usr/bin/env python
# Team 4067 64-bit Java Disable Tool - Disable 64-bit Java to enable SmartDashboard to run!
# Copyright (C) 2013 River Hill HS Robotics Team (Albert H.)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published... | Python |
#!/usr/bin/env python
# Team 4067 Qt UI to Python Batch Converter - convert all .ui files to .py!
# Copyright (C) 2013 River Hill HS Robotics Team (Albert H.)
#
# 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 ... | Python |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'InitialNotice.ui'
#
# Created: Sat Jan 19 21:47:32 2013
# by: PyQt4 UI code generator 4.9.6
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromU... | Python |
#!/usr/bin/env python
# Team 4067 FRC Tools Installer - easy installer for FRC Tools
# Copyright (C) 2013 River Hill HS Robotics Team (Albert H.)
#
# 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... | Python |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MainWindow.ui'
#
# Created: Sat Jan 19 21:47:33 2013
# by: PyQt4 UI code generator 4.9.6
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8... | Python |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created: Sat Jan 19 21:47:34 2013
# by: The Resource Compiler for PyQt (Qt v4.8.4)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x00\x71\x85\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00... | Python |
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it w... | Python |
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it w... | Python |
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it w... | Python |
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it w... | Python |
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | Python |
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it w... | Python |
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it w... | Python |
#!/usr/bin/env python
# Team 4067 FRC Tools Installer - easy installer for FRC Tools
# Copyright (C) 2013 River Hill HS Robotics Team (Albert H.)
#
# 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... | Python |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Options.ui'
#
# Created: Sat Jan 19 21:47:35 2013
# by: PyQt4 UI code generator 4.9.6
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
e... | Python |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'LicenseAgreements.ui'
#
# Created: Sat Jan 19 21:47:33 2013
# by: PyQt4 UI code generator 4.9.6
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.f... | Python |
#!/usr/bin/env python
# Team 4067 FRC Tools Installer - easy installer for FRC Tools
# Copyright (C) 2013 River Hill HS Robotics Team (Albert H.)
#
# 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... | 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 law or agreed to in writing, ... | Python |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Adapted for freedmark by Kevin Read
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provide... | Python |
#!/usr/bin/python
# vim: set fileencoding=utf-8 :
# Mandelbrot shader test for freedmark.
# Created by Jonas Wagner, adapted for Geforce FX shader length restrictions by Kevin Read
# Original header:
###########################################################################
# ... | Python |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Adapted for freedmark by Kevin Read
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provide... | Python |
#!/usr/bin/python
# vim: set fileencoding=utf-8 :
# Mandelbrot shader test for freedmark.
# Created by Jonas Wagner, adapted for Geforce FX shader length restrictions by Kevin Read
# Original header:
###########################################################################
# ... | Python |
#!/usr/bin/env python
#
# Copyright 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 o... | Python |
import os
# 1. Go to:
# https://code.google.com/apis/console
# 2. select choose your project.
# 3. Choose 'API Access'
# 4. If you have not generated a client id, do so.
# 5. Make your callback:
# http://localhost:8080
CLIENT_ID = "YOUR_CLIENT_ID"
CLIENT_SECRET = "YOUR_CLIENT_SECRET"
API_KEY = "YOUR_API_KEY"
DI... | Python |
import os
# 1. Go to:
# https://code.google.com/apis/console
# 2. select choose your project.
# 3. Choose 'API Access'
# 4. If you have not generated a client id, do so.
# 5. Make your callback:
# http://localhost:8080
CLIENT_ID = None
CLIENT_SECRET = None
API_KEY = None
| Python |
# 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... | Python |
#!/usr/bin/env python
#
# plot-timeline.py - A simple program to plot timelines based on a Linux strace(1) log.
# Copyright (C) 2007 Federico Mena-Quintero, Johan Dahlin
#
# 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 ... | Python |
#!/usr/bin/env python
#
# plot-timeline.py - A simple program to plot timelines based on a Linux strace(1) log.
# Copyright (C) 2007 Federico Mena-Quintero, Johan Dahlin
#
# 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 ... | Python |
#!/usr/bin/env python
#
# plot-timeline.py - A simple program to plot timelines based on a Linux strace(1) log.
# Copyright (C) 2007 Federico Mena-Quintero, Johan Dahlin
#
# 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 ... | Python |
#!/usr/bin/env python
#
# plot-timeline.py - A simple program to plot timelines based on a Linux strace(1) log.
# Copyright (C) 2007 Federico Mena-Quintero, Johan Dahlin
#
# 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 ... | Python |
#!/usr/bin/env python
#
# plot-timeline.py - A simple program to plot timelines based on a Linux strace(1) log.
# Copyright (C) 2007 Federico Mena-Quintero, Johan Dahlin
#
# 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 ... | Python |
#!/usr/bin/env python
#
# plot-timeline.py - A simple program to plot timelines based on a Linux strace(1) log.
# Copyright (C) 2007 Federico Mena-Quintero, Johan Dahlin
#
# 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 ... | Python |
# -*- coding: utf-8 -*-
# PLEASE LEAVE THIS LINE ALONE
from core.herbarium import Herbarium
"""
Fill this with your own code, simplified.
An example structure could be:
h = Herbarium(source="list.fhb", create=["species","family","main"], structure="default", language="en")
h.make()
The options can ... | Python |
# -*- coding: utf-8 -*-
"""
This file is part of Free Herbarium.
Free Herbarium is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later ... | Python |
"""ok""" | Python |
# -*- coding: utf-8 -*-
"""
This file is part of Free Herbarium.
Free Herbarium is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later ... | Python |
"""ok""" | Python |
# -*- coding: utf-8 -*-
"""
This file is part of Free Herbarium.
Free Herbarium is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later ... | Python |
#!/usr/bin/env python
"""
tesshelper.py -- Utility operations to compare, report stats, and copy
public headers for tesseract 3.0x VS2008 Project
$RCSfile: tesshelper.py,v $ $Revision: 7ca575b377aa $ $Date: 2012/03/07 17:26:31 $
"""
r"""
Requires:
python 2.7 or greater: activestate.co... | Python |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2012 Zdenko Podobný
# Author: Zdenko Podobný
#
# 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/LIC... | Python |
# Django settings for #Freedom99 project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('root', 'c-x@email.cz'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', '' or 'oracle'.
DATABASE_NAME = 'db' # Or path to database file if using sqlit... | Python |
from django.db import models
#Waasxasx! | Python |
# Create your views here.
| Python |
#! /usr/bin/python
# -*- coding: UTF-8 -*-
from django.http import HttpResponse
from django.template import Context, loader
__author__="c-x"
__NAME__ = "index file for Freedom99 web portal"
__description__ = ""
__version__ = "0.0"
__contact__ = {
'email' : 'c-x@email.cz',
'jabber' : 'c-x@jabber.cz || ... | Python |
#!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ... | Python |
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/(.*)', admin.site.root), # Automaticky admin
(r'^static/(?P<path>.*)$', 'dja... | Python |
from django.db import models
class Article(models.Model):
title = models.CharField(max_length=200)
# author = models. blabla
date = models.DateTimeField("date")
text = models.TextField(max_length=200000)
public = models.BooleanField()
def __unicode__(self):
return self.title
class Comm... | Python |
from django.http import HttpResponse
from freedom99.articles.models import Article, Comment
from django.template import Context, loader
from django.http import Http404
from django.shortcuts import get_object_or_404
def list(request):
list = Article.objects.all()
templ = loader.get_template('articleList.html'... | Python |
from freedom99.articles.models import Article, Comment
from django.contrib import admin
admin.site.register(Article)
admin.site.register(Comment)
| Python |
__author__="c-x"
__date__ ="$6.8.2009 0:42:34$"
from setuptools import setup,find_packages
setup (
name = 'freedom99',
version = '0.1',
packages = find_packages(),
# Declare your packages' dependencies here, for eg:
install_requires=['foo>=3'],
# Fill in these to make your Egg ready for upload to
# Py... | Python |
#! /usr/bin/python
# -*- coding: UTF-8 -*-
from django.http import HttpResponse
from django.template import Context, loader
__author__="c-x"
__NAME__ = "index file for Freedom99 web portal"
__description__ = ""
__version__ = "0.0"
__contact__ = {
'email' : 'c-x@email.cz',
'jabber' : 'c-x@jabber.cz || ... | Python |
#!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ... | Python |
#!/usr/bin/python
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# ... | Python |
import os
import os.path
import getpass
import freebase
from freebase.api.session import MetawebError
passwordfile = "test/.password.txt"
def main(create_password_file=False):
USERNAME, PASSWORD = "", ""
if not os.path.isfile(passwordfile):
print "In order to run the tests, we need to use a vali... | Python |
import unittest
import os
import os.path
import freebase
import getlogindetails
def main():
created = False
passwordfile = "test/.password.txt"
# setup password stuff
if not os.path.isfile(passwordfile):
created = True
USERNAME, PASSWORD = getlogindetails.main(create_password_fi... | Python |
#!/usr/bin/python
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# ... | Python |
#========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# * Redistribution... | Python |
try:
from google.appengine.api import urlfetch
from cookie_handlers import CookiefulUrlfetch
except:
pass
try:
import httplib2
from cookie_handlers import CookiefulHttp
except:
pass
try:
import urllib2
import socket
except:
pass
import logging
import re
class Urllib2Client(object... | Python |
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# * Redistribution... | Python |
# ==================================================================
# Copyright (c) 2007, Metaweb Technologies, 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 s... | Python |
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# * Redistribution... | Python |
from session import HTTPMetawebSession, MetawebError, attrdict, LITERAL_TYPE_IDS
from mqlkey import quotekey, unquotekey | Python |
from freebase.api.session import HTTPMetawebSession
from freebase.api.session import get_key_namespace, LITERAL_TYPE_IDS
"""
NOTE
----
graph is used freely in this file. Some information:
- It refers to an internal representation of a group of types.
- It resembles a mqlread result, but it is not a mqlread result
... | Python |
#!/usr/bin/python
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# ... | Python |
from optparse import OptionParser
import getpass
import sys
from freebase.api import HTTPMetawebSession
from freebase.schema import dump_base, dump_type, restore
try:
import jsonlib2 as json
except ImportError:
try:
import simplejson as json
except ImportError:
import json
def fb_save_ba... | Python |
# ==================================================================
# Copyright (c) 2007,2008,2009 Metaweb Technologies, 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:
# * Redistribut... | Python |
#!/usr/bin/env python
# ==================================================================
# Copyright (c) 2007,2008,2009 Metaweb Technologies, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are me... | Python |
# ==================================================================
# Copyright (c) 2007,2008,2009 Metaweb Technologies, 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:
# * Redistribut... | Python |
# ==================================================================
# Copyright (c) 2007,2008,2009 Metaweb Technologies, 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:
# * Redistribut... | Python |
#!/usr/bin/env python
# ==================================================================
# Copyright (c) 2007,2008,2009 Metaweb Technologies, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are me... | Python |
# ==================================================================
# Copyright (c) 2007,2008,2009 Metaweb Technologies, 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:
# * Redistribut... | Python |
#!/usr/bin/python
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# ... | Python |
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# * Redistribution... | Python |
import sys
from freebase.api.session import HTTPMetawebSession
import sandbox
__all__ = ["HTTPMetawebSession", "sandbox"]
_base = HTTPMetawebSession("freebase.com")
# we want to add base's functions to __init__.py
# so that we can say freebase.func() and really
# just call base.func()
# a little trick to refer to ... | Python |
#
# rison for python (parser only so far)
# see http://mjtemplate.org/examples/rison.html for more info
#
######################################################################
#
# the rison parser is based on javascript openlaszlo-json:
# Author: Oliver Steele
# Copyright: Copyright 2006 Oliver Steele. All... | Python |
#!/usr/bin/python
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# ... | Python |
#!/usr/bin/python
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# ... | Python |
import cgi
import os
from google.appengine.api import users
from google.appengine.api import urlfetch
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
import freebase
class Search(db.... | Python |
try:
from google.appengine.api import urlfetch
from cookie_handlers import CookiefulUrlfetch
except:
pass
try:
import httplib2
from cookie_handlers import CookiefulHttp
except:
pass
try:
import urllib2
import socket
except:
pass
import logging
import re
class Urllib2Client(object... | Python |
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# * Redistribution... | Python |
# ==================================================================
# Copyright (c) 2007, Metaweb Technologies, 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 s... | Python |
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# * Redistribution... | Python |
from session import HTTPMetawebSession, MetawebError, attrdict
from mqlkey import quotekey, unquotekey
| Python |
#!/usr/bin/python
# ========================================================================
# Copyright (c) 2007, Metaweb Technologies, 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:
# ... | 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.