w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Possible to get Bloomberg API into Python 3?
MathMonkey, as of now, you can see the binary supported by Bloomberg on this page: http://www.openbloomberg.com/open-api/ There is no API for Python 3.3 officially supported at the moment.

Categories : Python

Python-Bloomberg Open API: Are there any examples?
If you download the installer and install it from http://www.openbloomberg.com/open-api/ There is a folder called examples within the Python folder with example *.py files NoAdmin_DesktopAPI_SDKAPIAPIv3Pythonv3.5.5examples

Categories : Python

Pyqtgraph with anaconda python on MAC gives nib error
The solution is to use python.app (or the equivalent pythonw) to run the program, instead of just python. If pyqtgraph installed any commands, you'll need to edit them so that their shebang line calls #!/path/to/anaconda/bin/python.app/Contents/MacOS/python.

Categories : Python

Importing scipy.misc.pilutil in python using Komodo and Anaconda?
The problem is that the scipy.misc.__init__ deletes the pilutil module - relevant code line - so you cannot import it directly. But all functions from the pilutil module are, before that, added to the misc module, and you can use them from there: In [1]: from scipy import misc In [2]: misc.fromimage Out[2]: <function scipy.misc.pilutil.fromimage> In [3]: misc.bytescale Out[3]: <function scipy.misc.pilutil.bytescale>

Categories : Python

Why this sqlite python 3x code is not compatible with python 27
On Python 2.x you need to declare the class a new-style class by inheriting from object, because it uses properties. Properties are only supported by new-style classes. class database(object):

Categories : Python

Backwards compatible python plugin
Depending on what your plugin does, it's very possible to write it in such a way that it is compatible with both ST2 and ST3. If most of the code is compatible, but there are portions that are not, you can use the version number (sublime.version()) to determine what version of ST is being used. I believe everything >= 3006 is ST3. If you do need to maintain separate branches, just direct users to the ST3 branch if they are using ST3. Package control, when it is updated, should support this, but I don't know how far wbond is on that.

Categories : Python

How to write modules that are both nodejs compatible and browser compatible?
I really recommend giving another look at Browserify. Other than that, add a Universal Module Definition (UMDJS) exporter in your files. This will allow you to expose your modules in node, browserify, requirejs/amd, or just thrown into a script tag on any site. Can also use a module transpiler -- write in a ES6 module exporter, and have it convert for use in a browser, or a commonjs/node environment.

Categories : Node Js

Matlab filter not compatible with Python lfilter
This is not a bug. Matlab's filter operates on the first dimension of the array, while scipy.signal.lfilter by default operates on the the last dimension. From your question I see that your data array has a second dimension (perhaps empty?). When you use lfilter it defaults to axis=-1, which will give the answer you got for python. If you want the same behaviour of matlab you need to specify the first axis or squeeze the array (if the second dimension has a size of 1): out = lfilter(b, a, data, axis=0) out = lfilter(b, a, np.squeeze(data)) Both of these return the following: [ 0.09505519 -0.08298293 -0.180851 -0.09045846 -0.00479434 -0.04911579 0.1836602 -0.06142895 0.18555065 -0.07059774 -0.04452408 -0.19503684 0.08298322 -0.13317581 0.49901232]

Categories : Python

How do I find out all previous versions of python with which my code is compatible
I don't really know of a way to get around doing this without some test cases. Even if your code could run in an older version of python there is no guarantee that it works correctly without a suite of test cases that sufficiently test your code

Categories : Python

Using Bloomberg API in c#?
Your first question is answered on the page you linked: NOTE: Bloomberg is offering this programming interface (BLPAPI) under a free-use license. This license does not include nor provide access to any Bloomberg data or content. If you wish to use this API to access Bloomberg data, you will need a Bloomberg service subscription, and should contact the nearest Bloomberg sales office in your region.

Categories : C#

BloomBerg API - It is possible to get the top 200 Securities?
As far as I know, there is no way to do a securities search through the API. If you have a well defined universe (say 1000 stocks and want the top 200 based on performance for the day), you can always query the performance for the day field for the 1000 stocks and sort/filter in your application. ps: I assume you are talking about the open blp api.

Categories : Misc

How to use timestamps from Bloomberg quotes
There are two things going on here: 1377077400000 appears to be given in milliseconds, not seconds. Trim off three zeros and Wolfram will give you 9:30 AM UTC, August 21, 2013. Which leads us to the next issue: Bloomberg's timestamp appears to be in eastern local time, because 9:30 AM UTC+0 is certainly not the daily opening of the NYSE. So you'll have to treat that timestamp as a local time, not the more usual UTC+0 timestamp. If converting back to UTC+0, be mindful of EST vs. EDT.

Categories : Unix

bloomberg cant start session
The default port for the local bbcomm process is generally 8194. You need the bbcomm.exe process to be running and to be connected to Bloomberg via a Bloomberg terminal.

Categories : Java

Check if one has already logged into Bloomberg (via API)
There's a couple of ways to interpret your question, so I'll answer both... (I'm speaking from the perspective of using the Java API, but it should be pretty similar on C#.) 1. Can I tell whether the user connect to Bloomberg (i.e. are there network issues / are they are logged in)? Yes - you can create a new Session, try to start it using .start(). If it fails or returns false, you cannot connect. If it starts, you can call .openService("//blp/apiauth"). Again, if it fails or returns false, you cannot connect. If you cannot connect, you may or may not be able to determine why you cannot... Nevertheless, I would suggest registering a callback to the BLP API logging framework. In our code, we we-direct these to the logging framework we use throughout our code. 2. The user has created a

Categories : Misc

Pandas wrapper for Bloomberg api?
Have a look at this one https://code.google.com/p/pyalma/source/browse/trunk/InfoProviders/Bloomberg.py You can request Bloomberg and return a panda,Panel object with def bdh(sec_list, fld_list, start_date, end_date=dt.date.today().strftime('%Y%m%d'), periodicity='DAILY', verbose=False, **kwargs): """ Sends a historical request to Bloomberg. Parameters: sec_list: tuple or list of valid Bloomberg tickers. fld_list: tuple or list of valid Bloomberg fields. start_date: string formatted YYYYMMDD. end_date: string formatted YYYYMMDD (default = Today()). periodicity: string (default: DAILY). verbose: boolean to log Bloomberg response messages (default: False) **kwargs: any valid parameter. Returns a panda.Panel object

Categories : Python

Bloomberg API: how do I associate request with response on IntradayBarRequest?
Thomas, you should always use correlationId of a response to find which request it is associated with. IIRC, reference data and historical data requests support multiple securities, but market data and intraday bars may have only one security per request. That is why there is additional "securityData" field in refdata and historical responses. For market data and intraday bars correlationId is enough to identify the request and hence the security. Hope it helps.

Categories : Python

draw historical last price chart using bloomberg API
Assuming you are using the Bloomberg Java API, for historical data you need to use the "//blp/refdata" service and send a "HistoricalDataRequest". Several examples are given in the Developer's guide, available on the project page. Alternatively, you can use jBloomberg* which is simpler to use because it handles the messy details for you. To retrieve historical data, you can follow the example given in the javadoc: BloombergSession session = new DefaultBloombergSession(); session.start(); RequestBuilder<HistoricalData> hrb = new HistoricalRequestBuilder("SPX Index", "PX_LAST", DateTime.now().minusDays(7), DateTime.now()) .fill(HistoricalRequestBuilder.Fill.NIL_VALUE) .days(HistoricalRequestBuilder.Days.ALL_CALENDAR_DAYS); HistoricalData result = session.submit(h

Categories : Java

How to connect Bloomberg with username and password in Matlab
The blp documentation indicates that You must have a Bloomberg software license for the host on which the Datafeed Toolbox™ and MATLAB® software are running. The documentation also notes how to install other files from Bloomberg to make the command work properly.

Categories : Matlab

How do I set decimal places when I pull data from Bloomberg using Matlab?
Use the format command to set the display to the desired number of significant digits: http://www.mathworks.co.uk/help/matlab/ref/format.html

Categories : Excel

Excel Links(With some bloomberg function as input) not updated until VBA finished
I'm not familiar with bloomberg but here are three things. You can delay execution in workbook B with Application.OnTime. Load workbook A, then call a second sub in workbook B using Application.OnTime with a second or two delay, this should allow workbook A to run whatever code it runs on loading. Application.RTD.RefreshData might help. More specific to your question, do the answers here help? How to refresh/load RTD Bloomberg function (BDH) in excel in vba

Categories : Excel

get previous close price and %change fields name in Bloomberg Java API
You can query fields on a Bloomberg terminal with the following command: FLDS WHATEVER_YOU_ARE_LOOKING_FOR In your case, FLDS PREVIOUS CLOSE for example. Which field to use depends on whether you need real time or not: you can either use PX_CLOSE_1D or PREV_CLOSE_VALUE_REALTIME. For the % change, you can use CHG_PCT_1D or RT_PX_CHG_PCT_1D (note that the former does not adjust for dividends whereas the latter does). Alternatively, you can download the history for those stocks over one day with the appropriate adjustment settings and/or (if you need real time) subscribe to current price and calculate the % change manually.

Categories : Java

My app is in compatible in 2.3.3,how make it compatible
From the documentation here: android:targetSdkVersion An integer designating the API Level that the application targets. If not set, the default value equals that given to minSdkVersion. This attribute informs the system that you have tested against the target version and the system should not enable any compatibility behaviors to maintain your app's forward-compatibility with the target version. The application is still able to run on older versions (down to minSdkVersion). As Android evolves with each new version, some behaviors and even appearances might change. However, if the API level of the platform is higher than the version declared by your app's targetSdkVersion, the system may enable compatibility behaviors to ensure that your app continues to w

Categories : Android

Installing anaconda to use with windows
well you might have two installations of python, one inside the anaconda package, and other which you might have installed earlier. try doing : which python from CygWin console. If it returns: /usr/bin then it is definitely a add-to-path problem. to fix it for CygWin, you have to add the python installation from anaconda to the path. try this fromn CygWin: PATH=path-where-anaconda-is-installed/anaconda/bin:$PATH and then doing: which python should give you: /path-to-anaconda/anaconda/bin and then it will work. Cheers

Categories : Python

Anaconda default directory
Double your backslashes. pd.read_csv('C:\Users\aaa\Desktop\contrylist.csv') Or use raw strings: pd.read_csv(r'C:UsersaaaDesktopcontrylist.csv') Backslash is a special character in string literals and it's used for escaping. You should read the docs: strings and string literals.

Categories : Python

Excel VBA calls Bloomberg terminal and enters a query, how do I enter the Yellow Key/ Market Sector of a security correctly in my code?
Equity is a reserved keyword like Go, you can access it with: Blp = DDEInitiate("Winblp", "bbk") Call DDEExecute(Blp, "<Blp-1>" & "AAPL US <EQUITY>" & " DES<GO>") Call DDETerminate(Blp) ps: two typos in your code: APPL => AAPL (I suppose) DDETerminate(ch) => DDETerminate(Blp).

Categories : Excel

pip install lxml and gdal failing in anaconda env
Here is my $0.02, in my experience lxml installs on OS X have always caused problems because of the libmxl2 and libxslt dependencies. The specific issue here is that the 'cpl_port.h' is not being found suggesting that you don't have the headers for gdal on your system, a similar issue to the one I've encountered with lxml. I found this StackExchange post gdal package missing which addresses building and installing gdal with your specific error using pip and a virtual Ubuntu machine, but the idea is the same. The pip tool need to be told explicitly where to find the headers for gdal. In general the issue is that OS X puts headers in non standard places for a *nix system, and quite often dependencies are several revision behind the version used for development of the packages you are trying

Categories : Python

Anaconda's NumbaPro CUDA Assertion Error
The problem is you are using vectorize on a function that takes non-scalar arguments. The idea with NumbaPro's vectorize is that it takes a scalar function as input, and generates a function that applies the scalar operation in parallel to all the elements of a vector. See the NumbaPro documentation. Your function takes a matrix and a vector, which are definitely not scalar. [Edit] You can do what you want on the GPU using either NumbaPro's wrapper for cuBLAS, or by writing your own simple kernel function. Here's an example that demonstrates both. Note will need NumbaPro 0.12.2 or later (just released as of this edit). from numbapro import jit, cuda from numba import float32 import numbapro.cudalib.cublas as cublas import numpy as np from timeit import default_timer as timer def gener

Categories : Python

cannot import numpy in idle (2.7) after anaconda installation
So you have several python installations going; which one is idle using? This should get you pointed in the correct direction for finding modules: http://docs.python.org/release/2.7.5/tutorial/modules.html#the-module-search-path (Tweak the version number in that URL as appropriate.) If that doesn't help, then the list of Related questions, to the right, currently has this as the first hit, and it looks useful too.

Categories : Python

How to keep track of pip installed packages in an Anaconda (conda) env?
conda will only keep track of the packages it installed. And pip will give you the packages that were either installed using the pip installer itself or they used setuptools in their setup.py so conda build generated the egg information. So you have basically three options. You can take the union of the conda list and pip freeze and manage packages that were installed using conda (that show in the conda list) with the conda package manager and the ones that are installed with pip (that show in pip freeze but not in conda list) with pip. Install in your environment only the python, pip and distribute packages and manage everything with pip. (This is not that trivial if you're on Windows...) Build your own conda packages, and manage everything with conda. I would personally recommend the

Categories : Python

How to override anaconda/kickstart package ordering?
Your package "thirdparty-tools" needs to specify all of its requirements. If you can get a SRPM of this package, you can modify the spec to indicate that you need coreutils, bash, etc in your package. If you can't modify this package at all, your best option is to create a wrapper package that has the necessary requirements. Just use your favorite editor to create a file "thirdparty-tools-installer.spec" and ensure you include coreutils as a requirement as well as "thirdparty-tools". You can refer to rpm.or for more information http://www.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html Lastly, you can just do yum -y install thirdparty-tools in the %post section of Kickstart. It's uglier for sure, but it will probably work.

Categories : Linux

Anaconda: Where and how to install a non-distribution package to support a flask-wtf conda recipe?
The only way that conda build will see dependencies is if they also exist as conda packages. So you need to build the conda package for wtforms as well. Fortunately, the recipe for this exists in the conda-recipes as well, so you can just clone that repo and do conda build wtforms conda build flask This works because conda is able to find the packages that it has already built. To make sure that they don't get lost if you delete the build directory, it's recommended to upload your packages to Binstar. If you do that and conda install binstar, after you build, it will ask you if you want to upload the package to binstar. If you do that, and also add your Binstar repo to your .condarc, those packages will always be available for you to conda install.

Categories : Python

Is PHP 5.4 compatible with PHP 4.4.2?
Look at this, check for any deprecated code (especially preg VS ereg ) - http://www.php.net/manual/en/migration5.incompatible.php Look for the general differences - http://www.php.net/manual/en/faq.general.php#faq.general.differences-45 Check about the migration - http://www.php.net/manual/en/faq.migration5.php EDIT - One more general link, may be helpful at times - Check Change Logs

Categories : PHP

javascript not compatible with IE
Internet Explorer caches ajax requests. A simple workaround is to simply add a timestamp to the end of your request, forcing IE to get a new one. Jquery does this automatically for you when specifying the cache parameter with false: $.ajax({ url: 'api.php', data: "", dataType: 'json', cache: false, success: ... For other options, check out this post: https://devcentral.f5.com/blogs/us/fixing-internet-explorer-amp-ajax#.UcIVBZyiVSQ

Categories : Javascript

Why my app is not compatible with some devices?
You can try using one more thing in manifest which is for compatible screens: <compatible-screens <screen android:screenSize="small" android:screenDensity="ldpi"> <screen android:screenSize="small" android:screenDensity="hdpi"> </compatible-screens> Like above you can keep adding different combinations which your app is going to support.

Categories : Android

Why is this declaration not compatible?
The problem lies here: abstract class AbstractUserMapper extends AbstractMapper implements UserMapperInterface As the first step, inspect the definition of AbstractMapper: abstract class AbstractMapper implements MapperInterface Interface definitions between parent and child classes are transitive, so we can merge the first definition: abstract class AbstractUserMapper extends AbstractMapper implements UserMapperInterface, MapperInterface This means that your class needs to implement: public function fetch(EntityInterface $entity, Array $conditions = array()); public function fetch(UserInterface $user, Array $conditions = array()); And this is not possible, because method overloading doesn't exist in PHP. Possible solution Assuming the following interface def

Categories : PHP

Autohotkey and Vim are they compatible?
what kind of vim are you using? one in a terminal or gVim? Short answer is that autohotkey works with vim. From how I read, you want to copy the text with Ctrl-c. Try that on your vim, that is not the command you use to copy. If you selected the text in vim's visual mode, then y is the key you are looking for and if you want to remap to Ctrl-c, then the command to do it is pasting the following line in your .vimrc file in your home directory : xmap <C-c> y If you are using a terminal (mintty) or gVim and you selected the text with your mouse, the command to copy is ctrl-insert. I have a feeling this is what you are looking for. ^c::Send {Ctrl down}{Insert}{Ctrl Up} ^v::Send {Shift down}{Insert}{Shift Up} paste can be done with shift-insert, as noted in the second line. If you w

Categories : Vim

How do I set up an iAd that works for both iOS 5 and 6? and if possible compatible with all iOS
It seems that there is a general problem. Many people are reporting that their ads are not showing. Implement these method from AdBannerViewDelegate protocol: - (void)bannerViewDidLoadAd:(ADBannerView *)banner; - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error; And check if (NSError *)error is returning Ad inventory unavailable" UserInfo=0x49a4f0 {ADInternalErrorCode=3, NSLocalizedFailureReason=Ad inventory unavailable It so, try again in a few hours!

Categories : IOS

making d3.js compatible with ie
This is because there are utf-8 characters in the d3.js file. See this issue: https://github.com/mbostock/d3/issues/1195 Fixes: <!DOCTYPE html> <meta charset="utf-8"> or <script charset="utf-8" src="d3.js"></script>

Categories : D3 Js

how to Mingw compiler compatible with Qt 4.8.5
Make sure you are not using mingw, but mingw-w64. mingw is more or less dead nowadays. My recommendation is to use the mingw-w64 packaged in the latest Qt SDK. There is a Qt-builds project as well other than the mingw builds. That is run by the mingw-builds team. They have proper scripts to build all of Qt, QtCreator, and so forth. Here you can find them (develop branch): https://github.com/Alexpux/Qt-builds/tree/develop That being said, you can grab the latest for today with mingw, too: https://code.google.com/p/psi-dev/downloads/detail?name=MinGW-gcc-4.4.0-2.7z

Categories : C++

Making app compatible with tablets
You've got the right idea. Some permissions imply features, but it isn't a 1-to-1 ratio. The implied feature for SMS is: <uses-feature android:name="android.hardware.telephony" android:required="false" /> Here is the list of all permissions that imply features: http://developer.android.com/guide/topics/manifest/uses-feature-element.html

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.