index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
47,516
RushikeshGholap/Projects
refs/heads/master
/Django/django_sinha/addme/adder/models.py
from django.db import models # Create your models here. class numbers(models.Model): a = models.IntegerField() b = models.IntegerField() result = models.IntegerField(default=0)
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,517
RushikeshGholap/Projects
refs/heads/master
/Django/Code/mysite/polls/urls.py
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('caps',views.caps, name='caps') ]
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,518
RushikeshGholap/Projects
refs/heads/master
/Flask and Docker/deploy_model.py
from sklearn.externals import joblib from flask import Flask, jsonify app = Flask(__name__) @app.route('/<inp>') def predict_category(inp): responsibility = [str(inp)] model = joblib.load('test_model.pkl') output = model.predict(responsibility)[0] return jsonify(category = output) if __name__ == '__m...
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,519
RushikeshGholap/Projects
refs/heads/master
/Flask and Docker/Flask Coursera/app.py
#FLASK API (COURSERA) from flask import Flask, render_template, request app = Flask(__name__) @app.route('/') def index(): return render_template('index.html', out=text) @app.route('/', methods=['POST']) def index1(): text = request.form['text'] return render_template('index.html', out='text') if __na...
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,520
RushikeshGholap/Projects
refs/heads/master
/Django/Django/bin/django-admin.py
#!/Users/akshay/Dropbox/Personal/Data Science/iPython/Personal/Django/Django/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,521
RushikeshGholap/Projects
refs/heads/master
/ML App/mysite/mlpanel/apps.py
from django.apps import AppConfig class MlpanelConfig(AppConfig): name = 'mlpanel'
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,522
RushikeshGholap/Projects
refs/heads/master
/Django/django_sinha/imagepred/core/views.py
from django.shortcuts import render, redirect from django.http import HttpResponse from django.conf import settings from .forms import * # Create your views here. def index(request): if request.method=='POST': form = DocumentForm(request.POST, request.FILES) if form.is_valid(): form.save() return redirect(...
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,523
RushikeshGholap/Projects
refs/heads/master
/Random/untitled0.py
# -*- coding: utf-8 -*- """ Created on Sun Jul 16 00:56:55 2017 @author: Akshay """ import os import pandas as pd import missingno as msno import numpy as np from scipy.spatial.distance import cosine from sklearn.metrics.pairwise import linear_kernel import pymysql import itertools from collections imp...
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,524
RushikeshGholap/Projects
refs/heads/master
/Django/django_sinha/addme/adder/views.py
from django.shortcuts import render from django.http import HttpResponse from adder.models import numbers # Create your views here. #first time page def index(request): return render(request, 'index.html') #second time page after submit (with result) def output(request): if request.method == 'POST': nums = num...
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,525
RushikeshGholap/Projects
refs/heads/master
/Django/django_sinha/addme/adder/apps.py
from django.apps import AppConfig class AdderConfig(AppConfig): name = 'adder'
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,526
RushikeshGholap/Projects
refs/heads/master
/Django/django_sinha/addme/adder/admin.py
from django.contrib import admin from adder.models import numbers # Register your models here. admin.site.register(numbers)
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,527
RushikeshGholap/Projects
refs/heads/master
/Random/python_basics2.py
# -*- coding: utf-8 -*- """ Created on Sun Aug 6 22:52:12 2017 @author: Akshay """ import os os.chdir("C:\\Users\\Akshay\\Dropbox\\Personal\\Data Science\\iPython\\Personal\\Practice") os.getcwd() document = open("test_document.txt", "r") x = document.read() xl = x.split() xl #Problem statement - #W...
{"/Django/django_sinha/imagepred/core/forms.py": ["/Django/django_sinha/imagepred/core/models.py"], "/Django/django_sinha/imagepred/core/views.py": ["/Django/django_sinha/imagepred/core/forms.py"]}
47,528
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/registration/forms.py
from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from .models import UserProfile from django.db import models from django import forms class UserCreate(UserCreationForm): class Meta: model = User fields=['username', 'password...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,529
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/registration/views.py
from django.shortcuts import render, redirect, get_object_or_404 from .forms import UserCreate, Profile from django.contrib.auth import authenticate, login from django.contrib.auth.decorators import login_required from .models import UserProfile from django.contrib import messages # Create your views here. def regist...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,530
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/migrations/0005_auto_20210301_1143.py
# Generated by Django 3.1.6 on 2021-03-01 11:43 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('books', '0004_auto_20210...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,531
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/views.py
from django.shortcuts import render, get_object_or_404 from .models import Book from .forms import DropdownForm from django.contrib.auth.decorators import login_required import os from django.conf import settings from django.http import HttpResponse from django.views.generic import TemplateView, ListView from django.db...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,532
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/registration/models.py
from django.db import models from django.contrib.auth.models import User from books.models import Book class UserProfile(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) user = models.OneToOneField(User, on_delete=models.CASCADE) age = models.Inte...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,533
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/migrations/0014_auto_20210309_2335.py
# Generated by Django 3.1.6 on 2021-03-09 23:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0013_auto_20210309_2052'), ] operations = [ migrations.AddField( model_name='book', name='rate_times', ...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,534
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/migrations/0004_auto_20210228_1517.py
# Generated by Django 3.1.6 on 2021-02-28 15:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0003_auto_20210221_1535'), ] operations = [ migrations.CreateModel( name='UserProfile', fields=[ ...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,535
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/migrations/0007_auto_20210301_1203.py
# Generated by Django 3.1.6 on 2021-03-01 12:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0006_userprofile_avatar'), ] operations = [ migrations.AlterField( model_name='userprofile', name='books', ...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,536
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/urls.py
from django.urls import path from . import views from .views import SearchResultsView, AdvancedSearch urlpatterns =[ path('', views.home, name="books_home"), path('rating_1/<int:rate>/<int:pk>', views.rate_1, name="rate_1"), path('about/', views.about, name="about"), path('book_view/<int:pk>', views....
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,537
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/migrations/0011_auto_20210306_1028.py
# Generated by Django 3.1.6 on 2021-03-06 10:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0010_auto_20210302_0810'), ] operations = [ migrations.AlterField( model_name='book', name='publish_year', ...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,538
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/migrations/0012_auto_20210306_1030.py
# Generated by Django 3.1.6 on 2021-03-06 10:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0011_auto_20210306_1028'), ] operations = [ migrations.AlterField( model_name='book', name='age_group', ...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,539
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/migrations/0010_auto_20210302_0810.py
# Generated by Django 3.1.6 on 2021-03-02 08:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0009_delete_userprofile'), ] operations = [ migrations.AlterField( model_name='book', name='pdf_file', ...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,540
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/models.py
from django.db import models from django.contrib.auth.models import User from languages.fields import LanguageField from PIL import Image GROUP_CHOICES = ( ("0", '0+'), ("1", '7+'), ("2", '13+'), ("3", '18+') ) # Create your models here. class Book(models.Model): title = models.CharField(max_lengt...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,541
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/migrations/0006_userprofile_avatar.py
# Generated by Django 3.1.6 on 2021-03-01 12:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0005_auto_20210301_1143'), ] operations = [ migrations.AddField( model_name='userprofile', name='avatar', ...
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,542
VladislavJanibekyan/Online_Library
refs/heads/main
/online_library/books/migrations/0009_delete_userprofile.py
# Generated by Django 3.1.6 on 2021-03-01 14:45 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('books', '0008_auto_20210301_1240'), ] operations = [ migrations.DeleteModel( name='UserProfile', ), ]
{"/online_library/registration/forms.py": ["/online_library/registration/models.py"], "/online_library/registration/views.py": ["/online_library/registration/forms.py", "/online_library/registration/models.py"], "/online_library/books/views.py": ["/online_library/books/models.py"], "/online_library/books/urls.py": ["/o...
47,543
psahithireddy/BrickBreaker
refs/heads/main
/powerups.py
import input #fix bg powerups and ball trajectory by 1 :) import os from colorama import init, Fore, Back, Style import numpy as np import screen import utils import math import time class Powerup(): def __init__(self,ele,types,x,y): self._icon=ele self._type=types self.active=0 ...
{"/powerups.py": ["/screen.py", "/utils.py"], "/elements.py": ["/screen.py", "/utils.py"], "/bricks.py": ["/screen.py", "/utils.py"], "/screen.py": ["/utils.py"], "/utils.py": ["/screen.py", "/elements.py", "/bricks.py", "/powerups.py"], "/game.py": ["/utils.py"]}
47,544
psahithireddy/BrickBreaker
refs/heads/main
/elements.py
import input import os import time from colorama import init, Fore, Back, Style import numpy as np import screen import utils import random class element(): #element is 2d array, can be ball or paddle def __init__(self, element, x , y): self.x_coordinate = x self.y_coordinate = y self._...
{"/powerups.py": ["/screen.py", "/utils.py"], "/elements.py": ["/screen.py", "/utils.py"], "/bricks.py": ["/screen.py", "/utils.py"], "/screen.py": ["/utils.py"], "/utils.py": ["/screen.py", "/elements.py", "/bricks.py", "/powerups.py"], "/game.py": ["/utils.py"]}
47,545
psahithireddy/BrickBreaker
refs/heads/main
/bricks.py
import input import os from colorama import init, Fore, Back, Style import numpy as np import screen import utils import math #-1 for non breakingbrick,1 class Bricks(): def __init__(self,ele,val,x,y,count): self._element=ele self.x_pos=x self.y_pos=y self._count=count self._...
{"/powerups.py": ["/screen.py", "/utils.py"], "/elements.py": ["/screen.py", "/utils.py"], "/bricks.py": ["/screen.py", "/utils.py"], "/screen.py": ["/utils.py"], "/utils.py": ["/screen.py", "/elements.py", "/bricks.py", "/powerups.py"], "/game.py": ["/utils.py"]}
47,546
psahithireddy/BrickBreaker
refs/heads/main
/screen.py
import input import os from colorama import Fore, Back, Style import numpy as np import utils class Screen(): def __init__(self,height,width): self._height=height self._width=width self._grid=[[" "for i in range(self._width)] for j in range(self._height)] self.upperwall() s...
{"/powerups.py": ["/screen.py", "/utils.py"], "/elements.py": ["/screen.py", "/utils.py"], "/bricks.py": ["/screen.py", "/utils.py"], "/screen.py": ["/utils.py"], "/utils.py": ["/screen.py", "/elements.py", "/bricks.py", "/powerups.py"], "/game.py": ["/utils.py"]}
47,547
psahithireddy/BrickBreaker
refs/heads/main
/utils.py
from screen import * from elements import * from colorama import Fore from bricks import * from powerups import * import random remtime=0 sidebricks=[] feltdown=0 level=0 allnbricks=[] #the_screen1=Screen(30,100) the_screen=Screen(30,100) paddle=[['=','=','=',"=","="],[' ','=','=','=',' ']] the_paddle=Paddle(paddle,...
{"/powerups.py": ["/screen.py", "/utils.py"], "/elements.py": ["/screen.py", "/utils.py"], "/bricks.py": ["/screen.py", "/utils.py"], "/screen.py": ["/utils.py"], "/utils.py": ["/screen.py", "/elements.py", "/bricks.py", "/powerups.py"], "/game.py": ["/utils.py"]}
47,548
psahithireddy/BrickBreaker
refs/heads/main
/game.py
import input import os import time #utils has screen and elements import utils from colorama import Fore,Back,Style #general info q to quit , a to left ,d to right (for paddle) #this would be the main file , so check it if __name__ == "__main__": #get input inp= input.Get() start=time.time() prin=0 ...
{"/powerups.py": ["/screen.py", "/utils.py"], "/elements.py": ["/screen.py", "/utils.py"], "/bricks.py": ["/screen.py", "/utils.py"], "/screen.py": ["/utils.py"], "/utils.py": ["/screen.py", "/elements.py", "/bricks.py", "/powerups.py"], "/game.py": ["/utils.py"]}
47,579
samcrang/project-euler
refs/heads/master
/euler/solution_005.py
def gcd(a, b): if b == 0: return a else: return gcd(b, a % b) def lcm(a, b): return int(a * b / gcd(a, b)) def answer(upper_bound): result = 1 for i in range(1, upper_bound + 1): result = lcm(result, i) return result def solution(): return answer(20)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,580
samcrang/project-euler
refs/heads/master
/tests/test_001.py
import unittest from euler.solution_001 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 233168) def test_example(self): self.assertEqual(answer(10), 23)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,581
samcrang/project-euler
refs/heads/master
/tests/test_004.py
import unittest from euler.solution_004 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 906609) def test_example(self): self.assertEqual(answer(2), 9009)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,582
samcrang/project-euler
refs/heads/master
/euler/solution_018.py
class Edge: def __init__(self, source, destination, weight): self.destination = destination self.source = source self.weight = weight class Vertex: def __init__(self, name): self.name = name class Graph: def __init__(self): self.vertices = [] self.edges = []...
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,583
samcrang/project-euler
refs/heads/master
/tests/test_007.py
import unittest from euler.solution_007 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 104743) def test_example(self): self.assertEqual(answer(6), 13)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,584
samcrang/project-euler
refs/heads/master
/euler/solution_010.py
from .helpers.prime_sieve import prime_sieve def answer(number): return sum(prime_sieve(number)) def solution(): return answer(2000000)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,585
samcrang/project-euler
refs/heads/master
/tests/test_005.py
import unittest from euler.solution_005 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 232792560) def test_example(self): self.assertEqual(answer(10), 2520)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,586
samcrang/project-euler
refs/heads/master
/tests/test_015.py
import unittest from euler.solution_015 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 137846528820) def test_example(self): self.assertEqual(answer(2, 2), 6)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,587
samcrang/project-euler
refs/heads/master
/euler/solution_007.py
from .helpers.prime_sieve import prime_sieve primes = prime_sieve(900000) def answer(position): return primes[position - 1] def solution(): return answer(10001)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,588
samcrang/project-euler
refs/heads/master
/euler/solution_015.py
import math """ We can write a path through our lattice using "N" or "E". The number of Ns is the height of the lattice, the number of Es is the width of the lattice. Every path through the same lattice has exactly the same number of Es and Ns. We can just find the number of anagrams in order to find the number of pat...
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,589
samcrang/project-euler
refs/heads/master
/tests/test_002.py
import unittest from euler.solution_002 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 4613732)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,590
samcrang/project-euler
refs/heads/master
/tests/test_006.py
import unittest from euler.solution_006 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 25164150) def test_example(self): self.assertEqual(answer(10), 2640)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,591
samcrang/project-euler
refs/heads/master
/tests/test_017.py
import unittest from euler.solution_017 import solution class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 21124)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,592
samcrang/project-euler
refs/heads/master
/euler/helpers/prime_sieve.py
import math """ https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes """ def prime_sieve(size): sieve = [True] * size sieve[0] = False sieve[1] = False i = 2 while i < math.sqrt(size): if sieve[i]: j = int(math.pow(i, 2)) k = 0 while j < size: ...
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,593
samcrang/project-euler
refs/heads/master
/euler/solution_002.py
def fib(): a, b = 1, 2 while True: yield a a, b = b, a + b def is_even(number): return number % 2 == 0 def answer(upper_bound): acc = 0 for x in fib(): if x < upper_bound: if is_even(x): acc = acc + x else: return acc def so...
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,594
samcrang/project-euler
refs/heads/master
/tests/test_016.py
import unittest from euler.solution_016 import solution class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 1366)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,595
samcrang/project-euler
refs/heads/master
/euler/solution_009.py
""" https://en.wikipedia.org/wiki/Coprime_integers#Generating_all_coprime_pairs """ def non_odd_odd_coprimes(): return coprimes(2, 1) def coprimes(m, n): queue = [] queue.append((m,n)) while True: node = queue.pop(0) m = node[0] n = node[1] branch_1 = (2 * m - n, m) ...
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,596
samcrang/project-euler
refs/heads/master
/euler/solution_012.py
from collections import Counter from functools import reduce from .helpers.prime_sieve import prime_sieve primes = prime_sieve(9000) """ https://en.wikipedia.org/wiki/Trial_division """ def trial_division(n): if n < 2: return [] prime_factors = [] for p in primes: if p*p > n: break ...
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,597
samcrang/project-euler
refs/heads/master
/euler.py
#!/usr/bin/env python3 import sys import importlib print(importlib.import_module( "euler.solution_%s" % sys.argv[1] ).solution())
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,598
samcrang/project-euler
refs/heads/master
/tests/test_003.py
import unittest from euler.solution_003 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 6857) def test_example(self): self.assertEqual(answer(13195), 29)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,599
samcrang/project-euler
refs/heads/master
/euler/solution_001.py
def divides_evenly_by_3_or_5(number): return number % 3 == 0 or number % 5 == 0 def answer(upper_bound): acc = 0 for x in range(1, upper_bound): if divides_evenly_by_3_or_5(x): acc = acc + x return acc def solution(): return answer(1000)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,600
samcrang/project-euler
refs/heads/master
/tests/test_013.py
import unittest from euler.solution_013 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 5537376230)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,601
samcrang/project-euler
refs/heads/master
/euler/solution_004.py
import math def is_palindrome(number): return str(number) == str(number)[::-1] def answer(base_10_digits): best_candidate = 0 for i in reversed(range(int(math.pow(10, base_10_digits)))): for j in reversed(range(int(math.pow(10, base_10_digits)))): candidate = i * j if is_pa...
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,602
samcrang/project-euler
refs/heads/master
/euler/solution_006.py
""" https://en.wikipedia.org/wiki/Square_pyramidal_number n(n + 1)(2n + 1) /6 """ def sum_of_squares(n): return n * (n + 1) * (2 * n + 1) / 6 """ https://en.wikipedia.org/wiki/Triangular_number """ def sum(n): return n * (n + 1) / 2 def answer(n): return int(sum(n)**2 - sum_of_squares(n)) def solution()...
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,603
samcrang/project-euler
refs/heads/master
/tests/test_067.py
import unittest from euler.solution_067 import solution, answer class TestCase(unittest.TestCase): def test_example(self): example = [\ [3], \ [7, 4], \ [2, 4, 6], \ [8, 5, 9, 3], \ ] self.assertEqual(answer(example), 23) def test_soluti...
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,604
samcrang/project-euler
refs/heads/master
/tests/test_008.py
import unittest from euler.solution_008 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 23514624000) def test_example(self): self.assertEqual(answer(4), 5832)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,605
samcrang/project-euler
refs/heads/master
/euler/solution_014.py
memo = {} def collatz(n): def _collatz(n): sequence = [] while True: n = int(n) if n in memo: sequence += memo[n] return sequence sequence.append(n) if n == 1: return sequence if n % 2 ==...
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,606
samcrang/project-euler
refs/heads/master
/tests/test_009.py
import unittest from euler.solution_009 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 31875000)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,607
samcrang/project-euler
refs/heads/master
/tests/test_011.py
import unittest from euler.solution_011 import solution, answer class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 70600674)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,608
samcrang/project-euler
refs/heads/master
/tests/test_012.py
import unittest from euler.solution_012 import solution class TestCase(unittest.TestCase): def test_solution(self): self.assertEqual(solution(), 76576500)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,609
samcrang/project-euler
refs/heads/master
/euler/solution_003.py
import math from .helpers.prime_sieve import prime_sieve def answer(number): primes = prime_sieve(int(math.sqrt(number))) for x in reversed(primes): if number % x == 0: return x def solution(): return answer(600851475143)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,610
samcrang/project-euler
refs/heads/master
/euler/solution_016.py
from functools import reduce def answer(exponent): return reduce(lambda x, y: x + int(y), str(2**exponent), 0) def solution(): return answer(1000)
{"/tests/test_001.py": ["/euler/solution_001.py"], "/tests/test_004.py": ["/euler/solution_004.py"], "/tests/test_007.py": ["/euler/solution_007.py"], "/euler/solution_010.py": ["/euler/helpers/prime_sieve.py"], "/tests/test_005.py": ["/euler/solution_005.py"], "/tests/test_015.py": ["/euler/solution_015.py"], "/euler/...
47,611
nowickam/time-series-classification
refs/heads/main
/src/utils.py
import pickle from copy import deepcopy import random def square(list): return map(lambda x: x ** 2, list) def save_obj(obj, name): with open('./drive/My Drive/AnC/' + name + '.pkl', 'wb') as f: pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL) def load_obj(name): with open('./drive/My Drive/BSc Th...
{"/main.py": ["/src/csv_reader.py", "/src/utils.py"], "/src/csv_reader.py": ["/src/config.py"]}
47,612
nowickam/time-series-classification
refs/heads/main
/main.py
import numpy as np from scipy.stats import logistic import random import math from time import time from sklearn.metrics import confusion_matrix, classification_report, accuracy_score import seaborn as sn import pandas as pd import matplotlib.pyplot as plt from src.csv_reader import read_csv, flatten_input from src.ut...
{"/main.py": ["/src/csv_reader.py", "/src/utils.py"], "/src/csv_reader.py": ["/src/config.py"]}
47,613
nowickam/time-series-classification
refs/heads/main
/src/config.py
LIGHTING_FILE = 'res/Lighting2/' FACE_FILE = 'res/FaceFour/'
{"/main.py": ["/src/csv_reader.py", "/src/utils.py"], "/src/csv_reader.py": ["/src/config.py"]}
47,614
nowickam/time-series-classification
refs/heads/main
/src/csv_reader.py
from src.config import FACE_FILE, LIGHTING_FILE import pandas as pd import numpy as np def read_csv(file_type, dataset, dimensions): """ Reads the csv, upsamples the lacking classes and returns the file divided into an input and output matrix """ global OUTPUT_NODES_NUMBER csvs = [] input = [...
{"/main.py": ["/src/csv_reader.py", "/src/utils.py"], "/src/csv_reader.py": ["/src/config.py"]}
47,615
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/plugin/hdRpr/python/generateLightSettingFiles.py
# Copyright 2020 Advanced Micro Devices, Inc # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,616
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/cmake/macros/testWrapper.py
# # Copyright 2016 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # # 6. Trademarks. T...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,617
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/plugin/hdRpr/package/generatePackage.py
# Copyright 2020 Advanced Micro Devices, Inc # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,618
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/cmake/macros/compilePython.py
# # Copyright 2016 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # # 6. Trademarks. T...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,619
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/rprUsd/devicesConfiguration.py
# Copyright 2020 Advanced Micro Devices, Inc # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,620
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py
# Copyright 2020 Advanced Micro Devices, Inc # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,621
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/plugin/hdRpr/python/houdiniDsGenerator.py
# Copyright 2020 Advanced Micro Devices, Inc # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,622
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/plugin/hdRpr/scripts/rendersettings_OnLoaded.py
import hou, re #hou.ui.displayMessage("I ran! I ran so far away!") def is_old_format_settings_node(node): # check some parms, no need to check all return node.parm('renderQuality') \ and node.parm('renderDevice') \ and node.parm('minAdaptiveSamples') \ and node.parm('maxRayDepth...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,623
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/plugin/hdRpr/usdviewMenu/rpr.py
# Copyright 2020 Advanced Micro Devices, Inc # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,624
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/cmake/macros/generateDocs.py
# # Copyright 2017 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # # 6. Trademarks. T...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,625
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/cache.py
# Copyright 2020 Advanced Micro Devices, Inc # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,626
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/plugin/hdRpr/python/generateRenderSettingFiles.py
# Copyright 2020 Advanced Micro Devices, Inc # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,627
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py
import hashlib import json import os import re import textwrap from enum import Enum from pathlib import Path from typing import Any, Callable, Collection, Dict, Tuple, Union from urllib.parse import parse_qsl, unquote, urlencode, urljoin, urlparse, urlunparse from uuid import UUID from requests import Response, Sessi...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,628
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/plugin/hdRpr/python/commonSettings.py
# Copyright 2020 Advanced Micro Devices, Inc # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,629
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/pxr/imaging/plugin/hdRpr/python/generateGeometrySettingFiles.py
# Copyright 2020 Advanced Micro Devices, Inc # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,630
GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD
refs/heads/master
/cmake/macros/shebang.py
# # Copyright 2017 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # # 6. Trademarks. T...
{"/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibrary.py": ["/pxr/imaging/plugin/rprHoudini/scripts/python/houRpr/materialLibraryClient.py"]}
47,631
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/test.py
from random import random import numpy as np import random # print(np.logical_xor([1, 1, 0, 0], [1, 0, 1, 0])) # print(1 & 0) # import networkx as nx # G = nx.Graph() # elist = [(1, 2), (2, 3), (1, 4), (4, 2), (2,1)] # G.add_edges_from(elist) # print(G[1]) # for i in G[1]: # print(i) # L = "0 0 0 0 0 0 0 0 0 0 0...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,632
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/ReadGraph.py
import networkx as nx def importGraphs(fileName): with open(fileName, 'r') as f: content = f.read().splitlines() i = 0 while (i < len(content) and content[i][0] != 'e'): i+=1 content = content[i:] content = [x.split()[1:] for x in content] edges = [(int(x[0]),int...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,633
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/cliqueAco.py
import numpy from ImportGraph import ImportGraph import matplotlib.pyplot as plt import networkx as nx import numpy as np import random import pandas as pd class AntClique: def __init__(self, G, noAnts=10, taoMax=4, taoMin=0.01, decay=0.995, iterr=3000, alpha=2): self.noAnts = noAnts s...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,634
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/GA_clique.py
import random import numpy as np import pandas as pd import networkx as nx population_size = 40 no_parents = 2 fitness = [] population = [] b_population = [] mutation_rate = 0.9 crossover_rate = 0.9 # NumOfNodes = 0 def importGs(G, fileName): with open(fileName, 'r') as f: content = f.read().splitlines(...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,635
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/testGA.py
from GA_clique import results_ga from ImportGraph import * from Visualize_Graph import * graph1fileName = "Graphs/r125.1.col.txt" graph2fileName = "Graphs/keller4.txt" G = ImportGraph(graph1fileName) maxCliqueNodes = results_ga(400, nx.to_dict_of_lists(G))[2] print("maxCliqueNodes: ",maxCliqueNodes) visualizeClique(...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,636
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/BPSO.py
from ImportGraph import ImportGraph from random import random, randint import numpy as np from LocalOptimizationFunctions import ExpandClique # Boolean Particle Swarm Optimization class BPSO: def __init__(self, numOfParticles, dimensions, fitnessFunc, maxIter, C1 = 0.6, C2 = 0.2, Omega=0.1, particleLocalOptimiz...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,637
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/ImportGraphCustom.py
import networkx as nx import matplotlib.pyplot as plt def ImportGraph(fileName): with open(fileName, 'r') as f: content = f.read().splitlines() NumOfNodes = int(content[0]) NumOfEdges = int(content[1]) # Extract Edges content = content[2:] print(content) # content...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,638
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/testBPSO.py
from BPSO import * from ImportGraph import * from Visualize_Graph import * from LocalOptimizationFunctions import ExpandExistingClique,LimitClique graph1fileName = "Graphs/r125.1.col.txt" graph2fileName = "Graphs/keller4.txt" G = ImportGraph(graph1fileName) def maxFunc(array): return maxCliqueFitness(array,G) ...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,639
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/ImportGraph.py
import networkx as nx def ImportGraph(fileName): with open(fileName, 'r') as f: content = f.read().splitlines() # Extract Number of Nodes for line in content: if line[0] == "p": NumOfNodes = int(line.split()[2]) break # Extract Edges i = 0 while (i < ...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,640
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/Visualize_Graph.py
import networkx as nx import matplotlib.pyplot as plt def visualizeClique(graph,cliqueNodes,graphName = None): node_colors = [] for i in range(1,graph.number_of_nodes()+1): if i in cliqueNodes: node_colors.append("red") else: node_colors.append("blue") nx.draw...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,641
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/LocalOptimizationFunctions.py
import random import numpy as np def ExpandClique(Chrom,G): #Chrom is a vector with binary values nodes = [] for i in range(len(Chrom)): if Chrom[i] == 1: nodes.append(i+1) if (sum(nodes) != 0): k = nodes.pop(random.randrange(len(nodes))) else: k = random.rand...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,642
rabeeaatif/Maximum-Clique-Solved-through-Evolutionary-Algorithms
refs/heads/main
/Performance.py
import networkx import csv import pandas as pd import numpy as np import matplotlib.pyplot as plt import os from BPSO import * from GA_clique import * from cliqueAco import results_aco from ImportGraph import * from Visualize_Graph import * from LocalOptimizationFunctions import ExpandExistingClique,LimitCl...
{"/cliqueAco.py": ["/ImportGraph.py"], "/testGA.py": ["/GA_clique.py", "/ImportGraph.py", "/Visualize_Graph.py"], "/BPSO.py": ["/ImportGraph.py", "/LocalOptimizationFunctions.py"], "/testBPSO.py": ["/BPSO.py", "/ImportGraph.py", "/Visualize_Graph.py", "/LocalOptimizationFunctions.py"], "/Performance.py": ["/BPSO.py", "...
47,698
dfana01/pbx-dashboard
refs/heads/master
/app/config.py
import os class BaseConfig(object): SITE_NAME = 'Dashboard-PBX' SECRET_KEY = os.environ.get('SECRET_KEY', 'Gox0Agv8KS') MYSQL_DATABASE_USER = 'pbx-dashboard' MYSQL_DATABASE_PASSWORD = 'password' MYSQL_DATABASE_DB = 'asteriskcdrdb' MYSQL_DATABASE_HOST = 'pbx.dfb.com.do' SQLALCHEMY_TRACK_M...
{"/app/__init__.py": ["/app/extensions.py"], "/run.py": ["/app/__init__.py"]}
47,699
dfana01/pbx-dashboard
refs/heads/master
/app/extensions.py
from flask_restless import APIManager from flask_assets import Environment from flask_marshmallow import Marshmallow from flask_socketio import SocketIO from flask_sqlalchemy import SQLAlchemy api = APIManager() assets = Environment() ma = Marshmallow() sk = SocketIO() db = SQLAlchemy()
{"/app/__init__.py": ["/app/extensions.py"], "/run.py": ["/app/__init__.py"]}
47,700
dfana01/pbx-dashboard
refs/heads/master
/app/__init__.py
from app import config as app_config from app.extensions import api, ma, sk, db from sqlalchemy import func, desc from sqlalchemy.sql import label from flask import Flask, render_template, jsonify from threading import Thread, Event from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker thread = ...
{"/app/__init__.py": ["/app/extensions.py"], "/run.py": ["/app/__init__.py"]}