repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
dachrillz/Python-Rags | tests/caching/test_cache.py | <reponame>dachrillz/Python-Rags
from unittest import TestCase
from abc import ABC
from src.library import inh, eq, syn, Weaver
#################################################
# Grammar Specification
#################################################
class MinTree:
"""
This is a class that defines the attr... |
dachrillz/Python-Rags | tests/modularization/rag_first_module.py | """
The files in this folder tests so that the library can be modularized.
That is, can the RAG be defined in multiple files.
This file defines the circular attributes
"""
from src.library import eq, syn
#################################################
# Grammar Specification
#######################################... |
dachrillz/Python-Rags | tests/inh/test_inh_basic_2.py | <gh_stars>1-10
from unittest import TestCase
from src.library import inh, eq, Weaver
#################################################
# Grammar Specification
#################################################
class RAG:
def __init__(self):
# Declare attributes
inh(Node, 'root')
eq(Ro... |
dachrillz/Python-Rags | tests/library_functionality/test_infer_parents.py | <gh_stars>1-10
from unittest import TestCase
from abc import ABC
from src.library import Weaver
#################################################
# Tree Specification
#################################################
class Program:
def __init__(self, value, node):
self.value = value
self.node... |
dachrillz/Python-Rags | main.py | <reponame>dachrillz/Python-Rags
import sys
from pprint import pprint
import example.min_tree as example
import example.state_machine as state_example
import example.calc as calc_example
def display_help():
pprint("Possible args -- test, example, help")
pprint("test -- Run tests")
pprint("exampletree -- r... |
dachrillz/Python-Rags | tests/modularization/test_modularization.py | <reponame>dachrillz/Python-Rags<filename>tests/modularization/test_modularization.py
"""
The files in this folder tests so that the library can be modularized.
That is, can the RAG be defined in multiple files.
This is the main file that binds all the other files together.
"""
from unittest import TestCase
from src.... |
dachrillz/Python-Rags | example/calc.py | <filename>example/calc.py
from abc import ABC
from src.library import inh, eq, syn, Weaver
#################################################
# Grammar Specification
#################################################
class Calc:
"""
This is a class that defines the attributes we want to give to the a tree.
... |
dachrillz/Python-Rags | tests/modularization/tree_definition.py | <reponame>dachrillz/Python-Rags<gh_stars>1-10
"""
The files in this folder tests so that the library can be modularized.
That is, can the RAG be defined in multiple files.
This file defines the tree that is to be attributed.
It has to be defined in a separate file in order to avoid circular imports.
"""
from abc impo... |
dachrillz/Python-Rags | tests/modularization/rag_second_module.py | """
The files in this folder tests so that the library can be modularized.
That is, can the RAG be defined in multiple files.
This file defines the inherited attributes
"""
from src.library import inh, eq
from tests.modularization.tree_definition import Node, Program
###############################################... |
dachrillz/Python-Rags | example/min_tree.py | <reponame>dachrillz/Python-Rags
from abc import ABC
from src.library import inh, eq, syn, Weaver
#################################################
# Grammar Specification
#################################################
class MinTree:
"""
This is a class that defines the attributes we want to give to the a... |
dachrillz/Python-Rags | src/library.py | ########################################################
#
# LIBRARY STUFF!
#
########################################################
from functools import lru_cache
def syn(type_of_class, attribute_name, equation=None):
"""
@TODO: this is somewhat inconsistent when one gives the equation directly, rewrite t... |
dachrillz/Python-Rags | example/state_machine.py | from abc import ABC
from src.library import inh, eq, syn, Weaver
#################################################
# Grammar Specification
#################################################
class MinTree:
"""
This is a class that defines the attributes we want to give to the a tree.
That is, this is the... |
dachrillz/Python-Rags | tests/inh/test_inh_basic_1.py | <gh_stars>1-10
from unittest import TestCase
from src.library import inh, eq, Weaver
#################################################
# Grammar Specification
#################################################
class RAG:
def __init__(self):
# Declare attributes
inh(Node, "inhAttr")
eq... |
dachrillz/Python-Rags | tests/inh/test_inh_basic_3.py | from unittest import TestCase
from src.library import inh, eq, Weaver
#################################################
# Grammar Specification
#################################################
class RAG:
def __init__(self):
# Declare attributes
inh(A, 'value')
eq(Node, 'value', lamb... |
g-dolphin/ECP | plots.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 30 13:40:15 2021
@author: GD
"""
# Script for plots
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
plt.style.use('ggplot')
plt.rcParams['figure.figsize'] = (8,6)
plt.rcParams['font.size'] = 12
pd.se... |
Jiafauser/News_blog | apps/doc/urls.py | <filename>apps/doc/urls.py
from django.urls import path
from . import views
app_name = 'docs'
urlpatterns = [
path('', views.doc_list, name='doc_list'),
]
|
Jiafauser/News_blog | apps/verifications/urls.py | <filename>apps/verifications/urls.py
from django.urls import path
from . import views
app_name = 'verifications'
urlpatterns = [
path('image_codes/<uuid:image_code_id>/', views.ImageCode.as_view(), name='image_codes'),
] |
Jiafauser/News_blog | apps/doc/views.py | from django.shortcuts import render
# Create your views here.
def doc_list(request):
return render(request, 'doc/docDownload.html')
|
Jiafauser/News_blog | apps/user/models.py | <filename>apps/user/models.py<gh_stars>0
from django.db import models
from django.contrib.auth.models import AbstractUser
from django.contrib.auth.models import UserManager as _UserManager
# Create your models here.
# 方法重写
class UserManager(_UserManager):
def create_superuser(self, username, password, email=None,... |
Jiafauser/News_blog | apps/course/views.py | from django.shortcuts import render
from django.views import View
# Create your views here.
def course_list(request):
return render(request, 'course/course.html')
|
Jiafauser/News_blog | apps/course/urls.py | <gh_stars>0
from django.urls import path
from . import views
app_name = 'course'
urlpatterns = [
path('', views.course_list, name='course_list'),
]
|
Jiafauser/News_blog | apps/news/views.py | from django.shortcuts import render
from django.http import HttpResponse
from django.views import View
# Create your views here.
class IndexView(View):
def get(self, request):
return render(request, 'news/index.html')
class SearchView(View):
def get(self, request):
return render(request, '... |
Jiafauser/News_blog | apps/news/urls.py | from django.urls import path
from . import views
app_name = 'news'
urlpatterns = [
path('', views.IndexView.as_view(), name='index'),
path('search/', views.SearchView.as_view(), name='search'),
]
|
Jiafauser/News_blog | apps/verifications/views.py | <filename>apps/verifications/views.py<gh_stars>0
from django.shortcuts import render
from utils.captcha.captcha import captcha
from django.http import HttpResponse
# Create your views here.
from django.views import View
class ImageCode(View):
def get(self, request, image_code_id):
text, image = captcha.ge... |
Camnooten/django-ban | fts/Ban.py | <filename>fts/Ban.py
from ._base import BaseTestCase
from datetime import datetime, timedelta, timezone
import dateutil.parser
from django.conf import settings
from django.contrib.auth.models import User
from django.core.management import call_command
from django.test import override_settings
from ban.models import ... |
Camnooten/django-ban | ban/admin.py | from datetime import datetime, timedelta, timezone
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth import get_user_model
from ban.models import Ban, Warn
USER_MODEL = get_user_model()
class ExtendedUserAdmin(UserAdmin):
actions = [
'ban_selecte... |
Camnooten/django-ban | demo/main/urls.py | <gh_stars>1-10
from django.conf.urls import url
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
url(
r'^$',
views.dummy,
name='dummy',
),
url(
'^login/',
auth_views.login,
{'template_name': 'main/login.html'},
... |
Camnooten/django-ban | ban/urls.py | from django.conf.urls import patterns, url
urlpatterns = patterns('',
# url(r'^$', someview, name='someview'),
)
|
Camnooten/django-ban | demo/main/views.py | <gh_stars>1-10
from django.http import HttpResponse
def dummy(request):
return HttpResponse('DummyResponse')
|
Camnooten/django-ban | fabfile.py | from contextlib import contextmanager
from fabric.api import cd, local, prefix, shell_env
VENV_PATH = '~/.virtualenvs/ban'
PYTHON_PATH = '/usr/bin/python3.4'
SETTINGS_MODULE = 'demo.settings'
DEMO_PATH = 'demo'
def install():
local('virtualenv -p {} {}'.format(PYTHON_PATH, VENV_PATH))
with _venv_local():
... |
Camnooten/django-ban | ban/management/commands/clean_inactive_bans.py | from datetime import datetime, timezone
from django.core.management.base import BaseCommand
from ban.models import Ban
class Command(BaseCommand):
help = 'Cleans up inactive bans.'
def handle(self, *args, **options):
now = datetime.now(timezone.utc)
Ban.objects.filter(end_date__lte=now).del... |
Chatha-Sphere/mousa | train.py | from helpers import prepare_batches, get_target_tensor
import torch
import torch.nn as nn
import time
from random import shuffle
def train(model, training_data, validation_data,
epochs, lr, evaluate_per, batch_size):
model.train() #short hand to begin tracking the gradient
optimizer = torch.optim.Ada... |
Chatha-Sphere/mousa | model.py | import torch.nn as nn
import torch.nn.functional as F
from helpers import one_hot
from torch import stack
class CharRNN(nn.Module):
def __init__(self, n_chars, hidden_size, n_rnn_layers=1, dropout=0):
super().__init__()
self.n_layers = n_rnn_layers
self.n_hidden = hid... |
Chatha-Sphere/mousa | helpers.py | <gh_stars>1-10
import torch
import torch.nn.functional as F
from torch.distributions.multinomial import Multinomial
def one_hot(sequence, n_states):
"""
Given a list of integers and the maximal number of unique values found
in the list, return a one-hot encoded tensor of shape (m, n)
where m is sequenc... |
Chatha-Sphere/mousa | shakespeare.py | <gh_stars>1-10
from corpora import CharEncoder, extract_shakespeare_data
from random import seed, shuffle
from model import CharRNN
from train import train
from helpers import make_sequences, sample
import argparse
def main():
parser = argparse.ArgumentParser("Char-RNN on the complete works of Shakespeare")
... |
Chatha-Sphere/mousa | corpora.py | """Contains classes to extract text data and to encode text corpora"""
import pdb
class CharEncoder():
"""
Contains data on an encoded text corpus with labelled characters, including unique characters and
mappings to/from characters to integers.
"""
def __init__(self, corpus):
"""
... |
SMSEdge/API-Python | smsedge_api_python/__init__.py | <filename>smsedge_api_python/__init__.py
from smsedge_api_python.sms_edge_api import SmsEdgeApi |
SMSEdge/API-Python | smsedge_api_python/sms_edge_api.py | <filename>smsedge_api_python/sms_edge_api.py<gh_stars>0
import requests
from cerberus import Validator
class SmsEdgeApi(object):
# MAIN
endpoint = 'https://api.smsedge.io/v1/'
apiKey = ''
def __init__(self, api_key):
self.api_key = api_key
# REFERENCES
def get_functions(self):
... |
Stepland/marshmallow-jsonschema | example/example.py | from flask import Flask, jsonify
from marshmallow import Schema, fields
from marshmallow_jsonschema import JSONSchema
app = Flask(__name__)
class UserSchema(Schema):
name = fields.String()
address = fields.String()
@app.route("/schema")
def schema():
schema = UserSchema()
return jsonify(JSONSchema(... |
Stepland/marshmallow-jsonschema | tests/test_validation.py | <filename>tests/test_validation.py
import pytest
from marshmallow import Schema, fields, validate
from marshmallow.validate import OneOf, Range
from marshmallow_jsonschema import JSONSchema, UnsupportedValueError
from marshmallow_jsonschema.compat import MARSHMALLOW_2, MARSHMALLOW_3
from . import UserSchema, validate_... |
Stepland/marshmallow-jsonschema | marshmallow_jsonschema/compat.py | import sys
import marshmallow
PY2 = int(sys.version_info[0]) == 2
MARSHMALLOW_MAJOR_VERSION = int(marshmallow.__version__.split(".", 1)[0])
MARSHMALLOW_2 = MARSHMALLOW_MAJOR_VERSION == 2
MARSHMALLOW_3 = MARSHMALLOW_MAJOR_VERSION == 3
if PY2:
text_type = unicode
binary_type = str
basestring = basestring
... |
NivNayman/XNAS | parameters.py | <gh_stars>10-100
from collections import namedtuple
Dataset = namedtuple('Dataset',
['num_classes',
'num_channels',
'hw',
'mean',
'std',
'initial_channels_factor',
'i... |
NivNayman/XNAS | model_imagenet.py | <reponame>NivNayman/XNAS
import torch
import torch.nn as nn
import operations as ops
from genotypes import Genotype
from model import Cell
from utils import SELayer
class NetworkImageNet(nn.Module):
def __init__(self, C, num_classes, layers, genotype, do_SE=True, C_stem=56):
stem_activation = nn.ReLU
... |
NivNayman/XNAS | utils.py | <gh_stars>10-100
import os
import torch
import shutil
import time
import logging
import numpy as np
import torchvision.transforms as transforms
from torch.autograd import Variable
import torch.nn as nn
import parameters as params
class AvgrageMeter(object):
def __init__(self):
self.reset()
def reset(... |
NivNayman/XNAS | test.py | import os
import sys
import time
import glob
import numpy as np
import torch
import utils
import logging
import argparse
import torch.nn as nn
import genotypes
import torch.utils
import torchvision.datasets as dset
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
from model import Network
impor... |
NivNayman/XNAS | test_imagenet.py | <filename>test_imagenet.py
import os
import sys
import time
import numpy as np
import torch
import utils
import glob
import random
import logging
import argparse
import torch.nn as nn
import genotypes
import torch.utils
import torchvision.datasets as dset
import torchvision.transforms as transforms
import torch.backend... |
NivNayman/XNAS | model.py | <reponame>NivNayman/XNAS<gh_stars>10-100
import torch
import torch.nn as nn
import utils as utils
import operations as ops
from genotypes import Genotype
from utils import SELayer
class Cell(nn.Module):
def __init__(self, genotype, C_prev_prev, C_prev, C, reduction, reduction_prev):
super(Cell, self).__in... |
mlinhard/wifi-analysis | analyse.py | #!/usr/bin/python3
"""Analyse captured packets from Wi-Fi interface
Usage:
analyse.py <pcap-file> <config-file>
Options:
-h --help Show this screen
--version Show version
"""
from docopt import docopt
from scapy.layers.dot11 import Dot11
from scapy.utils import rdpcap
import json
from builtins import set
... |
avashisth/ML-App | data_visualization_app.py | import streamlit as st
import plotly_express as px
import pandas as pd
from sklearn.experimental import enable_iterative_imputer
from sklearn.impute import KNNImputer
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
from numpy import percentile
from scipy import stats
# configuration
st.set_opt... |
matanwrites/AlgoGist | Array-Pascal.py | <reponame>matanwrites/AlgoGist
def pascal(numRows):
res = []
for i in range(1, numRows + 1):
r = []
while len(r) < i:
for n in range(i):
if n == 0 or n == i - 1:
r.append(1)
else:
r.append(prev[n-1] + prev[n])
... |
matanwrites/AlgoGist | Sequence-Collatz.py | <gh_stars>0
class RefValue(object):
def __init__(self, val):
self.val = val
def collatz(n, steps):
while n > 1:
steps.val += 1
if n % 2 == 0:
n //= 2
else:
n = 3 * n + 1
return n
def collatz_r(n, steps):
if n == 1:
return 1
steps.va... |
TNRIS/lake-gallery | lakegallery/map/admin.py | <reponame>TNRIS/lake-gallery
from django.contrib.gis import admin
from .models import (MajorReservoirs, HistoricalAerialLinks,
StoryContent, LakeStatistics, SignificantEvents,
BoatRamps, ChannelMarkers, Hazards, Parks)
class MajorReservoirsAdmin(admin.OSMGeoAdmin):
list_d... |
TNRIS/lake-gallery | lakegallery/api/renderers.py | from rest_framework.renderers import BrowsableAPIRenderer
class BrowsableAPIRendererFormatted(BrowsableAPIRenderer):
"""Renders the browsable api, but formats various details."""
def get_context(self, *args, **kwargs):
ctx = super().get_context(*args, **kwargs)
ctx['name'] = ctx['name'].repla... |
TNRIS/lake-gallery | lakegallery/map/migrations/0025_boatramps_channelmarkers_hazards_parks.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-10 20:04
from __future__ import unicode_literals
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('map', '0024_auto... |
TNRIS/lake-gallery | lakegallery/api/views.py | <gh_stars>1-10
from django.contrib.auth.models import User, Group
from rest_framework import viewsets
from .serializers import (ReservoirsSerializer,
ReservoirURLSerializer)
from .filters import URLFilter
from rest_framework_extensions.mixins import NestedViewSetMixin
from map.models import ... |
TNRIS/lake-gallery | lakegallery/map/migrations/0027_majorreservoirs_story.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-16 16:12
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('map', '0026_auto_20171011_0905'),
]
operations = [
migrations.AddField(
... |
TNRIS/lake-gallery | lakegallery/map/migrations/0014_auto_20170929_1000.py | <reponame>TNRIS/lake-gallery<filename>lakegallery/map/migrations/0014_auto_20170929_1000.py
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-29 15:00
from __future__ import unicode_literals
from django.db import migrations, models
import map.models
class Migration(migrations.Migration):
dependenc... |
TNRIS/lake-gallery | lakegallery/api/serializers.py | <filename>lakegallery/api/serializers.py
from django.contrib.auth.models import User, Group
from rest_framework import serializers
from rest_framework_gis.serializers import GeoFeatureModelSerializer
from rest_framework.reverse import reverse
from map.models import MajorReservoirs
class ReservoirsSerializer(GeoFeatu... |
TNRIS/lake-gallery | lakegallery/map/migrations/0012_storycontent_section_one_photo.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-29 14:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('map', '0011_auto_20170929_0857'),
]
operations = [
migrations.AddField(
... |
TNRIS/lake-gallery | lakegallery/map/signals.py | <reponame>TNRIS/lake-gallery
from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver
from map.models import MajorReservoirs, StoryContent
@receiver(post_save, sender=StoryContent)
def enable_lake(sender, **kwargs):
instance = kwargs['instance']
# update major reservoir... |
TNRIS/lake-gallery | lakegallery/map/migrations/0015_auto_20170929_1507.py | <reponame>TNRIS/lake-gallery
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-29 20:07
from __future__ import unicode_literals
from django.db import migrations, models
import map.models
class Migration(migrations.Migration):
dependencies = [
('map', '0014_auto_20170929_1000'),
]
... |
TNRIS/lake-gallery | lakegallery/map/migrations/0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-12 19:32
from __future__ import unicode_literals
import django.contrib.gis.db.models.fields
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migra... |
TNRIS/lake-gallery | lakegallery/map/migrations/0035_remove_majorreservoirs_region.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.23 on 2019-09-11 19:24
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('map', '0034_delete_rwpas'),
]
operations = [
migrations.RemoveField(
m... |
TNRIS/lake-gallery | lakegallery/map/tests.py | # from django.test import Client, TestCase
# from django.urls import reverse
# from django.conf import settings
# from django.core.exceptions import ValidationError
# from bs4 import BeautifulSoup
# from django.http import HttpRequest
# from django.contrib.staticfiles import finders
# from django.contrib.gis.geos imp... |
TNRIS/lake-gallery | lakegallery/map/migrations/0028_auto_20171017_1443.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-17 19:43
from __future__ import unicode_literals
from django.db import migrations, models
import map.validators
class Migration(migrations.Migration):
dependencies = [
('map', '0027_majorreservoirs_story'),
]
operations = [
... |
TNRIS/lake-gallery | lakegallery/map/migrations/0018_auto_20171004_0832.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-04 13:32
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('map', '0017_auto_20171003_1556'),
]
operations = [
migrations.AlterModelOpt... |
TNRIS/lake-gallery | lakegallery/map/models.py | from django.conf import settings
from django.db import models
from django.contrib.gis.db import models as gismodels
from django.utils.safestring import mark_safe
from multiselectfield import MultiSelectField
from .validators import validate_past_dates
import os
import boto3
import datetime
YEAR_CHOICES = []
for r in r... |
TNRIS/lake-gallery | lakegallery/map/migrations/0029_auto_20171018_0822.py | <reponame>TNRIS/lake-gallery<gh_stars>1-10
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-18 13:22
from __future__ import unicode_literals
from django.db import migrations, models
import map.models
class Migration(migrations.Migration):
dependencies = [
('map', '0028_auto_20171017_1443'... |
TNRIS/lake-gallery | lakegallery/map/migrations/0017_auto_20171003_1556.py | <filename>lakegallery/map/migrations/0017_auto_20171003_1556.py<gh_stars>1-10
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-03 20:56
from __future__ import unicode_literals
from django.db import migrations, models
import multiselectfield.db.fields
class Migration(migrations.Migration):
depende... |
TNRIS/lake-gallery | lakegallery/map/migrations/0020_auto_20171004_1050.py | <reponame>TNRIS/lake-gallery
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-04 15:50
from __future__ import unicode_literals
from django.db import migrations
import multiselectfield.db.fields
class Migration(migrations.Migration):
dependencies = [
('map', '0019_auto_20171004_0935'),
... |
TNRIS/lake-gallery | lakegallery/map/validators.py | from django.core.exceptions import ValidationError
import datetime
def validate_past_dates(value):
if value > datetime.date.today():
raise ValidationError("The date cannot be in the future!")
return value
|
TNRIS/lake-gallery | lakegallery/map/migrations/0021_significantevents.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-09 16:13
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('map', '0020_auto_20171004_1050'),
]
operations = [... |
TNRIS/lake-gallery | lakegallery/map/views.py | <reponame>TNRIS/lake-gallery
from django.shortcuts import render, redirect
from django.http import Http404
from django.shortcuts import render_to_response
# from django.template import RequestContext
from .models import (MajorReservoirs, HistoricalAerialLinks,
StoryContent, LakeStatistics, Signifi... |
TNRIS/lake-gallery | lakegallery/map/migrations/0004_auto_20170925_1138.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-25 16:38
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('map', '0003_auto_20170925_1126'),
]
operations = [
migrations.AlterModelOptions(
... |
TNRIS/lake-gallery | lakegallery/map/migrations/0026_auto_20171011_0905.py | <filename>lakegallery/map/migrations/0026_auto_20171011_0905.py<gh_stars>1-10
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-11 14:05
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('map', '0025_bo... |
TNRIS/lake-gallery | lakegallery/map/migrations/0030_auto_20171114_1430.py | <gh_stars>1-10
# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-14 20:30
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('map', '0029_auto_20171018_0822'),
]
operations = [
migration... |
TNRIS/lake-gallery | lakegallery/lakegallery/settings.py | """
Django settings for lakegallery project.
Generated by 'django-admin startproject' using Django 1.11.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
impor... |
TNRIS/lake-gallery | lakegallery/map/migrations/0034_delete_rwpas.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.23 on 2019-09-11 13:37
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('map', '0033_auto_20190613_1206'),
]
operations = [
migrations.DeleteModel(
... |
TNRIS/lake-gallery | lakegallery/lakegallery/urls.py | """lakegallery URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Clas... |
TNRIS/lake-gallery | lakegallery/api/api.py | <filename>lakegallery/api/api.py
from rest_framework import routers
from .views import ReservoirsViewSet
from rest_framework_extensions.routers import NestedRouterMixin
class NestedDefaultRouter(NestedRouterMixin, routers.DefaultRouter):
pass
router = NestedDefaultRouter()
# main routes
reservoirs_router = rout... |
TNRIS/lake-gallery | lakegallery/map/migrations/0022_auto_20171009_1430.py | <reponame>TNRIS/lake-gallery
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-09 19:30
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('map', '0021_significantevents'),
]
operations = [
migr... |
TNRIS/lake-gallery | lakegallery/map/migrations/0033_auto_20190613_1206.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.21 on 2019-06-13 17:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('map', '0032_auto_20190613_0802'),
]
operations = [
migrations.AlterField(
... |
TNRIS/lake-gallery | lakegallery/map/migrations/0008_auto_20170928_1323.py | <gh_stars>1-10
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-28 18:23
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('map', '0007_storycontent'),
]
opera... |
TNRIS/lake-gallery | lakegallery/map/load.py | import os
from django.contrib.gis.utils import LayerMapping
from .models import (MajorReservoirs, BoatRamps, ChannelMarkers,
Hazards, Parks)
majorreservoirs_mapping = {
'res_name': 'RES_NAME',
'type': 'TYPE',
'status': 'STATUS',
'res_lbl': 'RES_LBL',
'geom': 'MULTIPOLYGON25D',
... |
TNRIS/lake-gallery | lakegallery/map/urls.py | from django.conf.urls import url
from . import views
from django.views.generic.base import RedirectView
app_name = 'map'
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^about/$', views.about, name='about'),
url(r'^about', RedirectView.as_view(url='about/')),
url(r'^([\w|\W]+)$', views.st... |
TNRIS/lake-gallery | lakegallery/api/filters.py | from django_filters import rest_framework as filters
from map.models import MajorReservoirs
class URLFilter(filters.FilterSet):
url = filters.CharFilter(method='filter_url_string')
class Meta:
model = MajorReservoirs
fields = ('res_lbl', )
# querying based on URL doesn't really make sen... |
TNRIS/lake-gallery | lakegallery/map/migrations/0016_lakestatistics.py | <reponame>TNRIS/lake-gallery
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-03 19:09
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import multiselectfield.db.fields
class Migration(migrations.Migration):
dependencies = [
... |
TNRIS/lake-gallery | lakegallery/map/migrations/0007_storycontent.py | <filename>lakegallery/map/migrations/0007_storycontent.py
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-28 18:13
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('m... |
TNRIS/lake-gallery | lakegallery/map/migrations/0024_auto_20171010_0847.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-10 13:47
from __future__ import unicode_literals
from django.db import migrations, models
import map.validators
class Migration(migrations.Migration):
dependencies = [
('map', '0023_auto_20171009_1436'),
]
operations = [
mi... |
TNRIS/lake-gallery | lakegallery/map/migrations/0019_auto_20171004_0935.py | <filename>lakegallery/map/migrations/0019_auto_20171004_0935.py
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-04 14:35
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('map', '0018_auto_20171004_08... |
destroyer92/pyogame | setup.py | from distutils.core import setup
setup(
name='ogame',
packages=['ogame'],
version='8.1.0.21',
license='MIT',
description='lib for the popular browsergame ogame',
author='PapeprPieceCode',
author_email='<EMAIL>',
url='https://github.com/alaingilbert/pyogame',
download_url='https://gi... |
destroyer92/pyogame | ogame/test.py | <reponame>destroyer92/pyogame
import unittest
from random import randint
from ogame.constants import *
class UnittestOgame(unittest.TestCase):
empire = None
ids = []
def collect_all_ids(self):
self.ids.extend(self.empire.planet_ids())
self.ids.extend(self.empire.moon_ids())
def test_... |
destroyer92/pyogame | ogame/__init__.py | import re
import requests
import unittest
from bs4 import BeautifulSoup
from datetime import datetime
try:
import constants as const
except ImportError:
import ogame.constants as const
class OGame(object):
def __init__(
self,
universe,
username,
password,
... |
fxdemolisher/frano | frano/settings.py | # Copyright (c) 2011 <NAME>
# Licensed under the MIT license
# see LICENSE file for copying permission.
import datetime, os, glob
# build info
BUILD_VERSION = '0.12'
BUILD_DATETIME = datetime.datetime(2011, 9, 27, 7, 44, 0)
# base db set up, the rest is in environment specific setting files
DATABASE_ENGINE = 'mysql'... |
fxdemolisher/frano | frano/main/view_utils.py | <reponame>fxdemolisher/frano
# Copyright (c) 2011 <NAME>
# Licensed under the MIT license
# see LICENSE file for copying permission.
from datetime import datetime
from django.shortcuts import redirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from models import Portfo... |
fxdemolisher/frano | frano/quotes/views.py | # Copyright (c) 2011 <NAME>
# Licensed under the MIT license
# see LICENSE file for copying permission.
from datetime import date
from datetime import datetime
from django.http import HttpResponse
from models import price_as_of
from models import quote_by_symbol
#-------------\
# CONSTANTS |
#-------------/
#---... |
fxdemolisher/frano | frano/management/commands/refresh_price_history.py | # Copyright (c) 2011 <NAME>
# Licensed under the MIT license
# see LICENSE file for copying permission.
from sys import stdout
from django.core.management.base import BaseCommand
from frano.quotes.models import Quote
from frano.quotes.models import refresh_price_history
class Command(BaseCommand):
help = 'Refresh... |
fxdemolisher/frano | frano/account/models.py | <filename>frano/account/models.py
# Copyright (c) 2011 <NAME>
# Licensed under the MIT license
# see LICENSE file for copying permission.
from django.db import models
#-------------\
# CONSTANTS |
#-------------/
#----------\
# MODELS |
#----------/
#------------\
# SERVICES |
#------------/
#-------... |
fxdemolisher/frano | frano/transactions/views.py | <filename>frano/transactions/views.py
# Copyright (c) 2011 <NAME>
# Licensed under the MIT license
# see LICENSE file for copying permission.
from datetime import datetime
from exceptions import Exception
from django import forms
from django.core.mail import EmailMessage
from django.forms.formsets import formset_fact... |
fxdemolisher/frano | frano/management/commands/cleanup_sessions.py | <reponame>fxdemolisher/frano
# Copyright (c) 2011 <NAME>
# Licensed under the MIT license
# see LICENSE file for copying permission.
from datetime import datetime
from sys import stdout
from django.contrib.sessions.models import Session
from django.core.management.base import BaseCommand
class Command(BaseCommand):
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.