Andaman Nicobar,25
Andhra Pradesh,3550
Arunachal Pradesh,37
Assam,616
Bihar,1777
Chandigarh,32
Chhattisgarh,313
Dadra & Nagar Haveli,3
I ran into an issue today where I had to perform a bulk insert into a postgres DB. I was already using SQLAlchemy and Flask-SQLAlchemy to manage the connections to the db and I didn't want to have to use things like psycopg2
directly.
Note: SQLAlchemy provides an ORM. It isn't just an ORM. That is an important thing to be kept in mind. This means that you can bypass choose to not use the ORM layer when you don't want it. The idea with an ORM is to track changes to objects and when you have a case like that is when you'd use the ORM. In a bulk upload scenario, you don't need to track changes to objects. All you care is that everything be pushed into the DB.
Lets face it, writing HTML is really not a fun thing to do. With so many <
and so many >
and all the horrific closing tags. There has to be a better
way.
Enter Emmet. Emmet is a plugin for many text editors that makes the job of writing HTML super easy. It provides a bunch of abbreviations whose syntax is inspired by CSS.
I hereby claim:
- I am shrayasr on github.
- I am shrayasr (https://keybase.io/shrayasr) on keybase.
- I have a public key whose fingerprint is 12A3 E09D 419C 1251 CEDA 92F9 3375 F9A3 8F7E CFC6
To claim this, I am signing this object:
public class AccountController : Controller | |
{ | |
// | |
// GET: /Account/ | |
public ActionResult Index() | |
{ | |
return RedirectToAction("Login"); | |
} |
// To be used in conjunction with [Magic Autofill](http://ctrlq.org/irctc/) | |
/**************************** | |
* TESTED ON CHROME ONLY. | |
****************************/ | |
// Absolutely required function because of IRCTC's stupid ID naming scheme. | |
function jq( myid ) { | |
return "#" + myid.replace( /(:|\.|\[|\]|,)/g, "\\$1" ); | |
} |
@echo off | |
cls | |
set x86="%SYSTEMROOT%\System32\OneDriveSetup.exe" | |
set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe" | |
echo Closing OneDrive process. | |
echo. | |
taskkill /f /im OneDrive.exe > NUL 2>&1 | |
ping 127.0.0.1 -n 5 > NUL 2>&1 |
# Start a new compojure project | |
$ lein new compojure win-ro-problem-test |
(def snls {2 99 ; ladder | |
7 70 ; ladder | |
71 3 ; snake | |
50 5 ; snake | |
98 1 ; snake | |
}) | |
(defn roll-dice [] | |
(+ (rand-int 6) 1)) |