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
CREATE OR REPLACE PROCEDURE insert_a | |
AS | |
tgl varchar2(12); | |
msg varchar2(3500); | |
JAM DATE; | |
file UTL_FILE.FILE_TYPE; | |
bat UTL_FILE.FILE_TYPE; | |
file_scripts UTL_FILE.FILE_TYPE; | |
begin | |
file := UTL_FILE.FOPEN('C:\TEMP', 'insert A.txt','w', 8000); |
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
<? | |
date_default_timezone_set('Asia/Jakarta'); | |
error_reporting(E_ERROR); | |
//################ | |
//Connect ke Mysql | |
// $db = mysql_connect("localhost" , "root", "root") or die ("could not connect to mysql."); | |
$db = mysql_connect("www.sparelog.com" , "rachmatg_tinem", "tinem") or die (date("Y M D d H:i:s") ." >> could not connect to sparelog db.\r\n"); | |
echo date("Y M D d H:i:s") . " >> Sparelog Connection OK \r\n"; |
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
$(document).ready(function(){ | |
var currentBin = '', | |
latestScanned = ''; | |
var bin = []; | |
var binContent = [], | |
scanned = []; | |
var req; | |
var stocktake_id = $('#id_stocktake').text(); | |
var au_success = $('#ding'), | |
au_load = $('#load'), |
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 os, datetime | |
from django.core.management.base import BaseCommand, CommandError | |
from django.db import connections | |
from django.conf import settings | |
import paramiko | |
SSH_USERNAME = getattr(settings, 'SSH_USERNAME', 'mulyo') | |
SSH_PASSWORD = getattr(settings, 'SSH_PASSWORD', 'toha123') |
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
<!doctype> | |
<html> | |
<head> | |
<!-- Include the PubNub Library --> | |
<script src="https://cdn.pubnub.com/pubnub.min.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<!-- Instantiate PubNub --> | |
<script type="text/javascript"> |
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
def create_num(num): | |
''' | |
Script Pythonfu untuk Gimp | |
''' | |
img = gimp.Image(384, 160, 1) | |
pdb.gimp_context_push() | |
text_layer = pdb.gimp_text_fontname(img, None, 60, 0, num, -1, True, 142, 0, "Ubuntu Bold Italic") | |
pdb.gimp_layer_resize_to_image(text_layer) | |
layer = pdb.gimp_image_flatten(img) | |
pdb.file_png_save_defaults(img, layer, "/tmp/%s.png" % num, "/tmp/%s.png" % num) |
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
// printFloat prints out the float 'value' rounded to 'places' places after the decimal point | |
void printFloat(float value, int places) { | |
// this is used to cast digits | |
int digit; | |
float tens = 0.1; | |
int tenscount = 0; | |
int i; | |
float tempfloat = value; | |
// make sure we round properly. this could use pow from <math.h>, but doesn't seem worth the import |
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 -*- | |
from urllib2 import urlopen | |
from HTMLParser import HTMLParser | |
products = open('produk.txt').readlines() | |
STATS_START = '<dl class=\'c-deflist\'' | |
STATS_END = '</dl>' |
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
def anomaly_detect(nama_pos, sampling_awal, sampling_akhir): | |
'''Return [('SamplingDate', 'SamplingTime', oldval, newval)]''' | |
pass | |
if __name__ == "__main__": | |
anomaly_detect('dengkeng', '2016-01-01', '2016-01-31') |
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
#Anomali Data Detection | |
import pandas as pd | |
#----------Data Preparation | |
df = pd.read_csv("E:/2.KULIAH/KP2_BBWS/DEBIT/tma_wonogiri.csv",header=None) | |
#colNaming | |
df.columns = ["DATE", "TIME", "OLD_VAL"] | |
#Combine column | |
df["DATETIME"] = df["DATE"].map(str) + " " + df["TIME"] |