Skip to content

Instantly share code, notes, and snippets.

View ChillarAnand's full-sized avatar

Pandikunta Anand Reddy ChillarAnand

View GitHub Profile
(defvar helm-source-commands-history
(helm-build-sync-source "Emacs commands history"
:candidates (lambda ()
(let ((cmds))
(dolist (elem extended-command-history)
(push (intern elem) cmds))
cmds))
:coerce #'intern-soft
:action #'command-execute)
"Emacs commands history")
@ChillarAnand
ChillarAnand / regex-demo.py
Last active October 22, 2025 05:00
BangPypers talk - Using Regular Expressions by Arvind Padmanabhan
import re
print(re.match(r'bc', 'abc'))
print(re.match(r'abc', 'abc'))
print(re.search(r'bc', 'abc'))
print(re.search(r'^bc', 'abc'))
print(re.search(r'^ab$', 'abc'))
print(re.search(r'^abc$', 'abc'))
print(re.search(r'a?bc', 'bc'))
print(re.search(r'a?bc', 'abc'))
print(re.search(r'a?bc', 'aabc'))
@ChillarAnand
ChillarAnand / experiment.xml
Created December 24, 2015 06:07
fastq to sra
<?xml version="1.0" encoding="UTF-8"?>
<EXPERIMENT_SET xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ftp://ftp.sra.ebi.ac.uk/meta/xsd/sra_1_5/SRA.experiment.xsd">
<EXPERIMENT alias="test_exp"
center_name="test_center">
<TITLE>Test exp</TITLE>
<STUDY_REF refname=""/>
<DESIGN>
<DESIGN_DESCRIPTION>
Test experiment
@ChillarAnand
ChillarAnand / blogger2scriptogram.py
Created February 26, 2016 02:04 — forked from larsks/blogger2scriptogram.py
Convert Blogger posts to Markdown for use with Scriptogr.am
#!/usr/bin/python
import os
import sys
import argparse
import iso8601
import re
import subprocess
import logging
import json
import sys
import importmagic
print('loading index')
index = importmagic.SymbolIndex()
index.build_index(sys.path)
@ChillarAnand
ChillarAnand / solr
Created March 16, 2016 13:58
solr setup
# Ubuntu installation instructions.
1. Download solr from http://www.apache.org/dyn/closer.cgi/lucene/solr/5.2.1 and unzip it.
2. Install open jdk
$sudo apt-get install openjdk-7-jdk
3. Create a virtualenv
@ChillarAnand
ChillarAnand / foo.py
Created March 30, 2016 08:14
big float
In [31]: v = numpy.linspace(0, 100, 10)
In [32]: from bigfloat import precision, exp
In [33]: with precision(100000):
....: j = [bigfloat.exp(i/1.3806488e-23) for i in v]
@ChillarAnand
ChillarAnand / pyvideo-log.txt
Last active May 9, 2016 13:42
pyvideo-log.txt
WARNING:root:conference: chipy
WARNING:root:[{'file_path': 'data/chipy/videos/post-djangocon-an-overview-of-edx.json', 'summary': "| edx is a major django application serving huge numbers of students for\nMIT, Harvard, Stanford, Berkely, and more.\n| - A brief history of Computer-Based Instruction (python has a role); -\nincomplete survey of current open-source CBI; - edX: how's it different\n/ what's it's rough structure, what (besides django/python) is involved;\n- edX: hacking the platform (django development); - edX: hacking\ncourses; a deployment-level VM, and how to get started there; - finally:\nfuture topics: deployment; what this can't do (maybe) and why; - wrapup:\ncall for interest & edx project night(s);\n\nI'll try to have some USBs for anyone who want to try one of the edX VMs\nduring the talk\n", 'error': 'Line block ends without a blank line.'}]
WARNING:root:conference: djangocon-2012
WARNING:root:[{'file_path': 'data/djangocon-2012/videos/using-celery-with-social-networks.json', 'description'
This file has been truncated, but you can view the full file.
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-pc-linux-gnu
Reading makefiles...
Reading makefile `Makefile'...
Reading makefile `src/.deps/libuv_la-fs-poll.Plo' (search path) (no ~ expansion)...
This file has been truncated, but you can view the full file.
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-pc-linux-gnu
Reading makefiles...
Reading makefile `Makefile'...
Reading makefile `src/.deps/libuv_la-fs-poll.Plo' (search path) (no ~ expansion)...