Minimize, Maximize windows
On Windows use the below shortcuts:
Maximize / Minimize the windows with WindowsKey + 1|2|3|4 etc.
DEAR READER
No title available
let's talk about Bridgerton tea, my ask is open

Discoholic 🪩
🪼
NASA
Sade Olutola
Misplaced Lens Cap
Stranger Things
Three Goblin Art

❣ Chile in a Photography ❣

Product Placement
I'd rather be in outer space 🛸
YOU ARE THE REASON
No title available
Claire Keane
occasionally subtle
h

Janaina Medeiros
we're not kids anymore.

seen from Brunei

seen from Sweden

seen from United States
seen from United Kingdom
seen from Indonesia

seen from Italy
seen from United States

seen from Germany
seen from Ukraine

seen from Türkiye
seen from United Kingdom
seen from Germany
seen from United States

seen from Belarus

seen from Türkiye

seen from United States

seen from Brazil
seen from Singapore
seen from Türkiye

seen from Sweden
@ankitgupta90
Minimize, Maximize windows
On Windows use the below shortcuts:
Maximize / Minimize the windows with WindowsKey + 1|2|3|4 etc.
Django set-up on Cent OS
Cent OS version: 6.5
Python version (in yum repos): 2.6.6
To Do:
Install Python 2.7 (project requirement)
Setup virtual environment using virtualenvwrapper
Install requirements using pip (Django + related packages)
Set-up PostgreSQL to work with Django
Install and set-up WSGI server Gunicorn
Install and set-up Nginx to serve static content for Django
Install Python 2.7 (project requirement)
build.sh
Modify the required python version (2.7.x) in the script, along with the default location for installation (/opt/python-2.7.x)
Source: http://rajaseelan.com/2012/01/28/installing-python-2-dot-7-2-on-centos-5-dot-2/
vim ~/.bashrc
Append: alias py27='/opt/python-2.7.2/bin/python'
Setup virtual environment using virtualenvwrapper
mkdir ~/src
cd ~/src
Download setuptools-5.x.tar.gz
tar -zxvf ~/Downloads/setuptools-5.x.tar.gz
cd setuptools-5.x
py27 setup.py install
/opt/python-2.7.x/bin/easy_install pip
/opt/python-2.7.x/bin/pip install virtualenvwrapper
mkdir ~/Envs
Add below lines to ~/.bashrc
export WORKON_HOME=$HOME/Envs
source /opt/python-2.7.x/bin/virtualenvwrapper.sh
mkvirtualenv env1
cd my_project
pip install -r requirements.txt (for a typical django project)
More: SO post for Python + Virtualenv setup
Set-up PostgreSQL to work with Django
Install PostgreSQL by following: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-a-centos-vps
Verify whether following packages are installed
yum install postgresql9x-server, postgresql-devel
yum install python-devel, libevent-devel
PATH: $PATH:/usr/pgsql-9.4/bin
workon env1
pip install psycopg2
sudo su - postgres
bash-4.1$
psql -c "CREATE ROLE db_user UNENCRYPTED PASSWORD 'db_user_password' NOSUPERUSER CREATEDB CREATEROLE NOINHERIT LOGIN"
psql -c "CREATE DATABASE db_name WITH OWNER = db_user"
psql -c 'GRANT ALL PRIVILEGES ON DATABASE "db_name" to db_user'
psql -Udb_user -Wdb_name
Edit settings.py in Django project:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'db_name', 'USER': 'db_user', 'PASSWORD': 'db_user_password', 'HOST': '' } }
edit pg_hba.conf file (/var/libs/pgsql/9.x/data/pg_hba.conf)
Add the below configs before any other authentication configuration for hosts
local all all md5 host all all 127.0.0.1/32 md5 host all all ::1/128 md5
python manage.py syncdb (to sync changes to the db)
Install and set-up WSGI server Gunicorn
pip install gunicorn
gunicorn my_project.wsgi:application
Run: http://127.0.0.1:8000
Install and set-up Nginx to serve static content for Django
yum install nginx
service nginx start
Django: settings.py
STATIC_ROOT='/home/<user>/Envs/env1/static/'
Note: Make sure user permissions are o+x for all the above directories into which nginx needs to look for static content. Check using: namei -om /path/to/check
chmod o+x /home or chmod o+x /home/<user>
mkdir /etc/nginx/sites-available
mkdir /etc/nginx/sites-enabled
vim /etc/nginx/nginx.conf
In the http block add:
include /etc/nginx/sites-enabled/*;
Configuration file for nginx: vim /etc/nginx/sites-available/my_project
server { server_name yourdomainorip.com;
access_log off;
location /static/ { alias /home/<user>/Envs/env1/static/; }
location / { proxy_pass http://127.0.0.1:8000; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Real-IP $remote_addr; add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"'; } }
cd /etc/nginx/sites-enabled
sudo ln -s ../sites-available/my_project
sudo service nginx restart
Synergy Installation Instructions (Linux + Win)
Sourceforge: Synergy
Server: Cent OS
Client: Win 7
Installation on Cent OS:
yum install synergy-plus
touch /etc/synergy.conf
vim /etc/synergy.conf
section: options screenSaverSync = true end
section: screens server.hostname: client.hostname: end
section: links server.hostname: right = client.hostname
client.hostname: left = server.hostname end
As non-root user, run: synergys --config /etc/synergy.conf
Installation on Win:
Double-click installer
Start Synergy
Click Test, to verify if client is able to connect to server
Click Start to get everything running
repository_mediacapture Alpha
It's been almost a month since I updated the blog about the developments on the GSoC project. Last time I had mentioned about refactoring the plugin. Well it took this long to finally refactor the plugin into a functional framework which would enable 3rd party recorders to easily embed themselves within the filepicker, record and upload media to moodle servers.
The plugin has an API of its own which the recorders must extend to properly function inside mediacapture. I have written a couple of recorders for the plugin as a sample demonstration. Red5Recorder, Nanogong and Local Audio Recorder are the ones I have successfully imported to the new plugin. They work perfectly on both Linux and Windows!
The post would be incomplete if I didn't mention the contribution of my mentor Rajesh Taneja. He has provided immense insight and help during the project that the current state of the plugin can be very much owed to him.
Git Repo for the updated code : https://github.com/ankitdbst/moodle-repository_mediacapture
There also a demo recorder template I have written which extends the mediacapture plugin for someone looking to create one within the plugin.
Git Repo for the demo recorder template : https://github.com/ankitdbst/repository_mediacapture_demo
Refactoring mediacapture plugin code.
Existing plugin required a small patch to the filepicker to enable injecting the html for audio/video recorders. These workarounds seemed to work but they weren't real solutions to the problem while upgrading to Moodle 2.3. After a long discussion over this with Rajesh Sir, I had decided to give the plugin another shot using the new filepicker API. I started with an example implementation given by Rajesh Sir which really helped in understanding the flow. As a result I have been able to upgrade the plugin to the newer filepicker API without any of the hacks. The code is much clean without those dodgy workarounds.
Will be trying to make the code more robust and at par with Moodle coding guidelines and standards over the next couple of weeks.
Update : repository_medicapture plugin v20120627
I have completed the 0.1v of the repository_mediacapture plugin for Moodle 2.3. I have added admin settings to the plugin to enable/disable recorders. The plugin now offers audio/video recording capabilties in both Java/Flash and falls back to the other technology in case one is missing from the client browser.
https://github.com/ankitdbst/moodle-repository_mediacapture
repository_medicapture plugin v20120627
Integrated flash audio and video recorders into the plugin. So now the plugin offers capability of recording audio/video using both flash and java technology. The java video recorder currently runs only on windows. The flash recorders are tested across platforms.
I would need to examine the client for some prerequisites necessary for the recorder, then load the appropriate flash/java recorder, whichever fits in to the clients configuration. Apart from this admin settings need to improved and support for enabling/disabling the flash/java recorders need to be provided.
Back to the flash recorders I added. The video one requires a red5 server to be installed. Thus it is a little downside as web hosting sites do not generally provide RTMP servers installed. So users of the plugin would need that installed for the recorder to work in video mode. The flash mp3 audio recorder is adopted from Paul Nicholls plugin (https://github.com/MaxThrax/moodle-repository_recordaudio) which records the sound directly to a file and doesn't require a red5 which is plus.
On another note I created a tic-tac-toe game in python recently. (My love for the language is growing apparently) It implements the game tree data structure to evaluate the best possible move for a player by looking ahead x levels.
https://github.com/ankitdbst/Utilities/tree/master/tic-tac-toe
Video Recorder using Flash
As a part of the proposed generic nature of the A/V Repository plugin, I have started to explore mediacapture/streaming options in Flash.
The first and foremost requirement for flash based recording is an RTMP server, I have managed to installed Red5 v0.9 which is stable with Java 6. Though there are other light weight open source alternatives (rtmplite, an rtmp server written in python). The demos provided by Red5 (oflademo) has a SimpleRecorder which is close to the starting point of the Audio-Video recorder I need.
I have also looked at a couple of other open source projects which use Red5 (I would need my Linux Machine to install and test them properly, as the server in most cases would be a Linux distro).
Red5-recorder
Red5-flex-streamer
VideoIO
There are also a couple of enterprise recorders which have a decent 5 min recording as a part of demo version.
VideoWhisper
Will look at these recorders in more detail and hopefully try to get one of them running. :)
Run python interpreter, bash shell and MySQL consoles. Share instances of shell with anyone. :)
Scraper to extract facebook profile url
Wrote a python script to scrape the facebook search page and reverse search the facebook profile of a user using there email id as the query parameter.
Script uses some of the native python libraries urllib2, re and BeautifulSoup HTML/DOM parser to scrape for the required information. The documentation of the BeautifulSoup library is given here :
http://www.crummy.com/software/BeautifulSoup/bs4/doc/
The source of the script is hosted on github. :)
https://github.com/ankitdbst/FB-Profile-URL
A/V Recorder plugin - alpha version
Recently finished implementing the alpha version of the a/v repository plugin for Moodle 2.3.x dev release. The plugin UI is still in its early stage, but works smoothly nonetheless. I have updated the repo and moodle tracker about this development.
https://github.com/ankitdbst/moodle-repository_mediacapture
The plugin uses YUI 3 to make an ajax request based on the type of recorder selected by the user - audio/video. Audio recorder uses the Nanogong applet whilst the Video recorder uses the demo version of the Vimas applet. Vimas applet works only on Windows/Mac OS whereas Nanogong is cross platform.
Would be working to fine-tune both the framework and UI of the plugin in the coming week.
Framework for Video Integration to the plugin
After trying to fix various issues with my Win 7 installation including the BSOD. I have been able to upgrade to Win 8 on my laptop. The release preview is really awesome. Has a lot of apps and gives a total feel of a touch enabled device.
On another note, I have been able to create a basic framework which would handle the audio/video capabilities for the repository plugin. Would be adding to it in the coming days. Currently only displays the Nanogong audio recording applet.
Would be playing around with Win 8 and checking what's new. Hopefully I can integrate the Video applet into the plugin and make it operational on Windows. :)
The Japanese have always loved fresh fish. But the waters close to Japan have not held many fish for decades. So to feed the Japanese population, fishing boats got bigger and went farther than ever. The farther the fishermen went, the longer it took to bring in the fish. If the return trip...
Update : Audio Recorder plugin
With release of Moodle 2.3 dev couple of weeks back, the Repository API and its UI as a whole has undergone a lot of changes. The plugin I wrote, week back doesn't work with this version, so I spent some time on the previous weekend studying the new Repository API closely and some of the repo plugins written for the dev release.
Fortunately after trying a lot of alternatives to make the code work I have been able to upgrade the plugin to the new Moodle version with a small patch in the filepicker.js coupled with small changes to the plugin. The UI of the recorder is much cleaner now. Pushed the changes and updated the tracker.
http://tracker.moodle.org/browse/CONTRIB-3631
Rajesh sir would be off for a while, and has instructed me to work on the plugin API framework which would help me integrate Audio and Video in the plugin seamlessly.
Hoping I can get something up and working quickly. :)
Update : Standalone Video Recorder
Had a discussion with Rajesh Sir yesterday and he brought to notice that the end-users for the plugin would mostly be Windows/Mac which means the Video Recorder using Video4Linux v4l4j project would not be the first thing on priority.
Following the discussion. I have decided to shift to Windows and use the demo version (20 secs of recording) of the Vimas Java Applet to build the Video Recorder plugin. The applet is functional on Windows/Mac. Later I could use the v4l4j project to build one for Linux.
I have already got the Standalone version to work using the applet, tweaked the code to suit the needs of the plugin.
Here is the git-repo : https://github.com/ankitdbst/Video-Recorder
WHAT MAKES YOU FEEL BETTER WHEN YOU ARE IN A BAD MOOD?
Checking out 9GAG or reading Google Reader, kind of lets me change my mood for a while. :)
Standalone video recorder
Been trying to get my head around building a standalone video recorder using Java, as my next step towards the Audio/Video repository plugin. When it comes to java, this is what at least I was able to conclude after trying a lot of alternatives to JMF (Java Media Framework). It is not simple to get a cross-platform solution working using Java (in media recording/capturing). Below are some of the solutions I looked upon this weekend.
JMF - This is a long dead solution. Installation of the framework involves a lot of troubleshooting, and the documentation isn't of much help, as it is obsolete. My being a 64 bit Linux machine didn't help either. JMF doesn't have a direct binary for 64 bit systems. As a result workaround involving extensive SO searches are the only options.
FMJ - As this itself is an abandoned project since 2007. It didn't make sense to try this one, after I had trouble getting the JMF installation to work.
v4l4j - This is a Java framework based on Video4Linux API. The project is recent and is very well documented. I managed to get the installation working on my 64 bit machine. Very few dependencies, and clear troubleshooting instructions did help in getting it working quickly.
There is a simple example on screen capturing that I would be using to build a Webcam-recorder. This looks like a good platform to start with. Will be experimenting more with the API and would look to get a standalone version working in quick time.
Update : This actually produces raw frames of video data which must be trans-coded before the video can be saved.
Some of the alternatives I didn't try but could be useful
vlcj - This is a framework in Java that provides Java bindings to allow an instance of a native vlc media player to be embedded in a Java AWT window or Swing.
P.S. I have trouble switching between the JDK version I have installed in the process, so here is a simple way to switch between the Java versions installed.
sudo update-alternatives --config java