x | y = f(x) = x^2+5 |
---|---|
-6 | 41 |
-5 | 30 |
-4 | 21 |
-3 | 14 |
-2 | 9 |
-1 | 6 |
0 | 5 |
1 | 6 |
This file contains 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 java.util.Date; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
public class ThreadEvents implements Runnable | |
{ | |
final long timeInterval = 60*1000; | |
private Thread theThread; | |
This file contains 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 javax.swing.JOptionPane; | |
public class NotifyEvent | |
{ | |
NotifyEvent(String msg) | |
{ | |
JOptionPane.showMessageDialog(null,msg, | |
"Event Notification", | |
JOptionPane.PLAIN_MESSAGE); | |
} |
This file contains 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
#!/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 |
This file contains 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
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) |
This file contains 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
#include <iostream> | |
#include <vector> | |
#include <set> | |
#include <cstring> | |
#include <string> | |
#include <map> | |
#include <queue> | |
#include <algorithm> | |
using namespace std; |
This file contains 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 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) |
This file contains 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 sympy as sp | |
x = sp.Symbol('x') | |
f = x**2 + 5 | |
f_prime = f.diff(x) | |
print(f_prime) |
This file contains 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
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) |
This file contains 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
x | y = f(x) = x² + 5 | |
---|---|---|
-6 | 41 | |
-5 | 30 | |
-4 | 21 | |
-3 | 14 | |
-2 | 9 | |
-1 | 6 | |
0 | 5 | |
1 | 6 | |
2 | 9 |