Skip to content

Instantly share code, notes, and snippets.

# -*- 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)
//context of TrackingPixelList.txt
var mydata1 = "hello ";
var mydata2 = "fox jumps over ";
var mydata3 = "the lazy dog";
// end of text file
@PuercoPop
PuercoPop / Populate circuits
Created June 6, 2012 00:58 — forked from gnrfan/Populate circuits
small snippet to replicate circuits in development database
import random
from circuits.models import Circuit
from user_profile.models import UserProfile
circuits = Circuit.objects.all()
profiles = UserProfile.objects.all()
countdown = 100
while countdown > 0:
circuit = random.choice( circuits )
@PuercoPop
PuercoPop / gist:2332771
Created April 7, 2012 23:18
card app model
class Gifts(models.Model):
"""
Represents the relationship between a Card, and Accounts
"""
#created_by?
number of coupons