text stringlengths 0 1.05M | meta dict |
|---|---|
"Add a label to publications given by IUID, DOI or PMID."
from publications import utils
from publications.publication import PublicationSaver
def add_label_to_publications(db, label, qualifier, identifiers):
if not label:
raise ValueError('no new label given')
if not qualifier:
raise ValueEr... | {
"repo_name": "pekrau/Publications",
"path": "publications/scripts/add_label_to_publications.py",
"copies": "1",
"size": "2160",
"license": "mit",
"hash": 4500351079703637000,
"line_mean": 37.5714285714,
"line_max": 79,
"alpha_frac": 0.5976851852,
"autogenerated": false,
"ratio": 4.21875,
"conf... |
# Add all ARMv8 state
def upgrader(cpt):
if cpt.get('root','isa') != 'arm':
return
import re
print "Warning: The size of the FP register file has changed. "\
"To get similar results you need to adjust the number of "\
"physical registers in the CPU you're restoring into by "\
... | {
"repo_name": "bcheung92/Paperproject",
"path": "gem5/util/cpt_upgraders/armv8.py",
"copies": "29",
"size": "13359",
"license": "mit",
"hash": -8154455197665384000,
"line_mean": 41.5445859873,
"line_max": 92,
"alpha_frac": 0.5180777004,
"autogenerated": false,
"ratio": 2.5305929153248723,
"conf... |
# Add a method addText to the Question superclass and provide a different implementation
# of ChoiceQuestion that calls addText rather than storing a list of choices.
class Question():
def __init__(self):
self._text = ""
self._answer = ""
self._answer_number = 0
def get_text(self):
... | {
"repo_name": "futurepr0n/Books-solutions",
"path": "Python-For-Everyone-Horstmann/Chapter10-Inheritance/P10_6.py",
"copies": "1",
"size": "1187",
"license": "mit",
"hash": -3348903170698032600,
"line_mean": 24.2340425532,
"line_max": 89,
"alpha_frac": 0.607925801,
"autogenerated": false,
"ratio"... |
## add a !mute function
## add a !100 function to set volume to 100
## !register <command> <uri>
# Import some necessary libraries.
import socket
import subprocess
import re
import cPickle as pickle
# Importing the list of registered commands
with open('dict.pickle', 'rb') as handle:
params = pickle.load(handle)... | {
"repo_name": "Pink401k/spotify-irc-bot",
"path": "spotify-irc.py",
"copies": "1",
"size": "8698",
"license": "mit",
"hash": -8996589431997328000,
"line_mean": 39.8403755869,
"line_max": 186,
"alpha_frac": 0.6183030582,
"autogenerated": false,
"ratio": 3.409643277146217,
"config_test": false,
... |
"""Add an address translation to an IPSEC tunnel context."""
# :license: MIT, see LICENSE for more details.
import click
import SoftLayer
from SoftLayer.CLI import environment
# from SoftLayer.CLI.exceptions import ArgumentError
# from SoftLayer.CLI.exceptions import CLIHalt
@click.command()
@click.argument('contex... | {
"repo_name": "softlayer/softlayer-python",
"path": "SoftLayer/CLI/vpn/ipsec/translation/add.py",
"copies": "3",
"size": "1435",
"license": "mit",
"hash": -5974673219158660000,
"line_mean": 33.1666666667,
"line_max": 73,
"alpha_frac": 0.5881533101,
"autogenerated": false,
"ratio": 4.375,
"confi... |
"""Add and upload SSL certificate details."""
# :license: MIT, see LICENSE for more details.
import click
import SoftLayer
from SoftLayer.CLI import environment
@click.command()
@click.option('--crt',
type=click.Path(exists=True),
help="Certificate file")
@click.option('--csr',
... | {
"repo_name": "skraghu/softlayer-python",
"path": "SoftLayer/CLI/ssl/add.py",
"copies": "5",
"size": "1270",
"license": "mit",
"hash": 4586629513029185500,
"line_mean": 29.2380952381,
"line_max": 77,
"alpha_frac": 0.6299212598,
"autogenerated": false,
"ratio": 4.006309148264984,
"config_test": ... |
"""Add and upload SSL certificate details."""
# :license: MIT, see LICENSE for more details.
import SoftLayer
from SoftLayer.CLI import environment
import click
@click.command()
@click.option('--crt',
type=click.Path(exists=True),
help="Certificate file")
@click.option('--csr',
... | {
"repo_name": "briancline/softlayer-python",
"path": "SoftLayer/CLI/ssl/add.py",
"copies": "3",
"size": "1270",
"license": "mit",
"hash": 450123584773859900,
"line_mean": 29.2380952381,
"line_max": 77,
"alpha_frac": 0.6299212598,
"autogenerated": false,
"ratio": 4.006309148264984,
"config_test"... |
"""Add a new file to the xpacsdb.patient_info table.
Usage:
add_patient.py [options] <patientid> <file>
add_patient.py -h
Arguments:
patientid PatientID to attach with the file.
Error if there is no such PatientID.
Use add_patient.py to add new patient to the database.
... | {
"repo_name": "CardiacAtlasProject/CAPServer2.0",
"path": "dbase/utils/add_file.py",
"copies": "1",
"size": "3963",
"license": "apache-2.0",
"hash": -8813165802459661000,
"line_mean": 28.1397058824,
"line_max": 113,
"alpha_frac": 0.5710320464,
"autogenerated": false,
"ratio": 3.7246240601503757,
... |
"""Add a new guest OS type"""
from baseCmd import *
from baseResponse import *
class addGuestOsCmd (baseCmd):
typeInfo = {}
def __init__(self):
self.isAsync = "true"
"""ID of Guest OS category"""
"""Required"""
self.oscategoryid = None
self.typeInfo['oscategoryid'] = '... | {
"repo_name": "MissionCriticalCloud/marvin",
"path": "marvin/cloudstackAPI/addGuestOs.py",
"copies": "1",
"size": "1211",
"license": "apache-2.0",
"hash": -2876783132625176000,
"line_mean": 28.5365853659,
"line_max": 59,
"alpha_frac": 0.5722543353,
"autogenerated": false,
"ratio": 3.9318181818181... |
"""Add a new patient to the xpacsdb.patient_info table
Usage:
add_patient.py [options]
add_patient.py -h
Options:
-h, --help Show this screen
-d, --debug Show some debug information
-s <host> The MySQL server host IP address.
-p <port> MySQL... | {
"repo_name": "CardiacAtlasProject/CAPServer2.0",
"path": "dbase/utils/add_patient.py",
"copies": "1",
"size": "4541",
"license": "apache-2.0",
"hash": 7769446019170502000,
"line_mean": 28.487012987,
"line_max": 86,
"alpha_frac": 0.5463554283,
"autogenerated": false,
"ratio": 3.86468085106383,
... |
"""Add a new repository for the Arcyd instance to manage."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# abdcmd_addrepo
#
# Public Functions:
# getFromfilePrefixChars
# setupParser
# pr... | {
"repo_name": "kjedruczyk/phabricator-tools",
"path": "py/abd/abdcmd_addrepo.py",
"copies": "4",
"size": "6321",
"license": "apache-2.0",
"hash": 6135597288517758000,
"line_mean": 29.3894230769,
"line_max": 79,
"alpha_frac": 0.6060749881,
"autogenerated": false,
"ratio": 3.7138660399529964,
"co... |
"""Add a new repository host for the Arcyd instance to refer to."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# abdcmd_addrepohost
#
# Public Functions:
# getFromfilePrefixChars
# setupPa... | {
"repo_name": "aevri/phabricator-tools",
"path": "py/abd/abdcmd_addrepohost.py",
"copies": "4",
"size": "3620",
"license": "apache-2.0",
"hash": 8745047236506278000,
"line_mean": 26.6335877863,
"line_max": 79,
"alpha_frac": 0.5513812155,
"autogenerated": false,
"ratio": 3.9519650655021836,
"con... |
"""Add a new SSH key."""
# :license: MIT, see LICENSE for more details.
from os import path
import click
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import exceptions
@click.command()
@click.argument('label')
@click.option('--in-file', '-f',
type=click.Path(exists=True),
... | {
"repo_name": "kyubifire/softlayer-python",
"path": "SoftLayer/CLI/sshkey/add.py",
"copies": "2",
"size": "1257",
"license": "mit",
"hash": 2239842936819517200,
"line_mean": 28.2325581395,
"line_max": 89,
"alpha_frac": 0.6133651551,
"autogenerated": false,
"ratio": 3.501392757660167,
"config_te... |
"""Add a new subnet to your account."""
# :license: MIT, see LICENSE for more details.
import click
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import exceptions
from SoftLayer.CLI import formatting
@click.command(short_help="Add a new subnet to your account")
@click.argument('network'... | {
"repo_name": "nanjj/softlayer-python",
"path": "SoftLayer/CLI/subnet/create.py",
"copies": "4",
"size": "2070",
"license": "mit",
"hash": -3933584028160715300,
"line_mean": 29.8955223881,
"line_max": 75,
"alpha_frac": 0.5898550725,
"autogenerated": false,
"ratio": 3.7981651376146788,
"config_t... |
"""Add a new subnet to your account."""
# :license: MIT, see LICENSE for more details.
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import exceptions
from SoftLayer.CLI import formatting
import click
@click.command(short_help="Add a new subnet to your account")
@click.argument('network... | {
"repo_name": "briancline/softlayer-python",
"path": "SoftLayer/CLI/subnet/create.py",
"copies": "2",
"size": "2071",
"license": "mit",
"hash": 8362615408827581000,
"line_mean": 29.4558823529,
"line_max": 75,
"alpha_frac": 0.5895702559,
"autogenerated": false,
"ratio": 3.8,
"config_test": false... |
# Add a new view at /today that shows the current user's lunch order for today.
# It should render the "today.html" template. Don't worry about editing the template yet.
# Since this is about the current user, login should be required.
from flask import Flask, g, render_template, flash, redirect, url_for
from fla... | {
"repo_name": "CaseyNord/Treehouse",
"path": "Build a Social Network with Flask/lunch_order_view/lunch.py",
"copies": "1",
"size": "2990",
"license": "mit",
"hash": 2296330154014343700,
"line_mean": 27.0485436893,
"line_max": 95,
"alpha_frac": 0.6204013378,
"autogenerated": false,
"ratio": 3.7050... |
# Add a new view to lunch.py. The function name should be register and the route should be "/register".
# It should accept both GET and POST methods. For now, have it return the string "register".
# Your register() view needs to create an instance of the SignUpForm from forms.
# It should also render and return ... | {
"repo_name": "CaseyNord/Treehouse",
"path": "Build a Social Network with Flask/form_view/lunch.py",
"copies": "1",
"size": "1737",
"license": "mit",
"hash": -7126782064044753000,
"line_mean": 31.4423076923,
"line_max": 104,
"alpha_frac": 0.6879677605,
"autogenerated": false,
"ratio": 3.719486081... |
"""Add an index to audit events data blob to make it easier to search by supplier id. The data needed to be converted
to JSONB from JSON for the index to work. It's a partial index - so only indexing rows that have the 'supplierId' field
in their data blob. It's also an expression index, so only indexing the 'supplierI... | {
"repo_name": "alphagov/digitalmarketplace-api",
"path": "migrations/versions/1260_add_index_on_audit_event_data.py",
"copies": "1",
"size": "1134",
"license": "mit",
"hash": -566201992790177300,
"line_mean": 34.4375,
"line_max": 119,
"alpha_frac": 0.69664903,
"autogenerated": false,
"ratio": 3.4... |
"""Add annotation parameters
Revision ID: 454bdc604dcd
Revises: 1e6d5f30aa47
Create Date: 2013-03-14 15:37:16.410175
"""
# revision identifiers, used by Alembic.
revision = '454bdc604dcd'
down_revision = '1e6d5f30aa47'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated b... | {
"repo_name": "varda/varda",
"path": "alembic/versions/454bdc604dcd_add_annotation_param.py",
"copies": "2",
"size": "1527",
"license": "mit",
"hash": -8543372132387256000,
"line_mean": 32.9333333333,
"line_max": 94,
"alpha_frac": 0.6725605763,
"autogenerated": false,
"ratio": 3.4863013698630136,... |
"""Add annotation queries
Revision ID: 1d808cef0787
Revises: 1c15bafd311a
Create Date: 2015-08-17 14:31:52.751784
"""
# revision identifiers, used by Alembic.
revision = '1d808cef0787'
down_revision = '1c15bafd311a'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by A... | {
"repo_name": "varda/varda",
"path": "alembic/versions/1d808cef0787_add_annotation_queries.py",
"copies": "1",
"size": "1959",
"license": "mit",
"hash": 1152652704226127900,
"line_mean": 37.4117647059,
"line_max": 133,
"alpha_frac": 0.6860643185,
"autogenerated": false,
"ratio": 3.536101083032491... |
"""add another enum type
Revision ID: 804a59c2c76c
Revises: 4c8331188a48
Create Date: 2020-12-06 08:47:45.967439
"""
# revision identifiers, used by Alembic.
revision = '804a59c2c76c'
down_revision = '4c8331188a48'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
from sqlalchem... | {
"repo_name": "fake-name/ReadableWebProxy",
"path": "alembic/versions/2020-12-06_804a59c2c76c_add_another_enum_type.py",
"copies": "1",
"size": "1219",
"license": "bsd-3-clause",
"hash": 1775384547388071000,
"line_mean": 25.5,
"line_max": 72,
"alpha_frac": 0.7604593929,
"autogenerated": false,
"r... |
""" Add an owner to a resource or resources
Usage: add_owner {username} {resource list}
"""
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from hs_core.models import BaseResource
from hs_core.hydroshare.utils import get_resource_by_shortkey
from hs_access_control.model... | {
"repo_name": "hydroshare/hydroshare",
"path": "hs_core/management/commands/add_owner.py",
"copies": "1",
"size": "4119",
"license": "bsd-3-clause",
"hash": -279484237167587230,
"line_mean": 44.7666666667,
"line_max": 97,
"alpha_frac": 0.56931294,
"autogenerated": false,
"ratio": 4.72904707233065... |
"""add ant_status table
Revision ID: d208118c58d0
Revises: fb372bb87c37
Create Date: 2019-03-23 00:10:30.704936+00:00
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'd208118c58d0'
down_revision = 'fb372bb87c37'
branch_... | {
"repo_name": "HERA-Team/Monitor_and_Control",
"path": "alembic/versions/d208118c58d0_add_ant_status_table.py",
"copies": "2",
"size": "1390",
"license": "bsd-2-clause",
"hash": -6908320864257258000,
"line_mean": 36.5675675676,
"line_max": 89,
"alpha_frac": 0.5884892086,
"autogenerated": false,
"... |
"""Add an UnservedLoad component, which ensures the model is always feasible.
This is often useful when the model is constrained to the edge of infeasibility,
(e.g., when evaluating a pre-defined, just-feasible construction plan) to avoid
spurious reports of infeasibility."""
from pyomo.environ import *
def define_arg... | {
"repo_name": "OCM-Lab-PUC/switch-chile",
"path": "switch_mod/hawaii/unserved_load.py",
"copies": "2",
"size": "1758",
"license": "apache-2.0",
"hash": 3410838443089577500,
"line_mean": 53.9375,
"line_max": 140,
"alpha_frac": 0.7337883959,
"autogenerated": false,
"ratio": 3.5877551020408163,
"c... |
# Add any Sphinx extension module names here, as strings.
# They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions += ['sphinx.ext.inheritance_diagram', 'sphinxcontrib.blockdiag',
'sphinxcontrib.actdiag', 'sphinxcontrib.seqdiag',
'sphinxcontrib.n... | {
"repo_name": "Axam/nsx-web",
"path": "docs/common_conf.py",
"copies": "9",
"size": "2815",
"license": "apache-2.0",
"hash": -535691035188243200,
"line_mean": 26.8712871287,
"line_max": 75,
"alpha_frac": 0.7214920071,
"autogenerated": false,
"ratio": 3.2962529274004684,
"config_test": false,
... |
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions += ['sphinx.ext.inheritance_diagram', 'sphinxcontrib.blockdiag', 'sphinxcontrib.actdiag', 'sphinxcontrib.seqdiag', 'sphinxcontrib.nwdiag']
# The encoding of ... | {
"repo_name": "Axam/nsx-library",
"path": "docs/common_conf.py",
"copies": "6",
"size": "2943",
"license": "apache-2.0",
"hash": 6346179654456003000,
"line_mean": 27.45,
"line_max": 149,
"alpha_frac": 0.6996262317,
"autogenerated": false,
"ratio": 3.174757281553398,
"config_test": false,
"has... |
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['openstackdocstheme', 'reno.sphinxext']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffi... | {
"repo_name": "switch-ch/diskimage-builder",
"path": "releasenotes/source/conf.py",
"copies": "2",
"size": "7596",
"license": "apache-2.0",
"hash": -2014474414381001200,
"line_mean": 30.7824267782,
"line_max": 79,
"alpha_frac": 0.7093206951,
"autogenerated": false,
"ratio": 3.7290132547864507,
... |
"""Add `application_close_date` for Framework
Revision ID: 840
Revises: 830
Create Date: 2017-02-06 11:09:26.852142
"""
from alembic import op
from datetime import datetime
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '840'
down_revision = '830'
frameworks_table = sa.table(
'frame... | {
"repo_name": "alphagov/digitalmarketplace-api",
"path": "migrations/versions/840_add_application_close_date_for_framework.py",
"copies": "1",
"size": "1490",
"license": "mit",
"hash": 4449509307320801300,
"line_mean": 30.0416666667,
"line_max": 98,
"alpha_frac": 0.6590604027,
"autogenerated": fals... |
"""add application plans
Revision ID: 1edb643716c3
Revises: e52a51870d
Create Date: 2013-04-14 14:40:45.693170
"""
# revision identifiers, used by Alembic.
revision = '1edb643716c3'
down_revision = 'e52a51870d'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table, column
def upgrade():
... | {
"repo_name": "glennyonemitsu/MarkupHiveServer",
"path": "alembic/versions/20130414144045-add_application_plan.py",
"copies": "1",
"size": "4237",
"license": "mit",
"hash": 6021741508898190000,
"line_mean": 35.525862069,
"line_max": 74,
"alpha_frac": 0.5746990795,
"autogenerated": false,
"ratio":... |
"""Add applications translations
Revision ID: df42ba6d96
Revises: 4811ae4298e3
Create Date: 2015-07-31 15:15:05.822909
"""
# revision identifiers, used by Alembic.
revision = 'df42ba6d96'
down_revision = '4811ae4298e3'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated b... | {
"repo_name": "porduna/appcomposer",
"path": "alembic/versions/df42ba6d96_add_applications_translations.py",
"copies": "3",
"size": "1409",
"license": "bsd-2-clause",
"hash": -9173297622114683000,
"line_mean": 37.0810810811,
"line_max": 122,
"alpha_frac": 0.7295954578,
"autogenerated": false,
"ra... |
"""Add App
Revision ID: 3466afd5950f
Revises: 1d3b0df7f698
Create Date: 2013-09-17 23:12:36.391127
"""
# revision identifiers, used by Alembic.
revision = '3466afd5950f'
down_revision = '1d3b0df7f698'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please... | {
"repo_name": "porduna/appcomposer",
"path": "alembic/versions/3466afd5950f_add_app.py",
"copies": "3",
"size": "1110",
"license": "bsd-2-clause",
"hash": -3337743612340993000,
"line_mean": 29,
"line_max": 66,
"alpha_frac": 0.6711711712,
"autogenerated": false,
"ratio": 3.3233532934131738,
"con... |
"""add app status table for enginelight
Revision ID: 10aaa4625220
Revises: 3aba96e0a6ab
Create Date: 2015-05-19 22:19:48.978538
"""
# revision identifiers, used by Alembic.
revision = '10aaa4625220'
down_revision = '3aba96e0a6ab'
from alembic import op
import sqlalchemy as sa
import datetime
def upgrade():
##... | {
"repo_name": "codeforamerica/pittsburgh-purchasing-suite",
"path": "migrations/versions/10aaa4625220_add_app_status_table_for_enginelight.py",
"copies": "3",
"size": "1087",
"license": "bsd-3-clause",
"hash": -3430117073531873300,
"line_mean": 26.175,
"line_max": 88,
"alpha_frac": 0.6522539098,
"a... |
# Addapted from killableprocess.py.
#______________________________________________________________________________
#
# killableprocess - subprocesses which can be reliably killed
#
# Parts of this module are copied from the subprocess.py file contained
# in the Python distribution.
#
# Copyright (c) 2003-2004 by Pet... | {
"repo_name": "mastizada/kuma",
"path": "vendor/packages/ipython/IPython/frontend/process/killableprocess.py",
"copies": "7",
"size": "6860",
"license": "mpl-2.0",
"hash": 7230735833677319000,
"line_mean": 36.2826086957,
"line_max": 97,
"alpha_frac": 0.6185131195,
"autogenerated": false,
"ratio":... |
"""Add a quality control data entry to a clinical report.
Usage: post_qc_data.py 2029 '{"Cluster Density": "170", "Clusters PF": ".82"}'
"""
import os
import requests
from requests.auth import HTTPBasicAuth
import sys
import json
import argparse
#Load environment variables for request authentication parameters
if "FA... | {
"repo_name": "Omicia/omicia_api_examples",
"path": "python/ClinicalReportLaunchers/post_qc_data.py",
"copies": "1",
"size": "1929",
"license": "mit",
"hash": 621543454333306000,
"line_mean": 32.8421052632,
"line_max": 105,
"alpha_frac": 0.7029548989,
"autogenerated": false,
"ratio": 3.3316062176... |
# Add article and event class from
# from wsgi.iportalen_django.articles.models import Article
# and same but event or create new slim classes?
from django.db import models, transaction
from django.utils import timezone
from django.core.urlresolvers import reverse
from django.conf import settings
import os
from django.... | {
"repo_name": "I-sektionen/i-portalen",
"path": "wsgi/iportalen_django/thesis_portal/models.py",
"copies": "1",
"size": "4873",
"license": "mit",
"hash": 8703491082069065000,
"line_mean": 36.6589147287,
"line_max": 120,
"alpha_frac": 0.5584602717,
"autogenerated": false,
"ratio": 4.53594771241830... |
"""Add article tables
Revision ID: b00769d6f457
Revises: 0f780af615ef
Create Date: 2017-10-15 13:16:36.512159
"""
from alembic import op # type: ignore
import sqlalchemy as sa # type: ignore
from sqlalchemy.sql import table, column # type: ignore
from typing import List, Dict, Any # noqa
from mypy_extensions impo... | {
"repo_name": "bryanforbes/Erasmus",
"path": "alembic/versions/b00769d6f457_add_article_tables.py",
"copies": "1",
"size": "4064",
"license": "bsd-3-clause",
"hash": -8179636370294771000,
"line_mean": 38.8431372549,
"line_max": 115,
"alpha_frac": 0.5551181102,
"autogenerated": false,
"ratio": 3.7... |
"""add_artifact_dates
Revision ID: 87cbddd5b946
Revises: 9418cac1c4ee
Create Date: 2017-11-21 08:03:24.923077
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "87cbddd5b946"
down_revision = "9418cac1c4ee"
branch_labels = ()
depends_on = None
def upgrade():
... | {
"repo_name": "getsentry/zeus",
"path": "zeus/migrations/87cbddd5b946_add_artifact_dates.py",
"copies": "1",
"size": "1049",
"license": "apache-2.0",
"hash": 930996555176976800,
"line_mean": 22.3111111111,
"line_max": 79,
"alpha_frac": 0.6510962822,
"autogenerated": false,
"ratio": 3.383870967741... |
"""Add Artifact
Revision ID: 4e68c2a3d269
Revises: 586238e1375a
Create Date: 2014-02-06 10:24:04.343490
"""
# revision identifiers, used by Alembic.
revision = '4e68c2a3d269'
down_revision = '586238e1375a'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
'artifact',
... | {
"repo_name": "alex/changes",
"path": "migrations/versions/4e68c2a3d269_add_artifact.py",
"copies": "4",
"size": "1147",
"license": "apache-2.0",
"hash": 2160279996072518400,
"line_mean": 30.8611111111,
"line_max": 84,
"alpha_frac": 0.6434176112,
"autogenerated": false,
"ratio": 3.363636363636363... |
"""Add artist tags
This relation links tags to an artist, allowing them to tag
themselves with types of content that they prefer to create
or will not create. This is done in the interest of providing
a more meaningful commission search by increasing the search
rank when an artist's strengths match the content request... | {
"repo_name": "Weasyl/weasyl",
"path": "libweasyl/libweasyl/alembic/versions/40c00abab5f9_add_artist_tags.py",
"copies": "1",
"size": "2725",
"license": "apache-2.0",
"hash": 216608928310190850,
"line_mean": 48.5454545455,
"line_max": 116,
"alpha_frac": 0.6579816514,
"autogenerated": false,
"rati... |
'''Add a simple header to a text file, in preparation for corpus inclusion'''
from string import Template
import os
import sys
import re
import codecs
from datetime import date
HEADER = Template('''
AUTHOR: N/A
TITLE: $TITLE
MEDIUM: $MEDIUM
TOPIC: $TOPIC
PUBLISHER: $PUBLISHER
COPYRIGHT: $CPHOLDER
PUBLISHED: $DATE
EDI... | {
"repo_name": "bertugatt/textmt",
"path": "textmt/utils/add_file_header.py",
"copies": "1",
"size": "1389",
"license": "mit",
"hash": 7951935769047278000,
"line_mean": 22.1666666667,
"line_max": 133,
"alpha_frac": 0.6090712743,
"autogenerated": false,
"ratio": 3.032751091703057,
"config_test": ... |
"""add association between work and person with role
Revision ID: 56cf8a7b4ce
Revises: 7f6fc70526
Create Date: 2014-09-01 21:16:35.758002
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '56cf8a7b4ce'
down_revision = '7f6fc70526'
def upgrade():
credits_rol... | {
"repo_name": "clicheio/cliche",
"path": "cliche/migrations/versions/56cf8a7b4ce_add_association_between_work_and_person_.py",
"copies": "2",
"size": "1055",
"license": "mit",
"hash": 7745102114318234000,
"line_mean": 28.3055555556,
"line_max": 77,
"alpha_frac": 0.6388625592,
"autogenerated": false... |
"""Add a subnet to an IPSEC tunnel context."""
# :license: MIT, see LICENSE for more details.
import click
import SoftLayer
from SoftLayer.CLI.custom_types import NetworkParamType
from SoftLayer.CLI import environment
from SoftLayer.CLI.exceptions import ArgumentError
from SoftLayer.CLI.exceptions import CLIHalt
@c... | {
"repo_name": "kyubifire/softlayer-python",
"path": "SoftLayer/CLI/vpn/ipsec/subnet/add.py",
"copies": "3",
"size": "3066",
"license": "mit",
"hash": 3168360998510718500,
"line_mean": 36.8518518519,
"line_max": 80,
"alpha_frac": 0.600456621,
"autogenerated": false,
"ratio": 4.528803545051699,
"... |
# addata.activity
# PYTHON
from datetime import timedelta
import json
# QSSTATS
from qsstats import QuerySetStats
# FBDATA
from fbdata.fbids import get_fbuser_from_djuser
from fbdata.utils import (
date_to_timestamp,
padded_date_range
)
# ADDATA
from .models import (
AdHourlyActivity,
AdRecord,
... | {
"repo_name": "valuesandvalue/valuesandvalue",
"path": "vavs_project/addata/activity.py",
"copies": "1",
"size": "3445",
"license": "mit",
"hash": 6914098305760453000,
"line_mean": 35.6489361702,
"line_max": 86,
"alpha_frac": 0.5907111756,
"autogenerated": false,
"ratio": 3.614900314795383,
"co... |
# addata.api
# DJANGO
from django.contrib.auth import get_user_model
# TASTYPIE
from tastypie import fields
from tastypie.api import Api
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authorization import (
Authorization,
DjangoAuthorization,
ReadOnlyAuthorization
)
from tastypie.e... | {
"repo_name": "valuesandvalue/valuesandvalue",
"path": "vavs_project/addata/api.py",
"copies": "1",
"size": "6648",
"license": "mit",
"hash": -7675342673107550000,
"line_mean": 32.0746268657,
"line_max": 74,
"alpha_frac": 0.6254512635,
"autogenerated": false,
"ratio": 4.157598499061914,
"config... |
# addata.details
# PYTHON
from datetime import timedelta
import json
# DJANGO
from django.db.models import Q
# FBDATA
from fbdata.utils import (
date_to_timestamp,
json_error,
padded_date_range
)
# ADDATA
from .handlers import ad_class_for_type
from .models import AdRecord
def get_ad_data_json(ad_type,... | {
"repo_name": "valuesandvalue/valuesandvalue",
"path": "vavs_project/addata/details.py",
"copies": "1",
"size": "2584",
"license": "mit",
"hash": -6407361884623878000,
"line_mean": 33,
"line_max": 86,
"alpha_frac": 0.5820433437,
"autogenerated": false,
"ratio": 3.2421580928481806,
"config_test"... |
# addata.handlers
# ADDATA
from .models import (
AdRecord,
FBAd,
FBSponsored
)
_AD_CLASSES = {
'ad': AdRecord,
'fbad': FBAd,
'fbsp': FBSponsored,
}
def ad_class_for_type(object_type):
return _AD_CLASSES.get(object_type, None)
def get_user_ads(user, start_date, end_date):
return AdReco... | {
"repo_name": "valuesandvalue/valuesandvalue",
"path": "vavs_project/addata/handlers.py",
"copies": "1",
"size": "1568",
"license": "mit",
"hash": -609443636511921700,
"line_mean": 27.5090909091,
"line_max": 72,
"alpha_frac": 0.6116071429,
"autogenerated": false,
"ratio": 2.871794871794872,
"co... |
# addata.media
# PYTHON
import os
from time import time
import urllib
from urlparse import urlparse
# DJANGO
from django.conf import settings
# PILLOW
from PIL import Image
from .models import (
AdRecord,
FBAdImage
)
_IMAGE_TYPES = [
'image/gif',
'image/jpeg',
'image/png',
]
_MEDIA_TYPES = [... | {
"repo_name": "valuesandvalue/valuesandvalue",
"path": "vavs_project/addata/media.py",
"copies": "1",
"size": "5354",
"license": "mit",
"hash": 380639979671535100,
"line_mean": 26.7409326425,
"line_max": 79,
"alpha_frac": 0.5958162122,
"autogenerated": false,
"ratio": 3.451966473243069,
"config... |
# addata.models
# PYTHON
from datetime import datetime
import json
import os
# DJANGO
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.utils.timezone import now
# FBDATA
from fbdata.utils import (
date_to_timestamp,
get_choice_name
)
class... | {
"repo_name": "valuesandvalue/valuesandvalue",
"path": "vavs_project/addata/models.py",
"copies": "1",
"size": "10159",
"license": "mit",
"hash": 8349177091439896000,
"line_mean": 33.0906040268,
"line_max": 81,
"alpha_frac": 0.5787971257,
"autogenerated": false,
"ratio": 3.779389880952381,
"con... |
# addata.processing
# PYTHON
import json
import logging
from urlparse import urlparse
# DATEUTIL
import dateutil.parser
from dateutil import tz
# FBDATA
from fbdata.utils import (
padded_date_range,
timestamp_to_datetime
)
# ADDATA
from .models import (
AdHourlyActivity,
AdRecord,
DomainName,
... | {
"repo_name": "valuesandvalue/valuesandvalue",
"path": "vavs_project/addata/processing.py",
"copies": "1",
"size": "7709",
"license": "mit",
"hash": -4338171550746799000,
"line_mean": 32.5173913043,
"line_max": 80,
"alpha_frac": 0.5623297445,
"autogenerated": false,
"ratio": 3.5689814814814813,
... |
# addata.tasks
# PYTHON
from datetime import timedelta
import logging
# DJANGO
from django.conf import settings
from django.utils.timezone import now
# CELERY
from celery import task
# UTILS
from utils.slices import get_index_slice
# FBDATA
from fbdata.participant import get_participants
from fbdata.utils import p... | {
"repo_name": "valuesandvalue/valuesandvalue",
"path": "vavs_project/addata/tasks.py",
"copies": "1",
"size": "4721",
"license": "mit",
"hash": 9135598633840480000,
"line_mean": 34.7651515152,
"line_max": 80,
"alpha_frac": 0.6216903198,
"autogenerated": false,
"ratio": 3.34822695035461,
"config... |
# addata.views
# DJANGO
from django.contrib import messages
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponse, Http404
from django.shortcuts import get_object_or_404
from django.views.generic.base import TemplateView, Vie... | {
"repo_name": "valuesandvalue/valuesandvalue",
"path": "vavs_project/addata/views.py",
"copies": "1",
"size": "3938",
"license": "mit",
"hash": 8841345658644990000,
"line_mean": 34.4774774775,
"line_max": 80,
"alpha_frac": 0.6114779076,
"autogenerated": false,
"ratio": 4.089304257528557,
"confi... |
"""add Attachment element
Revision ID: 93bd528a83
Revises: 51d6e03ecba
Create Date: 2015-06-04 22:02:36.082013
"""
# revision identifiers, used by Alembic.
revision = '93bd528a83'
down_revision = '51d6e03ecba'
from alembic import op
import sqlalchemy as sa
from redwind import create_app
from redwind import util
f... | {
"repo_name": "Lancey6/redwind",
"path": "alembic_migrations/versions/93bd528a83_add_attachment_element.py",
"copies": "2",
"size": "1273",
"license": "bsd-2-clause",
"hash": -4587696453614830600,
"line_mean": 24.9795918367,
"line_max": 72,
"alpha_frac": 0.6999214454,
"autogenerated": false,
"rat... |
"""Add attachment_id to queue
Revision ID: d8e65cb6160d
Revises: 6ef9616e57cb
Create Date: 2021-04-27 13:59:11.538263
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = 'd8e65cb6160d'
down_revision = '6ef9616e57cb'
branch_labels = None
depends_on = None
def upgr... | {
"repo_name": "indico/indico-plugins",
"path": "livesync/indico_livesync/migrations/20210427_1359_d8e65cb6160d_add_attachment_id_to_queue.py",
"copies": "1",
"size": "6294",
"license": "mit",
"hash": -1592516358814095400,
"line_mean": 97.34375,
"line_max": 310,
"alpha_frac": 0.7132189387,
"autogene... |
"""Add audit events
Revision ID: 30_add_audit_events
Revises: 40_add_draft_services
Create Date: 2015-06-05 11:30:26.425563
"""
# revision identifiers, used by Alembic.
revision = '30_add_audit_events'
down_revision = '40_add_draft_services'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects im... | {
"repo_name": "alphagov/digitalmarketplace-api",
"path": "migrations/versions/30_add_audit_events.py",
"copies": "3",
"size": "1064",
"license": "mit",
"hash": -8463164095208960000,
"line_mean": 29.4,
"line_max": 63,
"alpha_frac": 0.6795112782,
"autogenerated": false,
"ratio": 3.546666666666667,
... |
"""Add auditorsettings
Revision ID: 57f648d4b597
Revises: 2705e6e13a8f
Create Date: 2015-01-30 22:32:18.420819
"""
# revision identifiers, used by Alembic.
revision = '57f648d4b597'
down_revision = '2705e6e13a8f'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alem... | {
"repo_name": "monkeysecurity/security_monkey",
"path": "migrations/versions/57f648d4b597_.py",
"copies": "17",
"size": "1082",
"license": "apache-2.0",
"hash": -7996022351389363000,
"line_mean": 29.0555555556,
"line_max": 63,
"alpha_frac": 0.6765249538,
"autogenerated": false,
"ratio": 3.3707165... |
"""Add audit table
Revision ID: a1a4f4eccae5
Revises: 30da16fadab5
Create Date: 2018-08-01 07:36:14.020930
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
revision = 'a1a4f4eccae5'
down_revision = '33228b8da578'
def upgrade():
op.create_table(
'audit',
... | {
"repo_name": "pudo/aleph",
"path": "aleph/migrate/versions/a1a4f4eccae5_add_audit_table.py",
"copies": "1",
"size": "1148",
"license": "mit",
"hash": 4515783488029765000,
"line_mean": 29.2105263158,
"line_max": 68,
"alpha_frac": 0.6280487805,
"autogenerated": false,
"ratio": 3.2247191011235956,
... |
"""Add audit tables
Revision ID: 53c3b75c86ed
Revises: 53ef72c8a867
Create Date: 2013-09-11 19:34:08.020226
"""
# revision identifiers, used by Alembic.
revision = '53c3b75c86ed'
down_revision = '53ef72c8a867'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('audits',
sa.Column... | {
"repo_name": "vladan-m/ggrc-core",
"path": "src/ggrc/migrations/versions/20130911193408_53c3b75c86ed_add_audit_tables.py",
"copies": "2",
"size": "1751",
"license": "apache-2.0",
"hash": 3423799841161802000,
"line_mean": 39.7209302326,
"line_max": 140,
"alpha_frac": 0.6767561393,
"autogenerated": ... |
"""add auth for arcgis layers
Revision ID: 6143111b020b
Revises: 19e97a222003
Create Date: 2020-10-15 11:52:42.076090
"""
# revision identifiers, used by Alembic.
revision = '6143111b020b'
down_revision = '19e97a222003'
branch_labels = None
depends_on = None
from alembic import op, context
import sqlalchemy as sa
... | {
"repo_name": "Geoportail-Luxembourg/geoportailv3",
"path": "geoportal/LUX_alembic/versions/6143111b020b_add_auth_for_arcgis_layers.py",
"copies": "1",
"size": "1237",
"license": "mit",
"hash": -1479748314140033500,
"line_mean": 28.4523809524,
"line_max": 74,
"alpha_frac": 0.5351657235,
"autogenera... |
"""add authored column
Revision ID: 648d99c5c414
Revises: 80d36c1e37e2
Create Date: 2019-03-08 11:25:48.367648
"""
import model.utils
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "648d99c5c414"
down_revision = "dd408c868dc6"
branch_labels = None
depends_on = None... | {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/648d99c5c414_add_authored_column.py",
"copies": "1",
"size": "1270",
"license": "bsd-3-clause",
"hash": 5451016883212903000,
"line_mean": 24.9183673469,
"line_max": 116,
"alpha_frac": 0.6834645669,
"autogenerated":... |
"""add authored time
Revision ID: b662c5bb00cc
Revises: d1f67196215e
Create Date: 2019-05-16 15:43:49.473126
"""
import model.utils
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "b662c5bb00cc"
down_revision = "d1f67196215e"
branch_labels = None
depends_on = None
... | {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/b662c5bb00cc_add_authored_time.py",
"copies": "1",
"size": "1766",
"license": "bsd-3-clause",
"hash": -7098534624899334000,
"line_mean": 30.5357142857,
"line_max": 115,
"alpha_frac": 0.6732729332,
"autogenerated": ... |
"""add auth related models
Revision ID: 48dbba323e2
Revises: 3b54219c648
Create Date: 2015-10-29 01:57:49.563537
"""
# revision identifiers, used by Alembic.
revision = '48dbba323e2'
down_revision = '3b54219c648'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alem... | {
"repo_name": "fdgogogo/fangs",
"path": "backend/migrations/versions/201510290157_48dbba323e2_add_auth_related_models.py",
"copies": "1",
"size": "1518",
"license": "mit",
"hash": 2625201288726727000,
"line_mean": 29.9795918367,
"line_max": 67,
"alpha_frac": 0.6574440053,
"autogenerated": false,
... |
# Add auto-completion and a stored history file of commands to your Python
# interactive interpreter. Requires Python 2.0+, readline. Autocomplete is
# bound to the Esc key by default (you can change it - see readline docs).
#
# Set an environment variable to point to it: "export PYTHONSTARTUP=foo"
#
# Note that PYTHO... | {
"repo_name": "keith/dotfiles",
"path": "langs/pystartup.py",
"copies": "1",
"size": "1110",
"license": "mit",
"hash": -2357984532752763400,
"line_mean": 26.0731707317,
"line_max": 79,
"alpha_frac": 0.7387387387,
"autogenerated": false,
"ratio": 3.490566037735849,
"config_test": false,
"has_n... |
"""Add automatic to TranslationUrl
Revision ID: 4e20dff98010
Revises: 4c0992d0b552
Create Date: 2015-05-11 11:29:49.824142
"""
# revision identifiers, used by Alembic.
revision = '4e20dff98010'
down_revision = '4c0992d0b552'
from alembic import op
import sqlalchemy as sa
import sqlalchemy.sql as sql
from appcompos... | {
"repo_name": "go-lab/appcomposer",
"path": "alembic/versions/4e20dff98010_add_automatic_to_translationurl.py",
"copies": "3",
"size": "1257",
"license": "bsd-2-clause",
"hash": 1818769536224944000,
"line_mean": 29.6585365854,
"line_max": 100,
"alpha_frac": 0.7104216388,
"autogenerated": false,
"... |
# addautoscalerules.py - example program to add autoscale rules to a VM scale set
# in this example the resource group, scale set, and rules are hardcoded
# to do: make this into a generic program to turn a regular scale set into an autoscale scale set
import json
import azurerm
# Load Azure app defaults
try:
with ... | {
"repo_name": "gbowerman/vmsstools",
"path": "cpuload/addautoscalerules.py",
"copies": "1",
"size": "2262",
"license": "mit",
"hash": -4919965661857571000,
"line_mean": 33.8,
"line_max": 98,
"alpha_frac": 0.7360742706,
"autogenerated": false,
"ratio": 3.4961360123647602,
"config_test": true,
... |
"""Add a variant note.
"""
import os
import requests
from requests.auth import HTTPBasicAuth
import sys
import json
import argparse
#Load environment variables for request authentication parameters
if "FABRIC_API_PASSWORD" not in os.environ:
sys.exit("FABRIC_API_PASSWORD environment variable missing")
if "FABRIC... | {
"repo_name": "Omicia/omicia_api_examples",
"path": "python/ClinicalReportLaunchers/add_report_variant_note.py",
"copies": "1",
"size": "1877",
"license": "mit",
"hash": 649081803685233900,
"line_mean": 30.2833333333,
"line_max": 102,
"alpha_frac": 0.6941928609,
"autogenerated": false,
"ratio": 3... |
"""Add avatar file id to user.
Revision ID: fe6ff06f1f5b
Revises: 1f4385bac8f9
Create Date: 2018-03-30 21:46:07.421190
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship
import re
import glob
from app impo... | {
"repo_name": "viaict/viaduct",
"path": "migrations/versions/2018_03_30_fe6ff06f1f5b_add_avatar_file_id_to_user.py",
"copies": "1",
"size": "3083",
"license": "mit",
"hash": 2054009350335641000,
"line_mean": 23.8629032258,
"line_max": 106,
"alpha_frac": 0.6282841388,
"autogenerated": false,
"rati... |
"""add aw3 job run id to genomic_set_member
Revision ID: 7029234abc61
Revises: d5d97368b14d
Create Date: 2020-08-03 13:46:15.629635
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7029234abc61'
down_revision = 'd5d97368b14d'
branch_labels = None
depends_on = No... | {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/7029234abc61_add_aw3_job_run_id_to_genomic_set_member.py",
"copies": "1",
"size": "2128",
"license": "bsd-3-clause",
"hash": 9215649131656247000,
"line_mean": 33.3225806452,
"line_max": 118,
"alpha_frac": 0.678101503... |
"""Add award, genre and their relationship tables. Add columns to work.
Revision ID: 2e3e3a9a625
Revises: 441c936f555
Create Date: 2014-08-14 14:45:56.769052
"""
from alembic import context, op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2e3e3a9a625'
down_revision = '441c936f555'
d... | {
"repo_name": "clicheio/cliche",
"path": "cliche/migrations/versions/2e3e3a9a625_add_award_genre_and_their_relationship_.py",
"copies": "2",
"size": "4674",
"license": "mit",
"hash": -3187338375931962400,
"line_mean": 45.74,
"line_max": 79,
"alpha_frac": 0.5571245186,
"autogenerated": false,
"rat... |
"""add_award_procurement
Revision ID: 73db7d2cc754
Revises: 31876fecc214
Create Date: 2016-09-01 15:08:33.267152
"""
# revision identifiers, used by Alembic.
revision = '73db7d2cc754'
down_revision = '31876fecc214'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade(e... | {
"repo_name": "chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend",
"path": "dataactcore/migrations/versions/73db7d2cc754_add_award_procurement.py",
"copies": "2",
"size": "14550",
"license": "cc0-1.0",
"hash": 228395524746683330,
"line_mean": 58.387755102,
"line_max": 117,
"alpha_frac": 0.6843298969... |
""" Add bambukupdatelogs table
Revision ID: 2b194f6c44e1
Revises: start_bambuk
Create Date: 2016-07-25 17:08:30.135729
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2b194f6c44e1'
down_revision = 'start_bambuk'
def upgrade():
op.create_table(
'... | {
"repo_name": "lionelz/networking-bambuk",
"path": "networking_bambuk/db/migration/alembic_migrations/versions/2b194f6c44e1_port_updates_log.py",
"copies": "1",
"size": "1083",
"license": "apache-2.0",
"hash": -8181295649929476000,
"line_mean": 32.84375,
"line_max": 74,
"alpha_frac": 0.6648199446,
... |
"""add BankAccount used for usersheets to config
Revision ID: cd588620e7d0
Revises: a32def81e36a
Create Date: 2018-09-10 21:54:26.977248
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table
import pycroft
# revision identifiers, used by Alembic.
revision = 'cd588620e7d0'
down_revision... | {
"repo_name": "agdsn/pycroft",
"path": "pycroft/model/alembic/versions/cd588620e7d0_add_bankaccount_used_for_usersheets_to_.py",
"copies": "2",
"size": "1212",
"license": "apache-2.0",
"hash": 1314137969763706400,
"line_mean": 27.8571428571,
"line_max": 101,
"alpha_frac": 0.6707920792,
"autogenerat... |
"""add battle duration
Revision ID: 3a763038a0c9
Revises: 18b90187fbae
Create Date: 2013-12-09 19:29:49.336000
"""
# revision identifiers, used by Alembic.
revision = '3a763038a0c9'
down_revision = '18b90187fbae'
from alembic import op
import sqlalchemy as sa
from whyattend.model import Base, Battle, db_session
Ba... | {
"repo_name": "ceari/whyattend",
"path": "whyattend/alembic/versions/3a763038a0c9_add_battle_duration.py",
"copies": "1",
"size": "1025",
"license": "bsd-2-clause",
"hash": -5545662740111849000,
"line_mean": 26.7027027027,
"line_max": 88,
"alpha_frac": 0.6468292683,
"autogenerated": false,
"ratio... |
# add bayespy dir
import matplotlib.pyplot as plt
import numpy as np
from . import settings
from .influence import ProbTable
# import math
_cache = None
def set_cache(cache):
global _cache
_cache = cache
_id = 0
def _get_id():
global _id
id = _id
_id += 1
return id
class CacheMixin(obj... | {
"repo_name": "dungvtdev/upsbayescpm",
"path": "mybayes/nodes.py",
"copies": "1",
"size": "7759",
"license": "mit",
"hash": 8735096137337248000,
"line_mean": 27.3175182482,
"line_max": 77,
"alpha_frac": 0.5514885939,
"autogenerated": false,
"ratio": 3.682486948267679,
"config_test": false,
"h... |
""" Add Binary
Given two binary strings a and b, return their sum as a binary string.
Example 1:
Input: a = "11", b = "1"
Output: "100"
Example 2:
Input: a = "1010", b = "1011"
Output: "10101"
Constraints:
* 1 <= a.length, b.length <= 104
* a and b consist only of '0' or '1' characters.
* Each str... | {
"repo_name": "aiden0z/snippets",
"path": "leetcode/067_add_binary.py",
"copies": "1",
"size": "1550",
"license": "mit",
"hash": -7675241468445535000,
"line_mean": 22.1492537313,
"line_max": 84,
"alpha_frac": 0.4109677419,
"autogenerated": false,
"ratio": 3.3916849015317285,
"config_test": fals... |
"""add biobank history
Revision ID: 4aa79d5ac86e
Revises: e44e303ae759
Create Date: 2018-08-20 10:33:58.770173
"""
import model.utils
import sqlalchemy as sa
from alembic import op
from rdr_service.participant_enums import BiobankOrderStatus
# revision identifiers, used by Alembic.
revision = "4aa79d5ac86e"
down_re... | {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/4aa79d5ac86e_add_biobank_history.py",
"copies": "1",
"size": "6417",
"license": "bsd-3-clause",
"hash": -6622745211271318000,
"line_mean": 39.10625,
"line_max": 98,
"alpha_frac": 0.5726975222,
"autogenerated": fals... |
"""add_biobank_identifier
Revision ID: 32d414bc9a1e
Revises: 9b93d00a35cc
Create Date: 2018-01-30 11:12:24.111826
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "32d414bc9a1e"
down_revision = "9b93d00a35cc"
branch_labels = None
depends_on = None
def upgrade(e... | {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/32d414bc9a1e_add_biobank_identifier.py",
"copies": "1",
"size": "1163",
"license": "bsd-3-clause",
"hash": -347264098850127040,
"line_mean": 23.7446808511,
"line_max": 119,
"alpha_frac": 0.6732588134,
"autogenerate... |
"""add biobank version
Revision ID: e44e303ae759
Revises: 0e92151ebd4a
Create Date: 2018-08-20 10:08:20.904521
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "e44e303ae759"
down_revision = "0e92151ebd4a"
branch_labels = None
depends_on = None
def upgrade(engi... | {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/e44e303ae759_add_biobank_version.py",
"copies": "1",
"size": "1102",
"license": "bsd-3-clause",
"hash": -7997441456450034000,
"line_mean": 22.4468085106,
"line_max": 86,
"alpha_frac": 0.6615245009,
"autogenerated":... |
"""add blog
Revision ID: 16c06c739a94
Revises: 1731e32124d9
Create Date: 2017-02-08 15:21:20.686000
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '16c06c739a94'
down_revision = '1731e32124d9'
branch_labels = None
depends_on = None
def upgrade():
# ### c... | {
"repo_name": "hedm0423/flaskdemo",
"path": "migrations/versions/16c06c739a94_add_blog.py",
"copies": "1",
"size": "1047",
"license": "mit",
"hash": -8964239416669786000,
"line_mean": 27.2972972973,
"line_max": 83,
"alpha_frac": 0.6609360076,
"autogenerated": false,
"ratio": 3.292452830188679,
... |
"""add blog_post.slug
Revision ID: 820bb005f2c5
Revises: 15ab4487a7f0
Create Date: 2016-06-09 22:15:53.127614
"""
# revision identifiers, used by Alembic.
revision = '820bb005f2c5'
down_revision = '15ab4487a7f0'
import re
from alembic import op
from sqlalchemy.orm import sessionmaker
import sqlalchemy as sa
from s... | {
"repo_name": "thusoy/blag",
"path": "blag/migrations/versions/820bb005f2c5_add_blog_post_slug.py",
"copies": "1",
"size": "1516",
"license": "mit",
"hash": 8458997403209816000,
"line_mean": 27.0740740741,
"line_max": 89,
"alpha_frac": 0.6833773087,
"autogenerated": false,
"ratio": 3.260215053763... |
"""Add board moderator roles
Revision ID: da8b38b5bdd5
Revises: 90ac01a2df
Create Date: 2016-05-03 09:32:06.756899
"""
# revision identifiers, used by Alembic.
revision = 'da8b38b5bdd5'
down_revision = '90ac01a2df'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
from sqlalchemy... | {
"repo_name": "Floens/uchan",
"path": "migrations/versions/da8b38b5bdd5_add_board_moderator_roles.py",
"copies": "1",
"size": "1908",
"license": "mit",
"hash": -6841155678013453000,
"line_mean": 39.5957446809,
"line_max": 109,
"alpha_frac": 0.6284067086,
"autogenerated": false,
"ratio": 3.7048543... |
"""Add Boards
Revision ID: 50e85a64aa30
Revises: d1cd159b4f82
Create Date: 2017-11-11 20:15:43.683292
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '50e85a64aa30'
down_revision = 'd1cd159b4f82'
branch_labels = None
depends_on = None
def upgrade():
op.cr... | {
"repo_name": "charlesj/Apollo",
"path": "database/versions/50e85a64aa30_add_boards.py",
"copies": "1",
"size": "1223",
"license": "mit",
"hash": 7295685434328859000,
"line_mean": 29.575,
"line_max": 76,
"alpha_frac": 0.658217498,
"autogenerated": false,
"ratio": 3.2613333333333334,
"config_tes... |
"""add boards table
Revision ID: c1b883dbfff4
Revises: b764aaedf10d
Create Date: 2017-10-30 19:37:00.544958
"""
# pylint: skip-file
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c1b883dbfff4'
down_revision = 'b764aaedf10d'
branch_labels = None
depends_on = None
... | {
"repo_name": "kokimoribe/todo-api",
"path": "alembic/versions/c1b883dbfff4_add_boards_table.py",
"copies": "1",
"size": "1672",
"license": "mit",
"hash": -6417203331918787000,
"line_mean": 32.44,
"line_max": 78,
"alpha_frac": 0.543062201,
"autogenerated": false,
"ratio": 3.861431870669746,
"co... |
"""Add books column
Revision ID: e7aff6447fbe
Revises: 7cdaa5513f2d
Create Date: 2017-10-08 15:22:12.019617
"""
from alembic import op
from sqlalchemy.sql import table, column
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e7aff6447fbe'
down_revision = '7cdaa5513f2d'
branch_labels = No... | {
"repo_name": "bryanforbes/Erasmus",
"path": "alembic/versions/e7aff6447fbe_add_books_column.py",
"copies": "1",
"size": "2959",
"license": "bsd-3-clause",
"hash": 2787870519976446000,
"line_mean": 43.1641791045,
"line_max": 85,
"alpha_frac": 0.5468063535,
"autogenerated": false,
"ratio": 3.74556... |
"""Add browser info
Revision ID: 3999a40ec7b
Revises: 292d93c545f2
Create Date: 2017-06-09 18:53:32.305876
"""
# revision identifiers, used by Alembic.
revision = '3999a40ec7b'
down_revision = '292d93c545f2'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic -... | {
"repo_name": "gateway4labs/labmanager",
"path": "alembic/versions/3999a40ec7b_add_browser_info.py",
"copies": "5",
"size": "1744",
"license": "bsd-2-clause",
"hash": 3286937410450508300,
"line_mean": 42.6,
"line_max": 98,
"alpha_frac": 0.7035550459,
"autogenerated": false,
"ratio": 3.15370705244... |
"""add_build_author
Revision ID: 523842e356fa
Revises: c1d328364626
Create Date: 2018-10-01 11:57:18.018127
"""
from alembic import op
import sqlalchemy as sa
import zeus
# revision identifiers, used by Alembic.
revision = "523842e356fa"
down_revision = "c1d328364626"
branch_labels = ()
depends_on = None
def upgr... | {
"repo_name": "getsentry/zeus",
"path": "zeus/migrations/523842e356fa_add_build_author.py",
"copies": "1",
"size": "1191",
"license": "apache-2.0",
"hash": 6841405053548739000,
"line_mean": 28.0487804878,
"line_max": 85,
"alpha_frac": 0.6456759026,
"autogenerated": false,
"ratio": 3.1507936507936... |
"""Add BuildPhase
Revision ID: 4276d58dd1e6
Revises: 2596f21c6f58
Create Date: 2014-02-24 14:06:16.379028
"""
# revision identifiers, used by Alembic.
revision = '4276d58dd1e6'
down_revision = '2596f21c6f58'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic -... | {
"repo_name": "wfxiang08/changes",
"path": "migrations/versions/4276d58dd1e6_add_buildphase.py",
"copies": "4",
"size": "1469",
"license": "apache-2.0",
"hash": -4509778670649305000,
"line_mean": 35.725,
"line_max": 89,
"alpha_frac": 0.6466984343,
"autogenerated": false,
"ratio": 3.48931116389548... |
"""Add build plans
Revision ID: ff220d76c11
Revises: 153b703a46ea
Create Date: 2013-12-11 16:12:18.309606
"""
# revision identifiers, used by Alembic.
revision = 'ff220d76c11'
down_revision = '153b703a46ea'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
'plan',
... | {
"repo_name": "bowlofstew/changes",
"path": "migrations/versions/ff220d76c11_add_build_plans.py",
"copies": "4",
"size": "4399",
"license": "apache-2.0",
"hash": 6204675761219085000,
"line_mean": 44.3505154639,
"line_max": 108,
"alpha_frac": 0.6228688338,
"autogenerated": false,
"ratio": 3.522017... |
"""Add bulletin_message field to Guild.
Revision ID: 8010376daba7
Revises: afc57bd04606
Create Date: 2017-03-14 20:32:02.467432
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = '8010376daba7'
down_revision = 'afc57bd0460... | {
"repo_name": "MJB47/Jokusoramame",
"path": "migrations/versions/8010376daba7_add_bulletin_message_field_to_guild.py",
"copies": "1",
"size": "1187",
"license": "mit",
"hash": 9222128314364971000,
"line_mean": 33.9117647059,
"line_max": 111,
"alpha_frac": 0.7034540859,
"autogenerated": false,
"ra... |
# ADD-BY-LEETEN 2013/09/24-BEGIN
import numpy as np;
import time;
# ADD-BY-LEETEN 2013/09/24-END
import sat_dwt_decoder;
# ADD-BY-LEETEN 2013/09/24-BEGIN
time_queue = [];
time_queue.append(time.time());
# ADD-BY-LEETEN 2013/09/24-END
waveletsat_decoder = sat_dwt_decoder.decoder();
# waveletsat_decoder.loa... | {
"repo_name": "recheliu/wavelet-sat",
"path": "python/test_sat_dwt_decoder.py",
"copies": "1",
"size": "2202",
"license": "mit",
"hash": 4481217178081077000,
"line_mean": 31.3636363636,
"line_max": 136,
"alpha_frac": 0.6262488647,
"autogenerated": false,
"ratio": 2.519450800915332,
"config_test... |
"""Add cache per rlms type
Revision ID: 1a3e5ec9c2fd
Revises: 7f806cb0445
Create Date: 2015-05-06 16:33:34.158433
"""
# revision identifiers, used by Alembic.
revision = '1a3e5ec9c2fd'
down_revision = '7f806cb0445'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Al... | {
"repo_name": "labsland/labmanager",
"path": "alembic/versions/1a3e5ec9c2fd_add_cache_per_rlms_type.py",
"copies": "5",
"size": "1242",
"license": "bsd-2-clause",
"hash": -6374285486393555000,
"line_mean": 32.5675675676,
"line_max": 98,
"alpha_frac": 0.6859903382,
"autogenerated": false,
"ratio":... |
"""Add calls to action.
Revision ID: 62214735b8
Revises: 564d901de0c
Create Date: 2015-06-22 03:13:32.048821
"""
# revision identifiers, used by Alembic.
revision = '62214735b8'
down_revision = '564d901de0c'
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
def upgrade():
### commands aut... | {
"repo_name": "pathunstrom/pygotham",
"path": "migrations/versions/62214735b8_.py",
"copies": "3",
"size": "1229",
"license": "bsd-3-clause",
"hash": 5882270780175383000,
"line_mean": 32.2162162162,
"line_max": 101,
"alpha_frac": 0.6867371847,
"autogenerated": false,
"ratio": 3.330623306233062,
... |
"""add cancelled to PM
Revision ID: 2b328e8e5eb8
Revises: b4f6eb55d503
Create Date: 2018-09-25 14:27:46.744408
"""
import model.utils
import sqlalchemy as sa
from alembic import op
from rdr_service.participant_enums import PhysicalMeasurementsStatus
# revision identifiers, used by Alembic.
revision = "2b328e8e5eb8"... | {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/2b328e8e5eb8_add_cancelled_to_pm.py",
"copies": "1",
"size": "1950",
"license": "bsd-3-clause",
"hash": 706350705678529200,
"line_mean": 31.5,
"line_max": 113,
"alpha_frac": 0.6958974359,
"autogenerated": false,
... |
"""Add Canons of Dort
Revision ID: 43c0cf2239c4
Revises: a1dbd23261c3
Create Date: 2017-10-11 23:43:21.682227
"""
from alembic import op
import sqlalchemy as sa
from pathlib import Path
from json import load
from collections import OrderedDict
# revision identifiers, used by Alembic.
revision = '43c0cf2239c4'
down_... | {
"repo_name": "bryanforbes/Erasmus",
"path": "alembic/versions/43c0cf2239c4_add_canons_of_dort.py",
"copies": "1",
"size": "2903",
"license": "bsd-3-clause",
"hash": 2491588952159875000,
"line_mean": 37.7066666667,
"line_max": 106,
"alpha_frac": 0.6017912504,
"autogenerated": false,
"ratio": 3.80... |
"""add capabilities table
Revision ID: 38c8ec357e0
Revises: e64cd1af67
Create Date: 2015-03-10 13:24:16.971933
"""
# revision identifiers, used by Alembic.
revision = '38c8ec357e0'
down_revision = 'e64cd1af67'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('capabilities',
sa... | {
"repo_name": "rjw57/cubbie",
"path": "migrations/versions/38c8ec357e0_add_capabilities_table.py",
"copies": "1",
"size": "1216",
"license": "mit",
"hash": -4955954649725083000,
"line_mean": 31.8648648649,
"line_max": 99,
"alpha_frac": 0.6965460526,
"autogenerated": false,
"ratio": 3.484240687679... |
"""Add captain column to Teams
Revision ID: b5551cd26764
Revises: 4e4d5a9ea000
Create Date: 2019-04-12 00:29:08.021141
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.sql import column, table
from CTFd.models import db
# revision identifiers, used by Alembic.
revision = "b5551cd26764"
down_revisi... | {
"repo_name": "LosFuzzys/CTFd",
"path": "migrations/versions/b5551cd26764_add_captain_column_to_teams.py",
"copies": "4",
"size": "1690",
"license": "apache-2.0",
"hash": 744503992530115600,
"line_mean": 28.649122807,
"line_max": 88,
"alpha_frac": 0.6153846154,
"autogenerated": false,
"ratio": 3.... |
"""ADd cascades
Revision ID: def46e09c9ef
Revises: 3efdb537f933
Create Date: 2017-12-28 11:44:14.263012
"""
# revision identifiers, used by Alembic.
revision = 'def46e09c9ef'
down_revision = '3efdb537f933'
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic -... | {
"repo_name": "morelab/appcomposer",
"path": "alembic/versions/def46e09c9ef_add_cascades.py",
"copies": "3",
"size": "2355",
"license": "bsd-2-clause",
"hash": -6597934979457355000,
"line_mean": 57.875,
"line_max": 163,
"alpha_frac": 0.7290870488,
"autogenerated": false,
"ratio": 3.43795620437956... |
"""add cascades to foreign keys
Revision ID: 2d235ac4b9e
Revises: 7d8199c632
Create Date: 2015-03-20 10:11:40.618169
"""
# revision identifiers, used by Alembic.
revision = '2d235ac4b9e'
down_revision = '7d8199c632'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.drop_constraint('user_identit... | {
"repo_name": "rjw57/cubbie",
"path": "migrations/versions/2d235ac4b9e_add_cascades_to_foreign_keys.py",
"copies": "1",
"size": "1536",
"license": "mit",
"hash": -4293875563438055400,
"line_mean": 27.9811320755,
"line_max": 73,
"alpha_frac": 0.6360677083,
"autogenerated": false,
"ratio": 3.160493... |
"""Add cascading delete to dynamic challenges
Revision ID: b37fb68807ea
Revises:
Create Date: 2020-05-06 12:21:39.373983
"""
# revision identifiers, used by Alembic.
revision = "b37fb68807ea"
down_revision = None
branch_labels = None
depends_on = None
def upgrade(op=None):
bind = op.get_bind()
url = str(bin... | {
"repo_name": "ajvpot/CTFd",
"path": "CTFd/plugins/dynamic_challenges/migrations/b37fb68807ea_add_cascading_delete_to_dynamic_.py",
"copies": "4",
"size": "1265",
"license": "apache-2.0",
"hash": -983648834779568100,
"line_mean": 27.1111111111,
"line_max": 83,
"alpha_frac": 0.6229249012,
"autogener... |
"""add case_number, completed_date, received_date; remove division, bureau, resident_weapon_used on BPD UOF table
Revision ID: 77ad8047becf
Revises: 43c4c512514
Create Date: 2017-01-09 23:48:43.764788
"""
# revision identifiers, used by Alembic.
revision = '77ad8047becf'
down_revision = '43c4c512514'
from alembic i... | {
"repo_name": "codeforamerica/comport",
"path": "migrations/versions/77ad8047becf_.py",
"copies": "1",
"size": "1508",
"license": "bsd-3-clause",
"hash": -635128640786223500,
"line_mean": 44.696969697,
"line_max": 142,
"alpha_frac": 0.7267904509,
"autogenerated": false,
"ratio": 2.9,
"config_te... |
""" Add Cast operation
Revision ID: ea5b31a667ff
Revises: faf6f1c74416
Create Date: 2021-02-22 19:49:56.634787
"""
from alembic import context
from alembic import op
from sqlalchemy import String, Integer, Text
from sqlalchemy.orm import sessionmaker
from sqlalchemy.sql import table, column
import sqlalchemy as sa
... | {
"repo_name": "eubr-bigsea/tahiti",
"path": "migrations/versions/ea5b31a667ff_add_cast_operation.py",
"copies": "1",
"size": "12005",
"license": "apache-2.0",
"hash": -1637578508204244700,
"line_mean": 31.1501340483,
"line_max": 138,
"alpha_frac": 0.5702968646,
"autogenerated": false,
"ratio": 3.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.