Skip to content

Instantly share code, notes, and snippets.

View tejainece's full-sized avatar

Ravi Teja Gudapati tejainece

View GitHub Profile
@tejainece
tejainece / auth.dart
Last active May 26, 2021 08:44
Examples on Jaguar website
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(
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 ...');
@tejainece
tejainece / liblinear_vs_lightning.py
Created June 4, 2018 14:09 — forked from arthurmensch/liblinear_vs_lightning.py
SAGAClassifier vs sklearn liblinear
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,
)
abstract class Mixin {
String mixed;
}
class Base {
String based;
Base();
Base.make({this.based});
@tejainece
tejainece / sqlite2csv.sh
Created March 19, 2018 13:15 — forked from carlosefonseca/sqlite2csv.sh
Exports all tables in a sqlite database to CSV.
#!/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
@tejainece
tejainece / dataframe_column_select.ipynb
Created March 17, 2018 22:52
Select columns in DataFrame by lambda function
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tejainece
tejainece / dataframe_column_filter.ipynb
Created March 17, 2018 17:28
How to filter columns of DataFrame
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
class FutureData<T> {
T _value;
bool _ready = false;
Future<T> _onValue;
FutureData(FutureOr<T> value) {
class TimeAlarm {
String id;
DateTime time;
String message;
}
class LocationAlarm {
String id;
@tejainece
tejainece / index.html
Created January 16, 2018 21:36
Sample file to showcase Jaguar's serve
<html>
<head>
<title>Jaguar</title>
<style>
#title-holder {
width: 100%;
text-align: center;
}
</style>
</head>