index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
45,725
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/app/serializers.py
from pydantic import BaseModel, validator from typing import List class MatchingMultiplicatorsParams(BaseModel): tickers: List[str] multiplicators: List[str] @validator('tickers') def _validate_tickers(cls, v): if not v: raise ValueError('tickers filed must not be empty') ...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,726
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/parsers/abc.py
from abc import ABC, abstractmethod class ParserABC(ABC): @abstractmethod async def _request_html(self, ticker: str) -> str: pass @abstractmethod def _parse_html(self, html: str) -> dict: pass async def _get_one(self, ticker: str) -> dict: html = await self._request_html(ticker) ...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,727
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/app/routers/multiplicators.py
from fastapi import APIRouter, Request from companies_matcher.app.serializers import MatchingMultiplicatorsParams from companies_matcher.config import config multiplicators_router = APIRouter() @multiplicators_router.post("/match") async def match_multiplicators(params: MatchingMultiplicatorsParams, request: Reques...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,728
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/app/routers/index.py
from fastapi import APIRouter, Request from fastapi.templating import Jinja2Templates from fastapi.responses import HTMLResponse index_router = APIRouter() templates = Jinja2Templates(directory="companies_matcher/app/front/templates") @index_router.get("/", response_class=HTMLResponse) async def match_multiplicator...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,729
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/parsers/marketwatch_parser.py
from bs4 import BeautifulSoup from companies_matcher.config import config from .abc import ParserABC import aiohttp class MarketwatchParser(ParserABC): _url = config['marketwatch']['url'] _endpoint = config['marketwatch']['endpoint'] _headers = {'User-Agent': config['service']['userAgent']} def __ini...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,730
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/app/main.py
from fastapi import FastAPI from companies_matcher.app.routers import index_router, multiplicators_router, reports_router, dividends_router from companies_matcher.parsers import FinvizParser, MarketwatchParser from fastapi.staticfiles import StaticFiles app = FastAPI() @app.on_event("startup") async def init_app():...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,731
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/parsers/__init__.py
from .finviz_parser import FinvizParser from .marketwatch_parser import MarketwatchParser
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,732
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/parsers/marketwatch_reports.py
from .marketwatch_parser import MarketwatchParser import asyncio from collections import defaultdict def _combine_results(results: list, tickers: list): combined_result = {ticker: defaultdict(dict) for ticker in tickers} period = set() for ticker in tickers: for report in results: for ...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,733
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/app/routers/reports.py
from fastapi import APIRouter, Request from companies_matcher.app.serializers import MatchingReportsParams from companies_matcher.parsers.marketwatch_reports import get_reports from companies_matcher.config import config reports_router = APIRouter() @reports_router.post("/match") async def match_reports(params: Matc...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,734
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/parsers/finviz_dividends.py
from companies_matcher.parsers.finviz_parser import FinvizParser _multiplicator = 'Dividend' def _join_result(data: list, dividends: dict): for item in data: t = item['ticker'] try: div = dividends[t][_multiplicator] item['total'] = round(float(div) * item['amount'], 2) ...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,735
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/writer/writer.py
import xlwt def write_to_xlsx(data: dict, column_headers: list, rows_headers: list): book = xlwt.Workbook(encoding="utf-8") sheet = book.add_sheet("Matching", cell_overwrite_ok=True) for x, column_header in enumerate(column_headers): sheet.write(0, x + 1, column_header) for y, rows_heade...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,736
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/app/routers/__init__.py
from .index import index_router from .multiplicators import multiplicators_router from .reports import reports_router from .dividends import dividends_router
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,737
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/app/routers/dividends.py
from fastapi import APIRouter from companies_matcher.app.serializers import MatchingDividendsParams from companies_matcher.parsers.finviz_dividends import get_dividends dividends_router = APIRouter() @dividends_router.post("/match") async def match_dividends(params: MatchingDividendsParams): data = params.dict(...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,738
t0theheart/companies-matcher
refs/heads/master
/companies_matcher/parsers/finviz_parser.py
from bs4 import BeautifulSoup from companies_matcher.config import config from .abc import ParserABC import aiohttp class FinvizParser(ParserABC): _url = config['finviz']['url'] _headers = {'User-Agent': config['service']['userAgent']} def __init__(self, tickers: list, multiplicators: list): self...
{"/companies_matcher/app/routers/multiplicators.py": ["/companies_matcher/app/serializers.py"], "/companies_matcher/parsers/marketwatch_parser.py": ["/companies_matcher/parsers/abc.py"], "/companies_matcher/app/main.py": ["/companies_matcher/app/routers/__init__.py", "/companies_matcher/parsers/__init__.py"], "/compani...
45,802
hyeseong-dev/20210403-assignment
refs/heads/main
/linewalks/migrations/0001_initial.py
# Generated by Django 3.1.7 on 2021-04-03 01:00 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Concept', fields=[ ...
{"/linewalks/views.py": ["/linewalks/models.py"]}
45,803
hyeseong-dev/20210403-assignment
refs/heads/main
/linewalks/views.py
import re import json from math import ceil from django.http import JsonResponse from django.views import View from django.db.models import Q from django.db import IntegrityError from decorator import query_debugger from linewalks.models im...
{"/linewalks/views.py": ["/linewalks/models.py"]}
45,804
hyeseong-dev/20210403-assignment
refs/heads/main
/linewalks/urls.py
from django.contrib import admin from django.urls import path from linewalks import views from linewalks import models urlpatterns = [ path('static/patients/', views.PatientView.as_view()), path('static/visitors/', views.VisitView.as_view()) , path('concept/', views.Conc...
{"/linewalks/views.py": ["/linewalks/models.py"]}
45,805
hyeseong-dev/20210403-assignment
refs/heads/main
/config/urls.py
from django.contrib import admin from django.urls import path,include urlpatterns = [ path('linewalks/', include('linewalks.urls')), ]
{"/linewalks/views.py": ["/linewalks/models.py"]}
45,806
hyeseong-dev/20210403-assignment
refs/heads/main
/linewalks/models.py
from django.db import models class Concept(models.Model): concept_id = models.IntegerField(primary_key=True) concept_name = models.CharField(max_length=255, blank=True, null=True) domain_id = models.CharField(max_length=20, blank=True, null=True) vocabulary_id = models.CharField(ma...
{"/linewalks/views.py": ["/linewalks/models.py"]}
45,809
saadatullah/fleet
refs/heads/master
/vehicles/models.py
from __future__ import unicode_literals from django.db import models # Create your models here. class VehMaster(models.Model): Veh_Reg_No = models.CharField("Registration No", max_length=8, primary_key=True) Veh_Make = models.CharField("Vehicle's Make", max_length=15) Veh_Model = models.CharField("Vehic...
{"/vehicles/admin.py": ["/vehicles/models.py"]}
45,810
saadatullah/fleet
refs/heads/master
/vehicles/admin.py
from django.contrib import admin # Register your models here. from .models import VehMaster, VehWorkOrder, VehWorkInvoice, VehInvoice, VehTyres from django.forms import TextInput, Textarea, ModelForm from django.forms.models import inlineformset_factory from django.db import models class VehWorkOrderInline(admin.Tab...
{"/vehicles/admin.py": ["/vehicles/models.py"]}
45,811
saadatullah/fleet
refs/heads/master
/vehicles/migrations/0003_vehinvoice.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2017-01-02 15:47 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('vehicles', '0002_vehworkinvoice'), ] operations = ...
{"/vehicles/admin.py": ["/vehicles/models.py"]}
45,818
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/build_clinical_trial_tables.py
import os import requests import pandas as pd import datatable as dt from urllib3.exceptions import HTTPError from PharmacoDI.get_chembl_drug_targets import parallelize from PharmacoDI.combine_pset_tables import join_tables, write_table # TODO: split into more helpers? def build_clinical_trial_tables(output_dir): ...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,819
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/build_dataset_join_tables.py
import pandas as pd from PharmacoDI.build_all_pset_tables import build_cell_df, build_drug_df, build_tissue_df def build_dataset_join_dfs(pset_dict, pset_name, primary_dfs={}): """ Builds join tables summarizing the cell lines, tissues, and compounds in this PSet. @param pset_dict: [`dict`] A nested...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,820
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/get_gene_targets.py
import pandas as pd from bs4 import BeautifulSoup import time from selenium import webdriver import requests ensembl_gene_id = 'ENSG00000140465' def get_gene_targets(ensembl_gene_id): """ Query the APIs of Ensembl and NCBI to fetch information about drugs targeting a given gene. :param gene_symbol: [str...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,821
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/setup.py
from setuptools import setup, find_packages setup(name='PharmacoDI', version='0.0.1', description="Tools for processing R PharmacoSet objects into .csv files of PharmacoDB database tables.", url='https://github.com/bhklab/DataIngestion/tree/master/PharmacoDI', install_requires=[ 'dask[d...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,822
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/get_chembl_targets.py
from chembl_webresource_client.new_client import new_client import pandas as pd import os def get_chembl_targets(target_file): """ Get all ChEMBL targets in humans and write them to a table. :target_file: full file path to where the target table should be written :return: a DataFrame containing all t...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,823
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/build_pset_gene_drugs.py
import os import glob import pandas as pd import numpy as np def read_gene_signatures(pset_name, file_path): """ Read all gene signatures for a PSet (to be used in gene_drugs table) from the directory file_path. @param pset_name: [`string`] The name of the PSet @param file_path: [`string`] The direct...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,824
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/write_pset_table.py
import os from datatable import Frame def write_pset_table(pset_df, df_name, pset_name, df_dir): """ Write a PSet table to a CSV file. @param pset_df: [`DataFrame`] A PSet DataFrame @param pset_name: [`string`] The name of the PSet @param df_dir: [`string`] The name of the directory to hold all th...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,825
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/__init__.py
from .download_psets import * from .download_canonical_psets import * from .download_gene_signatures import * from .get_gene_targets import get_gene_targets from .get_target_annotations import get_target_annotations, query_uniprot_mapping_api from .read_pset import pset_df_to_nested_dict, read_pset_file, read_pset from...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,826
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/build_synonym_tables.py
import os import re import glob import numpy as np import pandas as pd from datatable import Frame from PharmacoDI.combine_pset_tables import write_table output_dir = os.path.join('data', 'demo') metadata_dir = os.path.join('data', 'metadata') cell_file = "cell_annotation_all.csv" tissue_file = "cell_annotation_all.c...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,827
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/build_cellosaurus.py
import pandas as pd import os from multiprocessing import Pool, cpu_count from collections import defaultdict import datatable as dt from PharmacoDI.combine_pset_tables import join_tables, write_table if 'PharmacoDI' not in os.getcwd(): os.chdir('PharmacoDI') cellosaurus_path = 'data/metadata/cellosaurus.txt' # ...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,828
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/build_primary_pset_tables.py
import os import glob import pandas as pd import numpy as np def build_primary_pset_tables(pset_dict, pset_name): """ Build the tissue, drug, and gene tables for a PSet and return them in a dictionary, with table names as the keys. @param pset_dict: [`dict`] A nested dictionary containing all tables ...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,829
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/build_all_pset_tables.py
import os import glob import re import pandas as pd import numpy as np from PharmacoDI.build_primary_pset_tables import build_primary_pset_tables, build_cell_df, build_drug_df, build_tissue_df from PharmacoDI.build_experiment_tables import build_experiment_tables, build_experiment_df from PharmacoDI.build_pset_gene_dru...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,830
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/download_gene_signatures.py
import sys import os def download_gene_signatures(user=None, password=None, remote="niagara.computecanada.ca", opts={}, remote_path="/scratch/b/bhaibeka/psmirnov/pearson_perm_res/", save_dir="data/rawdata/gene_signatures"): """ Download all precomputed gene signatures from the `rem...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,831
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/download_canonical_psets.py
import pandas as pd import wget def download_canonical_psets(save_dir, api_url= "https://www.orcestra.ca/api/psets/canonical"): """ Download the specified canonical PSets from the specified api_url :param save_dir: [string] Path to save the PSets in :param api_url: [string] URL where available PSets c...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,832
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/build_target_tables.py
import os import requests import pandas as pd import numpy as np from multiprocessing import Pool, cpu_count import datatable as dt from PharmacoDI.combine_pset_tables import write_table, rename_and_key, join_tables from PharmacoDI.get_chembl_drug_targets import parallelize drugbank_file = os.path.join( "data", "...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,833
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/get_chembl_drug_targets.py
from chembl_webresource_client.new_client import new_client import multiprocessing as mp import numpy as np import pandas as pd import os def get_chembl_drug_target_mappings(drug_annotation_file, target_file, drug_target_file): """ Get drug target mappings for all drugs in the drug_annotation files (using sta...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,834
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/download_psets.py
import pandas as pd import wget def download_psets(names, save_dir, api_url="https://www.orcestra.ca/api/psets/available"): """ Download the specified PSets from the specified api_url :param names: [list] Names of PSets to download. Must match the 'names' in the api call JSON. :param save_dir: [strin...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,835
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/combine_pset_tables.py
import glob import os import re import numpy as np import pandas as pd from datatable import dt, fread, iread, join, by, rbind, cbind, f def combine_all_pset_tables(data_dir, output_dir): """ Combine all PSet tables into the final PharmacoDB tables. @param data_dir: [`string`] The file path to read the P...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,836
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/read_pset.py
import glob import os import re import numpy as np import pandas as pd import swifter # Library to parallelize apply statements automagically pset_name = 'GDSC_v1' file_path = os.path.join('data', 'rawdata') slot_names = ['curation', 'drug', 'molecularProfiles', 'sensitivity', 'annotation', 'cell'] de...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,837
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/get_target_annotations.py
import os #import PharmacoDI as di import pandas as pd import numpy as np import urllib import requests from io import StringIO from lxml import etree def get_target_annotations(pset, annot_dir): """ Annotate a the 'TARGET' in the 'drug' slot of a PSet object using mapping from the UniProt idenitifer mappi...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,838
bhklab/DataIngestion
refs/heads/master
/PharmacoDI/PharmacoDI/build_experiment_tables.py
import pandas as pd import numpy as np from PharmacoDI.build_primary_pset_tables import build_cell_df def build_experiment_tables(pset_dict, pset_name, cell_df=None): """ Build the experiment, dose response, and profile tables for a PSet and return them in a dictionary, with table names as the keys. ...
{"/PharmacoDI/PharmacoDI/__init__.py": ["/PharmacoDI/PharmacoDI/download_psets.py", "/PharmacoDI/PharmacoDI/download_canonical_psets.py", "/PharmacoDI/PharmacoDI/download_gene_signatures.py", "/PharmacoDI/PharmacoDI/get_gene_targets.py", "/PharmacoDI/PharmacoDI/get_target_annotations.py", "/PharmacoDI/PharmacoDI/read_p...
45,842
lucasjt93/Nutrilator
refs/heads/main
/Nutrilator/calculator.py
from flask import ( Blueprint, flash, g, redirect, render_template, request, url_for ) from Nutrilator.auth import login_required from Nutrilator.db import get_db from datetime import datetime bp = Blueprint('calculator', __name__) @bp.route('/calculator', methods=('GET', 'POST')) @login_required def calculator...
{"/Nutrilator/calculator.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/foodtracker.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/__init__.py": ["/Nutrilator/db.py", "/Nutrilator/auth.py"], "/Nutrilator/auth.py": ["/Nutrilator/db.py"]}
45,843
lucasjt93/Nutrilator
refs/heads/main
/instance/config.py
import os # General config DATABASE = os.getenv("DATABASE_URL") SECRET_KEY = os.getenv("SECRET_KEY") FLASK_ENV = os.getenv("FLASK_ENV")
{"/Nutrilator/calculator.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/foodtracker.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/__init__.py": ["/Nutrilator/db.py", "/Nutrilator/auth.py"], "/Nutrilator/auth.py": ["/Nutrilator/db.py"]}
45,844
lucasjt93/Nutrilator
refs/heads/main
/Nutrilator/foodtracker.py
from flask import ( Blueprint, flash, jsonify, json, g, redirect, render_template, request, url_for ) import os import requests from Nutrilator.auth import login_required from Nutrilator.db import get_db from datetime import date bp = Blueprint('foodtracker', __name__) @bp.route('/foodtracker', methods=('GET',...
{"/Nutrilator/calculator.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/foodtracker.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/__init__.py": ["/Nutrilator/db.py", "/Nutrilator/auth.py"], "/Nutrilator/auth.py": ["/Nutrilator/db.py"]}
45,845
lucasjt93/Nutrilator
refs/heads/main
/Nutrilator/__init__.py
import os from flask import Flask, render_template, g from Nutrilator.db import get_db from Nutrilator.auth import login_required def create_app(test_config=None): # create and configure the app app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( SECRET_KEY='dev', ...
{"/Nutrilator/calculator.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/foodtracker.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/__init__.py": ["/Nutrilator/db.py", "/Nutrilator/auth.py"], "/Nutrilator/auth.py": ["/Nutrilator/db.py"]}
45,846
lucasjt93/Nutrilator
refs/heads/main
/Nutrilator/auth.py
import functools import os from flask import ( Blueprint, flash, g, redirect, render_template, request, session, url_for ) from werkzeug.security import check_password_hash, generate_password_hash from Nutrilator.db import get_db from datetime import date bp = Blueprint('auth', __name__, url_prefix='/auth') # Ge...
{"/Nutrilator/calculator.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/foodtracker.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/__init__.py": ["/Nutrilator/db.py", "/Nutrilator/auth.py"], "/Nutrilator/auth.py": ["/Nutrilator/db.py"]}
45,847
lucasjt93/Nutrilator
refs/heads/main
/Nutrilator/db.py
import sqlite3 import os import cs50 import click from datetime import datetime, timedelta from flask import current_app, g from flask.cli import with_appcontext # Get flask env from env variable env = os.getenv("FLASK_ENV") db_name = os.getenv("DATABASE_URL") def get_db(): if 'db' not in g: # Connect t...
{"/Nutrilator/calculator.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/foodtracker.py": ["/Nutrilator/auth.py", "/Nutrilator/db.py"], "/Nutrilator/__init__.py": ["/Nutrilator/db.py", "/Nutrilator/auth.py"], "/Nutrilator/auth.py": ["/Nutrilator/db.py"]}
45,848
mrsuger/blog_django
refs/heads/master
/my_blog/blog/models.py
from django.db import models # Create your models here. class Category(models.Model): '''分类''' name = models.CharField('名称', max_length = 16) def __str__(self): return self.name class Tag(models.Model): '''标签''' name = models.CharField('名称', max_length = 16) def __str__(self): ...
{"/my_blog/blog/views.py": ["/my_blog/blog/models.py"], "/my_blog/blog/templatetags/blog_tags.py": ["/my_blog/blog/models.py"]}
45,849
mrsuger/blog_django
refs/heads/master
/my_blog/blog/views.py
import markdown from django.shortcuts import render, get_object_or_404 from .models import Blog, Category, Tag from .forms import CommentForm from django.http import Http404, HttpResponse # 导入分页包 from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger # Create your views here. def detail(request, blo...
{"/my_blog/blog/views.py": ["/my_blog/blog/models.py"], "/my_blog/blog/templatetags/blog_tags.py": ["/my_blog/blog/models.py"]}
45,850
mrsuger/blog_django
refs/heads/master
/my_blog/blog/templatetags/blog_tags.py
from django.db.models.aggregates import Count from django import template from ..models import Blog, Category, Tag register = template.Library() # 归档模板标签 @register.simple_tag def archives(): return Blog.objects.dates('created', 'month', order='DESC') # 分类模板标签 @register.simple_tag def get_categories(): retur...
{"/my_blog/blog/views.py": ["/my_blog/blog/models.py"], "/my_blog/blog/templatetags/blog_tags.py": ["/my_blog/blog/models.py"]}
45,851
mrsuger/blog_django
refs/heads/master
/my_blog/blog/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^detail/(?P<blog_id>\d+)/$', views.detail, name = 'get_detail'), url(r'^home/$', views.home, name = 'get_home'), url(r'^aboutme/$', views.about_me, name = 'about_me'), # archives页面需要传入两个参数 url(r'^archives/(?P<year>\d+)/(?P<m...
{"/my_blog/blog/views.py": ["/my_blog/blog/models.py"], "/my_blog/blog/templatetags/blog_tags.py": ["/my_blog/blog/models.py"]}
45,868
ta-verma/Bhagvadgita-API
refs/heads/master
/pygita.py
from lxml import html import requests from bs4 import BeautifulSoup #################################################################### # API #################################################################### class Bhagvadgita: @staticmethod def get_by_chapter_and_verse(chapter_number, veser_number): url = "...
{"/server.py": ["/pygita.py"]}
45,869
ta-verma/Bhagvadgita-API
refs/heads/master
/server.py
from flask import Flask, jsonify from pygita import Bhagvadgita from flask_cors import CORS app = Flask (__name__) CORS(app) ############################################ # Index ############################################ @app.route ('/', methods=['GET']) def index_route () : return jsonify({ 'author' : 'Tar...
{"/server.py": ["/pygita.py"]}
45,887
datalogisk-fagraad/dikultur
refs/heads/master
/apps/events/utils.py
import icalendar from . import models def generate_ical(**filters): cal = icalendar.Calendar() for event in models.Event.objects.filter(**filters): if event.ical and event.public: event_ical = icalendar.Event.from_ical(event.ical) cal.add_component(event_ical) return cal
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,888
datalogisk-fagraad/dikultur
refs/heads/master
/apps/groups/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django_extensions.db.fields from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] opera...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,889
datalogisk-fagraad/dikultur
refs/heads/master
/apps/resources/migrations/0003_auto_20140823_0015.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('resources', '0002_resourcelink'), ] operations = [ migrations.AddField( model_name='resourcefile', n...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,890
datalogisk-fagraad/dikultur
refs/heads/master
/apps/resources/urls.py
from django.conf.urls import patterns, url from . import views urlpatterns = patterns( '', url(r'^create/$', views.ResourceCreate.as_view(), name='create'), url(r'^detail/(?P<slug>\S+)/remove_upvote$', views.resource_remove_upvote, name='remove_upvote'), url(r'^detail/(?P<slug>\S+)/upvote$', views.re...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,891
datalogisk-fagraad/dikultur
refs/heads/master
/apps/resources/templatetags/resources_tags.py
from django import template register = template.Library() @register.inclusion_tag('resources/includes/resource_list.html') def resource_list(resources, profile_view=False): return { 'resources': resources, 'profile_view': profile_view }
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,892
datalogisk-fagraad/dikultur
refs/heads/master
/apps/blogs/migrations/0002_auto_20150212_1904.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0001_initial'), ('blogs', '0001_initial'), ] operations = [ migrations.AddField( ...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,893
datalogisk-fagraad/dikultur
refs/heads/master
/apps/resources/models.py
from django.db import models from django.conf import settings from django_extensions.db.fields import AutoSlugField from taggit.managers import TaggableManager from apps.core.models import TimestampedModel class Resource(TimestampedModel): title = models.CharField(max_length=255) slug = AutoSlugField(populat...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,894
datalogisk-fagraad/dikultur
refs/heads/master
/apps/events/models.py
from django.db import models from django.conf import settings from django.contrib.auth import models as auth_models from django_extensions.db.fields import AutoSlugField from apps.core.models import TimestampedModel from apps.groups.models import Group import icalendar from taggit.managers import TaggableManager c...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,895
datalogisk-fagraad/dikultur
refs/heads/master
/apps/resources/admin.py
from django.contrib import admin from .models import Resource, ResourceFile, ResourceLink, ResourceUpvote class ResourceFileInline(admin.TabularInline): model = ResourceFile class ResourceLinkInline(admin.TabularInline): model = ResourceLink class ResourceAdmin(admin.ModelAdmin): model = Resource ...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,896
datalogisk-fagraad/dikultur
refs/heads/master
/apps/blogs/managers.py
from django.db import models class PostQuerySet(models.QuerySet): def deleted(self): return self.filter(is_deleted=True) def live(self): return self.filter(is_deleted=False) def public(self): return self.filter(public=True, is_deleted=False)
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,897
datalogisk-fagraad/dikultur
refs/heads/master
/apps/resources/migrations/0004_auto_20140824_1039.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('resources', '0003_auto_20140823_0015'), ] operations = [ migrations.AlterField( model_name='resourcefile', ...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,898
datalogisk-fagraad/dikultur
refs/heads/master
/apps/core/views/__init__.py
from django.utils import timezone from django.views.generic import TemplateView from allauth.account.views import LogoutView, LoginView from ...events.models import Event class FrontPage(TemplateView): template_name = 'core/frontpage.html' def get_context_data(self, **kwargs): context = super().ge...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,899
datalogisk-fagraad/dikultur
refs/heads/master
/apps/events/urls.py
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^calendar\.ics$', views.CalendarFeed.as_view(), name='calendar'), url(r'^calend[ae]r(|\.ics)$', views.CalendarFeed.as_view(), name='calendar'), url(r'^create$', views.EventCreate.as_view(), ...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,900
datalogisk-fagraad/dikultur
refs/heads/master
/apps/resources/views.py
from django.db import IntegrityError from django.http import HttpResponse, HttpResponseRedirect from django.views.generic import ListView, DetailView, CreateView, \ UpdateView from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorator...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,901
datalogisk-fagraad/dikultur
refs/heads/master
/apps/events/views.py
from django.http import HttpResponse from django.views.generic import ListView, DetailView, CreateView, UpdateView, \ View from django.utils import timezone from . import models, forms from apps.core.views.mixins import LoginRequiredMixin from apps.events.utils import generate_ical class EventList(ListView): ...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,902
datalogisk-fagraad/dikultur
refs/heads/master
/apps/groups/urls.py
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url( r'^detail/(?P<slug>\S+)/calendar\.ics$', views.GroupICal.as_view(), name='ical' ), url( r'^detail/(?P<slug>\S+)/calend[ae]r(|\.ics)$', views.GroupICal.as_view(), ...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,903
datalogisk-fagraad/dikultur
refs/heads/master
/apps/groups/models.py
from django.db import models from django.conf import settings from django_extensions.db.fields import AutoSlugField from ..core.models import TimestampedModel class Group(TimestampedModel): name = models.CharField(max_length=255) slug = AutoSlugField(populate_from='name') description = models.TextField()...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,904
datalogisk-fagraad/dikultur
refs/heads/master
/apps/groups/migrations/0005_auto_20141013_2035.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('groups', '0004_groupmembership_is_admin'), ] operations = [ migrations.AddField( model_name='gro...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,905
datalogisk-fagraad/dikultur
refs/heads/master
/apps/groups/admin.py
from django.contrib import admin from . import models class GroupMembershipInline(admin.TabularInline): model = models.GroupMembership class GroupAdmin(admin.ModelAdmin): inlines = [GroupMembershipInline] admin.site.register(models.Group, GroupAdmin)
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,906
datalogisk-fagraad/dikultur
refs/heads/master
/apps/resources/migrations/0009_auto_20141013_2035.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('resources', '0008_remove_resourcefile_title'), ] operations = [ migrations.AddField( model_name=...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,907
datalogisk-fagraad/dikultur
refs/heads/master
/apps/core/templatetags/markdown.py
import re from django import template from django.utils.safestring import mark_safe import CommonMark register = template.Library() def convert_http_to_markdown_link(value): urlfinder = re.compile(r'^(http(s*):\/\/\S+)') urlfinder2 = re.compile(r'\s(http(s*):\/\/\S+)') value = urlfinder.sub(r'<\1>', va...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,908
datalogisk-fagraad/dikultur
refs/heads/master
/apps/events/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone import django.core.validators from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,909
datalogisk-fagraad/dikultur
refs/heads/master
/apps/blogs/urls.py
from django.conf.urls import patterns, url from django.core.urlresolvers import reverse_lazy from django.views.generic import RedirectView from . import views urlpatterns = patterns('', url(r'^(?P<slug>all)$', views.BlogIndex.as_view(), name='all'), url(r'^(?P<slug>\S+)/create$', views.PostCreate.as_view(), na...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,910
datalogisk-fagraad/dikultur
refs/heads/master
/apps/blogs/models.py
from django.db import models from django.conf import settings from django_extensions.db.fields import AutoSlugField from taggit.managers import TaggableManager from .managers import PostQuerySet class Blog(models.Model): title = models.CharField(max_length=255) slug = AutoSlugField(populate_from='title') ...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,911
datalogisk-fagraad/dikultur
refs/heads/master
/apps/events/forms.py
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div from crispy_forms.bootstrap import StrictButton from . import models class EventForm(forms.ModelForm): class Meta: model = models.Event exclude = ['created_at', 'updated_at', 'slug', ...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,912
datalogisk-fagraad/dikultur
refs/heads/master
/apps/resources/forms.py
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div from crispy_forms.bootstrap import StrictButton from . import models class ResourceForm(forms.ModelForm): class Meta: model = models.Resource exclude = ['created_at', 'updated_at', 's...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,913
datalogisk-fagraad/dikultur
refs/heads/master
/dikultur/settings/base.py
import os import environ env = environ.Env(DEBUG=(bool, False),) environ.Env.read_env() BASE_DIR = os.path.dirname(os.path.dirname(__file__)) get_path = lambda x: os.path.join(BASE_DIR, x) SECRET_KEY = env('SECRET_KEY') DEBUG = env('DEBUG') TEMPLATE_DEBUG = DEBUG ALLOWED_HOSTS = env('ALLOWED_HOSTS').split(',') AUTH...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,914
datalogisk-fagraad/dikultur
refs/heads/master
/apps/groups/forms.py
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div from crispy_forms.bootstrap import StrictButton from . import models class GroupForm(forms.ModelForm): class Meta: model = models.Group exclude = ['created_at', 'updated_at', 'slug', ...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,915
datalogisk-fagraad/dikultur
refs/heads/master
/apps/core/migrations/0003_auto_20140928_2043.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ('core', '0002_auto_20140824_1039'), ] operations = [ migrations.CreateModel( na...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,916
datalogisk-fagraad/dikultur
refs/heads/master
/apps/events/templatetags/events_tags.py
from django import template register = template.Library() @register.inclusion_tag('events/includes/event_list.html') def event_list(events, profile_view=False): return { 'events': events, 'profile_view': profile_view }
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,917
datalogisk-fagraad/dikultur
refs/heads/master
/dikultur/urls.py
from django.conf import settings from django.conf.urls import patterns, include, url from django.contrib import admin from apps.core.views import FrontPage, ProfileView, Logout, Login urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^accounts/profile/$', ProfileView.as_view(), ...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,918
datalogisk-fagraad/dikultur
refs/heads/master
/apps/groups/views.py
from django.http import HttpResponse, HttpResponseRedirect from django.utils import timezone from django.views.generic import ListView, DetailView, View, UpdateView, \ CreateView from django.core.urlresolvers import reverse from . import models, forms from apps.core.models import User from ..core.views.mixins impo...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,919
datalogisk-fagraad/dikultur
refs/heads/master
/apps/blogs/views.py
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from django.views.generic import ListView, DetailView, CreateView, UpdateView, View, DeleteView from django.core.urlresolvers import reverse_lazy from django.utils import timezone from . import models, forms class BlogList...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,920
datalogisk-fagraad/dikultur
refs/heads/master
/apps/blogs/forms.py
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div from crispy_forms.bootstrap import StrictButton from . import models class PostForm(forms.ModelForm): class Meta: model = models.Post exclude = ['created_at', 'updated_at', 'slug', 'b...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,921
datalogisk-fagraad/dikultur
refs/heads/master
/apps/core/models/__init__.py
from .abstract import * from django.contrib.auth import models as auth_models class User(auth_models.AbstractUser): """ Placeholder so migrations won't break if a custom user is needed. """ pass
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,922
datalogisk-fagraad/dikultur
refs/heads/master
/apps/resources/migrations/0005_auto_20140824_1235.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import taggit.managers class Migration(migrations.Migration): dependencies = [ ('resources', '0004_auto_20140824_1039'), ] operations = [ migrations.AlterField( model_nam...
{"/apps/resources/models.py": ["/apps/core/models/__init__.py"], "/apps/events/models.py": ["/apps/core/models/__init__.py", "/apps/groups/models.py"], "/apps/resources/admin.py": ["/apps/resources/models.py"], "/apps/core/views/__init__.py": ["/apps/events/models.py"], "/apps/events/views.py": ["/apps/events/utils.py"...
45,939
MAHines/CanvasMAH
refs/heads/main
/Scripts/uploadAssignmentOverrides.py
import mahCanvas from datetime import datetime, date import argparse def main(): # Read in the arguments and validate parser = argparse.ArgumentParser(description="Set due dates for multiple sections/students in Canvas assignment") parser.add_argument('firstDate', type = str, help = 'Earliest due date...
{"/Scripts/uploadAssignmentOverrides.py": ["/mahCanvas.py"], "/Scripts/downloadStudentList.py": ["/mahCanvas.py"]}
45,940
MAHines/CanvasMAH
refs/heads/main
/Scripts/downloadStudentList.py
import mahCanvas def main(): c = mahCanvas.mahCanvas() c.downloadStudentList(onlyThisTerm = True) if __name__ == '__main__': main()
{"/Scripts/uploadAssignmentOverrides.py": ["/mahCanvas.py"], "/Scripts/downloadStudentList.py": ["/mahCanvas.py"]}
45,941
MAHines/CanvasMAH
refs/heads/main
/WatermarkReports/WatermarkReports.py
# Usage: python WatermarkReports gradebook.csv submissionsFolder # This script prepares lab report submissions downloaded from Canvas for Gradescope upload. # – Converts any .docx files to .pdf # - Cleans all pdf's using mutool (scanned pdfs are particularly problematic) # – Finds the length of the longest pdf #...
{"/Scripts/uploadAssignmentOverrides.py": ["/mahCanvas.py"], "/Scripts/downloadStudentList.py": ["/mahCanvas.py"]}
45,942
MAHines/CanvasMAH
refs/heads/main
/Scripts/CombineGradescopeCSVs.py
import os import glob import pandas as pd from bullet import Bullet # pip install bullet # This script reads in all of the Gradescope data from all of the csv's in the cwd except 'allGrades.csv,' # then combines these data into a single csv containing all of the grades, 'allGrades.csv' The script # also cal...
{"/Scripts/uploadAssignmentOverrides.py": ["/mahCanvas.py"], "/Scripts/downloadStudentList.py": ["/mahCanvas.py"]}
45,943
MAHines/CanvasMAH
refs/heads/main
/mahCanvas.py
# Class for accessing Canvas programatically # Useful resources include: # https://canvasapi.readthedocs.io/en/stable/getting-started.html # https://github.com/ucfopen/canvasapi # https://canvas.instructure.com/doc/api/assignments.html # https://github.com/dsavransky/grading from datetime import datetime, date...
{"/Scripts/uploadAssignmentOverrides.py": ["/mahCanvas.py"], "/Scripts/downloadStudentList.py": ["/mahCanvas.py"]}
45,945
JaimeVRodriguez/Coffee_Chatbot
refs/heads/master
/functions.py
def get_size(): res = input('What size drink can I get for you?\n[a] Small \n[b] Medium \n[c] Large \n> ') if res == 'a': return 'Small' elif res == 'b': return 'Medium' elif res == 'c': return 'Large' else: print_message() return get_size() def get_drink_type(): res = input('What ty...
{"/coffee_chatbot.py": ["/functions.py"]}
45,946
JaimeVRodriguez/Coffee_Chatbot
refs/heads/master
/coffee_chatbot.py
from functions import get_size, get_drink_type, get_cup_type, order_latte, order_brew, print_message def coffee_bot(): print('\n\n\n') print('\t\t\t****************************\t\t\t') print('\t\t\t** Welcome to the cafe! **') print('\t\t\t****************************\t\t\t') print('\n\n\n') order_drin...
{"/coffee_chatbot.py": ["/functions.py"]}
45,954
rgienko/appealsMasterv2
refs/heads/master
/app/migrations/0006_auto_20200414_1618.py
# Generated by Django 2.1.15 on 2020-04-14 21:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0005_auto_20200413_2217'), ] operations = [ migrations.AlterField( model_name='critical_dates_master', name=...
{"/app/forms.py": ["/app/models.py"], "/app/admin.py": ["/app/models.py"], "/app/views.py": ["/app/forms.py", "/app/models.py"], "/app/urls.py": ["/app/views.py"]}
45,955
rgienko/appealsMasterv2
refs/heads/master
/app/forms.py
from django import forms from django.utils.translation import ugettext_lazy as _ from django.forms import ModelForm, Textarea, DateField, CheckboxInput, TextInput from .models import appeal_master, critical_dates_master, provider_master, issue_master, parent_master, file_storage from tinymce.widgets import TinyMCE from...
{"/app/forms.py": ["/app/models.py"], "/app/admin.py": ["/app/models.py"], "/app/views.py": ["/app/forms.py", "/app/models.py"], "/app/urls.py": ["/app/views.py"]}