Skip to content

Instantly share code, notes, and snippets.

View acagastya's full-sized avatar

Agastya Chandrakant acagastya

View GitHub Profile
@acagastya
acagastya / arr.js
Last active March 12, 2020 10:11
array of OSM entries with names
[
{
name: "Bangalore Junction",
url: "https://www.openstreetmap.org/way/373566738"
},
{
name: "Phoenix Marketcity",
url: "https://www.openstreetmap.org/way/169256025"
},
{
(function intersect() {
const LOOPS = 2.5 * 10 ** 8;
let count = 0;
const { random: r, sqrt: s } = Math;
for (let i = 0; i < LOOPS; i++) {
let x = r();
let y = r();
const a = { x, y };
x = r();
y = r();
const math = require('mathjs');
const LOOPS = 2.5 * 10 ** 7;
const xLim = 1;
const yLim = 1;
const r = Math.random;
let res = 0;
for (let i = 0; i < LOOPS; i++) {
const p1 = { x: r(), y: r() };
const p2 = { x: r(), y: r() };
class Point {
constructor(x = 0, y = 0) {
this.x = x;
this.y = y;
}
set coords({ x = 0, y = 0 }) {
if (!Number.isNaN(x)) this.x = x;
if (!Number.isNaN(y)) this.y = y;
}
get coords() {
const math = require('mathjs');
const LOOPS = 2.5 * 10 ** 7;
const xLim = 1;
const yLim = 1;
const r = Math.random;
let res = 0;
for (let i = 0; i < LOOPS; i++) {
const p1 = { x: r(), y: r() };
const p2 = { x: r(), y: r() };

Class XI

  1. Sets
  2. Relations and Functions
  3. Trigonometric Functions
  4. Principles of Mathematical Inductions
  5. Complex Numbers and Quadratic Equations
  6. Linear Inequalities
  7. Permutations and Combinations
  8. Binomial Theorem
  9. Sequence and Series
const { URL } = require('url');
import fetch from 'node-fetch';
export const shouldTransform = url => {
const { host, pathname } = new URL(url);
return (
[
'instagram.com',
'www.instagram.com',
'instagr.am',
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
short int reveal(short int firstDoor, short int moneyDoor) {
short int arr[3] = {0, 1, 2};
if (firstDoor == moneyDoor) {
short int newArr[2];
short int j = 0;
for (short int i = 0; i < 3; i++) {
function num(N) {
return function() {
const VAL = N;
let res = 0;
if (arguments.length == 0) return VAL;
if (arguments.length == 1) res = eval(N + arguments[0]);
return Math.floor(res);
};
}
from moviepy.editor import *
import sys
if len(sys.argv) < 2:
sys.stderr.write("Missing parameters.\n")
sys.exit(1)
try:
clip = (VideoFileClip(sys.argv[1]))
clip.write_gif(sys.argv[2] + ".gif")
sys.stdout.write("Done!\n")