index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
344
ewheeler/nomenklatura
refs/heads/master
/setup.py
from setuptools import setup, find_packages setup( name='nomenklatura', version='0.1', description="Make record linkages on the web.", long_description='', classifiers=[ ], keywords='data mapping identity linkage record', author='Open Knowledge Foundation', author_email='info@ok...
{"/nomenklatura/core.py": ["/nomenklatura/__init__.py"], "/nomenklatura/views/sessions.py": ["/nomenklatura/__init__.py", "/nomenklatura/core.py", "/nomenklatura/model/__init__.py"], "/nomenklatura/assets.py": ["/nomenklatura/core.py"], "/nomenklatura/manage.py": ["/nomenklatura/core.py", "/nomenklatura/model/__init__....
345
ewheeler/nomenklatura
refs/heads/master
/nomenklatura/model/__init__.py
from nomenklatura.model.dataset import Dataset from nomenklatura.model.entity import Entity from nomenklatura.model.account import Account from nomenklatura.model.upload import Upload
{"/nomenklatura/core.py": ["/nomenklatura/__init__.py"], "/nomenklatura/views/sessions.py": ["/nomenklatura/__init__.py", "/nomenklatura/core.py", "/nomenklatura/model/__init__.py"], "/nomenklatura/assets.py": ["/nomenklatura/core.py"], "/nomenklatura/manage.py": ["/nomenklatura/core.py", "/nomenklatura/model/__init__....
346
ewheeler/nomenklatura
refs/heads/master
/nomenklatura/core.py
import logging from logging.handlers import RotatingFileHandler from flask import Flask from flask import url_for as _url_for from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.oauth import OAuth from flask.ext.assets import Environment import certifi from kombu import Exchange, Queue from celery import Celer...
{"/nomenklatura/core.py": ["/nomenklatura/__init__.py"], "/nomenklatura/views/sessions.py": ["/nomenklatura/__init__.py", "/nomenklatura/core.py", "/nomenklatura/model/__init__.py"], "/nomenklatura/assets.py": ["/nomenklatura/core.py"], "/nomenklatura/manage.py": ["/nomenklatura/core.py", "/nomenklatura/model/__init__....
347
ewheeler/nomenklatura
refs/heads/master
/contrib/heroku_settings.py
import os def bool_env(val): """Replaces string based environment values with Python booleans""" return True if os.environ.get(val, 'False').lower() == 'true' else False #DEBUG = True SECRET_KEY = os.environ.get('SECRET_KEY') SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', ...
{"/nomenklatura/core.py": ["/nomenklatura/__init__.py"], "/nomenklatura/views/sessions.py": ["/nomenklatura/__init__.py", "/nomenklatura/core.py", "/nomenklatura/model/__init__.py"], "/nomenklatura/assets.py": ["/nomenklatura/core.py"], "/nomenklatura/manage.py": ["/nomenklatura/core.py", "/nomenklatura/model/__init__....
348
ewheeler/nomenklatura
refs/heads/master
/nomenklatura/default_settings.py
DEBUG = False APP_NAME = 'nomenklatura' CELERY_BROKER_URL = 'amqp://guest:guest@localhost:5672//' ALLOWED_EXTENSIONS = set(['csv', 'tsv', 'ods', 'xls', 'xlsx', 'txt']) SIGNUP_DISABLED = False
{"/nomenklatura/core.py": ["/nomenklatura/__init__.py"], "/nomenklatura/views/sessions.py": ["/nomenklatura/__init__.py", "/nomenklatura/core.py", "/nomenklatura/model/__init__.py"], "/nomenklatura/assets.py": ["/nomenklatura/core.py"], "/nomenklatura/manage.py": ["/nomenklatura/core.py", "/nomenklatura/model/__init__....
349
ewheeler/nomenklatura
refs/heads/master
/nomenklatura/views/sessions.py
import logging import requests from flask import url_for, session, Blueprint, redirect from flask import request from apikit import jsonify from werkzeug.exceptions import Forbidden from nomenklatura import authz from nomenklatura.core import app, db, github from nomenklatura.model import Account, Dataset section = ...
{"/nomenklatura/core.py": ["/nomenklatura/__init__.py"], "/nomenklatura/views/sessions.py": ["/nomenklatura/__init__.py", "/nomenklatura/core.py", "/nomenklatura/model/__init__.py"], "/nomenklatura/assets.py": ["/nomenklatura/core.py"], "/nomenklatura/manage.py": ["/nomenklatura/core.py", "/nomenklatura/model/__init__....
350
ewheeler/nomenklatura
refs/heads/master
/nomenklatura/assets.py
from flask.ext.assets import Bundle from nomenklatura.core import assets deps_assets = Bundle( 'vendor/jquery/dist/jquery.js', 'vendor/bootstrap/js/collapse.js', 'vendor/angular/angular.js', 'vendor/angular-route/angular-route.js', 'vendor/angular-bootstrap/ui-bootstrap-tpls.js', 'vendor/ngUpl...
{"/nomenklatura/core.py": ["/nomenklatura/__init__.py"], "/nomenklatura/views/sessions.py": ["/nomenklatura/__init__.py", "/nomenklatura/core.py", "/nomenklatura/model/__init__.py"], "/nomenklatura/assets.py": ["/nomenklatura/core.py"], "/nomenklatura/manage.py": ["/nomenklatura/core.py", "/nomenklatura/model/__init__....
351
ewheeler/nomenklatura
refs/heads/master
/nomenklatura/__init__.py
# shut up useless SA warning: import warnings warnings.filterwarnings('ignore', 'Unicode type received non-unicode bind param value.')
{"/nomenklatura/core.py": ["/nomenklatura/__init__.py"], "/nomenklatura/views/sessions.py": ["/nomenklatura/__init__.py", "/nomenklatura/core.py", "/nomenklatura/model/__init__.py"], "/nomenklatura/assets.py": ["/nomenklatura/core.py"], "/nomenklatura/manage.py": ["/nomenklatura/core.py", "/nomenklatura/model/__init__....
352
ewheeler/nomenklatura
refs/heads/master
/nomenklatura/manage.py
from normality import normalize from flask.ext.script import Manager from flask.ext.assets import ManageAssets from nomenklatura.core import db from nomenklatura.model import Entity from nomenklatura.views import app from nomenklatura.assets import assets manager = Manager(app) manager.add_command('assets', ManageAss...
{"/nomenklatura/core.py": ["/nomenklatura/__init__.py"], "/nomenklatura/views/sessions.py": ["/nomenklatura/__init__.py", "/nomenklatura/core.py", "/nomenklatura/model/__init__.py"], "/nomenklatura/assets.py": ["/nomenklatura/core.py"], "/nomenklatura/manage.py": ["/nomenklatura/core.py", "/nomenklatura/model/__init__....
353
devikadayanand16/todo
refs/heads/main
/todolist/forms.py
from django import forms class TodoListForm(forms.Form): text = forms.CharField(max_length=50, widget=forms.TextInput( attrs={'class':'form-control','placeholder':'Enter todo e.g. Grocery Shopping', 'aria-label':'Todo', 'aria-describeby':'add-btn'}))
{"/todolist/views.py": ["/todolist/models.py", "/todolist/forms.py"]}
354
devikadayanand16/todo
refs/heads/main
/todolist/models.py
from django.db import models class Todolist(models.Model): text=models.CharField(max_length=50) completed=models.BooleanField(default=False) def __str__(self): return self.text
{"/todolist/views.py": ["/todolist/models.py", "/todolist/forms.py"]}
355
devikadayanand16/todo
refs/heads/main
/todolist/views.py
from django.shortcuts import render, redirect from .models import Todolist from .forms import TodoListForm from django.views.decorators.http import require_POST def index(request): todo_items=Todolist.objects.order_by('id') form = TodoListForm() context = {'todo_items' : todo_items, 'form' : form } return render(r...
{"/todolist/views.py": ["/todolist/models.py", "/todolist/forms.py"]}
357
FUZIK/secret_punto
refs/heads/master
/main.py
import tg_manager_bot.bot as manager_bot if __name__ == '__main__': manager_bot.main()
{"/core/database_adapter.py": ["/config.py"]}
358
FUZIK/secret_punto
refs/heads/master
/config.py
DATABASE_HOST = "ec2-54-247-169-129.eu-west-1.compute.amazonaws.com" DATABASE_PORT = 5432 DATABASE_NAME = "dbm6aqb8gc2vd3" DATABASE_USER = "lwejloxflohbkt" DATABASE_PASSWORD = "963dca4e85ea295a09653fad768c530c2035732fd07800146d04b9ebc28186ca" # PuntoManagerBot MANAGER_TG_BOT_TOKEN = "1161956935:AAEelrfE2ksdxAjdanj-Uq1...
{"/core/database_adapter.py": ["/config.py"]}
359
FUZIK/secret_punto
refs/heads/master
/core/database_adapter.py
import config from peewee import PostgresqlDatabase, Model, AutoField, IntegerField, TextField, ForeignKeyField, TimestampField from playhouse.postgres_ext import ArrayField, BlobField _connection = PostgresqlDatabase(config.DATABASE_NAME, host=config.DATABASE_HOST, ...
{"/core/database_adapter.py": ["/config.py"]}
375
xergio/redtorrent
refs/heads/master
/tracker/views.py
# -*- coding: utf-8 -*- import django from django.shortcuts import render_to_response from django.http import HttpResponse from tracker.models import AnnounceForm, ScrapeForm, Store import sys import socket import bencode import struct import time import redis """ http://bittorrent.org/beps/bep_0003.html http://wiki...
{"/tracker/views.py": ["/tracker/models.py"]}
376
xergio/redtorrent
refs/heads/master
/tracker/models.py
# -*- coding: utf-8 -*- from django import forms import redis import time class AnnounceForm(forms.Form): info_hash = forms.CharField(max_length=100) peer_id = forms.CharField(max_length=100) port = forms.IntegerField() uploaded = forms.IntegerField() downloaded = forms.IntegerField() left = forms.IntegerField(...
{"/tracker/views.py": ["/tracker/models.py"]}
377
xergio/redtorrent
refs/heads/master
/redtorrent/urls.py
from django.conf.urls import patterns, url urlpatterns = patterns('', url(r'^$', 'tracker.views.announce', name='announce'), url(r'^announce', 'tracker.views.announce', name='announce'), url(r'^scrape$', 'tracker.views.scrape', name='scrape'), )
{"/tracker/views.py": ["/tracker/models.py"]}
380
katrii/ohsiha
refs/heads/master
/ohjelma/apps.py
from django.apps import AppConfig class OhjelmaConfig(AppConfig): name = 'ohjelma'
{"/ohjelma/views.py": ["/ohjelma/models.py"]}
381
katrii/ohsiha
refs/heads/master
/ohjelma/migrations/0003_song_release_year.py
# Generated by Django 3.0.2 on 2020-03-15 16:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ohjelma', '0002_song'), ] operations = [ migrations.AddField( model_name='song', name='release_year', fi...
{"/ohjelma/views.py": ["/ohjelma/models.py"]}
382
katrii/ohsiha
refs/heads/master
/ohjelma/urls.py
from django.urls import path from . import views urlpatterns = [ path('', views.index, name = 'home'), path('songs/', views.SongList.as_view(), name = 'song_list'), path('view/<int:pk>', views.SongView.as_view(), name = 'song_view'), path('new', views.SongCreate.as_view(), name = 'song_new'), path...
{"/ohjelma/views.py": ["/ohjelma/models.py"]}
383
katrii/ohsiha
refs/heads/master
/ohjelma/migrations/0002_song.py
# Generated by Django 3.0.2 on 2020-03-13 17:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ohjelma', '0001_initial'), ] operations = [ migrations.CreateModel( name='Song', fields=[ ('id', mod...
{"/ohjelma/views.py": ["/ohjelma/models.py"]}
384
katrii/ohsiha
refs/heads/master
/ohjelma/migrations/0005_auto_20200329_1313.py
# Generated by Django 3.0.2 on 2020-03-29 10:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ohjelma', '0004_track'), ] operations = [ migrations.AlterField( model_name='track', name='track_duration', ...
{"/ohjelma/views.py": ["/ohjelma/models.py"]}
385
katrii/ohsiha
refs/heads/master
/ohjelma/migrations/0007_track_track_id.py
# Generated by Django 3.0.2 on 2020-04-11 18:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ohjelma', '0006_auto_20200329_1329'), ] operations = [ migrations.AddField( model_name='track', name='track_id', ...
{"/ohjelma/views.py": ["/ohjelma/models.py"]}
386
katrii/ohsiha
refs/heads/master
/ohjelma/views.py
from django.shortcuts import render from django.http import HttpResponse from django.views.generic import ListView, DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from ohjelma.models import Song from ohjelma.models import Track import json impo...
{"/ohjelma/views.py": ["/ohjelma/models.py"]}
387
katrii/ohsiha
refs/heads/master
/ohjelma/models.py
from django.db import models from django.urls import reverse class Question(models.Model): question_text = models.CharField(max_length=200) pub_date = models.DateTimeField('Date published') class Choice(models.Model): question = models.ForeignKey(Question, on_delete=models.CASCADE) choice_text = mode...
{"/ohjelma/views.py": ["/ohjelma/models.py"]}
388
katrii/ohsiha
refs/heads/master
/ohjelma/migrations/0006_auto_20200329_1329.py
# Generated by Django 3.0.2 on 2020-03-29 10:29 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ohjelma', '0005_auto_20200329_1313'), ] operations = [ migrations.AlterField( model_name='track', name='track_durati...
{"/ohjelma/views.py": ["/ohjelma/models.py"]}
389
katrii/ohsiha
refs/heads/master
/ohjelma/migrations/0009_auto_20200411_2211.py
# Generated by Django 3.0.2 on 2020-04-11 19:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ohjelma', '0008_track_track_danceability'), ] operations = [ migrations.AddField( model_name='track', name='track_ac...
{"/ohjelma/views.py": ["/ohjelma/models.py"]}
390
katrii/ohsiha
refs/heads/master
/ohjelma/migrations/0004_track.py
# Generated by Django 3.0.2 on 2020-03-28 23:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ohjelma', '0003_song_release_year'), ] operations = [ migrations.CreateModel( name='Track', fields=[ ...
{"/ohjelma/views.py": ["/ohjelma/models.py"]}
394
Bthelisma/repTravelbuddy
refs/heads/master
/apps/travel_app/migrations/0003_trip.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-12-27 10:38 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('travel_app', '0002_auto_20171227_0048'), ] operation...
{"/apps/travel_app/views.py": ["/apps/travel_app/models.py"]}
395
Bthelisma/repTravelbuddy
refs/heads/master
/apps/travel_app/migrations/0004_auto_20171227_0320.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-12-27 11:20 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('travel_app', '0003_trip'), ] operations = [ migrations.RenameField( model...
{"/apps/travel_app/views.py": ["/apps/travel_app/models.py"]}
396
Bthelisma/repTravelbuddy
refs/heads/master
/apps/travel_app/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import bcrypt import datetime from django.db import models class UserManager(models.Manager): def register_validate(self, postData): errors = [] name = postData['name'] username = postData['username'] passwo...
{"/apps/travel_app/views.py": ["/apps/travel_app/models.py"]}
397
Bthelisma/repTravelbuddy
refs/heads/master
/apps/travel_app/views.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render, redirect from .models import User from .models import Trip from django.contrib import messages #==================================================# # RENDER METHODS # #===============...
{"/apps/travel_app/views.py": ["/apps/travel_app/models.py"]}
398
Bthelisma/repTravelbuddy
refs/heads/master
/apps/travel_app/migrations/0005_auto_20171227_1455.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-12-27 22:55 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('travel_app', '0004_auto_20171227_0320'), ] operations = [ migrations.AlterFie...
{"/apps/travel_app/views.py": ["/apps/travel_app/models.py"]}
399
EStepzz/LogData
refs/heads/master
/tools/GenPic.py
#coding = utf-8 #author:QINWANG ''' 使用pyecharts 创建不同的图形图像 目前有:xxxx等图像 ''' from pyecharts import Line from tools.ConnectDB import DbSomething a = DbSomething('localhost','dns_query', 'postgres', 111111) v1,v2 = a.search() print (v1,v2) class GenPic: '''生成折线图''' def lineChart(self): line= Line("QPS图")...
{"/tools/GenPic.py": ["/tools/ConnectDB.py"]}
400
EStepzz/LogData
refs/heads/master
/tools/ConnectDB.py
#coding=utf-8 import psycopg2 import datetime import time class DbSomething(): def __init__(self,ip,database,username, password,port=5432): self.ip = ip self.database = database self.username = username self.password = password self.port = port '''如果把connection写到__init__...
{"/tools/GenPic.py": ["/tools/ConnectDB.py"]}
402
SSRomanSS/flask_blog
refs/heads/master
/manage.py
from blog import app, db, manager from blog.models import * if __name__ == '__main__': manager.run()
{"/manage.py": ["/blog/__init__.py"], "/run.py": ["/blog/__init__.py"], "/blog/routes.py": ["/blog/__init__.py"]}
403
SSRomanSS/flask_blog
refs/heads/master
/blog/__init__.py
from flask import Flask, request from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate, MigrateCommand from flask_script import Manager from flask_login import LoginManager from flask_bootstrap import Bootstrap from flask_moment import Moment from flask_babel import Babel, lazy_gettext as _l from fl...
{"/manage.py": ["/blog/__init__.py"], "/run.py": ["/blog/__init__.py"], "/blog/routes.py": ["/blog/__init__.py"]}
404
SSRomanSS/flask_blog
refs/heads/master
/migrations/versions/89b140c56c4d_fix_create_followers_relationship.py
"""fix create followers relationship Revision ID: 89b140c56c4d Revises: 7d84ff36825f Create Date: 2021-03-30 14:57:47.528704 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '89b140c56c4d' down_revision = '7d84ff36825f' branch_labels = None depends_on = None d...
{"/manage.py": ["/blog/__init__.py"], "/run.py": ["/blog/__init__.py"], "/blog/routes.py": ["/blog/__init__.py"]}
405
SSRomanSS/flask_blog
refs/heads/master
/run.py
from blog import app, db from blog import routes, models, errors, set_logger @app.shell_context_processor def make_shell_context(): return { 'db': db, 'User': models.User, 'Post': models.Post } if __name__ == '__main__': app.run(debug=True)
{"/manage.py": ["/blog/__init__.py"], "/run.py": ["/blog/__init__.py"], "/blog/routes.py": ["/blog/__init__.py"]}
406
SSRomanSS/flask_blog
refs/heads/master
/migrations/versions/5e12ea69ab10_add_two_new_column_to_user.py
"""Add two new column to User Revision ID: 5e12ea69ab10 Revises: a89dbfef15cc Create Date: 2021-03-29 20:46:23.445651 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '5e12ea69ab10' down_revision = 'a89dbfef15cc' branch_labels = None depends_on = None def upgr...
{"/manage.py": ["/blog/__init__.py"], "/run.py": ["/blog/__init__.py"], "/blog/routes.py": ["/blog/__init__.py"]}
407
SSRomanSS/flask_blog
refs/heads/master
/blog/routes.py
from datetime import datetime from flask import render_template, flash, redirect, url_for, request from flask_login import current_user, login_user, logout_user, login_required from flask_babel import _ from werkzeug.urls import url_parse from blog import app, db from blog.forms import LoginForm, RegisterForm, EditPr...
{"/manage.py": ["/blog/__init__.py"], "/run.py": ["/blog/__init__.py"], "/blog/routes.py": ["/blog/__init__.py"]}
411
xiaohan2012/random_steiner_tree
refs/heads/master
/test_loop_erased_weighted.py
import pytest import numpy as np from graph_tool import Graph from random_steiner_tree import random_steiner_tree from random_steiner_tree.util import from_gt from collections import Counter EPSILON = 1e-10 def graph(): """ 0 (root) / \ 1 2 \ / 3 (X) """ g = Graph() ...
{"/test_loop_erased_weighted.py": ["/random_steiner_tree/__init__.py"], "/distribution.py": ["/random_steiner_tree/__init__.py"], "/test.py": ["/random_steiner_tree/__init__.py"]}
412
xiaohan2012/random_steiner_tree
refs/heads/master
/random_steiner_tree/__init__.py
import random from .interface import loop_erased, cut_based def random_steiner_tree(gi, X, root, method="loop_erased", seed=None, verbose=False): assert method in {"loop_erased", "closure", "cut"} # C++ is strict with type... X = list(map(int, X)) root = int(root) if seed is None: seed = ...
{"/test_loop_erased_weighted.py": ["/random_steiner_tree/__init__.py"], "/distribution.py": ["/random_steiner_tree/__init__.py"], "/test.py": ["/random_steiner_tree/__init__.py"]}
413
xiaohan2012/random_steiner_tree
refs/heads/master
/distribution.py
# coding: utf-8 import networkx as nx import numpy as np import random import pandas as pd from scipy.spatial.distance import cosine from tqdm import tqdm from collections import Counter from random_steiner_tree import random_steiner_tree from random_steiner_tree.util import from_nx from joblib import Parallel, delaye...
{"/test_loop_erased_weighted.py": ["/random_steiner_tree/__init__.py"], "/distribution.py": ["/random_steiner_tree/__init__.py"], "/test.py": ["/random_steiner_tree/__init__.py"]}
414
xiaohan2012/random_steiner_tree
refs/heads/master
/setup.py
# from distutils.core import setup, Extension import os from setuptools import setup, Extension os.environ["CC"] = "g++" os.environ["CXX"] = "g++" core_module = Extension( 'random_steiner_tree/interface', include_dirs=['/usr/include/python3.5/'], libraries=['boost_python-py35', 'boost_graph'], library...
{"/test_loop_erased_weighted.py": ["/random_steiner_tree/__init__.py"], "/distribution.py": ["/random_steiner_tree/__init__.py"], "/test.py": ["/random_steiner_tree/__init__.py"]}
415
xiaohan2012/random_steiner_tree
refs/heads/master
/test.py
import pytest import random import numpy as np import networkx as nx from graph_tool import Graph from random_steiner_tree import random_steiner_tree from random_steiner_tree.util import (from_nx, from_gt, num_vertices, isolate_vertex, ...
{"/test_loop_erased_weighted.py": ["/random_steiner_tree/__init__.py"], "/distribution.py": ["/random_steiner_tree/__init__.py"], "/test.py": ["/random_steiner_tree/__init__.py"]}
440
hjtree0825/stroke_network_ctmc_simulations
refs/heads/main
/stroke_expanded_add_capacity.py
from stroke_functions import * # Initialize T = 10000 repl_num = 100 service_rate_h = 1./7 service_rate_i = 1./3 Mean1_psc_cap = [] STD1_psc_cap = [] Mean2_psc_cap = [] STD2_psc_cap = [] Mean3_psc_cap = [] STD3_psc_cap = [] Mean4_psc_cap = [] STD4_psc_cap = [] Mean5_psc_cap = [] STD5_psc_cap = [] ...
{"/stroke_expanded_add_capacity.py": ["/stroke_functions.py"], "/stroke_functions.py": ["/stroke_source.py"], "/stroke_overall_comparison.py": ["/stroke_functions.py"], "/stroke_expanded.py": ["/stroke_functions.py"], "/stroke_main.py": ["/stroke_functions.py", "/stroke_base.py", "/stroke_base_add_capacity.py", "/strok...
441
hjtree0825/stroke_network_ctmc_simulations
refs/heads/main
/stroke_functions.py
from stroke_source import * g = r.Random(1234) def next_arrival(arrival_rate): U = g.uniform(0,1) arrival_time = -1./arrival_rate * m.log(U) return arrival_time def next_service(service_rate): U = g.uniform(0,1) service_time = -1./service_rate * m.log(U) return service_time ...
{"/stroke_expanded_add_capacity.py": ["/stroke_functions.py"], "/stroke_functions.py": ["/stroke_source.py"], "/stroke_overall_comparison.py": ["/stroke_functions.py"], "/stroke_expanded.py": ["/stroke_functions.py"], "/stroke_main.py": ["/stroke_functions.py", "/stroke_base.py", "/stroke_base_add_capacity.py", "/strok...
442
hjtree0825/stroke_network_ctmc_simulations
refs/heads/main
/stroke_overall_comparison.py
from stroke_functions import * repl_num = 100 # Base case open_file = open("base_mean.pkl", "rb") loaded_list = pickle.load(open_file) open_file.close() Mean1 = loaded_list[0] Mean2 = loaded_list[1] Mean3 = loaded_list[2] open_file = open("base_std.pkl", "rb") loaded_list = pickle.load(open_file) open_...
{"/stroke_expanded_add_capacity.py": ["/stroke_functions.py"], "/stroke_functions.py": ["/stroke_source.py"], "/stroke_overall_comparison.py": ["/stroke_functions.py"], "/stroke_expanded.py": ["/stroke_functions.py"], "/stroke_main.py": ["/stroke_functions.py", "/stroke_base.py", "/stroke_base_add_capacity.py", "/strok...
443
hjtree0825/stroke_network_ctmc_simulations
refs/heads/main
/stroke_expanded.py
from stroke_functions import * # Initialize T = 10000 repl_num = 10 service_rate_h = 1./7 service_rate_i = 1./3 Mean1_psc = [] STD1_psc = [] Mean2_psc = [] STD2_psc = [] Mean3_psc = [] STD3_psc = [] Mean4_psc = [] STD4_psc = [] Mean5_psc = [] STD5_psc = [] Mean6_psc = [] STD6_psc = [] cc0 = 15...
{"/stroke_expanded_add_capacity.py": ["/stroke_functions.py"], "/stroke_functions.py": ["/stroke_source.py"], "/stroke_overall_comparison.py": ["/stroke_functions.py"], "/stroke_expanded.py": ["/stroke_functions.py"], "/stroke_main.py": ["/stroke_functions.py", "/stroke_base.py", "/stroke_base_add_capacity.py", "/strok...
444
hjtree0825/stroke_network_ctmc_simulations
refs/heads/main
/stroke_main.py
from stroke_functions import * import stroke_base import stroke_base_add_capacity import stroke_expanded import stroke_expanded_reduced_rate import stroke_expanded_add_capacity import stroke_overall_comparison
{"/stroke_expanded_add_capacity.py": ["/stroke_functions.py"], "/stroke_functions.py": ["/stroke_source.py"], "/stroke_overall_comparison.py": ["/stroke_functions.py"], "/stroke_expanded.py": ["/stroke_functions.py"], "/stroke_main.py": ["/stroke_functions.py", "/stroke_base.py", "/stroke_base_add_capacity.py", "/strok...
445
hjtree0825/stroke_network_ctmc_simulations
refs/heads/main
/stroke_source.py
import numpy as np import random as r import math as m import matplotlib.pyplot as plt import pickle
{"/stroke_expanded_add_capacity.py": ["/stroke_functions.py"], "/stroke_functions.py": ["/stroke_source.py"], "/stroke_overall_comparison.py": ["/stroke_functions.py"], "/stroke_expanded.py": ["/stroke_functions.py"], "/stroke_main.py": ["/stroke_functions.py", "/stroke_base.py", "/stroke_base_add_capacity.py", "/strok...
446
hjtree0825/stroke_network_ctmc_simulations
refs/heads/main
/stroke_base_add_capacity.py
from stroke_functions import * # Initialize T = 10000 repl_num = 100 service_rate_h = 1./7 service_rate_i = 1./3 Mean1_cap = [] STD1_cap = [] Mean2_cap = [] STD2_cap = [] Mean3_cap = [] STD3_cap = [] Mean4_cap = [] STD4_cap = [] Mean5_cap = [] STD5_cap = [] Mean6_cap = [] STD6_cap = [] cc0 = 1...
{"/stroke_expanded_add_capacity.py": ["/stroke_functions.py"], "/stroke_functions.py": ["/stroke_source.py"], "/stroke_overall_comparison.py": ["/stroke_functions.py"], "/stroke_expanded.py": ["/stroke_functions.py"], "/stroke_main.py": ["/stroke_functions.py", "/stroke_base.py", "/stroke_base_add_capacity.py", "/strok...
447
hjtree0825/stroke_network_ctmc_simulations
refs/heads/main
/stroke_expanded_reduced_rate.py
from stroke_functions import * # Initialize T = 10000 repl_num = 100 service_rate_h = 1./7 service_rate_i = 1./3 Mean1_psc_red = [] STD1_psc_red = [] Mean2_psc_red = [] STD2_psc_red = [] Mean3_psc_red = [] STD3_psc_red = [] Mean4_psc_red = [] STD4_psc_red = [] Mean5_psc_red = [] STD5_psc_red = [] ...
{"/stroke_expanded_add_capacity.py": ["/stroke_functions.py"], "/stroke_functions.py": ["/stroke_source.py"], "/stroke_overall_comparison.py": ["/stroke_functions.py"], "/stroke_expanded.py": ["/stroke_functions.py"], "/stroke_main.py": ["/stroke_functions.py", "/stroke_base.py", "/stroke_base_add_capacity.py", "/strok...
448
hjtree0825/stroke_network_ctmc_simulations
refs/heads/main
/stroke_base.py
from stroke_functions import * # Initialize T = 10000 repl_num = 100 service_rate_h = 1./7 service_rate_i = 1./3 Mean1 = [] STD1 = [] Mean2 = [] STD2 = [] Mean3 = [] STD3 = [] Mean4 = [] STD4 = [] Mean5 = [] STD5 = [] Mean6 = [] STD6 = [] MeanBed1 = [] MeanBed2 = [] MeanBed3 = [] MeanBed4 =...
{"/stroke_expanded_add_capacity.py": ["/stroke_functions.py"], "/stroke_functions.py": ["/stroke_source.py"], "/stroke_overall_comparison.py": ["/stroke_functions.py"], "/stroke_expanded.py": ["/stroke_functions.py"], "/stroke_main.py": ["/stroke_functions.py", "/stroke_base.py", "/stroke_base_add_capacity.py", "/strok...
449
hjtree0825/stroke_network_ctmc_simulations
refs/heads/main
/stroke_customization.py
from stroke_functions import * ############################################################################ ############################################################################ ############################################################################ # Simply change the numbers in this section. # ...
{"/stroke_expanded_add_capacity.py": ["/stroke_functions.py"], "/stroke_functions.py": ["/stroke_source.py"], "/stroke_overall_comparison.py": ["/stroke_functions.py"], "/stroke_expanded.py": ["/stroke_functions.py"], "/stroke_main.py": ["/stroke_functions.py", "/stroke_base.py", "/stroke_base_add_capacity.py", "/strok...
452
jlstack/Online-Marketplace
refs/heads/master
/application/models.py
from application import db class Product(db.Model): id = db.Column('id', db.Integer, primary_key=True) name = db.Column('name', db.String(128), nullable=False) description = db.Column('description', db.TEXT, nullable=False) image_path = db.Column('image_path', db.String(128), nullable=True) quantit...
{"/application/models.py": ["/application.py"]}
453
jlstack/Online-Marketplace
refs/heads/master
/application.py
from flask import Flask, Response, session, flash, request, redirect, render_template, g import sys import os import base64 from flask_login import LoginManager, UserMixin, current_user, login_required, login_user, logout_user import hashlib from flask_openid import OpenID errors = [] try: from application import...
{"/application/models.py": ["/application.py"]}
454
jlstack/Online-Marketplace
refs/heads/master
/application/__init__.py
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os def get_config(): config = {} if 'RDS_HOSTNAME' in os.environ: env = { 'NAME': os.environ['RDS_DB_NAME'], 'USER': os.environ['RDS_USERNAME'], 'PASSWORD': os.environ['RDS_PASSWORD'], 'HOST': os.environ['RDS...
{"/application/models.py": ["/application.py"]}
459
kaustavbhattacharjee/labeling
refs/heads/main
/main.py
# This is a sample Python script. # Press ⌃R to execute it or replace it with your code. # Press Double ⇧ to search everywhere for classes, files, tool windows, actions, and settings. from utils import Tweet def print_hi(name): # Use a breakpoint in the code line below to debug your script. print(f'Hi, {name}...
{"/main.py": ["/utils.py"]}
460
kaustavbhattacharjee/labeling
refs/heads/main
/utils.py
import pandas as pd import csv import os from pandas import ExcelWriter class Tweet: def import_data(self, PATH, type): if type == "xlsx": xl = pd.ExcelFile(PATH) data = xl.parse("Sheet1") if type == "csv": data = pd.read_csv(PATH) # if type == "csv": ...
{"/main.py": ["/utils.py"]}
481
sciaso/greenpass-covid19-qrcode-decoder
refs/heads/master
/lib/greenpass.py
from pyzbar.pyzbar import decode from PIL import Image from base45 import b45decode from zlib import decompress from flynn import decoder as flynn_decoder from lib.datamapper import DataMapper as data_mapper class GreenPassDecoder(object): stream_data = None def __init__(self, stream_data): self.stre...
{"/lib/greenpass.py": ["/lib/datamapper.py"], "/app.py": ["/lib/greenpass.py"]}
482
sciaso/greenpass-covid19-qrcode-decoder
refs/heads/master
/lib/datamapper.py
import json from urllib.request import urlopen class DataMapperError(Exception): pass class DataMapper: qr_data = None schema = None json = '' new_json = {} def _save_json(self, data, schema, level=0): for key, value in data.items(): try: de...
{"/lib/greenpass.py": ["/lib/datamapper.py"], "/app.py": ["/lib/greenpass.py"]}
483
sciaso/greenpass-covid19-qrcode-decoder
refs/heads/master
/app.py
from flask import Flask, redirect, request, render_template from os.path import splitext from flask_sslify import SSLify from flask_babel import Babel, gettext import os from lib.greenpass import GreenPassDecoder as greenpass_decoder is_prod = os.environ.get('PRODUCTION', None) ga_id = os.environ.get('GA_ID', None) sh...
{"/lib/greenpass.py": ["/lib/datamapper.py"], "/app.py": ["/lib/greenpass.py"]}
501
FazilovDev/GraduateWork
refs/heads/main
/main.py
from Algorithms.Winnowing import get_fingerprints, get_text_from_file from tkinter import * from tkinter import filedialog as fd import locale k = 15 q = 259#259 w = 4 class PlagiarismDetect(Frame): def __init__(self, parent): Frame.__init__(self, parent, background="white") self.parent = parent...
{"/main.py": ["/Algorithms/Winnowing.py"]}
502
FazilovDev/GraduateWork
refs/heads/main
/Algorithms/Winnowing.py
from Preprocessing.cleantext import * class Gram: def __init__(self, text, hash_gram, start_pos, end_pos): self.text = text self.hash = hash_gram self.start_pos = start_pos self.end_pos = end_pos def get_text_from_file(filename): with open(filename, 'r') as f: text = f...
{"/main.py": ["/Algorithms/Winnowing.py"]}
503
Nimunex/TFG
refs/heads/master
/Device.py
from bluepy import btle from bluepy.btle import Peripheral, DefaultDelegate import Services from Services import EnvironmentService, BatterySensor, UserInterfaceService, MotionService, DeviceDelegate ## Thingy52 Definition class Device(Peripheral): ##Thingy:52 module. Instance the class and enable to get acces...
{"/Device.py": ["/Services.py"], "/mainMotion.py": ["/Services.py", "/Device.py"]}
504
Nimunex/TFG
refs/heads/master
/call.py
##################################################################### # BLE devices handler # # A new subprocess is created for each preregistered device in: # # ./devices.mac # ########################################...
{"/Device.py": ["/Services.py"], "/mainMotion.py": ["/Services.py", "/Device.py"]}
505
Nimunex/TFG
refs/heads/master
/Services.py
from bluepy import btle from bluepy.btle import UUID,Peripheral, DefaultDelegate import os.path import struct import sys import binascii from urllib.request import urlopen import bitstring import fxpmath from bitstring import BitArray from fxpmath import Fxp #Useful functions def write_uint16(data, value, index):...
{"/Device.py": ["/Services.py"], "/mainMotion.py": ["/Services.py", "/Device.py"]}
506
Nimunex/TFG
refs/heads/master
/mainMotion.py
##Main from bluepy import btle from bluepy.btle import Peripheral, DefaultDelegate import os.path import struct import binascii import sys import datetime import time from time import time,sleep import Services from Services import EnvironmentService, BatterySensor, UserInterfaceService, MotionService, DeviceDelegate ...
{"/Device.py": ["/Services.py"], "/mainMotion.py": ["/Services.py", "/Device.py"]}
512
Frozen/jinja2-precompiler
refs/heads/master
/jinja2precompiler.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from optparse import OptionParser import logging import os import re import sys import jinja2 def option_parse(): parser = OptionParser() parser.add_option("-a", "--all", action="store_true", dest="all_files", help="all files") parser.add_option("-b", "--base", des...
{"/tests/test_bugs.py": ["/jinja2precompiler.py"]}
513
Frozen/jinja2-precompiler
refs/heads/master
/tests/test_bugs.py
# -*- coding: utf-8 -*- import jinja2 import pytest import jinja2precompiler def test_IndexError(): env = jinja2.Environment(loader=jinja2.FileSystemLoader(["."])) filter_func = jinja2precompiler.make_filter_func("", env, extensions=["html"], all_files=True) assert filter_func("test.html") == True assert fil...
{"/tests/test_bugs.py": ["/jinja2precompiler.py"]}
515
furotsu/turret_game
refs/heads/master
/player.py
import pygame import sys import math from random import randint, choice from constants import * class Player(pygame.sprite.Sprite): def __init__(self, pos_x, pos_y, screen): super(Player, self).__init__() self.screen = screen self.original_image = pygame.image.load(player_img).convert_alph...
{"/player.py": ["/constants.py"], "/menu.py": ["/constants.py"], "/terrain.py": ["/constants.py"], "/main.py": ["/controller.py", "/menu.py", "/constants.py"], "/death_screen.py": ["/constants.py"], "/controller.py": ["/menu.py", "/player.py", "/leaderboard.py", "/death_screen.py", "/terrain.py", "/constants.py"], "/le...
516
furotsu/turret_game
refs/heads/master
/menu.py
import pygame from constants import * class MenuButton: """Create a button """ def __init__(self, pos_x, pos_y, image, button_type): self.button_type = button_type self.image = pygame.image.load(image).convert_alpha() self.size = self.image.get_rect().size self.rect_pos = self...
{"/player.py": ["/constants.py"], "/menu.py": ["/constants.py"], "/terrain.py": ["/constants.py"], "/main.py": ["/controller.py", "/menu.py", "/constants.py"], "/death_screen.py": ["/constants.py"], "/controller.py": ["/menu.py", "/player.py", "/leaderboard.py", "/death_screen.py", "/terrain.py", "/constants.py"], "/le...
517
furotsu/turret_game
refs/heads/master
/terrain.py
import pygame from constants import * class Terrain: def __init__(self): pass
{"/player.py": ["/constants.py"], "/menu.py": ["/constants.py"], "/terrain.py": ["/constants.py"], "/main.py": ["/controller.py", "/menu.py", "/constants.py"], "/death_screen.py": ["/constants.py"], "/controller.py": ["/menu.py", "/player.py", "/leaderboard.py", "/death_screen.py", "/terrain.py", "/constants.py"], "/le...
518
furotsu/turret_game
refs/heads/master
/main.py
import pygame from controller import * from menu import * from constants import * def main(): pygame.init() screen = pygame.display.set_mode((display_width, display_height)) pygame.display.set_caption("Cannon defend v0.08") clock = pygame.time.Clock() controller = Controller(screen, pygame.tim...
{"/player.py": ["/constants.py"], "/menu.py": ["/constants.py"], "/terrain.py": ["/constants.py"], "/main.py": ["/controller.py", "/menu.py", "/constants.py"], "/death_screen.py": ["/constants.py"], "/controller.py": ["/menu.py", "/player.py", "/leaderboard.py", "/death_screen.py", "/terrain.py", "/constants.py"], "/le...
519
furotsu/turret_game
refs/heads/master
/death_screen.py
import pygame from constants import * class Death_screen: def __init__(self, screen, *buttons): self.main_block = pygame.Surface((display_width - 200, display_height - 100)) self.main_block.fill(pygame.Color('sienna2')) self.screen = screen self.buttons = buttons def draw(self...
{"/player.py": ["/constants.py"], "/menu.py": ["/constants.py"], "/terrain.py": ["/constants.py"], "/main.py": ["/controller.py", "/menu.py", "/constants.py"], "/death_screen.py": ["/constants.py"], "/controller.py": ["/menu.py", "/player.py", "/leaderboard.py", "/death_screen.py", "/terrain.py", "/constants.py"], "/le...
520
furotsu/turret_game
refs/heads/master
/controller.py
import pygame import sys import menu import player import leaderboard import death_screen import terrain from constants import * class Controller: """ Class that control all game actions """ def __init__(self, screen, clock): self.screen = screen self.clock = clock self.g...
{"/player.py": ["/constants.py"], "/menu.py": ["/constants.py"], "/terrain.py": ["/constants.py"], "/main.py": ["/controller.py", "/menu.py", "/constants.py"], "/death_screen.py": ["/constants.py"], "/controller.py": ["/menu.py", "/player.py", "/leaderboard.py", "/death_screen.py", "/terrain.py", "/constants.py"], "/le...
521
furotsu/turret_game
refs/heads/master
/leaderboard.py
import shelve import pygame from constants import * class Leaderboard: def __init__(self, filename, screen): self.file = shelve.open(filename) self.closed = True self.screen = screen self.sorted_leaderboard = [] self.text = [] self.rendered_text = [] self.so...
{"/player.py": ["/constants.py"], "/menu.py": ["/constants.py"], "/terrain.py": ["/constants.py"], "/main.py": ["/controller.py", "/menu.py", "/constants.py"], "/death_screen.py": ["/constants.py"], "/controller.py": ["/menu.py", "/player.py", "/leaderboard.py", "/death_screen.py", "/terrain.py", "/constants.py"], "/le...
522
furotsu/turret_game
refs/heads/master
/constants.py
import os.path display_height = 600 display_width = 1000 CHARGER_HEIGHT = 60 COOLDOWN_WIDTH = 50 PLAYER_POS_X = 50 PLAYER_POS_Y = 430 START_CANNON_ANGLE = 25 MISSILE_POS_X = 70 MISSILE_POS_Y = 470 ACCELERATION = -2 MAX_SHOT_POWER = 50 POWER_CHARGE = 5 COOLDOWN = 40 ENEMY_VELOCITY_X = 0 ENEMY_VELOCITY_Y = 4 TIME_BE...
{"/player.py": ["/constants.py"], "/menu.py": ["/constants.py"], "/terrain.py": ["/constants.py"], "/main.py": ["/controller.py", "/menu.py", "/constants.py"], "/death_screen.py": ["/constants.py"], "/controller.py": ["/menu.py", "/player.py", "/leaderboard.py", "/death_screen.py", "/terrain.py", "/constants.py"], "/le...
529
junprog/contrastive-baseline
refs/heads/main
/train.py
from utils.contrastive_trainer import CoTrainer from utils.simsiam_trainer import SimSiamTrainer import argparse import os import math import torch args = None def parse_args(): parser = argparse.ArgumentParser(description='Train ') parser.add_argument('--data-dir', default='/mnt/hdd02/process-ucf', ...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
530
junprog/contrastive-baseline
refs/heads/main
/datasets/cifar10.py
from typing import Callable, Optional import random from PIL import Image import numpy as np import torch import torchvision from torchvision import transforms from torchvision.datasets import CIFAR10 np.random.seed(765) random.seed(765) class SupervisedPosNegCifar10(torch.utils.data.Dataset): def __init__(self...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
531
junprog/contrastive-baseline
refs/heads/main
/models/l2_contrastive_loss.py
import torch import torch.nn as nn import torch.nn.functional as F class L2ContrastiveLoss(nn.Module): """ Contrastive loss Takes embeddings of two samples and a target label == 1 if samples are from the same class and label == 0 otherwise Args : output1 & output2 : [N, dim] target : [...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
532
junprog/contrastive-baseline
refs/heads/main
/datasets/spatial.py
# in : original image # out : cropped img1 (anchor) # cropped img2 (compete) # target (positive img1 - img2 : 1, negative img1 - img2 : 0) import os from glob import glob import random import numpy as np from PIL import Image from PIL import ImageFilter import torch import torch.utils.data as data impor...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
533
junprog/contrastive-baseline
refs/heads/main
/exp.py
import torch import torchvision from PIL import Image from matplotlib import pyplot as plt import random model = torchvision.models.__dict__['vgg19']() print(model) img = torch.rand(1,3,256,256) out = model.features(img) print(out.size()) import torchvision.transforms as trans crop = trans.RandomCrop(224) img = tor...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
534
junprog/contrastive-baseline
refs/heads/main
/models/create_linear_eval_model.py
import os from collections import OrderedDict import torch import torch.nn as nn import torchvision.models as models class LinearEvalModel(nn.Module): def __init__(self, arch='vgg19', dim=512, num_classes=10): super().__init__() if arch == 'vgg19': self.features = models.vgg19().featu...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
535
junprog/contrastive-baseline
refs/heads/main
/models/cosine_contrastive_loss.py
import torch import torch.nn as nn import torch.nn.functional as F def D(p, z, version='simplified'): # negative cosine similarity if version == 'original': z = z.detach() # stop gradient p = F.normalize(p, dim=1) # l2-normalize z = F.normalize(z, dim=1) # l2-normalize return -(...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
536
junprog/contrastive-baseline
refs/heads/main
/utils/helper.py
import os import numpy as np import torch def worker_init_fn(worker_id): np.random.seed(np.random.get_state()[1][0] + worker_id) class Save_Handle(object): """handle the number of """ def __init__(self, max_num): self.save_list = [] ...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
537
junprog/contrastive-baseline
refs/heads/main
/utils/visualizer.py
import os import numpy as np from PIL import Image import torch import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt ### torch テンソル(バッチ)を受け取って、args.div_numに応じて、描画する mean = np.array([0.485, 0.456, 0.406]) std = np.array([0.229, 0.224, 0.225]) def invnorm(img, N): img = img[N,:,:,:].to('c...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
538
junprog/contrastive-baseline
refs/heads/main
/train_val_split.py
import os from glob import glob import numpy as np import argparse def parse_args(): parser = argparse.ArgumentParser(description='Test ') parser.add_argument('--data-dir', default='/mnt/hdd02/shibuya_scramble', help='original data directory') args = parser.parse_args() return ...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
539
junprog/contrastive-baseline
refs/heads/main
/utils/simsiam_trainer.py
import os import sys import time import logging import numpy as np import torch from torch import optim from torch.optim import lr_scheduler from torch.utils.data import DataLoader import torchvision.models as models import torchvision.datasets as datasets from models.simple_siamese_net import SiameseNetwork from mo...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
540
junprog/contrastive-baseline
refs/heads/main
/models/simple_siamese_net_tmp.py
import torch import torch.nn as nn class projection_MLP(nn.Module): def __init__(self, in_dim=512, hidden_dim=512, out_dim=512): # bottleneck structure super().__init__() self.layers = nn.Sequential( nn.Linear(in_dim, hidden_dim), nn.ReLU(), nn.Linear(hi...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
541
junprog/contrastive-baseline
refs/heads/main
/utils/contrastive_trainer.py
import os import sys import time import logging import numpy as np import torch from torch import optim from torch.optim import lr_scheduler from torch.utils.data import DataLoader import torchvision.models as models import torchvision.datasets as datasets from models.siamese_net import SiameseNetwork from models.l2...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
542
junprog/contrastive-baseline
refs/heads/main
/linear_eval.py
import os import argparse import logging import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim import lr_scheduler from torch.utils.data import DataLoader import torchvision.models as models from datasets.cifar10 import get_simsiam_dataset f...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
543
junprog/contrastive-baseline
refs/heads/main
/models/siamese_net.py
import torch import torch.nn as nn class SiameseNetwork(nn.Module): def __init__(self, model, pretrained=False, simple_model=False): super(SiameseNetwork, self).__init__() self.simple_model = simple_model if simple_model: self.features = nn.Sequential(nn.Conv2d(3, 32, 5), nn.PRe...
{"/train.py": ["/utils/contrastive_trainer.py", "/utils/simsiam_trainer.py"], "/utils/simsiam_trainer.py": ["/models/cosine_contrastive_loss.py", "/utils/helper.py", "/utils/visualizer.py", "/datasets/spatial.py", "/datasets/cifar10.py"], "/utils/contrastive_trainer.py": ["/models/siamese_net.py", "/models/l2_contrasti...
544
EricHughesABC/T2EPGviewer
refs/heads/master
/t2fit.py
# -*- coding: utf-8 -*- """ Created on Sat Mar 3 11:30:41 2018 @author: ERIC """ import numpy as np import lmfit from epg import cpmg_epg_b1 as cpmg_epg_b1_c from scipy import integrate mxyz90 = np.fromfile( 'epg/mxyz90.txt', sep=' ' ) mxyz180 = np.fromfile('epg/mxyz180.txt', sep=' ') mxyz90 = mxyz9...
{"/visionplot_widgets.py": ["/t2fit.py", "/ImageData.py", "/epgT2paramsDialog.py", "/azzT2paramsDialog.py"], "/simple_pandas_plot.py": ["/visionplot_widgets.py", "/mriplotwidget.py", "/ImageData.py"]}
545
EricHughesABC/T2EPGviewer
refs/heads/master
/visionplot_widgets.py
# -*- coding: utf-8 -*- """ Created on Wed Feb 28 13:11:07 2018 @author: neh69 """ import sys import numpy as np #import matplotlib import pandas as pd #import mplcursors from uncertainties import ufloat import t2fit import lmfit as lm from matplotlib import pyplot as plt #import seaborn as sns f...
{"/visionplot_widgets.py": ["/t2fit.py", "/ImageData.py", "/epgT2paramsDialog.py", "/azzT2paramsDialog.py"], "/simple_pandas_plot.py": ["/visionplot_widgets.py", "/mriplotwidget.py", "/ImageData.py"]}
546
EricHughesABC/T2EPGviewer
refs/heads/master
/epgT2paramsDialog.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'epg_fit_parameters_dialog.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! import lmfit as lm from PyQt5 import QtCore, QtGui, QtWidgets class EpgT2paramsDialog(object): ...
{"/visionplot_widgets.py": ["/t2fit.py", "/ImageData.py", "/epgT2paramsDialog.py", "/azzT2paramsDialog.py"], "/simple_pandas_plot.py": ["/visionplot_widgets.py", "/mriplotwidget.py", "/ImageData.py"]}
547
EricHughesABC/T2EPGviewer
refs/heads/master
/mriplotwidget.py
# -*- coding: utf-8 -*- """ Created on Wed Apr 17 14:34:43 2019 @author: neh69 """ import numpy as np import matplotlib from matplotlib import pyplot as plt #import seaborn as sns from matplotlib.backends.qt_compat import QtCore, QtWidgets, is_pyqt5 #import seaborn as sns if is_pyqt5(): print("...
{"/visionplot_widgets.py": ["/t2fit.py", "/ImageData.py", "/epgT2paramsDialog.py", "/azzT2paramsDialog.py"], "/simple_pandas_plot.py": ["/visionplot_widgets.py", "/mriplotwidget.py", "/ImageData.py"]}