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
android { | |
... | |
} | |
dependencies { | |
// ADD THESE | |
implementation 'com.squareup.retrofit2:retrofit:2.6.3' | |
implementation 'com.squareup.retrofit2:converter-gson:2.6.3' | |
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3" | |
... |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.chelseatroy.canary"> | |
<application | |
... | |
</application> | |
// ADD THESE TWO LINES | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> |
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
class MoodEntryFragment : DialogFragment() { | |
var weather = Weather.UNKNOWN | |
... | |
override fun onResume() { | |
super.onResume() | |
... | |
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
... | |
for ((index, button) in moodButtonCollection.withIndex()) { | |
button?.setOnClickListener({ view -> | |
for (button in moodButtonCollection) button?.setBackgroundColor(unselectedColor); | |
view.setBackgroundColor(selectedColor); | |
currentMood = Mood.values()[index] | |
}) | |
} | |
... |
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
... | |
var moods = arrayListOf<String>( | |
"UNSELECTED", | |
"UNSELECTED", | |
"UNSELECTED", | |
"UNSELECTED", | |
"UNSELECTED" | |
) | |
for ((index, button) in moodButtonCollection.withIndex()) { | |
val thisButtonIndex = index |
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
extension UIColor { | |
static let brandedBlue = UIColor(netHex: 0x5CADCF) | |
} |
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 os import getenv | |
from ..abstract_operation import AbstractOperation | |
from panoptes_client import Panoptes, Project, Subject, SubjectSet | |
from theia.utils import PanoptesUtils | |
class UploadSubject(AbstractOperation): | |
def apply(self, filenames): | |
if self.pipeline.multiple_subject_sets: |
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
{ | |
"data": [ | |
{ | |
"type": "PipelineStage", | |
"id": "2", | |
"attributes": { | |
"sort_order": 1, | |
"output_format": null, | |
"operation": "image_operations.remap_image", | |
"select_images": [ |
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
class KeyValueStore: | |
... | |
def execute(self, string_operation, term_absent, write=True, path_to_logs=''): | |
if len(string_operation) == 0: | |
return | |
... |
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
class KeyValueStore: | |
... | |
def catch_up(self, path_to_logs=''): | |
if path_to_logs == '': | |
path_to_logs = "logs/" + self.server_name + "_log.txt" | |
if os.path.exists(path_to_logs): | |
f = open(path_to_logs, "r") |