repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
TiltMeSenpai/luna | luna/gateware/usb/usb2/descriptor.py | <filename>luna/gateware/usb/usb2/descriptor.py
#
# This file is part of LUNA.
#
# Copyright (c) 2020 <NAME> <<EMAIL>>
# SPDX-License-Identifier: BSD-3-Clause
""" Utilities for building USB descriptors into gateware. """
import unittest
from nmigen import Signal, Module, Elaboratable
f... |
TiltMeSenpai/luna | luna/gateware/usb/usb2/device.py | #
# This file is part of LUNA.
#
# Copyright (c) 2020 Great Scott Gadgets <<EMAIL>>
# SPDX-License-Identifier: BSD-3-Clause
"""
Contains the organizing hardware used to add USB Device functionality
to your own designs; including the core :class:`USBDevice` class.
"""
import logging
import unittest
from nmigen ... |
TiltMeSenpai/luna | luna/gateware/usb/devices/hid.py | from nmigen import Elaboratable, Module, Signal, Cat
from ...stream import StreamInterface
from ..usb2.device import USBDevice
from ..usb2.request import USBRequestHandler, StallOnlyRequestHandler
from... |
iampujan/Nepali_nlp | Nepali_nlp/sentence_similar.py | from Embedding import Embeddings
from gensim.utils import simple_preprocess
class Avg_vector_similar:
def __init__(self):
pass
def tidy_sentence(self, sentence, vocabulary):
return [word for word in simple_preprocess(sentence) is word in vocabulary]
def compute_sentence_similarity(self, ... |
kingcreek/ps4-remote-play | ps4rp/dirs.py | # Copyright (c) 2018, <NAME> <<EMAIL>>
# SPDX-License-Identifier: Apache-2.0
"""
Utility module to locate filesystem directories relevant to ps4rp. Conforms to
the XDG spec on Linux. MacOS and Windows support are TODO.
"""
import functools
from xdg import BaseDirectory
_XDG_RESOURCE = 'ps4-remote-play'
@functools.... |
kingcreek/ps4-remote-play | ps4rp/__version__.py | # Copyright (c) 2018, <NAME> <<EMAIL>>
# SPDX-License-Identifier: Apache-2.0
__version__ = '0.1.0-alpha1'
|
kingcreek/ps4-remote-play | ps4rp/crypto.py | <reponame>kingcreek/ps4-remote-play
# Copyright (c) 2018, <NAME> <<EMAIL>>
# SPDX-License-Identifier: Apache-2.0
"""
Handles the custom lolcrypto used to obfuscate the PS4 Remote Play protocols.
"""
import binascii
import hashlib
import hmac
import os
import struct
from Cryptodome.Cipher import AES
class Session:
... |
kingcreek/ps4-remote-play | setup.py | <reponame>kingcreek/ps4-remote-play<filename>setup.py
#!/usr/bin/env python
#
# Copyright (c) 2018, <NAME> <<EMAIL>>
# SPDX-License-Identifier: Apache-2.0
import os.path
import setuptools
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
VERSION_INFO = {}
with open(os.path.join(PROJECT_ROOT, 'ps4rp', '__vers... |
kingcreek/ps4-remote-play | ps4rp/discovery.py | <reponame>kingcreek/ps4-remote-play
# Copyright (c) 2018, <NAME> <<EMAIL>>
# SPDX-License-Identifier: Apache-2.0
"""
Discovers PS4 consoles on the local network and wakes them up on demand.
"""
import binascii
import enum
import email
import socket
import time
_DISCOVERY_PORT = 987
class ConsoleStatu... |
kingcreek/ps4-remote-play | ps4rp/main.py | #!/usr/bin/env python
#
# Copyright (c) 2018, <NAME> <<EMAIL>>
# SPDX-License-Identifier: Apache-2.0
"""
Entry point of the ps4-remote-play program.
"""
import sys
from ps4rp import discovery
from ps4rp import registry
from ps4rp import registration
from PySide2 import QtWidgets
class MainWindow(QtWidgets.QWidget)... |
cgtown/django-httpsiframecookiesetter | httpsiframecookiesetter/views.py | import urllib2
import logging
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from django.core.urlresolvers import reverse
from django.conf import settings as django_settings
from django.views.decorators.clickjacking import xframe_options_exempt
from .settings import... |
cgtown/django-httpsiframecookiesetter | httpsiframecookiesetter/urls.py | from django.conf.urls import patterns, url
from .views import cookiesetter
urlpatterns = patterns('',
url(r'$', cookiesetter, name='cookiesetter'),
) |
cgtown/django-httpsiframecookiesetter | httpsiframecookiesetter/utils.py | import urllib2
import logging
from user_agents import parse
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
from django.conf import settings
from django.conf import settings as django_settings
from django.core.urlresolvers import reverse
from .settings import HTTPS_I... |
RaghuRajRai/IMDB-movie-list-details | imdb_movies.py | # Cmd execute: python imdb.py "https://www.imdb.com/india/top-rated-indian-movies" 5
from bs4 import BeautifulSoup
import requests
import sys
import json
# Constants
IMDB_URL = 'http://www.imdb.com'
TITLE_COLUMN_CLASS = "titleColumn"
RATING_COLUMN_CLASS = "ratingColumn imdbRating"
SUMMARY_TEXT_CLASS = "sum... |
whereistom/spam-worthy | telegram-bot/main.py | <reponame>whereistom/spam-worthy
import telegram
import datetime
import sys
import requests
from resources import private
bot = telegram.Bot(token=private.api_key)
def send_group(msg, id_list):
"""
Send a message to a telegram user or group specified on chatId
chat_id must be a number!
"""
for ... |
itzmeanjan/harmony | examples/subscribe_10.py | <filename>examples/subscribe_10.py
#!/usr/bin/python3
from python_graphql_client import GraphqlClient
from json import dumps
import asyncio
from sys import argv
def prettyPrint(data):
print(dumps(data, sort_keys=True, indent=2))
try:
if len(argv) != 2:
raise Exception("TxHash not supplied")
h... |
itzmeanjan/harmony | examples/subscribe_2.py | #!/usr/bin/python3
from python_graphql_client import GraphqlClient
from json import dumps
import asyncio
def prettyPrint(data):
print(dumps(data, sort_keys=True, indent=2))
try:
client = GraphqlClient(endpoint="ws://localhost:7000/v1/graphql")
query = """
subscription {
newConfir... |
itzmeanjan/harmony | examples/query.py | <filename>examples/query.py
#!/usr/bin/python3
from python_graphql_client import GraphqlClient
from json import dumps
client = GraphqlClient(endpoint="http://localhost:7000/v1/graphql")
query = """
query {
pendingForMoreThan(x: "10s") {
from
to
gasPrice
nonc... |
cmurray-astro/beast-examples | phat_small/run_beast.py | #!/usr/bin/env python
"""
Script to run the BEAST on the PHAT-like data.
Assumes that the datamodel.py file exists in the same directory as this script.
And it must be called datamodel.py
used in make_model.py code in physicsmodel, more recoding needed to remove
this dependency
"""
# system imports
import ... |
gam-ba/aspiradora-analitica | procesamiento_txt.py | import pandas as pd
import datetime as dt
import matplotlib as plt
import numpy as np
import logging
from nltk import word_tokenize
from nltk.corpus import stopwords
from nltk.stem.snowball import SnowballStemmer
from collections import defaultdict
from gensim import corpora, models, similarities
logging.basicConfig(f... |
gam-ba/aspiradora-analitica | scrapper.py | import json
import requests
def get_comments(signatures, petition_id):
'''
Input:
signature = un diccionario vacío.
petition_id = número o nombre de la petición.
Output:
Un diccionario con cuatro pares de keys-values:
num_comments = número total de comentarios levantados.
comments_... |
gam-ba/aspiradora-analitica | procesamiento_bd.py | <reponame>gam-ba/aspiradora-analitica
import datetime as dt
import numpy as np
import pandas as pd
import re
from string import punctuation
df = pd.read_csv('nombre_de_archivo', sep='\t', encoding='utf-8')
df['time'] = df['date'].str.extract('(\d\d:\d\d:\d\d)') ... |
gam-ba/aspiradora-analitica | scrapper_a_pandas.py | <reponame>gam-ba/aspiradora-analitica
import pandas as pd
signatures_df = pd.DataFrame.from_dict(signatures, orient='columns', dtype=None) # Se recupera el diccionario que genera el scrapper.
del signatures_df['num_comments'] # Se borra la columna porque sino va a s... |
antonio-decaro/WellcomeHome | WellcomeHome_Raspberry/script.py | <reponame>antonio-decaro/WellcomeHome
import re
import cv2
import sys
import uuid
import time
import imutils
import logging
from azure.storage.blob import BlobClient
logging.basicConfig(format='%(asctime)s %(message)s', level=logging.NOTSET)
SLEEPING_TIME = 15 # in secs
def retrive_db_key() -> str:
key = ''
wit... |
mmerce/bigmler | check_files/reify_batch_anomaly_score_dataset_py3.py | <gh_stars>0
from bigml.api import BigML
api = BigML()
source1 = api.create_source("iris.csv")
api.ok(source1)
dataset1 = api.create_dataset(source1, \
{'name': 'iris'})
api.ok(dataset1)
anomaly1 = api.create_anomaly(dataset1, \
{'anomaly_seed': '2c249dda00fbf54ab4cdd850532... |
mmerce/bigmler | bigmler/defaults.py | <gh_stars>0
# -*- coding: utf-8 -*-
#
# Copyright 2012-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
mmerce/bigmler | bigmler/tests/test_02_batch_predictions.py | <gh_stars>0
# -*- coding: utf-8 -*-
#
# Copyright 2014-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
mmerce/bigmler | bigmler/reify/restcall.py | <gh_stars>0
# -*- coding: utf-8 -*-
#
# Copyright 2015-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
mmerce/bigmler | bigmler/tests/sample_steps.py | <reponame>mmerce/bigmler<gh_stars>0
# -*- coding: utf-8 -*-
#
# Copyright 2014-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... |
mmerce/bigmler | bigmler/whizzml/package.py | <reponame>mmerce/bigmler
# -*- coding: utf-8 -*-
#
# Copyright 2016-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... |
mmerce/bigmler | bigmler/cluster/dispatcher.py | # -*- coding: utf-8 -*-
#
# Copyright 2014-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mmerce/bigmler | bigmler/export/out_tree/jstree.py | <reponame>mmerce/bigmler
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2017-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LIC... |
mmerce/bigmler | bigmler/retrain/dispatcher.py | <reponame>mmerce/bigmler<filename>bigmler/retrain/dispatcher.py
# -*- coding: utf-8 -*-
#
# Copyright 2017-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache... |
mmerce/bigmler | check_files/reify_batch_prediction_dataset_py3.py | <gh_stars>0
from bigml.api import BigML
api = BigML()
source1 = api.create_source("iris.csv")
api.ok(source1)
dataset1 = api.create_dataset(source1, \
{'name': 'iris'})
api.ok(dataset1)
model1 = api.create_model(dataset1, \
{'name': 'iris'})
api.ok(model1)
batchpr... |
mmerce/bigmler | bigmler/tests/basic_topic_model_steps.py | # -*- coding: utf-8 -*-
#
# Copyright 2016-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mmerce/bigmler | check_files/reify_source_sp.py | <reponame>mmerce/bigmler
from bigml.api import BigML
api = BigML()
source1_file = "iris_sp_chars.csv"
args = \
{u'fields': {u'000000': {u'name': u's\xe9pal.length', u'optype': u'numeric'},
u'000001': {u'name': u's\xe9pal&width', u'optype': u'numeric'},
u... |
mmerce/bigmler | bigmler/export/out_tree/tableautree.py | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2017-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... |
mmerce/bigmler | check_files/reify_batch_centroid.py | <filename>check_files/reify_batch_centroid.py
from bigml.api import BigML
api = BigML()
source1_file = "iris.csv"
args = \
{u'fields': {u'000000': {u'name': u'sepal length', u'optype': u'numeric'},
u'000001': {u'name': u'sepal width', u'optype': u'numeric'},
... |
mmerce/bigmler | bigmler/processing/timeseries.py | <gh_stars>0
# -*- coding: utf-8 -*-
#
# Copyright 2017-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
mmerce/bigmler | bigmler/processing/datasets.py | <filename>bigmler/processing/datasets.py
# -*- coding: utf-8 -*-
#
# Copyright 2014-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... |
mmerce/bigmler | check_files/reify_dataset_dataset.py | from bigml.api import BigML
api = BigML()
source1_file = "iris.csv"
args = \
{u'fields': {u'000000': {u'name': u'sepal length', u'optype': u'numeric'},
u'000001': {u'name': u'sepal width', u'optype': u'numeric'},
u'000002': {u'name': u'petal length', u'o... |
mmerce/bigmler | bigmler/export/out_tree/rtree.py | <reponame>mmerce/bigmler
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2014 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... |
mmerce/bigmler | bigmler/project/dispatcher.py | <gh_stars>0
# -*- coding: utf-8 -*-
#
# Copyright 2015-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
mmerce/bigmler | bigmler/report/httpserver.py | <filename>bigmler/report/httpserver.py
# -*- coding: utf-8 -*-
#
# Auxiliar class: Simple stoppable HTTPServer extracted from
#
# http://code.activestate.com/recipes/425210-simple-stoppable-server-using-socket-timeout/
#
# Unless required by applicable law or agreed to in writing, this software
# is distributed on an "... |
mmerce/bigmler | bigmler/execute/dispatcher.py | # -*- coding: utf-8 -*-
#
# Copyright 2015-2018 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mmerce/bigmler | bigmler/tests/test_06_missing_splits.py | <reponame>mmerce/bigmler
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2015-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LIC... |
mmerce/bigmler | bigmler/utils.py | <gh_stars>0
# -*- coding: utf-8 -*-
#
# Copyright 2012-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
mmerce/bigmler | bigmler/tests/test_12_basic_cluster.py | <gh_stars>0
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2015-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... |
mmerce/bigmler | bigmler/tests/basic_anomaly_prediction_steps.py | # -*- coding: utf-8 -*-
#
# Copyright 2014-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mmerce/bigmler | bigmler/options/timeseries.py | <filename>bigmler/options/timeseries.py
# -*- coding: utf-8 -*-
#
# Copyright 2017-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... |
mmerce/bigmler | bigmler/export/out_tree/mysqltree.py | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2017-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... |
mmerce/bigmler | bigmler/tests/max_categories_tst_prediction_steps.py | # -*- coding: utf-8 -*-
#
# Copyright 2014-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mmerce/bigmler | bigmler/resources.py | # -*- coding: utf-8 -*-
#
# Copyright 2012-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mmerce/bigmler | bigmler/topicmodel/dispatcher.py | # -*- coding: utf-8 -*-
#
# Copyright 2016-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mmerce/bigmler | bigmler/tests/basic_tst_forecast_steps.py | <gh_stars>0
# -*- coding: utf-8 -*-
#
# Copyright 2017-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
mmerce/bigmler | bigmler/export/out_model/tableaumodel.py | <gh_stars>0
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2017-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... |
mmerce/bigmler | bigmler/tests/basic_pca_steps.py | <reponame>mmerce/bigmler
# -*- coding: utf-8 -*-
#
# Copyright 2019-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... |
mmerce/bigmler | bigmler/reify/restutils.py | # -*- coding: utf-8 -*-
#
# Copyright 2015-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mmerce/bigmler | bigmler/tests/test_16_reports.py | <gh_stars>0
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2015-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... |
mmerce/bigmler | bigmler/logrprediction.py | <filename>bigmler/logrprediction.py
# -*- coding: utf-8 -*-
#
# Copyright 2016-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... |
mmerce/bigmler | bigmler/tests/test_25_projects.py | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2015-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... |
mmerce/bigmler | bigmler/reify/restchain.py | <gh_stars>0
# -*- coding: utf-8 -*-
#
# Copyright 2015-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
mmerce/bigmler | bigmler/processing/logisticregressions.py | # -*- coding: utf-8 -*-
#
# Copyright 2014-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mmerce/bigmler | bigmler/tests/test_17_analyze.py | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2015-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... |
mmerce/bigmler | bigmler/reify/reify_defaults.py | # -*- coding: utf-8 -*-
#
# Copyright 2015-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mmerce/bigmler | bigmler/tests/delete_subcommand_steps.py | # -*- coding: utf-8 -*-
#
# Copyright 2014-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
mmerce/bigmler | bigmler/dataset/dispatcher.py | <gh_stars>0
# -*- coding: utf-8 -*-
#
# Copyright 2019-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
mmerce/bigmler | bigmler/tests/project_creation_steps.py | <reponame>mmerce/bigmler
# -*- coding: utf-8 -*-
#
# Copyright 2014-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... |
abhikhatti/WebScraping_using_Python | src/USCensus-CurrentEst-WebScrape.py | import os
import logging
import sys
from urllib.parse import unquote
from bs4 import BeautifulSoup
from selenium import webdriver
def scrape_html(src_url):
driver = webdriver.Chrome() # Open Chrome Instance to load the link
driver.get(src_url)
# Run this script to get the html code after loading all scr... |
CDTDigital/project-noah | data_analysis/watches_importer.py | <reponame>CDTDigital/project-noah
"""Import data from a previously extracted file into our firebase database.
The imported data follows the geoJSON format.
Run the importer with the following command:
docker-compose run --rm data-preparation \
python watches_importer.py data/watches.json
"""
import json
import o... |
MrClemRkz/IncidentManagement | backend/src/incidents/admin.py | <reponame>MrClemRkz/IncidentManagement
from django.contrib import admin
from .models import Incident, IncidentStatus, IncidentComment, Reporter, IncidentPoliceReport, IncidentPerson, IncidentVehicle
admin.site.register(Incident)
# admin.site.register(IncidentStatus)
# admin.site.register(IncidentComment)
admin.site.re... |
MrClemRkz/IncidentManagement | backend/src/reporting/services.py | """Reports"""
from django.db import connection
import pandas as pd
import numpy as np
from datetime import date, timedelta, datetime
from django.db.models import Q
from django.db.models import Count
from django.core.exceptions import ObjectDoesNotExist
from django.utils.timezone import localtime
from django.utils.html... |
MrClemRkz/IncidentManagement | backend/src/incidents/services.py | <reponame>MrClemRkz/IncidentManagement
import os
import requests
from .models import (
Incident,
IncidentType,
IncidentStatus,
StatusType,
SeverityType,
Reporter,
IncidentComment,
IncidentPoliceReport,
VerifyWorkflow,
EscalateExternalWorkflow,
CompleteActionWorkflow,
Req... |
bharathramh92/easy-ecom | helper/random_alphanumeric.py | <gh_stars>0
__author__ = 'bharathramh'
import random
def rand_from_name(first_name, last_name):
return last_name[:3]+first_name[:3]+'_'+''.join(random.choice('0123456789abcdefghijklmnopqrstuvwxyz') for i in range(6))
def rand_alphanumeric(length=100):
return ''.join(random.choice('0123456789abcdefghijklmnopqr... |
bharathramh92/easy-ecom | accounts/accounts_messages.py | <filename>accounts/accounts_messages.py
login_wrong_username_password = "<PASSWORD>/<PASSWORD>"
login_account_disabled = "Your account has been disabled! Contact administrator."
registration_same_email_address = "User exists with same email id. Use different email address"
registration_passwords_not_matching = "Passwor... |
bharathramh92/easy-ecom | store/migrations/0013_auto_20150824_1400.py | <reponame>bharathramh92/easy-ecom
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('store', '0012_auto_20150824_1359'),
]
operations = [
migrations.RenameField(
m... |
bharathramh92/easy-ecom | store/migrations/0014_auto_20150827_1017.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('store', '0013_auto_20150824_1400'),
]
operations = [
migrations.RemoveField(
model_name='sellingaddress',
... |
bharathramh92/easy-ecom | accounts/migrations/0019_auto_20150827_1407.py | <gh_stars>0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0018_remove_userextended_selling_enabled'),
]
operations = [
migrations.AlterField(
mode... |
bharathramh92/easy-ecom | store/migrations/0020_auto_20151008_0946.py | <filename>store/migrations/0020_auto_20151008_0946.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('store', '0019_auto_20150831_2115'),
]
operations = [
migrations.AlterF... |
bharathramh92/easy-ecom | accounts/admin.py | from django.contrib import admin
# Register your models here.
from .models import *
class AddressInline(admin.StackedInline):
model = Address
extra = 1
class UserExtendedAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['user', 'last_updated_password_datetime']}),
('... |
bharathramh92/easy-ecom | accounts/forms.py | from django import forms
from django.core.validators import validate_email
from django.core.exceptions import ValidationError
from django.contrib.auth.models import User
from . import accounts_messages as ac_msg
from .models import Address
class LoginForm(forms.Form):
username = forms.CharField(label='Username/Em... |
bharathramh92/easy-ecom | store/migrations/0012_auto_20150824_1359.py | <filename>store/migrations/0012_auto_20150824_1359.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('store', '0011_auto_20150823_1336'),
]
operations = [
migrations.AlterF... |
bharathramh92/easy-ecom | store/migrations/0010_auto_20150821_1702.py | <gh_stars>0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('categories', '0001_initial'),
('store', '0009_auto_20150819_1951'),
]
operations = [
migrations.RemoveFi... |
bharathramh92/easy-ecom | accounts/migrations/0002_auto_20150805_1711.py | <reponame>bharathramh92/easy-ecom
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_U... |
bharathramh92/easy-ecom | categories/category_helper.py | import json
from categories.category_hierarchy_generator import get_category_raw_dict, get_category_hierarchy
def get_category_list_data_json():
return json.dumps(get_category_raw_dict())
def get_category_list_dict():
return get_category_raw_dict()
def sanitize(path):
if path == '':
return []
... |
bharathramh92/easy-ecom | categories/category_dict_json_generator.py | import json
with open('categories.json') as data_file:
data = "category_dict = "+ str(json.load(data_file))
file = open('category_dict_json_output.py', 'w')
file.write(data)
file.close() |
bharathramh92/easy-ecom | store/migrations/0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations ... |
bharathramh92/easy-ecom | store/models.py | from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
from accounts.models import Address
from categories.models import Category
# Create your models here.
###################################################################################
#items
class Item(models.Mo... |
bharathramh92/easy-ecom | accounts/migrations/0011_auto_20150813_2105.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0010_manual_removing_feedback_classes'),
]
operations = [
migrations.RemoveField(
model_name='custom... |
bharathramh92/easy-ecom | accounts/views.py | <filename>accounts/views.py<gh_stars>0
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required
from accounts.forms import AddressForm
import datetime
from djan... |
bharathramh92/easy-ecom | categories/models.py | <reponame>bharathramh92/easy-ecom
from django.db import models
# Create your models here.
class Category(models.Model):
category_name = models.CharField(max_length=50, null= False, blank= False)
description = models.CharField(max_length=500, null= True, blank= True)
parent_category = models.ForeignKey('se... |
bharathramh92/easy-ecom | sell/views.py | <gh_stars>0
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden
from django.core.urlresolvers import reverse
from django.core.exceptions import PermissionDenied
from django.contrib.auth.decorators import login_required
import datetime
... |
bharathramh92/easy-ecom | accounts/urls.py | from django.conf.urls import include, url
from . import views
urlpatterns = [
# Examples:
# url(r'^$', 'easy_ecom.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^login/$', views.loginView, name= "login"),
url(r'^logout/$', views.logoutView, name= "logout"),
url(r'^$', ... |
bharathramh92/easy-ecom | store/migrations/0008_auto_20150816_1758.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('store', '0007_auto_20150816_1634'),
]
operations = [
migrations.AlterField(
model_name='bookstore',
... |
bharathramh92/easy-ecom | easy_ecom/urls.py | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
# Examples:
# url(r'^$', 'easy_ecom.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('accounts.urls', namespace="accoun... |
bharathramh92/easy-ecom | store/migrations/0016_auto_20150827_1110.py | <filename>store/migrations/0016_auto_20150827_1110.py<gh_stars>0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('store', '0015_remove_item_brand'),
]
operations = [
migrati... |
bharathramh92/easy-ecom | easy_ecom/settings_sensitive_copy.py | # Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'ecom_db', #your db name
'USER': 'ecom_admin', #your username
'PASSWORD': '<PASSWORD>', #your user password
'HOST... |
bharathramh92/easy-ecom | accounts/migrations/0016_auto_20150814_1727.py | <reponame>bharathramh92/easy-ecom<filename>accounts/migrations/0016_auto_20150814_1727.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0015_userextended_photo_or_video'),
... |
bharathramh92/easy-ecom | store/migrations/0009_auto_20150819_1951.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('store', '0008_auto_20150816_1758'),
]
operations = [
migrations.AlterField(
model_name='item',
name=... |
bharathramh92/easy-ecom | accounts/migrations/0005_auto_20150805_1747.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0004_auto_20150805_1732'),
]
operations = [
migrations.AlterField(
model_name='address',
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.