Skip to content

Instantly share code, notes, and snippets.

View tejainece's full-sized avatar

Ravi Teja Gudapati tejainece

View GitHub Profile
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
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
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>
@tejainece
tejainece / microtask_not_thread.dart
Created December 30, 2017 15:23
Microtasks are not threads!
import 'dart:async';
import 'dart:io';
Future<int> quadF(int a) async {
print('Starting 2!');
return a * 2;
}
Future<int> twiceF(int a) async {
@tejainece
tejainece / terminal_size.dart
Last active December 17, 2017 20:42
Finding terminal size in Dart
import 'dart:io';
main() {
if (!stdout.hasTerminal) {
print('Stdout not attached to a terminal! Exiting...');
exit(0);
}
print('${stdout.terminalLines} x ${stdout.terminalColumns}');
@tejainece
tejainece / brightray_dep_install.sh
Created December 3, 2017 13:40
Dependencies installer for BrightRay
sudo apt-get install libgtk2.0-dev libx11-xcb-dev libdbus-1-dev libgconf-2-4 libnss3-dev xscreensaver libxtst-dev libgconf2-dev libxss-dev