ASN1 and canonical octect encoding rules (COER) in Python [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have some messages data structures represantations in ASN1. These messages have to sent using the canonical octect encoding rule (COER). I currently user asn1c for python,but, there is no support for coer. How could I create the instances and later do the encoding in python?

I'm afraid you might be in trouble. COER looks like it was standardised relatively recently (bearing in mind that ASN.1 is well over 30 years old), and I don't think that a lot of the tools have caught up yet.
The tools from OSS Nokalva seem to support COER, but they don't do a Python binding, and their tools are quite pricey (but very good).
For Python the "goto" has been the pyasn1 library, which doesn't seem to do COER (or even PER, which is a real pity).
Objective Systems, which are also very good, now do a Python ASN.1 compiler(which trumps pyasn1's code first approach), but that doesn't yet do COER.
The easiest thing might be whince, fork out for the OSS Nokalva tools, and use Iron Python to interop with their C# library and tools. That might seem an expensive way of doing it, but if your project is on a fixed timescale, that might be the lowest risk way of accomplishing what you want. You'd likely not be having to write any code to "do" COER, and instead you can concentrate on the application itself and avoid writing your own COER implementation that'd be a pain to maintain, and will eventually get surpassed by other ASN.1 tools anyway.

Related

Good Python Module for Saving Data [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Okay, so I'm new to coding, so don't kill me. I just started about a year ago and I use repl.it. I want to learn how to save user data. Also I want to know what python IDE is best suited for this.
If you want human-readable cross-programming-language data files, check out the json module.
If you want data that is faster, but that only python can read, check out the pickle module.
About your IDE Question:
From my point of view, you don`t need an full featured IDE at this point, though PyCharm is quite nice, despite the fact that it's written in java xD... (and it has a ton oof features that will be noise for a beginner (ME 2 ...)) you can make sth. like VS Code quite easy to sth. like a lightweight IDE. If you don't like Microsoft, go for Sublime, or Atom (both also Editors with nice plugins and extensions for Python and other languages...)
If you want to go for scientific python features: check out https://www.spyder-ide.org/
Have fun :-)

Canonicalisation of usernames [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
What is the best way to get a canonical representation of a username that is idempotent?
I want to avoid having the same issue as Spotify: http://labs.spotify.com/2013/06/18/creative-usernames/
I'm looking for a good library to do this in Python. I would prefer not to do what Spotify ended up doing (running the canonicalisation twice to test if it is idempotent), and importing Twisted into my project is a tad overkill, is there a stand-alone library for this?
Would using email addresses instead be preferred when it comes to usernames? How do major sites/companies deal with this?
First your should read Wikipedia's article on Unicode equivalence. It explains the caveats and which normalization methods there are to represent an Unicode string in its canonical form.
Then you can use Python's built-in module unicodedata to do the normalization of the Unicode string to your preferred normalization form.
A code example:
>>> import unicodedata
>>> unicodedata.normalize('NFKC', u'ffñⅨffi⁵KaÅéᴮᴵᴳᴮᴵᴿᴰ')
'ffñIXffi5KaÅéBIGBIRD'
>>> unicodedata.normalize('NFKC', u'ffñⅨffi⁵KaÅéᴮᴵᴳᴮᴵᴿᴰ').lower()
'ffñixffi5kaåébigbird'
For anyone reading this a few months later:
The module that Spotify uses isn't all that hard to pull out of Twisted without a whole bunch of dependencies (Twisted can be removed entirely with close to no effort, it's only imported for version check purposes). zope.interface is the only dependency left behind, though it should be removable with a decent bit of effort.
The heart of that module is unicodedata.normalize(), so if you want to roll your own implementation out, that's where you should be starting. But like others have said, be careful, this is an area that's open to easy exploits.
EDIT: I stripped out the zope and twisted dependencies: https://gist.github.com/repole/7548478

Python tools/libraries for Semantic Web: state of the art? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
What are the best (more or less mature, supporting more advanced logic, having acceptable performance, scalable to some extent) open source Semantic Web libraries and tools (RDF storage, reasoning, rules, queries) for Python nowadays? Historically Python tools (cwm) were among the first to appear, but it still seems that everyone uses Java back-ends for performance and Python as mere client if at all. My purpose is to learn the technology and maybe some future use in production system if it proves itself up to the task. The task is not yet defined, but as I see it its building a knowledge base, linked with some external resources, and customized facet-navigable web front-end.
If some building blocks based on Python are not good enough, then what is the suitable piece from Java/C/C++/whatever world.
Typical stack is also of interest, if there are one or two clear winners.
Thanks.
A survey of of Python libraries and tools for Semantic Web programming is available here. It includes libraries for working with RDF as well as Python-friendly triple stores.
Toby Segaran's book Programming the Semantic Web also has a lot of programming examples in Python.
You could check out the pyswip. It could work with the SWI-Prolog. Wish it would fit for requirement. :)
To name some, check out RDFLib and CubicWeb.

Python: Programming 8051 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
Can I program 8051 using Python?
I'm not getting any of the to program 8051 in python environment.
If anybody knows, please help me.
There is Python-on-a-Chip, but note its "disclaimer":
"The PyMite VM DOES NOT HAVE:
A built-in compiler
Any of Python's libraries (no batteries included)
A ready-to-go solution for the beginner (you need to know C and how to work with microcontrollers)"
Thus, if the questioner's goal for python was to avoid dealing with the strangeness of the 8051, this may not help.
In particular, the 8051 is a "Harvard" style architecture, with separate RAM and ROM codespaces, and with very limited internal RAM, and larger external RAM that can be accessed only via loading the special DPTR register and then reading or writing indirectly, plus there's no external RAM stack support, nor intrinsic support for stack-based variables. Thus, most "general purpose" high-level languages need lots of customization and reworking to run on the 8051.
A good 8051-specific C-compiler can hide many of these low-level details, but you wind up burning lots of cycles to do things that are single instructions on desktop CPUs and even on most newer embedded controller architectures, and even if you can live with that level of in-efficiency, you still need to sort out the various memory spaces and other specifics.
So, getting Python to work on the 8051 is likely to be a challenging project for someone deeply familiar with its quirky architecture. If your goal is to dump a python onto the 8051 to avoid needing to learn these quirks, I'm not sure that is possible. (But, I suppose the C compilers keep getting better and better...)
Python-on-a-Chip looks about as close as you're going to get. It can run on some things that are just a bit beefier than the 8051.

Looking for knowledge base integrated with bug tracker in python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Ok, I am not sure I want to use Request Tracker and RTFM, which is a possible solution.
I'd like to have a knowledge base with my bug tracker/todo list , so that when
I solve a problem, I would have a record of its resolution for myself or others later.
What python based solutions are available?
A highly flexible issue tracker in Python I would recommend is "Roundup":
http://roundup.sourceforge.net/.
An example of its use can be seen online at http://bugs.python.org/.
Try Trac
I do have experience using probably 20-30 different bug trackers, installed or hosted and so far if you are up to deal with a big number of bugs and you want to spend less time coding-the-issues-tracker, to get Atlassian Jira, which is free for open-source projects.
Yes, it's not Python, it is Java, starts slowly and requires lots of resources. At the same time, RAM is far less expensive than your own time and if you want to extend the system you can do it in Python by using https://pypi.python.org/pypi/jira-python/
Do you think that Jira is the most used bug tracker for no reason? It wasn't the first on the market, in fact is quite new compared with others.
Once deployed you can focus on improving the workflows instead of patching the bug tracker.
One of the best features that it has is the ability to link to external issues and be able to see their status, without having to click on them. As an warning, for someone coming from another tracekr you may discover that there are some design limitations, like the fact that a bug can have a single assignee. Don't be scared about it, if you look further you will find that there are way to assign tickets to groups of peoples.

Categories

Resources