text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
import OOMP newPart = OOMP.oompItem(9019) newPart.addTag("oompType", "HESH") newPart.addTag("oompSize", "03") newPart.addTag("oompColor", "L") newPart.addTag("oompDesc", "STAN") newPart.addTag("oompIndex", "01") OOMP.parts.append(newPart)
oomlout/oomlout-OOMP
old/OOMPpart_HESH_03_L_STAN_01.py
Python
cc0-1.0
241
0
""" Derivation and Elementary Trees live here. """ from __future__ import print_function from baal.structures import Entry, ConstituencyTree, consts from baal.semantics import Predicate, Expression from collections import deque from copy import copy, deepcopy from math import floor, ceil try: input = raw_input ex...
braingineer/baal
baal/structures/gist_trees.py
Python
mit
54,149
0.005522
from subprocess import Popen import os import time from marmot.representations.representation_generator import RepresentationGenerator from marmot.experiment.import_utils import mk_tmp_dir class POSRepresentationGenerator(RepresentationGenerator): def _get_random_name(self, suffix=''): return 'tmp_'+suf...
qe-team/marmot
marmot/representations/pos_representation_generator.py
Python
isc
2,447
0.002452
import sys import json import smartfeed.django base = sys.argv[1] command = sys.argv[2] db = smartfeed.django.get_default_model() if command == 'add': data = json.loads(sys.argv[3]) id = sys.argv[4] if len(sys.argv) >= 5 else None db.add(base, data, id=id) elif command == 'del': id = sys.argv[3] db.delete(base,...
fanout/pysmartfeed
test.py
Python
mit
542
0.01845
#! /usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------...
duyuan11/glumpy
examples/transform-pan-zoom.py
Python
bsd-3-clause
1,497
0.007348
#!/usr/bin/env python # Copyright (c) 2014, Bo Tian <tianbo@gmail.com> # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, ...
btian/market_correlator
extract_symbols.py
Python
bsd-3-clause
2,097
0.013829
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from django.contrib.admin.options import ModelAdmin, csrf_protect_m from django.contrib.admin.views.main import SEARCH_VAR, ChangeList from django.core.exceptions import PermissionDenied from django.core.paginator imp...
steventimberman/masterDebater
venv/lib/python2.7/site-packages/haystack/admin.py
Python
mit
6,567
0.002284
# -*- coding: utf-8 -*- from flask import Blueprint from ..models import Permission main = Blueprint('main', __name__) from . import views, errors, my_test # app_context_processor # let the variable Permission can accessed by all templates @main.app_context_processor def inject_permissions(): return dict(Permi...
yelongyu/chihu
app/main/__init__.py
Python
gpl-3.0
338
0.002959
# Copyright 2014 OpenStack Foundation # # 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 writ...
sileht/python-gnocchiclient
gnocchiclient/osc.py
Python
apache-2.0
1,874
0
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
georgecpr/openthread
tests/scripts/thread-cert/Cert_9_2_13_EnergyScan.py
Python
bsd-3-clause
4,676
0.001283
# screensaverpause - pauses Exaile playback on screensaver activation # Copyright (C) 2009-2011 Johannes Sasongko <sasongko@gmail.com> # # This program 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 v...
eri-trabiccolo/exaile
plugins/screensaverpause/__init__.py
Python
gpl-2.0
3,410
0.005279
#!/usr/bin/env python # Copyright (c) 2011 Stanford University # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ...
DavidLi2010/ramcloud
scripts/objectsize_scale.py
Python
isc
2,086
0
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Sharing.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
XDSETeamA/XD_SE_TeamA
team9/1/Sharing/manage.py
Python
mit
250
0
# Copyright 2012, 2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Test `maasserver.preseed` and related bits and bobs.""" from __future__ import ( absolute_import, print_function, unicode_literals, ) str = None __metac...
cloudbase/maas
src/maasserver/tests/test_preseed.py
Python
agpl-3.0
25,940
0.000578
import numpy as np import numpy.random as rng class Oscillator: """ A point in phase space for an oscillator. """ def __init__(self, state, omega=1., tau=1., beta=1.): """ Constructor: takes initial yition and velocity as argument. Sets the time to zero """ self.state = state self.omega, self.tau, self...
eggplantbren/Oscillations
StateSpace/Python/Oscillator.py
Python
gpl-3.0
2,171
0.03731
#!/usr/bin/python # Copyright: Ansible Project # 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.0', 'status': ['preview'], ...
bearstech/ansible
lib/ansible/modules/cloud/rackspace/rax_mon_notification.py
Python
gpl-3.0
5,164
0.001356
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RCircstats(RPackage): """Circular Statistics, from "Topics in Circular Statistics" (2001) ...
LLNL/spack
var/spack/repos/builtin/packages/r-circstats/package.py
Python
lgpl-2.1
898
0.002227
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Test variable expansion of '<|(list.txt ...)' syntax commands. """ import os import sys import TestGyp test = TestGyp.TestGyp() CHDI...
ibc/MediaSoup
worker/deps/gyp/test/variables/filelist/gyptest-filelist.py
Python
isc
697
0.004304
"""Kytos Napps Module.""" import json import os import re import sys import tarfile import urllib from abc import ABCMeta, abstractmethod from pathlib import Path from random import randint from threading import Event, Thread from kytos.core.events import KytosEvent from kytos.core.logs import NAppLog __all__ = ('Kyt...
kytos/kytos
kytos/core/napps/base.py
Python
mit
9,959
0
# Generated by Django 2.0.8 on 2018-11-05 20:39 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('tickets', '0008_auto_20180730_2035'), ] operations = [ migrations.AlterModelOptions( name='ticket', options={'default_permis...
IntegratedAlarmSystem-Group/ias-webserver
tickets/migrations/0009_auto_20181105_2039.py
Python
lgpl-3.0
383
0.002611
from django.conf.urls import url from . import views app_name = 'polls' urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^(?P<question_id>[0-9]+)$', views.vote, name='vote'), url(r'^(?P<question_id>[0-9]+)/results$', views.results, name='results'), url(r'^add$', views.add, name='add'), ...
kura-pl/fast_polls
polls/urls.py
Python
mit
583
0.001715
# __init__.py - collection of Croatian numbers # coding: utf-8 # # Copyright (C) 2012 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License,...
tonyseek/python-stdnum
stdnum/hr/__init__.py
Python
lgpl-2.1
870
0
import teneto import matplotlib.pyplot as plt def test_sliceplot(): G = teneto.generatenetwork.rand_binomial([4, 2], 0.5, 'graphlet', 'wu') fig, ax = plt.subplots(1) ax = teneto.plot.slice_plot(G, ax) plt.close(fig) def test_circleplot(): G = teneto.generatenetwork.rand_binomial([4, 2], 0.5, 'g...
wiheto/teneto
test/plot/test_plot.py
Python
gpl-3.0
640
0
# Configuration file for ipython. c = get_config() # noqa: F821 c.Completer.use_jedi = False # ------------------------------------------------------------------------------ # InteractiveShellApp configuration # ------------------------------------------------------------------------------ # A Mixin for application...
kbase/narrative
kbase-extension/ipython/profile_default/ipython_config.py
Python
mit
20,674
0.000532
__author__ = 'moskupols' __all__ = ['morphology', 'cognates', 'pymystem']
hatbot-team/hatbot_resources
preparation/lang_utils/__init__.py
Python
mit
74
0.013514
import requests __url = 'http://www.baidu.com/s?wd=' # 搜索请求网址 def page(word): r = requests.get(__url + word) if r.status_code == 200: # 请求错误(不是200)处理 return r.text else: print(r.status_code) return False
JianmingXia/StudyTest
KnowledgeQuizTool/MillionHeroes/baiduSearch/get.py
Python
mit
277
0
#!/usr/bin/python -tt # Updated version of clipping adapters from sequences # Used cutadapt on combined sequences and removes first 13 bases with fastx_clipper # Website: https://code.google.com/p/cutadapt/ # Updated on: 09/26/2013 # Import OS features to run external programs import os import glob # Directories for ...
calandryll/transcriptome
scripts/old/quality_control3.py
Python
gpl-2.0
1,659
0.011453
# Copyright (c) 2016, Xilinx, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of ...
VectorBlox/PYNQ
python/pynq/iop/tests/test__iop.py
Python
bsd-3-clause
3,522
0.012493
#!/usr/bin/env python # # Copyright (c) 2017, Piotr Przymus # # 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, modi...
flacjacket/qtile
libqtile/scripts/qtile_cmd.py
Python
mit
6,464
0.000464
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2019 Athanasios Theocharis <athatheoc@gmail.com> # This was made under ESA Summer of Code in Space 2019 # by Athanasios Theocharis, mentored by Daniel Estevez # # This file is part of gr-satellites # # SPDX-License-Identifier: GPL-3.0-or-later # from gnuradio...
daniestevez/gr-satellites
python/ccsds/telemetry_packet_reconstruction.py
Python
gpl-3.0
2,817
0.00284
from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from selectreverse.utils import ReverseManager class Building(models.Model): number = models.IntegerField() owners = models.ManyToManyField('Owner') objects = models....
japsu/django-selectreverse
selectreverse/tests/models.py
Python
bsd-2-clause
1,338
0.008969
# -*- coding: utf-8 -*- # Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE project. # # 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://w...
telefonicaid/fiware-sdc
test/acceptance/e2e/uninstall_product/feature/terrain.py
Python
apache-2.0
3,017
0.002653
""" mediatum - a multimedia content repository Copyright (C) 2007 Arne Seifert <seiferta@in.tum.de> Copyright (C) 2007 Matthias Kramm <kramm@in.tum.de> Copyright (C) 2013 Iryna Feuerstein <feuersti@in.tum.de> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Gene...
mediatum/mediatum
core/metatype.py
Python
gpl-3.0
13,830
0.000723
# This file is part of PARPG. # PARPG 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. # PARPG is distributed in the hope ...
parpg/parpg
parpg/behaviours/npc.py
Python
gpl-3.0
4,169
0.002639
class Solution(object): def nextPermutation(self, nums): cursor = -1 for i in range(len(nums) - 1, 0, -1): if nums[i - 1] < nums[i]: cursor = i - 1 break for i in range(len(nums) - 1, -1, -1): if nums[i] > nums[cursor]: ...
luosch/leetcode
python/Next Permutation.py
Python
mit
459
0.002179
# -*- coding: utf-8 -*- from .grammar import SchemaGrammar from .sqlite_grammar import SQLiteSchemaGrammar from .postgres_grammar import PostgresSchemaGrammar from .mysql_grammar import MySqlSchemaGrammar
MakarenaLabs/Orator-Google-App-Engine
orator/schema/grammars/__init__.py
Python
mit
206
0
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014 SWIPO Project # # Authors (this file): # Stefan Schinkel <stefan.schinkel@gmail.com> """ Provides sanity checks for basic for parallel and serial circiuts. """ import numpy as np import networkx as nx from pyunicorn import ResNetwork from .Resisti...
leftaroundabout/pyunicorn
tests/test_core/TestResitiveNetwork-circuits.py
Python
bsd-3-clause
6,379
0
import requests import json NL_KEY = '*' TL_KEY = '*' def translate(text): tmp_payload = {"q": text, "target": "en"} s = requests.post('https://translation.googleapis.com/language/translate/v2?key=' + TL_KEY, json=tmp_payload) data = s.json()['data']['translations'][0] return data['translatedText'] d...
thiagoald/hardmob_information_extractor
sources/generate_sentiments.py
Python
mit
1,731
0.006932
''' Created on Mar 8, 2013 @author: Gary ''' import unittest from housemonitor.outputs.zigbee.zigbeecontrol import ZigBeeControl from housemonitor.outputs.zigbee.zigbeeoutputstep import ZigBeeOutputStep from housemonitor.outputs.zigbee.zigbeeoutputthread import ZigBeeOutputThread from housemonitor.lib.hmqueue import H...
gary-pickens/HouseMonitor
housemonitor/outputs/zigbee/test/zigbeeoutputstep_test.py
Python
mit
1,738
0.021864
import logging from django.conf import settings from django.contrib.auth.models import User from django.core.management import call_command from django.core.management.base import BaseCommand from tallessa.utils import log_get_or_create # usually you should getLogger(__name__) but we are not under the tallessa name...
tallessa/tallessa-backend
tallessa_backend/management/commands/setup.py
Python
agpl-3.0
1,317
0.000759
# -*- coding: utf-8 -*- # # allocations/entries.py is part of MetaDoc (Client). # # All of MetaDoc 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 opti...
henrikau/metadoc
client/allocations/entries.py
Python
gpl-3.0
2,825
0.004248
import sys, os, json, requests, threading from urlparse import urljoin from pyinotify import WatchManager, Notifier, EventsCodes, ProcessEvent import converter, settings class QueueManager: ''' Manages the batching and publishing of statements in a thread-safe way. ''' def __init__(self): self.cache = [] self...
daafgo/Edx_bridge
xapi-bridge/__main__.py
Python
apache-2.0
3,433
0.034081
#!/usr/bin/env python2.7 """ @package: pyHerkulex @name: herkulex.py @author: Achu Wilson (achuwilson@gmail.com), Akhil Chandran (akhilchandran.t.r@gmail.com) @version: 0.1 This is a python library for interfacing the Herkulex range of smart servo motors manufactured by Dongbu Robotics. The library was created by ...
seiji56/rmaze-2016
logic_code/last_ver/sim/herkulex.py
Python
gpl-3.0
23,289
0.004122
# Library for RTS2 JSON calls. # (C) 2012 Petr Kubanek, Institute of Physics # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any...
zguangyu/rts2
python/rts2/target.py
Python
gpl-2.0
1,526
0.026212
import numpy as np import unittest from skimage._shared.testing import assert_array_almost_equal from skimage._shared.testing import assert_equal from scipy import ndimage as ndi from skimage.feature import peak np.random.seed(21) class TestPeakLocalMax(): def test_trivial_case(self): trivial = np.zeros(...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/skimage/feature/tests/test_peak.py
Python
gpl-3.0
18,709
0.001604
# Created On: 2010-06-02 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-3.0.html from PyQt5.QtCo...
hsoft/qtlib
radio_box.py
Python
bsd-3-clause
2,903
0.007234
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('clientes', '0002_auto_20150530_1324'), ...
acs-um/gestion-turnos
apps/clientes/migrations/0003_auto_20150605_2119.py
Python
mit
1,158
0.000864
# -*- coding: utf-8 -*- from django import template from django_users.forms import CreateUserForm #from django.utils.translation import ugettext as _ register = template.Library() @register.inclusion_tag('users/templatetags/registration.html', takes_context = True) def registration_form(context, form=None, *args, **k...
AdrianRibao/django-users
django_users/templatetags/users.py
Python
bsd-3-clause
422
0.014218
import numpy as np from milk.measures.nfoldcrossvalidation import nfoldcrossvalidation, foldgenerator # Regression test in 2011-01-31 def test_getfoldgenerator(): labels = np.array([ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7...
pombredanne/milk
milk/tests/test_nfoldcrossvalidation_regression.py
Python
mit
10,055
0.001392
# -*- coding: utf-8 -*- # Copyright Tom SF Haines # # 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 ag...
Panda3D-google-code-repositories/naith
game/plugins/simpleweapon/simpleweapon.py
Python
apache-2.0
7,962
0.017458
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-03-05 18:11 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('teams', '0007_auto_20160305_1726'), ] operations = [ migrations.AlterField( ...
shivamMg/malvo
teams/migrations/0008_auto_20160305_1811.py
Python
gpl-3.0
546
0.001832
import uuid from paho.mqtt import publish from paho.mqtt.client import MQTTv31 from conf.mqttconf import * def send(msg, user_list, qos=2, retain=False): """ 发布mqtt消息 :param msg:消息内容,可以是字符串、int、bytearray :param user_list: 用户列表数组(不带前缀的),例如:["zhangsan","lilei"] :param qos: 消息质量(0:至多一次,1:至少一次,2:只有一...
cherrishes/weilai
xingxing/common/mqtt_helper.py
Python
apache-2.0
1,402
0.001664
#!/usr/bin/env python import subprocess, os, sys import colorama from colorama import Fore, Back, Style # Store paths and connection info sourcetree = "/home/flux/Projects/hackday" gitlabapi = "" drupalbootstrap = sourcetree + "/drupal/includes/bootstrap.inc" contrib = sourcetree + "/all/modules/contrib" rpmmodules = ...
Andy-Thornton/drupal-security-updates
security-updates.py
Python
gpl-3.0
1,721
0.006973
# encoding: utf-8 u'''MCL — Organ Folder''' from ._base import IIngestableFolder, Ingestor, IngestableFolderView from .interfaces import IOrgan from five import grok class IOrganFolder(IIngestableFolder): u'''Folder containing body systems, also known as organs.''' class OrganIngestor(Ingestor): u'''RDF i...
MCLConsortium/mcl-site
src/jpl.mcl.site.knowledge/src/jpl/mcl/site/knowledge/organfolder.py
Python
apache-2.0
544
0.001845
# !/usr/bin/python # Copyright (c) 2007 Randal Barlow <im.tehk at gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any ...
p12tic/awn-extras
shared/python/awnmediaplayers.py
Python
gpl-2.0
28,094
0.003132
# -*- coding: utf-8 -*- from feedz.processors.content_filter import ContentFilterProcessor
indexofire/gork
src/gork/application/feedz/processors/__init__.py
Python
mit
91
0
#!/usr/bin/python # 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 distributed...
cchurch/ansible-modules-core
cloud/amazon/rds_param_group.py
Python
gpl-3.0
10,548
0.005973
# # # from __future__ import absolute_import, division, print_function, \ unicode_literals from mock import Mock, call from os.path import dirname, join from requests import HTTPError from requests_mock import ANY, mock as requests_mock from unittest import TestCase from octodns.record import Record from octodns...
h-hwang/octodns
tests/test_octodns_provider_dnsimple.py
Python
mit
6,915
0
from django.test import TestCase class PublicTest(TestCase): fixtures = ['main/fixtures/arches.json', 'main/fixtures/repos.json', 'main/fixtures/package.json', 'main/fixtures/groups.json', 'devel/fixtures/staff_groups.json'] def test_index(self): response = self.client...
archlinux/archweb
public/tests.py
Python
gpl-2.0
1,786
0.00056
""" The DoInterestManager keeps track of which parent/zones that we currently have interest in. When you want to "look" into a zone you add an interest to that zone. When you want to get rid of, or ignore, the objects in that zone, remove interest in that zone. p.s. A great deal of this code is just code moved from ...
chandler14362/panda3d
direct/src/distributed/DoInterestManager.py
Python
bsd-3-clause
29,162
0.002846
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
zhreshold/mxnet
tests/python/unittest/test_extensions.py
Python
apache-2.0
7,787
0.010659
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe, os, json from frappe.utils import cstr from unidecode import unidecode from six import iteritems def create_charts(company, chart_template=None, existing_company=None): chart...
manassolanki/erpnext
erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
Python
gpl-3.0
6,558
0.02516
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('reddit', '0020_pendingsubmissions_submitted'), ] operations = [ migrations.AddField( model_name='redditcredentia...
kiwiheretic/logos-v2
reddit/migrations/0021_redditcredentials_reddit_username.py
Python
apache-2.0
440
0
# # sublimelinter.py # Part of SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ryan Hileman and Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter3 # License: MIT # """This module provides the SublimeLinter plugin class and supporting methods.""" import os import...
yubchen/Qlinter
sublimelinter.py
Python
mit
15,716
0.001145
from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^login/', 'django.contrib.auth.views.login'), (r'^admin/', include(admin.site.urls)), )
callowayproject/django-cookiesession
example/urls.py
Python
apache-2.0
222
0.004505
import os from .utils import get_config PACKAGE_PATH = os.path.abspath(os.path.dirname(__file__)) REPO_PATH = os.path.join(PACKAGE_PATH, os.pardir) LOG_PATH = '~/Library/Application Support/Adium 2.0/Users/Default/Logs' LOG_PATH = os.path.expanduser(LOG_PATH) MOVED_LOG_PATH = os.path.expanduser('~/.adiumshlogs') CONF...
shichao-an/adium-sh
adiumsh/settings.py
Python
bsd-2-clause
1,138
0
from django.http import HttpResponseRedirect from django.conf import settings from django.utils.deprecation import MiddlewareMixin from re import compile EXEMPT_URLS = [compile(settings.LOGIN_URL.lstrip('/'))] if hasattr(settings, 'LOGIN_EXEMPT_URLS'): EXEMPT_URLS += [compile(expr) for expr in settings.LOGIN_EXEMP...
forestdussault/olc_webportalv2
olc_webportalv2/users/middleware.py
Python
mit
1,413
0
# -*- coding: utf-8 -*- # Etalage -- Open Data POIs portal # By: Emmanuel Raviart <eraviart@easter-eggs.com> # # Copyright (C) 2011, 2012 Easter-eggs # http://gitorious.org/infos-pratiques/etalage # # This file is part of Etalage. # # Etalage is free software; you can redistribute it and/or modify # it under the term...
Gentux/etalage
etalage/contexts.py
Python
agpl-3.0
7,875
0.009524
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from . import wiz_lock_lot
alhashash/odoomrp-wip
stock_lock_lot/wizard/__init__.py
Python
agpl-3.0
288
0
#!/usr/bin/env python # # This script maps breed names to Livestock Breed Ontology (LBO) IDs. # # Input files: # ONTO.tsv with two columns: id (format: <ontology_acronym>:<term_id>) and name # pigQTLdb.tsv with two columns: qtl_id and breed (comma-separated field of values) # # Output (STDOUT): # three columns s...
candYgene/abg-ld
src/tmp/ontomap_breed.py
Python
apache-2.0
894
0.021253
from ..sqlclear import SQLClearCommand as Command
skibblenybbles/django-commando
commando/django/core/management/commands/sqlclear.py
Python
mit
50
0
from setuptools import setup, find_packages setup(name='pocket', version='0.0.0', packages=find_packages(), install_requires=['sneeze'], entry_points={'nose.plugins.sneeze.plugins.add_models' : ['pocket_models = pocket.database:add_models'], 'nose.plugins.sneeze.plugins.add_...
psusloparov/sneeze
pocket/setup.py
Python
apache-2.0
492
0.014228
# -*- coding: utf-8 -*- from flask import render_template, redirect, url_for, flash, abort from purchasing.decorators import requires_roles from purchasing.data.stages import Stage from purchasing.data.flows import Flow from purchasing.conductor.forms import FlowForm, NewFlowForm from purchasing.conductor.manager im...
codeforamerica/pittsburgh-purchasing-suite
purchasing/conductor/manager/flow_management.py
Python
bsd-3-clause
2,911
0.002061
# -*- coding: utf-8 -*- """ Copyright (C) 2015, MuChu Hsu Contributed by Muchu Hsu (muchu1983@gmail.com) This file is part of BSD license <https://opensource.org/licenses/BSD-3-Clause> """ import unittest import logging from cameo.spiderForPEDAILY import SpiderForPEDAILY """ 測試 抓取 PEDAILY """ class SpiderForPEDAILYTe...
muchu1983/104_cameo
test/unit/test_spiderForPEDAILY.py
Python
bsd-3-clause
1,237
0.00841
# Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
javier-ruiz-b/docker-rasppi-images
raspberry-google-home/env/lib/python3.7/site-packages/rsa/util.py
Python
apache-2.0
2,986
0.00067
#!/usr/local/bin/python # -*- coding: utf-8 -*- # Author: illuz <iilluzen[at]gmail.com> # File: AC_dfs_n.py # Create Date: 2015-08-16 10:15:54 # Usage: AC_dfs_n.py # Descripton: # Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left ...
yxping/leetcode
solutions/257.Binary_Tree_Paths/AC_dfs_n.py
Python
gpl-2.0
836
0.010766
from twisted.internet import threads from config import config from enigma import eDBoxLCD, eTimer, iPlayableService import NavigationInstance from Tools.Directories import fileExists from Components.ParentalControl import parentalControl from Components.ServiceEventTracker import ServiceEventTracker from Components.Sy...
idrogeno/IdroMips
lib/python/Components/VfdSymbols.py
Python
gpl-2.0
4,865
0.027955
import hashlib import os import tempfile import zipfile from bs4 import BeautifulSoup from django.test import Client from django.test import TestCase from mock import patch from ..models import LocalFile from ..utils.paths import get_content_storage_file_path from kolibri.core.auth.test.helpers import provision_devic...
mrpau/kolibri
kolibri/core/content/test/test_zipcontent.py
Python
mit
12,256
0.003264
import os, gzip, argparse parser = argparse.ArgumentParser(description='Extract transcript records') parser.add_argument("gff3", help="input gff3 file") parser.add_argument("-F", dest="Feature", nargs='+', required=True, help="transcript type(s) and attribution(s), " + "E.g \"-F mRNA ncRNA:ncrna_class=lncRNA\"") p...
d2jvkpn/bioinformatics_tools
bioparser/gff3extract_v0.9.py
Python
gpl-3.0
1,658
0.019903
from model.group import Group import random import string import os.path import jsonpickle import getopt import sys try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of groups", "file"]) except getopt.GetoptError as err: getopt.usage() sys.exit(2) n = 3 f = "data/groups.json" for o, a in o...
kasiazubielik/python_training
generator/group.py
Python
apache-2.0
1,257
0.009547
#!/usr/bin/env python3 from subprocess import getoutput import threading import time import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk as gtk from gi.repository import GLib class CheckConnection(threading.Thread): def __init__(self, pppoedi): super(CheckConnection,self).__init__() ...
LAR-UFES/pppoe-plugin
pppoediplugin/CheckConnection.py
Python
gpl-3.0
2,146
0.00794
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
xuleiboy1234/autoTitle
textsum/seq2seq_attention_model.py
Python
mit
13,425
0.00432
#!/home/executor/Ice/python2.4/bin/python # Copyright (C) 2012 CEDIANT <info@cediant.es> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License v2 # as published by the Free Software Foundation. # # This program is distributed in the hope that it...
cediant/hpcservergridscheduler
CLIENT/client.py
Python
gpl-2.0
7,365
0.057298
"""Define tests for systems."""
w1ll1am23/simplisafe-python
tests/system/__init__.py
Python
mit
32
0
__author__ = 'Cedric Da Costa Faro' from flask import render_template from . import main @main.app_errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 @main.app_errorhandler(405) def method_not_allowed(e): return render_template('405.html'), 405 @main.app_errorhandler(500) de...
cdcf/time_tracker
app/main/errors.py
Python
bsd-3-clause
392
0
import os import socket import atexit import re from setuptools.extern.six.moves import urllib, http_client, map import pkg_resources from pkg_resources import ResolutionError, ExtractionError try: import ssl except ImportError: ssl = None __all__ = [ 'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_avail...
AustinRoy7/Pomodoro-timer
venv/Lib/site-packages/setuptools/ssl_support.py
Python
mit
8,130
0.001107
import sys,string,os sys.path.insert(1, os.path.join(sys.path[0], '..')) ### import parent dir dependencies import os.path import unique import itertools dirfile = unique ############ File Import Functions ############# def filepath(filename): fn = unique.filepath(filename) return fn def read_di...
nsalomonis/AltAnalyze
import_scripts/mergeFilesUnique.py
Python
apache-2.0
14,369
0.021992
import unittest from twisted.internet.defer import Deferred from landscape.lib.testing import ( FSTestCase, TwistedTestCase, ProcessDataBuilder) from landscape.sysinfo.sysinfo import SysInfoPluginRegistry from landscape.sysinfo.processes import Processes class ProcessesTest(FSTestCase, TwistedTestCase, unit...
CanonicalLtd/landscape-client
landscape/sysinfo/tests/test_processes.py
Python
gpl-2.0
2,217
0
#!/usr/bin/env python3 # Copyright (c) 2018-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the scantxoutset rpc call.""" from test_framework.test_framework import BitcoinTestFramework from ...
nikkitan/bitcoin
test/functional/rpc_scantxoutset.py
Python
mit
13,144
0.008673
import datetime import re import scrapy from locations.items import GeojsonPointItem from locations.hours import OpeningHours day_mapping = {'MON': 'Mo','TUE': 'Tu','WED': 'We','THU': 'Th', 'FRI': 'Fr','SAT': 'Sa','SUN': 'Su'} def convert_24hour(time): """ Takes 12 hour time as a string and conver...
iandees/all-the-places
locations/spiders/petsmart.py
Python
mit
3,626
0.007722
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['RelativeDifference'] , ['Lag1Trend'] , ['Seasonal_Hour'] , ['ARX'] );
antoinecarme/pyaf
tests/model_control/detailed/transf_RelativeDifference/model_control_one_enabled_RelativeDifference_Lag1Trend_Seasonal_Hour_ARX.py
Python
bsd-3-clause
165
0.048485
import logging from virttest import libvirt_xml from virttest import utils_libvirtd from virttest import utils_misc from autotest.client.shared import error def run(test, params, env): """ Test capabilities with host numa node topology """ libvirtd = utils_libvirtd.Libvirtd() libvirtd.start() ...
rbian/tp-libvirt
libvirt/tests/src/numa/numa_capabilities.py
Python
gpl-2.0
1,889
0
######################################## # Automatically generated, do not edit. ######################################## from pyvisdk.thirdparty import Enum HostDiskPartitionInfoPartitionFormat = Enum( 'gpt', 'mbr', 'unknown', )
xuru/pyvisdk
pyvisdk/enums/host_disk_partition_info_partition_format.py
Python
mit
247
0
# Define a custom User class to work with django-social-auth from django.db import models from django.contrib.auth.models import User class Task(models.Model): name = models.CharField(max_length=200) owner = models.ForeignKey(User) finished = models.BooleanField(default=False) shared ...
kurdd/Oauth
app/models.py
Python
apache-2.0
1,109
0.012624
import nltk import filemanager import multiprocessing import os import ConfigParser from assistant import Assistant, Messenger from nltk.corpus import wordnet resources_dir = 'resources\\' login_creds = ConfigParser.SafeConfigParser() if os.path.isfile(resources_dir + 'login_creds.cfg'): login_creds.read(resour...
omn0mn0m/JARVIS
jarvis/jarvis.py
Python
mit
3,867
0.006465
import _testcapi import codecs import io import locale import sys import unittest import warnings from test import support if sys.platform == 'win32': VISTA_OR_LATER = (sys.getwindowsversion().major >= 6) else: VISTA_OR_LATER = False try: import ctypes except ImportError: ctypes = None SIZEOF_WCH...
mancoast/CPythonPyc_test
fail/332_test_codecs.py
Python
gpl-3.0
91,385
0.001609
# # Protocol diffing tool from http://github.com/dsjoerg/s2protocol # # Usage: s2_cli.py --diff 38215,38749 # import sys import argparse import pprint from s2protocol.versions import build def diff_things(typeinfo_index, thing_a, thing_b): if type(thing_a) != type(thing_b): print( "typeinfo {...
Blizzard/s2protocol
s2protocol/diff.py
Python
mit
2,237
0.002235
# Authors: See README.RST for Contributors # Copyright 2015-2017 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import fields, models class IrActionsReportDuplicate(models.TransientModel): _name = "ir.actions.report.duplicate" _description = "Duplicate Qweb report" suffix...
OCA/server-tools
base_report_auto_create_qweb/wizard/report_duplicate.py
Python
agpl-3.0
755
0.001325
""" https://leetcode.com/problems/construct-the-rectangle/ https://leetcode.com/submissions/detail/107452214/ """ import math class Solution(object): def constructRectangle(self, area): """ :type area: int :rtype: List[int] """ W = int(math.sqrt(area)) while area ...
vivaxy/algorithms
python/problems/construct_the_rectangle.py
Python
mit
598
0.001672
import bpy bpy.context.object.data.sensor_width = 23.6 bpy.context.object.data.sensor_height = 15.6 bpy.context.object.data.sensor_fit = 'HORIZONTAL'
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/presets/camera/Nikon_D7000.py
Python
gpl-3.0
150
0