pip freeze:
- nltk==3.2.1
- numpy==1.11.1
# -*- coding: utf-8 -*-
'''
@author: Ricardo Cosme
'''
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less |
pip freeze:
# -*- coding: utf-8 -*-
'''
@author: Ricardo Cosme
'''
import confluent_kafka | |
#import json | |
#import msgpack | |
c = confluent_kafka.Consumer({'bootstrap.servers': 'kafka', 'group.id': 'PyCharm_consumer', | |
'default.topic.config': {'auto.offset.reset': 'latest'}}) | |
c.subscribe(['ping']) | |
running = True | |
i = 0 |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
kubectl get --all-namespaces rs -o json|jq -r '.items[] | select(.spec.replicas | contains(0)) | "kubectl delete rs --namespace=\(.metadata.namespace) \(.metadata.name)"' |
import socket | |
from threading import Thread | |
class Proxy(Thread): | |
""" used to proxy single udp connection | |
""" | |
BUFFER_SIZE = 4096 | |
def __init__(self, listening_address, forward_address): | |
print " Server started on", listening_address | |
Thread.__init__(self) |
OIFS=$IFS; | |
IFS=","; | |
# fill in your details here | |
dbname=DBNAME | |
user=USERNAME | |
pass=PASSWORD | |
host=HOSTNAME:PORT | |
# first get all collections in the database |
Occasionally we will deploy a virtual instance into our KVM infrastructure and realize after the fact that we need more local disk space available. This is the process we use to expand the disk image. This process assumes the following:
This process will work with either a qcow2
or raw
disk image. For