Python implementation of rawComm measure for networkx - python

I am still relatively new python and data science. I am looking for a python implementation of the rawComm measure as described in Section 3.1 'Community Metric' this paper: Node roles and community structure in networks
I tried googling for the obvious keywords but couldn't find anything. If anyone has ever implemented this, or knows of a resources that might help get started, let me know.
Any help is appreciated.

Related

How to code features for the reMarkbale 2?

I recently purchased myself a rM2 to use for school and I found out that I am able to mod it myself. I've been looking into these rM2 "hacks" however I have not found any help in developing my own software for the device.
So far the only thing I know about adding new feature is by coding a binary patch and applying it to the existing code on the rM2. The best example of this I've found is ddvk's remarkable-hacks git.
I want to create something similar to what ddvk did in his project. If anyone has any advice on where to start, what language to use, any programs that may come in handy, or a tutorial, please comment below.
Thanks!

How to implement OCL (Object Constraint Language) in Python

I am working on Google Colaboratory, and I have to implement OCL (Object Constraint Language), I searched a lot, but I didn't find how to implement it. Can someone give me an idea please?
AgileUML has a Python code generator from UML/OCL (itself written in OCL): this is the uml2py plugin for AgileUML (https://github.com/eclipse/agileuml). There are some videos on using the tool at: https://www.youtube.com/watch?v=NXq2L0fo7N4
It is surely possible for you to implement OCL, duplicating the efforts of one of the existing Open Source implementations such as Eclipse OCL or USE. There is an official OMG specification that will define what you need to do, however it has many deficiencies that will require research to solve and design around. I would be surprised if you can implement a 'full' implementation of OCL from scratch with plausible accuracy in less than a person year.
I suspect that you have mis-stated what you want to do or have misunderstood what someone has instructed you to do.

Getting Started with Scikit-learn

I want to read and understand the code of some of the basic Machine Learning Models like Linear Regression from Python Scikit-learn Package, but it is too confusing at the start. Can someone tell me from where (which class) to start?
If you know the basics and want to know about the internals (not just using it), than I would start with the sklearn Developer’s Guide.
It explains the idea behind the API, explains some of the util functions that are often found in the code, to e.g. check input, and explains how C/C++ and Cython are used within the source to go for most speed - this was confusing me at the beginning as I thought it was all pure Python and did not know about Cython.
I would suggest you to go through some courses online first, for example there is an Econometrics course on Coursera which is dealing with those concepts
https://www.coursera.org/learn/erasmus-econometrics/home/welcome
while most of the time using a full course to understand a concept feels like an overshoot, but in general it is really worth it. The courses I posted were the ones which helped me through my PhD difficulties, and gave a very good overview on not only the technicalities of the given package, but also the purpose it has to be used for.

Scraping model information from a program using python

I'm attempting to pull physical property information (dimensions and resistance values, in particular) from an architectural (Autodesk - Revit) model and organize that information to be exported as specific variables.
To expand slightly, for an independent study I want to perform energy balances on Revit Models, starting simple and building from there. The goal is to write code that collects information from a Revit Model and then organizes it into variables such as "Total Wall Area", "Insulation Resistance", "Drywall depth", "Total Window Area", etc. that could be then sent to a model (or simply a spreadsheet) and stored as such.
I hope that makes some sense.
Given that I am a novice coder and would prefer to write in Python, does anyone have any advice or resources concerning an efficient (simple) path to go about importing and organizing specific parameters from a Revit model?
Is it necessary (or realistically necessary, given the humble extent of my knowledge) to use the API for this program (Revit) to accomplish this task?
I imagine this task is similar to web scraping yet I have no HTML to call and search through and therefore am happily winging my way along, asking folks far more knowledgeable than I if they have any insight.
A brief background, I have next to no knowledge of Revit or APIs in general, basic knowledge of coding in Python and really want to learn more!
Any help you are able to give is absolutely appreciated! I'm also happy to answer any questions that come up.
Thank you for reading and have a terrific day!
Great question - my +1 is definitely for Revit Python Shell (RPS).
Likewise I had a basic understanding of Python and none of the Revit API, but with RPS Ive coded multiple addins for our office (including rich user interfaces using winforms) and had no limitations so far from coding in Python. Its true that there is some translating C# API samples into Python - but the reward is in seeing a few paragraphs of code becoming a few lines...
The maker of RPS (Daren) is also really helpful, so no questions go unanswered.
Disclaimer is that (like you), Im a novice programmer who has simply wanted to use the API to extend Revit. RPS for the win
Indeed the most used programming language for Revit is C# (.NET), if you decide to go with IronPython, it should work, but there is less material...
Using C#, check the My First Revit Plugin training. For your specific scenario, download the SDK and check the "Fire Rating" sample.

AI and Design of an El-fish like simulator environment?

first post here on stack overflow, hoping to get some advice on how to construct a simulation program akin to the 1993 maxis simulator known as El-Fish wiki here , Also, game info here .
Are there known "Simulation system" algorithm groups that can function and create real life interaction etc... e.g. the visualization known as 'flocking' ? Or, is there an open-source code base to study off of already in construction?
Programming wise, would this also be able to be easily done in a purely functional language? if done in an OOP way, i was thinking of prototyping it in python.
Anyways thanks for any direction in pointing me towards a good starting place. I hope to build a graphical view of an idea/data world. It will be hopefully controlled by underlying simulation AI(heuristics maybe?)
In terms of simulation systems, I recommend you search for "agent-based modeling" software. There are a lot of free toolkits available. The two I like the most are NetLogo and Repast.
Also, it looks like you are implementing a "genetic algorithm". There are many good books and pages on that topic.
Python is good, but so are many other languages.
Most of your time will be spent doing the graphics: animating the fish so they look realistic. Unless you can find a free fish-animation-library.
I recommend you try my own GarlicSim framework. It's written in Python and you'll be writing your specific simulation in Python.
It can definitely handle the kind of simulation you want. There are tutorials available which will teach you the basics of GarlicSim in 30 minutes. I'll be happy to help you build your simulation package, just say hello on the mailing list and I'll guide you from there.
I'm not sure about "real life", but there is a flocking algorithm called boids that might be a good example to start from. There are a couple python versions of it as well. There's one that is an example in the owyl project on google code.

Categories