#ot1-perplexing-regexing
1 messages Β· Page 241 of 1
Think it's the real stuff.
We kinda inherited them from my brother's boss.
a used loveseat? 
Cease
π€
was it so filthy?
Wasn't filthy.
Just needed to be cleaned before coming in the house.
Wow?
I have a question regarding programming
I've only been making non-loop type programs, as in they flow in a pretty linear fashion
let's say you want to create a python program that flies a quadcopter, for instance
there could be multiple things occurring simultaneously.... how does it account for all of these? async?
let's pretend there's an LED programmed to flash off and on at a certain interval, but with completely different timing let's say you want to log altitude or velocity every 100ms... how would that be done?
Well, an event loop or something like that could do the work
I understand a loop can do it, I just don't know how to account for the multiple sub processed occuring, short if having some if condition, like if you want something to happen every 500ms, every loop around it checks if that time has elapsed from the last time the action was ran, and it will only be True if delta >= 500ms, for instance
it just seems like an ugly way to do it, but I don't see why that wouldn't work
I can see the neatness of the code spiraling out of control if you want even a mild amount of events to occur at certain intervals though
You could create a Task class, which could be an interval or a timeout, in the loop you check if task.target >= current_time, if so, execute a function. If it is a timeout then remove the task for the pending task list, else if it is an interval, add task.interval to task.target
hmm I can see that working well
and each time some object is triggered, the next action for it can be put into the queue, sortof
Whatever, you should do a little sleep in the loop, else you will be using a lot of cpu
as in, the next time it will trigger next, and/or whatever other arguments it needs
yeah definitely
I would just use a list and iterate over a copy of it, so you can safely remove task from it
thanks for explaining this lol, I just want to work on something fun and ambitious going into next year, and I wasn't sure how to even start
i've never built any robots myself so i apologise if this is dumb, but if i was going to, i'd handle concurrent behavior on the hardware side rather than the software side. the software would then change the state of each of the concurrent behaviors and in turn receive updates back, maybe through a socket. each behaviour could be operated in its own process or thread. depends on what youre running it on i suppose.
import time
class Task:
def __init__(self, timeout, func, args=None, kwargs=None, is_interval=False):
self.func = func
self.args = args or tuple()
self.kwargs = kwargs or dict()
self.target = time.time() + timeout
self.is_interval = is_interval
self.timeout = timeout
def execute(self):
self.func(*self.args, **self.kwargs)
timer_resolution = 0.2
tasks = [
Task(5, print, ("Hello after 5 secs",) ),
Task(1, print, ("tick",), None, True)
]
while tasks:
now = time.time()
for task in tasks[:]:
if task.target <= now:
task.execute()
if task.is_interval:
task.target += task.timeout
else:
tasks.remove(task)
time.sleep(timer_resolution)
could be better
thanks, at least I can use that as a starting point
btw what I was asking about is called concurrency, I found that out a few min ago from a video I've been watching
yeah but, for what you asked, concurrency is probably not necesary
anyways, do as you like
I'm just taking everything in right now. I don't know what I don't know in this aspect of programming. So I hoover everything
I do appreciate your guidance though
@bleak lintel did you play a hat in time yet?
i do not know that game no
you need to know that game @bleak lintel
i have heard of it
and now apparently you have a machine that can run games
Oh I think Shady played it actually
lol
right right, macs rely on external gpus
The default boss battle theme. _________________________________________________________________ A Hat In Time Seal The Deal - Death Wish Composer: Pascal Mi...
really enjoying the soundtrack for the DLC
although the buildup lasts for 1:18 in this one :P
beast machine
well I suppose it's better than what you were using before
you probably won't run a hat in time on that though
ππ
yeah, you need a 3.5GHz CPU or higher
this goes up to 3.6GHz
Intel Core i5
no
what
that's a whole family of processors
oh
it's probably under system report
Josephs-MacBook-Air:~ joseph$ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz
I'm a little sad that they're making processors this low-powered for this much money still
lol
lol
oh that reminds me I need to transfer across my keys from my laptop
time to figure out where gpg stores it's crap
I don't think I'll ever connect additional screens to this
after all I only have 2 USB-C ports & an aux port lol
lol
merry christmas
no
I'm also not sure it's legal
Ehm.
Eww I mean I wanna marry christmas
I never would marry a ImportErr, because he is gonna import too many errors, and then e are gonna get divorced and then he is gonna cry and then I am gonna import christmas and then I will say gift = Christmas.present(lamborghini) print(gift)
@frosty marten if you marry christmas you'll only see him/her every 25th of december
That's the fun part
cheats on christmas
however, if you marry me (which isnt going to happen) you can raise my exception everyday
lewd
I have always been excited about christmas
π
β
await Context.Channel.SendMessageAsync("Hello World");
My birthday is only a few days before Christmas
so I haven't really ever got along well with Christmas :P
My grandpa's is a few days after :P
anyone who is within like
a week or two either side is usually bad
but being in that zone is generally bad, people saving to spend on christmas and shit
i figured out when i was pretty young i was getting less spent on me because of where my birthday was in the year
my uncle's birthday is on new year's
lol
@gentle moss Restart your evolution. Just watch Perfect Timing videos from youtube and you will be ready for time travelling
i figured out when i was pretty young i was getting less spent on me because of where my birthday was in the year I find a solution for your problem
Yes, just re-evolve....
lol'd
cease

Id rather want the brussels -my dad
Well I wouldn't want the chocolate
but I also wouldn't want the sprouts
so much friggin chocolate
like 5 tubs of mixed stuff, 2-3 thorntons and a bunch of other stuff
i don't even like chocolate that much :(

Yes but it'll have even less peaks
y
Customs fees
yeah but we can one up you
one second let me get the image
here we go
@robust sierra make one of these
Affirmative!
cheers sausage
is that the orange chocolate thing in between the peaks?
Yup
yes
mmm
gdude, i wanted to ask, what do u mean by "Spread functionality over multiple bots" ?
Literally what it sounds like

under 1 program?
Yeah, right now we have all our commands in one bot, moderation, fun, utility
we want to split these up into multiple bots
that is what https://github.com/python-discord/pydis-bot-core is going to be for
toblerone isnt hard its just that you lack the physical strength to break/bite the pieces causing you to fall under the illusion that the toblerone is hard when in reality it is very soft unless you keep it in a freezer for over a week k?
because my project will be able to run more bots at the same time, with the same dataset. Like if they have same users, guilds, etc etc, they will share their data.
@robust sierra how is berone
lol
Ded
i should probably delete it if i want to get employed when im older
lmfao
Is this server usually this active?
yeah
at night time more active
17:41 here
it's normally more active when it isn't christmas day
16:42 here
most of our users are european
so most people come on after work & school and stuff
my last commit to berone was two months ago
lol
notes joseph's timezone
then it must be 1st π
It is the first web framework in the world?
no, but its the best
i have a bunch of other useless projects i made for the sake of learning that are on github for no reason
@bleak lintel can your web framework of choice do dis?
yes
proof
n1 on the coin rack jo
@robust sierra
printing the werd "weed" no count
or typing it out
prove to me that you can replicate my "work of art" using any other python web framework that isnt berone
no
lol
No!
@sand goblet anyone is allowed to post in #295490247255523338 now?
No?
ooooH
how do you update python on raspberry pi
i looked it up but all help source are outdated
@late spear
sudo apt-get update; sudo apt-get upgrade
yo nvm i think i got it
apt is better than apt-get when you're not scripting, I'd recommend using it instead π
what would that sentence in say, lucida console, convey
that's not a font
Would you take it serious if it was in comic sans?
Would you ever take something serious when it's written in commic sans?
sometimes you have to
honestly if this card was handed out at my funeral i.. well, i'd be dead. but that card is amazing lmao
whats pickle
the documentation says "The pickle module implements binary protocols for serializing and de-serializing a Python object structure."
basically, you give it a python object and it gives you binary data which can be saved to a file and then loaded up at a different time or in a different program.
i feel like eating pickles now
I jumped from Python to C#. I am proud that I learned Python, because it helps me alot in the magical C# world. "This is an ad"
You can go download my T shirts at Python.org
C tic tac toe
no
@tulip palm ```the documentation says "The pickle module implements binary protocols for serializing and de-serializing a Python object structure."
basically, you give it a python object and it gives you binary data which can be saved to a file and then loaded up at a different time or in a different program.
hm?
if you disagree with what i said then that's fine, but at least tell me what i said wrong lmao
No
okay.
Eagle, cut it out with the no's please. You were doing that yesterday and it is just spam now.
@bleak lintel Ok boss
@tulip palm But Juan we are at escuela
Anyone know how you can install 2015 c++ redist and 2017 c++ redist without them overwriting eachother
Why 2015, is there something better?
u propably cant isntall older version after newer. But older programs propably need older version


neither
Or Do you just wanna be and your mom don't let?
Oops, I am sorry
have a nice day
oh what i have missed
@sonic night would you want to share that nsfw art with me π
great
...

no ban pls 
gf opened the front door then slammed it immediately
"there's an inflatable dinosaur outside."
lol
π
What the...
y = x ^ 2 * 70 is this good for leveling system? or is it too high?
@maiden wave lmao
probably depends on how you gain x
By Typing messages. But if you type 10 messages under 3 secs it don't count
1 message = 5 xp
and you can get Points everyday. 1 point per day. 1 point = 100 XP
is it (x ^ 2) * 70 or x ^ (2 * 70) 
uint level = (uint)Math.Sqrt(xp / 70);
square root
yes which is the inverse operation of squaring
U like math?
Are you lucy?
You don't know the smartest guy in the server
I am confused
why is that
its too obvious
that im smartest guy
isnt it?
2 days ago i downloaded linux lite to one of the pc's in my home. its like 7-8 years old
and now it works so damn good
except that it closes itself when it gets too hot :d
tried to download pycharm and i even couldnt write something, it closed itself
what u mean with normal?
Is this minecraft v2 π€ https://www.youtube.com/watch?v=o77MzDQT1cg
For beta sign-up, screenshots, detailed articles, concept art, game info and more, please visit our website: https://hytale.com/ Hytale combines the scope of...
Notch is hyped 'bout it
Huh
phenomenal looking trailer.
minecraft 2.0 is exactly what it looks like.
could be huge
It's not Minecraft 2, because it's hypixel
Not mojang
But it does look interesting
or it will support only linux, and every1 will throw away mac and windows 
Well that won't happen
It looks crap
if it looks bad, u never saw minecraft
Y'all just think it's cool to hate on Minecraft and similar
No, I'm actually a staff member on one of the biggest bedrock servers
If only bedrock was half of what java is
Although to be honest
It performs so much better
Yeah
I'm just sad we lost the prospective of mods
Mods were cool, yeah. I never got into them
I did
But you need a hella powerful computer
I've actually been doing Minecraft since it was released, more or less, back in classic
Oh, really?
Yep
Ahh
You probably haven't heard of it, but I was owner of The Archives
Oh nice, nice
Ended up being fairly influential for its time
It's bedrock, but you never know
It's quite popular, but it can't compete with the sponsored ones
It's called NetherGames
Yeah, rings a bell
Really?
Yeah, I agree
Hope hytale doesn't go down that road
They mean that 3-4 servers have huge playerbases and others have no players
And then the huge servers have to be super micromanaged
Yup
the fact that pickle has 31% of the searches absolutely terrifies me
I think the problem is not that it has 31%, the problem is that people set in onto the level of actual SQL or NoSQL DBs
could they not just be confusing search queries for tiny cucumbers in vinegar?
Linux is good, because Linus Torvalds wanted it to be good. Only os what works for me, when I downloaded it. It connected internet! and it was awesome. When I downloaded Windows I needed internet drivers and then It worked for week, and new update needed new driver and now it has been working for 1 year. And now newest update f'd up the bios somehow
It works but when I try to open bios it just blinks
Windows is ok, but I think It's designed for problem solvers
I have never had any issues with any of my windows copies over the last 12 or so years. So not sure what you're doing wrong then.
Hah, yeah. Windows has the most driver support of any operating system. It's been the the hot plug system for over a decade now. YOu must have a broken copy, or some incompatibilities somewhere
Ye
get macos noobs
I've been having problems with windows not being able to boot without failing dozens of times for years, turns out that I when I didn't update my virtualbox driver for a month a new version would come out and then windows would check the digital signature of that version and notice that something bad must be happening because it's not the one of the latest
In other words
Same
Crash on boot because that is the only logical thing to do
I have had 1 million problems with windows.
Linux has been the opposite. When I first started, I didn't know anything about GRUB. Normally that doesn't matter if you are using Ubuntu. Ubuntu can automate the entire installation process for you.
I think my only problem with windows so far, Is using the store after completely removing it
That said, it took me about two months to figure out that the Ubuntu live installation copy doesn't let you pick where to install GRUB. Which became very fucking confusing when I installed Ubuntu on an external HDD, and it installed the bootloader on my Windows HDD.
One time windows forced me to install a new windows app from the store for playing a video file format which was working perfectly a week ago.....
Linux is great. If something goes wrong it sends message for support team if you want.
And if program crash, you don't need to press Ctrl + Alt + Del, because you can just close it
Well
What? Memes?
for some reason, Tensorflow wont work on my macOS machine
You can make it freeze so hard that it will actually not be able to continue without rebooting
It would be even better if you did them in an "You see, Ivan," format
macOS is a bitch sometimes
It's good when software works when you install it
Yes, it's also great when my car cranks up when I turn the key π
Yes and it's also good when my bike goes forward when I drive it
Once I made my package in fedora which I am the only maintainer for crash so fedora would offer sending a report to the response people
I got nothing
Listen, I love working in Linux. But it's an extreme pain in the arse if you aren't intimate with it. If something breaks, it's not enough to consult a Linux manual. Every distribution AND version has its own thing going on.
So I'm not exactly sure who counts as responsible for crashing packages
But it's apparently not the people who know the package
@rough sapphire That's just my personal opinion. You don't have to listen. and i don't hate windows, just had very much troubles with it.
I'm distrustful of Windows
But I've used it all my life, as a casual consumer, so I really like it for that
Peak Windows for me is an XP desktop with 50 shortcuts and three different Opera tabs open for GamingW
I find linux good for coders. But visual studio is good for C#
That's .. uhh an odd comparison
you don't have to agree with me.
Like, sure your statements are.. correct. But you're comparing an IDE to an OS?
o_O
my understating is that they were referring to VS not working on Linux
Linux is good, but Windows has VS
that kind of thing
Mac OS X then :p
maybe now they will though, what with MS creeping more and more into Linux territory
I have a Windows VM, more than enough
MS creeping into Linux territory is just part of their strategy
The 3 E's
Embrace.
Extend.
Extinguish.
"Embrace" AOL's IM protocol, the de facto standard of the '90s and early 2000s. "Extend" the standard with proprietary Microsoft addons which added new features but broke compatibility with AOL's software. Gain dominance since Microsoft had 95% OS share and their MSN Messenger was provided for free. And finally, "extinguish" and lock out AOL's IM software, since AOL was unable to use the modified MS-patented protocol.```
didnt aol shoot themselves in the foot
vaguely remember reading something about how they basically let everyone else step on them by basically procrastinating
basically
i think part of it was their desire to create a walled garden sort of environment
This video thoroughly explores various aspects of candied walnuts. Pimblokto Playlist http://bit.ly/2CDdoEE Subscribe: http://bit.ly/1HuynlY http://instagram...
i was making bread at school one time and added ingredients in the wrong proportion
so instead of dough i got a batter
It uses GELF or syslog logging
try:
# code
except Exception as e:
graylog.log(e)
I actually have everything running under docker
And then I tell docker to log to GELF
No code changes required
oh
so... like it intercepts all your exceptions without you needing to catch them? im confused
"as normal" :/
ok now i need to learn how the logging module works :/
app = Flask(__name__)
_log = logging.getLogger('werkzeug')
_log.disabled = True
app.logger.disabled = True
thats the only time ive ever used the logging module
ah thank god corey schafer has done videos on logging
@sand goblet sentry is fucking awesome, ur misssing out
sentry is fantastic
It has some great integrations and the metadata is very cool
Also the automatic regression marking is smart
It can also tell you all users who have been affected by bugs and things
i've been looking back over the student pack, and so many things that i thought i wouldnt want back when i first got the student pack are turning out to be really useful
btw how quickly do you go through your events?
cuz u only get like 500k
can this channel be renamed o Chew ass and kick bubblegum?
If this name was accepted by the admins and I believe wouldn't be too long got a discord channel name
Yes
actually that's already an otname
so you'll probably see it in the future.
also I have no idea what @tired osprey just said.
Can i join your club, @tame terrace ?
what club
The not understanding nix, club.
got -> for
he's trying to say "If the admins approve of the channel name, it wouldn't be too long before it becomes one."
I think you're wrong.
that's not what he's saying at all.
he's saying "if channel name is too long, then the admins won't have time to read it all, so they can't approve it."
@tired osprey the channel name changed
sick
Despacito
Dead meme
Despacito 2
Despacito 0.5
Despacito 2: Electric Boogaloo.
to anyone whos good at writing documentation... you know how in docstrings you might do arg1 : int...
what do you do if arg1 is a really complex object? do you just put object instead of int?
hmm that doesnt quite solve my issue :/ ill probably just call it custom object
however that is quite interesting in its own right
i'll probably do that in addition
@lilac ice hello there
o
"""
Imports modules from the relative path `modules/` and saves their objects into a list.
If the file does not end in `.py` or it starts with `_`, it is ignored.
Parameters
----------
logger : logging.Logger("sentry", level=10)
Used to log errors and exceptions.
reimport : bool
Determines whether to import or to reimport modules.
Returns
-------
modules_list : list
List of module objects imported
error_volume : int
Number of modules that could not be successfully imported.
"""
this is what i have so far i think its turning out ok
complex object would be like the logger parameter
and multiple possible types would be like if a parameter can be NoneType or str
does typing affect stuff during runtime?
meme: Optional[str] represents an argument that can be either str or None
Nope
Just linters, static analysis tools and stuff like mypy
ah :/
mypy's super cool, if you haven't used it before
unfortunately i can garuantee none of them would actually be able to analyse my code, due to its fucked up nature
rip
Python π€’
Java π€’
C/C++ π€’
GameMaker Language π
π
@tame terrace do you ever wonder about that one guy who tags you every couple months
looking through your history, this is the twelvth time you've pinged me for basically no reason.
classics like
and let's not forget
how about don't do that anymore.
lol
@tame terrace I love talking to you when I'm naked
o_O
!warn 334474778360545280 Please don't randomly ping an owner with an inappropriate message
:incoming_envelope: :ok_hand: warned @main swift (Please don't randomly ping an owner with an inappropriate message).
you guys ping me for weird reasons, man.
atlemon hi
@oak tangle r00d
oh dear.
@main swift What are you trying to accomplish?
Pizza
Okay, let's stop this. You've just got warned for an inappropriate message and a random ping, maybe we should leave it at that.
Hard to believe pytthon has so few built-in functions :
https://docs.python.org/3/library/functions.html
@pseudo vigil most of programming is really just a collection of logic gates in a clever way. π
javascript is not fine
OMG
guys
my pfp just showed as a robot for one sec i didn't even change it wtf i'm scared
Javascript is fine
Any idea how to clean / wash a headset like this?
do the ear pads come off?
Not from any easy means at least
hey chibli, is there any logs here? someone was ghost pinging me i think
Just now?
yes
An issue for your server now then Β―_(γ)_/Β―
@glass gorge http://forum.corsair.com/v3/showthread.php?t=181122
Void Pro Wireless ear cushion removability/cleaning Audio
mhm
these are voids right?
Yeh
The earpads are stretch over the edge, so just lightly pull on them and they'll come right off.
anyway, that's where i'd start. pull those off and soak em. let them dry etc. then go over the other parts with a wet cloth or something.
Would you soap em?
These headphones just get better and better the longer i own em
should I use olive oil on my turkey? anyone with experience in this field?
no experience, but let er rip
thats what she said π
:)
oh well.. I use it, just for the sake of not burning my butter at least
is there an alternative to javascript in websites? (that does transpile or compile to javascript, or somehow end up as javascript)
*doesnt
idk...
im halfway through the video, so far they showed some stuff that becomes javascript
and now theyre onto brython
and i went to brython.info, and the python is in a large js file...
@rough sapphire Start the celebration early for those who won't be here when the event actually starts.
Purrey Today at 9:41 AM its still 31/12/2018 here lol
Gotta start the celebration here early for those who won't be there later.
I'm learning HTML and CSS to make a very simple webpage.
I came across a CSS reset file, but how do I actually use it?
At the end of the main.css file, I redefined a few selectors but the changes don't show up
edit: Solved!
Turns out I have to use two different css files and call the reset.css before the main.css in my html file
@sonic night
Thank you for that link on Russel's speech. Very interesting!

I know but I am just showing my appreciation I now understand why people say you can't use just python for web pages
Yet
....
π
New logo looks cool
@brazen furnace depends on how the server is configured, usually a php server will process the php, not reveal it
yh thought so
where are these new titles for the discord chat come up from π€£
There's an issue opened on Github that allows users to submit their own.
Some come from them, others from inside-ish jokes.
javascript is not fine
sure it is.
just stop trying to build spaceships with it.
it's fine for client side scripting in the browser.
yeah i agree with you
whoever uses javascript should be sent to a gas chamber for maximum suffocation
node. electron. even react. not fine. but js itself is fine by me.
useful. fairly straight forward. people complain about it far more than they should.
python still better
web assembly is coming
web assembly might be great. I'd love to python everything on the web.
i rather use C on the web
you can do that with web assembly
C# might be nice.
rust might be nice... wait rust already IS nice
but even with web assembly I doubt people will stop using html, css and js
it's a good option for simpler stuff. like static pages especially.
electron should be crucified
and burned
it was nice talking here time to leave bye
Happy New Year
Happy new year!
happy new year!
but i have a question
i keep waking up before my alarm
like 1 hour before
it happens almost every night
any suggestions? :d
just go back to bed lol
huh very clever!
never thought of that!
wow
the thing is, i wake up, the alarm actually doesnt matter. i wake up before actually getting enough sleep, and it doesnt matter how hard i try, i cant sleep again after i wake up
wtf flake8
i literally just went to the end of my file and hit enter
watch it be cuz windows did /r/n instead of just /n and flake8 didnt like that or something :/
nvm its cause my thing autoindented and i didnt realise
apples and shotguns LOL
@dawn valve i believe some laptops come with the functionality built in
and there's stuff like this https://www.amazon.com/Dekart-SIM-card-reader-Windows-x/dp/B0045BIUGG
though that doesnt let you make calls and stuff
aint 33 bucks too much for that
suppose that depends on how badly you need it and what else is on the market π
oh welp
so much blue
ahh, but some of it is cultured blue with a moustache
google home is spying on you 
C# would actually be great to use with WASM @tame terrace would be cool with razer pages to do the whole thing
Girls are gey
Ok?
i mean, only if they're into girls
import earth
from earth.human import gender, sexuality
for human in earth.humans:
if human.gender == gender.female and human.sexuality == sexuality.homo:
return
is that a class method?
interesting use of self
best practice is list_
for naming
i've always seen it done that way

like this
I don't even pet my dog like this.
@sonic night that's O(logn) too?
this is how I swung it
def neighbors(s, idx):
ns = set()
if idx > 0:
ns.add(s[idx-1])
if idx < len(s)-1:
ns.add(s[idx+1])
return ns
def find_unique(s, lh=None):
if lh is None:
lh = (0, len(s)-1)
l, h = lh
if l > h:
return None
m = (l+h)//2
e = s[m]
if e not in neighbors(s, m):
return e
e = find_unique(s, (l, m-1))
if e is None:
e = find_unique(s, (m+1, h))
return e
# more
# comments
# please```
na all good, drop me a link when you have the wrapper up & doc'd
@rough sapphire Why are you taking up programming?
i thought that instead of working minimum wage jobs i'd learn a skill i could use to do freelance work on my own terms
Oh, right, that sounds like a good motivator
i'm also developing a strong interest in hard sciences and programming would benefit that and vice versa
It may be helpful to start contributing to community/open source projects in the future, if that's your end goal
definitely, like build a portfolio?
Sure, and get used to collaborating with others
Using version control tools and stuff like that
We've got a community project on this server as well
For our website and discord bot
right
i'll definitely start doing that once I'm like, way more advanced
i'll finish this book first at least
Just be like me and submit textual changes
don't think of it as some super out of reach goal. a lot of projects are very beginner friendly in the open source world.
for real?
yeah, for sure.
on github, a ton of open source projects will have issues that are specifically left for beginners
and first-timers
they'll often be labeled as such
that's wild
and if it's a good project, they'll be happy to spend some time with you one on one helping you get started.
we certainly are.
well, certainly learn some basics and maybe do a few projects.
something around can read and write code and understand code whihc is split accross multiple files
but after that, there's nothing stopping you from starting to get into that world
and the earlier you start, the better for your potential future career.
building a GitHub profile is super valuable.
right
such an easy way to build an impressive portfolio. you just help some people out. it's fun, it's a great way to a learn, you'll meet a lot of great people.
and all the while you're doing it, your profile is looking better and better to potential employers.
tightt
You can take a look at our Github, if you like: https://github.com/python-discord
damn, i had no idea, hearing that makes me really eager to finish this book and continue on to more real things like that
I started doing open source much too late. I wish I'd done it earlier. so that should be your takeaway. find good, real projects, and contribute. as soon as you're sorta comfortable with the language.
yeah π especially on meeting other ppl, like i met samy kamkar the other day, thought it was a fake name, turned out it was actually him lol
hmmm... what do u do if ur doing a project for money and cant make it open source?
make it open source
i cant... ppl would just steal it
damn
"people would just steal it" is probably just paranoid.
generally speaking, nobody cares about your thing.
im not selling the software, im selling a service
and does anybody apart from the people who want the service care
like the people who paid you to make the service
no... but i dont want a bunch of indo guys ripping me off
that is very likely not going to happen
someone made something similar (but simpler) - 130 stars and 90 forks
ok lets say i wanna make it open source
im not allowed to because a lot of people would get very angry
why
cuz trade secrets
you don't have to open source the trade secrets.
no, you're saying trade secrets and obviously I don't know what you mean by that but usually something like that can be boiled down to implementation.
as in, you could build a system that could be used in a generic way
and then use it in your "trade secret" way
you could put your trade secrets in like, an environment variable or whatever and require that the user make his own. so yeah, open source 99% of it.
why the fuck does sublime text not support user input box
because its a text editor and not an IDE
there are plugins to make that work
execute your code in a terminal or something or use plugins
There are, but I usually run it from the terminal when I need user input (which is almost never)
lemme put it this way... there's a public repo that does what i do but simpler, it's a client - and they got mad when i fixed gifs so that it would return the whole gif, not just the first frame as an image
like i cant really share small things
is there somewhere on github where i can like describe the project without showing my code?
there's a public repo that got mad when you fixed something?
just fork it and fuck'em
no
wait the ppl got mad at me cuz i helped the ppl who use the public repo
cuz i fixed it
the people who use/make the public repo weren't mad at me
Lemon is from not the US though
but you are
Fight me
π€

anybody know a way to map a shortcut to a plugin command in Sublime Text
#help-grapes βΉ
Probably a better question for #tools-and-devops actually
you're right
Because Balance won the Wallet-Measuring contest.
Why do you hate the cat from shrek
the cat is orange
Which is just a red yellow
okay but wumpus is blurple and wumpus is awesome
bravery badge is the closest to that colour
gold is shit
Then why is there a gold standard?
what do I have... brilliance is best
I have to admit, that's pretty damn clever
Looks a little flimsy imo
if its rigid it will just break, so maybe it is flimsy by design
!warn 462049443357917215 We do not allow advertisements for communities.
:incoming_envelope: :ok_hand: warned @rotund oar (We do not allow advertisements for communities.).
lol
like no right answer?
Itβs the first choice
no not really, it's not a private with single underscore
it's a protected
as well as it won't prevent from being called by external code, rather just marked as you should not be using it from the external
Right. But python doesnβt have access modifiers. Itβs a convention to mark private methods / variables with a _
But it doesnβt actually do anything from a language POV. Itβs just convention
ok so the difference between private and protected is that private cannot be used by subclasses
and that is really what would happend if you do double underscore
unless you would unmangle the name
so private in python is double underscore
single underscore in python way of implementing protected
here is an example:
In [1]: class Parent:
...: def __init__(self):
...: self.__private = 'foo'
...: self._protected = 'bar'
...:
In [2]: class Child(Parent):
...: @property
...: def private(self):
...: return self.__private
...: @property
...: def protected(self):
...: return self._protected
...:
In [3]: c = Child()
In [4]: c.protected
Out[4]: 'bar'
In [6]: c.private
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
I would not call it private and protected, because it's different from what e.g. Java understand by these concepts
I think PEP-8 calls the single leading underscore "suggesting internal use" or something
It does
names with single underscore can still be accessed from outside the defining class, there is no protection at all. Just a hint to the developer (and possibly linter) that this thing is meant to be used internally
About subclasses, yes, due to the way name mangling of double underscore names works, you can not easily get these attributes or methods from within a differently named class (i.e. subclass).
nevertheless there is no right answer on the question as I said, all the answers are invalid.
about the quiz question "mark it as private" is still the most correct option, though I agree that technically it could be worded better
Well I guess it could also be 3rd choice too if itβs in respect to imports but that can be overwritten by dunder all
I would tend to number3 tbh
because "mark as private" doesn't necessarily imply any technical protection, just an annotation
but still it's invalid
yeah, but single underscores are ment to be used by subbclasses
why
so again it won't fit private definition
there is no private/protected in Python like there is in Java
don't try to use these terms for the same thing in both languages
are we talking about a function or a method? if you define a global function with a leading underscore it wont be accessible from the outside when the file is imported i think. in that sense it could be considered private.
No and there's no prevention going on, like answer three would suggest
It's a method name in this case
@vapid bluff if I remember it correctly you would still be able to do the folllowing
import foo
foo._bar()
Well there actually IS some sort of prevention with imports and underscored method names right? Excluding use of dunder all
or even from foo import _bar
At least with wildcard imports
it's not imported if you would do wildcard
ah right, so it's only when doing from file import *, right?
ah right
correct
Iβd still tend to the first option though if it were my quiz as itβs most correct
I'd agreee on 1st
yeah, as a matter of convention.
import chungus
chungus = chungus
bot.run(chungus)
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\SICKO MODE or Mo Bamba>cd desktop
C:\Users\SICKO MODE or Mo Bamba\Desktop>cd chungus bot
C:\Users\SICKO MODE or Mo Bamba\Desktop\Chungus Bot>py chungus.py
ERROR: Chungus is too big to import and run.
C:\Users\SICKO MODE or Mo Bamba\Desktop\Chungus Bot>
the correct answer according to the quiz was "to mark it as private"
its definition would be to avoid using the property externally as the preferred use would most likely be better suited for internal use
if u alter said property externally it could potentially cause issues unless u know what ur doing but even if u did doing smth like that really does seem like a bad practice
yeah, because u cant private variables
so its more like "externally manipulate at ur own peril"
(50 edits later)
all those public private protected keywords in java always confused me honestly
thats pretty much what i do but then again i have no reason to package my code in the first place so no one would use it externally, only me
im using that term loosely, i mean there isnt anyone to actually do anything to my code because i wont be distributing it
oh waiyiyiyiyiyityiyyiyitit
sorry for my idiotic brain cells not working
ImportError understands
what
i have developed algorithm for these questions
get LCM and divide by HCF and add LCM to LCM until equal 0
lit
You know, there are three types of programming languages:
with manual memory management (like C/C++) where you have to manually allocate and clean up memory (they usually compile to native code), so that makes your program very fast if you do everything correctly, or otherwise you have to debug random segfaults (very scary errors)
with automatic memory managment (like Python/Java) where the runtime (interpreter/VM) Manages all memory for you using a so called garbage collector (which cleans up memory of unused objects), but these are usually slower (compared to languages with manual memory management), require another program to execute your programs and are easier to write.
and Rust, which is fast (compiles to native code) and has neither manual memory management nor runtime (or garbage collector)
_________________________________-
someone explain to me where rust gets memory from?
or not exactly that but
it makes it sound like rust just uses more and more memory until the process runs out of memory?
nvm i scrolled down what i was reading and it was explained :/
rust has its ownership system if a thing has no owner it gets murdered
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\SICKO MODE or Mo Bamba>Lucid Dreams
ERROR: SICKO MODE or Mo Bamba
C:\Users\SICKO MODE or Mo Bamba>
I keep getting this error
Hey, I would like some legal advice.
Is despacito 3 using a synthesizer?
I really want to sue them for autotune.
Nvm, figured it out.
possible duplicate of https://stackoverflow.com/questions/20475552/python-requests-library-redirect-new-url
Petra's video now has 1,000,000 views!!! Here is her BLird (Bird Blog) about it! https://petragrey.com/2018/08/12/petras-most-recent-viral-video-just-hit-one...
what timezone are most of the admins in?
i barely see any online in the morning (GMT)
We've got a couple of admins in uk/central european time
Guess morning means work for most
there used to be a lot more admins online before in the morning
Online doesnt mean at their keyboard though
true
it's a good mix, actually
about 50/50.
actually the majority would be in the US now.
only volcyy and ap are EU.
this actually worked
hahaha
yeah, we did make a concerted effort to hire more americans into our staff
indeed.
Smh and you missed the most American of them all πΊπΈπΊπΈπΊπΈπΊπΈπ¦
Feels Refisio Man
π€ i like being American
you can use google maps all you want @rough sapphire
Listen
i dont see anything illegal
lol tell me what part is illegal?
Because there has never been any kind of legal problem regarding google maps
hasn't it
not as far as i know
could you show me some?
ive never worked with google maps
??
wtf
you want to charge me to prove your point?
I already said that I won't keep talking about this
π
You do you man
thank you
why that
lol
*> be 13 year old kid playing league
give legal advice
run out of arguments.
go back to league
mfw*
Thanks for calling me a 13 yo kid
You just demostrated your moral superiority
Laterax 1 - Surister - 0
thanks



well i'm not.



