First Last
@a5rocks
Motivation... Please give...
I'm pretty sure the sieve thing I did speeds up execution... Though that is left to the imagination.
Python
For a while I was disappointed that my language of choice doesn't have a case statement, but then I realized I could just do this:
return 'zero', 'one
Python
Probably works? The code does not exactly inspire confidence.
no loops needed (afaict, ofc the string manipulation isn't that efficient, so the compl
Python
Yes it's recursion but oh well I can't think of how to do it without said recursion.
This does at best y additions and at worst x + y additions. Prob
Elixir
Now, I know this is python, and really low effort, but this is a Proof of Concept.
PS If you can think of a way for **kwargs to work well, I would re
Python
Part 2: What are these crazy functions?
In case you haven't already read part 1: here it is.
So firstly, like @pyelias said, it's not actually an "i
Part 1: Well, what are iterables?
My personal definition of Python's iterables is just that they are special functions. That's it.
An example of one
pyelias nice, these are definitely an interesting feature
`technically you're describing generators here, which are just one type of iterable`3 years ago
I made this quiteee a while ago... And for some reason, haven't shared it yet.
Well, if I get enough motivation I might try optimizing this more. Tha
Python
Firefox: using right-click
Firefox
Chrome: using ctrl+shift+p
Chrome
Then, you can apply this knowledge to any language you want! Good luck, have fu
Jack_AdrianAdr1 Good to have a tutorial. Still doesn't make the UI any better. Very undiscoverable.4 years ago
algore LOL, ive been using python's os command for this I feel dumb now. Thanks for sharing.4 years ago
Subject yourself to a pretty terrible great programming language. Uncomment "#example.o", and edit the file "example.o" to make your own scripts.polygott
mkcodes this is actually gnu octave, with almost same syntax but it has a couple of differences - you cant copypaste matlab code into gnu octave1 year ago
GabriellaNeves function principal
t0 = 0;
tf = 50;
x0 = 99000;
k1 = 2*(10^(-6));
k2 = 10^(-4);
m = 100000;
options = odeset('Abstol', k1,'Reltol', k2);
[t y] = ode45(@fdo, [t0 tf], x0, options);
plot(t,y)
function dz = fdo(t,z)
k1 = 2*(10^(-6));
k2 = 10^(-4);
x0 = 99000;
m = 100000;
dz = k2(m - z - x0 exp(-(k1/k2)*z));
% function y = euler(fun,alpha,a,b,N,grau)
%
% y = euler(fun,alpha,a,b,N,grau)
%
% METODO DE EULER: resolve um EDO de primeira ordem
% com uma condicao inicial y(a)=alpha.
%
% DADOS:
% fun - fu2 years ago
This webscraper makes use of queue objects, and requests-html. Let me provide an explanation of both, and why I am using them.
queue: Queues are a da
Python
a5rocks Please note that I complicated the project somewhat by making it not fail the second something raised an error.
Here is the project, in a nutshell (the differences compared to the version above are error reporting and a tiny bit of optimization) :
from requests_html import HTMLSession
from queue import Queue
start_page = 'https://html.python-requests.org/'
links_queue = Queue()
session = HTMLSession()
linksqueue.put(startpage)
while True:
toget = linksqueue.get(block=False)
r = session4 years ago
This is a customizable bot. It is very work in progress, with horrible security, and such. It's newest feature, arbitraryapis, don't even allow option
Python
How to collaborate? Would like step by step instructions please... Maybe someone else already asked this, but I am asking anyway...
AbrielMerryfiel there is a button on the left hand middle of the screen of two gray people that have a plus next to each other, next press that and this link pops up, copy it and then send the link to people you want to collaborate with :D.4 years ago
AlephZero The collaboration mode is currently in beta, here's how you can enable it:
Go to https://repl.it/account , Roles, and enable Explorer.
Once this is enabled choose any repl, and there should be a 'Live Coding' button on the left sidebar. Click on it, and click on 'Start Session'.
You should see a link, which you can share with your friends so that they can collaborate with you.
Please note that your friends need to have a repl.it account, but they don't have to enable explorer mode.
Enjoy coll5 years ago
Can we make it so other people can visit repls that we specify (but by default is not "public"). This would make it so much easier to find programming
I know that you may have already been asked this, but what do you plan to do with repl.it in the future?
e.g. Collaboration over the internet (like g
hayaodeh Thanks for asking this question. When we started Repl.it the premise and the mission is to keep making programming easier. We try our best to keep talking to everyone who uses Repl.it so that we keep building and implementing features that everyone may need.
We consider ourselves very lucky because we and everyone use Repl.it shares the same vision, therefore it's just a matter of time and more hands working on the product. We share what we want to built on our roadmap on public with everyone. H5 years ago