import math
import numpy as np
from scipy import constants as cons
This file contains 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
// Copyright (c) 2011 Alexei Kourbatov, www.JavaScripter.net | |
// function leastFactor(n) returns: | |
// * the smallest prime that divides n | |
// * NaN if n is NaN or Infinity | |
// * 0 if n is 0 | |
// * 1 if n=1, n=-1, or n is not an integer | |
leastFactor = function(n) { | |
if (isNaN(n) || !isFinite(n)) return NaN; |
This file contains 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
import numpy as np | |
import time | |
import primesieve | |
from PIL import Image | |
# t is time in seconds | |
#fps is videos frame rate | |
t=30 | |
fps=30 |
This file contains 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
var app = express(); | |
app.io = require('socket.io')(); | |
var routes = require('./routes/index')(app.io); | |
app.use('/', routes); |
This file contains 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
const { Readable } = require("stream"); | |
const { firstName, lastName } = require("faker/locale/en").name; | |
const { createWriteStream } = require("fs"); | |
class randomName extends Readable { | |
constructor(options) { | |
super(options); | |
this.count = 1e3; | |
} | |
_read() { |
This file contains 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
package main | |
import ( | |
"fmt" | |
"github.com/bxcodec/faker" | |
) | |
type pixel struct { | |
R, G, B uint8 |
This file contains 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
#@markdown #**Anti-Disconnect for Google Colab** | |
#@markdown ## Run this to stop it from disconnecting automatically | |
#@markdown **(disconnects anyhow after 6 - 12 hrs for using the free version of Colab.)** | |
#@markdown *(Pro users will get about 24 hrs usage time[depends])* | |
#@markdown --- | |
import IPython | |
js_code = ''' | |
function ClickConnect(){ | |
console.log("Working"); |
OlderNewer