Skip to content

Instantly share code, notes, and snippets.

@abhi1010
abhi1010 / trend_following_1.ipynb
Created July 17, 2023 15:02 — forked from AnthonyFJGarner/trend_following_1.ipynb
A Simple Trend Following System in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@abhi1010
abhi1010 / mean_reversion.ipynb
Created July 17, 2023 15:01 — forked from AnthonyFJGarner/mean_reversion.ipynb
A Simple Mean Reversion System in Simple Python Code
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@abhi1010
abhi1010 / mock.methods.py
Created April 23, 2023 14:58 — forked from Sklavit/mock.methods.py
Mock examples
# @ https://cheat.readthedocs.io/en/latest/python/mock.html
obj.call_count # number of times it was called
obj.called == obj.call_count > 0
obj.call_args_list # a list of (args,kwargs), one for each call
obj.call_args # obj.call_args_list[-1] (args,kwargs from last call)
obj.return_value # set to what it should return
obj.side_effect # set to an exception class or instance that should be raised when its called
obj.assert_called() # doesn't work with autospec=True? just assert obj.called
obj.assert_called_with(*args, **kwargs) # last call was with (*args, **kwargs)
@abhi1010
abhi1010 / gist:04ae5e63af2fd629000965b47865521d
Created October 25, 2018 03:34 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@abhi1010
abhi1010 / expand_url.py
Created January 6, 2018 16:18 — forked from vgoklani/expand_url.py
Expand shortened URLs in Python
# http://stackoverflow.com/questions/748324/python-convert-those-tinyurl-bit-ly-tinyurl-ow-ly-to-full-urls
#############
# urllib2
import urllib2
fp = urllib2.urlopen('http://bit.ly/rgCbf')
fp.geturl()
# ==> 'http://webdesignledger.com/freebies/the-best-social-media-icons-all-in-one-place'
@abhi1010
abhi1010 / config.js
Created April 13, 2016 04:14 — forked from johnlindquist/config.js
RxJS + Angular 2 with 14 different Rx operators all chained together
SystemJS.config({
transpiler: "typescript",
typescriptOptions: {
"experimentalDecorators": true,
"emitDecoratorMetadata": true
},
map: {
"rxjs": "https://npmcdn.com/rxjs",
"angular2": "https://npmcdn.com/angular2",
"@ngrx": "https://npmcdn.com/@ngrx",
@abhi1010
abhi1010 / grunt-hugo-lunrjs.md
Created November 4, 2015 16:17 — forked from sebz/grunt-hugo-lunrjs.md
hugo + gruntjs + lunrjs = <3 search
@abhi1010
abhi1010 / generate_diagram.py
Created September 24, 2015 04:19 — forked from jul/generate_diagram.py
building entitty relation ship diagram from a db by using introspection
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from sqlsoup import SQLSoup as sql
from sys import argv
DIGRAPH = """digraph structs {
graph [
rankdir= "LR"
bgcolor=white
]