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 re | |
import imaplib | |
import email | |
import datetime | |
import json | |
EMAIL_FROM = 'sparelog_hwi' | |
EMAIL_HOST = '' | |
EMAIL_USER = '' | |
EMAIL_PASS = '' |
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 re | |
import os, glob | |
order_num = [] | |
filelist = glob.glob(os.path.join('.', 'feb_*.txt')) | |
re_order_num = re.compile('Order No: (?P<orderno>\d+)') | |
for f in filelist: |
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
>>> # untuk import Lead Time yang berupa Matriks | |
>>> | |
>>> rdr = csv.reader(lines, delimiter='\t') | |
>>> h = rdr.next()[1:] | |
>>> for d in rdr: | |
... if d[0] != 'TANJUNG PANDAN': | |
... p1 = dpool[d[0]] | |
... i = 1 | |
... for np in h: | |
... if np != 'TANJUNG PANDAN': |
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
>>> # banyaknya Pool | |
>>> from hsm.models import Pool | |
>>> jumlah_pool = Pool.objects.count() | |
>>> # menampilkan nama-nama pool | |
>>> for p in Pool.objects.all(): | |
... p.name | |
... | |
>>> # menampilkan nama dan region Pool yang ada di Region 3 |
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
[ui] | |
username = 'Widoyo <[email protected]>' | |
[paths] | |
default-push = http://[email protected]/widoyo/sparelog-hsm | |
[hooks] | |
precommit.put_rev = .hg/put_rev.sh |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Aug 27 09:16:20 2010 | |
@author: g.junqueira | |
AGA3 METER GAS CALCULATION IMPLEMENTATION as a callable Python function | |
""" | |
import math |
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
#Connection Strings | |
$Database = "Database" | |
$Server = "SQLServer" | |
#SMTP Relay Server | |
$SMTPServer = "smtp.domain.com" | |
#Export File | |
$AttachmentPath = "C:\SQLData.csv" | |
# Connect to SQL and query data, extract data to SQL Adapter | |
$SqlQuery = "SELECT * FROM dbo.Test_Table" | |
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection |
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
#Connection Strings | |
$Database = "Database" | |
$Server = "SQLServer" | |
#Export File | |
$AttachmentPath = "C:\SQLData.csv" | |
# Connect to SQL and query data, extract data to SQL Adapter | |
$SqlQuery = "SELECT * FROM dbo.Test_Table" | |
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection |
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
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
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
function init() { | |
var serverBaseUrl = document.domain; | |
/* | |
On client init, try to connect to the socket.IO server. | |
Note we don't specify a port since we set up our server | |
to run on port 8080 | |
*/ | |
var socket = io.connect(serverBaseUrl); |