Skip to content

Instantly share code, notes, and snippets.

View t3hami's full-sized avatar

Muhammad Tehami t3hami

View GitHub Profile

Keybase proof

I hereby claim:

  • I am t3hami on github.
  • I am tehami (https://keybase.io/tehami) on keybase.
  • I have a public key whose fingerprint is 7B07 504A CECC 393A D77D 525C 6CCD C54D B29B 4E9C

To claim this, I am signing this object:

@t3hami
t3hami / links.md
Created January 21, 2020 09:33 — forked from g0t4/links.md
Starting Point Files for Jenkins2 Getting Started course
import re
f = open('helloworld.c','r')
operators = {
'=': 'Assignment Operator',
'+': 'Additon Operator',
'-' : 'Substraction Operator',
'/' : 'Division Operator',
'*': 'Multiplication Operator',
@t3hami
t3hami / ibm_watson_speech2text.py
Last active February 26, 2019 18:09
A python 3 script to get text from an audio recorded file using IBM Watson speech to text service.
from os.path import join, dirname
from watson_developer_cloud import SpeechToTextV1
service = SpeechToTextV1(
url = 'https://stream.watsonplatform.net/speech-to-text/api',
iam_apikey = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
models = service.list_models().get_result()
model = service.get_model('en-US_BroadbandModel').get_result()
@t3hami
t3hami / fetch_tweets.py
Created February 26, 2019 17:34
A python 3 script to fetch tweets from twitter API and save them in a JSON file.
import tweepy, json
consumer_key = 'XXXXXXXXXXXXXXX'
consumer_secret = 'XXXXXXXXXXXXXXX'
access_token = 'XXXXXXXXXXXXXXX'
access_token_secret = 'XXXXXXXXXXXXXXX'
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth, wait_on_rate_limit = True)
#include <iostream>
using namespace std;
int main()
{
int a[] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31};
int b[] = {2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, 31};
int c[] = {4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 31};
int d[] = {8, 9, 10, 11, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31};
int e[] = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
@t3hami
t3hami / is_prime.py
Created August 4, 2018 18:15
A simple, compact and efficient program to check whether a given number is prime or not, and returns a boolean value.
def is_prime(num):
'''Cheking remainder from 2 to half of the value(Or floor).'''
for n in range(2, num // 2):
if num % n is 0:
return False
return True