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 math as m | |
t = input() | |
while(t): | |
area=0.0 | |
dist=0.0 | |
inp = map(float, raw_input().split(' ')) | |
a=inp[0] | |
area=a*3.0/2.0*inp[1] | |
b=area*2.0/(3.0*inp[2]) |
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
#include <stdio.h> | |
int main() | |
{ long long int r = 1; | |
while(true) | |
{ | |
long long int N, num=0, init=0, count=0; | |
//cin>>N; | |
scanf("%lld", &N); | |
if(N==0) |
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
#include <stdio.h> | |
int main() | |
{ | |
while(true) | |
{ | |
int N,r=0, num=0; | |
long int init=0, count=0; | |
//cin>>N; | |
scanf("%d", &N); |
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
char op[]={'+','-','*','/'}; | |
bool eval(int a[],int target,int n,int pos,int prev) | |
{ | |
if(pos == n) { | |
if(prev == target) { | |
return true; | |
} | |
return false; | |
} | |
for(int i=0;i<;4;i++) { |
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
from threading import Thread | |
import Queue | |
import time | |
class TaskQueue(Queue.Queue): | |
def __init__(self, num_workers=1): | |
Queue.Queue.__init__(self) | |
self.num_workers = num_workers | |
self.start_workers() |
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
w = a + b | |
x = c - d | |
y = 5 * x | |
z = w / y |
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
from visualize import Plotter | |
import time | |
plotly = Plotter({'streaming_token': 'YOUR_STREAMING_TOKEN'}) | |
for i in range(10): | |
time.sleep(5) | |
plotly.write(i, i) |
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 plotly.plotly as p | |
import datetime | |
import time | |
import numpy as np | |
import json | |
from plotly.graph_objs import * | |
import timeit | |
class Plotter: |
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 plotly.plotly as p | |
import datetime | |
import time | |
import numpy as np | |
import json | |
from plotly.graph_objs import * | |
import timeit | |
class Plotter: |
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
from numpy import ndarray | |
import numpy as np | |
from collections import deque | |
import timeit | |
class RingBuffer(): | |
def __init__(self, shape, dtype=np.int): | |
self.shape = shape | |
self.size = self.shape[0] |
NewerOlder