This file contains hidden or 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
| from pycoingecko import CoinGeckoAPI | |
| cg = CoinGeckoAPI() | |
| per_set = { | |
| "YFI": 0.000798, | |
| "LEND": 33.272727, | |
| "SNX": 3.148585, | |
| "COMP": 0.08535, | |
| "MKR": 0.023989, | |
| "LRC": 30.833333, |
This file contains hidden or 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
| import kotlinx.coroutines.Dispatchers | |
| import kotlinx.coroutines.test.TestCoroutineDispatcher | |
| import kotlinx.coroutines.test.TestCoroutineScope | |
| import kotlinx.coroutines.test.resetMain | |
| import kotlinx.coroutines.test.setMain | |
| import org.junit.jupiter.api.extension.AfterAllCallback | |
| import org.junit.jupiter.api.extension.AfterEachCallback | |
| import org.junit.jupiter.api.extension.BeforeAllCallback | |
| import org.junit.jupiter.api.extension.ExtendWith | |
| import org.junit.jupiter.api.extension.ExtensionContext |
This file contains hidden or 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
| package android.support.v4.app; | |
| import android.os.Bundle; | |
| import android.os.Handler; | |
| import android.view.ContextMenu; | |
| import android.view.ContextMenu.ContextMenuInfo; | |
| import android.view.Gravity; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.View.OnCreateContextMenuListener; |
This file contains hidden or 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
| @Override | |
| protected void onHandleIntent(Intent intent) { | |
| this.nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); | |
| int jobId = intent.getIntExtra(JOB_ID_EXTRA, -1); | |
| QypeModel model = intent.getParcelableExtra(MODEL_EXTRA); | |
| if (model instanceof Place) { | |
| this.uploadStrategy = new PlacePhotoUploadStrategy((Place) model); | |
| } else if (model instanceof User) { | |
| this.uploadStrategy = new UserPhotoUploadStrategy((User) model); | |
| } else { |
This file contains hidden or 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
| // | |
| // !!WARNING: Not recommended for production code!! | |
| // | |
| public class ClassLoaderActivity extends Activity | |
| { | |
| public void onCreate(Bundle savedInstanceState) | |
| { | |
| // file.jar has a dex'd "classes.dex" entry that you can generate with "dx" from any number of JARs or class files | |
| ClassLoader dexLoader = new DexClassLoader("/path/to/file.jar", getCacheDir().getAbsolutePath(), null, getClassLoader()); | |
| setAPKClassLoader(dexLoader); |