Skip to content

Instantly share code, notes, and snippets.

View pdpinch's full-sized avatar

Peter Pinch pdpinch

View GitHub Profile
@pdpinch
pdpinch / gist:d227e9ac35d76539c365
Created February 18, 2016 14:18
2 edX pickle errors: TypeError: __import__() argument 1 must be string without null bytes, not str
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 109, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
response = view_func(request, *args, **kwargs)
@pdpinch
pdpinch / gist:115b587a292541b330df
Created February 17, 2016 13:10
2 edX pickle errors: TypeError: unhashable type: 'dict'
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 109, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
response = view_func(request, *args, **kwargs)
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 109, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
response = view_func(request, *args, **kwargs)

xbundle

xbundle converts back and forth between OLX and "xbundle" style XML formats. The xbundle format is a single XML file.

The OLX format is defined in this documentation.

Installation

@pdpinch
pdpinch / gist:093a93f3569c90cdcace
Created March 19, 2015 15:07
Traceback for CCX test failures
I was able to eliminate all but three test failures happening from the over 400 that I started with after the rebase just by adding the user.id argument that was added in that commit to the places where our changes called that api. However, the final three are failing when self.save() is called on this line:
https://github.com/edx/edx-platform/blob/master/common/lib/xmodule/xmodule/x_module.py#L549
That line of code was added in the same commit as above:
https://github.com/edx/edx-platform/commit/de23d6defe96468be4aa044a09958e9e1197140b#diff-936697469ba38db0e821ff2f2196c449R549
Down inside that save, there’s a KeyError raised on ‘tabs’ and I have no idea why.
@pdpinch
pdpinch / gist:20f187c0f4dfaf03f594
Last active August 29, 2015 14:13
Cover Letter for POC PR

This PR implements "Personal Online Courses" or POCs (working title). POCs are a simplified approach to SPOCs that allow for a course (or portions of a course) to be reused with a small groups of students. Course instructors assign a "POC Coach" who can create a POC, choose a subset of course modules for the POC (with start and end dates) and administer students. Importantly, POC Coaches cannot change the content and do not have the same permissions as course staff.

POCs were originally proposed on the edx code list last year and have been discussed with edX Product (including @explorerleslie ) and with edX Engineering ( @cpennington and @nedbat ).

This feature is intended to be used on edX.org. In particular, we are fielding requests to use this feature with 15.390.1x and 15.390.2x. This PR only affects LMS.

For manual testing, please view the [demo screencast](https://drive.google.com/file/d/0B9nbgzSIkR7mcTlXSkZqQTZwSnc/view?usp=shar

@pdpinch
pdpinch / courses-index.htm
Last active December 19, 2015 14:29
HTML snippet from HFH courses page at http://ocw.mit.edu/high-school/courses
<p>The courses here come from a variety of programs and initiatives that are affiliated with MIT, but aren't necessarily classes a typical MIT student would take. Highlights of Calculus was designed especially for MIT OpenCourseWare by Gilbert Strang to show just how relevant and accessible calculus can be.</p>
<p>The Chandra Astrophysics Institute was an outreach program taught on campus for students in the Boston area and would be useful for anyone interested in learning about astronomy and astrophysics.</p>
<p>The remaining courses were taught by student instructors through the <a href="http://esp.mit.edu/">Educational Studies Program</a> and include a wide variety of topics from the humanities to science.</p>
<h2 class="subhead">Mathematics</h2>
<p style="float: left; padding-right: 5px"><img width="120" height="90" title="Professor Gilbert Strang in his office." alt="Professor Gilbert Strang in his office." src="./resolveuid/a10d126344544aefe55ee1a40fff4beb" /></p>
<h4><a href="./resolveuid/4578308f0af3e
<!--
<div class="subPageLinks">
<ul class="multiple">
<li><a href="#Uniform circular motion">Uniform Circular Motion</a></li>
<li><a href="#Torque and rotational statics">Torque and Rotational Statics</a></li>
<li><a href="#Rotational kinematics and dynamics">Rotational Kinematics and Dynamics</a></li>
<li><a href="#Angular momentum and its conservation">Angular Momentum and its Conservation</a></li>
</ul>
</div>
<div id="courseModule"><a name="Uniform circular motion" id="Uniform circular motion"></a>
@pdpinch
pdpinch / gist:5788601
Last active December 18, 2015 13:18
HFH site footer
<div id="bottom">
<div id="grid"><!-- *begin footer* -->
<div id="footer" role="navigation sitemap">
<div id="foot-c1" class="grid_2 alpha">
<h4 class="footer">Subjects</h4>
<ul class="foot-bullet">
<li><a href="/high-school/biology/">Biology</a></li>
<li><a href="/high-school/chemistry/">Chemistry</a></li>
<li><a href="/high-school/engineering/">Engineering</a></li>
<li><a href="/high-school/humanities-and-social-sciences/">Humanities &amp; Social Sciences</a></li>
<div class="column">
<ul>
<li><a href="#Covalent Bonds">Covalent Bonds</a></li>
<li><a href="#Lewis Structures">Lewis Structures</a></li>
<li><a href="#Formal Charge">Formal Charge</a></li>
<li><a href="#Resonance Structures">Resonance Structures</a></li>
<li><a href="#Octet Rule">The Octet Rule</a></li>
<li><a href="#Ionic Bonds">Ionic Bonds</a></li>
<li><a href="#Polar Covalent Bonds">Polar Covalent Bonds</a></li>
<li><a href="#Dipole Moment">Dipole Moment</a></li>