This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!//usr/local/bin/python | |
# Author: tckb <[email protected]> | |
# A python client to simulate device pushes into GeoLocator service | |
# Usage: | |
# ./GeoLocator-sim.py --show (-s) [devices/clusters]: shows devices or clusters available in server | |
# ./GeoLocator-sim.py --reset (-r) : resets the simulation devices | |
# ./GeoLocator-sim.py --addDevice : registers new device | |
# ./GeoLocator-sim.py --start (-S) : starts simulation | |
# ./GeoLocator-sim.py --help (-h) : prints this message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.chemspider.www.examples; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void sendSMS(){ | |
Intent smsIntent; | |
// Check the version of the android | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) | |
{ | |
// Get default sms package, if exists | |
String smsPackage = Telephony.Sms.getDefaultSmsPackage(this); | |
smsIntent = new Intent(Intent.ACTION_SEND); | |
smsIntent.setType("text/plain"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CalculateDescriptors | |
{ | |
private static void forTrainingSet(String smileFile) | |
throws FileNotFoundException | |
{ | |
IteratingSMILESReader reader = new IteratingSMILESReader(new FileInputStream(smileFile), DefaultChemObjectBuilder.getInstance()); | |
while (reader.hasNext()) | |
{ | |
IAtomContainer molecule = reader.next(); | |
ToxDescriptor desc = new ToxDescriptor(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package jnatest; | |
import chrriis.common.UIUtils; | |
import chrriis.dj.nativeswing.swtimpl.NativeInterface; | |
import chrriis.dj.nativeswing.swtimpl.components.JWebBrowser; | |
import com.sun.corba.se.impl.orb.ParserTable.TestORBSocketFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: tckb<[email protected]> | |
# Ping notification using terminal- notifier; for OsX | |
# Usuage: ./notify_ping.sh <check_freq_seconds> & | |
rm $HOME/.np_click 2>/dev/null | |
if [ -z ${1} ] | |
then | |
freq=5 #check every 5 seconds | |
else | |
freq=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Author: tckb <[email protected]> | |
# Parallizing OSRA evaluation using GNU Parallel | |
# Usuage ./eval_dataset_faster.sh [ dataset directory with "images" dir and "sdf" dir] | |
eval_dir=$1 | |
checkingJar='/Users/tckb/Projects/Vishal/OSRAChem/dist/OSRAChem.jar' | |
pass=0 | |
fail=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Author: tckb < [email protected]> | |
# Evaluation script for OSRA | |
# Usuage ./eval_dataset_slow.sh [ dataset directory with "images" dir and "sdf" dir] [ enhancement; 1 - use enhancement; 0-no] | |
eval_dir=$1 | |
enhance=$2 # 1 - use imagemaik | |
checkingJar='/Users/tckb/Projects/Vishal/OSRAChem/dist/OSRAChem.jar' | |
pass=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int getRadius(int[][] distMatrix){ | |
int radius = Integer.MAX_VALUE; | |
//biggest value in evry column of the matrix = ece | |
// radius = minium eccentricity of a molecule | |
for(int r=0;r<distMatrix.length;r++){ | |
int maxDist=0; | |
for(int c=0;r<distMatrix.length;r++){ | |
if(distMatrix[r][c] > maxDist ){ | |
maxDist = distMatrix[r][c]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code part of tckb-lib | |
// Author: tckb <[email protected]> | |
// https://github.com/tckb/jAudIO.pub | |
public static void saveObjectToFile(File thatFile, Object... thisObject) { | |
mylogger.log(Level.INFO, "Saving object{0} to file: {1}", new Object[]{thisObject.hashCode(), thatFile.getAbsolutePath()}); | |
ObjectOutputStream stream; | |
try { | |
stream = new ObjectOutputStream(new FileOutputStream(thatFile)); |