How can I explicitly free memory in Python?

I wrote a Python program that acts on a large input file to create a few million objects representing triangles. The algorithm is: read an input file process the file and create a list of...

Why is a session.Clear() needed to reflect the changes in the db in the this example?

I have the following code: public class A { private ISessionFactory _sf; A(ISessionFactory sf) { _sf = sf; } public void SomeFunc() { using (var session = _sf.OpenSession()) using...

Non-alphanumeric list order from os.listdir()

I often use python to process directories of data. Recently, I have noticed that the default order of the lists has changed to something almost nonsensical. For example, if I am in a current...

Retrieve sources for all installed gems

I'm in the process of switching all my projects over to using the rather wonderful rvm and bundler. On one of them, i want to basically mirror the gem environment on the server which hosts the...

Is there a way to clear the Error List window of custom errors?

I use several custom tools during the build process, mostly code generators for service references, T4 templating, and the like. When these produce errors or warnings, they show up in the Error...

Finding all classes implementing a specific interface

I am in the process of developing an application (Quartz scheduler) where we have a job class which is responsible for actually executing the work and we need to tell/pass the name of the job...

tell pip to install the dependencies of packages listed in a requirement file

Developing a Django web app, I have a list of packages I need to install in a virtualenv. ...

Delete all local git branches

I follow a development process where I create a new local branch for every new feature or story card. When finished I merge the branch into master and then push. What tends to happen over time due...

w3wp process not found

I use Visual Studio 2010 to debug a asp.net MVC project in my local machine. The steps are: Click Debug and try to attch process "w3wp.exe". However it is not in the list. I am sure "Show...

port 8080 is already in use and no process using 8080 has been listed

I am trying to start Tomcat from Eclipse, but a problem occured: Port 8080 required by Tomcat v6.0 Server at localhost is already in use. The server may already be running in another process, or...

Speeding up the npm install

I am trying to speed up the npm install during the build process phase. My package.json has the list of packages pretty much with locked revisions in it. I've also configured the cache directory...

Optimize shell script for multiple sed replacements

I have a file containing a list of replacement pairs (about 100 of them) which are used by sed to replace strings in files. The pairs go...

New-WebServiceProxy failing to authenticate with NTLM

I'm dealing with a rather peculiar issue. We have a need to hit the Lists service on our SharePoint farm. Web authentication federated through an Oracle SSO, but we do have accounts configured for...

Moqui 1.4.1 Postgresql Configuration

I am trying to get the Moqui 1.4.1 release up and running but using Postgres as the database platform. Here are the platform details. Ubuntu 12.04 Postgres 9.4 using JDBC driver...

Exclude column from jq json output

I would like to get rid of the timestamp field here using jq JSON processor. [ { "timestamp": 1448369447295, "group": "employees", "uid": "elgalu" }, { "timestamp":...

Troubles with offline messages using mqtt.js and Mosca

I'm trying to learn how to send offline messages using mqtt.js and Mosca based on the author's demo and other instructions. Below is what I attempted, but I'm not sure why my listening client...

How can I update a list of lists very quickly in a thread-safe manner? - python

I am writing a script to add a "column" to a Python list of lists at 500 Hz. Here is the code that generates test data and passes it through a separate thread: # fileA import random, time,...

Python is slow when iterating over a MySQL connector cursor

I have the following code that runs very slowly (6.5sec for iterating over 57,390 rows) : import mysql.connector cnx=mysql.connector.connect(host=***, ***) cursorSQL = cnx.cursor() for dt in...

VHDL process get activated when the sensitivity list isn't changing

Process 2 keeps getting activated when there isn't a change. I have a board to test my code, and the state will change when I flip the clock(I set the clock as a button). In my code, the state...

How to find MySQL process list and to kill those processes?

The MySQL database hangs, due to some queries. How can I find the processes and kill them?

How to pause barcode scanning in android ML-kit when using ByteBuffer from SurfaceView

##Context## I'm using the Android firebase-ml-vision to scan barcodes using SurfaceView with continuous ByteBuffer of pictures frames. I used the ML kit quickstart project as a starting point and...

What is the advantage of saving `.npz` files instead of `.npy` in python, regarding speed, memory and look-up?

The python documentation for the numpy.savez which saves an .npz file is: The .npz file format is a zipped archive of files named after the variables they contain. The archive is not compressed...

AsyncSSH saving output to list in Python

I'm trying to use AsyncSSH module to execute a command and capture the output for further processing. I was following the examples on the official documentation but they all print() the result, I...

Emrun and headless chrome - how to make those two work together?

I would like to use headless chrome in docker environment to run my c++ tests compiled to web assembly. I've made sure that my test executable was linked with --emrun flag to ensure that all...

Speed up embedding of 2M sentences with RoBERTa

I have roughly 2 million sentences that I want to turn into vectors using Facebook AI's RoBERTa-large,fine-tuned on NLI and STSB for sentence similarity (using the awesome sentence-transformers...

Django Pedigree Table

I am in the process of creating a site with Django for my wife and her dog club. I've seen many projects in php but none in python. I'm up for tackling this in any direction! I am wanting to...

Compare the similarity of 2 sounds using Python Librosa

I have about 30 sound clips that are each a preset from a synthesizer. I want to compare these sounds to find out which ones are similar, and then sort the sounds so that each sound is adjacent in...

Replace a SQL process that uses MERGE with LINQ in C# code

I need to transfer a process from SQL Server to my application code. The T-SQL process uses MERGE, as shown below, to conditionally update or insert. -- Synchronize the InterestRates table with...

How to transform a generator function into an iterator object in python?

Often generator functions are simpler to write than iterators, e.g. consider this example generator function def generator_fn(): x = 0 for y in range(10): x += y yield...

Java map function throws non-static method compiler error

I have an odd problem, where I am struggling to understand the nature of "static context" in Java, despite the numerous SO questions regarding the topic. TL;DR: I have a design flaw, where...