« first day (2083 days earlier)      last day (2869 days later) » 

12:00 AM
What's up idjaw :)
 
hey Marko. :)
 
cbg all
 
@Darkrifts by the way, when writing a program for anything to happen, write one for pizzas to randomly come from my monitor to my desk and let them be eatable :D I'd pay for that :P
 
12:16 AM
Idk
Running c#'s UUr could print pizzas, if your computer is hooked up to a food printing 3d printer, @MarkoMackic
 
Yeah, It's so powerful :P
 
Also, UUr stands for Undefined.Undefined.run()
How do namespaces and junk work in Python?
 
Can you explain me what is namespace
and what is junk
is class subset of namespace ?
or class is namespace?
 
Namespace is a term that groups common things together
A namespace is a thing that can hold 1) functions, 2) variables, and 3) classes
 
12:33 AM
good, now to answer your question classes behave the same for accessing variables and methods :)
 
This shows how they work in C++
Oh, reading up on Python, a namespace is basically ModuleName. Object o of ModuleName is ModuleName.o
 
right so
 
So, on to my other thing, can there be static things in classes?
Like for a class M, with function F, can I make it so I go M.F()?
 
class M:
    @staticmethod
    def F():
        print "HELLo"
 
Neat
Can I make a class' name the same as a module's?
 
12:41 AM
try
 
Time to test :D
 
Good night everyone...
@Darkrifts don't make that program :P it might be skynet
lol
..
 
lol
 
@Darkrifts how old are you I must ask
 
<REDACTED>
 
1:23 AM
How do you create a random number in Python
Like a number from 1 to 5?
 
Look at docs for random library
 
So, that would mean I do import random ?
I iz new to Python lol
 
@Darkrifts I suggest you go over tutorials to get familiar with the language. Read this for some suggestions. More directly to your question on how to use modules, look at the modules section of the Python tutorial
 
1:39 AM
k
 
>>> from random import randint
>>> randint(1, 5)
4
 
So, random.randInt(a, b) includes the value of a and b? So random.randInt(1, 5) can return 5?
 
How about you play around with it and find out? :)
 
lol
How would I call randInt(a, b) from within a function?
 
DSM
youWouldn't because that'sNot itsName..
 
1:46 AM
What isn't its name?
 
DSM
randInt..
 
Oh
 
I gave you the answer. It's right there.
 
It's randint() not randInt()
That's my problem lol
<--- is too used to camel case
 
@DSM how's the CI stuff going?
 
DSM
1:51 AM
@idjaw: NumberFirm is one of a team of associated companies, and seems to be roughly 60% Jenkins and 40% Bamboo (we're a JIRA + Stash team, so we're already in the Atlassian world). Need to decide soonish.
 
Haven't used Bamboo yet. Is it fairly straight forward?
 
Hi guys, I am new here. I not sure whether I can say this but I hope that someone is willing to help me on my question here: stackoverflow.com/questions/38080975/…
 
DSM
@idjaw: Seems to be. I like the UI well enough, but opinions seem mixed about customizability.
@user3118123: welcome! If you read the rules linked in the top right, here, you'll see that we try to leave questions on the main site for a few days before bringing them up here.
 
Alright, thank you!
 
Can I create a separate thread for a private function (__A) within a public function?
 
DSM
2:01 AM
Trick question. __A isn't private.
 
how2privatefunction
 
@DSM If you can easily throw in shell commands in to jobs I think you're good.
 
DSM
@Darkrifts: use a language which supports them.
 
lol
Isn't it possible to "hide" a function in a sense with 2 underscores though?
 
DSM
You can make it more awkward to access while uglifying your code so much that no one will want to read it. I guess that's a kind of hiding.
 
2:04 AM
Oh
 
I shouldn't have had so much garlic with dinner earlier
 
DSM
Instead of trying to figure out how Python implements pattern X from language Y you already know, I'd recommend working through a Python tutorial to see what patterns are native to the language instead.
 
Can I reference it w/o uglifying code in a class function?
 
@JonClements there is no such thing as too much garlic
 
DSM
@JonClements: ah. Because tomorrow I'm going out with some friends I had my usual midweek Chinese today instead of on Wed. so my garlic consumption for the day was low.. might not have noticed. ;-)
 
2:06 AM
@idjaw ahhh... true - but it can seem like that when it's repeating on you at the moment :p
@DSM that'll throw your calendar off I imagine :)
 
DSM
@JonClements: this whole week will be strange. Friday is Dominion Day so I probably won't be having Indian then.. madness, I tell you!
 
I'm due for Indian. It's been too long.
 
sighs - should really get a life when my first thought about "Dominion Day" is - "ooh - haven't watched some DS9 in a while..."
 
I really need to play Dominion
 
Anyway - g'night gents - going to see if I can get back to sleep...
 
2:12 AM
cheers
 
DSM
Rhubarb for the puppy.
 
 
4 hours later…
6:00 AM
cbg
 
cbg
 
6:26 AM
cbg
 
F4z
6:41 AM
Has anyone worked with Django here?
 
user559633
just ask your question
 
user559633
also cbg
 
F4z
I'm a little confused on how the models work when we have created different apps
e.g. say i was working on a forum website, and I have a home app, the home app displays all the posts users have created
so i'd create a model called Post in the home app models.py but where would I have to create a User model?
do I have to create that model when I'm making a registration app and then creating the user model in the models.py for the registration app?
also what If I want to show the user who posted the post in home app then how do i connect the two models which i created where they are located in two different places?
 
7:03 AM
Users model is a default model in Django. You can use Custom User model using Abstract model class. In django documentation, it gave a clear notes of how to create custom users model. If you want to add the users info in Post model, you may use Foreign key relationship with Post model. docs.djangoproject.com/en/1.9/topics/auth/customizing
 
F4z
7:13 AM
so If i have a model for my forum post, I don't need to have a model for my users?
e.g. in my home, I have added a model for the ForumPost
class Post(models.Model):
postTitle
postAuthor
postCreated
I just need a way to also include a model for users with username, password etc etc, but does this go in the same place as where I created my post model or do i have to create a seperate app and create a user model with passwords and account types privilage etc?
 
As Jay said, the User model comes with Django
 
F4z
so that means all I have to do is have a foreign key reference in the Post model to display the user through its ID?
 
user559633
if that makes sense for the system you're building, yes
 
F4z
but what advantage would I have in having my custom uer model?
 
user559633
e.g. if every post author will have an account with a username/password/etc.
 
F4z
7:20 AM
yea they would
so essentially I'd need a registration form to add the users to the database using the default django user model
 
This sounds like something that should be explained in tutorials.
 
cbg
how you dng all.! most of the time I found my answer here. Thanks to the community
Now also I want some solution
 
cbg folks
 
user559633
try salt water
 
user559633
cbg
 
7:26 AM
I wanted to get the config from specific file in a package. I tried importlib import_module but that will not gave me that file. Is another way ?
 
Yes, probably.
Of course it's very unclear what you actually want, so I've got no idea what you're trying to do, but sure, there's probably another way.
 
I have no idea...! I'll google it.
 
@Intrepid see this
A bit more on the news we mentioned earlier that the Scottish National Party will today ask to be declared the official Oppositon at Westminster.

They say their leader Angus Robertson enjoys more support than Jeremy Corbyn.

There are 56 SNP MPs - but only 40 Labour MPs have expressed support for Mr Corbyn.

They also say they are able to fill all the relevant shadow posts to the government, unlike Mr Corbyn.

They point to Parliamentary rules which say the official Opposition must be "prepared to assume power."
@RajaSimon so you have no idea what your question is either?
 
user559633
cbg
 
7:36 AM
@Ffisegydd ^
 
cbg
@Ffisegydd #rotfl
 
7:52 AM
cbg
 
cbg
 
8:11 AM
Morning
 
Cabbage!
 
I need a hammer with PEP8 written on it, somebody put docstring on top of function definitions
 
user559633
8:34 AM
which pep8, the 80 char wide line length one?
 
You mean they put the docstrings before the def? Perhaps you should demonstrate the negative effect this has on the help() functionality?
 
yes
 
Jun 2 at 14:55, by Ffisegydd
I fixed my CSS problem, overflow you little rascal. Now just the next ∞ to go.
I've got ∞ problems and CSS is all of them.
 
oh front end
 
I don't mind the logic part of frontend.
 
8:47 AM
You don't mind JavaScript?
 
Nah JS is fine.
It's HTML and CSS.
 
Stop saying the C word!
 
Doing the model/controller side of it is fine, it's just bloody views and Sea-Ess-Ess.
 
model/controller feels like doing exact same things just 200 times
 
You just described programming.
 
8:49 AM
:)
 
user559633
the dependency resolution model for JS bums me out. i wish the browser standard gave explicit control of load order
 
user559633
which is to say: i totally support systemd in the browser
 
Bah... let's just all switch back to Netscape Navigator - things were easier then....
 
user559633
java applets for everyone
 
What's wrong with newspapers, says I.
 
8:53 AM
the entire www web stuff needs to be reinvented
instead they are bringing that same stuff to desktop/mobile
 
@Ffisegydd ...that are hand written on vellum?
 
@Ffisegydd nothing wrong with telegrams. stop. do you have something to say? stop. make it short then. stop.
cbg. stop.
 
@Ffisegydd I think it's time for us to invent a new form of government. Cooperating, independent modules that are measured to within an inch of their lives for efficient and correct output.
That'll make some more MPs resign
 
@Ffisegydd On one hand, makes sense. Labour aren't currently in a position to shadow anything. On the other hand, they are hell-bent on splitting the UK.
 
9:09 AM
Exactly, that's what makes it so hilaribad.
Where hilaribad is the new term I just invented which means "Something that is so awful and depressing that it is funny."
 
I will wholeheartedly adopt hilaribad in the spirit of intra-UK relations
It just makes me sad though, Scotland (pre-SNP) has always had important seats at the table for every political party. Now, we're on the outside looking in, and our government can only make noise as opposed to actually having a say :/
Even during the Thatcher years, some of her closest advisers were Scottish. Hence why the poll tax was rolled out in Scotland/Wales first before England, because they were convinced that the Welsh and Scots would benefit the most from the poll-tax.

(Labour later managed to rather successfully paint them as anti-Scottish).
But now, 50+ MPs would be great for keeping things stable instead of maliciously rocking the boat further.
 
9:27 AM
how much reputation do you need to create tag?
 
7.
 
nice
 
@Ffisegydd did you miss off the * 214.28571428571428 ?
 
Fizzy, when are you free to talk about nidaba?
 
@IntrepidBrit For you? Always.
 
9:43 AM
Grand. I've implemented a simple link rot checker in my GitHub branch
It's simple and doesn't do much error checking
 
You mad bar steward.
 
(I also assume that however the code gets a question/answer/comment string, it has been sanitised prior to the link rot check code)
So the next stage would be pulling in questions/answers/comments, sanitising, parsing and storing
@Ffisegydd ha, took me a minute to get that
Do we have a server for doing this on? Or should I start developing the code on one of my linux laptops servers?
 
We don't have a server, no.
I've been looking into the cost of a small linux box lately that I can remote into for development, fed up of Virtualboxes
 
Laptops make great little project servers, they come with their own battery backup xD
 
Something like ebuyer.com/… that I can sit in a cupboard and just turn on when necessary, then remote in from main PC.
But probably build myself with better specs and hopefully cheaper.
 
9:51 AM
Well, I was thinking that I have a few development raspberry pis (like an old RPi v1) that aren't up to much. Depending on how we wanted to develop the ecosystem, your new linux box could run a dispy command & control server that foists work out to other devices that others could connect to the system
 
I won't be getting the linux box yet, money is too tight with moving.
 
Welp, I have a number of old, power efficient desktops I could bring back online when we move to the new (larger) office that could form the start of such a system
 
what's nidaba? intrigued
 
We could migrate the command and control system to something that's running better than a pentium 4 processor later ;)
 
> Latest commit ... over 1 year ago
😪
 
9:55 AM
<.<
>.>
 
Not true!
 
oh, cool.
 
I made a commit last week ;)
Just haven't done a pull request because it needs more work
(on that note, would welcome constructive criticism, not "your father smells like elderberries!")
If we wanted to not develop our own command and control stuff, we could just interface with something like BOINC, then various sopython friendly folks could donate spare CPU time
[Disclaimer: not entirely sure we can use BOINC. Would need to look into it]
So, on the above - what's the best way to proceed?
 
Forwards.
 
Crackin'
I'll do that ^^
 
10:06 AM
But no, seriously, awesome work.
I think we should worry about getting server and stuff later.
No point having a server infrastructure with no working code.
Development can be done locally for now, I assume.
 
Absolutely
 
I think I like building the server infrastructure bit slightly more than building codestuffs :o
 
So, should we move forwards with the assumption that we will distribute the work in the future? Doesn't stop us from running the code solely on a couple of servers. Pro - good future proofing; con - more work in the short term
 
Distribution costs more though.
Though it definitely is more future proof.
Of course, you can have "distributed" on the same server, they just talk via unix sockets or something rather than over a network.
That allows a modular architecture to be used and have it on one server or many, maybe?
 
My thoughts exactly.
 
10:10 AM
I liked the look of Apache Kafka for pub/sub messaging to send results to different modules within a DAG.
 
Gonna be honest, never heard of Apache Kafka. googles
 
Though since then, I've looked into Storm and Flink for work, and liked both of those too.
 
Do we know anyone who has prior experience in them?
 
Prior experience is for the weak. Just take the libraries and bend them to your will.
3
"Java library, eh? You'll work with Python!"
 
I've used ActiveMQ, not sure what the difference is between that and Kafka
 
10:15 AM
53
A: ActiveMQ vs Apollo vs Kafka

Petter NordlanderApache ActiveMQ is a great workhorse full of features and nice stuff. It's not the fastest MQ software around but fast enough for most use cases. Among features are flexible clustring, fail-over, integrations with different application servers, security etc. Apache Apollo is an attempt to write ...

Kafka might well be overkill.
 
Depends if the Martijn AI will let us borrow CPU time or not
 
user559633
Go with RabbitMQ because Rabbits and also you can refuse to persist to disk and live in the danger zone
 
DANGER ZONE!
 
@IntrepidBrit why would I be inclined to?
 
ActiveMQ was very easy to use; I replaced RobCorp's messaging component with it very easily, and it has a nice web interface
 
user559633
10:17 AM
._. persist to o_o disk? O____O
 
Probably not as fast as the RobCorp one, but seemed alright
Strange, I actually did that for the proof of concept project that got us the big project I came back to the company for now :)
 
user559633
coupled with no built in security beyond renaming commands and aww yeah brb from logging import kenny
 
@MartijnPieters (in all seriousness, you wouldn't. In joke-world, I imagine you to be a Transcendence style AI ^^)
So, what I'm hearing is that BobbyG is volunteering to take us down the ActiveMQ road?
 
@IntrepidBrit man, I need to get me some of those nanoparticles!
 
10:21 AM
Haven't used it since though, RobCorp now has an even more super messaging thingy that plugs into everything automatically and I just send and receive messages and don't care about the infra much any more :)
 
@MartijnPieters fear
 
But to go back on topic, the idea would be to have a collection of modules that do specific tasks (listening to web sockets, sanitising, transformation, analysis, output etc) which then talk to each other via messages. The individual modules wouldn't care what others are doing, they'd just have a queue to listen on and a queue to send results to.
 
And it resulted in this self-answer, before I knew that self-answering was a thing :)
 
@Ffisegydd Makes sense. So should I/we/someone start work on the code that queries the SO API and pulls in the content?
 
@Ffisegydd what about Celery?
 
10:28 AM
Could do, yes. I've got meetings coming up soon until sometime this afternoon so won't be responding much.
 
I was wondering about Celery
 
Is there an SO firehose?
I don't recall there being one.
I think for now it'd be good to get a pipeline which is 2 deep, where new questions are taken from SO in one node, then in the 2nd they're just piped to /dev/null, or printed out, or whatever.
Then we could add in your linkrot modules in the middle.
It probably makes more sense to ignore the ML side of it now, and just to realtime analytics on questions that don't require the ML side of it.
Get a working system together, then ML modules can be added in time.
 
@Ffisegydd You can subscribe to a websocket to receive new question summaries then go from there...
 
@Jon yeah that was the original plan and probably the best to go forward with, I was hoping that they'd have something like the Twitter Firehose.
Anyway, brb quick lunch then meetings.
 
What's a firehose?
 
Gotcha
(cheers BobbyG)
Basically, I had blocked out around a fortnight for a client who may or may not be having some ... difficulties. As a result, I may have a gap for working on this stuff before my next contract start. So I may have a good block of time to work solidly and make decent headway
 
11:16 AM
Great. PyCharm is being a weirdo. I've got websocket code working from the PyCharm CLI, but not from within the code project
 
damn you windoz. redis is not supported
 
@IntrepidBrit not from within the code?
 
Yeah, so using the PyCharm console & threw together some test code. It works, I can see all the new questions flowing in. Take the exact same code and put it into a file in the nidaba and then run it, I'm getting import errors
Both the pycharm console and project code are using the same virtualenvironment
 
Does the folder you run it from matter in this case?
 
No, it's just a cheeky import websocket
 
11:24 AM
Python version issue?
 
same virtualenv, should be same python.
*will
 
ops didn't see that
 
Restarted PyCharm and now I get: AttributeError: module 'websocket' has no attribute 'create_connection'
Still works on the PyCharm console from the same project
 
This is definitely not environment-related, I can tell you that. smokes pipe sagely
 
weird
 
11:27 AM
^^ i get that running it in a scratch virtualenv
from ipython
 
I am back to doing sys admin bullshit. Hate this shit.
 
@IntrepidBrit I did have some code that did that using autobahn and twisted a couple of years ago...
 
totally stupid question
but when I do dir(websockets), create_connection isn't listed
 
@Withnail Presume you downloaded websocket-client from pip?
 
Wonder if the PyCharm console is doing some magic
 
11:30 AM
Sounds like it might be. But gives me somewhere to start
 
just realised i derped and downloaded websocket instead of websocket-client, was in the middle of fixing that
 
it does sometimes
 
Knew I wasn't imaging it :)
 
So, running the python interpreter from the windows command line works too
@JonClements Wait - so all this has already been done within kesh?
 
I whipped something up ages ago to just test we could do bits on the websocket and listening stuff...
 
11:35 AM
It's all a power trip from Fizzy - he got me to implement websocket stuff for nidaba 18 months ago. He's getting us all to do it.
 
Sorry - I didn't realise you were trying that until you mentioned websocket and it reminded me...
 
That's fine. Gave me an excuse to muck around with websockets and python. Not all wasted time.
 
Cbg
 
cbg(PM)
 
@RobertGrant What, like magically creating a websocket.py somewhere near the start of the Python path? :)
 
11:39 AM
Am I subscribed to the Kesh trello board Jon?
 
@PM2Ring MAGIKS I SAY
 
@IntrepidBrit Haven't touched trello in ages - do we even have one?
 
I have no idea - I'm only on the nidaba one
 
what's our trello link? :p
 
Features on Project Nidaba
Kesh is an API for accessing data in sopython, primarily to be used by Nidaba. Kesh will return json objects to the client.
✍ 1 comment
 
11:43 AM
@JonClements There's a SO Python RO Trello, but not a general open one, AFAIK.
 
Guess the above became the kesh one when I wasn't looking xD
 
I hate it when an OP complains that the answer to their basic question doesn't work, and then clams up when you ask them to give a few details of what's not working. I'm almost tempted to CV... stackoverflow.com/questions/38097932/…
 
@IntrepidBrit Looks like it - and you're a member so...
 
Yeah, I had it book marked as nidaba and couldn't see any kesh specific actions on it.
 

« first day (2083 days earlier)      last day (2869 days later) »