This file contains hidden or 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 logging | |
| from sleekxmpp import ClientXMPP | |
| from sleekxmpp.exceptions import IqError, IqTimeout | |
| import subprocess | |
| import smtplib | |
| import mimetypes | |
| import email | |
| import email.mime.application | |
| import thread | |
| import os |
This file contains hidden or 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 os | |
| import sys | |
| import pythoncom, pyHook | |
| import win32api | |
| import subprocess | |
| import ctypes | |
| import threading | |
| from multiprocessing import * | |
| import time |
This file contains hidden or 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
| i=0 | |
| sum=0 | |
| giveup3=0 | |
| giveup5=0 | |
| lim=1000 | |
| while True: | |
| num3=3*i #generating multiples for processing | |
| num5=5*i # ^ | |
| if num3>=lim: # if multiple of 3>limit then stop adding those, and set flag | |
| giveup3=1 |
This file contains hidden or 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
| def testvivek(): | |
| i=0 | |
| sum=0 | |
| giveup3=0 | |
| giveup5=0 | |
| lim=1000 | |
| while True: | |
| num3=3*i #generating multiples for processing | |
| num5=5*i # ^ | |
| if num3>=lim: # if multiple of 3>limit then stop adding those, and set flag |
This file contains hidden or 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
| print ''.join([i[1] for i in enumerate('This page contains examples and source code') if i[0] in [0,2,5,11,12,14,15,23,24,25,26]]) |
This file contains hidden or 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
| multislice=lambda mainstring,indices: ''.join([i[1] for i in enumerate(mainstring) if i[0] in indices]) | |
| print multislice('This page contains examples and source code',[0,2,5,11,12,14,15,23,24,25,26]) |
This file contains hidden or 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
| In [1]: import webbrowser,re | |
| In [2]: for sub in ('http://www.reddit.com/r/'+subreddit for subreddit in (match.group(1) for match in [re.search('Chaouche: (.+)',line) for line in open('subreddits.txt').read().split('\n')])): webbrowser.open(sub) |
This file contains hidden or 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
| (5:56:52 AM) Yassine Chaouche: ContagiousLaughter | |
| (5:57:41 AM) Yassine Chaouche: todayilearned | |
| (5:57:46 AM) Yassine Chaouche: sysadmin | |
| (5:57:51 AM) Yassine Chaouche: happycrowds | |
| (5:57:57 AM) Yassine Chaouche: MusicForConcentration | |
| (5:58:01 AM) Yassine Chaouche: learnprogramming | |
| (5:58:09 AM) Yassine Chaouche: groovesharkplaylists | |
| (5:58:13 AM) Yassine Chaouche: Anticonsumption | |
| (5:58:17 AM) Yassine Chaouche: learnpython | |
| (5:58:32 AM) Yassine Chaouche: AskReddit |
This file contains hidden or 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
| >>> reduce(lambda x,y: x+y, xrange(int(raw_input('enter first number: ')),int(raw_input('Enter second number: '))+1) ) | |
| enter first number: 4 | |
| Enter second number: 7 | |
| 22 |
This file contains hidden or 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 base64 | |
| print ("Welcome to the encoder of Base64 :3") | |
| print ("Please enter your string that you need to encode :") | |
| rawString = input() | |
| encodedString = base64.b64encode(bytes(rawString,'utf-8')) | |
| print ("Encoded :" + str(encodedString) ) |
OlderNewer