│ main.dart
│ theme.dart
│ util.dart
│
├───bloc
│ │ add_child_bloc.dart
│ │ bottom_nav_bloc.dart
│ │ theme_bloc.dart
│ │
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
# how to use | |
# python analyze_tokens.py --dir /path/to/your/project --encoding cl100k_base --sort-by tokens --output tree | |
import os | |
import tiktoken | |
from typing import List, Dict, Tuple | |
import argparse | |
import pathspec |
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 requests | |
import xml.etree.ElementTree as ET | |
def get_bucket_contents(url, marker=None): | |
"""Make a request to the S3 bucket and return the response.""" | |
params = {"marker": marker} if marker else {} | |
response = requests.get(url, params=params) | |
return response.text |
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:math'; | |
List<double> normalize(List<int> array, int minRange, int maxRange) { | |
int minValue = array.reduce(min); | |
int maxValue = array.reduce(max); | |
int valueRange = maxValue - minValue; |
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'; | |
import 'dart:math' as math; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
| main.dart
|
+---models
| reports_detail.dart
| reports_list.dart
|
+---resources
| | api_provider.dart
| | graphql_service.dart
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'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
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 requests | |
from bs4 import BeautifulSoup | |
base_url = "http://gen.lib.rus.ec" | |
headers = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', | |
'Accept-Encoding': 'gzip, deflate, sdch', | |
'Accept-Language': 'en-US,en;q=0.8', |
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 collections import namedtuple | |
import statistics as st | |
from collections import Counter | |
def kurtosis(a): | |
N = len(a) | |
mean = st.mean(a) | |
sd = st.variance(a)**0.5 | |
kurt = sum([(i-mean)**4 for i in a])/N/sd**4 | |
return kurt |
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
''' | |
Count number of possible ways to create a sequence with following property | |
(1 3 4) "5" (4 2) | |
-- First part: Increasing | |
-- Second part: decreasing | |
''' | |
# no. of array items |
NewerOlder