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
| /* Enable postgis */ | |
| CREATE EXTENSION IF NOT EXISTS postgis; | |
| CREATE TABLE ex1 ( | |
| id VARCHAR(10) NOT NULL, | |
| loc geography(POINT, 4326) | |
| ); | |
| CREATE INDEX ex1_loc_gix ON ex1 USING GIST (loc); |
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 'package:jaguar/jaguar.dart'; | |
| import 'package:jaguar_auth/jaguar_auth.dart'; | |
| import 'package:jaguar_example_session_models/jaguar_example_session_models.dart'; | |
| main() async { | |
| final server = Jaguar(port: 10000); | |
| // Register user fetcher | |
| server.userFetchers[User] = DummyUserFetcher(users); | |
| server.postJson( |
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 'dart:async'; | |
| Stream<int> stream() async* { | |
| int k = 0; | |
| while (k < 10) yield k++; | |
| } | |
| void main() async { | |
| await for(int i in stream()) { | |
| print('Starting $i ...'); |
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 numpy as np | |
| from lightning.classification import SAGAClassifier | |
| from scipy import sparse | |
| from sklearn.datasets import load_iris, make_classification | |
| from sklearn.linear_model.logistic import ( | |
| LogisticRegression, | |
| ) | |
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
| abstract class Mixin { | |
| String mixed; | |
| } | |
| class Base { | |
| String based; | |
| Base(); | |
| Base.make({this.based}); |
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
| #!/usr/bin/env bash | |
| # obtains all data tables from database | |
| TS=`sqlite3 $1 "SELECT tbl_name FROM sqlite_master WHERE type='table' and tbl_name not like 'sqlite_%';"` | |
| # exports each table to csv | |
| for T in $TS; do | |
| sqlite3 $1 <<! | |
| .headers on |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 FutureData<T> { | |
| T _value; | |
| bool _ready = false; | |
| Future<T> _onValue; | |
| FutureData(FutureOr<T> value) { |
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 TimeAlarm { | |
| String id; | |
| DateTime time; | |
| String message; | |
| } | |
| class LocationAlarm { | |
| String id; |