oracle drop index if exists

Don’t check for existence. Try to drop, and capture the exception if necessary… DECLARE index_not_exists EXCEPTION; PRAGMA EXCEPTION_INIT (index_not_exists, -1418); BEGIN EXECUTE IMMEDIATE ‘drop index foo’; EXCEPTION WHEN index_not_exists THEN NULL; END; /

How do I extract keywords used in text? [closed]

This is an open question in NLP, so there is no simple answer. My recommendation for quick-and-dirty “works-for-me” is topia.termextract. Yahoo has a keyword extraction service (http://developer.yahoo.com/search/content/V1/termExtraction.html) which is low recall but high precision. In other words, it gives you a small number of high quality terms, but misses many of the terms in your … Read more

pandas dataframe: loc vs query performance

For improve performance is possible use numexpr: import numexpr np.random.seed(125) N = 40000000 df = pd.DataFrame({‘A’:np.random.randint(10, size=N)}) def ne(df): x = df.A.values return df[numexpr.evaluate(‘(x > 5)’)] print (ne(df)) In [138]: %timeit (ne(df)) 1 loop, best of 3: 494 ms per loop In [139]: %timeit df[df.A > 5] 1 loop, best of 3: 536 ms per … Read more

At what level do Postgres index names need to be unique?

Indexes and tables (and views, and sequences, and…) are stored in the pg_class catalog, and they’re unique per schema due to a unique key on it: # \d pg_class Table “pg_catalog.pg_class” Column | Type | Modifiers —————-+———–+———– relname | name | not null relnamespace | oid | not null … Indexes: “pg_class_oid_index” UNIQUE, btree (oid) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)