commit
stringlengths
40
40
subject
stringlengths
1
1.49k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
new_contents
stringlengths
1
29.8k
old_contents
stringlengths
0
9.9k
lang
stringclasses
3 values
proba
float64
0
1
88d2ad776518d62a66fa3b8f7dd7520cff3debfc
Create bulk_parse.py
scripts/bulk_parse.py
scripts/bulk_parse.py
Python
0.000008
10d71b1208175eac4af0a20d7ee0a8176c7829ef
add new rename script to prepend to *.c files
rename/prepend.py
rename/prepend.py
import os import sys if __name__ == '__main__': if len(sys.argv) < 2: print 'usage: <path> <prepend>' sys.exit() exts=['.c'] change_count = 0 for root, dirs, files in os.walk(sys.argv[1]): for filename in files: if any(filename.lower().endswith(ext) for ext in exts): if sys...
Python
0
b20b8bc06b6141fad1fbab9befa184644821351f
add joblib02.py
trypython/extlib/joblib02.py
trypython/extlib/joblib02.py
# coding: utf-8 """ joblibモジュールについてのサンプルです。 joblib.Parallel の利用にて joblib側のログを出力する方法について。 """ import datetime import os import random import time import joblib as job from trypython.common.commoncls import SampleBase from trypython.common.commonfunc import pr, hr NOW = datetime.datetime.now RND = random.Random() CPU...
Python
0
02ad029840b2e770bc802fd7f8504498cb0f756d
Add `issubset` and `issuperset` tests
lib/ansible/plugins/test/mathstuff.py
lib/ansible/plugins/test/mathstuff.py
# (c) 2016, Ansible, Inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is di...
Python
0.000001
adede4415e36830485429f49b8476f655f3d4929
Add environment.py
tests/environment.py
tests/environment.py
# -*- coding: UTF-8 -*- import shutil from steps.common_steps.common_environment import docker_setup def before_all(context): docker_setup(context) context.build_or_pull_image(skip_pull=True, skip_build=True) def after_scenario(context, scenario): if 'KEEP_CONTAINER_AFTER_TEST' in context.config.userdat...
Python
0.000003
bf86584829f56f91b363f251d77f3157f952db0f
Add tests for masking of data based on being within a range of values
tests/test_cyprep.py
tests/test_cyprep.py
import unittest import numpy as np import yatsm._cyprep class TestCyPrep(unittest.TestCase): @classmethod def setUpClass(cls): # Test data n_band = 7 n_mask = 50 n_images = 1000 cls.data = np.random.randint( 0, 10000, size=(n_band, n_images)).astype(np.i...
Python
0
9c249d3f9d202632b7fd2241d39dfc2e180fd358
Add ledger tests
tests/test_ledger.py
tests/test_ledger.py
# -*- coding: utf-8 -*- import pytest from accounts.ledger import Ledger # Database migrations run for each test in this module. # See `conftest.pytest_runtest*`. DB_MIGRATIONS = ['0003-create-balances', '0004-create-movements'] # Fixtures ### @pytest.fixture def ledger(db): return Ledger(db.connection) # Test...
Python
0.000001
65f6b1101aba2086654f2ff0ff3e942f69d584b2
Add an application that returns spaCy similarity query
app/app.py
app/app.py
from flask import Flask, jsonify import spacy.en from numpy import dot from numpy.linalg import norm app = Flask(__name__) nlp = spacy.en.English() def cossim(a, b): return dot(a, b) / (norm(a) * norm(b)) @app.route('/') def index(): return "Hello, World!" @app.route('/spaCy/api/similarity/<word1>/<word2>'...
Python
0.000278
ddd4473f8edc4e7cfc503fc6cdbb570f33f224a4
Add Preprocessor module Edges to generate possible edges between two entities given the relation type
nala/preprocessing/edges.py
nala/preprocessing/edges.py
import abc from nala.structures.data import Edge class EdgeGenerator: """ Abstract class for generating edges between two entities. Each edge represents a possible relationship between the two entities Subclasses that inherit this class should: * Be named [Name]EdgeGenerator * Implement the abs...
Python
0.000003
fffef837502a2af438f1646aa29b0b307038fca1
Test VP working
comdet/test/test_vp.py
comdet/test/test_vp.py
from __future__ import absolute_import, print_function import sys import matplotlib.pyplot as plt import seaborn.apionly as sns import PIL import numpy as np import timeit import os import collections import comdet.biclustering as bc import comdet.test.utils as test_utils import comdet.pme.preference as pref import com...
Python
0
0377cf9cc3c2460c2936ec9153edbdb196cff5bf
Add zdt agent
zephyrus/examples/zdt/agent.py
zephyrus/examples/zdt/agent.py
import sys from itertools import islice from math import sqrt from zephyrus.agent import Agent from zephyrus.message import Message class ZDTAgent(Agent): def mainloop(self): msg = self.socket_receive.recv() action = self.perceive(msg.content) self.socket_send(str(action)) def act(se...
Python
0.000017
bc812daf7c99b34a3952d933666f240597eb835d
add a spider for Xin Shi Dai board, Ya Zhou catagory.
t66ySpider/t66ySpider/spiders/t66yXinshidaiYazhouSpider.py
t66ySpider/t66ySpider/spiders/t66yXinshidaiYazhouSpider.py
# -*- coding: utf-8 -*- import scrapy from t66ySpider.items import T66YspiderXinshidaiItem class t66yDagaierSpider(scrapy.Spider): name = 'XinShiDaiYaZhou' allowed_domains = ['t66y.com'] start_urls = ["http://t66y.com/thread0806.php?fid=8&type=1"] unicode_next_page = u'\u4e0b\u4e00\u9801' def p...
Python
0
25d8cbfd4b59166ba748d5cd42fbcd7ffe925f0e
Allow using exogenous data in hierachical models #124
tests/hierarchical/test_hierarchy_AU_AllMethods_Exogenous_all_nodes.py
tests/hierarchical/test_hierarchy_AU_AllMethods_Exogenous_all_nodes.py
import pandas as pd import numpy as np import pyaf.HierarchicalForecastEngine as hautof import pyaf.Bench.TS_datasets as tsds import datetime #get_ipython().magic('matplotlib inline') def create_exog_data(b1): # fake exog data based on date variable lDate1 = b1.mPastData['Date'] lDate2 = b1.mFutureData['...
Python
0
b135e8e473837909c6847f8a52711527409b5224
Add windows build tools
tools/build_mwpfh.py
tools/build_mwpfh.py
from __future__ import print_function import subprocess import sys import os path = os.path.split(__file__)[0] if path: os.chdir(path) environments = ['26', '27', '32', '33', '34'] target = "pypi" if "--push" in sys.argv else "test" returnvalues = {} def run(pyver, cmds, target=None): cmd = [r"C:\Python%s\Pytho...
Python
0
002842c4d7db431a4dedc067ef54dab8747d70f4
add debug statement
library/pyjamas/media/Video.mshtml.py
library/pyjamas/media/Video.mshtml.py
class Video(Media): def __init__(self, src=None, **kwargs): print "create object" obj = DOM.createElement("OBJECT") DOM.setAttribute(obj, "TYPE", "application/x-mplayer2") #DOM.setAttribute(obj, "type", "application/x-oleobject") DOM.setAttribute(obj, "classid", ...
class Video(Media): def __init__(self, src=None, **kwargs): print "create object" obj = DOM.createElement("OBJECT") DOM.setAttribute(obj, "TYPE", "application/x-mplayer2") #DOM.setAttribute(obj, "type", "application/x-oleobject") DOM.setAttribute(obj, "classid", ...
Python
0.000018
012acdc7a280b307bbb110449dcfee5d05a77e38
Create new package (#6379)
var/spack/repos/builtin/packages/r-chemometrics/package.py
var/spack/repos/builtin/packages/r-chemometrics/package.py
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0
aa78a2670766b0a5e093a1876cb402ed513573bd
Add script to explore parameters units
openfisca_france/scripts/parameters/explore_parameters_unit.py
openfisca_france/scripts/parameters/explore_parameters_unit.py
# -*- coding: utf-8 -*- from openfisca_core.parameters import ParameterNode, Scale from openfisca_france import FranceTaxBenefitSystem tax_benefit_system = FranceTaxBenefitSystem() parameters = tax_benefit_system.parameters def get_parameters_by_unit(parameter, parameters_by_unit = None): if parameters_by_uni...
Python
0
e095b6a76ac36255983d8c69d4899d64178e0ef3
Add segment_euclidean_length tests module
tests/plantcv/morphology/test_segment_euclidean_length.py
tests/plantcv/morphology/test_segment_euclidean_length.py
import pytest import cv2 import numpy as np from plantcv.plantcv import outputs from plantcv.plantcv.morphology import segment_euclidean_length def test_segment_euclidean_length(morphology_test_data): # Clear previous outputs outputs.clear() skeleton = cv2.imread(morphology_test_data.skel_img, -1) _ =...
Python
0.000001
26ab37868e67b5b815cf8df67cc04876ff44c148
Add file for Nongrammar entities tests
tests/rules_tests/isValid_tests/NongrammarEntitiesTest.py
tests/rules_tests/isValid_tests/NongrammarEntitiesTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule from .grammar import * class NongrammarEntitiesTest(TestCase): pass if __name__ == '__main__': main()
Python
0
e80ec7adc6fe71310e1c2adba720be9640a49d0f
test code for midiGenerator
src/test4.py
src/test4.py
import midiGenerator generator = midiGenerator.MidiGenerator(200,1) channel = midiGenerator.Channel() note = midiGenerator.Note(43,100,200) channel.addNote(note) channel.addNote(midiGenerator.Note(45,200,300)) channel.addNote(midiGenerator.Note(57,300,400)) channel.addNote(midiGenerator.Note(38,400,500)) channel.addNot...
Python
0
63065390fca52045db0665bbb8f2b4df7a7b57d4
Implement pivoted Cholesky decomposition and code to do Woodbury solves with them.
gpytorch/utils/pivoted_cholesky.py
gpytorch/utils/pivoted_cholesky.py
import torch def pivoted_cholesky(matrix, max_iter, error_tol=1e-5): matrix_size = matrix.size(-1) matrix_diag = matrix.diag() # TODO: This check won't be necessary in PyTorch 0.4 if isinstance(matrix_diag, torch.autograd.Variable): matrix_diag = matrix_diag.data error = torch.norm(matri...
Python
0
21446e16fdc829024450fe2dfe1e7b25006151b4
Add unittest for yaml database config validation.
test/test_config_dbyaml.py
test/test_config_dbyaml.py
#!/usr/bin/env python2 import unittest import subprocess import threading import tempfile import os import shutil from testdc import * DAEMON_PATH = './astrond' TERMINATED = -15 EXITED = 1 class ConfigTest(object): def __init__(self, config): self.config = config self.process = None def run(...
Python
0
e195aef0fa870bf0f471be99a0144a59fdcc5b97
Create norm_distri_of_proj_valu.py
norm_distri_of_proj_valu.py
norm_distri_of_proj_valu.py
import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline import math x_train = pd.read_csv("Train.csv") x_test = pd.read_csv("Test.csv") def log_method(x): if x == 0: return 0 return math.log(x,2) test = x_train["Project_Valuation"].order() test = test.apply(lambda x...
Python
0.000005
3724e828ea7c0aa2a910db16c1392390f7c9f7a8
add a simple schema building tool
spyne/test/interface/build_schema.py
spyne/test/interface/build_schema.py
#!/usr/bin/env python # This can be used to debug invalid Xml Schema documents. import sys from lxml import etree if len(sys.argv) != 2: print "Usage: %s <path_to_xsd_file>" % sys.argv[0] sys.exit(1) f = open(sys.argv[1]) etree.XMLSchema(etree.parse(f))
Python
0
0a5167807d615f59808195aed6114cfa9b293eda
Update migrations to work with Django 1.9.
pybb/migrations/0005_auto_20151108_1528.py
pybb/migrations/0005_auto_20151108_1528.py
# -*- coding: utf-8 -*- # Generated by Django 1.9b1 on 2015-11-08 23:28 from __future__ import unicode_literals from django.db import migrations, models import pybb.util class Migration(migrations.Migration): dependencies = [ ('pybb', '0004_slugs_required'), ] operations = [ migrations....
Python
0
56a8250baa197285a5727dfbca12adaab81238ab
Add a snippet.
python/tkinter/python3/menu_checkbutton.py
python/tkinter/python3/menu_checkbutton.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including witho...
Python
0.000002
fa3a02e6660ce556defc2f2c6008c6eb24eb71c1
Add a simple sampler for playing wav files triggered by note on messages
Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Audio/Sampler.py
Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Audio/Sampler.py
import time import wave import pygame import numpy import Axon from Axon.SchedulingComponent import SchedulingComponent class WavVoice(SchedulingComponent): bufferSize = 1024 def __init__(self, fileName, **argd): super(WavVoice, self).__init__(**argd) self.on = False self.wavFile = wa...
Python
0
bff1e954213fb7592505c94294eb3800a8b199c3
Update patternMatch.py
TechInterviews/Python/patternMatch.py
TechInterviews/Python/patternMatch.py
import sys import re # Strip only the beginning and ending slashes def stripSlashes(path): if path.startswith('/'): path = path[1:] if path.endswith('/'): path = path[:-1] return path def findBestWildCardMatch(patterns): #The best match is wildcards that are rightmost #Get the posi...
import sys import re def stripSlashes(path): if path.startswith('/'): path = path[1:] if path.endswith('/'): path = path[:-1] return path def findBestWildCardMatch(patterns): pass def getRePattern(pattern): return pattern.replace(',', '/').replace('*', '[a-zA-Z0-9_]*') def findBe...
Python
0
bbe0cf1666b4706973bfba73ed77126581026057
add new test case to test add image from local file system.
integrationtest/vm/virt_plus/other/test_add_local_image.py
integrationtest/vm/virt_plus/other/test_add_local_image.py
''' New Integration Test for add image from MN local URI. The file should be placed in MN. @author: Youyk ''' import os import time import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_state as test_state import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.opera...
Python
0
bfdcebfb287b6c3495e74888ace0409f47b530c9
add testGroup script
ros_ws/src/crazyswarm/scripts/testGroup.py
ros_ws/src/crazyswarm/scripts/testGroup.py
#!/usr/bin/env python import numpy as np from pycrazyswarm import * Z = 1.5 if __name__ == "__main__": swarm = Crazyswarm() timeHelper = swarm.timeHelper allcfs = swarm.allcfs allcfs.crazyfliesById[9].setGroup(1) allcfs.crazyfliesById[10].setGroup(2) allcfs.takeoff(targetHeight=Z, duration=...
Python
0.000001
ae3374305bad49c358a173e26490c5c90b219208
test for multiple open-read-close cycle
tests/multiple_readings.py
tests/multiple_readings.py
import serial import struct import time import pandas as pd import numpy as np def measure(): start_time = time.time() with serial.Serial('/dev/cu.usbmodem14121', 1000000, timeout=1) as inport: open_time = time.time() data = inport.read(100) read_time = time.time() close_time = tim...
Python
0
4e3644234fab9cb14a3d511b24bce3ed8a1446e0
Add in a minor testcase.
tests/scales/test_minor.py
tests/scales/test_minor.py
# Copyright (c) Paul R. Tagliamonte <tag@pault.ag>, 2015 # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
Python
0.000001
f00fc0d5a7f9e7a1ad325126c5286cf9defd8a5f
Include full tadbit tools test
tests/test_tadbit_tools.py
tests/test_tadbit_tools.py
""" .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache....
Python
0
e98065e04cfd52bb369d3b07d29f37fb458baa91
add solution for Merge Intervals
src/mergeIntervals.py
src/mergeIntervals.py
# Definition for an interval. # class Interval: # def __init__(self, s=0, e=0): # self.start = s # self.end = e class Solution: # @param intervals, a list of Interval # @return a list of Interval def merge(self, intervals): if not intervals: return [] res =...
Python
0
6f8c64ed6f99493811cab54137a1eed44d851260
Add python script to get group and module given a class name
scripts/GetGroupAndModuleFromClassName.py
scripts/GetGroupAndModuleFromClassName.py
#!/usr/bin/env python """ Given the path to the ITK Source Dir print group and module of a given class for instance, try: ./GetGroupAndModuleFromClassName /path/to/ITK Image """ import sys import os itk_dir = sys.argv[1] cmakefile = os.path.join( itk_dir, 'CMake', 'UseITK.cmake' ) if not os.path.exists( cmakefi...
Python
0.000003
3ff18745a561ab28e04d9218e00fc0aa367631f5
add `solution` module
src/obpds/solution.py
src/obpds/solution.py
# # Copyright (c) 2015, Scott J Maddox # # This file is part of Open Band Parameters Device Simulator (OBPDS). # # OBPDS is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the...
Python
0.000001
9a2f68d14ae2d576c59035c67ffa12c96b4f748a
Add provider tests
test_saau.py
test_saau.py
from saau.loading import load_image_providers, load_service_providers def test_load_service_providers(): assert load_service_providers(None) def test_load_image_providers(): assert load_image_providers(None)
Python
0
018be657ea3e088b3116e8a78fe81713a2a30e29
Add tifftopdf, a frontend for tiff2pdf and tiffinfo.
tifftopdf.py
tifftopdf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: R.F. Smith <rsmith@xs4all.nl> # 2012-06-29 # # To the extent possible under law, Roland Smith has waived all copyright and # related or neighboring rights to NAME. This work is published from the # Netherlands. See http://creativecommons.org/publicdomain/zero/1....
Python
0
6dcbb2004271860b7d2e8bf0d12da46c925f151c
add a utility to show/set/clear software write protect on a lun
tools/swp.py
tools/swp.py
#!/usr/bin/env python # coding: utf-8 # # A simple example to show/set/clear the software write protect flag SWP # import sys from pyscsi.pyscsi.scsi import SCSI from pyscsi.pyscsi.scsi_device import SCSIDevice from pyscsi.pyscsi import scsi_enum_modesense6 as MODESENSE6 def usage(): print 'Usage: swp.py [--hel...
Python
0.000001
80d2fa29185e9c3c54ed1e173122bbe5a78624a4
Create tutorial4.py
tutorial4.py
tutorial4.py
Python
0
f8d4596db159f143d51c62ea2a097a72f9877ee6
Add test for clusqmgr
test/clusqmgr.py
test/clusqmgr.py
import unittest from testbase import MQWebTest class TestQueueActions(MQWebTest): def testInquire(self): data = self.getJSON('/api/clusqmgr/inquire/' + self.qmgr) self.assertFalse('mqweb' not in data, 'No mqweb data returned') if 'error' in data: self.assertFalse(True, 'Received a WebSphere MQ error:' ...
Python
0
e21e04436f0596f25ca3fb75a9fe15916687c955
Add utils.py tests
monasca_persister/tests/test_utils.py
monasca_persister/tests/test_utils.py
# (C) Copyright 2019 Fujitsu Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
Python
0.000001
66443f49c932fba9203b878b7be5f8c1a99a4e9e
make pacbio like names
iron/utilities/rename_to_pacbio.py
iron/utilities/rename_to_pacbio.py
#!/usr/bin/python import sys,argparse from SequenceBasics import FastaHandleReader, FastqHandleReader def main(): parser = argparse.ArgumentParser() parser.add_argument('input',help="Use - for STDIN") group = parser.add_mutually_exclusive_group(required=True) group.add_argument('--fasta',action='store_true') ...
Python
0.02221
b3633655ce700adfe3bd5390735edf799fd56624
add missing migration
gunnery/core/migrations/0003_auto__add_field_server_port.py
gunnery/core/migrations/0003_auto__add_field_server_port.py
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Server.port' db.add_column(u'core_server', 'port', ...
Python
0.000258
dddac1090fae15edb9a8d2a2781bb80989a0bc84
add eventrange control
pilot/control/eventrange.py
pilot/control/eventrange.py
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Authors: # - Wen Guan, wen.guan@cern.ch, 2018 import json import Queue im...
Python
0
42d6f1d17ea0f0117a82eb1933a5150b5eb1e29a
add missing is_context_manager
pikos/_internal/util.py
pikos/_internal/util.py
import inspect def is_context_manager(obj): """ Check if the obj is a context manager """ # FIXME: this should work for now. return hasattr(obj, '__enter__') and hasattr(obj, '__exit__')
Python
0.999274
ec2310dc42ccdeaafc74c232fad3199dcd22e252
Create EPICLocSearch_parse-intron.py
EPICLocSearch_parse-intron.py
EPICLocSearch_parse-intron.py
" " " this file was created in november 2014 as part of a de novo search for EPIC loci in the chaetognath species Pterosagitta draco property of dr. Ferdinand Marlétaz " " " #!/usr/bin/env python import sys import re from collections import defaultdict def reverse(ali,taxa,clust): alen=len(ali[taxa[0]]) #p...
Python
0
c0a809ff79d90712a5074d208193ac9fd2af9901
Add haproxy parser
playback/cli/haproxy.py
playback/cli/haproxy.py
import sys from playback.api import HaproxyInstall from playback.api import HaproxyConfig from playback.templates.haproxy_cfg import conf_haproxy_cfg from playback.cliutil import priority def install(args): try: target = HaproxyInstall(user=args.user, hosts=args.hosts.split(','), key_filename=args.key_file...
Python
0.000001
acc5c52011db4c8edc615ae3e0cad9cea4fe58b8
Add basic test for filesystem observer source
spreadflow_observer_fs/test/test_source.py
spreadflow_observer_fs/test/test_source.py
# -*- coding: utf-8 -*- # pylint: disable=too-many-public-methods """ Integration tests for spreadflow filesystem observer source. """ from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import copy from bson import BSON from datetime import datetime from t...
Python
0
4d1c81af1d028b2d0fd58f8bab7e7e0246c04f3b
Create alternative_matching.py
hacker_rank/regex/grouping_and_capturing/alternative_matching.py
hacker_rank/regex/grouping_and_capturing/alternative_matching.py
Regex_Pattern = r'^(Mr\.|Mrs\.|Ms\.|Dr\.|Er\.)[a-zA-Z]{1,}$' # Do not delete 'r'.
Python
0.00001
8033f8a033ddc38c3f1e2276c8c2b4f50c8360fb
Add Python template
src/template.py
src/template.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import argparse def main(filename=None): print("Hello world!") if os.path.isfile(filename) is not True: ...
Python
0.000001
11603040c58e27ebb109275bd4454a54e0c61d42
Test examples
tests/acceptance/test_examples.py
tests/acceptance/test_examples.py
from typing import Dict from miniworld.util import JSONConfig # TODO: examples/batman_adv.json, problem is configurator def test_snapshot_boot_single_scenario(image_path, runner): with runner() as r: for _ in range(5): scenario = JSONConfig.read_json_config('examples/nb_bridged_lan.json') # ...
Python
0.000001
d2c5462c5677d7674921f02687017f4128f219f7
Create while_loop_else.py
while_loop_else.py
while_loop_else.py
// You can actually do a while loop that ends with an else // while True: ... ... ... ... else:
Python
0.000058
0322e1c51fe07cc9707a687ab309a00ca374a1af
Add a cleanup_test_data management command to remove old test data from dev and stage
moztrap/model/core/management/commands/cleanup_test_data.py
moztrap/model/core/management/commands/cleanup_test_data.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from datetime import datetime from optparse import make_option from django.core.management.base import BaseCommand fro...
Python
0
fe7bc09a19caac8fdc205d9e72a5b05f4688db02
add south migrations
referral/migrations/0002_auto__add_field_campaign_pattern.py
referral/migrations/0002_auto__add_field_campaign_pattern.py
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Campaign.pattern' db.add_column('referral_campaign', 'pattern', self.g...
Python
0.001497
e2004076b1e04df21d9122d94e8ac00776542483
Create new package. (#6044)
var/spack/repos/builtin/packages/r-allelicimbalance/package.py
var/spack/repos/builtin/packages/r-allelicimbalance/package.py
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0
483cdf6b4dd846d9da11788ae98d86d373fb5c49
add analyze script
app/lda/scripts/analyze.py
app/lda/scripts/analyze.py
from __future__ import print_function import numpy as np import sys import pandas as pd phi_path = '/users/wdai/bosen/app/lda/output/lda.S0.M4.T32/lda_out.phi' num_topics = 100 num_words = 52210 top_k = 10 dict_path = '/users/wdai/bosen/app/lda/datasets/words_freq.tsv' topk_file = '/users/wdai/bosen/app/lda/output/top...
Python
0.000001
fcb02edeb8fafa8c297d48edc8ebf6b389321430
add test
test_iris.py
test_iris.py
import unittest from sklearn import datasets from sklearn.utils.validation import check_random_state from stacked_generalization import StackedClassifier, FWLSClassifier from sklearn.ensemble import RandomForestClassifier from sklearn.ensemble import ExtraTreesClassifier from sklearn.ensemble import GradientBoostingCla...
Python
0.000002
f43ac6c526aceddea81c8fccf99e33bd7cb917c4
fix api wrapper
src/sentry/debug/middleware.py
src/sentry/debug/middleware.py
from __future__ import absolute_import import json import re from debug_toolbar.toolbar import DebugToolbar from django.conf import settings from django.utils.encoding import force_text from django.utils.html import escape from six.moves import _thread as thread WRAPPER = """ <!DOCTYPE html> <html> <body> <pre>{...
from __future__ import absolute_import import json import re from debug_toolbar.toolbar import DebugToolbar from django.conf import settings from django.template.loader import render_to_string from django.utils.encoding import force_text from six.moves import _thread as thread class ToolbarCache(object): def __...
Python
0.000015
2d0f76538f8927a85a2c51b0b6c34f54c775b883
Add kmeans receiver
lexos/receivers/kmeans_receiver.py
lexos/receivers/kmeans_receiver.py
from lexos.receivers.base_receiver import BaseReceiver class KmeansOption: def __init__(self,): class KmeansReceiver(BaseReceiver): def options_from_front_end(self) -> KmeansOption: """Get the Kmeans option from front end. :return: a KmeansOption object to hold all the options. """
Python
0.001009
ab87f960ecb6f330f4574d2e8dc6b3d4cc96c40f
add solution for Spiral Matrix II
src/spiralMatrixII.py
src/spiralMatrixII.py
class Solution: # @return a list of lists of integer def generateMatrix(self, n): if n == 0: return [] dirs = [[0, 1], [1, 0], [0, -1], [-1, 0]] cur = cur_d = 0 cur_x = cur_y = 0 matrix = [[0 for col in xrange(n)] for row in xrange(n)] while cur != n*...
Python
0
69a031db7d83254291349804ee5f59fe9972f181
Add simple jitclass example
examples/jitclass.py
examples/jitclass.py
""" A simple jitclass example. """ import numpy as np from numba import jitclass # import the decorator from numba import int32, float32 # import the types spec = [ ('value', int32), # a simple scalar field ('array', float32[:]), # an array field ] @jitclass(spec) class Ba...
Python
0.00001
5273a97ab1da4b809573617d3fc01705c322992f
Add tests for form mixin.
thecut/authorship/tests/test_forms.py
thecut/authorship/tests/test_forms.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.test import TestCase from django import forms from mock import patch from test_app.models import AuthorshipModel from thecut.authorship.factories import UserFactory from thecut.authorship.forms import AuthorshipMixin class Au...
Python
0
e838b6d53f131badfbb7b51b4eb268ebb5d7c450
Add tests for using the new Entity ID tracking in the rule matcher
spacy/tests/matcher/test_entity_id.py
spacy/tests/matcher/test_entity_id.py
from __future__ import unicode_literals import spacy from spacy.vocab import Vocab from spacy.matcher import Matcher from spacy.tokens.doc import Doc from spacy.attrs import * import pytest @pytest.fixture def en_vocab(): return spacy.get_lang_class('en').Defaults.create_vocab() def test_init_matcher(en_vocab)...
Python
0
2cf812ba2015bfcc392a2f401c253850b31060c7
Make sure all tags are alphanumeric
perf_insights/perf_insights/upload.py
perf_insights/perf_insights/upload.py
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import re import sys import webapp2 import uuid from perf_insights import trace_info sys.path.append('third_party') import cloudstorage as gc...
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import webapp2 import uuid from perf_insights import trace_info sys.path.append('third_party') import cloudstorage as gcs default...
Python
0
cf31fd1afabb1c37d5e6f1033ded440889f5949b
Create thonplate.py
thonplate.py
thonplate.py
class BaseTag(object): children = None parent = None name = None indent_string = ' ' def __init__(self): self.children = [] self.parent = None def __str__(self): return self.render() def add(self, *args): for child in args: if isinstance(child,...
Python
0.000002
084f9bb8333a7cfb3f4247afbcae62375060fa2b
Add rude graphics mode tester
tests/testpic.py
tests/testpic.py
import serial import time import random import sys # Give port name of your UART as first argument. No error checking # here, sorry. # ser = serial.Serial(sys.argv[1], 9600, timeout = 1) serwrite = lambda x: ser.write(bytearray(map(ord, x))) move_to = lambda x, y: serwrite("\x1B[{0};{1}H".format(y, x)) serwrite("xx...
Python
0
a1eff713339d528720ed5999d05a85066018f070
Add visualise.py
visualise.py
visualise.py
# visualise.py # Imports import argparse import json import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from uniform_bspline import Contour # main def main(): parser = argparse.ArgumentParser() parser.add_argument('input_path') parser.add_argument(...
Python
0.000369
ee5089a6a16c5a6142444a0ad312fdb641aa845c
Fix tests
test/test.py
test/test.py
#!/usr/bin/env python import locale import os import sys import unittest from tempfile import TemporaryFile sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from argparse import ArgumentParser from argcomplete import * IFS = '\013' class TestArgcomplete(unittest.TestCase): @cla...
#!/usr/bin/env python import locale import os import sys import unittest from tempfile import TemporaryFile sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from argparse import ArgumentParser from argcomplete import * IFS = '\013' class TestArgcomplete(unittest.TestCase): @cla...
Python
0.000003
a10648569bbd5dca44adc3cfd5a128703325932b
Create dihedral_tent.py
dihedral_tent.py
dihedral_tent.py
import numpy as np import mdtraj as md import argparse, cPickle from multiprocessing import Pool from itertools import product from itertools import combinations_with_replacement as combinations from contextlib import closing def rbins(n=30): return np.linspace(-np.pi, np.pi, n+3)[1:-1] def ent(H): H /= H...
Python
0.000042
13e45a8578e57e2cb55b29980b0f3326dd393a20
Create sump_monitor.py
sump_monitor.py
sump_monitor.py
#Import the required modules import RPi.GPIO as GPIO import time import requests import math #Setup the GPIO GPIO.setmode(GPIO.BCM) #Define the TRIG and ECO pins - these are labeled on the sensor TRIG = 23 ECHO = 24 #Number of readings we are going to take to avoid issues numreadings = 7 #Alert that we are starting...
Python
0.000002
9a6ca54f7cca0bd5f21f0bc590a034e7e3e05b6e
Add migration to add userprofiles to existing users
src/icp/apps/user/migrations/0002_add_userprofiles_to_existing_users.py
src/icp/apps/user/migrations/0002_add_userprofiles_to_existing_users.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.contrib.postgres.fields from django.conf import settings def create_user_profiles_for_existing_users(apps, schema_editor): User = apps.get_model('auth', 'User') UserProfile = apps.get_model('...
Python
0
a47d2654a5e23417c9e23f2ad19ed1b150524337
add new mtc script
trunk/mtc.py
trunk/mtc.py
#!/usr/bin/python """ (C) Legoktm, 2008 Distributed under the terms of the MIT license. __version__ = '$Id: $' """ import urllib, re, time import os, sys sys.path.append(os.environ['HOME'] + '/stuffs/pywiki/pylegoktm') import wikipedia, pagegenerators, catlib from image import * from upload import UploadRobot def...
Python
0.000001
c2d658ed1caa91eb963a3df850b5cf9b99633f69
Add missing transpose.py
python/bifrost/transpose.py
python/bifrost/transpose.py
# Copyright (c) 2016, The Bifrost Authors. All rights reserved. # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must r...
Python
0.006976
f46b08ce3d45b44d3f71759705e8045322c6155d
Create __init__.py
pythainlp/spell/__init__.py
pythainlp/spell/__init__.py
# TODO
Python
0.000429
1d70b3600ed7e56ad610787d1d5f8c7980121b8f
Add lzyf compreesion
yay0/lzyf.py
yay0/lzyf.py
# Compressor for LZYF import yay0, logging, struct maxOffsets = [16, 32, 1024] maxLengths = {16: 513, 32: 4, 1024: 17} log = logging.getLogger("lzyf") def compress(src): src_size = len(src) dst_size = 0 dst = bytearray() src_pos = 0 rl = 0 ctrl_byte = 0 buf = bytearray() # Start a co...
Python
0.999393
82069f44f8b8bcb9f7b4df9a267a8641c54b0442
convert dwt_idwt doctests to nose tests.
pywt/tests/test_dwt_idwt.py
pywt/tests/test_dwt_idwt.py
#!/usr/bin/env python from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import (run_module_suite, assert_allclose, assert_, assert_raises, dec) import pywt def test_dwt_idwt_basic(): x = [3, 7, 1, 1, -2, 5, 4, 6] cA, cD = pywt.dwt(x, 'db2') cA_exp...
Python
0
34001081c2cfaa86d85f7a5b51925dca4a6e1a9f
Use Python 3 type syntax in `zerver/webhooks/yo/view.py`.
zerver/webhooks/yo/view.py
zerver/webhooks/yo/view.py
# Webhooks for external integrations. from typing import Optional import ujson from django.http import HttpRequest, HttpResponse from zerver.decorator import api_key_only_webhook_view from zerver.lib.actions import check_send_private_message from zerver.lib.request import REQ, has_request_variables from zerver.lib.re...
# Webhooks for external integrations. from typing import Optional import ujson from django.http import HttpRequest, HttpResponse from zerver.decorator import api_key_only_webhook_view from zerver.lib.actions import check_send_private_message from zerver.lib.request import REQ, has_request_variables from zerver.lib.re...
Python
0
8c98d12a08617b9a1ab1a264b826f5e9046eca05
Add getHWND/getAllWindows utility functions for bots.
assisstant/bots/utility.py
assisstant/bots/utility.py
import subprocess # criteria: dictionary that has key/values to match against. # e.g. {"wm_class": "Navigator.Firefox"} def getHWND(criteria): windows = getAllWindows() for window in windows: if criteria.items() <= window.items(): return window return None def getAllWindows(): windows = [] with s...
Python
0
d9133f865c8f0c64e589e902c88a8e85feb77963
remove call to the deleted function.
tensorflow/lite/micro/tools/make/fix_arduino_subfolders.py
tensorflow/lite/micro/tools/make/fix_arduino_subfolders.py
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
Python
0
4912c8261dba456e8e4a62051afdf01565f20ae9
Add first iteration of raw_to_average_jpegs.py.
raw_to_average_jpegs.py
raw_to_average_jpegs.py
#! /usr/bin/env python # # Tested on Macs. First run `brew install ufraw exiftool` import argparse import glob import multiprocessing as mp import os import subprocess def parseArgs(): desc = 'Auto-white-balance raw images and create average-sized JPEG files with their EXIF info.' parser = argparse.ArgumentP...
Python
0.000001
6aaa08a48dade981de18b117363357fdffaeb641
add python_capstone_setup.py
suite/python_capstone_setup.py
suite/python_capstone_setup.py
#!/bin/sh # this prints out Capstone setup & core+Python-binding versions python -c "import capstone; print capstone.debug()"
Python
0.000012
077cf46ab42c76bf3a854142a4f530625a377837
Create tutorial2.py
tutorial2.py
tutorial2.py
Python
0
1bb1ececfcd548d52a28b713f4ee7eb4e710da85
Add an example of using fchollet multi_gpu_model on InceptionV3.
keras_tf_multigpu/examples/fchollet_inception3_multigpu.py
keras_tf_multigpu/examples/fchollet_inception3_multigpu.py
import tensorflow as tf from keras.applications import InceptionV3 from keras.utils import multi_gpu_model import numpy as np num_samples = 1000 height = 224 width = 224 num_classes = 1000 gpu_count = 2 # Instantiate the base model # (here, we do it on CPU, which is optional). with tf.device('/cpu:0' if gpu_count > ...
Python
0
0aa472a110308c8d8ccafd080c5f3d73a8d8098d
add azure role assignment module (#52623)
lib/ansible/modules/cloud/azure/azure_rm_roleassignment.py
lib/ansible/modules/cloud/azure/azure_rm_roleassignment.py
#!/usr/bin/python # # Copyright (c) 2018 Yunge Zhu, (@yungezz) # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'statu...
Python
0
9ffafa9c11e71c176adb4056fbc780e450cc0d82
Add experimental queries module.
databroker/queries.py
databroker/queries.py
""" This module is experimental. """ import collections.abc import abc class Query(collections.abc.Mapping): """ This represents a MongoDB query. MongoDB queries are typically encoded as simple dicts. This object supports the dict interface in a read-only fashion. Subclassses add a nice __repr__ ...
Python
0
177f198a1efb99da592d96a2d5d259722b8a47ee
Add a test of switching back and forth between Decider() values (specifically 'MD5' and 'timestamp-match'), copied from back when this functionality was configured with the SourceSignatures() function.
test/Decider/switch-rebuild.py
test/Decider/switch-rebuild.py
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
Python
0
e547b5a202d13ba9dc66451f959a8044844de4a6
add simple test code for distributions.Independent with Normal
tests/chainer_tests/distributions_tests/test_independent.py
tests/chainer_tests/distributions_tests/test_independent.py
import functools import itertools import operator import numpy from chainer import distributions from chainer import testing from chainer.testing import array from chainer.testing import attr from chainer import utils def skip_not_in_params(property): def decorator(f): @functools.wraps(f) def ne...
Python
0
666cd734270f7d7487815c7805940cb8a2d99c2c
Add script for downloading and patching the TIGER corpus
confopy/localization/de/corpus_de/tiger_dl_patch.py
confopy/localization/de/corpus_de/tiger_dl_patch.py
#!/usr/bin/python # coding: utf-8 ''' File: tiger_release_aug07.corrected.16012013_patch.py Author: Oliver Zscheyge Description: Fixes wrong morph values in the TIGER corpus: tiger_release_aug07.corrected.16012013.xml Also converts XML file to utf-8 encoding. ''' import urllib import tarfile import co...
Python
0
8c7fc2382db0ec9c901f6c2c2b00971f3ee7c3cc
Add tests for custom authentication backend
logintokens/tests/test_backends.py
logintokens/tests/test_backends.py
"""logintokens app unittests for backends """ from time import sleep from django.test import TestCase, Client from django.contrib.auth import get_user_model, authenticate from logintokens.tokens import default_token_generator USER = get_user_model() class EmailOnlyAuthenticationBackendTest(TestCase): """Test...
Python
0
f746c2a8a59342060d404944a586b11e1f46df5a
Merge with lp:openobject-addons
addons/product_visible_discount/__openerp__.py
addons/product_visible_discount/__openerp__.py
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
Python
0
54ca48a2b8cbd53cd6506fdbce47d16f03a28a7d
Add unit tests for bubble sort
tests/test_sorting_and_searching/test_bubble_sort.py
tests/test_sorting_and_searching/test_bubble_sort.py
import unittest from aids.sorting_and_searching.bubble_sort import bubble_sort class BubbleSortTestCase(unittest.TestCase): ''' Unit tests for bubble sort ''' def setUp(self): self.example_1 = [2, 5, 4, 3, 1] def test_bubble_sort(self): bubble_sort(self.example_1) self.a...
Python
0
f24bdbbd0a7abc32d49f844a4b97b128a3adc299
add tests for KnownIssues
test/core/test_known_issues.py
test/core/test_known_issues.py
from django.test import TestCase from django.utils import timezone from unittest.mock import patch from squad.core.models import Group, KnownIssue class KnownIssueTest(TestCase): def setUp(self): self.group = Group.objects.create(slug='mygroup') self.project = self.group.projects.create(slug='my...
Python
0
38e75951570be46f6a36eeb000a4621bc76bf02a
Move history plugin to learn phase.
flexget/plugins/output/history.py
flexget/plugins/output/history.py
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime from sqlalchemy import Column, String, Integer, DateTime, Unicode, desc from flexget import options, plugin from flexget.event import event from flexget.manager import Base, Session from flexget.utils.tools...
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime from sqlalchemy import Column, String, Integer, DateTime, Unicode, desc from flexget import options, plugin from flexget.event import event from flexget.manager import Base, Session from flexget.utils.tools...
Python
0
70e1910ef01c6313360dff3f3e728e4f5f404f38
Allow history to be filtered by task
flexget/plugins/output/history.py
flexget/plugins/output/history.py
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime from sqlalchemy import Column, String, Integer, DateTime, Unicode, desc from flexget import options, plugin from flexget.event import event from flexget.logger import console from flexget.manager import Bas...
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime from sqlalchemy import Column, String, Integer, DateTime, Unicode, desc from flexget import options, plugin from flexget.event import event from flexget.logger import console from flexget.manager import Bas...
Python
0.000008
f08a01021d697fbf34a8f23b7cc51a566619a1d2
Increase unit test coverage for common utils.
murano/tests/unit/common/test_utils.py
murano/tests/unit/common/test_utils.py
# Copyright (c) 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# Copyright (c) 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
Python
0.000014
0b047f5b6123d851916ed12114512ddebec58225
Add 20150509 question.
LeetCode/add_two_numbers.py
LeetCode/add_two_numbers.py
""" You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Output: 7 -> 0 -> 8 Notice: extra digit. """ class ListNode: "...
Python
0.000001
e5502056a36507bd6d77bc814014b45cd9afc8bf
make a version bumping and version sorting system
dishpub/versioning.py
dishpub/versioning.py
import re regdelexp = re.compile('[-,.\/]') regnumeric = re.compile('[0-9]+') def split_line_by_delimiter(line,regex): splitline = [] splititr = regex.finditer(line) lstart = 0 for i in splititr: (mstart,mend) = i.span() if lstart != mstart: splitline.append(line[lstart:msta...
Python
0.000014
e46da8f316485c7c9e11ffe751108539f9254a68
Create ClientUDP.py
ClientUDP.py
ClientUDP.py
''' Created on 12 Feb 2015 @author: shutebt01 ''' #!/bin/env/python3 ''' Packet formating: [type, src-name, src-group, data] ''' import socket, threading, json name = input("Enter User Name: ") port = 16500 #host = input("Enter host: ") room = "Global" showall = False s = socket.socket(socket.AF_INET, socket.S...
Python
0
bf4b4ae886d8b631c443d1d992159f1922232dca
Create code.py
Code/code.py
Code/code.py
from django.db import models class Address(models.Model): address=models.CharField(max_length=255,blank=True) city=models.CharField(max_length=150,blank=True) state=models.CharField(max_length=2,blank=True) // Such as US for Unitet States of America, IN for India pin=models.CharField(max_length=15,blank=Tr...
Python
0.000001