This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/usr/local/lib/python2.7/dist-packages/eventlet/greenpool.py", line 82, in _spawn_n_impl | |
func(*args, **kwargs) | |
File "/media/sf_Rackspace/neutron/neutron/agent/l3/agent.py", line 471, in _process_router_update | |
self.pd.process_prefix_update() | |
File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 271, in inner | |
return f(*args, **kwargs) | |
File "/media/sf_Rackspace/neutron/neutron/agent/linux/pd.py", line 284, in process_prefix_update | |
pd_info.bind_lla) | |
File "/media/sf_Rackspace/neutron/neutron/agent/linux/dibbler.py", line 126, in enable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_ascii(s): | |
return all(ord(c) < 128 for c in s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
failed: [sl_test] (item={u'name': u'BSTS'}) => {"changed": false, "cmd": ["R-install-package", "BSTS", "cran"], "delta": "0:00:00.951372", "end": "2016-12-24 07:28:24.959896", "failed": true, "invocation": {"module_args": {"_raw_params": "R-install-package\n BSTS\n cran\n ", "_uses_shell": false, "chdir": null, "creates": null, "executable": null, "removes": null, "warn": true}, "module_name": "command"}, "item": {"name": "BSTS"}, "rc": 1, "start": "2016-12-24 07:28:24.008524", "stderr": "Error: package 'BSTS' is not available (for R version 3.3.2)\nExecution halted", "stdout": "", "stdout_lines": [], "warnings": []} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws shell | |
from django.contrib.auth.models import User | |
me = User.objects.get(username="<user_name_of_the_user_you_want_to_be_super_user>") | |
me.is_superuser = True | |
me.is_staff = True | |
me.active = True | |
me.save() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias paver-collectstatic='cd /edx/app/edxapp/edx-platform; date; time python manage.py lms --settings=aws collectstatic --noinput' | |
alias paver-compile='cd /edx/app/edxapp/edx-platform; time paver update_assets lms --settings=aws' | |
alias paver-compile-debug='cd /edx/app/edxapp/edx-platform; time paver update_assets lms --settings=aws --debug' | |
alias paver-go='cd /edx/app/edxapp/edx-platform; paver update_assets lms --settings=aws; paverdevstack lms --fast' | |
alias paver-run='cd /edx/app/edxapp/edx-platform; paver devstack lms --fast' | |
alias theme-base='cd /edx/app/edxapp/themes/dentalpost-theme/lms/static/sass/partials/base' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias su-edxapp-user='sudo su edxapp -s /bin/bash' | |
alias su-www-user='sudo su www-data -s /bin/bash' | |
alias django-admin-help='sudo -u edxapp /edx/bin/python.edxapp /edx/app/edxapp/edx-platform/man | |
age.py lms --settings=aws help' | |
alias django-shell='sudo -u www-data /edx/bin/python.edxapp /edx/app/edxapp/edx-platform/manage.py lms --settings aws shell' | |
alias build-edx-certs='sudo /edx/bin/supervisorctl stop certs:; date; time sudo /edx/bin/update read-only-certificate-code ; date' | |
alias build-edx-configuration='sudo /edx/bin/supervisorctl stop edxapp:; date; time sudo /edx/bin/update configuration master; date' | |
alias build-edx='date; time sudo /edx/bin/update edx-platform dentalpost-eucalyptus; date' | |
alias fix-mongo='sudo /etc/init.d/mongod stop; sudo rm /edx/var/mongo/mongodb/mongod.lock; sudo mongod -repair --config /etc/mongod.conf; sudo chown -R mongodb:mongodb /edx/var/mongo/.; sudo /etc/init.d/mongod start' | |
alias git-fetch-edx-platform='cd /edx/app/edxapp/edx-platform; sudo git fetch --all' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AFFILIATE_COOKIE_NAME": "dev_affiliate_id", | |
"ANALYTICS_DASHBOARD_URL": "http://localhost:18110/courses", | |
"ANALYTICS_DATA_URL": "", | |
"ANALYTICS_SERVER_URL": "", | |
"AWS_SES_REGION_ENDPOINT": "email.us-east-1.amazonaws.com", | |
"AWS_SES_REGION_NAME": "us-east-1", | |
"BOOK_URL": "", | |
"BUGS_EMAIL": "[email protected]", | |
"BULK_EMAIL_DEFAULT_FROM_EMAIL": "[email protected]", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"resources": [ | |
{ | |
"links": [ | |
{ | |
"href": "http://127.0.0.1:9696/v2.0/subnets", | |
"rel": "self" | |
} | |
], | |
"name": "subnet", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An integer X and a non-empty zero-indexed array A consisting of N integers are given. We are interested in which elements of A are equal to X and which are different from X. The goal is to split array A into two parts, such that the number of elements equal to X in the first part is the same as the number of elements different from X in the other part. More formally, we are looking for a number K such that: | |
0 <= K <= N | |
the number of elements equal to X in A[0..K−1] is the same as the number of elements different from X in A[K..N−1]. (For K = 0, A[0..K−1] does not contain any elements. For K = N, A[K..N−1] does not contain any elements.) | |
A[0] = 5 | |
A[1] = 5 | |
A[2] = 1 | |
A[3] = 7 | |
A[4] = 2 |