text
stringlengths
0
1.05M
meta
dict
"""Add support for OAuth to let users to connect the bot various services.""" from plumeria.command import commands from plumeria.core.storage import pool, migrations from plumeria.core.webserver import app, render_template from plumeria.message import Message, Response from plumeria.perms import direct_only from plum...
{ "repo_name": "sk89q/Plumeria", "path": "plumeria/core/oauth/__init__.py", "copies": "1", "size": "2668", "license": "mit", "hash": 4938114116975566000, "line_mean": 36.5774647887, "line_max": 121, "alpha_frac": 0.6495502249, "autogenerated": false, "ratio": 4.3881578947368425, "config_test": f...
"""Add support for the Xiaomi TVs.""" import logging import pymitv import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice from homeassistant.components.media_player.const import ( SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_VOLUME_STEP, ) from homeassi...
{ "repo_name": "postlund/home-assistant", "path": "homeassistant/components/xiaomi_tv/media_player.py", "copies": "3", "size": "3138", "license": "apache-2.0", "hash": 9102530057879929000, "line_mean": 28.0555555556, "line_max": 84, "alpha_frac": 0.6290630975, "autogenerated": false, "ratio": 3.82...
"""Add support for the Xiaomi TVs.""" import logging import pymitv import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity from homeassistant.components.media_player.const import ( SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_VOLUME_STEP, ) from homeassi...
{ "repo_name": "tchellomello/home-assistant", "path": "homeassistant/components/xiaomi_tv/media_player.py", "copies": "21", "size": "3130", "license": "apache-2.0", "hash": 1234339652272674000, "line_mean": 27.9814814815, "line_max": 84, "alpha_frac": 0.6274760383, "autogenerated": false, "ratio":...
"""Add support for the Xiaomi TVs.""" import logging import voluptuous as vol import pymitv from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA from homeassistant.components.media_player.const import ( SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_VOLUME_STEP, ) from homeassi...
{ "repo_name": "joopert/home-assistant", "path": "homeassistant/components/xiaomi_tv/media_player.py", "copies": "2", "size": "3138", "license": "apache-2.0", "hash": -8413457378054953000, "line_mean": 28.0555555556, "line_max": 84, "alpha_frac": 0.6290630975, "autogenerated": false, "ratio": 3.82...
"""Add support for the Xiaomi TVs.""" import logging import voluptuous as vol from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA from homeassistant.components.media_player.const import ( SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_VOLUME_STEP, ) from homeassistant.const im...
{ "repo_name": "fbradyirl/home-assistant", "path": "homeassistant/components/xiaomi_tv/media_player.py", "copies": "2", "size": "3198", "license": "apache-2.0", "hash": 797242635017657300, "line_mean": 28.0727272727, "line_max": 84, "alpha_frac": 0.6269543465, "autogenerated": false, "ratio": 3.87...
"""Add support for the Xiaomi TVs.""" import logging import voluptuous as vol from homeassistant.components.media_player import ( MediaPlayerDevice, PLATFORM_SCHEMA) from homeassistant.components.media_player.const import ( SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_VOLUME_STEP) from homeassistant.const impor...
{ "repo_name": "jabesq/home-assistant", "path": "homeassistant/components/xiaomi_tv/media_player.py", "copies": "7", "size": "3216", "license": "apache-2.0", "hash": 3707387483623341600, "line_mean": 28.7777777778, "line_max": 77, "alpha_frac": 0.6234452736, "autogenerated": false, "ratio": 3.8981...
"""Adds users.stripe_customer_id column and the transaction table Revision ID: e63d9d5e76a9 Revises: 9f2495bd66de Create Date: 2017-07-24 22:44:33.650136 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = 'e63d9d5e76a9' do...
{ "repo_name": "Rdbaker/Mealbound", "path": "migrations/versions/e63d9d5e76a9_.py", "copies": "1", "size": "2031", "license": "bsd-3-clause", "hash": -4147860588908593700, "line_mean": 40.4489795918, "line_max": 102, "alpha_frac": 0.6863613983, "autogenerated": false, "ratio": 3.313213703099511, ...
"""Adds VM to specified network by creating a NIC""" from baseCmd import * from baseResponse import * class addNicToVirtualMachineCmd (baseCmd): typeInfo = {} def __init__(self): self.isAsync = "true" """Network ID""" """Required""" self.networkid = None self.typeInfo[...
{ "repo_name": "MissionCriticalCloud/marvin", "path": "marvin/cloudstackAPI/addNicToVirtualMachine.py", "copies": "1", "size": "24389", "license": "apache-2.0", "hash": -4231563692088282600, "line_mean": 37.7126984127, "line_max": 131, "alpha_frac": 0.5722661856, "autogenerated": false, "ratio": 4...
"""Adds xref targets to the top of files.""" import os import sys testing = False DONT_TOUCH = ( './index.txt', ) def target_name(fn): if fn.endswith('.txt'): fn = fn[:-4] return '_' + fn.lstrip('./').replace('/', '-') def process_file(fn, lines): lines.insert(0, '\n') lines.insert(0,...
{ "repo_name": "maxsocl/django", "path": "docs/_ext/applyxrefs.py", "copies": "322", "size": "1834", "license": "bsd-3-clause", "hash": -3372931339793458700, "line_mean": 22.8181818182, "line_max": 75, "alpha_frac": 0.5185387132, "autogenerated": false, "ratio": 3.4409005628517826, "config_test"...
"""Adds xref targets to the top of files.""" import sys import os testing = False DONT_TOUCH = ('./index.txt', ) def target_name(fn): if fn.endswith('.txt'): fn = fn[:-4] return '_' + fn.lstrip('./').replace('/', '-') def process_file(fn, lines): lines.insert(0, '\n') lines.insert(0, '.. ...
{ "repo_name": "rhcarvalho/kombu", "path": "docs/_ext/applyxrefs.py", "copies": "8", "size": "2093", "license": "bsd-3-clause", "hash": -1817110058937280800, "line_mean": 22.7840909091, "line_max": 75, "alpha_frac": 0.513616818, "autogenerated": false, "ratio": 3.4883333333333333, "config_test":...
"""Adds xref targets to the top of files.""" import sys import os testing = False DONT_TOUCH = ( './index.txt', ) def target_name(fn): if fn.endswith('.txt'): fn = fn[:-4] return '_' + fn.lstrip('./').replace('/', '-') def process_file(fn, lines): lines.insert(0, '\n') lines...
{ "repo_name": "chrishas35/django-travis-ci", "path": "docs/_ext/applyxrefs.py", "copies": "1", "size": "2150", "license": "bsd-3-clause", "hash": 674186199167435500, "line_mean": 23.4318181818, "line_max": 75, "alpha_frac": 0.511627907, "autogenerated": false, "ratio": 3.49025974025974, "config...
"""Adds xref targets to the top of files.""" import sys import os testing = False DONT_TOUCH = ( './index.txt', ) def target_name(fn): if fn.endswith('.txt'): fn = fn[:-4] return '_' + fn.lstrip('./').replace('/', '-') def process_file(fn, lines): lines.insert(0, '\n') lines.insert(0,...
{ "repo_name": "jarvys/django-1.7-jdb", "path": "docs/_ext/applyxrefs.py", "copies": "61", "size": "1834", "license": "bsd-3-clause", "hash": 663276803632450600, "line_mean": 22.8181818182, "line_max": 75, "alpha_frac": 0.5185387132, "autogenerated": false, "ratio": 3.4409005628517826, "config_t...
"""Add syntatic sugar for configuration""" import inspect import warnings default_clean = "[Tt]est*" defaults = dict( rewrite_asserts=True, magics=True, clean=default_clean, addopts=("-q", "--color=yes"), run_in_thread=False, defopts=True, display_columns=100, ) current_config = dict( ...
{ "repo_name": "chmp/ipytest", "path": "ipytest/_config.py", "copies": "1", "size": "4857", "license": "mit", "hash": 168747245640297470, "line_mean": 26.9137931034, "line_max": 84, "alpha_frac": 0.6518427013, "autogenerated": false, "ratio": 3.8274231678487, "config_test": true, "has_no_keywo...
'''Add syntax highlighting to Python source code''' __author__ = 'Raymond Hettinger' import keyword, tokenize, cgi, re, functools try: import builtins except ImportError: import __builtin__ as builtins #### Analyze Python Source ################################# def is_builtin(s): 'Return True if s is t...
{ "repo_name": "ActiveState/code", "path": "recipes/Python/578178_Colorize_Pyth_Sourcecode_Syntax/recipe-578178.py", "copies": "2", "size": "9142", "license": "mit", "hash": 7039888874018337000, "line_mean": 34.1615384615, "line_max": 90, "alpha_frac": 0.5752570553, "autogenerated": false, "ratio"...
"""Add system roles Revision ID: 1afc3824d35b Revises: 5325f2b93af8 Create Date: 2013-09-20 14:12:32.846302 """ # revision identifiers, used by Alembic. revision = '1afc3824d35b' down_revision = '5325f2b93af8' import json import sqlalchemy as sa from alembic import op from datetime import datetime from sqlalchemy.s...
{ "repo_name": "uskudnik/ggrc-core", "path": "src/ggrc_basic_permissions/migrations/versions/20130920141232_1afc3824d35b_add_system_roles.py", "copies": "1", "size": "3222", "license": "apache-2.0", "hash": 8160979454588044000, "line_mean": 25.4098360656, "line_max": 78, "alpha_frac": 0.5661080074, ...
"""Add table and seed user/role (admin) for flask_security Revision ID: 2a3fee7de8d4 Revises: 29b31f4d8de6 Create Date: 2015-06-27 01:53:52.021040 """ # revision identifiers, used by Alembic. revision = '2a3fee7de8d4' down_revision = '29b31f4d8de6' from alembic import op import sqlalchemy as sa def upgrade(): ...
{ "repo_name": "betterlife/psi", "path": "psi/migrations/versions/04_2a3fee7de8d4_.py", "copies": "2", "size": "3371", "license": "mit", "hash": 3424575459911065600, "line_mean": 46.4788732394, "line_max": 106, "alpha_frac": 0.5215069712, "autogenerated": false, "ratio": 4.250945775535939, "conf...
"""Add tabled_committee_report constraint Revision ID: 8cbc3d8dd55 Revises: 17570e7e200b Create Date: 2016-08-31 10:19:49.128041 """ # revision identifiers, used by Alembic. revision = '8cbc3d8dd55' down_revision = '17570e7e200b' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto ...
{ "repo_name": "Code4SA/pmg-cms-2", "path": "migrations/versions/8cbc3d8dd55_add_tabled_committee_report_constraint.py", "copies": "1", "size": "1744", "license": "apache-2.0", "hash": -8655997645879672000, "line_mean": 44.8947368421, "line_max": 159, "alpha_frac": 0.6978211009, "autogenerated": fal...
"""Add table for comments Revision ID: 0366ba6575ca Revises: 1093835a1051 Create Date: 2020-08-14 00:46:54.161120 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "0366ba6575ca" down_revision = "1093835a1051" branch_labels = None depends_on = None def upgrade(...
{ "repo_name": "isislab/CTFd", "path": "migrations/versions/0366ba6575ca_add_table_for_comments.py", "copies": "4", "size": "1628", "license": "apache-2.0", "hash": -5681373047420389000, "line_mean": 33.6382978723, "line_max": 81, "alpha_frac": 0.6283783784, "autogenerated": false, "ratio": 3.7, ...
"""Add table for event labels Revision ID: 266d78b1c5db Revises: 18a1088f1ea8 Create Date: 2020-03-24 09:26:07.095052 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '266d78b1c5db' down_revision = '18a1088f1ea8' branch_labels = None depends_on = None def upgr...
{ "repo_name": "pferreir/indico", "path": "indico/migrations/versions/20200324_0926_266d78b1c5db_add_table_for_event_labels.py", "copies": "5", "size": "1436", "license": "mit", "hash": 8715120325631586000, "line_mean": 34.9, "line_max": 118, "alpha_frac": 0.6538997214, "autogenerated": false, "ra...
"""add table for mt940 parsing errors Revision ID: 8ff6f90b98fa Revises: 08fa5b3cc555 Create Date: 2018-12-20 18:34:05.289624 """ from alembic import op import sqlalchemy as sa import pycroft from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '8ff6f90b98fa' down_revision =...
{ "repo_name": "agdsn/pycroft", "path": "pycroft/model/alembic/versions/8ff6f90b98fa_add_table_for_mt940_parsing_errors.py", "copies": "2", "size": "1055", "license": "apache-2.0", "hash": -3585272733337338400, "line_mean": 29.1428571429, "line_max": 124, "alpha_frac": 0.7042654028, "autogenerated":...
"""Add table for `Report` model. Revision ID: 3b9f2f6e0d3c Revises: 3e2e5299576f Create Date: 2014-06-28 00:21:44.910113 """ # revision identifiers, used by Alembic. revision = '3b9f2f6e0d3c' down_revision = '3e2e5299576f' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql de...
{ "repo_name": "cvan/arewefast", "path": "arewefast/migrations/versions/3b9f2f6e0d3c_.py", "copies": "1", "size": "1193", "license": "mit", "hash": 4636362695809936000, "line_mean": 31.2432432432, "line_max": 77, "alpha_frac": 0.6705783738, "autogenerated": false, "ratio": 3.1644562334217508, "c...
"""Add table for review conditions Revision ID: 02bf20df06b3 Revises: 3c5462aef0b7 Create Date: 2020-04-01 17:38:54.405431 """ import sqlalchemy as sa from alembic import op from indico.core.db.sqlalchemy import PyIntEnum from indico.modules.events.editing.models.editable import EditableType # revision identifiers...
{ "repo_name": "ThiefMaster/indico", "path": "indico/migrations/versions/20200401_1738_02bf20df06b3_add_table_for_review_conditions.py", "copies": "5", "size": "1624", "license": "mit", "hash": -6788358782587876000, "line_mean": 30.8431372549, "line_max": 104, "alpha_frac": 0.6600985222, "autogenera...
"""add table mailtemplates Revision ID: 34f15d11d02 Revises: 2fadbf7a01a Create Date: 2015-08-04 17:28:24.372803 """ # revision identifiers, used by Alembic. revision = '34f15d11d02' down_revision = '2fadbf7a01a' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alem...
{ "repo_name": "uaprom-summer-2015/Meowth", "path": "migrations/versions/2015_08_04_34f1_add_table_mailtemplates.py", "copies": "2", "size": "1045", "license": "bsd-3-clause", "hash": 3312569149242929700, "line_mean": 28.0277777778, "line_max": 63, "alpha_frac": 0.6679425837, "autogenerated": false,...
"""Add tables for DB-based muting Revision ID: 313ce21eb461 Revises: 0002ca860468 Create Date: 2018-12-10 14:53:50.525225 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '313ce21eb461' down_revision = '0002ca860468' branch_labels = None depends_on = None def ...
{ "repo_name": "FallenWarrior2k/cardinal.py", "path": "src/cardinal/db/migrations/versions/313ce21eb461_add_tables_for_db_based_muting.py", "copies": "1", "size": "1386", "license": "mit", "hash": 2105802998077855000, "line_mean": 32.8048780488, "line_max": 117, "alpha_frac": 0.6803751804, "autogene...
"""Add tables for editing revisions Revision ID: 4e459d27adab Revises: 39a25a873063 Create Date: 2019-11-08 17:13:48.096553 """ import sqlalchemy as sa from alembic import op from indico.core.db.sqlalchemy import PyIntEnum, UTCDateTime from indico.modules.events.editing.models.editable import EditableType from indic...
{ "repo_name": "ThiefMaster/indico", "path": "indico/migrations/versions/20191108_1713_4e459d27adab_add_tables_for_editing_revisions.py", "copies": "5", "size": "5709", "license": "mit", "hash": -2467987270037762600, "line_mean": 45.7950819672, "line_max": 109, "alpha_frac": 0.6445962515, "autogener...
"""Add tables for tournaments feature Revision ID: d172bd5e57c1 Revises: 6ef8ada19388 Create Date: 2018-12-31 11:54:48.926336 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd172bd5e57c1' down_revision = '6ef8ada19388' branch_labels = None depends_on = None ...
{ "repo_name": "mitpokerbots/scrimmage", "path": "migrations/versions/d172bd5e57c1_.py", "copies": "1", "size": "2628", "license": "mit", "hash": 1789128056203565300, "line_mean": 38.8181818182, "line_max": 125, "alpha_frac": 0.6601978691, "autogenerated": false, "ratio": 3.3435114503816794, "co...
"""Add TagAlias table Revision ID: 9a0f78ff57d6 Revises: d19881f4c045 Create Date: 2017-03-19 15:34:30.271997 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '9a0f78ff57d6' down_revision = 'd19881f4c045' branch_labels = None depends_on = None def upgrade(): ...
{ "repo_name": "MJB47/Jokusoramame", "path": "migrations/versions/9a0f78ff57d6_add_tagalias_table.py", "copies": "1", "size": "1126", "license": "mit", "hash": -1439656927559262200, "line_mean": 27.8717948718, "line_max": 65, "alpha_frac": 0.6571936057, "autogenerated": false, "ratio": 3.292397660...
"""add tags Revision ID: 42f99b73b077 Revises: e59c406395d2 Create Date: 2017-02-02 16:08:12.273221 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '42f99b73b077' down_revision = 'e59c406395d2' branch_labels = None depends_on = None def upgrade(): # ### c...
{ "repo_name": "rjw57/bitsbox", "path": "migrations/versions/42f99b73b077_add_tags.py", "copies": "1", "size": "1305", "license": "mit", "hash": 6466967251034658000, "line_mean": 29.3488372093, "line_max": 96, "alpha_frac": 0.6697318008, "autogenerated": false, "ratio": 3.4523809523809526, "conf...
"""Add tag table. Revision ID: c877a04b8181 Revises: 62b3c37ee7e3 Create Date: 2017-02-05 10:52:10.408159 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'c877a04b8181' down_revision = '62b3c37ee7e3' branch_labels = None depends_on = None def upgrade(): #...
{ "repo_name": "MJB47/Jokusoramame", "path": "migrations/versions/c877a04b8181_add_tag_table.py", "copies": "1", "size": "1297", "license": "mit", "hash": 8854994785933981000, "line_mean": 29.880952381, "line_max": 71, "alpha_frac": 0.6522744796, "autogenerated": false, "ratio": 3.2344139650872816...
"""Add taken_from_default field Revision ID: 2f1bb61ffea Revises: e220a74734b Create Date: 2015-04-10 17:45:16.727882 """ # revision identifiers, used by Alembic. revision = '2f1bb61ffea' down_revision = 'e220a74734b' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by...
{ "repo_name": "porduna/appcomposer", "path": "alembic/versions/2f1bb61ffea_add_taken_from_default_field.py", "copies": "3", "size": "1613", "license": "bsd-2-clause", "hash": 8463240115839776000, "line_mean": 46.4411764706, "line_max": 144, "alpha_frac": 0.7557346559, "autogenerated": false, "rat...
"""Add talk schedule. Revision ID: 37c84eaa437 Revises: 3bda3a710eb Create Date: 2014-08-01 21:26:10.030252 """ # revision identifiers, used by Alembic. revision = '37c84eaa437' down_revision = '3bda3a710eb' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic -...
{ "repo_name": "pathunstrom/pygotham", "path": "migrations/versions/37c84eaa437_.py", "copies": "3", "size": "2407", "license": "bsd-3-clause", "hash": -9152513036722094000, "line_mean": 33.3857142857, "line_max": 112, "alpha_frac": 0.6393851267, "autogenerated": false, "ratio": 3.3997175141242937...
"""Add TAS history fields Revision ID: 4dc597500734 Revises: 885280875a1c Create Date: 2016-10-26 19:37:17.347049 """ # revision identifiers, used by Alembic. revision = '4dc597500734' down_revision = '885280875a1c' branch_labels = None depends_on = None from datetime import date from alembic import op import sqla...
{ "repo_name": "fedspendingtransparency/data-act-broker-backend", "path": "dataactcore/migrations/versions/4dc597500734_add_tas_history_fields.py", "copies": "1", "size": "3956", "license": "cc0-1.0", "hash": 6322696670969928000, "line_mean": 35.2935779817, "line_max": 79, "alpha_frac": 0.6519211325, ...
"""Add tas_id field to staging models Revision ID: 6f79cf30f2d7 Revises: 807a203713a4 Create Date: 2016-11-11 17:20:25.108568 """ # revision identifiers, used by Alembic. revision = '6f79cf30f2d7' down_revision = '807a203713a4' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa ...
{ "repo_name": "fedspendingtransparency/data-act-broker-backend", "path": "dataactcore/migrations/versions/6f79cf30f2d7_add_tas_id_field_to_staging_models.py", "copies": "1", "size": "3359", "license": "cc0-1.0", "hash": -5738765124236972000, "line_mean": 38.9880952381, "line_max": 106, "alpha_frac": ...
"""add_tas_indices Revision ID: a118bf9e4970 Revises: c0a714ade734 Create Date: 2016-04-26 22:16:33.624860 """ # revision identifiers, used by Alembic. revision = 'a118bf9e4970' down_revision = '17a20023b474' branch_labels = None depends_on = None from alembic import op from dataactvalidator.models.validationModels...
{ "repo_name": "fedspendingtransparency/data-act-validator", "path": "dataactvalidator/migrations/versions/a118bf9e4970_add_tas_indices.py", "copies": "1", "size": "2903", "license": "cc0-1.0", "hash": 2034314512358422500, "line_mean": 48.2033898305, "line_max": 141, "alpha_frac": 0.7192559421, "aut...
"""Add Task Revision ID: 26dbd6ff063c Revises: 26c0affcb18a Create Date: 2014-01-09 17:03:39.051795 """ # revision identifiers, used by Alembic. revision = '26dbd6ff063c' down_revision = '26c0affcb18a' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table( 'task', sa.Co...
{ "repo_name": "dropbox/changes", "path": "migrations/versions/26dbd6ff063c_add_task.py", "copies": "4", "size": "1320", "license": "apache-2.0", "hash": 5049492221648061000, "line_mean": 32, "line_max": 89, "alpha_frac": 0.6356060606, "autogenerated": false, "ratio": 3.235294117647059, "config_...
"""Add task parent to retain history after split Revision ID: 5002e75c0604 Revises: 33e34b3beaa3 Create Date: 2016-05-10 22:37:31.383527 """ # revision identifiers, used by Alembic. revision = '5002e75c0604' down_revision = '33e34b3beaa3' from alembic import op import sqlalchemy as sa def upgrade(): op.add_co...
{ "repo_name": "ethan-nelson/osm-tasking-manager2", "path": "alembic/versions/5002e75c0604_add_task_parent_to_retain_history_after_.py", "copies": "3", "size": "2253", "license": "bsd-2-clause", "hash": 1174307928787483400, "line_mean": 31.1857142857, "line_max": 78, "alpha_frac": 0.5335108744, "aut...
"""Add tasks and task_items Revision ID: ee6d6ae007c1 Revises: Create Date: 2016-01-31 11:45:51.000634 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'ee6d6ae007c1' down_revision = None branch_labels = None depends_on = None def upgrade(): ### commands...
{ "repo_name": "jaypipes/enamel", "path": "enamel/db/migrations/versions/ee6d6ae007c1_add_tasks_and_task_items.py", "copies": "1", "size": "1872", "license": "apache-2.0", "hash": -6540133832905861000, "line_mean": 32.4285714286, "line_max": 67, "alpha_frac": 0.6655982906, "autogenerated": false, ...
"""Add tasks Revision ID: 305a51819d48 Revises: ae8f4b63876a Create Date: 2019-05-24 09:38:15.831712 """ from alembic import op import sqlalchemy as sa import pycroft from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '305a51819d48' down_revision = 'ae8f4b63876a' branch_la...
{ "repo_name": "lukasjuhrich/pycroft", "path": "pycroft/model/alembic/versions/305a51819d48_add_tasks.py", "copies": "2", "size": "2959", "license": "apache-2.0", "hash": -9179180080334842000, "line_mean": 37.9342105263, "line_max": 99, "alpha_frac": 0.656978709, "autogenerated": false, "ratio": 3...
"""Add tasks Revision ID: 58973c4a356 Revises: 25b6970745c Create Date: 2014-04-18 14:28:49.641451 """ # revision identifiers, used by Alembic. revision = '58973c4a356' down_revision = '25b6970745c' from alembic import op import sqlalchemy as sa status = sa.Enum('open', 'completed', 'closed', name='status') def...
{ "repo_name": "xuhcc/airy", "path": "alembic/versions/20140418_1428_add_tasks.py", "copies": "1", "size": "1144", "license": "mit", "hash": -2348861425984552000, "line_mean": 27.6, "line_max": 69, "alpha_frac": 0.6695804196, "autogenerated": false, "ratio": 3.4354354354354353, "config_test": fa...
"""add tasks table Revision ID: b764aaedf10d Revises: Create Date: 2017-10-29 14:56:07.313468 """ # pylint: skip-file from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'b764aaedf10d' down_revision = None branch_labels = None depends_on = None def upgrade(): #...
{ "repo_name": "kokimoribe/todo-api", "path": "alembic/versions/b764aaedf10d_add_tasks_table.py", "copies": "1", "size": "1084", "license": "mit", "hash": 8846923853504026000, "line_mean": 27.5263157895, "line_max": 105, "alpha_frac": 0.6688191882, "autogenerated": false, "ratio": 3.43037974683544...
"""Add team join requests table Revision ID: fb00f6d8fded Revises: e7c5d6a3fd01 Create Date: 2018-12-27 23:37:54.871284 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'fb00f6d8fded' down_revision = 'e7c5d6a3fd01' branch_labels = None depends_on = None def up...
{ "repo_name": "mitpokerbots/scrimmage", "path": "migrations/versions/fb00f6d8fded_.py", "copies": "1", "size": "1072", "license": "mit", "hash": 7024949260723837000, "line_mean": 28.7777777778, "line_max": 98, "alpha_frac": 0.677238806, "autogenerated": false, "ratio": 3.2, "config_test": false...
"""Add teams table Revision ID: 2d8b17e13d1 Revises: 27e81ea4d86 Create Date: 2014-02-27 02:00:25.694782 """ from alembic import context from alembic.op import (create_index, create_table, drop_index, drop_table, execute) from sqlalchemy.schema import Column, PrimaryKeyConstraint from sqlalche...
{ "repo_name": "clicheio/cliche", "path": "cliche/migrations/versions/2d8b17e13d1_add_teams_table.py", "copies": "2", "size": "1103", "license": "mit", "hash": -2744772270316862000, "line_mean": 27.2820512821, "line_max": 70, "alpha_frac": 0.6718041704, "autogenerated": false, "ratio": 3.404320987...
"""Add templates Revision ID: 2b0edcfa57b4 Revises: 24be36b8c67 Create Date: 2015-11-24 17:50:13.280722 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2b0edcfa57b4' down_revision = '24be36b8c67' DEFAULT_LABELS = ( (u'Green', u'#22C328'), (u'Red', u...
{ "repo_name": "Net-ng/kansha", "path": "kansha/alembic/versions/2b0edcfa57b4_add_templates.py", "copies": "2", "size": "3345", "license": "bsd-3-clause", "hash": -904022361724453400, "line_mean": 29.9722222222, "line_max": 87, "alpha_frac": 0.5662182362, "autogenerated": false, "ratio": 3.4307692...
"""Add the Area model Revision ID: 54db49335a2 Revises: 2367ebea90d Create Date: 2014-04-20 13:43:33.248879 """ # revision identifiers, used by Alembic. revision = '54db49335a2' down_revision = '2367ebea90d' from datetime import datetime from alembic import op import sqlalchemy as sa def upgrade(): connecti...
{ "repo_name": "d0ugal-archive/home", "path": "home/migrations/versions/54db49335a2_area_model.py", "copies": "1", "size": "3139", "license": "bsd-3-clause", "hash": 5091012766178737000, "line_mean": 31.0306122449, "line_max": 79, "alpha_frac": 0.602739726, "autogenerated": false, "ratio": 3.60390...
"""Add the FA (Frequency of Allelle) field to a VCF file. This field is derived from other existing information in the VCF file. Supports SomaticSniper, VarScan, Mutect, Strelka VCFs. """ import os import sys import vcf FA_FORMAT = vcf.parser._Format('FA', 1, 'Float', 'Frequency of ALT alleles.') def deriver_f...
{ "repo_name": "danvk/concordance", "path": "derive_frequency_of_alleles.py", "copies": "2", "size": "4294", "license": "apache-2.0", "hash": 2736221140092211000, "line_mean": 33.0793650794, "line_max": 80, "alpha_frac": 0.6318118305, "autogenerated": false, "ratio": 3.4160700079554496, "config_...
# add the following to operations in migrations # from . import initialize_settings # migrations.RunPython(initialize_settings), def initialize_settings(apps, schema_editor): SettingsCategory = apps.get_model('tethys_compute', 'SettingsCategory') Setting = apps.get_model('tethys_compute', 'Setting') cat...
{ "repo_name": "tethysplatform/tethys", "path": "tethys_compute/migrations/__init__.py", "copies": "2", "size": "1271", "license": "bsd-2-clause", "hash": -7992456151575249000, "line_mean": 36.3823529412, "line_max": 109, "alpha_frac": 0.6931549961, "autogenerated": false, "ratio": 4.0607028753993...
# Add the framework to the Python path import sys, os PHDCODE_ROOT = os.environ['PHDCODE_ROOT'] sys.path.append("%s/python"%PHDCODE_ROOT) #sys.path.append(os.getcwd()+"/..") from framework.Window import Rect, Kaiser, Trig from framework.Coordinate import Coordinate import framework.mynumpy as np from framework.mynump...
{ "repo_name": "jpaasen/cos", "path": "framework/beamformer/capon/tests/run_getCaponC.py", "copies": "1", "size": "1790", "license": "mit", "hash": 7126535966782791000, "line_mean": 23.5205479452, "line_max": 99, "alpha_frac": 0.5938547486, "autogenerated": false, "ratio": 2.9392446633825946, "c...
"""Add the generic fixed and derived content to a Classic Pygame document""" from ext.utils import (Visitor, _unicode, as_unicode, get_name, GetError, get_refid, as_refid, as_refuri) from ext.indexer import get_descinfo, get_descinfo_refid from sphinx.addnodes import (desc, desc_signature, desc...
{ "repo_name": "gmittal/aar-nlp-research-2016", "path": "src/pygame-pygame-6625feb3fc7f/docs/reST/ext/boilerplate.py", "copies": "2", "size": "9078", "license": "mit", "hash": 7836685349493744000, "line_mean": 33.6488549618, "line_max": 80, "alpha_frac": 0.6051993831, "autogenerated": false, "rati...
"""Add the high level classes (person/organization/etc.) to a label file.""" import argparse import pickle from tqdm import tqdm def read_arguments(): parser = argparse.ArgumentParser() parser.add_argument('--labels_file', type=unicode, help='Pickled file with...
{ "repo_name": "MIREL-UNC/mirel-scripts", "path": "preprocess/22_add_high_level_classes.py", "copies": "1", "size": "1652", "license": "bsd-3-clause", "hash": -9118652511027232000, "line_mean": 29.5925925926, "line_max": 77, "alpha_frac": 0.5853510896, "autogenerated": false, "ratio": 4.0391198044...
#add the number of degrees of freedom to the master table import pandas as pd import numpy as np def reformat_wisp_grism_id(grism_id): if grism_id.endswith('.ascii'): return grism_id.split('ASCII/')[-1].split('.1D.ascii')[0].lower() if grism_id.endswith('.dat'): return grism_id.split('lsp_wi...
{ "repo_name": "caganze/wisps", "path": "wisps/data_analysis/combinedmasters.py", "copies": "1", "size": "1135", "license": "mit", "hash": -9135919993684822000, "line_mean": 36.8333333333, "line_max": 118, "alpha_frac": 0.7074889868, "autogenerated": false, "ratio": 2.5795454545454546, "config_t...
'''Add the parent directory ../ to one of the bash settings files. ''' import os import sys print print "To skip checks use python install_linux.py --noCheck" print if (len(sys.argv) <= 1) or (sys.argv[1].lower()[-7:] != "nocheck"): print "Checking python version..", ver = sys.version_info if (ver < (2, ...
{ "repo_name": "bxlab/HiFive_Paper", "path": "Scripts/HiCLib/mirnylab-hiclib-460c3fbc0f72/install_linux.py", "copies": "1", "size": "2684", "license": "bsd-3-clause", "hash": -3047979890187070000, "line_mean": 27.8602150538, "line_max": 78, "alpha_frac": 0.5897913562, "autogenerated": false, "rati...
"""Add the PreferredCloud table. Revision ID: 588687c6ba4a Revises: f83b7adaf523 Create Date: 2017-03-20 16:39:04.282582 """ # revision identifiers, used by Alembic. revision = '588687c6ba4a' down_revision = 'f83b7adaf523' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column('prospect...
{ "repo_name": "giubil/trackit", "path": "api/files/api/migrations/versions/588687c6ba4a_add_the_preferredcloud_table.py", "copies": "1", "size": "1069", "license": "apache-2.0", "hash": 905030342211245800, "line_mean": 25.0731707317, "line_max": 67, "alpha_frac": 0.6304957905, "autogenerated": fals...
"""Add the Prospect table. Revision ID: f83b7adaf523 Revises: b6533e0a4e58 Create Date: 2017-03-20 02:19:21.162055 """ # revision identifiers, used by Alembic. revision = 'f83b7adaf523' down_revision = 'b6533e0a4e58' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table('prospect', ...
{ "repo_name": "giubil/trackit", "path": "api/files/api/migrations/versions/f83b7adaf523_add_the_prospect_table.py", "copies": "1", "size": "1410", "license": "apache-2.0", "hash": 7419736244529061000, "line_mean": 31.7906976744, "line_max": 68, "alpha_frac": 0.6127659574, "autogenerated": false, ...
"""Add the Suspendable class to classes that can be run/suspended/etc.""" from skytap.framework.ApiClient import ApiClient from skytap.framework.Config import Config import time class Suspendable(object): """Add the change_state() functionality to the class. This includes supporting functions, like run() an...
{ "repo_name": "FulcrumIT/skytap", "path": "skytap/framework/Suspendable.py", "copies": "2", "size": "2004", "license": "mit", "hash": -5692585542914066000, "line_mean": 28.4705882353, "line_max": 73, "alpha_frac": 0.5778443114, "autogenerated": false, "ratio": 4.064908722109534, "config_test": ...
"""add the sympc library into syft.""" # stdlib import functools from typing import Any as TypeAny from typing import List as TypeList from typing import Tuple as TypeTuple # syft relative from . import rst_share # noqa: 401 from . import session # noqa: 401 from . import share # noqa: 401 from ...ast import add_c...
{ "repo_name": "OpenMined/PySyft", "path": "packages/syft/src/syft/lib/sympc/__init__.py", "copies": "1", "size": "1652", "license": "apache-2.0", "hash": -6771090860509017000, "line_mean": 24.8125, "line_max": 88, "alpha_frac": 0.6700968523, "autogenerated": false, "ratio": 3.3921971252566734, ...
'''Add the taxonomy id to the phage genomes. NOTE: WE USE THE TAXONOMY OF THE HOST NOT THE TAXONOMY OF THE PHAGE!! ''' import os import sys import re sys.path.append('/home3/redwards/bioinformatics/phage_host') sys.path.append('/home3/redwards/bioinformatics/Modules') from phage import Phage import taxon manual =...
{ "repo_name": "linsalrob/PhageHosts", "path": "code/phage2taxonomy.py", "copies": "1", "size": "1625", "license": "mit", "hash": 9172165253883369000, "line_mean": 39.625, "line_max": 627, "alpha_frac": 0.6713846154, "autogenerated": false, "ratio": 2.5958466453674123, "config_test": false, "h...
'''Add the taxonomy id to the refseq list of complete genomes using gi2taxid''' import os import sys import re # start by reading the gi2taxid file # t={} ## add a couple that we don't have for some weird reason t['284800255']='653938' t['397678256']='1198627' with open('/home/db/taxonomy/gi_taxid_nucl.dmp', 'r') as...
{ "repo_name": "linsalrob/PhageHosts", "path": "code/refseq2taxonomy.py", "copies": "1", "size": "1077", "license": "mit", "hash": 5054020640893986000, "line_mean": 28.9166666667, "line_max": 102, "alpha_frac": 0.5357474466, "autogenerated": false, "ratio": 3.11271676300578, "config_test": false...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from graphics import canvas from graphics.context import * from nodebox.sound import PD from math import sqrt # SCREECHING AUDIO SNAILS! pd = PD("04-audiosnails.pd", start=True) cl...
{ "repo_name": "pepsipepsi/nodebox_opengl_python3", "path": "examples/11_sound/04-audiosnails.py", "copies": "1", "size": "4221", "license": "bsd-3-clause", "hash": 7102225759970099000, "line_mean": 33.325203252, "line_max": 94, "alpha_frac": 0.5548448235, "autogenerated": false, "ratio": 3.15, ...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * from math import sin, cos # The Peter De Jong attractor feeds its previous value back into the equation, # creating a scatter of points that generates ...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/06-math/01-attractor.py", "copies": "1", "size": "2121", "license": "bsd-3-clause", "hash": 6678192985678305000, "line_mean": 38.2962962963, "line_max": 86, "alpha_frac": 0.6553512494, "autogenerated": false, "ratio": 3.356012658227848, ...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * from nodebox.graphics.geometry import coordinates from nodebox.gui import Slider # The nodebox.gui module provides simple visual controls, such as Slid...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/10-gui/01-slider.py", "copies": "1", "size": "2841", "license": "bsd-3-clause", "hash": -7903801810137005000, "line_mean": 35.9090909091, "line_max": 101, "alpha_frac": 0.6290038719, "autogenerated": false, "ratio": 3.4023952095808383, "...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * from nodebox.graphics.geometry import distance, angle, smoothstep # Circle-packing algorithm. # This script was used to produce one of the panels in N...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/08-physics/06-pack.py", "copies": "1", "size": "4759", "license": "bsd-3-clause", "hash": 1219613552611126800, "line_mean": 32.7588652482, "line_max": 79, "alpha_frac": 0.5492750578, "autogenerated": false, "ratio": 3.538289962825279, "c...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * from nodebox.graphics.geometry import distance from math import sqrt def spider(string, x=0, y=0, radius=25, **kwargs): """ A path filter that crea...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/05-path/05-spider.py", "copies": "1", "size": "1914", "license": "bsd-3-clause", "hash": 2210128838138338000, "line_mean": 33.1964285714, "line_max": 90, "alpha_frac": 0.605015674, "autogenerated": false, "ratio": 3.357894736842105, "con...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * from nodebox.graphics.physics import Node, Edge, Graph # Create a graph with randomly connected nodes. # Nodes and edges can be styled with fill, strok...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/08-physics/07-graph.py", "copies": "1", "size": "2426", "license": "bsd-3-clause", "hash": -5312598994929545000, "line_mean": 33.6571428571, "line_max": 93, "alpha_frac": 0.6619950536, "autogenerated": false, "ratio": 3.485632183908046, ...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * from nodebox.gui import * # A panel is a container for other GUI controls. # Controls can be added to the panel, # and organized by setting the contro...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/10-gui/02-panel.py", "copies": "1", "size": "2400", "license": "bsd-3-clause", "hash": -3164780760776602600, "line_mean": 39, "line_max": 88, "alpha_frac": 0.7045833333, "autogenerated": false, "ratio": 3.513909224011713, "config_test": ...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * from nodebox.gui import * # Comparison between Rows and Row containers. # Both are subclasses of Layout. # Panel 1 # Controls in a Rows layout are dra...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/10-gui/05-layout.py", "copies": "1", "size": "3250", "license": "bsd-3-clause", "hash": 4331188869238414300, "line_mean": 34.7252747253, "line_max": 105, "alpha_frac": 0.684, "autogenerated": false, "ratio": 3.306205493387589, "config_te...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * from nodebox.gui import * # This example demonstrates the knob GUI control, # and how different layout managers can be nested. # Knobs look nice when ...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/10-gui/04-knob.py", "copies": "1", "size": "1541", "license": "bsd-3-clause", "hash": -4121507587520003600, "line_mean": 38.5384615385, "line_max": 89, "alpha_frac": 0.6391953277, "autogenerated": false, "ratio": 3.113131313131313, "conf...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * from nodebox.sound import PD, LOCALHOST, IN, OUT # This script demonstrates how to simultaneously receive from and send to Pd. # We need two communicat...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/11-sound/02-in-out.py", "copies": "1", "size": "1757", "license": "bsd-3-clause", "hash": -6618606633107007000, "line_mean": 40.8333333333, "line_max": 93, "alpha_frac": 0.6994877632, "autogenerated": false, "ratio": 3.479207920792079, "...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * from nodebox.sound import PD from math import sin, pow # An evolutionary melody. # The audio tones are generated in Pd, based on data se...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/11-sound/03-sequencer.py", "copies": "1", "size": "2925", "license": "bsd-3-clause", "hash": -719127453835114200, "line_mean": 29.46875, "line_max": 93, "alpha_frac": 0.5483760684, "autogenerated": false, "ratio": 3.3466819221967965, "co...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * from nodebox.sound import PD from math import sqrt # SCREECHING AUDIO SNAILS! pd = PD("04-audiosnails.pd", start=True) class Snail: def __init__(s...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/11-sound/04-audiosnails.py", "copies": "1", "size": "4192", "license": "bsd-3-clause", "hash": -2296029725655640600, "line_mean": 33.652892562, "line_max": 94, "alpha_frac": 0.5529580153, "autogenerated": false, "ratio": 3.1400749063670412...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys;sys.path.insert(0,os.path.join("..","..")) from nodebox.graphics import * # A classic NodeBox example (http://nodebox.net/code/index.php/Dendrite). # It registers the dragged mouse movements, # and use those to draw wavering li...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/05-path/08-drag.py", "copies": "1", "size": "1342", "license": "bsd-3-clause", "hash": -35289786868177628, "line_mean": 28.8222222222, "line_max": 82, "alpha_frac": 0.5760059613, "autogenerated": false, "ratio": 3.233734939759036, "confi...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # Blend modes are used to combine the pixels of two images, # in different ways than standard transparency. # NodeBox supports the most common blend mo...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/07-filter/07-blend.py", "copies": "1", "size": "1356", "license": "bsd-3-clause", "hash": -3006431536299593000, "line_mean": 33.7948717949, "line_max": 81, "alpha_frac": 0.6356932153, "autogenerated": false, "ratio": 3.625668449197861, "...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # Create a pixels array from a solid white image: p = Pixels(solid(200, 200, Color(1))) # Colorize pixels with the Perlin noise() generator. # Noise i...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/03-image/06-noise.py", "copies": "1", "size": "1265", "license": "bsd-3-clause", "hash": -2205823928708194000, "line_mean": 34.1666666667, "line_max": 84, "alpha_frac": 0.6561264822, "autogenerated": false, "ratio": 3.2025316455696204, "...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * def draw(canvas): canvas.clear() # The origin point of the canvas is in the bottom-left corner. # That means if you draw a shape or image at ...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/02-transform/01-spiral.py", "copies": "1", "size": "2132", "license": "bsd-3-clause", "hash": -936883485981374300, "line_mean": 39.2452830189, "line_max": 82, "alpha_frac": 0.6791744841, "autogenerated": false, "ratio": 3.5952782462057336,...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # Here is the "Hypnoval", a classic example in NodeBox for Mac OS X. # It uses the canvas.frame counter to create variation in each frame. # Math funct...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/01-basics/03-frame.py", "copies": "1", "size": "1477", "license": "bsd-3-clause", "hash": -8309321825558048000, "line_mean": 35.0487804878, "line_max": 79, "alpha_frac": 0.6255924171, "autogenerated": false, "ratio": 3.3042505592841165, ...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # Here, the leaf shape from the previous example is reused, # but instead of simply coloring it with blue, we give it a nice gradient touch. # Such eff...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/05-path/02-clip.py", "copies": "1", "size": "1452", "license": "bsd-3-clause", "hash": -58729120294070264, "line_mean": 34.4390243902, "line_max": 84, "alpha_frac": 0.6391184573, "autogenerated": false, "ratio": 3.3767441860465115, "conf...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # I always seem to forget how Bezier handles work. # This example clarifies which handles control what part of a curve. fontsize(9) p = BezierPath() ...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/05-path/06-handle.py", "copies": "1", "size": "2246", "license": "bsd-3-clause", "hash": 7587093463439322000, "line_mean": 36.45, "line_max": 90, "alpha_frac": 0.6046304541, "autogenerated": false, "ratio": 2.8287153652392947, "config_te...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * img = Image("creature.png") def draw(canvas): canvas.clear() # The mouse position controls the origin of the bulge. # The bump()...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/07-filter/02-bump.py", "copies": "1", "size": "1150", "license": "bsd-3-clause", "hash": 107658974857532220, "line_mean": 36.1290322581, "line_max": 88, "alpha_frac": 0.6747826087, "autogenerated": false, "ratio": 3.44311377245509, "conf...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * img = Image("dendrite.png") def draw(canvas): #canvas.clear() dx = canvas.mouse.x / float(img.width) dy = canvas.mouse.y / float...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/07-filter/03-mirror.py", "copies": "1", "size": "1281", "license": "bsd-3-clause", "hash": -879127145784670800, "line_mean": 37.8484848485, "line_max": 84, "alpha_frac": 0.6916471507, "autogenerated": false, "ratio": 3.558333333333333, "...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # In the classic NodeBox for Mac OS X, text can easily be drawn with text(), font(), fontsize(). # This is possible here as well, but it is much faster...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/04-text/01-text.py", "copies": "1", "size": "1141", "license": "bsd-3-clause", "hash": 5582692659188318000, "line_mean": 35.8387096774, "line_max": 96, "alpha_frac": 0.6809815951, "autogenerated": false, "ratio": 3.316860465116279, "conf...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # In the previous examples, drawing occurs directly to the canvas. # It is also possible to draw into different layers, # and then transform / animate...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/09-layer/01-drag.py", "copies": "1", "size": "3985", "license": "bsd-3-clause", "hash": -2934523947392542700, "line_mean": 42.8021978022, "line_max": 96, "alpha_frac": 0.6951066499, "autogenerated": false, "ratio": 3.2852431986809565, "c...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # Load an image from file. # For performance, it's a good idea to create images once, outside the draw() loop. # NodeBox can then keep the image in gra...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/07-filter/01-shadow.py", "copies": "1", "size": "1599", "license": "bsd-3-clause", "hash": 5387247098388848000, "line_mean": 39, "line_max": 83, "alpha_frac": 0.6966854284, "autogenerated": false, "ratio": 3.468546637744035, "config_test...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # On Mac OS X, you can access the built-in iSight camera with PySight + CocoaSequenceGrabber: # http://livingcode.blogspot.com/2005/10/pysight-preview....
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/12-experimental/01-isight.py", "copies": "1", "size": "2909", "license": "bsd-3-clause", "hash": 9108895284115746000, "line_mean": 34.4756097561, "line_max": 97, "alpha_frac": 0.6545204538, "autogenerated": false, "ratio": 3.76813471502590...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # Render a radial gradient image. # Without additional parameters, the gradient will be grayscale. g = gradient(350, 350, type=RADIAL) # The mask() fi...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/07-filter/06-mask.py", "copies": "1", "size": "1662", "license": "bsd-3-clause", "hash": -5468296554032949000, "line_mean": 39.5609756098, "line_max": 77, "alpha_frac": 0.7087845969, "autogenerated": false, "ratio": 3.4842767295597485, "...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # Since a layer is a rectangular area, all mouse events are also triggered in a rectangle. # This can be a bit clumsy in some situations. # For exampl...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/09-layer/02-polygon.py", "copies": "1", "size": "3275", "license": "bsd-3-clause", "hash": -6371288152049203000, "line_mean": 43.2567567568, "line_max": 108, "alpha_frac": 0.6708396947, "autogenerated": false, "ratio": 3.683914510686164, ...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # The classic NodeBox for Mac OS X has an interesting textpath() function # that transforms a string into a BezierPath. # This function is partly emula...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/05-path/04-text.py", "copies": "1", "size": "1347", "license": "bsd-3-clause", "hash": -1578689283018302200, "line_mean": 38.6176470588, "line_max": 86, "alpha_frac": 0.6822568671, "autogenerated": false, "ratio": 3.2773722627737225, "co...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # The pixels() command yields a list of pixels from a given image. # Since this is a relatively slow operation, this is not useful for dynamic image pr...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/03-image/05-pixels.py", "copies": "1", "size": "1473", "license": "bsd-3-clause", "hash": -1826066293080442600, "line_mean": 36.7948717949, "line_max": 93, "alpha_frac": 0.6585200272, "autogenerated": false, "ratio": 3.251655629139073, "...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0,os.path.join("..","..")) from nodebox.graphics import * # This example demonstrated how to fit text to a path using the directed() command # (thanks to Karsten Wolf). # Create a Text object for each characte...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/05-path/07-fit.py", "copies": "1", "size": "1314", "license": "bsd-3-clause", "hash": 8453447022636691000, "line_mean": 31.85, "line_max": 82, "alpha_frac": 0.6476407915, "autogenerated": false, "ratio": 3.166265060240964, "config_test":...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # This example demonstrates motion tweening and prototype-based inheritance on layers. # Motion tweening is easy: set the Layer.duration parameter to ...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/09-layer/03-tween.py", "copies": "1", "size": "1822", "license": "bsd-3-clause", "hash": -4550082474101461000, "line_mean": 43.4390243902, "line_max": 93, "alpha_frac": 0.7338090011, "autogenerated": false, "ratio": 3.622266401590457, "c...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # This example will make more sense after you've seen the examples in /07-filter # NodeBox for OpenGL has a range of commands for filtering images. # ...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/03-image/03-filter.py", "copies": "1", "size": "1607", "license": "bsd-3-clause", "hash": -2937284567926820400, "line_mean": 43.6666666667, "line_max": 96, "alpha_frac": 0.6988176727, "autogenerated": false, "ratio": 3.6275395033860045, ...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..", "..")) import tempfile import subprocess import shutil class MovieEncoderError(Exception): pass class Movie: def __init__(self, canvas, fps=25, compression=0.0, encoder="ffmp...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/12-experimental/03-movie.py", "copies": "1", "size": "2786", "license": "bsd-3-clause", "hash": 3458786935561629700, "line_mean": 34.2658227848, "line_max": 97, "alpha_frac": 0.5951184494, "autogenerated": false, "ratio": 3.806010928961748...
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) # Import the drawing commands from the NodeBox module. from nodebox.graphics import * # This includes: # - drawing primitives such as line(), rect(), ellipse(), triangle(), # - color ...
{ "repo_name": "nodebox/nodebox-opengl", "path": "examples/01-basics/01-rect.py", "copies": "1", "size": "1920", "license": "bsd-3-clause", "hash": -9124606935647946000, "line_mean": 52.3611111111, "line_max": 94, "alpha_frac": 0.7135416667, "autogenerated": false, "ratio": 3.983402489626556, "c...
"""Add the user model Revision ID: 490c5b501a3 Revises: 1e665b27760 Create Date: 2014-04-25 08:38:29.594656 """ # revision identifiers, used by Alembic. revision = '490c5b501a3' down_revision = '1e665b27760' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table( 'users', ...
{ "repo_name": "d0ugal-archive/home", "path": "home/migrations/versions/490c5b501a3_add_user_model.py", "copies": "1", "size": "1164", "license": "bsd-3-clause", "hash": 2743272711886673400, "line_mean": 29.6315789474, "line_max": 76, "alpha_frac": 0.6520618557, "autogenerated": false, "ratio": 3....
"""Add things to old Pythons so I can pretend they are newer, for tests.""" # pylint: disable=W0622 # (Redefining built-in blah) # The whole point of this file is to redefine built-ins, so shut up about it. import os # Py2 and Py3 don't agree on how to run commands in a subprocess. try: import subprocess except ...
{ "repo_name": "public/testmon", "path": "test/coveragepy/backtest.py", "copies": "2", "size": "1484", "license": "mit", "hash": 274933852195437900, "line_mean": 29.2857142857, "line_max": 77, "alpha_frac": 0.6273584906, "autogenerated": false, "ratio": 4.1568627450980395, "config_test": false, ...
"""Add things to old Pythons so I can pretend they are newer.""" # This file does lots of tricky stuff, so disable a bunch of lintisms. # pylint: disable=F0401,W0611,W0622 # F0401: Unable to import blah # W0611: Unused import blah # W0622: Redefining built-in blah import os, re, sys # Python 2.3 doesn't have `set` t...
{ "repo_name": "kevinkindom/chrome_depto_tools", "path": "third_party/coverage/backward.py", "copies": "211", "size": "5187", "license": "bsd-3-clause", "hash": 616322560945286100, "line_mean": 27.1902173913, "line_max": 78, "alpha_frac": 0.6070946597, "autogenerated": false, "ratio": 3.7833698030...
"""Add things to old Pythons so I can pretend they are newer.""" # This file does lots of tricky stuff, so disable a bunch of lintisms. # pylint: disable-msg=F0401,W0611,W0622 # F0401: Unable to import blah # W0611: Unused import blah # W0622: Redefining built-in blah import os, sys # Python 2.3 doesn't have `set` t...
{ "repo_name": "mastizada/kuma", "path": "vendor/packages/coverage/coverage/backward.py", "copies": "6", "size": "1739", "license": "mpl-2.0", "hash": 4905223144806365000, "line_mean": 23.1527777778, "line_max": 78, "alpha_frac": 0.6722254169, "autogenerated": false, "ratio": 3.6153846153846154, ...
# Add this to crontab: 0,30 * * * * python3 /home/ubuntu/foldatlas/foldatlas/monitor.py import traceback import os import urllib.request # the lib that handles the url stuff test_url = "http://www.foldatlas.com/transcript/AT2G45180.1" recipient = "matthew.gs.norris@gmail.com" search_str = "AT2G45180.1" def run_test...
{ "repo_name": "mnori/foldatlas", "path": "foldatlas/monitor.py", "copies": "1", "size": "1075", "license": "mit", "hash": -7117426784973943000, "line_mean": 29.7142857143, "line_max": 100, "alpha_frac": 0.6251162791, "autogenerated": false, "ratio": 3.208955223880597, "config_test": false, "h...
# add this to your vimrc #let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf_openframeworks.py" # Partially stolen from https://bitbucket.org/mblum/libgp/src/2537ea7329ef/.ycm_extra_conf.py import os import ycm_core # These are the compilation flags that will be used in case there's no # compilation database ...
{ "repo_name": "James-Oldfield/dotfiles", "path": ".vim/.ycm_extra_conf_openframeworks.py", "copies": "1", "size": "9136", "license": "mit", "hash": 977578434662569200, "line_mean": 39.2511013216, "line_max": 93, "alpha_frac": 0.6500656743, "autogenerated": false, "ratio": 2.8267326732673266, "c...
"""add three-way favourite policy Revision ID: 2bd33abe291c Revises: 583cdac8eba1 Create Date: 2018-01-03 17:31:03.718648 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2bd33abe291c' down_revision = '583cdac8eba1' branch_labels = None depends_on = None trans...
{ "repo_name": "codl/forget", "path": "migrations/versions/2bd33abe291c_add_three_way_favourite_policy.py", "copies": "1", "size": "1699", "license": "isc", "hash": 7531490996357763000, "line_mean": 31.0566037736, "line_max": 94, "alpha_frac": 0.6362566215, "autogenerated": false, "ratio": 3.44624...
"""add three-way media policy Revision ID: 583cdac8eba1 Revises: 7e255d4ea34d Create Date: 2017-12-28 00:46:56.023649 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '583cdac8eba1' down_revision = '7e255d4ea34d' branch_labels = None depends_on = None transitio...
{ "repo_name": "codl/forget", "path": "migrations/versions/583cdac8eba1_add_three_way_media_policy.py", "copies": "1", "size": "1796", "license": "isc", "hash": -2178236796467829000, "line_mean": 29.4406779661, "line_max": 89, "alpha_frac": 0.6119153675, "autogenerated": false, "ratio": 3.50097465...
"""Add tickets table Revision ID: 516b5a4829e Revises: 31cde2cf5e6 Create Date: 2014-12-05 11:13:14.203925 """ # revision identifiers, used by Alembic. revision = '516b5a4829e' down_revision = '31cde2cf5e6' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
{ "repo_name": "bspavel/ccvpn", "path": "alembic/versions/516b5a4829e_add_tickets_table.py", "copies": "2", "size": "1559", "license": "mit", "hash": 1676212625879606800, "line_mean": 32.170212766, "line_max": 63, "alpha_frac": 0.6593970494, "autogenerated": false, "ratio": 3.418859649122807, "c...