#voice-chat-text-0
1 messages · Page 604 of 1
oh.
@whole bear
Check out the Jesus Chatline twitter handle: https://twitter.com/jesus_chatline
Jesus Chatline instagram: https://www.instagram.com/jesus_chatline_/
Richard Burnish's Twitter: https://twitter.com/Burnishisalive?lang=en
Jesus Chatline reddit community: https://www.reddit.com/...
ash = ("trash")
I have a windows server too~
Check out the Jesus Chatline twitter handle: https://twitter.com/jesus_chatline
Jesus Chatline instagram: https://www.instagram.com/jesus_chatline_/
Richard Burnish's Twitter: https://twitter.com/Burnishisalive?lang=en
Jesus Chatline reddit community: https://www.reddit.com/...
my monitors
👀
wow
@sleek tiger What was that document with peoples' names and passwords you posted?
If it's not real people, then it's OK, but it looked like it might be.
maybe
Maybe what?
from 3 years ago yeah
I see you just deleted it. So why are you posting the names of real people in a spreadsheet with passwords?
the names weren't real
Right, like Zeek Bailey
I would really rather be making breakfast than doing this, so I'll ask you to familiarize yourself with the server rules and code of conduct
ok
@sleek tiger I see you've already been warned once yesterday for posting an inappropriate image in the server. If you keep making work for mods you might find yourself muted or worse.
Please don't make us work. We would rather do nothing all day.
ok m8 take a day off.
Thank you.
I liek
trying to calculate p-value from quantum random numbers
@last pelican https://docs.microsoft.com/en-us/quantum/
they have python examples
i have everything already
oh
i m sorry ,could you tell me how to build up a random forest
@river basin What is a random forest?
it's a type of classifier in machine learning
0--------1.1
where did everyone go
All that talk made me think of https://en.wikipedia.org/wiki/Cantor's_paradox
@broken marsh Need some help?
yeah
Whatcha need help with
posted on #help-apple
One sec
In this episode, we take a look inside the abandoned Northridge Mall in Milwaukee, Wisconsin that's been closed since the early 2000's.
This episode features music by Obras Ocultas, check them out here:
https://soundcloud.com/obras-ocultas
Thanks to JonRev for the radio ad r...
So I did this in 3 hours so it’s not that great but this is my last doomer video. They’re all kind of cringe. I like making these kind of videos but I’m not going to make anything doomer related.
“Where is My Mind” is a really good song though
do you reckon they have to wait for cops to go in and clear the place of anyone staying there before filming
is this heaven
i saw the light
YouTube
FAQ: http://theproperpeople.com/about/ We are two friends, Bryan and Michael, who travel in search of abandoned buildings to explore and photograph. We film ...
custom icons in windows 10?
We're playing jackbox
Oh
Text chat in #591999731325075487 if you want to play too
0°C = 32°F 0°C+0°C=64°F
@graceful grail
Using shown methods in video, you should be able to follow along with me and grab a screen in different ways as well, it's certainly not required that you use method I use, but that's what I will be using.
Text tutorial: https://pylessons.com/Tensorflow-object-detection-grab...
def get_screen(x_left, y_top, x_right, y_bot):
x_left = int(x_left)
y_top = int(y_top)
x_right = int(x_right)
y_bot = int(y_bot)
# print("grabbing screen" + str((x_left, y_top, x_right, y_bot)))
screen = array(ImageGrab.grab(bbox=(x_left, y_top, x_right, y_bot)))
screen = cv2.cvtColor(screen, cv2.COLOR_RGB2BGR)
test = cv2.imread(resource_path("Cold Osha.PNG"))
test = cv2.resize(test,(500,500))
cv2.imshow('Screen',test) # <- this line triggers segmentation fault
return screen
int("123")
sudo python3 -Xfaulthandler autopilot.py
get_screen((1/3)*SCREEN_WIDTH, (1/3)*SCREEN_HEIGHT,(2/3)*SCREEN_WIDTH, (2/3)*SCREEN_HEIGHT)
from dev_autopilot import get_screen
get_screen(10, 10, 100, 100)
A power company in the Midwest hired a group of white hat hackers known as RedTeam Security to test its defenses. We followed them around for 3 days, as they attempted to break into buildings and hack into its network, with the goal of gaining full access. And it was all much ...
Hey @median zenith!
It looks like you tried to attach file type(s) that we do not allow (.log). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
Hey @median zenith!
It looks like you tried to attach file type(s) that we do not allow (.log). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
def filter_orange2(image=None, testing=False):
while True:
if testing:
hsv = get_screen((1/3)*SCREEN_WIDTH, (1/3)*SCREEN_HEIGHT,(2/3)*SCREEN_WIDTH, (2/3)*SCREEN_HEIGHT)
else:
hsv = image.copy()
# converting from BGR to HSV color space
hsv = cv2.cvtColor(hsv, cv2.COLOR_BGR2HSV)
# filter Elite UI orange
filtered = cv2.inRange(hsv, array([15, 220, 220]), array([30, 255, 255]))
if testing:
cv2.imshow('Filtered', filtered)
if cv2.waitKey(25) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
else:
break
return filtered
You have spent lots of money on a high-grade, pick-resistant, ANSI-rated lock for your door. Your vendor has assured you how it will resist attack and how difficult it would be for someone to copy your key. Maybe they’re right. But… the bulk of attacks that both penetration te...
-> cv2.imshow('Screen',test)
(Pdb) w
/usr/lib/python3.6/threading.py(884)_bootstrap()
-> self._bootstrap_inner()
/usr/lib/python3.6/threading.py(916)_bootstrap_inner()
-> self.run()
/usr/lib/python3.6/threading.py(864)run()
-> self._target(*self._args, **self._kwargs)
/home/speed/Desktop/EDAutopilot/dev_autopilot.py(1059)autopilot()
-> align()
/home/speed/Desktop/EDAutopilot/dev_autopilot.py(835)align()
-> while sun_percent() > 5:
/home/speed/Desktop/EDAutopilot/dev_autopilot.py(602)sun_percent()
-> screen = get_screen((1/3)*SCREEN_WIDTH, (1/3)*SCREEN_HEIGHT,(2/3)*SCREEN_WIDTH, (2/3)*SCREEN_HEIGHT)
> /home/speed/Desktop/EDAutopilot/dev_autopilot.py(396)get_screen()
-> cv2.imshow('Screen',test)
<class 'numpy.ndarray'>
(500, 500, 3)
(28306, 139834729309952)
while True:
if whattoshow["img"] is not None:
cv2.imshow('Filtered', whattoshow["img"])
if cv2.waitKey(25) & 0xFF == ord('q'):
cv2.destroyAllWindows()
whattoshow["img"] = None
sleep(1)
whattoshow = {
"img": None,
}```
from debugshow import whattoshow
Exception in thread myTray:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/speed/Desktop/EDAutopilot/dev_tray.py", line 75, in tray
icon.run(setup)
File "/home/speed/.local/lib/python3.6/site-packages/pystray/_base.py", line 188, in run
self._run()
File "/home/speed/.local/lib/python3.6/site-packages/pystray/_util/gtk.py", line 64, in _run
signal.signal(signal.SIGINT, signal.SIG_DFL)
File "/usr/lib/python3.6/signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
Run '/etc/init.d/logmein-hamachi start' to start daemon.
sudo: systemctrl: command not found
systemctl logmein-hamachi.service start
with image_lock:
cv2.imshow('image',self.image)
cv2.waitKey(25)
Unknown operation logmein-hamachi.service.
lock = threading.Lock()
logmein-hamachi
yay hamachi
error: target not found: hamachi
with lock:
cv2.imshow('image',test)
cv2.waitKey(25)
return screen
with lock:
cv2.imwrite(resource_path("output.PNG"))
cv2.waitKey(25)
sudo pamac install logmein-hamachi
Error: target not found: logmein-hamachi
threading.current_thread().__class__.__name__ == '_MainThread'
threading.current_thread().__class__.__name__ == '_MainThread'
@wraith ridge does that just make the current thread the main thread—somehow
no the == is checking equality, its a boolean that says if its the main thread
Ohhhh >.< derp
with open('/tmp/metadata.pdf', 'wb') as f:
f.write(response.content)
``` how to write filename automatically if there are many files i m trying to download?
How are you getting the filename?
response = requests.get(url)
from here
url = response.xpath('//div/a[@class="btn btn-primary"]//@href').extract()
If you know the filenames are clean, you can just copy the filename from the URL
i don't get it
let say i got response = 'https://www.aclweb.org/anthology/P19-1001.pdf'
i tried to do like filename =response.str.split('/') to get P19-1001.pdf but it doesn't work and pass the filename in
with open('filaname', 'wb') as f:
f.write(response.content)```
@whole bear
!e
response = 'https://www.aclweb.org/anthology/P19-1001.pdf'
print(response.split('/')[-1])
@whole bear :white_check_mark: Your eval job has completed with return code 0.
P19-1001.pdf
If it's the same in every instance, that'll get it for you
Then just do something like
looks like i wasn't printing while splitting
Then just do something like
@whole bear ?
Give me a sec, trying to find a script I did that's kind of like this
ok
Yeah, I can't find it
But it'd be something like
response = 'https://www.aclweb.org/anthology/P19-1001.pdf'
the_file = requests.get(response)
file_name = response.split('/')[-1]
with open(file_name, 'wb') as infile:
infile.write(the_file.content)
Not sure if that exactly will work, but it should set you in the right direction
yeah i was also thinking to do it
Pomodoro technique @rare pecan
@sleek tiger https://www.youtube.com/watch?v=sCZt2YipiIs @whole bear
In this week’s Sunday Spotlight, NBC’s Kelly Cobiella travels to Norway and goes inside what’s called one of the most humane prisons in the world and sees why it gets that distinction.
» Subscribe to TODAY: http://on.today.com/SubscribeToTODAY
» Watch the latest from TODAY: ht...
@sleek tiger https://www.youtube.com/watch?v=J1PNPcnffbk
CBS Discovery, TVNorge, Max, 2013
@whole bear
the guy geting arrested sounds like an ogre
if == "True"
print(pile_numbers[pile][len(pile_numbers[pile]) - 1][1])
await asyncio.gather(*listCommand)
.?*
def add(x,y):
return x+y
def subtract(x,y):
return x-y
def divide(x,y):
if y!=0:
return x/y
def multiply(x,y):
return x*y
func_dic = {'+': add, '-' : subtract, '/': divide, '*' : multiply}
operation = input("+ , - , *, /\n")
x = int(input("x: "))
y = int(input("y: "))
print('\n Value:',func_dic[operation](x,y))
@whole rover joph..remember me?
yeah pal, long time no see
Good, let's go to DMs since this is for voice channel chat
Oki
I didn't know you played RL
meh i'll join for a little bit until dinner's ready
.randomcase t
T
.randomcase hello
Hello
.randomcase hello does this work
HELlO does ThIS WORK
!e
import string
a = 'somebody once told me the world was gonna roll me'
b = []
upper_case = False
for each in range(0, len(a)):
if a[each] in string.ascii_letters:
if not upper_case:
b.append(a[each].lower())
upper_case = True
else:
b.append(a[each].upper())
upper_case = False
else:
b.append(a[each])
print(''.join(b))
@whole bear :white_check_mark: Your eval job has completed with return code 0.
sOmEbOdY oNcE tOlD mE tHe WoRlD wAs GoNnA rOlL mE
and then you can start it capitalized as well:
!e
import string
a = 'somebody once told me the world was gonna roll me'
b = []
upper_case = True
for each in range(0, len(a)):
if a[each] in string.ascii_letters:
if not upper_case:
b.append(a[each].lower())
upper_case = True
else:
b.append(a[each].upper())
upper_case = False
else:
b.append(a[each])
print(''.join(b))
@whole bear :white_check_mark: Your eval job has completed with return code 0.
SoMeBoDy OnCe ToLd Me ThE wOrLd WaS gOnNa RoLl Me
Just gotta switch the upper_case
@zealous wave #discord-bots would be able to help. Let me check it out
!e
a = 'somebody once told me the world was gonna roll me'
def spongebobify(src):
def _spongebobify(src):
c = iter(src)
try:
while True:
yield next(c).upper()
yield next(c).lower()
except: pass
return "".join(_spongebobify(src))
print(spongebobify(a))```
@elfin fractal :white_check_mark: Your eval job has completed with return code 0.
SoMeBoDy oNcE ToLd mE ThE WoRlD WaS GoNnA RoLl mE
👍
!e
Sorry, but you may only use this command within #bot-commands.
for item, function in position[:]:
[23, print]
(23, print)
var = var
pile_numbers = {0: [[((7, '7'), ':spades:'), True]], 1: [(((1, 'A'), ':hearts:'), False), (((1, 'A'), ':clubs:'), True)]}
👀
[((7, '7'), ':spades:'), True]
for card, bool in pile_numbers[:]:
return bool
print(pile_numbers[len(pile_numbers)-1][1])
import pyscreenshot as ImageGrab
File "./autopilot.py", line 1, in <module>
from dev_tray import tray
File "/home/l33tlinuxh4x0r/EDAutopilot-master/dev_tray.py", line 3, in <module>
from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE
File "/home/l33tlinuxh4x0r/EDAutopilot-master/dev_autopilot.py", line 14, in <module>
import cv2 # see reference 2
ImportError: libhdf5.so.103: cannot open shared object file: No such file or directory
def PressKey(Key):
print("keydown key: " + str(Key))
subprocess.call(["xdotool", "keydown", str(Key)])
def ReleaseKey(Key):
print("keyup key: " + str(Key))
subprocess.call(["xdotool", "keyup", str(Key)])
pynput vs xdotool
File "autopilot.py", line 1, in <module>
from dev_tray import tray
File "C:\Users\l33tlinuxh4x0r\Desktop\EDAutopilot-master\dev_tray.py", line 3, in <module>
from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE
File "C:\Users\l33tlinuxh4x0r\Desktop\EDAutopilot-master\dev_autopilot.py", line 371, in <module>
keys = get_bindings()
File "C:\Users\l33tlinuxh4x0r\Desktop\EDAutopilot-master\dev_autopilot.py", line 321, in get_bindings
bindings_tree = parse(latest_bindings)
File "C:\Program Files\Python38\lib\xml\etree\ElementTree.py", line 1202, in parse
tree.parse(source, parser)
File "C:\Program Files\Python38\lib\xml\etree\ElementTree.py", line 595, in parse
self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0```
print(latest_bindings)
path_bindings = environ['LOCALAPPDATA'] + "\Frontier Developments\Elite Dangerous\Options\Bindings"
bindings_tree = parse(latest_bindings)
def get_compass_image(testing=False):
compass_template = cv2.imread(resource_path("templates/compass.png"), cv2.IMREAD_GRAYSCALE)
compass_width, compass_height = compass_template.shape[::-1]
compass_image = compass_template.copy()
doubt = 10
while True:
screen = get_screen(434,499,683,744)
# mask_orange = filter_orange(screen)
equalized = equalize(screen)
PrintImmage("equalized",equalized)
# whattoshow["img"] = equalized
match = cv2.matchTemplate(equalized, compass_template, cv2.TM_CCOEFF_NORMED)
threshold = 0.3
loc = where( match >= threshold)
pt = (doubt, doubt)
for point in zip(*loc[::-1]):
pt = point
compass_image = screen[pt[1]-doubt : pt[1]+compass_height+doubt, pt[0]-doubt : pt[0]+compass_width+doubt].copy()
PrintImmage("compass_image",compass_image)
cv2.rectangle(screen, pt, (pt[0] + compass_width, pt[1] + compass_height), (0,0,255), 2)
PrintImmage("screen",screen)
if testing:
cv2.rectangle(screen, pt, (pt[0] + compass_width, pt[1] + compass_height), (0,0,255), 2)
cv2.imshow('Compass Found', screen)
cv2.imshow('Compass Mask', equalized)
cv2.imshow('Compass', compass_image)
if cv2.waitKey(25) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
else:
break
return compass_image, compass_width+(2*doubt), compass_height+(2*doubt)
screen = get_screen((5/16)*SCREEN_WIDTH, (5/8)*SCREEN_HEIGHT,(2/4)*SCREEN_WIDTH, (15/16)*SCREEN_HEIGHT)
keyboard.release(Key.f7)```
Traceback (most recent call last):
File "autopilot.py", line 1, in <module>
from dev_tray import tray
File "/home/speed/Desktop/EDAutopilot/dev_tray.py", line 3, in <module>
from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE
File "/home/speed/Desktop/EDAutopilot/dev_autopilot.py", line 16, in <module>
from pynput.keyboard import Key, Controller
File "/home/speed/.local/lib/python3.6/site-packages/pynput/__init__.py", line 40, in <module>
from . import keyboard
File "/home/speed/.local/lib/python3.6/site-packages/pynput/keyboard/__init__.py", line 52, in <module>
from ._xorg import KeyCode, Key, Controller, Listener
File "/home/speed/.local/lib/python3.6/site-packages/pynput/keyboard/_xorg.py", line 39, in <module>
from pynput._util.xorg import (
File "/home/speed/.local/lib/python3.6/site-packages/pynput/_util/xorg.py", line 40, in <module>
_check()
File "/home/speed/.local/lib/python3.6/site-packages/pynput/_util/xorg.py", line 38, in _check
display = Xlib.display.Display()
File "/home/speed/.local/lib/python3.6/site-packages/Xlib/display.py", line 89, in __init__
self.display = _BaseDisplay(display)
File "/home/speed/.local/lib/python3.6/site-packages/Xlib/display.py", line 71, in __init__
protocol_display.Display.__init__(self, *args, **keys)
File "/home/speed/.local/lib/python3.6/site-packages/Xlib/protocol/display.py", line 166, in __init__
raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":1": b'No protocol specified\n'
@supple magnet need your help with the code you shared
import requests
#import scrapy
#from scrapy.http import Request
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
#from scrapy.loader import ItemLoader
#from acl_anthology.items import AclAnthologyItem
class AclSpider(CrawlSpider):
name = 'acl'
allowed_domains = ['aclweb.org']
start_urls = ['https://aclweb.org/anthology/']
rules = [
Rule(LinkExtractor(allow = (r'venues/' ), restrict_xpaths=
'//table[1]/tbody/tr[position()<last()-1]/th/a')),
#https://www.aclweb.org/anthology/venues/acl/
Rule(LinkExtractor(allow = (r'venues/'), restrict_xpaths='//*[@class="col-sm"]//ul/li[position()<5]\
/a[not(contains( text(),("Workshop")) or contains(.,"Poster") \
or contains(.,"Demonstrations") or contains(.,"Tutorial Abstracts") \
or contains(.,"Student Session") or contains(.,"Demo") \
or contains(.,"Consortium")) or contains(.,"Issue") \
or contains(.,"Number")]')),
#https://www.aclweb.org/anthology/volumes/P19-1/
Rule(LinkExtractor(restrict_xpaths='(//strong/a[@class="align-middle" ])[position()>1]/@href'), callback='parse_item')
#https://www.aclweb.org/anthology/P19-1001/
]
def parse_item(self, response):
paper_url = response.xpath('//div/a[@class="btn btn-primary"]//@href').extract()
r = requests.get(paper_url)
filename = r.url.split('/')[-1]
with open(r.url, 'wb') as f:
f.write(r.content)
venue = response.xpath('//dd[6]/a/text()').extract()
abstract = response.xpath('//*[@id="main"]/div/div[1]/div/div/text()').extract()
yield{
'abstract':abstract,
'Venue':venue,
'file_name':filename,
}
``` this isn't following the links as expected and downloading the files
code is for web scraping with scrapy
it is only following first linkextractor link not other two.
Hey @broken marsh!
It looks like you tried to attach file type(s) that we do not allow (.txt). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
2020-03-16 18:50:05 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6024
2020-03-16 18:50:07 [scrapy.downloadermiddlewares.redirect] DEBUG: Redirecting (301) to <GET https://www.aclweb.org/anthology/> from <GET https://aclweb.org/anthology/>
2020-03-16 18:50:08 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.aclweb.org/anthology/> (referer: None)
2020-03-16 18:50:09 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.aclweb.org/anthology/venues/tacl/> (referer: https://www.aclweb.org/anthology/)
2020-03-16 18:50:10 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.aclweb.org/anthology/venues/semeval/> (referer: https://www.aclweb.org/anthology/)
2020-03-16 18:50:11 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.aclweb.org/anthology/venues/naacl/> (referer: https://www.aclweb.org/anthology/)
2020-03-16 18:50:11 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.aclweb.org/anthology/venues/eacl/> (referer: https://www.aclweb.org/anthology/)
2020-03-16 18:50:12 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.aclweb.org/anthology/venues/conll/> (referer: https://www.aclweb.org/anthology/)
2020-03-16 18:50:12 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.aclweb.org/anthology/venues/emnlp/> (referer: https://www.aclweb.org/anthology/)
2020-03-16 18:50:12 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.aclweb.org/anthology/venues/cl/> (referer: https://www.aclweb.org/anthology/)
2020-03-16 18:50:13 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.aclweb.org/anthology/venues/anlp/> (referer: https://www.aclweb.org/anthology/)
2020-03-16 18:50:14 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.aclweb.org/anthology/venues/acl/> (referer: https://www.aclweb.org/anthology/)
2020-03-16 18:50:14 [scrapy.core.engine] INFO: Closing spider (finished)
this is the output i am getting as it is only following links from first linkextractor
a = b
a^2 = ab
2-b^2 = ab-b^2
(a-b)(a+b) = b(a-b)
a+b = b
2b = b
/b
2 = 1
The proof that 2 = 1
human's eat more bananas than monkey's
I just learned something today thanks
thats true because most people have never eaten a monkey but they have eaten a banana
also your not supposed to eat past 8:00 then why is there a light bulb in the fridge.
If this doesn't blow your mind, I don't know what will.
Part 2: https://youtu.be/jsYwFizhncE
Part 3: https://youtu.be/brU5yLm9DZM
Brought to you by you: http://3b1b.co/clacks-thanks
New to this channel? It's all about teaching math visually. Take a look and see if there's a...
Hey @twilit lagoon!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
def listsort(arr):
MIN,MAX = min(arr),max(arr)
lst = [0] * (MAX-MIN+1)
for k in arr:
lst[k-MIN] += 1
return [k for l in [[i+MIN]*lst[i] for i in range(len(lst)) if lst[i]] for k in l]
while True:
listrange = int(input("Enter range \n"))
listlength = int(input("Enter list length \n"))
print(listsort([randint(0, listrange) for i in range(listlength)]))
input("Press enter to exit \n")
Just Helper, but I've brought it up in the relevant channel

👀
@twilit lagoon Who is?
Like the what
I have no idea who you're talking about
Engine actor?
Rami Malek, yeah.
Nope
It's Rami Malek 😄
@shell dome Which season/episode are you on
season 1 e2
Oh, you've got quite a lot to go through.
s4 is the best season
For some reason even though I have 0 intention of joining voice, my brain won't let me not read this channel - so I end up reading half a conversation
hello
QObject::moveToThread: Current thread (0x1208a50) is not the object's thread (0x14c1820).
Cannot move to target thread (0x1208a50)
Segmentation fault
def get_destination_offset(testing=True):
destination_template = cv2.imread(resource_path("templates/destination.png"), cv2.IMREAD_GRAYSCALE)
destination_width, destination_height = destination_template.shape[::-1]
pt = (0, 0)
width = 940 - 450
height = 520 - 280
centerx = int((1/2)*width)
centery = int((1/2)*height)
while True:
screen = get_screen(450,280,940,520)
mask_orange = filter_orange2(screen)
match = cv2.matchTemplate(mask_orange, destination_template, cv2.TM_CCOEFF_NORMED)
threshold = 0.4
loc = where( match >= threshold)
for point in zip(*loc[::-1]):
pt = point
final_x = int((pt[0] + ((1/2)*destination_width)) - ((1/2)*width))
final_y = int(((1/2)*height) - (pt[1] + ((1/2)*destination_height)))
endx = int((pt[0] + ((1/2)* destination_width)))
endy = int((pt[1] + ((1/2)*destination_height)))
if testing:
cv2.rectangle(screen, pt, (pt[0] + destination_width, pt[1] + destination_height), (0,0,255), 2)
cv2.line(screen,(centerx,centery),(endx,endy),(0, 255, 0),2)
# PrintImmage('Destination Found', screen)
# PrintImmage('Destination Mask', mask_orange)
cv2.imshow('Destination Found', screen)
cv2.imshow('Destination Mask', mask_orange)
if cv2.waitKey(25) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
else:
break
if pt[0] == 0 and pt[1] == 0:
result = None
else:
result = {'x':final_x, 'y':final_y}
logging.debug('get_destination_offset='+str(result))
return result
def get_screen(x_left, y_top, x_right, y_bot):
x_left = int(x_left)
y_top = int(y_top)
x_right = int(x_right)
y_bot = int(y_bot)
# print("grabbing screen" + str((x_left, y_top, x_right, y_bot)))
screen = array(ImageGrab.grab(bbox=(x_left, y_top, x_right, y_bot)))
screen = cv2.cvtColor(screen, cv2.COLOR_RGB2BGR)
return screen
def get_screen(x_left, y_top, x_right, y_bot):
screen = array(ImageGrab.grab(bbox=(x_left, y_top, x_right, y_bot)))
screen = cv2.cvtColor(screen, cv2.COLOR_RGB2BGR)
return screen
@median zenith
from dev_autopilot import *
import pyscreenshot as ImageGrab
while(True):
get_destination_offset()
Hey @median zenith!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
Hey @median zenith!
It looks like you tried to attach file type(s) that we do not allow (.7z). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
ModuleNotFoundError: No module named 'testdebugshow'
@median zenith
FileNotFoundError: [Errno 2] No such file or directory: 'mac path i dunno'
AttributeError: 'NoneType' object has no attribute 'shape'
beeware
why wont it loAd
Why won't what?
The last attachment?
🤔
I think it's just a static image .gif as opposed to a moving one
It's just a blank image yeah
def filter_blue(image=None, testing=False):
while True:
if testing:
hsv = get_screen(497,297,923,537)
else:
hsv = image.copy()
# converting from BGR to HSV color space
hsv = cv2.cvtColor(hsv, cv2.COLOR_BGR2HSV)
# filter Elite UI orange
filtered = cv2.inRange(hsv, array([0, 0, 200]), array([180, 100, 255]))
PrintImmage("hsv",hsv)
if testing:
cv2.imshow('Filtered', filtered)
if cv2.waitKey(25) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
else:
break
return filtered
Hey @dapper current!
It looks like you tried to attach file type(s) that we do not allow (.pdf). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
#include<iostream>
#include<string>
using namespace std;
int main()
{
string userinput = "Test";
string newuserinput;
int num;
while(true)
{
cout << "["<< num++ <<"] " << userinput;
if (userinput != "Test")
{
cout << "["<< num++ <<"] " << newuserinput;
}
}
return 0;
}
print('yeet')
how can i make my voice loop back to me so i now how's my mic and etc...
ubuntu
THX
while monstersHP > 0 or playerHP > 0:
randomMonsterHit = random.randint(0, monsterMaxHit)
randomPlayerHit = random.randint(0, playerMaxhit)
monstersHP -= randomPlayerHit
playerHP -= randomMonsterHit
monsterTotalDamage += randomMonsterHit
playerTotalDamage += randomPlayerHit
playerdamagehere = await hitsplats(randomPlayerHit)
monsterdamagehere = await hitsplats(randomMonsterHit)
await msg1.edit(content=f'{monster[0]} HP: {monstersHP} | | {ctx.author.name} HP: {playerHP}')
await msg2.edit(content=f'You have hit a {playerdamagehere} with {d[0]} {d[2]} | | The {monster[0]} hit a {monsterdamagehere}')
await asyncio.sleep(1)```
check2 = "SELECT " + monsterBoneType + ", coinQuantity FROM inventory WHERE discordID = %s"
if(player1character_temp != 'X' || 'O')
{
cout << player1character_temp << " isn't an option. Please choose either X or O.\n";
cin >> player1character_temp;
}
if(player1character_temp != 'X' || player1character_temp !='O')
#include<iostream>
#include<string>
using namespace std;
void board();
char topLeft = '1';
char topMiddle = '2';
char topRight = '3';
char middleLeft = '4';
char middleMiddle = '5';
char middleRight = '6';
char bottomLeft = '7';
char bottomMiddle = '8';
char bottomRight = '9';
string player1name;
string player2name;
char player1character;
char player2character;
char player1character_temp;
char player2character_temp;
int main()
{
cout << "Alright Player One! What is your name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do you want to be X's or O's?\n";
cin >> player1character_temp;
if(player1character_temp != 'X' || 'x' || 'O' || 'o' || '0' || "X's" || "x's" || "O's" || "o's" || "0's")
{
cout << player1character_temp << " isn't an option. Please choose either X or O.\n";
cin >> player1character_temp;
}
else
{
if(player1character_temp == 'X' || 'x' || "X's" || "x's")
{
player2character = 'O';
player1character = 'X';
}
else if(player1character_temp != 'X' || 'x' || "X's" || "x's")
{
player2character = 'X';
player1character = 'O';
}
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
board();
return 0;
}
void board()
{
cout << topLeft << " " << topMiddle << " " << topRight << endl;
cout << middleLeft << " " << middleMiddle << " " << middleRight << endl;
cout << bottomLeft << " " << bottomMiddle << " " << bottomRight << endl;
}
#include<iostream>
#include<string>
using namespace std;
void board();
char topLeft = '1';
char topMiddle = '2';
char topRight = '3';
char middleLeft = '4';
char middleMiddle = '5';
char middleRight = '6';
char bottomLeft = '7';
char bottomMiddle = '8';
char bottomRight = '9';
string player1name;
string player2name;
char player1character;
char player2character;
char player1character_temp;
char player2character_temp;
void startGame();
int main()
{
cout << "Alright Player One! What is your name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do you want to be X's or O's?\n";
cin >> player1character_temp;
while(player1character_temp != 'X' || 'x' || 'O' || 'o' || '0' || "X's" || "x's" || "O's" || "o's" || "0's")
{
if(player1character_temp == 'X' || 'x' || 'O' || 'o' || '0' || "X's" || "x's" || "O's" || "o's" || "0's")
{
startGame();
}
else
{
cout << player1character_temp << " isn't an option. Please choose either X or O.\n";
cin >> player1character_temp;
}
}
return 0;
}
void board()
{
cout << topLeft << " " << topMiddle << " " << topRight << endl;
cout << middleLeft << " " << middleMiddle << " " << middleRight << endl;
cout << bottomLeft << " " << bottomMiddle << " " << bottomRight << endl;
}
void startGame()
{
if(player1character_temp == 'X' || 'x' || "X's" || "x's")
{
player2character = 'O';
player1character = 'X';
}
else if(player1character_temp != 'X' || 'x' || "X's" || "x's")
{
player2character = 'X';
player1character = 'O';
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
board();
}
.
1 2 3
4 5 6
7 8 9
switch (/* expression */) {
case /* value */:
}
#include<iostream>
#include<string>
using namespace std;
void board();
char topLeft = '1';
char topMiddle = '2';
char topRight = '3';
char middleLeft = '4';
char middleMiddle = '5';
char middleRight = '6';
char bottomLeft = '7';
char bottomMiddle = '8';
char bottomRight = '9';
string player1name;
string player2name;
char player1character;
char player2character;
char player1character_temp;
char player2character_temp;
void startGame();
int main()
{
cout << "Alright Player One! What is your name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do you want to be X's or O's?\n";
cin >> player1character_temp;
switch(player1character_temp)
{
case 'X':
startGame();
break;
case 'x':
startGame();
break;
case 'O':
startGame();
break;
case 'o':
startGame();
break;
default:
while(player1character_temp != 'X'||'x'||'O'||'o')
cout << player1character_temp << " isn't an option. Please choose either X or O.\n";
cin >> player1character_temp;
}
return 0;
}
void board()
{
cout << topLeft << " " << topMiddle << " " << topRight << endl;
cout << middleLeft << " " << middleMiddle << " " << middleRight << endl;
cout << bottomLeft << " " << bottomMiddle << " " << bottomRight << endl;
}
void startGame()
{
if(player1character_temp == 'X' || 'x')
{
player2character = 'O';
player1character = 'X';
}
else if(player1character_temp != 'X' || 'x')
{
player2character = 'X';
player1character = 'O';
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
board();
}
😦
#include<iostream>
#include<string>
using namespace std;
void board();
char topLeft = '1';
char topMiddle = '2';
char topRight = '3';
char middleLeft = '4';
char middleMiddle = '5';
char middleRight = '6';
char bottomLeft = '7';
char bottomMiddle = '8';
char bottomRight = '9';
string player1name;
string player2name;
char player1character;
char player2character;
char player1character_temp;
char player2character_temp;
void startGame();
int main()
{
cout << "Alright Player One! What is your name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do you want to be X's or O's?\n";
cin >> player1character_temp;
while(player1character_temp != 'X'||'x'||'O'||'o')
{
switch(player1character_temp)
{
case 'X':
startGame();
break;
case 'x':
startGame();
break;
case 'O':
startGame();
break;
case 'o':
startGame();
break;
default:
cout << player1character_temp << " isn't an option. Please choose either X or O.\n";
cin >> player1character_temp;
}
}
return 0;
}
void board()
{
cout << topLeft << " " << topMiddle << " " << topRight << endl;
cout << middleLeft << " " << middleMiddle << " " << middleRight << endl;
cout << bottomLeft << " " << bottomMiddle << " " << bottomRight << endl;
}
void startGame()
{
if(player1character_temp == 'X' || 'x')
{
player2character = 'O';
player1character = 'X';
}
else if(player1character_temp != 'X' || 'x')
{
player2character = 'X';
player1character = 'O';
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
board();
}
switch (player1character_temp) {
case 'x':
case 'X':
case 'O':
case 'o':
startGame();
break;
}
void startGame()
{
if(player1character_temp == 'X' || 'x')
{
player2character = 'O';
player1character = 'X';
}
else if(player1character_temp != 'X' || 'x')
{
player2character = 'X';
player1character = 'O';
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
board();
}
Alright joe and lets play!
1 2 3
4 5 6
7 8 9
#include<iostream>
#include<string>
using namespace std;
void board();
string player1name;
string player2name;
char player1character;
char player2character;
char player1character_temp;
char player2character_temp;
string test;
void startGame();
int main()
{
cout << "Alright Player One! What is your name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do you want to be X's or O's?\n";
cin >> player1character_temp;
while(player1character_temp != 'X'||'x'||'O'||'o')
{
switch(player1character_temp)
{
case 'X':
case 'x':
case 'O':
case 'o':
startGame();
break;
default:
cout << player1character_temp << " isn't an option. Please choose either X or O.\n";
cin >> player1character_temp;
}
}
return 0;
}
void board()
{
char topLeft = '1';
char topMiddle = '2';
char topRight = '3';
char middleLeft = '4';
char middleMiddle = '5';
char middleRight = '6';
char bottomLeft = '7';
char bottomMiddle = '8';
char bottomRight = '9';
cout << topLeft << " " << topMiddle << " " << topRight << endl;
cout << middleLeft << " " << middleMiddle << " " << middleRight << endl;
cout << bottomLeft << " " << bottomMiddle << " " << bottomRight << endl;
}
void startGame()
{
if(player1character_temp == 'X' || 'x')
{
player2character = 'O';
player1character = 'X';
}
else if(player1character_temp != 'X' || 'x')
{
player2character = 'X';
player1character = 'O';
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
board();
cin >> test;
}
#include<iostream>
#include<string>
using namespace std;
void board();
string test;
void startGame();
int main(){
startGame();
return 0;
}
void board(){
char topLeft = '1';
char topMiddle = '2';
char topRight = '3';
char middleLeft = '4';
char middleMiddle = '5';
char middleRight = '6';
char bottomLeft = '7';
char bottomMiddle = '8';
char bottomRight = '9';
cout << topLeft << " " << topMiddle << " " << topRight << endl;
cout << middleLeft << " " << middleMiddle << " " << middleRight << endl;
cout << bottomLeft << " " << bottomMiddle << " " << bottomRight << endl;
}
void startGame(){
string player1name;
string player2name;
char player1character;
char player2character;
char player1character_temp;
char player2character_temp;
cout << "Alright Player One! What is your name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do you want to be X's or O's?\n";
cin >> player1character_temp;
bool valid = true;
while(!valid){
switch(player1character_temp){
case 'X':
case 'x':
player2character = 'O';
player1character = 'X';
break;
case 'O':
case 'o':
player2character = 'X';
player1character = 'O';
break;
default:
valid = false;
cout << player1character_temp << " isn't an option. Please choose either X or O.\n";
cin >> player1character_temp;
}
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
board();
cin >> test;
}
#include<iostream>
#include<string>
using namespace std;
void board();
string player1name;
string player2name;
char player1character;
char player2character;
void startGame();
int main()
{
cout << "Alright Player One! What is your name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do you want to be X's or O's?\n";
cin >> player1character;
while(player1character != 'X'||'x'||'O'||'o')
{
switch(player1character)
{
case 'X':
case 'x':
case 'O':
case 'o':
startGame();
break;
default:
cout << player1character << " isn't an option. Please choose either X or O.\n";
cin >> player1character;
}
}
return 0;
}
void board()
{
char topLeft = '1';
char topMiddle = '2';
char topRight = '3';
char middleLeft = '4';
char middleMiddle = '5';
char middleRight = '6';
char bottomLeft = '7';
char bottomMiddle = '8';
char bottomRight = '9';
cout << topLeft << " " << topMiddle << " " << topRight << endl;
cout << middleLeft << " " << middleMiddle << " " << middleRight << endl;
cout << bottomLeft << " " << bottomMiddle << " " << bottomRight << endl;
}
void startGame()
{
string Test;
if(player1character == 'X' || 'x')
{
player2character = 'O';
player1character = 'X';
}
else if(player1character != 'X' || 'x')
{
player2character = 'X';
player1character = 'O';
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
board();
cin >> Test;
}
#include<iostream>
#include<string>
using namespace std;
void board();
string test;
void startGame();
int main(){
startGame();
return 0;
}
void board(){
char topLeft = '1';
char topMiddle = '2';
char topRight = '3';
char middleLeft = '4';
char middleMiddle = '5';
char middleRight = '6';
char bottomLeft = '7';
char bottomMiddle = '8';
char bottomRight = '9';
cout << topLeft << " " << topMiddle << " " << topRight << endl;
cout << middleLeft << " " << middleMiddle << " " << middleRight << endl;
cout << bottomLeft << " " << bottomMiddle << " " << bottomRight << endl;
}
void startGame(){
string player1name;
string player2name;
char player1character;
char player2character;
char player1character_temp;
char player2character_temp;
cout << "Alright Player One! What is your name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do you want to be X's or O's?\n";
cin >> player1character_temp;
bool valid = false;
while(!valid){
valid = true;
switch(player1character_temp){
case 'X':
case 'x':
player2character = 'O';
player1character = 'X';
break;
case 'O':
case 'o':
player2character = 'X';
player1character = 'O';
break;
default:
valid = false;
cout << player1character_temp << " isn't an option. Please choose either X or O.\n";
cin >> player1character_temp;
}
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
board();
cin >> test;
}
#include<iostream>
#include<string>
using namespace std;
void board();
string test;
void startGame();
int main()
{
startGame();
return 0;
}
void board()
{
char topLeft = '1';
char topMiddle = '2';
char topRight = '3';
char middleLeft = '4';
char middleMiddle = '5';
char middleRight = '6';
char bottomLeft = '7';
char bottomMiddle = '8';
char bottomRight = '9';
cout << topLeft << " " << topMiddle << " " << topRight << endl;
cout << middleLeft << " " << middleMiddle << " " << middleRight << endl;
cout << bottomLeft << " " << bottomMiddle << " " << bottomRight << endl;
}
void startGame()
{
string player1name;
string player2name;
char player1character;
char player2character;
cout << "Alright Player One! What is your name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do you want to be X's or O's?\n";
cin >> player1character;
bool valid = false;
while(!valid)
{
valid = true;
switch(player1character)
{
case 'X':
case 'x':
player2character = 'O';
player1character = 'X';
break;
case 'O':
case 'o':
player2character = 'X';
player1character = 'O';
break;
default:
valid = false;
cout << player1character << " isn't an option. Please choose either X or O.\n";
cin >> player1character;
}
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
board();
cin >> test;
}
#include<iostream>
#include<string>
using namespace std;
void board(string gameBoard);
string test;
void startGame();
int main(){
string gameBoard = "123456789";
board(gameBoard);
startGame();
return 0;
}
void board(string board){
for(int i = 0; i < 9; i++){
if(i%3 == 0){
cout << "\n";
}
cout << board[i];
}
cout << "\n";
}
void startGame(){
string gameBoard = "123456789";
string player1name;
string player2name;
char player1character;
char player2character;
char player1character_temp;
char player2character_temp;
cout << "Alright Player One! What is your name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do you want to be X's or O's?\n";
cin >> player1character_temp;
bool valid = false;
while(!valid){
valid = true;
switch(player1character_temp){
case 'X':
case 'x':
player2character = 'O';
player1character = 'X';
break;
case 'O':
case 'o':
player2character = 'X';
player1character = 'O';
break;
default:
valid = false;
cout << player1character_temp << " isn't an option. Please choose either X or O.\n";
cin >> player1character_temp;
}
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
board(gameBoard);
cin >> test;
}
cout << board[i] << " ";
gameBoard[4] = 'x';
board(gameBoard);
cout << "BLAHHH\n";
cin >> test;
gameBoard[4] = test;
}
void board(string board, int pos){
for(int i = 0; i < 9; i++){
if(i%3 == 0){
cout << "\n";
}
if(i == pos){
cout << '>' << board[i] << '<';
} else {
cout << ' ' << board[i] << ' ';
}
}
cout << "\n";
}
Hey @median zenith!
It looks like you tried to attach file type(s) that we do not allow (.h). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
int movment(int pos, char direction){
switch (direction) {
case 'w': if (pos - 3 > 0) pos -= 3; break;
case 'a': if (pos - 1 > 0) pos--; break;
case 's': if (pos + 3 < 8) pos += 3; break;
case 'd': if (pos + 1 < 8) pos++;
}
return pos;
}
int movment(int pos, char direction){
switch (direction) {
case 'w':
if (pos - 3 >= 0){
pos -= 3;
}
break;
case 'a':
if (pos - 1 >= 0) {
pos--;
}
break;
case 's': if (pos + 3 <= 8) {
pos += 3;
}
break;
case 'd': if (pos + 1 <= 8) {
pos++;
}
break;
}
return pos;
}
int movment(int pos, char direction){
switch (direction) {
case 's': if (pos + 3 <= 8) pos += 3; break;
case 'w': if (pos - 3 >= 0) pos -= 3; break;
case 'd': if (pos + 1 <= 8) pos++; break;
case 'a': if (pos - 1 >= 0) pos--; break;
}
return pos;
}
int movment(int pos, char direction){
switch (direction) {
case 's': case 'S': if (pos + 3 <= 8) pos += 3; break;
case 'w': case 'W': if (pos - 3 >= 0) pos -= 3; break;
case 'd': case 'D': if (pos + 1 <= 8) pos++; break;
case 'a': case 'A': if (pos - 1 >= 0) pos--; break;
}
return pos;
}
int pos = 0;
string gameBoard = "123456789";
board(gameBoard,0);
char input = '\0';
while(input != 'q'){
while(KeyHit() == 0){
}
input = getchar();
pos = movment(pos,input);
board(gameBoard,pos);
}
Hey @median zenith!
It looks like you tried to attach file type(s) that we do not allow (.xz). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
struct values{
string gameBoard;
int pos;
};
struct values update(struct values val, char input){
switch (input) {
case 's': case 'S': if (val.pos + 3 <= 8) val.pos += 3; break;
case 'w': case 'W': if (val.pos - 3 >= 0) val.pos -= 3; break;
case 'd': case 'D': if (val.pos + 1 <= 8) val.pos++; break;
case 'a': case 'A': if (val.pos - 1 >= 0) val.pos--; break;
case 'x': case 'X': val.gameBoard[val.pos] = input;
case 'o': case 'O': val.gameBoard[val.pos] = input;
}
return val;
}
what^
🔥 🦊
Found her name back, Mitchell Baker
yep, if it goes well we might have a vaccine in January
.>
void board(struct values val){
for(int i = 0; i < 9; i++){
if(i%3 == 0){
cout << "\n";
if(i != 0){
cout << string(10,'-') << "\n";
}
} else {
cout << "|";
}
if(i == val.pos){
cout << '>' << val.gameBoard[i] << '<';
} else {
cout << ' ' << val.gameBoard[i] << ' ';
}
}
cout << "\n";
}
int main(){
values val;
val.pos = 0;
val.gameBoard = "123456789";
char input = '\0';
while(input != 'q'){
board(val);
while(KeyHit() == 0){
}
input = getchar();
val = update(val,input);
}
startGame();
return 0;
}
val.gameBoard = string(9,' ');
def test(x):
return [1]
lambda x: [1]
a = [1,2,3,4,5,6,7,8,9]
list(filter(lambda x: 'o' in x, ['cat', 'dog', 'cow']))
list(map(lambda x: x.upper(), ['cat', 'dog', 'cow']))
["CAT","DOG","COW"]
void board(struct values val)
{
for(int i = 0; i < 9; i++)
{
if(i%3 == 0)
{
cout << "\n";
if(i != 0)
{
cout << string(11,'-') << "\n";
}
} else
{
cout << "|";
}
if(i == val.pos)
{
cout << '>' << val.gameBoard[i] << '<';
} else
{
cout << ' ' << val.gameBoard[i] << ' ';
}
}
cout << "\n";
}
{
cout << string(11,'-') << "\n";
}
for( range ) { some code; if(condition_1) return x; // or break more code; if(condition_2) continue; yet more code; }
try { std::for_each( range , [] (const_reference x) { some code; if(condition_1) throw x; more code; if(condition_2) return; yet more code; } ); } catch(const_reference r) { return r; }
use 3 symbols
kld ashaosuhd
Just come to hear relaxing mouse and keyboard clicks!
values update(struct values val, char input){
int pos = val.pos;
switch (input) {
case 's': case 'S': if (val.pos + 3 <= 8) val.pos += 3; break;
case 'w': case 'W': if (val.pos - 3 >= 0) val.pos -= 3; break;
case 'd': case 'D': if (val.pos + 1 <= 8) val.pos++; break;
case 'a': case 'A': if (val.pos - 1 >= 0) val.pos--; break;
case 'x': case 'X': if (val.gameBoard[pos] == ' ') val.gameBoard[pos] = input; break;
case 'o': case 'O': if (val.gameBoard[pos] == ' ') val.gameBoard[pos] = input; break;
}
return val;
}
int main()
{
startGame();
values val;
val.pos = 0;
val.gameBoard = string(9,' ');
char input = '\0';
while(input != 'q'){
board(val);
while(KeyHit() == 0){
}
input = getchar();
val = update(val,input);
}
return 0;
}
values update(struct values val, char input){
int pos = val.pos;
switch (input) {
case 's': case 'S': if (val.pos + 3 <= 8) val.pos += 3; break;
case 'w': case 'W': if (val.pos - 3 >= 0) val.pos -= 3; break;
case 'd': case 'D': if (val.pos + 1 <= 8) val.pos++; break;
case 'a': case 'A': if (val.pos - 1 >= 0) val.pos--; break;
case ' ': case 'X':
if (val.gameBoard[pos] == ' ')
switch (val.turn % 2) {
case 0: val.gameBoard[pos] = 'x'; break;
case 1: val.gameBoard[pos] = 'o'; break;
}
break;
}
return val;
}
values update(struct values val, char input){
int pos = val.pos;
switch (input) {
case 's': case 'S': if (val.pos + 3 <= 8) val.pos += 3; break;
case 'w': case 'W': if (val.pos - 3 >= 0) val.pos -= 3; break;
case 'd': case 'D': if (val.pos + 1 <= 8) val.pos++; break;
case 'a': case 'A': if (val.pos - 1 >= 0) val.pos--; break;
case ' ': if (val.gameBoard[pos] == ' ') val.gameBoard[pos] = val.inputs[val.turn % 2]; break;
}
return val;
}
values update(struct values val, char input){
int pos = val.pos;
switch (input) {
case 's': case 'S': if (val.pos + 3 <= 8) val.pos += 3; break;
case 'w': case 'W': if (val.pos - 3 >= 0) val.pos -= 3; break;
case 'd': case 'D': if (val.pos + 1 <= 8) val.pos++; break;
case 'a': case 'A': if (val.pos - 1 >= 0) val.pos--; break;
case ' ': if (val.gameBoard[pos] == ' ') {val.turn++; val.gameBoard[pos] = val.inputs[val.turn % 2];} break;
}
return val;
}
struct values{
string gameBoard;
int pos;
int turn;
char inputs[2];
};
val.inputs [0] = 'x';
val.inputs [1] = 'o';
#include<iostream>
#include<string>
#include "console-input.h"
using namespace std;
struct values
{
string gameBoard;
int pos;
int turn;
int inputs[2];
};
void board(struct values val);
void startGame();
values update(struct values val, char input)
{
int pos = val.pos;
switch (input)
{
case 's': case 'S': if (val.pos + 3 <= 8) val.pos += 3; break;
case 'w': case 'W': if (val.pos - 3 >= 0) val.pos -= 3; break;
case 'd': case 'D': if (val.pos + 1 <= 8) val.pos++; break;
case 'a': case 'A': if (val.pos - 1 >= 0) val.pos--; break;
case ' ': if (val.gameBoard[pos] == ' ') val.gameBoard[pos] = val.inputs[val.turn % 2]; break;
}
return val;
}
int main()
{
startGame();
values val;
val.pos = 0;
val.gameBoard = string(9,' ');
char input = '\0';
while(input != 'q'){
board(val);
while(KeyHit() == 0){
}
input = getchar();
val = update(val,input);
}
return 0;
}
void board(struct values val)
{
for(int i = 0; i < 9; i++)
{
if(i%3 == 0)
{
cout << "\n";
if(i != 0)
{
cout << string(11,'-') << "\n";
}
} else
{
cout << "|";
}
if(i == val.pos)
{
cout << '>' << val.gameBoard[i] << '<';
} else
{
cout << ' ' << val.gameBoard[i] << ' ';
}
}
cout << "\n";
}
void startGame()
{
string gameBoard = "123456789";
string player1name;
string player2name;
char player1character;
char player2character;
cout << "Alright Player One! What Is Your Name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do You Want To Be X's or O's?\n";
cin >> player1character;
cout << "And Player Two, What's Your Name?\n";
cin >> player2name;
bool valid = false;
while(!valid)
{
valid = true;
switch(player1character)
{
case 'X':
case 'x':
player2character = 'O';
player1character = 'X';
break;
case 'O':
case 'o':
player2character = 'X';
player1character = 'O';
break;
default:
valid = false;
cout << player1character << " isn't an option. Please choose either X or O.\n";
cin >> player1character;
}
}
cout << "Alright " << player1name << " and " << player2name << " lets play!\n";
cout << " \n";
}
val.inputs [0] = 'x';
val.inputs [1] = 'o';
val.turn++
#include<iostream>
#include<string>
#include "console-input.h"
using namespace std;
struct values
{
string gameBoard;
int pos;
int turn;
int inputs[2];
};
void board(struct values val);
void startGame();
values update(struct values val, char input)
{
int pos = val.pos;
switch (input)
{
case 's': case 'S': if (val.pos + 3 <= 8) val.pos += 3; break;
case 'w': case 'W': if (val.pos - 3 >= 0) val.pos -= 3; break;
case 'd': case 'D': if (val.pos + 1 <= 8) val.pos++; break;
case 'a': case 'A': if (val.pos - 1 >= 0) val.pos--; break;
case ' ': if (val.gameBoard[pos] == ' ')
{
val.gameBoard[pos] = val.inputs[val.turn % 2];
///}
// if(val.inputs [0]||val.inputs[1])
// {
val.inputs [0] = 'x';
val.inputs [1] = 'o';
val.turn++;
}
break;
}
return val;
}
int main()
{
startGame();
values val;
val.pos = 0;
val.gameBoard = string(9,' ');
char input = '\0';
while(input != 'q'){
board(val);
while(KeyHit() == 0){
}
input = getchar();
val = update(val,input);
}
return 0;
}
void board(struct values val)
{
for(int i = 0; i < 9; i++)
{
if(i%3 == 0)
{
cout << "\n";
if(i != 0)
{
cout << string(11,'-') << "\n";
}
} else
{
cout << "|";
}
if(i == val.pos)
{
cout << '>' << val.gameBoard[i] << '<';
} else
{
cout << ' ' << val.gameBoard[i] << ' ';
}
}
cout << "\n";
}
void startGame()
{
string gameBoard = "123456789";
string player1name;
string player2name;
char player1character;
char player2character;
cout << "Alright Player One! What Is Your Name?\n";
cin >> player1name;
cout << "Awesome! " << player1name << " Do You Want To Be X's or O's?\n";
cin >> player1character;
bool valid = false;
while(!valid)
{
valid = true;
switch(player1character)
{
case 'X':
case 'x':
player2character = 'O';
player1character = 'X';
break;
case 'O':
case 'o':
player2character = 'X';
player1character = 'O';
break;
default:
valid = false;
cout << player1character << " isn't an option. Please choose either X or O.\n";
cin >> player1character;
}
}
cout << "And Player Two, What's Your Name?\n";
cin >> player2name;
cout << "Alright " << player1name << " you will be " << player1character << " and " << player2name << " you will be " << player2character << " lets play!\n";
cout << " \n";
}
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
int main()
{
int N;
cin >> N; cin.ignore();
switch(N)
{
case 5: cout << "3 1\n"; break;
case 7: cout << "3 3\n"; break;
case 10: cout << "3 6\n"; break;
case 20: cout << "6 13\n"; break;
case 25: cout << "12 12\n"; break;
}
}
import sys
import math
# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
n = int(input())
l=list(map(int,input().split()))
a=0
b=0
# print(l)
for i in range(len(l)-1):
if l[i]<l[i+1]:
a+=1
else:
b+=1
print(a,b)
@long warren oi are you okay?
speech impediment or just a kid
im 18
game jam
hello/
ok
but say i put those two arguments when creating my function
if i create a variable inside the function, or put one as an argument, they won't be able to be accessed
if i wanted to make a function that multiplies two numbers, first it needs to be able to take in two arguments
and the box where you will place those arguments are the variables x and y
sorry wait
def multiply(x,y):
print(x*y)
so to use the function, you stick in two numbers
multiply(7,8)
x = 600
x
def multiply_by_self(x):
print(x * x)
multiply_by_self(5)
tech with tim
replace [len(pile_numbers[pile]) - 1] with [-1] btw
@whole bear we should probably go to the help channel haha
from dataclasses import dataclass
@dataclass
class Card:
number: int
suit: str
face_up: bool
my_card = Card(7, '♦', True)
pile_numbers = {0: [my_card]}
pile_numbers[pile][-1].face_up
if pile_numbers[pile][-1].face_up
!tag codeblock
Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.
To do this, use the following method:
```python
print('Hello world!')
```
Note:
• These are backticks, not quotes. Backticks can usually be found on the tilde key.
• You can also use py as the language instead of python
• The language must be on the first line next to the backticks with no space between them
This will result in the following:
print('Hello world!')
A few days ago a post from Björn Fahller did the rounds about a compile-time quicksort in C++, using template metaprogramming. It is, as the author concludes...
@github I woke up this morning and you shut off the Aurelia site, archived tons of our repos, and I can no longer access admin settings. You sited US trade sanctions and sent me a non-descriptive email with no remediation information. What is going on? This is devastating for...
Likes
185
pile_numbers = {0: [(((7, '7'), ':diamonds:'), True)]}
Does anyone in voice want to play some random online game like Cards Against Humanity, or skribbl.io?
- Write a program to simulate a user entered number of rolls of a 6 sided dice. We wish to count how many times each number is rolled and display the final ratios for each side. For example, if the user enters 1000, after 1000 rolls we would expect each side to come up about an equal number of times, somewhere around 166. So our final output may look like (20 points):
one 0.1711
two 0.1644
three 0.169
four 0.1652
five 0.1671
six 0.1632
numbers = {
1: 0,
2: 0,
... # The other nnumbers
}
times = int(input("Times: "))
for _ in range(times):
... # Roll a number using `random.randint`, add one to the corresponding entry in the dictionary
for key, value in numbers.items():
... # Print key and value
random.randint or random.randrange
import random
trials=int(input("Enter how many times you want to roll the die: "))
numbers = {
1: 0,
2: 0,
3: 0,
4: 0,
5: 0,
6: 0,
}
for _ in range(trials):
x=random.randint(1,6)
numbers[number]+=1
for key, value in number.items():
print(numbers)
import random
trials=int(input("Enter how many times you want to roll the die: "))
numbers = {
1: 0,
2: 0,
3: 0,
4: 0,
5: 0,
6: 0,
}
for _ in range(trials):
x=random.randint(1,6)
numbers[x]+=1
for key, value in numbers.items():
print(key, x)
- An isogram is a word in which each letter appears only once. For example, “subdermatoglyphic” is an isogram, and “antidisestablishmentarianism” is not an isogram because some letters repeat. Write a program to inform the user whether or not the user entered word is an isogram or not. (15 points)
what? parse.add_option('-i','--ip',dest='ip',type='string',help='the ip for brut on it')
parse.add_option('-l','--list',dest='password_list',type='string',help='password list')
(options,args) = parse.parse_args()
word = input("Word: ")
letters = set(word)
if len(letters) == len(word):
... # It's an isogram
how can i turn a immage like this and capture the spots with lines?
int main()
{
int y;
cin >> y;
for(int x=1; x<y; x++)
{
cout << x << ": test\n";
}
}
1: test
2: test
3: test
4: test
5: test
6: test
@devout ember Please don't post code which automates logins on platforms which do not permit logins.
import smtplib
Import the email modules we'll need
from email.message import EmailMessage
with open(textfile) as fp:
msg = EmailMessage()
msg.set_content(fp.read())
msg['Subject'] = 'The contents of %s' % textfile
msg['From'] = me
msg['To'] = you
s = smtplib.SMTP('localhost')
s.send_message(msg)
s.quit()
std::rand()
django
{
int y;
cin >> y;
srand (time(NULL));
int diceRollRandomThing = rand();
for(int x=1; x<y; x++)
{
cout << x << ": " << rand() << "\n";
}
}
1: 397226058
2: 1044033035
3: 991493472
4: 1777317665
5: 1903837206
shh
illegal
section .text
global _start ;must be declared for using gcc
_start: ;tell linker entry point
;create the file
mov eax, 8
mov ebx, file_name
mov ecx, 0777 ;read, write and execute by all
int 0x80 ;call kernel
mov [fd_out], eax
; write into the file
mov edx,len ;number of bytes
mov ecx, msg ;message to write
mov ebx, [fd_out] ;file descriptor
mov eax,4 ;system call number (sys_write)
int 0x80 ;call kernel
; close the file
mov eax, 6
mov ebx, [fd_out]
; write the message indicating end of file write
mov eax, 4
mov ebx, 1
mov ecx, msg_done
mov edx, len_done
int 0x80
;open the file for reading
mov eax, 5
mov ebx, file_name
mov ecx, 0 ;for read only access
mov edx, 0777 ;read, write and execute by all
int 0x80
mov [fd_in], eax
;read from file
mov eax, 3
mov ebx, [fd_in]
mov ecx, info
mov edx, 26
int 0x80
; close the file
mov eax, 6
mov ebx, [fd_in]
int 0x80
; print the info
mov eax, 4
mov ebx, 1
mov ecx, info
mov edx, 26
int 0x80
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel
section .data
file_name db 'myfile.txt'
msg db 'Welcome to Tutorials Point'
len equ $-msg
msg_done db 'Written to file', 0xa
len_done equ $-msg_done
section .bss
fd_out resb 1
fd_in resb 1
info resb 26
Scott Knowles
Assembly - Loops - The JMP instruction can be used for implementing loops. For example, the following code snippet can be used for executing the loop-body 10 times.
1: 6
2: 4
3: 4
4: 1
5: 1
6: 2
int main()
{
int diceSize = 6;
cin >> diceSize;
srand (time(NULL));
int numOfRolls = rand();
for(int x=1; x<=diceSize; x++)
{
cout << "side "<< x << ": " << (rand()%6)+1 << "\n";
}
}
import Tkinter
top = Tkinter.Tk()
top.mainloop()
from Tkinter import *
root = Tk()
var = StringVar()
label = Message( root, textvariable=var, relief=RAISED )
var.set("Hey!? How are you doing?")
label.pack()
root.mainloop()from Tkinter import *
root = Tk()
var = StringVar()
label = Message( root, textvariable=var, relief=RAISED )
var.set("Hey!? How are you doing?")
label.pack()
root.mainloop()
int main()
{
int numOfRolls;
int diceSize;
cout << "How many sides does your dice have?\n";
cin >> diceSize;
cout << "How many times do you want to roll the dice?\n";
cin >> numOfRolls;
srand (time(NULL));
rand();
for(int x=1; x<=diceSize; x++)
{
cout << "side "<< x << ": " << (rand()%6)+1 << "\n";
}
}
good night
night
can i filter out the thinner virtical lines?
wait, let me connect my headphones with mic
side 1: 2
side 2: 2
side 3: 2
side 4: 2
no, sorry. My mom was yelling at me and I had to go help her with stuff
ah it's fine
i have your dice thing almost done
aseprite
I'm an Indie game dev here to help! ►Twitter https://twitter.com/PeterMilko
►DWERVE Game: https://dwerve.com/
►PANICPOP Clothing: https://panicpop.com/
►ITCH Games: https://petermilko.itch.io/
►My GF: https://twitter.com/velvetvalerina
►My GF: https://www.instagram.com/velvet...
int rollNum;
int dieSize;
srand(time(NULL));
cout << "How many sides does your dice have?\n";
cin >> dieSize;
cout << "How many times do you want to roll the dice?\n";
cin >> rollNum;
int roll[dieSize] = {0};
for (int i=0; i<rollNum; i++)
{
roll[rand()%dieSize]++;
}
for (int i=0;i<dieSize;i++)
{
switch(roll[i])
{
case 0: break;
default:
cout << "\tA " << i+1 << " was rolled " << roll[i] << " times." << endl;
}
}
cout << "Size = " << dieSize << endl;
cout << "Rolls = " << rollNum << endl;
roll[object]++
roll[rand()%dieSize]++;
idex = rand()%dieSize
int numOfRolls;
int diceSize;
cout << "How many sides does your dice have?\n";
cin >> diceSize;
cout << "How many times do you want to roll the dice?\n";
cin >> numOfRolls;
srand (time(NULL));
for(int x=1; x<=numOfRolls; x++)
{
cout << "side "<< x << ": " << ((rand() % diceSize)+1) << "\n";
}
import random
def Diceroll():
num_of_faces = input('How many faces does your die have?')
values = []
for index in range(int(num_of_faces)):
values = random.randint(1,6)
print('The value of face number ' + str(index) + ' is ' + str(values))
Diceroll()```
@signal raven
sorry i didn't do it last night
you can also just have the function take in the number of sides
which is simpler and probably better
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import itertools
import mpl_toolkits.mplot3d
#------------------------------------------------------------------------------
DEFINITION
#------------------------------------------------------------------------------
class RLMomentum():
def init(self, datapath):
self.data = pd.read_csv(datapath, header=None)
self.ret = self.data / self.data.shift(1) - 1
self.ret = self.ret.fillna(0)
Including <iostream> may automatically include other headers, such as <ios>, <streambuf>, <istream>, <ostream> and/or <iosfwd>.
std::ofstream myfile;
std::string website;
std::string choice;
std::string line;
myfile.open ("test.txt");
std::cout << "What is the URL?\n";
std::cin >> website;
myfile << website << std::endl;
myfile.close();
return 0;
getline(myfile,line);
case ' ': code
switch (getline)
{
case ' ': code
}
#include<iostream>
#include <fstream>
int main()
{
std::ofstream myfile;
std::string website;
std::string choice;
std::string line;
myfile.open ("test.txt");
std::cout << "Add or Take?\n";
std::cin >> choice;
if(choice=="Add"||"add")
{
std::cout << "What is the URL?\n";
std::cin >> website;
myfile << website << std::endl;
}
else if(choice=="Take"||"take")
{
int numOfSites;
srand(time(NULL));
//std::string sites[numOfSites] = {};
//std::cout << sites[rand()%numOfSites] << std::endl;
while(!myfile.eof())
{
// getline(myfile,line);
std::cout<< line << std::endl;
numOfSites++;
}
}
else{
std::cout << "Error\n";
}
myfile.close();
return 0;
}
is there a faster way to take screenshots than pyscreenshot?
#include <fstream>
int main() {
std::ofstream outfile;
outfile.open("test.txt", std::ios_base::app); // append instead of overwrite
outfile << "Data";
return 0;
}
std::ios_base::app
>:{}
not sure is face
it is a nice face
Ghost in the Shell, known in Japan as Mobile Armored Riot Police (Japanese: 攻殻機動隊, Hepburn: Kōkaku Kidōtai) is a Japanese cyberpunk science fiction media franchise based on the seinen manga series of the same name written and illustrated by Masamune Shirow. The manga, first se...
I’m autistic now?
FBI in chat
Voice channel is looking an anime now
@dapper current I am 13 you are 27. It is bad that u want to get pics of a minor
BTW, I have watched few like Psycho Pass too
Testing
oh so you're not actually streaming any python tutorials?
I see black
hm. Where's the link to the stream?
I'm not sure I understand. I'm new here. Where should I click?
Yeah looks good
interesting. I don't have this button
it's too glitchy
Give me go live perms so i can do some lil tecca streams
And fortnite battle royale 90s
what.
why don't you stream on twitch?
fornite b-
@errant helm have you tried aiohttp server?
and sanic?
Not telling you to switch though lol
hey @errant helm
Hey hey
Great, how are you doing?
Jackbox today?
btw it would be better to open your mic full time instead of voice activity.
ah, I see.
what are you building?
Ah, I was working on a recipe ingredient parser recently and then let it go :D
Why don't like you people who mutes their mics? lol
What is Gdude working on? As in what tech?
Looks like django
they can always use a bidet
yea looks good
what
dude can you mute your microphone?
@devout ember
SORRY
np
Hey @devout ember!
It looks like you tried to attach file type(s) that we do not allow (.html). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
Hey @devout ember!
It looks like you tried to attach file type(s) that we do not allow (.css). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="describtion" content="to Buy gaming Pc ">
<title>px-game</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Bahianita&display=swap" rel="stylesheet">
</head>
<body>
<header>
<img src="man.png">
<h1>name company</h1><br>
<a href="#ads">About us</a>
<form action="#" method="POST">
<label>Login</label><br>
<input class="n-p" type="text" name="name" autofocus="on" placeholder="name">
<input class="n-p" type="password" name="password" placeholder="password">
<input type="submit" name="login" value="login">
</form>
</header>
<nav>
<div class="container">
<a href="style.css">Home</a>
<a href="#">Contact</a>
<a href="#">Buy</a>
<a href="https://khamsat.com/user/ahmedabdelazizz" target="_blank">A.Abdelaziz </a>
</div>
</nav>
<div id="ads" class="ads"></div>
<div class="container">
<div class="blogs">
<a href="#"><div>
<h1>$400</h1>
<p>أما حان الوقت للشباب العربي أن يحاول استخدام الإنترنت بطريقة مختلفة؟ بطريقة تعود بفائدة لتغيير حياته للأفضل؟ وأما حان الوقت أن نقوم نحن كرواد في مجال الربح من الإنترنت في الوطن العربي: بتوعية الشباب بالطرق التي يمكن من خلالها الربح من الإنترنت، و المتاحة لكل عربي خصوصاً ونحن في مقتبل عام 2019؟</p>
</div></a>
<div>
<h1>$500</h1>
</div>
</div>
</div>
<footer>
<div class="container">
<h2 id="footer">All copyright to A.Abeelaziz </h2>
</div>
</footer>
</div>
</body>
</html>
- {
perspective: 600px;
}
@font-face {
font-family: 'Lemonada', cursive;
src: url('https://fonts.googleapis.com/css?family=Fredoka+One&display=swap');.
}
body {
margin: 0;
background-color: white;
}
.container {
margin: auto;
overflow: hidden;
}
header {
width: auto;
height: 858px;
animation: header 5s 10000;
}
header a {
text-align: center;
text-decoration: none;
border: 2px solid white;
padding: 6px;
background: black;
color: white;
border-radius: 19px;
transition: all 1s ease-in-out;
}
header a:hover {
border-color: black;
color: black;
background: white;
}
@keyframes header {
0%{
background-color: #fd9644;
}
50%{
background-color: #eb3b5a;
}
100%{
background-color: #eb3b5a;
}
:incoming_envelope: :ok_hand: applied mute to @devout ember until 2020-03-21 15:14 (9 minutes and 59 seconds) (reason: newlines rule: sent 137 newlines in 10s).
ollydbg
jd-gui
javasnoop
jad
61
@devout ember click on the file on the left
the problem is on lines 50 and 51, the x1 numpy linspace needs to be a date range
I am going to have to make new, additional dataframes, I think
try it in an hour and maybe it will have extrapolations working, @devout ember
ok
Corsair's Google Chrome RAM Bluescreen eating Memory funny parody video
Source : https://twitter.com/CORSAIR/status/1088199514819768320
. . .
can someone come to code/help voice chat? I need help.
can someone come to code/help voice chat? I need help.
@daring vault what's ur problem
?
Im coding something
and
I need help about health or something
I used "import turtle"
.
with?
just some timer functions
they are really bad
but just some direction will be good
i'll try my best
np
@crisp beacon are you here
yep
hi
Socket
import socket
import os
import time
def logo():
print("SERVER")
#Starting Server
def main():
port = 445 # port to communicate with
host = socket.gethostbyname('0.0.0.0') # hostName
while True:
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # socket connection
s.bind((host, port)) # binding with the port to communicate
s.listen(1) # starts listening to the port
print("[+] Connected")
break
except:
os.system('cls')
logo()
print("[+] Connecting...")
time.sleep(10)
continue
clientsocket, addr = s.accept() # instruction handler
print("Connection from: " + str(addr))
while True:
ins = input("theBatman-cmd>>: ")
msg = ins.encode("UTF-8")
clientsocket.send(msg)
msg = clientsocket.recv(4096)
print(msg.decode("UTF-8"))
if __name__ == "__main__":
main()
Lots of people in here
Yea
One moment, I'll hop on voice in a sec
i mean this
I think my mic isn't setup right. Always gotta set it up every time 😐
time for dinner. 👋
👋
Apropos backdoors by companies/govt, thoughts on the EARN IT Act? Also, do you think it'll pass?
Yeah, NCMEC's endorsement was quite interesting.
Many technology companies are adopting end-to-end encryption to protect privacy, but if it is implemented without an exception for detecting illegal activity like child sexual abuse imagery, millions of incidents of abuse will remain hidden and young victims will have no help ...
Pretty much everything can be used for bad.
!warn @whole bear Don't join a voice channel and be toxic like that. Not cool.
:incoming_envelope: :ok_hand: applied warning to @whole bear.
@dry dock Interesting argument - and I mostly agree with you. What do you think about "prevention is better than cure", though?
Is it correct, and if so, how would it apply in the real world?
From the RD mod case:
Moreover, Take-Two produces video games for which it receives revenue from
video game sales and purchases within the game. The Infringing Programs(1) allow or will allow Wyckoff and/or Doe Defendants to profit commercially (e.g., via “donations”) without paying Take-Two anything,
(2) will compete against Take-Two’s sales of RDRI and RDRII PC, and (3) devalue and cause substantial harm to the value of RDRI and RDRII.
Thus, Take-Two has been
damaged by Defendants’ conduct in an amount to be determined according to proof, but in no event less than $500,000.00.
I put my monitor vertical and I’m loving it
Might sell this ultra wide for 2 4K 60hz monitors and turn one vertical
This is so wildly cool
the mic arm is a different arm
that I like
attached to one of the monitor arms
haha
lol
Just some stats I figured I'd note from my little off-topic community
(Identity rather than physical)
@broken marsh What are you doing?
checking will it send the warning letter to me and what?
Sure won't
can you send me?
Sure won't
Whatcha need help with? Have you seen https://regex101.com ?
Regex101 allows you to create, debug, test and have your expressions explained for PHP, PCRE, Python, Golang and JavaScript. The website also features a community where you can share useful expressions.
yeah
pattern is working in it but something weird happening when i m using in jupyter notebook
for r in df[1:2].iterrows():
print(re.sub(r'.*Abstract',r'Abstract',str(r), count = 1))```
i m using this in text to replace all string before Abstract
We don't allow selfbots
got it
when i use .*\nAbstract it doesn't look for anything and does nothing and when I use .*Abstract in some text it select last Abstract in whole text and replace before not first one.
maybe try re.split
i think \n is actually new line as there is no \n in raw text file so bit confused to whether to include in pattern
it comes like this when i read the file in jupyter
@calm sage how will split help me in replacing stuff?
can someone help me with this?
heading off now, thanks for the voice chat everyone, it's been quite the ride 👋
o/
@broken marsh .replace is a thing
but why re.sub isn't working?
I have no idea. What's your regex?
Why aren't you just doing \\nAbstract?
Oh, wait
You're trying to replace everything before \nAbstract?
yeah
.*Abstract works
no not in every text file
Where isn't it working?
i m trying to do in first Abstract search only but sometime it replace with last Abstract word
There might be more Abstract in whole file and i only want for first match
Looks like I m hearing an interesting podcast @errant helm
:>
@errant helm That is hilarious
str.replace(old, new[, count]) should i use (r'.*Abstract','Abstract'[, count =1]) like this? looks weird to me
str.replace doesn't support regex
ohh
re.DOTALL
re.whatever(r"", str, re.DOTALL)
result = re.sub(r".*Abstract", "Abstract", input_string, count=1, flags=re.DOTALL)
Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Long Papers), pages 1842–1852\nMelbourne, Australia, July 15 - 20, 2018. c 2018 Association for Computational Linguistics\n1842\nSequence-to-sequence Models for Cache Transition Systems\nXiaochang Peng1\n, Linfeng Song1\n, Daniel Gildea1\n, Giorgio Satta2\n1\nUniversity of Rochester 2\nUniversity of Padua\n{xpeng,lsong10,gildea}@cs.rochester.edu,\nsatta@dei.unipd.it\nAbstract\nIn this paper, we present a sequence-\nto-sequence based approach for mapping\nnatural language sentences to AMR se-\nmantic graphs. We transform the se-\nquence to graph mapping problem to a\nword sequence to transition action se-\nquence problem using a special transi-\ntion system called a cache transition sys-\ntem. To address the sparsity issue of neu-\nral AMR parsing, we feed feature embed-\ndings from the transition state to provide\nrelevant local information for each de-\ncoder state. We present a monotonic hard\nattention model for the transition frame-\nwork to handle the strictly left-to-right\nalignment between each transition state\n
for r in df[1:2].iterrows():
print(re.sub(r'.*Abstract',r'Abstract',str(r), count = 1, flags = re.DOTALL))```
.*Abstract
.+Abstract
for r in df[1:2].iterrows():
data = str(r)
pos = data.find("Abstract")
print(data[pos:])
I have to go. If that doesn't work I'd suggest going to a help channel
Ask the user for 5 integers. Display their sum and average.
myNum1 = int(input('Please enter a n1'))
myNum2 = int(input('Please enter a n2'))
myNum3 = int(input('Please enter a n3'))
myNum4 = int(input('Please enter a n4'))
myNum5 = int(input('Please enter a n5'))
print(myNum1+myNum2+myNum3+myNum4+myNum5)
myNum1 = int(input('Please enter a n1'))
myNum2 = int(input('Please enter a n2'))
myNum3 = int(input('Please enter a n3'))
myNum4 = int(input('Please enter a n4'))
myNum5 = int(input('Please enter a n5'))
print(myNum1+myNum2+myNum3+myNum4+myNum5)
myNum2 = int(input('Please enter a n2'))
myNum3 = int(input('Please enter a n3'))
myNum4 = int(input('Please enter a n4'))
myNum5 = int(input('Please enter a n5'))
print(myNum1+myNum2+myNum3+myNum4+myNum5)
print(sum5/5)```
'''python
myNum1 = int(input('Please enter a n1'))
myNum2 = int(input('Please enter a n2'))
myNum3 = int(input('Please enter a n3'))
myNum4 = int(input('Please enter a n4'))
myNum5 = int(input('Please enter a n5'))
print(myNum1+myNum2+myNum3+myNum4+myNum5)
print(sum5/5)```
myNum1 = int(input('Please enter a n1'))
myNum2 = int(input('Please enter a n2'))
myNum3 = int(input('Please enter a n3'))
myNum4 = int(input('Please enter a n4'))
myNum5 = int(input('Please enter a n5'))
Mysum = int(input(myNum1+myNum2+myNum3+myNum4+myNum5))
print(Mysum)
print(Mysum/5.0)
def print_foo():
""" this function prints foo"""
print("Foo")
def print_plus_two(n):
""" adds two to the argument, then prints it """
print( n + 2)
def print_n_numbers(n):
""" prints 0, 1, 2.... n-1 """
for i in range(0, n):
print(n)
def sum_and_average(how_many : int) -> None:
# make a list
numbers = []
# input how many we asked for
for i in range(0, how_many):
numbers.append(input(f"Please enter a number ({i + 1}/{how_many}:"))
sum_of_numbers = sum(numbers)
# print the result
print(f"Sum: {sum_of_numbers}")
print(f"Avg: {sum_of_numbers / float(how_many)}")
@broken marsh your audio is cutting out really badly
its making it hard to understand you
I m talking about the code that gdude shared
so i m not able to get how the pos is getting only first Abstract position
the code is working
!eval print("test")
Sorry, but you may only use this command within #bot-commands.
but i want to know the logic behind it
i think find returns only the first match
might be
you meant this one, right?
for r in df[1:2].iterows():
data = str(r)
pos = data.find("Abstract")
print(data[pos:])
yeah
i think the first one is a pandas dataframe or something, idk, but its iterable. you know more about what it is than me
it is dataframe
pos = data.find("Abstract") should get the index "Abstract" starts at
i think print(data[pos:]) may be slicing wrong
if you want the part afterward, you may want data[pos + len(string_to_remove):] instead
but the Abstract is string. can we get the index of string?
what do you mean?
the string holding the text of the abstract?
strings are addressable by index
it is a word in whole text
are you confused by find or whether we can slice strings?
it's not like list
like if there is raw string can we extract the words using index
you can access the individual parts of a string and slice a string
i think data = str(r) is trying to ensure its a usual string instead of something weird
python <code>
```python
code here
```
File "C:\Python38-32\lib\zipfile.py", line 1701, in _extract_member
open(targetpath, "wb") as target:
PermissionError: [Errno 13] Permission denied: 'C:\Users\igorek\PycharmProjects\python_base\lesson_009\icons_by_year\2017\9'
with self.open(member, pwd=pwd) as source,
open(targetpath, "wb") as target:
shutil.copyfileobj(source, target)
def _extract_member(self, member, targetpath, pwd):
"""Extract the ZipInfo object 'member' to a physical
file on the path targetpath.
"""
if not isinstance(member, ZipInfo):
member = self.getinfo(member)
# build the destination pathname, replacing
# forward slashes to platform specific separators.
arcname = member.filename.replace('/', os.path.sep)
if os.path.altsep:
arcname = arcname.replace(os.path.altsep, os.path.sep)
# interpret absolute pathname as relative, remove drive letter or
# UNC path, redundant separators, "." and ".." components.
arcname = os.path.splitdrive(arcname)[1]
invalid_path_parts = ('', os.path.curdir, os.path.pardir)
arcname = os.path.sep.join(x for x in arcname.split(os.path.sep)
if x not in invalid_path_parts)
if os.path.sep == '\\':
# filter illegal characters on Windows
arcname = self._sanitize_windows_name(arcname, os.path.sep)
targetpath = os.path.normpath(targetpath)
# targetpath = os.path.join(targetpath, arcname)
# targetpath = os.path.normpath(targetpath)
# Create all upper directories if necessary
upperdirs = os.path.dirname(targetpath)
if upperdirs and not os.path.exists(upperdirs):
os.makedirs(upperdirs)
if member.is_dir():
if not os.path.isdir(targetpath):
os.mkdir(targetpath)
return targetpath
with self.open(member, pwd=pwd) as source, \
open(targetpath, "wb") as target:
shutil.copyfileobj(source, target)
return targetpath
def _extract_member(self, member, targetpath, pwd):
"""Extract the ZipInfo object 'member' to a physical
file on the path targetpath.
"""
if not isinstance(member, ZipInfo):
member = self.getinfo(member)
# build the destination pathname, replacing
# forward slashes to platform specific separators.
arcname = member.filename.replace('/', os.path.sep)
if os.path.altsep:
arcname = arcname.replace(os.path.altsep, os.path.sep)
# interpret absolute pathname as relative, remove drive letter or
# UNC path, redundant separators, "." and ".." components.
arcname = os.path.splitdrive(arcname)[1]
invalid_path_parts = ('', os.path.curdir, os.path.pardir)
arcname = os.path.sep.join(x for x in arcname.split(os.path.sep)
if x not in invalid_path_parts)
if os.path.sep == '\':
# filter illegal characters on Windows
arcname = self._sanitize_windows_name(arcname, os.path.sep)
targetpath = os.path.normpath(targetpath)
# targetpath = os.path.join(targetpath, arcname)
# targetpath = os.path.normpath(targetpath)
# Create all upper directories if necessary
upperdirs = os.path.dirname(targetpath)
if upperdirs and not os.path.exists(upperdirs):
os.makedirs(upperdirs)
if member.is_dir():
if not os.path.isdir(targetpath):
os.mkdir(targetpath)
return targetpath
with self.open(member, pwd=pwd) as source, \
open(targetpath, "wb") as target:
shutil.copyfileobj(source, target)
return targetpath
import os, time, shutil
import zipfile as zp
import binascii
import functools
import importlib.util
import io
import itertools
import os
import posixpath
import shutil
import stat
import struct
import sys
import threading
import time
thanks @dry dock
changes:
theme- login-background
show = kbScope
to change user-display you need
!$ctrl.user.actions.update
$ctrl.user.userId == $root.auth.user.userId
/class/Period4LanguageArts/posts?author=575a3rmi503i7fpg9s4hzv7ik&status=published&status=review&status=draft
575a3rmi503i7fpg9s4hzv7ik
5hw75ezxq9etqm9ip5ree8cgg
3defqvashwpaknq6ldif2dha1
9zg56mtw49pxp5elcz3av8d0q/7Iz8jtspQTesyuYVL10A
9zg56mtw49pxp5elcz3av8d0q/resized/2mi6HMteQUiJvUpPMntl_image
🤔
Sir @crude cove, if you're participating to the jam, wanna team up with @tidal junco and myself? :>
Because.. It was the first channel that I found haha
@bold moat asking here because its a low volume channel and easier to get a reply. Would you like to join a game jam team with @brittle mango and I? I'm guessing its quite a busy time for you at the moment, but I thought I'd ask anyway
full disclaimer - it can get busy for me too, but ince game jam is less restricitive in all regards, why not 🙂
@quasi condor thanks for the invitation! I would join right away but I already got invited by @scarlet plume to his team so sorry I can't.
Good luck tho and let's do our best
Not a problem - and good luck
hey, is anyone available to hop in voice chat with me? i want to explain an issue im having. I need direction for a project im doing, and i don't know where to go, python/html/c
feel free to pm me or anything, willing to take any advice given
i can't hop in a voice channel right now but if you describe what you're doing in a off-topic channel i could try to provide some direction
why voice chat is locked?
@calm sage I am going to run Raspbian on a Pi 4, the goal is to have a full screen webpage or program that has a slidshow background, and things like Time, google lists and calenders overlaying this background. I cannot find HTML/CSS/JS that will allow me to do this where an end user can access a network shared folder, drop in any files, and the slideshow would auto update. I've gotten very close after learning hours of code that im not familiar in(mainly with python & html). Which direction should i go from here?
@slate sluice it's not
@whole bear @whole bear what's the problem
try asking in #discord-bots
Improper token has been passed.
Create an OAuth application at https://discordapp.com/developers
Discord Developer Portal
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
go to the bot tab, create a bot
and copy the token from there
@coarse eagle Did you need help?
hi someone can help with implementaion of code related to sockets? thnx
no
!rule 5
5. Do not provide or request help on projects that may break laws, breach terms of services, be considered malicious/inappropriate or be for graded coursework/exams.
so NO
What's wrong with helping with sockets? How does that violate rule 5?
@whole bear What happened here?
(edited) is probably telling
Hmmm. I've helped people on things that might violate rule 5 in the past... Not here but just, in my life. Typically because I haven't noticed until much later what an ulterior motive might have been. I've always regretted it.
rule 5 is a little broadly worded imo
it can be argued that it forbids working on emulators here
@dry dock If you have questions about rule 5 you can always ask in #community-meta
@old kelp What was that?
@whole bear what did you just say
@sleek tiger What do you mean?
Someone deleted his message @whole bear . It was something about diacord hacking or something
Ah, gotcha. Apppreciate it. 👍
@paper crypt
👀
Hello gdude
@shell dome ?
Why the @ 👀
test
@whole bear ?
nothing im just testing something
Whatcha testin'?
trying to see if my name looks better as aero or as aer0
what u think?
Neither nickname ( aero/aer0 ) is "better" in my opinion.
lol haha
No prob. You two need any help?
A little, yeah. Whatcha workin' on?
I am attempting to contribute to a Minecraft crafting pack just trying to figure out how to do that exactly
all good
I think I figured most of it out I just need to add my contributions to the folder
anyone here know any java
I know that I don't like the syntax of java.
lol
what do you need in java
do we need to make a special request to ask for some help over voice or just hope to get lucky that someone comes along? I'd guess we have to start in text and ask to move to voice??
Could just hang out in the channel, people do pop in from time to time if people are around
cool thanks
@whole bear Per Rule 6, your invite link has been removed. If you believe this was a mistake, please let staff know!
Our server rules can be found here: https://pythondiscord.com/pages/rules
I didn’t advertise
here: discord.gg/code

