Skip to content

Instantly share code, notes, and snippets.

View abdalimran's full-sized avatar
💻
Focusing

Abdullah Al Imran abdalimran

💻
Focusing
View GitHub Profile
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
public class ThreadEvents implements Runnable
{
final long timeInterval = 60*1000;
private Thread theThread;
import javax.swing.JOptionPane;
public class NotifyEvent
{
NotifyEvent(String msg)
{
JOptionPane.showMessageDialog(null,msg,
"Event Notification",
JOptionPane.PLAIN_MESSAGE);
}
#!/bin/bash
# Created by: Abdullah Al Imran
# Email: [email protected]
#Adding PPA
add-apt-repository -y ppa:atareao/atareao
add-apt-repository -y ppa:caffeine-developers/ppa
add-apt-repository -y ppa:diesch/testing
add-apt-repository -y ppa:eugenesan/ppa
library("dplyr")
df1 <- data.frame(a = 1:5, b=letters[1:5])
df2 <- data.frame(a = 1:3, b=letters[1:3])
anti_join(df1,df2)
#include <iostream>
#include <vector>
#include <set>
#include <cstring>
#include <string>
#include <map>
#include <queue>
#include <algorithm>
using namespace std;
@abdalimran
abdalimran / tab.md
Last active November 13, 2017 13:27
x y = f(x) = x^2+5
-6 41
-5 30
-4 21
-3 14
-2 9
-1 6
0 5
1 6
import numpy as np
def func(x):
return x**2+5
x = np.array([-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6])
y = func(x)
print(x)
print(y)
import sympy as sp
x = sp.Symbol('x')
f = x**2 + 5
f_prime = f.diff(x)
print(f_prime)
gamma = 0.001
x = 6
iterations = 5000
for i in range(0,iterations):
x_gradient = 2*x
x1 = x - gamma * x_gradient
x = x1
print("iterations =",iterations,"\nx = ",x)
@abdalimran
abdalimran / y.csv
Last active May 8, 2018 05:33
y = x^2 + 5
x y = f(x) = x² + 5
-6 41
-5 30
-4 21
-3 14
-2 9
-1 6
0 5
1 6
2 9