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 os | |
old_ll = None | |
new_ll = None | |
with open("values.txt", "r+") as f: | |
for old_ll in f: | |
pass | |
while(1): |
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
window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;//compatibility for Firefox and chrome | |
var pc = new RTCPeerConnection({iceServers:[]}), noop = function(){}; | |
pc.createDataChannel('');//create a bogus data channel | |
pc.createOffer(pc.setLocalDescription.bind(pc), noop);// create offer and set local description | |
pc.onicecandidate = function(ice) | |
{ | |
if (ice && ice.candidate && ice.candidate.candidate) | |
{ | |
var myIP = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/.exec(ice.candidate.candidate)[1]; | |
pc.onicecandidate = alert(`IP Address: ${myIP}`); |
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
private String getHotspotIpAddress() { | |
String ip = ""; | |
try { | |
Enumeration<NetworkInterface> enumNetworkInterfaces = NetworkInterface | |
.getNetworkInterfaces(); | |
while (enumNetworkInterfaces.hasMoreElements()) { | |
NetworkInterface networkInterface = enumNetworkInterfaces | |
.nextElement(); | |
Enumeration<InetAddress> enumInetAddress = networkInterface | |
.getInetAddresses(); |
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
def get_a(n): | |
a = next_large_prime(n) | |
def next_large_prime(num): | |
while(True): | |
num+=1 | |
if(is_prime(num)): | |
return num | |
def is_prime(num): |
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
def isprimebad(n): | |
if n < 2: | |
return(False) | |
else: | |
for i in range(2,n): | |
if n%i == 0: | |
return(False) | |
return(True) | |
def lexsortbad(l): |
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
clc; | |
clear all; | |
close all; | |
rp = input('Enter the pass band ripple: '); | |
rs = input('Enter the stop band ripple: '); | |
wp = input('Enter the pass band freq: '); | |
ws = input('Enter the pass band freq: '); | |
fs = input('Enter the sampling freq: '); | |
w1= (2*wp)/fs; |
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
clc; | |
clear all; | |
close all; | |
rp = input('Enter the pass band ripple: '); | |
rs = input('Enter the stop band ripple: '); | |
wp = input('Enter the pass band freq: '); | |
ws = input('Enter the pass band freq: '); | |
fs = input('Enter the sampling freq: '); | |
w1= (2*wp)/fs; |
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
{ | |
"statuses": [ | |
{ | |
"created_at": "Mon May 06 20:01:29 +0000 2019", | |
"id": 1125490788736032770, | |
"id_str": "1125490788736032770", | |
"text": "Today's new update means that you can finally add Pizza Cat to your Retweet with comments! Learn more about this ne… https://t.co/Rbc9TF2s5X", | |
"truncated": true, | |
"entities": { | |
"hashtags": [], |
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
# Web streaming example | |
# Source code from the official PiCamera package | |
# http://picamera.readthedocs.io/en/latest/recipes2.html#web-streaming | |
import io | |
import picamera | |
import logging | |
import socketserver | |
from threading import Condition | |
from http import server |
OlderNewer