index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
88,459 | sidnarayanan/grapple | refs/heads/master | /scripts/training/old/train.py | #!/usr/bin/env python3
from grapple import utils
p = utils.ArgumentParser()
p.add_args(
'--dataset_pattern', '--output', ('--n_epochs', p.INT),
('--embedding_size', p.INT), ('--hidden_size', p.INT), ('--feature_size', p.INT),
('--num_attention_heads', p.INT), ('--intermediate_size', p.INT),
('--label_s... | {"/scripts/training/papu/train_pu.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/grapple/model/banded.py": ["/grapple/model/met_layer.py"], "/grapple/model/sparse.py": ["/grapple/model/met_layer.py"], "/scripts/training/old/train_pumet.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/scripts/t... |
88,460 | sidnarayanan/grapple | refs/heads/master | /scripts/data/build_dataset.py | #!/usr/bin/env python3
from grapple.data.cern import Event, Record, Grid
from grapple.utils import *
import numpy as np
from tqdm import trange
parser = ArgumentParser()
parser.add_args(
'--minbias', '--hard', '--output',
('--npu', {'type': int}),
('--nmax', {'type': int}),
('--nperfile', {'type': ... | {"/scripts/training/papu/train_pu.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/grapple/model/banded.py": ["/grapple/model/met_layer.py"], "/grapple/model/sparse.py": ["/grapple/model/met_layer.py"], "/scripts/training/old/train_pumet.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/scripts/t... |
88,461 | sidnarayanan/grapple | refs/heads/master | /scripts/data/build_dataset_cms.py | #!/usr/bin/env python3
from grapple.data.cms import cms_to_grapple
from grapple.utils import *
import numpy as np
import os
from tqdm import tqdm
from loguru import logger
parser = ArgumentParser()
parser.add_args(
('--infiles', {'nargs': '+', 'required': True}),
('--outdir', {'required': True}),
)
args =... | {"/scripts/training/papu/train_pu.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/grapple/model/banded.py": ["/grapple/model/met_layer.py"], "/grapple/model/sparse.py": ["/grapple/model/met_layer.py"], "/scripts/training/old/train_pumet.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/scripts/t... |
88,462 | sidnarayanan/grapple | refs/heads/master | /grapple/model/met_layer.py | import torch
import torch.nn as nn
class METLayer(nn.Module):
def __init__(self, config):
super().__init__()
self.poly_degree = config.met_poly_degree
hidden_size = config.met_poly_degree + 1 # + config.feature_size
self.linears = nn.ModuleList([nn.Linear(hidden_size, hidden_size... | {"/scripts/training/papu/train_pu.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/grapple/model/banded.py": ["/grapple/model/met_layer.py"], "/grapple/model/sparse.py": ["/grapple/model/met_layer.py"], "/scripts/training/old/train_pumet.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/scripts/t... |
88,463 | sidnarayanan/grapple | refs/heads/master | /grapple/data/torch.py | import torch
from torch.utils.data import DataLoader, IterableDataset
from loguru import logger
from glob import glob
import numpy as np
from tqdm import tqdm
from itertools import chain
import math
class PUDataset(IterableDataset):
def __init__(self, config):
self._files = list(chain.from_iterable(
... | {"/scripts/training/papu/train_pu.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/grapple/model/banded.py": ["/grapple/model/met_layer.py"], "/grapple/model/sparse.py": ["/grapple/model/met_layer.py"], "/scripts/training/old/train_pumet.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/scripts/t... |
88,464 | sidnarayanan/grapple | refs/heads/master | /scripts/misc/overlaid.py | #!/usr/bin/env python
from os import getenv
import os
from PandaCore.Utils.root import root
from PandaCore.Tools.Misc import *
from PandaCore.Utils.load import *
import PandaAnalysis.T3.job_utilities as utils
from PandaAnalysis.Flat.analysis import *
from PandaCore.Tools.root_interface import *
from PandaCore.Tools... | {"/scripts/training/papu/train_pu.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/grapple/model/banded.py": ["/grapple/model/met_layer.py"], "/grapple/model/sparse.py": ["/grapple/model/met_layer.py"], "/scripts/training/old/train_pumet.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/scripts/t... |
88,465 | sidnarayanan/grapple | refs/heads/master | /scripts/training/old/infer_pumet.py | #!/usr/bin/env python3
from grapple import utils
p = utils.ArgumentParser()
p.add_args(
('--dataset_pattern', p.MANY), '--weights', ('--mask_charged', p.STORE_TRUE),
('--embedding_size', p.INT), ('--hidden_size', p.INT), ('--feature_size', p.INT),
('--num_attention_heads', p.INT), ('--intermediate_size', ... | {"/scripts/training/papu/train_pu.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/grapple/model/banded.py": ["/grapple/model/met_layer.py"], "/grapple/model/sparse.py": ["/grapple/model/met_layer.py"], "/scripts/training/old/train_pumet.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/scripts/t... |
88,466 | sidnarayanan/grapple | refs/heads/master | /grapple/data/cern.py | import numpy as np
NGRID = 500
NEUTRALS = set([22, 2112])
MAXPARTICLES = 2000
def feta(pt, pz):
return -np.log(np.tan(0.5 * np.arctan(np.abs(pt / pz)))) * np.sign(pz)
def ftheta(eta):
return 2 * np.exp(np.exp(-eta))
def fphi(px, py):
phi = np.arctan(py / px)
if px < 0:
if py > 0:
... | {"/scripts/training/papu/train_pu.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/grapple/model/banded.py": ["/grapple/model/met_layer.py"], "/grapple/model/sparse.py": ["/grapple/model/met_layer.py"], "/scripts/training/old/train_pumet.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/scripts/t... |
88,467 | sidnarayanan/grapple | refs/heads/master | /grapple/model/dense.py | from transformers.modeling_albert import *
from transformers.modeling_bert import *
import torch
from torch import nn
Transformer = AlbertTransformer
class Jane(nn.Module):
def __init__(self, config):
super().__init__()
config.output_attentions = False
config.output_hidden_states = Fa... | {"/scripts/training/papu/train_pu.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/grapple/model/banded.py": ["/grapple/model/met_layer.py"], "/grapple/model/sparse.py": ["/grapple/model/met_layer.py"], "/scripts/training/old/train_pumet.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/scripts/t... |
88,468 | sidnarayanan/grapple | refs/heads/master | /grapple/data/__init__.py | from .torch import *
from . import cern, cms
| {"/scripts/training/papu/train_pu.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/grapple/model/banded.py": ["/grapple/model/met_layer.py"], "/grapple/model/sparse.py": ["/grapple/model/met_layer.py"], "/scripts/training/old/train_pumet.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/scripts/t... |
88,469 | sidnarayanan/grapple | refs/heads/master | /grapple/metrics.py | import torch
from torch import nn
from .utils import t2n
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import pickle
import pandas as pd
import seaborn as sns
import pyjet
from pyjet.testdata import get_event
from loguru import logger
EPS = 1e-4
from ._old import *
... | {"/scripts/training/papu/train_pu.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/grapple/model/banded.py": ["/grapple/model/met_layer.py"], "/grapple/model/sparse.py": ["/grapple/model/met_layer.py"], "/scripts/training/old/train_pumet.py": ["/grapple/data/__init__.py", "/grapple/metrics.py"], "/scripts/t... |
88,484 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/buchi_wk/models.py | from django.db import models
from django.conf import settings
# Create your models here.
class BuchiMdl(models.Model):
#fld_Auto = models.AutoField( )
#fld_BigAuto = models.BigAutoField( )
#fld_SmallAuto = models.SmallAutoField( )
#fld_UUID = models.UUIDF... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,485 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/polls/__init__.py | # このディレクトリが Python パッケージであることを Python に知らせるための空のファイルです。
| {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,486 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/buchi_wk/urls.py | from django.urls import path
from . import views
#Django にどのアプリのものが判断可能にさせるために名前空間を明らかにする。
app_name = 'buchi_wk'
#path(
# route 必須) ・URL パターンを含む文字列です。パターンはGETやPOSTのパラメーター、そしてドメイン名を検索しません。
# view 必須) ・Django がマッチする正規表現を見つけると、Django は指定されたビュー関数を呼び出します。
# 第一引数にHttpRequest オブジェクトを、
# ... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,487 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/polls/models.py | import datetime
from django.db import models
from django.utils import timezone
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __str__(self):
return self.question_text
def was_published_recently(self):
... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,488 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/buchi_wk/migrations/0002_auto_20200811_0928.py | # Generated by Django 3.0 on 2020-08-11 09:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('buchi_wk', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='buchimdl',
name='fld_Binary',
... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,489 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/buchiDjango3/__init__.py | """
Package for buchiDjango3.
"""
| {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,490 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/polls/views.py | ## Create your views here.
# 各ビューには二つの役割があります:
# 一つはリクエストされたページのコンテンツを含む HttpResponse オブジェクトを返すこと、
# もう一つは Http404 のような例外の送出です。
# それ以外の処理はユーザ次第です。
#
# ビューはデータベースからレコードを読みだしても、読み出さなくてもかまいません。
# Django のテンプレートシステム、あるいはサードパーティの Python テンプ レートシステムを
# 使ってもよいですし、使わなくてもかまいません。
# PDF ファイルを生成しても、 XML を出力しても、 ZIP ファイルをその場で生... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,491 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/buchi_wk/migrations/0001_initial.py | # Generated by Django 3.0 on 2020-08-11 02:16
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='BuchiMdl',
fields=[
('id', models.AutoField(a... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,492 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/buchi_wk/admin.py | from django.contrib import admin
from .models import BuchiMdl
# Register your models here.
class BuchiMdlAdmin(admin.ModelAdmin):
fields = [
'fld_Char'
,'fld_Text'
,'fld_URL'
,'fld_Email'
,'fld_Slug'
,'fld_FilePath'
,'fld_GenericIPAddress'
,'fld_In... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,493 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/buchi_wk/views.py | from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
# Create your views here.
def index(request):
return render(request, 'buchi_wk/index.html' )
def try_bootstrap(request):
return render(request, 'buchi_wk/try_bootstrap.htm... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,494 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/polls/admin.py | from django.contrib import admin
from .models import Choice, Question
# Register your models here.
# ここに登録することで、既定の管理画面上にDBメンテの対象として出てくる。
### --------- class宣言 ---------
#class ChoiceInline(admin.StackedInline):
# model = Choice
# extra = 3 #新規追加エリア、3つ用意。
## ↓↓ 表形式に(StackedInline→TabularInline)
class Choi... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,495 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/buchiDjango3/urls.py | """
buchiDjango3 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Clas... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,496 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/buchiDjango3/settings.py | """
Django settings for buchiDjango3 project.
Based on by 'django-admin startproject' using Django 2.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import o... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,497 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/buchi_wk/__init__.py | """
実験場
"""
| {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,498 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/buchi_wk/apps.py | from django.apps import AppConfig
class buchi_wkConfig(AppConfig):
name = 'buchi_wk'
| {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,499 | YnYnHnFn/buchiDjango3 | refs/heads/master | /buchiDjango3/polls/urls.py | from django.urls import path
from . import views
#Django にどのアプリのものが判断可能にさせるために名前空間を明らかにする。
app_name = 'polls'
#path(
# route 必須) ・URL パターンを含む文字列です。パターンはGETやPOSTのパラメーター、そしてドメイン名を検索しません。
# view 必須) ・Django がマッチする正規表現を見つけると、Django は指定されたビュー関数を呼び出します。
# 第一引数にHttpRequest オブジェクトを、
# ... | {"/buchiDjango3/buchi_wk/urls.py": ["/buchiDjango3/buchi_wk/__init__.py"], "/buchiDjango3/polls/views.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/buchi_wk/admin.py": ["/buchiDjango3/buchi_wk/models.py"], "/buchiDjango3/polls/admin.py": ["/buchiDjango3/polls/models.py"], "/buchiDjango3/polls/urls.py": ["/buch... |
88,529 | dharmenpunjani/smt-semparse | refs/heads/master | /src/config.py | import yaml
import logging
class Config:
def __init__(self, settings_path, dependencies_path):
with open(settings_path) as settings_file:
settings = yaml.load(settings_file)
with open(dependencies_path) as dependencies_file:
dependencies = yaml.load(dependencies_file)
self.entries = {}
... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,530 | dharmenpunjani/smt-semparse | refs/heads/master | /src/moses.py | import logging
import os
import subprocess
import gzip
class Moses:
def __init__(self, config):
self.config = config
def run_train(self):
args = [self.config.moses_train,
'--root-dir', self.config.experiment_dir,
'--corpus', '%s/%s' % (self.config.experiment_dir,
... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,531 | dharmenpunjani/smt-semparse | refs/heads/master | /src/smt_semparse_config.py | from config import Config
class SMTSemparseConfig(Config):
def __init__(self, settings_path, dependencies_path):
Config.__init__(self, settings_path, dependencies_path)
self.put('data_dir', '%s/data/%s' % (self.smt_semparse, self.corpus))
if self.np:
self.train_name = 'train.np'
else:
... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,532 | dharmenpunjani/smt-semparse | refs/heads/master | /src/functionalizer.py | import logging
import util
import sys
class Functionalizer:
def __init__(self, config):
self.config = config
def run(self):
hyp_file = open('%s/hyp.mrl.nbest' % self.config.experiment_dir)
fun_file = open('%s/hyp.fun' % self.config.experiment_dir, 'w')
hypsets = []
hypset = []
last_eid =... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,533 | dharmenpunjani/smt-semparse | refs/heads/master | /run.py | #!/usr/bin/env python2
import os
import datetime
import logging
from src.evaluator import Evaluator
from src.smt_semparse_config import SMTSemparseConfig
from src.smt_semparse_experiment import SMTSemparseExperiment
LOGFILE_NAME = 'run.log'
def run_one(config):
# create work dir for this run
# moses can't handle... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,534 | dharmenpunjani/smt-semparse | refs/heads/master | /src/extractor.py | from nltk.stem.porter import PorterStemmer
from nltk.stem.snowball import GermanStemmer
import os
import re
import util
import xml.etree.ElementTree as ET
class IdStemmer:
def stem(self, word):
return word
class Extractor:
NP_WEIGHT = 50
def __init__(self, config):
self.config = config
if config.s... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,535 | dharmenpunjani/smt-semparse | refs/heads/master | /demo.py | #!/usr/bin/env python2
import sys
import subprocess
from nltk.stem.porter import PorterStemmer
from src.functionalizer import Functionalizer
import re
import os
def pretty_print_prolog(ans):
ans = re.sub(r'\w+\(([^)]+)\)', r'\1', ans)
parts = ans[1:-2].split(',')
print '\n'.join(parts)
#for part in parts:
#... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,536 | dharmenpunjani/smt-semparse | refs/heads/master | /src/geo_world.py | import subprocess
class GeoWorld:
def __init__(self, config):
self.config = config
def run(self):
self.write_queries()
infile = open('%s/eval.pl' % self.config.experiment_dir)
log = open('%s/prolog.log' % self.config.experiment_dir, 'w')
outfile = open('%s/eval.out' % self.config.experiment_... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,537 | dharmenpunjani/smt-semparse | refs/heads/master | /src/query_comparer.py | class QueryComparer:
def __init__(self, config):
self.config = config
def run(self):
hyp_file = open('%s/hyp.fun' % self.config.experiment_dir)
ref_file = open('%s/test.fun' % self.config.experiment_dir)
out_file = open('%s/eval.scored' % self.config.experiment_dir, 'w')
hyps = {}
for li... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,538 | dharmenpunjani/smt-semparse | refs/heads/master | /src/evaluator.py | class Evaluator:
def __init__(self, config):
self.config = config
def run(self):
if self.config.run == 'debug':
s_p, s_r, s_f = self.score('%s/1' % self.config.work_dir)
elif self.config.run == 'dev':
s_p = 0
s_r = 0
s_f = 0
for i in range(10):
p, r, f = self.scor... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,539 | dharmenpunjani/smt-semparse | refs/heads/master | /filter.py | #!/usr/bin/env python2
import sys
while True:
lfrac = sys.stdin.readline()
if not lfrac:
break
monolingual = sys.stdin.readline()
ul_only = sys.stdin.readline()
print lfrac, monolingual, ul_only,
p = 0
r = 0
f = 0
for i in range(10):
lp = float(sys.stdin.readline().split()[1])
lr = fl... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,540 | dharmenpunjani/smt-semparse | refs/heads/master | /src/srilm.py | import logging
import subprocess
class SRILM:
def __init__(self, config):
self.config = config
def run_ngram_count(self):
log = open('%s/lm.log' % self.config.experiment_dir, 'w')
p = subprocess.Popen([self.config.srilm_ngram_count,
'-text', '%s/train.%s.lm' % (self.config.e... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,541 | dharmenpunjani/smt-semparse | refs/heads/master | /src/smt_semparse_experiment.py | import logging
import os
from extractor import Extractor
from functionalizer import Functionalizer
#from slot_checker import SlotChecker
from srilm import SRILM
from moses import Moses
from nl_reweighter import NLReweighter
from geo_world import GeoWorld
from query_comparer import QueryComparer
from bleu_scorer import ... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,542 | dharmenpunjani/smt-semparse | refs/heads/master | /src/nl_reweighter.py | import gzip
import re
from nlp_tools.hypergraph import Hypergraph
import itertools
import logging
from collections import defaultdict
import os
class Rule:
MOSES_SYMBOL = '[X]'
def __init__(self, rule_id, symbol, src, tgt, coindexing):
self.rule_id = rule_id
self.symbol = symbol
self.src = src
se... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,543 | dharmenpunjani/smt-semparse | refs/heads/master | /src/bleu_scorer.py | import os
import subprocess
import sys
class BLEUScorer:
def __init__(self, config):
self.config = config
def run(self):
args = [self.config.bleu_eval, '%s/test.nl' % self.config.experiment_dir]
infile = open('%s/hyp.nl' % self.config.experiment_dir)
nullfile = open(os.devnull, 'w')
p = subpr... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,544 | dharmenpunjani/smt-semparse | refs/heads/master | /src/util.py | import re
from collections import defaultdict
ARITY_SEP = '@'
ARITY_STR = 's'
ARITY_ANY = '*'
def after_nth(mrl, token, n):
#print mrl, token
while n > 0:
m = re.search(r'\b%s\b' % token, mrl)
#m = re.search(r'(^|[(, ])%s[(),]' % token, mrl)
mrl = mrl[m.end()-1:]
n = n - 1;
return mrl
def count... | {"/run.py": ["/src/evaluator.py", "/src/smt_semparse_config.py", "/src/smt_semparse_experiment.py"]} |
88,547 | asejouk/Deep_coxPh_survival_model | refs/heads/master | /lib_1/autoencoder_model.py | from lib_1.support_function import *
import tensorflow as tf
import numpy as np
import pandas as pd
import math
#import matplotlib.pyplot as plt
def autoencoder_model_tf(training_filelist,validation_filelist,num_HL, learning_rate,lambda_value, num_epochs, minibatch_size, restore_model, model_path,output_file,pr... | {"/lib_1/autoencoder_model.py": ["/lib_1/support_function.py"], "/lib_1/feature_extraction.py": ["/lib_1/support_function.py"]} |
88,548 | asejouk/Deep_coxPh_survival_model | refs/heads/master | /lib_1/feature_extraction.py | from lib_1.support_function import *
import tensorflow as tf
import numpy as np
import pandas as pd
import math
#import matplotlib.pyplot as plt
def feature_extraction_model(training_filelist,test_filelist,num_HL , model_path,training_files, test_files, training_output, test_output):
tf.reset_default_graph... | {"/lib_1/autoencoder_model.py": ["/lib_1/support_function.py"], "/lib_1/feature_extraction.py": ["/lib_1/support_function.py"]} |
88,549 | asejouk/Deep_coxPh_survival_model | refs/heads/master | /lib_1/support_function.py | import tensorflow as tf
import numpy as np
import pandas as pd
import os
#tf.contrib.layers.xavier_initializer()
def initialize_parameters():
tf.set_random_seed(1)
parameters = {
"encoder_w1" : tf.get_variable("encoder_w1", shape= [5,5,5,1,16], dtype= tf.float32, initializer = tf.contrib.layers.varia... | {"/lib_1/autoencoder_model.py": ["/lib_1/support_function.py"], "/lib_1/feature_extraction.py": ["/lib_1/support_function.py"]} |
88,550 | asejouk/Deep_coxPh_survival_model | refs/heads/master | /lib_1/contour.py |
import numpy as np
from scipy.sparse import csc_matrix
from collections import defaultdict
import os
import shutil
import operator
import warnings
import scipy.ndimage as nd
def fill_contour(contour_arr):
# get initial pixel positions
pixel_positions = np.array([(i, j) for i, j in zip(np.where(contour_arr... | {"/lib_1/autoencoder_model.py": ["/lib_1/support_function.py"], "/lib_1/feature_extraction.py": ["/lib_1/support_function.py"]} |
88,576 | rodrigo-fonseca-oliveira/hedgedata | refs/heads/master | /scripts/fill_db.py | #!/usr/local/bin/python3
from hedgedata import Data, symbols
from arctic import Arctic
a = Arctic('localhost')
d = Data(a)
d.cache(symbols())
| {"/scripts/fetch_data.py": ["/hedgedata/backfill.py", "/hedgedata/data.py"], "/hedgedata/data.py": ["/hedgedata/backfill.py", "/hedgedata/fetch.py", "/hedgedata/validate.py"], "/hedgedata/backfill.py": ["/hedgedata/fetch.py"]} |
88,577 | rodrigo-fonseca-oliveira/hedgedata | refs/heads/master | /hedgedata/fetch.py | import pyEX as p
def whichFetch(field):
if field == 'DAILY':
return fetchDaily
elif field == 'TICK':
return fetchMinute
elif field == 'STATS':
return fetchStats
elif field == 'PEERS':
return fetchPeers
elif field == 'NEWS':
return fetchNews
elif field ==... | {"/scripts/fetch_data.py": ["/hedgedata/backfill.py", "/hedgedata/data.py"], "/hedgedata/data.py": ["/hedgedata/backfill.py", "/hedgedata/fetch.py", "/hedgedata/validate.py"], "/hedgedata/backfill.py": ["/hedgedata/fetch.py"]} |
88,578 | rodrigo-fonseca-oliveira/hedgedata | refs/heads/master | /tests/test_all.py | # accurate coverage
from hedgeme.cache import *
print('nothing to report')
| {"/scripts/fetch_data.py": ["/hedgedata/backfill.py", "/hedgedata/data.py"], "/hedgedata/data.py": ["/hedgedata/backfill.py", "/hedgedata/fetch.py", "/hedgedata/validate.py"], "/hedgedata/backfill.py": ["/hedgedata/fetch.py"]} |
88,579 | rodrigo-fonseca-oliveira/hedgedata | refs/heads/master | /scripts/fetch_data.py | #!/usr/bin/env python
"""
Fetch data
"""
import os
import os.path
import pandas as pd
from hedgedata.backfill import whichBackfill
from hedgedata.data import FIELDS
from hedgedata.distributor import Distributer
from hedgedata.log_utils import log
# from hedgedata import sp500_constituents
_DISTRIBUTOR = Distributer.... | {"/scripts/fetch_data.py": ["/hedgedata/backfill.py", "/hedgedata/data.py"], "/hedgedata/data.py": ["/hedgedata/backfill.py", "/hedgedata/fetch.py", "/hedgedata/validate.py"], "/hedgedata/backfill.py": ["/hedgedata/fetch.py"]} |
88,580 | rodrigo-fonseca-oliveira/hedgedata | refs/heads/master | /scripts/validate_db.py | #!/usr/local/bin/python3
from hedgedata import Data
from arctic import Arctic
a = Arctic('localhost')
d = Data(a)
d.validate()
| {"/scripts/fetch_data.py": ["/hedgedata/backfill.py", "/hedgedata/data.py"], "/hedgedata/data.py": ["/hedgedata/backfill.py", "/hedgedata/fetch.py", "/hedgedata/validate.py"], "/hedgedata/backfill.py": ["/hedgedata/fetch.py"]} |
88,581 | rodrigo-fonseca-oliveira/hedgedata | refs/heads/master | /hedgedata/validate.py |
SKIP_VALIDATION = [
]
| {"/scripts/fetch_data.py": ["/hedgedata/backfill.py", "/hedgedata/data.py"], "/hedgedata/data.py": ["/hedgedata/backfill.py", "/hedgedata/fetch.py", "/hedgedata/validate.py"], "/hedgedata/backfill.py": ["/hedgedata/fetch.py"]} |
88,582 | rodrigo-fonseca-oliveira/hedgedata | refs/heads/master | /hedgedata/data.py | import pyEX as p
import pandas as pd
from datetime import datetime
from .utils import never, last_close, this_week, append, business_days, last_month, yesterday
from .distributor import Distributer
from .backfill import whichBackfill
from .fetch import whichFetch
from .log_utils import log
from .validate import SKIP_VA... | {"/scripts/fetch_data.py": ["/hedgedata/backfill.py", "/hedgedata/data.py"], "/hedgedata/data.py": ["/hedgedata/backfill.py", "/hedgedata/fetch.py", "/hedgedata/validate.py"], "/hedgedata/backfill.py": ["/hedgedata/fetch.py"]} |
88,583 | rodrigo-fonseca-oliveira/hedgedata | refs/heads/master | /hedgedata/backfill.py | import pyEX as p
from datetime import timedelta
from functools import lru_cache
from .utils import last_month, last_close
from .fetch import fetch, \
fetchStats as backfillStats, \
fetchPeers as backfillPeers, \
fetchNews as backfillNews, \
fet... | {"/scripts/fetch_data.py": ["/hedgedata/backfill.py", "/hedgedata/data.py"], "/hedgedata/data.py": ["/hedgedata/backfill.py", "/hedgedata/fetch.py", "/hedgedata/validate.py"], "/hedgedata/backfill.py": ["/hedgedata/fetch.py"]} |
88,584 | rodrigo-fonseca-oliveira/hedgedata | refs/heads/master | /hedgedata/cache_bak.py | import copy
import os
import os.path
import numpy as np
import pandas as pd
import pyEX as p
import requests
import sys
from tqdm import tqdm
from urllib.error import HTTPError
from multiprocessing.pool import ThreadPool
from functools import partial
from datetime import datetime
from .define import FIELDS, OTHERS, ETF... | {"/scripts/fetch_data.py": ["/hedgedata/backfill.py", "/hedgedata/data.py"], "/hedgedata/data.py": ["/hedgedata/backfill.py", "/hedgedata/fetch.py", "/hedgedata/validate.py"], "/hedgedata/backfill.py": ["/hedgedata/fetch.py"]} |
88,606 | HackerPemula/Curvi | refs/heads/master | /services/topic_services.py | from models.topic_model import Topic
from services.helper import exception
class TopicService():
@staticmethod
@exception
def get_topic(param):
result = Topic.objects.exec_sp_tosingle('jh_Topic_GetTopic', param)
topic = None
if result:
topic = Topic(TopicID=result[0], En... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,607 | HackerPemula/Curvi | refs/heads/master | /pdfconverter/urls.py | from django.urls import path
from . import views
urlpatterns = [
path('submit', views.PDFConverter.as_view(), name='submit'),
]
| {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,608 | HackerPemula/Curvi | refs/heads/master | /app/views/sub_view.py | from django.shortcuts import render
from django.views.generic import TemplateView
# Create your views here.
class Filter(TemplateView):
def get(self, request, **kwargs):
return render(request, "subview/filter.html")
class View(TemplateView):
def get(self, request, **kwargs):
return render(requ... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,609 | HackerPemula/Curvi | refs/heads/master | /worker/views.py | from django.shortcuts import render
import time
import json
import logging
from Curvi.celery import app
import worker.process as wprocess
import nltk
# Create your views here.
@app.task
def process_plsa():
try:
wprocess.preprocess.start_preprocessing()
except Exception as e:
logging.exception(... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,610 | HackerPemula/Curvi | refs/heads/master | /auth_v2/auth_model.py | from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from models.managers.sp_managers import StoredProcedureManager
class User(AbstractBaseUser):
objects = StoredProcedureManager('CurviDB')
class Meta:
app_label = 'auth_v2'
StaffName = models.CharField(max_length=5... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,611 | HackerPemula/Curvi | refs/heads/master | /worker/process/plsa.py | import nltk
import logging
import numpy as np
from sklearn.preprocessing import normalize
parameters = {'num_of_topic': 5, 'num_of_iter': 5}
def build_vocabulary(docs):
'''
Construct a list of unique words in the corpus.
'''
# ** ADD ** #
# exclude words that appear in 90%+ of the documents
# ... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,612 | HackerPemula/Curvi | refs/heads/master | /app/views/auth_view.py | from django.shortcuts import render
from django.views.generic import TemplateView
from django.forms.models import model_to_dict
from django.http import HttpResponse, HttpResponseRedirect
from auth_v2.auth_backend import AuthBackend
import json
# Create your views here.
class Login(TemplateView):
def post(self, req... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,613 | HackerPemula/Curvi | refs/heads/master | /app/views/hrportal_view.py | from django.shortcuts import render
from django.views.generic import TemplateView
from django.utils.decorators import make_middleware_decorator
# Create your views here.
class HRPortal(TemplateView):
def get(self, request, **kwargs):
return render(request, "hrportal.html") | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,614 | HackerPemula/Curvi | refs/heads/master | /models/managers/sp_managers.py | from django.conf import settings
from django.db.models.query import QuerySet, GET_ITERATOR_CHUNK_SIZE, EmptyResultSet
from django.db.models.manager import Manager
from django.db.models import Model
from django.db import connections, connection, transaction
__all__ = ['StoredProcedureManager']
class PreparedStatementE... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,615 | HackerPemula/Curvi | refs/heads/master | /services/topic_result_services.py | from models.topic_result_model import TopicResult
from services.helper import exception
class TopicResultService():
# @staticmethod
# @exception
# def get_topic(param):
# results = Topic.objects.exec_sp_tolist('jh_Topic_GetTopic', param)
# topic = []
# for result in results:
# ... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,616 | HackerPemula/Curvi | refs/heads/master | /worker/tasks.py | from __future__ import absolute_import
import time
import json
import logging
from Curvi.celery import app
from worker.process import preprocess, nmf, classifier
from services.document_services import DocumentService
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import T... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,617 | HackerPemula/Curvi | refs/heads/master | /auth_v2/auth_backend.py | from auth_v2.auth_model import User
import logging
from importlib import import_module
from django.conf import settings
import uuid
import hashlib
def hash_password(password):
return hashlib.sha256(password.encode()).hexdigest()
class AuthBackend(object):
@staticmethod
def authenticate(username, pass... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,618 | HackerPemula/Curvi | refs/heads/master | /app/urls.py | from django.urls import path
from app.views import index_view, auth_view, hrportal_view, sub_view
urlpatterns = [
path('', index_view.Index.as_view(), name='home'),
path('login/', auth_view.Login.as_view(), name='login'),
path('logout/', auth_view.Logout.as_view(), name='logout'),
path('hrportal/', hrp... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,619 | HackerPemula/Curvi | refs/heads/master | /services/preprocessed_document_model.py | from models.preprocessed_document_model import PreprocessedDocument
from services.helper import exception
class PreprocessedDocumentService():
# @staticmethod
# @exception
# def get_preprocessed_document(param):
# results = Topic.objects.exec_sp_tolist('jh_Topic_GetTopic', param)
# topic =... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,620 | HackerPemula/Curvi | refs/heads/master | /models/topic_result_model.py | from django.db import models
from models.managers.sp_managers import StoredProcedureManager
class TopicResult(models.Model):
objects = StoredProcedureManager('CurviDB')
TopicResultID = models.BigIntegerField(primary_key=True)
Topic = models.CharField(max_length=200) | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,621 | HackerPemula/Curvi | refs/heads/master | /pdfconverter/views.py | import comtypes.client
import os
import sys
import io
from PIL import Image
from fpdf import FPDF
from django.http import HttpResponse
from django.shortcuts import render
from django.core.files.storage import FileSystemStorage
from django.views.generic import TemplateView
from pdfminer.pdfinterp import PDFResourceMana... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,622 | HackerPemula/Curvi | refs/heads/master | /services/document_services.py | from models.document_model import Document
from services.helper import exception
class DocumentService():
@staticmethod
@exception
def get_all_documents():
results = Document.objects.exec_sp_tolist('jh_Document_GetAllDocuments')
documents = []
for result in results:
doc... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,623 | HackerPemula/Curvi | refs/heads/master | /models/topic_model.py | from django.db import models
from models.managers.sp_managers import StoredProcedureManager
class Topic(models.Model):
objects = StoredProcedureManager('CurviDB')
TopicID = models.BigIntegerField(primary_key=True)
EnglishTopic = models.CharField(max_length=200)
IndonesianTopic = models.CharField(max_l... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,624 | HackerPemula/Curvi | refs/heads/master | /models/preprocessed_document_model.py | from django.db import models
from models.managers.sp_managers import StoredProcedureManager
class PreprocessedDocument(models.Model):
objects = StoredProcedureManager('CurviDB')
PreprocessedID = models.BigIntegerField(primary_key=True)
DocumentID = models.BigIntegerField()
Token = models.TextField()
... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,625 | HackerPemula/Curvi | refs/heads/master | /worker/process/classifier.py | from sklearn.svm import LinearSVC
from sklearn.model_selection import cross_val_score
from sklearn.externals import joblib
import logging
import os
import numpy as np
dir_path = os.path.dirname(os.path.realpath(__file__))
params = { 'loss': 'l2', 'penalty': 'l2', 'dual': False, 'tol': 1e-3, 'C': 10 }
def train_class... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,626 | HackerPemula/Curvi | refs/heads/master | /worker/process/nmf.py | from sklearn.decomposition import NMF, TruncatedSVD
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
import numpy as np
import logging
from services.topic_result_services import TopicResultService
params = { 'num_of_topic': 5, 'num_of_features': 1000 }
def model_topic(documents):
logg... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,627 | HackerPemula/Curvi | refs/heads/master | /models/document_model.py | from django.db import models
from models.managers.sp_managers import StoredProcedureManager
class Document(models.Model):
objects = StoredProcedureManager('CurviDB')
DocumentID = models.BigIntegerField(primary_key=True)
Title = models.CharField(max_length=200)
Content = models.TextField()
Registra... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,628 | HackerPemula/Curvi | refs/heads/master | /worker/process/preprocess.py | import nltk
import logging
import googletrans
from services.document_services import DocumentService
from services.topic_services import TopicService
from services.preprocessed_document_model import PreprocessedDocumentService
from Sastrawi.Stemmer.StemmerFactory import StemmerFactory
def translate(topic):
transl... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,629 | HackerPemula/Curvi | refs/heads/master | /auth_v2/auth_middleware.py | from django.http import HttpResponseRedirect
from django.conf import settings
from re import compile
from importlib import import_module
from django.conf import settings
SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
session = SessionStore()
REQUIRED_URLS = []
if hasattr(settings, 'LOGIN_REQUIRED_U... | {"/services/topic_services.py": ["/models/topic_model.py"], "/auth_v2/auth_model.py": ["/models/managers/sp_managers.py"], "/app/views/auth_view.py": ["/auth_v2/auth_backend.py"], "/services/topic_result_services.py": ["/models/topic_result_model.py"], "/worker/tasks.py": ["/services/document_services.py"], "/auth_v2/a... |
88,630 | mvrkmvrk/scrap | refs/heads/master | /reporter.py | import csv
import os
import feedparser
from time import time
from vip_info import VipInfo
from config import Config
from time import mktime
from datetime import datetime
class Reporter(object):
def __init__(self):
directory = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")
self.rep... | {"/reporter.py": ["/vip_info.py", "/config.py"], "/crawl_scheduler.py": ["/crawl_news.py", "/config.py"], "/report_scheduler.py": ["/config.py", "/send_email.py"]} |
88,631 | mvrkmvrk/scrap | refs/heads/master | /crawl_scheduler.py | from crawl_news import Crawler
from config import CONF
from time import time
cr = Crawler()
def start_crawler():
#get gresh updated config
current_time = time()
if current_time > CONF.last_script_run_date_time + CONF.script_run_interval:
cr.crawl() | {"/reporter.py": ["/vip_info.py", "/config.py"], "/crawl_scheduler.py": ["/crawl_news.py", "/config.py"], "/report_scheduler.py": ["/config.py", "/send_email.py"]} |
88,632 | mvrkmvrk/scrap | refs/heads/master | /send_email.py | #! /usr/local/bin/python
import sys
import os
from smtplib import SMTP_SSL as SMTP # this invokes the secure SMTP protocol (port 465, uses SSL)
# from smtplib import SMTP # use this for standard SMTP protocol (port 25, no encryption)
from email.MIMEText import MIMEText
from email.mime.multipar... | {"/reporter.py": ["/vip_info.py", "/config.py"], "/crawl_scheduler.py": ["/crawl_news.py", "/config.py"], "/report_scheduler.py": ["/config.py", "/send_email.py"]} |
88,633 | mvrkmvrk/scrap | refs/heads/master | /start.py | import time
from config import CONF
from datetime import timedelta
from crawl_scheduler import start_crawler
from report_scheduler import start_report_scheduler
while(True):
#load fresh updated config
print "CONFIG:"
print CONF.config
start_crawler()
start_report_scheduler()
print "sl... | {"/reporter.py": ["/vip_info.py", "/config.py"], "/crawl_scheduler.py": ["/crawl_news.py", "/config.py"], "/report_scheduler.py": ["/config.py", "/send_email.py"]} |
88,634 | mvrkmvrk/scrap | refs/heads/master | /crawl_news.py | import feedparser
import os
from time import time
from vip_info import VipInfo
from reporter import Reporter
from config import CONF
from time import mktime
from datetime import datetime
class Crawler():
def __init__(self):
self.vip_info = VipInfo()
self.rss_links = self._load_rss_links()
s... | {"/reporter.py": ["/vip_info.py", "/config.py"], "/crawl_scheduler.py": ["/crawl_news.py", "/config.py"], "/report_scheduler.py": ["/config.py", "/send_email.py"]} |
88,635 | mvrkmvrk/scrap | refs/heads/master | /vip_info.py | import csv
import os
class VipInfo():
def __init__(self):
self.names_positions_organisations = self._get_name_position_organisation()
self.full_names = set([r[0] for r in self.names_positions_organisations])
self.positions = set([r[1] for r in self.names_positions_organisations])
se... | {"/reporter.py": ["/vip_info.py", "/config.py"], "/crawl_scheduler.py": ["/crawl_news.py", "/config.py"], "/report_scheduler.py": ["/config.py", "/send_email.py"]} |
88,636 | mvrkmvrk/scrap | refs/heads/master | /config.py | import os
import json
from time import time
import os
import datetime
epoch = datetime.datetime.utcfromtimestamp(0)
def unix_time_seconds(dt):
return (dt - epoch).total_seconds()
class Config(object):
REPORT_START_DATE_TIME = unix_time_seconds(datetime.datetime(2016, 1, 25, 0, 0, 0))
def __init__(se... | {"/reporter.py": ["/vip_info.py", "/config.py"], "/crawl_scheduler.py": ["/crawl_news.py", "/config.py"], "/report_scheduler.py": ["/config.py", "/send_email.py"]} |
88,637 | mvrkmvrk/scrap | refs/heads/master | /report_scheduler.py | from config import CONF
from time import time
import os
from send_email import send_email
import csv
def merge_files(f1, f2, f3):
with open(f1, 'rb') as csvfile:
rows1 = csv.reader(csvfile, delimiter=',', quotechar='"')
rows1 = [[r.lower().replace("\r", " ").replace("/", " ") for r in row] for row ... | {"/reporter.py": ["/vip_info.py", "/config.py"], "/crawl_scheduler.py": ["/crawl_news.py", "/config.py"], "/report_scheduler.py": ["/config.py", "/send_email.py"]} |
88,639 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /tests/unit/gae/connector/test_dataproc.py | #MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publi... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
88,640 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /gae/connector/storage.py | #MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publi... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
88,641 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /dataproc/jobs/dimsum.py | #MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, p... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
88,642 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /tests/system/gae/test_queries.py | #MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publi... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
88,643 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /tests/unit/gae/test_utils.py | #MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publi... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
88,644 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /tests/unit/gae/test_worker.py | #MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publi... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
88,645 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /tests/unit/gae/test_recommender.py | #MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publi... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
88,646 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /tests/unit/gae/connector/test_storage.py | #MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publi... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
88,647 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /tests/unit/gae/test_main.py | #MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publi... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
88,648 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /gae/main.py | #MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publi... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
88,649 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /dataflow/config_template.py | config = {
"input": "input path to read data from, such as a GSC path",
"kind": "kind that resolves Entities",
"similarities_cap": ("total similarities allowed for each key in ",
"Datastore. If 1000, then only saves 1000 ",
" recommendations for each sku."),... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
88,650 | MAhsanAkhtar/BDA_TERM_PROJECT | refs/heads/master | /dataproc/jobs/df_naive.py | #MIT License
#
#Copyright (c) 2017 Willian Fuks
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publi... | {"/tests/unit/gae/test_worker.py": ["/gae/worker.py"], "/tests/unit/gae/test_recommender.py": ["/gae/recommender.py"], "/tests/unit/gae/test_main.py": ["/gae/main.py"], "/tests/system/dataproc/jobs/test_base.py": ["/dataproc/jobs/base.py"], "/tests/system/dataflow/test_build_datastore_template.py": ["/dataflow/build_da... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.