Skip to content

Instantly share code, notes, and snippets.

View deependersingla's full-sized avatar

Deepender Singla deependersingla

View GitHub Profile
Traceback (most recent call last):
File "./manage.py", line 90, in <module>
startup = importlib.import_module(edx_args.startup)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/edx/app/edxapp/edx-platform/lms/startup.py", line 5, in <module>
from django.conf import settings
ImportError: No module named django.conf
@deependersingla
deependersingla / parameter
Created August 9, 2014 08:10
Monkey patch to replace model_attributes to model in rails strong para,s
class ActionController::Parameters
def permit(*filters)
params = self.class.new
filters.each do |filter|
case filter
when Symbol, String
permitted_scalar_filter(params, filter)
when Hash then
#filter[(filter.keys.first.to_s + "_attributes").to_sym] = filter.delete filter.keys.first
2014-07-02 07:41:44,009 [INFO] (2298 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-07-02 07:41:44,009 [INFO] (2298 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh
2014-07-02 07:41:46,944 [INFO] (2298 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script: running 'rake assets:precompile'...
2014-07-02T07:41:46Z 2328 TID-264k8 INFO: Sidekiq client with redis options {:url=>"redis://redis.8tyozq.0001.use1.cache.amazonaws.com:6379/12", :namespace=>"Sidekiq"}
Asset compilation succesful
2014-07-02 07:41:46,945 [INFO] (2298 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-07-02 07:41:46,945 [INFO] (2298 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/pre/12_db_migration.
# Sidekiq interaction and startup script
commands:
create_post_dir:
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq":
mode: "000755"
content: |
#!/bin/bash
# Sidekiq interaction and startup script
commands:
create_post_dir:
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq":
mode: "000755"
content: |
#!/bin/bash
class ContentBased
Todo_course_weight = 1
Active_course_weight = 2
Completed_course_weight = 3
def self.course_suggestion(user)
user_total_projects = user.projects
completed_project = user.completed_projects
#<FeedItemProject:0x007fd49cda48f0 @model=#<Project id: 1, complete: false, private: false, user_id: 1, course_id: 61, created_at: "2014-02-19 12:05:05", updated_at: "2014-02-19 12:29:21", certificate_file_name: nil, certificate_content_type: nil, certificate_file_size: nil, certificate_updated_at: nil, deleted_at: nil, custom_course_id: nil>, @type="Project", @time_ago="1 day ago", @owner={"id"=>1, "email"=>"deepender281190@gmail.com", "created_at"=>Wed, 19 Feb 2014 11:58:37 UTC +00:00, "updated_at"=>Wed, 19 Feb 2014 17:07:39 UTC +00:00, "avatar_file_name"=>nil, "avatar_content_type"=>nil, "avatar_file_size"=>nil, "avatar_updated_at"=>nil, "cv_file_name"=>nil, "cv_content_type"=>nil, "cv_file_size"=>nil, "cv_updated_at"=>nil, "name"=>"Deepender", "username"=>"deepender", "deleted_at"=>nil, "private"=>nil, "source"=>"default", "background_image"=>"royal_felt", "first_name"=>nil, "last_name"=>nil, "professionally_verified_id"=>nil, "old_id"=>nil, "reverse_relationships"=>[]}, @avatar="/images/medium/profile-de
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.1-py2.7.egg/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.1-py2.7.egg/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.1-py2.7.egg/django/core/management/__init__.py", line 261, in fetch_command
commands = get_commands()
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.1-py2.7.egg/django/core/management/__init__.py", line 107, in get_commands
Bundler.with_env helpers
Bundler.with_clean_env
should keep the original GEM_PATH even in sub processes
should not pass any bundler environment variables
should not pass RUBYOPT changes
should not change ORIGINAL_ENV
it should behave like Bundler.with_*_env
should reset and restore the environment
Bundler.with_original_env
should pass bundler environment variables set before Bundler was run
bundle install with git sources when specifying local override uses the local repository instead of checking a new one out
Failure/Error: expect(out).to match(/at #{lib_path('local-rack')}/)
expected "Fetching source index from file:/home/deepender/bundler/tmp/gems/remote1/\nResolving dependencies...\nusing 3 already installed gems\nYour bundle is complete!\nUse `bundle show [gemname]` to see where a bundled gem is installed." to match /at \/home\/deepender\/bundler\/tmp\/libs\/local-rack/
Diff:
@@ -1,2 +1,6 @@
-/at \/home\/deepender\/bundler\/tmp\/libs\/local-rack/
+Fetching source index from file:/home/deepender/bundler/tmp/gems/remote1/
+Resolving dependencies...
+using 3 already installed gems
+Your bundle is complete!