Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
import subprocess
from flask import Flask, request
PROJECT_ROOT = ""
app = Flask(__name__)
@app.route('/', methods=['POST'])
def pull():
# -*- coding: latin-1 -*-
import re
from os import join
myP = re.compile(r'^\s+(\d+)\s+([a-zA-Z0-9¨®_\-?]+)\s+(\w+)\s+([\w<>]+)\s+(\w+)\s+([\w<>\s{4}]+)\s+(.+[d|p])\s{4}+$')
base_dir = 'D:\Hector\\'
with open(join(base_dir ,"UCELL20130913.txt"), 'r') as input_file:
with open('dsp_ucell_processed.csv', 'w') as fh_output:
header = 'Cell_ID' + ',' + 'Cell_Name' + ',' + 'Operation_State' + ',' + 'Administrative_State' + ',' + 'DSS_State' + ',' + 'State_Explanation' + '\n'
fh_output.write(header)
(let
((marmalade '("marmalade" . "http://marmalade-repo.org/packages/"))
(melpa '("melpa" . "http://melpa.milkbox.net/packages/"))
(org '("org" . "http://orgmode.org/elpa/")))
(add-to-list 'package-archives marmalade t)
(add-to-list 'package-archives melpa t)
(add-to-list 'package-archives org t))
(package-initialize)
@PuercoPop
PuercoPop / setup-python.el
Created November 6, 2013 15:07
minimal virtualenvwrapper and jedi.el emacs configuration.
(setq venv-location "~/.envs/")
(venv-initialize-eshell)
(venv-initialize-interactive-shells)
(setq jedi:setup-keys t
jedi:use-shortcuts t)
(add-hook 'python-mode-hook
'(lambda ()
(setq fill-column 79)
(defmacro venv--make-pcompletions (commands)
`(loop for item in ,coommands
collect ,(venv--gen-fun item)))
(in-package :puerco-widgets)
(defun headline (level text)
(markup
(:div :class "org-headline" :data-level level
(concatenate 'string
(loop for i from 0 to 2
collect #\*)
" " text))))
(in-package :cl-user)
(defpackage :nclack-test-system
(:use :cl :asdf))
(in-package :nclack-test-system)
(defsystem nclack-tests
:depends-on (:nclack
:fiveam
:flexi-streams
:cl-fad
(let ((*git-author* "PuercoPolka")
(*git-email* "[email protected]"))
(declare (special *git-author*)
(special *git-email**))
(and (boundp '*git-author*)
(boundp '*git-email*)))
(defun next-candidate (candidate)
(labels ((iter-helper (xs &optional prev-item)
(if (null (first xs))
(rotatef (first xs) prev-item)
(iter-helper (rest xs) (first xs)))))
(when (null (first candidate))
(signal 'no-more-combinations))
(iter-helper candidate)))
(defvar test (list 1 nil 2))
@PuercoPop
PuercoPop / gist:6185388
Created August 8, 2013 15:02
Abhorrent Interface implementation
(defun make-interface (&rest args &key &allow-other-keys)
(let ((methods (make-hash-table)))
(loop for (name function . rest) on args by #'cddr
do
(setf (gethash name methods) function))
(lambda (action name &optional value)
(ecase action
(:get (gethash name methods))