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:meghshala_app_flutter/core/dynamodb.dart'; | |
| import 'package:meghshala_app_flutter/core/lesson_store.dart'; | |
| // fetch lessons from database | |
| Set<Lesson> lessons = await DynamoDB.listLessons(); | |
| // or, fetch from local storage | |
| Set<Lesson> lessons = await LessonStore.getLessons(); | |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <style id="jsbin-css"> | |
| dot-wave dot { | |
| display: inline-block; | |
| width: 12px; |
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
| def roundrobin(pending): | |
| remaining = set(pending) | |
| index = 0 | |
| while remaining: | |
| for requester in list(remaining): | |
| try: | |
| if process_success(requester, pending[requester][index]): | |
| del pending[requester][index] | |
| except IndexError: |
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
| .idea | |
| zproc/*.c | |
| zproc/*.so | |
| # Created by https://www.gitignore.io/api/python,pycharm | |
| ### PyCharm ### | |
| # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm | |
| # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 |
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
| def pos_safe(fn): | |
| def wrapper(self): | |
| old = self._pos.copy() | |
| fn(self) | |
| for i in range(2): | |
| if not (0 <= self._pos[i] <= self.bounds[i]): | |
| self._pos = old | |
| raise ValueError("Robot shall not pass!") | |
| self.curpos() | |
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
| somevar = 60 | |
| def outer(): | |
| somevar = -1 | |
| def inner(num): | |
| return "My answer is " + str(num + 1) | |
| return fnhash(inner) | |
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
| $ flutter doctor --verbose | |
| [✓] Flutter (Channel beta, v0.5.1, on Linux, locale en_US.utf8) | |
| • Flutter version 0.5.1 at /home/dev/Apps/flutter | |
| • Framework revision c7ea3ca377 (6 weeks ago), 2018-05-29 21:07:33 +0200 | |
| • Engine revision 1ed25ca7b7 | |
| • Dart version 2.0.0-dev.58.0.flutter-f981f09760 | |
| [✓] Android toolchain - develop for Android devices (Android SDK 28.0.1) | |
| • Android SDK at /home/dev/Android/Sdk | |
| • Android NDK location not configured (optional; useful for native profiling support) |
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:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'MyApp', | |
| initialRoute: '/', |
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
| # pip install delegator.py zproc | |
| # (python3.6 only!) | |
| # | |
| # python aplay_player.py | |
| # (remember to set path to an audio file of your choice at bottom) | |
| import atexit | |
| import os | |
| import signal | |
| from pathlib import Path |
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
| INSTRUMENTS = [ | |
| 'Acoustic Grand Piano', | |
| 'Bright Acoustic Piano', | |
| 'Electric Grand Piano', | |
| 'Honky-tonk Piano', | |
| 'Electric Piano 1', | |
| 'Electric Piano 2', | |
| 'Harpsichord', | |
| 'Clavi', | |
| 'Celesta', |