Skip to content

Instantly share code, notes, and snippets.

View yask123's full-sized avatar
👨‍💻

Yask Srivastava yask123

👨‍💻
View GitHub Profile
@yask123
yask123 / prime_factor.py
Last active August 29, 2015 14:04
Finding Prime Factors
import math
def isprime(n):
for num in range(2,math.floor(math.sqrt(n))+1):
if n%num==0:
return(False)
return(True)
def findfactors(n):
class Student(list):
def __init__(self,a_name,a_age,a_branch,a_pointers):
list.__init__([])
self.name=a_name
self.age=a_age
self.branch=a_branch
self.append(a_pointers)
def top_pointer(self):
return(sorted(self)[0])
@yask123
yask123 / fibo.py
Created July 21, 2014 10:11
Generating Fibonacci Series
def gen_fibo(n):
a,b=0,1
while(a<n):
print(a,end=' ')
a,b=b,a+b
print()
gen_fibo(100)
<?php
include ‘connection.php’;
$query = “SELECT * FROM people”;
$result = mysql_query($query);
while($person = mysql_fetch_array($result))
{
echo “<h3>”.$person[‘Name’].”</h3>”;
}
echo “<h2>YIPEEE , I finally outputted data from mysql !!</h2>”;
echo “GREAT SUCCESS!!!!!!!!!”;
public class Palin
{
public static void main(String args[])
{
Palin ob = new Palin();
int max=0;int tmp=0;
for(int i=100;i<999;i++)
{
for(int j=100;j<999;j++)
public class test
{
public void run()
{
System.out.println("Hello World");
}
}