text stringlengths 1 927k |
|---|
"""
WSGI config for force_displaying_website project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefa... |
from django.db import models
# Create your models here.
from django.db import models
from meiduo_mall.utils.models import BaseModel
# Create your models here.s
class OAuthQQUser(BaseModel):
"""QQ登录用户数据"""
user = models.ForeignKey('users.User', on_delete=models.CASCADE, verbose_name='用户')
openid = models... |
from webapp.user.models import User
from webapp.db import db
class Category(db.Model):
__tablename__ = 'categories'
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey(User.id))
name = db.Column(db.String(50), nullable=False)
is_income = db.Column(db.Boolean,... |
import pandas as pd
import numpy as np
from glob import glob
from natsort import natsorted
# TODO: from ops.constants import *
from . import utils
def load_hist(filename, threshold):
try:
return (pd.read_csv(filename, sep='\s+', header=None)
.rename(columns={0: 'count', 1: 'seq'})
... |
"""How to change the units of certain variables."""
from metno_locationforecast import Place, Forecast
USER_AGENT = "metno_locationforecast/1.0 https://github.com/Rory-Sullivan/yrlocationforecast"
london = Place("London", 51.5, -0.1, 25)
london_forecast = Forecast(london, USER_AGENT)
london_forecast.update()
# Itera... |
# Third party imports
import numpy as np
from scipy import integrate
# Local imports
from gmprocess.constants import GAL_TO_PCTG
from gmprocess.metrics.reduction.reduction import Reduction
from gmprocess.stationstream import StationStream
from gmprocess.stationtrace import StationTrace
class Arias(Reduction):
""... |
# This file is part of FlameScope, a performance analysis tool created by the
# Netflix cloud performance team. See:
#
# https://github.com/Netflix/flamescope
#
# Copyright 2018 Netflix, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance wi... |
# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
# Copyright (c) 2011, 2012 Open Networking Foundation
# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
# See the file LICENSE.pyloxi which should have been included in the source distribution
# Automatically generated by LOXI from ... |
import numpy as np
import math
from scipy import stats
from sklearn.utils.multiclass import type_of_target
class WOE:
def __init__(self):
self._WOE_MIN = -20
self._WOE_MAX = 20
def woe(self, X, y, event=1):
'''
Calculate woe of each feature category and information value
... |
# coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="get_runs_request.py">
# Copyright (c) 2020 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of ... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-08-08 22:12
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AddField(
... |
# -*- coding: utf-8 -*-
"""VGG16 model for Keras.
# Reference
- [Very Deep Convolutional Networks for Large-Scale Image Recognition](https://arxiv.org/abs/1409.1556)
"""
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import warnings
from keras.models impor... |
# Copyright 2020 TestProject (https://testproject.io)
#
# 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 ... |
import math
import operator
import os
import pickle
import re
import sys
import traceback
import uuid
import warnings
from bisect import bisect
from collections.abc import Iterable, Iterator, Mapping
from functools import partial, wraps, reduce
from itertools import product, zip_longest
from numbers import Number, Inte... |
#This flappy will have 6 inputs (i1 to i6) : up, down, bird top-right to up-block-low-right, bird top-left to up-block-low-left, so on.
import numpy as np
import pygame
import time
import random
from random import randint
pygame.init()
#6 input nodes
i_ROW = 1
i_COL = 6
#3 hidden layer nodes
#input to hidden laye... |
from alpha_vantage.timeseries import TimeSeries
from fin_apis.utils import multicall
from fin_apis.auth import AuthKeys
class AVTimeSeries(TimeSeries):
def __init__(self, key=None, output_format='pandas', treat_info_as_error=True, indexing_type='date', proxy=None,
rapidapi=False):
if ke... |
# Generated by Django 2.2.6 on 2019-11-05 01:28
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('soundscapes', '0005_regioncircle_owner'),
]
operations = [
migrations.Alte... |
import ipaddress
import numbers
import re
from collections import Iterable, Mapping
from .chars import SUB_DELIMS
from .encoding import uriencode, uriencode_plus, idnencode
from .split import uriunsplit
# RFC 3986 3.1: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
_SCHEME_RE = re.compile(r"\A[A-Za-z][A-Za-z0-9... |
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 21 15:49:17 2018
@author: robot
"""
from readCfg import *
import numpy as np
from enum import Enum
class TaskModelType(Enum):
ExpModel = 1
LineModel = 2
class Instance(object):
def __init__(self, insFileName = 'wtf'):
self.insFileName = insFile... |
import unittest
class TestClassUT(unittest.TestCase):
def test__ut_fail(self):
self.fail("Not implemented")
def test__ut_pass(self):
pass
if __name__ == '__main__':
unittest.main() |
class WorksContainer(object):
"""
WorksContainer: Class for working with works results
Usage::
from habanero import Crossref, WorksContainer
cr = Crossref()
res = cr.works(ids=['10.1136/jclinpath-2020-206745', '10.1136/esmoopen-2020-000776'])
x = WorksConta... |
from setuptools import setup
package_name = 'topic_tutorial_py'
setup(
name=package_name,
version='0.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
],
... |
"""
@author: Maziar Raissi
"""
import sys
sys.path.insert(0, '../../Utilities/')
import tensorflow as tf
import numpy as np
import time
import scipy.io
np.random.seed(1234)
tf.set_random_seed(1234)
class PhysicsInformedNN:
# Initialize the class
def __init__(self, x0, u0, x1, u1, layers, dt, lb, ub, q):
... |
# SYSTEM
from pathlib import Path
import shutil
# THIRD-PARTY
import luigi
import structlog
import toml
import wget
from zipfile import ZipFile
# LOCAL
from paths import (
GUNBOT_DOWNLOAD_PATH,
GUNBOT_DOWNLOAD_URL,
GUNBOT_PATH,
TEMP_GUNBOT_EXTRACTION_PATH,
)
from log import config_logger
logger = str... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Yoopa documentation build configuration file, created by
# sphinx-quickstart on Mon Jul 4 22:43:48 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# auto... |
"""
This file offers the methods to automatically retrieve the graph Verticillium dahliae.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datetime: 2021-0... |
from src.script import create_positive_detail
from src.script import create_prefectures
from src.script import create_total
from src.script import create_statistics_positives
if __name__ == '__main__':
create_positive_detail.create_json_file()
create_prefectures.create_json_file()
create_total.create_json... |
from __future__ import division
import sys
PYTHON3 = sys.version_info.major == 3
if not PYTHON3:
from itertools import izip as zip
range = xrange
input = raw_input |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Extract a list of passes form the LLVM source tree.
Usage:
$ extract_passes_from_llvm_source_tree /path/to/llvm/source/root
Optionall... |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# 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 applica... |
"""
Collaboration Network / Communities
===============================================================================
>>> from techminer2 import *
>>> directory = "data/"
>>> collaboration_network_communities('authors', min_occ=2, directory=directory).head()
cluster CL_00 ... CL_19
rn ... |
import dynamodbgeo
from vars import dynamodb
import uuid
def test_create_table():
try:
table_name = str(uuid.uuid4())
config = dynamodbgeo.GeoDataManagerConfiguration(
dynamodb, table_name)
geoDataManager = dynamodbgeo.GeoDataManager(config)
table_util = dynamodbgeo.Geo... |
#!/usr/bin/env python
import roslib; roslib.load_manifest('entity_storage')
from entity_storage.srv import *
from entity_storage.msg import *
import rospy
def get_coordinates(name):
rospy.wait_for_service('get_entity_coordinates')
try:
get_coords = rospy.ServiceProxy('get_entity_coordinates', entity_c... |
"""
This module implements a transaction manager that can be used to define
transaction handling in a request or view function. It is used by transaction
control middleware and decorators.
The transaction manager can be in managed or in auto state. Auto state means the
system is using a commit-on-save strategy (actual... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import shortuuidfield.fields
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations ... |
import os
def safedirs(path):
if not os.path.exists(path):
os.makedirs(path) |
#!/usr/bin/env python
import rospy
import actionlib
from flexbe_core import EventState, Logger
from flexbe_core.proxy import ProxyActionClient
from flexbe_core.proxy import ProxySubscriberCached
from moveit_msgs.msg import MoveGroupAction, MoveGroupGoal, Constraints, JointConstraint, MoveItErrorCodes
from kinova... |
def f():
foo = 42
f"{foo}"
<ref> |
info = {
"name": "smn",
"date_order": "DMY",
"january": [
"uđiv",
"uđđâivemáánu"
],
"february": [
"kuovâ",
"kuovâmáánu"
],
"march": [
"njuhčâ",
"njuhčâmáánu"
],
"april": [
"cuáŋui",
"cuáŋuimáánu"
],
"may": [
... |
HIBISCUS = 30
RED = 31
ORANGE = 32
YELLOW = 33
EARLS_GREEN = 34
LIGHT_GREEN = 35
GREEN = 36
DOWNY = 37
EASTERN_BLUE = 38
DODGER_BLUE = 39
CORNFLOWER = 40
BLUE = 41
VIOLET = 42
PURPLE = 43
LIGHT_ROSE = 44
ROSE = 45
MONA_LISA = 46
GRAY = 47
LIGHT_GRAY = 48
SORREL_BROWN = 49
# Expressed as a map
colors = {
'HIBISCUS'... |
# Copyright 2018 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
"""Write submission to file in csv format
Author:
Chris Chute (chute@stanford.edu)
"""
import csv
def write_submission(sub_path, sub_dict):
with open(sub_path, "w", newline="", encoding="utf-8") as csv_fh:
csv_writer = csv.writer(csv_fh, delimiter=",")
csv_writer.writerow(["Id", "Predicted"]... |
def int():
assert type(1) == type(int())
def int_test():
assert type(1) == type(int()) |
import itertools
import numpy as np
from collections import defaultdict
def lagged_diff(x, k):
"""
Returns the sequence of x[i] - x[i - k], as an array with the same size as x.
Boundary conditions are handled as follows:
x[i] = x[0] if i < 0
x[i] = x[n-1] if i >= n, where n = len(x)
... |
# -*- coding: utf-8 -*-
"""
View
~~~~~~~~~
:copyright: (c) 2018 by geeksaga.
:license: MIT LICENSE 2.0, see license for more details.
"""
from sqlalchemy import Column, Integer, String
from . import Base
class View(Base):
__tablename__ = 'gs_view'
id = Column(Integer, primary_key=True)
... |
import itertools
import multiprocessing
import runpy
import sys
from os import path as osp
import pytest
def run_main(*args):
# patch sys.args
sys.argv = list(args)
target = args[0]
# run_path has one difference with invoking Python from command-line:
# if the target is a file (rather than a dire... |
# Copyright 2019 Google Inc.
#
# 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 or agreed to in writing, ... |
import os
from passlib.hash import sha256_crypt
#WTF
CSRF_ENABLED = True
#configure blue prints
BLUEPRINTS = ('guest','admin')
#Configure DB
basedir = os.path.join(os.path.abspath(os.path.dirname(__file__)),'..','bluespot')
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
SECRET_KEY = 'once-a-ca... |
import logging
from typing import Dict, Optional
from mllaunchpad.resource import DataSource, get_user_pw
logger = logging.getLogger(__name__)
try:
import records
except ModuleNotFoundError:
logger.warning("Please install the Records package to be able to use RecordsDbDataSource.")
class RecordsDbDataSour... |
# Filename: uniq.py
# Author: Ian N. Schenck
# Version: 19/12/2005
#
# This script accepts an input file, an output file, a column
# delimiter, and a list of columns. The script then grabs unique
# lines based on the columns, and returns those records with a count
# of occurences of each unique column (ignoring traili... |
import numpy as np
from multiprocessing import Pool
from grbod import *
import os, sys
import pickle
import scipy.interpolate
from math import log10
import matplotlib.pyplot as plt
from pyggop.ParallelPool import ParallelPool
#This is the actual computation
def func(DRbar, R_0, b, m, a, xx, yy):
R0_hat =... |
# 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 or agreed to in writing, software
# distributed under t... |
from googlefinance import getQuotes
import json
class Share:
def __init__(self, market, name, symbol, catergory, pprice, units, commission):
self._market = market
self._name = name
self._symbol = symbol
self._catergory = catergory
self._purchase_price = pprice
self._... |
#!/usr/bin/env python3
# https://leetcode.com/problems/factorial-trailing-zeroes/
import unittest
class Solution:
def trailingZeroes(self, n: int) -> int:
step = 5
count = 0
while step <= n:
count += n // step
step = step * 5
return count
class TestCode(u... |
import argparse
import requests
import json
REST_URL = '/api/todos'
def delete_posts(website_ip, all_ids):
url = 'http://' + website_ip + REST_URL + '/'
for ids in all_ids:
requests.delete(url + ids)
return 1
def GET_from_website(website_ip):
url = 'http://' + website_ip + REST_URL
r = re... |
'''
Fetch session ID and D_ token and use them for the WebSocket connection.
Author: @ElJaviLuki
'''
# DEPENDENCIES
import asyncio
from betty365 import SubscriptionStreamDataProcessor
from utils.web_session_manager import WebSessionManager
# CONSTANTS
MAIN_PAGE_HOST = 'https://www.bet365.es'
USER_AGENT = 'Mo... |
#!/usr/bin/python
from subprocess import call
import sys
import os
from optparse import OptionParser
DIR_APKDEC = sys.path[0]
DIR_TOOLS = DIR_APKDEC + os.sep + "tools"
TOOL_DEX2JAR = DIR_TOOLS + os.sep + "dex2jar-2.0" + os.sep + "d2j-dex2jar.sh"
TOOL_APKTOOL = "java -jar " + DIR_TOOLS + os.sep + "apktool_2.2.1.jar"
T... |
# coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_1_1.models.quota_n... |
def _get_duration(cls):
if hasattr(cls, 'estimate'):
return cls.estimate
else:
return 0
class Task:
def __init__(task, cls):
task.cls = cls
task.name = cls.__qualname__
task.duration = _get_duration(cls)
task.children = set() # set of task.name
task... |
from utils import CSVScraper
from datetime import date
class PeterboroughPersonScraper(CSVScraper):
csv_url = 'https://docs.google.com/spreadsheets/d/146Ym9eJ624pHQLF0HAtoiCLfP2WyHVerla2rT1nbMsE/pub?gid=0&single=true&output=csv'
updated_at = date(2016, 3, 16)
contact_person = 'deva.nadesan@infinitom.com'... |
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import types
from recipe_engine.config import config_item_context, ConfigGroup, BadConf
from recipe_engine.config import ConfigList, Dict, Single, Static, S... |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: preloads.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _refl... |
import pytest
from dynaconf import validator_conditions
positive_conditions = [
("eq", 1, 1),
("ne", 1, 2),
("gt", 4, 3),
("lt", 3, 4),
("gte", 5, 5),
("lte", 5, 5),
("identity", None, None),
("is_type_of", 42, int),
("is_in", 42, [42, 34]),
("is_not_in", 42, [55, 34]),
("... |
# Tackling a difficult Circuit-Glob puzzle with the repressilator
import sys
sys.path.append('../circuitglobs')
import numpy as np
import gcparser
import model
from animate import Puzzle, Graphics
import random
random.seed(12)
if __name__ == "__main__":
Puzzle1 = Puzzle(difficulty=6)
# Puzzle1.plot()
... |
import sqlite3 as conector
from ModeloQueries import Veiculo
conexao = conector.connect("./meu_banco.db")
cursor = conexao.cursor()
comando = '''SELECT
Veiculo.placa, Veiculo.ano, Veiculo.cor, Veiculo.motor, Veiculo.proprietario,
Marca.nome FROM Veiculo JOIN Marca ON (Marca.i... |
import json
import re
TYPE_TWITTER = "twitter"
TYPE_INSTA = "instagram"
TYPES = (TYPE_INSTA, TYPE_TWITTER)
__alerts_list = []
def get_alerts_list():
if not __alerts_list:
load_alerts()
return __alerts_list
def load_alerts():
with open("alerts.json", "r") as fp:
for alert in json.load(fp... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayOpenAppSilanApigraytwoQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenAppSilanApigraytwoQueryResponse, self).__init__()
def parse_response_cont... |
"""
Django settings for djangoApplication project.
Generated by 'django-admin startproject' using Django 2.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
im... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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 or... |
#Pedir el nombre y los dos apellidos de una persona
# y mostrar las iniciales.
nombre = input("Nombre: ")
apellido1 = input("Primer apellido: ")
apellido2 = input("Segundo apellido: ")
inicial = nombre[0]
inicial = inicial + apellido1[0]
inicial = inicial + apellido2[0]
inicial = inicial.upper()
print("Las inicial... |
from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin
from django.conf import settings
class UserProfileManager(BaseUserManager):
"""Manager for user profiles"""
def create_user(self, email, name, password=None):
"""Create a new user p... |
"""
variable_choose.py
Class instance for finding and choosing shared variable
from other components.
"""
# Load the needed packages
from functools import partial
from .core import componentsList, QtWidgets, QtCore
from . import common
class VariableChoose(QtWidgets.QDialog):
'''
Class instance for fin... |
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import numpy as np
import torch
import torch.nn.functional as F
from torch.utils.data import DataLoader
import egg.core as co... |
import sys
def freeze(obj):
if isinstance(obj, dict):
return frozenset(map(freeze, obj.items()))
if isinstance(obj, (list, tuple)):
return tuple(map(freeze, obj))
if isinstance(obj, set):
return frozenset(obj)
else:
return obj
def memorized(func):
map = {}
de... |
import tomlkit
def fill_tool_section(previous_content, tool_name, section_text):
"""TOML Helper ensuring that a [tool.<tool_name>] section contains <section_text>"""
current_state = tomlkit.parse(previous_content)
tool_table = tomlkit.parse(section_text)["tool"][tool_name]
if "tool" not in current_s... |
import os
def read_test_file(filename: str) -> str:
file = open(os.path.join(os.path.dirname(__file__), 'test_data/' + filename))
content = file.read()
file.close()
return content |
import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import sawyer_pusher_camera_upright_v3
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.grill.launcher import grill_her_td3_full_experiment
if __name__ == "__main__":
variant = dict(
imsize=84,
init... |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
# 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... |
from __future__ import division
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils import norm_col_init, weights_init
# class agentNET(torch.nn.Module):
# def __init__(self, num_inputs = 1, num_outputs = 6):
# super(agentNET, self).__init__()
#
# self.conv1 = nn.Conv1d(nu... |
# -*- coding: utf-8
""" Here is where all the good stuff happens """
from urllib.parse import urlparse
import time
import socket
import datetime
from bs4 import BeautifulSoup
from flask import Flask, url_for, g, request, get_flashed_messages
from flask_login import LoginManager, current_user
from flask_webpack import ... |
# Generated by Django 3.2.6 on 2021-08-24 10:45
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('places', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='googleelement',
name='price_level_missing',
... |
# Generated by Django 3.1.1 on 2020-09-12 09:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sales', '0007_order_orderline'),
]
operations = [
migrations.AlterField(
model_name='orderline',
name='price',
... |
cmd.do('alter refine_A_Ave_SM_015_0_370-374-0r, vdw=3.0;')
cmd.do('set solvent_radius = 3.0;') |
friends = ['john', 'pat', 'gary', 'michael']
for i, name in enumerate(friends):
print ("no. {iteration} is {name}".format(iteration=i+1, name=name)) |
from ipcollector import __version__
from setuptools import setup, find_packages
from sys import path
from os import environ
path.insert(0, '.')
NAME = 'ipcollector'
if __name__ == '__main__':
with open(environ.get('REQUIREMENTS_TXT', 'requirements.txt')) as f:
requirements = f.read().splitlines()
s... |
"""
update_era5_workflow.py
Author: Chris Edwards
Copyright June 2020
License: BSD 3 Clause
Updated: July 2020
Script to run ERA-5 RAPID simulation for one whole year of ERA-5 Runoff data.
To run the script, give 6 additional arguments:
1. path to rapid executable
2. path to directory with LSM Grid (ERA-5 Run... |
# Copyright (c) 2021 War-Keeper
import discord
from discord.utils import get
from discord.ext import commands
# -----------------------------------------------------------------------
# A basic "Hello World!" command, used to verify basic bot functionality
# -----------------------------------------------------------... |
# Generated by Django 3.0.6 on 2020-05-21 10:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("healthier", "0005_auto_20200521_1237"),
]
operations = [
migrations.AlterField(
model_name="food_item",
name="id_ope... |
from functools import partial
import itertools
from ....fileio import TextFile
from ...internal_utils.options import Options
from ...internal_utils.readers.utils import resolve_partitions
from ...types import create_row, StringType, StructField, StructType
class TextReader:
default_options = dict(
lineSe... |
# Copyright 2016-2020 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
import itertools
import os
import pathlib
import pytest
import re
import sys
from contextlib import redirect_stdout, redirect_... |
palavras = ("aprender", "programar", "linguagem", "python",
"python", "curso", "gratis", "estudar", "praticar",
"trabalhar", "mercado", "programador", "futuro",)
for p in palavras:
print("\nNa palavra {} temos".format(p), end=" ")
for letra in p:
if letra in "aeiou":
... |
#!/usr/local/bin/python3
# Python Challenge - 20
# http://www.pythonchallenge.com/pc/hex/idiot2.html
# Username: butter; Password: fly
# Keyword: invader, redavni
import base64
import urllib.request
import re
def main():
'''
Hint: go away! Picture is fence with sign 'Private property beyond
this fenc... |
from __future__ import annotations
from typing import Any
from copy import deepcopy
from json import loads
from jsonschema import RefResolver, validate
from pkg_resources import resource_string
class JsonSchema:
data: dict
resolver: RefResolver
def __init__(self, data: dict, resolver: RefResolver = None... |
# -*- coding: utf-8 -*-
from kombu import Exchange, Queue
BROKER_URL = "redis://localhost:6379/1"
CELERY_RESULT_BACKEND = "redis://localhost:6379/11"
CELERYD_PREFETCH_MULTIPLIER = 1
CELERYD_CONCURRENCY = 1
CELERY_QUEUES = [
Queue("project_2", Exchange("project_2"), routing_key="project_2"),
Queue("celery", E... |
# ----------------------------------------------------------------------
# |
# | ActivateAndExecute.py
# |
# | David Brownell <db@DavidBrownell.com>
# | 2018-02-19 09:15:08
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2018.
# | Distribute... |
import sys; datafilepath = sys.argv[1]
raw_data = open(datafilepath).read().splitlines()
import math
scanners = list()
tmp = list()
for i in raw_data:
if len(i) == 0:
scanners.append(tmp.copy())
tmp.clear()
elif i[0:2] == '--':
continue
else:
(a,b,c) = i.split(',')
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2016 MarkLogic Corporation
#
# 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#
#
# U... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=23
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
def make_circuit(n: int, input_qubit):
c = cirq.Ci... |
!pip install PyPDF2
import PyPDF2
import re
import json
from datetime import datetime
import boto3
pdf = '/Users/dryanmiller/Desktop/Rehabilitation Counselor.pdf'
dynamodb = boto3.resource(‘dynamodb’)
table = dynamodb.Table('JobSpecs')
response = s3.get_object(Bucket=bucket, Key=key)
class Iowa():
def __ini... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.