Skip to content

Instantly share code, notes, and snippets.

View abdulwahid24's full-sized avatar
🐢
I may be slow to respond.

Abdulwahid Barguzar abdulwahid24

🐢
I may be slow to respond.
View GitHub Profile
@letsar
letsar / tab_bar_view.dart
Created June 30, 2018 12:31
How to use a SliverStickyHeader inside a TabBarView
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_sticky_header/flutter_sticky_header.dart';
class _Page {
const _Page(
this.id,
this.title,
this.color,
@bsletten
bsletten / ml-recs.md
Last active January 24, 2024 19:28
Machine Learning Path Recommendations

This is an incomplete, ever-changing curated list of content to assist people into the worlds of Data Science and Machine Learning. If you have a recommendation for something to add, please let me know. If something isn't here, it doesn't mean I don't recommend it, I just may not have had a chance to review it yet or not.

I will generally list things in order of easier to more formal/challenging content.

It may feel like there is an overwhelming amount of stuff for you to learn (because there is). But, there is a guided path that will get you there in time. You need to focus on Linear Algebra, Calculus, Statistics and probably Python (or R). Your best bet is to get a Safari Books Online account (https://www.safaribooksonline.com) which you may already have access to through school or work. If not, it is a reasonable way to get access to a tremendous number of books and videos.

I'm not saying you will get what you need out of everything here, but I have read/watched at least some of all of the following an

@uhho
uhho / pandas_s3_streaming.py
Last active December 2, 2022 18:57
Streaming pandas DataFrame to/from S3 with on-the-fly processing and GZIP compression
def s3_to_pandas(client, bucket, key, header=None):
# get key using boto3 client
obj = client.get_object(Bucket=bucket, Key=key)
gz = gzip.GzipFile(fileobj=obj['Body'])
# load stream directly to DF
return pd.read_csv(gz, header=header, dtype=str)
def s3_to_pandas_with_processing(client, bucket, key, header=None):
@derekdon
derekdon / ionic 1 webpack.config.js
Created July 5, 2016 09:05
Example Ionic 1 webpack.config.js
'use strict';
var webpack = require('webpack'),
path = require('path'),
BowerWebpackPlugin = require('bower-webpack-plugin');
module.exports = {
entry: {
vendor: [
'angular',
@syafiqfaiz
syafiqfaiz / how-to-copy-aws-rds-to-local.md
Last active May 15, 2024 11:43
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored
@Atlas7
Atlas7 / remove_postgres_on_mac_os.md
Last active March 23, 2023 13:02
Note - How completely uninstall PostgreSQL 9.X on Mac OSX

This blog post has helped me clean up my postgres development environment on Mac. So making a copy!

How completely uninstall PostgreSQL 9.X on Mac OSX

This article is referenced from stackoverflow:

If installed PostgreSQL with homebrew , enter brew uninstall postgresql

If you used the EnterpriseDB installer , follow the following step.
@ajayk
ajayk / Nginx_error.log
Last active August 10, 2018 12:35
An Nginx proxy error connecting to AWS api-gateway
2016/01/08 23:57:02 [error] 68363#0: *38 SSL_do_handshake() failed (SSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure) while SSL handshaking to upstream, client: 127.0.0.1, server: localhost, request: "GET /api/providers HTTP/1.1", upstream: "https://xx.xx.xx.xx:443/stage", host: "localhost"
2016/01/08 23:57:02 [warn] 68363#0: *38 upstream server temporarily disabled while SSL handshaking to upstream, client: 127.0.0.1, server: localhost, request: "GET /api/providers HTTP/1.1", upstream: "https://xx.xx.xx.xx:443/stage", host: "localhost"
@MichaelCurrie
MichaelCurrie / autopep8 Travis-CI.md
Last active April 26, 2021 17:18
Automatically fix PEP-8 issues using Travis-CI

PEP-8 is a set of Python style recommendations. pep8 is a module that checks your .py file for violations. To make your Travis-CI build fail if you have any violations, you could add these lines to your .travis.yml:

before_install:
    - pip install pep8
    
script:
    # Run pep8 on all .py files in all subfolders
    # (I ignore "E402: module level import not at top of file"
    # because of use case sys.path.append('..'); import <module>)
@haridas
haridas / new_memcached.py
Created March 24, 2015 03:10
Ketama based Consistent hashing implementation of python-memcache library.
"""
To Test this Script the start 8 memcache servers using this command.
$ memcached -d -p {PortNumber}
PortNumber:
11211
11212
11213
11214
@drorata
drorata / gist:146ce50807d16fd4a6aa
Last active May 23, 2024 02:48
Minimal Working example of Elasticsearch scrolling using Python client
# Initialize the scroll
page = es.search(
index = 'yourIndex',
doc_type = 'yourType',
scroll = '2m',
search_type = 'scan',
size = 1000,
body = {
# Your query's body
})