Skip to content

Instantly share code, notes, and snippets.

View miawgogo's full-sized avatar
🐧
Processing Gender, Please Wait

Ceri Loosley miawgogo

🐧
Processing Gender, Please Wait
View GitHub Profile
def say(oldmsg):
newlines = ["\r", "\n"]
for char in newlines:
msg += oldmsg.split(char)
for text in msg:
count +=1
s.send(bytes("PRIVMSG %s :%s\r\n" % (CHANNEL, msg), "UTF-8"))
if count > 10:
break
return True
@miawgogo
miawgogo / ifexample.cs
Created February 24, 2016 16:20
If example
if (score == 100){
// your code here
}else if(Question num == 10){
//your code here
}
9 29 ms 29 ms 30 ms be3035.ccr21.lon01.atlas.cogentco.com [130.117.14.169]
10 29 ms 29 ms 29 ms be2350.ccr41.lon13.atlas.cogentco.com [154.54.39.185]
11 109 ms 109 ms 109 ms be2317.ccr41.jfk02.atlas.cogentco.com [154.54.30.185]
12 115 ms 115 ms 116 ms be2482.ccr21.cle04.atlas.cogentco.com [154.54.27.157]
13 128 ms 125 ms 126 ms be2717.ccr41.ord01.atlas.cogentco.com [154.54.6.221]
14 137 ms 138 ms 137 ms be2831.ccr21.mci01.atlas.cogentco.com [154.54.42.165]
15 149 ms 149 ms 149 ms be2128.ccr21.den01.atlas.cogentco.com [154.54.25.173]
16 161 ms 160 ms 161 ms be2126.ccr21.slc01.atlas.cogentco.com [154.54.25.66]
17 182 ms 180 ms 181 ms be2085.ccr21.sea02.atlas.cogentco.com [154.54.2.197]
18 181 ms 181 ms 180 ms be2084.ccr22.sea01.atlas.cogentco.com [154.54.0.253]
!help - Uh, this.
!about - Was JBot coded or did it spontaniously come into existence?
!uptime - How long has JBot been continuously running?
!bacon - Delicious bacon.
!bitavg - Bitcoin averages from bitcoinaveages.com
!btcetick - Bitcoin Ticker (BTC-E)
!dogetick - Dogecoin Ticker (BTer)
!link - Know the link for that? Suggest it and make the show better.
!next - When's the next live show?
!schedule - What shows are being recorded live in the next seven days?
*
/\
/~~\
/~~~~\
/~~~~~~\
/~~~~~~~~\
/~~~~~~~~~~\
/~~~~~~~~~~~~\
/~~~~~~~~~~~~~~\
¯¯¯¯¯¯|_|¯¯¯¯¯¯¯
@miawgogo
miawgogo / Wifi info
Created December 14, 2015 17:17
Wifi info
IEEE 802.11abgn ESSID:"***"
Mode:Managed Frequency:5.18 GHz Access Point: ***
Bit Rate=150 Mb/s Tx-Power=22 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=50/70 Signal level=-60 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:166 Missed beacon:0
@miawgogo
miawgogo / code and error.py
Last active December 11, 2015 16:44
code and error
def getsunrise(lat="", lng="", formatted=1):
if lat=="" or lng == "":
print "Developer failed to Get lat and long to libary, atempting libary devloper method, uses the internet"
api=urllib2.urlopen("http://freegeoip.net/json/")
lat=str(json.loads(api.read().decode("UTF-8"))["latitude"])
print lat
lng=str(json.loads(api.read().decode("UTF-8"))["longitude"])
sunapi=urllib2.urlopen("http://api.sunrise-sunset.org/json?lat=" + lat + "&lng=" + lng + "&formatted=" + formatted)
return json.loads(sunapi.read().decode("UTF-8"))['results']['sunrise']
#!/usr/bin/env python3
import socket
import string
from lxml import html
import requests
import json
import urllib.request
from html import unescape
import re
<-- mtcos ([email protected]) has quit (Quit: Konversation terminated!)
<-- ceed^ ([email protected]) has quit (Operation timed out)
<-- louis_ ([email protected]) has quit (Operation timed out)
--> keyboard-k ([email protected]) has joined #jupiterbroadcasting
--> ceed^ ([email protected]) has joined #jupiterbroadcasting
<-- kookieless ([email protected]) has quit (Ping timeout: 964 seconds)
--> amahoola ([email protected]) has joined #jupiterbroadcasting
--> louis_ ([email protected]) has joined #jupiterbroadcasting
<-- amahoola ([email protected]) has left #jupiterbroadcasting
--> CTtechguy ([email protected]) has joined #jupiterbroadcasting
#Ioan Loosley, CC0
import urllib2
f = open('lastip', "r+")
pubipsite = urllib2.urlopen("http://ipecho.net/plain")
pubip = pubipsite.read()
lastip = f.read()
if pubip != lastip:
#put code here
print "Ip changed to", pubip
f.seek(0)