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
#!/usr/bin/python3 | |
''' | |
This script parses the HTML file from https://www.moneycontrol.com/stocks/marketinfo/dividends_declared/index.php and | |
creates a CSV file with relevant data | |
Sheet will contain all upcoming dividends after the current date, and those whose percentage is declared | |
It calculates the net percentage earning per rupee invested if you buy the stock at current price and hold it till the record date | |
To run this script, you need to first create: |
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
#include <algorithm> | |
#include <numeric> | |
#include <vector> | |
#include "benchmark/benchmark.h" | |
#include "buf_idx_iter.hpp" | |
template <typename T> | |
void BM_std_sort(benchmark::State& state) | |
{ |
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
template<typename T> | |
class buf_idx_iter | |
{ | |
public: | |
using iterator_category = std::random_access_iterator_tag; | |
using value_type = T; | |
using difference_type = std::ptrdiff_t; | |
using pointer = T*; | |
using reference = T&; |
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
//======================================================================================================================================== | |
// Write an template iterator class with just the tags in it | |
//======================================================================================================================================== | |
template<typename T> | |
class iterator | |
{ | |
public: | |
using iterator_category = std::random_access_iterator_tag; | |
using value_type = T; |
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
I am attesting that this GitHub handle rep-movsd is linked to the Tezos account tz1WdmziqzcmqdRPPg5N1NBME8NrqZAVDaGq for tzprofiles | |
sig:edsigtmoEDmGt45vS6Ja1KC3m9XNS4kZhaaVCkHnNkQYPnc8CcVdkgaEm65bmQgYDfdUt8Pjj7bLH8PXaBFBDLxfTkPDotKrtgu |
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
I am attesting that this GitHub handle rep-movsd is linked to the Tezos account tz1W4jq35csgLVWHSk9fVw1DL24SnZ8ZP1ny for tzprofiles | |
sig:edsigtaaJH4DkB3dF1ucgApS9Qv3J1jXzPQZCP1QwkhBxoGfTHdUaFLXna7e1bpSjBGrav1Xukov2odTEQiX3i6XGQrrUmPFLJZ |
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
#!/usr/bin/python | |
# Abcdexter, 7/7/2021, 1142 | |
############################ | |
# imports | |
############################ | |
import sys | |
import numpy as np | |
from PIL import Image | |
import matplotlib.pyplot as plt |
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
#/usr/bin/python | |
import sys | |
import json | |
# open grid file | |
with open(sys.argv[1]) as f: | |
lines = [line.rstrip('\n') for line in f] | |
# make the grid but padded on left right and bottom sides with a sentinel like this (makes it easy to grab diagonals) |
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
<div id="app"></app> |
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
function u(t) | |
{ | |
z=255 | |
for(i=0;i<z/2;++i) | |
{ | |
r=z*1.5-i | |
b=t+i*9/z | |
sa=S(t)*z | |
x.fillStyle=R(z-sa,z-C(t)*z,sa,0.01) | |
x.fillRect(780+r*S(b),420+r*C(b),80,90) |
NewerOlder