index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
87,540
Lasoko/gr3PSI
refs/heads/master
/cw2/zad7.py
def reverse(word): #return word[len(word)::-1] return word[::-1] a = "pieseł i koteł" print(a + " -> " + reverse(a))
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,541
Lasoko/gr3PSI
refs/heads/master
/cw1/Zadanie5.py
imie = "Cezary" nazwisko = "Dobrenko" print(nazwisko[::-1] + " " + imie[::-1])
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,542
Lasoko/gr3PSI
refs/heads/master
/cw3/Schronisko_Dla_Zwierzat/Schronisko/migrations/0013_remove_pracownik_autor.py
# Generated by Django 3.0.2 on 2020-01-30 17:02 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('Schronisko', '0012_auto_20200130_1753'), ] operations = [ migrations.RemoveField( model_name='pracownik', name='autor', ...
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,543
Lasoko/gr3PSI
refs/heads/master
/cw2/zad4.py
def temp_converter(temperature_type, temperature): temperature_type = str.capitalize(temperature_type) if temperature_type == "Fahrenheit": return round(32.00 + 1.8 * temperature, 2) elif temperature_type == "Rankine": return round(1.8 * (temperature + 273.15), 2) elif temperature_type =...
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,544
Lasoko/gr3PSI
refs/heads/master
/cw1/Zadanie4.py
zmienna_typu_string = "dlaczego ja?" print(dir(zmienna_typu_string)) help(zmienna_typu_string.isupper())
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,545
Lasoko/gr3PSI
refs/heads/master
/cw1/zad3.py
print('{:>20}'.format('prawa')) print('{:_<20}'.format('lewa')) print('{:^20}'.format('srodek')) print('{:.{prec}} = {:.{prec}f}'.format('wartosc',3.12461, prec=4)) tab = [11,31,22,-16,5] print('{t[1]} {t[3]} {t[4]}'.format(t=tab))
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,546
Lasoko/gr3PSI
refs/heads/master
/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py
from rest_framework import serializers from .models import * from django.contrib.auth.models import User class UserSerializer(serializers.ModelSerializer): pracownicy = serializers.PrimaryKeyRelatedField(many=True, queryset=Pracownik.objects.all()) class Meta: model = User fields = ['id', 'us...
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,547
Lasoko/gr3PSI
refs/heads/master
/cw3/Schronisko_Dla_Zwierzat/Schronisko/migrations/0010_remove_zwierze_autor.py
# Generated by Django 3.0.2 on 2020-01-30 16:33 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('Schronisko', '0009_auto_20200130_1730'), ] operations = [ migrations.RemoveField( model_name='zwierze', name='autor', ...
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,548
Lasoko/gr3PSI
refs/heads/master
/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py
from django.db import models class Typ_Umowy(models.Model): STANOWISKO_CHOICES = ( ('OPIEKUN', 'opiekun'), ('WETERYNARZ', 'weterynarz'), ('ADMINISTRACJA', 'administracja'), ('PREZES', 'prezes'), ) stanowisko = models.CharField(max_length=13, choices=STANOWISKO_CHOICES) ...
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,549
Lasoko/gr3PSI
refs/heads/master
/cw1/zad10.py
telefony = [511234599,509148787,599878123,509148787,741880200,511234599] print(telefony) telefony = set(telefony) print(telefony)
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,550
Lasoko/gr3PSI
refs/heads/master
/cw1/Zadanie6.py
thislist = [] for i in range(10): thislist.append(i+1) print(thislist) thislist2 = thislist[5:10] thislist = thislist[0:5] print(thislist) print(thislist2)
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,551
Lasoko/gr3PSI
refs/heads/master
/cw3/Schronisko_Dla_Zwierzat/Schronisko/migrations/0006_auto_20200130_1619.py
# Generated by Django 3.0.2 on 2020-01-30 15:19 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('Schronisko', '0005_auto_20200130_1618'), ] operations = [ migrations.RemoveField( model_name='boks', name='owner', )...
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,552
Lasoko/gr3PSI
refs/heads/master
/cw3/Schronisko_Dla_Zwierzat/Schronisko/urls.py
from django.urls import path from . import views urlpatterns = [ path('index', views.index, name='index'), path('users/', views.UserList.as_view()), path('users/<int:pk>', views.UserDetail.as_view()), path('pracownicy/', views.PracownikLista.as_view(), name='pracownik'), path('pracownicy/<int:pk>',...
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,553
Lasoko/gr3PSI
refs/heads/master
/cw1/Zadanie9.py
student1 = (145881,"Cezary","Dobreńko") student2 = (145882,"Marcin","Gałązka") student3 = (145883,"Patryk","Konopko") student4 = (145884,"Artur","Dymkowski") student5 = (145885,"Zygmunt","Hajzer") lista_studentow = [student1,student2,student3,student4,student5] slownik = dict([ (student1[0], {"imie": student1[1],"n...
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,554
Lasoko/gr3PSI
refs/heads/master
/cw2/zad5.py
class Calculator: @staticmethod def add(liczba1, liczba2): return liczba1 + liczba2 @staticmethod def difference(liczba1, liczba2): return liczba1 - liczba2 @staticmethod def multiply(liczba1, liczba2): return liczba1 * liczba2 @staticmethod def divide(liczba1,...
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,555
Lasoko/gr3PSI
refs/heads/master
/cw3/Schronisko_Dla_Zwierzat/Schronisko/apps.py
from django.apps import AppConfig class SchroniskoConfig(AppConfig): name = 'Schronisko'
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,556
Lasoko/gr3PSI
refs/heads/master
/cw1/Zadanie7.py
thislist = [] for i in range(10): thislist.append(i+1) print(thislist) thislist2 = thislist[5:10] thislist = thislist[0:5] thislist = thislist + thislist2 thislist.insert(0,0) print(thislist)
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,557
Lasoko/gr3PSI
refs/heads/master
/cw1/zad2.py
imie = "Krzysztof" nazwisko = "Laskowski" litera_1=imie[1] litera_2=nazwisko[2] l1=imie.count(litera_1) l2=nazwisko.count(litera_2) print("Ilość liter " + litera_1 + " w imieniu wynosi: " + str(l1) + ", a ilość liter " + litera_2 + " w nazwisku: " + str(l2))
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,558
Lasoko/gr3PSI
refs/heads/master
/cw1/zad12.py
for i in range(100,19,-5): print(i)
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,559
Lasoko/gr3PSI
refs/heads/master
/cw2/zad2.py
def fun(data_text): return dict({"length": len(data_text), #"length": data_text.count('') - 1, "letters": list(data_text), "big_letters": data_text.upper(), "small_letters": data_text.lower()}) print(fun("Przykladowy tekst"))
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,560
Lasoko/gr3PSI
refs/heads/master
/cw2/zad6.py
from cw2 import zad5 class ScienceCalculator(zad5.Calculator): @staticmethod def power(liczba1, liczba2): return liczba1 ** liczba2 @staticmethod def modulo(liczba1, liczba2): return liczba1 % liczba2 print(ScienceCalculator.multiply(-4, -6)) print(ScienceCalculator.power(2, -2)) prin...
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,561
Lasoko/gr3PSI
refs/heads/master
/cw2/zad3.py
def fun(text,letter): return text.replace(letter, '') print(fun("Dluzszy przykladowy tekst do usuniecia liter",'s'))
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,562
Lasoko/gr3PSI
refs/heads/master
/cw3/Schronisko_Dla_Zwierzat/Schronisko/migrations/0005_auto_20200130_1618.py
# Generated by Django 3.0.2 on 2020-01-30 15:18 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), ('Schronisko', '0004_auto_...
{"/cw3/Schronisko_Dla_Zwierzat/Schronisko/views.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py", "/cw3/Schronisko_Dla_Zwierzat/Schronisko/serializers.py"], "/cw2/file_test.py": ["/cw2/file.py"], "/cw3/Schronisko_Dla_Zwierzat/Schronisko/admin.py": ["/cw3/Schronisko_Dla_Zwierzat/Schronisko/models.py"], "/cw3/Sc...
87,563
BCV-Uniandes/BCVbrats
refs/heads/master
/settings.py
class gb(object): # Paths LOGDIR = '/TRAIN/model/' outpath = '/TEST/val/' impath = '/Paths/Train/' testpath = '/Paths/Test/' # Set variables learning_rate = 0.0001 lr_decay = [3,6,9,12,15] num_epochs = 15 sub_epochs = 20 batch_size = 10 factor = 100 # Number of patients per epoch patches_per_patient = ...
{"/Create_model.py": ["/settings.py"]}
87,564
BCV-Uniandes/BCVbrats
refs/heads/master
/main.py
# -*- coding: utf-8 -*- import os import tensorflow as tf import numpy as np import scipy.io import pdb import random import argparse from settings import gb from Create_model import * from Read_data import * from operator import itemgetter import sys def train(mode,load): with tf.Graph().as_default(): hparam = m...
{"/Create_model.py": ["/settings.py"]}
87,565
BCV-Uniandes/BCVbrats
refs/heads/master
/Read_data.py
# -*- coding: utf-8 -*- import os import tensorflow as tf import numpy as np import scipy.io import pdb import random import itertools from settings import gb from Create_model import * from scipy.ndimage.interpolation import zoom import nibabel as nib import time import ConfigParser def get_list(mode): filenames = [...
{"/Create_model.py": ["/settings.py"]}
87,566
BCV-Uniandes/BCVbrats
refs/heads/master
/Create_model.py
# -*- coding: utf-8 -*- import os import tensorflow as tf import numpy as np import scipy.io import pdb import math from settings import gb # Convolutional layer (Dropout: 2%) def conv_layer(input_v, size_in, size_out, name="conv"): with tf.name_scope(name): w = tf.Variable(tf.truncated_normal([3, 3, 3, size_in, si...
{"/Create_model.py": ["/settings.py"]}
87,604
Zhang563/ttt
refs/heads/master
/ultimateGUI.py
import tictactoe import random import minimax from graphics import * def evalFn(gameState): return float('inf')*gameState.getWinner() + sum(sum(wins) for wins in gameState.getMiniWins()) # clicking the Step button will check to see if a legal move was made def getButtonClick(window): window.update() # flus...
{"/run.py": ["/tictactoe.py", "/minimax.py", "/mcts.py", "/DQNagent.py", "/randomAgent.py", "/hybridAgent.py"], "/randomAgent.py": ["/tictactoe.py"], "/minimax.py": ["/tictactoe.py"], "/hybridAgent.py": ["/tictactoe.py", "/minimax.py", "/mcts.py"], "/mcts.py": ["/tictactoe.py"], "/DQNagent.py": ["/tictactoe.py"]}
87,605
Zhang563/ttt
refs/heads/master
/run.py
import tictactoe import random from minimax import AlphaBetaAgent from mcts import MCTSagent from DQNagent import DQNagent from randomAgent import RandomAgent from hybridAgent import HybridAgent import time agentNames = ['Random', 'Minimax', 'MCTS', 'DQN', 'Hybrid'] agents = [RandomAgent(), AlphaBetaAgent(depth=2), ...
{"/run.py": ["/tictactoe.py", "/minimax.py", "/mcts.py", "/DQNagent.py", "/randomAgent.py", "/hybridAgent.py"], "/randomAgent.py": ["/tictactoe.py"], "/minimax.py": ["/tictactoe.py"], "/hybridAgent.py": ["/tictactoe.py", "/minimax.py", "/mcts.py"], "/mcts.py": ["/tictactoe.py"], "/DQNagent.py": ["/tictactoe.py"]}
87,606
Zhang563/ttt
refs/heads/master
/randomAgent.py
import tictactoe class RandomAgent(): def getAction(self, gameState): return gameState.getRandomMove()
{"/run.py": ["/tictactoe.py", "/minimax.py", "/mcts.py", "/DQNagent.py", "/randomAgent.py", "/hybridAgent.py"], "/randomAgent.py": ["/tictactoe.py"], "/minimax.py": ["/tictactoe.py"], "/hybridAgent.py": ["/tictactoe.py", "/minimax.py", "/mcts.py"], "/mcts.py": ["/tictactoe.py"], "/DQNagent.py": ["/tictactoe.py"]}
87,607
Zhang563/ttt
refs/heads/master
/minimax.py
import tictactoe import random # This evaluation function takes up the number of mini wins of 'x' minus # the number of mini wins of 'o' class AlphaBetaAgent(): def __init__(self, evalFn = None, depth = 3): self.index = 0 self.depth = depth def evaluationFunction(self, gameState): return float('inf')*gameSta...
{"/run.py": ["/tictactoe.py", "/minimax.py", "/mcts.py", "/DQNagent.py", "/randomAgent.py", "/hybridAgent.py"], "/randomAgent.py": ["/tictactoe.py"], "/minimax.py": ["/tictactoe.py"], "/hybridAgent.py": ["/tictactoe.py", "/minimax.py", "/mcts.py"], "/mcts.py": ["/tictactoe.py"], "/DQNagent.py": ["/tictactoe.py"]}
87,608
Zhang563/ttt
refs/heads/master
/hybridAgent.py
import tictactoe from minimax import AlphaBetaAgent from mcts import MCTSagent class HybridAgent: def __init__(self): self.mcts = MCTSagent(itermax=15, agent=AlphaBetaAgent(depth=1)) def getAction(self, gameState): return self.mcts.getAction(gameState)
{"/run.py": ["/tictactoe.py", "/minimax.py", "/mcts.py", "/DQNagent.py", "/randomAgent.py", "/hybridAgent.py"], "/randomAgent.py": ["/tictactoe.py"], "/minimax.py": ["/tictactoe.py"], "/hybridAgent.py": ["/tictactoe.py", "/minimax.py", "/mcts.py"], "/mcts.py": ["/tictactoe.py"], "/DQNagent.py": ["/tictactoe.py"]}
87,609
Zhang563/ttt
refs/heads/master
/tictactoe.py
import random, copy import numpy as np # Player -1 is o, +1 is x class Game: def __init__(self, dim=3): self.dim = dim self.board = np.zeros((self.dim**2, self.dim**2)) self.miniWins = np.zeros((self.dim, self.dim)) self.currPlayer = -1 + 2*random.randint(0,1) self.validMoves = [(x,y) for x in range(self.di...
{"/run.py": ["/tictactoe.py", "/minimax.py", "/mcts.py", "/DQNagent.py", "/randomAgent.py", "/hybridAgent.py"], "/randomAgent.py": ["/tictactoe.py"], "/minimax.py": ["/tictactoe.py"], "/hybridAgent.py": ["/tictactoe.py", "/minimax.py", "/mcts.py"], "/mcts.py": ["/tictactoe.py"], "/DQNagent.py": ["/tictactoe.py"]}
87,610
Zhang563/ttt
refs/heads/master
/mcts.py
import random, copy, math, collections import tictactoe class Node: def __init__(self, move=None, parent=None, state=tictactoe.Game(), agent=None): self.move = move # the move that got us to this node self.parentNode = parent self.childNodes = [] self.wins = 0 self.visits = 0 self.state = state self.age...
{"/run.py": ["/tictactoe.py", "/minimax.py", "/mcts.py", "/DQNagent.py", "/randomAgent.py", "/hybridAgent.py"], "/randomAgent.py": ["/tictactoe.py"], "/minimax.py": ["/tictactoe.py"], "/hybridAgent.py": ["/tictactoe.py", "/minimax.py", "/mcts.py"], "/mcts.py": ["/tictactoe.py"], "/DQNagent.py": ["/tictactoe.py"]}
87,611
Zhang563/ttt
refs/heads/master
/DQNagent.py
import numpy as np from keras.models import Sequential, Model from keras import layers from keras import optimizers import collections, random import tictactoe class DQNagent: def __init__(self, dim=3): self.state_size = (dim**2, dim**2, 4) self.memory = collections.deque(maxlen=2000) self.gamma = 0.95 # dis...
{"/run.py": ["/tictactoe.py", "/minimax.py", "/mcts.py", "/DQNagent.py", "/randomAgent.py", "/hybridAgent.py"], "/randomAgent.py": ["/tictactoe.py"], "/minimax.py": ["/tictactoe.py"], "/hybridAgent.py": ["/tictactoe.py", "/minimax.py", "/mcts.py"], "/mcts.py": ["/tictactoe.py"], "/DQNagent.py": ["/tictactoe.py"]}
87,612
ianket/AcronisAPI
refs/heads/master
/setup.py
import setuptools setuptools.setup( name="SystemecAcronisAPI", version="1.0", description="Acronis API integration for Systemec", url="https://github.com/ianket/AcronisAPI", packages=setuptools.find_packages(), classifiers=[ 'Programming Language :: Python', 'Programming Languag...
{"/acronis/__init__.py": ["/acronis/acronis.py"]}
87,613
ianket/AcronisAPI
refs/heads/master
/acronis/__init__.py
from acronis.acronis import Acronis
{"/acronis/__init__.py": ["/acronis/acronis.py"]}
87,614
ianket/AcronisAPI
refs/heads/master
/acronis/acronis.py
import requests class Acronis: def __init__(self, url, username, password): self._url = url self._username = username self._password = password def _get_auth_headers(self): payload = dict(grant_type='password', scope='openid') payload.update( dict( ...
{"/acronis/__init__.py": ["/acronis/acronis.py"]}
87,654
Biuku/KNN_Game
refs/heads/master
/arr.py
""" April 22, 2021 """ import pygame import numpy as np from setup.settings import Settings class Arr: def __init__(self): pygame.init() self.set = Settings() self.origin_gap_left = 0.07 + self.set.border_gap## lower = left self.origin_gap_bottom = 0.12 + self.set.border_gap ## ...
{"/algo.py": ["/setup/printr.py", "/arr.py", "/draw.py"], "/draw.py": ["/setup/printr.py"], "/main.py": ["/algo.py"]}
87,655
Biuku/KNN_Game
refs/heads/master
/algo.py
""" April 24, 2021 """ import pygame import math as m import numpy as np from setup.printr import Printr from arr import Arr from draw import Draw class Algo(Arr): def __init__(self, win): super().__init__() pygame.init() self.win = win self.printr = Printr(self.win) self...
{"/algo.py": ["/setup/printr.py", "/arr.py", "/draw.py"], "/draw.py": ["/setup/printr.py"], "/main.py": ["/algo.py"]}
87,656
Biuku/KNN_Game
refs/heads/master
/draw.py
""" April 24, 2021 """ import pygame from setup.settings import Settings from setup.printr import Printr class Draw: def __init__(self, win, pixels): pygame.init() self.win = win self.printr = Printr(self.win) self.set = Settings() self.pixels = pixels self.c0 =...
{"/algo.py": ["/setup/printr.py", "/arr.py", "/draw.py"], "/draw.py": ["/setup/printr.py"], "/main.py": ["/algo.py"]}
87,657
Biuku/KNN_Game
refs/heads/master
/main.py
""" APRIL 22, 2021 """ import pygame from setup.settings import Settings from setup.pygameBasics import PygameBasics from algo import Algo class Main(PygameBasics): def __init__(self): pygame.init() super().__init__() self.win_w, self.win_h = 1600, 900 self.win = pygame.display....
{"/algo.py": ["/setup/printr.py", "/arr.py", "/draw.py"], "/draw.py": ["/setup/printr.py"], "/main.py": ["/algo.py"]}
87,658
Biuku/KNN_Game
refs/heads/master
/setup/printr.py
""" April 20, 2021 """ import pygame import math as m import random as r from setup.settings import Settings class Printr: def __init__(self, win): pygame.init() self.win = win self.set = Settings() def coord_printr(self, data, x, y, c): text = self.set.small_font.render(dat...
{"/algo.py": ["/setup/printr.py", "/arr.py", "/draw.py"], "/draw.py": ["/setup/printr.py"], "/main.py": ["/algo.py"]}
87,692
WRansohoff/STM32_viz_gen
refs/heads/master
/latex_strs.py
# Define some common strings for the LaTeX table files. doc_start = ''' \\documentclass{article} \\usepackage{multirow} \\usepackage[table]{xcolor} \\usepackage{tikz} \\usepackage{tgheros} % The default underscores are very short :/ \\renewcommand{\\_}[0]{\\rule{5pt}{1pt}} % Use sans-serif font by default. \\renewcomm...
{"/pin_ingest.py": ["/latex_strs.py"]}
87,693
WRansohoff/STM32_viz_gen
refs/heads/master
/pin_ingest.py
#!/usr/bin/python3 import math import latex_strs from latex_strs import * import re import subprocess import sys # Make sure there are the right number of arguments. # TODO: Check formatting etc. if not len( sys.argv ) == 3: print( "Usage: python3 pin_ingest.py <file.txt> <pin_column>" ) sys.exit( 1 ) # Gather a...
{"/pin_ingest.py": ["/latex_strs.py"]}
87,694
WRansohoff/STM32_viz_gen
refs/heads/master
/pin_extract.py
#!/usr/bin/python3 import re import subprocess import sys # Make sure there are the right number of arguments. # TODO: Check formatting etc. if not len( sys.argv ) == 2: print( "Usage: python3 pin_extract.py <datasheet.pdf>" ) sys.exit( 1 ) # Run 'pdftotext' on the datasheet. txt_fn = sys.argv[ 1 ].replace( ".pd...
{"/pin_ingest.py": ["/latex_strs.py"]}
87,695
wazdar/ggpy
refs/heads/master
/usr.py
from msgserv import User import argparse def parse_args(): """ Parsuje parametry z wiersza poleceń. :return: obiekt (jak słownik) args, zawierający zdekodowane parametry """ parser = argparse.ArgumentParser(description="User management tool for the messaging system") parser.add_argum...
{"/usr.py": ["/msgserv/__init__.py"], "/msgserv/message.py": ["/msgserv/db.py", "/msgserv/user.py"], "/msgserv/__init__.py": ["/msgserv/user.py", "/msgserv/message.py"], "/msg.py": ["/msgserv/__init__.py"], "/msgserv/user.py": ["/msgserv/db.py"]}
87,696
wazdar/ggpy
refs/heads/master
/msgserv/db.py
import psycopg2 cnx = None def connection(): global cnx if not cnx: cnx = psycopg2.connect( dbname="ggpy", user="postgres", password="coderslab", host="localhost" ) return cnx def cursor(): return connection().cursor(...
{"/usr.py": ["/msgserv/__init__.py"], "/msgserv/message.py": ["/msgserv/db.py", "/msgserv/user.py"], "/msgserv/__init__.py": ["/msgserv/user.py", "/msgserv/message.py"], "/msg.py": ["/msgserv/__init__.py"], "/msgserv/user.py": ["/msgserv/db.py"]}
87,697
wazdar/ggpy
refs/heads/master
/msgserv/message.py
from .db import cursor, commit from .user import User from datetime import datetime class Message: def __init__(self): """ Atrybuty każdego obiektu wiadomości: id (int) from_user (User) to_user (User) date_sent (datetime) contents (str) ...
{"/usr.py": ["/msgserv/__init__.py"], "/msgserv/message.py": ["/msgserv/db.py", "/msgserv/user.py"], "/msgserv/__init__.py": ["/msgserv/user.py", "/msgserv/message.py"], "/msg.py": ["/msgserv/__init__.py"], "/msgserv/user.py": ["/msgserv/db.py"]}
87,698
wazdar/ggpy
refs/heads/master
/msgserv/__init__.py
from .user import * from .message import *
{"/usr.py": ["/msgserv/__init__.py"], "/msgserv/message.py": ["/msgserv/db.py", "/msgserv/user.py"], "/msgserv/__init__.py": ["/msgserv/user.py", "/msgserv/message.py"], "/msg.py": ["/msgserv/__init__.py"], "/msgserv/user.py": ["/msgserv/db.py"]}
87,699
wazdar/ggpy
refs/heads/master
/msg.py
from msgserv import Message, User import argparse def parse_args(): """ Parsuje parametry z wiersza poleceń. :return: obiekt (jak słownik) args, zawierający zdekodowane parametry """ parser = argparse.ArgumentParser(description="User management tool for the messaging system") parser.ad...
{"/usr.py": ["/msgserv/__init__.py"], "/msgserv/message.py": ["/msgserv/db.py", "/msgserv/user.py"], "/msgserv/__init__.py": ["/msgserv/user.py", "/msgserv/message.py"], "/msg.py": ["/msgserv/__init__.py"], "/msgserv/user.py": ["/msgserv/db.py"]}
87,700
wazdar/ggpy
refs/heads/master
/msgserv/user.py
from .db import cursor, commit from .clcrypto import password_hash, check_password class User: def __init__(self): self.__id = -1 self.name = "" self.__hashed_pass = "" @property def id(self): return self.__id @property def password(self): ...
{"/usr.py": ["/msgserv/__init__.py"], "/msgserv/message.py": ["/msgserv/db.py", "/msgserv/user.py"], "/msgserv/__init__.py": ["/msgserv/user.py", "/msgserv/message.py"], "/msg.py": ["/msgserv/__init__.py"], "/msgserv/user.py": ["/msgserv/db.py"]}
87,701
bellyfat/woo-sy-app
refs/heads/master
/app/models.py
from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from app import db from app import login from sqlalchemy.dialects.postgresql import JSON @login.user_loader def load_user(user_id): return User.query.get(int(user_id)) class User(UserMixin, db.Model): ...
{"/app/models.py": ["/app/__init__.py"], "/app/routes.py": ["/app/__init__.py", "/app/models.py"]}
87,702
bellyfat/woo-sy-app
refs/heads/master
/app/__init__.py
from flask import Flask from config import Config from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_bootstrap import Bootstrap from flask_login import LoginManager from rq import Queue from worker import conn app = Flask(__name__) app.config.from_object(Config) bootstrap = Bootstrap...
{"/app/models.py": ["/app/__init__.py"], "/app/routes.py": ["/app/__init__.py", "/app/models.py"]}
87,703
bellyfat/woo-sy-app
refs/heads/master
/app/routes.py
from app import app, db, q from app.forms import RegistrationForm, WoosyListingFromEtsyForm import flask import json from copy import copy from flask import flash, redirect, render_template, jsonify, Markup from urllib.parse import urlparse from urllib.parse import urljoin from flask import request, url_for from flask_...
{"/app/models.py": ["/app/__init__.py"], "/app/routes.py": ["/app/__init__.py", "/app/models.py"]}
87,704
yujinrobot/roscreate
refs/heads/master
/src/roscreate2/utils.py
############################################################################## # Utilities ############################################################################## import os import re from optparse import OptionParser import rospkg ################## # Author ################## def author_name(): """ U...
{"/src/roscreate2/__init__.py": ["/src/roscreate2/qtcreate.py", "/src/roscreate2/roscreate.py", "/src/roscreate2/cpproscreate.py", "/src/roscreate2/commscreate.py", "/src/roscreate2/stackcreate.py"]}
87,705
yujinrobot/roscreate
refs/heads/master
/src/roscreate2/stackcreate.py
import os import shutil import utils ############################################################################## # Template ############################################################################## def get_text_templates(): template_dir = os.path.join(os.path.dirname(__file__),'templates','stack') t...
{"/src/roscreate2/__init__.py": ["/src/roscreate2/qtcreate.py", "/src/roscreate2/roscreate.py", "/src/roscreate2/cpproscreate.py", "/src/roscreate2/commscreate.py", "/src/roscreate2/stackcreate.py"]}
87,706
yujinrobot/roscreate
refs/heads/master
/src/roscreate2/roscreate.py
import os import shutil import utils ############################################################################## # Template ############################################################################## def get_ros_text_templates(type): template_common_dir = os.path.join(os.path.dirname(__file__),'templates',...
{"/src/roscreate2/__init__.py": ["/src/roscreate2/qtcreate.py", "/src/roscreate2/roscreate.py", "/src/roscreate2/cpproscreate.py", "/src/roscreate2/commscreate.py", "/src/roscreate2/stackcreate.py"]}
87,707
yujinrobot/roscreate
refs/heads/master
/src/roscreate2/__init__.py
__version__ = '0.1.10' from .qtcreate import create_qt_ros_package from .roscreate import create_ros_package from .cppcreate import create_cpp_package from .cpproscreate import create_cpp_ros_package from .commscreate import create_comms_package from .stackcreate import create_stack
{"/src/roscreate2/__init__.py": ["/src/roscreate2/qtcreate.py", "/src/roscreate2/roscreate.py", "/src/roscreate2/cpproscreate.py", "/src/roscreate2/commscreate.py", "/src/roscreate2/stackcreate.py"]}
87,708
yujinrobot/roscreate
refs/heads/master
/src/roscreate2/commscreate.py
import os import utils ############################################################################## # Template ############################################################################## def get_text_templates(package, type): template_common_dir = os.path.join(os.path.dirname(__file__),'templates','common')...
{"/src/roscreate2/__init__.py": ["/src/roscreate2/qtcreate.py", "/src/roscreate2/roscreate.py", "/src/roscreate2/cpproscreate.py", "/src/roscreate2/commscreate.py", "/src/roscreate2/stackcreate.py"]}
87,709
yujinrobot/roscreate
refs/heads/master
/src/roscreate2/cpproscreate.py
import os import shutil import utils ############################################################################## # Template ############################################################################## def get_templates(package): template_common_dir = os.path.join(os.path.dirname(__file__),'templates','commo...
{"/src/roscreate2/__init__.py": ["/src/roscreate2/qtcreate.py", "/src/roscreate2/roscreate.py", "/src/roscreate2/cpproscreate.py", "/src/roscreate2/commscreate.py", "/src/roscreate2/stackcreate.py"]}
87,710
yujinrobot/roscreate
refs/heads/master
/src/roscreate2/qtcreate.py
import os import shutil import utils ############################################################################## # Template ############################################################################## def get_qt_text_templates(package, type): template_common_dir = os.path.join(os.path.dirname(__file__),'tem...
{"/src/roscreate2/__init__.py": ["/src/roscreate2/qtcreate.py", "/src/roscreate2/roscreate.py", "/src/roscreate2/cpproscreate.py", "/src/roscreate2/commscreate.py", "/src/roscreate2/stackcreate.py"]}
87,711
yujinrobot/roscreate
refs/heads/master
/setup.py
from distutils.core import setup import sys sys.path.insert(0, 'src') from roscreate2 import __version__ setup(name='roscreate', version= __version__, packages=['roscreate2'], package_dir = {'':'src'}, scripts = ["scripts/roscreate-pkg","scripts/roscreate-catkin-pkg","scripts/roscreate-legacy...
{"/src/roscreate2/__init__.py": ["/src/roscreate2/qtcreate.py", "/src/roscreate2/roscreate.py", "/src/roscreate2/cpproscreate.py", "/src/roscreate2/commscreate.py", "/src/roscreate2/stackcreate.py"]}
87,713
Gab-D-G/python_FC_pkg
refs/heads/master
/fc_utils.py
import numpy as np def cumul(n): if n == 0: return 0 else: return n + cumul(n-1) def compute_zscores(array): #takes 2D array t*n, and returns n*n z-transformed correlation matrix r=np.corrcoef(np.transpose(array)) np.fill_diagonal(r, 0.5) z=0.5*np.log((1+r)/(1-r)) np.fill_d...
{"/eval_cluster_stability.py": ["/clustering.py"]}
87,714
Gab-D-G/python_FC_pkg
refs/heads/master
/hierarchical_clustering.py
from scipy import io sFNC=io.loadmat('mat_files/matrix_sFNC.mat') '''https://joernhees.de/blog/2015/08/26/scipy-hierarchical-clustering-and-dendrogram-tutorial/ ''' from matplotlib import pyplot as plt from scipy.cluster.hierarchy import dendrogram, linkage import numpy as np Z = linkage(X, 'average') # some setti...
{"/eval_cluster_stability.py": ["/clustering.py"]}
87,715
Gab-D-G/python_FC_pkg
refs/heads/master
/eval_cluster_stability.py
import os import sys input_data=sys.argv[1] low_k=int(sys.argv[2]) high_k=int(sys.argv[3]) cluster_range=[low_k,high_k] num_iter=int(sys.argv[4]) kmeans_n_init=int(sys.argv[5]) resampling_prop=float(sys.argv[6]) analysis=sys.argv[7] #specify a static or dynamic analysis verbose=sys.argv[8] out_path=os.path.abspath(sys...
{"/eval_cluster_stability.py": ["/clustering.py"]}
87,716
Gab-D-G/python_FC_pkg
refs/heads/master
/wavelet_analysis.py
import pycwt from python_FC_pkg import fc_utils, clustering import numpy as np def mean_resultant_length(angle_vector): #functions are taken from the circular data analysis chapter C=np.sum(np.cos(angle_vector)) S=np.sum(np.sin(angle_vector)) return np.sqrt(C**2+S**2)/len(angle_vector) def circular_s...
{"/eval_cluster_stability.py": ["/clustering.py"]}
87,717
Gab-D-G/python_FC_pkg
refs/heads/master
/clustering.py
#!/usr/bin/env python3 import os from sklearn.cluster import KMeans import sys cur=os.path.abspath('') sys.path.insert(0, cur) from python_FC_pkg import fc_utils import numpy as np import pickle def save_obj(obj, name ): with open(name + '.pkl', 'wb') as f: pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL) de...
{"/eval_cluster_stability.py": ["/clustering.py"]}
87,731
ivssh/contact_book
refs/heads/master
/main_app/views.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from serializers import ContactBookSerializer from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from django.http import HttpResponse from django.utils.decorators import method_decorator from rest_framew...
{"/contact_book/urls.py": ["/main_app/views.py"]}
87,732
ivssh/contact_book
refs/heads/master
/contact_book/urls.py
"""contact_book URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cla...
{"/contact_book/urls.py": ["/main_app/views.py"]}
87,733
ivssh/contact_book
refs/heads/master
/main_app/tests.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.exceptions import ValidationError from models import Contact from django.test import TestCase # Create your tests here. class ContactTestCase(TestCase): def test_contact(self): self.contact = Contact.objects.create( ...
{"/contact_book/urls.py": ["/main_app/views.py"]}
87,734
ivssh/contact_book
refs/heads/master
/main_app/serializers.py
from rest_framework import serializers from models import Contact class ContactBookSerializer(serializers.ModelSerializer): class Meta: model = Contact fields = '__all__'
{"/contact_book/urls.py": ["/main_app/views.py"]}
87,735
ivssh/contact_book
refs/heads/master
/contact_book/views.py
from django.http import HttpResponse from django.views import View class Contact(View): def get(self, request): return HttpResponse('Hello world!') def post(self, request): return None def delete(self, request): return None def put(self, request): return None
{"/contact_book/urls.py": ["/main_app/views.py"]}
87,736
ivssh/contact_book
refs/heads/master
/main_app/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models # Create your models here. class Contact(models.Model): name = models.CharField(max_length=60) email = models.CharField(max_length=100, unique=True) phone_number = models.CharField(max_length=15, blank=True)
{"/contact_book/urls.py": ["/main_app/views.py"]}
87,752
Gamal-Guo/Vehicle_Overtake_Double_DQN
refs/heads/main
/config.py
import os import tensorflow as tf batch_size = 32 n_vehicles = 20 node_history_size = 15000 generations = 3000 no_of_actions = 5 discount_factor = 0.99 save_path = 'files/training/model_files/cp-{}.ckpt' save_dir = os.path.dirname(save_path) log_save_path = os.path.join("files","training","my_logs") if not os.path.exis...
{"/run.py": ["/deepnetwork.py", "/config.py"], "/files/other_files/plotting.py": ["/config.py"], "/files/other_files/sample.py": ["/config.py"], "/deepnetwork.py": ["/config.py"]}
87,753
Gamal-Guo/Vehicle_Overtake_Double_DQN
refs/heads/main
/run.py
import gym import highway_env import random from collections import deque from deepnetwork import DeepQnetwork from config import * from tqdm import tqdm import numpy as np import cv2 class Highway_GUI: def __init__(self): self.dqn = DeepQnetwork(training_mode=True) self.previous_memory = deque(ma...
{"/run.py": ["/deepnetwork.py", "/config.py"], "/files/other_files/plotting.py": ["/config.py"], "/files/other_files/sample.py": ["/config.py"], "/deepnetwork.py": ["/config.py"]}
87,754
Gamal-Guo/Vehicle_Overtake_Double_DQN
refs/heads/main
/files/other_files/plotting.py
import os import matplotlib.pyplot as plt import csv from config import * def get_data(filename): csv_reader = csv.reader(open(os.path.join(log_save_path, filename), 'r'), delimiter=',') index, values = [], [] for x in csv_reader: if x: index.append(int(x[0])) values.append...
{"/run.py": ["/deepnetwork.py", "/config.py"], "/files/other_files/plotting.py": ["/config.py"], "/files/other_files/sample.py": ["/config.py"], "/deepnetwork.py": ["/config.py"]}
87,755
Gamal-Guo/Vehicle_Overtake_Double_DQN
refs/heads/main
/files/other_files/sample.py
import gym import highway_env import random from config import * env = gym.make('highway-v0') screen_width, screen_height = IM_W, IM_H configr = { "offscreen_rendering": False, "observation": { "type": "GrayscaleObservation", "weights": [0.9, 0.1, 0.5], # weight...
{"/run.py": ["/deepnetwork.py", "/config.py"], "/files/other_files/plotting.py": ["/config.py"], "/files/other_files/sample.py": ["/config.py"], "/deepnetwork.py": ["/config.py"]}
87,756
Gamal-Guo/Vehicle_Overtake_Double_DQN
refs/heads/main
/files/other_files/utils.py
import os import tensorflow as tf class TF_Utils: def __init__(self): pass def tensorboard_save(self, counter, parameters): pass def save_model(self): pass def load_model(self): pass
{"/run.py": ["/deepnetwork.py", "/config.py"], "/files/other_files/plotting.py": ["/config.py"], "/files/other_files/sample.py": ["/config.py"], "/deepnetwork.py": ["/config.py"]}
87,757
Gamal-Guo/Vehicle_Overtake_Double_DQN
refs/heads/main
/deepnetwork.py
import tensorflow as tf import numpy as np from config import * import random import os import datetime import csv class DeepQnetwork: def __init__(self, training_mode): self.epsilon, self.min_epsilon = 1, 0.1 self.decay = self.epsilon/((generations//2)-1) self.training_mode = training_mo...
{"/run.py": ["/deepnetwork.py", "/config.py"], "/files/other_files/plotting.py": ["/config.py"], "/files/other_files/sample.py": ["/config.py"], "/deepnetwork.py": ["/config.py"]}
87,838
tobobo/tobobrowse
refs/heads/master
/tobobrowse_daemon.py
from daemonize import Daemonize from tobobrowse import serve daemon = Daemonize(app='tobobrowse', pid='/tmp/tobobrowse.pid', action=serve) daemon.start()
{"/tobobrowse_daemon.py": ["/tobobrowse.py"]}
87,839
tobobo/tobobrowse
refs/heads/master
/tobobrowse.py
from gevent import monkey; monkey.patch_all() from bottle import \ app, route, post, delete, run, auth_basic, request, response from transmission import * from time import sleep import json import ConfigParser from largestfile import largestfile from os import path, remove import shutil import urllib import urlparse ...
{"/tobobrowse_daemon.py": ["/tobobrowse.py"]}
87,840
tobobo/tobobrowse
refs/heads/master
/largestfile.py
from os import path, listdir from collections import deque def largestfile(this_path): special_files = [] if not path.isdir(this_path): total_size = path.getsize(this_path) largest_file_size = total_size largest_file_path = this_path num_files = 1 num_directories = 0 else: total_size = 0...
{"/tobobrowse_daemon.py": ["/tobobrowse.py"]}
87,841
cprinos/plumbum
refs/heads/master
/tests/test_local.py
from __future__ import with_statement import os import unittest import sys import signal import time from plumbum import local, LocalPath, FG, BG, ERROUT from plumbum.lib import six from plumbum import CommandNotFound, ProcessExecutionError, ProcessTimedOut from plumbum.fs.atomic import AtomicFile, AtomicCounterFile, P...
{"/tests/test_cli.py": ["/plumbum/cli/terminal.py"]}
87,842
cprinos/plumbum
refs/heads/master
/plumbum/version.py
version = (1, 4, 0) version_string = "1.4.0" release_date = "2013.11.09"
{"/tests/test_cli.py": ["/plumbum/cli/terminal.py"]}
87,843
cprinos/plumbum
refs/heads/master
/tests/test_cli.py
from __future__ import with_statement import sys import unittest from plumbum import cli from contextlib import contextmanager from plumbum.cli.terminal import ask, choose, hexdump from plumbum.lib import six # string/unicode issues if six.PY3: from io import StringIO else: from StringIO import StringIO @cont...
{"/tests/test_cli.py": ["/plumbum/cli/terminal.py"]}
87,844
cprinos/plumbum
refs/heads/master
/tests/test_remote.py
from __future__ import with_statement import os import socket import unittest import time import logging from plumbum import RemotePath, SshMachine, ProcessExecutionError, local from plumbum.lib import six #TEST_HOST = "192.168.1.143" TEST_HOST = "127.0.0.1" if TEST_HOST not in ("::1", "127.0.0.1", "localhost"): ...
{"/tests/test_cli.py": ["/plumbum/cli/terminal.py"]}
87,845
cprinos/plumbum
refs/heads/master
/build.py
#!/usr/bin/env python from plumbum import local, cli from plumbum.path.utils import delete class BuildProject(cli.Application): upload = cli.Flag("upload", help = "If given, the artifacts will be uploaded to PyPI") def main(self): delete(local.cwd // "*.egg-info", "build", "dist") if sel...
{"/tests/test_cli.py": ["/plumbum/cli/terminal.py"]}
87,846
cprinos/plumbum
refs/heads/master
/plumbum/cli/terminal.py
""" Terminal-related utilities """ import sys import os import platform from struct import Struct from plumbum import local def get_terminal_size(): """ Get width and height of console; works on linux, os x, windows and cygwin Adapted from https://gist.github.com/jtriley/1108174 Originally from: http...
{"/tests/test_cli.py": ["/plumbum/cli/terminal.py"]}
87,847
matheusb-comp/-DEPRECATED-stellar-docker
refs/heads/master
/web/inflation/routers.py
from .models import CoreModel class CoreRouter(object): def db_for_read(self, model, **hints): print('DEBUG - db_for_read - model: ' + repr(model) + ' **hints: ' + str(hints)) if issubclass(model, CoreModel): return 'core' return 'default' def db_for_write(self, mo...
{"/web/inflation/routers.py": ["/web/inflation/models.py"]}
87,848
matheusb-comp/-DEPRECATED-stellar-docker
refs/heads/master
/web/inflation/migrations/0001_initial.py
# Generated by Django 2.0.3 on 2018-04-23 12:59 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Account', fields=[ ('address', models.CharF...
{"/web/inflation/routers.py": ["/web/inflation/models.py"]}
87,849
matheusb-comp/-DEPRECATED-stellar-docker
refs/heads/master
/web/inflation/models.py
from django.db import models # Create your models here. class CoreModel(models.Model): class Meta: abstract = True managed = False class Account(CoreModel): address = models.CharField(max_length = 56, primary_key = True) class Meta(CoreModel.Meta): db_table = 'accounts' ...
{"/web/inflation/routers.py": ["/web/inflation/models.py"]}
87,851
allenshen321/DouBanCrawl
refs/heads/master
/doubanCrawl/doubanCrawl/get_proxy.py
import requests import json import queue import random def get_ip_port_queue(): r = requests.get('http://127.0.0.1:8000/?count=30') ip_ports = json.loads(r.text) # print(ip_ports) ip_port_queue = queue.Queue(30) for each in ip_ports: ip_port_queue.put(each[0] + ':' + str(each[1])) ret...
{"/doubanCrawl/doubanCrawl/middlewares.py": ["/doubanCrawl/doubanCrawl/get_proxy.py"]}
87,852
allenshen321/DouBanCrawl
refs/heads/master
/doubanCrawl/doubanCrawl/spiders/douban.py
# -*- coding: utf-8 -*- import scrapy from scrapy.linkextractors import LinkExtractor from scrapy.spiders import CrawlSpider, Rule from scrapy_redis.spiders import RedisCrawlSpider from doubanCrawl.items import DoubancrawlItem class DoubanSpider(RedisCrawlSpider): name = 'douban' redis_key = 'DoubanSpider:sta...
{"/doubanCrawl/doubanCrawl/middlewares.py": ["/doubanCrawl/doubanCrawl/get_proxy.py"]}
87,853
allenshen321/DouBanCrawl
refs/heads/master
/doubanCrawl/doubanCrawl/spiders/start_crawl.py
from scrapy import cmdline from multiprocessing import Process def start_spider1(): cmdline.execute('scrapy runspider douban.py'.split()) def start_spider2(): cmdline.execute('scrapy runspider douban.py'.split()) p1 = Process(target=start_spider1, name='douban1') p2 = Process(target=start_spider2, name='...
{"/doubanCrawl/doubanCrawl/middlewares.py": ["/doubanCrawl/doubanCrawl/get_proxy.py"]}
87,854
allenshen321/DouBanCrawl
refs/heads/master
/doubanCrawl/doubanCrawl/process_douban.py
import json import redis import pymongo class SaveToMongodb(object): def __init__(self, database='douban', collection='book_new'): self.redis_cli = redis.StrictRedis(host='127.0.0.1', port=6379, db=0) self.mongo_cli = pymongo.MongoClient(host='localhost', port=27017) # 创建数据库和集合 s...
{"/doubanCrawl/doubanCrawl/middlewares.py": ["/doubanCrawl/doubanCrawl/get_proxy.py"]}
87,855
allenshen321/DouBanCrawl
refs/heads/master
/doubanCrawl/doubanCrawl/middlewares.py
# -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # https://doc.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals from .useragent import USER_AGENTS from .get_proxy import get_ip_port_list from scrapy.downloadermiddlewares.retry import Re...
{"/doubanCrawl/doubanCrawl/middlewares.py": ["/doubanCrawl/doubanCrawl/get_proxy.py"]}
87,856
allenshen321/DouBanCrawl
refs/heads/master
/doubanCrawl/doubanCrawl/items.py
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://doc.scrapy.org/en/latest/topics/items.html import scrapy class DoubancrawlItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() # 类型,小类 book_type = scrapy.Fie...
{"/doubanCrawl/doubanCrawl/middlewares.py": ["/doubanCrawl/doubanCrawl/get_proxy.py"]}
87,857
yl558/fake_news_detect
refs/heads/master
/extract_feature/combine_feature_twitter.py
import sys, os, json, time, datetime sys.path.append('..') import utils import numpy as np project_folder = os.path.join('..', '..') def main(): x15 = np.load(os.path.join(project_folder, 'feature', 'twitter15', 'x.npy')) y15 = np.load(os.path.join(project_folder, 'feature', 'twitter15', 'y.npy')) x16 = np.load(...
{"/extract_feature/combine_feature_twitter.py": ["/utils.py"], "/model/base_model.py": ["/utils.py"], "/crawl_twitter_user/get_user_id.py": ["/utils.py"], "/crawl_twitter_user/crawl_user.py": ["/utils.py"], "/extract_feature/get_feature_weibo.py": ["/utils.py"], "/extract_feature/get_feature_twitter.py": ["/utils.py"]}
87,858
yl558/fake_news_detect
refs/heads/master
/model/base_model.py
import sys, os, json, time, datetime sys.path.append('..') import utils project_folder = os.path.join('..', '..') import numpy as np import random import keras from keras.models import Sequential, load_model, Model from keras.layers import Input, Dense, Dropout, Flatten, Conv1D, MaxPooling1D, Concatenate, TimeDistrib...
{"/extract_feature/combine_feature_twitter.py": ["/utils.py"], "/model/base_model.py": ["/utils.py"], "/crawl_twitter_user/get_user_id.py": ["/utils.py"], "/crawl_twitter_user/crawl_user.py": ["/utils.py"], "/extract_feature/get_feature_weibo.py": ["/utils.py"], "/extract_feature/get_feature_twitter.py": ["/utils.py"]}