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
| from sqlalchemy import Table, Column, Integer, String, ForeignKey | |
| from sqlalchemy.orm import mapper | |
| from database import metadata, db_session , Base | |
| from sqlalchemy.ext.declarative import declarative_base | |
| class Team( Base ): | |
| __tablename__='teams' | |
| id = Column (Integer, primary_key = True) | |
| name = Column(String(50)) |
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
| >>> from models import * | |
| >>> from database import * | |
| >>> from models import * | |
| >>> teamname='ops' | |
| >>> team = db_session.query(Team).filter_by(name=teamname).one() | |
| >>> | |
| >>> packagename="fk-ops-build | |
| File "<stdin>", line 1 | |
| packagename="fk-ops-build | |
| ^ |
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
| class HTTPApiFilter extends ScalatraFilter with ScalateSupport | |
| { | |
| get("/api/"){ | |
| <html> | |
| <body> | |
| <h1>Hello, world!</h1> | |
| <p>This is the HTTP API. What are you looking for</p> | |
| </body> |
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
| shekispeaks: why should I multiplex Multiple AMQP sessions over a single connection and how many concurrent channels can a connections support without any performance degradation. | |
| [2:45pm] shekispeaks: ? | |
| [2:48pm] bob2351: Bob_: yes, all the released code for rabbit, including mgmt is open source | |
| [2:50pm] Bob_: ok, thanks for your help! | |
| [2:50pm] shekispeaks: any help on using RabbitMQ connections? | |
| [2:55pm] aib_007 joined the chat room. | |
| [3:38pm] [diablo] joined the chat room. | |
| [3:57pm] Espen-_- left the chat room. (Excess Flood) | |
| [4:02pm] Espen-_- joined the chat room. | |
| [4:03pm] Espen-_- left the chat room. |
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
| /** | |
| * Autogenerated by Thrift | |
| * | |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING | |
| */ | |
| import java.util.List; | |
| import java.util.ArrayList; | |
| import java.util.Map; | |
| import java.util.HashMap; |
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
| val item :Item = new Item | |
| val bytes = new TSerializer().serialize(item) //THROWS ABOVE GIVEN ERROR |
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
| i had booked tickets | |
| (02:14:00 IST) SriBalaGGG Nitk: but then i cancelled them | |
| (02:14:06 IST) SriBalaGGG Nitk: after convo was announced | |
| (02:14:09 IST) SriBalaGGG Nitk: fucking |
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
| 2011-09-27 15:20:58 | |
| Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.1-b02-383 mixed mode): | |
| "Attach Listener" daemon prio=9 tid=7fc7a98b8000 nid=0x116622000 waiting on condition [00000000] | |
| java.lang.Thread.State: RUNNABLE | |
| "pool-7-thread-4" prio=5 tid=7fc7a5217800 nid=0x117965000 waiting on condition [117964000] | |
| java.lang.Thread.State: WAITING (parking) | |
| at sun.misc.Unsafe.park(Native Method) | |
| - parking to wait for <7df094328> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) |
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
| import java.util.concurrent.atomic.AtomicInteger; | |
| public class CyclicCounter { | |
| private final int maxVal; | |
| private final AtomicInteger ai = new AtomicInteger(0); | |
| public CyclicCounter(int maxVal) { | |
| this.maxVal = maxVal; | |
| } |
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
| object HostPersistence extends Logging { | |
| import scala.collection.JavaConverters._ | |
| def allHostNames() : List[String] ={ | |
| val template = DBProvider.writeEndPoint().getSimpleJdbcTemplate | |
| val result= template.queryForList("select * from host") | |
| val buffer = new ListBuffer[String] | |
| for (r <- result) { | |
| buffer+=r.get("host") |