Skip to content

Instantly share code, notes, and snippets.

View markroxor's full-sized avatar

Mohit Rathore markroxor

View GitHub Profile
#include <xinu.h>
#define DEFAULT_LOCK_PRIO 20
#define assert(x,error) if(!(x)){ \
kprintf(error);\
return;\
}
int mystrncmp(char* des,char* target,int n){
int i;
for (i=0;i<n;i++){
if (target[i] == '.') continue;
@markroxor
markroxor / temp.csv
Last active June 2, 2023 22:25
temp.csv
service other header
Wi-Fi Calling other value
Setting Time Zone other other value
Significant Locations other other value
{
"status": "succeeded",
"message": null,
"data": {
"checkout_config": {
"country_code": "IN",
"payment_methods": [
{
"method_id": "2866",
"type": "credit_card",
@markroxor
markroxor / temp2.hs
Created September 3, 2020 16:03
temp2.hs
r1 = 32
c1 = 63
-- triangle :: Int -> Int -> [[Int]]
-- ciel x
triangle r c = [[a, c, 0], [0,r,r]] where a = (c/2) -- ceiling ( (fromInteigral c) /2)
-- adder :: Int -> Int -> Int -> [[Float]]
adder r c f1 = [[0, -c*f1,c*f1], [r*f1, -r*f1, -r*f1 ]]
@markroxor
markroxor / temp1.hs
Last active September 3, 2020 15:40
temp1
-- doesnt work
is_same_side l1 x y = foldl1 (\acc n -> (is_same_side_ l1 x y n) * acc) [0..2]
-- works
is_same_side l1 x y = (is_same_side_ l1 x y 0) * (is_same_side_ l1 x y 1) * (is_same_side_ l1 x y 2)
@markroxor
markroxor / temp.hs
Created August 30, 2020 16:44
temp.hs
r1 = 32
c1 = 63
-- triangle :: Int -> Int -> [[Int]]
triangle r c = [[a, c, 0], [0,r,r]] where a = c/2 -- ceiling ( (fromIntegral c) /2)
-- adder :: Int -> Int -> Int -> [[Float]]
adder r c f1 = [[0, -c*f1,c*f1], [r*f1, -r*f1, -r*f1 ]]
l1 = triangle r1 c1
r1' = adder r1 c1 1
import Text.Printf (printf)
-- (n,p,d) represents coefficient, power, denominator of a algebric term.
-- (4,2,3) == 4 * (x ^ 2) /3
-- f(x) == n1 * (x ^ p1) / d1 + n2 * (x ^ p2) / d2 ....
-- integrates f(x)
integrate l = [(n,p+1,(p+1)*d) | (n,p,d) <- l]
-- squares a function - f^2(x)

Privacy.

Quis custodiet ipsos custodes?

Why should I care? I am clean.

Imagine what would happen if any of the following scenarios are breached.

  • Are you aware that a regular person possess at least three devices with him which can be used for
    conducting survellience on him?

  • Are you okay with being watched and listened to all the time by an unknown person? It is proven that psychologically

@markroxor
markroxor / excitel_usage.py
Created April 13, 2019 08:21
Calculates net usage by Excitel broadband services.
from bs4 import BeautifulSoup
with open('Excitel.htm', 'r') as f:
html = f.read()
parsed_html = BeautifulSoup(html, "lxml")
total_usage = 0
for i, a in enumerate(parsed_html.findAll('table')[0].findAll('td')):
if i % 6 == 4:

How do I do this thing?

I'm not aware of how to use Google, how do I do this basic thing in Language X?

tagged coding, question

edited by Grammar Nazi (2.5M), asked by 1337z0r (2)

Answer 1 (12)