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
<?php | |
function splitWords($paragraph, $numberOfWords) { | |
$returnArray = array(); | |
$splittedString = explode(" ", $paragraph); | |
$counter = 0; | |
$counter2 = 0; | |
for($x = 0; $x < count($splittedString); $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
""" | |
.. module:: qotd_shit | |
.. moduleauthor:: Ferdinand (The **Brain Damage**) Silva <ferdinandsilva@ferdinandsilva.com> | |
Just got bored again and played around with some few lines of code in Python | |
================================ | |
List of operational QOTD Servers | |
================================ |
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
""" | |
Goto https://github.com/six519/python-simsimi | |
""" | |
from python_simsimi import SimSimi | |
from python_simsimi.language_codes import LC_FILIPINO | |
from python_simsimi.simsimi import SimSimiException | |
simSimi = SimSimi( | |
conversation_language=LC_FILIPINO, | |
conversation_key='<API KEY>' |
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.*; | |
import java.lang.*; | |
class ReversedBinaryToDecimal { | |
public static void main(String args[]) { | |
Scanner scanner = new Scanner(System.in); | |
int decimalNumber; |
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
#!/usr/bin/env php | |
<?php | |
$stdIn = fopen("php://stdin","r"); | |
$lineInput = fgets($stdIn); | |
if($lineInput >= 1 && $lineInput <= 1000000000) { | |
echo bindec(strrev(decbin($lineInput))), "\n"; | |
} else { | |
echo "Invalid input\n"; |
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
#!/usr/bin/env python | |
if __name__ == "__main__": | |
decimalNumber = raw_input() | |
try: | |
decimalNumber = int(decimalNumber) | |
if decimalNumber >= 1 and decimalNumber <= 1000000000: |
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
#!/usr/bin/env python | |
""" | |
:) :) :) :) | |
""" | |
if __name__ == "__main__": | |
inputs = [] | |
while 1: |
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
""" | |
If you want to talk to Elbot!!!!!! | |
""" | |
import urllib | |
import urllib2 | |
def talk_to_elbot(msg): | |
data = { | |
'IDENT':'J0YOjADZAb', |
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
#!/usr/bin/env python | |
""" | |
Install requests first | |
====================== | |
* pip install requests | |
""" | |
import requests | |
gists = requests.get('https://api.github.com/users/six519/gists') #change six519 to your username |
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
""" | |
* Install feedparser first | |
pip install feedparser | |
""" | |
import feedparser | |
gitHubFeeds = feedparser.parse('https://github.com/six519.atom') #change six519 to your username | |
for entry in gitHubFeeds['entries']: |
OlderNewer