code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
""" 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__ = '[email protected] (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__ = '[email protected] (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__ = '[email protected] (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__ = '[email protected] (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__ = '[email protected] (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__ = '[email protected] (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__ = '[email protected] (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__ = '[email protected] (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__ = '[email protected] (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__ = '[email protected] (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__ = '[email protected] (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__ = '[email protected] (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__ = '[email protected] (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 ([email protected])" __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 ([email protected])\"", "__copyright__ = \"Copyright 2006, Joe Gregorio\"", "__contributors__ = []", "__version__ = \"1.0.0\"", "__license__ = \"MIT\"", "__history__ = \"\"\"\n\"\"\"", "import urlparse", "escape_...
#!/usr/bin/python import os import sys import threading from jobutil import * __author__="qingkaishi" __date__ ="$Apr 21, 2014 9:45:11 AM$" alljobs = [] alljobslock = threading.Lock() def parse_job_files(group): jobs = [] for item in group: if item[0].endswith('.json'): job = ApsaraJob.pa...
[ [ 1, 0, 0.0202, 0.0101, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0303, 0.0101, 0, 0.66, 0.0833, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0404, 0.0101, 0, ...
[ "import os", "import sys", "import threading", "from jobutil import *", "__author__=\"qingkaishi\"", "__date__ =\"$Apr 21, 2014 9:45:11 AM$\"", "alljobs = []", "alljobslock = threading.Lock()", "def parse_job_files(group):\n jobs = []\n for item in group:\n if item[0].endswith('.json'):...
#!/usr/bin/python import os import sys import threading from jobutil import * __author__="qingkaishi" __date__ ="$Apr 21, 2014 9:45:11 AM$" alljobs = [] alljobslock = threading.Lock() def parse_job_files(group): jobs = [] for item in group: if item[0].endswith('.json'): job = ApsaraJob.pa...
[ [ 1, 0, 0.0202, 0.0101, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0303, 0.0101, 0, 0.66, 0.0833, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0404, 0.0101, 0, ...
[ "import os", "import sys", "import threading", "from jobutil import *", "__author__=\"qingkaishi\"", "__date__ =\"$Apr 21, 2014 9:45:11 AM$\"", "alljobs = []", "alljobslock = threading.Lock()", "def parse_job_files(group):\n jobs = []\n for item in group:\n if item[0].endswith('.json'):...
#!/usr/bin/python import cairo, gobject, gtk, gtk.gdk, gtk.glade, os, pygtk, re, sys, thread BRUSHES_ZOOM = 0.5 DOWN_KEY = 65364 INITIAL_ZOOM = 0.5 LEFT_KEY = 65361 LEVEL_WIDTH = 100 LEVEL_HEIGHT = 100 MAX_ZOOM = 4 MIN_ZOOM = 0.25 RIGHT_KEY = 65363 SCROLL_STEP = 64 SETTINGS_DIR = os.getenv("HOME") + '/.abb_editor' L...
[ [ 1, 0, 0.008, 0.0027, 0, 0.66, 0, 747, 0, 10, 0, 0, 747, 0, 0 ], [ 14, 0, 0.0159, 0.0027, 0, 0.66, 0.0526, 826, 1, 0, 0, 0, 0, 2, 0 ], [ 14, 0, 0.0186, 0.0027, 0, ...
[ "import cairo, gobject, gtk, gtk.gdk, gtk.glade, os, pygtk, re, sys, thread", "BRUSHES_ZOOM = 0.5", "DOWN_KEY = 65364", "INITIAL_ZOOM = 0.5", "LEFT_KEY = 65361", "LEVEL_WIDTH = 100", "LEVEL_HEIGHT = 100", "MAX_ZOOM = 4", "MIN_ZOOM = 0.25", "RIGHT_KEY = 65363", "SCROLL_STEP = 64", "SETTINGS_DIR...
#!/usr/bin/python import cairo, gobject, gtk, gtk.gdk, gtk.glade, os, pygtk, re, sys, thread BRUSHES_ZOOM = 0.5 DOWN_KEY = 65364 INITIAL_ZOOM = 0.5 LEFT_KEY = 65361 LEVEL_WIDTH = 100 LEVEL_HEIGHT = 100 MAX_ZOOM = 4 MIN_ZOOM = 0.25 RIGHT_KEY = 65363 SCROLL_STEP = 64 SETTINGS_DIR = os.getenv("HOME") + '/.abb_editor' L...
[ [ 1, 0, 0.008, 0.0027, 0, 0.66, 0, 747, 0, 10, 0, 0, 747, 0, 0 ], [ 14, 0, 0.0159, 0.0027, 0, 0.66, 0.0526, 826, 1, 0, 0, 0, 0, 2, 0 ], [ 14, 0, 0.0186, 0.0027, 0, ...
[ "import cairo, gobject, gtk, gtk.gdk, gtk.glade, os, pygtk, re, sys, thread", "BRUSHES_ZOOM = 0.5", "DOWN_KEY = 65364", "INITIAL_ZOOM = 0.5", "LEFT_KEY = 65361", "LEVEL_WIDTH = 100", "LEVEL_HEIGHT = 100", "MAX_ZOOM = 4", "MIN_ZOOM = 0.25", "RIGHT_KEY = 65363", "SCROLL_STEP = 64", "SETTINGS_DIR...
#! /usr/bin/python import random import sys import roslib; roslib.load_manifest("hrl_object_fetching") import rospy import actionlib from pr2_overhead_grasping.msg import * #from pr2_playpen.srv import * from hrl_lib.keyboard_input import KeyboardInput from pr2_overhead_grasping.helpers import log from tabletop_objec...
[ [ 1, 0, 0.0146, 0.0073, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0219, 0.0073, 0, 0.66, 0.0833, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0365, 0.0073, 0, ...
[ "import random", "import sys", "import roslib; roslib.load_manifest(\"hrl_object_fetching\")", "import roslib; roslib.load_manifest(\"hrl_object_fetching\")", "import rospy", "import actionlib", "from pr2_overhead_grasping.msg import *", "from hrl_lib.keyboard_input import KeyboardInput", "from pr2_...
#! /usr/bin/python import numpy as np, math import scipy.io as spio import roslib; roslib.load_manifest('hrl_object_fetching') import rospy import hrl_lib.util as hrl_util from std_msgs.msg import Float64MultiArray, Bool from pr2_msgs.msg import AccelerometerState, PressureState from sensor_msgs.msg import JointState f...
[ [ 1, 0, 0.0328, 0.0164, 0, 0.66, 0, 954, 0, 2, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0492, 0.0164, 0, 0.66, 0.0323, 670, 0, 1, 0, 0, 670, 0, 0 ], [ 1, 0, 0.0656, 0.0164, 0, ...
[ "import numpy as np, math", "import scipy.io as spio", "import roslib; roslib.load_manifest('hrl_object_fetching')", "import roslib; roslib.load_manifest('hrl_object_fetching')", "import rospy", "import hrl_lib.util as hrl_util", "from std_msgs.msg import Float64MultiArray, Bool", "from pr2_msgs.msg i...
#! /usr/bin/python import numpy as np, math import scipy.io as spio import roslib; roslib.load_manifest('hrl_object_fetching') import rospy import hrl_lib.util as hrl_util from std_msgs.msg import Float64MultiArray, Bool from pr2_msgs.msg import AccelerometerState, PressureState from sensor_msgs.msg import JointState f...
[ [ 1, 0, 0.0426, 0.0213, 0, 0.66, 0, 954, 0, 2, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0638, 0.0213, 0, 0.66, 0.05, 670, 0, 1, 0, 0, 670, 0, 0 ], [ 1, 0, 0.0851, 0.0213, 0, 0....
[ "import numpy as np, math", "import scipy.io as spio", "import roslib; roslib.load_manifest('hrl_object_fetching')", "import roslib; roslib.load_manifest('hrl_object_fetching')", "import rospy", "import hrl_lib.util as hrl_util", "from std_msgs.msg import Float64MultiArray, Bool", "from pr2_msgs.msg i...
#! /usr/bin/python import roslib roslib.load_manifest('hrl_trajectory_playback') import rospy import actionlib import trajectory_msgs.msg as tm import pr2_controllers_msgs.msg as pm import hrl_lib.util as hrl_util #from hrl_pr2_lib.pr2 import PR2, Joint from hrl_trajectory_playback.srv import TrajPlaybackSrv, TrajPlay...
[ [ 1, 0, 0.0127, 0.0063, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.019, 0.0063, 0, 0.66, 0.0833, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0253, 0.0063, 0, 0.6...
[ "import roslib", "roslib.load_manifest('hrl_trajectory_playback')", "import rospy", "import actionlib", "import trajectory_msgs.msg as tm", "import pr2_controllers_msgs.msg as pm", "import hrl_lib.util as hrl_util", "from hrl_trajectory_playback.srv import TrajPlaybackSrv, TrajPlaybackSrvRequest", "...
#! /usr/bin/python import roslib roslib.load_manifest('hrl_trajectory_playback') import rospy import hrl_lib.util as hrl_util from sensor_msgs.msg import JointState from collections import deque # fast appends import numpy as np, math # Hack (this code currently only supports the right arm!) JOINT_NAMES = ['%s_shoul...
[ [ 1, 0, 0.0235, 0.0118, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0353, 0.0118, 0, 0.66, 0.1111, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0471, 0.0118, 0, 0....
[ "import roslib", "roslib.load_manifest('hrl_trajectory_playback')", "import rospy", "import hrl_lib.util as hrl_util", "from sensor_msgs.msg import JointState", "from collections import deque # fast appends", "import numpy as np, math", "JOINT_NAMES = ['%s_shoulder_pan_joint', '%s_shoulder_lift_joint'...
__all__ = [ 'playback', 'record' ]
[ [ 14, 0, 0.625, 1, 0, 0.66, 0, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "__all__ = [\n'playback',\n'record'\n]" ]
import scipy.optimize as so import math, numpy as np import pylab as pl import sys, optparse, time import copy from enthought.mayavi import mlab #import util as ut import roslib; roslib.load_manifest('doors_forces_kinematics') roslib.load_manifest('epc_core') import cody_arms.arms as ca #import mekabot.coord_frame...
[ [ 1, 0, 0.0017, 0.0009, 0, 0.66, 0, 359, 0, 1, 0, 0, 359, 0, 0 ], [ 1, 0, 0.0035, 0.0009, 0, 0.66, 0.0333, 526, 0, 2, 0, 0, 526, 0, 0 ], [ 1, 0, 0.0044, 0.0009, 0, ...
[ "import scipy.optimize as so", "import math, numpy as np", "import pylab as pl", "import sys, optparse, time", "import copy", "from enthought.mayavi import mlab", "import roslib; roslib.load_manifest('doors_forces_kinematics')", "import roslib; roslib.load_manifest('doors_forces_kinematics')", "rosl...
import scipy.optimize as so import matplotlib.pyplot as pp import matplotlib_util.util as mpu import numpy as np, math import sys, os, time sys.path.append(os.environ['HRLBASEPATH']+'/src/projects/modeling_forces/handheld_hook') import ram_db as rd import mechanism_analyse_RAM as mar import mechanism_analyse_advait as...
[ [ 1, 0, 0.0035, 0.0018, 0, 0.66, 0, 359, 0, 1, 0, 0, 359, 0, 0 ], [ 1, 0, 0.0053, 0.0018, 0, 0.66, 0.0357, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 1, 0, 0.007, 0.0018, 0, 0...
[ "import scipy.optimize as so", "import matplotlib.pyplot as pp", "import matplotlib_util.util as mpu", "import numpy as np, math", "import sys, os, time", "sys.path.append(os.environ['HRLBASEPATH']+'/src/projects/modeling_forces/handheld_hook')", "import ram_db as rd", "import mechanism_analyse_RAM as...
#! /usr/bin/python import roslib; roslib.load_manifest('hrl_pr2_lib') import rospy import tf.transformations as tr import hrl_lib.tf_utils as tfu import hrl_lib.util as ut import tf import geometry_msgs.msg as gm import sys import math import numpy as np import actionlib import hrl_pr2_lib.msg as hm class MoveBase: ...
[ [ 1, 0, 0.0093, 0.0047, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0093, 0.0047, 0, 0.66, 0.0714, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.014, 0.0047, 0, 0.6...
[ "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import rospy", "import tf.transformations as tr", "import hrl_lib.tf_utils as tfu", "import hrl_lib.util as ut", "import tf", "import geometry_msgs.msg as gm", "import sys", "import math", ...
import sensor_msgs.msg as sm import pr2_arm_navigation_perception.srv as snp #import tf #import tf.msg import rospy import numpy as np import hrl_lib.rutils as ru ## # Converts a list of pr2_msgs/PressureState into a matrix # # @return left mat, right mat, array def pressure_state_to_mat(contact_msgs): times = n...
[ [ 1, 0, 0.0317, 0.0159, 0, 0.66, 0, 531, 0, 1, 0, 0, 531, 0, 0 ], [ 1, 0, 0.0476, 0.0159, 0, 0.66, 0.125, 326, 0, 1, 0, 0, 326, 0, 0 ], [ 1, 0, 0.0952, 0.0159, 0, 0...
[ "import sensor_msgs.msg as sm", "import pr2_arm_navigation_perception.srv as snp", "import rospy", "import numpy as np", "import hrl_lib.rutils as ru", "def pressure_state_to_mat(contact_msgs):\n times = np.array([c.header.stamp.to_time() for c in contact_msgs])\n left, right = zip(*[[list(c.l_finge...
# # Temoprarily in this package. Advait needs to move it to a better # location. # import numpy as np, math import copy import roslib; roslib.load_manifest('hrl_pr2_lib') import rospy import hrl_lib.util as ut ## Class defining the core EPC function and a few simple examples. # More complex behaviors that use EPC ...
[ [ 1, 0, 0.0343, 0.0049, 0, 0.66, 0, 954, 0, 2, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0392, 0.0049, 0, 0.66, 0.1429, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.049, 0.0049, 0, 0...
[ "import numpy as np, math", "import copy", "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import rospy", "import hrl_lib.util as ut", "class EPC():\n def __init__(self, robot):\n self.robot = robot\n self.f_list = []\n ...
#! /usr/bin/python import roslib roslib.load_manifest("rospy") roslib.load_manifest("sensor_msgs") import rospy from sensor_msgs.msg import PointCloud2 class Poller: def __init__(self): self.ind = 0 def callback(self,msg): self.ind += 1 node_name = 'kinect_poller' rospy.init_node(node_name) p...
[ [ 1, 0, 0.0741, 0.037, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.1111, 0.037, 0, 0.66, 0.0667, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 0.1481, 0.037, 0, 0.66,...
[ "import roslib", "roslib.load_manifest(\"rospy\")", "roslib.load_manifest(\"sensor_msgs\")", "import rospy", "from sensor_msgs.msg import PointCloud2", "class Poller:\n def __init__(self):\n self.ind = 0\n def callback(self,msg):\n self.ind += 1", " def __init__(self):\n se...
import roslib; roslib.load_manifest('hrl_pr2_lib') import rospy import numpy as np import pr2_msgs.msg as pm class PressureListener: def __init__(self, topic='/pressure/l_gripper_motor', safe_pressure_threshold = 4000): rospy.Subscriber(topic, pm.PressureState, self.press_cb) self.lmat = None ...
[ [ 1, 0, 0.0141, 0.0141, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0141, 0.0141, 0, 0.66, 0.2, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0282, 0.0141, 0, 0.66,...
[ "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import rospy", "import numpy as np", "import pr2_msgs.msg as pm", "class PressureListener:\n def __init__(self, topic='/pressure/l_gripper_motor', safe_pressure_threshold = 4000):\n rospy...
import roslib; roslib.load_manifest('hrl_pr2_lib') import rospy import pr2_gripper_reactive_approach.reactive_grasp as rgr import pr2_gripper_reactive_approach.controller_manager as con import object_manipulator.convert_functions as cf from actionlib_msgs.msg import GoalStatus from geometry_msgs.msg import Pose, Pose...
[ [ 1, 0, 0.0019, 0.0019, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0019, 0.0019, 0, 0.66, 0.05, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0038, 0.0019, 0, 0.66...
[ "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import rospy", "import pr2_gripper_reactive_approach.reactive_grasp as rgr", "import pr2_gripper_reactive_approach.controller_manager as con", "import object_manipulator.convert_functions as cf", ...
import numpy as np, math import copy from threading import RLock import roslib; roslib.load_manifest('hrl_pr2_lib') roslib.load_manifest('equilibrium_point_control') import rospy from equilibrium_point_control.msg import MechanismKinematicsRot from equilibrium_point_control.msg import MechanismKinematicsJac from equ...
[ [ 1, 0, 0.0055, 0.0028, 0, 0.66, 0, 954, 0, 2, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0083, 0.0028, 0, 0.66, 0.0667, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.011, 0.0028, 0, 0...
[ "import numpy as np, math", "import copy", "from threading import RLock", "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import roslib; roslib.load_manifest('hrl_pr2_lib')", "roslib.load_manifest('equilibrium_point_control')", "import rospy", "from equilibrium_point_control.msg import Mechanis...
#!/usr/bin/python import roslib; roslib.load_manifest("pr2_laser_pointer_grasp") import rospy import copy from std_msgs.msg import Bool, Float64 from pr2_msgs.msg import PressureState from pr2_laser_pointer_grasp.srv import GripperMonitor from numpy import sqrt def loginfo(str): rospy.loginfo("PressureMonitor: " ...
[ [ 1, 0, 0.023, 0.0115, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.023, 0.0115, 0, 0.66, 0.0909, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0345, 0.0115, 0, 0.66...
[ "import roslib; roslib.load_manifest(\"pr2_laser_pointer_grasp\")", "import roslib; roslib.load_manifest(\"pr2_laser_pointer_grasp\")", "import rospy", "import copy", "from std_msgs.msg import Bool, Float64", "from pr2_msgs.msg import PressureState", "from pr2_laser_pointer_grasp.srv import GripperMonit...
#!/usr/bin/python import roslib; roslib.load_manifest('hrl_pr2_lib') import rospy import math from geometry_msgs.msg import WrenchStamped, PoseStamped, Point, PointStamped from tf import TransformListener, transformations from visualization_msgs.msg import Marker class Pointmass_Adjust: pub_marker = True #Set...
[ [ 1, 0, 0.0288, 0.0096, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0288, 0.0096, 0, 0.66, 0.125, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0385, 0.0096, 0, 0.6...
[ "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import rospy", "import math", "from geometry_msgs.msg import WrenchStamped, PoseStamped, Point, PointStamped", "from tf import TransformListener, transformations", "from visualization_msgs.msg im...
#! /usr/bin/python import roslib; roslib.load_manifest('hrl_pr2_lib') import rospy import sensor_msgs.msg as sm # import planning_environment_msgs.srv as psrv import arm_navigation_msgs.srv as psrv import numpy as np import time import hrl_pr2_lib.msg as hmsg class CollisionClient: def __init__(self, arm): ...
[ [ 1, 0, 0.0106, 0.0053, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0106, 0.0053, 0, 0.66, 0.0833, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0159, 0.0053, 0, 0....
[ "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import rospy", "import sensor_msgs.msg as sm", "import arm_navigation_msgs.srv as psrv", "import numpy as np", "import time", "import hrl_pr2_lib.msg as hmsg", "class CollisionClient:\n de...
# Copyright (c) 2008, Willow Garage, 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 list of co...
[ [ 1, 0, 0.0574, 0.002, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0594, 0.002, 0, 0.66, 0.0476, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.0614, 0.002, 0, 0.6...
[ "import numpy as np", "import itertools as it", "import functools as ft", "import time", "class Dataset:\n def __init__(self, inputs, outputs):\n \"\"\"\n inputs coded as numpy array, column vectors\n outputs also as numpy array, column vectors\n \"\"\"\n self.i...
#from sound_play.libsoundplay import SoundClient import hrl_lib.tf_utils as tfu from std_msgs.msg import String import rospy import tf import subprocess as sb import numpy as np import geometry_msgs.msg as gms import os class LaserPointerClient: def __init__(self, target_frame='/base_link', tf_listener=None): ...
[ [ 1, 0, 0.0323, 0.0161, 0, 0.66, 0, 5, 0, 1, 0, 0, 5, 0, 0 ], [ 1, 0, 0.0484, 0.0161, 0, 0.66, 0.125, 366, 0, 1, 0, 0, 366, 0, 0 ], [ 1, 0, 0.0645, 0.0161, 0, 0.66,...
[ "import hrl_lib.tf_utils as tfu", "from std_msgs.msg import String", "import rospy", "import tf", "import subprocess as sb", "import numpy as np", "import geometry_msgs.msg as gms", "import os", "class LaserPointerClient:\n\n def __init__(self, target_frame='/base_link', tf_listener=None):\n ...
# Copyright (c) 2008, Willow Garage, 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 list of co...
[ [ 1, 0, 0.0512, 0.0018, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.053, 0.0018, 0, 0.66, 0.0667, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0548, 0.0018, 0, 0...
[ "import os", "import sys", "import camera as cam", "import re", "import time", "import random_forest as rf", "import cv", "import util as ut", "from laser_detector import *", "def count_down(times=3):\n for i in range(times):\n print('in ', times - i)\n time.sleep(1)", " for ...
# Copyright (c) 2008, Willow Garage, 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 list of co...
[ [ 1, 0, 0.4462, 0.0154, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.5462, 0.1231, 0, 0.66, 0.2, 171, 0, 2, 1, 0, 0, 0, 5 ], [ 4, 1, 0.5154, 0.0308, 1, 0.83,...
[ "import numpy as np", "def pca_gain_threshold(s, percentage_change_threshold=.15):\n if s.__class__ != np.ndarray:\n raise ValueError('Need ndarray as input.') \n shifted = np.concatenate((s[1:].copy(), np.array([s[-1]])), axis=1)\n diff = s - shifted\n percent_diff = diff / s\n ...
from pkg import * import cv import laser_interface.blob as blob class CombineMasks: def __init__(self, sample_image, channels=1): self.combined = cv.CreateImage(cv.GetSize(sample_image), 8 , channels) def combine(self, images): cv.Set(self.combined, 1) for img in images: cv...
[ [ 1, 0, 0.0095, 0.0095, 0, 0.66, 0, 489, 0, 1, 0, 0, 489, 0, 0 ], [ 1, 0, 0.019, 0.0095, 0, 0.66, 0.125, 492, 0, 1, 0, 0, 492, 0, 0 ], [ 1, 0, 0.0286, 0.0095, 0, 0....
[ "from pkg import *", "import cv", "import laser_interface.blob as blob", "class CombineMasks:\n def __init__(self, sample_image, channels=1):\n self.combined = cv.CreateImage(cv.GetSize(sample_image), 8 , channels)\n\n def combine(self, images):\n cv.Set(self.combined, 1)\n for img ...
# Copyright (c) 2008, Willow Garage, 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 list of co...
[ [ 1, 0, 0.1813, 0.0058, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.1871, 0.0058, 0, 0.66, 0.25, 848, 0, 1, 0, 0, 848, 0, 0 ], [ 2, 0, 0.2018, 0.0117, 0, 0....
[ "import numpy as np", "import pickle as pk", "def list_mat_to_mat(list_mat, axis=0):\n\treturn np.concatenate(tuple(list_mat), axis=axis)", "\treturn np.concatenate(tuple(list_mat), axis=axis)", "def load_pickle(filename):\n p = open(filename, 'r')\n picklelicious = pk.load(p)\n p.close()\n retu...
# Copyright (c) 2008, Willow Garage, 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 list of co...
[ [ 1, 0, 0.7297, 0.027, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.7568, 0.027, 0, 0.66, 0.1111, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.7838, 0.027, 0, 0.66,...
[ "import roslib", "roslib.load_manifest('laser_interface')", "import rospy", "CURSOR_TOPIC = 'cursor3d'", "VIZ_TOPIC = 'viz_cursor_3d'", "MOUSE_CLICK_TOPIC = 'mouse_click'", "MOUSE_R_CLICK_TOPIC = 'mouse_r_click'", "MOUSE_DOUBLE_CLICK_TOPIC = 'mouse_left_double_click'", "MOUSE_R_DOUBLE_C...
from pkg import * from geometry_msgs.msg import Point import sys class Echo: def echo(self, point): print 'x y z', point.x, point.y, point.z rospy.Publisher(CURSOR_TOPIC, Point, Echo().echo) rospy.init_node('cursor3d_listener') rospy.spin()
[ [ 1, 0, 0.0625, 0.0625, 0, 0.66, 0, 489, 0, 1, 0, 0, 489, 0, 0 ], [ 1, 0, 0.125, 0.0625, 0, 0.66, 0.1667, 951, 0, 1, 0, 0, 951, 0, 0 ], [ 1, 0, 0.1875, 0.0625, 0, 0...
[ "from pkg import *", "from geometry_msgs.msg import Point", "import sys", "class Echo:\n def echo(self, point):\n print('x y z', point.x, point.y, point.z)", " def echo(self, point):\n print('x y z', point.x, point.y, point.z)", " print('x y z', point.x, point.y, point.z)", "r...
# Copyright (c) 2008, Willow Garage, 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 list of co...
[ [ 1, 0, 0.1172, 0.0037, 0, 0.66, 0, 489, 0, 1, 0, 0, 489, 0, 0 ], [ 1, 0, 0.1245, 0.0037, 0, 0.66, 0.04, 492, 0, 1, 0, 0, 492, 0, 0 ], [ 1, 0, 0.1282, 0.0037, 0, 0....
[ "from pkg import *", "import cv", "import numpy as np", "from sensor_msgs.msg import CameraInfo", "import util as ut", "import math as m", "import time", "def homo_transform3d(R, t):\n T = np.matrix(np.zeros((4,4)))\n T[0:3, 0:3] = R\n T[0:3, 3] = t\n T[3,3] = 1.0\n return T", ...
# Copyright (c) 2008, Willow Garage, 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 list of co...
[ [ 1, 0, 0.1078, 0.0037, 0, 0.66, 0, 489, 0, 1, 0, 0, 489, 0, 0 ], [ 1, 0, 0.1115, 0.0037, 0, 0.66, 0.0714, 366, 0, 1, 0, 0, 366, 0, 0 ], [ 1, 0, 0.1152, 0.0037, 0, ...
[ "from pkg import *", "from std_msgs.msg import Position", "from std_msgs.msg import BaseVel", "from std_msgs.msg import RobotBase2DOdom", "import sys", "import numpy as np", "import nodes as n", "import camera as cam", "import math", "from pyrob.voice import say", "from StringIO import StringIO"...
import roslib roslib.load_manifest('laser_interface') import laser_interface.camera as cam from laser_interface.laser_detector import * import rospy import cv stereo_camera = '/wide_stereo' image_type = 'image_rect_color' coi = 1 stereo = cam.ROSStereoListener([stereo_camera + '/left/' + image_type, stereo_camera +...
[ [ 1, 0, 0.02, 0.02, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.04, 0.02, 0, 0.66, 0.0455, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.06, 0.02, 0, 0.66, 0.09...
[ "import roslib", "roslib.load_manifest('laser_interface')", "import laser_interface.camera as cam", "from laser_interface.laser_detector import *", "import rospy", "import cv", "stereo_camera = '/wide_stereo'", "image_type = 'image_rect_color'", "coi = 1", "stereo = cam.ROSStereoListener([stereo...
# Copyright (c) 2008, Willow Garage, 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 list of co...
[ [ 1, 0, 0.7297, 0.027, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.7568, 0.027, 0, 0.66, 0.1111, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.7838, 0.027, 0, 0.66,...
[ "import roslib", "roslib.load_manifest('laser_interface')", "import rospy", "CURSOR_TOPIC = 'cursor3d'", "VIZ_TOPIC = 'viz_cursor_3d'", "MOUSE_CLICK_TOPIC = 'mouse_click'", "MOUSE_R_CLICK_TOPIC = 'mouse_r_click'", "MOUSE_DOUBLE_CLICK_TOPIC = 'mouse_left_double_click'", "MOUSE_R_DOUBLE_C...
#!/usr/bin/env python # Copyright (c) 2008, Willow Garage, 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 # n...
[ [ 1, 0, 0.1734, 0.0058, 0, 0.66, 0, 489, 0, 1, 0, 0, 489, 0, 0 ], [ 1, 0, 0.1792, 0.0058, 0, 0.66, 0.1, 366, 0, 1, 0, 0, 366, 0, 0 ], [ 1, 0, 0.185, 0.0058, 0, 0.66...
[ "from pkg import *", "from std_msgs.msg import String", "import wx, time, sys", "def key_to_command(key):\n ret = None\n\n if key == u'g':\n ret = 'debug'\n\n if key == u'd':\n ret = 'display'", " ret = None", " if key == u'g':\n ret = 'debug'", " ret = 'debug'...
#!/usr/bin/python # # Copyright (c) 2010, Georgia Tech Research Corporation # 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 #...
[ [ 1, 0, 0.3444, 0.0111, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.3444, 0.0111, 0, 0.66, 0.0714, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.3667, 0.0111, 0, 0....
[ "import roslib; roslib.load_manifest('pr2_clutter_helper')", "import roslib; roslib.load_manifest('pr2_clutter_helper')", "import rospy", "from sensor_msgs.msg import PointCloud", "import cv #version 2.1 expected", "from cv_bridge import CvBridge", "import time #sleep", "from random import * #randint"...
#!/usr/bin/python # # Copyright (c) 2010, Georgia Tech Research Corporation # 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 #...
[ [ 8, 0, 0.3367, 0.0306, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3571, 0.0102, 0, 0.66, 0.0625, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.3571, 0.0102, 0, 0.66...
[ "\"\"\"\nGrab data from topic <given> of generic <type>.\n\"\"\"", "import roslib; roslib.load_manifest('pr2_clutter_helper')", "import roslib; roslib.load_manifest('pr2_clutter_helper')", "import rospy", "from sensor_msgs.msg import PointCloud", "import cv #version 2.1 expected", "from cv_bridge import...
#!/usr/bin/python # # Copyright (c) 2010, Georgia Tech Research Corporation # 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 #...
[ [ 1, 0, 0.2041, 0.0068, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.2041, 0.0068, 0, 0.66, 0.0833, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.2109, 0.0068, 0, 0....
[ "import roslib; roslib.load_manifest('pr2_clutter_helper')", "import roslib; roslib.load_manifest('pr2_clutter_helper')", "from sensor_msgs.msg import CameraInfo", "import sys", "import rospy", "from pr2_lcs_helper.srv import * #Get four .srv definitions", "''' Usage: topic_name = None for default topic...
#!/usr/bin/python # # Copyright (c) 2010, Georgia Tech Research Corporation # 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 #...
[ [ 1, 0, 0.3614, 0.012, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.3614, 0.012, 0, 0.66, 0.0769, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.3855, 0.012, 0, 0.66,...
[ "import roslib; roslib.load_manifest('pr2_clutter_helper')", "import roslib; roslib.load_manifest('pr2_clutter_helper')", "import rospy", "from sensor_msgs.msg import PointCloud", "import cv #version 2.1 expected", "from cv_bridge import CvBridge", "import time #sleep", "from random import * #randint"...
#!/usr/bin/python # # Copyright (c) 2010, Georgia Tech Research Corporation # 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 #...
[ [ 1, 0, 0.2123, 0.0068, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.2123, 0.0068, 0, 0.66, 0.0714, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.2192, 0.0068, 0, 0....
[ "import roslib; roslib.load_manifest('pr2_clutter_helper')", "import roslib; roslib.load_manifest('pr2_clutter_helper')", "from pr2_lcs_helper.srv import *", "import rospy", "from std_msgs.msg import String", "from sensor_msgs.msg import PointCloud", "from sensor_msgs.msg import ChannelFloat32", "from...
#!/usr/bin/python # # Copyright (c) 2010, Georgia Tech Research Corporation # 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 #...
[ [ 1, 0, 0.0233, 0.0233, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0233, 0.0233, 0, 0.66, 0.1, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0465, 0.0233, 0, 0.66,...
[ "import roslib; roslib.load_manifest('pr2_clutter_helper')", "import roslib; roslib.load_manifest('pr2_clutter_helper')", "from pr2_lcs_helper.srv import * #specifically, get CameraInfo.srv\"", "from sensor_msgs.msg import CameraInfo, PointCloud, Image", "from tf.msg import tfMessage", "import sys", "im...
#!/usr/bin/python # # Copyright (c) 2010, Georgia Tech Research Corporation # 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 #...
[ [ 1, 0, 0.3409, 0.0114, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.3409, 0.0114, 0, 0.66, 0.0909, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.3636, 0.0114, 0, 0....
[ "import roslib; roslib.load_manifest('pr2_clutter_helper')", "import roslib; roslib.load_manifest('pr2_clutter_helper')", "import rospy", "from sensor_msgs.msg import Image as msgImage", "import cv #version 2.1 expected", "from cv_bridge import CvBridge", "import time #sleep", "from random import * #r...
import roslib; roslib.load_manifest('face_reinterpret') from sensor_msgs.msg import PointCloud from visualization_msgs.msg import Marker import rospy class FaceBox: def __init__(self): rospy.Subscriber('/face_detector/faces_cloud', PointCloud, self.callback) self.box_pub = rospy.Publisher('/face_de...
[ [ 1, 0, 0.0263, 0.0263, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0263, 0.0263, 0, 0.66, 0.1667, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0526, 0.0263, 0, 0....
[ "import roslib; roslib.load_manifest('face_reinterpret')", "import roslib; roslib.load_manifest('face_reinterpret')", "from sensor_msgs.msg import PointCloud", "from visualization_msgs.msg import Marker", "import rospy", "class FaceBox:\n def __init__(self):\n rospy.Subscriber('/face_detector/fa...
#!/usr/bin/python import roslib roslib.load_manifest( 'robotis' ) import rospy import robotis.lib_robotis as rs import time import math if __name__ == '__main__': rospy.logout( 'pr2_ears_stow_startup: Stowing RFID Ears Servos' ) rospy.logout( 'pr2_ears_stow_startup: Connecting to servos' ) dyn_left ...
[ [ 1, 0, 0.0811, 0.027, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.1081, 0.027, 0, 0.66, 0.1667, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.1351, 0.027, 0, 0.66,...
[ "import roslib", "roslib.load_manifest( 'robotis' )", "import rospy", "import robotis.lib_robotis as rs", "import time", "import math", "if __name__ == '__main__':\n rospy.logout( 'pr2_ears_stow_startup: Stowing RFID Ears Servos' )\n \n rospy.logout( 'pr2_ears_stow_startup: Connecting to servos...
## # Representation of a dataset, operations that can be performed on it, and quantities that can be calculated from it import numpy as np import copy class Dataset: ## # inputs coded as numpy array, column vectors # outputs also as numpy array, column vectors def __init__(self, inputs, outputs): ...
[ [ 1, 0, 0.0196, 0.0065, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0261, 0.0065, 0, 0.66, 0.1111, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 3, 0, 0.1373, 0.2026, 0, ...
[ "import numpy as np", "import copy", "class Dataset:\n\n ## \n # inputs coded as numpy array, column vectors\n # outputs also as numpy array, column vectors\n def __init__(self, inputs, outputs):\n self.inputs = inputs\n self.outputs = outputs", " def __init__(self, inputs, ou...
## @author Hai Nguyen/[email protected] import roslib; roslib.load_manifest('ml_lib') import numpy as np import itertools as it import functools as ft import time import dataset as ds ## # Base class for random forest classifier # class RFBase: ## # @param dataset Dataset object # @param number_of_dimension...
[ [ 1, 0, 0.0039, 0.002, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0039, 0.002, 0, 0.66, 0.0476, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0079, 0.002, 0, 0.66,...
[ "import roslib; roslib.load_manifest('ml_lib')", "import roslib; roslib.load_manifest('ml_lib')", "import numpy as np", "import itertools as it", "import functools as ft", "import time", "import dataset as ds", "class RFBase:\n\n ##\n # @param dataset Dataset object\n # @param number_of_dimen...
## @author Hai Nguyen/[email protected] import roslib roslib.load_manifest('ml_lib') import numpy as np import dataset as ds import hrl_lib.util as ut def pca_gain_threshold(s, percentage_change_threshold=.15): if s.__class__ != np.ndarray: raise ValueError('Need ndarray as input.') shifted = np.co...
[ [ 1, 0, 0.0183, 0.0092, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0275, 0.0092, 0, 0.66, 0.0909, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0459, 0.0092, 0, 0....
[ "import roslib", "roslib.load_manifest('ml_lib')", "import numpy as np", "import dataset as ds", "import hrl_lib.util as ut", "def pca_gain_threshold(s, percentage_change_threshold=.15):\n if s.__class__ != np.ndarray:\n raise ValueError('Need ndarray as input.') \n shifted = np.concaten...
## # Taken from http://opencv.willowgarage.com/wiki/PythonInterface # import roslib roslib.load_manifest('hrl_opencv') import cv import Image #PIL import numpy as np def pil2cv(pi): cv_im = cv.CreateImageHeader(pi.size, cv.IPL_DEPTH_8U, 1) cv.SetData(cv_im, pi.tostring()) return cv_im def cv2pil(cv_im): ...
[ [ 1, 0, 0.0519, 0.013, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0649, 0.013, 0, 0.66, 0.1111, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0779, 0.013, 0, 0.66,...
[ "import roslib", "roslib.load_manifest('hrl_opencv')", "import cv", "import Image #PIL", "import numpy as np", "def pil2cv(pi):\n cv_im = cv.CreateImageHeader(pi.size, cv.IPL_DEPTH_8U, 1)\n cv.SetData(cv_im, pi.tostring())\n return cv_im", " cv_im = cv.CreateImageHeader(pi.size, cv.IPL_DEPTH...
import roslib roslib.load_manifest('hrl_opencv') import cv def print_mat(m): for j in range(m.height): for i in range(m.width): print m[j,i], ' ', print '' ##Display a list of OpenCV images tiled across the screen #with maximum width of max_x and maximum height of max_y # @param save_...
[ [ 1, 0, 0.0227, 0.0227, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0455, 0.0227, 0, 0.66, 0.25, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0682, 0.0227, 0, 0.66...
[ "import roslib", "roslib.load_manifest('hrl_opencv')", "import cv", "def print_mat(m):\n for j in range(m.height):\n for i in range(m.width):\n print(m[j,i], ' ',)\n print('')", " for j in range(m.height):\n for i in range(m.width):\n print(m[j,i], ' ',)\n ...
import roslib roslib.load_manifest('hrl_opencv') #from sensor_msgs.msg import Image as RosImage from std_msgs.msg import UInt8MultiArray from std_msgs.msg import MultiArrayLayout from std_msgs.msg import MultiArrayDimension import opencv as cv import opencv.highgui as hg import opencv.adaptors as ad import Image as pi...
[ [ 1, 0, 0.0047, 0.0047, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0094, 0.0047, 0, 0.66, 0.0417, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0188, 0.0047, 0, 0....
[ "import roslib", "roslib.load_manifest('hrl_opencv')", "from std_msgs.msg import UInt8MultiArray", "from std_msgs.msg import MultiArrayLayout", "from std_msgs.msg import MultiArrayDimension", "import opencv as cv", "import opencv.highgui as hg", "import opencv.adaptors as ad", "import Image as pil",...
#!/usr/bin/env python import roslib roslib.load_manifest( 'rospy' ) roslib.load_manifest( 'std_msgs' ) import rospy from std_msgs.msg import Float64, Int8 import numpy as np rospy.init_node( 'move_joint_node' ) topic = 'r_shoulder_pan_controller/command' topic = 'r_forearm_roll_controller/command' pub = rospy.Pu...
[ [ 1, 0, 0.0667, 0.0222, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0889, 0.0222, 0, 0.66, 0.0714, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 0.1111, 0.0222, 0, 0....
[ "import roslib", "roslib.load_manifest( 'rospy' )", "roslib.load_manifest( 'std_msgs' )", "import rospy", "from std_msgs.msg import Float64, Int8", "import numpy as np", "rospy.init_node( 'move_joint_node' )", "topic = 'r_shoulder_pan_controller/command'", "topic = 'r_forearm_roll_controller/command...
#!/usr/bin/env python import roslib roslib.load_manifest( 'rospy' ) roslib.load_manifest( 'rospy' ) roslib.load_manifest( 'kinematics_msgs' ) roslib.load_manifest( 'geometry_msgs' ) import rospy from kinematics_msgs.srv import \ GetPositionIK, GetPositionIKRequest from geometry_msgs.msg import \ Pose, Point, ...
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 1, 0, 0.2, 0.1, 0, 0.66, 0.2, 164, 0, 1, 0, 0, 164, 0, 0 ], [ 1, 0, 0.35, 0.2, 0, 0.66, 0.4, 2...
[ "import roslib", "import rospy", "from kinematics_msgs.srv import \\\n GetPositionIK, GetPositionIKRequest", "from geometry_msgs.msg import \\\n Pose, Point, Quaternion", "import numpy as np", "import dynamics_utils as dynutils" ]
#!/usr/bin/python from scipy import pi, sin, cos, array, asarray, linspace, zeros, ones, sqrt import matplotlib.pyplot as plt import roslib roslib.load_manifest( 'pr2_controllers_msgs' ) roslib.load_manifest( 'trajectory_msgs' ) roslib.load_manifest( 'actionlib' ) import rospy from pr2_controllers_msgs.msg import J...
[ [ 1, 0, 0.0221, 0.0074, 0, 0.66, 0, 265, 0, 9, 0, 0, 265, 0, 0 ], [ 1, 0, 0.0294, 0.0074, 0, 0.66, 0.0909, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 1, 0, 0.0441, 0.0074, 0, ...
[ "from scipy import pi, sin, cos, array, asarray, linspace, zeros, ones, sqrt", "import matplotlib.pyplot as plt", "import roslib", "roslib.load_manifest( 'pr2_controllers_msgs' )", "roslib.load_manifest( 'trajectory_msgs' )", "roslib.load_manifest( 'actionlib' )", "import rospy", "from pr2_controllers...
#!/usr/bin/env python import matplotlib matplotlib.interactive( True ) matplotlib.use( 'WXAgg' ) import numpy as np import wx import sys import roslib roslib.load_manifest( 'rospy' ) roslib.load_manifest( 'sensor_msgs' ) roslib.load_manifest( 'std_msgs' ) import rospy from sensor_msgs.msg import JointState from st...
[ [ 1, 0, 0.0102, 0.0034, 0, 0.66, 0, 75, 0, 1, 0, 0, 75, 0, 0 ], [ 8, 0, 0.0137, 0.0034, 0, 0.66, 0.05, 348, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 0.0171, 0.0034, 0, 0.66, ...
[ "import matplotlib", "matplotlib.interactive( True )", "matplotlib.use( 'WXAgg' )", "import numpy as np", "import wx", "import sys", "import roslib", "roslib.load_manifest( 'rospy' )", "roslib.load_manifest( 'sensor_msgs' )", "roslib.load_manifest( 'std_msgs' )", "import rospy", "from sensor_m...
import roslib roslib.load_manifest( 'rospy' ) roslib.load_manifest( 'rosparam' ) roslib.load_manifest( 'actionlib' ) roslib.load_manifest( 'trajectory_msgs' ) roslib.load_manifest( 'pr2_controllers_msgs' ) import rospy import rosparam import csv from actionlib import \ SimpleActionClient from trajectory_msgs.ms...
[ [ 1, 0, 0.0056, 0.0056, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0111, 0.0056, 0, 0.66, 0.0417, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 0.0167, 0.0056, 0, 0....
[ "import roslib", "roslib.load_manifest( 'rospy' )", "roslib.load_manifest( 'rosparam' )", "roslib.load_manifest( 'actionlib' )", "roslib.load_manifest( 'trajectory_msgs' )", "roslib.load_manifest( 'pr2_controllers_msgs' )", "import rospy", "import rosparam", "import csv", "from actionlib import \\...
#!/usr/bin/env python import roslib roslib.load_manifest( 'rospy' ) import rospy import sys import numpy as np import dynamics_utils as dynutils if __name__== '__main__': if ( len( sys.argv ) != 2 ): rospy.logerr( 'no filename passed to play_motion.py' ) exit(-1) fname = sys.argv[1]; ...
[ [ 1, 0, 0.0492, 0.0164, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0656, 0.0164, 0, 0.66, 0.1667, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0984, 0.0164, 0, 0....
[ "import roslib", "roslib.load_manifest( 'rospy' )", "import rospy", "import sys", "import numpy as np", "import dynamics_utils as dynutils", "if __name__== '__main__':\n\n if ( len( sys.argv ) != 2 ):\n rospy.logerr( 'no filename passed to play_motion.py' )\n exit(-1)\n \n fname =...
#!/usr/bin/env python """ Provides tools to compute root mean squared error for each joint in JointTrajectoryControllerState messages, either on-line by listening to a speciefied topic - or offline by reading a bag file.""" import numpy as np import sys import roslib roslib.load_manifest( 'gpr_controller' ) import r...
[ [ 8, 0, 0.0395, 0.0132, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0658, 0.0132, 0, 0.66, 0.0909, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0789, 0.0132, 0, 0.66...
[ "\"\"\" Provides tools to compute root mean squared error for each joint in JointTrajectoryControllerState messages, either on-line by listening to a speciefied topic - or offline by reading a bag file.\"\"\"", "import numpy as np", "import sys", "import roslib", "roslib.load_manifest( 'gpr_controller' )", ...
#!/usr/bin/env python import roslib roslib.load_manifest( 'rospy' ) import rospy roslib.load_manifest( 'rosbag' ) import rosbag import numpy as np import csv import sys def read_file( fname, topic ): bag = rosbag.Bag( fname ) time = rospy.Time.from_sec(0.0) msgs = [] for topic, msg, t in bag.read_mess...
[ [ 1, 0, 0.0357, 0.0119, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.0476, 0.0119, 0, 0.66, 0.0357, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0595, 0.0119, 0, 0....
[ "import roslib", "roslib.load_manifest( 'rospy' )", "import rospy", "roslib.load_manifest( 'rosbag' )", "import rosbag", "import numpy as np", "import csv", "import sys", "def read_file( fname, topic ):\n bag = rosbag.Bag( fname )\n time = rospy.Time.from_sec(0.0)\n msgs = []\n for topic...
#!/usr/bin/env python from xml.dom import minidom arm_joint_names = ['lr_shoulder_pan_joint', 'lr_shoulder_lift_joint', 'lr_upper_arm_roll_joint', 'lr_elbow_flex_joint', 'lr_forearm_roll_joint', 'lr_wrist_flex_joint', ...
[ [ 1, 0, 0.03, 0.01, 0, 0.66, 0, 290, 0, 1, 0, 0, 290, 0, 0 ], [ 14, 0, 0.08, 0.07, 0, 0.66, 0.0714, 661, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.13, 0.01, 0, 0.66, 0....
[ "from xml.dom import minidom", "arm_joint_names = ['lr_shoulder_pan_joint',\n 'lr_shoulder_lift_joint',\n 'lr_upper_arm_roll_joint',\n 'lr_elbow_flex_joint',\n 'lr_forearm_roll_joint',\n 'lr_wrist_flex_joint',\n ...
#!/usr/bin/env python import dynamics_utils as dynutils (name, time, pos, vel, acc) = dynutils.load_motion_ascii("/u/dhennes/Desktop/reaching.txt") dynutils.save_motion("../motions/reaching.pkl", name, time, pos, vel, acc)
[ [ 1, 0, 0.4286, 0.1429, 0, 0.66, 0, 318, 0, 1, 0, 0, 318, 0, 0 ], [ 14, 0, 0.8571, 0.1429, 0, 0.66, 0.5, 700, 3, 1, 0, 0, 301, 10, 1 ], [ 8, 0, 1, 0.1429, 0, 0.66, ...
[ "import dynamics_utils as dynutils", "(name, time, pos, vel, acc) = dynutils.load_motion_ascii(\"/u/dhennes/Desktop/reaching.txt\")", "dynutils.save_motion(\"../motions/reaching.pkl\", name, time, pos, vel, acc)" ]
#!/usr/bin/python from scipy import pi, sin, cos, array, asarray, linspace, zeros, ones, sqrt import matplotlib.pyplot as plt import roslib roslib.load_manifest( 'pr2_controllers_msgs' ) roslib.load_manifest( 'trajectory_msgs' ) roslib.load_manifest( 'actionlib' ) import rospy from pr2_controllers_msgs.msg import J...
[ [ 1, 0, 0.0221, 0.0074, 0, 0.66, 0, 265, 0, 9, 0, 0, 265, 0, 0 ], [ 1, 0, 0.0294, 0.0074, 0, 0.66, 0.0909, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 1, 0, 0.0441, 0.0074, 0, ...
[ "from scipy import pi, sin, cos, array, asarray, linspace, zeros, ones, sqrt", "import matplotlib.pyplot as plt", "import roslib", "roslib.load_manifest( 'pr2_controllers_msgs' )", "roslib.load_manifest( 'trajectory_msgs' )", "roslib.load_manifest( 'actionlib' )", "import rospy", "from pr2_controllers...
#!/usr/bin/env python import roslib roslib.load_manifest( 'rospy' ) roslib.load_manifest( 'kinematics_msgs' ) roslib.load_manifest( 'geometry_msgs' ) import rospy from kinematics_msgs.srv import \ GetPositionIK, GetPositionIKRequest from geometry_msgs.msg import \ Pose, Point, Quaternion import numpy as np i...
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 1, 0, 0.2, 0.1, 0, 0.66, 0.2, 164, 0, 1, 0, 0, 164, 0, 0 ], [ 1, 0, 0.35, 0.2, 0, 0.66, 0.4, 2...
[ "import roslib", "import rospy", "from kinematics_msgs.srv import \\\n GetPositionIK, GetPositionIKRequest", "from geometry_msgs.msg import \\\n Pose, Point, Quaternion", "import numpy as np", "import dynamics_utils as dynutils" ]
#!/usr/bin/env python import roslib roslib.load_manifest( 'rospy' ) roslib.load_manifest( 'rospy' ) roslib.load_manifest( 'kinematics_msgs' ) roslib.load_manifest( 'geometry_msgs' ) import rospy from kinematics_msgs.srv import \ GetPositionIK, GetPositionIKRequest from geometry_msgs.msg import \ Pose, Point, ...
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 1, 0, 0.1667, 0.0833, 0, 0.66, 0.2, 164, 0, 1, 0, 0, 164, 0, 0 ], [ 1, 0, 0.2917, 0.1667, 0, 0.6...
[ "import roslib", "import rospy", "from kinematics_msgs.srv import \\\n GetPositionIK, GetPositionIKRequest", "from geometry_msgs.msg import \\\n Pose, Point, Quaternion", "import numpy as np", "import dynamics_utils as dynutils" ]
#! /usr/bin/python import numpy as np import sys from collections import deque import roslib roslib.load_manifest('hrl_pr2_arms') roslib.load_manifest('ar_pose') roslib.load_manifest('visualization_msgs') roslib.load_manifest('pykdl_utils') import rospy import tf.transformations as tf_trans from geometry_msgs.msg im...
[ [ 1, 0, 0.0094, 0.0031, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0126, 0.0031, 0, 0.66, 0.0417, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0157, 0.0031, 0, ...
[ "import numpy as np", "import sys", "from collections import deque", "import roslib", "roslib.load_manifest('hrl_pr2_arms')", "roslib.load_manifest('ar_pose')", "roslib.load_manifest('visualization_msgs')", "roslib.load_manifest('pykdl_utils')", "import rospy", "import tf.transformations as tf_tra...
# -*- coding: utf-8 -*- # Resource object code # # Created: Sat Feb 11 08:02:58 2012 # by: The Resource Compiler for PyQt (Qt v4.6.2) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x05\x49\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x...
[ [ 1, 0, 0.0038, 0.0004, 0, 0.66, 0, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 14, 0, 0.4805, 0.9523, 0, 0.66, 0.1667, 131, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.9728, 0.0314, 0, ...
[ "from PyQt4 import QtCore", "qt_resource_data = \"\\\n\\x00\\x00\\x05\\x49\\\n\\x89\\\n\\x50\\x4e\\x47\\x0d\\x0a\\x1a\\x0a\\x00\\x00\\x00\\x0d\\x49\\x48\\x44\\x52\\x00\\\n\\x00\\x00\\x50\\x00\\x00\\x00\\x50\\x08\\x06\\x00\\x00\\x00\\x8e\\x11\\xf2\\xad\\\n\\x00\\x00\\x00\\x01\\x73\\x52\\x47\\x42\\x00\\xae\\xce\\x1...
#! /usr/bin/python import roslib; roslib.load_manifest('kelsey_sandbox') import rospy import roslib.message import rosbag import sys import rosservice from pr2_msgs.msg import AccelerometerState import scipy.io class AccelSaver: def __init__(self): self.data = [] self.first = True def proc_ac...
[ [ 1, 0, 0.075, 0.025, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.075, 0.025, 0, 0.66, 0.0909, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.1, 0.025, 0, 0.66, ...
[ "import roslib; roslib.load_manifest('kelsey_sandbox')", "import roslib; roslib.load_manifest('kelsey_sandbox')", "import rospy", "import roslib.message", "import rosbag", "import sys", "import rosservice", "from pr2_msgs.msg import AccelerometerState", "import scipy.io", "class AccelSaver:\n d...
####################################################################### # # USE pr2_object_manipulation/pr2_gripper_reactive_approach/controller_manager.py # That code has much of the ideas at the bottom, with more. # ####################################################################### # TODO Update code t...
[ [ 1, 0, 0.0151, 0.001, 0, 0.66, 0, 954, 0, 2, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0161, 0.001, 0, 0.66, 0.0312, 83, 0, 2, 0, 0, 83, 0, 0 ], [ 1, 0, 0.0171, 0.001, 0, 0.66,...
[ "import numpy as np, math", "from threading import RLock, Timer", "import sys", "import roslib; roslib.load_manifest('hrl_pr2_lib')", "import roslib; roslib.load_manifest('hrl_pr2_lib')", "roslib.load_manifest('force_torque') # hack by Advait", "import force_torque.FTClient as ftc", "import tf", "im...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'controller_gui.ui' # # Created: Thu Feb 2 04:31:00 2012 # by: PyQt4 UI code generator 4.7.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Frame(object): def setupUi(self, Frame)...
[ [ 1, 0, 0.1887, 0.0189, 0, 0.66, 0, 154, 0, 2, 0, 0, 154, 0, 0 ], [ 3, 0, 0.6038, 0.7736, 0, 0.66, 1, 206, 0, 2, 0, 0, 186, 0, 44 ], [ 2, 1, 0.5377, 0.6038, 1, 0.86...
[ "from PyQt4 import QtCore, QtGui", "class Ui_Frame(object):\n def setupUi(self, Frame):\n Frame.setObjectName(\"Frame\")\n Frame.resize(609, 289)\n Frame.setFrameShape(QtGui.QFrame.StyledPanel)\n Frame.setFrameShadow(QtGui.QFrame.Raised)\n self.start_button = QtGui.QPushButto...
#! /usr/bin/python import numpy as np import sys import roslib roslib.load_manifest('hrl_pr2_arms') import rospy import tf import tf.transformations as tf_trans from std_srvs.srv import Empty, EmptyResponse from hrl_generic_arms.ep_trajectory_controller import EPArmController from hrl_pr2_arms.pr2_arm import create...
[ [ 1, 0, 0.0652, 0.0217, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.087, 0.0217, 0, 0.66, 0.0714, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1304, 0.0217, 0, 0...
[ "import numpy as np", "import sys", "import roslib", "roslib.load_manifest('hrl_pr2_arms')", "import rospy", "import tf", "import tf.transformations as tf_trans", "from std_srvs.srv import Empty, EmptyResponse", "from hrl_generic_arms.ep_trajectory_controller import EPArmController", "from hrl_pr2...
## # Periodically logs the output of a callback function by calling it at a certain # rate and gathering up the results into a list class PeriodicLogger(): ## # initializes the logger but doesn't start it # # @param callback the function to be called each time # @param rate the rate in secon...
[ [ 3, 0, 0.199, 0.3613, 0, 0.66, 0, 422, 0, 5, 0, 0, 0, 0, 11 ], [ 2, 1, 0.0812, 0.0524, 1, 0.05, 0, 555, 0, 4, 0, 0, 0, 0, 0 ], [ 14, 2, 0.0628, 0.0052, 2, 0.8, ...
[ "class PeriodicLogger():\n ##\n # initializes the logger but doesn't start it\n #\n # @param callback the function to be called each time\n # @param rate the rate in seconds at which to call the callback\n # @param args the function arguments to pass into the callback\n def __init__(self, callb...
#! /usr/bin/python import sys from PyQt4 import QtCore, QtGui, uic import roslib roslib.load_manifest("rospy") import rospy from controller_gui import Ui_Frame as QTControllerGUIFrame from subprocess import Popen class ControllerGUIFrame(QtGui.QFrame): def __init__(self): super(ControllerGUIFrame, self)...
[ [ 1, 0, 0.0492, 0.0164, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0656, 0.0164, 0, 0.66, 0.1111, 154, 0, 3, 0, 0, 154, 0, 0 ], [ 1, 0, 0.082, 0.0164, 0, 0...
[ "import sys", "from PyQt4 import QtCore, QtGui, uic", "import roslib", "roslib.load_manifest(\"rospy\")", "import rospy", "from controller_gui import Ui_Frame as QTControllerGUIFrame", "from subprocess import Popen", "class ControllerGUIFrame(QtGui.QFrame):\n def __init__(self):\n super(Cont...
#! /usr/bin/python import roslib roslib.load_manifest('tf') roslib.load_manifest('rosparam') roslib.load_manifest('sensor_msgs') import rospy import rosparam import rosbag from sensor_msgs.msg import PointCloud2 from hrl_generic_arms.pose_converter import PoseConverter from kelsey_sandbox.msg import PHRIPointCloudCa...
[ [ 1, 0, 0.0435, 0.0145, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.058, 0.0145, 0, 0.66, 0.0833, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 0.0725, 0.0145, 0, 0.6...
[ "import roslib", "roslib.load_manifest('tf')", "roslib.load_manifest('rosparam')", "roslib.load_manifest('sensor_msgs')", "import rospy", "import rosparam", "import rosbag", "from sensor_msgs.msg import PointCloud2", "from hrl_generic_arms.pose_converter import PoseConverter", "from kelsey_sandbox...
#! /usr/bin/python import sys import numpy as np import copy import roslib roslib.load_manifest("hrl_pr2_arms") roslib.load_manifest("kelsey_sandbox") import rospy from visualization_msgs.msg import Marker, MarkerArray from geometry_msgs.msg import Point, Quaternion, Vector3, PoseStamped from std_msgs.msg import Colo...
[ [ 1, 0, 0.0254, 0.0085, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0339, 0.0085, 0, 0.66, 0.04, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0424, 0.0085, 0, 0....
[ "import sys", "import numpy as np", "import copy", "import roslib", "roslib.load_manifest(\"hrl_pr2_arms\")", "roslib.load_manifest(\"kelsey_sandbox\")", "import rospy", "from visualization_msgs.msg import Marker, MarkerArray", "from geometry_msgs.msg import Point, Quaternion, Vector3, PoseStamped",...
import sys import subprocess import numpy as np from collections import deque import roslib roslib.load_manifest("rospy") roslib.load_manifest("tf") roslib.load_manifest("hrl_pr2_arms") roslib.load_manifest("smach_ros") roslib.load_manifest("actionlib") import tf import tf.transformations as tf_trans import rospy from...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0833, 0.0417, 0, 0.66, 0.0476, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.125, 0.0417, 0, 0...
[ "import sys", "import subprocess", "import numpy as np", "from collections import deque", "import roslib", "roslib.load_manifest(\"rospy\")", "roslib.load_manifest(\"tf\")", "roslib.load_manifest(\"hrl_pr2_arms\")", "roslib.load_manifest(\"smach_ros\")", "roslib.load_manifest(\"actionlib\")", "i...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'arm_cart_control_gui.ui' # # Created: Sat Feb 11 08:02:57 2012 # by: PyQt4 UI code generator 4.7.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Frame(object): def setupUi(self, ...
[ [ 1, 0, 0.042, 0.0042, 0, 0.66, 0, 154, 0, 2, 0, 0, 154, 0, 0 ], [ 3, 0, 0.521, 0.9454, 0, 0.66, 0.5, 206, 0, 2, 0, 0, 186, 0, 99 ], [ 2, 1, 0.5042, 0.9034, 1, 0.34...
[ "from PyQt4 import QtCore, QtGui", "class Ui_Frame(object):\n def setupUi(self, Frame):\n Frame.setObjectName(\"Frame\")\n Frame.resize(702, 521)\n Frame.setFrameShape(QtGui.QFrame.StyledPanel)\n Frame.setFrameShadow(QtGui.QFrame.Raised)\n self.frame = QtGui.QComboBox(Frame)\...
#! /usr/bin/python import roslib; roslib.load_manifest('kelsey_sandbox') import rospy import roslib.message import rosbag import sys import rosservice from datetime import datetime from hrl_lib.util import save_pickle import yaml #from hrl_lib import * #from tabletop_object_detector.srv import TabletopDetection if _...
[ [ 1, 0, 0.1154, 0.0385, 0, 0.66, 0, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 8, 0, 0.1154, 0.0385, 0, 0.66, 0.1, 630, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.1538, 0.0385, 0, 0.66,...
[ "import roslib; roslib.load_manifest('kelsey_sandbox')", "import roslib; roslib.load_manifest('kelsey_sandbox')", "import rospy", "import roslib.message", "import rosbag", "import sys", "import rosservice", "from datetime import datetime", "from hrl_lib.util import save_pickle", "import yaml", "...