Skip to content

Instantly share code, notes, and snippets.

View yudanta's full-sized avatar

Yudanta yudanta

View GitHub Profile
@yudanta
yudanta / blast_wa.py
Created January 11, 2021 16:50
Simple script to automate sending text to multiple recipients in WA (blast)
#!/usr/bin/env python
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
import time
# txt to be sent
@yudanta
yudanta / mpi_integral.c
Created December 16, 2013 02:01
example
/* Program ini membandingkan estimasi trapezoidal rule integral dari F(x)= exp (x)
Program ini memerlukan panggilan berikut :
-MPI_Init
-MPI_Comm_rank
-MPI_Comm_size
-MPI_Finalize
Program Membutuhkan Input:
#!/usr/bin/env python
'''
stemmer porting from ivanlanin stemmer (php script)
https://github.com/ivanlanin/pengakar
'''
import sys
import re
import json
from os import path
@yudanta
yudanta / gitlab_webhook_post_receive.php
Last active January 3, 2016 22:09
simple php script to handle gitlab webhook post data
<?php
try {
if ($HTTP_RAW_POST_DATA)
{
if ($git_hook_data = json_decode($HTTP_RAW_POST_DATA))
{
$fn = fopen('hook.log.txt', 'w') or die('cant open file');
fwrite($fn, "hook data received at: ".date('Y-m-d H:i:s')."\n");
fwrite($fn, print_r($git_hook_data, true));
// Author: Wes Kendall
// Copyright 2011 www.mpitutorial.com
// This code is provided freely with the tutorials on mpitutorial.com. Feel
// free to modify it for your own use. Any distribution of the code must
// either provide a link to www.mpitutorial.com or keep this header in tact.
//
// An intro MPI hello world program that uses MPI_Init, MPI_Comm_size,
// MPI_Comm_rank, MPI_Finalize, and MPI_Get_processor_name.
//
#include <mpi.h>
@yudanta
yudanta / mpi_pararel.c
Created December 16, 2013 02:23
compiling : $ mpicc parallel_integral.c -o pararel testing : $ ./pararel 1 2 3
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <sys/time.h>
#include <mpi.h>
double f(double a){
return (a*exp(2*a));
//return a;
}
@yudanta
yudanta / time_to_epoch
Created June 23, 2015 04:20
Simple time to epoch
#!/usr/bin/perl
#$second = waktu dalam detik
#$minute = waktu dalam menit
#$hour = waktu dalam jam (1-24)
#$day = hari
#$month = 0 => january 11 => december
#$year = tahun
use Time::Local 'timelocal';
@yudanta
yudanta / substitution_caesar_chiper
Created June 19, 2015 07:31
Caesar Cipher With Substitution
Break this cipher text
Text: rugf sgozj rgaiutozj fmnc kgpe lmnc mzs jg uemxiq
Key: mlnsiwjtoycqazgfberupxvdkh
hint:
this is an improvement method for caesar cipher text.
this cipher using substitusion based method (please mind the key)
alphabet: abcdefghijklmnopqrstuvwxyz
@yudanta
yudanta / AndoidManifest
Created June 8, 2015 18:00
AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.nuwira.nwrandroiddev" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />