CPU pegging at 100% when displaying many charms (7+) due to excessive traverseDAG calls. The system was making 18,623 traversal calls to traverse only 338 unique objects - a 55x repetition factor.
CharmA ──→ SharedDocX
HELLO
There is only one proper irc setup. Many people will tell you to use a bouncer. These people area silly and wrongheaded folk whose brains are filled with stupid ideas about irc. Let me explain.
What, exactly, is a bouncer? I will tell you! An irc bouncer is an irc client that is written in an irc server. Should you choose to use a bouncer, you will need an irc client to connect to your irc client.
| $ rustc main.rs | |
| main.rs:7:21: 7:29 error: unable to infer enough type information about `_`; type annotations required [E0282] | |
| main.rs:7 let f = identity(identity); | |
| ^~~~~~~~ | |
| error: aborting due to previous error |
| #!/usr/bin/python | |
| # apt-get install python-pip cgroup-bin | |
| # pip install cgroups | |
| import cgroups | |
| import os | |
| import time | |
| import subprocess |
| DEBIAN_FRONTEND=noninteractive apt-get install -y mdadm | |
| mdadm -C -l0 --raid-devices=2 /dev/md0 /dev/xvdb /dev/xvdc | |
| mkfs.ext4 /dev/md0 | |
| perl -pi -e 's@/dev/xvdb@/dev/md0@g' /etc/fstab | |
| mount -a | |
| #if [[ -d /var/lib/elasticsearch ]]; then | |
| # mv /var/lib/elasticsearch /mnt/elasticsearch | |
| #else | |
| # mkdir /mnt/elasticsearch | |
| # ln -sf /mnt/elasticsearch /var/lib/elasticsearch |
Aptly is software for managing apt repositories.
| from sqlalchemy import create_engine, Column, Integer | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.orm import sessionmaker | |
| Base = declarative_base() | |
| engine = create_engine('postgresql+psycopg2://testman:testmanpass@localhost:5432/testman') | |
| class TestMan(Base): | |
| __tablename__ = "testman" |
| from sqlalchemy import create_engine, Column, Integer | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.orm import sessionmaker | |
| Base = declarative_base() | |
| engine = create_engine('postgresql+psycopg2://testman:testmanpass@localhost:5432/testman') | |
| class TestMan(Base): | |
| __tablename__ = "testman" |
| import sqlite3 | |
| con = sqlite3.connect("/dev/input") | |
| cursor = con.cursor() | |
| cursor.execute("Select name from object") | |
| print "\n".join([item[0] for item in cursor.fetchall()]) |
| def zebra_execute(json, endpoint, token): | |
| return requests.post( | |
| endpoint, | |
| headers={ | |
| "X-Auth-Token": token, | |
| "Content-Type": "application/json", | |
| "X-ZeroVM-Execute": "1.0"}, | |
| data=json).content |