Skip to content

Instantly share code, notes, and snippets.

2020-04-07 20:54:25.225 2042-2252/? I/ActivityManager: Start proc 18293:org.eu.transfusion.formantroidqt/u0a912 for activity org.eu.transfusion.formantroidqt/org.qtproject.qt5.android.bindings.QtActivity caller=com.miui.home
2020-04-07 20:54:25.258 18293-18300/? E/n.formantroidq: Failed to send DDMS packet REAQ to debugger (-1 of 20): Broken pipe
2020-04-07 20:54:25.259 2042-11586/? D/CompatibilityInfo: mCompatibilityFlags - 0
2020-04-07 20:54:25.259 2042-11586/? D/CompatibilityInfo: applicationDensity - 384
2020-04-07 20:54:25.259 2042-11586/? D/CompatibilityInfo: applicationScale - 1.0
2020-04-07 20:54:25.263 2042-11586/? I/set_top_app: success /proc/18293/task/18293/top_app:1
2020-04-07 20:54:25.264 2042-11586/? D/CompatibilityInfo: mCompatibilityFlags - 0
2020-04-07 20:54:25.264 2042-11586/? D/CompatibilityInfo: applicationDensity - 384
2020-04-07 20:54:25.264 2042-11586/? D/CompatibilityInfo: applicationScale - 1.0
2020-04-07 20:54:25.267 2042-2550/? W/ActivityManager: Receiver with filter android.conten
import sys
class Solution:
def __init__(self):
self.valid_cuts = None
self.memo = None
# left and right indices of a sorted list of valid cuts
# [4,5,7,8]
both mobile internet and GT wi-fi , same below
yaowalukk@ITD-YAOWALUKK MINGW64 /d/git/local/websis (develop2)
$ mvn -Dhttps.protocols=TLSv1.2 package -P uat
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------------< com:ol >-------------------------------
[INFO] Building ol 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO]
@Transfusion
Transfusion / Solution.java
Created December 8, 2019 19:03
LC 973. K Closest Points to Origin
class Solution {
private double euclidDist(int[] p1, int[] p2) {
return Math.sqrt( Math.pow(p1[0] - p2[0], 2) + Math.pow(p1[1] - p2[1], 2) );
};
public int[][] kClosest(int[][] points, int K) {
int[] origin = new int[]{0,0};
PriorityQueue<int[]> pq = new PriorityQueue<>(new Comparator<int[]>() {
@Transfusion
Transfusion / Main.java
Created December 7, 2019 17:14
CodeForces 399A
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(f.readLine());
int n = Integer.parseInt(st.nextToken());
int p = Integer.parseInt(st.nextToken());
{'encoding': 'SHIFT_JIS', 'confidence': 0.5227341162300512, 'language': 'Japanese'}
Filename: memory_profiling_4112.py
Line # Mem usage Increment Line Contents
================================================
13 21.5 MiB 21.5 MiB @profile
14 def chunked_with_memoryview(chunk_size: int = 2 * 1024):
15 21.5 MiB 0.0 MiB detector = chardet.UniversalDetector()
16 21.5 MiB 0.0 MiB _body_memoryview = memoryview(_bytes)
17 # print(len(_bytes) == len(_body_memoryview))
chunk 5 reached
{'encoding': 'SHIFT_JIS', 'confidence': 0.9900000095367432}
Filename: memory_profiling_4112.py
Line # Mem usage Increment Line Contents
================================================
13 21.5 MiB 21.5 MiB @profile
14 def chunked_with_memoryview(chunk_size: int = 2 * 1024):
15 21.5 MiB 0.0 MiB detector = chardet.UniversalDetector()
16 21.5 MiB 0.0 MiB _body_memoryview = memoryview(_bytes)
@Transfusion
Transfusion / sol.py
Created October 18, 2019 17:53
949. Largest Time for Given Digits
class Solution:
def __init__(self):
self.max_hours = -1
self.max_minutes = -1
def A_n_k_pythonic(self, a, used, curr, depth=0): # curr is the current solution
if depth == 2:
hours = curr[0] * 10 + curr[1]
if hours < self.max_hours or hours > 23:
[snd, originalFs] = audioread('pooling_transfusion_oo_0_95_1_0.wav');
Fs = 10000;
% downsample to 10 KHz
snd = resample(snd, Fs, originalFs);
plot(snd);
figure;
segmentlen = 100;
noverlap = 90;
$ ./BuildAll.sh --enable-cuda
Extracting boost_1_61_0.7z...
Building Boost.Build engine with toolset gcc... tools/build/src/engine/bin.linuxx86_64/b2
Detecting Python version... 2.7
Detecting Python root... /usr
Unicode/ICU support for Boost.Regex?... not found.
Backing up existing Boost.Build configuration in project-config.jam.5
Generating Boost.Build configuration in project-config.jam...
Bootstrapping is done. To build, run: