distribution

Distributing IronPython applications

僤鯓⒐⒋嵵緔 提交于 2019-12-05 19:59:57
I'm thinking of developing a small application using IronPython, however I want to distribute my app to non-techies and so ideally I want to be able to give them a standard shortcut to my application along with the instructions that they need to install IronPython first. If possible I even want my shortcut to detect if IronPython is not present and display a suitable warning if this is the case (which I can do using a simple VbScript) The trouble is that IronPython doesn't place itself in the %PATH% environment variable, and so if IronPython is installed to a nonstandard location my shortcut

Unable to create File object for a file in Jar

我与影子孤独终老i 提交于 2019-12-05 19:26:10
I am trying to include a number of text files as resources in my runnable .jar-file. The following code should print the contents of one file: URI resourceFile = Driver.class.getResource("/etc/inputfile.txt").toURI(); System.out.println("Opening URI: " + resourceFile.toString()); File infile = new File(resourceFile); Scanner sc = new Scanner(infile); while (sc.hasNextLine()) System.out.println(sc.nextLine()); sc.close(); After exporting as a runnable jar, I get the following output when running: Opening URI: rsrc:etc/inputfile.txt java.lang.IllegalArgumentException: URI is not hierarchical at

Gradle - extract file from depended jar

谁说胖子不能爱 提交于 2019-12-05 19:18:03
问题 I want to extract file "default.jasperreports.properties" from depended jasperreports.jar and put it in zip distribution with new name "jasperreports.properties" Sample gradle build: apply plugin: 'java' task zip(type: Zip) { from 'src/dist' // from configurations.runtime from extractFileFromJar("default.jasperreports.properties"); rename 'default.jasperreports.properties', 'jasperreports.properties' } def extractFileFromJar(String fileName) { // configurations.runtime.files.each { file ->

possible distributions and their probabilities after putting identical items into anonymous buckets

蹲街弑〆低调 提交于 2019-12-05 18:47:17
Apologies if the answer to this is readily found elsewhere. My math and stats are weak and thus I don't even know the search terms for what I'm trying to do . . . I have b anonymous indistinguishable buckets into which I'm putting i identical items. I want to know all possible distributions and their probabilities. For example, if I have 3 buckets and 3 items, the answer I want is: [3,0,0] -> 1/9 [2,1,0] -> 6/9 [1,1,1] -> 2/9 Notice that the buckets are anonymous and thus I want identical distributions to be combined as I have done above. For example, the [2,1,0] case is actually the sum of

PyMC: Getting zero or close-to-zero Categorical likelihood

萝らか妹 提交于 2019-12-05 17:47:22
I am trying to estimate rates from a stochastic Petri Net model. I don't understand why, but I get a ZeroProbability Error, even when making up data data to correspond exactly to the expected number of observations given the initial values I define for the rates. For example, the following rates [0.01, 2, 10, 1] correpond to a probability of 3 different outcomes of [0.33, 0.66, 0.01]. If I observed, 100 outcomes, I would expect to observe that [33, 66, 1] fall within each of the outcomes. Yet if I run the following model, I get a ZeroProbability Error (I'm simplifying the prob function, which

entropy estimation using histogram of normal data vs direct formula (matlab)

孤街浪徒 提交于 2019-12-05 17:20:21
Let's assume we have drawn n=10000 samples of the standard normal distribution. Now I want to calculate its entropy using histograms to calculate the probabilities. 1) calculate probabilities (for example using matlab) [p,x] = hist(samples,binnumbers); area = (x(2)-x(1))*sum(p); p = p/area; (binnumbers is determined due to some rule) 2) estimate entropy H = -sum(p.*log2(p)) which gives 58.6488 Now when i use the direct formula to calculate the entropy of normal data H = 0.5*log2(2*pi*exp(1)) = 2.0471 What do i do wrong when using the histograms + entropy formula? Thank you very much for any

iOS in-house distribution of App developed by external vendor

為{幸葍}努か 提交于 2019-12-05 16:17:54
A 3rd party has developed an App for private use in our enterprise environment. Now its come time to distribute it and they don't want to send us their code. I have a feeling this will cause an issue because the distribution profile and certificate would have to be sent to them compromising our private key which we couldn't allow. Is this correct or can this be done without compromising our private key. Edit: as a side note, I'm ok with sending them a private key if it only is useable per App, ie only with that App bundle ID and we can have different Apps with different private keys under the

Creating a redistributable django app

[亡魂溺海] 提交于 2019-12-05 12:24:59
In Java world, a common way to distribute a web app is to package it along with Apache Tomcat. What is the appropriate way to achieve something like that with Django (or any WSGI application for that matter)? There are two camps for distributing apps in django. It also depends on what you mean by apps . If you mean an apps is in django terms as in 'pluggable apps' that is separated from the project, then it would be best to use setuptools to package those 'pluggable apps'. Many django 'pluggable apps' are distributed like this. For example: django-tagging django-registration etc. But if you

Can Shoes.rb Create Self-Contained Applications?

隐身守侯 提交于 2019-12-05 12:07:25
It's encouraging that Shoes (the Ruby GUI framework) has excellent packaging functionality, but I'm concerned that it doesn't actually 'wrap' itself around created applications. Packaging for OSX outputs a shoes installer and a shoes file in a .app system. Is there any way that shoes could create a .app that contains shoes - that doesn't make you install shoes to run it? I'm working on creating a tiny application - just a start button and a stop button for a subprocess, etc. Hey, sorry I didn't see this question sooner. I have good news, and I have bad news: you can absolutely do this, but

Algorithm of boost::math::erf

别来无恙 提交于 2019-12-05 09:30:21
are there any details available for the algorithm behind the erf-function of boost? The documentation of the module is not very precise. All I found out is that several methods are mixed. For me it looks like variations of Abramowitz and Stegun. Which methods are mixed? How are the methods mixed? What is the complexity of the erf-function (constant time)? Sebastian The docs for Boost Math Toolkit has a long list of references , among which Abramowitz and Stegun. The erf-function interface contains a policy template parameter that can be used to control the numerical precision (and hence its