index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
91,641
deknowny/mofatic
refs/heads/main
/mofatic/engine.py
import dataclasses import typing import pydantic import motor @dataclasses.dataclass class Engine: driver: motor.MotorDatabase async def find_one(self, collection: pydantic.BaseModel, filter: typing.Callable[[], bool], /): pass
{"/mofatic/query/boolop.py": ["/mofatic/query/base.py"], "/mofatic/query/nested.py": ["/mofatic/query/base.py"], "/mofatic/query/compare.py": ["/mofatic/query/base.py"]}
91,642
deknowny/mofatic
refs/heads/main
/mofatic/query/nested.py
import typing from mofatic.query.base import BaseFieldRule class NestedFieldRule(BaseFieldRule[BaseFieldRule]): def represent(self) -> typing.Any: return {self.name: self.value.represent()}
{"/mofatic/query/boolop.py": ["/mofatic/query/base.py"], "/mofatic/query/nested.py": ["/mofatic/query/base.py"], "/mofatic/query/compare.py": ["/mofatic/query/base.py"]}
91,643
deknowny/mofatic
refs/heads/main
/mofatic/query/compare.py
import dataclasses import enum import typing from mofatic.query.base import BaseFieldRule class ComparisonType(str, enum.Enum): EQ = "$eq" GT = "$gt" GTE = "$gte" IN = "$in" LT = "$lt" LTE = "$lte" NE = "$ne" NIN = "$nin" @dataclasses.dataclass class BaseComparisonFieldRule(BaseFiel...
{"/mofatic/query/boolop.py": ["/mofatic/query/base.py"], "/mofatic/query/nested.py": ["/mofatic/query/base.py"], "/mofatic/query/compare.py": ["/mofatic/query/base.py"]}
91,645
jsnowboard/blogappEE461L
refs/heads/master
/blog/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.main, name='blog'), url(r'^index/', views.index, name='index'), url(r'^(?P<post_id>[0-9]+)/$', views.blogpost, name='blogpost'), ]
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py"]}
91,646
jsnowboard/blogappEE461L
refs/heads/master
/blog/admin.py
from django.contrib import admin from .models import Post, PostContent, BlogTitleContent class PostContentInline(admin.StackedInline): model = PostContent extra = 1 class PostAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields' :['post_title', 'active_revision_id']}), ] inlines = [PostContentInline] list_...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py"]}
91,647
jsnowboard/blogappEE461L
refs/heads/master
/blog/models.py
import datetime from django.db import models from django.utils import timezone class Post(models.Model): post_title = models.CharField(max_length=200) pub_date = models.DateTimeField('date published', default=timezone.now) active_revision_id = models.IntegerField(default=0) def __str__(self): return self.post_ti...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py"]}
91,648
jsnowboard/blogappEE461L
refs/heads/master
/blog/views.py
from django.shortcuts import render from django.http import HttpResponse, Http404 from django.template import RequestContext, loader from blog.models import Post, PostContent def main(request): blog_post_list = Post.objects.order_by('-pub_date')[:5] return render(request, 'blog/main.html', {'blog_post_list': blog_p...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py"]}
91,653
eldritchhh/Uni_Project___AGVS_Simulator
refs/heads/master
/AGV.py
import numpy as np import random as rd from Navigation import navigation class AGV: # agent default variables initialization state = "Free" client = '' path = [] gate = -1 info_order = -1 goal = (-1, -1) # constructor def __init__(self, pos, color, id): # agent default init...
{"/Main.py": ["/Environment_Conf.py", "/AGV.py", "/System_Management.py", "/Gate.py"]}
91,654
eldritchhh/Uni_Project___AGVS_Simulator
refs/heads/master
/Environment_Conf.py
import scipy as sp import numpy as np def envir_configuration(width, height): envir = sp.zeros([height, width]) ################################ # WALLS, OFFICE, GATE configuration # ################################ # Set WALLS wall_x = np.array(list(range(5, 7))* 27 + list(range(10, 12)) * 27...
{"/Main.py": ["/Environment_Conf.py", "/AGV.py", "/System_Management.py", "/Gate.py"]}
91,655
eldritchhh/Uni_Project___AGVS_Simulator
refs/heads/master
/Main.py
import matplotlib import pylab as pl import warnings matplotlib.use('TkAgg') warnings.filterwarnings("ignore") # Functions from Pycx_Simulator import pycxsimulator from Environment_Conf import * from AGV import AGV from Navigation import * from System_Management import * from State_Transaction import * from Data_Stats...
{"/Main.py": ["/Environment_Conf.py", "/AGV.py", "/System_Management.py", "/Gate.py"]}
91,656
eldritchhh/Uni_Project___AGVS_Simulator
refs/heads/master
/System_Management.py
import random as rd import pandas as pd import numpy as np ############################################################################## # The "new_goal" function is used by the free AGV in order to get new goals # It allows to return different kind of goals considering the behavir type of # the AGV within the simult...
{"/Main.py": ["/Environment_Conf.py", "/AGV.py", "/System_Management.py", "/Gate.py"]}
91,657
eldritchhh/Uni_Project___AGVS_Simulator
refs/heads/master
/Gate.py
class Gate: lp_one = -1 lp_two = -1 lp_three = -1 AGV_queue = [] # constructor def __init__(self, id, loc_lp1, loc_lp2, loc_lp3, queue_loc): self.id = id self.loc_lp1 = loc_lp1 self.loc_lp2 = loc_lp2 self.loc_lp3 = loc_lp3 self.queue_loc = queue_loc ...
{"/Main.py": ["/Environment_Conf.py", "/AGV.py", "/System_Management.py", "/Gate.py"]}
91,658
casterbn/satmap
refs/heads/master
/setup.py
""" Setup for the satmap package """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # Setup setup( # This is the name of your project. The first time you publish this # package, this name will be registered for you. It will determine how # users can install this pro...
{"/satmap/plot_sats.py": ["/satmap/__init__.py"]}
91,659
casterbn/satmap
refs/heads/master
/satmap/plot_sats.py
#!/usr/bin/env python """ Plot GNSS satellite positions """ from __future__ import print_function, division, absolute_import import datetime as dt from argparse import ArgumentParser import matplotlib.pyplot as plt import satmap from satmap import utils def parse_args(): """ Extract inputs from command li...
{"/satmap/plot_sats.py": ["/satmap/__init__.py"]}
91,660
casterbn/satmap
refs/heads/master
/satmap/utils.py
#!/usr/bin/env python """ General utilities to support extracting GNSS satellite positions """ from __future__ import print_function, division, absolute_import import os import logging import datetime as dt from urllib.request import urlopen import json import numpy as np import matplotlib.pyplot as plt import matpl...
{"/satmap/plot_sats.py": ["/satmap/__init__.py"]}
91,661
casterbn/satmap
refs/heads/master
/satmap/__init__.py
""" Simple package-wide utilities """ from __future__ import print_function, division, absolute_import import time import logging from argparse import ArgumentParser, RawDescriptionHelpFormatter, ArgumentDefaultsHelpFormatter # Initialize logger logging.getLogger(__name__).addHandler(logging.NullHandler) LOGGER = l...
{"/satmap/plot_sats.py": ["/satmap/__init__.py"]}
91,673
mquander/captcha-tensorflow
refs/heads/master
/model-generation-scripts/model_utils.py
#!/usr/bin/env python3 import glob import matplotlib.pyplot as pyplot import math import numpy import os import pandas import tensorflow from PIL import Image from tensorflow.keras import datasets, layers, models from tensorflow.keras.callbacks import ModelCheckpoint from tensorflow.keras.layers import * from tensorf...
{"/captcha-generator.py": ["/multicolorcaptcha.py"]}
91,674
mquander/captcha-tensorflow
refs/heads/master
/multicolorcaptcha.py
# -*- coding: utf-8 -*- """ This is a slight modification of the 'multicolorcaptcha' library. Script: generator.py Description: Just an image captcha generator. Original author: Jose Miguel Rios Rubio Creation date: 08/09/2018 Last modified date: 10/11/2021 (Turhan) """ ##########################...
{"/captcha-generator.py": ["/multicolorcaptcha.py"]}
91,675
mquander/captcha-tensorflow
refs/heads/master
/model-generation-scripts/create-captcha-solving-model.py
#!/usr/bin/env python import argparse import os import pickle import sys # Functions from other file. from model_utils import * # Move one directory back to the project root. os.chdir("..") # Suppress tensorflow log messages. os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # GLOBALS IMAGE_HEIGHT = 100 IMAGE_WIDTH = 100 I...
{"/captcha-generator.py": ["/multicolorcaptcha.py"]}
91,676
mquander/captcha-tensorflow
refs/heads/master
/captcha-generator.py
#!/usr/bin/env python3 from captcha.image import ImageCaptcha from claptcha import Claptcha from multicolorcaptcha import * from PIL import Image, ImageDraw, ImageFont from tqdm import tqdm, tnrange import argparse import os import random import string import sys import uuid #========================================...
{"/captcha-generator.py": ["/multicolorcaptcha.py"]}
91,704
bezuglyyvlad/telegram-weather-bot
refs/heads/main
/api.py
import os import requests from bs4 import BeautifulSoup as BS def get_weather_from_sinoptik(city): response = requests.get(f"https://sinoptik.ua/погода-{city}") return BS(response.content, "html.parser") if response.status_code == 200 else False def get_weather_from_ow(coords): response = requests.get(...
{"/utils.py": ["/config.py", "/api.py"], "/bot.py": ["/config.py", "/api.py", "/utils.py"]}
91,705
bezuglyyvlad/telegram-weather-bot
refs/heads/main
/utils.py
from datetime import datetime import config import dbworker import telebot from api import get_city_info, get_weather_from_ow, get_weather_from_sinoptik def get_weather_string_ow(day_weather, timezone_offset): wind_gust = ( f"Порыв ветра - {day_weather['wind_gust']} метр/сек\n" if "wind_gust" in ...
{"/utils.py": ["/config.py", "/api.py"], "/bot.py": ["/config.py", "/api.py", "/utils.py"]}
91,706
bezuglyyvlad/telegram-weather-bot
refs/heads/main
/bot.py
import os import config import dbworker import telebot from api import get_city_info from dotenv import load_dotenv from utils import change_weather_mode load_dotenv() bot = telebot.TeleBot(os.environ["TELEGRAM_TOKEN"]) @bot.message_handler(commands=["start"]) def handle_start_command(message): state = dbworke...
{"/utils.py": ["/config.py", "/api.py"], "/bot.py": ["/config.py", "/api.py", "/utils.py"]}
91,707
bezuglyyvlad/telegram-weather-bot
refs/heads/main
/config.py
from enum import Enum DB_FILE_STATE = "stateDB.vdb" DB_FILE_LOCATION = "locationDB.vdb" DATE_FORMAT = "%A, %d %B" W_TODAY_TITLE = "На сегодня" W_TOMORROW_TITLE = "На завтра" W_5_DAYS_TITLE = "На 5 дней" class States(Enum): S_START = "0" S_ENTER_LOCATION = "1" S_WEATHER_TODAY = "2" S_WEATHER_TOMORROW...
{"/utils.py": ["/config.py", "/api.py"], "/bot.py": ["/config.py", "/api.py", "/utils.py"]}
91,762
dontstopmeowing/AirBnB_clone_v2
refs/heads/master
/models/engine/db_storage.py
#!/usr/bin/python3 """Change filestorage to DBStorage, module to storage""" from os import getenv from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from models.state import State from models.city import City from models.user import User from models.amenity import Amenity fro...
{"/models/engine/db_storage.py": ["/models/state.py"], "/web_flask/8-cities_by_states.py": ["/models/state.py"], "/web_flask/9-states.py": ["/models/state.py"]}
91,763
dontstopmeowing/AirBnB_clone_v2
refs/heads/master
/1-pack_web_static.py
#!/usr/bin/python3 """Fabric script that generates a .tgz archive from the contents of the web_static folder """ from datetime import datetime from fabric.api import local from os.path import isdir from os import path def do_pack(): """Generates a tgz archive.""" date_time = datetime.now().strftime("%Y%m%d%H%...
{"/models/engine/db_storage.py": ["/models/state.py"], "/web_flask/8-cities_by_states.py": ["/models/state.py"], "/web_flask/9-states.py": ["/models/state.py"]}
91,764
dontstopmeowing/AirBnB_clone_v2
refs/heads/master
/models/state.py
#!/usr/bin/python3 """ State Module for HBNB project """ import models from models.base_model import BaseModel, Base from models.city import City from os import getenv import sqlalchemy from sqlalchemy import Column, String, ForeignKey from sqlalchemy.orm import relationship class State(BaseModel, Base): """class...
{"/models/engine/db_storage.py": ["/models/state.py"], "/web_flask/8-cities_by_states.py": ["/models/state.py"], "/web_flask/9-states.py": ["/models/state.py"]}
91,765
dontstopmeowing/AirBnB_clone_v2
refs/heads/master
/tests/test_console.py
#!/usr/bin/python3 """Console test""" import unittest import console from unittest.mock import patch from io import StringIO import pep8 hbnb_console = console.HBNBCommand class ConsoleTest(unittest.TestCase): """Unittest for console""" def CreateTest(self): """Create test""" with patch('sy...
{"/models/engine/db_storage.py": ["/models/state.py"], "/web_flask/8-cities_by_states.py": ["/models/state.py"], "/web_flask/9-states.py": ["/models/state.py"]}
91,766
dontstopmeowing/AirBnB_clone_v2
refs/heads/master
/web_flask/8-cities_by_states.py
#!/usr/bin/python3 """This module contains functions that starts a Flask web application.""" from flask import Flask, render_template from models import storage from models.state import State app = Flask(__name__) @app.route('/cities_by_states', strict_slashes=False) def cities_by_states(): """Route /cities_by_...
{"/models/engine/db_storage.py": ["/models/state.py"], "/web_flask/8-cities_by_states.py": ["/models/state.py"], "/web_flask/9-states.py": ["/models/state.py"]}
91,767
dontstopmeowing/AirBnB_clone_v2
refs/heads/master
/web_flask/9-states.py
#!/usr/bin/python3 """This module contains functions that starts a Flask web application.""" from flask import Flask, render_template from models import storage from models.state import State app = Flask(__name__) @app.route('/states', strict_slashes=False) @app.route('/states/<id>', strict_slashes=False) def state...
{"/models/engine/db_storage.py": ["/models/state.py"], "/web_flask/8-cities_by_states.py": ["/models/state.py"], "/web_flask/9-states.py": ["/models/state.py"]}
91,815
tailerr/QANet-pytorch
refs/heads/master
/test/nn/modules/pointer_test.py
import unittest import torch from source.nn import Pointer class PointerTest(unittest.TestCase): def test_output_shape(self): batch_size = 5 l = 3 in_ch, kernel_size = 5, 7 pointer = Pointer(in_ch) m0 = torch.rand((batch_size, l, in_ch)) m1 = torch.rand((batch_size,...
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,816
tailerr/QANet-pytorch
refs/heads/master
/source/metrics/__init__.py
from .evaluation_tools import *
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,817
tailerr/QANet-pytorch
refs/heads/master
/source/data/SQUAD.py
import torch from torch.utils.data import Dataset import numpy as np import random import json class SQuADDataset(Dataset): def __init__(self, npz_file, num_steps, batch_size, word2ind_file): super().__init__() data = np.load(npz_file) with open(word2ind_file) as f: decoder = j...
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,818
tailerr/QANet-pytorch
refs/heads/master
/source/model/model.py
from nn import * from data import EMA class QANet(nn.Module): def __init__(self, word_mat, char_mat, emb_word_size, emb_char_size, model_dim, pretrained_char, max_pass_len, max_ques_len, kernel_size, num_heads, block_num, ch_dropout, w_dropout, grad_clip, ema_decay, length=400): ...
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,819
tailerr/QANet-pytorch
refs/heads/master
/source/data/__init__.py
from .utils import EMA from .SQUAD import SQuADDataset
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,820
tailerr/QANet-pytorch
refs/heads/master
/source/nn/modules/encoder.py
import torch.nn as nn import torch import numpy as np from torch.nn.init import kaiming_normal_ from .embedding import InitializedConv1d class Encoder(nn.Module): """ Args: described in internal classes Input: batch: a float tensor of shape (batch, length, model_dim) Output: ba...
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,821
tailerr/QANet-pytorch
refs/heads/master
/test/nn/modules/attention_test.py
import unittest import torch from source.nn import ContextQueryAttention class ContextQueryAttentionTest(unittest.TestCase): def test_output_shape(self): in_ch = 7 l1, l2 = 9, 10 attn = ContextQueryAttention(in_ch) context = torch.rand((5, l2, in_ch)) query = torch.rand((5,...
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,822
tailerr/QANet-pytorch
refs/heads/master
/test/nn/modules/encoder_test.py
from source.nn import DepthwiseSeparatableConv, MultiHeadAttention, EmbeddingEncoderLayer, PositionalEncoding import unittest import torch class DepthwiseSeparatableConvTest(unittest.TestCase): def test_output_shape(self): batch_size = 5 l = 3 in_ch, kernel_size = 5, 7 conv = Depth...
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,823
tailerr/QANet-pytorch
refs/heads/master
/source/nn/__init__.py
from .modules.embedding import * from .modules.attention import * from .modules.encoder import * from .modules.pointer import *
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,824
tailerr/QANet-pytorch
refs/heads/master
/source/model/__init__.py
from .model import QANet
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,825
tailerr/QANet-pytorch
refs/heads/master
/source/data/utils.py
from torch import nn class EMA(object): def __init__(self, decay): self.decay = decay self.shadows = {} def __len__(self): return len(self.shadows) def get(self, name: str): return self.shadows[name] def set(self, name: str, param: nn.Parameter): self.shadows...
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,826
tailerr/QANet-pytorch
refs/heads/master
/source/nn/modules/embedding.py
import torch.nn as nn import torch class Embedding(nn.Module): def __init__(self, char_emb_size, ch_dropout, w_dropout, word_emb_size, model_dim): super(Embedding, self).__init__() self.ch_dropout = ch_dropout self.w_dropout = w_dropout self.highway = Highway(2, model_dim, w_dropou...
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,827
tailerr/QANet-pytorch
refs/heads/master
/source/nn/modules/pointer.py
import torch.nn as nn import torch import math from .embedding import InitializedConv1d from .attention import mask_logits class Pointer(nn.Module): """ Input: m0: a float tensor of shape (batch, length, model_dim) m1: a float tensor of shape (batch, length, model_dim) m2: a float tens...
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,828
tailerr/QANet-pytorch
refs/heads/master
/source/nn/modules/attention.py
import torch.nn as nn import torch import math def mask_logits(target, mask): mask = mask.type(torch.float32) return target*mask + (1-mask)*(-1e30) class ContextQueryAttention(nn.Module): """ Input: context: a float tensor of shape (batch, l1, model_dim) query: a float tensor of shap...
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,829
tailerr/QANet-pytorch
refs/heads/master
/source/train.py
import argparse import logging import random import os import torch import pickle import yaml import json from tqdm import tqdm import numpy as np from tensorboardX import SummaryWriter import torch.optim as optim from data import SQuADDataset from model import QANet from math import log2 from metrics import * def ev...
{"/test/nn/modules/pointer_test.py": ["/source/nn/__init__.py"], "/source/data/__init__.py": ["/source/data/utils.py", "/source/data/SQUAD.py"], "/source/nn/modules/encoder.py": ["/source/nn/modules/embedding.py"], "/test/nn/modules/attention_test.py": ["/source/nn/__init__.py"], "/test/nn/modules/encoder_test.py": ["/...
91,830
YoginAlex/easy-goods-catalog
refs/heads/master
/goods/admin.py
# -*- coding: utf-8 -*- from django.contrib import admin from django.conf.urls import url from django.http import HttpResponseRedirect from django.db.models import Q from goods.models import * class PhotoAdmin(admin.ModelAdmin): list_display = ('image_thumb',) class ItemAdmin(admin.ModelAdmin): list_displa...
{"/goods/admin.py": ["/goods/models.py"], "/initialtodb.py": ["/goods/models.py"], "/goods/urls.py": ["/goods/api.py"], "/goods/serializers.py": ["/goods/models.py"], "/goods/api.py": ["/goods/models.py", "/goods/serializers.py"]}
91,831
YoginAlex/easy-goods-catalog
refs/heads/master
/initialtodb.py
# -*- coding: utf-8 -*- import os import os.path import random from django.conf import settings from goods.models import * colors = [u'Красный', u'Синий', u'Зеленый'] for color in colors: Color.objects.create(name=color) sizes = [u'XS', u'S', u'M', u'L', u'XL'] for size in sizes: Size.objects.create(name=s...
{"/goods/admin.py": ["/goods/models.py"], "/initialtodb.py": ["/goods/models.py"], "/goods/urls.py": ["/goods/api.py"], "/goods/serializers.py": ["/goods/models.py"], "/goods/api.py": ["/goods/models.py", "/goods/serializers.py"]}
91,832
YoginAlex/easy-goods-catalog
refs/heads/master
/goods/migrations/0002_auto__add_field_item_types.py
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Item.types' db.add_column(u'goods_item', 'types', ...
{"/goods/admin.py": ["/goods/models.py"], "/initialtodb.py": ["/goods/models.py"], "/goods/urls.py": ["/goods/api.py"], "/goods/serializers.py": ["/goods/models.py"], "/goods/api.py": ["/goods/models.py", "/goods/serializers.py"]}
91,833
YoginAlex/easy-goods-catalog
refs/heads/master
/goods/urls.py
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from goods.views import * from goods.api import * urlpatterns = patterns( '', url(r'^type_list/$', TypeOfGoodsList.as_view(), name="type-list"), url(r'^goods_type/(?P<pk>\d+)$', GoodsOfTypeList.as_view(), name='goods-...
{"/goods/admin.py": ["/goods/models.py"], "/initialtodb.py": ["/goods/models.py"], "/goods/urls.py": ["/goods/api.py"], "/goods/serializers.py": ["/goods/models.py"], "/goods/api.py": ["/goods/models.py", "/goods/serializers.py"]}
91,834
YoginAlex/easy-goods-catalog
refs/heads/master
/goods/migrations/0004_auto__chg_field_photo_image.py
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Photo.image' db.alter_column(u'goods_photo', 'image', ...
{"/goods/admin.py": ["/goods/models.py"], "/initialtodb.py": ["/goods/models.py"], "/goods/urls.py": ["/goods/api.py"], "/goods/serializers.py": ["/goods/models.py"], "/goods/api.py": ["/goods/models.py", "/goods/serializers.py"]}
91,835
YoginAlex/easy-goods-catalog
refs/heads/master
/goods/serializers.py
# -*- coding: utf-8 -*- from rest_framework import serializers from goods.models import * class ColorSerializer(serializers.ModelSerializer): class Meta: model = Color class SizeSerializer(serializers.ModelSerializer): class Meta: model = Size class TypeSerializer(serializers.ModelSeriali...
{"/goods/admin.py": ["/goods/models.py"], "/initialtodb.py": ["/goods/models.py"], "/goods/urls.py": ["/goods/api.py"], "/goods/serializers.py": ["/goods/models.py"], "/goods/api.py": ["/goods/models.py", "/goods/serializers.py"]}
91,836
YoginAlex/easy-goods-catalog
refs/heads/master
/goodslist/urls.py
# -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from goods.views import * admin.autodiscover() urlpatterns = patterns( '', url(r'^$', IndexPage.as_view(), name="index-pag...
{"/goods/admin.py": ["/goods/models.py"], "/initialtodb.py": ["/goods/models.py"], "/goods/urls.py": ["/goods/api.py"], "/goods/serializers.py": ["/goods/models.py"], "/goods/api.py": ["/goods/models.py", "/goods/serializers.py"]}
91,837
YoginAlex/easy-goods-catalog
refs/heads/master
/goods/models.py
# -*- coding: utf-8 -*- from datetime import datetime from django.db import models from django.conf import settings class Color(models.Model): """ Модель цветов товаров. Заполняется из стандартной Django админки. """ name = models.CharField(max_length=200) def __unicode__(self): retu...
{"/goods/admin.py": ["/goods/models.py"], "/initialtodb.py": ["/goods/models.py"], "/goods/urls.py": ["/goods/api.py"], "/goods/serializers.py": ["/goods/models.py"], "/goods/api.py": ["/goods/models.py", "/goods/serializers.py"]}
91,838
YoginAlex/easy-goods-catalog
refs/heads/master
/goods/api.py
# -*- coding: utf-8 -*- from rest_framework import generics, permissions from goods.models import * from goods.serializers import * class MainList(generics.ListAPIView): model = Item serializer_class = ItemSerializer def get_queryset(self): queryset = super(MainList, self).get_queryset() ...
{"/goods/admin.py": ["/goods/models.py"], "/initialtodb.py": ["/goods/models.py"], "/goods/urls.py": ["/goods/api.py"], "/goods/serializers.py": ["/goods/models.py"], "/goods/api.py": ["/goods/models.py", "/goods/serializers.py"]}
91,880
ymilkessa/ch-games
refs/heads/main
/game_state.py
from constants import BLACK, WHITE from copy import deepcopy import random class GameState(): def __init__(self, board, side, players): self._players = players self._turn_counter = 1 # read only properties self._current_side = side self._board = board ...
{"/game_state.py": ["/constants.py"], "/chess/game_state.py": ["/game_state.py", "/chess/moves.py", "/constants.py", "/chess/pieces.py"], "/chess/pieces.py": ["/constants.py", "/chess/moves.py"]}
91,881
ymilkessa/ch-games
refs/heads/main
/chess/game_state.py
from game_state import GameState from chess.moves import ChessMove from constants import BLACK, WHITE from chess.pieces import King class ChessGameState(GameState): # the method 'all_possible_moves' is the same as the parent version def check_loss(self, side=None): if not side: side = sel...
{"/game_state.py": ["/constants.py"], "/chess/game_state.py": ["/game_state.py", "/chess/moves.py", "/constants.py", "/chess/pieces.py"], "/chess/pieces.py": ["/constants.py", "/chess/moves.py"]}
91,882
ymilkessa/ch-games
refs/heads/main
/chess/pieces.py
from piece import Piece from piece_factory import PieceFactory from constants import BLACK, WHITE from chess.moves import ChessMove class ChessPieceFactory(PieceFactory): """Generates the chess piece for a given slot when setting up the board""" def create_piece(self, board, space): x, y = space.row,...
{"/game_state.py": ["/constants.py"], "/chess/game_state.py": ["/game_state.py", "/chess/moves.py", "/constants.py", "/chess/pieces.py"], "/chess/pieces.py": ["/constants.py", "/chess/moves.py"]}
91,883
ymilkessa/ch-games
refs/heads/main
/gui.py
import pygame import os class Gui(): """ The framework for an interactive chess board. """ def __init__(self): self.board_and_pieces = pygame.image.load(os.path.join("pics", "board_and_pieces_cropped.png")) self.board_width = self.board_and_pieces.get_width() cell_width = self....
{"/game_state.py": ["/constants.py"], "/chess/game_state.py": ["/game_state.py", "/chess/moves.py", "/constants.py", "/chess/pieces.py"], "/chess/pieces.py": ["/constants.py", "/chess/moves.py"]}
91,884
ymilkessa/ch-games
refs/heads/main
/constants.py
BLACK = False WHITE = True CHECKERS = "checkers" CHESS = "chess" ALPHABET = "abcdefghijklmnopqrstuvwxyz"
{"/game_state.py": ["/constants.py"], "/chess/game_state.py": ["/game_state.py", "/chess/moves.py", "/constants.py", "/chess/pieces.py"], "/chess/pieces.py": ["/constants.py", "/chess/moves.py"]}
91,885
ymilkessa/ch-games
refs/heads/main
/chess/moves.py
from move import Move class ChessMove(Move): def __repr__(self): return str(self) def __str__(self): if not self._captures: return f"basic move: {self._start}->{self._end}" else: return f"jump move: {self._start}->{self._end}, capturing {self._captures}"
{"/game_state.py": ["/constants.py"], "/chess/game_state.py": ["/game_state.py", "/chess/moves.py", "/constants.py", "/chess/pieces.py"], "/chess/pieces.py": ["/constants.py", "/chess/moves.py"]}
91,887
hecklawert/BandcampScrapper
refs/heads/master
/Main.py
''' Created on 20 jun. 2019 @author: Kemical ''' """ Importing the libraries that we are going to use for loading the settings file and scraping the website """ import configparser import time from WebDriver import * from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from seleniu...
{"/Main.py": ["/WebDriver.py"]}
91,888
hecklawert/BandcampScrapper
refs/heads/master
/WhatsAppScrapper.py
''' Created on 19 jun. 2019 @author: Kemical '''
{"/Main.py": ["/WebDriver.py"]}
91,889
hecklawert/BandcampScrapper
refs/heads/master
/WebDriver.py
''' Created on 20 jun. 2019 @author: Kemical ''' import configparser import time from WebDriver import * from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from seleniu...
{"/Main.py": ["/WebDriver.py"]}
91,906
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0013_auto_20200512_1432.py
# Generated by Django 3.0.6 on 2020-05-12 09:02 from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('orders', '0012_placedorders_no'), ] operations = [ migrations.AlterField( model_name='placedorders', ...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,907
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0004_orderitem_category.py
# Generated by Django 3.0.6 on 2020-05-10 12:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orders', '0003_orderitem'), ] operations = [ migrations.AddField( model_name='orderitem', name='catego...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,908
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0015_placedorders_no.py
# Generated by Django 3.0.6 on 2020-05-12 09:06 from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('orders', '0014_remove_placedorders_no'), ] operations = [ migrations.AddField( model_name='placedorder...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,909
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0017_placedorders_ordertime.py
# Generated by Django 3.0.6 on 2020-05-12 10:40 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orders', '0016_remove_placedorders_no'), ] operations = [ migrations.AddField( model_name='placedo...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,910
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0020_auto_20200512_1631.py
# Generated by Django 3.0.6 on 2020-05-12 11:01 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('orders', '0019_ordersplaced'), ] operations = [ migrations.RenameField( model_name='ordersplaced', old_name='c...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,911
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0007_auto_20200511_1323.py
# Generated by Django 3.0.6 on 2020-05-11 07:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orders', '0006_orderno'), ] operations = [ migrations.AddField( model_name='orderitem', name='orderno'...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,912
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/urls.py
from django.urls import path from . import views urlpatterns = [ path("", views.index, name="index"), path("add/<str:category>/<str:name>/<str:cost>", views.add, name="add"), path("delete/<str:category>/<str:name>/<str:cost>", views.delete, name="delete"), path("confirmorder/", views.confirmorder, nam...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,913
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0009_dinnerplatters_pasta_salads_subs.py
# Generated by Django 3.0.6 on 2020-05-11 16:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orders', '0008_auto_20200511_1346'), ] operations = [ migrations.CreateModel( name='DinnerPlatters', f...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,914
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0022_auto_20200512_1643.py
# Generated by Django 3.0.6 on 2020-05-12 11:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orders', '0021_auto_20200512_1641'), ] operations = [ migrations.AlterField( model_name='ordersplaced', ...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,915
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/admin.py
from django.contrib import admin from .models import RegularPizza, SicilianPizza, Category, Topping, Orderitem, Placedorders,Subs, Pasta, Salads, DinnerPlatters # Register your models here. # Register your models here. admin.site.register(RegularPizza) admin.site.register(SicilianPizza) admin.site.register(Topping) ad...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,916
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0008_auto_20200511_1346.py
# Generated by Django 3.0.6 on 2020-05-11 08:16 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('orders', '0007_auto_20200511_1323'), ] operations = [ migrations.DeleteModel( name='Orderno', ), migratio...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,917
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0011_auto_20200511_2231.py
# Generated by Django 3.0.6 on 2020-05-11 17:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orders', '0010_auto_20200511_2229'), ] operations = [ migrations.AlterField( model_name='pasta', name=...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,918
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/models.py
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver from django.core.exceptions import ObjectDoesNotExist from decimal import Decimal from datetime import datetime # Create your models here. class Category(model...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,919
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0021_auto_20200512_1641.py
# Generated by Django 3.0.6 on 2020-05-12 11:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orders', '0020_auto_20200512_1631'), ] operations = [ migrations.AlterField( model_name='ordersplaced', ...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,920
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0016_remove_placedorders_no.py
# Generated by Django 3.0.6 on 2020-05-12 09:09 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('orders', '0015_placedorders_no'), ] operations = [ migrations.RemoveField( model_name='placedorders', name='no...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,921
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0014_remove_placedorders_no.py
# Generated by Django 3.0.6 on 2020-05-12 09:03 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('orders', '0013_auto_20200512_1432'), ] operations = [ migrations.RemoveField( model_name='placedorders', name=...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,922
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/views.py
from django.http import HttpResponse from django.shortcuts import render from django.contrib.auth.models import User from django.contrib.auth import login, authenticate from django.contrib.auth.forms import UserCreationForm from django.shortcuts import render, redirect from .forms import SignUpForm from .models import ...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,923
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0023_delete_ordersplaced.py
# Generated by Django 3.0.6 on 2020-05-12 11:40 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('orders', '0022_auto_20200512_1643'), ] operations = [ migrations.DeleteModel( name='OrdersPlaced', ), ]
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,924
meenugigi/Pizza-Ordering-Application
refs/heads/master
/orders/migrations/0006_orderno.py
# Generated by Django 3.0.6 on 2020-05-11 07:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orders', '0005_placedorders'), ] operations = [ migrations.CreateModel( name='Orderno', fields=[ ...
{"/orders/admin.py": ["/orders/models.py"], "/orders/views.py": ["/orders/models.py"]}
91,948
msecret/data-act-pilot
refs/heads/master
/mappings/sba.py
import csv def getFundingOfficeName(record): """This field is generated by adding 'itemacct.acctfield3' and 'addr.name'""" return record['itemacct.acctfield3'] + record['addr.name'] def getObligatedAmount(record): """This field is generated by multiplying 'po_lines_all.quantity' by 'po_lines_all.unit_pri...
{"/processors/process_sba.py": ["/mappings/sba.py"]}
91,949
msecret/data-act-pilot
refs/heads/master
/processors/process_sba.py
import csv import argparse from bs4 import UnicodeDammit from unidecode import unidecode from mappings.sba import schema_map from schema.data_act_schema_pb2 import Action, AgencyTransaction, Amount, TreasuryAccountSymbol, Account, Agency, Award, PlaceOfPerformance, Awardee, Address, HighlyCompensatedOfficer def open_i...
{"/processors/process_sba.py": ["/mappings/sba.py"]}
91,950
msecret/data-act-pilot
refs/heads/master
/processors/process_source.py
import pandas as pd import numpy as np import glob, argparse pd.options.mode.chained_assignment = None def read_data(data_dir): """returns all .txt files in specified directory as a dict of DataFrames""" files = glob.glob('data/{}/*.txt'.format(data_dir)) df_dict = {} for file in files: key = f...
{"/processors/process_sba.py": ["/mappings/sba.py"]}
91,951
tangury/learning-code
refs/heads/master
/utils.py
__author__ = 'stgy' import numpy as np from scipy import stats import gzip import pickle def sigmoid(X): return 1 / (1 + np.exp(-X)) def neg_log_likelihood(probs,target): return -np.mean(np.log(probs[np.arange(target.shape[0]),target])) def softmax(X): num_of_samples = X.shape[0] scores = X - np.max(...
{"/layers.py": ["/utils.py"], "/AutoEncoder.py": ["/utils.py", "/layers.py"], "/StackAutoEncoder.py": ["/utils.py", "/AutoEncoder.py"]}
91,952
tangury/learning-code
refs/heads/master
/layers.py
import numpy as np import multiprocessing as mtp import time from utils import * """ this script implements some layers usually used in neural network. """ def get_index(img_height,img_width,filter_height,filter_width,pad,stride): """get index of row and column of every pixel in every img block, this functi...
{"/layers.py": ["/utils.py"], "/AutoEncoder.py": ["/utils.py", "/layers.py"], "/StackAutoEncoder.py": ["/utils.py", "/AutoEncoder.py"]}
91,953
tangury/learning-code
refs/heads/master
/AutoEncoder.py
__author__ = 'stgy' import numpy as np from utils import sigmoid,corrupt,loadData import matplotlib.pyplot as plt import matplotlib as mpl from random import randint import time from layers import * class SparseAutoEncoder: def __init__(self,input_size,hidden_size,W1=None,W2=None,b1=None,b2=None): if W1 is...
{"/layers.py": ["/utils.py"], "/AutoEncoder.py": ["/utils.py", "/layers.py"], "/StackAutoEncoder.py": ["/utils.py", "/AutoEncoder.py"]}
91,954
tangury/learning-code
refs/heads/master
/StackAutoEncoder.py
__author__ = 'stgy' import numpy as np from utils import sigmoid,softmax,neg_log_likelihood,loadData from AutoEncoder import DenoisingAutoEncoder class mlp: def __init__(self,input_size,hidden_layers_size,output_size): self.input_size = input_size self.output_size = output_size self.hidden...
{"/layers.py": ["/utils.py"], "/AutoEncoder.py": ["/utils.py", "/layers.py"], "/StackAutoEncoder.py": ["/utils.py", "/AutoEncoder.py"]}
91,957
arthurbarros/duckduckgo-search-api
refs/heads/master
/example/search.py
from duckduckgo import duckduckgo search_results = duckduckgo.search('coca cola cnpj') for r in search_results: print(r.name, r.description)
{"/example/search.py": ["/duckduckgo/__init__.py"], "/duckduckgo/duckduckgo.py": ["/duckduckgo/modules/__init__.py"], "/duckduckgo/modules/standard_search.py": ["/duckduckgo/modules/utils.py"], "/duckduckgo/__init__.py": ["/duckduckgo/modules/__init__.py"]}
91,958
arthurbarros/duckduckgo-search-api
refs/heads/master
/duckduckgo/modules/__init__.py
from __future__ import print_function from . import standard_search
{"/example/search.py": ["/duckduckgo/__init__.py"], "/duckduckgo/duckduckgo.py": ["/duckduckgo/modules/__init__.py"], "/duckduckgo/modules/standard_search.py": ["/duckduckgo/modules/utils.py"], "/duckduckgo/__init__.py": ["/duckduckgo/modules/__init__.py"]}
91,959
arthurbarros/duckduckgo-search-api
refs/heads/master
/duckduckgo/duckduckgo.py
from __future__ import unicode_literals from __future__ import absolute_import from .modules import standard_search __author__ = "Arthur Barros <arthbarros@gmail.com> " __version__ = "1.0.0" """Defines the public inteface of the API.""" search = standard_search.search if __name__ == "__main__": import doctest...
{"/example/search.py": ["/duckduckgo/__init__.py"], "/duckduckgo/duckduckgo.py": ["/duckduckgo/modules/__init__.py"], "/duckduckgo/modules/standard_search.py": ["/duckduckgo/modules/utils.py"], "/duckduckgo/__init__.py": ["/duckduckgo/modules/__init__.py"]}
91,960
arthurbarros/duckduckgo-search-api
refs/heads/master
/duckduckgo/modules/standard_search.py
from .utils import _get_search_url, get_html from bs4 import BeautifulSoup class DuckDuckGoResult: """Represents a DuckDuckGo search result.""" name = None link = None description = None # PUBLIC def search(query): """Returns a list of DuckDuckGoResult. Args: query: String to search...
{"/example/search.py": ["/duckduckgo/__init__.py"], "/duckduckgo/duckduckgo.py": ["/duckduckgo/modules/__init__.py"], "/duckduckgo/modules/standard_search.py": ["/duckduckgo/modules/utils.py"], "/duckduckgo/__init__.py": ["/duckduckgo/modules/__init__.py"]}
91,961
arthurbarros/duckduckgo-search-api
refs/heads/master
/duckduckgo/modules/utils.py
import requests def _get_search_url(query): return "https://duckduckgo.com/html/?q={}".format(query) def get_html(url, connection_manager=None): header = { 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/10.10 Chromium/17.0.963.65 Chrome/17.0.963.65 Safari...
{"/example/search.py": ["/duckduckgo/__init__.py"], "/duckduckgo/duckduckgo.py": ["/duckduckgo/modules/__init__.py"], "/duckduckgo/modules/standard_search.py": ["/duckduckgo/modules/utils.py"], "/duckduckgo/__init__.py": ["/duckduckgo/modules/__init__.py"]}
91,962
arthurbarros/duckduckgo-search-api
refs/heads/master
/requirements.py
import os import re import logging import warnings from pkg_resources import Requirement as Req try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse __version__ = '0.1.0' logging.basicConfig(level=logging.WARNING) VCS = ['git', 'hg', 'svn', 'bzr'] class Requirement(obj...
{"/example/search.py": ["/duckduckgo/__init__.py"], "/duckduckgo/duckduckgo.py": ["/duckduckgo/modules/__init__.py"], "/duckduckgo/modules/standard_search.py": ["/duckduckgo/modules/utils.py"], "/duckduckgo/__init__.py": ["/duckduckgo/modules/__init__.py"]}
91,963
arthurbarros/duckduckgo-search-api
refs/heads/master
/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('requirements.txt') as f: requirements = [req.strip() for req in f.readlines()] setup(name='duckduckgo-search-api', version='1.0.0', url='https://git...
{"/example/search.py": ["/duckduckgo/__init__.py"], "/duckduckgo/duckduckgo.py": ["/duckduckgo/modules/__init__.py"], "/duckduckgo/modules/standard_search.py": ["/duckduckgo/modules/utils.py"], "/duckduckgo/__init__.py": ["/duckduckgo/modules/__init__.py"]}
91,964
arthurbarros/duckduckgo-search-api
refs/heads/master
/duckduckgo/__init__.py
from __future__ import absolute_import from .modules import standard_search
{"/example/search.py": ["/duckduckgo/__init__.py"], "/duckduckgo/duckduckgo.py": ["/duckduckgo/modules/__init__.py"], "/duckduckgo/modules/standard_search.py": ["/duckduckgo/modules/utils.py"], "/duckduckgo/__init__.py": ["/duckduckgo/modules/__init__.py"]}
91,968
weaming/multipart-base-n-converter
refs/heads/master
/multipart_base_n/__init__.py
import string def simple_encode(num, alphabet): """Encode a positive number in Base X Arguments: - `num`: The number to encode - `alphabet`: The alphabet to use for encoding """ if num == 0: return alphabet[0] arr = [] base = len(alphabet) while num: num, rem = div...
{"/multipart_base_n/__main__.py": ["/multipart_base_n/__init__.py"]}
91,969
weaming/multipart-base-n-converter
refs/heads/master
/multipart_base_n/__main__.py
import sys import argparse import string from . import encode, decode def main(): parser = argparse.ArgumentParser() parser.set_defaults(command=None) sub_parser = parser.add_subparsers(help="sub commands") cmd = "encode" command1 = sub_parser.add_parser(cmd, help=cmd) command1.set_defaults(c...
{"/multipart_base_n/__main__.py": ["/multipart_base_n/__init__.py"]}
91,970
henchaves/keysfood-flask
refs/heads/master
/keysfood/ext/migrate.py
from flask_migrate import Migrate from keysfood.ext.db import models, db migrate = Migrate() def init_app(app): migrate.init_app(app, db)
{"/keysfood/ext/auth/__init__.py": ["/keysfood/ext/auth/admin.py", "/keysfood/ext/admin/__init__.py"], "/tests/conftest.py": ["/keysfood/app.py"]}